Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥聚云盘@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcInRleHRfMVwiLFwibmFtZVwiOlwi5Li76aG1XCIsXCJwYXRoXCI6XCJob21lXCIsXCJydWxlXCI6XCJqczpcXG5hZGRMaXN0ZW5lcignb25DbG9zZScsICgpID0+IHtcXG4gICAgY2xlYXJNeVZhcihcXFwicGF0aHNcXFwiKVxcbn0pXFxudmFyIGQgPSBbXTtcXG5pZiAoIWZpbGVFeGlzdChcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9Kb2UvYWxpLmpzb25cXFwiKSkge1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IFxcXCLnmbvpmYbku6XlvIDlkK9cXFwiLFxcbiAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL2xvZ2luXFxcIixcXG4gICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCJcXG4gICAgfSlcXG59IGVsc2Uge1xcbiAgICBmdW5jdGlvbiBmb3JtYXREYXRlKHRpbWUpIHtcXG4gICAgICAgIHZhciBkYXRlID0gbmV3IERhdGUodGltZSk7XFxuICAgICAgICB2YXIgWVkgPSBkYXRlLmdldEZ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ge1xcbiAgICAgICAgICAgIGRlbGV0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvSm9lL2FsaS5qc29uXFxcIilcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICB9KSxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIlxcbiAgICB9LCB7XFxuICAgICAgICBkZXNjOiBcXFwi5pCc57Si5oiR55qE5paH5Lu25oiW6L6T5YWl5YiG5Lqr6ZO+5o6lXFxcIixcXG4gICAgICAgIGNvbF90eXBlOiBcXFwiaW5wdXRcXFwiLFxcbiAgICAgICAgdXJsOiBcXFwiJ2hpa2VyOi8vcGFnZS9zZWFyY2g/a3c9JytpbnB1dFxcXCIsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2UsXFxuICAgICAgICAgICAgb25DaGFuZ2U6IFxcXCJwdXRNeVZhcigna3cnLGlucHV0KVxcXCJcXG4gICAgICAgIH1cXG4gICAgfSlcXG4gICAgdmFyIHBhdGhzID0gc3RvcmFnZTAuZ2V0TXlWYXIoXFxcInBhdGhzXFxcIiwgW3tcXG4gICAgICAgIG5hbWU6IFxcXCLmoLnnm67lvZVcXFwiLFxcbiAgICAgICAgaWQ6IFxcXCJyb290XFxcIlxcbiAgICB9XSlcXG4gICAgaWYgKHBhdGhzLmxlbmd0aCA+IDEpIHtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCI8XFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChwYXRocykgPT4ge1xcbiAgICAgICAgICAgICAgICBwYXRocy5wb3AoKVxcbiAgICAgICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcihcXFwicGF0aHNcXFwiLCBwYXRocylcXG4gICAgICAgICAgICAgIC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gICAgICAgICAgICAgICAgbmFtZTogbmFtZSxcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBpZFxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcihcXFwicGF0aHNcXFwiLCBwYXRocylcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgfSwgcGF0aHMsIGl0ZW0ubmFtZSwgaXRlbS5maWxlX2lkKSA6ICQoKS5sYXp5UnVsZSgoaWQsIG5hbWUpID0+IHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmNodWxpKGlkLCBuYW1lKVxcbiAgICAgICAgICAgIH0sIGl0ZW0uZmlsZV9pZCwgaXRlbS5uYW1lKSksXFxuICAgICAgICAgICAgZGVzYzogZm9ybWF0RGF0ZShEYXRlLnBhcnNlKGl0ZW0udXBkYXRlZF9hdCkpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBnZXRJdGVtKFxcXCJzdHlsZVxcXCIsIFxcXCJtb3ZpZV8zXFxcIiksXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IGkgKyBcXFwiXFxcIlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgIH0pXFxufVxcbnNldFJlc3VsdChkKTtcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIueZu+mZhlwiLFwicGF0aFwiOlwibG9naW5cIixcInJ1bGVcIjpcImpzOlxcbnZhciBkID0gW107XFxubGV0IHVybCA9ICdodHRwczovL2F1dGguYWxpeXVuZHJpdmUuY29tL3YyL29hdXRoL2F1dGhvcml6ZT9sb2dpbl90eXBlPWN1c3RvbSZyZXNwb25zZV90eXB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S7XFxcIl1cXG4gICAgICAgIGxldCB1cmwgPSBwb3N0KGR1cmwsIHtcXG4gICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgIFxcXCJhdXRob3JpemF0aW9uXFxcIjogY29uZmlnLmFjY2Vzc190b2tlblxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICBcXFwiZXhwaXJlX3NlY1xcXCI6IDExNTIwMCxcXG4gICAgICAgICAgICAgICAgXFxcImZpbGVfaWRcXFwiOiBpZCxcXG4gICAgICAgICAgICAgICAgXFxcImRyaXZlX2lkXFxcIjogZGlkXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pXFxuICAgICAgICB1cmxzLnB1c2goSlNPTi5wYXJzZSh1cmwpLnVybCArIFxcXCIjaXNWaWRlbz10cnVlI1xcXCIpXFxuICAgICAgICBsZXQgcHUgPSBwb3N0KHB1cmwsIHtcXG4gICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgIFxcXCJhdXRob3JpemF0aW9uXFxcIjogY29uZmlnLmFjY2Vzc190b2tlblxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICBcXFwiZHJpdmVfaWRcXFwiOiBkaWQsXFxuICAgICAgICAgICAgICAgIFxcXCJjYXRlZ29yeVxcXCI6IFxcXCJsaXZlX3RyYW5zY29kaW5nXFxcIixcXG4gICAgICAgICAgICAgICAgXFxcImZpbGVfaWRcXFwiOiBpZCxcXG4gICAgICAgICAgICAgICAgXFxcInRlbXBsYXRlX2lkXFxcIjogXFxcIlxcXCJcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSlcXG4gICAgICAgIEpTT04ucGFyc2UocHUpLnZpZGVvX3ByZXZpZXdfcGxheV9pbmZvLmxpdmVfdHJhbnNjb2RpbmdfdGFza19saXN0LmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgdXJscy5wdXNoKGl0ZW0udXJsICsgXFxcIiNpc1ZpZGVvPXRydWUjXFxcIilcXG4gICAgICAgICAgICBuYW1lcy5wdXNoKGl0ZW0udGVtcGxhdGVfaWQpXFxuICAgICAgICB9KVxcbiAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICB1cmxzOiB1cmxzLFxcbiAgICAgICAgICAgIG5hbWVzOiBuYW1lcyxcXG4gICAgICAgICAgICBoZWFkZXJzOiBbe1xcbiAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3d3dy5hbGl5dW5kcml2ZS5jb20vXFxcIlxcbiAgICAgICAgICAgIH1dXFxuICAgICAgICB9KVxcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgbGV0IGR1cmwgPSBcXFwiaHR0cHM6Ly9hcGkuYWxpeXVuZHJpdmUuY29tL3YyL2ZpbGUvZ2V0X2Rvd25sb2FkX3VybFxcXCJcXG4gICAgICAgIGxldCB1cmwgPSBwb3N0KGR1cmwsIHtcXG4gICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgIFxcXCJhdXRob3JpemF0aW9uXFxcIjogY29uZmlnLmFjY2Vzc190b2tlblxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICBcXFwiZXhwaXJlX3NlY1xcXCI6IDExNTIwMCxcXG4gICAgICAgICAgICAgICAgXFxcImZpbGVfaWRcXFwiOiBpZCxcXG4gICAgICAgICAgICAgICAgXFxcImRyaXZlX2lkXFxcIjogZGlkXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pXFxuICAgICAgICByZXR1cm4gSlNPTi5wYXJzZSh1cmwpLnVybFxcbiAgICB9XFxufVxcbiQuZXhwb3J0cy5nZXRJY29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kKCkubGF6eVJ1bGUoKHNoYXJlX2lkLCBwYXRocykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcGF0aHMucG9wKClcXG4gICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKHNoYXJlX2lkICsgXFxcInBhdGhzXFxcIiwgcGF0aHMpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgIH0sIHNoYXJlX2lkLCBwYXRocylcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfVxcbiAgICAgICAgcGF0aHMuZm9yRWFjaCgoaXRlbSwgaW5kZXgpID0+IHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5uYW1lLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoc2hhcmVfaWQsIGl0ZW0sIHBhdGhzLCBpbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcImlkXFxcIiwgaXRlbS5pZClcXG4gICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKHNoYXJlX2lkICsgXFxcInBhdGhzXFxcIiwgcGF0aHMuc2xpY2UoMCwgaW5kZXggKyAxKSlcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgfSwgc2hhcmVfaWQsIGl0ZW0sIHBhdGhzLCBpbmRleClcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSlcXG4gICAgICAgIGQudW5zaGlmdCh7XFxuIC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ICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi5o6S5bqP77yaXFxcIiArIChnZXRNeVZhcihcXFwib3JkZXJcXFwiLCBcXFwibmFtZVxcXCIpID09IFxcXCJuYW1lXFxcIiA/IFxcXCLlkI3np7BcXFwiIDogXFxcIuaXtumXtFxcXCIpLFxcbiAgICAgICAgICAgIHVybDogJChcXFwiI25vUmVjb3JkSGlzdG9yeSMjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgdmFyIG8gPSBnZXRNeVZhcihcXFwib3JkZXJcXFwiLCBcXFwibmFtZVxcXCIpXFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJvcmRlclxcXCIsIChvID09IFxcXCJuYW1lXFxcIiA/IFxcXCJ1cGRhdGVkX2F0XFxcIiA6IFxcXCJuYW1lXFxcIikpXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+WIh+aNouaIkOWKn1xcXCJcXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMlxcXCJcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgfSkgICAgICAgIFxcbiAgICAgICAgbC5mb3JFYWNoKChpdGVtLCBpKSA9PiB7XFxuICAgICAgICAgICAgbGV0IGZpbGVOYW1lID0gaXRlbS5uYW1lXFxuICAgICAgICAgICAgbGV0IGxlbiA9IDQwO1xcbiAgICAgICAgICAgIGxldCBsZW4yID0gbGVuIC8gMjtcXG4gICAgICAgICAgICBpZiAoZmlsZU5hbWUubGVuZ3RoID49IGxlbikge1xcbiAgICAgICAgICAgICAgICBmaWxlTmFtZSA9IGZpbGVOYW1lLnN1YnN0cigwLCBsZW4yKSArICcuLi4nICsgZmlsZU5hbWUuc3Vic3RyKGZpbGVOYW1lLmxlbmd0aCAtIGxlbjIpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogZmlsZU5hbWUsXFxuICAgICAgICAgICAgICAgIGRlc2M6IGZvcm1hdERhdGUoRGF0ZS5wYXJzZShpdGVtLnVwZGF0ZWRfYXQpKSxcXG4gICAgICAgICAgICAgICAgaW1nOiAoaXRlbS50aHVtYm5haWwgPyBpdGVtLnRodW1ibmFpbCA6IChpdGVtLnR5cGUgPT0gXFxcImZvbGRlclxcXCIgPyBcXFwiaHR0cHM6Ly9naXRjb2RlLm5ldC9xcV8zMjM5NDM1MS9kci8tL3Jhdy9tYXN0ZXIvaW1nL+aWh+S7tuexu+WeizIv5paH5Lu25aS5LnN2Z1xcXCIgOiAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5nZXRJY29uKGl0ZW0ubmFtZSkpKSxcXG4gICAgICAgICAgICAgICAgdXJsOiAoaXRlbS50eXBlID09IFxcXCJmb2xkZXJcXFwiID8gJCgpLmxhenlSdWxlKChwYXRocywgbmFtZSwgaWQsIHNoYXJlX2lkKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBwYXRocy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBpZFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKHNoYXJlX2lkICsgXFxcInBhdGhzXFxcIiwgcGF0aHMpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgIH0sIHBhdGhzLCBpdGVtLm5hbWUsIGl0ZW0uZmlsZV9pZCwgc2hhcmVfaWQpIDogJCgpLmxhenlSdWxlKChzaGFyZV9pZCwgaWQsIG5hbWUsIHMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBjb25maWcgPSBKU09OLnBhcnNlKGZldGNoKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL0pvZS9hbGkuanNvblxcXCIpKVxcbiAgICAgICAgICAgICAgICAgICAgbGV0IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBnZXRIem1cXG4gICAgICAgICAgICAgICAgICAgIH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgdmFyIEh6bSA9IGdldEh6bShuYW1lKVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKCQubW92aWUuaW5jbHVkZXMoSHptKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwi5piv6KeG6aKR5paH5Lu2XFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZHVybCA9IFxcXCJodHRwczovL2FwaS5hbGl5dW5kcml2ZS5jb20vdjIvZmlsZS9nZXRfc2hhcmVfbGlua19kb3dubG9hZF91cmxcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHB1cmwgPSBcXFwiaHR0cHM6Ly9hcGkuYWxpeXVuZHJpdmUuY29tL3YyL2ZpbGUvZ2V0X3NoYXJlX2xpbmtfdmlkZW9fcHJldmlld19wbGF5X2luZm9cXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVybHMgPSBbXVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuYW1lcyA9IFtcXFwi5Y6f55S7XFxcIl1cXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gcG9zdChkdXJsLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJ4LXNoYXJlLXRva2VuXFxcIjogcyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJhdXRob3JpemF0aW9uXFxcIjogY29uZmlnLmFjY2Vzc190b2tlblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiZXhwaXJlX3NlY1xcXCI6IDYwMCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJmaWxlX2lkXFxcIjogaWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwic2hhcmVfaWRcXFwiOiBzaGFyZV9pZFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJscy5wdXNoKEpTT04ucGFyc2UodXJsKS51cmwgKyBcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwdSA9IHBvc3QocHVybCwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwieC1zaGFyZS10b2tlblxcXCI6IHMsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiYXV0aG9yaXphdGlvblxcXCI6IGNvbmZpZy5hY2Nlc3NfdG9rZW5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInNoYXJlX2lkXFxcIjogc2hhcmVfaWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiY2F0ZWdvcnlcXFwiOiBcXFwibGl2ZV90cmFuc2NvZGluZ1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiZmlsZV9pZFxcXCI6IGlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInRlbXBsYXRlX2lkXFxcIjogXFxcIlxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIEpTT04ucGFyc2UocHUpLnZpZGVvX3ByZXZpZXdfcGxheV9pbmZvLmxpdmVfdHJhbnNjb2RpbmdfdGFza19saXN0LmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybHMucHVzaChpdGVtLnVybCArIFxcXCIjaXNWaWRlbz10cnVlI1xcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVzLnB1c2goaXRlbS50ZW1wbGF0ZV9pZClcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybHM6IHVybHMsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVzOiBuYW1lcyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczogW3tcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJSZWZlcmVyXFxcIjogXFxcImh0dHBzOi8vd3d3LmFsaXl1bmRyaXZlLmNvbS9cXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1dXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGR1cmwgPSBcXFwiaHR0cHM6Ly9hcGkuYWxpeXVuZHJpdmUuY29tL3YyL2ZpbGUvZ2V0X3NoYXJlX2xpbmtfZG93bmxvYWRfdXJsXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBwb3N0KGR1cmwsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIngtc2hhcmUtdG9rZW5cXFwiOiBzLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcImF1dGhvcml6YXRpb25cXFwiOiBjb25maWcuYWNjZXNzX3Rva2VuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJleHBpcmVfc2VjXFxcIjogNjAwLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcImZpbGVfaWRcXFwiOiBpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJzaGFyZV9pZFxcXCI6IHNoYXJlX2lkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5wYXJzZSh1cmwpLnVybFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCBzaGFyZV9pZCwgaXRlbS5maWxlX2lkLCBpdGVtLm5hbWUsIHMpKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IGdldEl0ZW0oXFxcInN0eWxlXFxcIiwgXFxcIm1vdmllXzNcXFwiKSxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgIC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gICAgICB1cmxJbnRlcmNlcHRvcjogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgaWYgKGlucHV0LnN0YXJ0c1dpdGgoJ2h0dHBzOi8vd3d3LmFsaXl1bmRyaXZlLmNvbS9zLycpKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh1cmwpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5vcGVuKEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBydWxlOiAn6Zi/6YeM5LqR55uYJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2Uvc2hhcmU/cnVsZT3pmL/ph4zkupHnm5gmc2hhcmVfaWQ9JyArIHVybFxcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xcbiAgICAgICAgICAgICAgICB9LCBpbnB1dClcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KSxcXG4gICAgICAgIGRpc2FibGVYNTogdHJ1ZVxcbiAgICB9XFxufSlcXG5zZXRSZXN1bHQoZCk7XCJ9XSxcInNhdmVkXCI6ZmFsc2UsXCJ0aXRsZVwiOlwi6Zi/6YeM5LqR55uYXCIsXCJ2ZXJzaW9uXCI6MCxcInVybFwiOlwiaGlrZXI6Ly9wYWdlL+iBmlwiLFwiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcImZpbmRfcnVsZVwiOlwianM6XFxudmFyIGQgPSBbXTtcXG5sZXQgdXJscyA9IFxcXCJodHRwczovL3dweHoub3JnJmh0dHBzOi8veXVucGFuMS5jb20maHR0cHM6Ly93d3cueXVucGFueml5dWFuLmNvbSZodHRwczovL2FpcGFueGlhb3poYW4uY29tJmh0dHBzOi8vd3d3LmFsaXBhbnNvdS5jb20maHR0cHM6Ly91LmdpdGNhZmUubmV0LyZodHRwczovL3poYW96aXl1YW4ubWUvc28maHR0cHM6Ly93d3cucGFuNjY2LmNuLyZodHRwczovL3d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LCB7XFxcXG4gICAgICAgICAgICBoZWFkZXJzOiB7XFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCJhdXRob3JpemF0aW9uXFxcXFxcXCI6IGNvbmZpZy5hY2Nlc3NfdG9rZW5cXFxcbiAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCJleHBpcmVfc2VjXFxcXFxcXCI6IDExNTIwMCxcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcImZpbGVfaWRcXFxcXFxcIjogaWQsXFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCJkcml2ZV9pZFxcXFxcXFwiOiBkaWRcXFxcbiAgICAgICAgICAgIH0pXFxcXG4gICAgICAgIH0pXFxcXG4gICAgICAgIHVybHMucHVzaChKU09OLnBhcnNlKHVybCkudXJsICsgXFxcXFxcXCIjaXNWaWRlbz10cnVlI1xcXFxcXFwiKVxcXFxuICAgICAgICBsZXQgcHUgPSBwb3N0KHB1cmwsIHtcXFxcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcImF1dGhvcml6YXRpb25cXFxcXFxcIjogY29uZmlnLmFjY2Vzc190b2tlblxcXFxuICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHtcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcImRyaXZlX2lkXFxcXFxcXCI6IGRpZCxcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcImNhdGVnb3J5XFxcXFxcXCI6IFxcXFxcXFwibGl2ZV90cmFuc2NvZGluZ1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIFxcXFxcXFwiZmlsZV9pZFxcXFxcXFwiOiBpZCxcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcInRlbXBsYXRlX2lkXFxcXFxcXCI6IFx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pXFxcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgfSwgc2hhcmVfaWQsIHBhdGhzKVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBwYXRocy5mb3JFYWNoKChpdGVtLCBpbmRleCkgPT4ge1xcXFxuICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5uYW1lLFxcXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcInNjcm9sbF9idXR0b25cXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoc2hhcmVfaWQsIGl0ZW0sIHBhdGhzLCBpbmRleCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFxcXFxcImlkXFxcXFxcXCIsIGl0ZW0uaWQpXFxcXG4gICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKHNoYXJlX2lkICsgXFxcXFxcXCJwYXRoc1xcXFxcXFwiLCBwYXRocy5zbGljZSgwLCBpbmRleCArIDEpKVxcXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgIH0sIHNoYXJlX2lkLCBpdGVtLCBwYXRocywgaW5kZXgpXFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICB9KVxcXFxuICAgICAgICBkLnVuc2hpZnQoe1xcXFxuICAgICAgICAgICAgdGl0bGU6IHJlcy5jcmVhdG9yX25hbWUsXFxcXG4gICAgICAgICAgICBpbWc6IHJ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waVxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgSHptID0gZ2V0SHptKG5hbWUpXFxcXG4gICAgICAgICAgICAgICAgICAgIGlmICgkLm1vdmllLmluY2x1ZGVzKEh6bSkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFxcXFxcIuaYr+inhumikeaWh+S7tlxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGR1cmwgPSBcXFxcXFxcImh0dHBzOi8vYXBpLmFsaXl1bmRyaXZlLmNvbS92Mi9maWxlL2dldF9zaGFyZV9saW5rX2Rvd25sb2FkX3VybFxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcHVybCA9IFxcXFxcXFwiaHR0cHM6Ly9hcGkuYWxpeXVuZHJpdmUuY29tL3YyL2ZpbGUvZ2V0X3NoYXJlX2xpbmtfdmlkZW9fcHJldmlld19wbGF5X2luZm9cXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVybHMgPSBbXVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5hbWVzID0gW1xcXFxcXFwi5Y6f55S7XFxcXFxcXCJdXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gcG9zdChkdXJsLCB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIngtc2hhcmUtdG9rZW5cXFxcXFxcIjogcyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJhdXRob3JpemF0aW9uXFxcXFxcXCI6IGNvbmZpZy5hY2Nlc3NfdG9rZW5cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJleHBpcmVfc2VjXFxcXFxcXCI6IDYwMCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJmaWxlX2lkXFxcXFxcXCI6IGlkLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInNoYXJlX2lkXFxcXFxcXCI6IHNoYXJlX2lkXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmxzLnB1c2goSlNPTi5wYXJzZSh1cmwpLnVybCArIFxcXFxcXFwiI2lzVmlkZW89dHJ1ZSNcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwdSA9IHBvc3QocHVybCwge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJ4LXNoYXJlLXRva2VuXFxcXFxcXCI6IHMsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiYXV0aG9yaXphdGlvblxcXFxcXFwiOiBjb25maWcuYWNjZXNzX3Rva2VuXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwic2hhcmVfaWRcXFxcXFxcIjogc2hhcmVfaWQsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiY2F0ZWdvcnlcXFxcXFxcIjogXFxcXFxcXCJsaXZlX3RyYW5zY29kaW5nXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiZmlsZV9pZFxcXFxcXFwiOiBpZCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJ0ZW1wbGF0ZV9pZFxcXFxcXFwiOiBcXFxcXFxcIlxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBKU09OLnBhcnNlKHB1KS52aWRlb19wcmV2aWV3X3BsYXlfaW5mby5saXZlX3RyYW5zY29kaW5nX3Rhc2tfbGlzdC5mb3JFYWNoKGl0ZW0gPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybHMucHVzaChpdGVtLnVybCArIFxcXFxcXFwiI2lzVmlkZW89dHJ1ZSNcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lcy5wdXNoKGl0ZW0udGVtcGxhdGVfaWQpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmxzOiB1cmxzLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVzOiBuYW1lcyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiBbe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIlJlZmVyZXJcXFxcXFxcIjogXFxcXFxcXCJodHRwczovL3d3dy5hbGl5dW5kcml2ZS5jb20vXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkdXJsID0gXFxcXFxcXCJodHRwczovL2FwaS5hbGl5dW5kcml2ZS5jb20vdjIvZmlsZS9nZXRfc2hhcmVfbGlua19kb3dubG9hZF91cmxcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHBvc3QoZHVybCwge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJ4LXNoYXJlLXRva2VuXFxcXFxcXCI6IHMsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiYXV0aG9yaXphdGlvblxcXFxcXFwiOiBjb25maWcuYWNjZXNzX3Rva2VuXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiZXhwaXJlX3NlY1xcXFxcXFwiOiA2MDAsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiZmlsZV9pZFxcXFxcXFwiOiBpZCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJzaGFyZV9pZFxcXFxcXFwiOiBzaGFyZV9pZFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04ucGFyc2UodXJsKS51cmxcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH0sIHNoYXJlX2lkLCBpdGVtLmZpbGVfaWQsIGl0ZW0ubmFtZSw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W5nbGVcXFxcXFxcIixcXFxcbiAgICB1cmw6IHUsXFxcXG4gICAgZGVzYzogXFxcXFxcXCJhdXRvJiZsaXN0XFxcXFxcXCIsXFxcXG4gICAgZXh0cmE6IHtcXFxcbiAgICAgICAgY2FuQmFjazogdHJ1ZSxcXFxcbiAgICAgICAgdXJsSW50ZXJjZXB0b3I6ICQudG9TdHJpbmcoKCkgPT4ge1xcXFxuICAgICAgICAgICAgaWYgKGlucHV0LnN0YXJ0c1dpdGgoJ2h0dHBzOi8vd3d3LmFsaXl1bmRyaXZlLmNvbS9zLycpKSB7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQudG9TdHJpbmcoKHVybCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBmYmEub3BlbihKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBydWxlOiAn6Zi/6YeM5LqR55uYJyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS9zaGFyZT9ydWxlPemYv+mHjOS6keebmCZzaGFyZV9pZD0nICsgdXJsXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcXFxcbiAgICAgICAgICAgICAgICB9LCBpbnB1dClcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSksXFxcXG4gICAgICAgIGRpc2FibGVYNTogdHJ1ZVxcXFxuICAgIH1cXFxcbn0pXFxcXG5zZXRSZXN1bHQoZCk7XFxcIn1dXCIsXCJwcm94eVwiOlwiXCJ9IiwidGl0bGUiOiLogZrkupHnm5gifQ==
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement