Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@期刊杂志demo@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi5pyf5YiK5p2C5b+XZGVtbyIsImF1dGhvciI6Ikpva2VyIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjZnlwYWdlIiwidmVyc2lvbiI6NiwiY29sX3R5cGUiOiJtb3ZpZV8zIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJyZWFkIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG5sZXQgZCA9IFtdO1xubGV0IG5vdyA9IGdldEl0ZW0oJ25vdycsICfmjqjojZDmnJ/liIonKTtcbmlmIChNWV9QQUdFID09IDEpIHtcbiAgICBsZXQgYXJyID0gWyfmjqjojZDmnJ/liIonLCAn54Ot6Zeo5pyf5YiKJywgJ+ebtOaSrScsICfmlLbol48nXTtcbiAgICBmb3IgKGxldCBpdCBvZiBhcnIpIHtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiBub3cgPT0gaXQgPyAn4oCc4oCc4oCd4oCdJyArIGl0LmZvbnRjb2xvcigncmVkJykgOiBpdCxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGl0KSA9PiB7XG4gICAgICAgICAgICAgICAgc2V0SXRlbShcIm5vd1wiLCBpdCk7XG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xuICAgICAg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1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGUpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgnc2VsZWN0X3piJywgZSk7XG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcbiAgICAgICAgICAgICAgICB9LCBvYmoudmFsdWUpLFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcInNjcm9sbF9idXR0b25cIlxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICAgICAgZm9yIChsZXQgaXQgb2Ygc291cmNlX2xpc3Rbc2VsZWN0X3piXS5saXN0KSB7XG4gICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgIHRpdGxlOiBpdC50aXRsZSxcbiAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgodGFnKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaChcImhpa2VyOi8vcGFnZS9nZXRIZWFkZXJzXCIpKS5ydWxlKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGxpc3QgPSBKU09OLnBhcnNlKHJlcXVlc3QoJ2h0dHA6Ly9hcGkubGlmdmVzLmNvbS92aWRlby9nZXRMaXZlU291cmNlTGluaz90YWc9JyArIHRhZywge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IGhlYWRlcnNcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKS5kYXRhX2xpc3QsXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmxzID0gbGlzdC5tYXAodiA9PiB2LmhyZWYpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgICAgICAgICAgdXJsczogdXJsc1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICA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naHR0cHM6Ly9hcGkubGlmdmVzLmNvbS9tYWdhemluZS9ib29rP21hZ19pZD0nICsgaXQubWFnX2lkICsgJyZxaXNodT0nICsgaXQucWlzaHUsXG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgIH1cbn0gZWxzZSBpZiAobm93ID09ICfmlLbol48nKSB7XG4gICAgaWYgKE1ZX1BBR0UgPT0gMSkge1xuICAgICAgICBsZXQgY29sbGVjdGlvbiA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2NvbGxlY3Rpb24nKSB8fCAne30nKTtcbiAgICAgICAgZm9yIChsZXQgaSBpbiBjb2xsZWN0aW9uKSB7XG4gICAgICAgICAgICBsZXQgaXQgPSBjb2xsZWN0aW9uW2ldO1xuICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICB0aXRsZTogaSxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzMnLFxuICAgICAgICAgICAgICAgIGltZzogaXQuaW1nLFxuICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS9oaXN0b3J5JyxcbiAgICAgICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgICAgICBocmVmOiBpdC51cmwsXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpLFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGl0LmltZ1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICB9XG59XG5zZXRSZXN1bHQoZCk7Iiwic2VhcmNoX3VybCI6Imhpa2VyOi8vZW1wdHkjIyoqIiwiZ3JvdXAiOiLwn42K6ZiF6K+7Iiwic2VhcmNoRmluZCI6ImpzOlxubGV0IGQgPSBbXTtcbmV2YWwoSlNPTi5wYXJzZShmZXRjaChcImhpa2VyOi8vcGFnZS9nZXRIZWFkZXJzXCIpKS5ydWxlKTtcbmxldCBxa19saXN0ID0gSlNPTi5wYXJzZShyZXF1ZXN0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