Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@MyFieldᴰⁿ@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiTXlGaWVsZOG0sOKBvyIsImF1dGhvciI6IuaWreW/tSbpgZPplb/prZTmlLkiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IiwidmVyc2lvbiI6MzkwLCJjb2xfdHlwZSI6InRleHRfY2VudGVyXzEiLCJjbGFzc19uYW1lIjoiIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG4vL2xvZyhNT0JJTEVfVUEpO1xuICAgIGNvbnN0IHtkZW1vRGF0YSxkZWZhdWx0U2V0cyxmbG9vcnN9ID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL2RlbW9EYXRhP3J1bGU9TXlGaWVsZOG0sOKBv1wiKTtcbmNvbnN0IHtnZXRPbmUsdW5pcXVlMixkdXBsaWNhdGVzfSA9ICQucmVxdWlyZShcImhpa2VyOi8vcGFnZS91dGlscz9ydWxlPU15RmllbGThtLDigb9cIik7XG5sZXQgc2pUZXN0ID1bXTtmb3IobGV0IGkgaW4gZGVtb0RhdGEpe3NqVGVzdD1zalRlc3QuY29uY2F0KGRlbW9EYXRhW2ldKX1cbnRoaXMuZCA9IFtdO1xuY29uc3QganhJdGVtID0gJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL2p4SXRlbT9ydWxlPU15RmllbGThtLDigb9cIik7XG52YXIgUm91dGUgPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvUm91dGU/cnVsZT1NeUZpZWxk4bSw4oG/XCIpO1xuZXZhbChnZXRJdGVtKCdteUZ1bmN0aW9uJ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lmKGdldEl0ZW0oJ2RuLnRlc3RfbW9kZScpPT09J+aWreaPkicmJiEvXuS4jemAiSR8XumtlOaWrSQvLnRlc3QodGl0bGUpKXtcbiAgICAgICAgICAgICAgICBldmFsKFwidmFyIGNvbmZpZyA9XCIgKyBmZXRjaChcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlQYXJzZVNldC5qc29uXCIpKTtcbiAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xuICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGdldEl0ZW0oXCJzZWxlY3RlZDBcIiwgXCImJlwiKS5zcGxpdChcIiYmXCIpWzBdLnJlcGxhY2UoL/CfkYkvZywnJykucmVwbGFjZSgv5LiN6YCJL2csJycpO1xuICAgICAgICAgICAgICAgIGxvZygn5byA5aeL6LCD55So5pat5o+S5rWL6K+VLG15RmlsZWTotoXml7bkuLo6JytnZXRJdGVtKCdkbi50aW1lb3V0JywnNTAwMCcpKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHVybCx0aXRsZSxwYXJzZUludChnZXRJdGVtKCdkbi50aW1lb3V0JywnNTAwMCcpKSk7XG4gICAgICAgICAgICB9ZWxzZSBpZihnZXRJdGVtKCdkbi50ZXN0X21vZGUnKT09PSfmlq3mj5InJiYvXumtlOaWrSQvLnRlc3QodGl0bGUpKXtcbiAgICAgICAgICAgICAgICBldmFsKFwidmFyIGNvbmZpZyA9XCIgKyBmZXRjaChcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlQYXJzZVNldC5qc29uXCIpKTtcbiAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xuICAgICAgICAgICAgICAgIGxvZygn5byA5aeL6LCD55So6a2U5pat5ouf55yf5rWL6K+VLG15RmlsZWTotoXml7bkuLo6JytnZXRJdGVtKCdkbi50aW1lb3V0JywnNTAwMCcpKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnN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k7XG4gICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+W3suiuvue9ruS4uumtlOaWreino+aekO+8jOWPr+ebtOaOpeinpuWPkeWkh+iDjuaooeW8j1wiO1xuICAgICAgICB9XG4gICAgICAgIGxldCBpID0gcmVhbFRpdGxlcy5pbmRleE9mKGlucHV0KTtcbiAgICAgICAgbGV0IHVybCA9IHVybEFycltpXTtcbiAgICAgICAgbG9nKFwiXFxu5pu05pS55o6l5Y+jPiBcIiArIHVybCk7XG4gICAgICAgIGlmKHR5cGVvZih1cmwpIT09J3N0cmluZycpe1xuICAgICAgICAgICAgbG9nKCQudG9TdHJpbmcodXJsKSk7XG4gICAgICAgICAgICBzZXRJdGVtKFwic2VsZWN0ZWRcIiwgJC50b1N0cmluZyh1cmwpKTtcbiAgICAgICAgICAgIC8vIHJldHVybiAndG9hc3Q6Ly/mmoLkuI3mlK/mjIHmlq3mj5JmdW5jdGlvbuezu+WIl+eahOmrmOe6p+ino+aekOa1i+ivlSdcbiAgICAgICAgfWVsc2V7XG4gICAgICAgICAgICBzZXRJdGVtKFwic2VsZWN0ZWRcIiwgdXJsKTtcbiAgICAgICAgfVxuICAgICAgICBzZXRJdGVtKFwic2VsZWN0ZWQwXCIsIGlucHV0ICsgXCImJlwiICsgdXJsKTtcbiAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xuICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+WIh+aNouino+aekOWPo+S4ujpcIitpbnB1dDtcbiAgICB9LCByZWFsVGl0bGVzLHVybEFyciksXG4gICAgY29sX3R5cGU6IFwic2Nyb2xsX2J1dHRvblwiXG59KTtcbmQucHVzaCh7XG4gICAgdGl0bGU6J/CfjYDkuLvpopgnLFxuICAgIHVybDogXCJoaWtlcjovL3BhZ2UvUm91dGU/cnVsZT1NeUZpZWxk4bSw4oG/JnR5cGU95Li76aKYI25vSGlzdG9yeSMjbm9SZWNvcmRIaXN0b3J5I1wiLFxuICAgIGNvbF90eXBlOiB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e25LiN5piv5b6I5aW9JykuY29uZmlybSgodGl0bGVBcnIsdXJsQXJyKT0+e1xuICAgICAgICAvL3VybEFycj11cmxBcnIuc2xpY2UoMik7XG4gICAgICAgIHRpdGxlQXJyPXRpdGxlQXJyLmZpbHRlcihpdD0+IS/kuI3pgIl86a2U5patLy50ZXN0KGl0KSk7XG4gICAgICAgIGxldCBtb2RlID0gZ2V0SXRlbSgnZG4udGVzdF9tb2RlJywnUeelnicpO1xuICAgICAgICBpZihtb2RlPT09J+aWreaPkid8fG1vZGU9PT0nUeelnicpe1xuICAgICAgICAgICAgbGV0IGp4Q29kZSA9IFtdO1xuICAgICAgICAgICAgdGl0bGVBcnIuZm9yRWFjaCgoaXQpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGkgPSB0aXRsZUFyci5pbmRleE9mKGl0KTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSB1cmxBcnJbaV07XG4gICAgICAgICAgICAgICAgICAgIGxldCBvdXRDb2RlID0gKHR5cGVvZihjb2RlKT09PSdzdHJpbmcnfHx0eXBlb2YoY29kZSk9PT0ndW5kZWZpbmVkJyk/Y29kZTpiYXNlNjRFbmNvZGUoY29kZS50b1N0cmluZygpKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IG91dFRpdGxlID0gaXQucmVwbGFjZSgv8J+RiS9nLCcnKTtcbiAgICAgICAgICAgICAgICAgICAgaWYob3V0VGl0bGUuc3RhcnRzV2l0aCgnaHR0cCcpJiYodHlwZW9mKG91dENvZGUpPT09J3VuZGVmaW5lZCd8fCFvdXRDb2RlKSl7XG4gICAgICAgICAgICAgICAgICAgICAgICBqeENvZGUucHVzaChvdXRUaXRsZSsnLCcrb3V0VGl0bGUpO1xuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcbiAgICAgICAgICAgICAgICAgICAgICAgIGp4Q29kZS5wdXNoKG91dFRpdGxlKycsJytvdXRDb2RlfHwnJylcbiAgICAgICAgICAgICAgICAgICAgfV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ifmlK/mjIHmraTmj5Lku7blr7zlh7rmoLzlvI/nmoTmlofmnKzov5vooYzlr7zlhaXjgIJcXG7moLzlvI8xOiDlkI3np7As5Zyw5Z2AIOS4gOihjOS4gOS4quino+aekFxcbuagvOW8jzI65LqR5Ymq5YiH5p2/IOmtlOaWreino+aekOWvvOWFpeWPo+S7pMKlwqXliarliIfmnb/lnLDlnYAnLFxuICAgICAgICAgICAgdXJsOidoaWtlcjovL2VtcHR5J1xuICAgICAgICB9KTtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIGRlc2M6IFwidHh05paH5pys6Kej5p6Q6KeE5YiZLOS4gOihjOS4gOS4qlwiLFxuICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXG4gICAgICAgICAgICB0aXRsZTon6Kej5p6Q5paH5pysJyxcbiAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiBmYWxzZSxcbiAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6IGdldFZhcignZG4uaW1wb3J0X3RleHQnLCAnJyksXG4gICAgICAgICAgICAgICAgdHlwZTogXCJ0ZXh0YXJlYVwiLFxuICAgICAgICAgICAgICAgIGhlaWdodDotMSxcbiAgICAgICAgICAgICAgICBvbkNoYW5nZTogJ3B1dFZhcihcImRuLmltcG9ydF90ZXh0XCIsaW5wdXQpJ1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOifwn5Ol5a+85YWlJyxcbiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0X2NlbnRlcl8xJyxcbiAgICAgICAgICAgIHVybDokKCfnoa7lrprnvJbovpHlpb3kuoblkJc/5q2k5pON5L2c5bCG6KaG55uW5pys5Zyw5bey5pyJ55qE6K6w5b2V77yM5bu66K6u5aSH5Lu95ZCO55So56m65paH5Lu25a+85YWlJykuY29uZmlybSgoKT0+e1xuICAgICAgICAgICAgICAgIGNvbnN0IHtkZWZhdWx0U2V0c30gPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvZGVtb0RhdGE/cnVsZT1NeUZpZWxk4bSw4oG/XCIpO1xuICAgICAgICAgICAgICAgIGxldCBwYXJzZVJvdXRlID0gJ2hpa2VyOi8vZmlsZXMvcnVsZXMvRHVhbk5pYW4vTXlQYXJzZS5qc29uJztcbiAgICAgICAgICAgICAgICBsZXQganNDb2RlID0gZmV0Y2gocGFyc2VSb3V0ZSl8fEpTT04uc3RyaW5naWZ5KHt0aXRsZTpbXSxjb2Rlczp7fSxzZXR0aW5nczpkZWZhdWx0U2V0c30pO1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIGV2YWwoJ3ZhciBqc29uID0nICsganNDb2RlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WPkeeUn+mUmeivrzpcXG4nK2UubWVzc2FnZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQgdG9JbXBvcnQgPSBnZXRWYXIoXCJkbi5pbXBvcnRfdGV4dFwiKTtcbiAgICAgICAgICAgICAgICBpZigv6a2U5pat6Kej5p6Q5a+85YWl5Y+j5LukwqXCpS8udGVzdCh0b0ltcG9ydCkmJnRvSW1wb3J0LnNwbGl0KCfCpcKlJykubGVuZ3RoPjEpe1xuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gdG9JbXBvcnQuc3BsaXQoJ8KlwqUnKVsxXTtcbiAgICAgICAgICAgICAgICAgICAgaWYoIS9eaHR0cC8udGVzdCh1cmwpKXtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/liarliIfmnb/lnLDlnYDmnInor68s5a+85YWl5aSx6LSlJ1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHRvSW1wb3J0ID0gcGFyc2VQYXN0ZSh1cmwpO1xuICAgICAgICAgICAgICAgICAgICB0b0ltcG9ydCA9IGJhc2U2NERlY29kZSh0b0ltcG9ydCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxldCBqaWV4aSA9IHRvSW1wb3J0LnNwbGl0KCdcXG4nKTtcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VUaXRsZSA9IFtdO1xuICAgICAgICAgICAgICAgIGxldCBwYXJzZUNvZGUgPSB7fTtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpIGluIGppZXhpKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZT1qaWV4aVtpXS5zcGxpdCgnLCcpWzBdO1xuICAgICAgICAgICAgICAgICAgICBsZXQgY29kZT1qaWV4aVtpXS5zcGxpdCgnLCcpWzFdO1xuICAgICAgICAgICAgICAgICAgICBwYXJzZVRpdGxlLnB1c2godGl0bGUpO1xuICAgICAgICAgICAgICAgICAgICBpZighKGNvZGUucmVwbGFjZSgvW1xcc10vZywnJykuc3RhcnRzV2l0aCgnaHR0cCcpKSl7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2codGl0bGUrJ+S4uuWHveaVsOino+aekCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYoY29kZS5yZXBsYWNlKC9bXFxzXS9nLCcnKS5sZW5ndGg+MjApey8v6KeG5Li6ZnVuY3Rpb25cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlID0gZXZhbChiYXNlNjREZWNvZGUoY29kZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsb2coY29kZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfWNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvZGUgPSBlLm1lc3NhZ2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZVt0aXRsZV09Y29kZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGV0IHNjT2JqZWN0ID0gW1wiQ2l0eUlQXCIsIFwicGNVQVwiLCBcImNhY2hlTTN1OFwiLCBcImRlZmF1bHRQYXJzZVdlYlwiLFwibWFvc3NcIiwgXCJMTFFcIl07XG4gICAgICAgICAgICAgICAgcGFyc2VUaXRsZSA9IHBhcnNlVGl0bGU/cGFyc2VUaXRsZS5maWx0ZXIoaXQ9PiFzY09iamVjdC5pbmNsdWRlcyhpdCkpOltdO1xuICAgICAgICAgICAgICAgIHZhciBuZXdQYXJzZVRpdGxlID0ganNvbi50aXRsZS5jb25jYXQocGFyc2VUaXRsZSk7XG4gICAgICAgICAgICAgICAganNvbi50aXRsZSA9IEFycmF5LmZyb20obmV3IFNldChuZXdQYXJzZVRpdGxlKSk7XG4gICAgICAgICAgICAgICAgT2JqZWN0LmFzc2lnbihqc29uLmNvZGVzLCBwYXJzZUNvZGUpO1xuICAgICAgICAgICAgICAgIGxldCBuZXdGaWxlID0gJC5zdHJpbmdpZnkoanNvbik7IC8vSlNPTi5wYXJzZeS8muaKpemUmVxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShwYXJzZVJvdXRlLCBuZXdGaWxlKTtcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suaIkOWKn+WvvOWFpScramlleGkubGVuZ3RoKyfmnaHop6PmnpAnO1xuICAgICAgICAgICAgfSksXG4gICAgICAgICAgICBleHRyYTp7XG4gICAgICAgICAgICAgICAgbGluZVZpc2libGU6dHJ1ZVxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtc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xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGxldCByZU5vckxpc3QgPSB1bmlxdWUyKG5vcm1hbF9saXN0KTtcbiAgICAgICAgbGV0IHZhbHVlX3JlX2N0ID0gbm9ybWFsX2xpc3QubGVuZ3RoIC0gcmVOb3JMaXN0Lmxlbmd0aDsgLy/ku6PnoIHph43lpI1cbiAgICAgICAgbGV0IHZhbHVlc19yZSA9IGR1cGxpY2F0ZXMobm9ybWFsX2xpc3QpOy8v6YeN5aSN55qE5YC8XG4gICAgICAgIGxldCBmdGxpc3QgPSBbXTtcbiAgICAgICAgbGV0IGZsYWdzID0ge307XG4gICAgICAgIGxldCBteUZsb29ycyA9IGZsb29ycztcbiAgICAgICAgZm9yKGxldCBqIGluIGNvZGVzKXsvL+mBjeWOhuaJgOaciVxuICAgICAgICAgICAgbGV0IG9uZSA9IGNvZGVzW2pdO1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mKG9uZSkgIT09ICdmdW5jdGlvbicmJnZhbHVlc19yZS5pbmNsdWRlcyhvbmUpKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgKGZsYWdzW29uZV0pID09PSAndW5kZWZpbmVkJyB8fCAhZmxhZ3Nbb25lXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy/lj5blh7rnrKzkuIDkuKrmoIflv5dcbiAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzW29uZV0gPSBteUZsb29yc1swXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIG15Rmxvb3JzLnNwbGljZSgwLCAxKTsvL+WIoOmZpOagh+W/l+WIl+ihqOmHjOeahOesrOS4gOS4quWFg+e0oFxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGZ0bGlzdC5wdXNoKHtrZXk6IGZsYWdzW29uZV0gKyBqLCB2YWx1ZTogb25lfSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZnRsaXN0LnB1c2goe2tleTogaiwgdmFsdWU6IG9uZX0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1jYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIGxvZyhlLm1lc3NhZ2UpXG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgLy8gbG9nKEpTT04uc3RyaW5naWZ5KGZsYWdzKSk7XG4gICAgICAgIGxldCBuZXdDb2RlcyA9IHt9O1xuICAgICAgICBmb3IobGV0IGsgaW4gZnRsaXN0KXtcbiAgICAgICAgICAgIG5ld0NvZGVzW2Z0bGlzdFtrXS5rZXldID0gZnRsaXN0W2tdLnZhbHVlO1xuICAgICAgICB9XG4gICAgICAgIGxldCB0aXBzID0gJ+ajgOa1i+WIsOWQjeensOWkjeeUqOmhueebruaVsDonK2tleXNfcmVfY3QrJyzku6PnoIHph43lpI3pobnnm67mlbDph486Jyt2YWx1ZV9yZV9jdCsnXFxu6ZyA6KaB5LiA6ZSu5omT5Liq5qCH6K+G5ZCXP+S4jeaUr+aMgeiHquWKqOWIoOmZpCzmiZPmoIflv5foh6rooYzop6PlhrMnO1xuICAgICAgICByZXR1cm4gJCh0aXBzKS5jb25maXJtKCh2YWx1ZV9yZV9jdCxqc29uLG5ld0NvZGVzLHBhcnNlUm91dGUpPT57XG4gICAgICAgICAgICBpZih2YWx1ZV9yZV9jdDwxKXtcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5pei54S26YO95pivMOS4qumHjeWkjemhueebruS6hu+8jOWwseS4jemcgOimgeaIkeWBmuS7gOS5iOS6hiEnXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjb21wYXJlKCl7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGZ1bmN0aW9uIChhLCBiKXtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qge2Zsb29yc30gPSAkLnJlcXVpcmUoXCJoaWtlcjovL3BhZ2UvZGVtb0RhdGE/cnVsZT1NeUZpZWxk4bSw4oG/XCIpO1xuICAgICAgICAgICAgICAgICAgICBsZXQgeCA9IGEuc3Vic3RyaW5nKDAsMSk7XG4gICAgICAgICAgICAgICAgICAgIGxldCB5ID0gYi5zdWJzdHJpbmcoMCwxKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZsb29ycy5pbmRleE9mKHkpLWZsb29ycy5pbmRleE9mKHgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGpzb24uY29kZXMgPSBuZXdDb2RlcztcbiAgICAgICAgICAgIGxldCB0aXRsZXMgPSBPYmplY3Qua2V5cyhuZXdDb2Rlcyk7XG4gICAgICAgICAgICB0aXRsZXMgPSB0aXRsZXMuc29ydChjb21wYXJlKCkpO1xuICAgICAgICAgICAganNvbi50aXRsZSA9IHRpdGxlcztcbiAgICAgICAgICAgIHZhciBuZXdGaWxlID0gJC5zdHJpbmdpZnkoanNvbik7IC8vSlNPTi5wYXJzZeS8muaKpemUmVxuICAgICAgICAgICAgd3JpdGVGaWxlKHBhcnNlUm91dGUsIG5ld0ZpbGUpO1xuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suS4gOmUruaJk+S4iuagh+W/lyc7XG4gICAgICAgIH0sdmFsdWVfcmVfY3QsanNvbixuZXdDb2RlcyxwYXJzZVJvdXRlKVxuICAgIH0sdW5pcXVlMixkdXBsaWNhdGVzLGZsb29ycyksXG59KTtcbmQucHVzaCh7XG4gICAgdGl0bGU6XCLwn5SE6YeN572uQuermVVBXCIsXG4gICAgY29sX3R5cGU6IFwic2Nyb2xsX2J1dHRvblwiLFxuICAgIHVybDogXCJodHRwczovL3d3dy5iaWxpYmlsaS5jb20vXCIsXG4gICAgZXh0cmE6IHtcbiAgICAgICAgdWE6IFBDX1VBXG4gICAgfVxufSk7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uICAgICAgICB9XFxuICAgICAgICBkaXYuYm94IHtcXG4gICAgICAgICAgICBtYXJnaW4tdG9wOi0xcHg7XFxuICAgICAgICAgICAgaGVpZ2h0OiA0M3B4O1xcbiAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiAyMHB4O1xcbiAgICAgICAgfVxcbiAgICAgICAgLyrovpPlhaXmoYblsLrlr7gqL1xcbiAgICAgICAgZm9ybSB7XFxuICAgICAgICAgICAgYmFja2dyb3VuZDogdHJhbnNwYXJlbnQ7XFxuICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlO1xcbiAgICAgICAgICAgIHdpZHRoOiAxMDAlO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgaW5wdXQsIGxhYmVsLCBzZWxlY3Qge1xcbiAgICAgICAgICAgIGJvcmRlcjogbm9uZTtcXG4gICAgICAgICAgICBvdXRsaW5lOiBub25lO1xcbiAgICAgICAgfVxcbiAgICAgICAgLyrlrZfkvZPkvY3nva4qL1xcbiAgICAgICAgaW5wdXQge1xcbiAgICAgICAgICAgIHdpZHRoOiA3NyU7XFxuICAgICAgICAgICAgaGVpZ2h0OiAzMnB4O1xcbiAgICAgICAgICAgIHBhZGRpbmctbGVmdDogNjZweDtcXG4gICAgICAgICAgICBwYWRkaW5nLXJpZ2h0OiAwcHg7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBsYWJlbCB7XFxuICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXI7XFxuICAgICAgICAgICAgbGluZS1oZWlnaHQ6IDQzcHg7XFxuICAgICAgICAgICAgaGVpZ2h0OiA0MHB4O1xcbiAgICAgICAgICAgIHdpZHRoOiA2MHB4O1xcbiAgICAgICAgICAgIGN1cnNvcjogcG9pbnRlcjtcXG4gICAgICAgICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XFxuICAgICAgICB9XFxuXFxuICAgICAgICAvKuWwj+ahhiovXFxuICAgICAgICAuYmFyIGxhYmVsIHtcXG4gICAgICAgICAgICAvKmJhY2tncm91bmQ6ICNEMDZCNkM7Ki9cXG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA1cHggNTU1cHggNTU1cHggNXB4O1xcbiAgICAgICAgICAgIHdpZHRoOiA2MHB4O1xcbiAgICAgICAgICAgIGZvbnQtc2l6ZTogMTNweDtcXG4gICAgICAgICAgICB0b3A6IDA7XFxuICAgICAgICAgICAgbGVmdDogM3B4O1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgLyrovpPlhaXmoYbmoLflvI8qL1xcbiAgICAgICAgLmJhciBpbnB1dCB7XFxuICAgICAgICAgICAgLypib3JkZXItcmFkaXVzOiA1cHggNTU1cHggNTU1cHggNXB4O1xcbiAgICAgICAgICAgICAqL1xcbiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDRweDtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIC8q5YiX6KGoKi9cXG4gICAgICAgIHNlbGVjdCB7XFxuICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXI7XFxuICAgICAgICAgICAgbGluZS1oZWlnaHQ6NDBweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQwcHg7XFxuICAgICAgICAgICAgd2lkdGg6IDIwcHg7XFxuICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIC8q5YiX6KGoKi9cXG4gICAgICAgIC5saWViIHNlbGVjdHtcXG4gICAgICAgICAgICAvKmJvcmRlci1yYWRpdXM6IDRweDsqL1xcbiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDU1NXB4IDVweCA1cHggNTU1cHg7XFxuICAgICAgICAgICAgd2lkdGg6IDgwcHg7XFxuICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXI7XFxuICAgICAgICAgICAgZm9udC1zaXplOiAxM3B4O1xcbiAgICAgICAgICAgIHRvcDogMDtcXG4gICAg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IH1lbHNlIGlmKHR5cGVvZihuZXdDb25maWcuY29kZXNbaXRdKT09PSd1bmRlZmluZWQnKXtcXG4gICAgICAgIC8vICAgICAgICAgZmxhZyA9ICcnO1xcbiAgICAgICAgLy8gICAgIH1cXG4gICAgICAgIC8vICAgICByZXR1cm4gZmxhZytpdFxcbiAgICAgICAgLy8gfSk7XFxuICAgIH1cXG4gICAgLy9mYmEubG9nKEpTT04uc3RyaW5naWZ5KG15U2VsZWN0KSk7XFxuXFxuICAgIGxldCBvcHRpb25zID0gW1xcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+eIseWlh+iJuicsXFxuICAgICAgICAgICAgaWQ6J3F5JyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5xeSxcXG4gICAgICAgICAgICBwbGFjZWhvbGRlcjon6K6+572u54ix5aWH6Im6J1xcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifkvJjphbcnLFxcbiAgICAgICAgICAgIGlkOid5aycsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MueWtcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon6IW+6K6vJyxcXG4gICAgICAgICAgICBpZDondHgnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnR4XFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+iKkuaenCcsXFxuICAgICAgICAgICAgaWQ6J21nJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5tZ1xcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOiflk5Tlk6nlk5Tlk6knLFxcbiAgICAgICAgICAgIGlkOidibCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MuYmxcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5pCc54uQJyxcXG4gICAgICAgICAgICBpZDonc2gnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLnNoXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6J+ilv+eTnCcsXFxuICAgICAgICAgICAgaWQ6J3hnJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy54Z1xcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifpmL/ph4wnLFxcbiAgICAgICAgICAgIGlkOidhbCcsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MuYWxcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTonUFBUVicsXFxuICAgICAgICAgICAgaWQ6J3BwJyxcXG4gICAgICAgICAgICB2YWx1ZTpzZXR0aW5ncy5wcFxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOiflkqrlkpUnLFxcbiAgICAgICAgICAgIGlkOidtaScsXFxuICAgICAgICAgICAgdmFsdWU6c2V0dGluZ3MubWlcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgbmFtZTon5LmQ6KeGJyxcXG4gICAgICAgICAgICBpZDonbGUnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLmxlXFxuICAgICAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIG5hbWU6JzE5MDUnLFxcbiAgICAgICAgICAgIGlkOidvbmUnLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLm9uZVxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOifpo47ooYwnLFxcbiAgICAgICAgICAgIGlkOidmdW4nLFxcbiAgICAgICAgICAgIHZhbHVlOnNldHRpbmdzLmZ1blxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBuYW1lOiflhbbku5YnLFxcb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uICAgICAgICAgICAgcnVsZTogXFxcIj1eX149XFxcIixcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuino+aekOmFjee9rueuoeeQhlxcXCIsXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL1JvdXRlP3J1bGU9TXlGaWVsZOG0sOKBvyZ0eXBlPeino+aekCNub0hpc3RvcnkjI25vUmVjb3JkSGlzdG9yeSNcXFwiLFxcbiAgICAgICAgICAgIGdyb3VwOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgcHJlUnVsZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHt9XFxuICAgICAgICB9KSk7XFxuICAgIH1cXG4gICAgZnVuY3Rpb24gY2FuY2VsKCl7XFxuICAgICAgICBpZighbXlTZXQpe1xcbiAgICAgICAgICAgIGZiYS53cml0ZUZpbGUob2xkUm91dGUsIEpTT04uc3RyaW5naWZ5KHNldHRpbmdzLCBudWxsLCA0KSk7XFxuICAgICAgICAgICAgZmJhLnJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgZmJhLmJhY2soZmFsc2UpO1xcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIGZ1bmN0aW9uIGNsaWNrbWUobXNnLGR1cmF0aW9uLHRpdGxlKXtcXG4gICAgICAgIHRyeXtcXG4gICAgICAgICAgICBmb3IobGV0IGtleSBpbiBzZXR0aW5ncyl7XFxuICAgICAgICAgICAgICAgIC8vIGZiYS5sb2coRGlkKGtleSkrJycra2V5KTtcXG4gICAgICAgICAgICAgICAgdHJ5e1xcbiAgICAgICAgICAgICAgICAgICAgLy9zZXR0aW5nc1trZXldID0gRGlkKGtleSkudmFsdWUucmVwbGFjZSgv4pOKfOKSvy9nLCcnKTtcXG4gICAgICAgICAgICAgICAgICAgIHNldHRpbmdzW2tleV0gPSBEaWQoa2V5KS52YWx1ZTtcXG4gICAgICAgICAgICAgICAgfWNhdGNoKGUpe1xcbiAgICAgICAgICAgICAgICAgICAgYWxlcnQoXFxcIuacquiOt+WPluWIsOiKgueCuTpcXFwiK2tleStcXFwiXFxcXG5cXFwiK2UubWVzc2FnZSk7XFxuICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYobXlTZWxlY3Qpe1xcbiAgICAgICAgICAgICAgICBPYmplY3QuYXNzaWduKG5ld0NvbmZpZy5zZXR0aW5ncywgc2V0dGluZ3MpO1xcbiAgICAgICAgICAgICAgICBmYmEud3JpdGVGaWxlKG5ld1JvdXRlLCAkJCQuc3RyaW5naWZ5KG5ld0NvbmZpZykpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBmYmEud3JpdGVGaWxlKG9sZFJvdXRlLCAkJCQuc3RyaW5naWZ5KHNldHRpbmdzKSk7XFxuICAgICAgICAgICAgVG9hc3QobXNnLGR1cmF0aW9uKTtcXG4gICAgICAgICAgICBpZih0aXRsZT09PVxcXCLlhbNcXFwiKXtcXG4gICAgICAgICAgICAgICAgZmJhLmJhY2soKTtcXG4gICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgZmJhLnJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1jYXRjaChlKXtcXG4gICAgICAgICAgICBhbGVydChlLm1lc3NhZ2UpXFxuICAgICAgICB9XFxuICAgIH1cXG5cXG4gICAgLy9sZXQgd2lkdGg9d2luZG93LnNjcmVlbi5hdmFpbFdpZHRoO1xcbiAgICAvL2xldCB3aWR0aFB4PXdpZHRoLTM5Mys1MjtcXG4gICAgLy9hbGVydChcXFwi5b2T5YmN5YiG6L6o546HOlxcXCIrd2luZG93LnNjcmVlbi5hdmFpbFdpZHRoK1xcXCIqXFxcIit3aW5kb3cuc2NyZWVuLmhlaWdodCk7XFxuICAgIHZhciB2ZXJpbmZvID0gW3tcXG4gICAgICAgIGlkOidkbicsXFxuICAgICAgICBhdXRob3I6J+aWreW/tScsXFxuICAgICAgICBhdmF0YXI6J2h0dHBzOi8vczMuYXgxeC5jb20vMjAyMS8wMi8yMi95N3diOU8uanBnJyxcXG4gICAgICAgIG9wdGlvbjpvcGVuRG5QYWdlLFxcbiAgICB9LFxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGlkOidkeicsXFxuICAgICAgICAgICAgYXV0aG9yOifpgZPplb8nLFxcbiAgICAgICAgICAgIGF2YXRhcjonaHR0cDovL3ExLnFsb2dvLmNuL2c/Yj1xcSZuaz00MzQ4NTcwMDUmcz02NDAnLFxcbiAgICAgICAgICAgIG9wdGlvbjpvcGVuVGhlbWVcXG4gICAgICAgIH0sXFxuICAgICAgICB7XFxuICAgICAgICAgICAgaWQ6J2xtJyxcXG4gICAgICAgICAgICBhdXRob3I6ICfok53ojpMnLFxcbiAgICAgICAgICAgIGF2YXRhcjogJ2h0dHA6Ly9xMS5xbG9nby5jbi9nP2I9cXEmbms9MjU3OTk0OTM3OCZzPTY0MCcsXFxuICAgICAgICAgICAgb3B0aW9uOm9wZW5KeE1hbmFnZVxcbiAgICAgICAgfVxcbiAgICBdO1xcblxcbiAgICBmdW5jdGlvbiBkb09wdGlvbihvcHRpb25faWQpe1xcbiAgICAgICAgbGV0IHZlciA9IHZlcmluZm8uZmlsdGVyKGl0PT5pdC5pZD09PW9wdGlvbl9pZClbMF07XFxuICAgICAgICB2ZXIub3B0aW9uKCk7XFxuICAgIH1cXG5cXG4gICAgY29uc3QgUmVuZGVySHRtbEFwcCA9IHtcXG4gICAgICAgIGRhdGEoKSB7XFxuICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgLy8gcmF3SHRtbDogJzxzcGFuIHN0eWxlPVxcXCJjb2xvcjogcmVkXFxcIj7ov5nph4zkvJrmmL7npLrnuqLoibLvvIE8L3NwYW4+JyxcXG4gICAgICAgICAgICAgICAgb3B0aW9uczpvc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VTdHIgPSBcXFwiXFxcIjtcXG4gICAgICAgIGlmIChkYXRlMSkge1xcbiAgICAgICAgICAgIGRhdGVTdHIgPSBkYXRlMS5nZXRGdWxsWWVhcigpO1xcbiAgICAgICAgICAgIHZhciBtb250aCA9IGRhdGUxLmdldE1vbnRoKCkgKyAxO1xcbiAgICAgICAgICAgIHZhciBkYXkgPSBkYXRlMS5nZXREYXRlKCk7XFxuICAgICAgICAgICAgaWYgKG1vbnRoIDwgMTApIHtcXG4gICAgICAgICAgICAgICAgZGF0ZVN0ciArPSBcXFwiLTBcXFwiICsgbW9udGg7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgZGF0ZVN0ciArPSBcXFwiLVxcXCIgKyBtb250aDtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKGRheSA8IDEwKSB7XFxuICAgICAgICAgICAgICAgIGRhdGVTdHIgKz0gXFxcIi0wXFxcIiArIGRheTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBkYXRlU3RyICs9IFxcXCItXFxcIiArIGRheTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gZGF0ZVN0cjtcXG4gICAgfSxcXG4gICAgdG9KU09OOiBmdW5jdGlvbihqc29uKSB7XFxuICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoanNvbiwgKGtleSwgdmFsdWUpID0+IHtcXG4gICAgICAgICAgICBpZiAodHlwZW9mIHZhbHVlID09ICdmdW5jdGlvbicpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlLnRvU3RyaW5nKCk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIDQpO1xcbiAgICB9LFxcbiAgICB0b1ZOdW06IGZ1bmN0aW9uKGEpIHtcXG4gICAgIC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WdfYVtpICUgY29uZmlnX2JdLmNoYXJDb2RlQXQoKTtcXG4gICAgICAgICAgICBjb25maWdfYXJyeVtpXSA9IGk7XFxuICAgICAgICB9XFxuICAgICAgICBmb3IgKGogPSBpID0gMHgwOyBpIDwgMHgxMDA7IGkrKykge1xcbiAgICAgICAgICAgIGogPSAoaiArIGNvbmZpZ19hcnJ5W2ldICsgdGVtW2ldKSAlIDB4MTAwO1xcbiAgICAgICAgICAgIHRtcCA9IGNvbmZpZ19hcnJ5W2ldO1xcbiAgICAgICAgICAgIGNvbmZpZ19hcnJ5W2ldID0gY29uZmlnX2Fycnlbal07XFxuICAgICAgICAgICAgY29uZmlnX2Fycnlbal0gPSB0bXA7XFxuICAgICAgICB9XFxuICAgICAgICBmb3IgKGEgPSBqID0gaSA9IDB4MDsgaSA8IGNvbmZpZ19jOyBpKyspIHtcXG4gICAgICAgICAgICBhID0gKGEgKyAweDEpICUgMHgxMDA7XFxuICAgICAgICAgICAgaiA9IChqICsgY29uZmlnX2FycnlbYV0pICUgMHgxMDA7XFxuICAgICAgICAgICAgdG1wID0gY29uZmlnX2FycnlbYV07XFxuICAgICAgICAgICAgY29uZmlnX2FycnlbYV0gPSBjb25maWdfYXJyeVtqXTtcXG4gICAgICAgICAgICBjb25maWdfYXJyeVtqXSA9IHRtcDtcXG4gICAgICAgICAgICBrID0gY29uZmlnX2FycnlbKGNvbmZpZ19hcnJ5W2FdICsgY29uZmlnX2Fycnlbal0pICUgMHgxMDBdO1xcbiAgICAgICAgICAgIHZpZGVvICs9IFN0cmluZy5mcm9tQ2hhckNvZGUoY29uZmlnX3VybFtpXS5jaGFyQ29kZUF0KCkgXiBrKTtcXG4gICAgICAgIH1cXG4gICAgICAgIGxvZyhkZWNvZGVVUklDb21wb25lbnQodmlkZW8pKTtcXG4gICAgICAgIGlmICh0b2tlbiA9PSAweDEpIHtcXG4gICAgICAgICAgICByZXR1cm4gZGVjb2RlVVJJQ29tcG9uZW50KHZpZGVvKTtcXG4gICAg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2RwLmp4VGltZW91dCcsJzUwMDAnKSl8fDUwMDA7XFxuICAgICAgICBleHRyYSA9IGV4dHJhfHx7fTtcXG4gICAgICAgIGxldCBwbGF5VXJsTGlzdCA9IGV4dHJhLnBsYXlVcmxMaXN0fHxbXTtcXG4gICAgICAgIGlmKHR5cGVvZihwbGF5VXJsTGlzdCk9PT0nb2JqZWN0JyYmcGxheVVybExpc3QubGVuZ3RoPjApe1xcbiAgICAgICAgICAgIHBsYXlVcmxMaXN0LnVuc2hpZnQocGxheVVybCk7XFxuICAgICAgICAgICAgbGV0IHBsYXlVcmxzPXBsYXlVcmxMaXN0LnNsaWNlKDAsNCk7XFxuICAgICAgICAgICAgbGV0IG5hbWVzPWV4dHJhLm5hbWVMaXN0LnNsaWNlKDAsNCk7XFxuICAgICAgICAgICAgbG9nKCflvIDlp4vmibnph4/op6PmnpAo5bey5Y676YeNLOWPquWPluWJjTPkuKrlpIfog47vvIzliqDpgZPplb/nvqQ6NDg2NzIyMzI46I635Y+W5pyA5paw6a2U5pat5Yqo5oCBKTonK25hbWVzKTtcXG4gICAgICAgICAgICBwbGF5VXJscz1wbGF5VXJscy5tYXAoKGl0LGlkKT0+aXQrXFxcIjtcXFwiK25hbWVzW2lkXSk7XFxuICAgICAgICAgICAgLy9sb2cocGxheVVybHMpO1xcbiAgICAgICAgICAgIGNvbnN0IHtMYXp5UGFyc2VGYXN0fSA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL2dsb2JhbFBhcnNlP3J1bGU96YGT6ZW/5LuT5bqTUHJvJyk7XFxuICAgICAgICAgICAgbGV0IHJldCA9IExhenlQYXJzZUZhc3QocGxheVVybHMsdGltZW91dCx0aW1lb3V0KTtcXG4gICAgICAgICAgICBpZih0eXBlb2YocmV0KT09PSdvYmplY3QnJiZyZXQubGVuZ3RoPjApe1xcbiAgICAgICAgICAgICAgICAvL3JldHVybiByZXRbMF1cXG4gICAgICAgICAgICAgICAgLy9sb2cocmV0KTtcXG4gICAgICAgICAgICAgICAgbGV0IHYgPSBnZXRBcHBWZXJzaW9uKCk7XFxuICAgICAgICAgICAgICAgIGlmKHBhcnNlSW50KHYpPj0yMTk0JiZyZXQubGVuZ3RoPjEpe1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybHMgPSBBcnJheS5mcm9tKG5ldyBTZXQocmV0KSk7XFxuICAgICAgICAgICAgICAgICAgICBuYW1lcz11cmxzLm1hcCgoaXQsaWQpPT5pdC5zcGxpdChcXFwi4piFXFxcIikubGVuZ3RoPjE/aXQuc3BsaXQoXFxcIuKYhVxcXCIpWzFdOlxcXCLnur/ot686XFxcIitwYXJzZUludChpZCsxKSk7XFxuICAgICAgICAgICAgICAgICAgICB1cmxzPXVybHMubWFwKGl0PT5pdC5zcGxpdChcXFwi4piFXFxcIilbMF0pO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGhlYWRlcnMgPSB1cmxzLm1hcCgoaXQpPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoIS87Ly50ZXN0KGl0KXx8aXQuc3BsaXQoJzsnKS5sZW5ndGg8Mil7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7fVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGVhZCA9IGl0LnNwbGl0KCc7JylbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCEvQC8udGVzdChoZWFkKXx8IS97fH0vLnRlc3QoaGVhZCkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHt9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZD1oZWFkLnNwbGl0KFxcXCJ7XFxcIilbMV0uc3BsaXQoXFxcIn1cXFwiKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9oZWFkID0gaGVhZC5yZXBsYWNlKC97fH0vZywnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWQgPSBoZWFkLnNwbGl0KCcmJicpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgb2JqID0ge307XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaSBpbiBoZWFkKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBrZXkgPSBoZWFkW2ldLnNwbGl0KCdAJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPSBoZWFkW2ldLnNwbGl0KCdAJylbMV0ucmVwbGFjZSgvOy8sJ++8m++8mycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqW2tleV0gPSB2YWx1ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb2JqXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB1cmxzID0gdXJscy5tYXAoKGl0KT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0dXJsPWl0LnNwbGl0KCc7JylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXQuaW5jbHVkZXMoXFxcIiNpc1ZpZGVvPXRydWUjXFxcIikmJiF0dXJsLmluY2x1ZGVzKFxcXCIjaXNWaWRlbz10cnVlI1xcXCIpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHVybCs9XFxcIiNpc1ZpZGVvPXRydWUjXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHR1cmxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHt1cmxzOnVybHMsaGVhZGVyczpoZWFkZXJzLG5hbWVzOm5hbWVzfSk7XFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJldFswXS5zcGxpdChcXFwi4piFXFxcIilbMF1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICByZXR1cm4gcmV0XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgY29uc3Qge2xhenlQYXJzZX0gPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9nbG9iYWxQYXJzZT9ydWxlPemBk+mVv+S7k+W6k1BybycpO1xcbiAgICAgICAgICAgIGxldCB4NVBsYXk9bGF6eVBhcnNlKHBsYXlVcmwsdGltZW91dCk7XFxuICAgICAgICAgICAgaWYodHlwZW9mKHg1UGxheSk9PVxcXCJ1bmRlZmluZWRcXFwifHwheDVQbGF5KXtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+mBk+mVv+S7k+W6k+ino+aekOWksei0pVxcXCJcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbGV0IHRpcHM9L3g1UnVsZS8udGVzdCh4NVBsYXkpP1xcXCJ4NeWFjeWXheW8gOWni1xcXCI6XFxcIuaegemAn+WFjeWXheaOouWujOavle+8jOWcsOWdgDpcXFwiKygvXmh0dHAvLnRlc3QoeDVQbGF5KT94NVBsYXk6J+mdnuato+W4uOmTvuaOpScpO1xcbiAgICAgICAgICAgIGxvZyh0aXBzKTtcXG4gICAgICAgICAgICByZXR1cm4geDVQbGF5O1xcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICBtYW9zczogZnVuY3Rpb24oanh1cmwsIHJlZikge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICB2YXIgZ2V0VmlkZW9JbmZvID0gZnVuY3Rpb24odGV4dCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdG9vbHMuQUVTKHRleHQsIGtleSwgaXYpO1xcbiAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgaWYgKHJlZikge1xcbiAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IHJlcXVlc3Qoanh1cmwsIHtcXG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAnUmVmZXJlcic6IHJlZlxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IHJlcXVlc3Qoanh1cmwpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAoaHRtbC5pbmRleE9mKCcmYnR3YWY9JykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgaHRtbCA9IHJlcXVlc3Qoanh1cmwgKyAnJmJ0d2FmJyArIGh0bWwubWF0Y2goLyZidHdhZiguKj8pXFxcIi8pWzFdLCB7XFxuICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgJ1JlZmVyZXInOiByZWZcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIGl2ID0gaHRtbC5zcGxpdCgnYnRfdG9rZW4gPSBcXFwiJylbMV0uc3BsaXQoJ1xcXCInKVswXTtcXG4gICAgICAgICAgICBldmFsKGh0bWwubWF0Y2goL3ZhciBjb25maWcgPSB7W1xcXFxzXFxcXFNdKj99LylbMF0gKyAnJyk7XFxuICAgICAgICAgICAgaWYgKGNvbmZpZy51cmwuc2xpY2UoMCwgNCkgIT0gJ2h0dHAnKSB7XFxuICAgICAgICAgICAgICAgIGNvbmZpZy51cmwgPSBkZWNvZGVVUklDb21wb25lbnQodG9vbHMuQUVTKGNvbmZpZy51cmwsIFxcXCJkdnlZUlFsblBSQ01kUVNlXFxcIiwgaXYpKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIGNvbmZpZy51cmw7XFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgcmV0dXJuICcnO1xcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICBMTFE6IGZ1bmN0aW9uKGp4dXJsKSB7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHZhciBhcGkgPSBqeHVybC5zcGxpdCgnP3VybD0nKVswXSArIFxcXCJhcGkucGhwXFxcIjtcXG4gICAgICAgICAgICB2YXIgYjY0aWQgPSBiYXNlNjRFbmNvZGUoanh1cmwuc3BsaXQoJ3VybD0nKVsxXSk7XFxuICAgICAgICAgICAgdmFyIHBhcnNlaWQgPSB0b29scy5jYWVzYXJDaXBoZXIoYjY0aWQsIC0xKTtcXG4gICAgICAgICAgICB2YXIganNvbiA9IEpTT04ucGFyc2UocmVxdWVzdChhcGksIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgJ1JlZmVyZXInOiBqeHVybFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJyxcXG4gICAgICAgICAgICAgICAgYm9keTogJ3VybD0nICsgcGFyc2VpZFxcbiAgICAgICAgICAgIH0pKTtcXG4gICAgICAgICAgICB1cmwgPSAoanNvbi5jb2RlID09IDIwMCA/IGJhc2U2NERlY29kZSh0b29scy5jYWVzYXJDaXBoZXIoanNvbi51cmwsIC0xKSkgOiAnJyk7XFxuICAgICAgICAgICAgcmV0dXJuIHVybDtcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICByZXR1cm4gJyc7XFxuICAgICAgICB9XFxuICAgIH0sXFxuICAgIFBhbkd1OiBmdW5jdGlvbih2a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nLHZpcDonLCBwYXJzZSArICcsdmlwOicsIGFwaV0pO1xcbiAgICB9LFxcbiAgICBPS+ino+aekDonaHR0cHM6Ly9va2p4LmNjLz91cmw9JyxcXG4gICAgTTNVOFRWOidodHRwczovL2p4Lm0zdTgudHYvamlleGkvP3VybD0nLFxcbiAgICDpgZPplb/ku5PlupPpgJrlhY06ZnVuY3Rpb24gKHVybCx0aW1lb3V0KXtcXG4gICAgICAgIHJldHVybiBQYXJzZVMuZGVmYXVsdFBhcnNlV2ViKHVybCx0aW1lb3V0KTtcXG4gICAgfSxcXG4gICAgRnVYaW5nOiBmdW5jdGlvbih2aXBVcmwpIHtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgLy9pZih2aXBVcmwuaW5kZXhPZigndi55b3VrdScpIT0tMSl7XFxuICAgICAgICAgICAgLy8gICAgdmlwVXJsID0gKEpTT04ucGFyc2UocmVxdWVzdCh2aXBVcmwsIHtyZWRpcmVjdDpmYWxzZSwgd2l0aEhlYWRlcnM6dHJ1ZX0pKS5oZWFkZXJzLmxvY2F0aW9uICsgJycpLnJlcGxhY2UoL1xcXFw/LiovLCcnKTtcXG4gICAgICAgICAgICAvL31cXG4gICAgICAgICAgICB2YXIgcmVmID0gJ2h0dHBzOi8vangueHVldHVpZ3VhbmcuY24vamlleGkvP3VybD0nICsgdmlwVXJsO1xcbiAgICAgICAgICAgIHZhciBwYXJzZSA9IHJlZjtcXG4gICAgICAgICAgICB2YXIgYXBpID0gJ2h0dHBzOi8vangueHVldHVpZ3VhbmcuY24vamlleGkvYXBpdV9meC5waHAnO1xcbiAgICAgICAgICAgIHJldHVybiB0aGlzLlBhbkd1KHZpcFVybCwgW3JlZiwgcGFyc2UsIGFwaV0pO1xcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIHJldHVybiAnJztcXG4gICAgICAgIH1cXG4gICAgfSxcXG59O1xcblxcbk9iamVjdC5hc3NpZ24oUGFyc2VTLCBvcmlnaW5hbFB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UppZXhpLm5vdylbMF07XFxuICAgIH1jYXRjaCAoZSkge31cXG4gICAgZnVuY3Rpb24gZ2V0UGxheUp4KGtleSl7XFxuICAgICAgICBsZXQgcGxheVVybExpc3QgPSBbXTsvL+aJuemHj+aSreaUvuWcsOWdgOWIl+ihqFxcbiAgICAgICAgbGV0IG5hbWVMaXN0ID0gW107XFxuICAgICAgICBsZXQganhzID0gamlleGlzW2tleV07IC8vIOmAgueUqOS6jui/meS4que9keermeeahOino+aekOWIl+ihqFxcbiAgICAgICAgaWYoanhzKXtcXG4gICAgICAgICAgICBmb3IobGV0IGkgaW4ganhzKXtcXG4gICAgICAgICAgICAgICAgaWYodHlwZW9mIFBhcnNlU1tqeHNbaV1dID09ICdzdHJpbmcnJiZQYXJzZVNbanhzW2ldXS5tYXRjaCgvaHR0cC4qPz0vKSl7XFxuICAgICAgICAgICAgICAgICAgICBwbGF5VXJsTGlzdC5wdXNoKFBhcnNlU1tqeHNbaV1dK3ZpcFVybCk7XFxuICAgICAgICAgICAgICAgICAgICBuYW1lTGlzdC5wdXNoKGp4c1tpXSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICAvLyByZXR1cm4gcGxheVVybExpc3RcXG4gICAgICAgIHJldHVybiB7cGxheVVybExpc3Q6cGxheVVybExpc3QsbmFtZUxpc3Q6bmFtZUxpc3R9XFxuICAgIH1cXG4gICAgbGV0IGV4dHJhID0ge307XFxuICAgIC8vLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVxcbiAgICBpZighc3RyVGl0bGUpe1xcbiAgICAgICAgaWYoL3JlbnJlbm1pLXxmZW5kb3VcXFxcLmR1b2R1b3p5Ly50ZXN0KHZpcFVybCkpe1xcbiAgICAgICAgICAgIHN0ciA9IG15U2V0LnBwO1xcbiAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdwcCcpO1xcbiAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgdmFyIGhvc3Q7XFxuICAgICAgICAgICAgdHJ5e1xcbiAgICAgICAgICAgICAgICBob3N0ID0gdmlwVXJsLm1hdGNoKC9cXFxcLiguKj8pXFxcXC8vKVsxXTtcXG4gICAgICAgICAgICB9Y2F0Y2goZSl7XFxuICAgICAgICAgICAgICAgIGlmKCEvXmh0dHAvLnRlc3QocGxheVVybCkpe1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCLmlq3mj5LosIPnlKjlpLHotKXvvIFcXFxcbumdnuato+W4uOeahHZpcOato+eJiOWcsOWdgOS4lOacquivhuWIq+WOn+ermeino+aekOaSreaUvuWcsOWdgFxcXCI7XFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFBhcnNlUy7pgZPplb/ku5PlupPpgJrlhY0ocGxheVVybCx0aW1lb3V0KVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIC8vaG9zdCA9IGRlY29kZVVSSUNvbXBvbmVudChob3N0KTtcXG4gICAgICAgICAgICBzd2l0Y2ggKG15U2V0LnFqdSkge1xcbiAgICAgICAgICAgICAgICBjYXNlIFxcXCLpu5jorqRcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChob3N0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicXEuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQudHg7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCd0eCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJpcWl5aS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5xeTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3F5Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInlvdWt1LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnlrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgneWsnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiYWxpenlcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5hbDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ2FsJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIm1ndHYuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQubWc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdtZycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJiaWxpYmlsaS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5ibDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ2JsJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInNvaHUuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQuc2g7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdzaCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJ0di5zb2h1LmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnNoO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnc2gnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiaXhpZ3VhLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnhnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgneGcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicHB0di5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5wcDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ3BwJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIm1pZ3V2aWRlby5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5taTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgPSBnZXRQbGF5SngoJ21pJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcImxlLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LmxlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnbGUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiMTkwNS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5vbmU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhID0gZ2V0UGxheUp4KCdvbmUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiZnVuLnR2XFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQuZnVuO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYSA9IGdldFBsYXlKeCgnZnVuJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0Lm90aDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnFqdTtcXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfWVsc2V7XFxuICAgICAgICBsb2coJ+mtlOaWreaJp+ihjOWumuWQkeino+aekOe6v+i3r+WktDonK3N0clRpd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T09IHZpcFVybCkge1xcbiAgICAgICAgICAgIHJldHVybiB2aXBVcmw7XFxuICAgICAgICB9IGVsc2UgaWYoIS8jaXNWaWRlbz10cnVlIy8udGVzdCh1cmwpKXtcXG4gICAgICAgICAgICByZXR1cm4gdXJsICsgJyNpc1ZpZGVvPXRydWUjJztcXG4gICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgIHJldHVybiB1cmxcXG4gICAgICAgIH1cXG4gICAgfSBlbHNlIGlmICh0eXBlb2YgUGFyc2VTW3N0cl0gPT0gJ3N0cmluZycmJlBhcnNlU1tzdHJdLm1hdGNoKC9odHRwLio/PS8pKSB7XFxuICAgICAgICAvLyBsb2coXFxcIuaWreaPkuW8gOWni+mAmueUqOaJp+ihjOWFjeWXhSBkZWZhdWx0UGFyc2VXZWI6XFxcIit0aW1lb3V0KTtcXG4gICAgICAgIC8vbG9nKFxcXCLpu5jorqR4NVxcXCIrUGFyc2VTLmRlZmF1bHRQYXJzZVdlYik7XFxuICAgICAgICBpZih3aXRoQmF0Y2gpe1xcbiAgICAgICAgICAgIGlmKHR5cGVvZihleHRyYS5wbGF5VXJsTGlzdCk9PT0nb2JqZWN0JyYmZXh0cmEucGxheVVybExpc3QubGVuZ3RoPjApe1xcbiAgICAgICAgICAgICAgICBleHRyYS5wbGF5VXJsTGlzdCA9IGV4dHJhLnBsYXlVcmxMaXN0LmZpbHRlcihpdD0+aXQhPT0oUGFyc2VTW3N0cl18fHN0cikgKyB2aXBVcmwpO1xcbiAgICAgICAgICAgICAgICBsZXQgbmFtZUxpc3QgPSBleHRyYS5uYW1lTGlzdDtcXG4gICAgICAgICAgICAgICAgbmFtZUxpc3QudW5zaGlmdChzdHIpO1xcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiB1bmlxdWUyKGFycmF5KXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBBcnJheS5mcm9tKG5ldyBTZXQoYXJyYXkpKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgIC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bCA9IGs7XFxuICAgICAgICAgICAgdmFyIGZhID0gWydsZXR2JywgJ3BwdHYnLCAncXEnLCAneW91a3UnLCAncWl5aScsICdpcWl5aScsICdtZ3R2JywgJ2JpbGliaWxpJywgJ3NvaHUnLCAnbWlndScsICdtMTkwNScsICd2aXAnXTtcXG4gICAgICAgICAgICB2YXIgaHRtbCA9IHBhcnNlRG9tKHJlcXVlc3QoaW5wdXQpLCBMYWJlbCk7XFxuICAgICAgICAgICAgZXZhbChodG1sLnJlcGxhY2UoL3BsYXllcl8uKj89ey8sICdwZGF0YT17JykpO1xcbiAgICAgICAgICAgIGV2YWwoZmV0Y2goanNVcmwpKTtcXG4gICAgICAgICAgICBpZiAocGRhdGEudXJsLnN1YnN0cigwLCA4KS5tYXRjaCgvSlQuLkpULi4vKSkge1xcbiAgICAgICAgICAgICAgICBwZGF0YS51cmwgPSBiYXNlNjREZWNvZGUocGRhdGEudXJsKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKHBkYXRhLnVybC5zdWJzdHIoMCwgOCkubWF0Y2goLyUuLiUuLi8pKSB7XFxuICAgICAgICAgICAgICAgIHBkYXRhLnVybCA9IHVuZXNjYXBlKHBkYXRhLnVybCk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmIChmYS5pbmNsdWRlcyhwZGF0YS5mcm9tKSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHBkYXRhLnVybCk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHBkYXRhLnVybCArICcjaXNWaWRlbz10cnVlIyc7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwgTGFiZWwpXFxuICAgIH1cXG59O1xcbmZ1bmN0aW9uIG16UG9wdXAoKSB7XFxuICAgIGlmIChnZXRWYXIoXFxcImlqay10eFxcXCIsIFxcXCJcXFwiKSA9PSBcXFwiMVxcXCIpIHtcXG4gICAgICAgI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ZhciBwYXJzZVJvdXRlID0gZ2V0VmFyKCdwYXJzZVJvdXRlJyk7XFxuICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKHBhcnNlUm91dGUpKTtcXG4gICAgICAgIEFycmF5LnByb3RvdHlwZS5yZW1vdmUgPSBmdW5jdGlvbih2YWwpIHtcXG4gICAgICAgICAgICBsZXQgaW5kZXggPSB0aGlzLmluZGV4T2YodmFsKTtcXG4gICAgICAgICAgICBpZiAoaW5kZXggPiAtMSkge1xcbiAgICAgICAgICAgICAgICB0aGlzLnNwbGljZShpbmRleCwgMSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfTtcXG4gICAgICAgIGlmKG5hbWUpey8v5Yig6Zmk5ZCN56ew5YiX6KGo5ZKM5Luj56CBXFxuICAgICAgICAgICAganNvbi50aXRsZS5yZW1vdmUobmFtZSk7XFxuICAgICAgICAgICAgZGVsZXRlIGpzb24uY29kZXNbbmFtZV07XFxuICAgICAgICB9XFxuICAgICAgICBhcnJMaXN0ID0gYXJyTGlzdC5jb25jYXQoanNvbi50aXRsZSk7XFxuICAgICAgICBqc29uLnRpdGxlID0gQXJyYXkuZnJvbShuZXcgU2V0KGFyckxpc3QpKTtcXG4gICAgICAgIE9iamVjdC5hc3NpZ24oanNvbi5jb2Rlcywgb2JqQ29kZSk7XFxuICAgICAgICBpZiAodHlwZSA9PT0gJ+a1i+ivlScpIHtcXG4gICAgICAgICAgICBldmFsKCd2YXIgY29uZmlnID0nICsgZmV0Y2goZ2V0VmFyKCdvbGRDb25maWcnKSkpO1xcbiAgICAgICAgICAgIGV2YWwoZmV0Y2goY29uZmlnLmNqKSk7XFxuICAgICAgICAgICAgaWYgKHR5cGVvZiBQYXJzZVNbZGF0YVsxXV0gPT0gXFxcImZ1bmN0aW9uXFxcIikge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gUGFyc2VTW2RhdGFbMV1dKGRhdGFbMl0pO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuIC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FxuICAgICAgICAgICAgaWYgKGZpbGVFeGlzdChrKSkge1xcbiAgICAgICAgICAgICAgICB2YXIgY2pjYWNoZSA9IGdldFZhcignY2pDYWNoZScpO1xcbiAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKGspKTtcXG4gICAgICAgICAgICAgICAganNvbi5zZXR0aW5ncy5jaiA9IGNqY2FjaGU7XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShrLCAkLnN0cmluZ2lmeShqc29uKSk7XFxuICAgICAgICAgICAgICAgIHZhciBvbGRSb3V0ZSA9IGdldFZhcignb2xkQ29uZmlnJyk7XFxuICAgICAgICAgICAgICAgIHZhciBvbGRDb25maWcgPSBqc29uLnNldHRpbmdzO1xcbiAgICAgICAgICAgICAgICBvbGRDb25maWcuY2ogPSBjamNhY2hlO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUob2xkUm91dGUsICQuc3RyaW5naWZ5KG9sZENvbmZpZykpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/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+esplxcbiAgICAgICAgICAgICAgICB2YXIgbmV3RmlsZSA9ICQuc3RyaW5naWZ5KGpzb24pOyAvL0pTT04ucGFyc2XkvJrmiqXplJlcXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKHBhcnNlUm91dGUsIG5ld0ZpbGUpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgI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+KAmOKAmOKAmeKAmTxzcGFuIHN0eWxlPVxcXCJjb2xvcjojMDRCNDMxXFxcIiB0aXRsZT1cXFwi5YiG5LqrfHwnICsgYmlhbmppICsgJ1xcXCI+5Zyw5p2/5YiG5LqrJywgJ+KAmOKAmOKAmeKAmTxzcGFuIHN0eWxlPVxcXCJjb2xvcjojMDRCNDMxXFxcIiB0aXRsZT1cXFwi5LqR5YiG5LqrfHwnICsgYmlhbmppICsgJ1xcXCI+5LqR5p2/5YiG5LqrJ10sXFxuICAgICAgICAgICAgY29sOiAnMicsXFxuICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICB2YXIgcGFyc2VSb3V0ZSA9IGdldFZhcigncGFyc2VSb3V0ZScpO1xcbiAgICAgICAgICAgICAgICBldmFsKCd2YXIganNvbiA9JyArIGZldGNoKHBhcnNlUm91dGUpKTtcXG4gICAgICAgICAgICAgICAgdmFyIG5ld0lucHV0ID0gcGFyc2VEb21Gb3JIdG1sKGlucHV0LCAnc3BhbiYmdGl0bGUnKS5zcGxpdCgnfHwnKTtcXG4gICAgICAgICAgICAgICAgLy8g5L+u5pS5LOi/qui/qiwwICAg5pON5L2c57G75Z6LLOWQjeensCzntKLlvJVcXG4gICAgICAgICAgICAgICAgdmFyIHR5cGUgPSBuZXdJbnB1dFswXTtcXG4gICAgICAgICAgICAgICAgdmFyIG5hbWUgPSBuZXdJbnB1dFsxXTtcXG4gICAgICAgICAgICAgICAgdmFyIG51bSA9IG5ld0lucHV0WzJdO1xcbiAgICAgICAgICAgICAgICB2YXIgbnVtMiA9IG5ld0lucHV0WzNdO1xcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKHR5cGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcIuWIoOmZpFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGsgPSBbbmFtZSwgbnVtXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyDmgLvmhJ/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/lhoXlrrlcXFwiLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgb25DaGFuZ2U6ICdwdXRWYXIoXFxcImlucHV0X2FkZFxcXCIsIGlucHV0KScsXFxuICAgICAgICAgICAgICAgICAgICB0eXBlOiBcXFwidGV4dGFyZWFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiBcXFwiLTFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0VmFyKCdpbnB1dF9hZGQnKSxcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGx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ogZnVuY3Rpb24oKSB7XFxuICAgICAgICB2YXIgXzB4NGMwNDI3ID0ge1xcbiAgICAgICAgICAgICdVVldvRic6IGZ1bmN0aW9uKF8weDI2YmIwNywgXzB4MjIxYjRkKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHgyNmJiMDcgKyBfMHgyMjFiNGQ7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnY29sb3InOmZ1bmN0aW9uKHRleHQsIGNvbG9yKSB7XFxuICAgICAgICAgICAgICAgIHRleHQgKz0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgIGlmICh0ZXh0LmluZGV4T2YoXFxcIuKAnOKAnOKAneKAnVxcXCIpID09PSAwKSB7XFxuICAgICAgICAgICAgICAgICAgICB0ZXh0LnJlcGxhY2UoXFxcIuKAnOKAnOKAneKAnVxcXCIsIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcIuKAnOKAnOKAneKAnTxmb250IGNvbG9yPSdcXFwiICsgY29sb3IgKyBcXFwiJz5cXFwiICsgdGV4dCArIFxcXCI8L2ZvbnQ+XFxcIjtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdreldESyc6IGZ1bmN0aW9uKF8weDQ4NTRhOSwgXzB4M2U5OGM1KSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg0ODU0YTkgKyBfMHgzZTk4YzU7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnWFh5UXInOiAn56e75YqoIycsXFxuICAgICAgICAgICAgJ2d0VW5qJzogZnVuY3Rpb24oXzB4NTlhYWY3LCBfMHgyMmM2NmIpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDU5YWFmNyArIF8weDIyYzY2YjtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICdVdGZXZic6ICfigJjigJjigJnigJk8c21hbGw+PHNwYW4gc3R5bGU9XFxcXF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gICAgICAgICAgICAnY2dJZUEnOiBmdW5jdGlvbihfMHgyNWUzNjgsIF8weDhiYzhlOSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4MjVlMzY4ICsgXzB4OGJjOGU5O1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ3hkckZ2JzogZnVuY3Rpb24oXzB4NGFiNWQ4LCBfMHgyMTI0MmYpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIF8weDRhYjVkOCArIF8weDIxMjQyZjtcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICd5d2p1eCc6IGZ1bmN0aW9uKF8weDVlMzA1MSwgXzB4NGUwMjMwKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBfMHg1ZTMwNTEoXzB4NGUwMjMwKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9O1xcbiAgICAgICAgdmFyIF8weDFkOGJiMSA9IGdldFZhcihfMHg0YzA0MjdbJ0pDY05ZJ10pO1xcbiAgICAgICAgdmFyIF8weDNiODlhYiA9IHBhcnNlRmlsZVsndGl0bGUnXTtcXG4gICAgICAgIHZhciBfMHg0OWRhOTYgPSBnZXRWYXIoXzB4NGMwNDI3WydyZ0RJcCddKTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IF8weDRjMDQyN1snaG9JZEonXSxcXG4gICAgICAgICAgICBkZXNjOifms6jmhI865L2N572u5pON5L2c5Yqf6IO95Y+q5Zyo5YiG57G7562b6YCJ5Li65YWo6YOo5pe255Sf5pWIXFxcXG7kuIvmlrnmkJzntKLmjInlkI3np7DmiJblnLDlnYAs6YeN572u6K+355WZ56m65oiW54K56Kej5p6Q5pWw6YeP5oyJ6ZKuJyxcXG4gICAgICAgICAgICB1cmw6IGJqSXRlbVsneGpQYXJzZSddKCksXFxuICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTpmYWxzZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTon5pCc57SiJyxcXG4gICAgICAgICAgICBkZXNjOidtZW5neCcsXFxuICAgICAgICAgICAgY29sX3R5cGU6J2lucHV0JyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBvbkNoYW5nZTogXFxcInB1dFZhcignZHAuc2VhcmNoSngnLGlucHV0KVxcXCIsXFxuICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogdHJ1ZSxcXG4gICAgICAgICAgICAgICAgdGV4dFNpemU6IDExLFxcbiAgICAgICAgICAgICAgICBkZWZhdWx0VmFsdWU6Z2V0VmFyKCdkcC5zZWFyY2hKeCcsJycpLFxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgdXJsOiQudG9TdHJpbmcoKCk9PntcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSk7XFxuICAgICAgICBsZXQgZmlsdGVycyA9IFsn5YWo6YOoJywn6ZO+5o6lJywnanNvbicsJ+WFjeWXhSddO1xcbiAgICAgICAgZm9yKGxldCBvIGluIGZpbHRlcnMpe1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOmdldFZhcignZG4uanhfZmlsdGVyJywn5YWo6YOoJyk9PT1maWx0ZXJzW29dPyfigJzigJzigJ3igJ08c3BhbiBzdHlsZT1cXFwiY29sb3I6IzI5OEEwOFxcXCI+JytmaWx0ZXJzW29dOmZpbHRlcnNbb10sXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGl0KT0+e1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkbi5qeF9maWx0ZXInLGl0KTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LGZpbHRlcnNbb10pLFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIF8weDJlY2JlNSA9IF8weDNiODlhYlsnbGVuZ3RoJ107XFxuICAgICAgICB2YXIganNvbj17dGl0bGU6W10sY29kZXM6e319O1xcbiAgICAgICAgbGV0IHNldEZpbGUgPSByZXF1ZXN0KCdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbicpO1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBldmFsKCdqc29uPScrc2V0RmlsZSk7XFxuICAgICAgICB9Y2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICBsb2coJ0pzb27op6PmnpDlj5HnlJ/kuobplJnor686JytlLm1lc3NhZ2UpO1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYoZ2V0VmFyKCdkbi5qeF9maWx0ZXInLCflhajpg6gnKT09PSfpk77mjqUnKXtcXG4gICAgICAgICAgICBfMHgzYjg5YWIgPSBfMHgzYjg5YWIuZmlsdGVyKGl0PT4oIS/CqSQvLnRlc3QoaXQpKSYmdHlwZW9mKGpzb24uY29kZXNbXzB4NGMwNDI3WyduV2ZWUiddKGl0LCAnJylbJ3JlcGxhY2UnXSgvaHR0cC4qXFxcXC9cXFxcLy9nLCAnJyldKT09PSdzdHJpbmcnKTtcXG4gICAgICAgIH1lbHNlIGlmKGdldFZhcignZG4uanhfZmlsdGVyJywn5YWo6YOoJyk9PT0n5YWN5ZeFJyl7XFxuICAgICAgICA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iAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3sumHjee9ridcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSk7XFxuICAgICAgICAvLyDkuIvpnaLmmK/op6PmnpDliJfooajmjpLliJdcXG4gICAgICAgIC8vIGZvciAodmFyIF8weGUyYzNkOCA9IDB4MDsgXzB4NGMwNDI3WydGckdPSCddKF8weGUyYzNkOCwgXzB4MmVjYmU1KTsgXzB4ZTJjM2Q4KyspIHtcXG4gICAgICAgIGZvciAobGV0IF8weGUyYzNkOCBpbiBfMHgzYjg5YWIpIHtcXG4gICAgICAgICAgICB2YXIgXzB4MzM3ODhjID0gXzB4M2I4OWFiW18weGUyYzNkOF07XFxuICAgICAgICAgICAgdmFyIF8weDM3ODcxZSA9IF8weDRjMDQyN1snbldmVlInXShfMHgzMzc4OGMsICcnKVsncmVwbGFjZSddKC9odHRwLipcXFxcL1xcXFwvL2csICcnKTtcXG4gICAgICAgICAgICBpZiAoL+enu+WKqC8gWyd0ZXN0J10oXzB4NDlkYTk2KSkge1xcbiAgICAgICAgICAgICAgICBpZiAoXzB4NGMwNDI3WydvQ0NTaiddKCd1S0x4RicsICd1S0x4RicpKSB7XFxuICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDRjMDQyN1snSFpobGMnXShfMHg0YzA0MjdbJ1hYeVFyJ10gKyBfMHhlMmMzZDgsIF8weDQ5ZGE5NikgPyBfMHg0YzA0MjdbJ25XZlZSJ10oXzB4NGMwNDI3WydjZ0llQSddKF8weDRjMDQyN1snVXRmV2YnXSwgXzB4NGMwNDI3WydRT3ZKViddKSwgXzB4Mzc4NzFlKSA6IF8weDRjMDQyN1snY2dJZUEnXShfMHg0YzA0MjdbJ0FCRXdCJ10sIF8weDM3ODcxZSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsneWRQYXJzZSddKF8weDQ5ZGE5NiwgXzB4ZTJjM2Q4KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiAndGV4dF8yJ1xcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgXzB4MmJjNjE4ID0gXzB4M2I4OWFiW18weGUyYzNkOF07XFxuICAgICAgICAgICAgICAgICAgICB2YXIgXzB4NWNmNDE3ID0gXzB4NGMwNDI3WydVVldvRiddKF8weDJiYzYxOCwgJycpWydyZXBsYWNlJ10oL2h0dHAuKlxcXFwvXFxcXC8vZywgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKC/np7vliqgvIFsndGVzdCddKF8weDQ5ZGE5NikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkWydwdXNoJ10oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg0YzA0MjdbJ2t6V0RLJ10oXzB4NGMwNDI3WydYWHlRciddLCBfMHhlMmMzZDgpID09IF8weDQ5ZGE5NiA/IF8weDRjMDQyN1snZ3RVbmonXShfMHg0YzA0MjdbJ2d0VW5qJ10oXzB4NGMwNDI3WydVdGZXZiddLCBfMHg0YzA0MjdbJ1FPdkpWJ10pLCBfMHg1Y2Y0MTcpIDogXzB4NGMwNDI3WydBQkV3QiddICsgXzB4NWNmNDE3LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWyd5ZFBhcnNlJ10oXzB4NDlkYTk2LCBfMHhlMmMzZDgpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg0YzA0MjdbJ296eldHJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIF8weDExOTM2NSA9IFtfMHgyYmM2MTgsIF8weDRjMDQyN1snZ3RVbmonXShfMHhlMmMzZDgsICd8fCcpXVsnam9pbiddKCd8fCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IF8weDRjMDQyN1snbldmVlInXShfMHg0YzA0MjdbJ0FCRXdCJ10sIF8weDVjZjQxNyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDRjMDQyN1snb3p6V0cnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsneGxTZWxlY3QnXShfMHgxMTkzNjUsIF8weDJlY2JlNVsndG9TdHJpbmcnXSgpKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdmFyIF8weGI3MDE5MiA9IFtfMHgzMzc4OGMsIF8weGUyYzNkOCArICd8fCddWydqb2luJ10oJ3x8Jyk7XFxuICAgICAgICAgICAgICAgIC8vIOi/qui/quW9semZonx8MHx8ICDlkI3np7B8fOe0ouW8lSDnmoTmlbDnu4RcXG4gICAgICAgICAgICAgICAgLy8gQUJFd0Ig5piv57u/6ImyIF8weDM3ODcxZSDmmK/moIfpopjlkI3np7AgIHhkckZ25piv5a2X56ym5Liy6L+e5o6l5Ye95pWwXFxuICAgICAgICAgICAgICAgIC8vIGxldCBmbGFnID0gJ+KAmOKAmOKTiuKAmeKAmSc7XFxuICAgICAgICAgICAgICAgIGxldCBmbGFnID0gXzB4NGMwNDI3LmNvbG9yKCfik4onLCcjMDA1MWZmJyk7XFxuICAgICAgICAgICAgICAgIGlmKHR5cGVvZihqc29uLmNvZGVzW18weDM3ODcxZV0pPT09J2Z1bmN0aW9uJyl7XFxuICAgICAgICAgICAgICAgICAgICAvLyBmbGFnID0gJ+KAnOKAnOKSv+KAneKAnSc7XFxuICAgICAgICAgICAgICAgICAgICBmbGFnID0gXzB4NGMwNDI3LmNvbG9yKCfikr8nLCcjZmY3MDAwJyk7XFxuICAgICAgICAgICAgICAgIH1lbHNlIGlmKHR5cGVvZihqc29uLmNvZGVzW18weDM3ODcxZV0pPT09J3VuZGVmaW5lZCcpe1xcbiAgICAgICAgICAgICAgICAgICAgZmxhZyA9ICcnO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8vIGxldCBjbHMgPSAnPHNwYW4gc3R5bGU9XFxcImNvbG9yOiMyOThBMDhcXFwiPic7XFxuICAgICAgICAgICAgICAgIC8vIGxldCB0aXRsZSA9IF8weDRjMDQyN1sneGRyRnYnXShfMHg0YzA0MjdbJ0FCRXdCJ10sIGZsYWcrXzB4Mzc4NzFlKTtcXG4gICAgICAgICAgICAgICAgLy8gbGV0IHRpdGxlID0gZmxhZytjbHMrXzB4Mzc4NzFlO1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBmbGFnK18weDRjMDQyNy5jb2xvcihfMHgzNzg3MWUsJyMyOThBMDgnKTtcXG4gICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICd0aXRsZSc6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgLy8gJ3RpdGxlJzogXzB4Mzc4NzFlLFxcbiAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NGMwNDI3WydvenpXRyddLFxcbiAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsneGxTZWxlY3QnXShfMHhiNzAxOTIsIF8weDJlY2JlNVsndG9TdHJpbmcnXSgpKVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBfMHg0YzA0Mjd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rCcsXFxuICAgICAgICAgICAgJ3JHTHVBJzogJ+S4u+aPkuS7tuWtmOaUvui3r+W+hDogL2NhY2hlL1BhcnNlX0RuLmpzXFxcXHgwYee9kemhteiEmuacrOWtmOaUvui3r+W+hDogL2NhY2hlL1BhcnNlX0RuLmh0bWwnLFxcbiAgICAgICAgICAgICd6UVNMRSc6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgICAgICAgICAnaHZpRGwnOiBmdW5jdGlvbihfMHgyNmRiNjIsIF8weDMxMmYxYykge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4MjZkYjYyKF8weDMxMmYxYyk7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAnWnhVZ3QnOiAn5pON5L2c5oyH5byVJyxcXG4gICAgICAgICAgICAnc1dGb2MnOiBmdW5jdGlvbihfMHgyYTA0NGIsIF8weDE0OWEzZikge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4MmEwNDRiICsgXzB4MTQ5YTNmO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ09FaGF0JzogJ+aLieWPluS7o+eggScsXFxuICAgICAgICAgICAgJ1p2dFN1JzogJ+e8lui+keino+aekCcsXFxuICAgICAgICAgICAgJ2dYS01iJzogJ3RvYXN0Oi8v6K+35YWI5ouJ5Y+W5YiX6KGoJyxcXG4gICAgICAgICAgICAnV0NPREMnOiBmdW5jdGlvbihfMHg0YWQzZDUsIF8weDMxZmExZSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXzB4NGFkM2Q1IDwgXzB4MzFmYTFlO1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgJ3JBa0FoJzogJ3RleHRfMycsXFxuICAgICAgICAgICAgJ3lXYU9JJzogJ+aBouWkjeaPkuS7tui3r+W+hOS4uum7mOiupCcsXFxuICAgICAgICAgICAgJ3lqeWpLJzogJ+W9k+WJjeiuvue9ruS4ujogJyxcXG4gICAgICAgICAgICAndEhYZUUnOiAn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CBfMHg1NDFkNzZbJ3FSUWRBJ10sIF8weDU0MWQ3NlsnV1FpcWsnXSk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdmFyIF8weDRkMjVmZiA9IF8weDU0MWQ3NlsnSXdNVGwnXVsnc3BsaXQnXSgnfCcpLFxcbiAgICAgICAgICAgICAgICAgICAgXzB4NGE5N2M5ID0gMHgwO1xcbiAgICAgICAgICAgICAgICB3aGlsZSAoISFbXSkge1xcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChfMHg0ZDI1ZmZbXzB4NGE5N2M5KytdKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnMCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ3hmZEhrJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWydwdWxsU2NyaXB0J10oX215U2V0WydjamNhY2hlJ10sIF9teVNldFsneDVjYWNoZSddKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2WydyR0x1QSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2Wyd6UVNMRSddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcxJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXzB4NTQxZDc2WydodmlEbCddKGV2YWwsIF8weDU0MWQ3NlsnaHZpRGwnXShnZXRWYXIsIF8weDU0MWQ3NlsncVJRZEEnXSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcyJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6ICdsaW5lX2JsYW5rJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnMyc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBfMHgyYWIzOTkgPSAnaGlrZXI6Ly9lbXB0eSNub0hpc3RvcnkjQHJ1bGU9anM6dGhpcy5kPVtdOyQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2p4SXRlbT9ydWxlPU15RmllbGThtLDigb9cXFwiKS5qeExpc3QoKTtzZXRSZXN1bHQoZCk7JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnNCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ1p4VWd0J10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogdHlwZW9mIGN6R3VpZGUgPT0gJ2Z1bmN0aW9uJyA/IGN6R3VpZGUoKSA6ICcnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2Wyd6UVNMRSddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICc1JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeGRSb3V0ZSA9IF8weDU0MWQ3Nlsnc1dGb2MnXSh4ZFJvdXRlLCBfbXlTZXRbJ3BhcnNlUm91dGUnXSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzYnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgXzB4M2E5YWZlID0gW3tcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICd0aXRsZSc6ICfmi4nlj5bliJfooagnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsncHVsbENvZGUnXSgn5YiX6KGoJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2WydPRWhhdCddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IGJqSXRlbVsncHVsbENvZGUnXSgn5Luj56CBJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2WydadnRTdSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ3VybCc6IF8weDU0MWQ3NlsnaHZpRGwnXShmaWxlRXhpc3QsIF8weDU0MWQ3NlsnaHZpRGwnXShnZXRWYXIsICdwYXJzZVJvdXRlJykpID09ICEhW10gPyBfMHgyYWIzOTkgOiBfMHg1NDFkNzZbJ2dYS01iJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzcnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBfMHgxYTJjZGIgPSAweDA7IF8weDU0MWQ3NlsnV0NPREMnXShfMHgxYTJjZGIsIF8weDNhOWFmZVsnbGVuZ3RoJ10pOyBfMHgxYTJjZGIrKykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHgzYTlhZmVbXzB4MWEyY2RiXVsndGl0bGUnXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogXzB4M2E5YWZlW18weDFhMmNkYl1bJ3VybCddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnckFrQWgnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnOCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ3lXYU9JJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogYmpJdGVtWydoZlBsdWdpbiddKF9teVNldFsncGFyc2VSb3V0ZSddKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2WydzV0ZvYyddKF8weDU0MWQ3NlsneWp5aksnXSArIG15U2V0WydjaiddLCAnXFxcXG7lrZjmlL7ot6/lvoQ6IC9ydWxlcy9EdWFuTmlhbi9NeVBhcnNlLmpzb24nKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdjb2xfdHlwZSc6IF8weDU0MWQ3NlsnelFTTEUnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnOSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGUnOiBfMHg1NDFkNzZbJ3RIWGVFJ10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndXJsJzogJ3RvYXN0Oi8v6K+35Zyo5LiL5pa56YCJ6aG55pON5L2cJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2WydHTVVZdSddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2Wyd6UVNMRSddXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICcxMCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbJ3B1c2gnXSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnY29sX3R5cGUnOiBfMHg1NDFkNzZbJ21wWkJaJ11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJzExJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZXNjJzogXzB4NTQxZDc2Wyd4dnFnRiddLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogJ2lucHV0JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdleHRyYSc6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndGl0bGVWaXNpYmxlJzogIVtdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdkZWZhdWx0VmFsdWUnOiBfMHg1NDFkNzZbJ2h2aURsJ10oZ2V0VmFyLCAncGx1Z2luTGluaycpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdvbkNoYW5nZSc6IF8weDU0MWQ3NlsnaGV1S3gnXVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgZFsncHVzaCddKHtcXG4gICAgICAgICAgICAgICAgJ3RpdGxlJzogXzB4NTQxZDc2WydJaWZpYSddLFxcbiAgICAgICAgICAgICAgICAnZGVzYyc6IF8weDU0MWQ3NlsnUEZSSEEnXSxcXG4gICAgICAgICAgICAgICAgJ3VybCc6IF8weDU0MWQ3NlsnVUx3a1QnXSxcXG4gICAgICAgICAgICAgICAgJ2NvbF90eXBlJzogXzB4NTQxZDc2Wyd6UVNMRSddXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgIH1cXG59O1xcbiQuZXhwb3J0cyA9IGp4SXRlbTtcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuino+aekFVybOe8lui+kVwiLFwicGF0aFwiOlwiRWRpdFVybFwiLFwicnVsZVwiOlwianM6XFxuc2V0UGFnZVRpdGxlKFxcXCLmj5Lku7bmjqXlj6Porr7nva5cXFwiKTtcXG5sZXQgZCA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GlucHV0O1xcbiAgICAgICAgICAgICAgICBwYXJzZVVybFRleHQgPSBwYXJzZVVybEFycmF5LmpvaW4oXFxcIlxcXFxuXFxcIik7XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9qaWV4aS9qaWV4aS50eHRcXFwiLCBwYXJzZVVybFRleHQpO1xcbiAgICAgICAgICAgICAgICBpZiAoc2VsZWN0ZWQxID09IGdldEl0ZW0oXFxcInNlbGVjdGVkMFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXCJzZWxlY3RlZFxcXCIsIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oXFxcInNlbGVjdGVkMFxcXCIsIHRpdGxlICsgXFxcIiYmXFxcIiArIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/kv67mlLnmiJDlip9cXFwiO1xcbiAgICAgICAgICAgIH0sIHRpdGxlLCBpbmRleCk7XFxuICAgICAgICB9O1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgXFxcIjJcXFwiOlxcbiAgICAgICAgZnVuYyA9IGZ1bmN0aW9uKHVybCwgdGl0bGUsIGluZGV4KSB7XFxuICAgICAgICAgICAgcmV0dXJuICQoXFxcIuehruiupOWIoOmZpOOAjFxcXCIgKyB0aXRsZSArIFxcXCLjgI3vvJ9cXFwiKS5jb25maXJtKCh0aXRsZSwgaW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHBhcnNlVXJsVGV4dCA9IHJlcXVlc3QoXFxcImhpa2VyOi8vZmlsZXMvamlleGkvamlleGkudHh0XFxcIik7XFxuICAgICAgICAgICAgICAgIGxldCBwYXJzZVVybEFycmF5ID0gcGFyc2VVcmxUZXh0LnNwbGl0KC9cXFxcbi8pO1xcbiAgICAgICAgICAgICAgICBsZXQgc2VsZWN0ZWQxID0gcGFyc2VVcmxBcnJheVtpbmRleF07XFxuICAgICAgICAgICAgICAgIHBhcnNlVXJsQXJyYXkuc3BsaWNlKGluZGV4LCAxKTtcXG4gICAgICAgICAgICAgICAgcGFyc2VVcmxUZXh0ID0gcGFyc2VVcmxBcnJheS5qb2luKFxcXCJcXFxcblxcXCIpO1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvamlleGkvamlleGkudHh0XFxcIiwgcGFyc2VVcmxUZXh0KTtcXG4gICAgICAgICAgICAgICAgaWYgKHNlbGVjdGVkMSA9PSBnZXRJdGVtKFxcXCJzZWxlY3RlZDBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBhcnNlVXJsQXJyYXlbMF0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXCJzZWxlY3RlZFxcXCIsIHBhcnNlVXJsQXJyYXlbMF0uc3BsaXQoXFxcIiYmXFxcIilbMV0gfHwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oXFxcInNlbGVjdGVkMFxcXCIsIHBhcnNlVXJsQXJyYXlbMF0pO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXCJzZWxlY3RlZFxcXCIsIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFxcXCJzZWxlY3RlZDBcXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5L+u5pS55oiQ5YqfXFxcIjtcXG4gICAgICA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c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTpmbGFnK29wdGlvbixcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB1cmw6JChvcHRpb24pLmxhenlSdWxlKCgpPT57XFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ3RoZW1lLmRuX29wdGlvbicsIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+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+S5Li76aKYOicrbmFtZVxcbiAgICAgICAgICAgICAgICAgICAgfSxteVRoZW1lcyx0aGVtZVJvdXRlKVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICAgICAgICAgIH0sbXlUaGVtZXMsdGhlbWVSb3V0ZSksXFxuICAgICAgICB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L2NhY2hlL015VGhlbWUuanNvblxcXCI7XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh0aGVtZVJvdXRlLEpTT04uc3RyaW5naWZ5KHtub3dfdGhlbWU6J+m7mOiupOS4u+mimCcsdGhlbWVzOlt0aGVtZXMsdGhlbWVEZWZdfSkpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aWreaPkuS4u+mimOW3sumHjee9ruS4uuWHuuWOguiuvue9ridcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSk7XFxuICAgICAgICBmb3IodmFyIGkgaW4gbXlUaGVtZXMudGhlbWVzKXtcXG4gICAgICAgICAgICBsZXQgbm93VGhlbSA9IG15VGhlbWVzLnRoZW1lc1tpXTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTpteVRoZW1lcy5ub3dfdGhlbWU9PT1ub3dUaGVtLm5hbWU/J/CfkYknK25vd1RoZW0ubmFtZTpub3dUaGVtLm5hbWUsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOidmbGV4X2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIHVybDokKCkubGF6eVJ1bGUoKG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IG9wdGlvbiA9IGdldFZhcigndGhlbWUuZG5fb3B0aW9uJywn5paw5aKeJyk7XFxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKG9wdGlvbil7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAn5a+85Ye6JzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG15dGhlbWVDb2RlID0gYmFzZTY0RW5jb2RlKEpTT04uc3RyaW5naWZ5KG15dGhlbWUpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHNoYXJlUGFzdGUobXl0aGVtZUNvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9ICfmlq3mj5LkuLvpophAJytteXRoZW1lLm5hbWUrJ0AnK3VybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29weShjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWvvOWHuuS4uuS6keWPo+S7pOW5tuWkjeWItuWIsOWJquWIh+advydcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICfkv67mlLknOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJChKU09OLnN0cmluZ2lmeShteXRoZW1lKSkuaW5wdXQoKG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobXl0aGVtZS5uYW1lPT09bXlUaGVtZXMubm93X3RoZW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5q2k5Li76aKY5b2T5YmN5q2j5Zyo5L2/55So5Lit77yM5LiN5YWB6K645L+u5pS5ISdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG15VGhlbWVzLnRoZW1lc1tpXT1KU09OLnBhcnNlKGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh0aGVtZVJvdXRlLEpTT04uc3RyaW5naWZ5KG15VGhlbWVzKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lkv67mlLknXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sbXl0aGVtZSxteVRoZW1lcyxpLHRoZW1lUm91dGUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAn5Yig6ZmkJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoJ+ehruiupOWIoOmZpOS4u+mimDonK215dGhlbWUubmFtZSsnPycpLmNvbmZpcm0oKG15dGhlbWUsbXlUaGVtZXMsaSx0aGVtZVJvdXRlKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobXl0aGVtZS5uYW1lPT09bXlUaGVtZXMubm93X3RoZW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5q2k5Li76aKY5b2T5YmN5q2j5Zyo5L2/55So5Lit77yM5LiN5YWB6K645Yig6ZmkISdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG15VGhlbWVzLnRoZW1lcy5zcGxpY2UoaSwxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZSh0aGVtZVJvdXRlLEpTT04uc3RyaW5naWZ5KG15VGhlbWVzKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LliKDpmaQnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sbXl0aGVtZSxteVRoZW1lcyxpLHRoZW1lUm91dGUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbXlUaGVtZXMubm93X3RoZW1lPW15dGhlbWUubmFtZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKHRoZW1lUm91dGUsSl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gICAgICBwdXRWYXIoJ2RuLmp4bV9vcHRpb24nLCBvcHRpb24pO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xcbiAgICAgICAgICAgICAgICB9LG9wdGlvbiksXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgICAgICBsZXQganhzUm91dGUgPSBcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeUppZXhpLmpzb25cXFwiO1xcbiAgICAgICAgbGV0IE15SmlleGkgPSB7amlleGlzOltdfTtcXG4gICAgICAgIGxldCBqaWV4aXMgPSB7fTtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgTXlKaWV4aSA9IEpTT04ucGFyc2UoZmV0Y2goanhzUm91dGUpKTtcXG4gICAgICAgICAgICBqaWV4aXMgPSBNeUppZXhpLmppZXhpcy5maWx0ZXIoaXQ9Pml0Lm5hbWU9PT1NeUppZXhpLm5vdylbMF07XFxuICAgICAgICB9Y2F0Y2ggKGUpIHt9XFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiflr7zlhaUnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICB1cmw6JCgnJywn6K+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+S9oOeIueenkeaKgCddLHlrOlsn6aKG6YW3J10sdHg6WyfojaPogIAnXSxtZzpbJ+iaguiageWFhOW8nyddLGJsOlsnT0vop6PmnpAnXSxzaDpbJ+axn+a5lkQnXSx4ZzpbJ+axn+a5lkQnXSxhbDpbJ+axn+a5lkQnXSxwcDpbJ+S6uuS6uui/tyddLG1pOlsnMTA4MCddLGxlOlsn6L+q5aWl5ZeF5o6iJ10sZnVuOlsn6J6N5YW0J10sb25lOlsnMTA4MCddfV19O1xcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGp4c1JvdXRlLEpTT04uc3RyaW5naWZ5KGluaXRTZXQpKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aWreaPkuino+aekOmFjee9ruW3suWIneWni+WMlidcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sTXlKaWV4aSxqeHNSb3V0ZSlcXG4gICAgICAgIH0pO1xcbiAgICAgICAgbGV0IGF1dG9Nb2RlVGlwcyA9IGF1dG9Nb2RlPT09J+mAn+W6puS8mOWFiCc/J+mAn+W6puS8mOWFiCc6J+mhuuW6j+S8mOWFiCc7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOnNtYWxsKFxcXCLlpIfog47lrqDlubjmlrnmoYg6XFxcIikrY29sb3IoYXV0b01vZGVUaXBzLCcjZmY3MDAwJyksXFxuICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfMicsXFxuICAgICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKE15SmlleGksanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgIE15SmlleGkuYXV0b01vZGUgPSBNeUppZXhpLmF1dG9Nb2RlPT09J+mAn+W6puS8mOWFiCc/J+mhuuW6j+S8mOWFiCc6J+mAn+W6puS8mOWFiCc7XFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICByZ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2xfdHlwZTondGV4dF8yJyxcXG4gICAgICAgICAgICB1cmw6JChqeFRpbWVvdXQsJ+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+aekOmFjee9ric7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sbm93SngsTXlKaWV4aSxpLGp4c1JvdXRlKSxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgICAgIHNldFJlc3VsdChkKTtcXG4gICAgfVxcbiQuZXhwb3J0cy5qeE1hbmFnZT1qeE1hbmFnZTtcIn0se1wibmFtZVwiOlwi6Kej5p6Q57yW6L6RXCIsXCJwYXRoXCI6XCJqeEVkaXRcIixcInJ1bGVcIjpcImpzOlxcbiAgICBsZXQge25vd0p4LE15SmlleGksanhzUm91dGV9ID0gTVlfUEFSQU1TO1xcbmxldCBub3dKeFQgPSBKU09OLnBhcnNlKGdldFZhcignZG4ubm93SngnKXx8J3t9Jyk7XFxubm93SnggPSBub3dKeFQubmFtZT9ub3dKeFQ6bm93Sng7XFxuYWRkTGlzdGVuZXIoJ29uQ2xvc2UnLCAkLn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RsZTp0aXRsZURpY1t0aXRsZV18fHRpdGxlLFxcbiAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHRpdGxlcyx0aXRsZSxqeHMsanhzUm91dGUsTXlKaWV4aSxub3dKeCk9PntcXG4gICAgICAgICAgICB2YXIganNvbj17dGl0bGU6W10sY29kZXM6e319O1xcbiAgICAgICAgICAgIGxldCBzZXRGaWxlID0gcmVxdWVzdCgnaGlrZXI6Ly9maWxlcy9ydWxlcy9EdWFuTmlhbi9NeVBhcnNlLmpzb24nKTtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBldmFsKCdqc29uPScrc2V0RmlsZSk7XFxuICAgICAgICAgICAgfWNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgIGxvZygnSnNvbuino+aekOWPkeeUn+S6humUmeivrzonK2UubWVzc2FnZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmKGdldFZhcignZG4uanhtX3dyaXRlTW9kZScsJ+aWsOWinicpPT09J+aWsOWinicpe1xcbiAgICAgICAgICAgICAgICBsZXQgc2VsX3RpdGxlID0gdGl0bGVzLmZpbHRlcihpdD0+IWp4cy5pbmNsdWRlcyhpdCkpO1xcbiAgICAgICAgICAgICAgICBzZWxfdGl0bGUgPSBzZWxfdGl0bGUubWFwKChpdCk9PntcXG4gICAgICAgICAgICAgICAgICAgIGxldCBmbGFnID0gJ+KAmOKAmOKTiuKAmeKAmSc7XFxuICAgICAgICAgICAgICAgICAgICBpZih0eXBlb2YoanNvbi5jb2Rlc1tpdF0pPT09J2Z1bmN0aW9uJyl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZmxhZyA9ICfigJzigJzikr/igJ3igJ0nO1xcbiAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYodHlwZW9mKGpzb24uY29kZXNbaXRdKT09PSd1bmRlZmluZWQnKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmbGFnID0gJyc7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmxhZytpdFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQoc2VsX3RpdGxlLDIpLnNlbGVjdCgoTXlKaWV4aSxqeHMsbm93SngsdGl0bGUsanhzUm91dGUpPT57XFxuICAgICAgICAgICAgICAgICAgICBpbnB1dCA9IGlucHV0LnJlcGxhY2UoL+KAmOKAmOKTiuKAmeKAmXzigJzigJzikr/igJ3igJ0vZywnJyk7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgaWQgPSBudWxsO1xcbiAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBqIGluIE15SmlleGkuamlleGlzKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZihNeUppZXhpLmppZXhpc1tqXS5uYW1lID09PSBub3dKeC5uYW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQgPSBqO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBpZighaWQpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ntKLlvJXplJnor6/ml6Dms5Xkv53lrZg6XFxcXG4nK2lkXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBqeHMucHVzaChpbnB1dCk7XFxuICAgICAgICAgICAgICAgICAgICBsb2coanhzKTtcXG4gICAgICAgICAgICAgICAgICAgIG5vd0p4W3RpdGxlXSA9IGp4cztcXG4gICAgICAgICAgICAgICAgICAgIE15SmlleGkuamlleGlzW2lkXSA9IG5vd0p4O1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkbi5ub3dKeCcsSlNPTi5zdHJpbmdpZnkobm93SngpKTtcXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSxNeUppZXhpLGp4cyxub3dKeCx0aXRsZSxqeHNSb3V0ZSk7XFxuICAgICAgICAgICAgfWVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSx0aXRsZXMsdGl0bGUsanhzLGp4c1JvdXRlLE15SmlleGksbm93SngpXFxuICAgIH0pO1xcbiAgICBmb3IobGV0IGsgaW4ganhzKXtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6anhzW2tdLFxcbiAgICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgodGl0bGVzLHRpdGxlLGp4cyxqeHNSb3V0ZSxNeUppZXhpLG5vd0p4LG5qeCxpZCxrLG1heCk9PntcXG4gICAgICAgICAgICAgICAgc3dpdGNoIChnZXRWYXIoJ2RuLmp4bV93cml0ZU1vZGUnLCfmlrDlop4nKSl7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICfliKDpmaQnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIEFycmF5LnByb3RvdHlwZS5yZW1vdmUgPSBmdW5jdGlvbih2YWwpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGluZGV4ID0gdGhpcy5pbmRleE9mKHZhbCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbmRleCA+IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNwbGljZShpbmRleCwgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGp4cy5yZW1vdmUobmp4KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBub3dKeFt0aXRsZV0gPSBqeHM7XFxuICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXNbaWRdID0gbm93Sng7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdkbi5ub3dKeCcsSlNPTi5zdHJpbmdpZnkobm93SngpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoanhzUm91dGUsSlNPTi5zdHJpbmdpZnkoTXlKaWV4aSkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ+enu+WKqCc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoaywn56e75Yqo5Yiw57Si5byV5aSa5bCRPycpLmlucHV0KChrLG1heCxqeHMsbm93SngsTXlKaWV4aSxpZCx0aXRsZSxqeHNSb3V0ZSk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gTW92ZShhcnIsIGZyb21JbmRleCwgdG9JbmRleCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGVsZW1lbnQgPSBhcnJbZnJvbUluZGV4XTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyci5zcGxpY2UoZnJvbUluZGV4LCAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyci5zcGxpY2UodG9JbmRleCwgMCwgZWxlbWVudCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocGFyc2VJbnQoaW5wdXQpPT09ayl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5ZWl5Lmf5rKh5YGaJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihwYXJzZUludChpbnB1dCk+bWF4LTF8fHBhcnNlSW50KGlucHV0KTwtMSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L2g5pyA5aSn56e75Yqo6IyD5Zu0MC0nK3BhcnNlSW50KG1heC0xKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsZXQgbmV3QXIgPSBqeHMuc3BsaWNlKGssIDEpOyAvLyDliKDmjolcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8ganhzLnVuc2hpZnQobmV3QXJbMF0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBNb3ZlKGp4cyxrLHBhcnNlSW50KGlucHV0KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vd0p4W3RpdGxlXSA9IGp4cztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aXNbaWRdID0gbm93Sng7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcignZG4ubm93SngnLEpTT04uc3RyaW5naWZ5KG5vd0p4KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShqeHNSb3V0ZSxKU09OLnN0cmluZ2lmeShNeUppZXhpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxrLG1heCxqeHMsbm93SngsTXlKaWV4aSxpZCx0aXRsZSxqeHNSb3V0ZSlcXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+atpOWFg+e0oOS4jeaUr+aMgei/m+ihjDonK2dldFZhcignZG4uanhtX3dyaXRlTW9kZScsJ+aWsOWinicpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LHRpdGxlcyx0aXRsZSxqeHMsanhzUm91dGUsTXlKaWV4aSxub3dKeCxqeHNba10saWQsayxqeHMubGVuZ3RoKVxcbiAgICAgICAgfSk7XFxuICAgIH1cXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIGNvbF90eXBlOidsaW5lJ1xcbiAgICB9KVxcbn1cXG5cXG5kLnB1c2goe1xcbiAgICB0aXRsZTon5L+d5a2YJyxcXG4gICAgY29sX3R5cGU6J3RleHRfY2VudGVyXzEnLFxcbiAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoTXlKaWV4aSxpZCxqeHNSb3V0ZSk9PntcXG4gICAgICAgIGlmKGdldFZhcignZG4uanhtX25hbWUnLCcnKSE9PU15SmlleGkuamlleGlzW2lkXS5uYW1lKXtcXG4gICAgICAgICAgICBpZkhhcyA9IE15SmlleGkuamlleGlzLmZpbHRlcihpdD0+aXQubmFtZT09PWdldFZhcignZG4uanhtX25hbWUnLCcnKSkubGVuZ3RoPjA7XFxuICAgICAgICAgICAgaWYoaWZIYXMpe1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5b6F5L+u5pS555qE5ZCN56ew6YeN5aSNLOS4jeWFgeiuuOS/neWtmCdcXG4gICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgTXlKaWV4aS5qaWV4aX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