Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@AI搜片@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiQUnmkJzniYciLCJhdXRob3IiOiIiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IyMiLCJ2ZXJzaW9uIjo1NCwiY29sX3R5cGUiOiJtb3ZpZV8zIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJ0b29sIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6JC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvcHJvJykiLCJzZWFyY2hfdXJsIjoiaGlrZXI6Ly9lbXB0eSMjKioiLCJncm91cCI6IjPig6NBSSIsInNlYXJjaEZpbmQiOiJqczpcbnZhciBkID0gW107XG5sZXQga2V5ID0gTVlfVVJMLnNwbGl0KFwiIyNcIilbMV07XG5kLnB1c2goe1xuICAgIHRpdGxlOiBcIueCueaIkeW8gOWni+iBmuWQiOaQnOe0olwiICsga2V5LFxuICAgIHVybDogXCJoaWtlcjovL3BhZ2Uvc291cFwiLFxuICAgIGV4dHJhOiB7XG4gICAgICAgIHBhZ2VUaXRsZTogXCLmkJzntKJcIiArIGtleSxcbiAgICAgICAga2V5OiBrZXlcbiAgICB9XG59KTtcblxuc2V0UmVzdWx0KGQpOyIsImRldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJkZXRhaWxfZmluZF9ydWxlIjoiIiwic2RldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJzZGV0YWlsX2ZpbmRfcnVsZSI6IiIsInVhIjoibW9iaWxlIiwicHJlUnVsZSI6IiIsInBhZ2VzIjoiW3tcImNvbF90eXBlXCI6XC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gICAgXFxcIm5hbWVcXFwiOiBnZXRQYWdlVGl0bGUoKSxcXG4gICAgICAgICAgICAgICAgIFxcXCJ1cmxcXFwiOiBpdC5ocmVmXFxuICAgICAgICAgICAgfSkpO1xcbiAgICAgICAgICAgIHZhciBleHRyYXggPSB7XFxuICAgICAgICAgICAgICAgIGlkOiBpdC5ocmVmXFxuICAgICAgICAgICAgfTtcXG4gICAgICAgIH1cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IHQsXFxuICAgICAgICAgICAgdXJsOiB1cmx4LFxcbiAgICAgICAgICAgIHBoOiB0ICsgXFxcIiRcXFwiICsgaXQuaHJlZixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfM1xcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IGV4dHJheFxcbiAgICAgICAgfSk7XFxuICAgIH1cXG59XFxuaWYgKGQubGVuZ3RoID09IDApIHtcXG4gICAgLy/ljLnphY3lpLHotKVcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwiXFxcIixcXG4gICAgICAgIHVybDogdXJsLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJ4NV93ZWJ2aWV3X3NpbmdsZVxcXCIsXFxuICAgICAgICBkZXNjOiBcXFwiZmxvYXQmJjEwMCVcXFwiLFxcbiAgICAgICAgcGljX3VybDogXFxcIlxcXCIsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGNhbkJhY2s6IHRydWUsXFxuICAgICAgICAgICAgYmxvY2tSdWxlczogW1xcXCIuZ2lmXFxcIiwgXFxcIi9hZC9cXFwiLCBcXFwiZ29vZ2xlXFxcIiwgXFxcIi9zaC90by9cXFwiLCBcXFwiLkdJRlxcXCJdXFxuICAgICAgICB9XFxuICAgIH0pO1xcbiAgICB0b2FzdChcXFwiQUnljLnphY3lpLHotKXvvIzlt7Lkvb/nlKhYNeWKoOi9vVxcXCIpO1xcbiAgICBzZXRSZXN1bHQoZCk7XFxufSBlbHNlIHtcXG4gICAgLy/kuLrnur/ot6/liqDliIblibLnur9cXG4gICAgbGV0IGQyID0gW107XFxuICAgIGxldCBtdGFiID0gW107XFxuICAgIGQ9dW5pcXVlKGQpXFxuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgZDIucHVzaChkW2ldKTtcXG4gICAgICAgIG10YWIucHVzaChkW2ldLnBoKTtcXG4gICAgICAgIGlmIChpIDwgZC5sZW5ndGggLSAxKSB7XFxuICAgICAgICAgICAgbGV0IGl0ID0gZFtpXTtcXG4gICAgICAgICAgICBsZXQgdDEgPSBwYXJzZUludChjbGVhclRleHQoaXQudGl0bGUpKTtcXG4gICAgICAgICAgICBsZXQgbmV4dCA9IGRbaSArIDFdO1xcbiAgICAgICAgICAgIGxldCB0MiA9IHBhcnNlSW50KGNsZWFyVGV4dChuZXh0LnRpdGxlKSk7XFxuICAgICAgICAgICAgaWYgKHQyIC0gdDEgPiAxIHx8IHQxIC0gdDIgPiAxKSB7XFxuICAgICAgICAgICAgICAgIG10YWIucHVzaCgnIycpO1xcbiAgICAgICAgICAgICAgICBkMi5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmlnX2JsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgZDIucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImxpbmVfYmxhbmtcXFwiXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBkMi5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmlnX2JsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgIH1cXG4gICAgbGV0IHBsYXlsID0gbXRhYi5qb2lu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