xiaomianao666

小程序:MyFieldᴰⁿ

Mar 23rd, 2022
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@MyFieldᴰⁿ@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiTXlGaWVsZOG0sOKBvyIsImF1dGhvciI6IuaWreW/tSbpgZPplb/prZTmlLkiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IiwidmVyc2lvbiI6MzgzLCJjb2xfdHlwZSI6InRleHRfY2VudGVyXzEiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InRvb2wiLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoi5bel5YW3IiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbi8vbG9nKE1PQklMRV9VQSk7XG5jb25zdCB7ZGVtb0RhdGEsZGVmYXVsdFNldHMsZmxvb3JzfSA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9kZW1vRGF0YT9ydWxlPU15RmllbGThtLDigb9cIik7XG5jb25zdCB7Z2V0T25lLHVuaXF1ZTIsZHVwbGljYXRlc30gPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvdXRpbHM/cnVsZT1NeUZpZWxk4bSw4oG/XCIpO1xubGV0IHNqVGVzdCA9W107Zm9yKGxldCBpIGluIGRlbW9EYXRhKXtzalRlc3Q9c2pUZXN0LmNvbmNhdChkZW1vRGF0YVtpXSl9XG50aGlzLmQgPSBbXTtcbmNvbnN0IGp4SXRlbSA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9qeEl0ZW0/cnVsZT1NeUZpZWxk4bSw4oG/XCIpO1xudmFyIFJvdXRlID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL1JvdXRlP3J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WVvdXQnLCc1MDAwJykpKTtcbiAgICAgICAgICAgIH1lbHNlIGlmKGdldEl0ZW0oJ2RuLnRlc3RfbW9kZScpPT09J+aWreaPkicmJi9e6a2U5patJC8udGVzdCh0aXRsZSkpe1xuICAgICAgICAgICAgICAgIGV2YWwoXCJ2YXIgY29uZmlnID1cIiArIGZldGNoKFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeVBhcnNlU2V0Lmpzb25cIikpO1xuICAgICAgICAgICAgICAgIGV2YWwoZmV0Y2goY29uZmlnLmNqKSk7XG4gICAgICAgICAgICAgICAgbG9nKCflvIDlp4vosIPnlKjprZTmlq3mi5/nnJ/mtYvor5UsbXlGaWxlZOi2heaXtuS4ujonK2dldEl0ZW0oJ2RuLnRpbWVvdXQnLCc1MDAwJykpO1xuICAgICAgICAgICAgICAgIHJldHVybiBheXRtUGFyc2UodXJsLCcnLHBhcnNlSW50KGdldEl0ZW0oJ2RuLnRpbWVvdXQnLCc1MDAwJykpKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2V7XG4gICAgICAgICAgICAgICAgY29uc3Qge2xhenlQYXJzZX0gPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9nbG9iYWxQYXJzZT9ydWxlPemBk+mVv+S7k+W6k1BybycpO1xuICAgICAgICAgICAgICAgIHJldHVybiBsYXp5UGFyc2UocGxheVVybCxwYXJzZUludChnZXRJdGVtKCdkbi50aW1lb3V0JywnNTAwMCcpKSl8fCd0b2FzdDovL+ino+aekOWksei0pSzlhbfkvZPnnIvml6Xlv5cnXG4gICAgICAgICAgICB9XG4gICAgICAgIH0scGxheVVybCx1cmwpXG4gICAgfSksXG4gICAgZXh0cmE6IHtcbiAgICAgICAgYmxvY2tSdWxlczogWydiYWlkdS4qLnBuZycsICcuanBnJywnLm1wMycsJy5tcDQnLCcubTN1OCcsJy5mbHYnLCcuYXZpJywnLjNncCcsJy5tcGVnJywnLndtdicsJy5tb3YnLCcucm12YicsJy5na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SXRlbShcInNlbGVjdGVkXCIsICcnKTtcbiAgICAgICAgICAgIHNldEl0ZW0oXCJzZWxlY3RlZDBcIiwgaW5wdXQgKyBcIiYmXCIgKyAnJyk7XG4gICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XG4gICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+W3suWPlua2iOino+aekOWPoyznm7TmjqXov5vooYznm7Tpk77op6PmnpBcIjtcbiAgICAgICAgfWVsc2UgaWYoaW5wdXQ9PT0n6a2U5patJyl7XG4gICAgICAgICAgICBzZXRJdGVtKFwic2VsZWN0ZWRcIiwgJycpO1xuICAgICAgICAgICAgc2V0SXRlbShcInNlbGVjdGVkMFwiLCBpbnB1dCArIFwiJiZcIiArICcnKTtcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcbiAgICAgICAgICAgIHJldHVybiBcInRvYXN0Oi8v5bey6K6+572u5Li66a2U5pat6Kej5p6Q77yM5Y+v55u05o6l6Kem5Y+R5aSH6IOO5qih5byPXCI7XG4gICAgICAgIH1cbiAgICAgICAgbGV0IGkgPSByZWFsVGl0bGVzLmluZGV4T2YoaW5wdXQpO1xuICAgICAgICBsZXQgdXJsID0gdXJsQXJyW2ldO1xuICAgICAgICBsb2coXCJcXG7mm7TmlLnmjqXlj6M+IFwiICsgdXJsKTtcbiAgICAgICAgaWYodHlwZW9mKHVybCkhPT0nc3RyaW5nJyl7XG4gICAgICAgICAgICBsb2coJC50b1N0cmluZyh1cmwpKTtcbiAgICAgICAgICAgIHNldEl0ZW0oXCJzZWxlY3RlZFwiLCAkLnRvU3RyaW5nKHVybCkpO1xuICAgICAgICAgICAgLy8gcmV0dXJuICd0b2FzdDovL+aaguS4jeaUr+aMgeaWreaPkmZ1bmN0aW9u57O75YiX55qE6auY57qn6Kej5p6Q5rWL6K+VJ1xuICAgICAgICB9ZWxzZXtcbiAgICAgICAgICAgIHNldEl0ZW0oXCJzZWxlY3RlZFwiLCB1cmwpO1xu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YXNlNjRFbmNvZGUoY29kZS50b1N0cmluZygpLnRyaW0oKSk7XG4gICAgICAgICAgICAgICAgbGV0IG91dFRpdGxlID0gaXQucmVwbGFjZSgv8J+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+S7tuWvvOWFpScpLmNvbmZpcm0oKCk9PntcbiAgICAgICAgICAgICAgICBjb25zdCB7ZGVmYXVsdFNldHN9ID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL2RlbW9EYXRhP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VSb3V0ZSA9ICdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbic7XG4gICAgICAgICAgICAgICAgbGV0IGpzQ29kZSA9IGZldGNoKHBhcnNlUm91dGUpfHxKU09OLnN0cmluZ2lmeSh7dGl0bGU6W10sY29kZXM6e30sc2V0dGluZ3M6ZGVmYXVsdFNldHN9KTtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGpzQ29kZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lj5HnlJ/plJnor686XFxuJytlLm1lc3NhZ2VcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGV0IHRvSW1wb3J0ID0gZ2V0VmFyKFwiZG4uaW1wb3J0X3RleHRcIik7XG4gICAgICAgICAgICAgICAgaWYoL+mtlOaWreino+aekOWvvOWFpeWPo+S7pMKlwqUvLnRlc3QodG9JbXBvcnQpJiZ0b0ltcG9ydC5zcGxpdCgnwqXCpScpLmxlbmd0aD4xKXtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHRvSW1wb3J0LnNwbGl0KCfCpcKlJylbMV07XG4gICAgICAgICAgICAgICAgICAgIGlmKCEvXmh0dHAvLnRlc3QodXJsKSl7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5Ymq5YiH5p2/5Zyw5Z2A5pyJ6K+vLOWvvOWFpeWksei0pSdcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0b0ltcG9ydCA9IHBhcnNlUGFzdGUodXJsKTtcbiAgICAgICAgICAgICAgICAgICAgdG9JbXBvcnQgPSBiYXNlNjREZWNvZGUodG9JbXBvcnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQgamlleGkgPSB0b0ltcG9ydC5zcGxpdCgnXFxuJykuZmlsdGVyKGl0PT5pdC50cmltKCkpO1xuICAgICAgICAgICAgICAgIGxldCBwYXJzZVRpdGxlID0gW107XG4gICAgICAgICAgICAgICAgbGV0IHBhcnNlQ29kZSA9IHt9O1xuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgaW4gamlleGkpIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlPWppZXhpW2ldLnNwbGl0KCcsJylbMF07XG4gICAgICAgICAgICAgICAgICAgIGxldCBjb2RlPWppZXhpW2ldLnNwbGl0KCcsJylbMV07XG4gICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUucHVzaCh0aXRsZSk7XG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKHRpdGxlKTtcbiAgICAgICAgICAgICAgICAgICAgaWYoIShjb2RlLnJlcGxhY2UoL1tcXHNdL2csJycpLnN0YXJ0c1dpdGgoJ2h0dHAnKSkpe1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKHRpdGxlKyfkuLrlh73mlbDop6PmnpAnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNvZGUucmVwbGFjZSgvW1xcc10vZywnJykubGVuZ3RoPjIwKXsvL+inhuS4umZ1bmN0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29kZSA9IGV2YWwoYmFzZTY0RGVjb2RlKGNvZGUpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKGNvZGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1jYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlID0gZS5tZXNzYWdlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGVbdGl0bGVdPWNvZGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxldCBzY09iamVjdCA9IFtcIkNpdHlJUFwiLCBcInBjVUFcIiwgXCJjYWNoZU0zdThcIiwgXCJkZWZhdWx0UGFyc2VXZWJcIixcIm1hb3NzXCIsIFwiTExRXCJdO1xuICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUgPSBwYXJzZVRpdGxlP3BhcnNlVGl0bGUuZmlsdGVyKGl0PT4hc2NPYmplY3QuaW5jbHVkZXMoaXQpKTpbXTtcbiAgICAgICAgICAgICAgICB2YXIgbmV3UGFyc2VUaXRsZSA9IGpzb24udGl0bGUuY29uY2F0KHBhcnNlVGl0bGUpO1xuICAgICAgICAgICAgICAgIGpzb24udGl0bGUgPSBBcnJheS5mcm9tKG5ldyBTZXQobmV3UGFyc2VUaXRsZSkpO1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iZ2YWx1ZXNfcmUuaW5jbHVkZXMob25lKSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIChmbGFnc1tvbmVdKSA9PT0gJ3VuZGVmaW5lZCcgfHwgIWZsYWdzW29uZV0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8v5Y+W5Ye656ys5LiA5Liq5qCH5b+XXG4gICAgICAgICAgICAgICAgICAgICAgICBmbGFnc1tvbmVdID0gbXlGbG9vcnNbMF07XG4gICAgICAgICAgICAgICAgICAgICAgICBteUZsb29ycy5zcGxpY2UoMCwgMSk7Ly/liKDpmaTmoIflv5fliJfooajph4znmoTnrKzkuIDkuKrlhYPntKBcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBmdGxpc3QucHVzaCh7a2V5OiBmbGFnc1tvbmVdICsgaiwgdmFsdWU6IG9uZX0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGZ0bGlzdC5wdXNoKHtrZXk6IGosIHZhbHVlOiBvbmV9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9Y2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICBsb2coZS5tZXNzYWdlKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8vIGxvZyhKU09OLnN0cmluZ2lmeShmbGFncykpO1xuICAgICAgICBsZXQgbmV3Q29kZXMgPSB7fTtcbiAgICAgICAgZm9yKGxldCBrIGluIGZ0bGlzdCl7XG4gICAgICAgICAgICBuZXdDb2Rlc1tmdGxpc3Rba10ua2V5XSA9IGZ0bGlzdFtrXS52YWx1ZTtcbiAgICAgICAgfVxuICAgICAgICBsZXQgdGlwcyA9ICfmo4DmtYvliLDlkI3np7DlpI3nlKjpobnnm67mlbA6JytrZXlzX3JlX2N0Kycs5Luj56CB6YeN5aSN6aG555uu5pWw6YePOicrdmFsdWVfcmVfY3QrJ1xcbumcgOimgeS4gOmUruaJk+S4quagh+ivhuWQlz/kuI3mlK/mjIHoh6rliqjliKDpmaQs5omT5qCH5b+X6Ieq6KGM6Kej5YazJztcbiAgICAgICAgcmV0dXJuICQodGlwcykuY29uZmlybSgodmFsdWVfcmVfY3QsanNvbixuZXdDb2RlcyxwYXJzZVJvdXRlKT0+e1xuICAgICAgICAgICAgaWYodmFsdWVfcmVfY3Q8MSl7XG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aXoueEtumDveaYrzDkuKrph43lpI3pobnnm67kuobvvIzlsLHkuI3pnIDopoHmiJHlgZrku4DkuYjkuoYhJ1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY29tcGFyZSgpe1xuICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoYSwgYil7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHtmbG9vcnN9ID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL2RlbW9EYXRhP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHggPSBhLnN1YnN0cmluZygwLDEpO1xuICAgICAgICAgICAgICAgICAgICBsZXQgeSA9IGIuc3Vic3RyaW5nKDAsMSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmbG9vcnMuaW5kZXhPZih5KS1mbG9vcnMuaW5kZXhPZih4KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBqc29uLmNvZGVzID0gbmV3Q29kZXM7XG4gICAgICAgICAgICBsZXQgdGl0bGVzID0gT2JqZWN0LmtleXMobmV3Q29kZXMpO1xuICAgICAgICAgICAgdGl0bGVzID0gdGl0bGVzLnNvcnQoY29tcGFyZSgpKTtcbiAgICAgICAgICAgIGpzb24udGl0bGUgPSB0aXRsZXM7XG4gICAgICAgICAgICB2YXIgbmV3RmlsZSA9ICQuc3RyaW5naWZ5KGpzb24pOyAvL0pTT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gICAgICAgIC8qICAgICAgICAgICAgYmFja2dyb3VuZDogI0Y5RjBEQTsqL1xcbiAgICAgICAgICAgIGZvbnQtd2VpZ2h0OiAwO1xcbiAgICAgICAgICAgIGZvbnQtZmFtaWx5OiBcXFwiTWljcm9zb2Z0IFlhSGVpXFxcIixcXFwi5a6L5L2TXFxcIixcXFwiU2Vnb2UgVUlcXFwiLCBcXFwiTHVjaWRhIEdyYW5kZVxcXCIsIEhlbHZldGljYSwgQXJpYWwsc2Fucy1zZXJpZiwgRnJlZVNhbnMsIEFyaW1vO1xcbiAgICAgICAgfVxcbiAgICAgICAgI2FwcHtcXG4gICAgICAgICAgICBtYXJnaW4tdG9wOi0xMHB4O1xcbiAgICAgICAgfVxcbiAgICAgICAgI3RpcHN7XFxuICAgICAgICAgICAgbWFyZ2luLXRvcDotMTBweDtcXG4gICAgICAgICAgICBtYXJnaW4tYm90dG9tOjVweDtcXG4gICAgICAgIH1cXG4gICAgICAgIC5mdW5ne1xcbiAgICAgICAgICAgIHRleHQtYWxpZ246Y2VudGVyXFxuICAgICAgICB9XFxuICAgICAgICBkaXYuYm94IHtcXG4gICAgICAgICAgICBtYXJnaW4tdG9wOi0xcHg7XFxuICAgICAgICAgICAgaGVpZ2h0OiA0M3B4O1xcbiAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiAyMHB4O1xcbiAgICAgICAgfVxcbiAgICAgICAgLyrovpPlhaXmoYblsLrlr7gqL1xcbiAgICAgICAgZm9ybSB7XFxuICAgICAgICAgICAgYmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XFxuICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlO1xcbiAgICAgICAgICAgIHdpZHRoOiAxMDAlO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgaW5wdXQsIGxhYmVsLCBzZWxlY3Qge1xcbiAgICAgICAgICAgIGJvcmRlcjogbm9uZTtcXG4gICAgICAgICAgICBvdXRsaW5lOiBub25lO1xcbiAgICAgICAgfVxcbiAgICAgICAgLyrlrZfkvZPkvY3nva4qL1xcbiAgICAgICAgaW5wdXQge1xcbiAgICAgICAgICAgIHdpZHRoOiA3NyU7XFxuICAgICAgICAgICAgaGVpZ2h0OiAzMnB4O1xcbiAgICAgICAgICAgIHBhZGRpbmctbGVmdDogNjZweDtcXG4gICAgICAgICAgICBwYWRkaW5nLXJpZ2h0OiAwcHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBsYWJlbCB7XFxuICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXI7XFxuICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDQzcHg7XFxuICAgICAgICAgICAgaGVpZ2h0OiA0MHB4O1xcbiAgICAgICAgICAgIHdpZHRoOiA2MHB4O1xcbiAgICAgICAgICAgIGN1cnNvcjogcG9pbnRlcjtcXG4gICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICAvKuWwj+ahhiovXFxuICAgICAgICAuYmFyIGxhYmVsIHtcXG4gICAgICAgICAgICAvKmJhY2tncm91bmQ6ICNEMDZCNkM7Ki9cXG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA1cHggNTU1cHggNTU1cHggNXB4O1xcbiAgICAgICAgICAgIHdpZHRoOiA2MHB4O1xcbiAgICAgICAgICAgIGZvbnQtc2l6ZTogMTNweDtcXG4gICAgICAgICAgICB0b3A6IDA7XFxuICAgICAgICAgICAgbGVmdDogM3B4O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgLyrovpPlhaXmoYbmoLflvI8qL1xcbiAgICAgICAgLmJhciBpbnB1dCB7XFxuICAgICAgICAgICAgLypib3JkZXItcmFkaXVzOiA1cHggNTU1cHggNTU1cHggNXB4O1xcbiAgICAgICAgICAgICAqL1xcbiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDRweDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIC8q5YiX6KGoKi9cXG4gICAgICAgIHNlbGVjdCB7XFxuICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXI7XFxuICAgICAgICAgICAgbGluZS1oZWlnaHQ6NDBweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQwcHg7XFxuICAgICAgICAgICAgd2lkdGg6IDIwcHg7XFxuICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIC8q5YiX6KGoKi9cXG4gICAgICAgIC5saWViIHNlbGVjdHtcXG4gICAgICAgICAgICAvKmJvcmRlci1yYWRpdXM6IDRweDsqL1xcbiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDU1NXB4IDVweCA1cHggNTU1cHg7XFxuICAgICAgICAgICAgd2lkdGg6IDgwcHg7XFxuICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXI7XFxuICAgICAgICAgICAgZm9udC1zaXplOiAxM3B4O1xcbiAgICAgICAgICAgIHRvcDogMDtcXG4gICAgICAgICAgICByaWdodDogMnB4O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgLyrlpLTlg48qL1xcbiAgICAgICAgLnJvdW5kX2ljb257XFxuICAgICAgICAgICAgd2lkdGg6IDQwcHg7XFxuICAgICAgICAgICAgaGVpZ2h0OiA0MHB4O1xcbiAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7XFxuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNTAlO1xcbiAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7XFxuICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XFxuICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjtcXG4gICAgICAgIH1cXG4gICAgPC9zdHlsZT5cXG48L2hlYWQ+XFxuPGJvZHk+XFxuPGRpdiBjbGFzcz1cXFwiZnVuZ1xcXCI+XFxuICAgIDxhIHN0eWxlPVxcXCJmb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HNldHRpbmdzID0gT2JqZWN0LmFzc2lnbihzZXR0aW5ncyxuZXdDb25maWcuc2V0dGluZ3MpO1xcbiAgICAgICAgdmFyIHljVGl0bGUgPSBbJ2RlZmF1bHRQYXJzZScsICdkZWZhdWx0UGFyc2VXZWInLCdtYW9zcycsICdDaXR5SVAnLCAnY2FjaGVNM3U4JywgJ3BjVUEnLCAncGFyc2VMYycsICdncGFyc2UnLCAnbnBhcnNlJ107XFxuICAgICAgICBteVNlbGVjdCA9IG5ld0NvbmZpZy50aXRsZS5maWx0ZXIoY29tcGFyZSh5Y1RpdGxlKSk7XFxuICAgICAgICAvLyBteVNlbGVjdCA9IG15U2VsZWN0Lm1hcCgoaXQpPT57XFxuICAgICAgICAvLyAgICAgbGV0IGZsYWcgPSAn4pOKJztcXG4gICAgICAgIC8vICAgICBpZih0eXBlb2YobmV3Q29uZmlnLmNvZGVzW2l0XSk9PT0nZnVuY3Rpb24nKXtcXG4gICAgICAgIC8vICAgICAgICAgZmxhZyA9ICfikr8nO1xcbiAgICAgICAgLy8gICAgIH1lbHNlIGlmKHR5cGVvZihuZXdDb25maWcuY29kZXNbaXRdKT09PSd1bmRlZmluZWQnKXtcXG4gICAgICAgIC8vICAgICAgICAgZmxhZyA9ICcnO1xcbiAgICAgICAgLy8gICAgIH1cXG4gICAgICAgIC8vICAgICByZXR1cm4gZmxhZytpdFxcbiAgICAgICAgLy8gfSk7XFxuICAgIH1cXG4gICAgLy9mYmEubG9nKEpTT04uc3RyaW5naWZ5KG15U2VsZWN0KSk7XFxuXFxuICAgIGxldCBvcHRpb25zID0gW1xcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+eIseWlh+iJuicsXFxuICAgICAgICAgICAgaWQ6J3F5JyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5xeSxcXG4gICAgICAgICAgICBwbGFjZWhvbGRlcjon6K6+572u54ix5aWH6Im6J1xcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifkvJjphbcnLFxcbiAgICAgICAgICAgIGlkOid5aycsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MueWtcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon6IW+6K6vJyxcXG4gICAgICAgICAgICBpZDondHgnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnR4XFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+iKkuaenCcsXFxuICAgICAgICAgICAgaWQ6J21nJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5tZ1xcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOiflk5Tlk6nlk5Tlk6knLFxcbiAgICAgICAgICAgIGlkOidibCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MuYmxcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5pCc54uQJyxcXG4gICAgICAgICAgICBpZDonc2gnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnNoXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+ilv+eTnCcsXFxuICAgICAgICAgICAgaWQ6J3hnJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy54Z1xcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifpmL/ph4wnLFxcbiAgICAgICAgICAgIGlkOidhbCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MuYWxcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTonUFBUVicsXFxuICAgICAgICAgICAgaWQ6J3BwJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5wcFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOiflkqrlkpUnLFxcbiAgICAgICAgICAgIGlkOidtaScsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MubWlcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5LmQ6KeGJyxcXG4gICAgICAgICAgICBpZDonbGUnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLmxlXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6JzE5MDUnLFxcbiAgICAgICAgICAgIGlkOidvbmUnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLm9uZVxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifpo47ooYwnLFxcbiAgICAgICAgICAgIGlkOidmdW4nLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLmZ1blxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOiflhbbku5YnLFxcbiAgICAgICAgICAgIGlkOidvdGgnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLm90aFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOiflhajlsYAnLFxcbiAgICAgICAgICAgIGlkOidxanUnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnFqdVxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifmj5Lku7YnLFxcbiAgICAgICAgICAgIGlkOidjaicsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MuY2pcXG4gICAgICAgIH0sXFxuICAgIF07XFxuXFxuICAgIGZ1bmN0aW9uIERpZChpZCl7XFxuICAgICAgICByZXR1cm4gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoaWQpO1xcbiAgICB9XFxuICAgIGZ1bmN0aW9uIGdldE9wdGlvbih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pb24gb3BlblRoZW1lKCl7XFxuICAgICAgICBmYmEub3BlbihKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgcnVsZTogXFxcIj1eX149XFxcIixcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuS4u+mimOeuoeeQhlxcXCIsXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL1JvdXRlP3J1bGU9TXlGaWVsZOG0sOKBvyZ0eXBlPeS4u+mimCNub0hpc3RvcnkjI25vUmVjb3JkSGlzdG9yeSNcXFwiLFxcbiAgICAgICAgICAgIGdyb3VwOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgcHJlUnVsZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHt9XFxuICAgICAgICB9KSk7XFxuICAgIH1cXG4gICAgZnVuY3Rpb24gb3Blbkp4TWFuYWdlKCl7XFxuICAgICAgICBmYmEub3BlbihKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgcnVsZTogXFxcIj1eX149XFxcIixcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuino+aekOmFjee9rueuoeeQhlxcXCIsXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL1JvdXRlP3J1bGU9TXlGaWVsZOG0sOKBvyZ0eXBlPeino+aekCNub0hpc3RvcnkjI25vUmVjb3JkSGlzdG9yeSNcXFwiLFxcbiAgICAgICAgICAgIGdyb3VwOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgcHJlUnVsZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHt9XFxuICAgICAgICB9KSk7XFxuICAgIH1cXG4gICAgZnVuY3Rpb24gY2FuY2VsKCl7XFxuICAgICAgICBpZighbXlTZXQpe1xcbiAgICAgICAgICAgIGZiYS53cml0ZUZpbGUob2xkUm91dGUsIEpTT04uc3RyaW5naWZ5KHNldHRpbmdzLCBudWxsLCA0KSk7XFxuICAgICAgICAgICAgZmJhLnJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgZmJhLmJhY2soZmFsc2UpO1xcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIGZ1bmN0aW9uIGNsaWNrbWUobXNnLGR1cmF0aW9uLHRpdGxlKXtcXG4gICAgICAgIHRyeXtcXG4gICAgICAgICAgICBmb3IobGV0IGtleSBpbiBzZXR0aW5ncyl7XFxuICAgICAgICAgICAgICAgIC8vIGZiYS5sb2coRGlkKGtleSkrJycra2V5KTtcXG4gICAgICAgICAgICAgICAgdHJ5e1xcbiAgICAgICAgICAgICAgICAgICAgLy9zZXR0aW5nc1trZXldID0gRGlkKGtleSkudmFsdWUucmVwbGFjZSgv4pOKfOKSvy9nLCcnKTtcXG4gICAgICAgICAgICAgICAgICAgIHNldHRpbmdzW2tleV0gPSBEaWQoa2V5KS52YWx1ZTtcXG4gICAgICAgICAgICAgICAgfWNhdGNoKGUpe1xcbiAgICAgICAgICAgICAgICAgICAgYWxlcnQoXFxcIuacquiOt+WPluWIsOiKgueCuTpcXFwiK2tleStcXFwiXFxcXG5cXFwiK2UubWVzc2FnZSk7XFxuICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYobXlTZWxlY3Qpe1xcbiAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKG5ld0NvbmZpZy5zZXR0aW5ncywgc2V0dGluZ3MpO1xcbiAgICAgICAgICAgICAgICBmYmEud3JpdGVGaWxlKG5ld1JvdXRlLCAkJCQuc3RyaW5naWZ5KG5ld0NvbmZpZykpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBmYmEud3JpdGVGaWxlKG9sZFJvdXRlLCAkJCQuc3RyaW5naWZ5KHNldHRpbmdzKSk7XFxuICAgICAgICAgICAgVG9hc3QobXNnLGR1cmF0aW9uKTtcXG4gICAgICAgICAgICBpZih0aXRsZT09PVxcXCLlhbNcXFwiKXtcXG4gICAgICAgICAgICAgICAgZmJhLmJhY2soKTtcXG4gICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgZmJhLnJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1jYXRjaChlKXtcXG4gICAgICAgICAgICBhbGVydChlLm1lc3NhZ2UpXFxuICAgICAgICB9XFxuICAgIH1cXG5cXG4gICAgLy9sZXQgd2lkdGg9d2luZG93LnNjcmVlbi5hdmFpbFdpZHRoO1xcbiAgICAvL2xldCB3aWR0aFB4PXdpZHRoLTM5Mys1MjtcXG4gICAgLy9hbGVydChcXFwi5b2T5YmN5YiG6L6o546HOlxcXCIrd2luZG93LnNjcmVlbi5hdmFpbFdpZHRoK1xcXCIqXFxcIit3aW5kb3cuc2NyZWVuLmhlaWdodCk7XFxuICAgIHZhciB2ZXJpbmZvID0gW3tcXG4gICAgICAgIGlkOidkbicsXFxuICAgICAgICBhdXRob3I6J+aWreW/tScsXFxuICAgICAgICBhdmF0YXI6J2h0dHBzOi8vczMuYXgxeC5jb20vMjAyMS8wMi8yMi95N3diOU8uanBnJyxcXG4gICAgICAgIG9wdGlvbjpvcGVuRG5QYWdlLFxcbiAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGlkOidkeicsXFxuICAgICAgICAgICAgYXV0aG9yOifpgZPplb8nLFxcbiAgICAgICAgICAgIGF2YXRhcjonaHR0cDovL3ExLnFsb2dvLmNuL2c/Yj1xcSZuaz00MzQ4NTcwMDUmcz02NDAnLFxcbiAgICAgICAgICAgIG9wdGlvbjpvcGVuVGhlbWVcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgaWQ6J2xtJyxcXG4gICAgICAgICAgICBhdXRob3I6ICfok53ojpMnLFxcbiAgICAgICAgICA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MCkge1xcbiAgICAgICAgICAgICAgICBkYXRlU3RyICs9IFxcXCItMFxcXCIgKyBkYXk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgZGF0ZVN0ciArPSBcXFwiLVxcXCIgKyBkYXk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIGRhdGVTdHI7XFxuICAgIH0sXFxuICAgIHRvSlNPTjogZnVuY3Rpb24oanNvbikge1xcbiAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KGpzb24sIChrZXksIHZhbHVlKSA9PiB7XFxuICAgICAgICAgICAgaWYgKHR5cGVvZiB2YWx1ZSA9PSAnZnVuY3Rpb24nKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZS50b1N0cmluZygpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCA0KTtcXG4gICAgfSxcXG4gICAgdG9WTnVtOiBmdW5jdGlvbihhKSB7XFxuICAgICAgICB2YXIgYSA9IGEudG9TdHJpbmcoKTtcXG4gICAgICAgIHZhciBjID0gYS5zcGxpdCgnLicpO1xcbiAgICAgICAgdmFyIG51bV9wbGFjZSA9IFtcXFwiXFxcIiwgXFxcIjBcXFwiLCBcXFwiMDBcXFwiLCBcXFwiMDAwXFxcIiwgXFxcIjAwMDBcXFwiXSxcXG4gICAgICAgICAgICByID0gbnVtX3BsYWNlLnJldmVyc2UoKTtcXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgYy5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgIHZhciBsZW4gPSBjW2ldLmxlbmd0aDtcXG4gICAgICAgICAgICBjW2ldID0gcltsZW5dICsgY1tpXTtcXG4gICAgICAgIH1cXG4gICAgICAgIHZhciByZXMgPSBjLmpvaW4oJycpO1xcbiAgICAgICAgc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zZTY0LmF0b2I7XFxuICAgICAgICB2YXIgYnRvYT1CYXNlNjQuYnRvYTtcXG4gICAgICAgIHZhciBjb25maWdfYSA9IHRlbSB8fCBcXFwiZmZzaXJsbHFcXFwiO1xcbiAgICAgICAgdmFyIHZpZGVvID0gJyc7XFxuICAgICAgICB2YXIgdGVtID0gW107XFxuICAgICAgICB2YXIgY29uZmlnX2FycnkgPSBbXTtcXG4gICAgICAgIHZhciBjb25maWdfYiA9IGNvbmZpZ19hLmxlbmd0aDtcXG4gICAgICAgIGlmICh0b2tlbiA9PSAweDEpIHtcXG4gICAgICAgICAgICB2YXIgY29uZmlnX3VybCA9IGF0b2IoY29uZmlnX3VybCk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHZhciBjb25maWdfdXJsID0gZW5jb2RlVVJJQ29tcG9uZW50KGNvbmZpZ191cmwpO1xcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIGNvbmZpZ19jID0gY29uZmlnX3VybC5sZW5ndGg7XFxuICAgICAgICBmb3IgKGkgPSAweDA7IGkgPCAweDEwMDsgaSsrKSB7XFxuICAgICAgICAgICAgdGVtW2ldID0gY29uZmlnX2FbaSAlIGNvbmZpZ19iXS5jaGFyQ29kZUF0KCk7XFxuICAgICAgICAgICAgY29uZmlnX2FycnlbaV0gPSBpO1xcbiAgICAgICAgfVxcbiAgICAgICAgZm9yIChqID0gaSA9IDB4MDsgaSA8IDB4MTAwOyBpKyspIHtcXG4gICAgICAgICAgICBqID0gKGogKyBjb25maWdfYXJyeVtpXSArIHRlbVtpXSkgJSAweDEwMDtcXG4gICAgICAgICAgICB0bXAgPSBjb25maWdfYXJyeVtpXTtcXG4gICAgICAgICAgICBjb25maWdfYXJyeVtpXSA9IGNvbmZpZ19hcnJ5W2pdO1xcbiAgICAgICAgICAgIGNvbmZpZ19hcnJ5W2pdID0gdG1wO1xcbiAgICAgICAgfVxcbiAgICAgICAgZm9yIChhID0gaiA9IGkgPSAweDA7IGkgPCBj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AgICAgdXJscz11cmxzLm1hcChpdD0+aXQuc3BsaXQoXFxcIuKYhVxcXCIpWzBdKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBoZWFkZXJzID0gdXJscy5tYXAoKGl0KT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCEvOy8udGVzdChpdCl8fGl0LnNwbGl0KCc7JykubGVuZ3RoPDIpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge31cXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhlYWQgPSBpdC5zcGxpdCgnOycpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighL0AvLnRlc3QoaGVhZCl8fCEve3x9Ly50ZXN0KGhlYWQpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7fVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWQ9aGVhZC5zcGxpdChcXFwie1xcXCIpWzFdLnNwbGl0KFxcXCJ9XFxcIilbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vaGVhZCA9IGhlYWQucmVwbGFjZSgve3x9L2csJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkID0gaGVhZC5zcGxpdCgnJiYnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG9iaiA9IHt9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGkgaW4gaGVhZCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQga2V5ID0gaGVhZFtpXS5zcGxpdCgnQCcpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gaGVhZFtpXS5zcGxpdCgnQCcpWzFdLnJlcGxhY2UoLzsvLCfvvJvvvJsnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9ialtrZXldID0gdmFsdWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9ialxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgdXJscyA9IHVybHMubWFwKChpdCk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdHVybD1pdC5zcGxpdCgnOycpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0LmluY2x1ZGVzKFxcXCIjaXNWaWRlbz10cnVlI1xcXCIpJiYhdHVybC5pbmNsdWRlcyhcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR1cmwrPVxcXCIjaXNWaWRlbz10cnVlI1xcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0dXJsXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7dXJsczp1cmxzLGhlYWRlcnM6aGVhZGVycyxuYW1lczpuYW1lc30pO1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXRbMF0uc3BsaXQoXFxcIuKYhVxcXCIpWzBdXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHJldFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgIGNvbnN0IHtsYXp5UGFyc2V9ID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvZ2xvY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AgICAgICAgIHJldHVybiB0aGlzLmlzVmlkZW8ocmVhbFVybCl8fFxcXCJcXFwiO1xcbiAgICAgICAgfWNhdGNoKGUpe1xcbiAgICAgICAgICAgIC8vbG9nKGUubWVzc2FnZSk7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJcXFwiXFxuICAgICAgICB9XFxuICAgIH0sXFxuICAgIFg1OmZ1bmN0aW9uKHZpcFVybCxyZWYpey8vIGh0dHBzOi8vYXBpLjUyd3liLmNvbS93ZWJjbG91ZC8/dj1odHRwOi8vdmlwLjE5MDUuY29tL3BsYXkvNjkxOTQwLnNodG1sIGh0dHA6Ly93d3cuY2RjZXIubmV0L1xcbiAgICAgICAgbGV0IF94NSA9ICQudG9TdHJpbmcoKHZpcFVybCkgPT4ge1xcbiAgICAgICAgICAgIGlmKCFsb2NhdGlvbi5ocmVmLmluY2x1ZGVzKHZpcFVybCkpe1xcbiAgICAgICAgICAgICAgICBsb2NhdGlvbi5ocmVmID0gdmlwVXJsO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZih3aW5kb3cuY291bnQgPT0gbnVsbCl7XFxuICAgICAgICAgICAgICAgIHdpbmRvdy5jb3VudD0xO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB3aW5kb3cuY291bnQrKztcXG4gICAgICAgICAgICBpZiggd2luZG93LmNvdW50ID49IDIwKXtcXG4gICAgICAgICAgICAgICAgZmJhLmxvZyhcXFwi5pyq6I635Y+W5Yiw6LWE5rqQ5Zyw5Z2A77yM6Lez5Yiw6Kej5p6Q6aG1XFxcIik7XFxuICAgICAgICAgICAgICAgIHJldHVybiB2aXBVcmxcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIHVybHMgPSBfZ2V0VXJscygpO1xcbiAgICAgICAgICAgIGZvciAodmFyIGkgaW4gdXJscykge1xcbiAgICAgICAgICAgICAgICBpZiAoIS9wbGF5bTN1OHxtM3U4XFxcXC50di8udGVzdCh1cmxzW2ldK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nkge1xcbiAgICAgICAgICAgIHZhciBhcGkgPSBqeHVybC5zcGxpdCgnP3VybD0nKVswXSArIFxcXCJhcGkucGhwXFxcIjtcXG4gICAgICAgICAgICB2YXIgYjY0aWQgPSBiYXNlNjRFbmNvZGUoanh1cmwuc3BsaXQoJ3VybD0nKVsxXSk7XFxuICAgICAgICAgICAgdmFyIHBhcnNlaWQgPSB0b29scy5jYWVzYXJDaXBoZXIoYjY0aWQsIC0xKTtcXG4gICAgICAgICAgICB2YXIganNvbiA9IEpTT04ucGFyc2UocmVxdWVzdChhcGksIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgJ1JlZmVyZXInOiBqeHVybFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJyxcXG4gICAgICAgICAgICAgICAgYm9keTogJ3VybD0nICsgcGFyc2VpZFxcbiAgICAgICAgICAgIH0pKTtcXG4gICAgICAgICAgICB1cmwgPSAoanNvbi5jb2RlID09IDIwMCA/IGJhc2U2NERlY29kZSh0b29scy5jYWVzYXJDaXBoZXIoanNvbi51cmwsIC0xKSkgOiAnJyk7XFxuICAgICAgICAgICAgcmV0dXJuIHVybDtcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICByZXR1cm4gJyc7XFxuICAgICAgICB9XFxuICAgIH0sXFxuICAgIFBhbkd1OiBmdW5jdGlvbih2aXBVcmwsIGRhdGEpIHtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgLyp2YXIgcmVmID0gJ2h0dHBzOi8vd3d3LnBhbmd1amlleGkuY29tLyc7XFxuICAgICAgICAgICAgdmFyIHBhcnNlID0gJ2h0dHBzOi8vcGFuZ3VhcGkubnRyeWpkLm5ldC9qaWV4aS8/dXJsPScgKyB2aXBVcmw7XFxuICAgICAgICAgICAgdmFyIGFwaSA9ICdodHRwczovL3Bhbmd1YXBpLm50cnlqZC5uZXQvamlleGkvYXBpLnBocCc7XFxuICAgICAgICAgICAgKi9cXG4gICAgICAgICAgICAvL3ZhciByZWYgPSAnaHR0cHM6Ly94bXlzdHYuY29tLyc7XFxuICAgICAgICAgICAgLy92YXIgcGFyc2UgPSAnaHR0cHM6Ly93d3cuOTlrcHcuY29tL3Bhbmd1L2luZGV4LnBocD91cmw9JyArIHRhaWxVcmw7XFxuICAgICAgICAgICAgLy92YXIgYXBpID0gJ2h0dHBzOi8vd3d3Ljk5a3B3LmNvbS9wYW5ndS9hcGkucGhwJztcXG4gICAgICAgICAgICB2YXIgcGFyc2UgPSAnaHR0cHM6Ly93d3cucGFuZ3VqaWV4aS5jb20vcGFuZ3UvP3VybD0nICsgdmlwVXJsO1xcbiAgICAgICAgICAgIHZhciBhcGkgPSAnaHR0cHM6Ly9wYW5ndWFwaS5udHJ5amQubmV0L3Bhbmd1MjAyMS9hcGkucGhwJztcXG4gICAgICAgICAgICBpZiAoZGF0YSkge1xcbiAgICAgICAgICAgICAgICByZWYgPSBkYXRhWzBdO1xcbiAgICAgICAgICAgICAgICBwYXJzZSA9IGRhdGFbMV07XFxuICAgICAgICAgICAgICAgIGFwaSA9IGRhdGFbMl07XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHZhciBUaW1lID0gKE1hdGguZmxvb3IobmV3IERhdGUoKS5nZXRUaW1lKCkgLyAxMDAwKSAqIDEpLnRvU3RyaW5nKCk7XFxuICAgICAgICAgICAgdmFyIHVybCA9IEpTT04ucGFyc2UocmVxdWVzdChhcGksIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgJ1JlZmVyZXInOiBwYXJzZVxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBib2R5OiAndXJsPScgKyB2aXBVcmwgKyAnJnJlZmVyZXI9JyArIGJhc2U2NEVuY29kZShwYXJzZSkgKyAnJnJlZj0xJnRpbWU9JyArIFRpbWUgKyAn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ID0gdmlwVXJsLm1hdGNoKC9cXFxcLiguKj8pXFxcXC8vKVsxXTtcXG4gICAgICAgICAgICB9Y2F0Y2goZSl7XFxuICAgICAgICAgICAgICAgIGlmKCEvXmh0dHAvLnRlc3QocGxheVVybCkpe1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCLmlq3mj5LosIPnlKjlpLHotKXvvIFcXFxcbumdnuato+W4uOeahHZpcOato+eJiOWcsOWdgOS4lOacquivhuWIq+WOn+ermeino+aekOaSreaUvuWcsOWdgFxcXCI7XFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFBhcnNlUy7pgZPplb/ku5PlupPpgJrlhY0ocGxheVVybCx0aW1lb3V0KVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIC8vaG9zdCA9IGRlY29kZVVSSUNvbXBvbmVudChob3N0KTtcXG4gICAgICAgICAgICBzd2l0Y2ggKG15U2V0LnFqdSkge1xcbiAgICAgICAgICAgICAgICBjYXNlIFxcXCLpu5jorqRcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChob3N0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicXEuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQudHg7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCd0eCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJpcWl5aS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5xeTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3F5Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInlvdWt1LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnlrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgneWsnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiYWxpenlcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5hbDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ2FsJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIm1ndHYuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQubWc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdtZycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJiaWxpYmlsaS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5ibDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ2JsJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInNvaHUuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQuc2g7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdzaCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJ0di5zb2h1LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnNoO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnc2gnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiaXhpZ3VhLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnhnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgneGcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicHB0di5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5wcDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3BwJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIm1pZ3V2aWRlby5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5taTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ21pJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcImxlLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LmxlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnbGUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiMTkwNS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5vbmU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdvbmUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiZnVuLnR2XFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQuZnVuO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnZnVuJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0Lm90aDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnFqdTtcXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfWVsc2V7XFxuICAgICAgICBsb2coJ+mtlOaWreaJp+ihjOWumuWQkeino+aekOe6v+i3r+WktDonK3N0clRpdGxlKTtcXG4gICAgICAgIHN0ciA9IHN0clRpdGxlO1xcbiAgICB9XFxuICAgIGxldCB3aXRoQmF0Y2ggPSAhIShNeUppZXhpLmlzQXV0byAmJi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Ck7XFxuICAgIH1cXG59XFxuXFxudmFyIHBsYXlQYXJzZSA9IHtcXG4gICAgcGxheWVyX3h4OiBmdW5jdGlvbihqdXJsLCBMYWJlbCkge1xcbiAgICAgICAgcmV0dXJuICQoanVybCkubGF6eVJ1bGUoKGspID0+IHtcXG4gICAgICAgICAgICB2YXIganNVcmwgPSBKU09OLnBhcnNlKGZldGNoKGdldFZhcignb2xkQ29uZmlnJykpKS5jajtcXG4gICAgICAgICAgICB2YXIgTGFiZWwgPSBrO1xcbiAgICAgICAgICAgIHZhciBmYSA9IFsnbGV0dicsICdwcHR2JywgJ3FxJywgJ3lvdWt1JywgJ3FpeWknLCAnaXFpeWknLCAnbWd0dicsICdiaWxpYmlsaScsICdzb2h1JywgJ21pZ3UnLCAnbTE5MDUnLCAndmlwJ107XFxuICAgICAgICAgICAgdmFyIGh0bWwgPSBwYXJzZURvbShyZXF1ZXN0KGlucHV0KSwgTGFiZWwpO1xcbiAgICAgICAgICAgIGV2YWwoaHRtbC5yZXBsYWNlKC9wbGF5ZXJfLio/PXsvLCAncGRhdGE9eycpKTtcXG4gICAgICAgICAgICBldmFsKGZldGNoKGpzVXJsKSk7XFxuICAgICAgICAgICAgaWYgKHBkYXRhLnVybC5zdWJzdHIoMCwgOCkubWF0Y2goL0pULi5KVC4uLykpIHtcXG4gICAgICAgICAgICAgICAgcGRhdGEudXJsID0gYmFzZTY0RGVjb2RlKHBkYXRhLnVybCk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmIChwZGF0YS51cmwuc3Vic3RyKDAsIDgpLm1hdGNoKC8lLi4lLi4vKSkge1xcbiAgICAgICAgICAgICAgICBwZGF0YS51cmwgPSB1bmVzY2FwZShwZGF0YS51cmwpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAoZmEuaW5jbHVkZXMocGRhdGEuZnJvbSkpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGF5dG1QYXJzZShwZGF0YS51cmwpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBwZGF0YS51cmwgKyAnI2lzVmlkZW89dHJ1ZSMnO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIExhYmVsKVxcbiAgICB9XFxufTtcXG5mdW5jdGlvbiBtelBvcHVwKCkge1xcbiAgICAvKlxcbiAgICBpZiAoZ2V0VmFyKFxcXCJpamstdHhcXFwiLCBcXFwiXFxcIikgPT0gXFxcIjFcXFwiKSB7XFxuICAgICAgICBzZXRJdGVtKFxcXCJ0aXhpbmdcXFwiLCBcXFwiMVxcXCIpXFxuICAgICAgICBjbGVhclZhcihcXFwiaWprLXR4XFxcIilcXG4gICAgfVxcbiAgICBpZiAoZ2V0SXRlbShcXFwidGl4aW5nXFxcIiwgXFxcIlxcXCIpID09IFxcXCJcXFwiKSB7XFxuICAgICAgICBjb25maXJtKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+WFjei0o+WjsOaYjicsXFxuICAgICAgICAgICAgY29udGVudDogJ+acrOeoi+W6j+S4jeaPkOS+m+inhumikeino+aekOacjeWKoVxcXFxu5omA5pyJ5YaF5a655Z2H5LuO55So5oi35YiG5Lqr5Lit5pS26ZuGXFxcXG7ku4XkvpvmtYvor5XlkozlrabkuaDkuqTmtYFcXFxcblxcXFxu56Gu5a6a5Y2z6K6k5Y+v77yM5LiN5YaN5o+Q6YaSJyxcXG4gICAgICAgICAgICBjb25maXJtOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgcHV0VmFyKFxcXCJpamstdHhcXFwiLCBcXFwiMVxcXCIpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/ngrnlh7vkuobnoa7orqRcXFwiXFxuXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pXFxuICAgIH1cXG4gICAgICovXFxufVxcbi8qX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uu6Z2e5Yig6ZmkXFxuICAgICAgICBvYmpDb2RlW29iaktleV0gPSBvYmpWYWx1ZTtcXG5cXG4gICAgfSBlbHNlIGlmICh0eXBlID09PSAn55u06ZO+Jykge1xcbiAgICAgICAgYXJyTGlzdCA9IGRhdGE7XFxuICAgICAgICBhcnJMaXN0LnNwbGljZSgwLCAxKTtcXG4gICAgfSBlbHNlIHtcXG4gICAgICAgIGFyckxpc3QgPSBudWxsO1xcbiAgICB9XFxuICAgIGlmIChhcnJMaXN0ICE9IG51bGwpIHtcXG4gICAgICAgIHZhciBwYXJzZVJvdXRlID0gZ2V0VmFyKCdwYXJzZVJvdXRlJyk7XFxuICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKHBhcnNlUm91dGUpKTtcXG4gICAgICAgIEFycmF5LnByb3RvdHlwZS5yZW1vdmUgPSBmdW5jdGlvbih2YWwpIHtcXG4gICAgICAgICAgICBsZXQgaW5kZXggPSB0aGlzLmluZGV4T2YodmFsKTtcXG4gICAgICAgICAgICBpZiAoaW5kZXggPiAtMSkge1xcbiAgICAgICAgICAgICAgICB0aGlzLnNwbGljZShpbmRleCwgMSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfTtcXG4gICAgICAgIGlmKG5hbWUpey8v5Yig6Zmk5ZCN56ew5YiX6KGo5ZKM5Luj56CBXFxuICAgICAgICAgICAganNvbi50aXRsZS5yZW1vdmUobmFtZSk7XFxuICAgICAgICAgICAgZGVsZXRlIGpzb24uY29kZXNbbmFtZV07XFxuICAgICAgICB9XFxuICAgICAgICBhcnJMaXN0ID0gYXJyTGlzdC5jb25jYXQoanNvbi50aXRsZSk7XFxuICAgICAgICBqc29uLnRpdGxlID0gQXJyYXkuZnJvbShuZXcgU2V0KGFyckxpc3QpKTtcXG4gICAgICAgIE9iamVjdC5hc3NpZ24oanNvbi5jb2Rlcywgb2JqQ29kZSk7XFxuICAgICAgICBpZiAodHlwZSA9PT0gJ+a1i+ivlScpIHtcXG4gICAg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U2V0LmNrTGluayArICdwbHNjUGFyc2UuaHRtbCcpKTtcXG4gICAgc2V0SXRlbSgnbXlGdW5jdGlvbicsIGZ1bmN0aW9uQ29kZSk7XFxuICAgIHNldEl0ZW0oJ3VwZGF0ZURhdGUnLCB1cGRhdGVEYXRlKTtcXG59XFxudmFyIGJqSXRlbSA9IHtcXG4gICAgaGZQbHVnaW46IGZ1bmN0aW9uKHBhcnNlUm91dGUpIHtcXG4gICAgICAgIHJldHVybiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChrKSA9PiB7XFxuICAgICAgICAgICAgaWYgKGZpbGVFeGlzdChrKSkge1xcbiAgICAgICAgICAgICAgICB2YXIgY2pjYWNoZSA9IGdldFZhcignY2pDYWNoZScpO1xcbiAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKGspKTtcXG4gICAgICAgICAgICAgICAganNvbi5zZXR0aW5ncy5jaiA9IGNqY2FjaGU7XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShrLCAkLnN0cmluZ2lmeShqc29uKSk7XFxuICAgICAgICAgICAgICAgIHZhciBvbGRSb3V0ZSA9IGdldFZhcignb2xkQ29uZmlnJyk7XFxuICAgICAgICAgICAgICAgIHZhciBvbGRDb25maWcgPSBqc29uLnNldHRpbmdzO1xcbiAgICAgICAgICAgICAgICBvbGRDb25maWcuY2ogPSBjamNhY2hlO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUob2xkUm91dGUsICQuc3RyaW5naWZ5KG9sZENvbmZpZykpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/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/LC4qP1tcXFxcc10vZyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgaW4gamlleGkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZT1qaWV4aVtpXS5zcGxpdCgnLCcpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGU9amlleGlbaV0uc3BsaXQoJywnKVsxXS5zcGxpdChcXFwiXFxcXG5cXFwiKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUucHVzaCh0aXRsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGVbdGl0bGVdPWNvZGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihyZXQub3B0PT09J2p4Jyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKC9bXFxcXFNdKj8saHR0cFtcXFxcU10vLnRlc3QocmV0LnJldCkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gcmV0LnJldC5zcGxpdCgnLCcpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSByZXQucmV0LnNwbGl0KCcsJylbMV0uc3BsaXQoJ1xcXFxuJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlLnB1c2godGl0bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VDb2RlW3RpdGxlXT1jb2RlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZigvXmh0dHAvLnRlc3QocmV0LnJldCkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gY2pMaW5rLnNwbGl0KCcjJylbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9IHJldC5yZXQuc3BsaXQoJ1xcXFxuJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlLnB1c2godGl0bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VDb2RlW3RpdGxlXT1jb2RlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mnKrnn6XnmoTnpo/liKk6XFxcXG4nK3JldC5yZXQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihyZXQub3B0PT09J3ZpcEp4Jyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGNqTGluay5zcGxpdCgnIycpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9IHJldC5yZXQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxvZyhjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZS5wdXNoKHRpdGxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VDb2RlW3RpdGxlXT0vZnVuY3Rpb24vLnRlc3QoY29kZSk/ZXZhbChjb2RlKTpjb2RlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ku5PlupPpnZ7mnIDmlrDniYjmiJbogIXnpo/liKnnpL7lip/og73lvIDlj5HkuK0nXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1lbHNlIGlmKGNqTGluaz09PSfmlq3mj5InKXtcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoZmV0Y2goXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvUGFyc2VfRG4uanNcXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlPU9iamVjdC5rZXlzKFBhcnNlUyk7XFxuICAgICAgICAgICAgICAgIH1lbHNlIGlmKC9eaGlrZXI6XFxcXC9cXFxcL3xeZmlsZTpcXFxcL1xcXFwvfF5odHRwfF5cXFxcL3N0b3JhZ2VcXFxcL3xeXFxcXC9zZGNhcmRcXFxcLy8udGVzdChjakxpbmspKXtcXG4gICAgICAgICAgICAgICAgICAgIGlmKC9eXFxcXC9zdG9yYWdlXFxcXC98XlxcXFwvc2RjYXJkXFxcXC8vLnRlc3QoY2pMaW5rKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2pMaW5rID0gJ2ZpbGU6Ly8nK2NqTGluaztcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoZmV0Y2goY2pMaW5rKSk7XFxuICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlPU9iamVjdC5rZXlzKFBhcnNlUyk7XFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aLieWPluWPo+S7pOacieivrydcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgbG9nKGUubWVzc2FnZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHZhciBqeEp1ZGdlID0gdHlwZW9mIFBhcnNlUyA9PSAnb2JqZWN0JztcXG4gICAgICAgICAgICB2YXIgbGJKdWRnZSA9IHR5cGVvZihwYXJzZVRpdGxlKSA9PSAnb2JqZWN0JztcXG4gICAgICAgICAgICBpZiAoanhKdWRnZSB8fCBsYkp1ZGdlKSB7XFxuICAgICAgICAgICAgICAgIC8vIGlmIChwdWxsTW9kZSA9PT0gJ+WIl+ihqCcpIHtcXG4gICAgICAgICAgICAgICAgLy8gICAgIGlmICghbGJKdWRnZSkge1xcbiAgICAgICAgICAgICAgICAvLyAgICAgICAgIHBhcnNlVGl0bGUgPSBPYmplY3Qua2V5cyhQYXJzZVMpO1xcbiAgICAgICAgICAgICAgICAvLyAgICAgfVxc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kZSA9PT0gJ+S7o+eggScpIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygb3JpZ2luYWxQYXJzZVMgPT0gJ29iamVjdCcpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpIGluIHNjT2JqZWN0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBvcmlnaW5hbFBhcnNlU1tzY09iamVjdFtpXV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIG9yaWdpbmFsUGFyc2VTID1vcmlnaW5hbFBhcnNlUy5maWx0ZXIoaXQ9PiFzY09iamVjdC5pbmNsdWRlcyhPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcyhpdClbMF0pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKGpzb24uY29kZXMsIG9yaWdpbmFsUGFyc2VTKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZW9mKFBhcnNlUyk9PVxcXCJ1bmRlZmluZWRcXFwiKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihqc29uLmNvZGVzLCBwYXJzZUNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL3JldHVybiBcXFwidG9hc3Q6Ly/msqHmnInku6PnoIHvvIzkuI3lj6/mi4nlj5ZcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24oanNvbi5jb2RlcywgUGFyc2VTKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy92YXIgbmV3RmlsZSA9IHRv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ZXdJbnB1dFsxXTtcXG4gICAgICAgICAgICAgICAgdmFyIG51bSA9IG5ld0lucHV0WzJdO1xcbiAgICAgICAgICAgICAgICB2YXIgbnVtMiA9IG5ld0lucHV0WzNdO1xcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKHR5cGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIuWIoOmZpFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGsgPSBbbmFtZSwgbnVtXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyDmgLvmhJ/op4nnrZvpgInmiJbogIXmkJzntKLlkI7vvIznlLHkuo5udW3nmoTkvY3nva7kuI3lr7nlj6/og73kvJrliKDpmaTplJks5LqL5a6e5aaC5q2kLOW3suS/rj9cXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChcXFwi5Y2z5bCG5Yig6ZmkOiBcXFwiICsgbmFtZSkuY29uZmlybSgoaykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbmFtZSA9IGtbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBudW0gPSBrWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGFyc2VSb3V0ZSA9IGdldFZhcigncGFyc2VSb3V0ZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKHBhcnNlUm91dGUpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGpzb24uY29kZXMuaGFzT3duUHJvcGVydHkobmFtZSkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBqc29uLmNvZGVzW25hbWVdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bSA9IGpzb24udGl0bGUuaW5kZXhPZihuYW1lKTsgLy/ov5nmoLfmiY3kvJrlvpfliLDmraPnoa7nmoTntKLlvJVcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbi50aXRsZS5zcGxpY2UobnVtLCAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHBhcnNlUm91dGUsICQuc3RyaW5naWZ5KGpzb24pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5bey5bCG44CWXFxcIiArIG5hbWUgKyBcXFwi44CX5Yig6ZmkXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBrKTtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIumakOiXj1xcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoXFxcImhpa2VyOi8vZW1wdHkjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKChrKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuYW1lID0ga1swXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG51bSA9IGtbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwYXJzZVJvdXRlID0gZ2V0VmFyKCdwYXJzZVJvdXRlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsgZmV0Y2gocGFyc2VSb3V0ZSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoanNvbi5jb2Rlcy5oYXNPd25Qcm9wZXJ0eShuYW1lKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtID0ganNvbi50aXRsZS5pbmRleE9mKG5hbWUpOyAvL+i/meagt+aJjeS8muW+l+WIsOato+ehrueahOe0ouW8lVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganNvbi50aXRsZS5zcGxpY2UobnVtLCAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShwYXJzZVJvdXRlLCAkLnN0cmluZ2lmeShqc29uKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5bey5bCG44CWXFxcIiArIG5hbWUgKyBcXFwi44CX6ZqQ6JePXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lj6/og73mmK/kuKrnvZHlnYAsIOaCqOWPr+mAieaLqeWIoOmZpFxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBbbmFtZSwgbnVtXSk7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCLkv67mlLlcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vaWYgKGpzb24uY29kZXNbbmFtZV0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbkNvZGUgPSBuYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZXMgPSBqc29uLnRpdGxlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuTmFtZSA9IFxcXCLov5nmmK/lkI3np7BcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChqc29uLmNvZGVzW25hbWVdKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5Db2RlID0ganNvbi5jb2Rlc1tuYW1lXS50b1N0cmluZygpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuTmFtZSA9IG5hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKFxcXCJoaWtlcjovL2VtcHR5I25vUmVjb3JkSGlzdG9yeSNcXFwiKS5ydWxlKChrLHRpdGxlcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZCA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKGdldEl0ZW0oJ215RnVuY3Rpb24nKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuYW1lID0ga1swXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGNvZGUgPSBrWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfkv50g5a2YJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogc2F2ZUJ1dHRvbiArIFxcXCJzYXZlQnV0dG9uKGdldFZhcignaW5wdXRfZWRpdCcpLG5hbWUpO2JhY2soKTtcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpbnB1dFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwi5bu66K6u5oyJ6buY6K6k55qE5Luj56CB5qC85byP5L+u5pS55ZOmXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IFxcXCJwdXRWYXIoJ2lucHV0X2VkaXQnLCBpbnB1dClcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IFxcXCJ0ZXh0YXJlYVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBcXFwiLTFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2UsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiAn5L+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/lhoXlrrlcXFwiLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6ICdwdXRWYXIoXFxcImlucHV0X2FkZFxcXCIsIGlucHV0KScsXFxuICAgICAgICAgICAgICAgICAgICB0eXBlOiBcXFwidGV4dGFyZWFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBcXFwiLTFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0VmFyKCdpbnB1dF9hZGQnKSxcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn4oCY4oCY4oCZ4oCZPHNtYWxsPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjojNkVCODk3XFxcIj7mjInmj4/ov7Dor4nmoLzlvI/ovpPlhaUsIOivt+WLv+Whq+WFpeWFtuS7luagvOW8jzxicj7mnKzlnLDlj6Pku6Q6IOaTjeS9nOexu+Wei+KYheWQjeensOKYheS7o+eggTxicj7kupHlj6Pku6Q6IOmTvuaOpeKYheKYheKYheWQjeensDsg57qv572R5Z2AOiDnm7Tpk77imIV1cmwx4piFdXJsMicsXFxuICAgICAgICAgICAgICAgIGRlc2M6ICfigJjigJjigJnigJk8YmlnPjxiaWc+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiMyOThBMDhcXFwiPuS/nSDlrZgnLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoJ25vTG9hZGluZycpLmxhenlSdWxlKChzYXZlQnV0dG9uKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2F2ZUJ1dHRvbihnZXRWYXIoJ2lucHV0X2FkZCcpKTtcXG4gICAgICAgICAgICAgICAgfSwgc2F2ZUJ1dHRvbiksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgICAgICB9KVxcbiAgICB9LFxcbiAgICB5ZFBhcnNlOiBmdW5jdGlvbihCSm1vZGUsIGkpIHtcXG4gICAgICAgIHJldHVybiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChrKSA9PiB7XFxuICAgICAgICAgICAgdmFyIEEgPSBrWzBdLnNwbGl0KCcjJylbMV07XFxuICAgICAgICAgICAgdmFyIEIgPSBrWzFdO1xcbiAgICAgICAgICAgIHZhciBwYXJzZVJvdXRlID0gZ2V0VmFyKCdwYXJzZVJvdXRlJyk7XFxuICAgICAgICAgICAgZXZhbCgndmFyIGpzb24gPScgKyBmZXRjaChwYXJzZVJvdXRlKSk7XFxuICAgICAgICAgICAgdmFyIGl0ZW0gPSBqc29uLnRpdGxlLnNwbGljZShBLCAxKTsgLy8gMTog5qCH6K6w5byA5aeL5L2N572u77yMMjog5Yig6Zmk5Yiw5ZOq5Liq5L2N572uXFxuICAgICAgICAgICAganNvbi50aXRsZS5zcGxpY2UoQiwgMCwgaXRlbVswXSk7IC8vIDE6IOWQjOS4iu+8jDI6IDDooajnpLrkuI3liKDpmaTvvIwzOiDmt7vliqDlr7nosaFcXG4gICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgJC5zdHJpbmdpZnkoanNvbikpO1xcbiAgICAgICAgICAgIGNsZWFyVmFyKCdiaWFuamknKTtcXG4gICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcXG4gICAgICAgIH0sIFtCSm1vZGUsIGldKVxcbiAgICB9LFxcbiAgICBwbHNjUGFyc2U6IGZ1bmN0aW9uKCkge1xcbiAgICAgICAgcmV0dXJuICQoJ2hpa2VyOi8vZW1wdHkjbm9SZWNvcmRIaXN0b3J5IycpLnJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgIHZhciBkID0gW107XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfmibnph4/liKDpmaTop6PmnpAnLFxcb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KCl7cmV0dXJuIHRydWV9KSk7XFxuICAgICAgICAgICAgXzB4NDdhOWI0WydGVVJweSddKHB1dFZhciwgJ2pkUm91dGUnLCBfMHg0N2E5YjRbJ1hJT2JCJ10pO1xcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIHJldHVybiBnZXRWYXIoXzB4NDdhOWI0WydGVWpkbSddKTtcXG59XFxudmFyIGp4SXRlbSA9IHtcXG4gICAgJ2p4TGlzdCc6IGZ1bmN0aW9uKCkge1xcbiAgICAgICAgdmFyIF8weDRjMDQyNyA9IHtcXG4gICAgICAgICAgICAnVVZXb0YnOiBmdW5jdGlvbihfMHgyNmJiMDcsIF8weDIyMWI0ZCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4MjZiYjA3ICsgXzB4MjIxYjRkO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ2NvbG9yJzpmdW5jdGlvbih0ZXh0LCBjb2xvcikge1xcbiAgICAgICAgICAgICAgICB0ZXh0ICs9IFxcXCJcXFwiO1xcbiAgICAgICAgICAgICAgICBpZiAodGV4dC5pbmRleE9mKFxcXCLigJzigJzigJ3igJ1cXFwiKSA9PT0gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgdGV4dC5yZXBsYWNlKFxcXCLigJzigJzigJ3igJ1cXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCLigJzigJzigJ3igJ08Zm9udCBjb2xvcj0nXFxcIiArIGNvbG9yICsgXFxcIic+XFxcIiArIHRleHQgKyBcXFwiPC9mb250PlxcXCI7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAna3pXREsnOiBmdW5jdGlvbihfMHg0ODU0YTksIF8weDNlOThjNSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NDg1NGE5ICsgXzB4M2U5OGM1O1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ1hYeVF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uICAgICAgICAgICAgICAgIHJldHVybiBfMHgxOWIxNzggPT09IF8weDRlZjhmNjtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdIWmhsYyc6IGZ1bmN0aW9uKF8weDVjYWUwMywgXzB4MjZlMjQyKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg1Y2FlMDMgPT0gXzB4MjZlMjQyO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ2NnSWVBJzogZnVuY3Rpb24oXzB4MjVlMzY4LCBfMHg4YmM4ZTkpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDI1ZTM2OCArIF8weDhiYzhlOTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICd4ZHJGdic6IGZ1bmN0aW9uKF8weDRhYjVkOCwgXzB4MjEyNDJmKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg0YWI1ZDggKyBfMHgyMTI0MmY7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAneXdqdXgnOiBmdW5jdGlvbihfMHg1ZTMwNTEsIF8weDRlMDIzMCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NWUzMDUxKF8weDRlMDIzMCk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfTtcXG4gICAgICAgIHZhciBfMHgxZDhiYjEgPSBnZXRWYXIoXzB4NGMwNDI3WydKQ2NOWSddKTtcXG4gICAgICAgIHZhciBfMHgzYjg5YWIgPSBwYXJzZUZpbGVbJ3RpdGxlJ107XFxuICAgICAgICB2YXIgXzB4NDlkYTk2ID0gZ2V0VmFyKF8weDRjMDQyN1sncmdESXAnXSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBfMHg0YzA0MjdbJ2hvSWRKJ10sXFxuICAgICAgICAgICAgZGVzYzon5rOo5oSPOuS9jee9ruaTjeS9nOWKn+iDveWPquWcqOWIhuexu+etm+mAieS4uuWFqOmDqOaXtueUn+aViFxcXFxu5LiL5pa55pCc57Si5oyJ5ZCN56ew5oiW5Zyw5Z2ALOmHjee9ruivt+eVmeepuuaIlueCueino+aekOaVsOmHj+aMiemSricsXFxuICAgICAgICAgICAgdXJsOiBiakl0ZW1bJ3hqUGFyc2UnXSgpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgbGluZVZpc2libGU6ZmFsc2VcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6J+aQnOe0oicsXFxuICAgICAgICAgICAgZGVzYzonbWVuZ3gnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidpbnB1dCcsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgb25DaGFuZ2U6IFxcXCJwdXRWYXIoJ2RwLnNlYXJjaEp4JyxpbnB1dClcXFwiLFxcbiAgICAgICAgICAgICAgICB0aXRsZVZpc2libGU6IHRydWUsXFxuICAgICAgICAgICAgICAgIHRleHRTaXplOiAxMSxcXG4gICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOmdldFZhcignZHAuc2VhcmNoSngnLCcnKSxcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHVybDokLnRvU3RyaW5nKCgpPT57XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pO1xcbiAgICAgICAgbGV0IGZpbHRlcnMgPSBbJ+WFqOmDqCcsJ+mTvuaOpScsJ2pzb24nLCflhY3ll4UnXTtcXG4gICAgICAgIGZvcihsZXQgbyBpbiBmaWx0ZXJzKXtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiA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A6XFxcIitfMHg0YzA0MjcuY29sb3IoXzB4M2I4OWFiLmxlbmd0aCwnI2ZmNzAwMCcpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOlxcXCJzY3JvbGxfYnV0dG9uXFxcIixcXG4gICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoKT0+e1xcbiAgICAgICAgICAgICAgICBjbGVhclZhcignZHAuc2VhcmNoSngnKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lph43nva4nXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pO1xcbiAgICAgICAgLy8g5LiL6Z2i5piv6Kej5p6Q5YiX6KGo5o6S5YiXXFxuICAgICAgICAvLyBmb3IgKHZhciBfMHhlMmMzZDggPSAweDA7IF8weDRjMDQyN1snRnJHT0gnXShfMHhlMmMzZDgsIF8weDJlY2JlNSk7IF8weGUyYzNkOCsrKSB7XFxuICAgICAgICBmb3IgKGxldCBfMHhlMmMzZDggaW4gXzB4M2I4OWFiKSB7XFxuICAgICAgICAgICAgdmFyIF8weDMzNzg4YyA9IF8weDNiODlhYltfMHhlMmMzZDhdO1xcbiAgICAgICAgICAgIHZhciBfMHgzNzg3MWUgPSBfMHg0YzA0MjdbJ25XZlZSJ10oXzB4MzM3ODhjLCAnJylbJ3JlcGxhY2UnXSgvaHR0cC4qXFxcXC9cXFxcLy9nLCAnJyk7XFxuICAgICAgICAgICAgaWYgKC/np7vliqgvIFsndGVzdCddKF8weDQ5ZGE5NikpIHtcXG4gICAgICAgICAgICAgICAgaWYgKF8weDRjMDQyN1snb0NDU2onXSgndUtMeEYnLCAndUtMeEYnKSkge1xcbiAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg0YzA0MjdbJ0haaGxjJ10oXzB4NGMwNDI3WydYWHlRciddICsgXzB4ZTJjM2Q4LCBfMHg0OWRhOTYpID8gXzB4NGMwNDI3WyduV2ZWUiddKF8weDRjMDQyN1snY2dJZUEnXShfMHg0YzA0MjdbJ1V0ZldmJ10sIF8weDRjMDQyN1snUU92SlYnXSksIF8weDM3ODcxZSkgOiBfMHg0YzA0MjdbJ2NnSWVBJ10oXzB4NGMwNDI3WydBQkV3QiddLCBfMHgzNzg3MWUpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBiakl0ZW1bJ3lkUGFyc2UnXShfMHg0OWRhOTYsIF8weGUyYzNkOCksXFxuICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogJ3RleHRfMidcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIF8weDJiYzYxOCA9IF8weDNiODlhYltfMHhlMmMzZDhdO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIF8weDVjZjQxNyA9IF8weDRjMDQyN1snVVZXb0YnXShfMHgyYmM2MTgsICcnKVsncmVwbGFjZSddKC9odHRwLipcXFxcL1xcXFwvL2csICcnKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmICgv56e75YqoLyBbJ3Rlc3QnXShfMHg0OWRhOTYpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NGMwNDI3WydreldESyddKF8weDRjMDQyN1snWFh5UXInXSwgXzB4ZTJjM2Q4KSA9PSBfMHg0OWRhOTYgPyBfMHg0YzA0MjdbJ2d0VW5qJ10oXzB4NGMwNDI3WydndFVuaiddKF8weDRjMDQyN1snVXRmV2YnXSwgXzB4NGMwNDI3WydRT3ZKViddKSwgXzB4NWNmNDE3KSA6IF8weDRjMDQyN1snQUJFd0InXSArIF8weDVjZjQxNyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsneWRQYXJzZSddKF8weDQ5ZGE5NiwgXzB4ZTJjM2Q4KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NGMwNDI3WydvenpXRyddXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBfMHgxMTkzNjUgPSBbXzB4MmJjNjE4LCBfMHg0YzA0MjdbJ2d0VW5qJ10oXzB4ZTJjM2Q4LCAnfHwnKV1bJ2pvaW4nXSgnfHwnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg0YzA0MjdbJ25XZlZSJ10oXzB4NGMwNDI3WydBQkV3QiddLCBfMHg1Y2Y0MTcpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg0YzA0MjdbJ296eldHJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBiakl0ZW1bJ3hsU2VsZWN0J10oXzB4MTE5MzY1LCBfMHgyZWNiZTVbJ3RvU3RyaW5nJ10oKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHZhciBfMHhiNzAxOTIgPSBbXzB4MzM3ODhjLCBfMHhlMmMzZDggKyAnfHwnXVsnam9pbiddKCd8fCcpO1xcbiAgICAgICAgICAgICAgICAvLyDov6rov6rlvbHpmaJ8fDB8fCAg5ZCN56ewfHzntKLlvJUg55qE5pWw57uEXFxuICAgICAgICAgICAgICAgIC8vIEFCRXdCIOaYr+e7v+iJsiBfMHgzNzg3MWUg5piv5qCH6aKY5ZCN56ewICB4ZHJGduaYr+Wtl+espuS4sui/nuaOpeWHveaVsFxcbiAgICAgICAgICAgICAgICAvLyBsZXQgZmxhZyA9ICfigJjigJjik4rigJnigJknO1xcbiAgICAgICAgICAgICAgICBsZXQgZmxhZyA9IF8weDRjMDQyNy5jb2xvcign4pOKJywnIzAwNTFmZicpO1xcbiAgICAgICAgICAgICAgICBpZih0eXBlb2YoanNvbi5jb2Rlc1tfMHgzNzg3MWVdKT09PSdmdW5jdGlvbicpe1xcbiAgICAgICAgICAgICAgICAgICAgLy8gZmxhZyA9ICfigJzigJzikr/igJ3igJ0nO1xcbiAgICAgICAgICAgICAgICAgICAgZmxhZyA9IF8weDRjMDQyNy5jb2xvcign4pK/JywnI2ZmNzAwMCcpO1xcbiAgICAgICAgICAgICAgICB9ZWxzZSBpZih0eXBlb2YoanNvbi5jb2Rlc1tfMHgzNzg3MWVdKT09PSd1bmRlZmluZWQnKXtcXG4gICAgICAgICAgICAgICAgICAgIGZsYWcgPSAnJztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvLyBsZXQgY2xzID0gJzxzcGFuIHN0eWxlPVxcXCJjb2xvcjojMjk4QTA4XFxcIj4nO1xcbiAgICAgICAgICAgICAgICAvLyBsZXQgdGl0bGUgPSBfMHg0YzA0MjdbJ3hkckZ2J10oXzB4NGMwNDI3WydBQkV3QiddLCBmbGFnK18weDM3ODcxZSk7XFxuICAgICAgICAgICAgICAgIC8vIGxldCB0aXRsZSA9IGZsYWcrY2xzK18weDM3ODcxZTtcXG4gICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gZmxhZytfMHg0YzA0MjcuY29sb3IoXzB4Mzc4NzFlLCcjMjk4QTA4Jyk7XFxuICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIC8vICd0aXRs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Q1LCBfMHgzMWZhMWUpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDRhZDNkNSA8IF8weDMxZmExZTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdyQWtBaCc6ICd0ZXh0XzMnLFxcbiAgICAgICAgICAgICd5V2FPSSc6ICfmgaLlpI3mj5Lku7bot6/lvoTkuLrpu5jorqQnLFxcbiAgICAgICAgICAgICd5anlqSyc6ICflvZPliY3orr7nva7kuLo6ICcsXFxuICAgICAgICAgICAgJ3RIWGVFJzogJ+aLieWPluino+aekOWIl+ihqOaIluiAheino+aekOS7o+eggScsXFxuICAgICAgICAgICAgJ0dNVVl1JzogJ+WtmOaUvui3r+W+hDogL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbicsXFxuICAgICAgICAgICAgJ21wWkJaJzogJ2xpbmVfYmxhbmsnLFxcbiAgICAgICAgICAgICd4dnFnRic6ICfovpPlhaXmnInmlYjmj5Lku7blnLDlnYAnLFxcbiAgICAgICAgICAgICdoZXVLeCc6ICdwdXRWYXIoXFxcInBsdWdpbkxpbmtcXFwiLGlucHV0KScsXFxuICAgICAgICAgICAgJ0lpZmlhJzogJ+KAmOKAmOKAmeKAmTxzdHJvbmc+PGJpZz7nmbvlvZXmj5DnpLonLFxcbiAgICAgICAgICAgICdQRlJIQSc6ICfkvb/nlKjnm7jlhbPlip/og73pnIDnmbvlvZXop4bnlYzorrrlnZvotKblj7dcXFxcbuWmguaciemXrumimOWJjeW+gOiuuuWdm+S6huino+ivpuaDhScsXFxuICAgICAgICAgICAgJ1VMd2tUJzogJ2h0dHBzOi8vaGFpa3Vvc2hpamllLmNuL3VzZXIvc2lnbmluJ1xcbiAgICAgICAgfTtcXG4gICAgICAgIGlmIChfMHg1NDFkNzZbJ3BzR2R0J10oXzB4NTQxZDc2Wyd3U2ZueiddKGJic1laKSwgXzB4NTQxZDc2WydpbXhyaSddKSkge1xcbiAgICAgICAgICAgIGlmIChfMHg1NDFkNzZbJ25Ta2p4J10oXzB4NTQxZDc2WydpVk5lTSddLCBfMHg1NDFkNzZbJ2lWTmVNJ10pKSB7XFxuICAgICAgICAgICAgICAgIF8weDU0MWQ3NlsnYVdpUnMnXShwdXRWYXIsICdiYnNZWicsIF8weDU0MWQ3Nlsnd1NmbnonXShpc0xvZ2luKXx8ZnVuY3Rpb24gKCl7cmV0dXJuIHRydWV9KTtcXG4gICAgICAgICAgICAgICAgXzB4NTQxZDc2WydhV2lScyddKHB1dFZhciwgXzB4NTQxZDc2WydxUlFkQSddLCBfMHg1NDFkNzZbJ1dRaXFrJ10pO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHZhciBfMHg0ZDI1ZmYgPSBfMHg1NDFkNzZbJ0l3TVRsJ11bJ3NwbGl0J10oJ3wnKSxcXG4gICAgICAgICAgICAgICAgICAgIF8weDRhOTdjOSA9IDB4MDtcXG4gICAgICAgICAgICAgICAgd2hpbGUgKCEhW10pIHtcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoXzB4NGQyNWZmW18weDRhOTdjOSsrXSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzAnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2Wyd4ZmRIayddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsncHVsbFNjcmlwdCddKF9teVNldFsnY2pjYWNoZSddLCBfbXlTZXRbJ3g1Y2FjaGUnXSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGVzYyc6IF8weDU0MWQ3NlsnckdMdUEnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnelFTTEUnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnMSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF8weDU0MWQ3NlsnaHZpRGwnXShldmFsLCBfMHg1NDFkNzZbJ2h2aURsJ10oZ2V0VmFyLCBfMHg1NDFkNzZbJ3FSUWRBJ10pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnMic6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiAnbGluZV9ibGFuaydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzMnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgXzB4MmFiMzk5ID0gJ2hpa2VyOi8vZW1wdHkjbm9IaXN0b3J5I0BydWxlPWpzOnRoaXMuZD1bXTskLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9qeEl0ZW0/cnVsZT1NeUZpZWxk4bSw4oG/XFxcIikuanhMaXN0KCk7c2V0UmVzdWx0KGQpOyc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzQnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2WydaeFVndCddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IHR5cGVvZiBjekd1aWRlID09ICdmdW5jdGlvbicgPyBjekd1aWRlKCkgOiAnJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnelFTTEUnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnNSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHhkUm91dGUgPSBfMHg1NDFkNzZbJ3NXRm9jJ10oeGRSb3V0ZSwgX215U2V0WydwYXJzZVJvdXRlJ10pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICc2JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIF8weDNhOWFmZSA9IFt7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiAn5ouJ5Y+W5YiX6KGoJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBiakl0ZW1bJ3B1bGxDb2RlJ10oJ+WIl+ihqCcpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDU0MWQ3NlsnT0VoYXQnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBiakl0ZW1bJ3B1bGxDb2RlJ10oJ+S7o+eggScpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDU0MWQ3NlsnWnZ0U3UnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd1cmwnOiBfMHg1NDFkNzZbJ2h2aURsJ10oZmlsZUV4aXN0LCBfMHg1NDFkNzZbJ2h2aURsJ10oZ2V0VmFyLCAncGFyc2VSb3V0ZScpKSA9PSAhIVtdID8gXzB4MmFiMzk5IDogXzB4NTQxZDc2WydnWEtNYiddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1dO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICc3JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgXzB4MWEyY2RiID0gMHgwOyBfMHg1NDFkNzZbJ1dDT0RDJ10oXzB4MWEyY2RiLCBfMHgzYTlhZmVbJ2xlbmd0aCddKTsgXzB4MWEyY2RiKyspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4M2E5YWZlW18weDFhMmNkYl1bJ3RpdGxlJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IF8weDNhOWFmZVtfMHgxYTJjZGJdWyd1cmwnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg1NDFkNzZbJ3JBa0FoJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzgnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2Wyd5V2FPSSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsnaGZQbHVnaW4nXShfbXlTZXRbJ3BhcnNlUm91dGUnXSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGVzYyc6IF8weDU0MWQ3Nlsnc1dGb2MnXShfMHg1NDFkNzZbJ3lqeWpLJ10gKyBteVNldFsnY2onXSwgJ1xcXFxu5a2Y5pS+6Lev5b6EOiAvcnVsZXMvRHVhbk5pYW4vTXlQYXJzZS5qc29uJyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg1NDFkNzZbJ3pRU0xFJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzknOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2Wyd0SFhlRSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6ICd0b2FzdDovL+ivt+WcqOS4i+aWuemAiemhueaTjeS9nCcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGVzYyc6IF8weDU0MWQ3NlsnR01VWXUnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnelFTTEUnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnMTAnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2WydtcFpCWiddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcxMSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGVzYyc6IF8weDU0MWQ3NlsneHZxZ0YnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6ICdpbnB1dCcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZXh0cmEnOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlVmlzaWJsZSc6ICFbXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZGVmYXVsdFZhbHVlJzogXzB4NTQxZDc2WydodmlEbCddKGdldFZhciwgJ3BsdWdpbkxpbmsnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb25DaGFuZ2UnOiBfMHg1NDFkNzZbJ2hldUt4J11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDU0MWQ3NlsnSWlmaWEnXSxcXG4gICAgICAgICAgICAgICAgJ2Rlc2MnOiBfMHg1NDFkNzZbJ1BGUkhBJ10sXFxuICAgICAgICAgICAgICAgICd1cmwnOiBfMHg1NDFkNzZbJ1VMd2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bqTUHJvXFxcIik7XFxuICAgICAgICBsZXQgZCA9IFtdO1xcbiAgICAgICAgbGV0IG9wdGlvbnMgPSBbJ+mAieaLqScsJ+S/ruaUuScsJ+WIoOmZpCcsJ+WvvOWHuiddO1xcblxcbiAgICAgICAgZm9yKHZhciBpIGluIG9wdGlvbnMpe1xcbiAgICAgICAgICAgIGxldCBvcHRpb24gPSBvcHRpb25zW2ldO1xcbiAgICAgICAgICAgIGxldCBmbGFnID0gZ2V0VmFyKCd0aGVtZS5kbl9vcHRpb24nLCfmlrDlop4nKT09PW9wdGlvbj8n8J+RiSc6Jyc7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ZmxhZytvcHRpb24sXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgdXJsOiQob3B0aW9uKS5sYXp5UnVsZSgoKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCd0aGVtZS5kbl9vcHRpb24nLCBpbnB1dCk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lorr7nva7mk43kvZznsbvlnovkuLo6JytpbnB1dDtcXG4gICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBsZXQgdGhlbWVSb3V0ZSA9IFxcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL015VGhlbWUuanNvblxcXCI7XFxuICAgICAgICBsZXQgbXlUaGVtZXMgPSB7fTtcXG4gICAgICAgIGxldCB0aGVtZXMgPSB7fTtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgbXlUaGVtZXMgPSBKU09OLnBhcnNlKGZldGNoKHRoZW1lUm91dGUpKTtcXG4gICAgICAgICAgICB0aGVtZXMgPSBteVRoZW1lcy50aGVtZXNbbXlUaGVtZXMubm93X3RoZW1lXTtcXG4gICAgICAgIH1jYXRjaCAoZSkge31cXG5cXG5cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6J+WvvOWFpScsXFxuICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgIHVybDokKCcnLCfor7fovpPlhaXlr7zlhaXlj6Pku6QnKS5pbnB1dCgobXlUaGVtZXMsdGhlbWVSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgaWYoL17mlq3mj5LkuLvpophALio/QGh0dHAvLnRlc3QoaW5wdXQpKXtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBuYW1lID0gaW5wdXQuc3BsaXQoJ0AnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBpbnB1dC5zcGxpdCgnQCcpWzJdO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ+ehruWumuimgeWvvOWFpeaWreaPkuS4u+mimC0nK25hbWUrJyDlkJc/JykuY29uZmlybSgobmFtZSx1cmwsbXlUaGVtZXMsdGhlbWVSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29udGVudCA9IHBhcnNlUGFzdGUodXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGFzVGhlbWUgPSBteVRoZW1lcy50aGVtZXMuZmlsdGVyKGl0PT5pdC5uYW1lPT09bmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoaGFzVGhlbWUmJmhhc1RoZW1lLmxlbmd0aD4wKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGlkID0gbnVsbDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBqIGluIG15VGhlbWVzLnRoZW1lcyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihteVRoZW1lcy50aGVtZXNbal0ubmFtZSA9PT0gbmFtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQgPSBqO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFpZCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v57Si5byV6ZSZ6K+v5peg5rOV6KaG55uW5a+85YWlOlxcXFxuJytpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxvZygn6KaG55uW5a+85YWl5Li76aKYaWQ6JytpZCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG15VGhlbWVzLnRoZW1lc1tpZF0gPSBPYmplY3QuYXNzaWduKEpTT04ucGFyc2UoYmFzZTY0RGVjb2RlKGNvbnRlbnQpKSx7J25hbWUnOm5hbWV9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbXlUaGVtZXMudGhlbWVzLnB1c2goT2JqZWN0LmFzc2lnbihKU09OLnBhcnNlKGJhc2U2NERlY29kZShjb250ZW50KSkseyduYW1lJzpuYW1lfSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2cobXlUaGVtZXMpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh0aGVtZVJvdXRlLEpTT04uc3RyaW5naWZ5KG15VGhlbWVzKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suaIkOWKn+WvvOWFpeS4u+mimDpcXFxcbicrbmFtZVxcbiAgICAgICAgICAgICAgICAgICAgfSxuYW1lLHVybCxteVRoZW1lcyx0aGVtZVJvdXRlKTtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5peg5rOV6K+G5Yir55qE5a+85YWl5Y+j5LukOlxcXFxuJytpbnB1dDtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sbXlUaGVtZXMsdGhlbWVSb3V0ZSksXFxuICAgICAgICB9KTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6J+aWsOWinicsXFxuICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgIHVybDokKCkucnVsZSgobXlUaGVtZXMsdGhlbWVSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgbGV0IGQ9W107XFxuICAgICAgICAgICAgICAgIGFkZExpc3RlbmVyKCdvbkNsb3NlJywgJC50b1N0cmluZygoKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgIH0pKTtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5Li76aKY5ZCN56ewJyxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLmlq3mj5It6JOd6I6T5Li76aKYXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6IFxcXCJwdXRWYXIoJ3RoZW1lLm5ld19hZGRfbmFtZScsaW5wdXQpXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZVZpc2libGU6IHRydWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRWYXIoJ3RoZW1lLm5ld19hZGRfbmFtZScsICcnKVxcbiAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDokLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3X2FkZF9uYW1lID0gZ2V0VmFyKCd0aGVtZS5uZXdfYWRkX25hbWUnLCAnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S9oOi+k+WFpeeahOaYrzonK25ld19hZGRfbmFtZTtcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpbnB1dFxcXCJcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwi5Luj56CBXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnaW5wdXQnLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZVZpc2libGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0VmFyKCd0aGVtZS5uZXdfYWRkX2NvZGUnLCAnJyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogXFxcInRleHRhcmVhXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6LTEsXFxuICAgICAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6ICdwdXRWYXIoXFxcInRoZW1lLm5ld19hZGRfY29kZVxcXCIsaW5wdXQpJ1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOifkv53lrZgnLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfY2VudGVyXzEnLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiQoKS5sYXp5UnVsZSgobXlUaGVtZXMsdGhlbWVSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9IGdldFZhcigndGhlbWUubmV3X2FkZF9jb2RlJywgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuYW1lID0gZ2V0VmFyKCd0aGVtZS5uZXdfYWRkX25hbWUnLCAnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoIW5hbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L2g6L+Y5rKh5aGr5YaZ5Li76aKY5ZCN56ew5ZGiJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3VGhlbWUgPSB7fTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdUaGVtZSA9IEpTT04ucGFyc2UoY29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/plJnor6/nmoTkuLvpophqc29u5qC85byPOlxcXFxuJytlLm1lc3NhZ2U7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24obmV3VGhlbWUseyduYW1lJzpuYW1lfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbXlUaGVtZXMudGhlbWVzLnB1c2gobmV3VGhlbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh0aGVtZVJvdXRlLEpTT04uc3RyaW5naWZ5KG15VGhlbWVzKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suaWsOWinuaWreaPkuS4u+mimDonK25hbWVcXG4gICAgICAgICAgICAgICAgICAgIH0sbXlUaGVtZXMsdGhlbWVSb3V0ZSlcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgICAgICAgICB9LG15VGhlbWVzLHRoZW1lUm91dGUpLFxcbiAgICAgICAgfSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOm15VGhlbWVzLnRoZW1lcz8n5Li76aKY5YiX6KGoOuWFseiuoTonK2NvbG9yKG15VGhlbWVzLnRoZW1lcy5sZW5ndGgsJyNmZjcwMDAnKSsn5Liq5Li76aKYJzpcXFwi56ys5LiA5qyh5Yqg6L2977yM54K55q2k6L+b5Y675Yid5aeL5YyW5Li76aKY5YiX6KGoXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF8xJyxcXG4gICAgICAgICAgICB1cmw6J2hpa2VyOi8vcGFnZS9Sb3V0ZT9ydWxlPU15RmllbGThtLDigb8mdHlwZT3orr7nva4jbm9IaXN0b3J5IydcXG4gICAgICAgIH0pO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpcXFwi5oGi5aSN5Ye65Y6C6K6+572uXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF9jZW50ZXJfMScsXFxuICAgICAgICAgICAgdXJsOiQoXFxcIuWmguaenOS9oOeahOS4u+mimOayoeazleato+W4uOeUqOS6hu+8jOatpOaWueazleWPr+S7peaVkeeglu+8jOehruiupOaBouWkjT9cXFwiKS5jb25maXJtKCgpPT57XFxuICAgICAgICAgICAgICAgIGx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lSdWxlKChteXRoZW1lLG15VGhlbWVzLGksdGhlbWVSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgIGxldCBvcHRpb24gPSBnZXRWYXIoJ3RoZW1lLmRuX29wdGlvbicsJ+aWsOWinicpO1xcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChvcHRpb24pe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ+WvvOWHuic6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBteXRoZW1lQ29kZSA9IGJhc2U2NEVuY29kZShKU09OLnN0cmluZ2lmeShteXRoZW1lKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBzaGFyZVBhc3RlKG15dGhlbWVDb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSAn5pat5o+S5Li76aKYQCcrbXl0aGVtZS5uYW1lKydAJyt1cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvcHkoY29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Llr7zlh7rkuLrkupHlj6Pku6TlubblpI3liLbliLDliarliIfmnb8nXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAn5L+u5pS5JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoSlNPTi5zdHJpbmdpZnkobXl0aGVtZSkpLmlucHV0KChteXRoZW1lLG15VGhlbWVzLGksdGhlbWVSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG15dGhlbWUubmFtZT09PW15VGhlbWVzLm5vd190aGVtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+atpOS4u+mimOW9k+WJjeato+WcqOS9v+eUqOS4re+8jOS4jeWFgeiuuOS/ruaUuSEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBteVRoZW1lcy50aGVtZXNbaV09SlNPTi5wYXJzZShpbnB1dCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUodGhlbWVSb3V0ZSxKU09OLnN0cmluZ2lmeShteVRoZW1lcykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5L+u5pS5J1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ+WIoOmZpCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCfnoa7orqTliKDpmaTkuLvpopg6JytteXRoZW1lLm5hbWUrJz8nKS5jb25maXJtKChteXRoZW1lLG15VGhlbWVzLGksdGhlbWVSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG15dGhlbWUubmFtZT09PW15VGhlbWVzLm5vd190aGVtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+atpOS4u+mimOW9k+WJjeato+WcqOS9v+eUqOS4re+8jOS4jeWFgeiuuOWIoOmZpCEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBteVRoZW1lcy50aGVtZXMuc3BsaWNlKGksMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUodGhlbWVSb3V0ZSxKU09OLnN0cmluZ2lmeShteVRoZW1lcykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5Yig6ZmkJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG15VGhlbWVzLm5vd190aGVtZT1teXRoZW1lLm5hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh0aGVtZVJvdXRlLEpTT04uc3RyaW5naWZ5KG15VGhlbWVzKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L2g6YCJ5oup5LqGJytteXRoZW1lLm5hbWUrJ+S9nOS4uum7mOiupOS4u+mimCc7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sbm93VGhlbSxteVRoZW1lcyxpLHRoZW1lUm91dGUpLFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICB9XFxuJC5leHBvcnRzLnRoZW1lSW5pdD10aGVtZUluaXQ7XCJ9LHtcIm5hbWVcIjpcIuaTjeS9nOaMh+W8lVwiLFwicGF0aFwiOlwiR3VpZGVcIixcInJ1bGVcIjpcIjxodG1sPlxcbjxoZWFkPlxcbiAgICA8bWV0YSBjaGFyc2V0PVxcXCJVVEYtOFxcXCI+XFxuPC9oZWFkPlxcbjxib2R5PlxcbjxzdHJvbmc+IDxiaWc+5ouJ5Y+W56+HPC9iaWc+IDwvc3Ryb25nPlxcbjxiciAvPiDmk43kvZzpobrluo/vvJpcX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0aW9uc1tpXTtcXG4gICAgICAgICAgICBsZXQgZmxhZyA9IGdldFZhcignZG4uanhtX29wdGlvbicsJ+mAieaLqScpPT09b3B0aW9uPyfwn5GJJzonJztcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTpmbGFnK29wdGlvbixcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgob3B0aW9uKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkbi5qeG1fb3B0aW9uJywgb3B0aW9uKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5JztcXG4gICAgICAgICAgICAgICAgfSxvcHRpb24pLFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IGp4c1JvdXRlID0gXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlKaWV4aS5qc29uXFxcIjtcXG4gICAgICAgIGxldCBNeUppZXhpID0ge2ppZXhpczpbXX07XFxuICAgICAgICBsZXQgamlleGlzID0ge307XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIE15SmlleGkgPSBKU09OLnBhcnNlKGZldGNoKGp4c1JvdXRlKSk7XFxuICAgICAgICAgICAgamlleGlzID0gTXlKaWV4aS5qaWV4aXMuZmlsdGVyKGl0PT5pdC5uYW1lPT09TXlKaWV4aS5ub3cpWzBdO1xcbiAgICAgICAgfWNhdGNoIChlKSB7fVxcblxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTon5a+85YWlJyxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgdXJsOiQoJycsJ+ivt+i+k+WFpeWvvOWFpeWPo+S7pCcpLmlucHV0KChNeUppZXhpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBpZigvXumtlOaWreino+aekOmFjee9rkAuKj9AaHR0cC8udGVzdChpbnB1dCkpe1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWUgPSBpbnB1dC5zcGxpdCgnQCcpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IGlucHV0LnNwbGl0KCdAJylbMl07XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgn56Gu5a6a6KaB5a+85YWl5pat5o+S6Kej5p6Q6YWN572uLScrbmFtZSsnIOWQlz8nKS5jb25maXJtKChuYW1lLHVybCxNeUppZXhpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250ZW50ID0gcGFyc2VQYXN0ZSh1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoYXNJdCA9IE15SmlleGkuamlleGlzLmZpbHRlcihpdD0+aXQubmFtZT09PW5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGhhc0l0JiZoYXNJdC5sZW5ndGg+MCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpZCA9IG51bGw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaiBpbiBNeUppZXhpLmppZXhpcyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihNeUppZXhpLmppZXhpc1tqXS5uYW1lID09PSBuYW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZCA9IGo7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWlkKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ntKLlvJXplJnor6/ml6Dms5Xopobnm5blr7zlhaU6XFxcXG4nK2lkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKCfopobnm5blr7zlhaXkuLvpophpZDonK2lkKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXNbaWRdID0gT2JqZWN0LmFzc2lnbihKU09OLnBhcnNlKGJhc2U2NERlY29kZShjb250ZW50KSkseyduYW1lJzpuYW1lfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzLnB1c2goT2JqZWN0LmFzc2lnbihKU09OLnBhcnNlKGJhc2U2NERlY29kZShjb250ZW50KSkseyduYW1lJzpuYW1lfSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LmiJDlip/lr7zlhaXop6PmnpDphY3nva46XFxcXG4nK25hbWVcXG4gICAgICAgICAgICAgICAgICAgIH0sbmFtZSx1cmwsTXlKaWV4aSxqeHNSb3V0ZSk7XFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aXoOazleivhuWIq+eahOWvvOWFpeWPo+S7pDpcXFxcbicraW5wdXQ7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LE15SmlleGksanhzUm91dGUpLFxcbiAgICAgICAgfSk7XFxuXFxuICAgICAgICBsZXQgaXNBdXRvID0gTXlKaWV4aS5pc0F1dG87XFxuICAgICAgICBsZXQgYXV0b01vZGUgPSBNeUppZXhpLmF1dG9Nb2RlO1xcbiAgICAgICAgbGV0IHRpcHMgPSAn6Kej5p6Q6YWN572u5YiX6KGoOuWFseiuoTonK2NvbG9yKE15SmlleGkuamlleGlzLmxlbmd0aCwnI2ZmNzAwMCcpKyfkuKrphY3nva4s6Ieq5Yqo5qGj5byA5YWzOicrY29sb3IoaXNBdXRvPyflvIAnOiflhbMnLCcjZmY3MDAwJyk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOk15SmlleGkuamlleGlzJiZNeUppZXhpLmppZXhpcy5sZW5ndGg+MD90aXBzOlxcXCLnrKzkuIDmrKHliqDovb3vvIzngrnmraTov5vljrvliJ3lp4vljJbop6PmnpDliJfooahcXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0XzEnLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChNeUppZXhpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBpZihNeUppZXhpLmppZXhpcyYmTXlKaWV4aS5qaWV4aXMubGVuZ3RoPjApe1xcbiAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5pc0F1dG8gPSAhTXlKaWV4aS5pc0F1dG87XFxuICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdGlwcyA9IE15SmlleGkuaXNBdXRvPyflvIAnOiflhbMnO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suiuvue9ruiHquWKqOaho+a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W5nIycpLmxhenlSdWxlKChNeUppZXhpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBNeUppZXhpLmF1dG9Nb2RlID0gTXlKaWV4aS5hdXRvTW9kZT09PSfpgJ/luqbkvJjlhYgnPyfpobrluo/kvJjlhYgnOifpgJ/luqbkvJjlhYgnO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suiuvue9ruWkh+iDjuWuoOW5uOaWueahiOS4ujonK015SmlleGkuYXV0b01vZGVcXG4gICAgICAgICAgICB9LE15SmlleGksanhzUm91dGUpXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6Y29sb3IoXFxcIuaBouWkjeWHuuWOguiuvue9rlxcXCIsJyNmZjcwMDAnKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF8yJyxcXG4gICAgICAgICAgICB1cmw6JChcXFwi5aaC5p6c5L2g55qE6Kej5p6Q566h55CG5peg5rOV5q2j5bi455So5LqG77yM5q2k5pa55rOV5Y+v5Lul5pWR56CW77yM56Gu6K6k5oGi5aSNP1xcXCIpLmNvbmZpcm0oKGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBsZXQgaW5pdFNldCA9IHsnbm93JzpcXFwi6YGT6ZW/5o6o6I2QXFxcIiwnamlleGlzJzpbe25hbWU6J+mBk+mVv+aOqOiNkCcscXk6WyfkvaDniLnnp5HmioAnXSx5azpbJ+mihumFtyddLHR4Olsn6I2j6ICAJ10sbWc6WyfomoLomoHlhYTlvJ8nXSxibDpbJ09L6Kej5p6QJ10sc2g6WyfmsZ/muZZEJ10seGc6WyfmsZ/muZZEJ10sYWw6WyfmsZ/muZZEJ10scHA6Wyfkurrkurrov7cnXSxtaTpbJzEwODAnXSxsZTpbJ+i/quWlpeWXheaOoiddLGZ1bjpbJ+iejeWFtCddLG9uZTpbJzEwODAnXSx9XX07XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShpbml0U2V0KSk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5pat5o+S6Kej5p6Q6YWN572u5bey6YeN572u5Li65Ye65Y6C6K6+572uJ1xcbiAgICAgICAgICAgIH0sanhzUm91dGUpXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGxldCBjYWNoZVZpZGVvU3dpdGNoID0gZ2V0VmFyKCdkcC5jYWNoZVZpZGVvJywndHJ1ZScpPT09J3RydWUnPyflvIAnOiflhbMnO1xcbiAgICAgICAgbGV0IGp4VGltZW91dCA9IGdldFZhcignZHAuanhUaW1lb3V0JywnNzAwMCcpO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpzbWFsbCgn5aSa57q/6Lev57yT5a2YOicpK2NvbG9yKGNhY2hlVmlkZW9Td2l0Y2gsJyNmZjcwMDAnKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF8yJyxcXG4gICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoY2FjaGVWaWRlb1N3aXRjaCk9PntcXG4gICAgICAgICAgICAgICAgaWYoY2FjaGVWaWRlb1N3aXRjaD09PSflvIAnKXtcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcignZHAuY2FjaGVWaWRlbycsJ2ZhbHNlJyk7XFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkcC5jYWNoZVZpZGVvJywndHJ1ZScpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSxjYWNoZVZpZGVvU3dpdGNoKVxcbiAgICAgICAgfSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOnNtYWxsKCflhajlsYDop6PmnpDotoXml7Y6JykrY29sb3IoanhUaW1lb3V0LCcjZmY3MDAwJyksXFxuICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfMicsXFxuICAgICAgICAgICAgdXJsOiQoanhUaW1lb3V0LCfor7forr7nva7prZTmlq3op6PmnpDotoXml7Ys5b+F6aG75Li65pW05pWwJykuaW5wdXQoKCk9PntcXG4gICAgICAgICAgICAgICAgaWYoIXBhcnNlSW50KGlucHV0KSl7XFxuICAgICAgICAgICAgICAgICAgICBpbnB1dCA9IDcwMDA7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcHV0VmFyKCdkcC5qeFRpbWVvdXQnLGlucHV0KTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lorr7nva7kuLo6JytwYXJzZUludChpbnB1dClcXG4gICAgICAgICAgICB9LGp4VGltZW91dClcXG4gICAgICAgIH0pO1xcblxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+aJk+W8gOe8lui+keino+aekOaWh+S7ticsXFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChqeHNSb3V0ZSkgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2VkaXRGaWxlOi8vJytqeHNSb3V0ZTtcXG4gICAgICAgICAgICB9LGp4c1JvdXRlKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGZvcihsZXQgaSBpbiBNeUppZXhpLmppZXhpcyl7XFxuICAgICAgICAgICAgbGV0IG5vd0p4ID0gTXlKaWV4aS5qaWV4aXNbaV07XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6TXlKaWV4aS5ub3c9PT1ub3dKeC5uYW1lPyfwn5GJJytub3dKeC5uYW1lOm5vd0p4Lm5hbWUsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidmbGV4X2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIGV4dHJhOntcXG4gICAgICAgICAgICAgICAgICAgIG5vd0p4Om5vd0p4LFxcbiAgICAgICAgICAgICAgICAgICAgTXlKaWV4aTpNeUppZXhpLFxcbiAgICAgICAgICAgICAgICAgICAganhzUm91dGU6anhzUm91dGVcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKG5vd0p4LE15SmlleGksaSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgIGxldCBvcHRpb24gPSBnZXRWYXIoJ2RuLmp4bV9vcHRpb24nLCfpgInmi6knKTtcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAob3B0aW9uKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICflr7zlh7onOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbm93SnhDb2RlID0gYmFzZTY0RW5jb2RlKEpTT04uc3RyaW5naWZ5KG5vd0p4KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBzaGFyZVBhc3RlKG5vd0p4Q29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gJ+mtlOaWreino+aekOmFjee9rkAnK25vd0p4Lm5hbWUrJ0AnK3VybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29weShjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWvvOWHuuS4uuS6keWPo+S7pOW5tuWkjeWItuWIsOWJquWIh+advydcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICfkv67mlLknOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpZihub3dKeC5uYW1lPT09TXlKaWV4aS5ub3cpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgcmV0dXJuICd0b2FzdDovL+atpOino+aekOmFjee9ruW9k+WJjeato+WcqOS9v+eUqOS4re+8jOS4jeWFgeiuuOS/ruaUuSEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL2p4RWRpdD9ydWxlPU15RmllbGThtLDigb8nXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvanhFZGl0P3J1bGU9TXlGaWVsZOG0sOKBvydcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICfliKDpmaQnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgn56Gu6K6k5Yig6Zmk6Kej5p6Q6YWN572uOicrbm93SngubmFtZSsnPycpLmNvbmZpcm0oKG5vd0p4LE15SmlleGksaSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG5vd0p4Lm5hbWU9PT1NeUppZXhpLm5vdyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+atpOino+aekOmFjee9ruW9k+WJjeato+WcqOS9v+eUqOS4re+8jOS4jeWFgeiuuOWIoOmZpCEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmppZXhpcy5zcGxpY2UoaSwxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LliKDpmaQnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sbm93SngsTXlKaWV4aSxpLGp4c1JvdXRlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkubm93PW5vd0p4Lm5hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L2g6YCJ5oup5LqGJytub3dKeC5uYW1lKyfkvZzkuLrlvZPliY3op6PmnpDphY3nva4nO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LG5vd0p4LE15SmlleGksaSxqeHNSb3V0ZSksXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgIH1cXG4kLmV4cG9ydHMuanhNYW5hZ2U9anhNYW5hZ2U7XCJ9LHtcIm5hbWVcIjpcIuino+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B9XFxuICAgICAgICAgICAgaWYoZ2V0VmFyKCdkbi5qeG1fd3JpdGVNb2RlJywn5paw5aKeJyk9PT0n5paw5aKeJyl7XFxuICAgICAgICAgICAgICAgIGxldCBzZWxfdGl0bGUgPSB0aXRsZXMuZmlsdGVyKGl0PT4hanhzLmluY2x1ZGVzKGl0KSk7XFxuICAgICAgICAgICAgICAgIHNlbF90aXRsZSA9IHNlbF90aXRsZS5tYXAoKGl0KT0+e1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGZsYWcgPSAn4oCY4oCY4pOK4oCZ4oCZJztcXG4gICAgICAgICAgICAgICAgICAgIGlmKHR5cGVvZihqc29uLmNvZGVzW2l0XSk9PT0nZnVuY3Rpb24nKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmbGFnID0gJ+KAnOKAnOKSv+KAneKAnSc7XFxuICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZih0eXBlb2YoanNvbi5jb2Rlc1tpdF0pPT09J3VuZGVmaW5lZCcpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZsYWcgPSAnJztcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmbGFnK2l0XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJChzZWxfdGl0bGUsMikuc2VsZWN0KChNeUppZXhpLGp4cyxub3dKeCx0aXRsZSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgIGlucHV0ID0gaW5wdXQucmVwbGFjZSgv4oCY4oCY4pOK4oCZ4oCZfOKAnOKAnOKSv+KAneKAnS9nLCcnKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBpZCA9IG51bGw7XFxuICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGogaW4gTXlKaWV4aS5qaWV4aXMpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKE15SmlleGkuamlleGlzW2pdLm5hbWUgPT09IG5vd0p4Lm5hbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZCA9IGo7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGlmKCFpZCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+e0ouW8lemUmeivr+aXoOazleS/neWtmDpcXFxcbicraWRcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGp4cy5wdXNoKGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgIGxvZyhqeHMpO1xcbiAgICAgICAgICAgICAgICAgICAgbm93SnhbdGl0bGVdID0ganhzO1xcbiAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXNbaWRdID0gbm93Sng7XFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2RuLm5vd0p4JyxKU09OLnN0cmluZ2lmeShub3dKeCkpO1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LE15SmlleGksanhzLG5vd0p4LHRpdGxlLGp4c1JvdXRlKTtcXG4gICAgICAgICAgICB9ZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LHRpdGxlcyx0aXRsZSxqeHMsanhzUm91dGUsTXlKaWV4aSxub3dKeClcXG4gICAgfSk7XFxuICAgIGZvcihsZXQgayBpbiBqeHMpe1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTpqeHNba10sXFxuICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCh0aXRsZXMsdGl0bGUsanhzLGp4c1JvdXRlLE15SmlleGksbm93Sngsbmp4LGlkLGssbWF4KT0+e1xcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKGdldFZhcignZG4uanhtX3dyaXRlTW9kZScsJ+aWsOWinicpKXtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ+WIoOmZpCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgQXJyYXkucHJvdG90eXBlLnJlbW92ZSA9IGZ1bmN0aW9uKHZhbCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaW5kZXggPSB0aGlzLmluZGV4T2YodmFsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGluZGV4ID4gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc3BsaWNlKGluZGV4LCAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgICAgICAgICAganhzLnJlbW92ZShuangpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG5vd0p4W3RpdGxlXSA9IGp4cztcXG4gICAgICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmppZXhpc1tpZF0gPSBub3dKeDtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2RuLm5vd0p4JyxKU09OLnN0cmluZ2lmeShub3dKeCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAn56e75YqoJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChrLCfnp7vliqjliLDntKLlvJXlpJrlsJE/JykuaW5wdXQoKGssbWF4LGp4cyxub3dKeCxNeUppZXhpLGlkLHRpdGxlLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBNb3ZlKGFyciwgZnJvbUluZGV4LCB0b0luZGV4KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZWxlbWVudCA9IGFycltmcm9tSW5kZXhdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJyLnNwbGljZShmcm9tSW5kZXgsIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJyLnNwbGljZSh0b0luZGV4LCAwLCBlbGVtZW50KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihwYXJzZUludChpbnB1dCk9PT1rKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/llaXkuZ/msqHlgZonXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKHBhcnNlSW50KGlucHV0KT5tYXgtMXx8cGFyc2VJbnQoaW5wdXQpPC0xKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kvaDmnIDlpKfnp7vliqjojIPlm7QwLScrcGFyc2VJbnQobWF4LTEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxldCBuZXdBciA9IGp4cy5zcGxpY2UoaywgMSk7IC8vIOWIoOaOiVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBqeHMudW5zaGlmdChuZXdBclswXSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1vdmUoanhzLGsscGFyc2VJbnQoaW5wdXQpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm93SnhbdGl0bGVdID0ganhzO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmppZXhpc1tpZF0gPSBub3dKeDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkbi5ub3dKeCcsSlNPTi5zdHJpbmdpZnkobm93SngpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LGssbWF4LGp4cyxub3dKeCxNeUppZXhpLGlkLHRpdGxlLGp4c1JvdXRlKVxcbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5q2k5YWD57Sg5LiN5pSv5oyB6L+b6KGMOicrZ2V0VmFyKCdkbi5qeG1fd3JpdGVNb2RlJywn5paw5aKeJylcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sdGl0bGVzLHRpdGxlLGp4cyxqeHNSb3V0ZSxNeUppZXhpLG5vd0p4LGp4c1trXSxpZCxrLGp4cy5sZW5ndGgpXFxuICAgICAgICB9KTtcXG4gICAgfVxcbiAgICBkLnB1c2goe1xcbiAgICAgICAgY29sX3R5cGU6J2xpbmUnXFxuICAgIH0pXFxufV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yzmnaXkuIDku73pgZPplb/nmoQnLCcjNUZCODc4JyksXFxuICAgIGRlc2M6J+iHquWKqOaLieWPlumBk+mVv+WcqOeUqOeahOS4pOS4qk15UGFyc2UuanNvbuaWh+S7ticsXFxuICAgIGNvbF90eXBlOid0ZXh0XzEnLFxcbiAgICB1cmw6JCgn56Gu6K6k5ZCXP+WmguaenOS9oOS4jeaYr+Wwj+eZve+8jOaAu+ivpeS8muaPkOWJjeWkh+S7veiHquW3seeahOmFjee9ruaWh+S7tuWQpyFcXFxcbicrb2xkUm91dGUrJ1xcXFxuJytuZXdSb3V0ZSkuY29uZmlybSgob2xkUm91dGUsb2xkT25saW5lLG5ld1JvdXRlLG5ld09ubGluZSk9PntcXG4gICAgICAgIGxldCBvbGRDb2RlID0gZmV0Y2gob2xkT25saW5lKTtcXG4gICAgICAgIGxldCBuZXdDb2RlID0gZmV0Y2gobmV3T25saW5lKTtcXG4gICAgICAgIGlmKCEvUGFyc2VfRG5cXFxcLmpzLy50ZXN0KG9sZENvZGUpfHwhL1BhcnNlX0RuXFxcXC5qcy8udGVzdChuZXdDb2RlKSl7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+Wksei0pSHkuI7pgZPplb/mnI3liqHlmajpgJrorq/plJnor68s5Lyw6K6h5piv572R57uc5Y2h5LqGJ1xcbiAgICAgICAgfVxcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICB3cml0ZUZpbGUob2xkUm91dGUsIG9sZENvZGUpO1xcbiAgICAgICAgICAgIHdyaXRlRmlsZShuZXdSb3V0ZSwgbmV3Q29kZSk7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aWreaPkuino+aekOmFjee9ruWPium7mOiupOWIl+ihqOW3sue7j+mFjee9ruaIkOWKnydcXG4gICAgICAgIH1cXG4gICAgICAgIGNhdGNoKGUpe1xcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/phY3nva7lupTnlKjlpLHotKVcXFxcbuacquacn+ac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GluZSk7XFxuICAgICAgICBpZighL2ppZXhpcy8udGVzdChqeENvZGUpKXtcXG4gICAgICAgICAgICAvLyBsb2coJ2p4Q29kZTonK2p4Q29kZSk7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+Wksei0pSHkuI7pgZPplb/mnI3liqHlmajpgJrorq/plJnor68s5Lyw6K6h5piv572R57uc5Y2h5LqGJ1xcbiAgICAgICAgfVxcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICB3cml0ZUZpbGUoY2pjYWNoZSwgY2pGaWxlKTsgLy8g5ouJ5o+S5Lu2XFxuICAgICAgICAgICAgd3JpdGVGaWxlKHg1Y2FjaGUsIHg1RmlsZSk7IC8v5ouJ572R6aG15paH5Lu2XFxuICAgICAgICAgICAgd3JpdGVGaWxlKHRoZW1lUm91dGUsIHRoZW1lQ29kZSk7IC8v5ouJ5Li76aKY5paH5Lu2XFxuICAgICAgICAgICAgY2xlYXJWYXIoXFxcImp4T2xkVlxcXCIpO1xcbiAgICAgICAgICAgIGNsZWFyVmFyKFxcXCJqeE5ld1ZcXFwiKTtcXG4gICAgICAgICAgICB3cml0ZUZpbGUob2xkUm91dGUsIG9sZENvZGUpOyAvL+aLieaWreaPkum7mOiupOmAieaLqeeVjOmdoueahOmFjee9rlxcbiAgICAgICAgICAgIHdyaXRlRmlsZShuZXdSb3V0ZSwgbmV3Q29kZSk7IC8v5ouJ5pat5o+S5YaF55qE6Kej5p6QXFxuICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLCBqeENvZGUpOyAvLyDmi4noh6rliqjmoaPmlofku7ZcXG4gICAgICAgICAgICBiYWNrKHRydWUpO1xcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mlq3mj5Lop6PmnpDphY3nva7lj4rpu5jorqTliJfooajlt7Lnu4/phY3nva7miJDlip8nXFxuICAgICAgICB9XFxuICAgICAgICBjYXRjaChlKXtcXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5LiA6ZSu5qih5byP5bqU55So5aSx6LSlXFxcXG7mnKrmnJ/mnJvnmoTplJnor686JytlLm1lc3NhZ2U7XFxuICAgICAgICB9XFxuICAgIH0sY2pjYWNoZSx4NWNhY2hlLHRoZW1lUm91dGUsb2xkUm91dGUsbmV3Um91dGUsanhzUm91dGUsdGhlbWVPbmxpbmUsb2xkT25saW5lLG5ld09ubGluZSxqeE9ubGluZSlcXG59KTtcXG5sZXQgZGVzY0luZm8gPSAn5Li76aKY5paH5Lu2OicrdGhlbWVSb3V0ZSsnXFxcXG7kuLvnlYzpnaLphY3nva46JytvbGRSb3V0ZSsnXFxcXG7lq5bliLDnmoTop6PmnpA6JytuZXdSb3V0ZSsnXFxcXG7oh6rliqjmoaPop6PmnpA6JytqeHNSb3V0ZTtcXG5kZXNjSW5mbys9J1xcXFxu5Li75o+S5Lu2OicrY2pjYWNoZSsnXFxcXG7kuLvphY3nva7pgInmi6nnlYzpnaLmlofku7Y6Jyt4NWNhY2hlO1xcbmQucHVzaCh7XFxuICAgIHRpdGxlOifmlofku7bmj4/ov7A6XFxcXG4nK2Rlc2NJbmZvLFxcbiAgICBjb2xfdHlwZTonbG9uZ190ZXh0JyxcXG4gICAgZXh0cmE6e3RleHRTaXplOiAxMyxsaW5lVmlzaWJsZTpmYWxzZX1cXG59KTtcXG5zZXRSZXN1bHQoZCk7XCJ9XSIsImljb24iOiJodHRwczovL2xhbm1laWd1b2ppYW5nLmNvbS90dWJpYW8vbW92aWUvNC5zdmcifQ==
Add Comment
Please, Sign In to add comment