Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@雏鸟.dy@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi6ZuP6bifLmR5IiwiYXV0aG9yIjoiQExveURnSWsmZHkyMDIwIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjZnlBbGwjI2Z5cGFnZSYiLCJ2ZXJzaW9uIjoyMDIzMDMxOSwiY29sX3R5cGUiOiJtb3ZpZV8zIiwiY2xhc3NfbmFtZSI6IuacgOaWsCbpmo/mnLom5pyA54GrJuiHquaFsCboh6rmi40m5Y6f5YibJuWtpueUn+WmuSbokJ3ojokm6Zyy5Ye6JuWPo+a0uybliLbmnI0iLCJ0eXBlIjoidmlkZW8iLCJjbGFzc191cmwiOiJuZXcmcmVjb21tZW5kJnBlcmZlY3QmMSYyJjMmNCY1JjYmNyY4IiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG5ldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9zcz9ydWxlPScgKyBNWV9SVUxFLnRpdGxlKSkucnVsZSk7Iiwic2VhcmNoX3VybCI6Imhpa2VyOi8vZW1wdHkjIyoqIyNmeXBhZ2VzZWFyY2giLCJncm91cCI6IuKRoOiHqueUqCIsInNlYXJjaEZpbmQiOiJqczpcbmV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL3NzP3J1bGU9JyArIE1ZX1JVTEUudGl0bGUpKS5ydWxlKTsiLCJkZXRhaWxfY29sX3R5cGUiOiJtb3ZpZV8xIiwiZGV0YWlsX2ZpbmRfcnVsZSI6IiIsInNkZXRhaWxfY29sX3R5cGUiOiJpY29uXzFfc2VhcmNoIiw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ZXcnKSB7XFxuICAgICAgICAgICAgdmFyIGxpc3QgPSBhcGkucG9zdEFwaSgnc2VhcmNoL3ZpZGVvL2xpc3QnLCB7XFxuICAgICAgICAgICAgICAgICdwYWdlJzogTVlfUEFHRSArICcnLFxcbiAgICAgICAgICAgICAgICAncGFnZV9zaXplJzogJzEwJyxcXG4gICAgICAgICAgICAgICAgJ2lzX25ldyc6ICcxJyxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdmFyIGxpc3QgPSBhcGkucG9zdEFwaSgnc2VhcmNoL3ZpZGVvL2xpc3QnLCB7XFxuICAgICAgICAgICAgICAgICdwYWdlJzogTVlfUEFHRSArICcnLFxcbiAgICAgICAgICAgICAgICAncGFnZV9zaXplJzogJzEwJyxcXG4gICAgICAgICAgICAgICAgJ2lzX2ZyZWUnOiAnMScsXFxuICAgICAgICAgICAgICAgICdvcmRlckJ5JzogJ2hvdCcsXFxuICAgICAgICAgICAgICAgICdpc19uZXcnOiAnMCcsXFxuICAgICAgICAgICAgICAgICd0eXBlX2lkJzogdHlwZV9pZFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICB9IGVsc2UgaWYgKC91c2VyLy50ZXN0KE1ZX1VSTCkpIHtcXG4gICAgICAgIHZhciB1c2VyX2lkID0gTVlfVVJMLnNwbGl0KCcjIycpWzFdO1xcbiAgICAgICAgdmFyIGxpc3QgPSBhcGkucG9zdEFwaSgndmlkZW8vdXNlci9saXN0Jywge1xcbiAgICAgICAgICAgICd1c2VyX2lkJzogdXNlcl9pZCxcXG4gICAgICAgICAgICAncGFnZSc6IE1ZX1BBR0UgKyAnJyxcXG4gICAgICAgICAgICAncGFnZV9zaXplJzogJzEwJ1xcbiAgICAgICAgfSk7XFxuICAgIH0gZWxzZSBpZiAoL3NlYXJjaC8udGVzdChNWV9VUkwpKSB7XFxuICAgICAgICB2YXIgbGlzdCA9IGFwaS5wb3N0QXBpKCdzZW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XJsKTtcXG4gICAgfVxcbiAgICB2YXIgaHRtbHMgPSBiZihzKTtcXG4gICAgZm9yIChsZXQgayBpbiBodG1scykge1xcbiAgICAgICAgaWYgKC80MDQvLnRlc3QoaHRtbHNba10pKSB7XFxuICAgICAgICAgICAgdXJsc1trXSA9IHVybHNba10ucmVwbGFjZSgnLm0zdTgnLCAnc2hvcnQubTN1OCcpO1xcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIC8vXFxuICAgIGlmICgvJi8udGVzdChNWV9VUkwpKSB7XFxuICAgICAgICBmb3IgKHZhciBrID0gMDsgayA8IGxpc3QubGVuZ3RoOyBrID0gayArIDIpIHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogbGlzdFtrXS50aXRsZSxcXG4gICAgICAgICAgICAgICAgdXJsOiB1cmxzW2tdLFxcbiAgICAgICAgICAgICAgICBpbWc6IGltYWdlLmltYWdlRGVjcnlwdChsaXN0W2tdLmNvdmVyKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdwaWNfMl9jYXJkJyxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIGNsczogJ3BsYXlsaXN0I3IxJ1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgaWYgKGsgKyAxIDwgbGlzdC5sZW5ndGgpIHtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0W2sgKyAxXS50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogdXJsc1trICsgMV0sXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGltYWdlLmltYWdlRGVjcnlwdChsaXN0W2sgKyAxXS5jb3ZlciksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3BpY18yX2NhcmQnLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6ICdwbGF5bGlzdCNyMSdcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn5omA5pyJ6KeG6aKRJyxcXG4gICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL3NzJyxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzInLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9lbXB0eSMjJyArIChsaXN0W2tdLnVpZCB8fCBsaXN0W2tdLmNvZGUpICsgJyMjZnlwYWdldXNlcidcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGlmIChrICsgMSA8IGxpc3QubGVuZ3RoKSB7XFxuICAgICAgICAgICAgICAgIHtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfmiYDmnInop4bpopEnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS9zcycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzInLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vZW1wdHkjIycgKyAobGlzdFtrICsgMV0udWlkIHx8IGxpc3RbayArIDFdLmNvZGUpICsgJyMjZnlwYWdldXNlcidcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfSBlbHNlIHtcXG4gICAgICAgIGxpc3QuZm9yRWFjaCgoaXQsaykgPT4ge1xcbiAgICAgICAgICAgIGlmIChpdC5hZCAmJiBpdC5hZC5wbGF5KSByZXR1cm47XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGl0LnRpdGxlLFxcbiAgICAgICAgICAgICAgICB1cmw6IHVybHNba10sXFxuICAgICAgICAgICAgICAgIGltZzogaW1hZ2UuaW1hZ2VEZWNyeXB0KGl0LmNvdmVyKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdwaWNfMl9jYXJkJyxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0pO1xcbiAgICB9XFxuICAgIGlmIChsaXN0Lmxlbmd0aCA9PT0gMCkge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnScgKyAnPHNtYWxsPuayoeacieS6huWTpjwvc21hbGw+Jy5mb250Y29sb3IoJ2dyYXknKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnLFxcbiAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICB9KTtcXG4gICAgfVxcbn1cXG5zZXRSZXN1bHQoZCk7XCJ9XSIsImljb24iOiJodHRwczovL2ltZzEuaW1ndHAuY29tLzIwMjMvMDIvMTgvekhxSmw3SEwucG5nIiwicHJveHkiOiIifQ==
Add Comment
Please, Sign In to add comment