Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@MyFieldᴰⁿ@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiTXlGaWVsZOG0sOKBvyIsImF1dGhvciI6IuaWreW/tSbpgZPplb/prZTmlLkiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IiwidmVyc2lvbiI6MzczLCJjb2xfdHlwZSI6InRleHRfY2VudGVyXzEiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6Im90aGVyIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG4vL2xvZyhNT0JJTEVfVUEpO1xuY29uc3Qge2RlbW9EYXRhLGRlZmF1bHRTZXRzLGZsb29yc30gPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvZGVtb0RhdGE/cnVsZT1NeUZpZWxk4bSw4oG/XCIpO1xuY29uc3Qge2dldE9uZSx1bmlxdWUyLGR1cGxpY2F0ZXN9ID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL3V0aWxzP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbmxldCBzalRlc3QgPVtdO2ZvcihsZXQgaSBpbiBkZW1vRGF0YSl7c2pUZXN0PXNqVGVzdC5jb25jYXQoZGVtb0RhdGFbaV0pfVxudGhpcy5kID0gW107XG5jb25zdCBqeEl0ZW0gPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvanhJdGVtP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbnZhciBSb3V0ZSA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS9Sb3V0ZT9ydWxlPU15RmllbGThtLDigb9cIik7XG5ldmFsKGdldEl0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H1cbiAgICAgICAgcmV0dXJuICQoKS5sYXp5UnVsZSgocGxheVVybCx1cmwpPT57XG4gICAgICAgICAgICBsZXQgdGl0bGUgPSBnZXRJdGVtKFwic2VsZWN0ZWQwXCIsIFwiJiZcIikuc3BsaXQoXCImJlwiKVswXS5yZXBsYWNlKC/wn5GJL2csJycpO1xuICAgICAgICAgICAgbG9nKCd0aXRsZTonK3RpdGxlKTtcbiAgICAgICAgICAgIGlmKGdldEl0ZW0oJ2RuLnRlc3RfbW9kZScpPT09J+aWreaPkicmJiEvXuS4jemAiSR8XumtlOaWrSQvLnRlc3QodGl0bGUpKXtcbiAgICAgICAgICAgICAgICBldmFsKFwidmFyIGNvbmZpZyA9XCIgKyBmZXRjaChcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlQYXJzZVNldC5qc29uXCIpKTtcbiAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xuICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGdldEl0ZW0oXCJzZWxlY3RlZDBcIiwgXCImJlwiKS5zcGxpdChcIiYmXCIpWzBdLnJlcGxhY2UoL/CfkYkvZywnJykucmVwbGFjZSgv5LiN6YCJL2csJycpO1xuICAgICAgICAgICAgICAgIGxvZygn5byA5aeL6LCD55So5pat5o+S5rWL6K+VLG15RmlsZWTotoXml7bkuLo6JytnZXRJdGVtKCdkbi50aW1lb3V0JywnNTAwMCcpKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHVybCx0aXRsZSxwYXJzZUludChnZXRJdGVtKCdkbi50aW1lb3V0JywnNTAwMCcpKSk7XG4gICAgICAgICAgICB9ZWxzZSBpZihnZXRJdGVtKCdkbi50ZXN0X21vZGUnKT09PSfmlq3mj5InJiYvXumtlOaWrSQvLnRlc3QodGl0bGUpKXtcbiAgICAgICAgICAgICAgICBldmFsKFwidmFyIGNvbmZpZyA9XCIgKyBmZXRjaChcImhpa2VyOi8vZmlsZXMvY2FjaGUvT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l6L+b6KGM55u06ZO+6Kej5p6QXCI7XG4gICAgICAgIH1lbHNlIGlmKGlucHV0PT09J+mtlOaWrScpe1xuICAgICAgICAgICAgc2V0SXRlbShcInNlbGVjdGVkXCIsICcnKTtcbiAgICAgICAgICAgIHNldEl0ZW0oXCJzZWxlY3RlZDBcIiwgaW5wdXQgKyBcIiYmXCIgKyAnJyk7XG4gICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XG4gICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+W3suiuvue9ruS4uumtlOaWreino+aekO+8jOWPr+ebtOaOpeinpuWPkeWkh+iDjuaooeW8j1wiO1xuICAgICAgICB9XG4gICAgICAgIGxldCBpID0gcmVhbFRpdGxlcy5pbmRleE9mKGlucHV0KTtcbiAgICAgICAgbGV0IHVybCA9IHVybEFycltpXTtcbiAgICAgICAgbG9nKFwiXFxu5pu05pS55o6l5Y+jPiBcIiArIHVybCk7XG4gICAgICAgIGlmKHR5cGVvZih1cmwpIT09J3N0cmluZycpe1xuICAgICAgICAgICAgbG9nKCQudG9TdHJpbmcodXJsKSk7XG4gICAgICAgICAgICBzZXRJdGVtKFwic2VsZWN0ZWRcIiwgJC50b1N0cmluZyh1cmwpKTtcbiAgICAgICAgICAgIC8vIHJldHVybiAndG9hc3Q6Ly/mmoLkuI3mlK/mjIHmlq3mj5JmdW5jdGlvbuezu+WIl+eahOmrmOe6p+ino+aekOa1i+ivlSdcbiAgICAgICAgfWVsc2V7XG4gICAgICAgICAgICBzZXRJdGVtKFwic2VsZWN0ZWRcIiwgdXJsKTtcbiAgICAgICAgfVxuICAgICAgICBzZXRJdGVtKFwic2VsZWN0ZWQwXCIsIGlucHV0ICsgXCImJlwiICsgdXJsKTtcbiAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xuICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+WIh+aNouino+aekOWPo+S4ujpcIitpbnB1dDtcbiAgICB9LCByZWFsVGl0bGVzLHVybEFy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HtcbiAgICB0aXRsZTon8J+TsuWvvOWHulRYVCcsXG4gICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxuICAgIHVybDokKCfnoa7orqTlr7zlh7rmnKzlnLDmmI7mlofkuJTlpI3liLbkupHliarliIfmnb8/XFxu5Y+v5a6M576O5a+85Ye65ZCN56ew5Zyw5Z2A55qE6YCa55So6KeE5YiZLOWvuWZ1bmN0aW9u57G75YW85a655pqC5pe25LiN5piv5b6I5aW9JykuY29uZmlybSgodGl0bGVBcnIsdXJsQXJyKT0+e1xuICAgICAgICAvL3VybEFycj11cmxBcnIuc2xpY2UoMik7XG4gICAgICAgIHRpdGxlQXJyPXRpdGxlQXJyLmZpbHRlcihpdD0+IS/kuI3pgIl86a2U5patLy50ZXN0KGl0KSk7XG4gICAgICAgIGxldCBtb2RlID0gZ2V0SXRlbSgnZG4udGVzdF9tb2RlJywnUeelnicpO1xuICAgICAgICBpZihtb2RlPT09J+aWreaPkid8fG1vZGU9PT0nUeelnicpe1xuICAgICAgICAgICAgbGV0IGp4Q29kZSA9IFtdO1xuICAgICAgICAgICAgdGl0bGVBcnIuZm9yRWFjaCgoaXQpID0+IHtcbiAgICAgICAgICAgICAgICBsZXQgaSA9IHRpdGxlQXJyLmluZGV4T2YoaXQpO1xuICAgICAgICAgICAgICAgIGxldCBjb2RlID0gdXJsQXJyW2ldO1xuICAgICAgICAgICAgICAgIGxldCBvdXRDb2RlID0gKHR5cGVvZihjb2RlKT09PSdzdHJpbmcnfHx0eXBlb2YoY29kZSk9PT0ndW5kZWZpbmVkJyk/Y29kZTpiYXNlNjRFbmNvZGUoY29kZS50b1N0cmluZygpKTtcbiAgICAgICAgICAgICAgICBsZXQgb3V0VGl0bGUgPSBpdC5yZXBsYWNlKC/wn5GJL2csJycpO1xuICAgICAgICAgICAgICAgIGlmKG91dFRpdGxlLnN0YXJ0c1dpdGgoJ2h0dHAnKSYmKHR5cGVvZihvdXRDb2RlKT09PSd1bmRlZmluZWQnfHwhb3V0Q29kZSkpe1xuICAgICAgICAgICAgICAgICAgICBqeENvZGUucHVzaChvdXRUaXRsZSsnLCcrb3V0VGl0bGUpO1xuICAgICAgICAgICAgICAgIH1lbHNle1xuICAgICAgICAgICAgICAgICAgICBqeENvZGUucHVzaChvdXRUaXRsZSsnLCcrb3V0Q29kZXx8JycpXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBsZXQgb3V0VGV4dCA9IGp4Q29kZS5qb2luKCdcXG4nKTtcbiAgICAgICAgICAgIGxldCBvdXRQYXRoID0gJ2hpa2VyOi8vZmlsZXMvcnVsZXMvRHVhbk5pYW4vTXlQYXJzZU91dF8nK21vZGUrJy50eHQnO1xuICAgICAgICAgICAgd3JpdGVGaWxlKG91dFBhdGgsb3V0VGV4dCk7XG4gICAgICAgICAgICBsZXQgcGFzdGVzID0gZ2V0UGFzdGVzKCk7XG4gICAgICAgICAgICBsZXQgaW1wb3J0VXJsID0gc2hhcmVQYXN0ZShiYXNlNjRFbmNvZGUob3V0VGV4dCkscGFzdGVzWzFdKTtcbiAgICAgICAgICAgIGxldCBpbXBvcnRDb2RlID0gJ+mtlOaWreino+aekOWvvOWFpeWPo+S7pMKlwqUnK2ltcG9ydFVybDtcbiAgICAgICAgICAgIGNvcHkoaW1wb3J0Q29kZSk7XG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5paH5Lu25bey5a+85Ye65YiwOicrb3V0UGF0aCsnXFxu6K+36Ieq6KGM6YCa6L+HTVTnrqHnkIblmajmn6XnnIsnXG4gICAgICAgIH1lbHNle1xuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aIkeS4jea4healmuS9oOimgeWBmuS7gOS5iD9cXG4nK21vZGU7XG4gICAgICAgIH1cbiAgICB9LHRpdGxlQXJyLHVybEFyciksXG59KTtcbmQucHVzaCh7XG4gICAgdGl0bGU6J/Cfk6Xlr7zlhaVUWFQnLFxuICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcbiAgICB1cmw6JCgpLnJ1bGUoKCk9PntcbiAgICAgICAgbGV0IGQgPSBbXTtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiflr7zlhaXor7TmmI4nLFxuICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfMScsXG4gICAgICAgICAgICBkZXNjOifmlK/mjIHmraTmj5Lku7blr7zlh7rmoLzlvI/nmoTmlofmnKzov5vooYzlr7zlhaXjgIJcXG7moLzlvI8xOiDlkI3np7As5Zyw5Z2AIOS4gOihjOS4gOS4quino+aekFxcbuagvOW8jzI65LqR5Ymq5YiH5p2/IOmtlOaWreino+aekOWvvOWFpeWPo+S7pMKlwqXliarliIfmnb/lnLDlnYAnLFxuICAgICAgICAgICAgdXJsOidoaWtlcjovL2VtcHR5J1xuICAgICAgICB9KTtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIGRlc2M6IFwidHh05paH5pys6Kej5p6Q6KeE5YiZLOS4gOihjOS4gOS4qlwiLFxuICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXG4gICAgICAgICAgICB0aXRsZTon6Kej5p6Q5paH5pysJyxcbiAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldFZhcignZG4uaW1wb3J0X3RleHQnLCAnJyksXG4gICAgICAgICAgICAgICAgdHlwZTogXCJ0ZXh0YXJlYVwiLFxuICAgICAgICAgICAgICAgIGhlaWdodDotMSxcbiAgICAgICAgICAgICAgICBvbkNoYW5nZTogJ3B1dFZhcihcImRuLmltcG9ydF90ZXh0XCIsaW5wdXQpJ1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOifwn5Ol5a+85YWlJyxcbiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0X2NlbnRlcl8xJyxcbiAgICAgICAgICAgIHVybDokKCfnoa7lrprnvJbovpHlpb3kuoblkJc/5q2k5pON5L2c5bCG6KaG55uW5pys5Zyw5bey5pyJ55qE6K6w5b2V77yM5bu66K6u5aSH5Lu95ZCO55So56m65paH5Lu25a+85YWlJykuY29uZmlybSgoKT0+e1xuICAgICAgICAgICAgICAgIGNvbnN0IHtkZWZhdWx0U2V0c30gPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvZGVtb0RhdGE/cnVsZT1NeUZpZWxk4bSw4oG/XCIpO1xuICAgICAgICAgICAgICAgIGxldCBwYXJzZVJvdXRlID0gJ2hpa2VyOi8vZmlsZXMvcnVsZXMvRHVhbk5pYW4vTXlQYXJzZS5qc29uJztcbiAgICAgICAgICAgICAgICBsZXQganNDb2RlID0gZmV0Y2gocGFyc2VSb3V0ZSl8fEpTT04uc3RyaW5naWZ5KHt0aXRsZTpbXSxjb2Rlczp7fSxzZXR0aW5nczpkZWZhdWx0U2V0c30pO1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsganNDb2RlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WPkeeUn+mUmeivrzpcXG4nK2UubWVzc2FnZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQgdG9JbXBvcnQgPSBnZXRWYXIoXCJkbi5pbXBvcnRfdGV4dFwiKTtcbiAgICAgICAgICAgICAgICBpZigv6a2U5pat6Kej5p6Q5a+85YWl5Y+j5LukwqXCpS8udGVzdCh0b0ltcG9ydCkmJnRvSW1wb3J0LnNwbGl0KCfCpcKlJykubGVuZ3RoPjEpe1xuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gdG9JbXBvcnQuc3BsaXQoJ8KlwqUnKVsxXTtcbiAgICAgICAgICAgICAgICAgICAgaWYoIS9eaHR0cC8udGVzdCh1cmwpKXtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/liarliIfmnb/lnLDlnYDmnInor68s5a+85YWl5aSx6LSlJ1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRvSW1wb3J0ID0gcGFyc2VQYXN0ZSh1cmwpO1xuICAgICAgICAgICAgICAgICAgICB0b0ltcG9ydCA9IGJhc2U2NERlY29kZSh0b0ltcG9ydCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxldCBqaWV4aSA9IHRvSW1wb3J0LnNwbGl0KCdcXG4nKS5maWx0ZXIoaXQ9Pml0LnRyaW0oKSk7XG4gICAgICAgICAgICAgICAgbGV0IHBhcnNlVGl0bGUgPSBbXTtcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VDb2RlID0ge307XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSBpbiBqaWV4aSkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGU9amlleGlbaV0uc3BsaXQoJywnKVswXTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGU9amlleGlbaV0uc3BsaXQoJywnKVsxXTtcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VUaXRsZS5wdXNoKHRpdGxlKTtcbiAgICAgICAgICAgICAgICAgICAgaWYoIShjb2RlLnJlcGxhY2UoL1tcXHNdL2csJycpLnN0YXJ0c1dpdGgoJ2h0dHAnKSkpe1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKHRpdGxlKyfkuLrlh73mlbDop6PmnpAnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNvZGUucmVwbGFjZSgvW1xcc10vZywnJykubGVuZ3RoPjIwKXsvL+inhuS4umZ1bmN0aW9uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29kZSA9IGV2YWwoYmFzZTY0RGVjb2RlKGNvZGUpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKGNvZGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1jYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlID0gZS5tZXNzYWdlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGVbdGl0bGVdPWNvZGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxldCBzY09iamVjdCA9IFtcIkNpdHlJUFwiLCBcInBjVUFcIiwgXCJjYWNoZU0zdThcIiwgXCJkZWZhdWx0UGFyc2VXZWJcIixcIm1hb3NzXCIsIFwiTExRXCJdO1xuICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUgPSBwYXJzZVRpdGxlP3BhcnNlVGl0bGUuZmlsdGVyKGl0PT4hc2NPYmplY3QuaW5jbHVkZXMoaXQpKTpbXTtcbiAgICAgICAgICAgICAgICB2YXIgbmV3UGFyc2VUaXRsZSA9IGpzb24udGl0bGUuY29uY2F0KHBhcnNlVGl0bGUpO1xuICAgICAgICAgICAgICAgIGpzb24udGl0bGUgPSBBcnJheS5mcm9tKG5ldyBTZXQobmV3UGFyc2VUaXRsZSkpO1xuICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24oanNvbi5jb2RlcywgcGFyc2VDb2RlKTtcbiAgICAgICAgICAgICAgICBsZXQgbmV3RmlsZSA9ICQuc3RyaW5naWZ5KGpzb24pOyAvL0pTT04ucGFyc2XkvJrmiqXplJlcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUocGFyc2VSb3V0ZSwgbmV3RmlsZSk7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AgICBmbGFnc1tvbmVdID0gbXlGbG9vcnNbMF07XG4gICAgICAgICAgICAgICAgICAgICAgICBteUZsb29ycy5zcGxpY2UoMCwgMSk7Ly/liKDpmaTmoIflv5fliJfooajph4znmoTnrKzkuIDkuKrlhYPntKBcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBmdGxpc3QucHVzaCh7a2V5OiBmbGFnc1tvbmVdICsgaiwgdmFsdWU6IG9uZX0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGZ0bGlzdC5wdXNoKHtrZXk6IGosIHZhbHVlOiBvbmV9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9Y2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICBsb2coZS5tZXNzYWdlKVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8vIGxvZyhKU09OLnN0cmluZ2lmeShmbGFncykpO1xuICAgICAgICBsZXQgbmV3Q29kZXMgPSB7fTtcbiAgICAgICAgZm9yKGxldCBrIGluIGZ0bGlzdCl7XG4gICAgICAgICAgICBuZXdDb2Rlc1tmdGxpc3Rba10ua2V5XSA9IGZ0bGlzdFtrXS52YWx1ZTtcbiAgICAgICAgfVxuICAgICAgICBsZXQgdGlwcyA9ICfmo4DmtYvliLDlkI3np7DlpI3nlKjpobnnm67mlbA6JytrZXlzX3JlX2N0Kycs5Luj56CB6YeN5aSN6aG555uu5pWw6YePOicrdmFsdWVfcmVfY3QrJ1xcbumcgOimgeS4gOmUruaJk+S4quagh+ivhuWQlz/kuI3mlK/mjIHoh6rliqjliKDpmaQs5omT5qCH5b+X6Ieq6KGM6Kej5YazJztcbiAgICAgICAgcmV0dXJuICQodGlwcykuY29uZmlybSgodmFsdWVfcmVfY3QsanNvbixuZXdDb2RlcyxwYXJzZVJvdXRlKT0+e1xuICAgICAgICAgICAgaWYodmFsdWVfcmVfY3Q8MSl7XG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aXoueEtumDveaYrzDkuKrph43lpI3pobnnm67kuobvvIzlsLHkuI3pnIDopoHmiJHlgZrku4DkuYjkuoYhJ1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY29tcGFyZSgpe1xuICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbiAoYSwgYil7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHtmbG9vcnN9ID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL2RlbW9EYXRhP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHggPSBhLnN1YnN0cmluZygwLDEpO1xuICAgICAgICAgICAgICAgICAgICBsZXQgeSA9IGIuc3Vic3RyaW5nKDAsMSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmbG9vcnMuaW5kZXhPZih5KS1mbG9vcnMuaW5kZXhPZih4KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBqc29uLmNvZGVzID0gbmV3Q29kZXM7XG4gICAgICAgICAgICBsZXQgdGl0bGVzID0gT2JqZWN0LmtleXMobmV3Q29kZXMpO1xuICAgICAgICAgICAgdGl0bGVzID0gdGl0bGVzLnNvcnQoY29tcGFyZSgpKTtcbiAgICAgICAgICAgIGpzb24udGl0bGUgPSB0aXRsZXM7XG4gICAgICAgICAgICB2YXIgbmV3RmlsZSA9ICQuc3RyaW5naWZ5KGpzb24pOyAvL0pTT04ucGFyc2XkvJrmiqXplJlcbiAgICAgICAgICAgIHdyaXRlRmlsZShwYXJzZVJvdXRlLCBuZXdGaWxlKTtcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LkuIDplK7miZPkuIrmoIflv5cnO1xuICAgICAgICB9LHZhbHVlX3JlX2N0LGpzb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mV0aWNhLCBBcmlhbCxzYW5zLXNlcmlmLCBGcmVlU2FucywgQXJpbW87XFxuICAgICAgICB9XFxuICAgICAgICAjYXBwe1xcbiAgICAgICAgICAgIG1hcmdpbi10b3A6LTEwcHg7XFxuICAgICAgICB9XFxuICAgICAgICAjdGlwc3tcXG4gICAgICAgICAgICBtYXJnaW4tdG9wOi0xMHB4O1xcbiAgICAgICAgICAgIG1hcmdpbi1ib3R0b206NXB4O1xcbiAgICAgICAgfVxcbiAgICAgICAgLmZ1bmd7XFxuICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXJcXG4gICAgICAgIH1cXG4gICAgICAgIGRpdi5ib3gge1xcbiAgICAgICAgICAgIG1hcmdpbi10b3A6LTFweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQzcHg7XFxuICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDIwcHg7XFxuICAgICAgICB9XFxuICAgICAgICAvKui+k+WFpeahhuWwuuWvuCovXFxuICAgICAgICBmb3JtIHtcXG4gICAgICAgICAgICBiYWNrZ3JvdW5kOiB0cmFuc3BhcmVudDtcXG4gICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7XFxuICAgICAgICAgICAgd2lkdGg6IDEwMCU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBpbnB1dCwgbGFiZWwsIHNlbGVjdCB7XFxuICAgICAgICAgICAgYm9yZGVyOiBub25lO1xcbiAgICAgICAgICAgIG91dGxpbmU6IG5vbmU7XFxuICAgICAgICB9XFxuICAgICAgICAvKuWtl+S9k+S9jee9riovXFxuICAgICAgICBpbnB1dCB7XFxuICAgICAgICAgICAgd2lkdGg6IDc3JTtcXG4gICAgICAgICAgICBoZWlnaHQ6IDMycHg7XFxuICAgICAgICAgICAgcGFkZGluZy1sZWZ0OiA2NnB4O1xcbiAgICAgICAgICAgIHBhZGRpbmctcmlnaHQ6IDBweDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGxhYmVsIHtcXG4gICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjtcXG4gICAgICAgICAgICBsaW5lLWhlaWdodDogNDNweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQwcHg7XFxuICAgICAgICAgICAgd2lkdGg6IDYwcHg7XFxuICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIC8q5bCP5qGGKi9cXG4gICAgICAgIC5iYXIgbGFiZWwge1xcbiAgICAgICAgICAgIC8qYmFja2dyb3VuZDogI0QwNkI2QzsqL1xcbiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDVweCA1NTVweCA1NTVweCA1cHg7XFxuICAgICAgICAgICAgd2lkdGg6IDYwcHg7XFxuICAgICAgICAgICAgZm9udC1zaXplOiAxM3B4O1xcbiAgICAgICAgICAgIHRvcDogMDtcXG4gICAgICAgICAgICBsZWZ0OiAzcHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICAvKui+k+WFpeahhuagt+W8jyovXFxuICAgICAgICAuYmFyIGlucHV0IHtcXG4gICAgICAgICAgICAvKmJvcmRlci1yYWRpdXM6IDVweCA1NTVweCA1NTVweCA1cHg7XFxuICAgICAgICAgICAgICovXFxuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNHB4O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgLyrliJfooagqL1xcbiAgICAgICAgc2VsZWN0IHtcXG4gICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjtcXG4gICAgICAgICAgICBsaW5lLWhlaWdodDo0MHB4O1xcbiAgICAgICAgICAgIGhlaWdodDogNDBweDtcXG4gICAgICAgICAgICB3aWR0aDogMjBweDtcXG4gICAgICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XFxuICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgLyrliJfooagqL1xcbiAgICAgICAgLmxpZWIgc2VsZWN0e1xcbiAgICAgICAgICAgIC8qYm9yZGVyLXJhZGl1czogNHB4OyovXFxuICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogNTU1cHggNXB4IDVweCA1NTVweDtcXG4gICAgICAgICAgICB3aWR0aDogODBweDtcXG4gICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjtcXG4gICAgICAgICAgICBmb250LXNpemU6IDEzcHg7XFxuICAgICAgICAgICAgdG9wOiAwO1xcbiAgICAgICAgICAgIHJpZ2h0OiAycHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICAvKuWktOWDjyovXFxuICAgICAgICAucm91bmRfaWNvbntcXG4gICAgICAgICAgICB3aWR0aDogNDBweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQwcHg7XFxuICAgICAgICAgICAgZGlzcGxheTogZmxleDtcXG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA1MCU7XFxuICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcXG4gICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcXG4gICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xcbiAgICAgICAgfVxcbiAgICA8L3N0eWxlPlxcbjwvaGVhZD5cXG48Ym9keT5cXG48ZGl2IGNsYXNzPVxcXCJmdW5nXFxcIj5cXG4gICAgPGEgc3R5bGU9XFxcImZsb2F0OmxlZnQ7XFxcIj5cXG4gICAgICAgIDxidXR0b24gIDpzdHlsZT1cXFwiJ2JvcmRlcjogbm9uZTtib3JkZXItcmFkaXVzOjEwcHg7YmFja2dyb3VuZDogJyt0aGVtZXMuY2xvc2VCdG4uYmFja2dyb3VuZCsnO3dpZHRoOiA4MHB4OyBmb250LXNpemU6IDE4cHg7Y29sb3I6ICcrdGhlbWVzLmNsb3NlQnRuLmNvbG9yXFxcIiBvbmNsaWNrPVxcXCJjYW5jZWwoKTtcXFwiPuWFsyD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LnRpdGxlLmZpbHRlcihjb21wYXJlKHljVGl0bGUpKTtcXG4gICAgICAgIC8vIG15U2VsZWN0ID0gbXlTZWxlY3QubWFwKChpdCk9PntcXG4gICAgICAgIC8vICAgICBsZXQgZmxhZyA9ICfik4onO1xcbiAgICAgICAgLy8gICAgIGlmKHR5cGVvZihuZXdDb25maWcuY29kZXNbaXRdKT09PSdmdW5jdGlvbicpe1xcbiAgICAgICAgLy8gICAgICAgICBmbGFnID0gJ+KSvyc7XFxuICAgICAgICAvLyAgICAgfWVsc2UgaWYodHlwZW9mKG5ld0NvbmZpZy5jb2Rlc1tpdF0pPT09J3VuZGVmaW5lZCcpe1xcbiAgICAgICAgLy8gICAgICAgICBmbGFnID0gJyc7XFxuICAgICAgICAvLyAgICAgfVxcbiAgICAgICAgLy8gICAgIHJldHVybiBmbGFnK2l0XFxuICAgICAgICAvLyB9KTtcXG4gICAgfVxcbiAgICAvL2ZiYS5sb2coSlNPTi5zdHJpbmdpZnkobXlTZWxlY3QpKTtcXG5cXG4gICAgbGV0IG9wdGlvbnMgPSBbXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon54ix5aWH6Im6JyxcXG4gICAgICAgICAgICBpZDoncXknLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnF5LFxcbiAgICAgICAgICAgIHBsYWNlaG9sZGVyOiforr7nva7niLHlpYfoibonXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+S8mOmFtycsXFxuICAgICAgICAgICAgaWQ6J3lrJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy55a1xcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifohb7orq8nLFxcbiAgICAgICAgICAgIGlkOid0eCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MudHhcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon6IqS5p6cJyxcXG4gICAgICAgICAgICBpZDonbWcnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLm1nXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+WTlOWTqeWTlOWTqScsXFxuICAgICAgICAgICAgaWQ6J2JsJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5ibFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifmkJzni5AnLFxcbiAgICAgICAgICAgIGlkOidzaCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3Muc2hcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon6KW/55OcJyxcXG4gICAgICAgICAgICBpZDoneGcnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnhnXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+mYv+mHjCcsXFxuICAgICAgICAgICAgaWQ6J2FsJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5hbFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOidQUFRWJyxcXG4gICAgICAgICAgICBpZDoncHAnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnBwXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+WSquWSlScsXFxuICAgICAgICAgICAgaWQ6J21pJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5taVxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifkuZDop4YnLFxcbiAgICAgICAgICAgIGlkOidsZScsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MubGVcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTonMTkwNScsXFxuICAgICAgICAgICAgaWQ6J29uZScsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3Mub25lXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+mjjuihjCcsXFxuICAgICAgICAgICAgaWQ6J2Z1bicsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MuZnVuXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+WFtuS7licsXFxuICAgICAgICAgICAgaWQ6J290aCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3Mub3RoXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+WFqOWxgCcsXFxuICAgICAgICAgICAgaWQ6J3FqdScsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MucWp1XFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+aPkuS7ticsXFxuICAgICAgICAgICAgaWQ6J2NqJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5jalxcbiAgICAgICAgfSxcXG4gICAgXTtcXG5cXG4gICAgZnVuY3Rpb24gRGlkKGlkKXtcXG4gICAgICAgIHJldHVybiBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChpZCk7XFxuICAgIH1cXG4gICAgZnVuY3Rpb24gZ2V0T3B0aW9uKGlkLHRpdGxlKSB7XFxuICAgICAgICB2YXIgb2JqID0gRGlkKGlkKTtcXG4gICAgICAgIERpZCh0aXRsZSkudmFsdWUgPSBvYmoub3B0aW9uc1tvYmouc2VsZWN0ZWRJbmRleF0udGV4dDtcXG4gICAgICAgIC8vIERpZCh0aXRsZSkudmFsdWUgPSBvYmoub3B0aW9uc1tvYmouc2VsZWN0ZWRJbmRleF0udGV4dC5yZXBsYWNlKC/ik4p84pK/L2csJycpO1xcbiAgICB9XFxuICAgIGZ1bmN0aW9uIHJlc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ICAgICAgIGZvcihsZXQga2V5IGluIHNldHRpbmdzKXtcXG4gICAgICAgICAgICAgICAgLy8gZmJhLmxvZyhEaWQoa2V5KSsnJytrZXkpO1xcbiAgICAgICAgICAgICAgICB0cnl7XFxuICAgICAgICAgICAgICAgICAgICAvL3NldHRpbmdzW2tleV0gPSBEaWQoa2V5KS52YWx1ZS5yZXBsYWNlKC/ik4p84pK/L2csJycpO1xcbiAgICAgICAgICAgICAgICAgICAgc2V0dGluZ3Nba2V5XSA9IERpZChrZXkpLnZhbHVlO1xcbiAgICAgICAgICAgICAgICB9Y2F0Y2goZSl7XFxuICAgICAgICAgICAgICAgICAgICBhbGVydChcXFwi5pyq6I635Y+W5Yiw6IqC54K5OlxcXCIra2V5K1xcXCJcXFxcblxcXCIrZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZihteVNlbGVjdCl7XFxuICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24obmV3Q29uZmlnLnNldHRpbmdzLCBzZXR0aW5ncyk7XFxuICAgICAgICAgICAgICAgIGZiYS53cml0ZUZpbGUobmV3Um91dGUsICQkJC5zdHJpbmdpZnkobmV3Q29uZmlnKSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGZiYS53cml0ZUZpbGUob2xkUm91dGUsICQkJC5zdHJpbmdpZnkoc2V0dGluZ3MpKTtcXG4gICAgICAgICAgICBUb2FzdChtc2csZHVyYXRpb24pO1xcbiAgICAgICAgICAgIGlmKHRpdGxlPT09XFxcIuWFs1xcXCIpe1xcbiAgICAgICAgICAgICAgICBmYmEuYmFjaygpO1xcbiAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICBmYmEucmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfWNhdGNoKGUpe1xcbiAgICAgICAgICAgIGFsZXJ0KGUubWVzc2FnZSlcXG4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uX2lkKVswXTtcXG4gICAgICAgIHZlci5vcHRpb24oKTtcXG4gICAgfVxcblxcbiAgICBjb25zdCBSZW5kZXJIdG1sQXBwID0ge1xcbiAgICAgICAgZGF0YSgpIHtcXG4gICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICAvLyByYXdIdG1sOiAnPHNwYW4gc3R5bGU9XFxcImNvbG9yOiByZWRcXFwiPui/memHjOS8muaYvuekuue6ouiJsu+8gTwvc3Bhbj4nLFxcbiAgICAgICAgICAgICAgICBvcHRpb25zOm9wdGlvbnMsXFxuICAgICAgICAgICAgICAgIHZlcmluZm86dmVyaW5mbyxcXG4gICAgICAgICAgICAgICAgcGxhY2Vob2xkZXI6cGxhY2Vob2xkZXIsXFxuICAgICAgICAgICAgICAgIHRpcHM6dGlwcyxcXG4gICAgICAgICAgICAgICAgdGhlbWVzOnRoZW1lcyxcXG4gICAgICAgICAgICAgICAgbXlTZWxlY3Q6bXlTZWxlY3QsXFxuICAgICAgICAgICAgICAgIC8vIGNqU2VsOlsn6K+36YCJ5oup5o+S5Lu2ICjlj6rkvZznlKhsYXp5UnVsZSknLCdoaWtlcjovL2ZpbGVzL2NhY2hlL1BhcnNlX0RuLmpzJywnaGlrZXI6Ly9maWxlcy9ydWxlcy9kekhvdXNlL2pzL3NyY2F1dG8uanMnLCdoaWtlcjovL2ZpbGVzL3J1bGVzL2pzL1BhcnNlLVYyX0RuLmpzJ10sXFxuICAgICAgICAgICAgICAgIGNqU2VsOlsn6K+36YCJ5oup5o+S5Lu2ICjlj6rkvZznlKhsYXp5UnVsZSknLCdoaWtlcjovL2ZpbGVzL2NhY2hlL1BhcnNlX0RuLmpzJ10sXFxuICAgICAgICAgICAgICAgIHNldHRpbmdzOnNldHRpbmdzLFxcbiAgICAgICAgICAgICAgICBzaG93VGlwczpmYWxzZSxcXG4gICAgICAgICAgICAgICAgLy93aWR0aFB4OndpZHRoUHhcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LFxcbi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0cmluZ1ZhbHVlLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgbmV3U3RyaW5nICs9IHRoaXMubmV4dENoYXJhY3RlcihzdHJpbmdWYWx1ZVtpXS5jaGFyQ29kZUF0KCksIGspO1xcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIG5ld1N0cmluZztcXG4gICAgfSxcXG4gICAgbm93RGF0ZTogZnVuY3Rpb24oKSB7XFxuICAgICAgICB2YXIgZGF0ZTEgPSBuZXcgRGF0ZSgpO1xcbiAgICAgICAgdmFyIGRhdGVTdHIgPSBcXFwiXFxcIjtcXG4gICAgICAgIGlmIChkYXRlMSkge1xcbiAgICAgICAgICAgIGRhdGVTdHIgPSBkYXRlMS5nZXRGdWxsWWVhcigpO1xcbiAgICAgICAgICAgIHZhciBtb250aCA9IGRhdGUxLmdldE1vbnRoKCkgKyAxO1xcbiAgICAgICAgICAgIHZhciBkYXkgPSBkYXRlMS5nZXREYXRlKCk7XFxuICAgICAgICAgICAgaWYgKG1vbnRoIDwgMTApIHtcXG4gICAgICAgICAgICAgICAgZGF0ZVN0ciArPSBcXFwiLTBcXFwiICsgbW9udGg7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgZGF0ZVN0ciArPSBcXFwiLVxcXCIgKyBtb250aDtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKGRheSA8IDEwKSB7XFxuICAgICAgICAgICAgICAgIGRhdGVTdHIgKz0gXFxcIi0wXFxcIiArIGRheTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBkYXRlU3RyICs9IFxcXCItXFxcIiArIGRheTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gZGF0ZVN0cjtcXG4gICAgfSxcXG4gICAgdG9KU09OOiBmdW5jdGlvbihqc29uKSB7XFxuICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoanNvbiwgKGtleSwgdmFsdWUpID0+IHtcXG4gICAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09ICdmdW5jdGlvbicpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlLnRvU3RyaW5nKCk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIDQpO1xcbiAgICB9LFxcbiAgICB0b1ZOdW06IGZ1bmN0aW9uKGEpIHtcXG4gICAgICAgIHZhciBhID0gYS50b1N0cmluZygpO1xcbiAgICAgICAgdmFyIGMgPSBhLnNwbGl0KCcuJyk7XFxuICAgICAgICB2YXIgbnVtX3BsYWNlID0gW1xcXCJcXFwiLCBcXFwiMFxcXCIsIFxcXCIwMFxcXCIsIFxcXCIwMDBcXFwiLCBcXFwiMDAwMFxcXCJdLFxcbiAgICAgICAgICAgIHIgPSBudW1fcGxhY2UucmV2ZXJzZSgpO1xcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgdmFyIGxlbiA9IGNbaV0ubGVuZ3RoO1xcbiAgICAgICAgICAgIGNbaV0gPSByW2xlbl0gKyBjW2ldO1xcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIHJlcyA9IGMuam9pbignJyk7XFxuICAgICAgICByZXR1cm4gcmVzO1xcbiAgICB9LFxcbiAgICBjcHJWZXJzaW9uOiBmdW5jdGlvbihhLCBiKSB7XFxuICAgICAgICB2YXIgX2EgPSBwYXJzZUludCh0aGlzLnRvVk51bShhKSksXFxuICAgICAgICAgICAgX2IgPSBwYXJzZUludCh0aGlzLnRvVk51bShiKSk7XFxuICAgICAgICBiID0gaXNOYU4oX2IpID8gdmVyc2lvbiA6IGI7XFxuICAgICAgICBpZiAoX2EgPiBfYikge1xcbiAgICAgICAgICAgIHB1dFZhcignanhOZXdWJywgJ+acieaW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gICAgIHZhciBjb25maWdfdXJsID0gYXRvYihjb25maWdfdXJsKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdmFyIGNvbmZpZ191cmwgPSBlbmNvZGVVUklDb21wb25lbnQoY29uZmlnX3VybCk7XFxuICAgICAgICB9XFxuICAgICAgICB2YXIgY29uZmlnX2MgPSBjb25maWdfdXJsLmxlbmd0aDtcXG4gICAgICAgIGZvciAoaSA9IDB4MDsgaSA8IDB4MTAwOyBpKyspIHtcXG4gICAgICAgICAgICB0ZW1baV0gPSBjb25maWdfYVtpICUgY29uZmlnX2JdLmNoYXJDb2RlQXQoKTtcXG4gICAgICAgICAgICBjb25maWdfYXJyeVtpXSA9IGk7XFxuICAgICAgICB9XFxuICAgICAgICBmb3IgKGogPSBpID0gMHgwOyBpIDwgMHgxMDA7IGkrKykge1xcbiAgICAgICAgICAgIGogPSAoaiArIGNvbmZpZ19hcnJ5W2ldICsgdGVtW2ldKSAlIDB4MTAwO1xcbiAgICAgICAgICAgIHRtcCA9IGNvbmZpZ19hcnJ5W2ldO1xcbiAgICAgICAgICAgIGNvbmZpZ19hcnJ5W2ldID0gY29uZmlnX2Fycnlbal07XFxuICAgICAgICAgICAgY29uZmlnX2Fycnlbal0gPSB0bXA7XFxuICAgICAgICB9XFxuICAgICAgICBmb3IgKGEgPSBqID0gaSA9IDB4MDsgaSA8IGNvbmZpZ19jOyBpKyspIHtcXG4gICAgICAgICAgICBhID0gKGEgKyAweDEpICUgMHgxMDA7XFxuICAgICAgICAgICAgaiA9IChqICsgY29uZmlnX2FycnlbYV0pICUgMHgxMDA7XFxuICAgICAgICAgICAgdG1wID0gY29uZmlnX2FycnlbYV07XFxuICAgICAgICAgICAgY29uZmlnX2FycnlbYV0gPSBjb25maWdfYXJyeVtqXTtcXG4gICAgICAgICAgICBjb25maWdfYXJyeVtqXSA9IHRtcDtcXG4gICAgICAgICAgICBrID0gY29uZmlnX2FycnlbKGNvbmZpZ19hcnJ5W2FdICsg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C5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvZ2xvYmFsUGFyc2U/cnVsZT3pgZPplb/ku5PlupNQcm8nKTtcXG4gICAgICAgICAgICBsZXQgcmV0ID0gTGF6eVBhcnNlRmFzdChwbGF5VXJscyx0aW1lb3V0LHRpbWVvdXQpO1xcbiAgICAgICAgICAgIGlmKHR5cGVvZihyZXQpPT09J29iamVjdCcmJnJldC5sZW5ndGg+MCl7XFxuICAgICAgICAgICAgICAgIC8vcmV0dXJuIHJldFswXVxcbiAgICAgICAgICAgICAgICAvL2xvZyhyZXQpO1xcbiAgICAgICAgICAgICAgICBsZXQgdiA9IGdldEFwcFZlcnNpb24oKTtcXG4gICAgICAgICAgICAgICAgaWYocGFyc2VJbnQodik+PTIxOTQmJnJldC5sZW5ndGg+MSl7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJscyA9IEFycmF5LmZyb20obmV3IFNldChyZXQpKTtcXG4gICAgICAgICAgICAgICAgICAgIG5hbWVzPXVybHMubWFwKChpdCxpZCk9Pml0LnNwbGl0KFxcXCLimIVcXFwiKS5sZW5ndGg+MT9pdC5zcGxpdChcXFwi4piFXFxcIilbMV06XFxcIue6v+i3rzpcXFwiK3BhcnNlSW50KGlkKzEpKTtcXG4gICAgICAgICAgICAgICAgICAgIHVybHM9dXJscy5tYXAoaXQ9Pml0LnNwbGl0KFxcXCLimIVcXFwiKVswXSk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgaGVhZGVycyA9IHVybHMubWFwKChpdCk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZighLzsvLnRlc3QoaXQpfHxpdC5zcGxpdCgnOycpLmxlbmd0aDwyKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHt9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoZWFkID0gaXQuc3BsaXQoJzsnKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIS9ALy50ZXN0KGhlYWQpfHwhL3t8fS8udGVzdChoZWFkKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge31cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkPWhlYWQuc3BsaXQoXFxcIntcXFwiKVsxXS5zcGxpdChcXFwifVxcXCIpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2hlYWQgPSBoZWFkLnJlcGxhY2UoL3t8fS9nLCcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZCA9IGhlYWQuc3BsaXQoJyYmJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBvYmogPSB7fTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBpIGluIGhlYWQpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGtleSA9IGhlYWRbaV0uc3BsaXQoJ0AnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9IGhlYWRbaV0uc3BsaXQoJ0AnKVsxXS5yZXBsYWNlKC87Lywn77yb77ybJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpba2V5XSA9IHZhbHVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvYmpcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIHVybHMgPSB1cmxzLm1hcCgoaXQpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHR1cmw9aXQuc3BsaXQoJzsnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihpdC5pbmNsdWRlcyhcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiKSYmIXR1cmwuaW5jbHVkZXMoXFxcIiNpc1ZpZGVvPXRydWUjXFxcIikpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0dXJsKz1cXFwiI2lzVmlkZW89dHJ1ZSNcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHVybFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe3VybHM6dXJscyxoZWFkZXJzOmhlYWRlcnMsbmFtZXM6bmFtZXN9KTtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmV0WzBdLnNwbGl0KFxcXCLimIVcXFwiKVswXVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgIHJldHVybiByZXRcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICBjb25zdCB7bGF6eVBhcnNlfSA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL2dsb2JhbFBhcnNlP3J1bGU96YGT6ZW/5LuT5bqTUHJvJyk7XFxuICAgICAgICAgICAgbGV0IHg1UGxheT1sYXp5UGFyc2UocGxheVVybCx0aW1lb3V0KTtcXG4gICAgICAgICAgICBpZih0eXBlb2YoeDVQbGF5KT09XFxcInVuZGVmaW5lZFxcXCJ8fCF4NVBsYXkpe1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6YGT6ZW/5LuT5bqT6Kej5p6Q5aSx6LSlXFxcIlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBsZXQgdGlwcz0veDVSdWxlfHdlYlJ1bGUvLnRlc3QoeDVQbGF5KT9cXFwieDUvd2Vi5YW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GtleSwgaXYpO1xcbiAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgbGV0IGhlYWRlcnMgPSB7aGVhZGVyczoge1xcXCJSZWZlcmVyXFxcIjogcmVmfHwnJ319O1xcbiAgICAgICAgICAgIHZhciBodG1sID0gcmVmP3JlcXVlc3Qoanh1cmwsIGhlYWRlcnMpOnJlcXVlc3Qoanh1cmwpO1xcbiAgICAgICAgICAgIGlmICgvJmJ0d2FmPS8udGVzdChodG1sKSkge1xcbiAgICAgICAgICAgICAgICBodG1sID0gcmVxdWVzdChqeHVybCArIFxcXCImYnR3YWZcXFwiICsgaHRtbC5tYXRjaCgvJmJ0d2FmKC4qPylcXFwiLylbMV0sIHtoZWFkZXJzOiB7XFxcIlJlZmVyZXJcXFwiOiByZWZ9fSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHZhciBpdiA9IGh0bWwuc3BsaXQoXFxcIl90b2tlbiA9IFxcXFxcXFwiXFxcIilbMV0uc3BsaXQoXFxcIlxcXFxcXFwiXFxcIilbMF07XFxuICAgICAgICAgICAgZXZhbChodG1sLm1hdGNoKC92YXIgY29uZmlnID0ge1tcXFxcc1xcXFxTXSo/fS8pWzBdICsgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgIGlmICghL15odHRwLy50ZXN0KGNvbmZpZy51cmwpKSB7XFxuICAgICAgICAgICAgICAgIGNvbmZpZy51cmwgPSBkZWNvZGVVUklDb21wb25lbnQodG9vbHMuQUVTKGNvbmZpZy51cmwsIFxcXCJkdnlZUlFsblBSQ01kUVNlXFxcIiwgaXYpKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIGNvbmZpZy51cmw7XFxuICAgICAgICB9XFxuICAgICAgICBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIHJldHVybiBcXFwiXFxcIjtcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgTExROiBmdW5jdGlvbihqeHVybCkge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICB2YXIgYXBpID0ganh1cmwuc3BsaXQoJz91cmw9JylbMF0gKyBcXFwiYXBpLnBocFxcXCI7XFxuICAgICAgICAgICAgdmFyIGI2NGlkID0gYmFzZTY0RW5jb2RlKGp4dXJsLnNwbGl0KCd1cmw9JylbMV0pO1xcbiAgICAgICAgICAgIHZhciBwYXJzZWlkID0gdG9vbHMuY2Flc2FyQ2lwaGVyKGI2NGlkLCAtMSk7XFxuICAgICAgICAgICAgdmFyIGpzb24gPSBKU09OLnBhcnNlKHJlcXVlc3QoYXBpLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICdSZWZlcmVyJzoganh1cmxcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCcsXFxuICAgICAgICAgICAgICAgIGJvZHk6ICd1cmw9JyArIHBhcnNlaWRcXG4gICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgdXJsID0gKGpzb24uY29kZSA9PSAyMDAgPyBiYXNlNjREZWNvZGUodG9vbHMuY2Flc2FyQ2lwaGVyKGpzb24udXJsLCAtMSkpIDogJycpO1xcbiAgICAgICAgICAgIHJldHVybiB1cmw7XFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgcmV0dXJuICcnO1xcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICBQYW5HdTogZnVuY3Rpb24odmlwVXJsLCBkYXRhKSB7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIC8qdmFyIHJlZiA9ICdodHRwczovL3d3dy5wYW5ndWppZXhpLmNvbS8nO1xcbiAgICAgICAgICAgIHZhciBwYXJzZSA9ICdodHRwczovL3Bhbmd1YXBpLm50cnlqZC5uZXQvamlleGkvP3VybD0nICsgdmlwVXJsO1xcbiAgICAgICAgICAgIHZhciBhcGkgPSAnaHR0cHM6Ly9wYW5ndWFwaS5udHJ5amQubmV0L2ppZXhpL2FwaS5waHAnO1xcbiAgICAgICAgICAgICovXFxuICAgICAgICAgICAgLy92YXIgcmVmID0gJ2h0dHBzOi8veG15c3R2LmNvbS8nO1xcbiAgICAgICAgICAgIC8vdmFyIHBhcnNlID0gJ2h0dHBzOi8vd3d3Ljk5a3B3LmNvbS9wYW5ndS9pbmRleC5waHA/dXJsPScgKyB0YWlsVXJsO1xcbiAgICAgICAgICAgIC8vdmFyIGFwaSA9ICdodHRwczovL3d3dy45OWtwdy5jb20vcGFuZ3UvYXBpLnBocCc7XFxuICAgICAgICAgICAgdmFyIHBhcnNlID0gJ2h0dHBzOi8vd3d3LnBhbmd1amlleGkuY29tL3Bhbmd1Lz91cmw9JyArIHZpcFVybDtcXG4gICAgICAgICAgICB2YXIgYXBpID0gJ2h0dHBzOi8vcGFuZ3VhcGkubnRyeWpkLm5ldC9wYW5ndTIwMjEvYXBpLnBocCc7XFxuICAgICAgICAgICAgaWYgKGRhdGEpIHtcXG4gICAgICAgICAgICAgICAgcmVmID0gZGF0YVswXTtcXG4gICAgICAgICAgICAgICAgcGFyc2UgPSBkYXRhWzFdO1xcbiAgICAgICAgICAgICAgICBhcGkgPSBkYXRhWzJdO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB2YXIgVGltZSA9IChNYXRoLmZsb29yKG5ldyBEYXRlKCkuZ2V0VGltZSgpIC8gMTAwMCkgKiAxKS50b1N0cmluZygpO1xcbiAgICAgICAgICAgIHZhciB1cmwgPSBKU09OLnBhcnNlKHJlcXVlc3QoYXBpLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICdSZWZlcmVyJzogcGFyc2VcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgYm9keTogJ3VybD0nICsgdmlwVXJsICsgJyZyZWZlcmVyPScgKyBiYXNlNjRFbmNvZGUocGFyc2UpICsgJyZyZWY9MSZ0aW1lPScgKyBUaW1lICsgJyZ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Top6PmnpDliJfooahcXG4gICAgICAgIGlmKGp4cyl7XFxuICAgICAgICAgICAgZm9yKGxldCBpIGluIGp4cyl7XFxuICAgICAgICAgICAgICAgIGlmKHR5cGVvZiBQYXJzZVNbanhzW2ldXSA9PSAnc3RyaW5nJyYmUGFyc2VTW2p4c1tpXV0ubWF0Y2goL2h0dHAuKj89Lykpe1xcbiAgICAgICAgICAgICAgICAgICAgcGxheVVybExpc3QucHVzaChQYXJzZVNbanhzW2ldXSt2aXBVcmwpO1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaChqeHNbaV0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgLy8gcmV0dXJuIHBsYXlVcmxMaXN0XFxuICAgICAgICByZXR1cm4ge3BsYXlVcmxMaXN0OnBsYXlVcmxMaXN0LG5hbWVMaXN0Om5hbWVMaXN0fVxcbiAgICB9XFxuICAgIGxldCBleHRyYSA9IHt9O1xcbiAgICAvLy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS1cXG4gICAgaWYoIXN0clRpdGxlKXtcXG4gICAgICAgIGlmKC9yZW5yZW5taS18ZmVuZG91XFxcXC5kdW9kdW96eS8udGVzdCh2aXBVcmwpKXtcXG4gICAgICAgICAgICBzdHIgPSBteVNldC5wcDtcXG4gICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgncHAnKTtcXG4gICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgIHZhciBob3N0O1xcbiAgICAgICAgICAgIHRyeXtcXG4gICAgICAgICAgICAgICAgaG9zdCA9IHZpcFVybC5tYXRjaCgvXFxcXC4oLio/KVxcXFwvLylbMV07XFxuICAgICAgICAgICAgfWNhdGNoKGUpe1xcbiAgICAgICAgICAgICAgICBpZighL15odHRwLy50ZXN0KHBsYXlVcmwpKXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwi5pat5o+S6LCD55So5aSx6LSl77yBXFxcXG7pnZ7mraPluLjnmoR2aXDmraPniYjlnLDlnYDkuJTmnKror4bliKvljp/nq5nop6PmnpDmkq3mlL7lnLDlnYBcXFwiO1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBQYXJzZVMu6YGT6ZW/5LuT5bqT6YCa5YWNKHBsYXlVcmwsdGltZW91dClcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAvL2hvc3QgPSBkZWNvZGVVUklDb21wb25lbnQoaG9zdCk7XFxuICAgICAgICAgICAgc3dpdGNoIChteVNldC5xanUpIHtcXG4gICAgICAgICAgICAgICAgY2FzZSBcXFwi6buY6K6kXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoaG9zdCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInFxLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnR4O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgndHgnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiaXFpeWkuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQucXk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdxeScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJ5b3VrdS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC55aztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3lrJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcImFsaXp5XFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQuYWw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdhbCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJtZ3R2LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0Lm1nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnbWcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiYmlsaWJpbGkuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQuYmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdibCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJzb2h1LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnNoO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnc2gnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwidHYuc29odS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5zaDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3NoJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIml4aWd1YS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC54ZztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3hnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBwdHYuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQucHA7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdwcCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJtaWd1dmlkZW8uY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQubWk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdtaScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJsZS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5sZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ2xlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIjE5MDUuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQub25lO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnb25lJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcImZ1bi50dlxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LmZ1bjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ2Z1bicpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5vdGg7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5xanU7XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgIH1lbHNle1xcbiAgICAgICAgbG9nKCfprZTmlq3miafooYzlrprlkJHop6PmnpDnur/ot6/lpLQ6JytzdHJUaXRsZSk7XFxuICAgICAgICBzdHIgPSBzdHJUaXRsZTtcXG4gICAgfVxcbiAgICBsZXQgd2l0aEJhdGNoID0gISEoTXlKaWV4aS5pc0F1dG8gJiYgTXlKaWV4aS5hdXRvTW9kZSA9PT0gJ+mAn+W6puS8mOWFiCcpO1xcbiAgICBpZiAodHlwZW9mIFBhcnNlU1tzdHJdID09ICdmdW5jdGlvbicpIHtcXG4gICAgICAgIGlmKC/pgJrlhY0vLnRlc3Qoc3RyKSl7XFxuICAgICAg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KGdldFZhcignb2xkQ29uZmlnJykpKS5jajtcXG4gICAgICAgICAgICB2YXIgTGFiZWwgPSBrO1xcbiAgICAgICAgICAgIHZhciBmYSA9IFsnbGV0dicsICdwcHR2JywgJ3FxJywgJ3lvdWt1JywgJ3FpeWknLCAnaXFpeWknLCAnbWd0dicsICdiaWxpYmlsaScsICdzb2h1JywgJ21pZ3UnLCAnbTE5MDUnLCAndmlwJ107XFxuICAgICAgICAgICAgdmFyIGh0bWwgPSBwYXJzZURvbShyZXF1ZXN0KGlucHV0KSwgTGFiZWwpO1xcbiAgICAgICAgICAgIGV2YWwoaHRtbC5yZXBsYWNlKC9wbGF5ZXJfLio/PXsvLCAncGRhdGE9eycpKTtcXG4gICAgICAgICAgICBldmFsKGZldGNoKGpzVXJsKSk7XFxuICAgICAgICAgICAgaWYgKHBkYXRhLnVybC5zdWJzdHIoMCwgOCkubWF0Y2goL0pULi5KVC4uLykpIHtcXG4gICAgICAgICAgICAgICAgcGRhdGEudXJsID0gYmFzZTY0RGVjb2RlKHBkYXRhLnVybCk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmIChwZGF0YS51cmwuc3Vic3RyKDAsIDgpLm1hdGNoKC8lLi4lLi4vKSkge1xcbiAgICAgICAgICAgICAgICBwZGF0YS51cmwgPSB1bmVzY2FwZShwZGF0YS51cmwpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAoZmEuaW5jbHVkZXMocGRhdGEuZnJvbSkpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGF5dG1QYXJzZShwZGF0YS51cmwpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBwZGF0YS51cmwgKyAnI2lzVmlkZW89dHJ1ZSMnO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIExhYmVsKVxcbiAgICB9XFxufTtcXG5mdW5jdGlvbiBtelBvcHVwKCkge1xcbiAgICAvKlxcbiAgICB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lIHtcXG4gICAgICAgIGFyckxpc3QgPSBudWxsO1xcbiAgICB9XFxuICAgIGlmIChhcnJMaXN0ICE9IG51bGwpIHtcXG4gICAgICAgIHZhciBwYXJzZVJvdXRlID0gZ2V0VmFyKCdwYXJzZVJvdXRlJyk7XFxuICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKHBhcnNlUm91dGUpKTtcXG4gICAgICAgIEFycmF5LnByb3RvdHlwZS5yZW1vdmUgPSBmdW5jdGlvbih2YWwpIHtcXG4gICAgICAgICAgICBsZXQgaW5kZXggPSB0aGlzLmluZGV4T2YodmFsKTtcXG4gICAgICAgICAgICBpZiAoaW5kZXggPiAtMSkge1xcbiAgICAgICAgICAgICAgICB0aGlzLnNwbGljZShpbmRleCwgMSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfTtcXG4gICAgICAgIGlmKG5hbWUpey8v5Yig6Zmk5ZCN56ew5YiX6KGo5ZKM5Luj56CBXFxuICAgICAgICAgICAganNvbi50aXRsZS5yZW1vdmUobmFtZSk7XFxuICAgICAgICAgICAgZGVsZXRlIGpzb24uY29kZXNbbmFtZV07XFxuICAgICAgICB9XFxuICAgICAgICBhcnJMaXN0ID0gYXJyTGlzdC5jb25jYXQoanNvbi50aXRsZSk7XFxuICAgICAgICBqc29uLnRpdGxlID0gQXJyYXkuZnJvbShuZXcgU2V0KGFyckxpc3QpKTtcXG4gICAgICAgIE9iamVjdC5hc3NpZ24oanNvbi5jb2Rlcywgb2JqQ29kZSk7XFxuICAgICAgICBpZiAodHlwZSA9PT0gJ+a1i+ivlScpIHtcXG4gICAgICAgICAgICBldmFsKCd2YXIgY29uZmlnID0nICsgZmV0Y2goZ2V0VmFyKCdvbGRDb25maWcnKSkpO1xcbiAgICAgICAgICAgIGV2YWwoZmV0Y2goY29uZmlnLmNqKSk7XFxuICAgICAgICAgICAgaWYgKHR5cGVvZiBQYXJzZVNbZGF0YVsxXV0gPT0gXFxcImZ1bmN0aW9uXFxcIikge1x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Z1bmN0aW9uKHBhcnNlUm91dGUpIHtcXG4gICAgICAgIHJldHVybiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChrKSA9PiB7XFxuICAgICAgICAgICAgaWYgKGZpbGVFeGlzdChrKSkge1xcbiAgICAgICAgICAgICAgICB2YXIgY2pjYWNoZSA9IGdldFZhcignY2pDYWNoZScpO1xcbiAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKGspKTtcXG4gICAgICAgICAgICAgICAganNvbi5zZXR0aW5ncy5jaiA9IGNqY2FjaGU7XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShrLCAkLnN0cmluZ2lmeShqc29uKSk7XFxuICAgICAgICAgICAgICAgIHZhciBvbGRSb3V0ZSA9IGdldFZhcignb2xkQ29uZmlnJyk7XFxuICAgICAgICAgICAgICAgIHZhciBvbGRDb25maWcgPSBqc29uLnNldHRpbmdzO1xcbiAgICAgICAgICAgICAgICBvbGRDb25maWcuY2ogPSBjamNhY2hlO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUob2xkUm91dGUsICQuc3RyaW5naWZ5KG9sZENvbmZpZykpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/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+ihqCcpIHtcXG4gICAgICAgICAgICAgICAgLy8gICAgIGlmICghbGJKdWRnZSkge1xcbiAgICAgICAgICAgICAgICAvLyAgICAgICAgIHBhcnNlVGl0bGUgPSBPYmplY3Qua2V5cyhQYXJzZVMpO1xcbiAgICAgICAgICAgICAgICAvLyAgICAgfVxcbiAgICAgICAgICAgICAgICAvLyAgICAgdmFyIG5ld1BhcnNlVGl0bGUgPSBqc29uLnRpdGxlLmNvbmNhdChwYXJzZVRpdGxlKTtcXG4gICAgICAgICAgICAgICAgLy8gICAgIGpzb24udGl0bGUgPSBBcnJheS5mcm9tKG5ldyBTZXQobmV3UGFyc2VUaXRsZSkpO1xcbiAgICAgICAgICAgICAgICAvLyB9XFxuICAgICAgICAgICAgICAgIC8vIOS4jeeuoeaLieWPluS7o+eggei/mOaYr+WIl+ihqOmDveimgeaKiuWIl+ihqOaLieS6hlxcbiAgICAgICAgICAgICAgICBpZiAoIWxiSnVkZ2UpIHtcXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUgPSBPYmplY3Qua2V5cyhQYXJzZVMpO1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKHBhcnNlVGl0bGUpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHZhciBzY09iamVjdCA9IFtcXFwiQ2l0eUlQXFxcIiwgXFxcInBjVUFcXFwiLCBcXFwiY2FjaGVNM3U4XFxcIixcXFwiaXNWaWRlb1xcXCIsIFxcXCJkZWZhdWx0UGFyc2VcXFwiLFxcXCJkZWZhdWx0UGFyc2VXZWJcXFwiLFxcXCJtYW9zc1xcXCIsIFxcXCJMTFFcXFwiLFxcXCJwYXJzZUxjXFxcIl07XFxuICAgICAgICAgICAgICAgIHBhcnNlVGl0bGUgPSBwYXJzZVRpdGxlP3BhcnNlVGl0bGUuZmlsdGVyKGl0PT4hc2NPYmplY3QuaW5jbHVkZXMoaXQpKTpbXTtcXG4gICAgICAgICAgICAgICAgdmFyIG5ld1BhcnNlVGl0bGUgPSBqc29uLnRpdGxlLmNvbmNhdChwYXJzZVRpdGxlKTtcXG4gICAgICAgICAgICAgICAganNvbi50aXRsZSA9IEFycmF5LmZyb20obmV3IFNldChuZXdQYXJzZVRpdGxlKSk7XFxuXFxuICAgICAgICAgICAgICAgIGlmIChwdWxsTW9kZSA9PT0gJ+S7o+eggScpIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2Ygb3JpZ2luYWxQYXJzZVMgPT0gJ29iamVjdCcpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpIGluIHNjT2JqZWN0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBvcmlnaW5hbFBhcnNlU1tzY09iamVjdFtpXV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIG9yaWdpbmFsUGFyc2VTID1vcmlnaW5hbFBhcnNlUy5maWx0ZXIoaXQ9PiFzY09iamVjdC5pbmNsdWRlcyhPYmplY3QuZ2V0T3duUHJvcGVydHlOYW1lcyhpdClbMF0pKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKGpzb24uY29kZXMsIG9yaWdpbmFsUGFyc2VTKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZW9mKFBhcnNlUyk9PVxcXCJ1bmRlZmluZWRcXFwiKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihqc29uLmNvZGVzLCBwYXJzZUNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL3JldHVybiBcXFwidG9hc3Q6Ly/msqHmnInku6PnoIHvvIzkuI3lj6/mi4nlj5ZcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE9iamVjdC5hc3NpZ24oanNvbi5jb2RlcywgUGFyc2VTKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy92YXIgbmV3RmlsZSA9IHRvb2xzLnRvSlNPTihqc29uKTsvL+iHquWumuS5iXN0cmluZ2lmeeWHveaVsO+8jOW4puaciei9rOS5ieWtl+esplxcbiAgICAgICAgICAgICAgICB2YXIgbmV3RmlsZSA9ICQuc3RyaW5naWZ5KGpzb24pOyAvL0pTT04ucGFyc2XkvJrmiqXplJlcXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxl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pFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGsgPSBbbmFtZSwgbnVtXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyDmgLvmhJ/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/nSDlrZgnLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoJ25vTG9hZGluZycpLmxhenlSdWxlKChzYXZlQnV0dG9uKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2F2ZUJ1dHRvbihnZXRWYXIoJ2lucHV0X2FkZCcpKTtcXG4gICAgICAgICAgICAgICAgfSwgc2F2ZUJ1dHRvbiksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgICAgICB9KVxcbiAgICB9LFxcbiAgICB5ZFBhcnNlOiBmdW5jdGlvbihCSm1vZGUsIGkpIHtcXG4gICAgICAgIHJldHVybiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChrKSA9PiB7XFxuICAgICAgICAgICAgdmFyIEEgPSBrWzBdLnNwbGl0KCcjJylbMV07XFxuICAgICAgICAgICAgdmFyIEIgPSBrWzFdO1xcbiAgICAgICAgICAgIHZhciB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G4gICAgcmV0dXJuIGdldFZhcihfMHg0N2E5YjRbJ0ZVamRtJ10pO1xcbn1cXG52YXIganhJdGVtID0ge1xcbiAgICAnanhMaXN0JzogZnVuY3Rpb24oKSB7XFxuICAgICAgICB2YXIgXzB4NGMwNDI3ID0ge1xcbiAgICAgICAgICAgICdVVldvRic6IGZ1bmN0aW9uKF8weDI2YmIwNywgXzB4MjIxYjRkKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHgyNmJiMDcgKyBfMHgyMjFiNGQ7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnY29sb3InOmZ1bmN0aW9uKHRleHQsIGNvbG9yKSB7XFxuICAgICAgICAgICAgICAgIHRleHQgKz0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgIGlmICh0ZXh0LmluZGV4T2YoXFxcIuKAnOKAnOKAneKAnVxcXCIpID09PSAwKSB7XFxuICAgICAgICAgICAgICAgICAgICB0ZXh0LnJlcGxhY2UoXFxcIuKAnOKAnOKAneKAnVxcXCIsIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcIuKAnOKAnOKAneKAnTxmb250IGNvbG9yPSdcXFwiICsgY29sb3IgKyBcXFwiJz5cXFwiICsgdGV4dCArIFxcXCI8L2ZvbnQ+XFxcIjtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdreldESyc6IGZ1bmN0aW9uKF8weDQ4NTRhOSwgXzB4M2U5OGM1KSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg0ODU0YTkgKyBfMHgzZTk4YzU7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnWFh5UXInOiAn56e75YqoIycsXFxuICAgICAgICAgICAgJ2d0VW5qJzogZnVuY3Rpb24oXzB4NTlhYWY3LCBfMHgyMmM2NmIpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDU5YWFmNyArIF8weDIyYzY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NmUyNDIpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDVjYWUwMyA9PSBfMHgyNmUyNDI7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnY2dJZUEnOiBmdW5jdGlvbihfMHgyNWUzNjgsIF8weDhiYzhlOSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4MjVlMzY4ICsgXzB4OGJjOGU5O1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ3hkckZ2JzogZnVuY3Rpb24oXzB4NGFiNWQ4LCBfMHgyMTI0MmYpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDRhYjVkOCArIF8weDIxMjQyZjtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICd5d2p1eCc6IGZ1bmN0aW9uKF8weDVlMzA1MSwgXzB4NGUwMjMwKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg1ZTMwNTEoXzB4NGUwMjMwKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9O1xcbiAgICAgICAgdmFyIF8weDFkOGJiMSA9IGdldFZhcihfMHg0YzA0MjdbJ0pDY05ZJ10pO1xcbiAgICAgICAgdmFyIF8weDNiODlhYiA9IHBhcnNlRmlsZVsndGl0bGUnXTtcXG4gICAgICAgIHZhciBfMHg0OWRhOTYgPSBnZXRWYXIoXzB4NGMwNDI3WydyZ0RJcCddKTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IF8weDRjMDQyN1snaG9JZEonXSxcXG4gICAgICAgICAgICBkZXNjOifms6jmhI865L2N572u5pON5L2c5Yqf6IO95Y+q5Zyo5YiG57G7562b6YCJ5Li65YWo6YOo5pe255Sf5pWIXFxcXG7kuIvmlrnmkJzntKLmjInlkI3np7DmiJblnLDlnYAs6YeN572u6K+355WZ56m65oiW54K56Kej5p6Q5pWw6YeP5oyJ6ZKuJyxcXG4gICAgICAgICAgICB1cmw6IGJqSXRlbVsneGpQYXJzZSddKCksXFxuICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTpmYWxzZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTon5pCc57SiJyxcXG4gICAgICAgICAgICBkZXNjOidtZW5neCcsXFxuICAgICAgICAgICAgY29sX3R5cGU6J2lucHV0JyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBvbkNoYW5nZTogXFxcInB1dFZhcignZHAuc2VhcmNoSngnLGlucHV0KVxcXCIsXFxuICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogdHJ1ZSxcXG4gICAgICAgICAgICAgICAgdGV4dFNpemU6IDExLFxcbiAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6Z2V0VmFyKCdkcC5zZWFyY2hKeCcsJycpLFxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgdXJsOiQudG9TdHJpbmcoKCk9PntcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSk7XFxuICAgICAgICBsZXQgZmlsdGVycyA9IFsn5YWo6YOoJywn6ZO+5o6lJywnanNvbicsJ+WFjeWXhSddO1xcbiAgICAgICAgZm9yKGxldCBvIGluIGZpbHRlcnMpe1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOmdldFZhcignZG4uanhfZmlsdGVyJywn5YWo6YOoJyk9PT1maWx0ZXJzW29dPyfigJzigJzigJ3igJ08c3BhbiBzdHlsZT1cXFwiY29sb3I6IzI5OEEwOFxcXCI+JytmaWx0ZXJzW29dOmZpbHRlcnNbb10sXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGl0KT0+e1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkbi5qeF9maWx0ZXInLGl0KTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LGZpbHRlcnNbb10pLFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIF8weDJlY2JlNSA9IF8weDNiODlhYlsnbGVuZ3RoJ107XFxuICAgICAgICB2YXIganNvbj17dGl0bGU6W10sY29kZXM6e319O1xcbiAgICAgICAgbGV0IHNldEZpbGUgPSByZXF1ZXN0KCdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbicpO1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBldmFsKCdqc29uPScrc2V0RmlsZSk7XFxuICAgICAgICB9Y2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICBsb2coJ0pzb27op6PmnpDlj5HnlJ/kuobplJnor686JytlLm1lc3NhZ2UpO1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYoZ2V0VmFyKCdkbi5qeF9maWx0ZXInLCflhajpg6gnKT09PSfpk77mjqUnKXtcXG4gICAgICAgICAgICBfMHgzYjg5YWIgPSBfMHgzYjg5YWIuZmlsdGVyKGl0PT4oIS/CqSQvLnRlc3QoaXQpKSYmdHlwZW9mKGpzb24uY29kZXNbXzB4NGMwNDI3WyduV2ZWUiddKGl0LCAnJylbJ3JlcGxhY2UnXSgvaHR0cC4qXFxcXC9cXFxcLy9nLCAnJyldKT09PSdzdHJpbmcnK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Ccjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCgpPT57XFxuICAgICAgICAgICAgICAgIGNsZWFyVmFyKCdkcC5zZWFyY2hKeCcpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3sumHjee9ridcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSk7XFxuICAgICAgICAvLyDkuIvpnaLmmK/op6PmnpDliJfooajmjpLliJdcXG4gICAgICAgIC8vIGZvciAodmFyIF8weGUyYzNkOCA9IDB4MDsgXzB4NGMwNDI3WydGckdPSCddKF8weGUyYzNkOCwgXzB4MmVjYmU1KTsgXzB4ZTJjM2Q4KyspIHtcXG4gICAgICAgIGZvciAobGV0IF8weGUyYzNkOCBpbiBfMHgzYjg5YWIpIHtcXG4gICAgICAgICAgICB2YXIgXzB4MzM3ODhjID0gXzB4M2I4OWFiW18weGUyYzNkOF07XFxuICAgICAgICAgICAgdmFyIF8weDM3ODcxZSA9IF8weDRjMDQyN1snbldmVlInXShfMHgzMzc4OGMsICcnKVsncmVwbGFjZSddKC9odHRwLipcXFxcL1xcXFwvL2csICcnKTtcXG4gICAgICAgICAgICBpZiAoL+enu+WKqC8gWyd0ZXN0J10oXzB4NDlkYTk2KSkge1xcbiAgICAgICAgICAgICAgICBpZiAoXzB4NGMwNDI3WydvQ0NTaiddKCd1S0x4RicsICd1S0x4RicpKSB7XFxuICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDRjMDQyN1snSFpobGMnXShfMHg0YzA0MjdbJ1hYeVFyJ10gKyBfMHhlMmMzZDgsIF8weDQ5ZGE5NikgPyBfMHg0YzA0MjdbJ25XZlZSJ10oXzB4NGMwNDI3WydjZ0llQSddKF8weDRjMDQyN1snVXRmV2YnXSwgXzB4NGMwNDI3WydRT3ZKViddKSwgXzB4Mzc4NzFlKSA6IF8weDRjMDQyN1snY2dJZUEnXShfMHg0YzA0MjdbJ0FCRXdCJ10sIF8weDM3ODcxZSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsneWRQYXJzZSddKF8weDQ5ZGE5NiwgXzB4ZTJjM2Q4KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiAndGV4dF8yJ1xcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgXzB4MmJjNjE4ID0gXzB4M2I4OWFiW18weGUyYzNkOF07XFxuICAgICAgICAgICAgICAgICAgICB2YXIgXzB4NWNmNDE3ID0gXzB4NGMwNDI3WydVVldvRiddKF8weDJiYzYxOCwgJycpWydyZXBsYWNlJ10oL2h0dHAuKlxcXFwvXFxcXC8vZywgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKC/np7vliqgvIFsndGVzdCddKF8weDQ5ZGE5NikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg0YzA0MjdbJ2t6V0RLJ10oXzB4NGMwNDI3WydYWHlRciddLCBfMHhlMmMzZDgpID09IF8weDQ5ZGE5NiA/IF8weDRjMDQyN1snZ3RVbmonXShfMHg0YzA0MjdbJ2d0VW5qJ10oXzB4NGMwNDI3WydVdGZXZiddLCBfMHg0YzA0MjdbJ1FPdkpWJ10pLCBfMHg1Y2Y0MTcpIDogXzB4NGMwNDI3WydBQkV3QiddICsgXzB4NWNmNDE3LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWyd5ZFBhcnNlJ10oXzB4NDlkYTk2LCBfMHhlMmMzZDgpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg0YzA0MjdbJ296eldHJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIF8weDExOTM2NSA9IFtfMHgyYmM2MTgsIF8weDRjMDQyN1snZ3RVbmonXShfMHhlMmMzZDgsICd8fCcpXVsnam9pbiddKCd8fCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDRjMDQyN1snbldmVlInXShfMHg0YzA0MjdbJ0FCRXdCJ10sIF8weDVjZjQxNyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDRjMDQyN1snb3p6V0cnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsneGxTZWxlY3QnXShfMHgxMTkzNjUsIF8weDJlY2JlNVsndG9TdHJpbmcnXSgpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdmFyIF8weGI3MDE5MiA9IFtfMHgzMzc4OGMsIF8weGUyYzNkOCArICd8fCddWydqb2luJ10oJ3x8Jyk7XFxuICAgICAgICAgICAgICAgIC8vIOi/qui/quW9semZonx8MHx8ICDlkI3np7B8fOe0ouW8lSDnmoTmlbDnu4RcXG4gICAgICAgICAgICAgICAgLy8gQUJFd0Ig5piv57u/6ImyIF8weDM3ODcxZSDmmK/moIfpopjlkI3np7AgIHhkckZ25piv5a2X56ym5Liy6L+e5o6l5Ye95pWwXFxuICAgICAgICAgICAgICAgIC8vIGxldCBmbGFnID0gJ+KAmOKAmOKTiuKAmeKAmSc7XFxuICAgICAgICAgICAgICAgIGxldCBmbGFnID0gXzB4NGMwNDI3LmNvbG9yKCfik4onLCcjMDA1MWZmJyk7XFxuICAgICAgICAgICAgICAgIGlmKHR5cGVvZihqc29uLmNvZGVzW18weDM3ODcxZV0pPT09J2Z1bmN0aW9uJyl7XFxuICAgICAgICAgICAgICAgICAgICAvLyBmbGFnID0gJ+KAnOKAnOKSv+KAneKAnSc7XFxuICAgICAgICAgICAgICAgICAgICBmbGFnID0gXzB4NGMwNDI3LmNvbG9yKCfikr8nLCcjZmY3MDAwJyk7XFxuICAgICAgICAgICAgICAgIH1lbHNlIGlmKHR5cGVvZihqc29uLmNvZGVzW18weDM3ODcxZV0pPT09J3VuZGVmaW5lZCcpe1xcbiAgICAgICAgICAgICAgICAgICAgZmxhZyA9ICcnO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8vIGxldCBjbHMgPSAnPHNwYW4gc3R5bGU9XFxcImNvbG9yOiMyOThBMDhcXFwiPic7XFxuICAgICAgICAgICAgICAgIC8vIGxldCB0aXRsZSA9IF8weDRjMDQyN1sneGRyRnYnXShfMHg0YzA0MjdbJ0FCRXdCJ10sIGZsYWcrXzB4Mzc4NzFlKTtcXG4gICAgICAgICAgICAgICAgLy8gbGV0IHRpdGxlID0gZmxhZytjbHMrXzB4Mzc4NzFlO1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBmbGFnK18weDRjMDQyNy5jb2xvcihfMHgzNzg3MWUsJyMyOThBMDgnKTtcXG4gICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgLy8gJ3RpdGxlJzogXzB4Mzc4NzFlLFxcbiAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NGMwNDI3WydvenpXRyddLFxcbiAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsneGxTZWxlY3QnXShfMHhiNzAxOTIsIF8weDJlY2JlNVsndG9TdHJpbmcnXSgpKVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBfMHg0YzA0MjdbJ3l3anV4J10oY2xlYXJWYXIsIF8weDRjMDQyN1sncmdESXAnXSk7XFxuICAgIH0sXFxuICAgICdscUZpbGUnOiBmdW5jdGlvbigpIHtcXG4gICAgICAgIHZhciBfMHg1NDFkNzYgPSB7XFxuICAgICAgICAgICAgJ2FXaVJzJzogZnVuY3Rpb24oXzB4NDhkNzdiLCBfMHgxOTE2MWYsIF8weDIxY2I4NSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NDhkNzdiKF8weDE5MTYxZiwgXzB4MjFjYjg1KTtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICd3U2Zueic6IGZ1bmN0aW9uKF8weDQ4NTBlYSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NDg1MGVhKCk7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAncVJRZEEnOiAnamRSb3V0ZScsXFxuICAgICAgICAgICAgJ1dRaXFrJzogJ3ZhciB4ZFJvdXRlPVxcXCJcXFwiOycsXFxuICAgICAgICAgICAgJ3BzR2R0JzogZnVuY3Rpb24oXzB4MTcwNzgwLCBfMHgzYjUxMmEpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDE3MDc4MCA9PSBfMHgzYjUxMmE7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnaW14cmknOiAndHJ1ZScsXFxuICAgICAgICAgICAgJ25Ta2p4JzogZnVuY3Rpb24oXzB4OTViZjM4LCBfMHgzMTNmMjUpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDk1YmYzOCAhPT0gXzB4MzEzZjI1O1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ2lWTmVNJzogJ2VlTEptJyxcXG4gICAgICAgICAgICAnSXdNVGwnOiAnMHwxfDV8OXwxMXwzfDZ8N3wxMHw0fDJ8OCcsXFxuICAgICAgICAgICAgJ3hmZEhrJzogJ+aLieWPluS4u+aPkuS7tuWSjOe9kemhteiEmuacrCcsXFxuICAgICAgICAgICAgJ3JHTHVBJzogJ+S4u+aPkuS7tuWtmOaUvui3r+W+hDogL2NhY2hlL1BhcnNlX0RuLmpzXFxcXHgwYee9kemhteiEmuacrOWtmOaUvui3r+W+hDogL2NhY2hlL1BhcnNlX0RuLmh0bWwnLFxcbiAgICAgICAgICAgICd6UVNMRSc6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgICAgICAgICAnaHZpRGwnOiBmdW5jdGlvbihfMHgyNmRiNjIsIF8weDMxMmYxYykge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4MjZkYjYyKF8weDMxMmYxYyk7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnWnhVZ3QnOiAn5pON5L2c5oyH5byVJyxcXG4gICAgICAgICAgICAnc1dGb2MnOiBmdW5jdGlvbihfMHgyYTA0NGIsIF8weDE0OWEzZikge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4MmEwNDRiICsgXzB4MTQ5YTNmO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ09FaGF0JzogJ+aLieWPluS7o+eggScsXFxuICAgICAgICAgICAgJ1p2dFN1JzogJ+e8lui+keino+aekCcsXFxuICAgICAgICAgICAgJ2dYS01iJzogJ3RvYXN0Oi8v6K+35YWI5ouJ5Y+W5YiX6KGoJyxcXG4gICAgICAgICAgICAnV0NPREMnOiBmdW5jdGlvbihfMHg0YWQzZDUsIF8weDMxZmExZSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NGFkM2Q1IDwgXzB4MzFmYTFlO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ3JBa0FoJzogJ3RleHRfMycsXFxuICAgICAgICAgICAgJ3lXYU9JJzogJ+aBouWkjeaPkuS7tui3r+W+hOS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xmdW5jdGlvbiAoKXtyZXR1cm4gdHJ1ZX0pO1xcbiAgICAgICAgICAgICAgICBfMHg1NDFkNzZbJ2FXaVJzJ10ocHV0VmFyLCBfMHg1NDFkNzZbJ3FSUWRBJ10sIF8weDU0MWQ3NlsnV1FpcWsnXSk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdmFyIF8weDRkMjVmZiA9IF8weDU0MWQ3NlsnSXdNVGwnXVsnc3BsaXQnXSgnfCcpLFxcbiAgICAgICAgICAgICAgICAgICAgXzB4NGE5N2M5ID0gMHgwO1xcbiAgICAgICAgICAgICAgICB3aGlsZSAoISFbXSkge1xcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChfMHg0ZDI1ZmZbXzB4NGE5N2M5KytdKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnMCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ3hmZEhrJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWydwdWxsU2NyaXB0J10oX215U2V0WydjamNhY2hlJ10sIF9teVNldFsneDVjYWNoZSddKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2WydyR0x1QSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2Wyd6UVNMRSddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcxJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXzB4NTQxZDc2WydodmlEbCddKGV2YWwsIF8weDU0MWQ3NlsnaHZpRGwnXShnZXRWYXIsIF8weDU0MWQ3NlsncVJRZEEnXSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcyJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6ICdsaW5lX2JsYW5rJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnMyc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBfMHgyYWIzOTkgPSAnaGlrZXI6Ly9lbXB0eSNub0hpc3RvcnkjQHJ1bGU9anM6dGhpcy5kPVtdOyQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2p4SXRlbT9ydWxlPU15RmllbGThtLDigb9cXFwiKS5qeExpc3QoKTtzZXRSZXN1bHQoZCk7JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnNCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ1p4VWd0J10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogdHlwZW9mIGN6R3VpZGUgPT0gJ2Z1bmN0aW9uJyA/IGN6R3VpZGUoKSA6ICcnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2Wyd6UVNMRSddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICc1JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeGRSb3V0ZSA9IF8weDU0MWQ3Nlsnc1dGb2MnXSh4ZFJvdXRlLCBfbXlTZXRbJ3BhcnNlUm91dGUnXSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzYnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgXzB4M2E5YWZlID0gW3tcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6ICfmi4nlj5bliJfooagnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsncHVsbENvZGUnXSgn5YiX6KGoJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2WydPRWhhdCddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsncHVsbENvZGUnXSgn5Luj56CBJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2WydadnRTdSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IF8weDU0MWQ3NlsnaHZpRGwnXShmaWxlRXhpc3QsIF8weDU0MWQ3NlsnaHZpRGwnXShnZXRWYXIsICdwYXJzZVJvdXRlJykpID09ICEhW10gPyBfMHgyYWIzOTkgOiBfMHg1NDFkNzZbJ2dYS01iJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzcnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBfMHgxYTJjZGIgPSAweDA7IF8weDU0MWQ3NlsnV0NPREMnXShfMHgxYTJjZGIsIF8weDNhOWFmZVsnbGVuZ3RoJ10pOyBfMHgxYTJjZGIrKykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHgzYTlhZmVbXzB4MWEyY2RiXVsndGl0bGUnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogXzB4M2E5YWZlW18weDFhMmNkYl1bJ3VybCddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnckFrQWgnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnOCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ3lXYU9JJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWydoZlBsdWdpbiddKF9teVNldFsncGFyc2VSb3V0ZSddKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2WydzV0ZvYyddKF8weDU0MWQ3NlsneWp5aksnXSArIG15U2V0WydjaiddLCAnXFxcXG7lrZjmlL7ot6/lvoQ6IC9ydWxlcy9EdWFuTmlhbi9NeVBhcnNlLmpzb24nKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnelFTTEUnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnOSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ3RIWGVFJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogJ3RvYXN0Oi8v6K+35Zyo5LiL5pa56YCJ6aG55pON5L2cJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2WydHTVVZdSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2Wyd6UVNMRSddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcxMCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg1NDFkNzZbJ21wWkJaJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzExJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2Wyd4dnFnRiddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogJ2lucHV0JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdleHRyYSc6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGVWaXNpYmxlJzogIVtdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZWZhdWx0VmFsdWUnOiBfMHg1NDFkNzZbJ2h2aURsJ10oZ2V0VmFyLCAncGx1Z2luTGluaycpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNoYW5nZSc6IF8weDU0MWQ3NlsnaGV1S3gnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2WydJaWZpYSddLFxcbiAgICAgICAgICAgICAgICAnZGVzYyc6IF8weDU0MWQ3NlsnUEZSSEEnXSxcXG4gICAgICAgICAgICAgICAgJ3VybCc6IF8weDU0MWQ3NlsnVUx3a1QnXSxcXG4gICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2Wyd6UVNMRSddXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgIH1cXG59O1xcbiQuZXhwb3J0cyA9IGp4SXRlbTtcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuino+aekFVybOe8lui+kVwiLFwicGF0aFwiOlwiRWRp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JsQXJyYXlbaW5kZXhdO1xcbiAgICAgICAgICAgICAgICBwYXJzZVVybEFycmF5W2luZGV4XSA9IHRpdGxlICsgXFxcIiYmXFxcIiArIGlucHV0O1xcbiAgICAgICAgICAgICAgICBwYXJzZVVybFRleHQgPSBwYXJzZVVybEFycmF5LmpvaW4oXFxcIlxcXFxuXFxcIik7XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9qaWV4aS9qaWV4aS50eHRcXFwiLCBwYXJzZVVybFRleHQpO1xcbiAgICAgICAgICAgICAgICBpZiAoc2VsZWN0ZWQxID09IGdldEl0ZW0oXFxcInNlbGVjdGVkMFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXCJzZWxlY3RlZFxcXCIsIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oXFxcInNlbGVjdGVkMFxcXCIsIHRpdGxlICsgXFxcIiYmXFxcIiArIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/kv67mlLnmiJDlip9cXFwiO1xcbiAgICAgICAgICAgIH0sIHRpdGxlLCBpbmRleCk7XFxuICAgICAgICB9O1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgXFxcIjJcXFwiOlxcbiAgICAgICAgZnVuYyA9IGZ1bmN0aW9uKHVybCwgdGl0bGUsIGluZGV4KSB7XFxuICAgICAgICAgICAgcmV0dXJuICQoXFxcIuehruiupOWIoOmZpOOAjFxcXCIgKyB0aXRsZSArIFxcXCLjgI3vvJ9cXFwiKS5jb25maXJtKCh0aXRsZSwgaW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHBhcnNlVXJsVGV4dCA9IHJlcXVlc3QoXFxcImhpa2VyOi8vZmlsZXMvamlleGkvamlleGkudHh0XFxcIik7XFxuICAgICAgICAgICAgICAgIGxldCBwYXJzZVVybEFycmF5ID0gcGFyc2VVcmxUZXh0LnNwbGl0KC9cXFxcbi8pO1xcbiAgICAgICAgICAgICAgICBsZXQgc2VsZWN0ZWQxID0gcGFyc2VVcmxBcnJheVtpbmRleF07XFxuICAgICAgICAgICAgICAgIHBhcnNlVXJsQXJyYXkuc3BsaWNlKGluZGV4LCAxKTtcXG4gICAgICAgICAgICAgICAgcGFyc2VVcmxUZXh0ID0gcGFyc2VVcmxBcnJheS5qb2luKFxcXCJcXFxcblxcXCIpO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvamlleGkvamlleGkudHh0XFxcIiwgcGFyc2VVcmxUZXh0KTtcXG4gICAgICAgICAgICAgICAgaWYgKHNlbGVjdGVkMSA9PSBnZXRJdGVtKFxcXCJzZWxlY3RlZDBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBhcnNlVXJsQXJyYXlbMF0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXCJzZWxlY3RlZFxcXCIsIHBhcnNlVXJsQXJyYXlbMF0uc3BsaXQoXFxcIiYmXFxcIilbMV0gfHwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oXFxcInNlbGVjdGVkMFxcXCIsIHBhcnNlVXJsQXJyYXlbMF0pO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXCJzZWxlY3RlZFxcXCIsIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXCJzZWxlY3RlZDBcXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmVmcmVzaFB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cgPSBnZXRWYXIoJ3RoZW1lLmRuX29wdGlvbicsJ+aWsOWinicpPT09b3B0aW9uPyfwn5GJJzonJztcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTpmbGFnK29wdGlvbixcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB1cmw6JChvcHRpb24pLmxhenlSdWxlKCgpPT57XFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ3RoZW1lLmRuX29wdGlvbicsIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suiuvue9ruaTjeS9nOexu+Wei+S4ujonK2lucHV0O1xcbiAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGxldCB0aGVtZVJvdXRlID0gXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlUaGVtZS5qc29uXFxcIjtcXG4gICAgICAgIGxldCBteVRoZW1lcyA9IHt9O1xcbiAgICAgICAgbGV0IHRoZW1lcyA9IHt9O1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBteVRoZW1lcyA9IEpTT04ucGFyc2UoZmV0Y2godGhlbWVSb3V0ZSkpO1xcbiAgICAgICAgICAgIHRoZW1lcyA9IG15VGhlbWVzLnRoZW1lc1tteVRoZW1lcy5ub3dfdGhlbWVdO1xcbiAgICAgICAgfWNhdGNoIChlKSB7fVxcblxcblxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTon5a+85YWlJyxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgdXJsOiQoJycsJ+ivt+i+k+WFpeWvvOWFpeWPo+S7pCcpLmlucHV0KChteVRoZW1lcyx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBpZigvXuaWreaPkuS4u+mimEAuKj9AaHR0cC8udGVzdChpbnB1dCkpe1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWUgPSBpbnB1dC5zcGxpdCgnQCcpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IGlucHV0LnNwbGl0KCdAJylbMl07XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgn56Gu5a6a6KaB5a+85YWl5pat5o+S5Li76aKYLScrbmFtZSsnIOWQlz8nKS5jb25maXJtKChuYW1lLHVybCxteVRoZW1lcyx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250ZW50ID0gcGFyc2VQYXN0ZSh1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoYXNUaGVtZSA9IG15VGhlbWVzLnRoZW1lcy5maWx0ZXIoaXQ9Pml0Lm5hbWU9PT1uYW1lKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihoYXNUaGVtZSYmaGFzVGhlbWUubGVuZ3RoPjApe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWQgPSBudWxsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGogaW4gbXlUaGVtZXMudGhlbWVzKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG15VGhlbWVzLnRoZW1lc1tqXS5uYW1lID09PSBuYW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZCA9IGo7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWlkKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ntKLlvJXplJnor6/ml6Dms5Xopobnm5blr7zlhaU6XFxcXG4nK2lkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9nKCfopobnm5blr7zlhaXkuLvpophpZDonK2lkKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbXlUaGVtZXMudGhlbWVzW2lkXSA9IE9iamVjdC5hc3NpZ24oSlNPTi5wYXJzZShiYXNlNjREZWNvZGUoY29udGVudCkpLHsnbmFtZSc6bmFtZX0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBteVRoZW1lcy50aGVtZXMucHVzaChPYmplY3QuYXNzaWduKEpTT04ucGFyc2UoYmFzZTY0RGVjb2RlKGNvbnRlbnQpKSx7J25hbWUnOm5hbWV9KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxvZyhteVRoZW1lcyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHRoZW1lUm91dGUsSlNPTi5zdHJpbmdpZnkobXlUaGVtZXMpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5oiQ5Yqf5a+85YWl5Li76aKYOlxcXFxuJytuYW1lXFxuICAgICAgICAgICAgICAgICAgICB9LG5hbWUsdXJsLG15VGhlbWVzLHRoZW1lUm91dGUpO1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ml6Dms5Xor4bliKvnmoTlr7zlhaXlj6Pku6Q6XFxcXG4nK2lucHV0O1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSxteVRoZW1lcyx0aGVtZVJvdXRlKSxcXG4gICAgICAgIH0pO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTon5paw5aKeJyxcXG4gICAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgdXJsOiQoKS5ydWxlKChteVRoZW1lcyx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICBsZXQgZD1bXTtcXG4gICAgICAgICAgICAgICAgYWRkTGlzdGVuZXIoJ29uQ2xvc2UnLCAkLnRvU3RyaW5nKCgpPT57XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgfSkpO1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfkuLvpopjlkI3np7AnLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuaWreaPki3ok53ojpPkuLvpophcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogXFxcInB1dFZhcigndGhlbWUubmV3X2FkZF9uYW1lJyxpbnB1dClcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogdHJ1ZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldFZhcigndGhlbWUubmV3X2FkZF9uYW1lJywgJycpXFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdfYWRkX25hbWUgPSBnZXRWYXIoJ3RoZW1lLm5ld19hZGRfbmFtZScsICcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L2g6L6T5YWl55qE5pivOicrbmV3X2FkZF9uYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImlucHV0XFxcIlxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLku6PnoIFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2UsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRWYXIoJ3RoZW1lLm5ld19hZGRfY29kZScsICcnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBcXFwidGV4dGFyZWFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDotMSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogJ3B1dFZhcihcXFwidGhlbWUubmV3X2FkZF9jb2RlXFxcIixpbnB1dCknXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6J+S/neWtmCcsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTondGV4dF9jZW50ZXJfMScsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6JCgpLmxhenlSdWxlKChteVRoZW1lcyx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gZ2V0VmFyKCd0aGVtZS5uZXdfYWRkX2NvZGUnLCAnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWUgPSBnZXRWYXIoJ3RoZW1lLm5ld19hZGRfbmFtZScsICcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZighbmFtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kvaDov5jmsqHloavlhpnkuLvpopjlkI3np7DlkaInXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdUaGVtZSA9IHt9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld1RoZW1lID0gSlNPTi5wYXJzZShjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9Y2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mUmeivr+eahOS4u+mimGpzb27moLzlvI86XFxcXG4nK2UubWVzc2FnZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihuZXdUaGVtZSx7J25hbWUnOm5hbWV9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBteVRoZW1lcy50aGVtZXMucHVzaChuZXdUaGVtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHRoZW1lUm91dGUsSlNPTi5zdHJpbmdpZnkobXlUaGVtZXMpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5paw5aKe5pat5o+S5Li76aKYOicrbmFtZVxcbiAgICAgICAgICAgICAgICAgICAgfSxteVRoZW1lcyx0aGVtZVJvdXRlKVxcbiAgICAgICAgICAgICAgICB9KTtcXG4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wiOlxcXCIjRDA2QjZDXFxcIn19O1xcbiAgICAgICAgICAgICAgICBsZXQgdGhlbWVSb3V0ZSA9IFxcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL015VGhlbWUuanNvblxcXCI7XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh0aGVtZVJvdXRlLEpTT04uc3RyaW5naWZ5KHtub3dfdGhlbWU6J+m7mOiupOS4u+mimCcsdGhlbWVzOlt0aGVtZXMsdGhlbWVEZWZdfSkpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aWreaPkuS4u+mimOW3sumHjee9ruS4uuWHuuWOguiuvue9ridcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSk7XFxuICAgICAgICBmb3IodmFyIGkgaW4gbXlUaGVtZXMudGhlbWVzKXtcXG4gICAgICAgICAgICBsZXQgbm93VGhlbSA9IG15VGhlbWVzLnRoZW1lc1tpXTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTpteVRoZW1lcy5ub3dfdGhlbWU9PT1ub3dUaGVtLm5hbWU/J/CfkYknK25vd1RoZW0ubmFtZTpub3dUaGVtLm5hbWUsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidmbGV4X2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIHVybDokKCkubGF6eVJ1bGUoKG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG9wdGlvbiA9IGdldFZhcigndGhlbWUuZG5fb3B0aW9uJywn5paw5aKeJyk7XFxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKG9wdGlvbil7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAn5a+85Ye6JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG15dGhlbWVDb2RlID0gYmFzZTY0RW5jb2RlKEpTT04uc3RyaW5naWZ5KG15dGhlbWUpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHNoYXJlUGFzdGUobXl0aGVtZUNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9ICfmlq3mj5LkuLvpophAJytteXRoZW1lLm5hbWUrJ0AnK3VybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29weShjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWvvOWHuuS4uuS6keWPo+S7pOW5tuWkjeWItuWIsOWJquWIh+advydcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICfkv67mlLknOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChKU09OLnN0cmluZ2lmeShteXRoZW1lKSkuaW5wdXQoKG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobXl0aGVtZS5uYW1lPT09bXlUaGVtZXMubm93X3RoZW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5q2k5Li76aKY5b2T5YmN5q2j5Zyo5L2/55So5Lit77yM5LiN5YWB6K645L+u5pS5ISdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG15VGhlbWVzLnRoZW1lc1tpXT1KU09OLnBhcnNlKGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh0aGVtZVJvdXRlLEpTT04uc3RyaW5naWZ5KG15VGhlbWVzKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lkv67mlLknXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sbXl0aGVtZSxteVRoZW1lcyxpLHRoZW1lUm91dGUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAn5Yig6ZmkJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ+ehruiupOWIoOmZpOS4u+mimDonK215dGhlbWUubmFtZSsnPycpLmNvbmZpcm0oKG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobXl0aGVtZS5uYW1lPT09bXlUaGVtZXMubm93X3RoZW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5q2k5Li76aKY5b2T5YmN5q2j5Zyo5L2/55So5Lit77yM5LiN5YWB6K645Yig6ZmkISdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG15VGhlbWVzLnRoZW1lcy5zcGxpY2UoaSwxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh0aGVtZVJvdXRlLEpTT04uc3RyaW5naWZ5KG15VGhlbWVzKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LliKDpmaQnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sbXl0aGVtZSxteVRoZW1lcyxpLHRoZW1lUm91dGUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbXlUaGV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HRvbicsXFxuICAgICAgICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChvcHRpb24pPT57XFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2RuLmp4bV9vcHRpb24nLCBvcHRpb24pO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xcbiAgICAgICAgICAgICAgICB9LG9wdGlvbiksXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgICAgICBsZXQganhzUm91dGUgPSBcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeUppZXhpLmpzb25cXFwiO1xcbiAgICAgICAgbGV0IE15SmlleGkgPSB7amlleGlzOltdfTtcXG4gICAgICAgIGxldCBqaWV4aXMgPSB7fTtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgTXlKaWV4aSA9IEpTT04ucGFyc2UoZmV0Y2goanhzUm91dGUpKTtcXG4gICAgICAgICAgICBqaWV4aXMgPSBNeUppZXhpLmppZXhpcy5maWx0ZXIoaXQ9Pml0Lm5hbWU9PT1NeUppZXhpLm5vdylbMF07XFxuICAgICAgICB9Y2F0Y2ggKGUpIHt9XFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiflr7zlhaUnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICB1cmw6JCgnJywn6K+36L6T5YWl5a+85YWl5Y+j5LukJykuaW5wdXQoKE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgIGlmKC9e6a2U5pat6Kej5p6Q6YWN572uQC4qP0BodHRwLy50ZXN0KGlucHV0KSl7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgbmFtZSA9IGlucHV0LnNwbGl0KCdAJylbMV07XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gaW5wdXQuc3BsaXQoJ0AnKVsyXTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCfnoa7lrpropoHlr7zlhaXmlq3mj5Lop6PmnpDphY3nva4tJytuYW1lKycg5ZCXPycpLmNvbmZpcm0oKG5hbWUsdXJsLE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRlbnQgPSBwYXJzZVBhc3RlKHVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhhc0l0ID0gTXlKaWV4aS5qaWV4aXMuZmlsdGVyKGl0PT5pdC5uYW1lPT09bmFtZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoaGFzSXQmJmhhc0l0Lmxlbmd0aD4wKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGlkID0gbnVsbDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBqIGluIE15SmlleGkuamlleGlzKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKE15SmlleGkuamlleGlzW2pdLm5hbWUgPT09IG5hbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkID0gajtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighaWQpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+e0ouW8lemUmeivr+aXoOazleimhuebluWvvOWFpTpcXFxcbicraWRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2coJ+imhuebluWvvOWFpeS4u+mimGlkOicraWQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmppZXhpc1tpZF0gPSBPYmplY3QuYXNzaWduKEpTT04ucGFyc2UoYmFzZTY0RGVjb2RlKGNvbnRlbnQpKSx7J25hbWUnOm5hbWV9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXMucHVzaChPYmplY3QuYXNzaWduKEpTT04ucGFyc2UoYmFzZTY0RGVjb2RlKGNvbnRlbnQpKSx7J25hbWUnOm5hbWV9KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suaIkOWKn+WvvOWFpeino+aekOmFjee9rjpcXFxcbicrbmFtZVxcbiAgICAgICAgICAgICAgICAgICAgfSxuYW1lLHVybCxNeUppZXhpLGp4c1JvdXRlKTtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5peg5rOV6K+G5Yir55qE5a+85YWl5Y+j5LukOlxcXFxuJytpbnB1dDtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sTXlKaWV4aSxqeHNSb3V0ZSksXFxuICAgICAgICB9KTtcXG5cXG4gICAgICAgIGxldCBpc0F1dG8gPSBNeUppZXhpLmlzQXV0bztcXG4gICAgICAgIGxldCBhdXRvTW9kZSA9IE15SmlleGkuYXV0b01vZGU7XFxuICAgICAgICBsZXQgdGlwcyA9ICfop6PmnpDphY3nva7liJfooag65YWx6K6hOicrY29sb3IoTXlKaWV4aS5qaWV4aXMubGVuZ3RoLCcjZmY3MDAwJykrJ+S4qumFjee9rizoh6rliqjmoaPlvIDlhbM6Jytjb2xvcihpc0F1dG8/J+W8gCc6J+WFsycsJyNmZjcwMDAnKTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6TXlKaWV4aS5qaWV4aXMmJk15SmlleGkuamlleGlzLmxlbmd0aD4wP3RpcHM6XFxcIuesrOS4gOasoeWKoOi9ve+8jOeCueatpOi/m+WOu+WIneWni+WMluino+aekOWIl+ihqFxcXCIsXFxuICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfMScsXFxuICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgIGlmKE15SmlleGkuamlleGlzJiZNeUppZXhpLmppZXhpcy5sZW5ndGg+MCl7XFxuICAgICAgICAgICAgICAgICAgICBNeUppZXhpLmlzQXV0byA9ICFNeUppZXhpLmlzQXV0bztcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB0aXBzID0gTXlKaWV4aS5pc0F1dG8/J+W8gCc6J+WFsyc7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey6K6+572u6Ieq5Yqo5qGj5qih5byP5Li6OicrdGlwc1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBpbml0U2V0ID0geydub3cnOlxcXCLpgZPplb/mjqjojZBcXFwiLCdqaWV4aXMnOlt7bmFtZTon6YGT6ZW/5o6o6I2QJyxxeTpbJ+S9oOeIueenkeaKgCddLHlrOlsn6aKG6YW3J10sdHg6WyfojaP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Gl0bGU6c21hbGwoJ+WFqOWxgOino+aekOi2heaXtjonKStjb2xvcihqeFRpbWVvdXQsJyNmZjcwMDAnKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTondGV4dF8yJyxcXG4gICAgICAgICAgICB1cmw6JChqeFRpbWVvdXQsJ+ivt+iuvue9rumtlOaWreino+aekOi2heaXtizlv4XpobvkuLrmlbTmlbAnKS5pbnB1dCgoKT0+e1xcbiAgICAgICAgICAgICAgICBpZighcGFyc2VJbnQoaW5wdXQpKXtcXG4gICAgICAgICAgICAgICAgICAgIGlucHV0ID0gNzAwMDtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBwdXRWYXIoJ2RwLmp4VGltZW91dCcsaW5wdXQpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suiuvue9ruS4ujonK3BhcnNlSW50KGlucHV0KVxcbiAgICAgICAgICAgIH0sanhUaW1lb3V0KVxcbiAgICAgICAgfSk7XFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAn5omT5byA57yW6L6R6Kej5p6Q5paH5Lu2JyxcXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGp4c1JvdXRlKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnZWRpdEZpbGU6Ly8nK2p4c1JvdXRlO1xcbiAgICAgICAgICAgIH0sanhzUm91dGUpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgIH0pO1xcblxcbiAgICAgICAgZm9yKGxldCBpIGluIE15SmlleGkuamlleGlzKXtcXG4gICAgICAgICAgICBsZXQgbm93SnggPSBNeUppZXhpLmppZXhpc1tpXTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTpNeUppZXhpLm5vdz09PW5vd0p4Lm5hbWU/J/CfkYknK25vd0p4Lm5hbWU6bm93SngubmFtZSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6J2ZsZXhfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgZXh0cmE6e1xcbiAgICAgICAgICAgICAgICAgICAgbm93Sng6bm93SngsXFxuICAgICAgICAgICAgICAgICAgICBNeUppZXhpOk15SmlleGksXFxuICAgICAgICAgICAgICAgICAgICBqeHNSb3V0ZTpqeHNSb3V0ZVxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgobm93SngsTXlKaWV4aSxpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG9wdGlvbiA9IGdldFZhcignZG4uanhtX29wdGlvbicsJ+mAieaLqScpO1xcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChvcHRpb24pe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ+WvvOWHuic6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub3dKeENvZGUgPSBiYXNlNjRFbmNvZGUoSlNPTi5zdHJpbmdpZnkobm93SngpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHNoYXJlUGFzdGUobm93SnhDb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSAn6a2U5pat6Kej5p6Q6YWN572uQCcrbm93SngubmFtZSsnQCcrdXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3B5KGNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5a+85Ye65Li65LqR5Y+j5Luk5bm25aSN5Yi25Yiw5Ymq5YiH5p2/J1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ+S/ruaUuSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlmKG5vd0p4Lm5hbWU9PT1NeUppZXhpLm5vdyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vICAgICByZXR1cm4gJ3RvYXN0Oi8v5q2k6Kej5p6Q6YWN572u5b2T5YmN5q2j5Zyo5L2/55So5Lit77yM5LiN5YWB6K645L+u5pS5ISdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBlbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvanhFZGl0P3J1bGU9TXlGaWVsZOG0sOKBvydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9qeEVkaXQ/cnVsZT1NeUZpZWxk4bSw4oG/J1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ+WIoOmZpCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCfnoa7orqTliKDpmaTop6PmnpDphY3nva46Jytub3dKeC5uYW1lKyc/JykuY29uZmlybSgobm93SngsTXlKaWV4aSxpLGp4c1JvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobm93SngubmFtZT09PU15SmlleGkubm93KXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5q2k6Kej5p6Q6YWN572u5b2T5YmN5q2j5Zyo5L2/55So5Lit77yM5LiN5YWB6K645Yig6ZmkISdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzLnNwbGljZShpLDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWIoOmZpCdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxub3dKeCxNeUppZXhpLGksanhzUm91dGUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5ub3c9bm93SngubmFtZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KE15SmlleGkpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kvaDpgInmi6nkuoYnK25vd0p4Lm5hbWUrJ+S9nOS4uuW9k+WJjeino+aekOmFjee9ric7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sbm93SngsTXlKaWV4aSxpLGp4c1JvdXRlKSxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgfVxcbiQuZXhwb3J0cy5qeE1hbmFnZT1qeE1hbmFnZTtcIn0se1wibmFtZVwiOlwi6Kej5p6Q57yW6L6RXCIsXCJwYXRoXCI6XCJqeEVkaXRcIixcInJ1bGVcIjpcImpzOlxcbiAgICBsZXQge25vd0p4LE15SmlleGksanhzUm91dGV9ID0gTVlfUEFSQU1TO1xcbmxldCBub3dKeFQgPSBKU09OLnBhcnNlKGdldFZhcignZG4ubm93SngnKX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cyA9IG5vd0p4W2pkc1tqXV18fFtdO1xcbiAgICBsZXQgdGl0bGUgPSBqZHNbal07XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTp0aXRsZURpY1t0aXRsZV18fHRpdGxlLFxcbiAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHRpdGxlcyx0aXRsZSxqeHMsanhzUm91dGUsTXlKaWV4aSxub3dKeCk9PntcXG4gICAgICAgICAgICB2YXIganNvbj17dGl0bGU6W10sY29kZXM6e319O1xcbiAgICAgICAgICAgIGxldCBzZXRGaWxlID0gcmVxdWVzdCgnaGlrZXI6Ly9maWxlcy9ydWxlcy9EdWFuTmlhbi9NeVBhcnNlLmpzb24nKTtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBldmFsKCdqc29uPScrc2V0RmlsZSk7XFxuICAgICAgICAgICAgfWNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgIGxvZygnSnNvbuino+aekOWPkeeUn+S6humUmeivrzonK2UubWVzc2FnZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmKGdldFZhcignZG4uanhtX3dyaXRlTW9kZScsJ+aWsOWinicpPT09J+aWsOWinicpe1xcbiAgICAgICAgICAgICAgICBsZXQgc2VsX3RpdGxlID0gdGl0bGVzLmZpbHRlcihpdD0+IWp4cy5pbmNsdWRlcyhpdCkpO1xcbiAgICAgICAgICAgICAgICBzZWxfdGl0bGUgPSBzZWxfdGl0bGUubWFwKChpdCk9PntcXG4gICAgICAgICAgICAgICAgICAgIGxldCBmbGFnID0gJ+KAmOKAmOKTiuKAmeKAmSc7XFxuICAgICAgICAgICAgICAgICAgICBpZih0eXBlb2YoanNvbi5jb2Rlc1tpdF0pPT09J2Z1bmN0aW9uJyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZmxhZyA9ICfigJzigJzikr/igJ3igJ0nO1xcbiAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYodHlwZW9mKGpzb24uY29kZXNbaXRdKT09PSd1bmRlZmluZWQnKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmbGFnID0gJyc7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmxhZytpdFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQoc2VsX3RpdGxlLDIpLnNlbGVjdCgoTXlKaWV4aSxqeHMsbm93SngsdGl0bGUsanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICBpbnB1dCA9IGlucHV0LnJlcGxhY2UoL+KAmOKAmOKTiuKAmeKAmXzigJzigJzikr/igJ3igJ0vZywnJyk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgaWQgPSBudWxsO1xcbiAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBqIGluIE15SmlleGkuamlleGlzKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihNeUppZXhpLmppZXhpc1tqXS5uYW1lID09PSBub3dKeC5uYW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQgPSBqO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBpZighaWQpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ntKLlvJXplJnor6/ml6Dms5Xkv53lrZg6XFxcXG4nK2lkXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBqeHMucHVzaChpbnB1dCk7XFxuICAgICAgICAgICAgICAgICAgICBsb2coanhzKTtcXG4gICAgICAgICAgICAgICAgICAgIG5vd0p4W3RpdGxlXSA9IGp4cztcXG4gICAgICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzW2lkXSA9IG5vd0p4O1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkbi5ub3dKeCcsSlNPTi5zdHJpbmdpZnkobm93SngpKTtcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSxNeUppZXhpLGp4cyxub3dKeCx0aXRsZSxqeHNSb3V0ZSk7XFxuICAgICAgICAgICAgfWVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSx0aXRsZXMsdGl0bGUsanhzLGp4c1JvdXRlLE15SmlleGksbm93SngpXFxuICAgIH0pO1xcbiAgICBmb3IobGV0IGsgaW4ganhzKXtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6anhzW2tdLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgodGl0bGVzLHRpdGxlLGp4cyxqeHNSb3V0ZSxNeUppZXhpLG5vd0p4LG5qeCxpZCxrLG1heCk9PntcXG4gICAgICAgICAgICAgICAgc3dpdGNoIChnZXRWYXIoJ2RuLmp4bV93cml0ZU1vZGUnLCfmlrDlop4nKSl7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICfliKDpmaQnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIEFycmF5LnByb3RvdHlwZS5yZW1vdmUgPSBmdW5jdGlvbih2YWwpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGluZGV4ID0gdGhpcy5pbmRleE9mKHZhbCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbmRleCA+IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNwbGljZShpbmRleCwgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGp4cy5yZW1vdmUobmp4KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBub3dKeFt0aXRsZV0gPSBqeHM7XFxuICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXNbaWRdID0gbm93Sng7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkbi5ub3dKeCcsSlNPTi5zdHJpbmdpZnkobm93SngpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ+enu+WKqCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoaywn56e75Yqo5Yiw57Si5byV5aSa5bCRPycpLmlucHV0KChrLG1heCxqeHMsbm93SngsTXlKaWV4aSxpZCx0aXRsZSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gTW92ZShhcnIsIGZyb21JbmRleCwgdG9JbmRleCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGVsZW1lbnQgPSBhcnJbZnJvbUluZGV4XTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyci5zcGxpY2UoZnJvbUluZGV4LCAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyci5zcGxpY2UodG9JbmRleCwgMCwgZWxlbWVudCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocGFyc2VJbnQoaW5wdXQpPT09ayl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5ZWl5Lmf5rKh5YGaJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihwYXJzZUludChpbnB1dCk+bWF4LTF8fHBhcnNlSW50KGlucHV0KTwtMSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L2g5pyA5aSn56e75Yqo6IyD5Zu0MC0nK3BhcnNlSW50KG1heC0xKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsZXQgbmV3QXIgPSBqeHMuc3BsaWNlKGssIDEpOyAvLyDliKDmjolcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8ganhzLnVuc2hpZnQobmV3QXJbMF0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBNb3ZlKGp4cyxrLHBhcnNlSW50KGlucHV0KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vd0p4W3RpdGxlXSA9IGp4cztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXNbaWRdID0gbm93Sng7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcignZG4ubm93SngnLEpTT04uc3RyaW5naWZ5KG5vd0p4KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxrLG1heCxqeHMsbm93SngsTXlKaWV4aSxpZCx0aXRsZSxqeHNSb3V0ZSlcXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+atpOWFg+e0oOS4jeaUr+aMgei/m+ihjDonK2dldFZhcignZG4uanhtX3dyaXRlTW9kZScsJ+aWsOWinicpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LHRpdGxlcyx0aXRsZSxqeHMsanhzUm91dGUsTXlKaWV4aSxub3dKeCxqeHNba10saWQsayxqeHMubGVuZ3RoKVxcbiAgICAgICAgfSk7XFxuICAgIH1cXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIGNvbF90eXBlOidsaW5lJ1xcbiAgICB9KVxcbn1cXG5cXG5kLnB1c2goe1xcbiAgICB0aXRsZTon5L+d5a2YJyxcXG4gICAgY29sX3R5cGU6J3RleHRfY2VudGVyXzEnLFxcbiAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoTXlKaWV4aSxpZCxqeHNSb3V0ZSk9PntcXG4gICAgICAgIGlmKGdldFZhcignZG4uanhtX25hbWUnLCcnKSE9PU15SmlleGkuamlleGlzW2lkXS5uYW1lKXtcXG4gICAgICAgICAgICBpZkhhcyA9IE15SmlleGkuamlleGlzLmZpbHRlcihpdD0+aXQubmFtZT09PWdldFZhcignZG4uanhtX25hbWUnLCcnKSkubGVuZ3RoPjA7XFxuICAgICAgICAgICAgaWYoaWZIYXMpe1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5b6F5L+u5pS555qE5ZCN56ew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