Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@用心直播@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi55So5b+D55u05pKtIiwiYXV0aG9yIjoi5bCP5qOJ6KKE8J+MniZKb2tlcibniLHmmK/nlKjlv4MiLCJ1cmwiOiJoaWtlcjovL2VtcHR5I2Z5QWxsIiwidmVyc2lvbiI6MCwiY29sX3R5cGUiOiJ0ZXh0XzMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6ImxpdmUiLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbmxldCBkYXRhID0gW10sXG4gICAgY29uZmlnUGF0aCA9IFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXCI7XG5pZiAoIWZpbGVFeGlzdChjb25maWdQYXRoKSkge1xuICAgIHdyaXRlRmlsZShjb25maWdQYXRoLCBcIlwiKTtcbn1cbmxldCBjb25maWcgPSBmZXRjaChjb25maWdQYXRoKSxcbiAgICByZW5kZXJTZXR0aW5nID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvcmVuZGVyU2V0dGluZycpLnJlbmRlclNldHRpbmc7XG5cbmV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1wiKSkucnVsZSk7XG5VUkwgPSBcImhpa2VyOi8vZW1wdHlcIiArIGdldFZhcignc2V0Jyk7XG5pZiAoY29uZmlnID09IFwiXCIgfHwgVVJMLmluZGV4T2YoJ3NldHRpbmcnKSA+IDApIHtcbiAgICBkYXRhID0gcmVuZGVyU2V0dGluZygpO1xufSBlbHNlIHtcbiAgICBjb25maWcg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l0bGU6IHNvdXJjZS5uYW1lID09IHNlbGVjdCA/IFwi4oCc4oCc4oCd4oCdPHNwYW4gc3R5bGU9J2NvbG9yOiAjMTlCODlEJz5cIiArIHNlbGVjdCArIFwiPC9zcGFuPlwiIDogc291cmNlLm5hbWUsXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFwic2Nyb2xsX2J1dHRvblwiLFxuICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoYSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoXCJsaXZlLXNlbGVjdFwiLCBhKTtcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NlbGVjdEdyb3VwJywgJycpO1xuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJoaWtlcjovL2VtcHR5XCJcbiAgICAgICAgICAgICAgICB9LCBzb3VyY2UubmFtZSlcbiAgICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgICAgZGF0YS5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiBcIuiuvue9rlwiLFxuICAgICAgICAgICAgY29sX3R5cGU6IFwic2Nyb2xsX2J1dHRvblwiLFxuICAgICAgICAgICAgdXJsOiAkKFwiXCIpLmxhenlSdWxlKCgpID0+IHtcbiAgICAgICAgICAgICAgICBwdXRWYXIoXCJzZXRcIiwgJyNzZXR0aW5nJyk7XG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xuICAgICAgICAgICAgICAgIHJldHVybiBcImhpa2VyOi8vZW1wdHlcIlxuICAgICAgICAgICAgfSlcbiAgICAgICAgfSlcbiAgICAgICAgZGF0YS5wdXNoKHtcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcbiAgICAgICAgfSlcbiAgICAgICAgZm9yIChzb3VyY2Ugb2YgY29uZmlnLmRhdGEpIHtcbiAgICAgICAgICAgIGlmIChzb3VyY2UubmFtZSA9PSBzZWxlY3QpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgaXRlbXMgPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9yZW5kZXJEYXRhJykucmVuZGVyTGl2ZURhdGEoc291cmNlLnVybCk7XG4gICAgICAgICAgICAgICAgICAgIGxldCBncm91cHMgPSBPYmplY3Qua2V5cyhpdGVtcyk7XG4gICAgICAgICAgICAgICAgICAgIGdyb3Vwcy5wdXNoKGdyb3Vwcy5zcGxpY2UoZ3JvdXBzLmluZGV4T2YoMCksIDEpWzBdKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGVjdEdyb3VwID0gZ2V0TXlWYXIoJ3NlbGVjdEdyb3VwJywgZ3JvdXBzWzBdKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNlbGVjdEdyb3VwID09IFwiXCIpIHNlbGVjdEdyb3VwID0gZ3JvdXBzWzBdO1xuICAgICAgICAgICAgICAgICAgICBncm91cHMuZm9yRWFjaCgoZ3JvdXApID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChncm91cCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBncm91cCA9PSBzZWxlY3RHcm91cCA/IFwi4oCc4oCc4oCd4oCdPHNwYW4gc3R5bGU9J2NvbG9yOiAjMTlCODlEJz5cIiArIGdyb3VwICsgXCI8L3NwYW4+XCIgOiBncm91cCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChncm91cCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NlbGVjdEdyb3VwJywgZ3JvdXApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgZ3JvdXApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2ZsZXhfYnV0dG9uJyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgdGl0bGUgaW4gaXRlbXNbc2VsZWN0R3JvdXBdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsczogaXRlbXNbc2VsZWN0R3JvdXBdW3RpdGxlXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxuY29sX3R5cGU6ICdpY29uXzJfcm91bmQnLFxuICAgICAgICAgICAgICAgICAgICBpbWc6IFwiaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vcmUvMjI4LnBuZ1wiXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICBkYXRhLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFwi5pWw5o2u5Yqg6L295aSx6LSlXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBKU09OLnN0cmluZ2lmeShlKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcInRleHRfMVwiXG4gICAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufVxuc2V0UmVzdWx0KGRhdGEpOyIsInNlYXJjaF91cmwiOiJoaWtlcjovL2VtcHR5P2tleT0qKiIsImdyb3VwIjoi55S16KeG55u05pKtIiwic2VhcmNoRmluZCI6ImpzOlxuZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL3BhZ2UvY29uZmlnXCIpKS5ydWxlKTtcbmxldCBjb25maWcgPSBnZXRDb25maWcoKTtcbmxldCBydWxlcyA9IGNvbmZpZy5kYXRhLm1hcCgoc291cmNlKSA9PiB7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgdGl0bGU6IHNvdXJjZS5uYW1lLFxuICAgICAgICBzZWFyY2hfdXJsOiAnaGlrZXI6Ly9lbXB0eT9rZXk9KionLFxuICAgICAgICBzZWFyY2hGaW5kOiAnanM6JyArICQudG9TdHJpbmcoKHVybCwgcnVsZV90aXRsZSkgPT4ge1xuICAgICAgICAgICAgbGV0IGQgPSBbXSxcbiAgICAgICAgICAgICAgICBrZXkgPSBnZXRQYXJhbSgna2V5Jyk7XG4gICAgICAgICAgICBsZXQgaXRlbXMgPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9yZW5kZXJEYXRhP3J1bGU9JyArIHJ1bGVfdGl0bGUpLnJlbmRlckxpdmVEYXRhKHVybCk7XG4gICAgICAgICAgICBmb3IgKGxldCBncm91cCBpbiBpdGVtcykge1xuICAgICAgICAgICAgICAgIGZvciAobGV0IHRpdGxlIGluIGl0ZW1zW2dyb3VwXSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodGl0bGUuaW5kZXhPZihrZXkpID49IDAgfHwgdGl0bGUudG9Mb3dlckNhc2UoKS5pbmRleE9mKGtleSkgPj0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybHM6IGl0ZW1zW2dyb3VwXVt0aXRsZV1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHNldFJlc3VsdChkKTtcbiAgICAgICAgfSwgc291cmNlLnVybCwgZ2V0TXlWYXIoJ3RpdGxlJykpXG4gICAgfTtcbn0pXG5zZXRSZXN1bHQoW3tcbiAgICB0aXRsZTogXCLngrnmiJHlvIDlp4vogZrmkJxcIixcbiAgICB1cmw6IFwiaGlrZXI6Ly9zZWFyY2g/cz1cIiArIGdldFBhcmFtKFwia2V5XCIpLFxuICAgIGV4dHJhOiB7XG4gICAgICAgIHJ1bGVzOiAkLnRvU3RyaW5nKChydWxlcykgPT4ge1xuICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHJ1bGVzKVxuICAgICAgICB9LCBydWxlcylcbiAgICB9XG59XSkiLCJkZXRhaWxfY29sX3R5cGUiOiJtb3ZpZV8xIiwiZGV0YWlsX2ZpbmRfcnVsZSI6IiIsInNkZXRhaWxfY29sX3R5cGUiOiJtb3ZpZV8xIiwic2RldGFpbF9maW5kX3J1bGUiOiIiLCJ1YSI6Im1vYmls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cbiAgICAgICAgICAgIGoubGVuZ3RoID09IDMgJiYgalsyXS5pbmRleE9mKFxcXCJodHRwXFxcIikgPT0gMCkge1xcbiAgICAgICAgICAgIHIudGl0bGUgPSBqWzFdLnNwbGl0KCcvJylbalswXS5zcGxpdCgnLycpLmxlbmd0aCAtIDFdO1xcbiAgICAgICAgICAgIHIudXJsID0galsyXS5yZXBsYWNlKGBcXFxcbmAsICcnKS5yZXBsYWNlKCdcXFxccicsICcnKTtcXG4gICAgICAgICAgICBpZiAoci51cmwuaW5kZXhPZihcXFwiaHR0cFxcXCIpID09IDApIHtcXG4gICAgICAgICAgICAgICAgci51cmwgPSByLnVybCArIFxcXCIjaXNWaWRlbz10cnVlI1xcXCI7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGQxLnB1c2gocik7XFxuICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBpZiAoai5sZW5ndGggPCAyKSB7XFxuICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICB9XFxuICAgICAgICByLnRpdGxlID0galswXS5zcGxpdCgnLycpW2pbMF0uc3BsaXQoJy8nKS5sZW5ndGggLSAxXTtcXG4gICAgICAgIHIudXJsID0galsxXS5yZXBsYWNlKGBcXFxcbmAsICcnKS5yZXBsYWNlKCdcXFxccicsICcnKTtcXG4gICAgICAgIGlmIChyLnVybC5pbmRleE9mKFxcXCJodHRwXFxcIikgPT0gMCkge1xcbiAgICAgICAgICAgIHIudXJsID0gci51cmwgKyBcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiO1xcbiAgICAgICAgfVxcbiAgICAgICAgZDEucHVzaChyKTtcXG4gICAgfVxcbiAgICAvL+Wkmue6v+i3r1xcbiAgICBjb25zdCBkMiA9IHt9XFxuICAgIGZvciAobGV0IGl0IG9mIGQxKSB7XFxuICAgICAgICBpZiAoZDJbaXQudGl0bGVdID09IG51bGwpIHtcXG4gICAgICAgICAgICBkMltpdC50aXRsZV0gPSBbXVxcb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B1dFxcXCIsXFxuICAgICAgICBkZXNjOiBcXFwi6K+36L6T5YWl55u05pKt5rqQ6K6i6ZiF5Zyw5Z2AXFxcIixcXG4gICAgICAgIHVybDogJC50b1N0cmluZygocnVsZSkgPT4ge1xcbiAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5LiN6IO95Li656m6XFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQuaW5kZXhPZihcXFwiaHR0cFxcXCIpICE9IDAgJiYgaW5wdXQuaW5kZXhPZihcXFwiZmlsZVxcXCIpICE9IDAgJiYgaW5wdXQuaW5kZXhPZihcXFwiaGlrZXJcXFwiKSAhPSAwKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/pk77mjqXmoLzlvI/mnInor69cXFwiXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJpbnB1dDovLy8vLy/or7fovpPlhaXorqLpmIXmoIfpopguanM6XFxcIiArICQudG9TdHJpbmcoKHVybCwgcnVsZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWc/cnVsZT1cXFwiICsgcnVsZSkpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGEucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogaW5wdXQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB1cmxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmU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6IFxcXCJjb25maXJtOi8v56Gu6K6k5Yig6Zmk5q2k6K6i6ZiF77yfLmpzOlxcXCIgKyAkLnRvU3RyaW5nKChuYW1lKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBjb25maWcgPSBmZXRjaChcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9saXZlL2NvbmZpZy5qc29uXFxcIik7XFxuICAgICAgICAgICAgICAgIGlmIChjb25maWcgPT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiBbXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB2ZXJzaW9uOiAwXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBKU09OLnBhcnNlKGNvbmZpZylcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBjb25maWcuZGF0YSA9IGNvbmZpZy5kYXRhLmZpbHRlcihpID0+IGkubmFtZSAhPSBuYW1lKTtcXG5cXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2xpdmUvY29uZmlnLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDrlt7LliKDpmaRcXFwiO1xcbiAgICAgICAgICAgIH0sIHNvdXJjZS5uYW1lKVxcbiAgICAgICAgfSlcXG4gICAgfVxcbiAgICByZXR1cm4gZFxcbn1cXG5cXG4kLmV4cG9ydHMgPSB7XFxuICAgIHJlbmRlclNldHRpbmc6IHJlbmRlclNldHRpbmdcXG59XCJ9XSIsImljb24iOiJodHRwOi8vcTEucWxvZ28uY24vZz9iPXFxJm5rPTEzMDI0MDcyMTYmcz02NDAiLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment