Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥测试@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuS4gOe6p3N0dWktdm9kbGlzdFwiLFwicGF0aFwiOlwic3R1aS12b2RsaXN0XCIsXCJydWxlXCI6XCJ2YXIgZCA9IFtdO1xcbk1ZX1JVTEUudXJsLm1hdGNoKC9meXBhZ2UvKVswXVxcbnZhciBsaXN0ID0gcGRmYShnZXRSZXNDb2RlKCksICcuc3R1aS12b2RsaXN0JiZsaScpO1xcbmZvciAodmFyIGogaW4gbGlzdCkge1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IHBkZmgobGlzdFtqXSwgJ2EmJnRpdGxlJyksXFxuICAgICAgICBkZXNjOiBwZGZoKGxpc3Rbal0sICcucGljLXRleHQmJlRleHQnKSxcXG4gICAgICAgIGltZzogcGQobGlzdFtqXSwgJy5sYXp5bG9hZHx8YSYmZGF0YS1vcmlnaW5hbCcpKydAUmVmZXJlcj0nLFxcbiAgICAgICAgdXJsOiBwZChsaXN0W2pdLCAnYSYmaHJlZicpICsgJyNpbW1lcnNpdmVUaGVtZSMnXFxuICAgIH0pO1xcbn1cXG5zZXRSZXN1bHQoZCk7XCJ9LHtcImNvbF90eXBlXCI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5XFxcIj7mraPluo8nKTtcXG4gICAgICAgICAgICB2YXIg5o+Q56S6ID0g5o6S5bqPID09ICcjRkYwMDAwXFxcIj7lgJLluo8nID8gJyMxYWFkMTlcXFwiPuato+W6jycgOiAnI0ZGMDAwMFxcXCI+5YCS5bqPJztcXG5cXG4gICAgICAgICAgICDnur/ot68uZm9yRWFjaCgoZGF0YSwgeGxpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpZCA9PSB4bGlkID8gJ+KAnOKAnCcgKyBkYXRhICsgJ+KAneKAnScgOiBkYXRhLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogTVlfVVJMICsgXFxcIl/nur/ot69cXFwiICsgeGxpZFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIHB1dE15VmFyKE1ZX1VSTCwgaWQpXFxuICAgICAgICAgICAgdmFyIOeroOiKgiA9IGxpc3RzW2dldE15VmFyKE1ZX1VSTCwgJzAnKV07XFxuICAgICAgICAgICAgaWYgKOaOkuW6jyA9PSAnI0ZGMDAwMFxcXCI+5YCS5bqPJykge1xcbiAgICAgICAgICAgICAgICDnq6DoioIucmV2ZXJzZSgpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxldCBjcCA9IOeroOiKgi5tYXAoKGRhdGEsIHNzaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGRhdGEsICdhJiZUZXh0JyksXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IHBkKGRhdGEsICdhJiZocmVmJykgKyBsYXp5LFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IOeroOiKgi5sZW5ndGggPiAzID8gJ3RleHRfNCcgOiAndGV4dF8yJyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBNWV9VUkwgKyBcXFwiX+mAiembhlxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoTVlfVVJMICsgXFxcIl/pgInpm4ZcXFwiKTtcXG4gICAgICAgICAgICBhZGRJdGVtQmVmb3JlKE1ZX1VSTCArIFxcXCJmb290ZXJcXFwiLCBjcCk7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgfSwgdGFicywgbGF6eSwgaWQpLFxcbiAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbicsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGlkOiBNWV9VUkwgKyBcXFwiX+e6v+i3r1xcXCIgKyBpZFxcbiAgICAgICAgfVxcbiAgICB9KTtcXG59KVxcblxcbmlmICjmjpLluo8gPT0gJyNGRjAwMDBcXFwiPuWAkuW6jycpIHtcXG4gICAgbGlzdC5yZXZlcnNlKClcXG59XFxubGlzdC5mb3JFYWNoKChkYXRhLCBpZCkgPT4ge1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IHBkZmgoZGF0YSwgJ2EmJlRleHQnKSxcXG4gICAgICAgIHVybDogcGQoZGF0YSwgJ2EmJmhyZWYnKSArIGxhenksXFxuICAgICAgICBjb2xfdHlwZTogbGlzdC5sZW5ndGggPiAzID8gJ3RleHRfNCcgOiAndGV4dF8yJyxcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgY2xzOiBNWV9VUkwgKyBcXFwiX+mAiembhlxcXCJcXG4gICAgICAgIH1cXG4gICAgfSk7XFxufSlcXG5kLnB1c2goe1xcb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YmZGF0YS1vcmlnaW5hbCcpLFxcbiAgICAgICB1cmw6IHBkKGxpc3Rbal0sICdhJiZocmVmJylcXG4gIH0pO1xcbn1cXG5zZXRSZXN1bHQoZClcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIiNNYXBwaW5nXCIsXCJwYXRoXCI6XCJNYXBwaW5nXCIsXCJydWxlXCI6XCJqczpcXG4kLmV4cG9ydHMgPSB7XFxuICAgIFxcXCJob21lXFxcIjogW3tcXG4gICAgICAgICAgICBrZXlzOiBbXFxcIiBiIFxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcIi5iXFxcIixcXG4gICAgICAgICAgICAvLyAgICAgYWxsS2V5OiB0cnVlLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcIm5hdi10YWJzXFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwibmF2LXRhYnNcXFwiLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcIm15dWktY29udGVudF9fbGlzdFxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcIm15dWktY29udGVudF9fbGlzdFxcXCIsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwibmF2LXRhYnNcXFwiLCBcXFwic3R1aS1jb250ZW50X19wbGF5bGlzdFxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcIm5hdi10YWJzMVxcXCIsXFxuICAgICAgICAgICAgYWxsS2V5OiB0cnVlLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcImgzXFxcIiwgXFxcInN0dWktY29udGVudF9fcGxheWxpc3RcXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJoM1xcXCIsXFxuICAgICAgICAgICAgYWxsS2V5OiB0cnVlLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcIm15dWktdm9kbGlzdCBcXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJteXVpLXZvZGxpc3RcXFwiLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcIm1vLW1vdnMtaXRlbVxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcIm1vLW1vdnMtaXRlbVxcXCIsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwibW9kdWxlLXRhYi1pdGVtXFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwibW9kdWxlLXRhYi1pdGVtXFxcIixcXG4gICAgICAgICAgICAvLyAgICAgYWxsS2V5OiB0cnVlLFxcbiAgICAgICAgfSx7XFxuICAgICAgICAgICAga2V5czogW1xcXCJ5LXBsYXlMaXN0XFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwieS1wbGF5TGlzdFxcXCIsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwic3R1aS12b2RsaXN0IFxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcInN0dWktdm9kbGlzdFxcXCIsXFxuICAgICAgICAgICAgLy8gICAgIGFsbEtleTogdHJ1ZSxcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAga2V5czogW1xcXCJwbGF5X3NvdXJjZV90YWJcXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJwbGF5X3NvdXJjZV90YWJcXFwiLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcImZlZC1wbGF5LWl0ZW1cXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJmZWQtcGxheS1pdGVtXFxcIixcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAga2V5czogW1xcXCJtb2R1bGUtaXRlbXNcXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJtb2R1bGUtaXRlbXNcXFwiLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcInZvZGxpc3QgXFxcIiwgXFxcImxhenlsb2FkXFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwidm9kbGlzdFxcXCIsXFxuICAgICAgICAgICAgYWxsS2V5OiB0cnVlLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcIm1vLXBsYXktbG9hZFxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcIm1vLXBsYXktbG9hZFxcXCIsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwiZmVkLWxpc3QtdGl0bGVcXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJmZWQtbGlzdC10aXRsZVxcXCIsXFxuICAgICAgICAgICAgLy9hbGxLZXk6IHRydWUsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwicGFjay15a3BhY2tcXFxcXFxcIlxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcInBhY2steWtwYWNrXFxcIixcXG4gICAgICAgIH0sXFxuICAgICAgICAvKlxcbiAgICAgICAgICAgICAgICB7XFxuICAgICAgICAgICAgICAgICAgICBrZXlzOiBbXFxcIml0ZW1cXFwiXSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcIml0ZW1cXFwiLFxcbiAgICAgICAgICAgICAgICB9LCovXFxuICAgICAgICB7XFxuICAgICAgICAgICAga2V5czogW1xcXCJkYXRhX2xpc3RcXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJkYXRhX2xpc3RcXFwiLFxcbiAgICAgICAgfSxcXG4gICAgXSxcXG4gICAgXFxcInNlYXJjaFxcXCI6IFt7XFxuICAgICAgICAgICAga2V5czogW1xcXCJzdHVpLXZvZGxpc3RfX21lZGlhXFxcIl0sXFxuICAgICAgICAgICAgdXJsOiBcXFwic3R1aS12b2RsaXN0X19tZWRpYVxcXCIsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwibXl1aS12b2RsaXN0X19tZWRpYVxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcIm15dWktdm9kbGlzdF9fbWVkaWFcXFwiLFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBrZXlzOiBbXFxcIm1vZHVsZS1zZWFyY2gtaXRlbVxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcIm1vZHVsZS1zZWFyY2gtaXRlbVxcXCIsXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGtleXM6IFtcXFwic3R1aS12b2RsaXN0IFxcXCJdLFxcbiAgICAgICAgICAgIHVybDogXFxcInN0dWktdm9kbGlzdFxcXCIsXFxuICAgICAgICAgICAgLy8gICAgIGFsbEtleTogdHJ1ZSxcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAga2V5czogW1xcXCJkbCBcXFwiXSxcXG4gICAgICAgICAgICB1cmw6IFxcXCJkbFxcXCIsXFxuICAgICAgICAgICAgYWxsS2V5OiB0cnVlLFxcbiAgICAgICAgfSxcXG4gICAgXVxcbn1cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIiNhdXRvXCIsXCJwYXRoXCI6XCJhdXRvXCIsXCJydWxlXCI6XCJqczpcXG5mdW5jdGlvbiBnZXRQYWdlU291cmNlKGtleSkge1xcbiAgICBsZXQgc3JjID0gcmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL1xcXCIgKyBrZXkgKyBcXFwiP3J1bGU95qih5p2/wrdRXFxcIik7XFxuICA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ICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyAn4oCc4oCc4oCd4oCdPGI+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiAnICsg5YiG57G76aKc6ImyICsgJ1xcXCI+JyArIHRpdGxlICsgJzwvc3Bhbj48L2I+JyA6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHBkKGl0ZW0sIOWIhuexu+mTvuaOpSkgKyAnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld19jYXRlID0gW11cXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wLmZvckVhY2goKGNhdGUsIGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19jYXRlLnB1c2goaW5kZXggPT09IDAgPyBwYXJhbXMua2V5LnRvU3RyaW5nKCkgOiBcXFwiMFxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoTVlfUlVMRS50aXRsZSwgSlNPTi5zdHJpbmdpZnkobmV3X2NhdGUpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnVybCwgaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogcGFnZSxcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9IGVsc2UgaWYgKGZvbGQgPT09ICcxJykge1xcbiAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0ZW0sIOWIhuexu+agh+mimClcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBrZXkudG9TdHJpbmcoKSA9PT0gY2F0ZV90ZW1wW2luZGV4XSA/ICfigJzigJzigJ3igJ08Yj48c3BhbiBzdHlsZT1cXFwiY29sb3I6ICcgKyDliIbnsbvpopzoibIgKyAnXFxcIj4nICsgdGl0bGUgKyAnPC9zcGFuPjwvYj4nIDogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQocGQoaXRlbSwg5YiG57G76ZO+5o6lKSArICcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChwYXJhbXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoTVlfUlVMRS50aXRsZSwgSlNPTi5zdHJpbmdpZnkocGFyYW1zLmNhdGVfdGVtcCkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudXJsLCBpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogcGFnZSxcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgIH0pXFxufVwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5LiA57qn5YWs5YWx5qih5p2/XCIsXCJwYXRoXCI6XCJ5aWppXCIsXCJydWxlXCI6XCJmdW5jdGlvbiDkuIDnuqcoKSB7fTtcXG5PYmplY3QuYXNzaWduKOS4gOe6py5wcm90b3R5cGUsIHtcXG4gICAgY29uc3RydWN0b3I6IOS4gOe6pyxcXG4gICAgdGVzdCgpIHt9LFxcbiAgICDojrflj5bmupDnoIEodXJsLCBoZWFkZXIpIHtcXG4gICAgICAgIHJldHVybiBmZXRjaCh0cnVlX3VybCwge1xcbiAgICAgICAgICAgIGhlYWRlcnM6IGhlYWRlciB8fCB7XFxuICAgICAgICAgICAgICAgICdVc2VyLUFnZW50JzogJ01vemlsbGEvNS4wIChXaW5kb3dz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m4gJyMnKygnMDAwMDAnKyhNYXRoLnJhbmRvbSgpKjB4MTAwMDAwMDw8MCkudG9TdHJpbmcoMTYpKS5zdWJzdHIoLTYpO1xcbsKgwqDCoMKgwqAgfVxcbiAgICAgICAgaHRtbENhdGVnb3JpZXMu55WM6Z2iKGQpXFxuICAgICAgICAgICAgLy8gLuWIhuexu+mTvuaOpSh0cnVlX3VybClcXG4gICAgICAgICAgICAu5rqQ56CBKGh0bWwpXFxuICAgICAgICAgICAgLumhteeggShwYWdlKVxcbiAgICAgICAgICAgIC7mt7vliqDliIbnsbvlrprkvY0ocnVsZUxpc3QpXFxuICAgICAgICAgICAgLuW8gOWQr+WGhee9ruaKmOWPoOWKn+iDvSgpIC8vIOW/hemhu1xcbiAgICAgICAgICAgIC7mipjlj6Ao5b2T5YmN5oqY5Y+g54q25oCBKSAvLyDlv4XpobtcXG4gICAgICAgICAgICAu6YCJ5Lit55qE5YiG57G76aKc6ImyKGdldFJhbmdlQ29sb3JzKCkpXFxuICAgICAgICAgLy8gICAu6YCJ5Lit55qE5YiG57G76aKc6ImyKCcjMDk4QUMxJylcXG4gICAgICAgICAgICAu5byA5aeL5omT6YCg5YiG57G7KCk7XFxuICAgIH0sXFxuICAgIOeUn+aIkOeJh+WNlShkLCBodG1sKSB7XFxuICAgICAgICBsZXQgbGlzdCA9IHBkZmEoaHRtbCwg5YiX6KGoKTtcXG4gICAgICAgIGZvciAobGV0IGogaW4gbGlzdCkge1xcbiAgICAgICAgICAgIGxldCBpbWcgPSBwZChsaXN0W2pdLCDlm77niYcpO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGxpc3Rbal0sIOagh+mimCksXFxuICAgICAgICAgICAgICAgIGRlc2M6IHBkZmgobGlzdFtqXSwg5o+P6L+wKSxcXG4gICAgICAgICAgICAgICAgaW1nOiBpbWcgKyAnQFJlZmVyZXI9JyArIGltZyxcXG4gICAgICAgICAgICAgICAgdXJsO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mb3IgKGxldCBpID0gMDsgaSA8IGtleXMubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGtleSA9IGtleXNbaV1cXG4gICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1Gb2xkTGF5b3V0XVtrZXldID0gbGF5b3V0W2tleV07XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIuivt+S8oOWFpeato+ehrueahOaKmOWPoOeVjOmdouWFg+e0oO+8gVxcXCIpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIC8vIGluamVjdEluZGV4IOaKmOWPoOaMiemSruaPkuWFpeesrCBpbmplY3RJbmRleCDooYxcXG4gICAgICAgICAgICBpZiAoaW5qZWN0SW5kZXgpIHtcXG4gICAgICAgICAgICAgICAgaWYgKCEodHlwZW9mIChpbmplY3RJbmRleCkgPT09ICdudW1iZXInKSkge1xcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCLmipjlj6DmjInpkq7mj5LlhaXooYzor7fkvKDlhaXmlbDlrZfvvIFcXFwiKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmIChpbmplY3RJbmRleCA8IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFwi5oqY5Y+g5oyJ6ZKu5o+S5YWl6KGM6K+35Lyg5YWl5aSn5LqOIDAg55qE5pW05pWw77yBXFxcIilcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAoaW5qZWN0SW5kZXggPiB0aGlzW3N5bWJvbE1hcC5tRm9sZEluZGV4XSkge1xcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCLmipjlj6DmjInpkq7mj5LlhaXooYzkuI3lvpflpKfkuo7mmL7npLrmipjlj6DooYzmlbDvvIHor7fosIPnlKggLmZvbGRJbmRleChpbmRleCkg5oiWIC7nrKzlh6DooYzlvIDlp4vmipjlj6AoaW5kZXgpIOS8oOWFpeato+ehrueahOaYvuekuuaKmOWPoOihjOaVsFxcXCIpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUZvbGRMYXlvdXRdLmluamVjdEluZGV4ID0gaW5qZWN0SW5kZXggfHwgMTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFwi6K+35Lyg5YWl5q2j56Gu55qE5oqY5Y+g55WM6Z2i5YWD57Sg77yBXFxcIilcXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiB0aGlzO1xcbiAgICB9LFxcbiAgICAvLyDlvZPliY3mmK/lkKbmipjlj6BcXG4gICAgZm9sZChpc0ZvbGQpIHtcXG4gICAgICAgIGlmICh0eXBlb2YgKGlzRm9sZCkgPT09ICdzdHJpbmcnKSB7XFxuICAgICAgICAgICAgaXNGb2xkID0gaXNGb2xkID09PSAnMSdcXG4gICAgICAgIH1cXG4gICAgICAgIGlmIChpc0ZvbGQpIHtcXG4gICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tRm9sZF0gPSAnMSc7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1Gb2xkXSA9ICcwJztcXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiB0aGlzXFxuICAgIH0sXFxuICAgIGNvbG9yKG1Db2xvcikge1xcbiAgICAgICAgdGhpc1tzeW1ib2xNYXAubUNvbG9yXSA9IG1Db2xvclxcbiAgICAgICAgcmV0dXJuIHRoaXNcXG4gICAgfSxcXG4gICAgdGFnKG1UYWcpIHtcXG4gICAgICAgIHRoaXNbc3ltYm9sTWFwLm1UYWddID0gbVRhZ1xcbiAgICAgICAgcmV0dXJuIHRoaXNcXG4gICAgfSxcXG4gICAgYWRkKHJ1bGVPYmopIHtcXG4gICAgICAgIC8vIGxvZygkLnN0cmluZ2lmeShydWxlT2JqKSlcXG4gICAgICAgIGlmIChydWxlT2JqLmNvbnN0cnVjdG9yID09PSBBcnJheSkge1xcbiAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLnJ1bGVPYmpMaXN0XSA9IHRoaXNbc3ltYm9sTWFwLnJ1bGVPYmpMaXN0XS5jb25jYXQocnVsZU9iailcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAucnVsZU9iakxpc3RdLnB1c2gocnVsZU9iailcXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiB0aGlzO1xcbiAgICB9LFxcbiAgICBldmFsSlNSdWxlKGl0ZW0sIGpzUnVsZSkge1xcbiAgICAgICAgbGV0IHJ1bGUgPSBqc1J1bGUucmVwbGFjZShcXFwiQGpzOlxcXCIsIFxcXCJcXFwiKVxcbiAgICAgICAgcnVsZSA9IHJ1bGUudHJpbSgpXFxuICAgICAgICAvLyBsb2coJC5zdHJpbmdpZnkocnVsZSkpXFxuICAgICAgICBsZXQgaW5wdXQgPSBpdGVtXFxuICAgICAgICBpZiAocnVsZS5zdGFydHNXaXRoKFxcXCIoXFxcIikpIHtcXG4gICAgICAgICAgICBldmFsKCdyZXN1bHQgPSAnICsgcnVsZSlcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgLyoqXFxuICAgICAgICAgICAgICog6L+Y5Y6f5oiQICQudG9TdHJpbmcoLi4uKSDnmoTmnIDnu4jnu5PmnpzvvIzovr7liLDmnIDnu4jlpITnkIbmlrnlvI/ot5/kuIrpnaLnmoQgaWYg5LiA6Ie055qE55uu55qEXFxuICAgICAgICAgICAgICovXFxuICAgICAgICAgICAgZXZhbCgncmVzdWx0ID0gJyArICcoKCkgPT4geycgKyBydWxlICsgJ30pKCknKVxcbi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sUnVsZS5wYXJzZU9wdGlvbikge1xcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoICh1cmxSdWxlLnBhcnNlT3B0aW9uKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGFyc2VEb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBkXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGFyc2VEb21Gb3JIdG1sXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwZGZoXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbUZvckh0bWw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb207XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodXJsUnVsZVtcXFwi6Kej5p6Q5pa55rOVXFxcIl0pIHtcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAodXJsUnVsZVtcXFwi6Kej5p6Q5pa55rOVXFxcIl0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwYXJzZURvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGRcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwYXJzZURvbUZvckh0bWxcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBkZmhcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tRm9ySHRtbDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB1cmwgPSBwYXJzZShzcmMsIG1VcmxSdWxlKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKHVybFJ1bGUuZGVhbFVybCkge1xcbiAgICAgICAgICAgICAgICB1cmwgPSB1cmxSdWxlLmRlYWxVcmwodXJsKVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodXJsUnVsZVsn5LqM5qyh5aSE55CGJ10pIHtcXG4gICAgICAgICAgICAgICAgdXJsID0gdXJsUnVsZVsn5LqM5qyh5aSE55CGJ10odXJsKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaWYgKHVybFJ1bGUuc3RhcnRzV2l0aChcXFwiQGpzOlxcXCIpKSB7XFxuICAgICAgICAgICAgICAgIHVybCA9IHRoaXMuZXZhbEpTUnVsZShzcmMsIHVybFJ1bGUpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHVybCA9IHBhcnNlRG9tKHNyYywgdXJsUnVsZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIHVybCB8fCBcXFwiXFxcIjtcXG4gICAgfSxcXG4gICAgYnVpbGQoKSB7XFxuICAgICAgICAvLyDmo4DmtYvmmK/lkKbkvKDlhaXpnIDopoHn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AgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbVRhZzogbVRhZyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaXNGb2xkOiB0aGlzW3N5bWJvbE1hcC5tRm9sZF0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFZBUk1BUDogdGhpcy5WQVJNQVBcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogdGhpc1tzeW1ib2xNYXAubUZvbGRMYXlvdXRdLmNvbF90eXBlIHx8IFxcXCJzY3JvbGxfYnV0dG9uXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1MYXlvdXRdLnB1c2goZm9sZExheW91dClcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICAvL+WFt+S9k+WIl+ihqOS4i+eahOWIhuexu1xcbiAgICAgICAgICAgICAgICBsZXQgc3ViX2NhdGVnb3JpZXMgPSBbXTtcXG4gICAgICAgICAgICAgICAgaWYgKGNhdGVnb3J5LnN1Ykxpc3RSdWxlLnN0YXJ0c1dpdGgoXFxcIkBqczpcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMgPSB0aGlzLmV2YWxKU1J1bGUoY2F0ZWdvcnkubGlzdCwgY2F0ZWdvcnkuc3ViTGlzdFJ1bGUpXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBzdWJfY2F0ZWdvcmllcyA9IHBhcnNlRG9tRm9yQXJyYXkoY2F0ZWdvcnkubGlzdCwgY2F0ZWdvcnkuc3ViTGlzdFJ1bGUpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmIChpbmRleCA8ICh0aGlzW3N5bWJvbE1hcC5tRm9sZEluZGV4XSB8fCAxKSkge1xcbiAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMuZm9yRWFjaCgoaXRlbSwga2V5KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gdGhpcy5nZXRUaXRsZShpdGVtLCBjYXRlZ29yeSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gdGhpcy5nZXRVcmwoaXRlbSwgY2F0ZWdvcnkpXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBrZXkudG9TdHJpbmcoKSA9PT0gY2F0ZV90ZW1wW2luZGV4XSA/ICfigJzigJzigJ3igJ08Yj48Zm9udCBjb2xvcj0nICsgdGhpc1tzeW1ib2xNYXAubUNvbG9yXSArICc+JyArIHRpdGxlICsgJyA8L2ZvbnQ+PC9iPicgOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHVybCkubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld19jYXRlID0gW11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwYXJhbXMuaW5kZXggPT09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wLmZvckVhY2goKGNhdGUsIGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19jYXRlLnB1c2goaW5kZXggPT09IDAgPyBwYXJhbXMua2V5LnRvU3RyaW5nKCkgOiBcXFwiMFxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXBbcGFyYW1zLmluZGV4XSA9IHBhcmFtcy5rZXkudG9TdHJpbmcoKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIocGFyYW1zLnRhZyArIHBhcmFtcy5WQVJNQVAuQ0FURUdPUlksIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5pbmRleCA9PT0gMCA/IG5ld19jYXRlIDogcGFyYW1zLmNhdGVfdGVtcCkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMudGFnICsgcGFyYW1zLlZBUk1BUC5VUkwsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWQVJNQVA6IHRoaXMuVkFSTUFQLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFnOiBtVGFnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiB0aGlzW3N5bWJvbE1hcC5tUGFnZV0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJibGFua19ibG9ja1xcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXNbc3ltYm9sTWFwLm1Gb2xkXSA9PT0gJzAnKSB7XFxuICAgICAgICAgICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSB0aGlzLmdldFRpdGxlKGl0ZW0sIGNhdGVnb3J5KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSB0aGlzLmdldFVybChpdGVtLCBjYXRlZ29yeSlcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tTGF5b3V0XS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gJ+KAnOKAnOKAneKAnTxiPjxmb250IGNvbG9yPScgKyB0aGlzW3N5bWJvbE1hcC5tQ29sb3JdICsgJz4nICsgdGl0bGUgKyAnIDwvZm9udD48L2I+JyA6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQodXJsKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy50YWcgKyBwYXJhbXMuVkFSTUFQLkNBVEVHT1JZLCBKU09OLnN0cmluZ2lmeShwYXJhbXMuY2F0ZV90ZW1wKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy50YWcgKyBwYXJhbXMuVkFSTUFQLlVSTCwgaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OiBpbmRleCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFZBUk1BUDogdGhpcy5WQVJNQVAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YWc6IG1UYWcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHRoaXNbc3ltYm9sTWFwLm1QYWdlXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tTGF5b3V0XS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgfSxcXG5cXG4gICAg55WM6Z2iKGxheW91dCkge1xcbiAgICAgICAgcmV0dXJuIHRoaXMubGF5b3V0KGxheW91dClcXG4gICAgfSxcXG4gICAg5YiG57G76ZO+5o6lKHRydWVVcmwpIHtcXG4gICAgICAgIHJldHVybiB0aGlzLnRydWVVcmwodHJ1ZVVybCk7XFxuICAgIH0sXFxuICAgIOmhteeggShwYWdlKSB7XFxuICAgICAgICByZXR1cm4gdGhpcy5wYWdlKHBhZ2UpO1xcbiAgICB9LFxcbiAgICDmupDnoIEoaHRtbCkge1xcbiAgICAgICAgcmV0dXJuIHRoaXMuaHRtbChodG1sKTtcXG4gICAgfSxcXG4gICAg5a6a5L2N5LiA57qn5YiG57G7KGxpc3QpIHtcXG4gICAgICAgIHJldHVybiB0aGlzLmxpc3QobGlzdCk7XFxuICAgIH0sXFxuICAgIOWumuS9jeWtkOWIhuexuyhzdWJMaXN0KSB7XFxuICAgICAgICByZXR1cm4gdGhpcy5zdWJMaXN0KHN1Ykxpc3QpO1xcbiAgICB9LFxcbiAgICDlrprkvY3liIbnsbvmoIfpopgodGl0bGUpIHtcXG4gICAgICAgIHJldHVybiB0aGlzLnRpdGxlKHRpdGxlKTtcXG4gICAgfSxcXG4gICAg5a6a5L2N5YiG57G76ZO+5o6lKHVybCkge1xcbiAgICAgICAgcmV0dXJuIHRoaXMudXJsKHVybCk7XFxuICAgIH0sXFxuICAgIOW8gOWQr+WGhee9ruaKmOWPoOWKn+iDvSgpIHtcXG4gICAgICAgIHJldHVybiB0aGlzLmZvbGRJbm5lcih0cnVlKTtcXG4gICAgfSxcXG4gICAg5YWz6Zet5YaF572u5oqY5Y+g5Yqf6IO9KCkge1xcbiAgICAgICAgcmV0dXJuIHRoaXMuZm9sZElubmVyKGZhbHNlKTtcXG4gICAgfSxcXG4gICAg56ys5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ICAgICAgcmV0dXJuIHRoaXM7XFxuICAgIH0sXFxuICAgIGRlYnVnKCkge1xcbiAgICAgICAgdGhpcy5wYXJhbXMuZGVidWcgPSB0cnVlXFxuICAgICAgICByZXR1cm4gdGhpcztcXG4gICAgfSxcXG4gICAgZXhlYygpIHtcXG4gICAgICAgIHRoaXMuY2hlY2tQYXJhbXMoKVxcbiAgICAgICAgbGV0IHRydWVfdXJsID0gJydcXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdGhpcy5yZWdleE1hcC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgIGxldCByZWdPYmogPSB0aGlzLnJlZ2V4TWFwW2ldO1xcbiAgICAgICAgICAgIGxldCB1cmxFeHAgPSByZWdPYmoucmVnO1xcbiAgICAgICAgICAgIGlmICh0eXBlb2YgdXJsRXhwID09PSAnc3RyaW5nJykge1xcbiAgICAgICAgICAgICAgICB1cmxFeHAgPSBuZXcgUmVnRXhwKHVybEV4cClcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKHVybEV4cC50ZXN0KHRoaXMucGFyYW1zLnVybCkpIHtcXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMucGFyYW1zLmRlYnVnKSB7XFxuICAgICAgICAgICAgICAgICAgICBsb2codXJsRXhwLnRvU3RyaW5nKCkpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgdHJ1ZV91cmwgPSByZWdPYmouZXhlYygpO1xcbiAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBpZiAodHJ1ZV91cmwpIHtcXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZV91cmw7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnBhcmFtcy51cmxcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAg6I635Y+W5aSE55CG57uT5p6cKCkge1xcbiAgICAgICAgcmV0dX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gICAgICAgICAgdmFyIOeroOiKgiA9IGxpc3RzW2dldE15VmFyKE1ZX1VSTCwgJzAnKV07XFxcXG4gICAgICAgICAgICBpZiAo5o6S5bqPID09ICcjRkYwMDAwXFxcXFxcXCI+5YCS5bqPJykge1xcXFxuICAgICAgICAgICAgICAgIOeroOiKgi5yZXZlcnNlKClcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGxldCBjcCA9IOeroOiKgi5tYXAoKGRhdGEsIHNzaWQpID0+IHtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChkYXRhLCAnYSYmVGV4dCcpLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IHBkKGRhdGEsICdhJiZocmVmJykgKyBsYXp5LFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTog56ug6IqCLmxlbmd0aCA+IDMgPyAndGV4dF80JyA6ICd0ZXh0XzInLFxcXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBNWV9VUkwgKyBcXFxcXFxcIl/pgInpm4ZcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfTtcXFxcbiAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKE1ZX1VSTCArIFxcXFxcXFwiX+mAiembhlxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgIGFkZEl0ZW1CZWZvcmUoTVlfVVJMICsgXFxcXFxcXCJmb290ZXJcXFxcXFxcIiwgY3ApO1xcXFxuICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgIH0sIHRhYnMsIGxhenksIGlkKSxcXFxcbiAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRv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gICAgICBhbGxLZXk6IHRydWUsXFxcXG4gICAgICAgIH0sXFxcXG4gICAgICAgIHtcXFxcbiAgICAgICAgICAgIGtleXM6IFtcXFxcXFxcImgzXFxcXFxcXCIsIFxcXFxcXFwic3R1aS1jb250ZW50X19wbGF5bGlzdFxcXFxcXFwiXSxcXFxcbiAgICAgICAgICAgIHVybDogXFxcXFxcXCJoM1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgYWxsS2V5OiB0cnVlLFxcXFxuICAgICAgICB9LFxcXFxuICAgICAgICB7XFxcXG4gICAgICAgICAgICBrZXlzOiBbXFxcXFxcXCJteXVpLXZvZGxpc3QgXFxcXFxcXCJdLFxcXFxuICAgICAgICAgICAgdXJsOiBcXFxcXFxcIm15dWktdm9kbGlzdFxcXFxcXFwiLFxcXFxuICAgICAgICB9LFxcXFxuICAgICAgICB7XFxcXG4gICAgICAgICAgICBrZXlzOiBbXFxcXFxcXCJtby1tb3ZzLWl0ZW1cXFxcXFxcIl0sXFxcXG4gICAgICAgICAgICB1cmw6IFxcXFxcXFwibW8tbW92cy1pdGVtXFxcXFxcXCIsXFxcXG4gICAgICAgIH0sXFxcXG4gICAgICAgIHtcXFxcbiAgICAgICAgICAgIGtleXM6IFtcXFxcXFxcIm1vZHVsZS10YWItaXRlbVxcXFxcXFwiXSxcXFxcbiAgICAgICAgICAgIHVybDogXFxcXFxcXCJtb2R1bGUtdGFiLWl0ZW1cXFxcXFxcIixcXFxcbiAgICAgICAgICAgIC8vICAgICBhbGxLZXk6IHRydWUsXFxcXG4gICAgICAgIH0se1xcXFxuICAgICAgICAgICAga2V5czogW1xcXFxcXFwieS1wbGF5TGlzdFxcXFxcXFwiXSxcXFxcbiAgICAgICAgICAgIHVybDogXFxcXFxcXCJ5LXBsYXlMaXN0XFxcXFxcXCIsXFxcXG4gICAgICAgIH0sXFxcXG4gICAgICAgIHtcXFxcbiAgICAgICAgICAgIGtleXM6IFtcXFxcXFxcInN0dWktdm9kbGlzdCBcXFxcXF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gICAgICAgIHtcXFxcbiAgICAgICAgICAgIGtleXM6IFtcXFxcXFxcImZlZC1saXN0LXRpdGxlXFxcXFxcXCJdLFxcXFxuICAgICAgICAgICAgdXJsOiBcXFxcXFxcImZlZC1saXN0LXRpdGxlXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAvL2FsbEtleTogdHJ1ZSxcXFxcbiAgICAgICAgfSxcXFxcbiAgICAgICAge1xcXFxuICAgICAgICAgICAga2V5czogW1xcXFxcXFwicGFjay15a3BhY2tcXFxcXFxcXFxcXFxcXFwiXFxcXFxcXCJdLFxcXFxuICAgICAgICAgICAgdXJsOiBcXFxcXFxcInBhY2steWtwYWNrXFxcXFxcXCIsXFxcXG4gICAgICAgIH0sXFxcXG4gICAgICAgIC8qXFxcXG4gICAgICAgICAgICAgICAge1xcXFxuICAgICAgICAgICAgICAgICAgICBrZXlzOiBbXFxcXFxcXCJpdGVtXFxcXFxcXCJdLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXFxcXFwiaXRlbVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIH0sKi9cXFxcbiAgICAgICAge1xcXFxuICAgICAgICAgICAga2V5czogW1xcXFxcXFwiZGF0YV9saXN0XFxcXFxcXCJdLFxcXFxuICAgICAgICAgICAgdXJsOiBcXFxcXFxcImRhdGFfbGlzdFxcXFxcXFwiLFxcXFxuICAgICAgICB9LFxcXFxuICAgIF0sXFxcXG4gICAgXFxcXFxcXCJzZWFyY2hcXFxcXFxcIjogW3tcXFxcbiAgICAgICAgICAgIGtleXM6IFtcXFxcXFxcInN0dWktdm9kbGlzdF9fbWVkaWFcXFxcXFxcIl0sXFxcXG4gICAgICAgICAgICB1cmw6IFxcXFxcXFwic3R1aS12b2RsaXN0X19tZWRpYVxcXFxcXFwiLFxcXFxuICAgICAgICB9LFxcXFxuICAgICAgICB7XFxcXG4gICAgICAgICAgICBrZXlzOiBbXFxcXFxcXCJteXVpLXZvZGxpc3RfX21lZGlhXFx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GZvbGQgPT09ICcxJyA/ICcwJyA6ICcxJyk7XFxcXG4gICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxcXG4gICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgfSwgZm9sZCksXFxcXG4gICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxcXG4gICAgfSlcXFxcblxcXFxuXFxcXG4gICAgY2F0ZWdvcmllcy5mb3JFYWNoKChjYXRlZ29yeSwgaW5kZXgpID0+IHtcXFxcbiAgICAgICAgbGV0IHN1Yl9jYXRlZ29yaWVzID0gcGRmYShjYXRlZ29yeSwg5bCP57G75a6a5L2NKTtcXFxcbiAgICAgICAgaWYgKGluZGV4ID09PSAwKSB7XFxcXG4gICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0ZW0sIOWIhuexu+agh+mimClcXFxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyAn4oCc4oCc4oCd4oCdPGI+PHNwYW4gc3R5bGU9XFxcXFxcXCJjb2xvcjogJyArIOWIhuexu+minOiJsiArICdcXFxcXFxcIj4nICsgdGl0bGUgKyAnPC9zcGFuPjwvYj4nIDogdGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChwZChpdGVtLCDliIbnsbvpk77mjqUpICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld19jYXRlID0gW11cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXAuZm9yRWFjaCgoY2F0ZSwgaW5kZXgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY2F0ZS5wdXNoKGluZGV4ID09PSAwID8gcGFyYW1zLmtleS50b1N0cmluZygpIDogXFxcXFxcXCIwXFxcXFxcXCIpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KG5ld19jYXRlKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnVybCwgaW5wdXQpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiBwYWdlLFxcXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXFxcbiAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiYmxhbmtfYmxvY2tcXFxcXFxcIlxcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgIH0gZWxzZSBpZiAoZm9sZCA9PT0gJzEnKSB7XFxcXG4gICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0ZW0sIOWIhuexu+agh+mimClcXFxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyAn4oCc4oCc4oCd4oCdPGI+PHNwYW4gc3R5bGU9XFxcXFxcXCJjb2xvcjogJyArIOWIhuexu+minOiJsiArICdcXFxcXFxcIj4nICsgdGl0bGUgKyAnPC9zcGFuPjwvYj4nIDogdGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChwZChpdGVtLCDliIbnsbvpk77mjqUpICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcFtwYXJhbXMuaW5kZXhdID0gcGFyYW1zLmtleS50b1N0cmluZygpXFxcXG5cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnRpdGxlLCBKU09OLnN0cmluZ2lmeShwYXJhbXMuY2F0ZV90ZW1wKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnVybCwgaW5wdXQpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiBwYWdlLFxcXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXFxcbiAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiYmxhbmtfYmxvY2tcXFxcXFxcIlxcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgIH1cXFxcbiAgICB9KVxcXFxufVxcXCJ9LHtcXFwiY29sX3R5cGVcXFwiOlxcXCJtb3ZpZV8zXFxcIixcXFwibmFtZVxcXCI6XFxcIuS4gOe6p+WFrOWFseaooeadv1xcXCIsXFxcInBhdGhcXFwiOlxcXCJ5aWppXFxcIixcXFwicnVsZVxcXCI6XFxcImZ1bmN0aW9uIOS4gOe6pygpIHt9O1xcXFxuT2JqZWN0LmFzc2lnbijkuIDnuqcucHJvdG90eXBlLCB7XFxcXG4gICAgY29uc3RydWN0b3I6IOS4gOe6pyxcXFxcbiAgICB0ZXN0KCkge30sXFxcXG4gICAg6I635Y+W5rqQ56CBKHVybCwgaGVhZGVyKSB7XFxcXG4gICAgICAgIHJldHVybiBmZXRjaCh0cnVlX3VybCwge1xcXFxuICAgICAgICAgICAgaGVhZGVyczogaGVhZGVyIHx8IHtcXFxcbiAgICAgICAgICAgICAgICAnVXNlci1BZ2VudCc6ICdNb3ppbGxhLzUuMCAoV2luZG93cyBOVCAxMC4wKSdcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSkgLy8g6buY6K6k57uf5LiA5L2/55SoUEMgVUFcXFxcbiAgICB9LFxcXFxuICAgIOiOt+WPluato+ehrumTvuaOpShwYWdlLCByZWdleCkge1xcXFxuICAgICAgICBsZXQgdHJ1ZV91cmwgPSBnZXRNeVZhcignaGVhZG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pnaIoZClcXFxcbiAgICAgICAgICAgIC8vIC7liIbnsbvpk77mjqUodHJ1ZV91cmwpXFxcXG4gICAgICAgICAgICAu5rqQ56CBKGh0bWwpXFxcXG4gICAgICAgICAgICAu6aG156CBKHBhZ2UpXFxcXG4gICAgICAgICAgICAu5re75Yqg5YiG57G75a6a5L2NKHJ1bGVMaXN0KVxcXFxuICAgICAgICAgICAgLuW8gOWQr+WGhee9ruaKmOWPoOWKn+iDvSgpIC8vIOW/hemhu1xcXFxuICAgICAgICAgICAgLuaKmOWPoCjlvZPliY3mipjlj6DnirbmgIEpIC8vIOW/hemhu1xcXFxuICAgICAgICAgICAgLumAieS4reeahOWIhuexu+minOiJsihnZXRSYW5nZUNvbG9ycygpKVxcXFxuICAgICAgICAgLy8gICAu6YCJ5Lit55qE5YiG57G76aKc6ImyKCcjMDk4QUMxJylcXFxcbiAgICAgICAgICAgIC7lvIDlp4vmiZPpgKDliIbnsbsoKTtcXFxcbiAgICB9LFxcXFxuICAgIOeUn+aIkOeJh+WNlShkLCBodG1sKSB7XFxcXG4gICAgICAgIGxldCBsaXN0ID0gcGRmYShodG1sLCDliJfooagpO1xcXFxuICAgICAgICBmb3IgKGxldCBqIGluIGxpc3QpIHtcXFxcbiAgICAgICAgICAgIGxldCBpbWcgPSBwZChsaXN0W2pdLCDlm77niYcpO1xcXFxuICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChsaXN0W2pdLCDmoIfpopgpLFxcXFxuICAgICAgICAgICAgICAgIGRlc2M6IHBkZmgobGlzdFtqXSwg5o+P6L+wKSxcXFxcbiAgICAgICAgICAgICAgICBpbWc6IGltZyArICdAUmVmZXJlcj0nICsgaW1nLFxcXFxuICAgICAgICAgICAgICAgIHVybDogcGQobGlzdFtqXSwg6ZO+5o6lKSArIFxcXFxcXFwiI2ltbWVyc2l2ZVRoZW1lI1xcXFxcXFwiXFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAg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AvLyBpbmplY3RJbmRleCDmipjlj6DmjInpkq7mj5LlhaXnrKwgaW5qZWN0SW5kZXgg6KGMXFxcXG4gICAgICAgICAgICBpZiAoaW5qZWN0SW5kZXgpIHtcXFxcbiAgICAgICAgICAgICAgICBpZiAoISh0eXBlb2YgKGluamVjdEluZGV4KSA9PT0gJ251bWJlcicpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFxcXFxcIuaKmOWPoOaMiemSruaPkuWFpeihjOivt+S8oOWFpeaVsOWtl++8gVxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBpZiAoaW5qZWN0SW5kZXggPCAxKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFxcXFxcIuaKmOWPoOaMiemSruaPkuWFpeihjOivt+S8oOWFpeWkp+S6jiAwIOeahOaVtOaVsO+8gVxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBpZiAoaW5qZWN0SW5kZXggPiB0aGlzW3N5bWJvbE1hcC5tRm9sZEluZGV4XSkge1xcXFxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcXFxcXCLmipjlj6DmjInpkq7mj5LlhaXooYzkuI3lvpflpKfkuo7mmL7npLrmipjlj6DooYzmlbDvvIHor7fosIPnlKggLmZvbGRJbmRleChpbmRleCkg5oiWIC7nrKzlh6DooYzlvIDlp4vmipjlj6AoaW5kZXgpIOS8oOWFpeato+ehrueahOaYvuekuuaKmOWPoOihjOaVsFxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tRm9sZExheW91dF0uaW5qZWN0SW5kZXggPSBpbmplY3RJbmRleCB8fCAxO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9IGVsc2U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AgICAgICAgICAgICAgICBzd2l0Y2ggKHVybFJ1bGUucGFyc2VPcHRpb24pIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcXFxcXCJwYXJzZURvbVxcXFxcXFwiOlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFxcXFxcInBkXFxcXFxcXCI6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcXFxcXCJwYXJzZURvbUZvckh0bWxcXFxcXFxcIjpcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcXFxcXCJwZGZoXFxcXFxcXCI6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbUZvckh0bWw7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb207XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHVybFJ1bGVbXFxcXFxcXCLop6PmnpDmlrnms5VcXFxcXFxcIl0pIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoICh1cmxSdWxlW1xcXFxcXFwi6Kej5p6Q5pa55rOVXFxcXFxcXCJdKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXFxcXFwicGFyc2VEb21cXFxcXFxcIjpcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcXFxcXCJwZFxcXFxcXFwiOlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb207XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXFxcXFwicGFyc2VEb21Gb3JIdG1sXFxcXFxcXCI6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXFxcXFwicGRmaFxcXFxcXFwiOlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb21Gb3JIdG1sO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tO1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIHVybCA9IHBhcnNlKHNyYywgbVVybFJ1bGUpO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgaWYgKHVybFJ1bGUuZGVhbFVybCkge1xcXFxuICAgICAgICAgICAgICAgIHVybCA9IHVybFJ1bGUuZGVhbFVybCh1cmwpXFxcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHVybFJ1bGVbJ+S6jOasoeWkhOeQhiddKSB7XFxcXG4gICAgICAgICAgICAgICAgdXJsID0gdXJsUnVsZVsn5LqM5qyh5aSE55CGJ10odXJsKVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgaWYgKHVybFJ1bGUuc3RhcnRzV2l0aChcXFxcXFxcIkBqczpcXFxcXFxcIikpIHtcXFxcbiAgICAgICAgICAgICAgICB1cmwgPSB0aGlzLmV2YWxKU1J1bGUoc3JjLCB1cmxSdWxlKTtcXFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgdXJsID0gcGFyc2V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xcXCJoaWtlcjovL2VtcHR5I25vSGlzdG9yeSNcXFxcXFxcIikubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy5tVGFnICsgcGFyYW1zLlZBUk1BUC5GT0xELCBnZXRNeVZhcihwYXJhbXMubVRhZyArIHBhcmFtcy5WQVJNQVAuRk9MRCwgcGFyYW1zLmlzRm9sZCkgPT09ICcxJyA/ICcwJyA6ICcxJylcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbVRhZzogbVRhZyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc0ZvbGQ6IHRoaXNbc3ltYm9sTWFwLm1Gb2xkXSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBWQVJNQVA6IHRoaXMuVkFSTUFQXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiB0aGlzW3N5bWJvbE1hcC5tRm9sZExheW91dF0uY29sX3R5cGUgfHwgXFxcXFxcXCJzY3JvbGxfYnV0dG9uXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaChmb2xkTGF5b3V0KVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcblxcXFxuICAgICAgICAgICAgICAgIC8v5YW35L2T5YiX6KGo5LiL55qE5YiG57G7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHN1Yl9jY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iB0aXRsZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQodXJsKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdfY2F0ZSA9IFtdXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwYXJhbXMuaW5kZXggPT09IDApIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXAuZm9yRWFjaCgoY2F0ZSwgaW5kZXgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY2F0ZS5wdXNoKGluZGV4ID09PSAwID8gcGFyYW1zLmtleS50b1N0cmluZygpIDogXFxcXFxcXCIwXFxcXFxcXCIpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXBbcGFyYW1zLmluZGV4XSA9IHBhcmFtcy5rZXkudG9TdHJpbmcoKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy50YWcgKyBwYXJhbXMuVkFSTUFQLkNBVEVHT1JZLCBKU09OLnN0cmluZ2lmeShwYXJhbXMuaW5kZXggPT09IDAgPyBuZXdfY2F0ZSA6IHBhcmFtcy5jYXRlX3RlbXApKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMudGFnICsgcGFyYW1zLlZBUk1BUC5VUkwsIGlucHV0KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFZBUk1BUDogdGhpcy5WQVJNQVAsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhZzogbVRhZyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHRoaXNbc3ltYm9sTWFwLm1QYWdlXSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJibGFua19ibG9ja1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGhpc1tzeW1ib2xNYXAubUZvbGRdID09PSAnMCcpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMuZm9yRWFjaCgoaXRlbSwga2V5KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSB0aGlzLmdldFRpdGxlKGl0ZW0sIGNhdGVnb3J5KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHRoaXMuZ2V0VXJsKGl0ZW0sIGNhdGVnb3J5KVxcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tTGF5b3V0XS5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyAn4oCc4oCc4oCd4oCdPGI+PGZvbnQgY29sb3I9JyArIHRoaXNbc3ltYm9sTWFwLm1Db2xvcl0gKyAnPicgKyB0aXRsZSArICcgPC9mb250PjwvYj4nIDogdGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHVybCkubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMudGFnICsgcGFyYW1zLlZBUk1BUC5DQVRFR09SWSwgSlNPTi5zdHJpbmdpZnkocGFyYW1zLmNhdGVfdGVtcCkpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy50YWcgKyBwYXJhbXMuVkFSTUFQLlVSTCwgaW5wdXQpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OiBpbmRleCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVkFSTUFQOiB0aGlzLlZBUk1BUCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFnOiBtVGFnLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogdGhpc1tzeW1ib2xNYXAubVBhZ2VdLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tTGF5b3V0XS5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImJsYW5rX2Jsb2NrXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgIH1cXFxcbiAgICB9LFxcXFxuXFxcXG4gICAg55WM6Z2iKGxheW91dCkge1xcXFxuICAgICAgICByZXR1cm4gdGhpcy5sYXlvdXQobGF5b3V0KVxcXFxuICAgIH0sXFxcXG4gICAg5YiG57G76ZO+5o6lKHRydWVVcmwpIHtcXFxcbiAgICAgICAgcmV0dXJuIHRoaXMudHJ1ZVVybCh0cnVlVXJsKTtcXFxcbiAgICB9LFxcXF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5yZWc7XFxcXG4gICAgICAgICAgICBpZiAodHlwZW9mIHVybEV4cCA9PT0gJ3N0cmluZycpIHtcXFxcbiAgICAgICAgICAgICAgICB1cmxFeHAgPSBuZXcgUmVnRXhwKHVybEV4cClcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGlmICh1cmxFeHAudGVzdCh0aGlzLnBhcmFtcy51cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMucGFyYW1zLmRlYnVnKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxvZyh1cmxFeHAudG9TdHJpbmcoKSlcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgdHJ1ZV91cmwgPSByZWdPYmouZXhlYygpO1xcXFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9XFxcXG4gICAgICAgIGlmICh0cnVlX3VybCkge1xcXFxuICAgICAgICAgICAgcmV0dXJuIHRydWVfdXJsO1xcXFxuICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgcmV0dXJuIHRoaXMucGFyYW1zLnVybFxcXFxuICAgICAgICB9XFxcXG4gICAgfSxcXFxcbiAgICDojrflj5blpITnkIbnu5PmnpwoKSB7XFxcXG4gICAgICAgIHJldHVybiB0aGlzLmV4ZWMoKVxcXFxuICAgIH0sXFxcXG4gICAg6ZO+5o6lKHVybCkge1xcXFxuICAgICAgICByZXR1cm4gdGhpcy5iYXNlVXJsKHVybClcXFxcbiAgICB9LFxcXFxuICAgIOmhteeggShwYWdlKSB7XFxcXG4gICAgICAgIHJldHVybiB0aGlzLnBhZ2UocGFnZSlcXFxcbiAgICB9LFxcXFxuICAgIOaPkuWFpeaWsOWkhOeQhuinhOWImShyZWdFeHApIHtcXFxcbiAgICAgICAgcmV0dXJuIHRoaXMuYWRkRXh0cmEocmVnRXhwKVxcXFxuICAgIH0sXFxcXG4gICAg6LCD6K+V5q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1pdGVtLDMmJlRleHQnKVxcXFxuICAgICAgICAuc3Vic3RyaW5nKDAsIDE4KSArXFxcXG4gICAgICAgICdcXFxcXFxcXG4nICtcXFxcbiAgICAgICAgcGRmaChodG1sLCAnLm1vZHVsZS1pbmZvLWl0ZW0sMSYmVGV4dCcpXFxcXG4gICAgICAgIC5zdWJzdHJpbmcoMCwgMTgpICtcXFxcbiAgICAgICAgJ1xcXFxcXFxcbicgK1xcXFxuICAgICAgICBwZGZoKGh0bWwsICcubW9kdWxlLWluZm8taXRlbSw0JiZUZXh0JyksXFxcXG4gICAgaW1nOiBwZChodG1sLCAnLmxhenlsb2FkJiZkYXRhLW9yaWdpbmFsJykgK1xcXFxuICAgICAgICAnQFJlZmVyZXI9JyxcXFxcbiAgICB1cmw6IE1ZX1VSTCxcXFxcbiAgICBkZXNjOiBwZGZoKGh0bWwsICcubW9kdWxlLWluZm8taXRlbSw1JiZUZXh0JyksXFxcXG4gICAgY29sX3R5cGU6ICdtb3ZpZV8xX3ZlcnRpY2FsX3BpY19ibHVyJ1xcXFxufSk7XFxcXG52YXIg57q/6LevID0gJyN5LXBsYXlMaXN0JiZzcGFuJ1xcXFxudmFyIOmAiembhiA9ICdib2R5JiYubW9kdWxlLXBsYXktbGlzdCdcXFxcbnZhciDnur/ot6/lkI0gPSAnVGV4dCdcXFxcbnZhciDpgInpm4bliJfooaggPSAnYm9keSYmYSdcXFxcbmV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcjovL3BhZ2UvZXJqaT9ydWxlPeaooeadv8K3UScpKS5ydWxlKVxcXFxuc2V0UmVzdWx0KGQpO1xcXCJ9XVwifSIsInRpdGxlIjoi5rWL6K+VIn0=
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement