xiaomianao666

小程序:Mikan Project

Oct 26th, 2024
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@Mikan Project@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiTWlrYW4gUHJvamVjdCIsImF1dGhvciI6IkBMb3lEZ0lrIiwidXJsIjoiaHR0cHM6Ly9taWthbmltZS50di8iLCJ2ZXJzaW9uIjo2LCJjb2xfdHlwZSI6Im1vdmllXzEiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6Im90aGVyIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG5sZXQgaHRtbCA9IHBkZmgoZ2V0UmVzQ29kZSgpLCBcIiNzay1tb2JpbGUtY29udGFpbmVyJiZIdG1sXCIpO1xuXG5sZXQgTGlzdDEgPSBwZGZhKGh0bWwsIFwiLm0taG9tZS13ZWVrJiYubS1ob21lLXdlZWstaXRlbVwiKTtcblxuXG5sZXQgZCA9IFtdO1xuXG5kLnB1c2goe1xuICAgIGNvbF90eXBlOiBcImlucHV0XCIsXG4gICAgdXJsOiBcImlucHV0PWlucHV0LnRyaW0oKTtpZihpbnB1dCknaGlrZXI6Ly9wYWdlL3NlYXJjaCNub1JlZnJlc2gjP3NlYXJjaHN0cj0nK2VuY29kZVVSSUNvbXBvbmVudChpbnB1dCk7XCJcbn0pO1xubGV0IHdlZWsgPSBMaXN0MS5tYXAodiA9PiBwZGZoKHYsIFwiLm1vbmRheSYmVGV4dFwiKSk7XG53ZWVrLnVuc2hpZnQoXCLlhajpg6hcIik7XG5sZXQgc2VsZWN0V2VlayA9IE51bWJlcihnZXRNeVZhcihcInNlbGVjdFdlZWtcIiwgXCIxXC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3MDBcIikgKyAoaSA/IFwiXCIgOiBcIiAo5LuK5aSpKVwiKSxcbiAgICAgICAgY29sX3R5cGU6IFwicmljaF90ZXh0XCIsXG4gICAgfSk7XG4gICAgbGV0IHVsTGlzdCA9IHBkZmEoaXRlbSwgXCIuZGV0YWlsJiYubS13ZWVrLXNxdWFyZVwiKTtcbiAgICBmb3IgKGxldCBsaSBvZiB1bExpc3QpIHtcbiAgICAgICAgbGV0IHVybCA9IHBkKGxpLCBcImEmJmhyZWZcIik7XG4gICAgICAgIGxldCB0aXRsZSA9IHBkZmgobGksIFwiLnNtYWxsLXRpdGxlJiZUZXh0XCIpO1xuICAgICAgICBsZXQgcmVzID0ge1xuICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxuICAgICAgICAgICAgY29sX3R5cGU6IFwibW92aWVfM19tYXJxdWVlXCIsXG4gICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgIGR1cmw6IHVybCxcbiAgICAgICAgICAgICAgICBsb25nQ2xpY2s6IFt7XG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIuWcqOWKqOa8q+iKseWbreaQnOe0olwiLFxuICAgICAgICAgICAgICAgICAgICBqczogSlNPTi5zdHJpbmdpZnkoXCJoaWtlcjovL3BhZ2Uv5pCc57Si57uT5p6cI25vUmVjb3JkSGlzdG9yeSMjbm9IaXN0b3J5Iz9wYWdlPWZ5cGFnZSZydWxlPeWKqOa8q+iKseWbreWQjOatpeermSZrZXl3b3JkPVwiICsgZW5jb2RlVVJJQ29tcG9uZW50KHRpdGxlLnJlcGxhY2UoL+esrC4qP+Wtoy8sIFwiXCIpLnNsaWNlKDAsIDYpKSlcbiAgICAgICAgICAgICAgICB9XVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGlmICh1cmwgPT09IE1ZX1VSTCkge1xuICAgICAgICAgICAgcmVzLnVybCA9IFwidG9hc3Q6Ly/mnKrlvIDmkq1cIjtcbiAgICAgICAgICAgIHJlcy5k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AgICAgIHBpY191cmw6IFxcXCJodHRwczovL2hpa2VyZmFucy5jb20vdHViaWFvL21vdmllLzE0LnN2Z1xcXCJcXG4gICAgfSk7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICBjb2xfdHlwZTogXFxcImxpbmVcXFwiXFxuICAgIH0pO1xcbiAgICBmb3IgKGxldCBlcGlzb2RlIG9mIGFuaW1lLmVwaXNvZGVzKSB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBlcGlzb2RlLmVwaXNvZGVUaXRsZSxcXG4gICAgICAgICAgICB1cmw6ICQoZXBpc29kZS5lcGlzb2RlSWQpLmxhenlSdWxlKCh1cmwsIHRpdGxlKSA9PiB7XFxuICAgICAgICAgICAgICAgIGNvbnN0IGRhbm11ID0gJC5yZXF1aXJlKFxcXCJkYW5tdVxcXCIpO1xcbiAgICAgICAgICAgICAgICBsZXQgcGF0aCA9IGRhbm11LmdldExvY2FsRGFuTXUoaW5wdXQsIHRpdGxlKSB8fCBkYW5tdS5kb3dubG9hZERhbk11KGlucHV0LCB0aXRsZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiB1cmw7XFxuICAgICAgICAgICAgfSwgTVlfUEFSQU1TLmR1cmwsIGFuaW1lLmFuaW1lVGl0bGUrXFxcIl9cXFwiK2VwaXNvZGUuZXBpc29kZVRpdGxlKSxcXG5cXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMVxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLlvLrliLbkuIvovb1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKGVwaXNvZGVUaXRsZSxlcGlzb2RlSWQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzaG93TG9hZGluZyhcXFwi6K+3562J5b6FXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZGFubXUgPSAkLnJlcXVpcmUoXFxcImRhbm11XFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZGFubXUuZG93bmxvYWREYW5NdShlcGlzb2RlSWQsIGVwaXNvZGVUaXRsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaGlkZUxvYWRpbmcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6YeN5paw5LiL6L295a6M5oiQXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIH0sIGVwaXNvZGUuZXBpc29kZVRpdGxlLCBlcGlzb2RlLmVwaXNvZGVJZClcXG4gICAgICAgICAgICAgICAgfV1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgfVxcbiAgICBkLnB1c2goe1xcbiAgICAgICAgY29sX3R5cGU6IFxcXCJsaW5lX2JsYW5rXFxcIlxcbiAgICB9KTtcXG59XFxuc2V0UmVzdWx0KGQpO1wifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5by55bmV5bel5YW3XCIsXCJwYXRoXCI6XCJkYW5tdVwiLFwicnVsZVwiOlwianM6XFxubGV0IGJhc2ljVXJsID0gXFxcImh0dHBzOi8vYXBpLmRhbmRhbnBsYXkubmV0L1xcXCI7XFxubGV0IHNldmVQYXRoID0gXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvZGFubXUvXFxcIjtcXG4kLmV4cG9ydHMuZ2V0RGFuTXUgPSBmdW5jdGlvbihrZXkpIHtcXG4gICAgcmV0dXJuIEpTT04ucGFyc2UocmVxdWVzdChiYXNpY1VybCArIFxcXCJhcGkvdjIvc2VhcmNoL2VwaXNvZGVzP2FuaW1lPVxcXCIgKyBlbmNvZGVVUklDb21wb25lbnQoZGVjb2RlVVJJQ29tcG9uZW50KGtleSkpKSk7XFxufVxcblxcbmZ1bmN0aW9uIGVuY29kZ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4gICAgICAgIGxldCBwYXJhbVRleHQgPSBjb21tZW50LnA7XFxuICAgICAgICBsZXQgY29tbWVudFRleHQgPSBjb21tZW50Lm07XFxuICAgICAgICBpZiAocGFyYW1UZXh0ID09IG51bGwgfHwgY29tbWVudFRleHQgPT0gbnVsbCkgY29udGludWU7XFxuICAgICAgICBsZXQgcGFyYW1zID0gcGFyYW1UZXh0LnNwbGl0KFxcXCIsXFxcIik7XFxuICAgICAgICBsZXQgcGFyYW1zVCA9IFtdO1xcbiAgICAgICAgZm9yIChsZXQgaSBpbiBwYXJhbXMpIHtcXG4gICAgICAgICAgICBpZiAoaSA9PSAzKSB7XFxuICAgICAgICAgICAgICAgIC8v6aKc6Imy5YC85Li6MOaXtu+8jOm7mOiupOiuvue9ruS4uueZveiJslxcbiAgICAgICAgICAgICAgICBpZiAocGFyYW1zW2ldID09IFxcXCIwXFxcIiB8fCBwYXJhbXNbaV0gPT0gXFxcIi0xXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgcGFyYW1zVC5wdXNoKFxcXCIxNjc3NzIxNVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgY29udGludWVcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAoaSA9PSAyKSB7XFxuICAgICAgICAgICAgICAgIHBhcmFtc1QucHVzaChcXFwiMjVcXFwiKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcGFyYW1zVC5wdXNoKHBhcmFtc1tpXSk7XFxuXFxuICAgICAgICB9XFxuICAgICAgICBwYXJhbXNULnB1c2goXFxcIjBcXFwiLCBcXFwiMFxcXCIsIFxcXCIwXFxcIik7XFxuICAgICAgICBkTWNvbnRleHQgKz0gYDxkIHA9XFxcIiR7cGFyYW1zVC5qb2luKCcsJyl9XFxcIj4ke2VuY29kZUh0bWwoY29tbWVudFRleHQpfTwvZD5cXFxcbmA7XFxuICAgIH1cXG4gICAgaWYgKCFkTWNvbnRleH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