Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@蜻蜓FM📻@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6ImpzOlxudHJ1ZV91cmwgPSBNWV9QQVJBTVMuaHJlZlxudmFyIGh0bWwgPSBmZXRjaCh0cnVlX3VybCwge2hlYWRlcnM6IHtcbiAgICAgICAgICAgIFwiVXNlci1BZ2VudFwiOiBQQ19VQVxuICAgICAgICB9fSlcclxudmFyIGxpc3QgPSBbXTtcclxudHJ5IHtcclxuICAgIGxpc3QgPSBwYXJzZURvbUZvckFycmF5KGh0bWwsICdib2R5JiYucHJvZ3JhbS1yb3ctcm9vdCcpO1xyXG59IGNhdGNoIChlKSB7fVxyXG5pZiAobGlzdC5sZW5ndGggIT0gMCkge1xyXG4gICAgdmFyIHRpdGxlID0gcGFyc2VEb21Gb3JIdG1sKGxpc3RbMF0sICdwJiZUZXh0Jyk7XHJcbiAgICBzZXRSZXN1bHQoXCLmm7TmlrDoh7M6IFwiICsgdGl0bGUpO1xyXG59XG4iLCJ0aXRsZSI6Iuicu+ick0ZN8J+TuyIsImF1dGhvciI6Imd1YW5lciZ4eHMiLCJ1cmwiOiJoaWtlcjovL2VtcHR5I2Z5cGFnZSNmeUFsbCNodHRwczovL3d3dy5xaW5ndGluZy5mbSIsInZlcnNpb24iOjksImNvbF90eXBlIjoiaWNvbl9yb3VuZF80IiwiY2xhc3NfbmFtZSI6IuiuoumYheS4k+i+kSborqLpmIXkuLvmkq0m5YiG57G7JueUteWPsCbmkJzntKIm566h55CG5Li75pKtJueuoeeQhuS4k+i+kSIsInR5cGUiOiJtdXNpYyIsImNsYXNzX3VybCI6IuS4k+i+kSbkuLvmkq0m5YiG57G7JueUteWPsCbmkJzntKIm5Li75pKt566h55CGJuS4k+i+keeuoeeQhiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxudmFyIGQgPSBbXTsvL01ZX1VSTC5tYXRjaCgvZj0oLio/KSYvKVsxXVxudmFyIHBhZ2UgPSBNWV9VUkwuc3BsaXQoJyMnKVsxXTtcbnZhciBjbGFzc2lmaWNhdGlvbiA9IE1ZX1VSTC5zcGxpdCgnIycpWzJdO1xudmFyIG1VcmwgPSBNWV9VUkwuc3BsaXQoJyMnKVszXTtcbnN3aXRjaCAoY2xhc3NpZmljYXRpb24pIHtcbiAgICBjYXNlIFwi5pCc57SiXCI6XG4gICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaChcImhpa2VyOi8vcGFnZS9zZWFyY2guaHRtbFwiKSkucnVsZSlcbiAgICAgICAgYnJlYWtcbiAgICBjYXNlIFwi5Li75pKtXCI6XG4gICAgICAgIHIgPSBwYWdlID09IDEgPyByZWFkRmlsZSgncWluZ3RpbmdfcG9kY2FzdGVycy50eHQnLDApIDpcbiAgICAgICAgICAgIGZhbHNlO1xuICAgICAgICBKc29uID0gciA/IEpTT04ucGFyc2UocikgOiBbXTtcbiAgICAgICAgSnNvbi5mb3JFYWNoKCh4KSA9PiB7XG4gICAgICAgICAgICB4LnZpc2libGUgPyBkLnB1c2goeCkgOiBudWxsXG4gICAgICAgIH0pO1xuICAgICAgICBkLmZvckVhY2goKHgpID0+IHtcbiAgICAgICAgICAgIHguaW1nID0geC5kYXRhLmljb24gPyB4LmRhdGEuaWNvbiA6IHguZGF0YS5pbWdcbiAgICAgICAgICBcbiAgICAgICAgfSk7XG4gICAgICAgIGlmICghZC5sZW5ndGggJiYgcGFnZSA9PSAxKSB7XG4gICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgIHRpdGxlOiBcIuaaguaXoOiuoumYheS4u+aSre+8jOW/q+WOu+aQnOe0ouiuoumYheWQp1wiLFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcInRleHRfY2VudGVyXzFcIixcbiAgICAgICAgICAgICAgICB1cmw6IFwidG9hc3Q6Ly/lv6vljrvmkJzntKLlkKdcIlxuICAgICAgICAgICAgfSlcbiAgICAgICAgfVxuICAgICAgICBicmVha1xuXHQgICAgY2FzZSBcIuS4k+i+kVwiOlxuICAgICAgICByID0gcGFnZSA9PSAxID8gcmVhZEZpbGUoJ3Fpbmd0aW5nX2NoYW5uZWxzLnR4dCcsMCkgOlxuICAgICAgICAgICAgZmFsc2U7XG4gICAgICAgIEpzb24gPSByID8gSlNPTi5wYXJzZShyKSA6IFtdO1xuICAgICAgICBKc29uLmZvckVhY2goKHgpID0+IHtcbiAgICAgICAgICAgIHgudmlzaWJsZSA/IGQucHVzaCh4KSA6IG51bGxcbiAgICAgICAgfSk7XG4gICAgICAgIGQuZm9yRWFjaCgoeCkgPT4ge1xuICAgICAgICAgICAgeC5pbWcgPSB4LmRhdGEuaWNvbiA/IHguZGF0YS5pY29uIDogeC5kYXRhLmltZ1xuICAgICAgICAgIHguY29sX3R5cGU9XCJtb3ZpZV8yXCJcbiAgICAgICAgfSk7XG4gICAgICAgIGlmICghZC5sZW5ndGggJiYgcGFnZSA9PSAxKSB7XG4gICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgIHRpdGxlOiBcIuaaguaXoOiuoumYheS4k+i+ke+8jOW/q+WOu+aQnOe0ouiuoumYheWQp1wiLFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcInRleHRfY2VudGVyXzFcIixcbiAgICAgICAgICAgICAgICB1cmw6IFwidG9hc3Q6Ly/lv6vljrvmkJzntKLlkKdcIlxuICAgICAgICAgICAgfSlcbiAgICAgICAgfVxuICAgICAgICBicmVha1xuXHRjYXNlIFwi5YiG57G7XCI6XG4gICAgICAgZXZhbChKU09OLnBhcnNlKGZldGNoKFwiaGlrZXI6Ly9wYWdlL2NhdGVnb3JpZXMuaHRtbFwiKSkucnVsZSlcblx0YnJlYWtcblx0Y2FzZSBcIueUte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AgICAgIH0sIGkpXFxuICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgIGNhc2UgJ+WIoOmZpOWNmuS4uyc6XFxuICAgICAgICAgICAgZC50aXRsZSA9ICh2LmRlbGV0ZSA/ICfinYwgICcgOiAnJykgKyBkLnRpdGxlXFxuICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ3Fpbmd0aW5nX3BvZGNhc3RlcnMudHh0JywwKSB8fCAnW10nKVxcbiAgICAgICAgICAgICAgICBydWxlc1tpXS5kZWxldGUgPSAhcnVsZXNbaV0uZGVsZXRlXFxuICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdxaW5ndGluZ19wb2RjYXN0ZXJzLnR4dCcsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSwwKVxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgIGNhc2UgJ+mHjeaWsOaOkuW6jyc6XFxuICAgICAgICAgICAgbGV0IHNvcnRGbGFnID0gcGFyc2VJbnQoZ2V0TXlWYXIoJ3NvcnRGbGFnJywgJy0xJykpXFxuICAgICAgICAgICAgZC50aXRsZSA9IChzb3J0RmxhZyA9PSBpID8gJ/CflIMgICcgOiAnJykgKyBkLnRpdGxlXFxuICAgICAgICAgICAgaWYgKHNvcnRGbGFnID09IC0xKVxcbiAgICAgICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzb3J0RmxhZycsIGkudG9TdHJpbmcoKSlcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mAieaLqeimgeenu+WKqOWIsOeahOS9jee9ridcXG4gICAgICAgICAgICAgICAgfSwgaSlcXG4gICAgICAgICAgICBlbHNlXFxuICAgICAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgob2xkSW5kZXgsIG5ld0luZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdxaW5ndGluZ19wb2RjYXN0ZXJzLnR4dCcsMCkgfHwgJ1tdJylcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzLnNwbGljZShuZXdJbmRleCwgMCwgcnVsZXMuc3BsaWNlKG9sZEluZGV4LCAxKVswXSlcXG4gICAgICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdxaW5ndGluZ19wb2RjYXN0ZXJzLnR4dCcsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSwwKVxcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgJy0xJylcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LCBzb3J0RmxhZywgaSlcXG4gICAgICAgICAgICBicmVha1xcbiAgICAgICAgY2FzZSAn5pu05pS55aS05YOPJzpcXG4gICAgICAgICAgICBkLnVybCA9ICQodi5pbWcgfHwgJycsICfovpPlhaXmlrDlm77moIflnLDlnYDmiJbpopzoibLku6PnoIHvvJonKS5pbnB1dCgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdxaW5ndGluZ19wb2RjYXN0ZXJzLnR4dCcsMCkgfHwgJ1tdJylcXG4gICAgICAgICAgICAgICAgaWYgKGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXNbaV0uaW1nID0gaW5wdXRcXG4gICAgICAgICAgICAgICAgZWxzZVxcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHJ1bGVzW2ldLmltZ1xcbiAgICAgICAgICAgICAgICBzYXZlRmlsZSgncWluZ3RpbmdfcG9kY2FzdGVycy50eHQnLCBKU09OLnN0cmluZ2lmeShydWxlcyksMClcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICBjYXNlICfmm7TmlLnlkI3np7AnOlxcbiAgICAgICAgICAgIGQudXJsID0gJCh2LnRpdGxlIHx8ICcnLCAn6L6T5YWl5paw5ZCN56ew77yaJykuaW5wdXQoKGkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgncWluZ3RpbmdfcG9kY2FzdGVycy50eHQnLDApIHx8ICdbXScpXFxuICAgICAgICAgICAgICAgIGlmIChpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzW2ldLnRpdGxlID0gaW5wdXRcXG4gICAgICAgICAgICAgICAgZWxzZVxcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHJ1bGVzW2ldLnRpdGxlXFxuICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdxaW5ndGluZ19wb2RjYXN0ZXJzLnR4dCcsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSwwKVxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIGkpXFx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si55So5oi35YiX6KGo57uT5p2fXFxuLy/oioLnm65cXG5mdW5jdGlvbiBwcm9ncmFtX29uZGVtYW5kIChodG1sLCBkKSB7XFxuICAgIGxldCBzZWFyY2hpbmdzID0gcGRmYShodG1sLCcuc2VhcmNoLWdhbGxlcnktbGlzdCYmLnNlYXJjaGluZycpO1xcbiAgICBzZWFyY2hpbmdzLmZvckVhY2goaXRlbT0+e1xcbiAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGl0ZW0sJ2ltZyYmYWx0JyksXFxuICAgICAgICAgICAgICAgIGltZzpwZChpdGVtLCdpbWcmJnNyYycpICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgIGRlc2M6IHBkZmgoaXRlbSwnLmRlc2MmJlRleHQnKSxcXG4gICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL2RldGFpbC5odG1sXFxcIixcXG4gICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICBocmVmOiBTdHJpbmcoJ2h0dHBzOi8vd3d3LnFpbmd0aW5nLmZtJytwZGZoKGl0ZW0sJ2EmJmhyZWYnKSlcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJtb3ZpZV8xXFxcIlxcbiAgICAgICAgICAgIH0pXFxuXFx0XFx0ICBcXG4gICAgICAgIH0pXFxuICAgIHJldHVybiBkO1xcbn1cXG4vL+eUteWPsCBcXG5mdW5jdGlvbiBjaGFubmVsX2xpdmUgIChodG1sLCBkKSB7XFxuICAgIGxldCBzZWFyY2hpbmdzID0gcGRmYShodG1sLCcuc2VhcmNoLWdhbGxlcnktbGlzdCYmLnNlYXJjaGluZycpO1xcbiAgICBzZWFyY2hpbmdzLmZvckVhY2goaXRlbT0+e1xcbiAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICA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AgICBpbWc6IHQuaW1nICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS9wb2RjYXN0ZXJzLmh0bWxcXFwiLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgaHJlZjogU3RyaW5nKHQudXJsKVxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBkYXRhOiB7XFxuICAgICAgICAgICAgICAgICAgICBpbWc6IHQuaW1nICsgXFxcIkBSZWZlcmVyPVxcXCJcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgc2F2ZUZpbGUoJ3Fpbmd0aW5nX3BvZGNhc3RlcnMudHh0JywgSlNPTi5zdHJpbmdpZnkoaiksMCk7XFxuICAgICAgICAgICAgYmFjayh0cnVlKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuXFxuICAgICAgICAgICAgYmFjayh0cnVlKTtcXG5cXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LorqLpmIXor6XljZrkuLsnO1xcbiAgICB9XFxufSwgSnNvbik7XFxuXFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6IFxcXCLorqLpmIXljZrkuLtcXFwiLFxcbiAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICB1cmw6IGx1cmxcXG59KVxcblxcbmxldCBoZWFkVGl0bGUgPSBwZGZoKGh0bWwsICcuaGVhZGVyJiYudGl0bGUmJlRleHQnKTtcXG5sZXQgaGVhZFRvdGFsID0gcGRmaChodG1sLCAnLmhlYWRlciYmLnRvdGFsJiZUZXh0Jyk7XFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6IGhlYWRUaXRsZSArICfigJjigJjigJnigJknICsgXFxcIiA8c21hbGw+PGZvbnQgY29sb3I9JyNiM2Q0ZmMnIHNpemU9JzE0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F6eSA9ICQoXFxcIlxcXCIpLmxhenlSdWxlKCgpID0+IHtcXG4gICBcXG4gICAgICAgIHZhciBwbGF5ID0gaW5wdXQ7XFxuICAgICAgICBzaG93TG9hZGluZyhcXFwi572R6aG15ZeF5o6i5LitLOivt+eojeWQji4uLlxcXCIpO1xcbiAgICAgICAgdmFyIHZpZGVvID0gJ3g1UnVsZTovLycgKyBwbGF5ICsgJ0AnICsgJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgdmFyIHVybHMgPSBfZ2V0VXJscygpXFxuICAgICAgICAgICAgZm9yICh2YXIgaSBpbiB1cmxzKSB7XFxuICAgICAgICAgICAgICAgIGlmICghdXJsc1tpXS5pbmNsdWRlcyhcXFwidj1cXFwiKSAmJiAhdXJsc1tpXS5pbmNsdWRlcyhcXFwidXJsPVxcXCIpICYmIHVybHNbaV0ubWF0Y2goL1xcXFwubTRhfFxcXFwubXA0fFxcXFwubTN1OC8pKSB7XFxuICAgICAgICAgICAgICAgICAgICAvL2Z5X2JyaWRnZV9hcHAubG9nKHVybHNbaV0pXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsc1tpXTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh1cmxzW2ldLm1hdGNoKC9cXFxcLmZsdi8pKSB7XFxuICAgICAgICAgICAgICAgICAgICAvL2Z5X2JyaWRnZV9hcHAubG9nKHVybHNbaV0pXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsc1tpXSArICc7e1JlZmVyZXJAaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tLyYmVXNlci1BZ2VudEBNb3ppbGxhLzUuMH0nO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSlcXG4gICAgXFxuICAgIHJldHVybiB2aWRlb1xcbn0pO1xcblxcblxcbnZhciBodG1sID0gZmV0Y2godXJsLCB7aGVhZGVyczoge1xcbiAgICAgICAgICAgIFxcXCJVc2VyLU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HBkZmEoY2F0ZWdvcnksIOWwj+exu+WumuS9jSk7XFxuICAvL2xvZyhzdWJfY2F0ZWdvcmllcylcXG4gICAgICAgIGlmIChpbmRleCA9PT0gMCkge1xcbiAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0ZW0sIOWIhuexu+agh+mimClcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBrZXkudG9TdHJpbmcoKSA9PT0gY2F0ZV90ZW1wW2luZGV4XSA/ICfigJzigJzigJ3igJ08Yj48c3BhbiBzdHlsZT1cXFwiY29sb3I6ICcgKyDliIbnsbvpopzoibIgKyAnXFxcIj4nICsgdGl0bGUgKyAnPC9zcGFuPjwvYj4nIDogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQobVVybCtwZGZoKGl0ZW0sIOWIhuexu+mTvuaOpSkgKyAnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld19jYXRlID0gW11cXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wLmZvckVhY2goKGNhdGUsIGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19jYXRlLnB1c2goaW5kZXggPT09IDAgPyBwYXJhbXMua2V5LnRvU3RyaW5nKCkgOiBcXFwiMFxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoTVlfUlVMRS50aXRsZSwgSlNPTi5zdHJpbmdpZnkobmV3X2NhdGUpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnVybCwgaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogcGFnZSxcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9IGVsc2UgaWYgKGZvbGQgPT09ICcxJykge1xcbiAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0ZW0sIOWIhuexu+agh+mimClcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBrZXkudG9TdHJpbmcoKSA9PT0gY2F0ZV90ZW1wW2luZGV4XSA/ICfigJzigJzigJ3igJ08Yj48c3BhbiBzdHlsZT1cXFwiY29sb3I6ICcgKyDliIbnsbvpopzoibIgKyAnXFxcIj4nICsgdGl0bGUgKyAnPC9zcGFuPjwvYj4nIDogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQobVVybCtwZGZoKGl0ZW0sIOWIhuexu+mTvuaOpSkgKyAnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcFtwYXJhbXMuaW5kZXhdID0gcGFyYW1zLmtleS50b1N0cmluZygpXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5jYXRlX3RlbXApKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnVybCwgaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHBhZ2UsXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICB9KVxcbn1cXG5cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuWIhuexu1wiLFwicGF0aFwiOlwiY2F0ZWdvcmllcy5odG1sXCIsXCJydWxlXCI6XCJcXG52YXIgZ2V0UmFuZ2VDb2xvcnMgPSBmdW5jdG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lwicmFkaW8uaHRtbFwiLFwicnVsZVwiOlwianM6XFxubGV0IGQgPSBbXTtcXG52YXIgX3g1ID0gJC50b1N0cmluZygoKSA9PiB7XFxuICAgIGZiYS5sb2coZmJhLmdldFVybHMoKSlcXG4gICAgdmFyIHVybHMgPSBfZ2V0VXJscygpXFxuICAgIGZvciAodmFyIGkgaW4gdXJscykge1xcbiAgICAgICAgaWYgKHVybHNbaV0ubWF0Y2goL1xcXFwubTRhfFxcXFwubXA0fFxcXFwubTN1OC8pKSB7XFxuICAgICAgICAgICAgZnlfYnJpZGdlX2FwcC5sb2codXJsc1tpXSlcXG4gICAgICAgICAgICByZXR1cm4gdXJsc1tpXTtcXG4gICAgICAgIH1cXG4gICAgfVxcbn0pO1xcblxcbi8v6YCa5YWNXFxudmFyIGxhenkgPSAkKFxcXCJcXFwiKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgXFxuICAgICAgICB2YXIgcGxheSA9IGlucHV0O1xcbiAgICAgICAgc2hvd0xvYWRpbmcoXFxcIue9kemhteWXheaOouS4rSzor7fnqI3lkI4uLi5cXFwiKTtcXG4gICAgICAgIHZhciB2aWRlbyA9ICd4NVJ1bGU6Ly8nICsgcGxheSArICdAJyArICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgIHZhciB1cmxzID0gX2dldFVybHMoKVxcbiAgICAgICAgICAgIGZvciAodmFyIGkgaW4gdXJscykge1xcbiAgICAgICAgICAgICAgICBpZiAoIXVybHNbaV0uaW5jbHVkZXMoXFxcInY9XFxcIikgJiYgIXVybHNbaV0uaW5jbHVkZXMoXFxcInVybD1cXFwiKSAmJiB1cmxzW2ldLm1hdGNoKC9cXFxcLm00YXxcXFxcLm1wNHxcXFxcLm0zdTgvKSkge1xcbiAgICAgICAgICAgICAgICAgICAgLy9meV9icmlkZ2VfYXBwLmxvZyh1cmxzW2ldKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybHNbaV07XFxuICAgICAgICAgICAgICAg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L6RXFxcIikge1xcbiAgIGlmKEpzb24ubGVuZ3RoKXtcXG4gICAgZWwucHVzaCh7XFxuICAgICAgICB0aXRsZTogXFxcIuehruiupOWIoOmZpFxcXCIsXFxuICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChKc29uKSA9PiB7XFxuICAgICAgICAgICAgbGV0IHJ1bGVzID0gW107XFxuICAgICAgICAgICAgSnNvbi5mb3JFYWNoKCh4KSA9PiB7XFxuICAgICAgICAgICAgICAgICF4LmRlbGV0ZSA/IHJ1bGVzLnB1c2goeCkgOiBudWxsXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBzYXZlRmlsZSgncWluZ3RpbmdfY2hhbm5lbHMudHh0JywgSlNPTi5zdHJpbmdpZnkocnVsZXMpLDApXFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WIoOmZpOaIkOWKnydcXG4gICAgICAgIH0sIEpzb24pXFxuICAgIH0pXFxufVxcbn1cXG5KU09OLnBhcnNlKHJlYWRGaWxlKCdxaW5ndGluZ19jaGFubmVscy50eHQnLDApIHx8ICdbXScpLmZvckVhY2goKHYsIGkpID0+IHtcXG4gICAgbGV0IGQgPSB7XFxuICAgICAgICB0aXRsZTogdi50aXRsZSxcXG4gICAgICAgIGltZzogdi5pbWdcXG4gICAgfVxcbiAgICBzd2l0Y2ggKGVkaXRNb2RlKSB7XFxuICAgICAgICBjYXNlICfmmL7npLov6ZqQ6JePJzpcXG4gICAgICAgICAgICBkLnRpdGxlID0gKHYudmlzaWJsZSA/ICfwn5+iICAnIDogJ/CflLQgICcpICsgZC50aXRsZVxcbiAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdxaW5ndGluZ19jaGFubmVscy50eHQnLDApIHx8ICdbXScpXFxuICAgICAgICAgICAgICAgIHJ1bGVzW2ldLnZpc2libGUgPSAhcnVsZXNbaV0udmlzaWJsZVxcbiAgICAgICAgICAgICAgICBzYXZlRmlsZSgncWluZ3RpbmdfY2hhbm5lbHMudHh0JywgSlNPTi5zdHJpbmdpZnkocnVsZXMpLDApXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgaSlcXG4gICAgICAgICAgICBicmVha1xcbiAgICAgICAgY2FzZSAn5Yig6Zmk5LiT6L6RJzpcXG4gICAgICAgICAgICBkLnRpdGxlID0gKHYuZGVsZXRlID8gJ+KdjCAgJyA6ICcnKSArIGQudGl0bGVcXG4gICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgncWluZ3RpbmdfY2hhbm5lbHMudHh0JywwKSB8fCAnW10nKVxcbiAgICAgICAgICAgICAgICBydWxlc1tpXS5kZWxldGUgPSAhcnVsZXNbaV0uZGVsZXRlXFxuICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdxaW5ndGluZ19jaGFubmVscy50eHQnLCBKU09OLnN0cmluZ2lmeShydWxlcyksMClcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICBjYXNlICfph43mlrDmjpLluo8nOlxcbiAgICAgICAgICAgIGxldCBzb3J0RmxhZyA9IHBhcnNlSW50KGdldE15VmFyKCdzb3J0RmxhZycsICctMScpKVxcbiAgICAgICAgICAgIGQudGl0bGUgPSAoc29ydEZsYWcgPT0gaSA/ICfwn5SDICAnIDogJycpICsgZC50aXRsZVxcbiAgICAgICAgICAgIGlmIChzb3J0RmxhZyA9PSAtMSlcXG4gICAgICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCBpLnRvU3RyaW5nKCkpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/pgInmi6nopoHnp7vliqjliLDnmoTkvY3nva4nXFxuICAgICAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICAgICAgZWxzZVxcbiAgICAgICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKG9sZEluZGV4LCBuZXdJbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgncWluZ3RpbmdfY2hhbm5lbHMudHh0JywwKSB8fCAnW10nKVxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXMuc3BsaWNlKG5ld0luZGV4LCAwLCBydWxlcy5zcGxpY2Uob2xkSW5kZXgsIDEpWzBdKVxcbiAgICAgICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ3Fpbmd0aW5nX2NoYW5uZWxzLnR4dCcsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSwwKVxcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgJy0xJylcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LCBzb3J0RmxhZywgaSlcXG4gICAgICAgICAgICBicmVha1xcbiAgICAgICAgY2FzZSAn5pu05pS56YWN5Zu+JzpcXG4gICAgICAgICAgICBkLnVybCA9ICQodi5pbWcgfHwgJycsICfovpPlhaXmlrDlm77moIflnLDlnYDmiJbpopzoibLku6PnoIHvvJonKS5pbnB1dCgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdxaW5ndGluZ19jaGFubmVscy50eHQnLDApIHx8ICdbXScpXFxuICAgICAgICAgICAgICAgIGlmIChpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzW2ldLmltZyA9IGlucHV0XFxuICAgICAgICAgICAgICAgIGVsc2VcXG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBydWxlc1tpXS5pbWdcXG4gICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ3Fpbmd0aW5nX2NoYW5uZWxzLnR4dCcsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSwwKVxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgIGNhc2UgJ+abtOaUueWQjeensCc6XFxuICAgICAgICAgICAgZC51cmwgPSAkKHYudGl0bGUgfHwgJycsICfovpPlhaXmlrDlkI3np7DvvJonKS5pbnB1dCgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdxaW5ndGluZ19jaGFubmVscy50eHQnLDApIHx8ICdbXScpXFxuICAgICAgICAgICAgICAgIGlmIChpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzW2ldLnRpdGxlID0gaW5wdXRcXG4gICAgICAgICAgICAgICAgZWxzZVxcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHJ1bGVzW2ldLnRpdGxlXFxuICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdxaW5ndGluZ19jaGFubmVscy50eHQnLCBKU09OLnN0cmluZ2lmeShydWxlcyksMClcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgIGJyZWFrXFxuICAgIH1cXG4gICAgZWwucHVzaChkKVxcbn0pXFxuXFxuc2V0UmVzdWx0KGVsKVwifV0iLCJpY29uIjoiaHR0cHM6Ly9waWMucXRmbS5jbi9xdC1tc2l0ZS9sb2dvLnBuZyIsInByb3h5IjoiIn0=
Add Comment
Please, Sign In to add comment