Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥当前未设置账号,点我设置@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcInRleHRfMVwiLFwibmFtZVwiOlwi6K6+572uXCIsXCJwYXRoXCI6XCJzZXR0aW5nc1wiLFwicnVsZVwiOlwianM6XFxuLyphZGRMaXN0ZW5lcignb25DbG9zZScsICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAvL3NhdmVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL3dlYmRhdi9pbmZvLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShbZ2V0SXRlbShcXFwiZGF2XFxcIiksIGdldEl0ZW0oXFxcInVzZXJuYW1lXFxcIiksIGdldEl0ZW0oXFxcInBhc3N3ZFxcXCIpXSkpXFxuICAgIC8vY2xlYXJNeVZhcihcXFwicGF0aFxcXCIpXFxuICAgIC8vcmVmcmVzaFBhZ2UoKVxcbn0pKSovXFxudmFyIGQgPSBbXTtcXG5kLnB1c2goe1xcbiAgICB0aXRsZTogXFxcIndlYmRhduWcsOWdgO+8mlxcXCIgKyBnZXRJdGVtKFxcXCJkYXZcXFwiLCBcXFwi6K+36L6T5YWlV2ViRGF25Zyw5Z2AXFxcIiksXFxuICAgIHVybDogJChnZXRJdGVtKFxcXCJkYX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yBwYXRocy5qb2luKFxcXCIvXFxcIikpXFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgIH0sIHBhdGhzKSxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwic2Nyb2xsX2J1dHRvblxcXCJcXG4gICAgfSwge1xcbiAgICAgICAgdGl0bGU6IFxcXCLwn4+gXFxcIixcXG4gICAgICAgIHVybDogJCgpLmxhenlSdWxlKCgpID0+IHtcXG4gICAgICAgICAgICBwdXRNeVZhcihcXFwicGF0aFxcXCIsIGdldEl0ZW0oXFxcImRhdlxcXCIpKVxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICB9KSxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwic2Nyb2xsX2J1dHRvblxcXCJcXG4gICAgfSlcXG4gICAgcGF0aHMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgIGlmIChpdGVtICE9IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgdGVtcCArPSBcXFwiL1xcXCIgKyBpdGVtXFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGRlY29kZVVSSUNvbXBvbmVudChpdGVtKSxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKHRlbXApID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJwYXRoXFxcIiwgZ2V0SXRlbShcXFwiZGF2XFxcIikgKyB0ZW1wKVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICB9LCB0ZW1wKSxcXG4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YWdlcy9ob21lX2ljb25faXRlbVxcXCIsXFxuICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwiZGVsZXRlXFxcIiwgZ2V0TXlWYXIoXFxcImRlbGV0ZVxcXCIsIFxcXCIwXFxcIikgPT0gXFxcIjBcXFwiID8gXFxcIjFcXFwiIDogXFxcIjBcXFwiKVxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfNFxcXCJcXG4gICAgICAgIH0pXFxuICAgICAgICBzb3JyLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgdmFyIG4gPSBnZXRNeVZhcihcXFwic29ydFxcXCIsIFxcXCLpu5jorqRcXFwiKVxcbiAgICAgICAgICAgIGlmIChuID09IGl0ZW0pIHtcXG4gICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gaXRlbSArIFxcXCLihpNcXFwiXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChuLmluY2x1ZGVzKFxcXCLlj41cXFwiKSAmJiBuLmluY2x1ZGVzKGl0ZW0pKSB7XFxuICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IGl0ZW0gKyBcXFwi4oaRXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IGl0ZW0gKyBcXFwi4oaVXFxcIlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiZmxleF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaXRlbSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGdldE15VmFyKFxcXCJzb3J0XFxcIiwgXFxcIum7mOiupFxcXCIpID09IGl0ZW0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwic29ydFxcXCIsIGl0ZW0gKyBcXFwi5Y+NXFxcIilcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcInNvcnRcXFwiLCBpdGVtKVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICB9LCBpdGVtKVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICB9XFxuICAgIGZpbGVzLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICBsZXQgZmlsZU5hbWUgPSBkZWNvZGVVUklDb21wb25lbnQoaXRlbS5uYW1lKVxcbiAgICAgICAgbGV0IGxlbiA9IDMwO1xcbiAgICAgICAgbGV0IGxlbjIgPSBsZW4gLyAyO1xcbiAgICAgICAgaWYgKGZpbGVOYW1lLmxlbmd0aCA+PSBsZW4pIHtcXG4gICAgICAgICAgICBmaWxlTmFtZSA9IGZpbGVOYW1lLnN1YnN0cigwLCBsZW4yKSArICcuLi4nICsgZmlsZU5hbWUuc3Vic3RyKGZpbGVOYW1lLmxlbmd0aCAtIGxlbjIpO1xcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IGljb24gPSBnZXRJY29uKGl0ZW0pXFxuICAgICAgICBpZiAoZ2V0TXlWYXIoXFxcImRlbGV0ZVxcXCIsIFxcXCIwXFxcIikgPT0gXFxcIjBcXFwiKSB7XFxuICAgICAgICAgICAgdmFyIHVybCA9ICQoKS5sYXp5UnVsZSgoaXRlbSwgZmlsZXMpID0+IHtcXG4gICAgICAgICAgICAgICAgY29uc3Qge1xcbiAgICAgICAgICAgICAgICAgICAgZmV0Y2hGaWxlLFxcbiAgICAgICAgICAgICAgICAgICAgZ2V0SHptLFxcbiAgICAgICAgICAgICAgICAgICAgZ2V0U3ViLFxcbiAgICAgICAgICAgICAgICAgICAgcmVtb3ZlRXh0LFxcbiAgICAgICAgICAgICAgICAgICAgZG93bmxvYWRcXG4gICAgICAgICAgICAgICAgfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2NvZGVcXFwiKVxcbiAgICAgICAgICAgICAgICBpZiAoaXRlbS5kaXIpIHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJwYXRoXFxcIiwgaXRlbS51cmwpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoJC5tb3ZpZS5pbmNsdWRlcyhnZXRIem0oaXRlbS5uYW1lKSkpIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChnZXRJdGVtKFxcXCJzdWJ0aXRsZVxcXCIsIFxcXCLlvIBcXFwiKSA9PSBcXFwi5byAXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzdWJ0aXRsZXMgPSBnZXRTdWIoZmlsZXMpXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWVzID0gW1xcXCLkuI3pnIDopoHlrZfluZVcXFwiXVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHN1YnRpdGxlcy5mb3JFYWNoKGRzID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZXMucHVzaChkcy50aXRsZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdWJ0aXRsZXMubGVuZ3RoICE9IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQobmFtZXMsIDEsIFxcXCLor7fpgInmi6nlrZfluZVcXFwiKS5zZWxlY3QoKG5hbWVzLCBzdWJ0aXRsZXMsIHVybCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXCLkuI3pnIDopoHlrZfluZVcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsczogW3VybF0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJBdXRob3JpemF0aW9uXFxcIjogXFxcIkJhc2ljIFxcXCIgKyBiYXNlNjRFbmNvZGUoZ2V0SXRlbShcXFwidXNlcm5hbWVcXFwiKSArIFxcXCI6XFxcIiArIGdldEl0ZW0oXFxcInBhc3N3ZFxcXCIpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsczogW3VybF0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1YnRpdGxlOiBzdWJ0aXRsZXNbbmFtZXMuaW5kZXhPZihpbnB1dCkgLSAxXS51cmwsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJBdXRob3JpemF0aW9uXFxcIjogXFxcIkJhc2ljIFxcXCIgKyBiYXNlNjRFbmNvZGUoZ2V0SXRlbShcXFwidXNlcm5hbWVcXFwiKSArIFxcXCI6XFxcIiArIGdldEl0ZW0oXFxcInBhc3N3ZFxcXCIpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgbmFtZXMsIHN1YnRpdGxlcywgaXRlbS51cmwpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGl0ZW0ucGxheVVybCArIFxcXCIjaXNWaWRlbz10cnVlI1xcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBpdGVtLnBsYXlVcmwgKyBcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZ2V0SHptKGl0ZW0ubmFtZSkgPT0gXFxcIm1kXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgcmVxdWlyZShcXFwiaHR0cHM6Ly9naXRsYWIuY29tL2hqZGhueC9oaWtlci8tL3Jhdy9tYWluL2pzL21hcmtlZC5taW4uanNcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL3BhZ2UvcHJldmlldz9jb250ZW50PVxcXCI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0ZW0pIHtcXFxcbiAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSBpdGVtICsgXFxcXFxcXCLihpNcXFxcXFxcIlxcXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChuLmluY2x1ZGVzKFxcXFxcXFwi5Y+NXFxcXFxcXCIpICYmIG4uaW5jbHVkZXMoaXRlbSkpIHtcXFxcbiAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSBpdGVtICsgXFxcXFxcXCLihpFcXFxcXFxcIlxcXFxuICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSBpdGVtICsgXFxcXFxcXCLihpVcXFxcXFxcIlxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiZmxleF9idXR0b25cXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoaXRlbSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAoZ2V0TXlWYXIoXFxcXFxcXCJzb3J0XFxcXFxcXCIsIFxcXFxcXFwi6buY6K6kXFxcXFxcXCIpID09IGl0ZW0pIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXFxcXFwic29ydFxcXFxcXFwiLCBpdGVtICsgXFxcXFxcXCLlj41cXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXFxcXFwic29ydFxcXFxcXFwiLCBpdGVtKVxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXF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ZGVcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICBpZiAoaXRlbS5kaXIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcXFxcXCJwYXRoXFxcXFxcXCIsIGl0ZW0udXJsKVxcXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoJC5tb3ZpZS5pbmNsdWRlcyhnZXRIem0oaXRlbS5uYW1lKSkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGdldEl0ZW0oXFxcXFxcXCJzdWJ0aXRsZVxcXFxcXFwiLCBcXFxcXFxcIuW8gFxcXFxcXFwiKSA9PSBcXFxcXFxcIuW8gFxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3VidGl0bGVzID0gZ2V0U3ViKGZpbGVzKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWVzID0gW1xcXFxcXFwi5LiN6ZyA6KaB5a2X5bmVXFxcXFxcXCJdXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBzdWJ0aXRsZXMuZm9yRWFjaChkcyA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZXMucHVzaChkcy50aXRsZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3VidGl0bGVzLmxlbmd0aCAhPSAwKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQobmFtZXMsIDEsIFxcXFxcXFwi6K+36YCJ5oup5a2X5bmVXFxcXFxcXCIpLnNlbGVjdCgobmFtZXMsIHN1YnRpdGxlcywgdXJsKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFxcXFxcIuS4jemcgOimgeWtl+W5lVxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybHM6IFt1cmxdLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJBdXRob3JpemF0aW9uXFxcXFxcXCI6IFxcXFxcXFwiQmFzaWMgXFxcXFxcXCIgKyBiYXNlNjRFbmNvZGUoZ2V0SXRlbShcXFxcXFxcInVzZXJuYW1lXFxcXFxcXCIpICsgXFxcXFxcXCI6XFxcXFxcXCIgKyBnZXRJdGVtKFxcXFxcXFwicGFzc3dkXFxcXFxcXCIpKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybHM6IFt1cmxdLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1YnRpdGxlOiBzdWJ0aXRsZXNbbmFtZXMuaW5kZXhPZihpbnB1dCkgLSAxXS51cmwsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIkF1dGhvcml6YXRpb25cXFxcXFxcIjogXFxcXFxcXCJCYXNpYyBcXFxcXFxcIiArIGJhc2U2NEVuY29kZShnZXRJdGVtKFxcXFxcXFwidXNlcm5hbWVcXFxcXFxcIikgKyBcXFxcXFxcIjpcXFxcXFxcIiArIGdldEl0ZW0oXFxcXFxcXCJwYXNzd2RcXFxcXFxcIikpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIG5hbWVzLCBzdWJ0aXRsZXMsIGl0ZW0udXJsKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXRlbS5wbGF5VXJsICsgXFxcXFxcXCIjaXNWaWRlbz10cnVlI1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXRlbS5wbGF5VXJsICsgXFxcXFxcXCIjaXNWaWRlbz10cnVlI1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGdldEh6bShpdGVtLm5hbWUpID09IFxcXFxcXFwibWRcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgICAgICAgICByZXF1aXJlKFxcXFxcXFwiaHR0cHM6Ly9naXRsYWIuY29tL2hqZGhueC9oaWtlci8tL3Jhdy9tYWluL2pzL21hcmtlZC5taW4uanNcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwi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dGl0bGU6IFxcXFxcXFwi6K6+572uXFxcXFxcXCIsXFxcXG4gICAgICAgIGNvbF90eXBlOiBcXFxcXFxcInRleHRfMVxcXFxcXFwiLFxcXFxuICAgICAgICB1cmw6IFxcXFxcXFwiaGlrZXI6Ly9wYWdlL3NldHRpbmdzXFxcXFxcXCJcXFxcbiAgICB9LCB7XFxcXG4gICAgICAgIHRpdGxlOiBcXFxcXFxcIuWHuumUmeS6hu+8jOeCueWHu+WIt+aWsFxcXFxcXFwiLFxcXFxuICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgocGF0aHMpID0+IHtcXFxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXFxcbiAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIlxcXFxuICAgICAgICB9LCBwYXRocyksXFxcXG4gICAgICAgIGNvbF90eXBlOiBcXFxcXFxcInRleHRfY2VudGVyXzFcXFxcXFxcIlxcXFxuICAgIH0pXFxcXG59XFxcXG5zZXRSZXN1bHQoZCk7XFxcIn0se1xcXCJjb2xfdHlwZVxcXCI6XFxcIm1vdmllXzNcXFwiLFxcXCJuYW1lXFxcIjpcXFwi6aKE6KeIXFxcIixcXFwicGF0aFxcXCI6XFxcInByZXZpZXdcXFwiLFxcXCJydWxlXFxcIjpcXFwianM6XFxcXG5sZXQgY29udGVudCA9IGJhc2U2NERlY29kZShnZXRQYXJhbShcXFxcXFxcImNvbnRlbnRcXFxcXFxcIikpXFxcXG5zZXRSZXN1bHQoW3tcXFxcbiAgICB0aXRsZTogY29udGVudCxcXFxcbiAgICBjb2xfdHlwZTogXFxcXFxcXCJsb25nX3RleHRcXFxcXFxcIlxcXFxufV0pXFxcIn1dXCIsXCJwcm94eVwiOlwiXCJ9IiwidGl0bGUiOiLlvZPliY3mnKrorr7nva7otKblj7fvvIzngrnmiJHorr7nva4ifQ==
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement