xiaomianao666

小程序:MyFieldᴰⁿ

Feb 16th, 2023
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@MyFieldᴰⁿ@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiTXlGaWVsZOG0sOKBvyIsImF1dGhvciI6IuaWreW/tSbpgZPplb/prZTmlLkiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IiwidmVyc2lvbiI6NDI5LCJjb2xfdHlwZSI6InRleHRfY2VudGVyXzEiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InRvb2wiLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoi5bel5YW3IiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbi8vbG9nKE1PQklMRV9VQSk7XG4gICAgY29uc3Qge2RlbW9EYXRhLGRlZmF1bHRTZXRzLGZsb29yc30gPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvZGVtb0RhdGE/cnVsZT1NeUZpZWxk4bSw4oG/XCIpO1xuY29uc3Qge2dldE9uZSx1bmlxdWUyLGR1cGxpY2F0ZXN9ID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL3V0aWxzP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbmxldCBzalRlc3QgPVtdO2ZvcihsZXQgaSBpbiBkZW1vRGF0YSl7c2pUZXN0PXNqVGVzdC5jb25jYXQoZGVtb0RhdGFbaV0pfVxudGhpcy5kID0gW107XG5jb25zdCBqeEl0ZW0gPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvanhJdGVtP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbnZhciBSb3V0ZSA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9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ICAgICAgICB0aXRsZUFyci5mb3JFYWNoKChpdCkgPT4ge1xuICAgICAgICAgICAgICAgIGxldCBpID0gdGl0bGVBcnIuaW5kZXhPZihpdCk7XG4gICAgICAgICAgICAgICAgbGV0IGNvZGUgPSB1cmxBcnJbaV18fCcnO1xuICAgICAgICAgICAgICAgIGxldCBvdXRDb2RlID0gKHR5cGVvZihjb2RlKT09PSdzdHJpbmcnKT9jb2RlLnRyaW0oKTpiYXNlNjRFbmNvZGUoY29kZS50b1N0cmluZygpLnRyaW0oKSk7XG4gICAgICAgICAgICAgICAgbGV0IG91dFRpdGxlID0gaXQucmVwbGFjZSgv8J+RiS9nLCcnKTtcbiAgICAgICAgICAgICAgICBpZihvdXRUaXRsZS5zdGFydHNXaXRoKCdodHRwJykmJih0eXBlb2Yob3V0Q29kZSk9PT0ndW5kZWZpbmVkJ3x8IW91dENvZGUpKXtcbiAgICAgICAgICAgICAgICAgICAganhDb2RlLnB1c2gob3V0VGl0bGUrJywnK291dFRpdGxlKTtcbiAgICAgICAgICAgICAgICB9ZWxzZXtcbiAgICAgICAgICAgICAgICAgICAganhDb2RlLnB1c2gob3V0VGl0bGUrJywnK291dENvZGV8fCcnKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgbGV0IG91dFRleHQgPSBqeENvZGUuam9pbignXFxuJyk7XG4gICAgICAgICAgICBsZXQgb3V0UGF0aCA9ICdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2VPdXRfJyttb2RlKycudHh0JztcbiAgICAgICAgICAgIHdyaXRlRmlsZShvdXRQYXRoLG91dFRleHQpO1xuICAgICAgICAgICAgbGV0IHBhc3RlcyA9IGdldFBhc3RlcygpO1xuICAgICAgICAgICAgbGV0IGltcG9ydFVybCA9IHNoYXJlUGFzdGUoYmFzZTY0RW5jb2RlKG91dFRleHQpLHBhc3Rlc1sxXSk7XG4gICAgICAgICAgICBsZXQgaW1wb3J0Q29kZSA9ICfprZTmlq3op6PmnpDlr7zlhaXlj6Pku6TCpcKlJytpbXBvcnRVcmw7XG4gICAgICAgICAgICBjb3B5KGltcG9ydENvZGUpO1xuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aWh+S7tuW3suWvvOWHuuWIsDonK291dFBhdGgrJ1xcbuivt+iHquihjOmAmui/h01U566h55CG5Zmo5p+l55yLJ1xuICAgICAgICB9ZWxzZXtcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/miJHkuI3muIXmpZrkvaDopoHlgZrku4DkuYg/XFxuJyttb2RlO1xuICAgICAgICB9XG4gICAgfSx0aXRsZUFycix1cmxBcnIpLFxufSk7XG5kLnB1c2goe1xuICAgIHRpdGxlOifwn5Ol5a+85YWlVFhUJyxcbiAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXG4gICAgdXJsOiQoKS5ydWxlKCgpPT57XG4gICAgICAgIGxldCBkID0gW107XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTon5a+85YWl6K+05piOJyxcbiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0XzEnLFxuICAgICAgICAgICAgZGVzYzon5pSv5oyB5q2k5o+S5Lu25a+85Ye65qC85byP55qE5paH5pys6L+b6KGM5a+85YWl44CCXFxu5qC85byPMTog5ZCN56ewLOWcsOWdgCDkuIDooYzkuIDkuKrop6PmnpBcXG7moLzlvI8yOuS6keWJquWIh+advyDprZTmlq3op6PmnpDlr7zlhaXlj6Pku6TCpcKl5Ymq5YiH5p2/5Zyw5Z2AJyxcbiAgICAgICAgICAgIHVybDonaGlrZXI6Ly9lbXB0eSdcbiAgICAgICAgfSk7XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICBkZXNjOiBcInR4dOaWh+acrOino+aekOinhOWImSzkuIDooYzkuIDkuKpcIixcbiAgICAgICAgICAgIGNvbF90eXBlOiAnaW5wdXQnLFxuICAgICAgICAgICAgdGl0bGU6J+ino+aekOaWh+acrCcsXG4gICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRWYXIoJ2RuLmltcG9ydF90ZXh0JywgJycpLFxuICAgICAgICAgICAgICAgIHR5cGU6IFwidGV4dGFyZWFcIixcbiAgICAgICAgICAgICAgICBoZWlnaHQ6LTEsXG4gICAgICAgICAgICAgICAgb25DaGFuZ2U6ICdwdXRWYXIoXCJkbi5pbXBvcnRfdGV4dFwiLGlucHV0KSdcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTon8J+TpeWvvOWFpScsXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF9jZW50ZXJfMScsXG4gICAgICAgICAgICB1cmw6JCgn56Gu5a6a57yW6L6R5aW95LqG5ZCXP+atpOaTjeS9nOWwhuimhuebluacrOWcsOW3suacieeahOiusOW9le+8jOW7uuiuruWkh+S7veWQjueUqOepuuaWh+S7tuWvvOWFpScpLmNvbmZpcm0oKCk9PntcbiAgICAgICAgICAgICAgICBjb25zdCB7ZGVmYXVsdFNldHN9ID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL2RlbW9EYXRhP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VSb3V0ZSA9ICdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbic7XG4gICAgICAgICAgICAgICAgbGV0IGpzQ29kZSA9IHJlcXVlc3QocGFyc2VSb3V0ZSl8fEpTT04uc3RyaW5naWZ5KHt0aXRsZTpbXSxjb2Rlczp7fSxzZXR0aW5nczpkZWZhdWx0U2V0c30pO1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsganNDb2RlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WPkeeUn+mUmeivrzpcXG4nK2UubWVzc2FnZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQgdG9JbXBvcnQgPSBnZXRWYXIoXCJkbi5pbXBvcnRfdGV4dFwiKTtcbiAgICAgICAgICAgICAgICBpZigv6a2U5pat6Kej5p6Q5a+85YWl5Y+j5LukwqXCpS8udGVzdCh0b0ltcG9ydCkmJnRvSW1wb3J0LnNwbGl0KCfCpcKlJykubGVuZ3RoPjEpe1xuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gdG9JbXBvcnQuc3BsaXQoJ8KlwqUnKVsxXTtcbiAgICAgICAgICAgICAgICAgICAgaWYoIS9eaHR0cC8udGVzdCh1cmwpKXtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/liarliIfmnb/lnLDlnYDmnInor68s5a+85YWl5aSx6LSlJ1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRvSW1wb3J0ID0gcGFyc2VQYXN0ZSh1cmwpO1xuICAgICAgICAgICAgICAgICAgICB0b0ltcG9ydCA9IGJhc2U2NERlY29kZSh0b0ltcG9ydCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vbG9nKHRvSW1wb3J0KTtcbiAgICAgICAgICAgICAgICBsZXQgamlleGkgPSB0b0ltcG9ydC5zcGxpdCgnXFxuJykuZmlsdGVyKGl0PT5pdC50cmltKCkpO1xuICAgICAgICAgICAgICAgLy8gbG9nKGppZXhpKTtcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VUaXRsZSA9IFtdO1xuICAgICAgICAgICAgICAgIGxldCBwYXJzZUNvZGUgPSB7fTtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpIGluIGppZXhpKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZT1qaWV4aVtpXS5zcGxpdCgnLCcpWzBdO1xuICAgICAgICAgICAgICAgICAgICBsZXQgY29kZT1qaWV4aVtpXS5zcGxpdCgnLCcpWzFdO1xuICAgICAgICAgICAgICAgICAgICBpZighdGl0bGV8fCFjb2RlKXtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZygn6ZSZ6K+v6Kej5p6QOicramlleGlbaV0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZS5wdXNoKHRpdGxlKTtcbiAgICAgICAgICAgICAgICAgICAgLy9sb2codGl0bGUpO1xuICAgICAgICAgICAgICAgICAgICBpZighKGNvZGUucmVwbGFjZSgvW1xcc10vZywnJykuc3RhcnRzV2l0aCgnaHR0cCcpKSl7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2codGl0bGUrJ+S4uuWHveaVsOino+aekCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYoY29kZS5yZXBsYWNlKC9bXFxzXS9nLCcnKS5sZW5ndGg+MjApey8v6KeG5Li6ZnVuY3Rpb25cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlID0gZXZhbChiYXNlNjREZWNvZGUoY29kZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2coY29kZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfWNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvZGUgPSBlLm1lc3NhZ2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZVt0aXRsZV09Y29kZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGV0IHNjT2JqZWN0ID0gW1wiQ2l0eUlQXCIsIFwicGNVQVwiLCBcImNhY2hlTTN1OFwiLCBcImRlZmF1bHRQYXJzZVdlYlwiLFwibWFvc3NcIiwgXCJMTFFcIl07XG4gICAgICAgICAgICAgICAgcGFyc2VUaXRsZSA9IHBhcnNlVGl0bGU/cGFyc2VUaXRsZS5maWx0ZXIoaXQ9PiFzY09iamVjdC5pbmNsdWRlcyhpdCkpOltdO1xuICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAgIHZhciBuZXdQYXJzZVRpdGxlID0ganNvbi50aXRsZS5jb25jYXQocGFyc2VUaXRsZSk7XG4gICAgICAgICAgICAgICAganNvbi50aXRsZSA9IEFycmF5LmZyb20obmV3IFNldChuZXdQYXJzZVRpdGxlKSk7XG4gICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihqc29uLmNvZGVzLCBwYXJzZUNvZGUpO1xuICAgICAgICAgICAgICAgIGxldCBuZXdGaWxlID0gJC5zdHJpbmdpZnkoanNvbik7IC8vSlNPTi5wYXJzZeS8muaKpemUmVxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShwYXJzZVJvdXRlLCBuZXdGaWxlKTtcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suaIkOWKn+WvvOWFpScramlleGkubGVuZ3RoKyfmnaHop6PmnpAnO1xuICAgICAgICAgICAgfSksXG4gICAgICAgICAgICBleHRyYTp7XG4gICAgICAgICAgICAgICAgbGluZVZpc2libGU6dHJ1ZVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgc2V0UmVzdWx0KGQpO1xuICAgIH0pLFxufSk7XG5kLnB1c2goe1xuICAgIHRpdGxlOifimK/vuI/mn6X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Iobm9ybWFsX2xpc3QpO1xuICAgICAgICBsZXQgdmFsdWVfcmVfY3QgPSBub3JtYWxfbGlzdC5sZW5ndGggLSByZU5vckxpc3QubGVuZ3RoOyAvL+S7o+eggemHjeWkjVxuICAgICAgICBsZXQgdmFsdWVzX3JlID0gZHVwbGljYXRlcyhub3JtYWxfbGlzdCk7Ly/ph43lpI3nmoTlgLxcbiAgICAgICAgbGV0IGZ0bGlzdCA9IFtdO1xuICAgICAgICBsZXQgZmxhZ3MgPSB7fTtcbiAgICAgICAgbGV0IG15Rmxvb3JzID0gZmxvb3JzO1xuICAgICAgICBmb3IobGV0IGogaW4gY29kZXMpey8v6YGN5Y6G5omA5pyJXG4gICAgICAgICAgICBsZXQgb25lID0gY29kZXNbal07XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2Yob25lKSAhPT0gJ2Z1bmN0aW9uJyYmdmFsdWVzX3JlLmluY2x1ZGVzKG9uZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiAoZmxhZ3Nbb25lXSkgPT09ICd1bmRlZmluZWQnIHx8ICFmbGFnc1tvbmVdKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvL+WPluWHuuesrOS4gOS4quagh+W/l1xuICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3Nbb25lXSA9IG15Rmxvb3JzWzBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgbXlGbG9vcnMuc3BsaWNlKDAsIDEpOy8v5Yig6Zmk5qCH5b+X5YiX6KGo6YeM55qE56ys5LiA5Liq5YWD57SgXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZnRsaXN0LnB1c2goe2tleTogZmxhZ3Nbb25lXSArIGosIHZhbHVlOiBvbmV9KTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBmdGxpc3QucHVzaCh7a2V5OiBqLCB2YWx1ZTogb25lfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfWNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgbG9nKGUubWVzc2FnZSlcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICAvLyBsb2coSlNPTi5zdHJpbmdpZnkoZmxhZ3MpKTtcbiAgICAgICAgbGV0IG5ld0NvZGVzID0ge307XG4gICAgICAgIGZvcihsZXQgayBpbiBmdGxpc3Qpe1xuICAgICAgICAgICAgbmV3Q29kZXNbZnRsaXN0W2tdLmtleV0gPSBmdGxpc3Rba10udmFsdWU7XG4gICAgICAgIH1cbiAgICAgICAgbGV0IHRpcHMgPSAn5qOA5rWL5Yiw5ZCN56ew5aSN55So6aG555uu5pWwOicra2V5c19yZV9jdCsnLOS7o+eggemHjeWkjemhueebruaVsOmHjzonK3ZhbHVlX3JlX2N0KydcXG7pnIDopoHkuIDplK7miZPkuKrmoIfor4blkJc/5LiN5pSv5oyB6Ieq5Yqo5Yig6ZmkLOaJk+agh+W/l+iHquihjOino+WGsyc7XG4gICAgICAgIHJldHVybiAkKHRpcHMpLmNvbmZpcm0oKHZhbHVlX3JlX2N0LGpzb24sbmV3Q29kZXMscGFyc2VSb3V0ZSk9PntcbiAgICAgICAgICAgIGlmKHZhbHVlX3JlX2N0PDEpe1xuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ml6LnhLbpg73mmK8w5Liq6YeN5aSN6aG555uu5LqG77yM5bCx5LiN6ZyA6KaB5oiR5YGa5LuA5LmI5LqGISdcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNvbXBhcmUoKXtcbiAgICAgICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24gKGEsIGIpe1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB7Zmxvb3JzfSA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9kZW1vRGF0YT9ydWxlPU15RmllbGThtLDigb9cIik7XG4gICAgICAgICAgICAgICAgICAgIGxldCB4ID0gYS5zdWJzdHJpbmcoMCwxKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHkgPSBiLnN1YnN0cmluZygwLDEpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmxvb3JzLmluZGV4T2YoeSktZmxvb3JzLmluZGV4T2YoeCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAganNvbi5jb2RlcyA9IG5ld0NvZGVzO1xuICAgICAgICAgICAgbGV0IHRpdGxlcyA9IE9iamVjdC5rZXlzKG5ld0NvZGVzKTtcbiAgICAgICAgICAgIHRpdGxlcyA9IHRpdGxlcy5zb3J0KGNvbXBhcmUoKSk7XG4gICAgICAgICAgICBqc29uLnRpdGxlID0gdGl0bGVzO1xuICAgICAgICAgICAgdmFyIG5ld0ZpbGUgPSAkLnN0cmluZ2lmeShqc29uKTsgLy9KU09OLnBhcnNl5Lya5oql6ZSZXG4gICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgbmV3RmlsZSk7XG4gICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5LiA6ZSu5omT5LiK5qCH5b+XJztcbiAgICAgICAgfSx2YWx1ZV9yZV9jdCxqc29uLG5ld0NvZGVzLHBhcnNlUm91dGUpXG4gICAgfSx1bmlxdWUyLGR1cGxpY2F0ZXMsZmxvb3JzKSxcbn0pO1xuZC5wdXNoKHtcbiAgICB0aXRsZTpcIvCflITph43nva5C56uZVUFcIixcbiAgICBjb2xfdHlwZTogXCJzY3JvbGxfYnV0dG9uXCIsXG4gICAgdXJsOiBcImh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS9cIixcbiAgICBleHRyYToge1xuICAgICAgICB1YTogUENfVUFcbiAgICB9XG59KTtcbmQucHVzaCh7XG4gICAgdGl0bGU6XCLwn5eR77iP5om56YeP5pON5L2cXCIsXG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ICAgbWFyZ2luLXRvcDotMTBweDtcXG4gICAgICAgIH1cXG4gICAgICAgICN0aXBze1xcbiAgICAgICAgICAgIG1hcmdpbi10b3A6LTEwcHg7XFxuICAgICAgICAgICAgbWFyZ2luLWJvdHRvbTo1cHg7XFxuICAgICAgICB9XFxuICAgICAgICAuZnVuZ3tcXG4gICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlclxcbiAgICAgICAgfVxcbiAgICAgICAgZGl2LmJveCB7XFxuICAgICAgICAgICAgbWFyZ2luLXRvcDotMXB4O1xcbiAgICAgICAgICAgIGhlaWdodDogNDNweDtcXG4gICAgICAgICAgICBsaW5lLWhlaWdodDogMjBweDtcXG4gICAgICAgIH1cXG4gICAgICAgIC8q6L6T5YWl5qGG5bC65a+4Ki9cXG4gICAgICAgIGZvcm0ge1xcbiAgICAgICAgICAgIGJhY2tncm91bmQ6IHRyYW5zcGFyZW50O1xcbiAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcXG4gICAgICAgICAgICB3aWR0aDogMTAwJTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGlucHV0LCBsYWJlbCwgc2VsZWN0IHtcXG4gICAgICAgICAgICBib3JkZXI6IG5vbmU7XFxuICAgICAgICAgICAgb3V0bGluZTogbm9uZTtcXG4gICAgICAgIH1cXG4gICAgICAgIC8q5a2X5L2T5L2N572uKi9cXG4gICAgICAgIGlucHV0IHtcXG4gICAgICAgICAgICB3aWR0aDogNzclO1xcbiAgICAgICAgICAgIGhlaWdodDogMzJweDtcXG4gICAgICAgICAgICBwYWRkaW5nLWxlZnQ6IDY2cHg7XFxuICAgICAgICAgICAgcGFkZGluZy1yaWdodDogMHB4O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgbGFiZWwge1xcbiAgICAgICAgICAgIHRleHQtYWxpZ246Y2VudGVyO1xcbiAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiA0M3B4O1xcbiAgICAgICAgICAgIGhlaWdodDogNDBweDtcXG4gICAgICAgICAgICB3aWR0aDogNjBweDtcXG4gICAgICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XFxuICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgLyrlsI/moYYqL1xcbiAgICAgICAgLmJhciBsYWJlbCB7XFxuICAgICAgICAgICAgLypiYWNrZ3JvdW5kOiAjRDA2QjZDOyovXFxuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNXB4IDU1NXB4IDU1NXB4IDVweDtcXG4gICAgICAgICAgICB3aWR0aDogNjBweDtcXG4gICAgICAgICAgICBmb250LXNpemU6IDEzcHg7XFxuICAgICAgICAgICAgdG9wOiAwO1xcbiAgICAgICAgICAgIGxlZnQ6IDNweDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIC8q6L6T5YWl5qGG5qC35byPKi9cXG4gICAgICAgIC5iYXIgaW5wdXQge1xcbiAgICAgICAgICAgIC8qYm9yZGVyLXJhZGl1czogNXB4IDU1NXB4IDU1NXB4IDVweDtcXG4gICAgICAgICAgICAgKi9cXG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA0cHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICAvKuWIl+ihqCovXFxuICAgICAgICBzZWxlY3Qge1xcbiAgICAgICAgICAgIHRleHQtYWxpZ246Y2VudGVyO1xcbiAgICAgICAgICAgIGxpbmUtaGVpZ2h0OjQwcHg7XFxuICAgICAgICAgICAgaGVpZ2h0OiA0MHB4O1xcbiAgICAgICAgICAgIHdpZHRoOiAyMHB4O1xcbiAgICAgICAgICAgIGN1cnNvcjogcG9pbnRlcjtcXG4gICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICAvKuWIl+ihqCovXFxuICAgICAgICAubGllYiBzZWxlY3R7XFxuICAgICAgICAgICAgLypib3JkZXItcmFkaXVzOiA0cHg7Ki9cXG4gICAgICAgICAgICBib3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WVSb3V0ZSxKU09OLnN0cmluZ2lmeSh7bm93X3RoZW1lOifpu5jorqTkuLvpopgnLHRoZW1lczpbdGhlbWVzLHRoZW1lRGVmXX0pKVxcbiAgICB9XFxuICAgIHRyeSB7XFxuICAgICAgICBsZXQgbXlUaGVtZXMgPSBKU09OLnBhcnNlKGZiYS5mZXRjaCh0aGVtZVJvdXRlKSk7XFxuICAgICAgICBsZXQgbm93VGhlbWUgPSBteVRoZW1lcy50aGVtZXMuZmlsdGVyKGl0PT5pdC5uYW1lID09PSBteVRoZW1lcy5ub3dfdGhlbWUpO1xcbiAgICAgICAgdGhlbWVzID0gbm93VGhlbWU/bm93VGhlbWVbMF06bXlUaGVtZXMudGhlbWVzWzBdO1xcbiAgICB9Y2F0Y2ggKGUpIHt9XFxuXFxuICAgIC8vIOaWreW/teWIneWni+WMlumDqOWIhlxcbiAgICBjb25zdCBhbGxBcGk9WydodHRwczovL3Rlc3Qucm9uZ3hpbmd2ci5jb20vdGVzdC8/dXJsPScsJ2h0dHA6Ly9jYWNoZS5sYW5ndWFuZy5pY3U6ODgvZGlkaS5waHA/dXJsPSddO1xcbiAgICB2YXIgc2V0dGluZ3MgPSB7XFxuICAgICAgICBxeTogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICB5azogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICB0eDogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICBtZzogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICBibDogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICBzaDogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICB4ZzogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICAvLyBhbDogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICBwcDogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICBtaTogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICBsZTogJ+S4h+iDveino+aekOKSvycsXFxuICAgICAgICBsdDogJ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XJzZScsICducGFyc2UnXTtcXG4gICAgICAgIG15U2VsZWN0ID0gbmV3Q29uZmlnLnRpdGxlLmZpbHRlcihjb21wYXJlKHljVGl0bGUpKTtcXG4gICAgICAgIC8vIG15U2VsZWN0ID0gbXlTZWxlY3QubWFwKChpdCk9PntcXG4gICAgICAgIC8vICAgICBsZXQgZmxhZyA9ICfik4onO1xcbiAgICAgICAgLy8gICAgIGlmKHR5cGVvZihuZXdDb25maWcuY29kZXNbaXRdKT09PSdmdW5jdGlvbicpe1xcbiAgICAgICAgLy8gICAgICAgICBmbGFnID0gJ+KSvyc7XFxuICAgICAgICAvLyAgICAgfWVsc2UgaWYodHlwZW9mKG5ld0NvbmZpZy5jb2Rlc1tpdF0pPT09J3VuZGVmaW5lZCcpe1xcbiAgICAgICAgLy8gICAgICAgICBmbGFnID0gJyc7XFxuICAgICAgICAvLyAgICAgfVxcbiAgICAgICAgLy8gICAgIHJldHVybiBmbGFnK2l0XFxuICAgICAgICAvLyB9KTtcXG4gICAgfVxcbiAgICAvL2ZiYS5sb2coSlNPTi5zdHJpbmdpZnkobXlTZWxlY3QpKTtcXG5cXG4gICAgbGV0IG9wdGlvbnMgPSBbXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon54ix5aWH6Im6JyxcXG4gICAgICAgICAgICBpZDoncXknLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnF5LFxcbiAgICAgICAgICAgIHBsYWNlaG9sZGVyOiforr7nva7niLHlpYfoibonXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+S8mOmFtycsXFxuICAgICAgICAgICAgaWQ6J3lrJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy55a1xcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifohb7orq8nLFxcbiAgICAgICAgICAgIGlkOid0eCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MudHhcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon6IqS5p6cJyxcXG4gICAgICAgICAgICBpZDonbWcnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLm1nXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+WTlOWTqeWTlOWTqScsXFxuICAgICAgICAgICAgaWQ6J2JsJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5ibFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifmkJzni5AnLFxcbiAgICAgICAgICAgIGlkOidzaCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3Muc2hcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon6KW/55OcJyxcXG4gICAgICAgICAgICBpZDoneGcnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnhnXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J1BQVFYnLFxcbiAgICAgICAgICAgIGlkOidwcCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MucHBcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5ZKq5ZKVJyxcXG4gICAgICAgICAgICBpZDonbWknLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLm1pXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+S5kOinhicsXFxuICAgICAgICAgICAgaWQ6J2xlJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5sZVxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOicxOTA1JyxcXG4gICAgICAgICAgICBpZDonb25lJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5vbmVcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon6aOO6KGMJyxcXG4gICAgICAgICAgICBpZDonZnVuJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5mdW5cXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon6b6Z6IW+JyxcXG4gICAgICAgICAgICBpZDonbHQnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLmx0XFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+S6uuS6uui/tycsXFxuICAgICAgICAgICAgaWQ6J3JyJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5yclxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifkupTmr5InLFxcbiAgICAgICAgICAgIGlkOid3ZCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3Mud2RcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5YW25LuWJyxcXG4gICAgICAgICAgICBpZDonb3RoJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5vdGhcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5YWo5bGAJyxcXG4gICAgICAgICAgICBpZDoncWp1JyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5xanVcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5o+S5Lu2JyxcXG4gICAgICAgICAgICBpZDonY2onLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLmNqXFxuICAgICAgICB9LFxcbiAgICBdO1xcblxcbiAgICBmdW5jdGlvbiBEaWQoaWQpe1xcbiAgICAgICAgcmV0dXJuIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKGlkKTtcXG4g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NhbmNlbCgpe1xcbiAgICAgICAgaWYoIW15U2V0KXtcXG4gICAgICAgICAgICBmYmEud3JpdGVGaWxlKG9sZFJvdXRlLCBKU09OLnN0cmluZ2lmeShzZXR0aW5ncywgbnVsbCwgNCkpO1xcbiAgICAgICAgICAgIGZiYS5yZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgIGZiYS5iYWNrKGZhbHNlKTtcXG4gICAgICAgIH1cXG4gICAgfVxcbiAgICBmdW5jdGlvbiBjbGlja21lKG1zZyxkdXJhdGlvbix0aXRsZSl7XFxuICAgICAgICB0cnl7XFxuICAgICAgICAgICAgZm9yKGxldCBrZXkgaW4gc2V0dGluZ3Mpe1xcbiAgICAgICAgICAgICAgICAvLyBmYmEubG9nKERpZChrZXkpKycnK2tleSk7XFxuICAgICAgICAgICAgICAgIHRyeXtcXG4gICAgICAgICAgICAgICAgICAgIC8vc2V0dGluZ3Nba2V5XSA9IERpZChrZXkpLnZhbHVlLnJlcGxhY2UoL+KTinzikr8vZywnJyk7XFxuICAgICAgICAgICAgICAgICAgICBzZXR0aW5nc1trZXldID0gRGlkKGtleSkudmFsdWU7XFxuICAgICAgICAgICAgICAgIH1jYXRjaChlKXtcXG4gICAgICAgICAgICAgICAgICAgIGFsZXJ0KFxcXCLmnKrojrflj5bliLDoioLngrk6XFxcIitrZXkrXFxcIlxcXFxuXFxcIitlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmKG15U2VsZWN0KXtcXG4gICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihuZXdDb25maWcuc2V0dGluZ3MsIHNldHRpbmdzKTtcXG4gICAgICAgICAgICAgICAgZmJhLndyaXRlRmlsZShuZXdSb3V0ZSwgJCQkLnN0cmluZ2lmeShuZXdDb25maWcpKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgZmJhLndyaXR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oKSwgayk7XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gbmV3U3RyaW5nO1xcbiAgICB9LFxcbiAgICBub3dEYXRlOiBmdW5jdGlvbigpIHtcXG4gICAgICAgIHZhciBkYXRlMSA9IG5ldyBEYXRlKCk7XFxuICAgICAgICB2YXIgZGF0ZVN0ciA9IFxcXCJcXFwiO1xcbiAgICAgICAgaWYgKGRhdGUxKSB7XFxuICAgICAgICAgICAgZGF0ZVN0ciA9IGRhdGUxLmdldEZ1bGxZZWFyKCk7XFxuICAgICAgICAgICAgdmFyIG1vbnRoID0gZGF0ZTEuZ2V0TW9udGgoKSArIDE7XFxuICAgICAgICAgICAgdmFyIGRheSA9IGRhdGUxLmdldERhdGUoKTtcXG4gICAgICAgICAgICBpZiAobW9udGggPCAxMCkge1xcbiAgICAgICAgICAgICAgICBkYXRlU3RyICs9IFxcXCItMFxcXCIgKyBtb250aDtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBkYXRlU3RyICs9IFxcXCItXFxcIiArIG1vbnRoO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAoZGF5IDwgMTApIHtcXG4gICAgICAgICAgICAgICAgZGF0ZVN0ciArPSBcXFwiLTBcXFwiICsgZGF5O1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGRhdGVTdHIgKz0gXFxcIi1cXFwiICsgZGF5O1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiBkYXRlU3RyO1xcbiAgICB9LFxcbiAgICBub3dEYXRlU3RyOmZ1bmN0aW9uICgpeyAvLyDliKnnlKgk5bel5YW36I635Y+W5qC85byP5YyW5ZCO55qE5b2T5YmN5pe26Ze0XFxuICAgICAgICByZXR1cm4gICQuZGF0ZUZvcm1hdChuZXcgRGF0ZSgpLFxcXCJ5eXl5LU1NLWRkIEhIOm1tOnNzXFxcIik7XFxuICAgIH0sXFxuICAgIHRvSlNPTjogZnVuY3Rpb24oanNvbikge1xcbiAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KGpzb24sIChrZXksIHZhbHVlKSA9PiB7XFxuICAgICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSA9PSAnZnVuY3Rpb24nKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZS50b1N0cmluZygpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCA0KTtcXG4gICAgfSxcXG4gICAgdG9WTnVtOiBmdW5jdGlvbihhKSB7XFxuICAgICAgICB2YXIgYSA9IGEudG9TdHJpbmcoKTtcXG4gICAgICAgIHZhciBjID0gYS5zcGxpdCgnLicpO1xcbiAgICAgICAgdmFyIG51bV9wbGFjZSA9IFtcXFwiXFxcIiwgXFxcIjBcXFwiLCBcXFwiMDBcXFwiLCBcXFwiMDAwXFxcIiwgXFxcIjAwMDBcXFwiXSxcXG4gICAgICAgICAgICByID0gbnVtX3BsYWNlLnJldmVyc2UoKTtcXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgYy5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgIHZhciBsZW4gPSBjW2ldLmxlbmd0aDtcXG4gICAgICAgICAgICBjW2ldID0gcltsZW5dICsgY1tpXTtcXG4gICAgICAgIH1cXG4gICAgICAgIHZhciByZXMgPSBjLmpvaW4oJycpO1xcbiAgICAgICAgcmV0dXJuIHJlcztcXG4gICAgfSxcXG4gICAgY3ByVmVyc2lvbjogZnVuY3Rpb24oYSwgYikge1xcbiAgICAgICAgdmFyIF9hID0gcGFyc2VJbnQodGhpcy50b1ZOdW0oYSkpLFxcbiAgICAgICAgICAgIF9iID0gcGFyc2VJbnQodGhpcy50b1ZOdW0oYikpO1xcbiAgICAgICAgYiA9IGlzTmFOKF9iKSA/IHZlcnNpb24gOi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HZhciBjb25maWdfYiA9IGNvbmZpZ19hLmxlbmd0aDtcXG4gICAgICAgIGlmICh0b2tlbiA9PSAweDEpIHtcXG4gICAgICAgICAgICB2YXIgY29uZmlnX3VybCA9IGF0b2IoY29uZmlnX3VybCk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHZhciBjb25maWdfdXJsID0gZW5jb2RlVVJJQ29tcG9uZW50KGNvbmZpZ191cmwpO1xcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIGNvbmZpZ19jID0gY29uZmlnX3VybC5sZW5ndGg7XFxuICAgICAgICBmb3IgKGkgPSAweDA7IGkgPCAweDEwMDsgaSsrKSB7XFxuICAgICAgICAgICAgdGVtW2ldID0gY29uZmlnX2FbaSAlIGNvbmZpZ19iXS5jaGFyQ29kZUF0KCk7XFxuICAgICAgICAgICAgY29uZmlnX2FycnlbaV0gPSBpO1xcbiAgICAgICAgfVxcbiAgICAgICAgZm9yIChqID0gaSA9IDB4MDsgaSA8IDB4MTAwOyBpKyspIHtcXG4gICAgICAgICAgICBqID0gKGogKyBjb25maWdfYXJyeVtpXSArIHRlbVtpXSkgJSAweDEwMDtcXG4gICAgICAgICAgICB0bXAgPSBjb25maWdfYXJyeVtpXTtcXG4gICAgICAgICAgICBjb25maWdfYXJyeVtpXSA9IGNvbmZpZ19hcnJ5W2pdO1xcbiAgICAgICAgICAgIGNvbmZpZ19hcnJ5W2pdID0gdG1wO1xcbiAgICAgICAgfVxcbiAgICAgICAgZm9yIChhID0gaiA9IGkgPSAweDA7IGkgPCBjb25maWdfYzsgaSsrKSB7XFxuICAgICAgICAgICAgYSA9IChhICsgMHgxKSAlIDB4MTAwO1xcbiAgICAgICAgICAgIGogPSAoaiArIGNvbmZpZ19hcnJ5W2FdKSAlIDB4MTAwO1xcbiAgICAgICAgICAgIHRtcCA9IGNvbmZpZ19hcnJ5W2FdO1xcbiAgICAgICAgICAgIGNvbmZpZ19hcnJ5W2FdID0gY29uZmlnX2Fycnlb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XFxuICAgICAgICBjb25zdCBsc2c9JC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvbG9jYWxTdG9yYWdlP3J1bGU96YGT6ZW/5LuT5bqTUHJvXFxcIik7XFxuICAgICAgICByZXR1cm4gcGFyc2VJbnQobHNnLmdldEl0ZW0oJ3RpbWVvdXQnLCAnNTAwMCcpKTsgIC8v6LaF5pe2XFxuICAgIH0sXFxuICAgIOa6kOeggeWMuemFjTpmdW5jdGlvbiAodmlwVXJsLHJlZ2V4LHBvcyxoZWFkZXJzKXtcXG4gICAgICAgIGlmKCFyZWdleHx8IXZpcFVybCl7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+ino+aekOaSreaUvumTvuaOpeWSjOato+WImeWMuemFjeWtl+espuS4suW/heWhqyEnXFxuICAgICAgICB9XFxuICAgICAgICBpZigoIXBvcyYmcG9zIT09MCl8fChwb3MmJnR5cGVvZihwb3MpIT1cXFwibnVtYmVyXFxcIikpey8vbWF0Y2jljLnphY3kvY3nva5cXG4gICAgICAgICAgICBwb3MgPSAxXFxuICAgICAgICB9XFxuICAgICAgICBoZWFkZXJzID0gaGVhZGVyc3x8e307XFxuICAgICAgICBoZWFkZXJzWydVc2VyLUFnZW50J10gPSBoZWFkZXJzWydVc2VyLUFnZW50J118fE1PQklMRV9VQTtcXG4gICAgICAgIGxldCBodG1sID0gZmV0Y2godmlwVXJsLCB7aGVhZGVyczpoZWFkZXJzLHRpbWVvdXQ6dGhpcy50aW1lT3V0KCl9KTtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgbGV0IHJlYWxVcmwgPSBodG1sLm1hdGNoKG5ldyBSZWdFeHAocmVnZXgpKVtwb3NdO1xcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmlzVmlkZW8ocmVhbFVybCk7XFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgbG9nKGUubWVzc2FnZSk7XFxuICAgICAgICAgICAgcmV0dXJuIHZpcFVyb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ICAgICAgICAgIC8vbG9nKHBsYXlVcmxzKTtcXG4gICAgICAgICAgICBjb25zdCB7TGF6eVBhcnNlRmFzdH0gPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9nbG9iYWxQYXJzZT9ydWxlPemBk+mVv+S7k+W6k1BybycpO1xcbiAgICAgICAgICAgIGxldCByZXQgPSBMYXp5UGFyc2VGYXN0KHBsYXlVcmxzLHRpbWVvdXQsdGltZW91dCk7XFxuICAgICAgICAgICAgaWYodHlwZW9mKHJldCk9PT0nb2JqZWN0JyYmcmV0Lmxlbmd0aD4wKXtcXG4gICAgICAgICAgICAgICAgLy9yZXR1cm4gcmV0WzBdXFxuICAgICAgICAgICAgICAgIC8vbG9nKHJldCk7XFxuICAgICAgICAgICAgICAgIGxldCB2ID0gZ2V0QXBwVmVyc2lvbigpO1xcbiAgICAgICAgICAgICAgICBpZihwYXJzZUludCh2KT49MjE5NCYmcmV0Lmxlbmd0aD4xKXtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB1cmxzID0gQXJyYXkuZnJvbShuZXcgU2V0KHJldCkpO1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZXM9dXJscy5tYXAoKGl0LGlkKT0+aXQuc3BsaXQoXFxcIuKYhVxcXCIpLmxlbmd0aD4xP2l0LnNwbGl0KFxcXCLimIVcXFwiKVsxXTpcXFwi57q/6LevOlxcXCIrcGFyc2VJbnQoaWQrMSkpO1xcbiAgICAgICAgICAgICAgICAgICAgdXJscz11cmxzLm1hcChpdD0+aXQuc3BsaXQoXFxcIuKYhVxcXCIpWzBdKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBoZWFkZXJzID0gdXJscy5tYXAoKGl0KT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCEvOy8udGVzdChpdCl8fGl0LnNwbGl0KCc7JykubGVuZ3RoPDIpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge31cXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhlYWQgPSBpdC5zcGxpdCgnOycpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighL0AvLnRlc3QoaGVhZCl8fCEve3x9Ly50ZXN0KGhlYWQpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7fVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWQ9aGVhZC5zcGxpdChcXFwie1xcXCIpWzFdLnNwbGl0KFxcXCJ9XFxcIilbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vaGVhZCA9IGhlYWQucmVwbGFjZSgve3x9L2csJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkID0gaGVhZC5zcGxpdCgnJiYnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG9iaiA9IHt9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGkgaW4gaGVhZCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQga2V5ID0gaGVhZFtpXS5zcGxpdCgnQCcpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gaGVhZFtpXS5zcGxpdCgnQCcpWzFdLnJlcGxhY2UoLzsvLCfvvJvvvJsnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9ialtrZXldID0gdmFsdWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9ialxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgdXJscyA9IHVybHMubWFwKChpdCk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdHVybD1pdC5zcGxpdCgnOycpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0LmluY2x1ZGVzKFxcXCIjaXNWaWRlbz10cnVlI1xcXCIpJiYhdHVybC5pbmNsdWRlcyhcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR1cmwrPVxcXCIjaXNWaWRlbz10cnVlI1xcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0dXJsXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7dXJsczp1cmxzLGhlYWRlcnM6aGVhZGVycyxuYW1lczpuYW1lc30pO1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXRbMF0uc3BsaXQoXFxcIuKYhVxcXCIpWzBdXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHJldFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgIGNvbnN0IHtsYXp5UGFyc2V9ID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvZ2xvYmFsUGFyc2U/cnVsZT3pgZPplb/ku5PlupNQcm8nKTtcXG4gICAgICAgICAgICBsZXQgeDVQbGF5PWxhenlQYXJzZShwbGF5VXJsLHRpbWVvdXQpO1xcbiAgICAgICAgICAgIGlmKHR5cGVvZih4NVBsYXkpPT1cXFwidW5kZWZpbmVkXFxcInx8IXg1UGxheSl7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/pgZPplb/ku5PlupPop6PmnpDlpLHotKVcXFwiXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxldCB0aXBzPS94NVJ1bGV8d2ViUnVsZS8udGVzdCh4NVBsYXkpP1xcXCJ4NS93ZWLlhY3ll4XlvIDlp4tcXFwiOlxcXCLmnoHpgJ/lhY3ll4XmjqLlrozmr5XvvIzlnLDlnYA6XFxcIisoL15odHRwLy50ZXN0KHg1UGxheSk/eDVQbGF5OifpnZ7mraPluLjpk77mjqUnKTtcXG4gICAgICAgICAgICBsb2codGlwcyk7XFxuICAgICAgICAgICAgcmV0dXJuIHg1UGxheTtcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgXFxcIm1hb3NzXFxcIjpcXG4gICAgICAgIGZ1bmN0aW9uIChqeHVybCwgcmVmLCBrZXkpIHtcXG4gICAgICAgICAgICByZXR1cm4gdGhpcy7njKsoanh1cmwsIHJlZiwga2V5KVxcbiAgICAgICAgfSxcXG4gICAg5YWN5ZeFOmZ1bmN0aW9uKHZpcFVybCxrKXtcXG4gICAgICAgIGs9a3x8W1xcXCJ1cmxcXFwiLFxcXCJkYXRhLnVybFxcXCJdO1xcbiAgICAgICAgdHJ5e1xcbiAgICAgICAgICAgIGxldCByanNvbj1KU09OLnBhcnNlKGZldGNoKHZpcFVybCkpO1xcbiAgICAgICAgICAgIC8vbG9nKHJqc29uKTtcXG4gICAgICAgICAgICBsZXQgcmVhbFVybD0nJztcXG4gICAgICAgICAgICBpZih0eXBlb2Yoayk9PSdzdHJpbmcnKXtcXG4gICAgICAgICAgICAgICAgcmVhbFVybD1ldmFsKGByanNvbi4ke2t9YCk7XFxuICAgICAgICAgICAgfWVsc2UgaWYoQXJyYXkuaXNBcnJheShrKSl7XFxuICAgICAgICAgICAgICAgIGZvcihsZXQgaSBvZiBrKXtcXG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKGkpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVhbFVybD1ldmFsKGByanNvbi4ke2l9YCk7XFxuICAgICAgICAgICAgICAgICAgICBpZihyZWFsVXJsKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZihyZWFsVXJsLnN0YXJ0c1dpdGgoJy8nKSl7XFxuICAgICAgICAgICAgICAgIHJlYWxVcmwgPSAnaHR0cHM6Ly8nK3JlYWxVcmw7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmlzVmlkZW8ocmVhbFVybCl8fFxcXCJcXFwiO1xcbiAgICAgICAgfWNhdGNoKGUpe1xcbiAgICAgICAgICAgIGxvZyhlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgIHJldHVybiBcXFwiXFxcIlxcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICBYNTpmdW5jdGlvbih2aXBVcmwscmVmKXsvLyBodHRwczovL2FwaS41Mnd5Yi5jb20vd2ViY2xvdWQvP3Y9aHR0cDovL3ZpcC4xOTA1LmNvbS9wbGF5LzY5MTk0MC5zaHRtbCBodHRwOi8vd3d3LmNkY2VyLm5ldC9cXG4gICAgICAgIGxldCBfeDUgPSAkLnRvU3RyaW5nKCh2aXBVcmwpID0+IHtcXG4gICAgICAgICAgICBpZighbG9jYXRpb24uaHJlZi5pbmNsdWRlcyh2aXBVcmwpKXtcXG4gICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZiA9IHZpcFVybDtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYod2luZG93LmNvdW50ID09IG51bGwpe1xcbiAgICAgICAgICAgICAgICB3aW5kb3cuY291bnQ9MTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgd2luZG93LmNvdW50Kys7XFxuICAgICAgICAgICAgaWYoIHdpbmRvdy5jb3VudCA+PSAyMCl7XFxuICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcIuacquiOt+WPluWIsOi1hOa6kOWcsOWdgO+8jOi3s+WIsOino+aekOmhtVxcXCIpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdmlwVXJsXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHZhciB1cmxzID0gX2dldFVybHMoKTtcXG4gICAgICAgICAgICBmb3IgKHZhciBpIGluIHVybHMpIHtcXG4gICAgICAgICAgICAgICAgaWYgKCEvcGxheW0zdTh8bTN1OFxcXFwudHYvLnRlc3QodXJsc1tpXSkgJiYgdXJsc1tpXS5tYXRjaCgvXFxcXC5tcDN8XFxcXC5tcDR8XFxcXC5tM3U4fFxcXFwuZmx2LykpIHtcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5sb2codXJsc1tpXSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsc1tpXVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSx2aXBVcmwpO1xcbiAgICAgICAgbGV0IHBsYXlVcmwgPSByZWY/cmVmOnZpcFVybDtcXG4gICAgICAgIGxldCB4NVVybCA9ICd3ZWJSdWxlOi8vJytwbGF5VXJsKyAnQCcgK194NTtcXG4gICAgICAgIHNob3dMb2FkaW5nKCfprZTmlq0uanPll4XmjqLkuK0uLi4nKTtcXG4gICAgICAgIHJldHVybiB4NVVybFxcbiAgICB9LFxcbiAgICAn6YGT6ZW/JzpmdW5jdGlvbiAodmlwVXJsKXtcXG4gICAgICAgIGV2YWxQcml2YXRlSlMoJ3pTV3ZlK2VlQTZpTCtmMmZHVEkrMXBSOGpuTGQwU2l5VjZ5dmdjUE1Xd0JNUDVhWXBxaFRGYklTeG52aGIwYmQ1VmdpenlVTUhlNGRtc25HaFdMQmtxZmI1SGZOYklXNE1CTXh6THBQLzlUak5UOFNJUUFmamRUajRQOG9YMzVla0tOdkdWeERvbHlmY1lycG9Ld05vUT09Jyk7XFxuICAgICAgICByZXR1cm4gdGhpcy7lhY3ll4UodmlwVXJsKycmc2VjcmV0PScrc2VjcmV0KVxcbiAgICB9LFxcbiAgICAn54yrJzpmdW5jdGlvbiAoanh1cmwsIHJlZiwga2V5KSB7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHZhciBnZXRWaWRlb0luZm8gPSBmdW5jdGlvbiAodGV4dCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdG9vbHMuQUVTKHRleHQsIGtleSwgaXYpO1xcbiAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgbGV0IGhlYWRlcnMgPSB7aGVhZGVyczoge1xcXCJSZWZlcmVyXFxcIjogcmVmfHwnJ319O1xcbiAgICAgICAgICAgIGtleSA9IGtleSA9PSB1bmRlZmluZWQgPyBcXFwiZHZ5WVJRbG5QUkNNZFFTZVxcXCIgOiBrZXk7XFxuICAgICAgICAgICAgdmFyIGh0bWwgPSByZWY/cmVxdWVzdChqeHVybCwgaGVhZGVycyk6cmVxdWVzdChqeHVybCk7XFxuICAgICAgICAgICAgaWYgKC8mYnR3YWY9Ly50ZXN0KGh0bWwpKSB7XFxuICAgICAgICAgICAgICAgIGh0bWwgPSByZXF1ZXN0KGp4dXJsICsgXFxcIiZidHdhZlxcXCIgKyBodG1sLm1hdGNoKC8mYnR3YWYoLio/KVxcXCIvKVsxXSwgaGVhZGVycyk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHZhciBpdiA9IGh0bWwuc3BsaXQoXFxcIl90b2tlbiA9IFxcXFxcXFwiXFxcIilbMV0uc3BsaXQoXFxcIlxcXFxcXFwiXFxcIilbMF07XFxuICAgICAgICAgICAgZXZhbChodG1sLm1hdGNoKC92YXIgY29uZmlnID0ge1tcXFxcc1xcXFxTXSo/fS8pWzBdICsgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgIGlmICghL15odHRwLy50ZXN0KGNvbmZpZy51cmwpKSB7XFxuICAgICAgICAgICAgICAgIGNvbmZpZy51cmwgPSBkZWNvZGVVUklDb21wb25lbnQodG9vbHMuQUVTKGNvbmZpZy51cmwsIGtleSwgaXYpKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIGNvbmZpZy51cmw7XFxuICAgICAgICB9XFxuICAgICAgICBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIC8vIHJldHVybiBcXFwiXFxcIjtcXG4gICAgICAgICAgICByZXR1cm4ganh1cmw7XFxuICAgICAgICB9XFxuICAgIH0sXFxuICAgIExMUTogZnVuY3Rpb24oanh1cmwpIHtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgdmFyIGFwaSA9IGp4dXJsLnNwbGl0KCc/dXJsPScpWzBdICsgXFxcImFwaS5waHBcXFwiO1xcbiAgICAgICAgICAgIHZhciBiNjRpZCA9IGJhc2U2NEVuY29kZShqeHVybC5zcGxpdCgndXJsPScpWzFdKTtcXG4gICAgICAgICAgICB2YXIgcGFyc2VpZCA9IHRvb2xzLmNhZXNhckNpcGhlcihiNjRpZCwgLTEpO1xcbiAgICAgICAgICAgIHZhciBqc29uID0gSlNPTi5wYXJzZShyZXF1ZXN0KGFwaSwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAnUmVmZXJlcic6IGp4dXJsXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnLFxcbiAgICAgICAgICAgICAgICBib2R5OiAndXJsPScgKyBwYXJzZWlkXFxuICAgICAgICAgICAgfSkpO1xcbiAgICAgICAgICAgIHVybCA9IChqc29uLmNvZGUgPT0gMjAwID8gYmFzZTY0RGVjb2RlKHRvb2xzLmNhZXNhckNpcGhlcihqc29uLnVybCwgLTEpKSA6ICcnKTtcXG4gICAgICAgICAgICByZXR1cm4gdXJsO1xcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIHJldHVybiAnJztcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgUGFuR3U6IGZ1bmN0aW9uKHZpcFVybCwgZGF0YSkge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAvKnZhciByZWYgPSAnaHR0cHM6Ly93d3cucGFuZ3VqaWV4aS5jb20vJztcXG4gICAgICAgICAgICB2YXIgcGFyc2UgPSAnaHR0cHM6Ly9wYW5ndWFwaS5udHJ5amQubmV0L2ppZXhpLz91cmw9JyArIHZpcFVybDtcXG4gICAgICAgICAgICB2YXIgYXBpID0gJ2h0dHBzOi8vcGFuZ3VhcGkubnRyeWpkLm5ldC9qaWV4aS9hcGkucGhwJztcXG4gICAgICAgICAgICAqL1xcbiAgICAgICAgICAgIC8vdmFyIHJlZiA9ICdodHRwczovL3hteXN0di5jb20vJztcXG4gICAgICAgICAgICAvL3ZhciBwYXJzZSA9ICdodHRwczovL3d3dy45OWtwdy5jb20vcGFuZ3UvaW5kZXgucGhwP3VybD0nICsgdGFpbFVybDtcXG4gICAgICAgICAgICAvL3ZhciBhcGkgPSAnaHR0cHM6Ly93d3cuOTlrcHcuY29tL3Bhbmd1L2FwaS5waHAnO1xcbiAgICAgICAgICAgIHZhciBwYXJzZSA9ICdodHRwczovL3d3dy5wYW5ndWppZXhpLmNvbS9wYW5ndS8/dXJsPScgKyB2aXBVcmw7XFxuICAgICAgICAgICAgdmFyIGFwaSA9ICdodHRwczovL3Bhbmd1YXBpLm50cnlqZC5uZXQvcGFuZ3UyMDIxL2FwaS5waHAnO1xcbiAgICAgICAgICAgIGlmIChkYXRhKSB7XFxuICAgICAgICAgICAgICAgIHJlZiA9IGRhdGFbMF07XFxuICAgICAgICAgICAgICAgIHBhcnNlID0gZGF0YVsxXTtcXG4gICAgICAgICAgICAgICAgYXBpID0gZGF0YVsyXTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIFRpbWUgPSAoTWF0aC5mbG9vcihuZXcgRGF0ZSgpLmdldFRpbWUoKSAvIDEwMDApICogMSkudG9TdHJpbmcoKTtcXG4gICAgICAgICAgICB2YXIgdXJsID0gSlNPTi5wYXJzZShyZXF1ZXN0KGFwaSwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAnUmVmZXJlcic6IHBhcnNlXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIGJvZHk6ICd1cmw9JyArIHZpcFVybCArICcmcmVmZXJlcj0nICsgYmFzZTY0RW5jb2RlKHBhcnNlKSArICcmcmVmPTEmdGltZT0nICsgVGltZSArICcmdHlwZT0mb3RoZXI9JyArIGJhc2U2NEVuY29kZSh2aXBVcmwpICsgJyZpb3M9MCcsXFxuICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnXFxuICAgICAgICAgICAgfSkpLnVybDtcXG4gICAgICAgICAgICByZXR1cm4gdXJsO1xcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIHJldHVybiAnJztcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgeXVuMTcxNzogZnVuY3Rpb24gKHZpcFVybCkge1xcbiAgICAgICAgdmFyIGlzeWsgPSB2aXBVcmwuaW5kZXhPZigneW91a3UnKTtcXG4gICAgICAgIHZhciByZWYgPSBcXFwiaHR0cHM6Ly93d3cuMTcxN3l1bi5jb20vangvdHkucGhwP3VybD1cXFwiICsgdmlwVXJsO1xcbiAgICAgICAgdmFyIHBhcnNlID0gXFxcImh0dHBzOi8vMTcxN3l1bi5jb20uemgxODgubmV0LzA4MjgvP3VybD1cXFwiICsgdmlwVXJsO1xcbiAgICAgICAgdmFyIGFwaSA9IFxcXCJodHRwczovLzE3MTd5dW4uY29tLnpoMTg4Lm5ldC8xMDA0Ly4uaW5kZXguLnBocFxcXCI7XFxuICAgICAgICByZXR1cm4gaXN5ayA9PSAtMSA/IHRoaXMuUGFuR3UodmlwVXJsLCBbcmVmLCBwYXJzZSwgYXBpXSkgOiB0aGlzLlBhbkd1KHZpcFVybCwgW3JlZiArICcsdmlwOicsIHBhcnNlICsgJyx2aXA6JywgYXBpXSk7XFxuICAgIH0sXFxu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iAgICAgICAgamlleGlzID0gTXlKaWV4aS5qaWV4aXMuZmlsdGVyKGl0PT5pdC5uYW1lPT09TXlKaWV4aS5ub3cpWzBdO1xcbiAgICB9Y2F0Y2ggKGUpIHt9XFxuICAgIGZ1bmN0aW9uIGdldFBsYXlKeChrZXkpe1xcbiAgICAgICAgbGV0IHBsYXlVcmxMaXN0ID0gW107Ly/mibnph4/mkq3mlL7lnLDlnYDliJfooahcXG4gICAgICAgIGxldCBuYW1lTGlzdCA9IFtdO1xcbiAgICAgICAgbGV0IGp4cyA9IGppZXhpc1trZXldOyAvLyDpgILnlKjkuo7ov5nkuKrnvZHnq5nnmoTop6PmnpDliJfooahcXG4gICAgICAgIGlmKGp4cyl7XFxuICAgICAgICAgICAgZm9yKGxldCBpIGluIGp4cyl7XFxuICAgICAgICAgICAgICAgIGlmKHR5cGVvZiBQYXJzZVNbanhzW2ldXSA9PSAnc3RyaW5nJyYmUGFyc2VTW2p4c1tpXV0ubWF0Y2goL2h0dHAuKj89Lykpe1xcbiAgICAgICAgICAgICAgICAgICAgcGxheVVybExpc3QucHVzaChQYXJzZVNbanhzW2ldXSt2aXBVcmwpO1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaChqeHNbaV0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgLy8gcmV0dXJuIHBsYXlVcmxMaXN0XFxuICAgICAgICByZXR1cm4ge3BsYXlVcmxMaXN0OnBsYXlVcmxMaXN0LG5hbWVMaXN0Om5hbWVMaXN0fVxcbiAgICB9XFxuICAgIGZ1bmN0aW9uIGdldExhenlMaXN0KGtleSl7Ly/lj6rojrflj5blpIfog47liJfooajnmoTlhY3ll4XmjqLop6PmnpDliJfooahcXG4gICAgICAgIGxldCBwYXJzZXMgPSBbXTtcXG4gICAgICAgIGxldCBqeHMgPSBqaWV4aXNba2V5XXx8W107IC8vIOmAgueUqOS6jui/meS4que9keermeeahOino+aekOWIl+ihqFxcbiAgICAgICAgLy8gbG9nKGp4cyk7XFxuICAgICAgICBpZihqeHMpe1xcbiAgICAgICAgICAgIGZvcihsZXQgaSBpbiBqeHMpe1xcbiAgICAgICAgICAgICAgICBpZih0eXBlb2YgUGFyc2VTW2p4c1tpXV0gPT0gJ2Z1bmN0aW9uJyYmIS/pgJrlhY0vLnRlc3QoUGFyc2VTW2p4c1tpXV0udG9TdHJpbmcoKSkpe1xcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VzLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6anhzW2ldLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHJ1bGU6UGFyc2VTW2p4c1tpXV1cXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gcGFyc2VzXFxuICAgIH1cXG4gICAgdmFyIGV4dHJhID0ge307XFxuICAgIHZhciBwYXJzZXMgPSBbXTsgLy/lhY3ll4XmjqLliJfooahcXG4gICAgLy8tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tXFxuICAgIGlmKCFzdHJUaXRsZSl7XFxuICAgICAgICBpZigvTFQvLnRlc3QodmlwVXJsKSl7XFxuICAgICAgICAgICAgc3RyID0gbXlTZXQubHQ7XFxuICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ2x0Jyk7XFxuICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ2x0JyxzdHIpO1xcbiAgICAgICAgfSBlbHNlIGlmKC9yZW5yZW5taS8udGVzdCh2aXBVcmwpKXtcXG4gICAgICAgICAgICBzdHIgPSBteVNldC5ycjtcXG4gICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgncnInKTtcXG4gICAgICAgICAgICBwYXJzZXMgPS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ShwbGF5VXJsLHRpbWVvdXQpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgLy9ob3N0ID0gZGVjb2RlVVJJQ29tcG9uZW50KGhvc3QpO1xcbiAgICAgICAgICAgIHN3aXRjaCAobXlTZXQucWp1KSB7XFxuICAgICAgICAgICAgICAgIGNhc2UgXFxcIum7mOiupFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGhvc3QpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJxcS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC50eDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3R4Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCd0eCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJpcWl5aS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5xeTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3F5Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdxeScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJ5b3VrdS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC55aztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3lrJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCd5aycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJhbGl6eVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LmFsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnYWwnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ2FsaXp5Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIm1ndHYuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQubWc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdtZycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnbWcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiYmlsaWJpbGkuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQuYmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdibCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnYmwnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwic29odS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5zaDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3NoJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdzaCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJ0di5zb2h1LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnNoO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnc2gnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ3NoJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIml4aWd1YS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC54ZztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3hnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCd4ZycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwcHR2LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnBwO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgncHAnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VzID0gZ2V0TGF6eUxpc3QoJ3BwJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIm1pZ3V2aWRlby5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5taTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ21pJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdtaScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJsZS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5sZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ2xlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlcyA9IGdldExhenlMaXN0KCdsZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCIxOTA1LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0Lm9uZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ29uZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnb25lJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcImZ1bi50dlxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LmZ1bjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ2Z1bicpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnZnVuJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0Lm90aDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ290aCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZXMgPSBnZXRMYXp5TGlzdCgnb3RoJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5xanU7XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgIH1lbHNle1xcbiAgICAgICAgbG9nKCfprZTmlq3miafooYzlrprlkJHop6PmnpDnur/ot6/lpLQ6JytzdHJUaXRsZSk7XFxuICAgICAgICBzdHIgPSBzdHJUaXRsZTtcXG4gICAgfVxcbiAgICBsZXQgd2l0aEJhdGNoID0gISEoTXlKaWV4aS5pc0F1dG8gJiYgTXlKaWV4aS5hdXRvTW9kZSA9PT0gJ+mAn+W6puS8mOWFiCcpO1xcbiAgICBsZXQgd2l0aEJhdGNoT3JkZXIgPSAhIShNeUppZXhpLmlzQXV0byAmJiAv6aG65bqP5LyY5YWIfOWXheaOouS8mOWFiC8udGVzdChNeUppZXhpLmF1dG9Nb2RlKSk7XFxuICAgIGxldCBzaW5nbGVCYWNrID0gTXlKaWV4aS5zaW5nbGVCYWNrfHxmYWxzZTsgLy/lkIrmr5vmqKHlvI/jgILljZXkuKrnu5Pmnpznm7TmjqXov5Tlm57vvIzlgZzmraLlkI7pnaLnmoRcXG4gICAgbG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FxuICAgICAgICAgICAgICAgIHJldHVybiAoKHggPCB5KSA/ICgoeCA+IHkpID8gMSA6IDApIDogLTEpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSlcXG4gICAgfVxcbiAgICBpZiAodHlwZW9mIFBhcnNlU1tzdHJdID09ICdmdW5jdGlvbicpIHsgLy8g5Li76YWN572u5pS+5YWN5ZeF5omN5Lya6Kem5Y+RKOS4jeWkquWPi+WlvSzourrlubPkuI3mg7PkvJjljJYpXFxuICAgICAgICBpZigv6YCa5YWNLy50ZXN0KHN0cikpe1xcbiAgICAgICAgICAgIHJldHVybiBQYXJzZVNbc3RyXSh2aXBVcmwsdGltZW91dCk7XFxuICAgICAgICB9XFxuICAgICAgICB2YXIgdXJsO1xcbiAgICAgICAgdmFyIHRhc2sgPSBmdW5jdGlvbihvYmopIHtcXG4gICAgICAgICAgICBldmFsKCd2YXIgY29uZmlnX2RwID0nICsgZmV0Y2goZ2V0VmFyKCdvbGRDb25maWcnKSkpO1xcbiAgICAgICAgICAgIGV2YWwoZmV0Y2goY29uZmlnX2RwLmNqKSk7XFxuICAgICAgICAgICAgcmV0dXJuIGF5dG1QYXJzZShvYmoudmlwVXJsLG9iai5uYW1lLG9iai50aW1lb3V0KTtcXG4gICAgICAgIH07XFxuICAgICAgICBsZXQgdCA9IChuZXcgRGF0ZSgpKS5nZXRUaW1lKCk7XFxuICAgICAgICBpZiAoQXJyYXkuaXNBcnJheShleHRyYS5wbGF5VXJsTGlzdCkgJiYgZXh0cmEucGxheVVybExpc3QubGVuZ3RoID4gMCkge1xcbiAgICAgICAgICAgIGV4dHJhLm5hbWVMaXN0ID0gdW5pcXVlMihleHRyYS5uYW1lTGlzdCk7XFxuICAgICAgICAgICAgZXh0cmEucGxheVVybExpc3QgPSB1bmlxdWUyKGV4dHJhLnBsYXlVcmxMaXN0KTtcXG4gICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgIGV4dHJhLm5hbWVMaXN0ID0gW107XFxuICAgICAgICAgICAgZXh0cmEucGxheVVybExpc3QgPSBbXTtcXG4gICAgICAgIH1cXG4gICAgICAgIGZ1bmN0aW9uIGdldE15VXJscyh1cmxzKXtcXG4gICAgICAgICAgICByZXR1cm4gdXJscy5tYXAoKGl0KSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCB0dXJsID0gaXQuc3BsaXQoJzsnKVswXTtcXG4gICAgICAgICAgICAgICAgaWYgKGl0LmluY2x1ZGVzKFxcXCIjaXNWaWRlbz10cnVlI1xcXCIpICYmICF0dXJsLmluY2x1ZGVzKFxcXCIjaXNWaWRlbz10cnVlI1xcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICB0dXJsICs9IFxcXCIjaXNWaWRlbz10cnVlI1xcXCI7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuIHR1cmxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGZ1bmN0aW9uIGdldE15SGVhZGVycyh1cmxzKXtcXG4gICAgICAgICAgICByZXR1cm4gdXJscy5tYXAoKGl0KSA9PiB7XFxuICAgICAgICAgICAgICAgIGlmICghLzsvLnRlc3QoaXQpIHx8IGl0LnNwbGl0KCc7JykubGVuZ3RoIDwgMikge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHt9XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgaGVhZCA9IGl0LnNwbGl0KCc7JylbMV07XFxuICAgICAgICAgICAgICAgICAgICBpZiAoIS9ALy50ZXN0KGhlYWQpIHx8ICEve3x9Ly50ZXN0KGhlYWQpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHt9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBoZWFkID0gaGVhZC5zcGxpdChcXFwie1xcXCIpWzFdLnNwbGl0KFxcXCJ9XFxcIilbMF07XFxuICAgICAgICAgICAgICAgICAgICAvL2hlYWQgPSBoZWFkLnJlcGxhY2UoL3t8fS9nLCcnKTtcXG4gICAgICAgICAgICAgICAgICAgIGhlYWQgPSBoZWFkLnNwbGl0KCcmJicpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG9iaiA9IHt9O1xcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSBpbiBoZWFkKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGtleSA9IGhlYWRbaV0uc3BsaXQoJ0AnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPSBoZWFkW2ldLnNwbGl0KCdAJylbMV0ucmVwbGFjZSgvOy8sICfvvJvvvJsnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBvYmpba2V5XSA9IHZhbHVlO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9ialxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBmdW5jdGlvbiBnZXRNeVBsYXlVcmxMaXN0KCl7XFxuICAgICAgICAgICAgaWYoQXJyYXkuaXNBcnJheShleHRyYS5wbGF5VXJsTGlzdCkpe1xcbiAgICAgICAgICAgICAgICAvLyByZXR1cm4gZXh0cmEucGxheVVybExpc3QubWFwKGl0PT4ndmlkZW86Ly8nK2l0LnJlcGxhY2UoJz91cmw9JywnP2lkPScrdCsnJnVybD0nKS5yZXBsYWNlKCc/dj0nLCc/aWQ9Jyt0Kycmdj0nKSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBleHRyYS5wbGF5VXJsTGlzdC5tYXAoaXQ9Pid2aWRlbzovLycraXQpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gW11cXG4gICAgICAgIH1cXG5cXG5cXG4gICAgICAgIGlmKCF3aXRoQmF0Y2hPcmRlcnx8c3RyVGl0bGUpIHsvL+S4jeW8gOWkmue6v+i3r+mhuuW6j+S8mOWFiOaIluiAheaMh+WumuS6huino+aekFxcbiAgICAgICAgICAgIHVybCA9IFBhcnNlU1tzdHJdKHZpcFVybCx0aW1lb3V0KTtcXG4gICAgICAgIH1cXG4gICAgICAgIGVsc2V7Ly/lvIDkuoblpJrnur/ot6/pobrluo/kvJjlhYjmiafooYzlhY3ll4XlpJrku7vliqFcXG4gICAgICAgICAgICBpZih0eXBlb2YgUGFyc2VTW3N0cl0gPT0gJ2Z1bmN0aW9uJyYmIS/pgJrlhY0vLnRlc3QoUGFyc2VTW3N0cl0udG9TdHJpbmcoKSkpe1xcbiAgICAgICAgICAgICAgICBwYXJzZXMudW5zaGlmdCh7bmFtZTpzdHJ9KTsgLy/miorkuLvphY3nva7nmoTlhY3ll4XmjqLliqDlhaXliLDlpJrku7vliqHliJfooahcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcGFyc2VzID0gQXJyU2V0KHBhcnNlcywnbmFtZScpOyAvL+WOu+mHjVxcbiAgICAgICAgICAgIGlmKHVzZV9teCkgeyAvLyDlpoLmnpzkvb/nlKjlhY3ll4Us5YWI5aSa5Lu75Yqh6LeR5YWN5ZeFXFxuICAgICAgICAgICAgICAgIHZhciBjb3VudCA9IHBhcnNlcy5sZW5ndGg7IC8v6K6+572u5Lu75Yqh5pWw6YePXFxuICAgICAgICAgICAgICAgIGxvZygn6a2U5pat5byA5ZCv5aSa5Lu75Yqh6Kej5p6QLOS7u+WKoeaVsOmHjzonICsgY291bnQpO1xcbiAgICAgICAgICAgICAgICBsb2coJ+ino+aekOWIl+ihqDonICsgSlNPTi5zdHJpbmdpZnkocGFyc2VzKSk7XFxuICAgICAgICAgICAgICAgIHZhciBwYXJzZVJldCA9IFtdOyAvL+ino+aekOe7k+aenOWIl+ihqFxcbiAgICAgICAgICAgICAgICBsZXQgdGFza3MgPSBwYXJzZXMubWFwKChpdCwgaWRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jOiB0YXNrLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IGl0Lm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHJ1bGU6aXQucnVsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlwVXJsOiB2aXBVcmwsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpbWVvdXQ6IHRpbWVvdXRcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBcXFwidGFza1xcXCIgKyBpZGV4XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBzaG93TG9hZGluZyhcXFwi6a2U5pat5bm25Y+R6Kej5p6Q5Lit77yM5Ymp5L2Z6Kej5p6QOlxcXCIgKyBjb3VudCk7XFxuXFxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGlzRG0ocmV0KSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoIXJldCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gaGFzRG0ocmV0LnNwbGl0KCcjJylbMF0uc3BsaXQoJzsnKVswXSwgZG1VcmxzKVxcbiAgICAgICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgICAgIGJlKHRhc2tzLCB7XFxuICAgICAgICAgICAgICAgICAgICBmdW5jOiBmdW5jdGlvbiAob2JqLCBpZCwgZXJyb3IsIHJldCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwi55uR5ZCs5Yiw5Lu75YqhXFxcIiArIGlkICsgJ+W3sue7k+adnyxlcnJvcjonICsgZXJyb3IgKyAnLHJldDonICsgcmV0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXQgPSByZXQgfHwgJyc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VSZXQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhc2s6IGlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXQ6IHJldCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogdGFza3MuZmlsdGVyKGl0ID0+IGl0LmlkID09PSBpZClbMF0ucGFyYW0ubmFtZVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcblxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzaW5nbGVCYWNrKSB7Ly/lkIrmr5vmqKHlvI/lvIDlp4vnmoTor50s5Yik5patcmV05pyJ5pWI5oCnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZygn5Lu75YqhJyArIGlkICsgJ+e7k+aenOaYr+WQiuavmz8nICsgaXNEbShyZXQpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFpc0RtKHJldCkgJiYgUGFyc2VTLmlzVmlkZW8ocmV0LnNwbGl0KCcjJylbMF0uc3BsaXQoJzsnKVswXSkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coJ+WQiuavm+aooeW8j+S4reaWreino+aekOW5tui/lOWbnuinhumikScgKyByZXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdicmVhaydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBjb3VudCAtPSAxOyAvL+WujOaIkOS6huS7u+WKoe+8jOS7u+WKoeaVsOmHjy0xXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy9sb2cob2JqKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY291bnQgPiAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNob3dMb2FkaW5nKFxcXCLprZTmlq3lubblj5Hop6PmnpDkuK3vvIzliankvZnop6PmnpA6XFxcIiArIGNvdW50KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgIHBhcmFtOiB7Ly/kvKDliLDnm5HlkKzlh73mlbDnmoRvYmrlj4LmlbDph4xcXG4gICAgICAgICAgICAgICAgICAgICAgICBoaTogXFxcImNjY1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pOy8v5omn6KGM5aSa5Lu75YqhXFxuICAgICAgICAgICAgICAgIC8vIGxldCB2YWx1YWJsZSA9IHBhcnNlUmV0LmZpbHRlcihpdD0+L20zdTh8bXA0Ly50ZXN0KGl0LnJldCkpO1xcbiAgICAgICAgICAgICAgICBsb2coXFxcIuWkmuS7u+WKoeaJp+ihjOe7k+aenOaVsDpcXFwiICsgcGFyc2VSZXQubGVuZ3RoKTtcXG4gICAgICAgICAgICAgICAgbGV0IHZhbHVhYmxlID0gW107XFxuICAgICAgICAgICAgICAgIHBhcnNlUmV0LmZvckVhY2goKGl0KT0+e1xcbiAgICAgICAgICAgICAgICAgICAgaWYoaXQucmV0KXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZigvbmFtZXMvLnRlc3QoaXQucmV0KSYmL3VybHMvLnRlc3QoaXQucmV0KSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZygn5bCd6K+V6IGa5ZCI6Kej5p6Q6Kej5YyFOicraXQucmV0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZXRzID0gSlNPTi5wYXJzZShpdC5yZXQucmVwbGFjZSgvI2lzVmlkZW89dHJ1ZSMvZywnJykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0cy5uYW1lcy5mb3JFYWNoKChuYW1lLGlkZXgpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWFibGUucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWU6bmFtZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0OnJldHMudXJsc1tpZGV4XSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFzazppdC50YXNrLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1jYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKCfop6PljIXlj5HnlJ/plJnor686JytlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYoUGFyc2VTLmlzVmlkZW8oaXQucmV0LnNwbGl0KCcjJylbMF0uc3BsaXQoJzsnKVswXSkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1YWJsZS5wdXNoKGl0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihpdC5yZXQuc3RhcnRzV2l0aCgndmlkZW86Ly8nKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVhYmxlLnB1c2goaXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIC8vIGxldCB2YWx1YWJsZSA9IHBhcnNlUmV0LmZpbHRlcihpdCA9PiBpdC5yZXQgJiYgUGFyc2VTLmlzVmlkZW8oaXQucmV0LnNwbGl0KCcjJylbMF0uc3BsaXQoJzsnKVswXSkpO1xcbiAgICAgICAgICAgICAgICB2YWx1YWJsZSA9IHZhbHVhYmxlLmZpbHRlcihpdCA9PiAhaXNEbShpdC5yZXQpKTsvL+i/h+a7pOWQiuavm+inhumikVxcbiAgICAgICAgICAgICAgICBsb2coJ+WkmuS7u+WKoemhuuW6j+aJp+ihjOacieaViOe7k+aenDonICsgSlNPTi5zdHJpbmdpZnkodmFsdWFibGUpKTtcXG4gICAgICAgICAgICAgICAgaWYgKHZhbHVhYmxlLmxlbmd0aCA+IDEpIHsvL+Wkmue6v+i3r1xcbiAgICAgICAgICAgICAgICAgICAgdmFsdWFibGUgPSBzb3J0QnlLZXkodmFsdWFibGUsICd0YXNrJywgdHJ1ZSk7Ly/ljYfluo/mjpLliJdcXG4gICAgICAgICAgICAgICAgICAgIGxldCB1cmxzID0gdmFsdWFibGUubWFwKGl0ID0+IGl0LnJldCk7Ly/lj5blh7rpk77mjqUs57yT5a2Y5YmN55qEXFxuICAgICAgICAgICAgICAgICAgICBpZiAoZ2V0VmFyKCdkcC5jYWNoZVZpZGVvJywgJ3RydWUnKSA9PT0gJ3RydWUnICYmIHBhcnNlSW50KGdldEFwcFZlcnNpb24oKSkgPj0gMjI1NSkgey8v5byA5aeL57yT5a2YXFxuICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCLlsIrmlaznmoTprZTmlq3nlKjmiLfvvIzop4bpopHnvJPlrZjlt7LlkK/nlKjvvIzor7flsL3mg4Xkuqvlj5fnnIvliafml7blhYlcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9zQ2FjaGUgPSB1cmxzLm1hcCgoaXQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhlYWRlcnMgPSB7fTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGl0LnNwbGl0KFxcXCI7XFxcIikubGVuZ3RoID4gMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhlYWQgPSBpdC5zcGxpdCgnOycpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9ALy50ZXN0KGhlYWQpICYmIC97fH0vLnRlc3QoaGVhZCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2hlYWQgPSBoZWFkLnJlcGxhY2UoL3t8fS9nLCcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkID0gaGVhZC5zcGxpdChcXFwie1xcXCIpWzFdLnNwbGl0KFxcXCJ9XFxcIilbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZCA9IGhlYWQuc3BsaXQoJyYmJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSBpbiBoZWFkKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBrZXkgPSBoZWFkW2ldLnNwbGl0KCdAJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9IGhlYWRbaV0uc3BsaXQoJ0AnKVsxXS5yZXBsYWNlKC87LywgJ++8m++8mycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzW2tleV0gPSB2YWx1ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogaXQuc3BsaXQoXFxcIjtcXFwiKVswXS5zcGxpdChcXFwiI1xcXCIpWzBdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IGhlYWRlcnNcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkYXRhID0gYmF0Y2hDYWNoZU0zdTgodmlkZW9zQ2FjaGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEgPSBkYXRhLm1hcCgoaXQsIGlkKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBleHRyYSA9IFxcXCJcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodXJsc1tpZF0uc3BsaXQoXFxcIjtcXFwiKS5sZW5ndGggPiAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IFxcXCI7XFxcIiArIHVybHNbaWRdLnNwbGl0KFxcXCI7XFxcIilbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodXJsc1tpZF0uc3BsaXQoXFxcIuKYhVxcXCIpLmxlbmd0aCA+IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gXFxcIuKYhVxcXCIgKyB1cmxzW2lkXS5zcGxpdChcXFwi4piFXFxcIilbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGl0ICsgXFxcIlxcXCIgIT09IFxcXCJudWxsXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGl0ICsgZXh0cmFcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1cmxzW2lkXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJscyA9IGRhdGFcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIC8vIGxvZygn5o6S5bqP5a6M5q+V5ZCO57uT5p6cOicrSlNPTi5zdHJpbmdpZnkodmFsdWFibGUpKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBuYW1lcyA9IHZhbHVhYmxlLm1hcChpdCA9PiBpdC5uYW1lKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBoZWFkZXJzID0gZ2V0TXlIZWFkZXJzKHVybHMpO1xcbiAgICAgICAgICAgICAgICAgICAgdXJscyA9IGdldE15VXJscyh1cmxzKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmKE15SmlleGkuYXV0b01vZGUgPT09ICfll4XmjqLkvJjlhYgnKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmxzID0gdXJscy5jb25jYXQoZ2V0TXlQbGF5VXJsTGlzdCgpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lcyA9IG5hbWVzLmNvbmNhdChleHRyYS5uYW1lTGlzdCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gaGVhZGVycyA9IGhlYWRlcnMuY29uY2F0KGV4dHJhLm5hbWVMaXN0Lm1hcCgoaXQpPT57cmV0dXJuIHt9fSkpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHt1cmxzOiB1cmxzLCBoZWFkZXJzOiBoZWFkZXJzLCBuYW1lczogbmFtZXN9KTtcXG5cXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh2YWx1YWJsZS5sZW5ndGggPT09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChleHRyYS5uYW1lTGlzdC5sZW5ndGggPCAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaGlkZUxvYWRpbmcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6Iqt5q+UUeS6hizlpJrku7vliqHlhY3ll4Xop6PmnpDlhajlhpvopobmsqHlubbkuJTmsqHmnInlj6/nlKjnmoRqc29ufHg16Kej5p6Q5LqGJ1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgc2hvd0xvYWRpbmcoXFxcIumtlOaWreWkmuS7u+WKoeWFjeWXheWksei0pSzlsJ3or5Vqc29ufHg1XFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAvL+aOkumZpOesrOS4gOS4qlxcbiAgICAgICAgICAgICAgICAgICAgbGV0IGV4dHJhMiA9IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lTGlzdDogZXh0cmEubmFtZUxpc3QsXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGxheVVybExpc3Q6IGV4dHJhLnBsYXlVcmxMaXN0LnNsaWNlKDEpLFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgaWYoTXlKaWV4aS5hdXRvTW9kZSA9PT0gJ+WXheaOouS8mOWFiCcpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybHM6IGdldE15UGxheVVybExpc3QoKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZXM6IGV4dHJhLm5hbWVMaXN0XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gUGFyc2VTLmRlZmF1bHRQYXJzZVdlYiA/IFBhcnNlUy5kZWZhdWx0UGFyc2VXZWIoZXh0cmEucGxheVVybExpc3RbMF0sIHRpbWVvdXQsIGV4dHJhMikgOiBleHRyYS5wbGF5VXJsTGlzdFswXTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIC8vIGxvZyhleHRyYS5wbGF5VXJsTGlzdFswXSk7XFxuICAgICAgICAgICAgICAgICAgICAvLyBsb2coZXh0cmEyKTtcXG5cXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIC8vIOWFjeWXheWQjuWPquacieS4gOS4que7k+aenCzll4XmjqLkvJjlhYjoh6rliqjmi7x4NeWSjGpzb24sIOmhuuW6j+S8mOWFiOiHquWKqOi/lOWbnuS4gOS4quaSreaUvumTvuaOpVxcbiAgICAgICAgICAgICAgICAgICAgaWYoTXlKaWV4aS5hdXRvTW9kZSA9PT0gJ+WXheaOouS8mOWFiCcpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJscyA9IHZhbHVhYmxlLm1hcChpdCA9PiBpdC5yZXQpOy8v5Y+W5Ye66ZO+5o6lLOe8k+WtmOWJjeeahFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuYW1lcyA9IHZhbHVhYmxlLm1hcChpdCA9PiBpdC5uYW1lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGVhZGVycyA9IGdldE15SGVhZGVycyh1cmxzKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmxzID0gZ2V0TXlVcmxzKHVybHMpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVzID0gbmFtZXMuY29uY2F0KGV4dHJhLm5hbWVMaXN0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmxzID0gdXJscy5jb25jYXQoZ2V0TXlQbGF5VXJsTGlzdCgpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBoZWFkZXJzID0gaGVhZGVycy5jb25jYXQoZXh0cmEubmFtZUxpc3QubWFwKChpdCk9PntyZXR1cm4ge319KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsczogdXJscyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZXM6IG5hbWVzLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOmhlYWRlcnNcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB2YWx1YWJsZVswXS5yZXRcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1lbHNleyAvLyDnuq92aWRlbzovL+WIhuaUr1xcbiAgICAgICAgICAgICAgICBpZiAoZXh0cmEubmFtZUxpc3QubGVuZ3RoIDwgMSkge1xcbiAgICAgICAgICAgICAgICAgICAgaGlkZUxvYWRpbmcoKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/oiq3mr5RR5LqGLOWkmuS7u+WKoeWFjeWXheino+aekOWFqOWGm+imhuayoeW5tuS4lOayoeacieWPr+eUqOeahGpzb258eDXop6PmnpDkuoYnXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgbG9nKFxcXCLprZTmlq3lpJrku7vliqHlhY3ll4XlpLHotKUs5bCd6K+VanNvbnx4NVxcXCIpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgdXJsczogZ2V0TXlQbGF5VXJsTGlzdCgpLFxcbiAgICAgICAgICAgICAgICAgICAgbmFtZXM6IGV4dHJhLm5hbWVMaXN0XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGlmKC9eaGlrZXI6fF50b2FzdDp8XnJ1bGU6fF54NVJ1bGU6fF53ZWJSdWxlOnxec2VsZWN0Ly50ZXN0KHVybCkpe1xcbiAgICAgICAgICAgIHJldHVybiB1cmw7XFxuICAgICAgICB9XFxuICAgICAgICBpZighdXJsJiYhL15odHRwLy50ZXN0KHZpcFVybCkpe1xcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/prZTmlq3op6PmnpDlpLHotKU+Jyt2aXBVcmxcXG4gICAgICAgIH1cXG4gICAgICAgIC8vIGxvZyh2aXBVcmwrJ+WFjeWXheaOoue7k+aenDonK3VybCk7XFxuICAgICAgICBpZiAoL15cXFxcLy8udGVzdCh1cmwpKSB7XFxuICAgICAgICAgICAgdXJsID0gJ2h0dHBzOicgKyB1cmxcXG4gICAgICAgIH1cXG4gICAgICAgIC8vIOmtlOaWreWFjeWXheaIquWPllxcbiAgICAgICAgLy8gaWYgKC89aHR0cC8udGVzdCh1cmwpKSB7XFxuICAgICAgICAvLyAgICAgdXJsID0gLyZ1cmw9Ly50ZXN0KHVybCkgPyB1cmwgOiAnaHR0cCcgKyBkZWNvZGVVUklDb21wb25lbnQodXJsLnNwbGl0KCc9aHR0cCcpWzFdKTtcXG4gICAgICAgIC8vIH1cXG4gICAgICAgIC8qaWYodXJsLm1hdGNoKC9tZ3R2LmNvbS9nKT09J21ndHYuY29tJyl7XFxuICAgICAgICAgICAgdXJsID0gdXJsICsgJzt7UmVmZXJlckBodHRwczovL3d3dy5tZ3R2LmNvbX0n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VybCkubGF6eVJ1bGUoKGspID0+IHtcXG4gICAgICAgICAgICB2YXIganNVcmwgPSBKU09OLnBhcnNlKGZldGNoKGdldFZhcignb2xkQ29uZmlnJykpKS5jajtcXG4gICAgICAgICAgICB2YXIgTGFiZWwgPSBrO1xcbiAgICAgICAgICAgIHZhciBmYSA9IFsnbGV0dicsICdwcHR2JywgJ3FxJywgJ3lvdWt1JywgJ3FpeWknLCAnaXFpeWknLCAnbWd0dicsICdiaWxpYmlsaScsICdzb2h1JywgJ21pZ3UnLCAnbTE5MDUnLCAndmlwJ107XFxuICAgICAgICAgICAgdmFyIGh0bWwgPSBwYXJzZURvbShyZXF1ZXN0KGlucHV0KSwgTGFiZWwpO1xcbiAgICAgICAgICAgIGV2YWwoaHRtbC5yZXBsYWNlKC9wbGF5ZXJfLio/PXsvLCAncGRhdGE9eycpKTtcXG4gICAgICAgICAgICBldmFsKGZldGNoKGpzVXJsKSk7XFxuICAgICAgICAgICAgaWYgKHBkYXRhLnVybC5zdWJzdHIoMCwgOCkubWF0Y2goL0pULi5KVC4uLykpIHtcXG4gICAgICAgICAgICAgICAgcGRhdGEudXJsID0gYmFzZTY0RGVjb2RlKHBkYXRhLnVybCk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmIChwZGF0YS51cmwuc3Vic3RyKDAsIDgpLm1hdGNoKC8lLi4lLi4vKSkge1xcbiAgICAgICAgICAgICAgICBwZGF0YS51cmwgPSB1bmVzY2FwZShwZGF0YS51cmwpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAoZmEuaW5jbHVkZXMocGRhdGEuZnJvbSkpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGF5dG1QYXJzZShwZGF0YS51cmwpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBwZGF0YS51cmwgKyAnI2lzVmlkZW89dHJ1ZSMnO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgI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gYXJyTGlzdCA9IGRhdGE7XFxuICAgICAgICBhcnJMaXN0LnNwbGljZSgwLCAxKTtcXG4gICAgfSBlbHNlIHtcXG4gICAgICAgIGFyckxpc3QgPSBudWxsO1xcbiAgICB9XFxuICAgIGlmIChhcnJMaXN0ICE9IG51bGwpIHtcXG4gICAgICAgIHZhciBwYXJzZVJvdXRlID0gZ2V0VmFyKCdwYXJzZVJvdXRlJyk7XFxuICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKHBhcnNlUm91dGUpKTtcXG4gICAgICAgIEFycmF5LnByb3RvdHlwZS5yZW1vdmUgPSBmdW5jdGlvbih2YWwpIHtcXG4gICAgICAgICAgICBsZXQgaW5kZXggPSB0aGlzLmluZGV4T2YodmFsKTtcXG4gICAgICAgICAgICBpZiAoaW5kZXggPiAtMSkge1xcbiAgICAgICAgICAgICAgICB0aGlzLnNwbGljZShpbmRleCwgMSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfTtcXG4gICAgICAgIGlmKG5hbWUpey8v5Yig6Zmk5ZCN56ew5YiX6KGo5ZKM5Luj56CBXFxuICAgICAgICAgICAganNvbi50aXRsZS5yZW1vdmUobmFtZSk7XFxuICAgICAgICAgICAgZGVsZXRlIGpzb24uY29kZXNbbmFtZV07XFxuICAgICAgICB9XFxuICAgICAgICBhcnJMaXN0ID0gYXJyTGlzdC5jb25jYXQoanNvbi50aXRsZSk7XFxuICAgICAgICBqc29uLnRpdGxlID0gQXJyYXkuZnJvbShuZXcgU2V0KGFyckxpc3QpKTtcXG4gICAgICAgIE9iamVjdC5hc3NpZ24oanNvbi5jb2Rlcywgb2JqQ29kZSk7XFxuICAgICAgICBpZiAodHlwZSA9PT0gJ+a1i+ivlScpIHtcXG4gICAgICAgICAgICBldmFsKCd2YXIgY29uZmlnID0nICsgZmV0Y2goZ2V0VmFyKCdvbGRDb25maWcnKSkpO1xcbiAgICAgICAgICAgIGV2YWwoZmV0Y2goY29uZmlnLmNqKSk7XFxuICA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0ZURhdGUnLCB1cGRhdGVEYXRlKTtcXG59XFxudmFyIGJqSXRlbSA9IHtcXG4gICAgaGZQbHVnaW46IGZ1bmN0aW9uKHBhcnNlUm91dGUpIHtcXG4gICAgICAgIHJldHVybiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChrKSA9PiB7XFxuICAgICAgICAgICAgaWYgKGZpbGVFeGlzdChrKSkge1xcbiAgICAgICAgICAgICAgICB2YXIgY2pjYWNoZSA9IGdldFZhcignY2pDYWNoZScpO1xcbiAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKGspKTtcXG4gICAgICAgICAgICAgICAganNvbi5zZXR0aW5ncy5jaiA9IGNqY2FjaGU7XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShrLCAkLnN0cmluZ2lmeShqc29uKSk7XFxuICAgICAgICAgICAgICAgIHZhciBvbGRSb3V0ZSA9IGdldFZhcignb2xkQ29uZmlnJyk7XFxuICAgICAgICAgICAgICAgIHZhciBvbGRDb25maWcgPSBqc29uLnNldHRpbmdzO1xcbiAgICAgICAgICAgICAgICBvbGRDb25maWcuY2ogPSBjamNhY2hlO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUob2xkUm91dGUsICQuc3RyaW5naWZ5KG9sZENvbmZpZykpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mgaLlpI3miJDlip8nO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/pnIDopoHlhYjmi4nlj5bliJfooagnXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwgcGFyc2VSb3V0ZSlcXG4gICAgfSxcXG4gICAgcHVsbENvZGU6IGZ1bmN0aW9uKGspIHtcXG4gICAgICAgIHJldHVybiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChrKSA9PiB7XFxuICAgICAgICAgICAgdmFyIHB1bGxNb2RlID0ga1swXTtcXG4gICAgICAgICAgICB2YXIgcGFyc2VSb3V0ZSA9IGtbMV07XFxuICAgICAgICAgICAgdmFyIHBhcnNlRmlsZSA9IGZldGNoKHBhcnNlUm91dGUpO1xcbiAgICAgICAgICAgIGlmICghcGFyc2VGaWxlKSB7XFxuICAgICAgICAgICAgICAgIHZhciBzZXR0aW5ncyA9IGZldGNoKGdldFZhcignb2xkQ29uZmlnJykpO1xcbiAgICAgICAgICAgICAgICBzZXR0aW5ncyA9ICFzZXR0aW5ncyA/IHt9IDogSlNPTi5wYXJzZShzZXR0aW5ncyk7XFxuICAgICAgICAgICAgICAgIHZhciBqc29uID0ge307XFxuICAgICAgICAgICAgICAgIGpzb24uc2V0dGluZ3MgPSBzZXR0aW5ncztcXG4gICAgICAgICAgICAgICAganNvbi50aXRsZSA9IFtdO1xcbiAgICAgICAgICAgICAgICBqc29uLmNvZGVzID0ge307XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBwYXJzZUZpbGUpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB2YXIgcGFyc2VUaXRsZSA9IFtdO1xcbiAgICAgICAgICAgIHZhciBwYXJzZUNvZGU9e307XFxuICAgICAgICAgICAgdmFyIGNqTGluayA9IGdldFZhcigncGx1Z2luTGluaycpO1xcbiAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgIGlmKC9AYmFzZTY0OlxcXFwvXFxcXC8vLnRlc3QoY2pMaW5rKSl7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKGJhc2U2NERlY29kZShjakxpbmsuc3BsaXQoJ0BiYXNlNjQ6Ly8nKVsxXSkpO1xcbiAgICAgICAgICAgICAgICB9ZWxzZSBpZigv5o+S5Lu25ZCNLy50ZXN0KGNqTGluaykpe1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJlYWxMaW5rID0gY2pMaW5rLnNwbGl0KCfmj5Lku7blkI0nKVswXS5yZXBsYWNlKC9bXFxcXHNdL2csJycpO1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKCfop6PmnpDkupHliarliIfmnb86JytyZWFsTGluayk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgeVBhc3RlID0gcGFyc2VQYXN0ZShyZWFsTGluayk7XFxuICAgICAgICAgICAgICAgICAgICBpZigvQGJhc2U2NDpcXFxcL1xcXFwvLy50ZXN0KHlQYXN0ZSkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoYmFzZTY0RGVjb2RlKHlQYXN0ZS5zcGxpdCgnQGJhc2U2NDovLycpWzFdKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHR5cGVvZiBQYXJzZVM9PT0ndW5kZWZpbmVkJyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5ouJ5Y+W5Liq6bih5q+b5o+S5Lu2LOmHjOmdoui/nlBhcnNlU+WvueixoemDveayoeaciSEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9Y2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+m4oeavm+aPkuS7tuaJp+ihjOaKpemUmTpcXFxcbicrZS5tZXNzYWdlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mnKrog73or4bliKvkupHliarliIfmnb/kuK3nmoTlhoXlrrk6XFxcXG4nK3lQYXN0ZS5zdWJzdHJpbmcoMCwxMDApO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNqTGluayA9PT0gJ1HnpZ4nKSB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgamlleGkgPSBmZXRjaCgnaGlrZXI6Ly9maWxlcy9qaWV4aS9qaWV4aS50eHQnKS5zcGxpdCgnXFxcXG4nKTtcXG4gICAgICAgICAgICAgICAgICAgIGZvciAoaSBpbiBqaWV4aSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZT1qaWV4aVtpXS5zcGxpdCgnJiYnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZT1qaWV4aVtpXS5zcGxpdCgnJiYnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlLnB1c2godGl0bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZVt0aXRsZV09Y29kZTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvLyB9ZWxzZSBpZigvXiNbYS16QS1aMC05XXsyLDEwfSQvLnRlc3QoY2pMaW5rKSl7Ly/npo/liKnlj6Pku6Qy5YiwMTDkvY1cXG4gICAgICAgICAgICAgICAgZWxzZSBpZigvXiNbXFxcXFNdezIsMTB9JC8udGVzdChjakxpbmspKXsvL+emj+WIqeWPo+S7pDLliLAxMOS9jeS7u+aEj+mdnuepuuWtl+espuS4slxcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qge3Rhc2tDYWxsLCB0YXNrUnVuLHRhc2tSZXF9ID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvdGFza0NhbGw/cnVsZT3pgZPplb/ku5PlupNQcm9cXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIC8vIGxvZygn5byA5aeL5omn6KGM5Lu75Yqh5LuT5bqT6I635Y+W5pat5b+15o+S5Lu256aP5Yip5Y+j5LukJyk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgcmVzdWx0ID0gdGFza0NhbGwoMTcsJ0RuRnVsaScsW2NqTGlua10pO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3VsdC5zdGF0dXMgPT09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmV0ID0gSlNPTi5wYXJzZShyZXN1bHQucmVzdWx0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2cocmV0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihyZXQub3B0PT09J2Vycm9yJyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly8nK3JldC5tc2c7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYocmV0Lm9wdD09PSd1cmwnKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSBmZXRjaChyZXQucmV0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGFyciA9IGh0bWwuaW5jbHVkZXMoJ2h0dHAnKT8gaHRtbDpiYXNlNjREZWNvZGUoaHRtbCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBqaWV4aSA9IGFyci5tYXRjaCgvW1xcXFxTXSo/LC4qP1tcXFxcc10vZyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgaW4gamlleGkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZT1qaWV4aVtpXS5zcGxpdCgnLCcpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGU9amlleGlbaV0uc3BsaXQoJywnKVsxXS5zcGxpdChcXFwiXFxcXG5cXFwiKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCEvXmh0dHB8ZnVuY3Rpb24vLnRlc3QoY29kZSkmJmNvZGUubGVuZ3RoPjIwKXsvL2Jhc2U2NOe8lueggeeahOWHveaVsFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvZGUgPSBiYXNlNjREZWNvZGUoY29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlLnB1c2godGl0bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VDb2RlW3RpdGxlXT0vZnVuY3Rpb24vLnRlc3QoY29kZSk/ZXZhbChjb2RlKTpjb2RlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYocmV0Lm9wdD09PSdqeCcpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZigvW1xcXFxTXSo/LGh0dHBbXFxcXFNdLy50ZXN0KHJldC5yZXQpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHJldC5yZXQuc3BsaXQoJywnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gcmV0LnJldC5zcGxpdCgnLCcpWzFdLnNwbGl0KCdcXFxcbicpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZS5wdXNoKHRpdGxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZVt0aXRsZV09Y29kZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYoL15odHRwLy50ZXN0KHJldC5yZXQpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGNqTGluay5zcGxpdCgnIycpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSByZXQucmV0LnNwbGl0KCdcXFxcbicpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZS5wdXNoKHRpdGxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZVt0aXRsZV09Y29kZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5pyq55+l55qE56aP5YipOlxcXFxuJytyZXQucmV0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYocmV0Lm9wdD09PSd2aXBKeCcpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBjakxpbmsuc3BsaXQoJyMnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSByZXQucmV0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2coY29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUucHVzaCh0aXRsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZVt0aXRsZV09L2Z1bmN0aW9uLy50ZXN0KGNvZGUpP2V2YWwoY29kZSk6Y29kZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5LuT5bqT6Z2e5pyA5paw54mI5oiW6ICF56aP5Yip56S+5Yqf6IO95byA5Y+R5LitJ1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9ZWxzZSBpZihjakxpbms9PT0n5pat5o+SJyl7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKGZldGNoKFxcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL1BhcnNlX0RuLmpzXFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZT1PYmplY3Qua2V5cyhQYXJzZVMpO1xcbiAgICAgICAgICAgICAgICB9ZWxzZSBpZigvXmhpa2VyOlxcXFwvXFxcXC98XmZpbGU6XFxcXC9cXFxcL3xeaHR0cHxeXFxcXC9zdG9yYWdlXFxcXC98XlxcXFwvc2RjYXJkXFxcXC8vLnRlc3QoY2pMaW5rKSl7XFxuICAgICAgICAgICAgICAgICAgICBpZigvXlxcXFwvc3RvcmFnZVxcXFwvfF5cXFxcL3NkY2FyZFxcXFwvLy50ZXN0KGNqTGluaykpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNqTGluayA9ICdmaWxlOi8vJytjakxpbms7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNqTGluaykpO1xcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZT1PYmplY3Qua2V5cyhQYXJzZVMpO1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mi4nlj5blj6Pku6TmnInor68nXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgIGxvZyhlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB2YXIganhKdWRnZSA9IHR5cGVvZiBQYXJzZVMgPT0gJ29iamVjdCc7XFxuICAgICAgICAgICAgdmFyIGxiSnVkZ2UgPSB0eXBlb2YocGFyc2VUaXRsZSkgPT0gJ29iamVjdCc7XFxuICAgICAgICAgICAgaWYgKGp4SnVkZ2UgfHwgbGJKdWRnZSkge1xcbiAgICAgICAgICAgICAgICAvLyBpZiAocHVsbE1vZGUgPT09ICfliJfooagnKSB7XFxuICAgICAgICAgICAgICAgIC8vICAgICBpZiAoIWxiSnVkZ2UpIHtcXG4gICAgICAgICAgICAgICAgLy8gICAgICAgICBwYXJzZVRpdGxlID0gT2JqZWN0LmtleXMoUGFyc2VTKTtcXG4gICAgICAgICAgICAgICAgLy8gICAgIH1cXG4gICAgICAgICAgICAgICAgLy8gICAgIHZhciBuZXdQYXJzZVRpdGxlID0ganNvbi50aXRsZS5jb25jYXQocGFyc2VUaXRsZSk7XFxuICAgICAgICAgICAgICAgIC8vICAgICBqc29uLnRpdGxlID0gQXJyYXkuZnJvbShuZXcgU2V0KG5ld1BhcnNlVGl0bGUpKTtcXG4gICAgICAgICAgICAgICAgLy8gfVxcbiAgICAgICAgICAgICAgICAvLyDkuI3nrqHmi4nlj5bku6PnoIHov5jmmK/liJfooajpg73opoHmiorliJfooajmi4nkuoZcXG4gICAgICAgICAgICAgICAgaWYgKCFsYkp1ZGdlKSB7XFxuICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlID0gT2JqZWN0LmtleXMoUGFyc2VTKTtcXG4gICAgICAgICAgICAgICAgICAgIGxvZyhwYXJzZVRpdGxlKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB2YXIgc2NPYmplY3QgPSBbXFxcIkNpdHlJUFxcXCIsIFxcXCJwY1VBXFxcIiwgXFxcImNhY2hlTTN1OFxcXCIsXFxcImlzVmlkZW9cXFwiLFxcXCJ0aW1lT3V0XFxcIixcXFwi5rqQ56CB5Yy56YWNXFxcIiwgXFxcImRlZmF1bHRQYXJzZVxcXCIsXFxcImRlZmF1bHRQYXJzZVdlYlxcXCIsXFxcIm1hb3NzXFxcIiwgXFxcIkxMUVxcXCIsXFxcInBhcnNlTGNcXFwiXTtcXG4gICAgICAgICAgICAgICAgcGFyc2VUaXRsZSA9IHBhcnNlVGl0bGU/cGFyc2VUaXRsZS5maWx0ZXIoaXQ9PiFzY09iamVjdC5pbmNsdWRlcyhpdCkpOltdO1xcbiAgICAgICAgICAgICAgICB2YXIgbmV3UGFyc2VUaXRsZSA9IGpzb24udGl0bGUuY29uY2F0KHBhcnNlVGl0bGUpO1xcbiAgICAgICAgICAgICAgICBqc29uLnRpdGxlID0gQXJyYXkuZnJvbShuZXcgU2V0KG5ld1BhcnNlVGl0bGUpKTtcXG5cXG4gICAgICAgICAgICAgICAgaWYgKHB1bGxNb2RlID09PSAn5Luj56CBJykge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBvcmlnaW5hbFBhcnNlUyA9PSAnb2JqZWN0Jykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgaW4gc2NPYmplY3QpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIG9yaWdpbmFsUGFyc2VTW3NjT2JqZWN0W2ldXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gb3JpZ2luYWxQYXJzZVMgPW9yaWdpbmFsUGFyc2VTLmZpbHRlcihpdD0+IXNjT2JqZWN0LmluY2x1ZGVzKE9iamVjdC5nZXRPd25Qcm9wZXJ0eU5hbWVzKGl0KVswXSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24oanNvbi5jb2Rlcywgb3JpZ2luYWxQYXJzZVMpO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZih0eXBlb2YoUGFyc2VTKT09XFxcInVuZGVmaW5lZFxcXCIpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKGpzb24uY29kZXMsIHBhcnNlQ29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vcmV0dXJuIFxcXCJ0b2FzdDovL+ayoeacieS7o+egge+8jOS4jeWPr+aLieWPllxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihqc29uLmNvZGVzLCBQYXJzZVMpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvL3ZhciBuZXdGaWxlID0gdG9vbHMudG9KU09OKGpzb24pOy8v6Ieq5a6a5LmJc3RyaW5naWZ55Ye95pWw77yM5bim5pyJ6L2s5LmJ5a2X56ymXFxuICAgICAgICAgICAgICAgIHZhciBuZXdGaWxlID0gJC5zdHJpbmdpZnkoanNvbik7IC8vSlNPTi5wYXJzZeS8muaKpemUmVxcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgbmV3RmlsZSk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aLieWPlicgKyBwdWxsTW9kZSArICfmiJDlip8nO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mnKrojrflj5bliLDlr7nosaEnO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIFtrLCBfbXlTZXQucGFyc2VSb3V0ZV0pXFxuICAgIH0sXFxuICAgIHB1bGxTY3JpcHQ6IGZ1bmN0aW9uKGNqLCB4NSkge1xcbiAgICAgICAgcmV0dXJuICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGspID0+IHtcXG4gICAgICAgICAgICB2YXIgY2pGcm9tID0gJ2hpa2VyOi8vcGFnZS9QYXJzZV9Ebi5qcz9ydWxlPU15RmllbGThtLDigb8nO1xcbiAgICAgICAgICAgIHZhciB4NUZyb20gPSAnaGlrZXI6Ly9wYWdlL1BhcnNlX0RuLmh0bWw/cnVsZT1NeUZpZWxk4bSw4oG/JztcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICB2YXIgY2pGaWxlID0gSlNPTi5wYXJzZShmZXRjaChjakZyb20pKS5ydWxlO1xcbiAgICAgICAgICAgICAgICB2YXIgeDVGaWxlID0gSlNPTi5wYXJzZShmZXRjaCh4NUZyb20pKS5ydWxlO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoa1swXSwgY2pGaWxlKTtcXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKGtbMV0sIHg1RmlsZSk7XFxuICAgICAgICAgICAgICAgIGNsZWFyVmFyKCdqeE9sZFYnKTtcXG4gICAgICAgICAgICAgICAgY2xlYXJWYXIoJ2p4TmV3VicpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mi4nlj5bmiJDlip8nO1xcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+acquaIkOWKn+iOt+WPluWGheWuuSc7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwgW2NqLCB4NV0pXFxuICAgIH0sXFxuICAgIHhsU2VsZWN0OiBmdW5jdGlvbihiaWFuamksIGxiTGVuZ3RoKSB7XFxuICAgICAgICByZXR1cm4gXFxcInNlbGVjdDovL1xcXCIgKyBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgb3B0aW9uczogWyfigJjigJjigJnigJk8c3BhbiBzdHlsZT1cXFwiY29sb3I6cmVkXFxcIiB0aXRsZT1cXFwi5Yig6ZmkfHwnICsgYmlhbmppICsgJ1xcXCI+5YigIOmZpCcsICfigJjigJjigJnigJk8c3BhbiBzdHlsZT1cXFwiY29sb3I6I0Y1NzQ3NFxcXCIgdGl0bGU9XFxcIumakOiXj3x8JyArIGJpYW5qaSArICdcXFwiPumakCDol48nLCAn4oCY4oCY4oCZ4oCZPHNwYW4gc3R5bGU9XF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cpO1xcbiAgICAgICAgICAgICAgICAvLyDkv67mlLks6L+q6L+qLDAgICDmk43kvZznsbvlnoss5ZCN56ewLOe0ouW8lVxcbiAgICAgICAgICAgICAgICB2YXIgdHlwZSA9IG5ld0lucHV0WzBdO1xcbiAgICAgICAgICAgICAgICB2YXIgbmFtZSA9IG5ld0lucHV0WzFdO1xcbiAgICAgICAgICAgICAgICB2YXIgbnVtID0gbmV3SW5wdXRbMl07XFxuICAgICAgICAgICAgICAgIHZhciBudW0yID0gbmV3SW5wdXRbM107XFxuICAgICAgICAgICAgICAgIHN3aXRjaCAodHlwZSkge1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi5Yig6ZmkXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgayA9IFtuYW1lLCBudW1dO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIOaAu+aEn+inieetm+mAieaIluiAheaQnOe0ouWQju+8jOeUseS6jm51beeahOS9jee9ruS4jeWvueWPr+iDveS8muWIoOmZpOmUmSzkuovlrp7lpoLmraQs5bey5L+uP1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKFxcXCLljbPlsIbliKDpmaQ6IFxcXCIgKyBuYW1lKS5jb25maXJtKChrKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuYW1lID0ga1swXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG51bSA9IGtbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwYXJzZVJvdXRlID0gZ2V0VmFyKCdwYXJzZVJvdXRlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsgZmV0Y2gocGFyc2VSb3V0ZSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoanNvbi5jb2Rlcy5oYXNPd25Qcm9wZXJ0eShuYW1lKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGpzb24uY29kZXNbbmFtZV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtID0ganNvbi50aXRsZS5pbmRleE9mKG5hbWUpOyAvL+i/meagt+aJjeS8muW+l+WIsOato+ehrueahOe0ouW8lVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uLnRpdGxlLnNwbGljZShudW0sIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgJC5zdHJpbmdpZnkoanNvbikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7LlsIbjgJZcXFwiICsgbmFtZSArIFxcXCLjgJfliKDpmaRcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIGspO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi6ZqQ6JePXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChcXFwiaGlrZXI6Ly9lbXB0eSNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKGspID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5hbWUgPSBrWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbnVtID0ga1sxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBhcnNlUm91dGUgPSBnZXRWYXIoJ3BhcnNlUm91dGUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBmZXRjaChwYXJzZVJvdXRlKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChqc29uLmNvZGVzLmhhc093blByb3BlcnR5KG5hbWUpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBudW0gPSBqc29uLnRpdGxlLmluZGV4T2YobmFtZSk7IC8v6L+Z5qC35omN5Lya5b6X5Yiw5q2j56Gu55qE57Si5byVXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uLnRpdGxlLnNwbGljZShudW0sIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHBhcnNlUm91dGUsICQuc3RyaW5naWZ5KGpzb24pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7LlsIbjgJZcXFwiICsgbmFtZSArIFxcXCLjgJfpmpDol49cXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+WPr+iDveaYr+S4que9keWdgCwg5oKo5Y+v6YCJ5oup5Yig6ZmkXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIFtuYW1lLCBudW1dKTtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIuS/ruaUuVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy9pZiAoanNvbi5jb2Rlc1tuYW1lXSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuQ29kZSA9IG5hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlcyA9IGpzb24udGl0bGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5OYW1lID0gXFxcIui/meaYr+WQjeensFxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGpzb24uY29kZXNbbmFtZV0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbkNvZGUgPSBqc29uLmNvZGVzW25hbWVdLnRvU3RyaW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5OYW1lID0gbmFtZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoXFxcImhpa2VyOi8vZW1wdHkjbm9SZWNvcmRIaXN0b3J5I1xcXCIpLnJ1bGUoKGssdGl0bGVzKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkID0gW107XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoZ2V0SXRlbSgnbXlGdW5jdGlvbicpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5hbWUgPSBrWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29kZSA9IGtbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+S/nSDlrZgnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBzYXZlQnV0dG9uICsgXFxcInNhdmVCdXR0b24oZ2V0VmFyKCdpbnB1dF9lZGl0JyksbmFtZSk7YmFjaygpO1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImlucHV0XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLlu7rorq7mjInpu5jorqTnmoTku6PnoIHmoLzlvI/kv67mlLnlk6ZcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogXFxcInB1dFZhcignaW5wdXRfZWRpdCcsIGlucHV0KVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogXFxcInRleHRhcmVhXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IFxcXCItMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGlnaGxpZ2h0OiB0cnVlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2UsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiAn5L+u5pS54piFJyArIG5hbWUgKyAn4piFJyArIGNvZGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfigJjigJjigJnigJk8c21hbGw+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiM2RUI4OTdcXFwiPuagvOW8j+S4uu+8muaTjeS9nOexu+Wei+KYheagh+mimOKYhWZ1bmN0aW9uKCl76Ieq5a6a5LmJ5YaF5a65fTxicj7or7fli7/loavlhaXlhbbku5bmoLzlvI8nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChzYXZlQnV0dG9uLG5hbWUsdGl0bGVzKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRtcEFyID0gZ2V0VmFyKCdpbnB1dF9lZGl0Jykuc3BsaXQoJ+KYhScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHRtcEFyLmxlbmd0aDwyKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S/ruaUueagvOW8j+acieivr++8jOiuv+mXruiiq+aLkue7nSdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld05hbWUgPSB0bXBBclsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihuZXdOYW1lIT09bmFtZSYmdGl0bGVzLmluY2x1ZGVzKG5ld05hbWUpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ+ajgOa1i+WIsOWQjOWQjeaOpeWPozonK25ld05hbWUrJyzmmK/lkKbopobnm5Y/JykuY29uZmlybSgoc2F2ZUJ1dHRvbixuYW1lKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSBzYXZlQnV0dG9uKGdldFZhcignaW5wdXRfZWRpdCcpLG5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFjaygpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suS/neWtmOS/ruaUuVxcXFxu6K+36Ieq6KGM5qOA5rWL6KaG55uW5ZCO55qE5YaF5a65JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxzYXZlQnV0dG9uLG5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9IHNhdmVCdXR0b24oZ2V0VmFyKCdpbnB1dF9lZGl0JyksbmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2soKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suS/neWtmOS/ruaUuSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlmKHR5cGVvZihjb2RlKT09PSdzdHJpbmcnJiZjb2RlLmxlbmd0aD4yKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgcmV0dXJuIGNvZGVcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgcmV0dXJuICd0b2FzdDovL+W3suS/neWtmOS/ruaUuSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgc2F2ZUJ1dHRvbixuYW1lLHRpdGxlcyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn4oCY4oCY4oCZ4oCZPGJpZz48YmlnPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjojMjk4QTA4XFxcIj7kv50g5a2YJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbbk5hbWUsIG5Db2RlXSx0aXRsZXMpIC8vW25hbWUsIGpzb24uY29kZXNbbmFtZV0udG9TdHJpbmcoKV0pXFxuICAgICAgICAgICAgICAgICAgICAvKn0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+WPquaciee9keWdgOaIluiAheagh+mimCwg5LiN5pSv5oyB5L+u5pS5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSovXFxuICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCLnva7pobZcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi572u5bqVXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKHBhcnNlUm91dGUpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBudW0gPSBqc29uLnRpdGxlLmluZGV4T2YobmFtZSk7IC8v6L+Z5qC35omN5Lya5b6X5Yiw5q2j56Gu55qE57Si5byVXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYobnVtPi0xKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGl0ZW0gPSBqc29uLnRpdGxlLnNwbGljZShudW0sIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqc29uLnRpdGxlLnNwbGljZShudW0yLCAwLCBpdGVtWzBdKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHBhcnNlUm91dGUsICQuc3RyaW5naWZ5KGpzb24pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5rKh5om+5YiwOicrbmFtZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCLnp7vliqhcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCdoaWtlcjovL2VtcHR5I25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2JpYW5qaScsICfnp7vliqgjJyArIGspO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBpbnB1dDtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBudW0pO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwi5YiG5LqrXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIuS6keWIhuS6q1xcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGpzb24uY29kZXNbbmFtZV0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBhcnNlVGV4dCA9IHR5cGVvZiBqc29uLmNvZGVzW25hbWVdID09ICdmdW5jdGlvbicgPyAkLnN0cmluZ2lmeShqc29uLmNvZGVzW25hbWVdKSA6IGpzb24uY29kZXNbbmFtZV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlVGV4dCA9ICdNeVBhcnNlU+KYhScgKyBuYW1lICsgJ+KYhScgKyBiYXNlNjRFbmNvZGUocGFyc2VUZXh0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGFyc2VUZXh0ID0gJ+ebtOmTvuKYhScgKyBqc29uLnRpdGxlW251bV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0eXBlID09ICfkupHliIbkuqsnICYmIHBhcnNlVGV4dC5zdWJzdHIoMCwgOCkgPT0gJ015UGFyc2VTJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZVRleHQgPSBzaGFyZVBhc3RlKHBhcnNlVGV4dCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZVRleHQuc3Vic3RyKDAsIDYpICE9ICdlcnJvcjonID8gJ2NvcHk6Ly8nICsgcGFyc2VUZXh0ICsgJ1xcXFxu4piF4piF4piFXFxcXG4nICsgJ015UGFyc2VT77yaJyArIG5hbWUgOiAndG9hc3Q6Ly/liIbkuqvlpLHotKUhIeS6keWJqui0tOadv+WPr+iDveaMguS6hic7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdjb3B5Oi8vJyArIHBhcnNlVGV4dDtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mmoLkuI3mlK/mjIEnO1xcbiAgICAgICAgICAgICAgICB9IC8vc3dpdGNo55qEXFxuICAgICAgICAgICAgfSkgLy9TdHJpbmfnmoRcXG4gICAgICAgIH0pIC8vc3RyaW5naWZ555qEXFxuICAgIH0sXFxuICAgIHhqUGFyc2U6IGZ1bmN0aW9uKCkge1xcbiAgICAgICAgcmV0dXJuICQoXFxcImhpa2VyOi8vZW1wdHkjbm9IaXN0b3J5I1xcXCIpLnJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgIHZhciBkID0gW107XFxuICAgICAgICAgICAgZXZhbChnZXRJdGVtKCdteUZ1bmN0aW9uJykpO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn5L+dIOWtmCcsXFxuICAgICAgICAgICAgICAgIHVybDogc2F2ZUJ1dHRvbiArIFxcXCJzYXZlQnV0dG9uKGlucHV0KTtiYWNrKCk7Y2xlYXJWYXIoJ2lucHV0X2FkZCcpXFxcIixcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpbnB1dFxcXCIsXFxuICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLovpPlhaXmraPnoa7moLzlvI/lhoXlrrlcXFwiLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6ICdwdXRWYXIoXFxcImlucHV0X2FkZFxcXCIsIGlucHV0KScsXFxuICAgICAgICAgICAgICAgICAgICB0eXBlOiBcXFwidGV4dGFyZWFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBcXFwiLTFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgaGlnaGxpZ2h0OiB0cnVlLFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0VmFyKCdpbnB1dF9hZGQnKSxcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn4oCY4oCY4oCZ4oCZPHNtYWxsPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjojNkVCODk3XFxcIj7mjInmj4/ov7Dor4nmoLzlvI/ovpPlhaUsIOivt+WLv+Whq+WFpeWFtuS7luagvOW8jzxicj7mnKzlnLDlj6Pku6Q6IOaTjeS9nOexu+Wei+KYheWQjeensOKYheS7o+eggTxicj7kupHlj6Pku6Q6IOmTvuaOpeKYheKYheKYheWQjeensDsg57qv572R5Z2AOiDnm7Tpk77imIV1cmwx4piFdXJsMicsXFxuICAgICAgICAgICAgICAgIGRlc2M6ICfigJjigJjigJnigJk8YmlnPjxiaWc+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiMyOThBMDhcXFwiPuS/nSDlrZgnLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoJ25vTG9hZGluZycpLmxhenlSdWxlKChzYXZlQnV0dG9uKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2F2ZUJ1dHRvbihnZXRWYXIoJ2lucHV0X2FkZCcpKTtcXG4gICAgICAgICAgICAgICAgfSwgc2F2ZUJ1dHRvbiksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgICAgICB9KVxcbiAgICB9LFxcbiAgICB5ZFBhcnNlOiBmdW5jdGlvbihCSm1vZGUsIGkpIHtcXG4gICAgICAgIHJldHVybiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChrKSA9PiB7XFxuICAgICAgICAgICAgdmFyIEEgPSBrWzBdLnNwbGl0KCcjJylbMV07XFxuICAgICAgICAgICAgdmFyIEIgPSBrWzFdO1xcbiAgICAgICAgICAgIHZhciBwYXJzZVJvdXRlID0gZ2V0VmFyKCdwYXJzZVJvdXRlJyk7XFxuICAgICAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBmZXRjaChwYXJzZVJvdXRlKSk7XFxuICAgICAgICAgICAgdmFyIGl0ZW0gPSBqc29uLnRpdGxlLnNwbGljZShBLCAxKTsgLy8gMTog5qCH6K6w5byA5aeL5L2N572u77yMMjog5Yig6Zmk5Yiw5ZOq5Liq5L2N572uXFxuICAgICAgICAgICAganNvbi50aXRsZS5zcGxpY2UoQiwgMCwgaXRlbVswXSk7IC8vIDE6IOWQjOS4iu+8jDI6IDDooajnpLrkuI3liKDpmaTvvIwzOiDmt7vliqDlr7nosaFcXG4gICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgJC5zdHJpbmdpZnkoanNvbikpO1xcbiAgICAgICAgICAgIGNsZWFyVmFyKCdiaWFuamknKTtcXG4gICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcXG4gICAgICAgIH0sIFtCSm1vZG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nICsgeHNMaXN0LFxcbiAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWyd5ZFBhcnNlJ10oQkptb2RlLCBpKSxcXG4gICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NDdhOWI0WydFZmZibiddXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIF8weDQ3YTliNFsnTWN6T1cnXShwdXRWYXIsIF8weDQ3YTliNFsnRlVqZG0nXSwgXzB4NDdhOWI0WydscUZoYiddKGlzTG9naW58fGZ1bmN0aW9uICgpe3JldHVybiB0cnVlfSkpO1xcbiAgICAgICAgICAgIF8weDQ3YTliNFsnRlVScHknXShwdXRWYXIsICdqZFJvdXRlJywgXzB4NDdhOWI0WydYSU9iQiddKTtcXG4gICAgICAgIH1cXG4gICAgfVxcbiAgICByZXR1cm4gZ2V0VmFyKF8weDQ3YTliNFsnRlVqZG0nXSk7XFxufVxcbnZhciBqeEl0ZW0gPSB7XFxuICAgICdqeExpc3QnOiBmdW5jdGlvbigpIHtcXG4gICAgICAgIHZhciBfMHg0YzA0MjcgPSB7XFxuICAgICAgICAgICAgJ1VWV29GJzogZnVuY3Rpb24oXzB4MjZiYjA3LCBfMHgyMjFiNGQpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDI2YmIwNyArIF8weDIyMWI0ZDtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdjb2xvcic6ZnVuY3Rpb24odGV4dCwgY29sb3IpIHtcXG4gICAgICAgICAgICAgICAgdGV4dCArPSBcXFwiXFxcIjtcXG4gICAgICAgICAgICAgICAgaWYgKHRleHQuaW5kZXhPZihcXFwi4oCc4oCc4oCd4oCdXFxcIikgPT09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgIHRleHQucmVwbGFjZShcXFwi4oCc4oCc4oCd4oCdXFxcIiwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgI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oCZPGJpZz48c3BhbiBzdHlsZT1cXFxcXFxcImNvbG9yOiM2RUI4OTdcXFxcXFxcIj7mlrAg5bu6IOinoyDmnpAnLFxcbiAgICAgICAgICAgICdGckdPSCc6IGZ1bmN0aW9uKF8weDEyZDZkYiwgXzB4MmEwNjhkKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHgxMmQ2ZGIgPCBfMHgyYTA2OGQ7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnb0NDU2onOiBmdW5jdGlvbihfMHgxOWIxNzgsIF8weDRlZjhmNikge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4MTliMTc4ID09PSBfMHg0ZWY4ZjY7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnSFpobGMnOiBmdW5jdGlvbihfMHg1Y2FlMDMsIF8weDI2ZTI0Mikge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NWNhZTAzID09IF8weDI2ZTI0MjtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdjZ0llQSc6IGZ1bmN0aW9uKF8weDI1ZTM2OCwgXzB4OGJjOGU5KSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHgyNWUzNjggKyBfMHg4YmM4ZTk7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAneGRyRnYnOiBmdW5jdGlvbihfMHg0YWI1ZDgsIF8weDIxMjQyZikge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NGFiNWQ4ICsgXzB4MjEyNDJmO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ3l3anV4JzogZnVuY3Rpb24oXzB4NWUzMDUxLCBfMHg0ZTAyMzApIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDVlMzA1MShfMHg0ZTAyMzApO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH07XFxuICAgICAgICB2YXIgXzB4MWQ4YmIxID0gZ2V0VmFyKF8weDRjMDQyN1snSkNjTlknXSk7XFxuICAgICAgICB2YXIgXzB4M2I4OWFiID0gcGFyc2VGaWxlWyd0aXRsZSddO1xcbiAgICAgICAgdmFyIF8weDQ5ZGE5NiA9IGdldFZhcihfMHg0YzA0MjdbJ3JnRElwJ10pO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogXzB4NGMwNDI3Wydob0lkSiddLFxcbiAgICAgICAgICAgIGRlc2M6J+azqOaEjzrkvY3nva7mk43kvZzlip/og73lj6rlnKjliIbnsbvnrZvpgInkuLrlhajpg6jml7bnlJ/mlYhcXFxcbuS4i+aWueaQnOe0ouaMieWQjeensOaIluWcsOWdgCzph43nva7or7fnlZnnqbrmiJbngrnop6PmnpDmlbDph4/mjInpkq4nLFxcbiAgICAgICAgICAgIHVybDogYmpJdGVtWyd4alBhcnNlJ10oKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOmZhbHNlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOifmkJzntKInLFxcbiAgICAgICAgICAgIGRlc2M6J21lbmd4JyxcXG4gICAgICAgICAgICBjb2xfdHlwZTonaW5wdXQnLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcXFwicHV0VmFyKCdkcC5zZWFyY2hKeCcsaW5wdXQpXFxcIixcXG4gICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiB0cnVlLFxcbiAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogMTEsXFxuICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTpnZXRWYXIoJ2RwLnNlYXJjaEp4JywnJyksXFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICB1cmw6JC50b1N0cmluZygoKT0+e1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KTtcXG4gICAgICAgIGxldCBmaWx0ZXJzID0gWyflhajpg6gnLCfpk77mjqUnLCdqc29uJywn5YWN5ZeFJ107XFxuICAgICAgICBmb3IobGV0IG8gaW4gZmlsdGVycyl7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6Z2V0VmFyKCdkbi5qeF9maWx0ZXInLCflhajpg6gnKT09PWZpbHRlcnNbb10/J+KAnOKAnOKAneKAnTxzcGFuIHN0eWxlPVxcXCJjb2xvcjojMjk4QTA4XFxcIj4nK2ZpbHRlcnNbb106ZmlsdGVyc1tvXSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaXQpPT57XFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2RuLmp4X2ZpbHRlcicsaXQpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgIH0sZmlsdGVyc1tvXSksXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgICAgICB2YXIgXzB4MmVjYmU1ID0gXzB4M2I4OWFiWydsZW5ndGgnXTtcXG4gICAgICAgIHZhciBqc29uPXt0aXRsZTpbXSxjb2Rlczp7fX07XFxuICAgICAgICBsZXQgc2V0RmlsZSA9IHJlcXVlc3QoJ2hpa2VyOi8vZmlsZXMvcnVsZXMvRHVhbk5pYW4vTXlQYXJzZS5qc29uJy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NDlkYTk2KSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDRjMDQyN1sna3pXREsnXShfMHg0YzA0MjdbJ1hYeVFyJ10sIF8weGUyYzNkOCkgPT0gXzB4NDlkYTk2ID8gXzB4NGMwNDI3WydndFVuaiddKF8weDRjMDQyN1snZ3RVbmonXShfMHg0YzA0MjdbJ1V0ZldmJ10sIF8weDRjMDQyN1snUU92SlYnXSksIF8weDVjZjQxNykgOiBfMHg0YzA0MjdbJ0FCRXdCJ10gKyBfMHg1Y2Y0MTcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBiakl0ZW1bJ3lkUGFyc2UnXShfMHg0OWRhOTYsIF8weGUyYzNkOCksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDRjMDQyN1snb3p6V0cnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgXzB4MTE5MzY1ID0gW18weDJiYzYxOCwgXzB4NGMwNDI3WydndFVuaiddKF8weGUyYzNkOCwgJ3x8JyldWydqb2luJ10oJ3x8Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NGMwNDI3WyduV2ZWUiddKF8weDRjMDQyN1snQUJFd0InXSwgXzB4NWNmNDE3KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NGMwNDI3WydvenpXRyddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWyd4bFNlbGVjdCddKF8weDExOTM2NSwgXzB4MmVjYmU1Wyd0b1N0cmluZyddKCkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB2YXIgXzB4YjcwMTkyID0gW18weDMzNzg4YywgXzB4ZTJjM2Q4ICsgJ3x8J11bJ2pvaW4nXSgnfHwnKTtcXG4gICAgICAgICAgICAgICAgLy8g6L+q6L+q5b2x6ZmifHwwfHwgIOWQjeensHx857Si5byVIOeahOaVsOe7hFxcbiAgICAgICAgICAgICAgICAvLyBBQkV3QiDmmK/nu7/oibIgXzB4Mzc4NzFlIOaYr+agh+mimOWQjeensCAgeGRyRnbmmK/lrZfnrKbkuLLov57mjqXlh73mlbBcXG4gICAgICAgICAgICAgICAgLy8gbGV0IGZsYWcgPSAn4oCY4oCY4pOK4oCZ4oCZJztcXG4gICAgICAgICAgICAgICAgbGV0IGZsYWcgPSBfMHg0YzA0MjcuY29sb3IoJ+KTiicsJyMwMDUxZmYnKTtcXG4gICAgICAgICAgICAgICAgaWYodHlwZW9mKGpzb24uY29kZXNbXzB4Mzc4NzFlXSk9PT0nZnVuY3Rpb24nKXtcXG4gICAgICAgICAgICAgICAgICAgIC8vIGZsYWcgPSAn4oCc4oCc4pK/4oCd4oCdJztcXG4gICAgICAgICAgICAgICAgICAgIGZsYWcgPSBfMHg0YzA0MjcuY29sb3IoJ+KSvycsJyNmZjcwMDAnKTtcXG4gICAgICAgICAgICAgICAgfWVsc2UgaWYodHlwZW9mKGpzb24uY29kZXNbXzB4Mzc4NzFlXSk9PT0ndW5kZWZpbmVkJyl7XFxuICAgICAgICAgICAgICAgICAgICBmbGFnID0gJyc7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy8gbGV0IGNscyA9ICc8c3BhbiBzdHlsZT1cXFwiY29sb3I6IzI5OEEwOFxcXCI+JztcXG4gICAgICAgICAgICAgICAgLy8gbGV0IHRpdGxlID0gXzB4NGMwNDI3Wyd4ZHJGdiddKF8weDRjMDQyN1snQUJFd0InXSwgZmxhZytfMHgzNzg3MWUpO1xcbiAgICAgICAgICAgICAgICAvLyBsZXQgdGl0bGUgPSBmbGFnK2NscytfMHgzNzg3MWU7XFxuICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGZsYWcrXzB4NGMwNDI3LmNvbG9yKF8weDM3ODcxZSwnIzI5OEEwOCcpO1xcbiAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAvLyAndGl0bGUnOiBfMHgzNzg3MWUsXFxuICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg0YzA0MjdbJ296eldHJ10sXFxuICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWyd4bFNlbGVjdCddKF8weGI3MDE5MiwgXzB4MmVjYmU1Wyd0b1N0cmluZyddKCkpXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIF8weDRjMDQyN1sneXdqdXgnXShjbGVhclZhciwgXzB4NGMwNDI3WydyZ0RJcCddKTtcXG4gICAgfSxcXG4gICAgJ2xxRmlsZSc6IGZ1bmN0aW9uKCkge1xcbiAgICAgICAgdmFyIF8weDU0MWQ3NiA9IHtcXG4gICAgICAgICAgICAnYVdpUnMnOiBmdW5jdGlvbihfMHg0OGQ3N2IsIF8weDE5MTYxZiwgXzB4MjFjYjg1KSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg0OGQ3N2IoXzB4MTkxNjFmLCBfMHgyMWNiODUpO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ3dTZm56JzogZnVuY3Rpb24oXzB4NDg1MGVhKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg0ODUwZWEoKTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdxUlFkQSc6ICdqZFJvdXRlJyxcXG4gICAgICAgICAgICAnV1FpcWsnOiAndmFyIHhkUm91dGU9XFxcIlxcXCI7JyxcXG4gICAgICAgICAgICAncHNHZHQnOiBmdW5jdGlvbihfMHgxNzA3ODAsIF8weDNiNTEyYSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4MTcwNzgwID09IF8weDNiNTEyYTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdpbXhyaSc6ICd0cnVlJyxcXG4gICAgICAgICAgICAnblNrangnOiBmdW5jdGlvbihfMHg5NWJmMzgsIF8weDMxM2YyNSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4OTViZjM4ICE9PSBfMHgzMTNmMjU7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnaVZOZU0nOiAnZWVMSm0nLFxcbiAgICAgICAgICAgICdJd01UbCc6ICcwfDF8NXw5fDExfDN8Nnw3fDEwfDR8Mnw4JyxcXG4gICAgICAgICAgICAneGZkSGsnOiAn5ouJ5Y+W5Li75o+S5Lu25ZKM572R6aG16ISa5pysJyxcXG4gICAgICAgICAgICAnckdMdUEnOiAn5Li75o+S5Lu25a2Y5pS+6Lev5b6EOiAvY2FjaGUvUGFyc2VfRG4uanNcXFxceDBh572R6aG16ISa5pys5a2Y5pS+6Lev5b6EOiAvY2FjaGUvUGFyc2VfRG4uaHRtbCcsXFxuICAgICAgICAgICAgJ3pRU0xFJzogJ3RleHRfY2VudGVyXzEnLFxcbiAgICAgICAgICAgICdodmlEbCc6IGZ1bmN0aW9uKF8weDI2ZGI2MiwgXzB4MzEyZjFjKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHgyNmRiNjIoXzB4MzEyZjFjKTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdaeFVndCc6ICfmk43kvZzmjIflvJUnLFxcbiAgICAgICAgICAgICdzV0ZvYyc6IGZ1bmN0aW9uKF8weDJhMDQ0YiwgXzB4MTQ5YTNmKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHgyYTA0NGIgKyBfMHgxNDlhM2Y7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnT0VoYXQnOiAn5ouJ5Y+W5Luj56CBJyxcXG4gICAgICAgICAgICAnWnZ0U3UnOiAn57yW6L6R6Kej5p6QJyxcXG4gICAgICAgICAgICAnZ1hLTWInOiAndG9hc3Q6Ly/or7flhYjmi4nlj5bliJfooagnLFxcbiAgICAgICAgICAgICdXQ09EQyc6IGZ1bmN0aW9uKF8weDRhZDNkNSwgXzB4MzFmYTFlKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg0YWQzZDUgPCBfMHgzMWZhMWU7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnckFrQWgnOiAndGV4dF8zJyxcXG4gICAgICAgICAgICAneVdhT0knOiAn5oGi5aSN5o+S5Lu26Lev5b6E5Li66buY6K6kJyxcXG4gICAgICAgICAgICAneWp5aksnOiAn5b2T5YmN6K6+572u5Li6OiAnLFxcbiAgICAgICAgICAgICd0SFhlRSc6ICfmi4nlj5bop6PmnpDliJfooajmiJbogIXop6PmnpDku6PnoIEnLFxcbiAgICAgICAgICAgICdHTVVZdSc6ICflrZjmlL7ot6/lvoQ6IC9ydWxlcy9EdWFuTmlhbi9NeVBhcnNlLmpzb24nLFxcbiAgICAgICAgICAgICdtcFpCWic6ICdsaW5lX2JsYW5rJyxcXG4gICAgICAgICAgICAneHZxZ0YnOiAn6L6T5YWl5pyJ5pWI5o+S5Lu25Zyw5Z2AJyxcXG4gICAgICAgICAgICAnaGV1S3gnOiAncHV0VmFyKFxcXCJwbHVnaW5MaW5rXFxcIixpbnB1dCknLFxcbiAgICAgICAgICAgICdJaWZpYSc6ICfigJjigJjigJnigJk8c3Ryb25nPjxiaWc+55m75b2V5o+Q56S6JyxcXG4gICAgICAgICAgICAnUEZSSEEnOiAn5L2/55So55u45YWz5Yqf6IO96ZyA55m75b2V6KeG55WM6K665Z2b6LSm5Y+3XFxcXG7lpoLmnInpl67popjliY3lvoDorrrlnZvkuobop6Por6bmg4UnLFxcbiAgICAgICAgICAgICdVTHdrVCc6ICdodHRwczovL2hhaWt1b3NoaWppZS5jbi91c2VyL3NpZ25pbidcXG4gICAgICAgIH07XFxuICAgICAgICBpZiAoXzB4NTQxZDc2Wydwc0dkdCddKF8weDU0MWQ3Nlsnd1NmbnonXShiYnNZWiksIF8weDU0MWQ3NlsnaW14cmknXSl8fHRydWUpIHtcXG4gICAgICAgICAgICBpZiAoXzB4NTQxZDc2WyduU2tqeCddKF8weDU0MWQ3NlsnaVZOZU0nXSwgXzB4NTQxZDc2WydpVk5lTSddKSkge1xcbiAgICAgICAgICAgICAgICBfMHg1NDFkNzZbJ2FXaVJzJ10ocHV0VmFyLCAnYmJzWVonLCBfMHg1NDFkNzZbJ3dTZm56J10oaXNMb2dpbnx8ZnVuY3Rpb24gKCl7cmV0dXJuIHRydWV9KSk7XFxuICAgICAgICAgICAgICAgIF8weDU0MWQ3NlsnYVdpUnMnXShwdXRWYXIsIF8weDU0MWQ3NlsncVJRZEEnXSwgXzB4NTQxZDc2WydXUWlxayddKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB2YXIgXzB4NGQyNWZmID0gXzB4NTQxZDc2WydJd01UbCddWydzcGxpdCddKCd8JyksXFxuICAgICAgICAgICAgICAgICAgICBfMHg0YTk3YzkgPSAweDA7XFxuICAgICAgICAgICAgICAgIHdoaWxlICghIVtdKSB7XFxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKF8weDRkMjVmZltfMHg0YTk3YzkrK10pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcwJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDU0MWQ3NlsneGZkSGsnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBiakl0ZW1bJ3B1bGxTY3JpcHQnXShfbXlTZXRbJ2NqY2FjaGUnXSwgX215U2V0Wyd4NWNhY2hlJ10pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2Rlc2MnOiBfMHg1NDFkNzZbJ3JHTHVBJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg1NDFkNzZbJ3pRU0xFJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzEnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfMHg1NDFkNzZbJ2h2aURsJ10oZXZhbCwgXzB4NTQxZDc2WydodmlEbCddKGdldFZhciwgXzB4NTQxZDc2WydxUlFkQSddKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzInOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogJ2xpbmVfYmxhbmsnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICczJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIF8weDJhYjM5OSA9ICdoaWtlcjovL2VtcHR5I25vSGlzdG9yeSNAcnVsZT1qczp0aGlzLmQ9W107JC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvanhJdGVtP3J1bGU9TXlGaWVsZOG0sOKBv1xcXCIpLmp4TGlzdCgpO3NldFJlc3VsdChkKTsnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICc0JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDU0MWQ3NlsnWnhVZ3QnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiB0eXBlb2YgY3pHdWlkZSA9PSAnZnVuY3Rpb24nID8gY3pHdWlkZSgpIDogJycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg1NDFkNzZbJ3pRU0xFJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzUnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB4ZFJvdXRlID0gXzB4NTQxZDc2WydzV0ZvYyddKHhkUm91dGUsIF9teVNldFsncGFyc2VSb3V0ZSddKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnNic6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBfMHgzYTlhZmUgPSBbe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogJ+aLieWPluWIl+ihqCcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWydwdWxsQ29kZSddKCfliJfooagnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ09FaGF0J10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWydwdWxsQ29kZSddKCfku6PnoIEnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ1p2dFN1J10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogXzB4NTQxZDc2WydodmlEbCddKGZpbGVFeGlzdCwgXzB4NTQxZDc2WydodmlEbCddKGdldFZhciwgJ3BhcnNlUm91dGUnKSkgPT0gISFbXSA/IF8weDJhYjM5OSA6IF8weDU0MWQ3NlsnZ1hLTWInXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnNyc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIF8weDFhMmNkYiA9IDB4MDsgXzB4NTQxZDc2WydXQ09EQyddKF8weDFhMmNkYiwgXzB4M2E5YWZlWydsZW5ndGgnXSk7IF8weDFhMmNkYisrKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDNhOWFmZVtfMHgxYTJjZGJdWyd0aXRsZSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBfMHgzYTlhZmVbXzB4MWEyY2RiXVsndXJsJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2WydyQWtBaCddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICc4JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDU0MWQ3NlsneVdhT0knXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBiakl0ZW1bJ2hmUGx1Z2luJ10oX215U2V0WydwYXJzZVJvdXRlJ10pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2Rlc2MnOiBfMHg1NDFkNzZbJ3NXRm9jJ10oXzB4NTQxZDc2Wyd5anlqSyddICsgbXlTZXRbJ2NqJ10sICdcXFxcbuWtmOaUvui3r+W+hDogL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbicpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2Wyd6UVNMRSddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICc5JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDU0MWQ3NlsndEhYZUUnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiAndG9hc3Q6Ly/or7flnKjkuIvmlrnpgInpobnmk43kvZwnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2Rlc2MnOiBfMHg1NDFkNzZbJ0dNVVl1J10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg1NDFkNzZbJ3pRU0xFJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzEwJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnbXBaQlonXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnMTEnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2Rlc2MnOiBfMHg1NDFkNzZbJ3h2cWdGJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiAnaW5wdXQnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2V4dHJhJzoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZVZpc2libGUnOiAhW10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2RlZmF1bHRWYWx1ZSc6IF8weDU0MWQ3NlsnaHZpRGwnXShnZXRWYXIsICdwbHVnaW5MaW5rJyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ29uQ2hhbmdlJzogXzB4NTQxZDc2WydoZXVLeCddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAg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QYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+S/ruaUueaIkOWKn1xcXCI7XFxuICAgICAgICAgICAgfSwgdGl0bGUsIGluZGV4KTtcXG4gICAgICAgIH07XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSBcXFwiMlxcXCI6XFxuICAgICAgICBmdW5jID0gZnVuY3Rpb24odXJsLCB0aXRsZSwgaW5kZXgpIHtcXG4gICAgICAgICAgICByZXR1cm4gJChcXFwi56Gu6K6k5Yig6Zmk44CMXFxcIiArIHRpdGxlICsgXFxcIuOAje+8n1xcXCIpLmNvbmZpcm0oKHRpdGxlLCBpbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VVcmxUZXh0ID0gcmVxdWVzdChcXFwiaGlrZXI6Ly9maWxlcy9qaWV4aS9qaWV4aS50eHRcXFwiKTtcXG4gICAgICAgICAgICAgICAgbGV0IHBhcnNlVXJsQXJyYXkgPSBwYXJzZVVybFRleHQuc3BsaXQoL1xcXFxuLyk7XFxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3RlZDEgPSBwYXJzZVVybEFycmF5W2luZGV4XTtcXG4gICAgICAgICAgICAgICAgcGFyc2VVcmxBcnJheS5zcGxpY2UoaW5kZXgsIDEpO1xcbiAgICAgICAgICAgICAgICBwYXJzZVVybFRleHQgPSBwYXJzZVVybEFycmF5LmpvaW4oXFxcIlxcXFxuXFxcIik7XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9qaWV4aS9qaWV4aS50eHRcXFwiLCBwYXJzZVVybFRleHQpO1xcbiAgICAgICAgICAgICAgICBpZiAoc2VsZWN0ZWQxID09IGdldEl0ZW0oXFxcInNlbGVjdGVkMFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAocGFyc2VVcmxBcnJheVswXSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oXFxcInNlbGVjdGVkXFxcIiwgcGFyc2VVcmxBcnJheVswXS5zcGxpdChcXFwiJiZcXFwiKVsxXSB8fCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbShcXFwic2VsZWN0ZWQwXFxcIiwgcGFyc2VVcmxBcnJheVswXSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oXFxcInNlbGVjdGVkXFxcIiwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oXFxcInNlbGVjdGVkMFxcXCIsIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/kv67mlLnmiJDlip9cXFwiO1xcbiAgICAgICAgICAgIH0sIHRpdGxlLCBpbmRleCk7XFxuICAgICAgICB9O1xcbiAgICAgICAgYnJlYWs7XFxuXFxufVxcbmZvciAobGV0IGkgaW4gcGFyc2VVcmxBcnJheSkge1xcbiAgICBsZXQgaXRlbSA9IHBhcnNlVXJsQXJyYXlbaV0uc3BsaXQoXFxcIiYmXFxcIik7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogc2VsZWN0ZWQgPT0gaXRlbVsxXSA/IFxcXCLigJjigJhcXFwiICsgaXRlbVswXSArIFxcXCLigJnigJlcXFwiIDogaXRlbVswXSxcXG4gICAgICAgIHVybDogZnVuYyhpdGVtWzFdLCBpdGVtWzBdLCBpKSxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8zXFxcIlxcbiAgICB9KTtcXG59XFxuc2V0UmVzdWx0KGQpO1wifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5Li76aKY566h55CGXCIsXCJwYXRoXCI6XCJ0aGVtZVwiLFwicnVsZVwiOlwianM6XFxuICAgIGZ1bmN0aW9uIHRoZW1lSW5pdCgpe1xcbiAgICAgICAgY29uc3Qge2NvbG9yLHNtYWxsfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3V0aWxpeT9ydWxlPemBk+mVv+S7k+W6k1Byb1xcXCIpO1xcbiAgICAgICAgbGV0IGQgPSBbXTtcXG4gICAgICAgIGxldCBvcHRpb25zID0gWyfpgInmi6knLCfkv67mlLknLCfliKDpmaQnLCflr7zlh7onXTtcXG5cXG4gICAgICAgIGZvcih2YXIgaSBpbiBvcHRpb25zKXtcXG4gICAgICAgICAgICBsZXQgb3B0aW9uID0gb3B0aW9uc1tpXTtcXG4gICAgICAgICAgICBsZXQgZmxhZyA9IGdldFZhcigndGhlbWUuZG5fb3B0aW9uJywn5paw5aKeJyk9PT1vcHRpb24/J/CfkYknOicnO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOmZsYWcrb3B0aW9uLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIHVybDokKG9wdGlvbikubGF6eVJ1bGUoKCk9PntcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcigndGhlbWUuZG5fb3B0aW9uJywgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey6K6+572u5pON5L2c57G75Z6L5Li6OicraW5wdXQ7XFxuICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgbGV0IHRoZW1lUm91dGUgPSBcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeVRoZW1lLmpzb25cXFwiO1xcbiAgICAgICAgbGV0IG15VGhlbWVzID0ge307XFxuICAgICAgICBsZXQgdGhlbWVzID0ge307XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIG15VGhlbWVzID0gSlNPTi5wYXJzZShmZXRjaCh0aGVtZVJvdXRlKSk7XFxuICAgICAgICAgICAgdGhlbWVzID0gbXlUaGVtZXMudGhlbWVzW215VGhlbWVzLm5vd190aGVtZV07XFxuICAgICAgICB9Y2F0Y2ggKGUpIHt9XFxuXFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiflr7zlhaUnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICB1cmw6JCgnJywn6K+36L6T5YWl5a+85YWl5Y+j5LukJykuaW5wdXQoKG15VGhlbWVzLHRoZW1lUm91dGUpPT57XFxuICAgICAgICAgICAgICAgIGlmKC9e5pat5o+S5Li76aKYQC4qP0BodHRwLy50ZXN0KGlucHV0KSl7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgbmFtZSA9IGlucHV0LnNwbGl0KCdAJylbMV07XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gaW5wdXQuc3BsaXQoJ0AnKVsyXTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCfnoa7lrpropoHlr7zlhaXmlq3mj5LkuLvpopgtJytuYW1lKycg5ZCXPycpLmNvbmZpcm0oKG5hbWUsdXJsLG15VGhlbWVzLHRoZW1lUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRlbnQgPSBwYXJzZVBhc3RlKHVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhhc1RoZW1lID0gbXlUaGVtZXMudGhlbWVzLmZpbHRlcihpdD0+aXQubmFtZT09PW5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGhhc1RoZW1lJiZoYXNUaGVtZS5sZW5ndGg+MCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpZCA9IG51bGw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaiBpbiBteVRoZW1lcy50aGVtZXMpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobXlUaGVtZXMudGhlbWVzW2pdLm5hbWUgPT09IG5hbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkID0gajtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighaWQpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+e0ouW8lemUmeivr+aXoOazleimhuebluWvvOWFpTpcXFxcbicraWRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2coJ+imhuebluWvvOWFpeS4u+mimGlkOicraWQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBteVRoZW1lcy50aGVtZXNbaWRdID0gT2JqZWN0LmFzc2lnbihKU09OLnBhcnNlKGJhc2U2NERlY29kZShjb250ZW50KSkseyduYW1lJzpuYW1lfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG15VGhlbWVzLnRoZW1lcy5wdXNoKE9iamVjdC5hc3NpZ24oSlNPTi5wYXJzZShiYXNlNjREZWNvZGUoY29udGVudCkpLHsnbmFtZSc6bmFtZX0pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKG15VGhlbWVzKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUodGhlbWVSb3V0ZSxKU09OLnN0cmluZ2lmeShteVRoZW1lcykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LmiJDlip/lr7zlhaXkuLvpopg6XFxcXG4nK25hbWVcXG4gICAgICAgICAgICAgICAgICAgIH0sbmFtZSx1cmwsbXlUaGVtZXMsdGhlbWVSb3V0ZSk7XFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aXoOazleivhuWIq+eahOWvvOWFpeWPo+S7pDpcXFxcbicraW5wdXQ7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LG15VGhlbWVzLHRoZW1lUm91dGUpLFxcbiAgICAgICAgfSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOifmlrDlop4nLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICB1cmw6JCgpLnJ1bGUoKG15VGhlbWVzLHRoZW1lUm91dGUpPT57XFxuICAgICAgICAgICAgICAgIGxldCBkPVtdO1xcbiAgICAgICAgICAgICAgICBhZGRMaXN0ZW5lcignb25DbG9zZScsICQudG9TdHJpbmcoKCk9PntcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+S4u+mimOWQjeensCcsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwi5pat5o+SLeiTneiOk+S4u+mimFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcXFwicHV0VmFyKCd0aGVtZS5uZXdfYWRkX25hbWUnLGlucHV0KVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiB0cnVlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0VmFyKCd0aGVtZS5uZXdfYWRkX25hbWUnLCAnJylcXG4gICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICB1cmw6JC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld19hZGRfbmFtZSA9IGdldFZhcigndGhlbWUubmV3X2FkZF9uYW1lJywgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kvaDovpPlhaXnmoTmmK86JytuZXdfYWRkX25hbWU7XFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaW5wdXRcXFwiXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuS7o+eggVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2lucHV0JyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldFZhcigndGhlbWUubmV3X2FkZF9jb2RlJywgJycpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IFxcXCJ0ZXh0YXJlYVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0Oi0xLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiAncHV0VmFyKFxcXCJ0aGVtZS5uZXdfYWRkX2NvZGVcXFwiLGlucHV0KSdcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTon5L+d5a2YJyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0X2NlbnRlcl8xJyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDokKCkubGF6eVJ1bGUoKG15VGhlbWVzLHRoZW1lUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSBnZXRWYXIoJ3RoZW1lLm5ld19hZGRfY29kZScsICcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmFtZSA9IGdldFZhcigndGhlbWUubmV3X2FkZF9uYW1lJywgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFuYW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S9oOi/mOayoeWhq+WGmeS4u+mimOWQjeensOWRoidcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld1RoZW1lID0ge307XFxuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3VGhlbWUgPSBKU09OLnBhcnNlKGNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1jYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6ZSZ6K+v55qE5Li76aKYanNvbuagvOW8jzpcXFxcbicrZS5tZXNzYWdlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKG5ld1RoZW1lLHsnbmFtZSc6bmFtZX0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG15VGhlbWVzLnRoZW1lcy5wdXNoKG5ld1RoZW1lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUodGhlbWVSb3V0ZSxKU09OLnN0cmluZ2lmeShteVRoZW1lcykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LmlrDlop7mlq3mj5LkuLvpopg6JytuYW1lXFxuICAgICAgICAgICAgICAgICAgICB9LG15VGhlbWVzLHRoZW1lUm91dGUpXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgICAgICAgICAgfSxteVRoZW1lcyx0aGVtZVJvdXRlKSxcXG4gICAgICAgIH0pO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpteVRoZW1lcy50aGVtZXM/J+S4u+mimOWIl+ihqDrlhbHorqE6Jytjb2xvcihteVRoZW1lcy50aGVtZXMubGVuZ3RoLCcjZmY3MDAwJykrJ+S4quS4u+mimCc6XFxcIuesrOS4gOasoeWKoOi9ve+8jOeCueatpOi/m+WOu+WIneWni+WMluS4u+mimOWIl+ihqFxcXCIsXFxuICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfMScsXFxuICAgICAgICAgICAgdXJsOidoaWtlcjovL3BhZ2UvUm91dGU/cnVsZT1NeUZpZWxk4bSw4oG/JnR5cGU96K6+572uI25vSGlzdG9yeSMnXFxuICAgICAgICB9KTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6XFxcIuaBouWkjeWHuuWOguiuvue9rlxcXCIsXFxuICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfY2VudGVyXzEnLFxcbiAgICAgICAgIC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vd190aGVtZT09PW5vd1RoZW0ubmFtZT8n8J+RiScrbm93VGhlbS5uYW1lOm5vd1RoZW0ubmFtZSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6J2ZsZXhfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgdXJsOiQoKS5sYXp5UnVsZSgobXl0aGVtZSxteVRoZW1lcyxpLHRoZW1lUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICBsZXQgb3B0aW9uID0gZ2V0VmFyKCd0aGVtZS5kbl9vcHRpb24nLCfmlrDlop4nKTtcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAob3B0aW9uKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICflr7zlh7onOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbXl0aGVtZUNvZGUgPSBiYXNlNjRFbmNvZGUoSlNPTi5zdHJpbmdpZnkobXl0aGVtZSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gc2hhcmVQYXN0ZShteXRoZW1lQ29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gJ+aWreaPkuS4u+mimEAnK215dGhlbWUubmFtZSsnQCcrdXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3B5KGNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5a+85Ye65Li65LqR5Y+j5Luk5bm25aSN5Yi25Yiw5Ymq5YiH5p2/J1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ+S/ruaUuSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKEpTT04uc3RyaW5naWZ5KG15dGhlbWUpKS5pbnB1dCgobXl0aGVtZSxteVRoZW1lcyxpLHRoZW1lUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihteXRoZW1lLm5hbWU9PT1teVRoZW1lcy5ub3dfdGhlbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mraTkuLvpopjlvZPliY3mraPlnKjkvb/nlKjkuK3vvIzkuI3lhYHorrjkv67mlLkhJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbXlUaGVtZXMudGhlbWVzW2ldPUpTT04ucGFyc2UoaW5wdXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHRoZW1lUm91dGUsSlNPTi5zdHJpbmdpZnkobXlUaGVtZXMpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suS/ruaUuSdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxteXRoZW1lLG15VGhlbWVzLGksdGhlbWVSb3V0ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICfliKDpmaQnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgn56Gu6K6k5Yig6Zmk5Li76aKYOicrbXl0aGVtZS5uYW1lKyc/JykuY29uZmlybSgobXl0aGVtZSxteVRoZW1lcyxpLHRoZW1lUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihteXRoZW1lLm5hbWU9PT1teVRoZW1lcy5ub3dfdGhlbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mraTkuLvpopjlvZPliY3mraPlnKjkvb/nlKjkuK3vvIzkuI3lhYHorrjliKDpmaQhJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbXlUaGVtZXMudGhlbWVzLnNwbGljZShpLDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHRoZW1lUm91dGUsSlNPTi5zdHJpbmdpZnkobXlUaGVtZXMpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWIoOmZpCdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxteXRoZW1lLG15VGhlbWVzLGksdGhlbWVSb3V0ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBteVRoZW1lcy5ub3dfdGhlbWU9bXl0aGVtZS5uYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUodGhlbWVSb3V0ZSxKU09OLnN0cmluZ2lmeShteVRoZW1lcykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S9oOmAieaLqeS6hicrbXl0aGVtZS5uYW1lKyfkvZzkuLrpu5jorqTkuLvpopgnO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LG5vd1RoZW0sbXlUaGVtZXMsaSx0aGVtZVJvdXRlKSxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgfVxcbiQuZXhwb3J0cy50aGVtZUluaXQ9dGhlbWVJbml0O1wifSx7XCJuYW1lXCI6XCLmk43kvZzmjIflvJVcIixcInBhdGhcIjpcIkd1aWRlXCIsXCJydWxlXCI6XCI8aHRtbD5cX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uY3Rpb24ganhNYW5hZ2UoKXtcXG4gICAgICAgIGNvbnN0IHtjb2xvcixzbWFsbH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS91dGlsaXk/cnVsZT3pgZPplb/ku5PlupNQcm9cXFwiKTtcXG4gICAgICAgIGxldCBkID0gW107XFxuICAgICAgICBsZXQgb3B0aW9ucyA9IFsn6YCJ5oupJywn5L+u5pS5Jywn5Yig6ZmkJywn5a+85Ye6J107XFxuXFxuICAgICAgICBmb3IobGV0IGkgaW4gb3B0aW9ucyl7XFxuICAgICAgICAgICAgbGV0IG9wdGlvbiA9IG9wdGlvbnNbaV07XFxuICAgICAgICAgICAgbGV0IGZsYWcgPSBnZXRWYXIoJ2RuLmp4bV9vcHRpb24nLCfpgInmi6knKT09PW9wdGlvbj8n8J+RiSc6Jyc7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ZmxhZytvcHRpb24sXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKG9wdGlvbik9PntcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcignZG4uanhtX29wdGlvbicsIG9wdGlvbik7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSc7XFxuICAgICAgICAgICAgICAgIH0sb3B0aW9uKSxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCBqeHNSb3V0ZSA9IFxcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL015SmlleGkuanNvblxcXCI7XFxuICAgICAgICBsZXQgZG1QYXRoID0gXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvZGlhb21hby50eHRcXFwiO1xcbiAgICAgICAgbGV0IE15SmlleGkgPSB7amlleGlzOltdfTtcXG4gICAgICAgIGxldCBqaWV4aXMgPSB7fTtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgTXlKaWV4aSA9IEpTT04ucGFyc2UoZmV0Y2goanhzUm91dGUpKTtcXG4gICAgICAgICAgICBqaWV4aXMgPSBNeUppZXhpLmppZXhpcy5maWx0ZXIoaXQ9Pml0Lm5hbWU9PT1NeUppZXhpLm5vdylbMF07XFxuICAgICAgICB9Y2F0Y2ggKGUpIHt9XFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiflr7zlhaUnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICB1cmw6JCgnJywn6K+36L6T5YWl5a+85YWl5Y+j5LukJykuaW5wdXQoKE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgIGlmKC9e6a2U5pat6Kej5p6Q6YWN572uQC4qP0BodHRwLy50ZXN0KGlucHV0KSl7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgbmFtZSA9IGlucHV0LnNwbGl0KCdAJylbMV07XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gaW5wdXQuc3BsaXQoJ0AnKVsyXTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCfnoa7lrpropoHlr7zlhaXmlq3mj5Lop6PmnpDphY3nva4tJytuYW1lKycg5ZCXPycpLmNvbmZpcm0oKG5hbWUsdXJsLE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRlbnQgPSBwYXJzZVBhc3RlKHVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhhc0l0ID0gTXlKaWV4aS5qaWV4aXMuZmlsdGVyKGl0PT5pdC5uYW1lPT09bmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoaGFzSXQmJmhhc0l0Lmxlbmd0aD4wKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGlkID0gbnVsbDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBqIGluIE15SmlleGkuamlleGlzKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKE15SmlleGkuamlleGlzW2pdLm5hbWUgPT09IG5hbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkID0gajtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighaWQpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+e0ouW8lemUmeivr+aXoOazleimhuebluWvvOWFpTpcXFxcbicraWRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2coJ+imhuebluWvvOWFpeS4u+mimGlkOicraWQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmppZXhpc1tpZF0gPSBPYmplY3QuYXNzaWduKEpTT04ucGFyc2UoYmFzZTY0RGVjb2RlKGNvbnRlbnQpKSx7J25hbWUnOm5hbWV9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXMucHVzaChPYmplY3QuYXNzaWduKEpTT04ucGFyc2UoYmFzZTY0RGVjb2RlKGNvbnRlbnQpKSx7J25hbWUnOm5hbWV9KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suaIkOWKn+WvvOWFpeino+aekOmFjee9rjpcXFxcbicrbmFtZVxcbiAgICAgICAgICAgICAgICAgICAgfSxuYW1lLHVybCxNeUppZXhpLGp4c1JvdXRlKTtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5peg5rOV6K+G5Yir55qE5a+85YWl5Y+j5LukOlxcXFxuJytpbnB1dDtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sTXlKaWV4aSxqeHNSb3V0ZSksXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGxldCBpc0F1dG8gPSBNeUppZXhpLmlzQXV0bztcXG4gICAgICAgIGxldCBhdXRvTW9kZSA9IE15SmlleGkuYXV0b01vZGU7XFxuICAgICAgICBsZXQgc2luZ2xlQmFjayA9IE15SmlleGkuc2luZ2xlQmFja3x8ZmFsc2U7IC8v5ZCK5q+b5qih5byP44CC5Y2V5Liq57uT5p6c55u05o6l6L+U5Zue77yM5YGc5q2i5ZCO6Z2i55qEXFxuICAgICAgICBsZXQgaWdub3JlX214ID0gTXlKaWV4aS5pZ25vcmVfbXh8fGZhbHNlOyAvL+W/veeVpeWFjeWXhSzll4XmjqLkvJjlhYjmqKHlvI/kvb/nlKhcXG4gICAgICAgIGxldCB0aXBzID0gJ+ino+aekOmFjee9ruWIl+ihqDrlhbHorqE6Jytjb2xvcihNeUppZXhpLmppZXhpcy5sZW5ndGgsJyNmZjcwMDAnKSsn5Liq6YWN572uLOiHquWKqOaho+W8gOWFszonK2NvbG9yKGlzQXV0bz8n5byAJzon5YWzJywnI2ZmNzAwMCcpO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpNeUppZXhpLmppZXhpcyYmTXlKaWV4aS5qaWV4aXMubGVuZ3RoPjA/dGlwczpcXFwi56ys5LiA5qyh5Yqg6L2977yM54K55q2k6L+b5Y675Yid5aeL5YyW6Kej5p6Q5YiX6KGoXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF8xJyxcXG4gICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoTXlKaWV4aSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgaWYoTXlKaWV4aS5qaWV4aXMmJk15SmlleGkuamlleGlzLmxlbmd0aD4wKXtcXG4gICAgICAgICAgICAgICAgICAgIE15SmlleGkuaXNBdXRvID0gIU15SmlleGkuaXNBdXRvO1xcbiAgICAgICAgICAgICAgICAgICAgaWYoIU15SmlleGkuYXV0b01vZGUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkuYXV0b01vZGUgPSAn5ZeF5o6i5LyY5YWIJztcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB0aXBzID0gTXlKaWV4aS5pc0F1dG8/J+W8gCc6J+WFsyc7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey6K6+572u6Ieq5Yqo5qGj5qih5byP5Li6OicrdGlwc1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBpbml0U2V0ID0geydub3cnOlxcXCLpgZPplb/mjqjojZBcXFwiLCdqaWV4aXMnOlt7bmFtZTon6YGT6ZW/5o6o6I2QJyxxeTpbJ+S4h+iDveino+aekOKSvyddLHlrOlsn5LiH6IO96Kej5p6Q4pK/J10sdHg6WyfkuIfog73op6PmnpDikr8nXSxtZzpbJ+S4h+iDveino+aekOKSvyddLGJsOlsn5LiH6IO96Kej5p6Q4pK/J10sc2g6WyfkuIfog73op6PmnpDikr8nXSx4ZzpbJ+S4h+iDveino+aekOKSvyddLHBwOlsn5LiH6IO96Kej5p6Q4pK/J10sbWk6WyfkuIfog73op6PmnpDikr8nXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGU6WyfkuIfog73op6PmnpDikr8nXSxmdW46WyfkuIfog73op6PmnpDikr8nXSxvbmU6WyfkuIfog73op6PmnpDikr8nXSxsdDpbJ+S4h+iDveino+aekOKSvyddLHJyOlsn5LiH6IO96Kej5p6Q4pK/J10sd2Q6WyfkuIfog73op6PmnpDikr8nXX1dfTtcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShpbml0U2V0KSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mlq3mj5Lop6PmnpDphY3nva7lt7LliJ3lp4vljJYnXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LE15SmlleGksanhzUm91dGUpXFxuICAgICAgICB9KTtcXG4gICAgICAgIGxldCBjMSA9ICcjMTVhYjIxJztcXG4gICAgICAgIGxldCBjMiA9ICcjOTAwYTBhJztcXG4gICAgICAgIGxldCBhdXRvTW9kZVNlbCA9IFsn6YCf5bqm5LyY5YWIJywn6aG65bqP5LyY5YWIJywn5ZeF5o6i5LyY5YWIJ107XFxuICAgICAgICBsZXQgYXV0b01vZGVTZWxzID0gYXV0b01vZGVTZWwubWFwKChpdCk9PntcXG4gICAgICAgICAgICBpZihpdD09PU15SmlleGkuYXV0b01vZGUpe1xcbiAgICAgICAgICAgICAgICBpdCA9IGNvbG9yKGl0LGMxKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIGl0XFxuICAgICAgICB9KTtcXG4gICAgICAgIGxldCBhdXRvTW9kZVRpcHMgPSBhdXRvTW9kZVNlbC5pbmNsdWRlcyhhdXRvTW9kZSk/YXV0b01vZGU6J+acquefpSc7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOnNtYWxsKFxcXCLlpIfog47lrqDlubjmlrnmoYg6XFxcIikrY29sb3IoYXV0b01vZGVUaXBzLCcjZmY3MDAwJyksXFxuICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfMicsXFxuICAgICAgICAgICAgdXJsOiQoYXV0b01vZGVTZWxzLDMsJ+ivt+mAieaLqeiHquWKqOaho+aooeW8jycpLnNlbGVjdCgoTXlKaWV4aSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgaW5wdXQgPSAvZm9udC8udGVzdChpbnB1dCk/aW5wdXQuc3BsaXQoJz4nKVsxXS5zcGxpdCgnPCcpWzBdOmlucHV0O1xcbiAgICAgICAgICAgICAgICBpZihpbnB1dCE9PU15SmlleGkuYXV0b01vZGUpe1xcbiAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5hdXRvTW9kZSA9IGlucHV0O1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey6K6+572u5aSH6IOO5a6g5bm45pa55qGI5Li6OicraW5wdXRcXG4gICAgICAgICAgICB9LE15SmlleGksanhzUm91dGUpLFxcbiAgICAgICAgfSk7XFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOmNvbG9yKFxcXCLmgaLlpI3lh7rljoLorr7nva5cXFwiLCcjZmY3MDAwJyksXFxuICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfMicsXFxuICAgICAgICAgICAgdXJsOiQoXFxcIuWmguaenOS9oOeahOino+aekOeuoeeQhuaXoOazleato+W4uOeUqOS6hu+8jOatpOaWueazleWPr+S7peaVkeeglu+8jOehruiupOaBouWkjT9cXFwiKS5jb25maXJtKChqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgbGV0IGluaXRTZXQgPSB7J25vdyc6XFxcIumBk+mVv+aOqOiNkFxcXCIsJ2ppZXhpcyc6W3tuYW1lOifpgZPplb/mjqjojZAnLHF5Olsn5LiH6IO96Kej5p6Q4pK/J10seWs6WyfkuIfog73op6PmnpDikr8nXSx0eDpbJ+S4h+iDveino+aekOKSvyddLG1nOlsn5LiH6IO96Kej5p6Q4pK/J10sYmw6WyfkuIfog73op6PmnpDikr8nXSxzaDpbJ+S4h+iDveino+aekOKSvyddLHhnOlsn5LiH6IO96Kej5p6Q4pK/J10scHA6WyfkuIfog73op6PmnpDikr8nXSxtaTpbJ+S4h+iDveino+aekOKSvyddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxlOlsn5LiH6IO96Kej5p6Q4pK/J10sZnVuOlsn5LiH6IO96Kej5p6Q4pK/J10sb25lOlsn5LiH6IO96Kej5p6Q4pK/J10sbHQ6WyfkuIfog73op6PmnpDikr8nXSxycjpbJ+S4h+iDveino+aekOKSvyddLHdkOlsn5LiH6IO96Kej5p6Q4pK/J119XX07XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShpbml0U2V0KSk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5pat5o+S6Kej5p6Q6YWN572u5bey6YeN572u5Li65Ye65Y6C6K6+572uJ1xcbiAgICAgICAgICAgIH0sanhzUm91dGUpXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGxldCBjYWNoZVZpZGVvU3dpdGNoID0gZ2V0VmFyKCdkcC5jYWNoZVZpZGVvJywndHJ1ZScpPT09J3RydWUnPyflvIAnOiflhbMnO1xcbiAgICAgICAgbGV0IGp4VGltZW91dCA9IGdldFZhcignZHAuanhUaW1lb3V0JywnNzAwMCcpO1xcbiAgICAgICAgbGV0IGNvbF90eXBlMiA9IGF1dG9Nb2RlPT09J+mhuuW6j+S8mOWFiCc/J3RleHRfMyc6J3RleHRfMic7XFxuICAgICAgICBsZXQgc2luZ2xlQmFja1RpcHMgPSBzaW5nbGVCYWNrPyflvIAnOiflhbMnO1xcbiAgICAgICAgbGV0IGlnbm9yZV9teF90aXBzID0gaWdub3JlX214PyflvIAnOiflhbMnO1xcbiAgICAgICAgaWYoYXV0b01vZGU9PT0n6aG65bqP5LyY5YWIJyl7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6c21hbGwoJ+WQiuavm+aooeW8jzonKStjb2xvcihzaW5nbGVCYWNrVGlwcywnI2ZmNzAwMCcpLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTpjb2xfdHlwZTIsXFxuICAgICAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChNeUppZXhpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5zaW5nbGVCYWNrID0gIShNeUppZXhpLnNpbmdsZUJhY2t8fGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lorr7nva7lkIrmr5vmqKHlvI/lvIDlhbPkuLo6JysoTXlKaWV4aS5zaW5nbGVCYWNrPyflvIAnOiflhbMnKVxcbiAgICAgICAgICAgICAgICB9LE15SmlleGksanhzUm91dGUpXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9ZWxzZSBpZihhdXRvTW9kZT09PSfll4XmjqLkvJjlhYgnKXtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGNvbG9yKCflr7zlhaXovoXliqknLCcjZmY3MDAwJyksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTpjb2xfdHlwZTIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJ2hpa2VyOi8vZW1wdHkjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IHJlcXVlc3QoJ2h0dHBzOi8vbmV0Y3V0LmNuL3AvYTVkMWM4ZTFlY2VlMjhkMycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0gaHRtbC5tYXRjaCgvey4qbm90ZV9jb250ZW50Lip1cGRhdGVkX2F0Lip9LylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRlbnQgPSBKU09OLnBhcnNlKGRhdGEpLm5vdGVfY29udGVudDtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXBEYXRhID0gSlNPTi5wYXJzZShkYXRhKS51cGRhdGVkX2F0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpcm0oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+aYr+WQpuWvvOWFpScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQ6ICfohJrmnKzmm7TmlrDml6XmnJ9cXFxcbicgKyB1cERhdGEsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpcm06JC50b1N0cmluZygoY29udGVudCk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjb250ZW50XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sY29udGVudCksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbmNlbDogKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWPlua2iOWvvOWFpSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xcbiAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICApO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOnNtYWxsKCflv73nlaXlhY3ll4U6JykrY29sb3IoaWdub3JlX214X3RpcHMsJyNmZjcwMDAnKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6Y29sX3R5cGUyLFxcbiAgICAgICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoTXlKaWV4aSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgIE15SmlleGkuaWdub3JlX214ID0gIShNeUppZXhpLmlnbm9yZV9teHx8ZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lorr7nva7lv73nlaXlhY3ll4XlvIDlhbPkuLo6JysoTXlKaWV4aS5pZ25vcmVfbXg/J+W8gCc6J+WFsycpXFxuICAgICAgICAgICAgICAgIH0sTXlKaWV4aSxqeHNSb3V0ZSlcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6c21hbGwoJ+Wkmue6v+i3r+e8k+WtmDonKStjb2xvcihjYWNoZVZpZGVvU3dpdGNoLCcjZmY3MDAwJyksXFxuICAgICAgICAgICAgY29sX3R5cGU6Y29sX3R5cGUyLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChjYWNoZVZpZGVvU3dpdGNoKT0+e1xcbiAgICAgICAgICAgICAgICBpZihjYWNoZVZpZGVvU3dpdGNoPT09J+W8gCcpe1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkcC5jYWNoZVZpZGVvJywnZmFsc2UnKTtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2RwLmNhY2hlVmlkZW8nLCd0cnVlJyk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LGNhY2hlVmlkZW9Td2l0Y2gpXFxuICAgICAgICB9KTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6c21hbGwoJ+ino+aekOi2heaXtjonKStjb2xvcihqeFRpbWVvdXQsJyNmZjcwMDAnKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTpjb2xfdHlwZTIsXFxuICAgICAgICAgICAgdXJsOiQoanhUaW1lb3V0LCfor7forr7nva7prZTmlq3op6PmnpDotoXml7Ys5b+F6aG75Li65pW05pWwJykuaW5wdXQoKCk9PntcXG4gICAgICAgICAgICAgICAgaWYoIXBhcnNlSW50KGlucHV0KSl7XFxuICAgICAgICAgICAgICAgICAgICBpbnB1dCA9IDcwMDA7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcHV0VmFyKCdkcC5qeFRpbWVvdXQnLGlucHV0KTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lorr7nva7kuLo6JytwYXJzZUludChpbnB1dClcXG4gICAgICAgICAgICB9LGp4VGltZW91dClcXG4gICAgICAgIH0pO1xcbiAgICAgICAgaWYoYXV0b01vZGUmJnNpbmdsZUJhY2spe1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBjb2xvcign5omT5byA57yW6L6R5ZCK5q+b6L+H5ruk5paH5Lu2JywnIzEzNzlDQicpLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGRtUGF0aCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGRlZl9kbXMgPSBbJ2h0dHBzOi8vdmQzLmJkc3RhdGljLmNvbS9tZGEta2k5dWdxNTQzMGJoeHlzOC92MS1jYWUvMTA4MHAvbWRhLWtpOXVncTU0MzBiaHh5czgubXA0J107XFxuICAgICAgICAgICAgICAgICAgICBpZighZmlsZUV4aXN0KGRtUGF0aCkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShkbVBhdGgsJy8v5LiA6KGM5LiA5Liq6ZO+5o6lLOWPr+azqOmHiuOAglxcXFxuJytkZWZfZG1zLmpvaW4oJ1xcXFxuJykpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdlZGl0RmlsZTovLycrZG1QYXRoO1xcbiAgICAgICAgICAgICAgICB9LGRtUGF0aCksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IGNvbG9yKCfmiZPlvIDnvJbovpHop6PmnpDmlofku7YnLCcjMTM3OUNCJyksXFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChqeHNSb3V0ZSkgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2VkaXRGaWxlOi8vJytqeHNSb3V0ZTtcXG4gICAgICAgICAgICB9LGp4c1JvdXRlKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGZvcihsZXQgaSBpbiBNeUppZXhpLmppZXhpcyl7XFxuICAgICAgICAgICAgbGV0IG5vd0p4ID0gTXlKaWV4aS5qaWV4aXNbaV07XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6TXlKaWV4aS5ub3c9PT1ub3dKeC5uYW1lPyfwn5GJJytub3dKeC5uYW1lOm5vd0p4Lm5hbWUsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidmbGV4X2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIGV4dHJhOntcXG4gICAgICAgICAgICAgICAgICAgIG5vd0p4Om5vd0p4LFxcbiAgICAgICAgICAgICAgICAgICAgTXlKaWV4aTpNeUppZXhpLFxcbiAgICAgICAgICAgICAgICAgICAganhzUm91dGU6anhzUm91dGVcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKG5vd0p4LE15SmlleGksaSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgIGxldCBvcHRpb24gPSBnZXRWYXIoJ2RuLmp4bV9vcHRpb24nLCfpgInmi6knKTtcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAob3B0aW9uKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICflr7zlh7onOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbm93SnhDb2RlID0gYmFzZTY0RW5jb2RlKEpTT04uc3RyaW5naWZ5KG5vd0p4KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBzaGFyZVBhc3RlKG5vd0p4Q29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gJ+mtlOaWreino+aekOmFjee9rkAnK25vd0p4Lm5hbWUrJ0AnK3VybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29weShjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWvvOWHuuS4uuS6keWPo+S7pOW5tuWkjeWItuWIsOWJquWIh+advydcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICfkv67mlLknOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpZihub3dKeC5uYW1lPT09TXlKaWV4aS5ub3cpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgcmV0dXJuICd0b2FzdDovL+atpOino+aekOmFjee9ruW9k+WJjeato+WcqOS9v+eUqOS4re+8jOS4jeWFgeiuuOS/ruaUuSEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL2p4RWRpdD9ydWxlPU15RmllbGThtLDigb8nXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvanhFZGl0P3J1bGU9TXlGaWVsZOG0sOKBvydcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICfliKDpmaQnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgn56Gu6K6k5Yig6Zmk6Kej5p6Q6YWN572uOicrbm93SngubmFtZSsnPycpLmNvbmZpcm0oKG5vd0p4LE15SmlleGksaSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG5vd0p4Lm5hbWU9PT1NeUppZXhpLm5vdyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+atpOino+aekOmFjee9ruW9k+WJjeato+WcqOS9v+eUqOS4re+8jOS4jeWFgeiuuOWIoOmZpCEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmppZXhpcy5zcGxpY2UoaSwxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LliKDpmaQnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sbm93SngsTXlKaWV4aSxpLGp4c1JvdXRlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkubm93PW5vd0p4Lm5hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICA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biAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHRpdGxlcyx0aXRsZSxqeHMsanhzUm91dGUsTXlKaWV4aSxub3dKeCk9PntcXG4gICAgICAgICAgICB2YXIganNvbj17dGl0bGU6W10sY29kZXM6e319O1xcbiAgICAgICAgICAgIGxldCBzZXRGaWxlID0gcmVxdWVzdCgnaGlrZXI6Ly9maWxlcy9ydWxlcy9EdWFuTmlhbi9NeVBhcnNlLmpzb24nKTtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBldmFsKCdqc29uPScrc2V0RmlsZSk7XFxuICAgICAgICAgICAgfWNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgIGxvZygnSnNvbuino+aekOWPkeeUn+S6humUmeivrzonK2UubWVzc2FnZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmKGdldFZhcignZG4uanhtX3dyaXRlTW9kZScsJ+aWsOWinicpPT09J+aWsOWinicpe1xcbiAgICAgICAgICAgICAgICBsZXQgc2VsX3RpdGxlID0gdGl0bGVzLmZpbHRlcihpdD0+IWp4cy5pbmNsdWRlcyhpdCkpO1xcbiAgICAgICAgICAgICAgICBzZWxfdGl0bGUgPSBzZWxfdGl0bGUubWFwKChpdCk9PntcXG4gICAgICAgICAgICAgICAgICAgIGxldCBmbGFnID0gJ+KAmOKAmOKTiuKAmeKAmSc7XFxuICAgICAgICAgICAgICAgICAgICBpZih0eXBlb2YoanNvbi5jb2Rlc1tpdF0pPT09J2Z1bmN0aW9uJyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZmxhZyA9ICfigJzigJzikr/igJ3igJ0nO1xcbiAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYodHlwZW9mKGpzb24uY29kZXNbaXRdKT09PSd1bmRlZmluZWQnKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmbGFnID0gJyc7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmxhZytpdFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQoc2VsX3RpdGxlLDIpLnNlbGVjdCgoTXlKaWV4aSxqeHMsbm93SngsdGl0bGUsanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICBpbnB1dCA9IGlucHV0LnJlcGxhY2UoL+KAmOKAmOKTiuKAmeKAmXzigJzigJzikr/igJ3igJ0vZywnJyk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgaWQgPSBudWxsO1xcbiAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBqIGluIE15SmlleGkuamlleGlzKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihNeUppZXhpLmppZXhpc1tqXS5uYW1lID09PSBub3dKeC5uYW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQgPSBqO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBpZighaWQpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ntKLlvJXplJnor6/ml6Dms5Xkv53lrZg6XFxcXG4nK2lkXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBqeHMucHVzaChpbnB1dCk7XFxuICAgICAgICAgICAgICAgICAgICBsb2coanhzKTtcXG4gICAgICAgICAgICAgICAgICAgIG5vd0p4W3RpdGxlXSA9IGp4cztcXG4gICAgICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzW2lkXSA9IG5vd0p4O1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkbi5ub3dKeCcsSlNPTi5zdHJpbmdpZnkobm93SngpKTtcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSxNeUppZXhpLGp4cyxub3dKeCx0aXRsZSxqeHNSb3V0ZSk7XFxuICAgICAgICAgICAgfWVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSx0aXRsZXMsdGl0bGUsanhzLGp4c1JvdXRlLE15SmlleGksbm93SngpXFxuICAgIH0pO1xcbiAgICBmb3IobGV0IGsgaW4ganhzKXtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6anhzW2tdLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgodGl0bGVzLHRpdGxlLGp4cyxqeHNSb3V0ZSxNeUppZXhpLG5vd0p4LG5qeCxpZCxrLG1heCk9PntcXG4gICAgICAgICAgICAgICAgc3dpdGNoIChnZXRWYXIoJ2RuLmp4bV93cml0ZU1vZGUnLCfmlrDlop4nKSl7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICfliKDpmaQnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIEFycmF5LnByb3RvdHlwZS5yZW1vdmUgPSBmdW5jdGlvbih2YWwpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGluZGV4ID0gdGhpcy5pbmRleE9mKHZhbCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbmRleCA+IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNwbGljZShpbmRleCwgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGp4cy5yZW1vdmUobmp4KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBub3dKeFt0aXRsZV0gPSBqeHM7XFxuICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXNbaWRdID0gbm93Sng7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkbi5ub3dKeCcsSlNPTi5zdHJpbmdpZnkobm93SngpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ+enu+WKqCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoaywn56e75Yqo5Yiw57Si5byV5aSa5bCRPycpLmlucHV0KChrLG1heCxqeHMsbm93SngsTXlKaWV4aSxpZCx0aXRsZSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gTW92ZShhcnIsIGZyb21JbmRleCwgdG9JbmRleCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGVsZW1lbnQgPSBhcnJbZnJvbUluZGV4XTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyci5zcGxpY2UoZnJvbUluZGV4LCAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyci5zcGxpY2UodG9JbmRleCwgMCwgZWxlbWVudCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocGFyc2VJbnQoaW5wdXQpPT09ayl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5ZWl5Lmf5rKh5YGaJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihwYXJzZUludChpbnB1dCk+bWF4LTF8fHBhcnNlSW50KGlucHV0KTwtMSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L2g5pyA5aSn56e75Yqo6IyD5Zu0MC0nK3BhcnNlSW50KG1heC0xKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsZXQgbmV3QXIgPSBqeHMuc3BsaWNlKGssIDEpOyAvLyDliKDmjolcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8ganhzLnVuc2hpZnQobmV3QXJbMF0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBNb3ZlKGp4cyxrLHBhcnNlSW50KGlucHV0KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vd0p4W3RpdGxlXSA9IGp4cztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXNbaWRdID0gbm93Sng7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcignZG4ubm93SngnLEpTT04uc3RyaW5naWZ5KG5vd0p4KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxrLG1heCxqeHMsbm93SngsTXlKaWV4aSxpZCx0aXRsZSxqeHNSb3V0ZSlcXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+atpOWFg+e0oOS4jeaUr+aMgei/m+ihjDonK2dldFZhcignZG4uanhtX3dyaXRlTW9kZScsJ+aWsOWinicpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LHRpdGxlcyx0aXRsZSxqeHMsanhzUm91dGUsTXlKaWV4aSxub3dKeCxqeHNba10saWQsayxqeHMubGVuZ3RoKVxcbiAgICAgICAgfSk7XFxuICAgIH1cXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIC8vIGNvbF90eXBlOidsaW5lJyxcXG4gICAgICAgIGNvbF90eXBlOidibGFua19ibG9jaydcXG4gICAgfSlcXG59XFxuZC5wdXNoKHtcXG4gICAgY29sX3R5cGU6J2xpbmUnLFxcbn0pO1xcbmQucHVzaCh7XFxuICAgIHRpdGxlOifkv53lrZgnLFxcbiAgICBjb2xfdHlwZTondGV4dF9jZW50ZXJfMScsXFxuICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChNeUppZXhpLGlkLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgaWYoZ2V0VmFyKCdkbi5qeG1fbmFtZScsJycpIT09TXlKaWV4aS5qaWV4aXNbaWRdLm5hbWUpe1xcbiAgICAgICAgICAgIGlmSGFzID0gTXlKaWV4aS5qaWV4aXMuZmlsdGVyKGl0PT5pdC5uYW1lPT09Z2V0VmFyKCdkbi5qeG1fbmFtZScsJycpKS5sZW5ndGg+MDtcXG4gICAgICAgICAgICBpZihpZkhhcyl7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lvoXkv67mlLnnmoTlkI3np7Dph43lpI0s5LiN5YWB6K645L+d5a2YJ1xcb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gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5aSx6LSlIeS4jumBk+mVv+acjeWKoeWZqOmAmuiur+mUmeivryzkvLDorqHmmK/nvZHnu5zljaHkuoYnXFxuICAgICAgICB9XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHdyaXRlRmlsZShkbVBhdGgsIGRtQ29kZSk7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WQiuavm+i/h+a7pOaWh+S7tuW3sumFjee9ruaIkOWKnydcXG4gICAgICAgIH1cXG4gICAgICAgIGNhdGNoKGUpe1xcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lkIrmr5vov4fmu6Tmlofku7blupTnlKjlpLHotKVcXFxcbuacquacn+acm+eahOmUmeivrzonK2UubWVzc2FnZTtcXG4gICAgICAgIH1cXG4gICAgfSxkbVBhdGgsZG1PbmxpbmUpXFxufSk7XFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6c21hbGwoJ+ecn+eahOWVpeS5n+S4jeS8muS6hizov5jmh5LlvpfkuIDkuKrkuKrngrk/JykrY29sb3IoJ+S4jeefpemBkyzmnaXkuIDku73pgZPplb/nmoQnLCcjNUZCODc4JyksXFxuICAgIGRlc2M6J+iHquWKqOaLieWPlumBk+mVv+WcqOeUqOeahOS4iui/sOaJgOacieaWh+S7tlxcXFxu5LiA6ZSu5pCe5a6M55u05o6l5Y675pSv5oyB5pat5o+S55qE5bCP56iL5bqP55yL6KeG6aKR5bCx6KGM5ZWmJyxcXG4gICAgY29sX3R5cGU6J3RleHRfMScsXFxuICAgIHVybDokKCfkv67ku5nms5Xlipvml6DovrknLCfnoa7orqTlkJc/5aaC5p6c5L2g5LiN5piv5bCP55m977yM5oC76K+l5Lya5o+Q5YmN5aSH5Lu96Ieq5bex55qE5LiK6L+w5omA5pyJ5paH5Lu25ZCnIVxcXFxu6K+36L6T5YWl6YGT6ZW/5L+u5LuZ5rOV5Yqb5peg6L655p2l56Gu6K6k5omn6K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ZXdPbmxpbmUpO1xcbiAgICAgICAgbGV0IGRtQ29kZSA9IGZldGNoKGRtT25saW5lKTtcXG4gICAgICAgIGlmKCEvUGFyc2VfRG5cXFxcLmpzLy50ZXN0KG9sZENvZGUpfHwhL1BhcnNlX0RuXFxcXC5qcy8udGVzdChuZXdDb2RlKSl7XFxuICAgICAgICAgICAgLy8gbG9nKCdvbGRDb2RlOicrb2xkQ29kZSk7XFxuICAgICAgICAgICAgLy8gbG9nKCduZXdDb2RlOicrbmV3Q29kZSk7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+Wksei0pSHkuI7pgZPplb/mnI3liqHlmajpgJrorq/plJnor68s5Lyw6K6h5piv572R57uc5Y2h5LqGJ1xcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IGp4Q29kZSA9IGZldGNoKGp4T25saW5lKTtcXG4gICAgICAgIGlmKCEvamlleGlzLy50ZXN0KGp4Q29kZSkpe1xcbiAgICAgICAgICAgIC8vIGxvZygnanhDb2RlOicranhDb2RlKTtcXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5aSx6LSlIeS4jumBk+mVv+acjeWKoeWZqOmAmuiur+mUmeivryzkvLDorqHmmK/nvZHnu5zljaHkuoYnXFxuICAgICAgICB9XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHdyaXRlRmlsZShjamNhY2hlLCBjakZpbGUpOyAvLyDmi4nmj5Lku7ZcXG4gICAgICAgICAgICB3cml0ZUZpbGUoeDVjYWNoZSwgeDVGaWxlKTsgLy/mi4nnvZHpobXmlofku7ZcXG4gICAgICAgICAgICB3cml0ZUZpbGUodGhlbWVSb3V0ZSwgdGhlbWVDb2RlKTsgLy/mi4nkuLvpopjmlofku7ZcXG4gICAgICAgICAgICBjbGVhclZhcihcXFwianhPbGRWXFxcIik7XFxuICAgICAgICAgICAgY2xlYXJWYXIoXFxcImp4TmV3VlxcXCIpO1xcbiAgICAgICAgICAgIHdyaXRlRmlsZShvbGRSb3V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cbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/otoXml7borr7nva7plJnor6/vvIzmi5Lnu53kv53lrZgnXFxuICAgICAgICB9XFxuICAgICAgICBjb25zdCBsc2c9JC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvbG9jYWxTdG9yYWdlP3J1bGU96YGT6ZW/5LuT5bqTUHJvXFxcIik7XFxuICAgICAgICBsc2cuc2V0SXRlbSgndGltZW91dCcsaW5wdXR8fCc1MDAwJyk7XFxuICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey6K6+572u6Kej5p6Q6LaF5pe25q+r56eSOicraW5wdXR8fCc1MDAwJztcXG4gICAgfSksXFxuICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxuICAgIGV4dHJhOntcXG4gICAgICAgIGxpbmVWaXNpYmxlOmZhbHNlXFxuICAgIH1cXG59KTtcXG5pdGVtcy5wdXNoKHtcXG4gICAgdGl0bGU6J+S9v+eUqOivtOaYjicsXFxuICAgIGNvbF90eXBlOid0ZXh0X2NlbnRlcl8xJyxcXG4gICAgdXJsOiQoJ2hpa2VyOi8vZW1wdHkjbm9SZWNvcmRIaXN0b3J5IyNub0hpc3RvcnkjJykucnVsZSgoY29sb3IpPT57XFxuICAgICAgICBsZXQgZD1bXTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6Y29sb3IoJ+ebuOS/oeiHquW3se+8jOS9oOS4jemcgOimgeivtOaYjicsJ2dyZXknKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF8xJyxcXG4gICAgICAgICAgICB1cmw6J2hpa2VyOi8vZW1wdHknLFxcbiAgICAgICAgICAgIGV4dHJhOntcXG4gICAgICAgICAgICAgICAgbGluZVZpc2libGU6ZmFsc2VcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgICAgIGxldCBub3RlPSfmg7Pmi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xuICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6KEFycmF5LmlzQXJyYXkoZGF0YSkmJmRhdGEuaW5jbHVkZXMoaXQpKT9jb2xvcihpdCwnIzEyYjY2OCcpOml0LFxcbiAgICAgICAgICAgICAgICAvLyB1cmw6J3RvYXN0Oi8v5Yqf6IO95byA5Y+R5LitJyxcXG4gICAgICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGl0LGNvbG9yKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBzdG9yYWdlMC5nZXRNeVZhcignanhfc2VsZWN0ZWQnKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmKEFycmF5LmlzQXJyYXkoZGF0YSkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRhdGEuaW5jbHVkZXMoaXQpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKCfljIXlkKs6JytpdCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEuc3BsaWNlKGRhdGEuaW5kZXhPZihpdCksMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEucHVzaChpdClcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoJ2p4X3NlbGVjdGVkJywgZGF0YSlcXG4gICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCdqeF9zZWxlY3RlZCcsIFtpdF0pXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBpZihzdG9yYWdlMC5nZXRNeVZhcignanhfc2VsZWN0ZWQnKS5pbmNsdWRlcyhpdCkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oaXQse1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTpjb2xvcihpdCwnIzEyYjY2OCcpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oaXQse1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTppdFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgIH0saXQsY29sb3IpLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTondGV4dF8zJyxcXG4gICAgICAgICAgICAgICAgZXh0cmE6e1xcbiAgICAgICAgICAgICAgICAgICAgaWQ6aXRcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICAgICAgbGV0IG9wPVtdO1xcbiAgICAgICAgb3AucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6J+WFqOmAiScsXFxuICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGp4cyxjb2xvcik9PntcXG4gICAgICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoJ2p4X3NlbGVjdGVkJywganhzKTtcXG4gICAgICAgICAgICAgICAganhzLmZvckVhY2goaXQ9PntcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe3RpdGxlOiBjb2xvcihpdCwnIzEyYjY2OCcpLCBleHRyYToge2lkOiBpdH19KTtcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LGp4cyxjb2xvciksXFxuICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nXFxuICAgICAgICB9KTtcXG4gICAgICAgIG9wLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiflhajkuI3pgIknLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChqeHMpPT57XFxuICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCdqeF9zZWxlY3RlZCcsIFtdKTtcXG4gICAgICAgICAgICAgICAganhzLmZvckVhY2goaXQ9PntcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe3RpdGxlOiBpdCwgZXh0cmE6IHtpZDogaXR9fSk7XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSxqeHMpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgfSk7XFxuICAgICAgICBvcC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTon5Y+N6YCJJyxcXG4gICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoanhzLGNvbG9yKT0+e1xcbiAgICAgICAgICAgICAgICBsZXQgb2xkU2VsID0gc3RvcmFnZTAuZ2V0TXlWYXIoJ2p4X3NlbGVjdGVkJywgW10pO1xcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBnZXREaWZmZXJlbnREYXRhKGFyckEsIGFyckIpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBhcnJBLmNvbmNhdChhcnJCKS5maWx0ZXIoZnVuY3Rpb24gKHYsIGksIGFycikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBhcnIuaW5kZXhPZih2KSA9PT0gYXJyLmxhc3RJbmRleE9mKHYpO1xcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgbGV0IG5ld1NlbCA9IGdldERpZmZlcmVudERhdGEoanhzLG9sZFNlbCk7XFxuICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCdqeF9zZWxlY3RlZCcsIG5ld1NlbCk7XFxuICAgICAgICAgICAgICAgIG9sZFNlbC5mb3JFYWNoKGl0PT57XFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHt0aXRsZTogaXQsIGV4dHJhOiB7aWQ6IGl0fX0pO1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgbmV3U2VsLmZvckVhY2goaXQ9PntcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe3RpdGxlOiBjb2xvcihpdCwnIzEyYjY2OCcpLCBleHRyYToge2lkOiBpdH19KTtcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LGp4cyxjb2xvciksXFxuICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nXFxuICAgICAgICB9KTtcXG4gICAgICAgIG9wLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOifliKDpmaQnLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCgpPT57XFxuICAgICAgICAgICAgICAgIGxldCBzZWwgPSBzdG9yYWdlMC5nZXRNeVZhcignanhfc2VsZWN0ZWQnLCBbXSk7XFxuICAgICAgICAgICAgICAgIGlmKHNlbC5sZW5ndGggPCAxKXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/llaXpg73msqHpgInvvIzliKDpmaTkuKrpuKHmr5t+J1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKCfnoa7orqTliKDpmaTlt7LpgInmi6nnmoQ6JytzZWxbMF0rJ+etiScrc2VsLmxlbmd0aCsn5p2h6Kej5p6QPycpLmNvbmZpcm0oKHNlbCk9PntcXG4gICAgICAgICAgICAgICAgICAgIHZhciBwYXJzZVJvdXRlID0gZ2V0VmFyKCdwYXJzZVJvdXRlJyk7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKHBhcnNlUm91dGUpKTtcXG4gICAgICAgICAgICAgICAgICAgIGZvcihsZXQgbmFtZSBpbiBzZWwpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChqc29uLmNvZGVzLmhhc093blByb3BlcnR5KG5hbWUpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBqc29uLmNvZGVzW25hbWVdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGpzb24udGl0bGUgPSBqc29uLnRpdGxlLmZpbHRlcihpdD0+IXNlbC5pbmNsdWRlcyhpdCkpOyAvLyDnrZvpgInmsqHmnInooqvliKDpmaTnmoTmoIfpophcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShwYXJzZVJvdXRlLCAkLnN0cmluZ2lmeShqc29uKSk7XFxuICAgICAgICAgICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcignanhfc2VsZWN0ZWQnLCBbXSk7Ly/liKDpmaTlrozkuobmuIXnqbrpgInkuK3pobnnm65cXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7LlsIbjgJZcXFwiICsgc2VsWzBdICsgXFxcIuOAl+etiVxcXCIrc2VsLmxlbmd0aCtcXFwi5p2h6Kej5p6Q5Yig6ZmkXFxcIjtcXG4gICAgICAgICAgICAgICAgfSxzZWwpXFxuICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nXFxuICAgICAgICB9KTtcXG4gICAgICAgIG9wLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOifmk43kvZx8562b6YCJICcrY29sb3IoanhzLmxlbmd0aCwnI2ZmNzAwMCcpLFxcbiAgICAgICAgICAgIHVybDondG9hc3Q6Ly/liY3pnaLmjInpkq7mmK/mk43kvZzvvIzlkI7pnaLmjInpkq7mmK/nrZvpgIknLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgfSk7XFxuICAgICAgICBvcC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpkeF9maWx0ZXI9PT0n5YWo6YOoJz9jb2xvcign5YWo6YOoJywnIzEyYjY2OCcpOiflhajpg6gnLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCgpPT57XFxuICAgICAgICAgICAgICAgIHNldEl0ZW0oJ2R4X2ZpbHRlcicsJ+WFqOmDqCcpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgIH0pO1xcbiAgICAgICAgb3AucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ZHhfZmlsdGVyPT09J+W3sumAiSc/Y29sb3IoJ+W3sumAiScsJyMxMmI2NjgnKTon5bey6YCJJyxcXG4gICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoKT0+e1xcbiAgICAgICAgICAgICAgICBzZXRJdGVtKCdkeF9maWx0ZXInLCflt7LpgIknKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZm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npzliJfooahcXG4gICAgICAgIGxldCB0YXNrcyA9IGpzb24ubWFwKChpdCxpZGV4KT0+e1xcbiAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgIGZ1bmM6IHRhc2ssXFxuICAgICAgICAgICAgICAgIHBhcmFtOiB7XFxuICAgICAgICAgICAgICAgICAgICAvL25hbWU6aXQudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBuYW1lOm5vd1BhcnNlLFxcbiAgICAgICAgICAgICAgICAgICAgdHlwZTppdC50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIC8vIHJ1bGU6aXQucnVsZSxcXG4gICAgICAgICAgICAgICAgICAgIHZpcFVybDogaXQudXJsLFxcbiAgICAgICAgICAgICAgICAgICAgdGltZW91dDogdGltZW91dFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBpZDogXFxcInRhc2tcXFwiK2lkZXhcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgICAgIHNob3dMb2FkaW5nKFxcXCLprZTmlq3lubblj5Hop6PmnpDkuK3vvIzliankvZnlvoXmtYs6XFxcIitjb3VudCk7XFxuICAgICAgICBiZSh0YXNrcyx7XFxuICAgICAgICAgICAgZnVuYzogZnVuY3Rpb24ob2JqLCBpZCwgZXJyb3IscmV0KSB7XFxuICAgICAgICAgICAgICAgIGxvZyhcXFwi55uR5ZCs5Yiw5Lu75YqhXFxcIiArIGlkKyflt7Lnu5PmnZ8sZXJyb3I6JytlcnJvcisnLHJldDonK3JldCk7XFxuICAgICAgICAgICAgICAgIHJldCA9IHJldHx8Jyc7XFxuICAgICAgICAgICAgICAgIGVycm9yPWVycm9yfHwnJztcXG4gICAgICAgICAgICAgICAgcGFyc2VSZXQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0YXNrOmlkLFxcbiAgICAgICAgICAgICAgICAgICAgcmV0OnJldCxcXG4gICAgICAgICAgICAgICAgICAgIGVycm9yOmVycm9yLFxcbiAgICAgICAgICAgICAgICAgICAgbmFtZTp0YXNrcy5maWx0ZXIoaXQ9Pml0LmlkPT09aWQpWzBdLnBhcmFtLnR5cGVcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGNvdW50IC09IDE7IC8v5a6M5oiQ5LqG5Lu75Yqh77yM5Lu75Yqh5pWw6YePLTFcXG4gICAgICAgICAgICAgICAgLy9sb2cob2JqKTtcXG4gICAgICAgICAgICAgICAgaWYgKGNvdW50ID4gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgc2hvd0xvYWRpbmcoXFxcIumtlOaWreW5tuWPkeino+aekOS4re+8jOWJqeS9meW+hea1izpcXFwiICsgY291bnQpXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBoaWRlTG9hZGluZygpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBwYXJhbTogey8v5Lyg5Yiw55uR5ZCs5Ye95pWw55qEb2Jq5Y+C5pWw6YeMXFxuICAgICAgICAgICAgICAgIGhpOiBcXFwiY2NjXFxcIixcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTsvL+aJp+ihjOWkmuS7u+WKoVxcbiAgICAgICAgLy9sb2coXFxcIuWkmuS7u+WKoeaJp+ihjOe7k+aenOaVsDpcXFwiK3BhcnNlUmV0Lmxlbmd0aCk7XFxuICAgICAgICBwYXJzZVJldD1zb3J0QnlLZXkocGFyc2VSZXQsJ3Rhc2snLHRydWUpOy8v5Y2H5bqP5o6S5YiXXFxuICAgICAgICAvLyBsb2cocGFyc2VSZXQubWFwKGl0PT5pdC50YXNrKSk7XFxuICAgICAgICByZXR1cm4gJCgnaGlrZXI6Ly9lbXB0eSNub1JlY29yZEhpc3RvcnkjI25vSGlzdG9yeSMnKS5ydWxlKChwYXJzZVJldCk9PntcXG4gICAgICAgICAgICBzZXRQYWdlVGl0bGUoZ2V0SXRlbSgnUGFyc2UnKSsn6Kej5p6Q5oql5ZGKJyk7XFxuICAgICAgICAgICAgY29uc3Qge2lzVmlkZW99ID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvZ2xvYmFsUGFyc2U/cnVsZT3pgZPplb/ku5PlupNQcm8nKTtcXG4gICAgICAgICAgICBjb25zdCB7Y29sb3IsIHNtYWxsfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3V0aWxpeT9ydWxlPemBk+mVv+S7k+W6k1Byb1xcXCIpO1xcbiAgICAgICAgICAgIGxldCBkPVtdO1xcbiAgICAgICAgICAgIGxldCBzaG93X21vZGUgPSBnZXRJdGVtKCdzaG93X21vZGUnLCfor6bnu4YnKTtcXG4gICAgICAgICAgICBsZXQgY29sX3R5cGUgPSBzaG93X21vZGU9PT0n6K+m57uGJz8ndGV4dF8xJzondGV4dF8zJztcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTon5pi+56S65qih5byPOicrY29sb3Ioc2hvd19tb2RlLCcjZmE4YzM1JyksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGNvbG9yLGNudCk9PntcXG4gICAgICAgICAgICAgICAgICAgIGxldCBzaG93X21vZGUgPSBnZXRJdGVtKCdzaG93X21vZGUnLCfor6bnu4YnKTtcXG4gICAgICAgICAgICAgICAgICAgIHNob3dfbW9kZSA9IHNob3dfbW9kZT09PSfor6bnu4YnPyfnsr7nroAnOifor6bnu4YnO1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgnc2hvd19tb2RlJyxzaG93X21vZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSgnc2hvd19tb2RlJyx7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6J+aYvuekuuaooeW8jzonK2NvbG9yKHNob3dfbW9kZSwnI2ZhOGMzNScpXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb2xfdHlwZSA9IHNob3dfbW9kZT09PSfor6bnu4YnPyd0ZXh0XzEnOid0ZXh0XzMnO1xcbiAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBpPTA7aTxjbnQ7aSsrKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKCdzaG93X3JldF8nK2kse1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTpjb2xfdHlwZVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LGNvbG9yLHBhcnNlUmV0Lmxlbmd0aCksXFxuICAgICAgICAgICAgICAgIGV4dHJhOntcXG4gICAgICAgICAgICAgICAgICAgIGlkOidzaG93X21vZGUnXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBwYXJzZVJldC5mb3JFYWNoKChpdCxpZHgpPT57XFxuICAgICAgICAgICAgICAgIGxldCB0aXRsZT1pdC5uYW1lO1xcbiAgICAgICAgICAgICAgICBpZihpdC5yZXQmJiFpdC5yZXQuaW5jbHVkZXMoJ3VuZGVmaW5lZCcpJiYoLyNpc1ZpZGVvPXRydWUjLy50ZXN0KGl0LnJldCl8fGlzVmlkZW8oaXQucmV0KSkpe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU9Y29sb3IodGl0bGUsJyMxMmI2NjgnKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGxldCBkZXNjPShpdC5yZXR8fGl0LmVycm9yKS5zdWJzdHIoMCw2MCk7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTp0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6c21hbGwoZGVzYyksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTpjb2xfdHlwZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDppdC5yZXQsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYTp7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0Oml0LnJldHx8aXQuZXJyb3IsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6J3Nob3dfcmV0XycraWR4XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgICAgIH0scGFyc2VSZXQpXFxuICAgIH0sanNvbixub3dQYXJzZSx0aW1lb3V0LHNvcnRCeUtleSksXFxuICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxuICAgIGV4dHJhOntcXG4gICAgICAgIGxpbmVWaXNpYmxlOmZhbHNlXFxuICAgIH1cXG59KTtcXG4vKlxcbnZhciBwYXJzZVJvdXRlID0gJ2hpa2VyOi8vZmlsZXMvcnVsZXMvRHVhbk5pYW4vTXlQYXJzZS5qc29uJztcXG52YXIgTXlQYXJzZVMgPSB7fTtcXG5ldmFsKCd2YXIgcGFyc2VGaWxlID0nICsgZmV0Y2gocGFyc2VSb3V0ZSkpO1xcbk15UGFyc2VTID0gT2JqZWN0LmtleXMocGFyc2VGaWxlLmNvZGVzKTtcXG5NeVBhcnNlUy5yZXZlcnNlKCk7XFxuKi9cXG52YXIgZD1bXTtcXG4kLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9qeEl0ZW0/cnVsZT1NeUZpZWxk4bSw4oG/XFxcIikuanhMaXN0KCk7XFxuZD1kLmZpbHRlcihpdD0+aXQuY29sX3R5cGU9PT0ndGV4dF8yJykubWFwKGl0PT5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cmwsbm93UGFyc2UsdGltZW91dCx2aXBPYmopID0+IHtcXG4gICAgICAgICAgICBpZihnZXRNeVZhcignemR5JykhPT16dXJsKXtcXG4gICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3pkeScsIHp1cmwpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHZhciBkeF9tb2RlID0gZ2V0SXRlbSgn54K56YCJJywn5Y2V5rWLJyk7Ly/ngrnpgInmqKHlvI9cXG4gICAgICAgICAgICBpZihkeF9tb2RlPT09J+WNlea1iycpe1xcbiAgICAgICAgICAgICAgICBzaG93TG9hZGluZygn6a2U5pat5Yqo5oCB6Kej5p6Q5LitLOivt+eojeetiS4uLicpO1xcbiAgICAgICAgICAgICAgICBldmFsKCd2YXIgY29uZmlnX2RwID0nICsgZmV0Y2goZ2V0VmFyKCdvbGRDb25maWcnKSkpO1xcbiAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZ19kcC5jaikpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHp1cmwsbm93UGFyc2UsdGltZW91dCk7XFxuICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgIGxldCBkYXRhID0gc3RvcmFnZTAuZ2V0TXlWYXIoJ2p4X3NlbGVjdGVkJyl8fFtdO1xcbiAgICAgICAgICAgICAgICBpZihkYXRhLmxlbmd0aD4zMil7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgn5L2g5omA6YCJ5oup5b6F5rWL6K+V55qE6Kej5p6Q5pWw5YWx6K6hOicrZGF0YS5sZW5ndGgrJ+S4qu+8jOi2heWHuuS6huaOqOiNkOacgOWkp+aVsDMyLOaAp+iDveWPr+iDveaegeW3rizmmK/lkKbnu6fnu60/JykuY29uZmlybSgoZGF0YSx2aXBPYmosdGltZW91dCk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zd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B7XFxuICAgICAgICAgICAgcmV0dXJuICgoeCA8IHkpID8gKCh4ID4geSkgPyAxIDogMCkgOiAtMSlcXG4gICAgICAgIH1cXG4gICAgfSlcXG59XFxuZnVuY3Rpb24gdGVzdF9yZXBvcnQoanhzLHZpcE9iaix0aW1lb3V0KXsvL+WNleato+eJiOWkmuino+aekOa1i+ivleaKpeWRilxcbiAgICBqeHMgPSBqeHN8fFtdOy8v6Kej5p6Q5qCH6aKY5YiX6KGoXFxuICAgIGxldCB2aXBVcmwgPSB2aXBPYmoudXJsO1xcbiAgICBsZXQgdmlwTmFtZSA9IHZpcE9iai50aXRsZTtcXG4gICAgaWYoanhzLmxlbmd0aDwxKXtcXG4gICAgcmV0dXJuICd0b2FzdDovL+ino+aekOWIl+ihqOmHjOaXoOino+aekO+8jOa1i+S4qum4oeavmydcXG4gICAgfVxcbiAgICB2YXIgY291bnQgPSBqeHMubGVuZ3RoOyAvL+iuvue9ruS7u+WKoeaVsOmHj1xcbiAgICBsb2coJ+mtlOaWreW8gOWQr+WkmuS7u+WKoeino+aekCzku7vliqHmlbDph486Jytjb3VudCk7XFxuICAgIHZhciB0YXNrID0gZnVuY3Rpb24ob2JqKSB7XFxuICAgICAgICBldmFsKCd2YXIgY29uZmlnX2RwID0nICsgZmV0Y2goZ2V0VmFyKCdvbGRDb25maWcnKSkpO1xcbiAgICAgICAgZXZhbChmZXRjaChjb25maWdfZHAuY2opKTtcXG4gICAgICAgIHJldHVybiBheXRtUGFyc2UodmlwVXJsLG9iai5uYW1lLHRpbWVvdXQpO1xcbiAgICB9O1xcbiAgICB2YXIgcGFyc2VSZXQgPSBbXTsgLy/op6PmnpDnu5PmnpzliJfooahcXG4gICAgbGV0IHRhc2tzID0ganhzLm1hcCgoaXQsaWRleCk9PntcXG4gICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgZnVuYzogdGFzayxcXG4gICAgICAgICAgICBwYXJhbToge1xcbiAgICAgICAgICAgICAgICBuYW1lOml0LFxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgaWQ6IFxcXCJ0YXNrXFxcIitpZGV4XFxuICAgICAgICB9XFxuICAgIH0pO1xcbiAgICBzaG93TG9hZGluZyhcXFwi6a2U5pat5bm25Y+R6Kej5p6Q5Lit77yM5Ymp5L2Z5b6F5rWLOlxcXCIrY291bnQpO1xcbiAgICBiZSh0YXNrcyx7XFxuICAgICAgICBmdW5jOiBmdW5jdGlvbihvYmosIGlkLCBlcnJvcixyZXQpIHtcXG4gICAgICAgICAgICBsb2coXFxcIuebkeWQrOWIsOS7u+WKoVxcXCIgKyBpZCsn5bey57uT5p2fLGVycm9yOicrZXJyb3IrJyxyZXQ6JytyZXQpO1xcbiAgICAgICAgICAgIHJldCA9IHJldHx8Jyc7XFxuICAgICAgICAgICAgZXJyb3I9ZXJyb3J8fCcnO1xcbiAgICAgICAgICAgIHBhcnNlUmV0LnB1c2goe1xcbiAgICAgICAgICAgICAgICB0YXNrOmlkLFxcbiAgICAgICAgICAgICAgICByZXQ6cmV0LFxcbiAgICAgICAgICAgICAgICBlcnJvcjplcnJvcixcXG4gICAgICAgICAgICAgICAgbmFtZTp0YXNrcy5maWx0ZXIoaXQ9Pml0LmlkPT09aWQpWzBdLnBhcmFtLm5hbWVcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBjb3VudCAtPSAxOyAvL+WujOaIkOS6huS7u+WKoe+8jOS7u+WKoeaVsOmHjy0xXFxuICAgICAgICAgICAgLy9sb2cob2JqKTtcXG4gICAgICAgICAgICBpZiAoY291bnQgPiAwKSB7XFxuICAgICAgICAgICAgICAgIHNob3dMb2FkaW5nKFxcXCLprZTmlq3lubblj5Hop6PmnpDkuK3vvIzliankvZnlvoXmtYs6XFxcIiArIGNvdW50KVxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSxcXG4gICAgICAgIHBhcmFtO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zUnKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoY29sb3IsIGNudCkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgc2hvd19tb2RlID0gZ2V0SXRlbSgnc2hvd19tb2RlJywgJ+ivpue7hicpO1xcbiAgICAgICAgICAgICAgICBzaG93X21vZGUgPSBzaG93X21vZGUgPT09ICfor6bnu4YnID8gJ+eyvueugCcgOiAn6K+m57uGJztcXG4gICAgICAgICAgICAgICAgc2V0SXRlbSgnc2hvd19tb2RlJywgc2hvd19tb2RlKTtcXG4gICAgICAgICAgICAgICAgdXBkYXRlSXRlbSgnc2hvd19tb2RlJywge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfmmL7npLrmqKHlvI86JyArIGNvbG9yKHNob3dfbW9kZSwgJyNmYThjMzUnKVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgbGV0IGNvbF90eXBlID0gc2hvd19tb2RlID09PSAn6K+m57uGJyA/ICd0ZXh0XzEnIDogJ3RleHRfMyc7XFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgY250OyBpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oJ3Nob3dfcmV0XycgKyBpLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IGNvbF90eXBlXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgY29sb3IsIHBhcnNlUmV0Lmxlbmd0aCksXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6ICdzaG93X21vZGUnXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICBwYXJzZVJldC5mb3JFYWNoKChpdCwgaWR4KSA9PiB7XFxuICAgICAgICAgICAgbGV0IHRpdGxlID0gaXQubmFtZTtcXG4gICAgICAgICAgICBpZiAoaXQucmV0ICYmICFpdC5yZXQuaW5jbHVkZXMoJ3VuZGVmaW5lZCcpICYmICgvI2lzVmlkZW89dHJ1ZSMvLnRlc3QoaXQucmV0KSB8fCBpc1ZpZGVvKGl0LnJldCkpKSB7XFxuICAgICAgICAgICAgICAgIHRpdGxlID0gY29sb3IodGl0bGUsICcjMTJiNjY4JylcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbGV0IGRlc2MgPSAoaXQucmV0IHx8IGl0LmVycm9yKS5zdWJzdHIoMCwgNjApO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgZGVzYzogc21hbGwoZGVzYyksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBjb2xfdHlwZSxcXG4gICAgICAgICAgICAgICAgdXJsOiBpdC5yZXQsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICByZXQ6IGl0LnJldCB8fCBpdC5lcnJvcixcXG4gICAgICAgICAgICAgICAgICAgIGlkOiAnc2hvd19yZXRfJyArIGlkeFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9KTtcXG4gICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgfSx2aXBOYW1lLHBhcnNlUmV0KVxcbn1cXG5cXG4kLmV4cG9ydHMuc29ydEJ5S2V5PXNvcnRCeUtleTtcXG4kLmV4cG9ydHMudGVzdF9yZXBvcnQ9dGVzdF9yZXBvcnQ7XCJ9XSIsImljb24iOiJodHRwczovL2xhbm1laWd1b2ppYW5nLmNvbS90dWJpYW8vbW92aWUvNC5zdmciLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment