xiaomianao666

小程序:JustLive

Aug 3rd, 2024
486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@JustLive@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiSnVzdExpdmUiLCJhdXRob3IiOiJKb2UmJumaj+mjjiYm5Y+R57Kq5raC5aKZJiZSeCYmWnJ1aXJ5IiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjZnlwYWdlIiwidmVyc2lvbiI6MjAyNDA0MTcsImNvbF90eXBlIjoibW92aWVfMyIsImNsYXNzX25hbWUiOiIiLCJ0eXBlIjoidmlkZW8iLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbmxldCBzID0gW107XG5sZXQgZCA9IFtdO1xubGV0IGFwaSA9ICQucmVxdWlyZShcInB1YmxpY1wiKS5BcGk7XG5sZXQgaGVhZGVycyA9ICQucmVxdWlyZShcInB1YmxpY1wiKS5oZWFkZXJzO1xubGV0IHVpZCA9IGdldEl0ZW0oXCJ1aWRcIiwgXCJcIik7XG5sZXQgY2xhcyA9IGdldE15VmFyKFwiY2xhc3NcIiwgXCJhbGxcIik7XG5cbmlmIChnZXRNeVZhcihcIlZlcnNcIiwgXCIwXCIpID09IFwiMFwiKSB7XG4gICAgbGV0IHZlcnMgPSBKU09OLnBhcnNlKGZldGNoKGFwaSArIFwidmVyc2lvblVwZGF0ZVwiLCBoZWFkZXJzKSkuZGF0YS5sYXRlc3RWZXJzaW9uO1xuICAgIHB1dE15VmFyKFwiVmVyc1wiLCB2ZXJzKTtcbn07XG5sZXQgcHV0dmVyID0gZ2V0TXlWYXIoXCJWZXJzXCIsIFwiMFwiKTtcbmxldCBzZXR2ZXIg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gICAgaWQ6IFwiaWRfanVzdGxpdmVfdmVyc2lvblwiLFxuICAgICAgICAgICAgcGFnZVRpdGxlOiBcIuaIkeeahOWFs+azqFwiXG4gICAgICAgIH1cbiAgICB9KTtcbiAgICBzLnB1c2goe1xuICAgICAgICB0aXRsZTogXCLmkJzntKJcIixcbiAgICAgICAgZGVzYzogdWlkID09IFwiXCIgPyBcIuaQnCDntKIg6ZyAIOWFiCDnmbsg5b2VXCIgOiBcIuWPryDku6Ug5bCRIOWtlyDvvIzkuI0g5Y+vIOmUmSDlrZcg77yBXCIsXG4gICAgICAgIHVybDogdWlkID09IFwiXCIgPyBcIid0b2FzdDovL+aQnOe0oumcgOWFiOeZu+W9lSdcIiA6ICQudG9TdHJpbmcoKCkgPT4ge1xuICAgICAgICAgICAgaWYgKGlucHV0ICE9IFwiXCIpIHtcbiAgICAgICAgICAgICAgICBwdXRNeVZhcihcIk15a2V5XCIsIGlucHV0KTtcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJoaWtlcjovL2VtcHR5XCI7XG4gICAgICAgICAgICB9O1xuICAgICAgICB9KSxcbiAgICAgICAgY29sX3R5cGU6IFwiaW5wdXRcIixcbiAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0TXlWYXIoXCJNeWtleVwiKVxuICAgICAgICB9XG4gICAgfSwge1xuICAgICAgICBjb2xfdHlwZTogXCJiaWdfYmxhbmtfYmxvY2tcIlxuICAgIH0sIHtcbiAgICAgICAgY29sX3R5cGU6IFwiYmlnX2JsYW5rX2Jsb2NrXCJcbiAgICB9LCB7XG4gICAgICAgIGNvbF90eXBlOiBcImxpbmVfYmxhbmtcIlxuICAgIH0pO1xuXG4gICAgLy/ng63pl6jnm7Tmkq1cbiAgICBzLnB1c2goe1xuICAgICAgICB0aXRsZTogJzxmb250IGNvbG9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qIDEwMDApIHx8IHNhcmVhICE9IFwiMFwiKSB7XG4gICAgICAgIC8v5ri45L6gXG4gICAgICAgIGxldCB5eHVybCA9IFwiaHR0cHM6Ly9hcHAuYWxpMjEzLm5ldC90b3AvaG90Lmh0bWxcIjtcbiAgICAgICAgbGV0IGFyZWE7XG4gICAgICAgIHRyeSB7XG4gICAgICAgICAgICBhcmVhID0gc2FyZWEgPT0gXCIwXCIgPyBmbGIuYXJlYSA6IGZsYi5hcmVhICsgXCJ8XCIgKyBzYXJlYTtcbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgYXJlYSA9IFwi55S756ym6IO95omLfOaIkeeahOWLh+iAhXzlpKrnqbrooYzliqh85b+X5oiY55WlfOW8ueWjs+eJuXzlnLDpk4Hot5F85b+N6ICF5paw5LiWfOaLo+eIsVwiO1xuICAgICAgICB9O1xuXG4gICAgICAgIGxldCBsaXNmID0gcGRmYShmZXRjaCh5eHVybCksIFwiLm1haW4tY29udGFpbmVyJiZpbWdcIikuZmlsdGVyKGVsZW1lbnQgPT4gIW5ldyBSZWdFeHAoYXJlYSkudGVzdChlbGVtZW50KSkuc2xpY2UoMCwgOCk7XG4gICAgICAgIGxldCBsaXN0ID0gW107XG4gICAgICAgIGZvciAobGV0IGxpIG9mIGxpc2YpIHtcbiAgICAgICAgICAgIGxldCB0aXRsZSA9IHBkZmgobGksIFwiaW1nJiZhbHRcIik7XG4gICAgICAgICAgICBsZXQgcGljID0gcGRmaChsaSwgXCJpbWcmJnNyY1wiKTtcbiAgICAgICAgICAgIGxpc3QucHVzaCh0aXRsZSArIFwiJFwiICsgcGljKTtcbiAgICAgICAgfVxuICAgICAgICB2YXIgZmwgPSB7XG4gICAgICAgICAgICBcImx0XCI6IENULFxuICAgICAgICAgICAgXCJsaXN0XCI6IGxpc3QsXG4gICAgICAgICAgICBcImFyZWFcIjogYXJlYVxuICAgICAgICB9O1xuICAgICAgICBzYXZlRmlsZShcImhpa2VyOi8vZmlsZXMvY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tfYmxvY2tcIlxuICAgIH0pO1xuXG4gICAgcy5wdXNoKHtcbiAgICAgICAgaW1nOiBcIlwiLFxuICAgICAgICB1cmw6IFwiaGlrZXI6Ly9lbXB0eVwiLFxuICAgICAgICBjb2xfdHlwZTogXCJjYXJkX3BpY18zXCIsXG4gICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICBjbHM6IFwiY2xzX2xvYWRcIlxuICAgICAgICB9XG4gICAgfSwge1xuICAgICAgICBpbWc6IFwiaHR0cHM6Ly9oaWtlcmZhbnMuY29tL3dlaXN5ci9pbWcvTG9hZGluZzEuZ2lmXCIsXG4gICAgICAgIHVybDogXCJoaWtlcjovL2VtcHR5XCIsXG4gICAgICAgIGNvbF90eXBlOiBcInBpY18zXCIsXG4gICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICBjbHM6IFwiY2xzX2xvYWRcIlxuICAgICAgICB9XG4gICAgfSk7XG4gICAgc2V0UHJlUmVzdWx0KHMpO1xufTtcblxuLy/mkJzntKLliJfooahcbmlmIChnZXRNeVZhcihcIk15a2V5XCIpKSB7XG4gICAgaWYgKE1ZX1BBR0UgPT0gJzEnKSB7XG4gICAgICAgIGlmICh1aWQgPT0gXCJcIikge1xuICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICB0aXRsZTogXCLnmbvlvZXlkI7nu6fnu63mkJzntKJcIixcbiAgICAgICAgICAgICAgICBkZXNjOiBcIueCueWHu+eZu+W9lVwiLFxuICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFwic1R5cGVcIiwgJ2xpdmluZycpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9oaXN0b3J5I25vSGlzdG9yeSMjbm9SZWNvcmRIaXN0b3J5Iyc7XG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFwidGV4dF9jZW50ZXJfMVwiXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgbGV0IHNzX3VybCA9IGFwaSArIFwic2VhcmNoP3BsYXRmb3JtPVwiICsgY2xhcyArIFwiJmtleVdvcmRzPVwiICsgZ2V0TXlWYXIoXCJNeWtleVwiKSArIFwiJnVpZD1cIiArIHVpZDtcbiAgICAgICAgICAgICAgICBsZXQganNvbiA9IEpTT04ucGFyc2UoZmV0Y2goc3NfdXJsLCBoZWFkZXJzKSkuZGF0YTtcbiAgICAgICAgICAgICAgICBsZXQgcGxhY2UgPSBcInNvXCI7XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSBpbiBqc29uKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0ganNvbltpXTtcbiAgICAgICAgICAgICAgICAgICAgJC5yZXF1aXJlKFwicHVibGljXCIpLkxpc3RzKGFwaSwgdWlkLCBwbGFjZSwgZCwgZGF0YS5yb29tSWQsIGRhdGEucGxhdGZvcm0sIGRhdGEubmlja05hbWUsIGRhdGEuY2F0ZU5hbWUsIGRhdGEuZm9sbG93ZXJzLCBkYXRhLmhlYWRQaWMsIGRhdGEuaXNMaXZlKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIuKAnOKAnOWIsOW6leS6huWRouKAneKAnVwiLFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiAn54K55Ye76L+U5Zue6aaW6aG1JyxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKFwiTXlrZXlcIilcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcInRleHRfY2VudGVyXzFcIixcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXCLigJzigJzmkJzntKLmnKrnn6XplJnor6/igJ3igJ1cIixcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9lbXB0eScsXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcInRleHRfY2VudGVyXzFcIixcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICB0b2FzdChcIuaQnOe0ouWHuueOsOmUmeivr1wiKTtcbiAgICAgICAgICAgIH07XG4gICAgICAgIH07XG4gICAgfTtcbn0gZWxzZSB7XG4gICAgLy/kuLvpobXliJfooahcbiAgICBsZXQgaG9tZSA9IGFwaSArIFwiZ2V0UmVjb21tZW5kP3BhZ2U9XCIgKyBNWV9QQUdFICsgXCImc2l6ZT0yMFwiO1xuICAgIGxldCBmZW4gPSBhcGkgKyBcImdldFJlY29tbWVuZEJ5UGxhdGZvcm0/cGxhdGZvcm09XCIgKyBjbGFzICsgXCImcGFnZT1cIiArIE1ZX1BBR0UgKyBcIiZzaXplPTIwXCI7XG4gICAgbGV0IHVybCA9IGNsYXMgPT0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1aXJlKFwic2VhcmNoXCIpLmVuZ2luZXMuZm9yRWFjaCgoTWFwLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGEucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBcInRpdGxlXCI6IE1hcCxcbiAgICAgICAgICAgICAgICAgICAgICAgIFwic2VhcmNoX3VybFwiOiBidWlsZFVybChcImhpa2VyOi8vZW1wdHlcIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGt3OiBcIioqXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogXCJmeXBhZ2VcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmdpbmU6IE1hcFxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICBcInNlYXJjaEZpbmRcIjogXCJqczokLnJlcXVpcmUoJ3NlYXJjaD9ydWxlPVwiICsgZ2V0TXlWYXIoXCJSX3VsZVwiKSArIFwiJykuc2VhcmNoKClcIlxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShkYXRhKTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgIH0sXG4gICAgICAgIHRpdGxlOiBcIuaQnOe0ou+8mlwiICsgZ2V0UGFyYW0oXCJrd1wiKVxuICAgIH1dKVxufVxuc2V0UmVzdWx0KGQpOyIsImRldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJkZXRhaWxfZmluZF9ydWxlIjoiIiwic2RldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJzZGV0YWlsX2ZpbmRfcnVsZSI6IiIsInVhIjoibW9iaWxlIiwicHJlUnVsZSI6IiIsInBhZ2VzIjoiW3tcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLkuoznuqdcIixcInBhdGhcIjpcImRldGFpbFwiLFw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GkgaW4gbGlzdCkge1xcbiAgICAgICAgICAgIGxldCBsaSA9IGxpc3RbaV07XFxuICAgICAgICAgICAgbGV0IGNscyA9IGxpLmV4dHJhLmNscztcXG4gICAgICAgICAgICBsZXQganMyID0gbGkuZXh0cmEubG9uZ0NsaWNrWzFdLmpzO1xcbiAgICAgICAgICAgIHVwZGF0ZUl0ZW0oXFxcImlkX1xcXCIgKyBwbGF0Zm9ybSArIHJvb21pZCwge1xcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgY2xzOiBjbHMsXFxuICAgICAgICAgICAgICAgICAgICBpZDogXFxcImlkX1xcXCIgKyBwbGF0Zm9ybSArIHJvb21pZCxcXG4gICAgICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgIGxvbmdDbGljazogW3tcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGl0ID09IFxcXCIxXFxcIiA/IFxcXCLlt7LlhbPms6hcXFwiIDogXFxcIuacquWFs+azqFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAganM6ICQucmVxdWlyZShcXFwicHVibGljXFxcIikuTG9uZ0NsaWNrKGFwaSwgdWlkLCByb29taWQsIHBsYXRmb3JtKSxcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuWumOe9kemTvuaOpVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAganM6IGpzMlxcbiAgICAgICAgICAgICAgICAgICAgfV1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGlmIChnZXRNeVZhcihcXFwic1R5cGVcXFwiLCBcXFwiXFxcIikgIT09IFxcXCJcXFwiICYmIHRpdCA9PSAwKSB7XFxuICAgICAgICAgICAgICAgIGRlbGV0ZUl0ZW0oXFxcImlkX1xcXCIgKyBwbGF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1xcbiAgICBsZXQganNvbiA9IEpTT04ucGFyc2UoZmV0Y2goYXBpICsgXFxcImdldFJlYWxVcmxNdWx0aVNvdXJjZT9wbGF0Zm9ybT1cXFwiICsgcGxhdGZvcm0gKyBcXFwiJnJvb21JZD1cXFwiICsgcm9vbWlkLCBoZWFkZXJzKSkuZGF0YSB8fCBbXTtcXG4gICAgaWYgKE9iamVjdC5rZXlzKGpzb24pLmxlbmd0aCAhPT0gMCkge1xcbiAgICAgICAgZm9yIChsZXQgeGwgaW4ganNvbikge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB4bCxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzJcXFwiLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGxpc3QsIG1pZCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWUgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB1cmxzID0gW11cXG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgaW4gbGlzdCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsaSA9IGxpc3RbaV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZS5wdXNoKGxpLnF1YWxpdHlOYW1lKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybHMucHVzaChsaS5wbGF5VXJsKVxcbiAgICAgICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh1cmxzKSAhPT0gJ1tcXFwiXFxcIl0nID8gSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVzOiBuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybHM6IHVybHMsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGFubXU6IC9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XFxcImlkX211bHRpbGluZVxcXCIsIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IG11bCA9PSBcXFwiMlxcXCIgPyBcXFwi5aSH55SoXFxcIiA6IG11bCA9PSBcXFwiMVxcXCIgPyBcXFwi5aSa57q/6LevXFxcIiA6IFxcXCLljZXnur/ot69cXFwiXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgbGV0IGNsbHMgPSBnZXRNeVZhcihcXFwiTXlrZXlcXFwiLCBcXFwiXFxcIikgIT09IFxcXCJcXFwiID8gXFxcImNscy1zb1xcXCIgOiBcXFwiY2xzLWhvbWVcXFwiO1xcbiAgICAgICAgICAgIGxldCBob21lID0gZmluZEl0ZW1zQnlDbHMoY2xscykgfHwgW107XFxuICAgICAgICAgICAgbGV0IFN1YnMgPSBmaW5kSXRlbXNCeUNscyhcXFwiY2xzLVN1YnNcXFwiKSB8fCBbXTtcXG5cXG4gICAgICAgICAgICBmdW5jdGlvbiBkeGxzeChTKSB7XFxuICAgICAgICAgICAgICAgIGxldCBpc0xpdmUgPSBTLmV4dHJhLmlzTGl2ZTtcXG4gICAgICAgICAgICAgICAgbGV0IGZvcm0gPSBTLnVybC5tYXRjaCgvcGxhdGZvcm09KC4qKSYvKVsxXTtcXG4gICAgICAgICAgICAgICAgbGV0IG1pZCA9IC9oaWtlci8udGVzdChTLnVybCkgPyBTLnVybC5zcGxpdChcXFwicm9vbUlkPVxcXCIpWzFdIDogUy51cmwubWF0Y2goL3Jvb21JZD0oXFxcXGQrKS4qLylbMV07XFxuICAgICAgICAgICAgICAgIGxldCByZWFsID0gbXVsID09IFxcXCIwXFxcIiA/IFxcXCJnZXRSZWFsVXJsTXVsdGlTb3VyY2VcXFwiIDogbXVsID09IFxcXCIyXFxcIiA/IFxcXCJnZXRSZWFsVXJsXFxcIiA6IFxcXCJcXFwiO1xcbiAgICAgICAgICAgICAgICBsZXQgdXJsID0gLzB8Mi8udGVzdChtdWwpID8gYXBpICsgcmVhbCArIFxcXCI/cGxhdGZvcm09XFxcIiArIGZvcm0gKyBcXFwiJnJvb21JZD1cXFwiICsgbWlkICsgJC5yZXF1aXJlKFxcXCJwdWJsaWNcXFwiKS5MYXp5KGlzTGl2ZSkgOiBcXFwiaGlrZXI6Ly9wYWdlL2RldGFpbD8jaW1tZXJzaXZlVGhlbWUjJnBsYXRmb3JtPVxcXCIgKyBmb3JtICsgXFxcIiZyb29tSWQ9XFxcIiArIG1pZDtcXG4gICAgICAgICAgICAgICAgdXBkYXRlSXRlbShcXFwiaWRfXFxcIiArIGZvcm0gKyBtaWQsIHtcXG4gICAgICAgICAgICAgICAgICAgIHVybDogdXJsXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgZm9yIChsZXQgcyBpbiBTdWJzKSB7XFxuICAgICAgICAgICAgICAgIGxldCBTID0gU3Vic1tzXTtcXG4gICAgICAgICAgICAgICAgZHhsc3goUyk7XFxuICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICBmb3IgKGxldCBoIGluIGhvbWUpIHtcXG4gICAgICAgICAgICAgICAgbGV0IEggPSBob21lW2hdO1xcbiAgICAgICAgICAgICAgICBkeGxzeChIKTtcXG4gICAgICAgICAgICB9O1xcbiAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICB9LCBhcGksIGlucHV0KVxcbiAgICB9LCBhcGkpLFxcbiAgICBleHRyYToge1xcbiAgICAgICAgaWQ6IFxcXCJpZF9tdWx0aWxpbmVcXFwiXFxuICAgIH1cXG59KVxcblxcbmlmICh1aWQgPT0gXFxcIlxcXCIpIHtcXG4gICAgaWYgKHpjID09IFxcXCLnmbsg5b2VXFxcIikge1xcbiAgICAgICAgcy5wdXNoKHtcXG4gICAgICAgICAgICBkZXNjOiBcXFwi5pi156ewIO+8iDEtMjDkvY3vvIlcXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICA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9naW5cXFwiO1xcbiAgICAgICAgICAgIGxldCBuaWNrID0gemMgPT0gXFxcIueZuyDlvZVcXFwiID8gXFxcIiZuaWNrbmFtZT1cXFwiICsgZ2V0SXRlbShcXFwibmlja1xcXCIsIFxcXCJcXFwiKSA6IFxcXCJcXFwiO1xcbiAgICAgICAgICAgIGxldCBhY2NvdW50ID0gZ2V0SXRlbShcXFwiYWNjb3VudFxcXCIsIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICBsZXQgcGFzc3dvcmQgPSBnZXRJdGVtKFxcXCJwYXNzd29yZFxcXCIsIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICBpZiAoYWNjb3VudCA9PSBcXFwiXFxcIiB8fCBwYXNzd29yZCA9PSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5biQ5Y+35oiW5a+G56CB5LiN6IO95Li656m677yBXFxcIjtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBsZXQgY29va2llcyA9IEpTT04ucGFyc2UocG9zdCgkLnJlcXVpcmUoXFxcInB1YmxpY1xcXCIpLkFwaS5yZXBsYWNlKFxcXCJsaXZlL1xcXCIsIFxcXCJcXFwiKSArIHJlZ2luICsgXFxcIj91c2VybmFtZT1cXFwiICsgYWNjb3VudCArIG5pY2sgKyBcXFwiJnBhc3N3b3JkPVxcXCIgKyBtZDUocGFzc3dvcmQpLCAkLnJlcXVpcmUoXFxcInB1YmxpY1xcXCIpLmhlYWRlcnMpKTtcXG4gICAgICAgICAgICAgICAgLy9sb2coY29va2llcylcXG4gICAgICAgICAgICAgICAgaWYgKGNvb2tpZXMuY29kZSA9PSAyMDApIHtcXG4gICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oXFxcInVpZFxcXCIsIGNvb2tpZXMuZGF0YS51aWQpO1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbShcXFwibmlja25hbWVcXFwiLCBjb29raWVzLmRhdGEubmlja05hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbShcXFwidXNlcm5hbWVcXFwiLCBjb29raWVzLmRhdGEudXNlck5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgYmFjaygpO1xcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJJdGVtKFxcXCJuaWNrXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKFxcXCJ6dWNlXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gemMgPT0gXFxcIueZuyDlvZVcXFwiID8gXFxcInRvYXN0Oi8v5rOo5YaM5oiQ5Yqf77yM5bey55m75b2VXFxcIiA6IFxcXCJ0b2FzdDovL+eZu+W9leaIkOWKn1xcXCI7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoemMgPT0gXFxcIueZuyDlvZVcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL1xcXCIgKyBjb29raWVzLm1lc3NhZ2U7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySXRlbShcXFwibmlja25hbWVcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGVhckl0ZW0oXFxcInVzZXJuYW1lXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJdGVtKFxcXCJ1aWRcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v55m76ZmG5aSx6LSl77yM5Y+v6IO95piv55So5oi35ZCN5oiW5a+G56CB5pyJ6K+vXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICB9O1xcbiAgICAgICAgfSwgemMpLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJ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3kuK1cXFxcdFxcXCIgOiBcXFwi5pyq5byA5pKtXFxcXHRcXFwiXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGRlbGV0ZUl0ZW1CeUNscyhcXFwiY2xzLVN1YnNcXFwiKTtcXG4gICAgICAgIGxldCByZXMgPSBzdG9yYWdlMC5nZXRNeVZhcihcXFwic3Vic1xcXCIpO1xcbiAgICAgICAgbGV0IHN1ID0gW107XFxuICAgICAgICBmb3IgKGxldCBpIGluIHJlcykge1xcbiAgICAgICAgICAgIGxldCB0ZW1wID0gcmVzW2ldO1xcbiAgICAgICAgICAgIGlmIChzVHlwID09IFxcXCJsaXZpbmdcXFwiKSB7XFxuICAgICAgICAgICAgICAgIGlmICh0ZW1wLmlzTGl2ZSA9PSAxKSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAodGVtcC5sZW5ndGggIT09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAkLnJlcXVpcmUoXFxcInB1YmxpY1xcXCIpLkxpc3RzKGFwaSwgdWlkLCBwbGFjZSwgc3UsIHRlbXAucm9vbUlkLCB0ZW1wLnBsYXRGb3JtLCB0ZW1wLm93bmVyTmFtZSwgdGVtcC5jYXRlZ29yeU5hbWUsIHRlbXAub25saW5lLCB0ZW1wLnJvb21QaWMsIHRlbXAuaXNMaXZlKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgJC5yZXF1aXJlKFxcXCJwdWJsaWNcXFwiKS5OeXMoc3UpO1xcbiAgICAgICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICB9IGVsc2VcXG4gICAgICAgICAgICBpZiAodGVtcC5pc0xpdmUgPT0gMCAmJiB0ZW1wLnBsYXRGb3JtICE9PSBudWxsKSB7XFxuICAgICAgICAgICAgICAgICQucmVxdWlyZShcXFwicHVibGljXFxcIikuTGlzdHMoYXBpLCB1aWQsIHBsYWNlLCBz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cyA/IFxcXCLigJjigJjigJnigJk8Yj5cXFwiICsgbGlzLmZvbnRjb2xvcihcXFwiI0ZBNzI5OFxcXCIpICsgXFxcIjwvYj5cXFwiIDogbGlzXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKFxcXCJjbHNfanVzdHhsXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICBzbWFsTGlzdCA9IHIubWFwKChsaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaS5hcmVhTmFtZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiAoZ2V0TXlWYXIoXFxcIk15cHRcXFwiKSAhPT0gXFxcImRvdXlpblxcXCIgPyBsaS5hcmVhUGljIDogXFxcImh0dHBzOi8vd3d3LmRvdXlpbi5jb20vZmF2aWNvbi5pY29cXFwiKSArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKHR5cGUsIGFyZWEpID0+IHtcXG4gICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcIk15ZnJvXFxcIiwgZ2V0TXlWYXIoXFxcIk15cHRcXFwiLCBcXFwiaHV5YVxcXCIpKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL3BhZ2UvbmV3Q2xhc3NMaXN0P3R5cGVOYW1lPVxcXCIgKyB0eXBlICsgXFxcIiZhcmVhTmFtZT1cXFwiICsgYXJlYSArIFxcXCImcGFnZT1meXBhZ2VcXFwiXFxuICAgICAgICAgICAgfSwgbGkudHlwZU5hbWUsIGxpLmFyZWFOYW1lKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpY29uXzVcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlTmFtZTogbGkuaW5kZXhUeXBlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBcXFwiY2xzX2p1c3R4bFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmhlcml0VGl0bGU6IGZhbHNlXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIGFkZEl0ZW1BZnRlcihcXFwiaWRfanVzdHhselxcXCIsIHNtYWxMaXN0KTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgfSwgeC5pbmRleFR5cGUsIHIsIHJlcywgdHlwZU5hbWVzKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJzY3JvbGxfYnV0dG9uXFxcIixcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBcXFwiaWRfanVzdFxcXCIgKyBpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfTtcXG5cXG4gICAgICAgIHNtYWxsTGlzdC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogeC5hcmVhTmFtZSxcXG4gICAgICAgICAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKHR5cGUsIGFyZWEpID0+IHtcXG4gICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcIk15ZnJvXFxcIiwgZ2V0TXlWYXIoXFxcIk15cHRcXFwiLCBcXFwiaHV5YVxc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AgICBpc0xpdmU6IGlzTGl2ZSxcXG4gICAgICAgICAgICBpbmhlcml0VGl0bGU6IGZhbHNlLFxcbiAgICAgICAgICAgIGxvbmdDbGljazogW3tcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGdldEl0ZW0ocGxhdEZvcm0gKyByb29tSWQsIFxcXCIwXFxcIikgPT0gXFxcIjFcXFwiID8gXFxcIuW3suWFs+azqFxcXCIgOiBcXFwi5pyq5YWz5rOoXFxcIixcXG4gICAgICAgICAgICAgICAganM6ICQucmVxdWlyZShcXFwicHVibGljXFxcIikuTG9uZ0NsaWNrKGFwaSwgdWlkLCByb29tSWQsIHBsYXRGb3JtKSxcXG4gICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi5a6Y572R6ZO+5o6lXFxcIixcXG4gICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHJvb21pZCwgcGxhdGZvcm0pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAocGxhdGZvcm0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJkb3V5dVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB1cmwgPSBcXFwiaHR0cHM6Ly9tLmRvdXl1LmNvbS9cXFwiICsgcm9vbWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiYmlsaWJpbGlcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdXJsID0gXFxcImh0dHBzOi8vbGl2ZS5iaWxpYmlsaS5jb20vaDUvXFxcIiArIHJvb21pZFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcImh1eWFcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdXJsID0gXFxcImh0dHBzOi8vbS5odXlhLmNvbS9cXFwiICsgcm9vbWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiZG91eWluXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVybCA9IFxcXCJodHRwczovL2xpdmUuZG91eWluLmNvbS9cXFwiICsgcm9vbWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiY2NcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdXJsID0gXFxcImh0dHBzOi8vaDUuY2MuMTYzLmNvbS9jYy9cXFwiICsgcm9vbWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsXFxuICAgICAgICAgICAgICAgIH0sIHJvb21JZCwgcGxhdEZvcm0pXFxuICAgICAgICAgICAgfV1cXG4gICAgICAgIH1cXG4gICAgfSlcXG59O1xcblxcbiQuZXhwb3J0cy5Mb25nQ2xpY2sgPSBmdW5jdGlvbihhcGksIHVpZCwgcm9vbWlkLCBwbGF0Zm9ybSkge1xcbiAgICByZXR1cm4gJC50b1N0cmluZygoYXBpLCB1aWQsIHJvb21pZCwgcGxhdGZvcm0pID0+IHtcXG4gICAgICAgIGlmIChnZXRJdGVtKHBsYXRmb3JtICsgcm9vbWlkLCBcXFwiMFxcXCIpID09IFxcXCIwXFxcIikge1xcbiAgICAgICAgICAgIHZhciBmb2xsID0gXFxcImZvbGxvd1xcXCI7XFxuICAgICAgICAgICAgc2V0SXRlbShwbGF0Zm9ybSArIHJvb21pZCwgXFxcIjFcXFwiKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdmFyIGZvbGwgPSBcXFwidW5Gb2x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c2UsXFxuICAgICAgICAgICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRpdCA9PSBcXFwiMVxcXCIgPyBcXFwi5bey5YWz5rOoXFxcIiA6IFxcXCLmnKrlhbPms6hcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGpzOiAkLnJlcXVpcmUoXFxcInB1YmxpY1xcXCIpLkxvbmdDbGljayhhcGksIHVpZCwgcm9vbWlkLCBwbGF0Zm9ybSksXFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLlrpjnvZHpk77mjqVcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGpzOiBqczJcXG4gICAgICAgICAgICAgICAgICAgIH1dXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBpZiAoZ2V0TXlWYXIoXFxcInNUeXBlXFxcIiwgXFxcIlxcXCIpICE9PSBcXFwiXFxcIiAmJiB0aXQgPT0gMCkge1xcbiAgICAgICAgICAgICAgICBkZWxldGVJdGVtKFxcXCJpZF9cXFwiICsgcGxhdGZvcm0gKyByb29taWQpO1xcbiAgICAgICAgICAgIH07XFxuICAgICAgICB9O1xcbiAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL1xcXCIgKyByZXMuZGF0YTtcXG4gICAgfSwgYXBpLCB1aWQsIHJvb21pZCwgcGxhdGZvcm0pO1xcbn07XFxuXFxuJC5leHBvcnRzLkxhenkgPSBmdW5jdGlvbihpc0xpdmUpIHtcXG4gICAgcmV0dXJuICQoXFxcIlxcXCIpLmxhenlSdWxlKChpc0xpdmUpID0+IHtcXG4gICAgICAgIGlmIChpc0xpdmUgPT0gMCkgcmV0dXJuIFxcXCJ0b2FzdDovL+ebtOaSreW3sue7k+adn++8gVxcXCI7XFxuICAgICAgICBsZXQganNvbiA9IEpTT04ucGFyc2UoZmV0Y2goaW5wdXQsICQucmVxdWlyZShcXFwicHVibGljPyZydWxlPVxcXCIgKyBnZXRNeVZhcihcXFwiUl91bGVcXFwiLCBNWV9SVUxFLnRpdGxlKSkuaGVhZGVycykpLmRhdGEgfHwgW107XFxuICAgICAgICBsZXQgdG9hcyA9IFxcXCJ0b2FzdDovL+ebtOaSreW3sue7k+adn+aIluayoeacieiOt+WPluWIsOaVsOaNrlxcXCI7XFxuICAgICAgICBpZiAoT2JqZWN0LmtleXMoanNvbikubGVuZ3RoID09IDApIHJldHVybiB0b2FzO1xcbiAgICAgICAgbGV0IG1pZCA9IGlucHV0LnNwbGl0KFxcXCJyb29tSWQ9XFxcIilbMV07XFxuICAgICAgICBsZXQgbmFtZSA9IFtdO1xcbiAgICAgICAgbGV0IHVybHMgPSBbXTtcXG4gICAgICAgIGlmICgvZ2V0UmVhbFVybE11bHRpU291cmNlLy50ZXN0KGlucHV0KSkge1xcbiAgICAgICAgICAgIGZvciAobGV0IHhsIGluIGpzb24pIHtcXG4gICAgICAgICAgICAgICAgbGV0IGxpc3QgPSBqc29uW3hsXTtcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSBpbiBsaXN0KSB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgbGkgPSBsaXN0W2ldO1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZS5wdXNoKGxpLnF1YWxpdHlOYW1lKVxcbiAgICAgICAgICAgICAgICAgICAgdXJscy5wdXNoKGxpLnBsYXlVcmwpXFxuICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh1cmxzKSA9PSAnW1xcXCJcXFwiXScgPyB0b2FzIDogSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZXM6IG5hbWUsXFxuICAgICAgICAgICAgICAgICAgICB1cmxzOiB1cmxzLFxcbiAgICAgICAgICAgICAgICAgICAgZGFubXU6IC9kb3V5deaaguaXoC8udGVzdCh1cmxzKSA/IFxcXCJ3ZWI6Ly9odHRwOi8vZG91eXVfZGFubXUuZGV2LnR5cmFudGcuY29tLz9yaWQ9XFxcIiArIG1pZCArIFxcXCImdmVyPTFcXFwiIDogL2h1eWEvLnRlc3QodXJscykgPyBcXFwiXFxcIiA6IFxcXCJcXFwiXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH07XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGxldCBuYW1lcyA9IHtcXG4gICAgICAgICAgICAgICAgXFxcIk9EXFxcIjogXFxcIuWOn+eUu1xcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCJGRFxcXCI6IFxcXCLmtYHnlYVcXFwiLFxcbiAgICAgICAgICAgICAgICBcXFwiTERcXFwiOiBcXFwi5qCH5riFXFxcIixcXG4gICAgICAgICAgICAgICAgXFxcIlNEXFxcIjogXFxcIumrmOa4hVxcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCJIRFxcXCI6IFxcXCLotoXmuIVcXFwiLFxcbiAgICAgICAgICAgICAgICBcXFwiMktcXFwiOiBcXFwiMktcXFwiLFxcbiAgICAgICAgICAgICAgICBcXFwiNEtcXFwiOiBcXFwiNEtcXFwiLFxcbiAgICAgICAgICAgICAgICBcXFwiRkhEXFxcIjogXFxcIuWFqOmrmOa4hVxcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCJYTERcXFwiOiBcXFwi5p6B6YCfXFxcIixcXG4gICAgICAgICAgICAgICAgXFxcIlNRXFxcIjogXFxcIuaZrumAmumfs+i0qFxcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCJIUVxcXCI6IFxcXCLpq5jpn7PotKhcXFwiXFxuICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICBmb3IgKGxldCBrZXkgaW4ganNvbikge1xcbiAgICAgICAgICAgICAgICBpZiAoIS9heXl1aWR8dG8vLnRlc3Qoa2V5KSkge1xcbiAgICAgICAgICAgICAgICAgICAgdXJscy5wdXNoKGpzb25ba2V5XSlcXG4gICAgICAgICAgICAgICAgICAgIG5hbWUucHVzaChuYW1lc1trZXldKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkodXJscykgPT0gJ1tcXFwiXFxcIl0nID8gdG9hcyA6IEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgbmFtZXM6IG5hbWUsXFxuICAgICAgICAgICAgICAgIHVybHM6IHVybHMsXFxuICAgICAgICAgICAgICAgIGRhbm11OiAvZG91eXXmmoLml6AvLnRlc3QodXJscykgPyBcXFwid2ViOi8vaHR0cDovL2RvdXl1X2Rhbm11LmRldi50eXJhbnRnLmNvbS8/cmlkPVxcXCIgKyBtaWQgKyBcXFwiJnZlcj0xXFxcIiA6IC9odXlhLy50ZXN0KHVybHMpID8gXFxcIlxcXCIgOiBcXFwiXFxcIlxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfTtcXG4gICAgfSwgaXNMaXZlKTtcXG59O1xcblxcbiQuZXhwb3J0cy5FbXB0eSA9IGZ1bmN0aW9uKGQsIGRlc2MpIHtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwiPGJyPjxicj5cXFwiLFxcbiAgICAgICAgY29sX3R5cGU6ICdyaWNoX3RleHQnXFxuICAgIH0sIHtcXG4gICAgICAgIGRlc2M6IGRlc2MsXFxuICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZVxcbiAgICAgICAgfVxcbiAgICB9KTtcXG59O1xcblxcbiQuZXhwb3J0cy5OeXMgPSBmdW5jdGlvbihkKSB7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogXFxcIjxicj48YnI+XFxcIixcXG4gICAgICAgIGNvbF90eXBlOiAncmljaF90ZXh0J1xcbiAgICB9LCB7XFxuICAgICAgICBkZXNjOiBcXFwi5YWzIOazqCDnmoQg5Li7IOaSrSDmnKog5byAIOaSrVxcXCIsXFxuICAgICAgICB1cmw6IFxcXCJoaWtlcjovL2VtcHR5XFxcIixcXG4gICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICBjbHM6IFxcXCJjbHMtU3Vic1xcXCJcXG4gICAgICAgIH1cXG4gICAgfSk7XFxufTtcXG5cXG4kLmV4cG9ydHMuTG9hZGluZyA9IGZ1bmN0aW9uKHMsIHRpdGxlKSB7XFxuICAgIHMucHVzaCh7XFxuICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICBjb2xfdHlwZTogXFxcInJpY2hfdGV4dFxcXCIsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGNsczogXFxcImNsc19sb2FkXFxcIlxcbiAgICAgICAgfVxcbiAgICB9LCB7XFxuICAgICAgICBpbWc6IFxcXCJodHRwczovL2hpa2VyZmFucy5jb20vd2Vpc3lyL2ltZy9Mb2FkaW5nMS5naWZcXFwiLFxcbiAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCIsXFxuICAgICAgICBjb2xfdHlwZTogXFxcInBpY18xX2NlbnRlclxcXCIsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGNsczogXFxcImNsc19sb2FkXFxcIlxcbiAgICAgICAgfVxcbiAgICB9KTtcXG59O1wifV0iLCJpY29uIjoiaHR0cHM6Ly9tLmRpYW5sdXQuY29tL2QvZmlsZS9pbWFnZS8yMDIyMDQxNi8xNjUwMDc5NTUwNTQ0NDYzLmpwZyIsInByb3h5IjoiIn0=
Add Comment
Please, Sign In to add comment