Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@图书馆Pro@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi5Zu+5Lmm6aaGUHJvIiwiYXV0aG9yIjoiSm9lIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSIsInZlcnNpb24iOjEzLCJjb2xfdHlwZSI6Im1vdmllXzMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InJlYWQiLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbmxldCBsYXlvdXQgPSBbXTtcbmxheW91dC5wdXNoKHtcbiAgICBjb2xfdHlwZTogXCJiaWdfYmxhbmtfYmxvY2tcIlxufSk7XG5sYXlvdXQucHVzaCh7XG4gICAgY29sX3R5cGU6IFwiYmlnX2JsYW5rX2Jsb2NrXCJcbn0pO1xubGF5b3V0LnB1c2goe1xuICAgIGNvbF90eXBlOiBcImJpZ19ibGFua19ibG9ja1wiXG59KTtcbmxheW91dC5wdXNoKHtcbiAgICBjb2xfdHlwZTogXCJiaWdfYmxhbmtfYmxvY2tcIlxufSk7XG5cbmxheW91dC5wdXNoKHtcbiAgICB0aXRsZTogJzxoMSBzdHlsZT1cInRleHQtYWxpZ246IGNlbnRlcjtcIj48YmlnPjxmb250IGNvbG9yPVwiI0ZFQkQ2RlwiPuWbvuS5pummhlBybzwvZm9udD48L2JpZz48YnI+PHNtYWxsPjxmb250IGNvbG9yPVwiI0ZCNkM3M1wiPuS9oOeahOengeS6uuWbvuS5pummhjwvZm9udD48L3NtYWxsPjwvaDE+JyxcbiAgICBjb2xfdHlwZTogXCJyaWNoX3RleHRcIlxufSk7XG5sYXlvdXQucHVzaCh7XG4gICAgY29sX3R5cGU6IFwiaW5wdXRcIixcbiAgICB1cmw6IFwiJ2hpa2VyOi8vc2VhcmNoP3M9JyArIGlucHV0XCIsXG4gICAgZXh0cmE6IHtcbiAgICAgICAgcnVsZXM6ICQudG9TdHJpbmcoKCkgPT4ge1xuICAgICAgICAgICAgbGV0IGRhdGEgPSBbXTtcbiAgICAgICAgICAgICQucmVxdWlyZShcImFwaVwiKS5lbmdpbmVzLmZvckVhY2goKE1hcCwgaSkgPT4ge1xuICAgICAgICAgICAgICAgIGRhdGEucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIFwidGl0bGVcIjogTWFwLFxuICAgICAgICAgICAgICAgICAgICBcInNlYXJjaF91cmxcIjogYnVpbGRVcmwoXCJoaWtlcjovL2VtcHR5XCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGt3OiBcIioqXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiBcImZ5cGFnZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgZW5naW5lOiBNYXBcbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgIFwic2VhcmNoRmluZFwiOiBcImpzOiQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL+aQnOe0oj9ydWxlPeWbvuS5pummhlBybycpXCJcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoZGF0YSk7XG4gICAgICAgIH0pXG4gICAgfSxcbiAgICB0aXRsZTogXCLmkJzntKJcIlxufSlcbmxheW91dC5wdXNoKHtcbiAgICBjb2xfdHlwZTogXCJiaWdfYmxhbmtfYmxvY2tcIlxufSk7XG5sYXlvdXQucHVzaCh7XG4gICAgY29sX3R5cGU6IFwiYmlnX2JsYW5rX2Jsb2NrXCJcbn0pO1xubGF5b3V0LnB1c2goe1xuICAgIGNvbF90eXBlOiBcImJpZ19ibGFua19ibG9ja1wiXG59KTtcbmxheW91dC5wdXNoKHtcbiAgICB0aXRsZTogXCLwn5SwIOWOhuWPsuiusOW9lVwiLFxuICAgIGNvbF90eXBlOiBcInRleHRfMVwiLFxuICAgIHVybDogJChcIuehruiupOa4hemZpO+8n1wiKS5jb25maXJtKCgpID0+IHtcbiAgICAgICAgY2xlYXJJdGVtKFwiaGlzdG9yeVwiKVxuICAgICAgICByZWZyZXNoUGFnZSgpXG4gICAgICAgIHRvYXN0KFwi5riF55CG5oiQ5YqfXCIpXG4gICAgfSlcbn0pO1xudmFyIGhpc3RvcnkgPSBzdG9yYWdlMC5nZXRJdGVtKFwiaGlzdG9yeVwiLCBbXSlcbmhpc3RvcnkuZm9yRWFjaChpdGVtID0+IHtcbiAgICBsYXlvdXQucHVzaCh7XG4gICAgICAgIHRpdGxlOiBpdGVtLFxuICAgICAgICB1cmw6ICdoaWtlcjovL3NlYXJjaD9zPScgKyBpdGVtLFxuICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgcnVsZXM6ICQudG9TdHJpbmcoKCkgPT4ge1xuICAgICAgICAgICAgICAgIGxldCBkYXRhID0gW107XG4gICAgICAgICAgICAgICAgJC5yZXF1aXJlKFwiYXBpXCIpLmVuZ2luZXMuZm9yRWFjaCgoTWFwLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGEucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBcInRpdGxlXCI6IE1hcCxcbiAgICAgICAgICAgICAgICAgICAgICAgIFwic2VhcmNoX3VybFwiOiBidWlsZFVybChcImhpa2VyOi8vZW1wdHlcIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGt3OiBcIioqXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogXCJmeXBhZ2VcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmdpbmU6IE1hcFxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICBcInNlYXJjaEZpbmRcIjogXCJqczokLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS/mkJzntKI/cnVsZT3lm77kuabppoZQcm8nKVwiXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KGRhdGEpO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgfSxcbiAgICAgICAgY29sX3R5cGU6IFwiZmxleF9idXR0b25cIlxuICAgIH0pXG59KVxuc2V0UmVzdWx0KGxheW91dCk7Iiwic2VhcmNoX3VybCI6Imhpa2VyOi8vZW1wdHk/a3c9KioiLCJncm91cCI6IumYheivuyIsInNlYXJjaEZpbmQiOiJqczpcbnNldFJlc3VsdChbe1xuICAgIHVybDogJ2hpa2VyOi8vc2VhcmNoP3M9JyArIGdldFBhcmFtKFwia3dcIiksXG4gICAgZXh0cmE6IHtcbiAgICAgICAgcnVsZXM6ICQudG9TdHJpbmcoKCkgPT4ge1xuICAgICAgICAgICAgbGV0IGRhdGEgPSBbXTtcbiAgICAgICAgICAgICQucmVxdWlyZShcImFwaVwiKS5lbmdpbmVzLmZvckVhY2goKE1hcCwgaSkgPT4ge1xuICAgICAgICAgICAgICAgIGRhdGEucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIFwidGl0bGVcIjogTWFwLFxuICAgICAgICAgICAgICAgICAgICBcInNlYXJjaF91cmxcIjogYnVpbGRVcmwoXCJoaWtlcjovL2VtcHR5XCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGt3OiBcIioqXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiBcImZ5cGFnZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgZW5naW5lOiBNYXBcbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgIFwic2VhcmNoRmluZFwiOiBcImpzOiQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL+aQnOe0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cIiArIGlkLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYXBpa2V5OiBcXFwiMGRhZDU1MWVjMGY4NGVkMDI5MDdmZjVjNDJlOGVjNzBcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlcyA9IEpTT04ucGFyc2UocG9zdCh1LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYm9keToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBob3N0OiBcXFwiZnJvZG8uZG91YmFuLmNvbVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBcXFwiUmV4eGFyLUNvcmUvMC4xLjMgYXBpLWNsaWVudC8xIGNvbS5kb3ViYW4uZnJvZG8vNy45LjAuYmV0YTIoMjE1KSBBbmRyb2lkLzI1IHByb2R1Y3QvVEFTLUFMMDAgdmVuZG9yL0hVQVdFSSBtb2RlbC9UQVMtQUwwMCAgcm9tL2FuZHJvaWQgIG5ldHdvcmsvd2lmaSAgcGxhdGZvcm0vbW9iaWxlIGNvbS5kb3ViYW4uZnJvZG8vNy45LjAuYmV0YTIoMjE1KSBSZXh4YXIvMS4yLjE1MSAgcGxhdGZvcm0vbW9iaWxlIDEuMi4xNTFcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgICAgICAgICBkLnVuc2hpZnQoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiByZXMudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiByZXMucGljLm5vcm1hbCxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJ4NTovL1xcXCIgKyByZXMuaW5mb191cmwsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogcmVzLmNhcmRfc3VidGl0bGUgKyBcXFwiXFxcXG5cXFwiICsgc3RhcixcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcIm1vdmllXzFfdmVydGljYWxfcGljX2JsdXJcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJsaW5lX2JsYW5rXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIHZhciBpbnRybyA9IGDkvZzogIXvvJoke3Jlcy5hdXRob3Iuam9pbihcXFwiLFxcXCIpfVxcXFxuXFxcXG7nv7vor5HvvJoke3Jlcy50cmFuc2xhdG9yLmpvaW4oXFxcIixcXFwiKX1cXFxcblxcXFxu566A5LuL77yaJHtyZXMuaW50cm99XFxcXG5cXFxcbuS9nOiAheeugOS7i++8miR7cmVzLmF1dGhvcl9pbnRyb31cXFxcblxcXFxu5pGY5b2V77yaJHtyZXMuY2F0YWxvZ31gXFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpbnRybyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImxvbmdfdGV4dFxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICBzZXRSZXN1bHQoZClcXG4gICAgICAgICAgICAgICAgfSwgaXRlbS5pZCwgc3RhcilcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSlcXG4gICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgfSxcXG4gICAgWWxpYnJhcnk6IGZ1bmN0aW9uKGt3LCBwYWdlKSB7XFxuICAgICAgICB2YXIgZCA9IFtdXFxuICAgICAgICB2YXIgcmVzID0gSlNPTi5wYXJzZShwb3N0KFxcXCJodHRwcz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gICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiaWRcXFwiOiBpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJzb3VyY2VcXFwiOiBcXFwiemxpYnJhcnlcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHNlcnZlcnMgPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGk/cnVsZT3lm77kuabppoZQcm9cXFwiKS5zZXJ2ZXJzXFxuICAgICAgICAgICAgICAgICAgICAgICAgc2VydmVycy51bnNoaWZ0KFxcXCLnmb7luqbkupHnm5jovazlrZhcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXMuaW5fbGliZ2VuKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlcnZlcnMudW5zaGlmdChcXFwiTGliZ2VuKOaOqOiNkClcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChzZXJ2ZXJzLCAxLCBcXFwi6YCJ5oup57q/6LevXFxcIikuc2VsZWN0KChyZXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXCJMaWJnZW4o5o6o6I2QKVxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwZGZoKHJlcXVlc3QoXFxcImh0dHA6Ly9saWJyYXJ5LmxvbC9tYWluL1xcXCIgKyByZXMubWQ1KSwgXFxcIiNkb3dubG9hZCYmYSYmaHJlZlxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gXFxcIueZvuW6puS6keebmOi9rOWtmFxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImFwaT9ydWxlPeWbvuS5pummhlByb1xcXCIpLmJhaWR1KHJlcylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSBcXFwiaXBmc+S4i+i9vVxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBgaHR0cHM6Ly9pcGZzLWNoZWNrZXIuMWtidG9vbC5jb20vJHtyZXMuaXBmc19jaWR9YFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGlucHV0ICsgcmVzLmlwZnNfY2lkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCByZXMpXFxuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbG9nKGUubWVzc2FnZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6Kej5p6Q5aSx6LSlXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCBpdGVtLmlkKVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICB9LFxcbiAgICBabGlicmFyeTogZnVuY3Rpb24oa3csIHBhZ2UpIHtcXG4gICAgICAgIHZhciBkID0gW107XFxuICAgICAgICB2YXIgcmVzID0gSlNPTi5wYXJzZShwb3N0KFxcXCJodHRwczovL3dvcmtlci56bGliLmFwcC9hcGkvc2VhcmNoL1xcXCIsIHtcXG4gICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAg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0X2h1YnMucGhwXFxcIiwge1xcbiAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgcToga3csXFxuICAgICAgICAgICAgICAgIHJlbW90ZV9pcDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgIHRpbWVfaW50OiBEYXRlLnBhcnNlKG5ldyBEYXRlKCkpICsgXFxcIlxcXCJcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KSkuaWRcXG4gICAgICAgIHZhciByZXMgPSBKU09OLnBhcnNlKHBvc3QoXFxcImh0dHBzOi8vd3d3NS5qaXVtb2RpYXJ5LmNvbS9hamF4X2ZldGNoX2h1YnMucGhwXFxcIiwge1xcbiAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IGlkLFxcbiAgICAgICAgICAgICAgICBzZXQ6IDBcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KSkuc291cmNlc1xcbiAgICAgICAgcmVzLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgaXRlbS5kZXRhaWxzLmRhdGEuZm9yRWFjaChpdGVtMiA9PiB7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXRlbTIudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBjb250ZW50OiBpdGVtMi5kZXMgKyBcXFwiXFxcXG5cXFwiICsgaXRlbTIudl9kZXMsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IFxcXCJodHRwOlxcXCIgKyBpdGVtMi5pbWdfbGluayxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBpdGVtMi5pbWdfbGluayA/IFxcXCJtb3ZpZV8xX3ZlcnRpY2FsX3BpY1xcXCIgOiBcXFwidGV4dF8xXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHVybDogaXRlbTIubGlua1xcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICB9LFxcbiAgICBjaGVja0xpYmdlbjogZnVuY3Rpb24oKSB7XFxuICAgICAgICB2YXIgZG9tYWlucyA9IFtcXFwiaHR0cDovL2xpYmdlbi5yc1xcXCIsIFxcXCJodHRwOi8vbGliZ2VuLmlzXFxcIiwgXFxcImh0dHA6Ly9saWJnZW4uc3RcXFwiXVxcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBmb3IgKGl0ZW0gb2YgZG9tYWlucykge1xcbiAgICAgICAgICAgICAgICB2YXIgY29kZSA9IEpTT04ucGFyc2UocmVxdWVzdChpdGVtLCB7XFxuICAgICAgICAgICAgICAgICAgICB3aXRoU3RhdHVzQ29kZTogdHJ1ZVxcbiAgICAgICAgICAgICAgICB9KSkuc3RhdHVzQ29kZVxcbiAgICAgICAgICAgICAgICBpZiAoY29kZSA9PSAyMDApIHtcXG4gICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oXFxcImxpYmdlblxcXCIsIGl0ZW0pXFxuICAgICAgICAgICAgICAgICAgICB0b2FzdChcXFwi5qOA5rWL5Yiw5Y+v55So6ZWc5YOP77yM6K+35Yi35paw5ZCO6YeN5paw5pCc57SiXFxcIilcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdG9hc3QoXFxcIuaJgOaciemVnOWDj+mDveaXoOazleS9v+eUqO+8jOivt+aJk+W8gFRa5L2/55SoXFxcIilcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICBsb2coZS5tZXNzYWdlKVxcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICBMaWJnZW46IGZ1bmN0aW9uKGt3LCBwYWdlKSB7XFxuICAgICAgICB2YXIgZCA9IFtdXFxuICAgICAgICBpZiAoZ2V0SXRlbShcXFwibGliZ2VuXFxcIiwgXFxcIlxcXCIpID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgdG9hc3QoXFxcIuaXoOWPr+eUqOmVnOWDj++8jOato+WcqOajgOa1i+S4rS4uLlxcXCIpXFxuICAgICAgICAgICAgJC5yZXF1aXJlKFxcXCJhcGk/cnVsZT3lm77kuabppoZQcm9cXFwiKS5jaGVja0xpYmdlbigpXFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHZhciB1cmwgPSBnZXRJdGVtKFxcXCJsaWJnZW5cXFwiKSArIFxcXCIvc2VhcmNoLnBocD9yZXE9XFxcIiArIGt3ICsgXFxcIiZwYWdlPVxcXCIgKyBwYWdlXFxuICAgICAgICAgICAgdmFyIHIgPSBKU09OLnBhcnNlKHJlcXVlc3QodXJsLCB7XFxuICAgICAgICAgICAgICAgIHdpdGhIZWFkZXJzOiB0cnVlXFxuICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgaWYgKHIuc3RhdHVzQ29kZSA9PSAyMDApIHtcXG4gICAgICAgICAgICAgICAgdmFyIHJlcyA9IHIuYm9keVxcbiAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IHBkZmEocmVzLCBcXFwiYm9keSYmdHJcXFwiKS5maWx0ZXIoaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoaXRlbS5pbmNsdWRlcyhcXFwibm93cmFwXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXRlbVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICBsaXN0LmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgbGkgPSBpdGVtLm1hdGNoKG5ldyBSZWdFeHAoXFxcIjx0ZCguKj8pPC90ZD5cXFwiLCBcXFwiZ1xcXCIpKVxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGRlc2MgPSBwZGZoKGxpWzFdLCBcXFwiYSYmVGV4dFxcXCIpXFxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMzsgaSA8IGxpLmxlbmd0aCAtIDM7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2MgKz0gXFxcIu+8m1xcXCIgKyBwZGZoKGxpW2ldLCBcXFwiVGV4dFxcXCIpXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGxpWzJdLCBcXFwiVGV4dFxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQ6IGRlc2MsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGxpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwZGZoKHJlcXVlc3QocGRmaChsaVs5XSwgXFxcImEmJmhyZWZcXFwiKSksIFxcXCIjZG93bmxvYWQmJmEmJmhyZWZcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIGxpKVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB0b2FzdChcXFwi6ZWc5YOP5aSx5pWI77yM6YeN5paw5qOA5rWL5LitLi4uXFxcIilcXG4gICAgICAgICAgICAgICAgJC5yZXF1aXJlKFxcXCJhcGk/cnVsZT3lm77kuabppoZQcm9cXFwiKS5jaGVja0xpYmdlbigpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICB9LFxcbiAgICDnvZHnm5g6IGZ1bmN0aW9uKGt3LCBwYWdlKSB7XFxuICAgICAgICB2YXIgZCA9IFtdXFxuICAgICAgICB2YXIgcmVzID0gSlNPTi5wYXJzZShwb3N0KFxcXCJodHRwczovL2FwaS5ib29rcGFuLm5ldC9hcGkvc2VhcmNoL1xcXCIsIHtcXG4gICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgIFxcXCJrZXl3b3JkXFxcIjoga3csXFxuICAgICAgICAgICAgICAgIFxcXCJwYWdlXFxcIjogcGFnZSxcXG4gICAgICAgICAgICAgICAgXFxcInNlbnNpdGl2ZVxcXCI6IGZhbHNlXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pKS5kYXRhXFxuICAgICAgICByZXMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5pbmZvLFxcbiAgICAgICAgICAgICAgICBjb250ZW50OiBpdGVtLnNvdXJjZSxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGlkLCBzb3VyY2UpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHJlcyA9IEpTT04ucGFyc2UocG9zdChcXFwiaHR0cHM6Ly9hcGkuYm9va3Bhbi5uZXQvYXBpL2RldGFpbC9cXFwiLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJpZFxcXCI6IGlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInNvdXJjZVxcXCI6IHNvdXJjZVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXMuZG93bmxvYWRfbGluaykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZGljdCA9IHt9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcy5kb3dubG9hZF9saW5rLnVuc2hpZnQoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogXFxcIuWOn+e9kemhtVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHJlcy51cmxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQocmVzLmRvd25sb2FkX2xpbmsubWFwKGZ1bmN0aW9uKGl0ZW0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBpdGVtLm5hbWVcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksIDEsIFxcXCLor7fpgInmi6nkuIvovb3nur/ot69cXFwiKS5zZWxlY3QoKGxpbmtzKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbGlua3NbbGlua3MubWFwKGZ1bmN0aW9uKGl0ZW0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXRlbS5uYW1lXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KS5pbmRleE9mKGlucHV0KV0udXJsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHJlcy5kb3dubG9hZF9saW5rKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXMudXJsXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhlLm1lc3NhZ2UpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+ino+aekOWksei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+i+k+WFpeS/neWtmOi3r+W+hFxcXCIpLmlucHV0KChiZHN0b2tlbiwgcmVzKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgcmVzID0gSlNPTi5wYXJzZShwb3N0KFxcXCJodHRwczovL3Bhbi5iYWlkdS5jb20vcmVzdC8yLjAveHBhbi9maWxlP21ldGhvZD1jcmVhdGUmYmRzdG9rZW49XFxcIiArIGJkc3Rva2VuLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBDb29raWU6IHJlcXVlc3QoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvSm9lL2JhaWR1LnR4dFxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBib2R5OiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemU6IHJlcy5maWxlc2l6ZSArIFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXRoOiBpbnB1dCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmxvY2tfbGlzdDogW3Jlcy5tZDVdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBydHlwZTogMFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pKVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlcy5lcnJubyA9PSAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+i9rOWtmOaIkOWKn1xcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzLmVycm5vID09IC04KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+i9rOWtmOWksei0pe+8jOW3sue7j+S/neWtmOi/h+i/meS4quaWh+S7tuS6hlxcXCJcXG4gIC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IHtcXG4gICAgICAgIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICB2YXIgdXJsID0gbG9jYXRpb24uaHJlZlxcbiAgICAgICAgICAgIGlmICh1cmwuaW5jbHVkZXMoXFxcImh0dHBzOi8vcGFuLmJhaWR1LmNvbS93YXBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICBmYmEud3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL0pvZS9iYWlkdS50eHRcXFwiLCBmYmEuZ2V0Q29va2llKFxcXCJcXFwiKSlcXG4gICAgICAgICAgICAgICAgYWxlcnQoXFxcIuW3suiOt+WPluWIsGNvb2tpZe+8jOi/lOWbnuWNs+WPr1xcXCIpXFxuICAgICAgICAgICAgICAgIGZiYS5iYWNrKClcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KSxcXG4gICAgICAgIHVhOiBNT0JJTEVfVUEsXFxuICAgICAgICBjYW5CYWNrOiB0cnVlXFxuICAgIH1cXG59XSlcIn1dIiwiaWNvbiI6Imh0dHBzOi8vbGFubWVpZ3VvamlhbmcuY29tL3R1Ymlhby9rZS8zOC5wbmciLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment