Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@野荷塘.D🐺@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi6YeO6I235aGYLkTwn5C6IiwiYXV0aG9yIjoi5a625aiDIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjaHR0cHM6Ly93d3cueWVoZXRhbmcuY2Mvc2hvdy8xLS0tLS0tLS1meXBhZ2UtLS0uaHRtbCIsInZlcnNpb24iOjIwMjIxMTI1LCJjb2xfdHlwZSI6Im1vdmllXzMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InZpZGVvIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG52YXIgZCA9IFtdO1xudmFyIGdldFJhbmdlQ29sb3JzID0gZnVuY3Rpb24oKSB7XG4gICAgcmV0dXJuICcjJyArICgnMDAwMDAnICsgKE1hdGgucmFuZG9tKCkgKiAweDEwMDAwMDAgPDwgMCkudG9TdHJpbmcoMTYpKS5zdWJzdHIoLTYpO1xufVxuXG5jb25zdCDliIbnsbvpopzoibIgPSBnZXRSYW5nZUNvbG9ycygpXG5jb25zdCDlpKfnsbvlrprkvY0gPSAnYm9keSYmLnh4eF90eXBlX2xpX2NvbnRhaW5lcidcbmNvbnN0IOaLvOaOpeWIhuexuyA9ICdib2R5JiYuZmlsdGVyLWxpc3QnXG5jb25zdCDlsI/nsbvlrprkvY0gPSAnYm9keSYmYTpub3QoOm1hdGNoZXMo6aaW6aG1fOS7iuaXpeabtOaWsHzlhpnnnJ98QVBQfOeDreamnCkpJ1xuY29uc3Qg5YiG57G75qCH6aKYID0gJ2EmJlRleHQnXG5jb25zdCDliIbnsbvpk77mjqUgPS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xcLmNzc3w0MDRcXC5tM3U4fFxcLmNzcy87XG4gICAgICAgIHZhciBjb250YWluID0gL1xcLm1wNHxcXC5tM3U4fFxcLmZsdnxcXC5hdml8XFwubXBlZ3xcXC53bXZ8XFwubW92fFxcLnJtdmJ8XFwuZGF0fHFxQkZkb3dubG9hZHxtaW1lPXZpZGVvJTJGfHZpZGVvX21wNC87XG4gICAgICAgIGlmICghZXhjbHVkZS50ZXN0KHBsYXlVcmwpICYmIGNvbnRhaW4udGVzdChwbGF5VXJsKSkge1xuICAgICAgICAgICAgcmV0dXJuIHRvVXJsKHBsYXlVcmwpO1xuICAgICAgICB9XG4gICAgICAgIHZhciBqeFVybCA9ICdodHRwczovL3BsYXllci42MDgwa2FuLmNjL3BsYXllci9wbGF5LnBocD91cmw9JyArIHBsYXlVcmw7XG4gICAgICAgIHZhciBqeEh0bWwgPSByZXF1ZXN0KGp4VXJsLCB7XG4gICAgICAgICAgICBoZWFkZXJzOiB7XG4gICAgICAgICAgICAgICAgXCJVc2VyLUFnZW50XCI6IFwiTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMClcIixcbiAgICAgICAgICAgICAgICBcIlJlZmVyZXJcIjogXCJodHRwczovL3d3dy55ZWhldGFuZy5jYy9cIlxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG1ldGhvZDogXCJHRVRcIlxuICAgICAgICB9KTtcbiAgICAgICAgZXZhbChqeEh0bWwubWF0Y2goL3ZhciBjb25maWcgPSB7W1xcc1xcU10qP30vKVswXSArIFwiXCIpO1xuICAgICAgICB2YXIgYXBpVXJsID0gJ2h0dHBzOi8vcGxheWVyLjYwODBrYW4uY2MvcGxheWVyL3hpbmFwaS5waHAnO1xuICAgICAgICB2YXIgYXBpSHRtbCA9IHJlcXVlc3QoYXBpVXJsLCB7XG4gICAgICAgICAgICBoZWFkZXJzOiB7XG4gICAgICAgICAgICAgICAgXCJVc2VyLUFnZW50XCI6IFwiTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMClcIlxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGJvZHk6IFwidXJsPVwiICsgY29uZmlnLnVybCArIFwiJnZrZXk9XCIgKyBjb25maWcudmtleSArIFwiJnRva2VuPVwiICsgY29uZmlnLnRva2VuICsgXCImc2lnbj1zbWR5eWNjXCIsXG4gICAgICAgICAgICBtZXRob2Q6IFwiUE9TVFwiXG4gICAgICAgIH0pO1xuICAgICAgICB2YXIganNvbiA9IEpTT04ucGFyc2UoYXBpSHRtbCk7XG4gICAgICAgIGlmIChqc29uLmNvZGUgPT0gMjAwKSB7XG4gICAgICAgICAgICByZXF1aXJlKFwiaHR0cHM6Ly9kaXNkay5vc3MtY24tc2hlbnpoZW4uYWxpeXVuY3MuY29tL3BsYXkvanMvZGVjb2RlLmpzXCIpO1xuICAgICAgICAgICAgcGxheVVybCA9IGdldFZpZGVvSW5mbyhqc29uLnVybCk7XG4gICAgICAgICAgICByZXR1cm4gdG9VcmwocGxheVVybCk7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8vJyArIGpzb24ubXNnO1xuICAgICAgICB9XG5cbiAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgIHNob3dMb2FkaW5nKFwi5q2j5Zyo6L+b6KGM5qOA57Si77yM6K+356iN5YCZLi4uXCIpO1xuICAgICAgICB2YXIgdmlkZW8gPSAneDVSdWxlOi8vJyArIGlucHV0ICsgJ0AnICsgJC50b1N0cmluZygoKSA9PiB7XG4gICAgICAgICAgICAvL2ZiYS5sb2coZmJhLmdldFVybHMoKSlcbiAgICAgICAgICAgIHZhciB1cmxzID0gX2dldFVybHMoKVxuICAgICAgICAgICAgdmFyIGV4Y2x1ZGUgPSAvcGxheW0zdTh8bTN1OFxcLnR2fG1pblxcLmNzc3w0MDRcXC5tM3U4fFxcLmNzcy87XG4gICAgICAgICAgICB2YXIgY29udGFpbiA9IC9cXC5tcDR8XFwubTN1OHxcXC5mbHZ8XFwuYXZpfFxcLm1wZWd8XFwud212fFxcLm1vdnxcXC5ybXZifFxcLmRhdHxxcUJGZG93bmxvYWR8bWltZT12aWRlbyUyRnx2aWRlb19tcDQvO1xuICAgICAgICAgICAgZm9yICh2YXIgaSBpbiB1cmxzKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFleGNsdWRlLnRlc3QodXJsc1tpXSkgJiYgY29udGFpbi50ZXN0KHVybHNbaV0pKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGZ5X2JyaWRnZV9hcHAubG9nKHVybHNbaV0pXG4gICAgICAgICAgICAgICAgICAgIGlmICgvbWd0dnxzb2h1Ly50ZXN0KHVybHNbaV0pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsc1tpXSArIFwiO3tVc2VyLUFnZW50QE1vemlsbGEvNS4wIChXaW5kb3dzIE5UIDEwLjApfVwiO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9iaWxpLy50ZXN0KHVybHNbaV0pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsc1tpXSArIFwiO3tVc2VyLUFnZW50QE1vemlsbGEvNS4wJiZSZWZlcmVyQGh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbX1cIjtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvaXhpZ3VhLy50ZXN0KHVybHNbaV0pKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsc1tpXSArIFwiI2lzVmlkZW89dHJ1ZSNcIiArIFwiIy5tcDQ7e1JlZmVyZXJAaHR0cHM6Ly93d3cuaXhpZ3VhLmNvbS8mJlVzZXItQWdlbnRATW96aWxsYS81LjB9XCI7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsc1tpXVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICA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Y29uZj09JzEnKXtwdXRWYXIoe2tleTonc2hzb3J0JywgdmFsdWU6JzAnfSk7fWVsc2V7cHV0VmFyKHtrZXk6J3Noc29ydCcsIHZhbHVlOicxJ30pfTtyZWZyZXNoUGFnZSgpOyd0b2FzdDovL+WIh+aNouaOkuW6j+aIkOWKnyc7JyNub0hpc3RvcnkjaGlrZXI6Ly9lbXB0eSdgLFxuICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXG4gICAgfSlcbiAgICB2YXIgbGlzdCA9IGxpc3RzW2luZGV4XTtcblxuICAgIGlmIChnZXRWYXIoJ3Noc29ydCcpID09ICcxJykge1xuICAgICAgICB0cnkge1xuICAgICAgICAgICAgZm9yICh2YXIgaiA9IGxpc3QubGVuZ3RoIC0gMTsgaiA+PSAwOyBqLS0pIHtcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICB0aXRsZTogcGFyc2VEb21Gb3JIdG1sKGxpc3Rbal0sICdhJiZUZXh0JykucmVwbGFjZSgv56ysfOmbhnzor5185pyfL2csICcnKSxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBwYXJzZURvbShsaXN0W2pdLCAnYSYmaHJlZicpICsgbGF6eSxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IGxpc3QubGVuZ3RoID4gNCA/ICd0ZXh0XzUnIDogJ3RleHRfMidcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+ayoeaciemAiembhuWTn++8jOS4jeS/oeeCueWbvueJh+WOu+eci+eci/CfkYAnLFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfSBlbHNlIHtcbiAgICAgICAgdHJ5IHtcbiAgICAg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MnKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld19jYXRlID0gW11cXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wLmZvckVhY2goKGNhdGUsIGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19jYXRlLnB1c2goaW5kZXggPT09IDAgPyBwYXJhbXMua2V5LnRvU3RyaW5nKCkgOiBcXFwiMFxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoTVlfUlVMRS50aXRsZSwgSlNPTi5zdHJpbmdpZnkobmV3X2NhdGUpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnVybCwgaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogcGFnZSxcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9IGVsc2UgaWYgKGZvbGQgPT09ICcxJykge1xcbiAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0ZW0sIOWIhuexu+agh+mimClcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBrZXkudG9TdHJpbmcoKSA9PT0gY2F0ZV90ZW1wW2luZGV4XSA/ICfigJzigJzigJ3igJ08Yj48c3BhbiBzdHlsZT1cXFwiY29sb3I6ICcgKyDliIbnsbvpopzoibIgKyAnXFxcIj4nICsgdGl0bGUgKyAnPC9zcGFuPjwvYj4nIDogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQocGQoaXRlbSwg5YiG57G76ZO+5o6lKSArICcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChwYXJhbXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoTVlfUlVMRS50aXRsZSwgSlNPTi5zdHJpbmdpZnkocGFyYW1zLmNhdGVfdGVtcCkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudXJsLCBpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogcGFnZSxcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgIH0pXFxufVxcblwifV0iLCJpY29uIjoiaHR0cHM6Ly93d3cueWVoZXRhbmcuY2MvZmF2aWNvbi5pY28iLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment