Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥桃之夭夭@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuacn+WIiuWIhuacn+WIl+ihqFwiLFwicGF0aFwiOlwicWtcIixcInJ1bGVcIjpcImpzOlxcbmFkZExpc3RlbmVyKCdvbkNsb3NlJywgJ2NsZWFyVmFyKFxcXCJ5ZWFyXFxcIiknKTtcXG5cXG5sZXQgZCA9IFtdO1xcbmxldCB1cmwgPSBNWV9QQVJBTVMuaHJlZixcXG4gICAgbmFtZSA9IGdldFBhcmFtKCduYW1lJyksXFxuICAgIGltZyA9IGdldFBhcmFtKCdpbWcnKTtcXG5sZXQgY29sbGVjdGlvbiA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2NvbGxlY3Rpb24nKSB8fCAne30nKTtcXG5sZXQgaXNDb2xsZWN0ZWQgPSAhIShjb2xsZWN0aW9uW25hbWVdICYmIGNvbGxlY3Rpb25bbmFtZV0udXJsID09IHVybCk7XFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6IGlzQ29sbGVjdGVkID8gJ+KZpeW3suaUtuiXjycgOiAn4pmh5re75Yqg5pS26JePJyxcXG4gICAgdXJsOiAkKCkubGF6eVJ1bGUoKGlzLCB1cmwsIG5hb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gICAgcmV0dXJuICd0b2FzdDovL+W3suaUtui1tyAnICsgaXRlbTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcignaXRlbScsIGl0ZW0pO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWxleW8gCAnICsgaXRlbTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sIGl0ZW0pLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuXFxuICAgICAgICBpZiAobm93SXRlbSAmJiBub3dJdGVtID09IGl0ZW0pIHtcXG4gICAgICAgICAgICBkYXRhX2xpc3QuZGF0YV9saXN0Lm1sW25vd0l0ZW1dLmZvckVhY2goZSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBpbmRleCA9IHN0YXIuaW5kZXhPZihlLnRpdGxlKTtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn4oCc4oCc4oCd4oCdPHNtYWxsPicgKyBlLnRpdGxlICsgJzwvc21hbGw+JyxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6ICfigJzigJzigJ3igJ08c21hbGw+JyArIGUuaW50cm8gKyAnPC9zbWFsbD4nLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL3RleHQnICsgZnVsbFRoZW1lICsgJz90aXRsZT0nICsgZS50aXRsZSArICcmaW5kZXg9JyArIGluZGV4LFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICA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AgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgaHJlZjogaHJlZixcXG4gICAgICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2VcXG4gICAgICAgIH1cXG4gICAgfSlcXG59XFxuaWYgKGluZGV4ICE9IHN0YXIuaW5kZXgpIHtcXG4gICAgbGV0IHRpdGxlID0gc3RhcltpbmRleCArIDFdO1xcbiAgICBsZXQgaHJlZiA9IHN0cm9nZVt0aXRsZV07XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJ+S4i+S4gOevhzonICsgdGl0bGUsXFxuICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnLFxcbiAgICAgICAgdXJsOiAkKCdoaWtlcjovL2VtcHR5I25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaHJlZiwgdGl0bGUsIGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgcHV0VmFyKCd0ZXh0aHJlZicsIGhyZWYpO1xcbiAgICAgICAgICAgIHB1dFZhcigndGV4dHRpdGxlJywgdGl0bGUpO1xcbiAgICAgICAgICAgIHB1dFZhcigndGV4dGluZGV4JywgU3RyaW5nKGluZGV4ICsgMSkpO1xcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgfSwgaHJlZiwgdGl0bGUsIGluZGV4KSwgLy8gJ2hpa2VyOi8vcGFnZS90ZXh0JyArIGZ1bGxUaGVtZSArICc/dGl0bGU9JyArIHRpdGxlICsgJyZpbmRleD0nICsgKGluZGV4ICsgMSksXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGhyZWY6IGhyZWYsXFxuICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxuICAgICAgICB9XFxuICAgIH0pXFxufVxcbmZvciAobGV0IGkgPSAwOyBpIDwgMTA7IGkrKykge1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgY29sX3R5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ZTogJ3RleHRfMScsXFxcXG4gICAgICAgICAgICB1cmw6ICQoJ2hpa2VyOi8vZW1wdHkjbm9Mb2FkaW5kIycpLmxhenlSdWxlKChpdGVtKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgaWYgKGdldFZhcignaXRlbScsICcnKSA9PSBpdGVtKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGNsZWFyVmFyKCdpdGVtJyk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suaUtui1tyAnICsgaXRlbTtcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2l0ZW0nLCBpdGVtKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5bGV5byAICcgKyBpdGVtO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH0sIGl0ZW0pLFxcXFxuICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2VcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSlcXFxcblxcXFxuICAgICAgICBpZiAobm93SXRlbSAmJiBub3dJdGVtID09IGl0ZW0pIHtcXFxcbiAgICAgICAgICAgIGRhdGFfbGlzdC5kYXRhX2xpc3QubWxbbm93SXRlbV0uZm9yRWFjaChlID0+IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgaW5kZXggPSBzdGFyLmluZGV4T2YoZS50aXRsZSk7XFxcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ08c21hbGw+JyArI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IChsZXQgaSA9IDA7IGkgPCAxMDsgaSsrKSB7XFxcXG4gICAgZC5wdXNoKHtcXFxcbiAgICAgICAgY29sX3R5cGU6ICdibGFua19ibG9jaydcXFxcbiAgICB9KVxcXFxufVxcXFxuc2V0UmVzdWx0KGQpO1xcXCJ9XVwifSIsInRpdGxlIjoi5qGD5LmL5aSt5aStIn0=
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement