xiaomianao666

小程序:网盘合集

Apr 24th, 2023
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@网盘合集@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi572R55uY5ZCI6ZuGIiwiYXV0aG9yIjoiIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSIsInZlcnNpb24iOjYsImNvbF90eXBlIjoibW92aWVfMyIsImNsYXNzX25hbWUiOiIiLCJ0eXBlIjoidmlkZW8iLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbnZhciBkID0gW107XG5pZiAoZ2V0SXRlbShcImZcIiwgXCIwXCIpID09IFwiMFwiKSB7XG4gICAgZC5wdXNoKCQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9hYm91dDJcIikpO1xuICAgIGQucHVzaCh7XG4gICAgICAgIHRpdGxlOiBcIuehruWumlwiLFxuICAgICAgICB1cmw6ICQoXCIjbm9Mb2FkaW5nI1wiKS5sYXp5UnVsZSgoKSA9PiB7XG4gICAgICAgICAgICBzZXRJdGVtKFwiZlwiLCBcIjFcIik7XG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xuICAgICAgICAgICAgcmV0dXJuIFwiaGlrZXI6Ly9lbXB0eVwiO1xuICAgICAgICB9KSxcbiAgICAgICAgY29sX3R5cGU6IFwidGV4dF9jZW50ZXJfMVwiLFxuICAgICAgICBkZXNjOiBcIlwiLFxuICAgICAgICBwaWNfdXJsOiBcIlwiXG4gICAgfSk7XG59IGVsc2Uge1xuICAgIGQucHVzaCh7XG4gICAgICAgIHRpdGxlOiAn4oCY4oCY4oCZ4oCZPHN0cm9uZz48Zm9udCBjb2xvcj1cIiN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b3JhZ2UwLnB1dE15VmFyKFxcXCJwYXRoczEyM1xcXCIsIHBhdGhzKVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICB9LCBwYXRocylcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfVxcbiAgICAgICAgcGF0aHMuZm9yRWFjaCgoaXRlbSwgaW5kZXgpID0+IHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5uYW1lLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaXRlbSwgcGF0aHMsIGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwiaWRcXFwiLCBpdGVtLmlkKVxcbiAgICAgICAgICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoXFxcInBhdGhzMTIzXFxcIiwgcGF0aHMuc2xpY2UoMCwgaW5kZXggKyAxKSlcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgfSwgaXRlbSwgcGF0aHMsIGluZGV4KVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICAgICAgZmlsZUxpc3QocGF0aHNbcGF0aHMubGVuZ3RoIC0gMV0uaWQpLmRhdGEuSW5mb0xpc3QuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICB2YXIgaW1nID0gZ2V0SWNvbihpdGVtKVxcbiAgICAgICAgICAgIGlmIChpdGVtLlR5cGUgPT0gMSkge1xcbiAgICAgICAgICAgICAgICB2YXIgdXJsID0gJCgpLmxhenlSdWxlKChpZCwgbmFtZSwgcGF0aHMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHBhdGhzLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IG5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGlkXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoXFxcInBhdGhzMTIzXFxcIiwgcGF0aHMpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgIH0sIGl0ZW0uRmlsZUlkLCBpdGVtLkZpbGVOYW1lLCBwYXRocylcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB2YXIgdXJsID0gaXRlbS5Eb3dubG9hZFVybFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5GaWxlTmFtZSxcXG4gICAgICAgICAgICAgICAgdXJsOiB1cmwsXFxuICAgICAgICAgICAgICAgIGltZzogaW1nLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCJcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSlcXG4gICAgfSBlbHNlIHtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLmnKrnmbvlvZVcXFwiLFxcbiAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS9zZXR0aW5nc1xcXCIsXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzFcXFwiXFxuICAgICAgICB9KVxcbiAgICB9XFxufSBjYXRjaCAoZSkge1x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ywgaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoXFxcInBhdGhzYmFpZHVcXFwiLCBwYXRocy5zbGljZSgwLCBpICsgMSkpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgIH0sIHBhdGhzLCBpKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJzY3JvbGxfYnV0dG9uXFxcIlxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICAgICAgbGV0IHJlcyA9IEpTT04ucGFyc2UocmVxdWVzdChidWlsZFVybChcXFwiaHR0cHM6Ly9wYW4uYmFpZHUuY29tL3Jlc3QvMi4wL3hwYW4vZmlsZVxcXCIsIHtcXG4gICAgICAgICAgICBcXFwiYWNjZXNzX3Rva2VuXFxcIjogZ2V0SXRlbShcXFwiYWNjZXNzX3Rva2VuYmFpZHVcXFwiKSxcXG4gICAgICAgICAgICBcXFwibWV0aG9kXFxcIjogXFxcImxpc3RcXFwiLFxcbiAgICAgICAgICAgIFxcXCJkaXJcXFwiOiBwYXRoc1twYXRocy5sZW5ndGggLSAxXS5wYXRoLFxcbiAgICAgICAgICAgIFxcXCJ3ZWJcXFwiOiBcXFwid2ViXFxcIixcXG4gICAgICAgICAgICBcXFwibGltaXRcXFwiOiAwLFxcbiAgICAgICAgICAgIFxcXCJsaW1pdFxcXCI6IDIwMFxcbiAgICAgICAgfSkpKVxcbiAgICAgICAgcmVzLmxpc3QuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICBpZiAoaXRlbS5pc2RpciA9PSAxKSB7XFxuICAgICAgICAgICAgICAgIHZhciB1cmwgPSAkKCkubGF6eVJ1bGUoKGl0ZW0sIHBhdGhzKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBwYXRocy5w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ICAgICAgICBcXFwiZGxpbmtcXFwiOiBcXFwiMVxcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCJ3ZWJcXFwiOiBcXFwiNVxcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCJvcmlnaW5cXFwiOiBcXFwiZGxuYVxcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCJ0YXJnZXRcXFwiOiBgW1xcXFxcXFwiJHtwYXRofVxcXFxcXFwiXWBcXG4gICAgICAgICAgICB9KSkpLmluZm9bMF0uZGxpbmtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdmFyIHJlcyA9IEpTT04ucGFyc2UocmVxdWVzdChidWlsZFVybChcXFwiaHR0cHM6Ly9wYW4uYmFpZHUuY29tL3Jlc3QvMi4wL3hwYW4vbXVsdGltZWRpYVxcXCIsIHtcXG4gICAgICAgICAgICAgICAgXFxcImFjY2Vzc190b2tlblxcXCI6IGdldEl0ZW0oXFxcImFjY2Vzc190b2tlblxcXCIpLFxcbiAgICAgICAgICAgICAgICBcXFwibWV0aG9kXFxcIjogXFxcImZpbGVtZXRhc1xcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCJmc2lkc1xcXCI6IGBbJHtpZH1dYCxcXG4gICAgICAgICAgICAgICAgXFxcImRsaW5rXFxcIjogXFxcIjFcXFwiXFxuICAgICAgICAgICAgfSksIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBcXFwicGFuLmJhaWR1LmNvbVxcXCJcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pKS5saXN0WzBdLmRsaW5rICsgXFxcIiZhY2Nlc3NfdG9rZW49XFxcIiArIGdldEl0ZW0oXFxcImFjY2Vzc190b2tlblxcXCIpXFxuICAgICAgICB9XFxuICAgICAgICBpZiAoZXh0ID09IFxcXCJtb3ZpZVxcXCIpIHtcXG4gICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICB1cmxzOiBbcmVzICsgXFxcIiNpc1ZpZGVvPXRydWUjXFxcIl0sXFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogXFxcInBhbi5iYWlkdS5jb21cXFwiXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSBlbHNlIGlmIChleHQgPT0gXFxcImF1ZGlvXFxcIikge1xcbiAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgIHVybHM6IFtyZXMgKyBcXFwiI2lzTXVzaWM9dHJ1ZSNcXFwiXSxcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBcXFwicGFuLmJhaWR1LmNvbVxcXCJcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9IGVsc2UgaWYgKGV4dCA9PSBcXFwiaW1nXFxcIikge1xcbiAgICAgICAgICAgIHJldHVybiByZXMgKyBgIy5qcGc7e1VzZXItQWdlbnRAcGFuLmJhaWR1LmNvbX1gXFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHJldHVybiBcXFwiZG93bmxvYWQ6Ly9cXFwiICsgcmVzICsgYDt7VXNlci1BZ2VudEBwYW4uYmFpZHUuY29tfWBcXG4gICAgICAgIH1cXG4gICAgfSwgZXh0LCBpZCwgcGF0aClcXG59XCJ9LHtcImNvbF90eXBlXCI6XCJ0ZXh0XzJcIixcIm5hbWVcIjpcImxvZ2luMVwiLFwicGF0aFwiOlwibG9naW4xXCIsXCJydWxlXCI6XCJqczpcXG52YXIgZCA9IFtdO1xcbmQucHVzaCh7XFxuICAgIHRpdGxlOiBcXFwi6I635Y+W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KyBnZXRJdGVtKFxcXCJhY2Nlc3NfdG9rZW5cXFwiKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pKVxcbiAgICAgICAgbGlzdC5maWxlcy5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgIGlmIChpdGVtLmtpbmQgPT0gXFxcImRyaXZlI2ZvbGRlclxcXCIpIHtcXG4gICAgICAgICAgICAgICAgdmFyIHVybGwgPSAkKCkubGF6eVJ1bGUoKHBhdGhzLCBpdGVtKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBwYXRocy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogaXRlbS5pZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBpdGVtLm5hbWVcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcihcXFwicGF0aHNwaWtwYWtcXFwiLCBwYXRocylcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgfSwgcGF0aHMsIGl0ZW0pXFxuICAgICAgICAgICAgfSBlbHNlIGlmICgkLm1vdmllLmluY2x1ZGVzKGdldEh6bShpdGVtLm5hbWUpKSkge1xcblxcbiAgICAgICAgICAgICAgICB2YXIgZXh0ID0gXFxcIiNpc1ZpZGVvPXRydWUjXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoJC5hdWRpby5pbmNsdWRlcyhnZXRIem0oaXRlbS5uYW1lKSkpIHtcXG4gICAgICAgICAgICAgICAgdmFyIGV4dCA9IFxcXCIjaXNNdXNpYz10cnVlI1xcXCJcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKCQuaW1nLmluY2x1ZGVzKGdldEh6bShpdGVtLm5hbWUpKSkge1xcbiAgICAgICAgICAgICAgICB2YXIgZXh0ID0gXFxcIiMuanBnXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHZhciBleHQgPSBcXFwiXFxcIlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB2YXIgdXJsID0gJCgpLmxhenlSdWxlKChpdGVtLCBleHQpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHUgPSBgaHR0cHM6Ly9hcGktZHJpdmUubXlwaWtwYWsuY29tL2RyaXZlL3YxL2ZpbGVzLyR7aXRlbS5pZH0/X21hZ2ljPTIwMjEmdGh1bWJuYWlsX3NpemU9U0laRV9MQVJHRWBcXG4gICAgICAgICAgICAgICAgbGV0IHJlcyA9IEpTT04ucGFyc2UocmVxdWVzdCh1LCB7XFxuICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcIkF1dGhvcml6YXRpb25cXFwiOiBcXFwiQmVhcmVyIFxcXCIgKyBnZXRJdGVtKFxcXCJhY2Nlc3NfdG9rZW5cXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgICAgIC8vbG9nKHJlcyk7XFxuICAgICAgICAgICAgICAgIGlmIChyZXMubGlua3MgJiYgcmVzLmxpbmtzW1xcXCJhcHBsaWNhdGlvbi9vY3RldC1zdHJlYW1cXFwiXSkge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHJlcy5saW5rc1tcXFwiYXBwbGljYXRpb24vb2N0ZXQtc3RyZWFtXFxcIl0udXJsO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHVybCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmwgKyBleHRcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBmb3IgKGl0ZW0gb2YgcmVzLm1lZGlhcykge1xcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdG1wID0gaXRlbS5saW5rXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRtcC51cmwpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRtcC51cmwgKyBleHRcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSwgaXRlbSwgZXh0KVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLm5hbWUsXFxuICAgICAgICAgICAgICAgIGltZzogaXRlbS5pY29uX2xpbmssXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIixcXG4gICAgICAgICAgICAgICAgdXJsOiBpdGVtLmtpbmQgPT0gXFxcImRyaXZlI2ZvbGRlclxcXCIgPyB1cmxsIDogdXJsXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pXFxuICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgIHRvYXN0KFxcXCLmo4DmtYvliLDplJnor69cXFwiKVxcbiAgICAgICAgbG9nKGUubWVzc2FnZSlcXG4gICAgfVxcbn1cXG5cXG5zZXRSZXN1bHQoZCk7XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCJjb2RlMlwiLFwicGF0aFwiOlwiY29kZTJcIixcInJ1bGVcIjpcIiQuZXhwb3J0cy5sb2dpbiA9IGZ1bmN0aW9uKHVzZXJuYW1lLCBwYXNzd29yZCkge1xcbiAgICBsZXQgcmVzID0gSlNPTi5wYXJzZShwb3N0KFxcXCJodHRwczovL3VzZXIubXlwaWtwYWsuY29tL3YxL2F1dGgvc2lnbmluXFxcIiwge1xcbi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OS6keebmFwiLFwicGF0aFwiOlwi5aSp57+85LqR55uYXCIsXCJydWxlXCI6XCJqczpcXG52YXIgZCA9IFtdO1xcbnRyeSB7XFxuICAgIGlmIChmaWxlRXhpc3QoXFxcIjE4OS50eHRcXFwiKSkge1xcbiAgICAgICAgY29uc3Qge1xcbiAgICAgICAgICAgIGdldEZpbGVzLFxcbiAgICAgICAgICAgIGdldEljb25cXG4gICAgICAgIH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9jb2RlM1xcXCIpXFxuICAgICAgICB2YXIgcGF0aHMgPSBzdG9yYWdlMC5nZXRNeVZhcihcXFwicGF0aHN0eVxcXCIsIFt7XFxuICAgICAgICAgICAgXFxcImlkXFxcIjogLTExLFxcbiAgICAgICAgICAgIFxcXCJuYW1lXFxcIjogXFxcIuWutlxcXCJcXG4gICAgICAgIH1dKVxcbiAgICAgICAgcGF0aHMuZm9yRWFjaCgoaXRlbSwgaSkgPT4ge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLm5hbWUsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwic2Nyb2xsX2J1dHRvblxcXCIsXFxuICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChwYXRocywgaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoXFxcInBhdGhzdHlcXFwiLCBwYXRocy5zbGljZSgwLCBpICsgMSkpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgIH0sIHBhdGhzLCBpKVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICAgICAgbGV0IGxpc3QgPSBnZXRGaWxlcyhwYXRoc1twYXRocy5sZW5ndGggLSAxXS5pZClcXG4gICAgICAgIGxpc3QuZmlsZUxpc3RBTy5mb2xkZXJMaXN0LmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0ubmFtZSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgICAgICAgICBpbWc6IFxcXCJodHRwczovL2dpdGNvZGUubmV0L3FxXzMyMzk0MzUxL2RyLy0vcmF3L21hc3Rlci9pbWcv5paH5Lu257G75Z6LMi/mlofku7blpLkuc3ZnXFxcIixcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKHBhdGhzLCBpZCwgbmFtZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcGF0aHMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IG5hbWVcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcihcXFwicGF0aHN0eVxcXCIsIHBhdGhzKVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICB9LCBwYXRocywgaXRlbS5pZCwgaXRlbS5uYW1lKVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICAgICAgbGlzdC5maWxlTGlzdEFPLmZpbGVMaXN0LmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgdmFyIGltZyA9IGdldEljb24oaXRlbS5uYW1lKVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLm5hbWUsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIixcXG4gICAgICAgICAgICAgICAgaW1nOiBpbWcsXFxuICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChpZCwgbmFtZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGdldEh6bVxcbiAgICAgICAgICAgICAgICAgICAgfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2NvZGVcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNvb2tpZSA9IHJlYWRGaWxlKFxcXCIxODkudHh0XFxcIilcXG4gICAgICAgICAgICAgICAgICAgIGxldCB1ID0gXFxcImh0dHBzOi8vY2xvdWQuMTg5LmNuL2FwaS9wb3J0YWwvZ2V0RmlsZUluZm8uYWN0aW9uXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJlcyA9IEpTT04ucGFyc2UocmVxdWVzdChidWlsZFVybCh1LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcImZpbGVJZFxcXCI6IGlkXFxuICAgICAgICAgICAgICAgICAgICB9KSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIkNvb2tpZVxcXCI6IGNvb2tpZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIkFjY2VwdFxcXCI6IFxcXCJhcHBsaWNhdGlvbi9qc29uO2NoYXJzZXQ9VVRGLThcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFBDX1VBXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgICAgICAgICBpZiAoJC5tb3ZpZS5pbmNsdWRlcyhnZXRIem0obmFtZSkpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsczogW1xcXCJodHRwczpcXFwiICsgcmVzLmRvd25sb2FkVXJsICsgXFxcIiNpc1ZpZGVvPXRydWUjXFxcIl0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWUucmVwbGFjZSgvOy9nLCBcXFwi77yb77ybXFxcIiksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFBDX1VBLnJlcGxhY2UoLzsvZywgXFxcIu+8m++8m1xcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgkLmF1ZGlvLmluY2x1ZGVzKGdldEh6bShuYW1lKSkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmxzOiBbXFxcImh0dHBzOlxcXCIgKyByZXMuZG93bmxvYWRVcmwgKyBcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIkNvb2tpZVxcXCI6IGNvb2tpZS5yZXBsYWNlKC87L2csIFxcXCLvvJvvvJtcXFwiKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogUENfVUEucmVwbGFjZSgvOy9nLCBcXFwi77yb77ybXFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKCQuaW1nLmluY2x1ZGVzKGdldEh6bShuYW1lKSkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImh0dHBzOlxcXCIgKyByZXMuZG93bmxvYWRVcmwgKyBgIy5qcGdAVXNlci1BZ2VudD0ke1BDX1VBfUBDb29raWU9JHtjb29raWV9YFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImRvd25sb2FkOi8vaHR0cHM6XFxcIiArIHJlcy5kb3dubG9hZFVybCArIGBAVXNlci1BZ2VudD0ke1BDX1VBfUBDb29raWU9JHtjb29raWV9YFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCBpdGVtLmlkLCBpdGVtLm5hbWUpXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pXFxuICAgIH0gZWxzZSB7XFxuICAgICAgICBkLnVuc2hpZnQoe1xcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi55m76ZmGXFxcIixcXG4gICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvbG9naW4zXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiXFxuICAgICAgICB9KVxcbiAgICB9XFxufSBjYXRjaCAoZSkge1xcbiAgICBkLnVuc2hpZnQoe1xcbiAgICAgICAgdGl0bGU6IFxcXCLnmbvpmYZcXFwiLFxcbiAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL2xvZ2luM1xcXCIsXFxuICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiXFxuICAgIH0pXFxuICAgIGxvZyhlLm1lc3NhZ2UpXFxuICAgIHRvYXN0KFxcXCLnqIvluo/lj6/og73lh7rplJnkuobvv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icGF0aFwiOlwibG9naW4zXCIsXCJydWxlXCI6XCJqczpcXG52YXIgZCA9IFtdO1xcbmFkZExpc3RlbmVyKCdvbkNsb3NlJywgKCkgPT4ge1xcbiAgICBsZXQgYyA9IGdldFZhcihcXFwiaHR0cHM6Ly9jbG91ZC4xODkuY24vd2ViL21haW5cXFwiKTtcXG4gICAgbG9nKGMpO1xcbiAgICBzYXZlRmlsZShcXFwiMTg5LnR4dFxcXCIsIGMpO1xcbiAgICBjbGVhclZhcihcXFwiaHR0cHM6Ly9jbG91ZC4xODkuY24vd2ViL21haW5cXFwiKTtcXG59KVxcbmQucHVzaCh7XFxuICAgIHVybDogXFxcImh0dHBzOi8vY2xvdWQuMTg5LmNuL3dlYi9sb2dpbi5odG1sXFxcIixcXG4gICAgY29sX3R5cGU6IFxcXCJ4NV93ZWJ2aWV3X3NpbmdsZVxcXCIsXFxuICAgIGRlc2M6IFxcXCIxMDAlJiZmbG9hdFxcXCIsXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgdmFyIHVybCA9IGxvY2F0aW9uLmhyZWZcXG4gICAgICAgICAgICBpZiAodXJsLmluY2x1ZGVzKFxcXCJodHRwczovL2Nsb3VkLjE4OS5jbi93ZWIvbWFpblxcXCIpKSB7XFxuICAgICAgICAgICAgICAgIGxldCBjb29raWUgPSBmYmEuZ2V0Q29va2llKHVybCk7XFxuICAgICAgICAgICAgICAgIGlmIChjb29raWUgIT0gbnVsbCAmJiBjb29raWUubGVuZ3RoID4gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgZmJhLnB1dFZhcihcXFwiaHR0cHM6Ly9jbG91ZC4xODkuY24vd2ViL21haW5cXFwiLCBjb29raWUpO1xcbiAgICAgICAgICAgICAgICAgICAgYWxlcnQoXFxcIuW3suiOt+WPluWIsGNvb2tpZVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgZmJhLmJhY2soKTsgICAgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pLFxcbiAgICAgICAgdWE6IFBDX1VBLFxcbiAgICAgICAgY2FuQmFjazogdHJ1ZVxcbiAgICB9XFxufSlcXG5zZXRSZXN1bHQoZCk7XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLlpLjlhYvnvZHnm5hcIixcInBhdGhcIjpcIuWkuOWFi+e9keebmFwiLFwicnVsZVwiOlwianM6XFxudmFyIGQgPSBbXTtcXG50cnkge1xcbiAgICBpZiAoZmlsZUV4aXN0KFxcXCJxdWFyay50eHRcXFwiKSkge1xcbiAgICAgICAgY29uc3Qge1xcbiAgICAgICAgICAgIGdldEljb24sXFxuICAgICAgICAgICAgZ2V0SHptLFxcbiAgICAgICAgICAgIGdldExpbmtcXG4gICAgICAgIH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9jb2RlNFxcXCIpXFxuICAgICAgICB2YXIgY29va2llID0gcmVhZEZpbGUoXFxcInF1YXJrLnR4dFxcXCIpXFxuICAgICAgICBsZXQgdXNlcmluZm8gPSBKU09OLnBhcnNlKHJlcXVlc3QoXFxcImh0dHBzOi8vcGFuLnF1YXJrLmNuL2FjY291bnQvaW5mb1xcXCIsIHtcXG4gICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWVcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KSlcXG4gICAgICAgIGxldCBwYXRocyA9IHN0b3JhZ2UwLmdldE15VmFyKFxcXCJwYXRoc1xcXCIsIFt7XFxuICAgICAgICAgICAgXFxcImlkXFxcIjogXFxcIjBcXFwiLFxcbiAgICAgICAgICAgIFxcXCJuYW1lXFxcIjogXFxcIuagueebruW9lVxcXCJcXG4gICAgICAgIH1dKVxcbiAgICAgICAgaWYgKE1ZX1BBR0UgPT0gMSkge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB1c2VyaW5mby5kYXRhLm5pY2tuYW1lLFxcbiAgICAgICAgICAgICAgICBpbWc6IHVzZXJpbmZvLmRhdGEuYXZhdGFyVXJpLFxcbiAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2Uvc2V0dGluZ3M0XFxcIixcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBwYXRocy5mb3JFYWNoKChpdGVtLCBpKSA9PiB7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJzY3JvbGxfYnV0dG9uXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChwYXRocywgaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKFxcXCJwYXRoc1xcXCIsIHBhdGhzLnNsaWNlKDAsIGkgKyAxKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSwgcGF0aHMsIGkpXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCByZXMgPSBKU09OLnBhcnNlKHJlcXVlc3QoYnVpbGRVcmwoXFxcImh0dHBzOi8vZHJpdmUucXVhcmsuY24vMS9jbG91ZGRyaXZlL2ZpbGUvc29ydFxcXCIsIHtcXG4gICAgICAgICAgICBcXFwicGRpcl9maWRcXFwiOiBwYXRoc1twYXRocy5sZW5ndGggLSAxXS5pZCxcXG4gICAgICAgICAgICBcXFwiZnJcXFwiOiBcXFwicGNcXFwiLFxcbiAgICAgICAgICAgIFxcXCJwclxcXCI6IFxcXCJ1Y3Byb1xcXCIsXFxuICAgICAgICAgICAgXFxcIl9zaXplXFxcIjogMTAsXFxuICAgICAgICAgICAgXFxcIl9mZXRjaF90b3RhbFxcXCI6IFxcXCIxXFxcIixcXG4gICAgICAgICAgICBcXFwiX3NvcnRcXFwiOiBcXFwiZmlsZV90eXBlOmFzYyxmaWxlX25hbWU6YXNjXFxcIixcXG4gICAgICAgICAgICBcXFwiX3BhZ2VcXFwiOiBnZXRQYXJhbShcXFwicGFnZVxcXCIpXFxuICAgICAgICB9KSwge1xcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgXFxcIkNvb2tpZVxcXCI6IGNvb2tpZSxcXG4gICAgICAgICAgICAgICAgXFxcIkFjY2VwdFxcXCI6IFxcXCJhcHBsaWNhdGlvbi9qc29uLCB0ZXh0L3BsYWluLCAqLypcXFwiLFxcbiAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3Bhbi5xdWFyay5jbi9cXFwiXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSkpXFxuICAgICAgICByZXMuZGF0YS5saXN0LmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgaWYgKCFpdGVtLmZpbGUpIHtcXG4gICAgICAgICAgICAgICAgdmFyIHVybCA9ICQoKS5sYXp5UnVsZSgoaXRlbSwgcGF0aHMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHBhdGhzLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBpdGVtLmZpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBpdGVtLmZpbGVfbmFtZVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKFxcXCJwYXRoc1xcXCIsIHBhdGhzKVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICB9LCBpdGVtLCBwYXRocylcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKCQubW92aWUuaW5jbHVkZXMoZ2V0SHptKGl0ZW0uZmlsZV9uYW1lKSkpIHtcXG4gICAgICAgICAgICAgICAgdmFyIHVybCA9IGdldExpbmsoaXRlbSwgY29va2llLCBcXFwibW92aWVcXFwiKVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoJC5hdWRpby5pbmNsdWRlcyhnZXRIem0oaXRlbS5maWxlX25hbWUpKSkge1xcbiAgICAgICAgICAgICAgICB2YXIgdXJsID0gZ2V0TGluayhpdGVtLCBjb29raWUsIFxcXCJhdWRpb1xcXCIpXFxuICAgICAgICAgICAgfSBlbHNlIGlmICgkLmltZy5pbmNsdWRlcyhnZXRIem0oaXRlbS5maWxlX25hbWUpKSkge1xcbiAgICAgICAgICAgICAgICB2YXIgdXJsID0gZ2V0TGluayhpdGVtLCBjb29raWUsIFxcXCJpbWdcXFwiKVxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHZhciB1cmwgPSBnZXRMaW5rKGl0ZW0sIGNvb2tpZSlcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0uZmlsZV9uYW1lLFxcbiAgICAgICAgICAgICAgICBpbWc6IGdldEljb24oaXRlbSksXFxuICAgICAgICAgICAgICAgIHVybDogdXJsLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCJcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSlcXG4gICAgfSBlbHNlIHtc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FxuICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICBcXFwiZmlkc1xcXCI6IFtmaWRdXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pKVxcbiAgICAgICAgaWYgKGV4dCA9PSBcXFwibW92aWVcXFwiKSB7XFxuICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgdXJsczogW3Jlcy5kYXRhWzBdLmRvd25sb2FkX3VybCArIFxcXCIjaXNWaWRlbz10cnVlI1xcXCJdLFxcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogY29va2llLnJlcGxhY2UoLzsvZywgXFxcIu+8m++8m1xcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiBcXFwiaHR0cHM6Ly9wYW4ucXVhcmsuY24vXFxcIlxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0gZWxzZSBpZiAoZXh0ID09IFxcXCJhdWRpb1xcXCIpIHtcXG4gICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICB1cmxzOiBbcmVzLmRhdGFbMF0uZG93bmxvYWRfdXJsICsgXFxcIiNpc011c2ljPXRydWUjXFxcIl0sXFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWUucmVwbGFjZSgvOy9nLCBcXFwi77yb77ybXFxcIiksXFxuICAgICAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3Bhbi5xdWFyay5jbi9cXFwiXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSBlbHNlIGlmIChleHQgP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4gICAgICAgICAgICBpZiAodXJsID09IFxcXCJodHRwczovL3Bhbi5xdWFyay5jbi9saXN0Iy9saXN0L2FsbFxcXCIpIHtcXG4gICAgICAgICAgICAgICAgbGV0IGNvb2tpZSA9IGZiYS5nZXRDb29raWUodXJsKTtcXG4gICAgICAgICAgICAgICAgaWYgKGNvb2tpZSAhPSBudWxsICYmIGNvb2tpZS5sZW5ndGggPiAwKSB7XFxuICAgICAgICAgICAgICAgICAgICBmYmEucHV0VmFyKHVybCwgY29va2llKTtcXG4gICAgICAgICAgICAgICAgICAgIGFsZXJ0KFxcXCLlt7Lojrflj5bliLBjb29raWVcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5iYWNrKCk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KSxcXG4gICAgICAgIHVhOiBQQ19VQSxcXG4gICAgICAgIGNhbkJhY2s6IHRydWVcXG4gICAgfVxcbn0pXFxuc2V0UmVzdWx0KGQpO1wifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5YWz5LqOXCIsXCJwYXRoXCI6XCJhYm91dFwiLFwicnVsZVwiOlwianM6XFxudmFyIGQgPSBbXTtcXG5hZGRMaXN0ZW5lcihcXFwib25DbG9zZVxcXCIsICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICBjbGVhck15VmFyKFxcXCJjXFxcIik7XFxufSkpO1xcbmQucHVzaCgkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hYm91dDJcXFwiKSk7XFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6IFxcXCJcXFwiLFxcbiAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgbGV0IGMgPSBwYXJzZUludChnZXRNeVZhcihcXFwiY1xcXCIsIFxcXCIxXFxcIikpXFxuICAgICAgICBpZiAoYyA+PSA1KSB7XFxuICAgICAgICAgICAgY29uZmlybSh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi5rip6aao5o+Q56S6XFxcIixcXG4gICAgICAgICAgICAgICAgY29udGVudDogXFxcIuehruWumuimgeW8gOWQr+W8gOWPkeiAheaooeW8j+WQl++8n+azqOaEj+W8gOWQr+ivpeaooeW8j+WImeihqOekuuWQjue7reaCqOeahOaJgOacieaTjeS9nOWdh+S4uuS4u+inguiDveWKqOaTjeS9nO+8jOaJgOS6p+eUn+eahOS4gOWIh+mXrumimOS4jui0o+S7u+Wdh+eUseaCqOiHquW3seaJv+aLhVxcXCIsXFxuICAgICAgICAgICAgICAgIGNvbmZpcm06ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbShcXFwiZGV2XFxcIiwgXFxcIjFcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7LlvIDlkK/lvIDlj5HogIXmqKHlvI9cXFwiXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBwdXRNeVZhcihcXFwiY1xcXCIsIGMgKyAxICsgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICB9XFxuICAgIH0pLFxcbiAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICBkZXNjOiBcXFwiXFxcIixcXG4gICAgcGljX3VybDogXFxcIlxcXCIsXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2VcXG4gICAgfVxcbn0pO1xcblxcblxcbnNldFJlc3VsdChkKTtcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuWFs+S6jjJcIixcInBhdGhcIjpcImFib3V0MlwiLFwicnVsZVwiOlwiJC5leHBvcnRzID0ge1xcbiAgICB0aXRsZTogXFxcIuacrOinhOWImeWfuuS6juW8gOa6kOmhueebru+8mjxhIGhyZWY9XFxcXFxcXCJodHRwczovL2dpdGh1Yi5jb20vYWxpc3Qtb3JnL2FsaXN0XFxcXFxcXCI+QWxpc3Q8L2E+77yM5o6i57Si5LiN5L2/55So5pyN5Yqh5Zmo5a6e546wQWxpc3TpgLvovpHvvIzmnKzop4TliJnmiYDmnInku6PnoIHlhajpg6jlvIDmupDvvIzku4XpmZDkuKrkurrkvb/nlKjvvIzku4XkvpvnoJTnqbbjgIHlrabkuaDlkozmtYvor5XvvIznpoHmraLovazovb3liIbkuqvliLDnrKzkuInmlrnlubPlj7BcXFwiLFxcbiAgICB1cmw6IFxcXCJoaWtlcjovL2VtcHR5XFxcIixcXG4gICAgY29sX3R5cGU6IFxcXCJyaWNoX3RleHRcXFwiLFxcbiAgICBkZXNjOiBcXFwiXFxcIixcXG4gICAgcGljX3VybDogXFxcIlxcXCJcXG59XCJ9XSIsImljb24iOiJodHRwczovL2xhbm1laWd1b2ppYW5nLmNvbS90dWJpYW8vbW9yZS81NS5wbmciLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment