xiaomianao666

小程序:初学者写源工具

Jan 27th, 2024
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@初学者写源工具@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi5Yid5a2m6ICF5YaZ5rqQ5bel5YW3IiwiYXV0aG9yIjoiIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjZnlwYWdlIiwidmVyc2lvbiI6MCwiY29sX3R5cGUiOiJtb3ZpZV8zIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJ0b29sIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG52YXIgcmVzID0ge307XG52YXIgaXRlbXMgPSBbXTtcblxuaXRlbXMucHVzaCh7XG4gICAgdGl0bGU6ICc8aDUgc3R5bGU9XCJ0ZXh0LWFsaWduOiBjZW50ZXI7XCI+PGJpZz48Zm9udCBjb2xvcj1cIiMwMDk5RkZcIj7jgJDliJ3lrabogIXmlZnnqIsm5qih5p2/JuWGmea6kOW3peWFt+aUtumbhuOAkTwvZm9udD48L2JpZz48L2g1PicsXG4gICAgY29sX3R5cGU6IFwicmljaF90ZXh0XCJcbn0pO1xuXG52YXIgaW5mbz1cIuasoui/juWQhOS9jeS9v+eUqO+9nOaPkOW7uuiurlwiXG52YXIgciA9ICQucmVxdWlyZSgnbm90aWNlJyk7XG5yLnNob3coaXRlbXMsIGluZm8sXCIjOTlDQ0ZGXCIpO1xuXG5pdGVtcy5wdXNoKHtcbiAgICB0aXRsZTogJ+KAnOKAnOKAneKAnTxmb250IGNvbG9yPVwiXCI+PGJpZz48Yj4nICsgJ+Wwj+eZveelnuWZqCcgKyAnPC9mb250PjwvYj48L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gIGNvbF90eXBlOiBcInRleHRfMlwiLFxuICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgbmV3V2luZG93OiB0cnVlLFxuICAgICAgICAgICAgd2luZG93SWQ6IE1ZX1JVTEUudGl0bGUsXG4gICAgICAgICAgICBwYWdlVGl0bGU6IGRhdGFcbiAgICAgICAgfVxuICAgIH0pO1xufSlcblxuaXRlbXMucHVzaCh7XG4gICAgdGl0bGU6ICfigJzigJzigJ3igJ08Zm9udCBjb2xvcj1cIiNDQ0E0RTNcIj48YmlnPjxiPicgKyAn44CQ5YaZ5rqQ5pWZ56iLJuaooeadv+OAkScgKyAnPC9mb250PjwvYj48L2JpZz4nLFxuICAgIGRlc2M6ICfmsYfmgLsnLFxuICAgIHVybDogJ3RvYXN0Oi8vJyArICfngrnlh7vkuIvmlrknLFxuICAgIGNvbF90eXBlOiBcInRleHRfY2VudGVyXzFcIlxufSk7XG5cblxudmFyIFRpdGxlID0gWyfluLjnlKjlhpnms5UnLCAn5bi455So6K+t5rOVJ11cblxudmFyIFBhZ2UgPSBbICdYRicsICdZRiddXG5cblRpdGxlLmZvckVhY2goZnVuY3Rpb24oZGF0YSwgaWQpIHtcbiAgICBpdGVtcy5wdXNoKHtcbiAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ08Zm9udCBjb2xvcj1cIiNGM0QzRThcIj7ilpAgPC9mb250PjxiPicgKyBkYXRhICsgJzxiPicsXG4gICAgICAgIHVybDogXCJoaWtlcjovL3BhZ2UvXCIrUGFnZVtpZF0rXCIjbm9IaXN0b3J5IyNub1JlY29yZEhpc3RvcnkjXCIsXG4gICAgICAgIGNvbF90eXBlOiBcInRleHRfMlwiLFxuICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgbmV3V2luZG93OiB0cnVlLFxuICAgICAgICAgICAgd2luZG93SWQ6IE1ZX1JVTEUudGl0bGUsXG4gICAgICAgICAgICBwYWdlVGl0bGU6IGRhdGFcbiAgICAgICAgfVxuICAgIH0pO1xufSlcblx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AgICAgICAgICAgICAgICAgICAgbGV0IGJ0aHRtbCA9IEpTT04ucGFyc2UoZmV0Y2goYnR1cmwsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdVc2VyLUFnZW50JzogYnR1YVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgd2l0aEhlYWRlcnM6IHRydWVcXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcXG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKGJ0aHRtbCk7XFxuICAgICAgICAgICAgICAgICAgICBuZXRwZyA9IGJ0aHRtbC5ib2R5O1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGJ0aHRtbC5zZWFyY2goXFxcInNldC1jb29raWVcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvb2sgPSBKU09OLnBhcnNlKGJ0aHRtbCkuaGVhZGVyc1snc2V0LWNvb2tpZSddWzBdLmpvaW4oJzsnKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgY29vayA9IFxcXCJcXFwiO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGxvZyhcXFwiQ29va2ll5YC877yaXFxcIiArIGNvb2spO1xcbiAgICAgICAgICAgICAgICBpZiAoY29vayA9PSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgZ2h0bWwgPSBmZXRjaChidHVybCArIFxcXCIvP2J0d2FmXFxcIiArIG5ldHBnLm1hdGNoKC9idHdhZiguKj8pXFxcXFxcXCIvKVsxXSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBidHVhXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBnaHRtbCA9IGZldGNoKGJ0dXJsICsgXFxcIi8/YnR3YWZcXFwiICsgbmV0cGcubWF0Y2goL2J0d2FmKC4qPylcXFxcXFxcIi8pWzFdLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IGJ0dWEsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29rXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuXFxuICAgICAgICBmdW5jdGlvbiBnZXRodG1sKHVybCwgdWEsIGNoYXJzKSB7XFxuICAgICAgICAgICAgaWYgKHVhID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICAgIHVhID0gTU9CSUxFX1VBO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodWEgPT0gXFxcIuaJi+aculxcXCIpIHtcXG4gICAgICAgICAgICAgICAgdWEgPSBNT0JJTEVfVUE7XFxuICAgICAgICAgICAgfSBlbHNlIGlmICh1YSA9PSBcXFwi55S16ISRXFxcIikge1xcbiAgICAgICAgICAgICAgICB1YSA9IFBDX1VBO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHVhID0gdWEucmVwbGFjZSgv77yb77ybL2csICc7Jyk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmIChjaGFycyA9PSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgICAgICBnaHRtbCA9IHJlcXVlc3QodXJsLCB7XFxuICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiB1YVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBnaHRtbCA9IHJlcXVlc3QodXJsLCB7XFxuICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcIkNvbnRlbnQtVHlwZVxcXCI6IFxcXCJ0ZXh0L2h0bWw7IGNoYXJzZXQ9XFxcIiArIGNoYXJzLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogdWFcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIC8vbG9nKGh0bWwpO1xcbiAgICAgICAgICAgIGJ0d2FmKGdodG1sLCB1cmwsIHVhLCBjaGFycyk7XFxuICAgICAgICAgICAgcmV0dXJuIGdodG1sO1xcbiAgICAgICAgfVxcbiAgICAgICAgc2hvd0xvYWRpbmcoXFxcIuato+WcqOiOt+WPlue9kemhtea6kOegge+8jOivt+eojeWAmS4uLlxcXCIpO1xcbiAgICAgICAgdmFyIGxpbmsgPSBpbnB1dC5zcGxpdChcXFwiO1xcXCIpO1xcbiAgICAgICAgdmFyIGh0bWwgPSBcXFwiXFxcIjtcXG4gICAgICAgIGlmIChsaW5rLmxlbmd0aCA9PSAxKSB7XFxuICAgICAgICAgICAgaHRtbCA9IGdldGh0bWwobGlua1swXSwgXFxcIlxcXCIsIFxcXCJcXFwiKTtcXG4gICAgICAgIH0gZWxzZSBpZiAobGluay5sZW5ndGggPT0gMikge1xcbiAgICAgICAgICAgIGh0bWwgPSBnZXRodG1sKGxpbmtbMF0sIGxpbmtbMV0sIFxcXCJcXFwiKTtcXG4gICA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T2Yoc3Rhcik7XFxuICAgICAgICAgICAgICAgICAgICAvL2xvZyhudWIpO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHUgPSBsaW4uc3Vic3RyaW5nKG51YiArIHN0YXIubGVuZ3RoKTtcXG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKHZhbHUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRlY29kZVVSSUNvbXBvbmVudCh2YWx1KTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBzdHIgPSBzdGFyICsgXFxcIiguKj8pXFxcIiArIGVuZDtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB2YWx1ID0gZXZhbChsaW4ubWF0Y2goc3RyKSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVjb2RlVVJJQ29tcG9uZW50KHZhbHVbMV0pXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBkZWNvZGVVUklDb21wb25lbnQobGluKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG5cXG5cXG5cXG4gICAgICAgIHZhciBzcGwgPSBnZXRJdGVtKFxcXCJjbGFzc3RleHRcXFwiKS5zcGxpdChcXFwiO1xcXCIpO1xcbiAgICAgICAgLy9sb2coc3BsLmxlbmd0aCk7XFxuICAgICAgICBpZiAoZ2V0TXlWYXIoXFxcInJlYWxyZXNjb2RlXFxcIiwgXFxcIlxcXCIpID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgLy9yZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+ivt+WFiOiOt+WPlue9kemhtea6kOeggeOAgic7XFxuICAgICAgICB9IGVsc2UgaWYgKHNwbFswXSA9PSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgaGlkZUxvYWRpbmcoKTtcXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6KeE5YiZ5qC85byP5aGr5YaZ6ZSZ6K+v77yM5LiN6IO95Li656m644CCJztcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdmFyIGh0bWwgPSBnZXRNeVZhcihcXFwicmVhbHJlc2NvZGVcXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgdmFyIGNvbnQgPSBwYXJzZURvbUZvckFycmF5KGh0bWwsIHNwbFswXSk7XFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKCfnrZvpgInmlbDph48nLCBjb250Lmxlbmd0aCk7XFxuICAgICAgICAgICAgICAgIC8vbG9nKGNvbnQubGVuZ3RoKTtcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCBjb250Lmxlbmd0aDsgaisrKSB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignY2xhc3NuYW1lJyArIGosIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdjbGFzc3ZhbHVlJyArIGosIFxcXCJcXFwiKTtcXG5cXG4gICAgICAgICAgICAgICAgICAgIHZhciBsaXN0ID0gcGFyc2VEb21Gb3JBcnJheShjb250W2pdLCBzcGxbMV0gKyAnOm5vdCg6bWF0Y2hlcyjlhajpg6h86aaW6aG1fOWFrOWRinzlpLTmnaF85LiT6aKYfOaYjuaYn3zkuIvovb18YXBwfEFQUHznsbvlnot85YiG57G7fOi1hOiur3znlZnoqIB85raI5oGvfOmYsui1sHzpgJrnn6V855So5oi3fOS7iuaXpXzlrZfmr40pKScpO1xcblxcbiAgICAgICAgICAgICAgICAgICAgLy9sb2coJ+WIl+ihqO+8micgKyBsaXN0Lmxlbmd0aCk7XFxuXFxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxpc3QubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbGlzdHQgPSBnZXRNeVZhcignY2xhc3NsaXN0JywgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsaXN0dC5sZW5ndGggPCAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsaXB0ID0gbGlzdFtpXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbGlwdCA9IGxpc3R0ICsgJ1xcXFxuXFxcXG4nICsgbGlzdFtpXVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignY2xhc3NsaXN0JywgbGlwdCk7XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gcGFyc2VEb21Gb3JIdG1sKGxpc3RbaV0sIHNwbFsyXSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVybCA9IHBhcnNlRG9tRm9ySHRtbChsaXN0W2ldLCBzcGxbM10pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzcGwubGVuZ3RoID09IDUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gc3ViY29udCh1cmwsIHNwbFs0XSwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3BsLmxlbmd0aCA9PSA2KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHN1YmNvbnQodXJsLCBzcGxbNF0sIHNwbFs1XSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gc3ViY29udCh1cmwsIFxcXCJcXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBmaWxldCA9IGdldE15VmFyKCdjbGFzc25hbWUnICsgaiwgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBmaWxlID0gZ2V0TXlWYXIoJ2NsYXNzdmFsdWUnICsgaiwgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmaWxldC5sZW5ndGggPCAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0eXB0ID0gdGl0bGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0eXBoID0gdXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0eXB0ID0gZmlsZXQgKyAnJicgKyB0aXRsZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHR5cGggPSBmaWxlICsgJyYnICsgdXJsXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vbG9nKGZpbGUubGVuZ3RoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignY2xhc3NuYW1lJyArIGosIHR5cHQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdjbGFzc3ZhbHVlJyArIGosIHR5cGgpO1xcbiAgICAgICAgICAgICAgICAgICAgfSAvL2ZvciBpXFxuXFxuICAgICAgICAgICAgICAgICAgICB2YXIgY2ZpbGV0ID0gZ2V0TXlWYXIoJ2NvbnRuYW1lJywgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNmaWxlID0gZ2V0TXlWYXIoJ2NvbnR2YWx1ZScsICcnKTtcXG5cXG4gICAgICAgICAgICAgICAgICAgIGlmIChnZXRNeVZhcignY2xhc3NuYW1lJyArIGosICcnKSAhPSAnJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChqID09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGN0eXB0ID0gJ+WQjeensO+8micgKyBnZXRNeVZhcignY2xhc3NuYW1lJyArIGosICcnKSArICdcXFxcbuabv+aNouivje+8micgKyBnZXRNeVZhcignY2xhc3N2YWx1ZScgKyBqLCAnJykgKyAnXFxcXG5cXFxcbic7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGN0eXB0ID0gY2ZpbGV0ICsgJ+WQjeensO+8micgKyBnZXRNeVZhcignY2xhc3NuYW1lJyArIGosICcnKSArIGNmaWxlICsgJ1xcXFxu5pu/5o2i6K+N77yaJyArIGdldE15VmFyKCdjbGFzc3ZhbHVlJyArIGosICcnKSArICdcXFxcblxcXFxuJztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ2NvbnRuYW1lJywgY3R5cHQpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNsaXN0dCA9IGdldE15VmFyKCdjb250bGlzdCcsICcnKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChqID09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgY2xpcHQgPSBjb250W2pdO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgY2xpcHQgPSBjbGlzdHQgKyAnXFxcXG5cXFxcbicgKyBjb250W2pdXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAvL2xvZyhjbGlwdCk7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignY29udGxpc3QnLCBjbGlwdCk7XFxuICAgICAgICAgICAgICAgICAgICAvL2xvZyhnZXRNeVZhcignY29udGxpc3QnLCAnJykpO1xcbiAgICAgICAgICAgICAgICAgICAgLy9wdXRNeVZhcignY29udGxpc3QnLCBnZXRNeVZhcignY2xhc3NsaXN0JywgJycpP2dldE15VmFyKCdjb250bGlzdCcsICcnKTpnZXRNeVZhcignY2xhc3NsaXN0JywgJycpKTtcXG4gICAgICAgICAgICAgICAgICAgIC8vcHV0TXlWYXIoJ2NvbnRsaXN0JywgZ2V0TXlWYXIoJ2NsYXNzbGlzdCcsICcnKT86Z2V0TXlWYXIoJ2NsYXNzbGlzdCcsICcnKSk7XFxuICAgICAgICAgICAgICAgIH0gLy9mb3IgalxcblxcbiAgICAgICAgICAgICAgICBwdXRNeVZhcignY29udGxpc3QnLCBnZXRNeVZhcignY2xhc3NsaXN0JywgJycpID09IFxcXCJcXFwiID8gZ2V0TXlWYXIoJ2NvbnRsaXN0JywgJycpIDogZ2V0TXlWYXIoJ2NsYXNzbGlzdCcsICcnKSk7XFxuXFxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAvL3B1dE15VmFyKCfliKTmlq0nLCBcXFwiMFxcXCIpO1xcbiAgICAgICAgICAgICAgICBsb2coXFxcIueUn+aIkOaKpemUmeWSr1xcXCIpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgaGlkZUxvYWRpbmcoKTtcXG4gICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknO1xcbiAgICAgICAgfVxcbiAgICB9KSxcXG4gICAgZXh0cmE6IHtcXG4gICAgICAgIHR5cGU6ICd0ZXh0YXJlYScsXFxuICAgICAgICBoZWlnaHQ6IC0xLFxcbiAgICAgICAgb25DaGFuZ2U6IFxcXCJzZXRJdGVtKCdjbGFzc3RleHQnLGlucHV0KVxcXCIsXFxuICAgICAgICBkZWZhdWx0VmFsdWU6IGNsYXNzVGV4dCxcXG4gICAgICAgIHRpdGxlVmlzaWJsZTogdHJ1ZVxcbiAgICB9LFxcbiAgICBjb2xfdHlwZTogJ2lucHV0J1xcbn0pO1xcblxcblxcbmxldCBjb250ZGEgPSBnZXRNeVZhcign562b6YCJ5pWw6YePJywgJzAnKTtcXG5pZiAoY29udGRhICE9ICcwJyAmJiBnZXRNeVZhcignY2xhc3NsaXN0JywgJycpICE9IFxcXCJcXFwiKSB7XFxuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgY29udGRhOyBpKyspIHtcXG4gICAgICAgIGlmIChnZXRNeVZhcignY2xhc3NuYW1lJyArIGksICcnKSAhPSAnJykge1xcbiAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuWkjeWItlxcXCIgKyBnZXRNeVZhcignY2xhc3NuYW1lJyArIGksICcnKS5zcGxpdCgnJicpWzBdICsgXFxcIuihjFxcXCIsXFxuICAgICAgICAgICAgICAgIC8vZGVzYzogZ2V0VmFyKFxcXCJmcmR0dmNvZGVcXFwiLFxcXCJcXFwiKSxcXG4gICAgICAgICAgICAgICAgdXJsOiBcXFwiY29uZmlybTovL+aYr+WQpumcgOimgeWkjeWItuW9k+WJjeWGheWuueOAgi5qczpcXFwiICsgJC50b1N0cmluZygoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGppZWd1byA9IGdldE15VmFyKCdjbGFzc25hbWUnICsgaSwgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGppZWd1byA9PSAnJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lhoXlrrnkuLrnqbos5aSN5Yi25aSx6LSl44CCJztcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoamllZ3VvLmxlbmd0aCA8IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5YaF5a656ZW/5bqm5LiN5aSfLOWkjeWItuWksei0peOAgic7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnY29weTovLycgKyBnZXRNeVZhcignY2xhc3NuYW1lJyArIGkpXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sIGkpLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImZsZXhfYnV0dG9uXFxcIlxcbiAgICAgICAgICAgIH0pO1xcblxcbiAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuWkjeWItlxcXCIgKyBnZXRNeVZhcignY2xhc3NuYW1lJyArIGksICcnKS5zcGxpdCgnJicpWzBdICsgXFxcIuihjFxcXCIgKyBcXFwi5pu/5o2i6K+NXFxcIixcXG4gICAgICAgICAgICAgICAgLy9kZXNjOiBnZXRWYXIoXFxcImZyZHR2Y29kZVxcXCIsXFxcIlxcXCIpLFxcbiAgICAgICAgICAgICAgICB1cmw6IFxcXCJjb25maXJtOi8v5piv5ZCm6ZyA6KaB5aSN5Yi25b2T5YmN5YaF5a6544CCLmpzOlxcXCIgKyAkLnRvU3RyaW5nKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgamllZ3VvID0gZ2V0TXlWYXIoJ2NsYXNzdmFsdWUnICsgaSwgJycpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGppZWd1byA9PSAnJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lhoXlrrnkuLrnqbos5aSN5Yi25aSx6LSl44CCJztcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoamllZ3VvLmxlbmd0aCA8IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5YaF5a656ZW/5bqm5LiN5aSfLOWkjeWItuWksei0peOAgic7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnY29weTovLycgKyBnZXRNeVZhcignY2xhc3N2YWx1ZScgKyBpKVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCBpKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJmbGV4X2J1dHRvblxcXCJcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgfVxcbn1cXG5cXG5pdGVtcy5wdXNoKHtcXG4gICAgdGl0bGU6ICfmgaLlpI3pu5jorqQnLFxcbiAgICB1cmw6ICQoJ2hpa2VyOi8vZW1wdHknKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICBjbGVhck15VmFyKCdyZXNjb2RlJyk7XFxuICAgICAgICBjbGVhck15VmFyKCdyZWFscmVzY29kZScpO1xcblxcbiAgICAgICAgY2xlYXJNeVZhcignY2xhc3NuYW1lJyk7XFxuICAgICAgICBjbGVhck15VmFyKFxcXCJjbGFzc3ZhbHVlXFxcIik7XFxuICAgICAgICBjbGVhck15VmFyKCdjb250bmFtZScpO1xcbiAgICAgICAgY2xlYXJNeVZhcihcXFwiY29udHZhbHVlXFxcIik7XFxuXFxuICAgICAgICBjbGVhck15VmFyKCdjbGFzc2xpc3QnKVxcbiAgICAgICAgY2xlYXJNeVZhcignY29udGxpc3QnKTtcXG4gICAgICAgIGNsZWFySXRlbSgnbGlua3RleHQnKTtcXG4gICAgICAgIGNsZWFySXRlbSgnY2xhc3N0ZXh0Jyk7XFxuICAgICAgICBjbGVhck15VmFyKCfnrZvpgInmlbDph48nKTtcXG4gICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgfSksXFxuICAgIGNvbF90eXBlOiBcXFwiZmxleF9idXR0b25cXFwiXFxufSk7XFxuXFxuaWYgKGdldE15Vm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AgICAgICAgICAgIGlmIChqIDwgdHlwZWMubGVuZ3RoIC0gMSkge1xcbiAgICAgICAgICAgICAgICB0eXBldCArPSBcXFwiJlxcXCI7XFxuICAgICAgICAgICAgICAgIHR5cGVsICs9IFxcXCImXFxcIjtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuXFxuICAgICAgICBwdXRWYXIoJ2pzb250eXBldCcsIHR5cGV0KTtcXG4gICAgICAgIHB1dFZhcignanNvbnR5cGVsJywgdHlwZWwpO1xcbiAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgfSksXFxuICAgIGNvbF90eXBlOiAndGV4dF8zJ1xcbn0pO1xcblxcbml0ZW1zLnB1c2goe1xcbiAgICB0aXRsZTogXFxcIuWkjeWItuWQjeensFxcXCIsXFxuICAgIHVybDogXFxcImNvbmZpcm06Ly/mmK/lkKbpnIDopoHlpI3liLblvZPliY3lhoXlrrnjgIIuanM6XFxcIiArICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgdmFyIGppZWd1byA9IGdldFZhcignanNvbnR5cGV0JywgJycpO1xcbiAgICAgICAgaWYgKGppZWd1byA9PSAnJykge1xcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lhoXlrrnkuLrnqbos5aSN5Yi25aSx6LSl44CCJztcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgcmV0dXJuICdjb3B5Oi8vJyArIGdldFZhcignanNvbnR5cGV0JylcXG4gICAgICAgIH1cXG4gICAgfSksXFxuICAgIGNvbF90eXBlOiBcXFwidGV4dF8zXFxcIlxcbn0pO1xcblxcbml0ZW1zLnB1c2goe1xcbiAgICB0aXRsZTogXFxcIuWkjeWItuabv+aNouivjVxcXCIsXFxuICAgIHVybDogXFxcImNvbmZpcm06Ly/mmK/lkKbpnIDopoHlpI3liLblvZPliY3lhoXlrrnjgIIuanM6XFxcIiArICQudG9T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C35byPJywgJ2ljb25fNF9jYXJkJykgfHwgJycpO1xcbiAgICAgICAgbGV0IOaMiemSruagt+W8jyA9IGFsbF9jb2xzLm1hcCgoaXQpID0+IHtcXG4gICAgICAgICAgICByZXR1cm4gaXQgPT09IGNvbCA/ICfinqHvuI8nICsgaXQgOiBpdDtcXG4gICAgICAgIH0pO1xcbiAgICAgICAgbGV0IHRpcHMgPSAn6K+36YCJ5oup5qC35byPJztcXG4gICAgICAgIHJldHVybiAkKOaMiemSruagt+W8jywgMiwgdGlwcykuc2VsZWN0KCgpID0+IHtcXG4gICAgICAgICAgICBpbnB1dCA9IGlucHV0LnJlcGxhY2UoL+Keoe+4jy9nLCAnJyk7XFxuICAgICAgICAgICAgc3RvcmFnZTAuc2V0SXRlbSgn5oyJ6ZKu5qC35byPJywgaW5wdXQpO1xcbiAgICAgICAgICAgIC8vIGNvbmZpZy7mjInpkq7moLflvI8gPSBpbnB1dDtcXG4gICAgICAgICAgICBpbml0Q29uZmlnKHtcXG4gICAgICAgICAgICAgICAg5oyJ6ZKu5qC35byPOiBpbnB1dFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIC8vIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgIGxldCBvbGRJZHMgPSAoZmluZEl0ZW1zQnlDbHMoJ2ltZycpKS5tYXAoaXQgPT4gaXQuZXh0cmEuaWQpO1xcbiAgICAgICAgICAgIHVwZGF0ZUl0ZW0oJ3N0eWxlJywge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+agt+W8jzonICsgc3RvcmFnZTAuZ2V0SXRlbSgn5oyJ6ZKu5qC35byPJywgJ2ljb25fNF9jYXJkJylcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBvbGRJZHMuZm9yRWFjaCh4ID0+IHtcXG5cXG4gICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh4LCB7XFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogaW5wdXRcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWIh+aNouagt+W8j+S4ujonICsgaW5wdXQ7XFxuICAgICAgICB9KTtcXG4gICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgfSksXFxuICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nLFxcbiAgICBleHRyYToge1xcbiAgICAgICAgaWQ6ICdzdHlsZSdcXG4gICAgfVxcbn0pXFxuXFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6ICfmjqXlj6M6JyArIHN0b3JhZ2UwLmdldEl0ZW0oJ+aOpeWPoycsICfnm7Tov54nKSxcXG4gICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpbmYpID0+IHtcXG4gICAgICAgIGxldCBhbGxfY29scyA9IGluZlxcbiAgICAgICAgbGV0IGNvbCA9IChzdG9yYWdlMC5nZXRJdGVtKCfmjqXlj6MnLCAn55u06L+eJykgfHwgJycpO1xcbiAgICAgICAgbGV0IOaOpeWPoyA9IGFsbF9jb2xzLm1hcCgoaXQpID0+IHtcXG4gICAgICAgICAgICByZXR1cm4gaXQgPT09IGNvbCA/ICfinqHvuI8nICsgaXQgOiBpdDtcXG4gICAgICAgIH0pO1xcbiAgICAgICAgbGV0IHRpcHMgPSAn6K+36YCJ5oup5qC35byPJztcXG4gICAgICAgIHJldHVybiAkKOaOpeWPoywgMSwgdGlwcykuc2VsZWN0KCgpID0+IHtcXG4gICAgICAgICAgICBpbnB1dCA9IGlucHV0LnJlcGxhY2UoL+Keoe+4jy9nLCAnJyk7XFxuICAgICAgICAgICAgc3RvcmFnZTAuc2V0SXRlbSgn5o6l5Y+jJywgaW5wdXQpO1xcbiAgICAgICAgICAgIC8vIGNvbmZpZy7mjInpkq7moLflvI8gPSBpbnB1dDtcXG4gICAgICAgICAgICBpbml0Q29uZmlnKHtcXG4gICAgICAgICAgICAg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2U2NCcpXFxuICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICBzdG9yYWdlMC5zZXRJdGVtKCfnsbvlnosnLCAnaW1nJylcXG4gICAgICAgIH1cXG4gICAgICAgIHRvYXN0KCfor7fph43mlrDojrflj5YnKVxcbiAgICAgICAgdXBkYXRlSXRlbSgndHlwZScsIHtcXG4gICAgICAgICAgICB0aXRsZTogJ+exu+WeizonICsgc3RvcmFnZTAuZ2V0SXRlbSgn57G75Z6LJywgJ2ltZycpXFxuICAgICAgICB9KTtcXG4gICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgfSksXFxuICAgIGNvbF90eXBlOiAndGV4dF8yJyxcXG4gICAgZXh0cmE6IHtcXG4gICAgICAgIGlkOiAndHlwZSdcXG4gICAgfVxcbn0pXFxuXFxuXFxuZC5wdXNoKHtcXG4gICAgdXJsOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgIHB1dE15VmFyKCdrZXl3b3JkJywgaW5wdXQpXFxuICAgICAgICBpZiAoaW5wdXQgPT0gJycpIHtcXG4gICAgICAgICAgICB0b2FzdCgn6L6T5YWl5Li656m6JylcXG4gICAgICAgICAgICByZXR1cm4gJydcXG4gICAgICAgIH1cXG4gICAgICAgIHVwZGF0ZUl0ZW0oJ2xhYicsIHtcXG4gICAgICAgICAgICB0aXRsZTogJyAg6I635Y+W5Lit6K+356iN562JJyxcXG4gICAgICAgIH0pO1xcbiAgICAgICAgdmFyIHIgPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9mdW4nKTtcXG4gICAgICAgIHZhciBpbmYgPSBzdG9yYWdlMC5nZXRJdGVtKCfmjqXlj6MnLCAn55u06L+eJylcXG4gICAgICAgIHZhciBsaXN0ID0gci5nZmF2KGlucHV0LCBpbmYpXFxuICAgICAgICAvL2xvZyhsaXN0KVxcblxcblxcbiAgICAgICAgaWYgKGxpc3QgIT0gdW5kZWZpbmVkICYmIGxpc3QubGVuZ3RoID4gMCkge1xcbiAgICAgICAgICAgIGZvciAobGV0IGwgb2YgbGlzdCkge1xcbiAgICAgICAgICAgICAgICB2YXIgdGwgPSBsLnN1YnN0cmluZyhsLmxhc3RJbmRleE9mKCcvJykgKyAxKVxcbiAgICAgICAgICAgICAgICBpZiAobC5pbmNsdWRlcygnPycpKSB7XFxuICAgICAgICAgICAgICAgICAgICB0bCA9IGwuc3BsaXQoJz0nKVsxXVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHZhciB0eXBlID0gc3RvcmFnZTAuZ2V0SXRlbSgn57G75Z6LJywgJ2ltZycpXFxuICAgICAgICAgICAgICAgIHZhciBjID0gbFxcbiAgICAgICAgICAgICAgICBpZiAodHlwZSA9PSAnYmFzZTY0Jykge1xcbiAgICAgICAgICAgICAgICAgICAgYz1jb252ZXJ0QmFzZTY0SW1hZ2UobClcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBhZGRJdGVtQWZ0ZXIoJ3RleHQnLCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGwsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGwsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdjb3B5Oi8vJyArIGMsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogc3RvcmFnZTAuZ2V0SXRlbSgn5oyJ6ZKu5qC35byPJywgJ2ljb25fNF9jYXJkJyksXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogJ2ltZycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGxcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHN0b3JhZ2UwLnNldEl0ZW0oJ2FycicsIGxpc3QpXFxuICAgICAgICB9XFxuICAgICAgICB1cGRhdGVJdGVtKCdsYWInLCB7XFxuICAgICAgICAgICAgdGl0bGU6ICcgIOivt+WcqOS4i+aWuei+k+WFpemTvuaOpVvlv4XpobvmnIlodHRwXSDnhLblkI7ngrnnoa7orqQnLFxcbiAgICAgICAgfSk7XFxuICAgICAgICByZXR1cm4gJydcXG4gICAgfSksXFxuICAgIGNvbF90eXBlOiAnaW5wdXQnLFxcbiAgICB0aXRsZTogJ+ehruWumicsXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICB0eXBlOiAndGV4dGFyZWEnLFxcbiAgICAgICAgaGVpZ2h0OiAtMSxcXG4gICAgICAgIGlkOiAndGV4dCcsXFxuICAgICAgICBkZWZhdWx0VmFsdWU6IGdldE15VmFyKCdrZXl3b3JkJywgJycpIHx8IFxcXCJcXFwiXFxuICAgIH1cXG59KVxcblxcblxcbnNldFJlc3VsdChkKTtcXG5cXG5pZiAoTVlfVFlQRSA9PSAnaG9tZScpIHtcXG4gICAgXFxuICAgIHZhciBsaXN0ID0gc3RvcmFnZTAuZ2V0SXRlbSgnYXJyJywgW10pXFxuXFxuICAgIGlmIChsaXN0Lmxlbmd0aCA+IDApIHtcXG4gICAgICAgIGZvciAobGV0IGwgb2YgbGlzdCkge1xcbiAgICAgICAgICAgIHZhciB0bCA9IGwuc3Vic3RyaW5nKGwubGFzdEluZGV4T2YoJy8nKSArIDEpXFxuICAgICAgICAgICAgaWYgKGwuaW5jbHVkZXMoJz8nKSkge1xcbiAgICAgICAgICAgICAgICB0bCA9IGwuc3BsaXQoJz0nKVsxXVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBhZGRJdGVtQWZ0ZXIoJ3RleHQnLCB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0bCxcXG4gICAgICAgICAgICAgICAgaW1nOiBsLFxcbiAgICAgICAgICAgICAgICB1cmw6ICdjb3B5Oi8vJyArIGwsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBzdG9yYWdlMC5nZXRJdGVtKCfmjInpkq7moLflvI8nLCAnaWNvbl80X2NhcmQnKSxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIGNsczogJ2ltZycsXFxuICAgICAgICAgICAgICAgICAgICBpZDogbFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgIH1cXG4gICAgXFxufVwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwiJOiOt+WPlkZhdmljb27Ct86x5pa55rOVXCIsXCJwYXRoXCI6XCJmdW5cIixcInJ1bGVcIjpcImpzOlxcbmZ1bmN0aW9uIGdldEZhdih1cmwsIGluZikge1xcbiAgICBpZiAoIS9odHRwW3NdPy8udGVzdCh1cmwpKSB7XFxuICAgICAgICB0b2FzdCgn5LiN5piv572R5Z2AJylcXG4gICAgICAgIHJldHVyblxcbiAgICB9XFxuICAgIHZhciBqYXZhaSA9IEphdmFJbXBvcnRlcihqYXZhLm5ldC5VUkwsIG9yZy5qc291cC5Kc291cClcXG5cXG4gICAgdmFyIGxpc3QgPSBbXVxcblxcbiAgICB3aXRoKGphdmFpKSB7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHZhciB1ID0gbmV3IFVSTCh1cmwpO1xcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIGxvZygn6ZSZ6K+v5L+h5oGv77yaJyArIGUpXFxuICAgICAgICAgICAgdG9hc3QoJ+mUmeivr+S/oeaBr++8micgKyBlKVxcbiAgICAgICAgICAgIHJldHVyblxcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIHBsID0gdS5nZXRQcm90b2NvbCgpO1xcbiAgICAgICAgdmFyIGhzID0gdS5nZXRIb3N0KCk7XFxuICAgICAgICB2YXIgbmV3VXJsID0gdS5nZXRQcm90b2NvbCgpLmNvbmNhdChcXFwiOi8vXFxcIikuY29uY2F0KHUuZ2V0SG9zdCgpKTtcXG4gICAgICAgIGxvZyhuZXdVcmwpXFxuICAgICAgICBcXG4gICAgICAgIGlmIChpbmYgIT0gJ+ebtOi/nicpIHtcXG4gICAgICAgICAgICBpZiAoaW5mLmluY2x1ZGVzKCcjIycpKSB7XFxuICAgICAgICAgICAgICAgIGluZiA9IGluZi5zcGxpdCgnIyMnKVsxXVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBsaXN0LnB1c2goaW5mLnJlcGxhY2UoJyR7dXJsfScsIG5ld1VybCkpXFxuICAgICAgICAgICAgcmV0dXJuIGxpc3RcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIHZhciBmYXYgPSBuZXdVcmwgKyAnL2Zhdmljb24uaWNvJ1xcbiAgICAgICAgdmFyIHJlcyA9IGZldGNoKGZhdiwge1xcbiAgICAgICAgICAgIHdpdGhTdGF0dXNDb2RlOiB0cnVlXFxuICAgICAgICB9KVxcbiAgICAgICAgbG9nKHJlcylcXG4gICAgICAgIHZhciBjb2RlID0gMFxcbiAgICAgICAgaWYgKHJlcyAhPSAnJykge1xcbiAgICAgICAgICAgIHZhciBtZXMgPSBKU09OLnBhcnNlKHJlcylcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGlmIChtZXMuZXJyb3IgIT0gbnVsbCkge1xcbiAgICAgICAgICAgIGlmIChtZXMuZXJyb3IuaW5jbHVkZXMoJ1VuYWJsZSB0byByZXNvbHZlIGhvc3QnKSkge1xcbiAgICAgICAgICAgICAgICBsb2coJ+mUmeivr+S/oeaBr++8micgKyBtZXMuZXJyb3IpXFxuICAgICAgICAgICAgICAgIHRvYXN0KCfplJnor6/kv6Hmga/vvJonICsgbWVzLmVycm9yKVxcbiAgICAgICAgICAgICAgICByZXR1cm5cXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICB9XFxuICAgICAgICBjb2RlID0gbWVzLnN0YXR1c0NvZGVcXG4gICAgICAgIGlmIChjb2RlID09IDIwMCAmJiAhbWVzLmJvZHkuaW5jbHVkZXMoJ2h0bWwnKSkge1xcbiAgICAgICAgICAgIGxpc3QucHVzaChmYXYpXFxuICAgICAgICB9XFxuXFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHZhciBkb2N1bWVudCA9IEpzb3VwLnBhcnNlKGZldGNoKG5ld1VybCkpO1xcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIGxvZygn6ZSZ6K+v5L+h5oGv77yaJyArIGUpXFxuICAgICAgICAgICAgdG9hc3QoJ+mUmeivr+S/oeaBr++8micgKyBlKVxcbiAgICAgICAgICAgIHJldHVyblxcbiAgICAgICAgfVxcblxcblxcbiAgICAgICAgdmFyIGltZ3MgPSBkb2N1bWVudC5zZWxlY3QoXFxcImxpbmtbdHlwZT1pbWFnZS94LWljb25dXFxcIik7XFxuICAgICAgICBsb2coaW1ncylcXG4gICAgICAgIGltZ3MgPSBPYmplY3Qua2V5cyhpbWdzKS5sZW5ndGggPiAwID8gaW1ncyA6IGRvY3VtZW50LnNlbGVjdChcXFwibGlua1tyZWwkPWljb25dXFxcIilcXG4gICAgICAgIGltZ3MgPSBPYmplY3Qua2V5cyhpbWdzKS5sZW5ndGggPiAwID8gaW1ncyA6IGRvY3VtZW50LnNlbGVjdChcXFwibWV0YVtpdGVtcHJvcD1pbWFnZV1cXFwiKVxcbiAgICAgICAgLy9sb2coSlNPTi5zdHJpbmdpZnkoaW1ncykpXFxuXFxuICAgICAgICB2YXIgaXN3ZWIgPSAvKGNvbXxjbikvXFxuICAgICAgICB2YXIgaXNpbWcgPSAvLio/KHN2Z3xqcGd8aWNvfHBuZ3xnaWZ8anBlZykkL2dtXFxuICAgICAgICBmb3IgKGxldCB4IG9mIGltZ3MpIHtcXG5cXG4gICAgICAgICAgICB2YXIgbGluayA9IHguYXR0cihcXFwiaHJlZlxcXCIpXFxuICAgICAgICAgICAgaWYgKGxpbmsgPT0gJycpIHtcXG4gICAgICAgICAgICAgICAgbGluayA9IHguYXR0cignY29udGVudCcpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgI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wuc3Vic3RyaW5nKGwubGFzdEluZGV4T2YoJy8nKSArIDEpXFxuICAgICAgICAgICAgICAgIGFkZEl0ZW1BZnRlcigndGV4dCcsIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0bCxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogbCxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2NvcHk6Ly8nICsgbCxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBzdG9yYWdlMC5nZXRJdGVtKCfmjInpkq7moLflvI8nLCAnaWNvbl80X2NhcmQnKSxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiAnaW1nJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogbFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHRvYXN0KCforrDlvZXkuLrnqbonKVxcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICB9KSxcXG4gICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbicsXFxuICAgIGV4dHJhOiB7XFxuXFxuICAgIH1cXG59KVwifSx7XCJjb2xfdHlwZVwiOlwicmljaF90ZXh0XCIsXCJuYW1lXCI6XCLluLjnlKjlhpnms5XCuVwiLFwicGF0aFwiOlwiWEZcIixcInJ1bGVcIjpcImpzOlxcbnZhciBkID0gW107XFxudmFyIFRpdGxlID0gWyfkuIDnuqcm5LqM57qn5bi455So5YaZ5rOVJywgJ1BPU1Tlhpnms5UnXVxcbnZhciBqc29uID0gSlNPTi5wYXJzZShKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS94ZicpKS5ydWxlKVxcbnZhciBQYWdlID0gW2pzb24udGV4dCwganNvbi5wb3N0XVx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cbiAgICAgICAgICBsZXQgYWxsX2NvbHMgPSBbJzrpmo/mnLrpopzoibInXVxcclxcbiAgICAgICAgICBhbGxfY29scy51bnNoaWZ0KCflvZPliY0nICsgJzonICsgaW5wdXQpXFxyXFxuICAgICAgICAgIHJldHVybiAkKGFsbF9jb2xzLCAxLCAn5YiG57G76aKc6ImyJykuc2VsZWN0KCgpID0+IHtcXHJcXG4gICAgICAgICAgICB2YXIgciA9IGlucHV0LnNwbGl0KCc6JylbMV07XFxyXFxuICAgICAgICAgICAgcHV0TXlWYXIoJ+WIhuexu+minOiJsicsIHIpO1xcclxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXHJcXG4gICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxyXFxuICAgICAgICAgIH0pXFxyXFxuICAgICAgICB9XFxyXFxuXFxyXFxuICAgICAgICBwdXRNeVZhcihrZXksIGlucHV0KTtcXHJcXG4gICAgICAgIHJlZnJlc2hQYWdlKClcXHJcXG4gICAgICAgIHJldHVybiAndG9hc3Q6Ly8nICsga2V5ICsgXFxcIjpcXFwiICsgaW5wdXQ7XFxyXFxuICAgICAgfSwga2V5KSxcXHJcXG4gICAgICBleHRyYToge1xcclxcbiAgICAgICAgb25DaGFuZ2U6JC50b1N0cmluZygoayk9PntcXHJcXG4gICAgICAgICAgaWYoaz09J+S4gOe6p+WkhOeQhicpe1xcclxcbiAgICAgICAgICAgIHB1dE15VmFyKCfkuIDnuqfliIbnsbvlpITnkIYnLGlucHV0KVxcclxcbiAgICAgICAgICB9XFxyXFxuICAgICAgICB9LGtleSksXFxyXFxuICAgICAgICBjbHM6IE1ZX1JVTEUudGl0bGUrJ09wdGlvbnMnLFxcclxcbiAgICAgICAgZGVmYXVsdFZhbHVlOiBvYmoudmFsdWUsXFxyXFxuICAgICAgICBoaWdobGlnaHQ6IGtleT09J+S4gOe6p+WkhOeQhic/dHJ1ZTpmYWxzZSxcXHJcXG4gICAgICAgIHR5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ywnJyk7XFxyXFxuICAgICAgaWYoaHRtbD09JycmJmxpc3RodG1sPT0nJyl7XFxyXFxuICAgICAgICBodG1sPWZldGNoKHVybCk7XFxyXFxuICAgICAgICB0b2FzdCgn6I635Y+W572R6aG15LitLi4uJyk7XFxyXFxuICAgICAgICBwdXRNeVZhcignbGlzdGh0bWwnLGh0bWwpO1xcclxcbiAgICAgIH1lbHNlIGlmKGxpc3RodG1sIT0nJyl7XFxyXFxuICAgICAgICBodG1sPWxpc3RodG1sO1xcclxcbiAgICAgIH1cXHJcXG4gICAgICBcXHJcXG4gICAgICB2YXIgdHM9WyfliJfooagnLCfmoIfpopgnLCflm77niYcnLCfmj4/ov7AnLCfpk77mjqUnXTtcXHJcXG4gICAgICB0cy5mb3JFYWNoKChpdGVtLGkpPT57XFxyXFxuICAgICAgICBkLnB1c2goe1xcclxcbiAgICAgICAgICB0aXRsZTppdGVtLFxcclxcbiAgICAgICAgICBjb2xfdHlwZTonaW5wdXQnLFxcclxcbiAgICAgICAgICB1cmw6JC50b1N0cmluZygodHMscmwsaSk9PntcXHJcXG4gICAgICAgICAgICBybFtpXT1pbnB1dDtcXHJcXG4gICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcihcXFwibGlzdHNcXFwiLCBybC5qb2luKCc7JykpO1xcclxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXHJcXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8vJyt0c1tpXSsnOicraW5wdXQ7XFxyXFxuICAgICAgICAgIH0sdHMscmxpc3QsaSksXFxyXFxuICAgICAgICAgIGV4dHJhOntcXHJcXG4gICAgICAgICAgICBkZWZhdWx0VmFsdWU6cmxpc3RbaV1cXHJcXG4gICAgICAgICAgfVxcclxcbiAgICAgICAgfSlcXHJcXG4gICAgICB9KVxcclxcbiAgICAgIFxcclxcbiAgICAgIHZhciBsaXN0ID0gcGRmYShodG1sLCBybGlzdFswXSk7XFxyXFxuICAgICAgdmFyIGluZGV4PWdldE15VmFyKCdsaXN0aScsJycpO1xcclxcbiAgICAgIFxcclxcbiAgICAgIGlmKGluZGV4IT0nJyl7XFxyXFxuICAgICAgICB2YXIgdHNvYmo9e1xcclxcbiAgICAgICAgIHRpdGxlOnBkZmgobGlzdFtpbmRleF0scmxpc3RbMV0pLFxcclxcbiAgICAgICAgIGRlc2M6cGRmaChsaXN0W2luZGV4XSxybGlzdFszXSksXFxyXFxuICAgICAgICAgaW1nOnBkKGxpc3RbaW5kZXhdLHJsaXN0WzJdKSsnQFJlZmVyZXI9JyxcXHJcXG4gICAgICAgICB1cmw6cGQobGlzdFtpbmRleF0scmxpc3RbNF0pLFxcclxcbiAgICAgICAgfVxcclxcbiAgICAgICAgXFxyXFxuICAgICAgICBkLnB1c2goe1xcclxcbiAgICAgICAgICB0aXRsZTp0c29iai50aXRsZSxcXHJcXG4gICAgICAgICAgZGVzYzp0c29iai5kZXNjLFxcclxcbiAgICAgICAgICBpbWc6dHNvYmouaW1nLFxcclxcbiAgICAgICAgICB1cmw6dHNvYmoudXJsLFxcclxcbiAgICAgICAgICBjb2xfdHlwZTonbW92aWVfMV92ZXJ0aWNhbF9waWMnLFxcclxcbiAgICAgICAgfSlcXHJcXG4gICAgICAgIFxcclxcbiAgICAgICAgZC5wdXNoKHtcXHJcXG4gICAgICAgICAgZGVzYzon6LCD6K+V56qX5Y+jJyxcXHJcXG4gICAgICAgICAgY29sX3R5cGU6J2lucHV0JyxcXHJcXG4gICAgICAgICAgZXh0cmE6e1xcclxcbiAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTpsaXN0W2luZGV4XSxcXHJcXG4gICAgICAgICAgICB0aXRsZVZpc2libGU6IGZhbHNlLFxcclxcbiAgICAgICAgICAgIHR5cGU6J3RleHRhcmVhJyxcXHJcXG4gICAgICAgICAgICBoaWdobGlnaHQ6IHRydWUsXFxyXFxuICAgICAgICAgICAgaGVpZ2h0Oi0xLFxcclxcbiAgICAgICAgICB9XFxyXFxuICAgICAgICB9KVxcclxcbiAgICAgIH1cXHJcXG4gICAgICBcXHJcXG4gICAgICBkLnB1c2goe1xcclxcbiAgICAgICAgICB0aXRsZTon4oCc4oCc4oCd4oCdJysoaW5kZXg9PScnPydBbGwnLmZvbnRjb2xvcignIzNDQjM3MScpOidBbGwnKSxcXHJcXG4gICAgICAgICAgY29sX3R5cGU6J2ZsZXhfYnV0dG9uJyxcXHJcXG4gICAgICAgICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKCk9PntcXHJcXG4gICAgICAgICAgICBjbGVhck15VmFyKCdsaXN0aScpO1xcclxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXHJcXG4gICAgICAgICAgICBzZXRQYWdlVGl0bGUoJ+WFqOmDqCcpO1xcclxcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lhajpg6gnO1xcclxcbiAgICAgICAgICB9KVxcclxcbiAgICAgIH0pXFxyXFxuICAgICAgXFxyXFxuICAgICAgbGlzdC5mb3JFYWNoKChpdGVtLGkpPT57XFxyXFxuICAgICAgICBkLnB1c2goe1xcclxcbiAgICAgICAgICB0aXRsZTon4oCc4oCc4oCd4oCdJysoaW5kZXghPScnJiZwYXJzZUludChpbmRleCk9PWk/KGkrJycpLmZvbnRjb2xvcignIzNDQjM3MScpOmkpLFxcclxcbiAgICAgICAgICBjb2xfdHlwZTonZmxleF9idXR0b24nLFxcclxcbiAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSk9PntcXHJcXG4gICAgICAgICAgICBwdXRNeVZhcignbGlzdGknLGkrJycpO1xcclxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXHJcXG4gICAgICAgICAgICBzZXRQYWdlVGl0bGUoJ+esrCcraSsn5LiqJyk7XFxyXFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W9k+WJjeiwg+ivleesrCcraSsn5LiqJztcXHJcXG4gICAgICAgICAgfSxpKVxcclxcbiAgICAgICAgfSlcXHJcXG4gICAgICB9KVxcclxcbiAgICAgIFxcclxcbiAgICAgIGlmKGluZGV4PT0nJyl7XFxyXFxuICAgICAgZm9yICh2YXIgaSBpbiBsaXN0KSB7XFxyXFxuICAgICAgdmFyIGltZyA9IHBkKGxpc3RbaV0sIHJsaXN0WzJdKSArIFxcXCJAUmVmZXJlcj1cXFwiO1xcclxcbiAgICAgICAgZC5wdXNoKHtcXHJcXG4gICAgICAgICB0aXRsZTogcGRmaChsaXN0W2ldLCBybGlzdFsxXSksXFxyXFxuICAgICAgICAgaW1nOiBpbWcsXFxyXFxuICAgICAgICAgZGVzYzogcGRmaChsaXN0W2ldLCBybGlzdFszXSksXFxyXFxuICAgICAgICAgdXJsOiBwZChsaXN0W2ldLCBybGlzdFs0XSksXFxyXFxuICAgICAgICAgZXh0cmE6IHtcXHJcXG4gICAgICAgICAgIGltZzogaW1nXFxyXFxuICAgICAgICAgIH1cXHJcXG4gICAgICAgICB9KVxcclxcbiAgICAgICAgfVxcclxcbiAgICAgICB9IFxcclxcbiAgICAgIFxcclxcbiAgICAgIHNldFJlc3VsdChkKTtcXHJcXG4gICAgfSksXFxyXFxuICB9LCB7XFxyXFxuICAgIHRpdGxlOiAn55Sf5oiQJyxcXHJcXG4gICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbicsXFxyXFxuICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoKSA9PiB7XFxyXFxuICAgICAgdmFyIOWkhOeQhiA9IGdldE15VmFyKCfkuIDnuqfliIbnsbvlpITnkIYnLCAnJyk7XFxyXFxuICAgICAg5aSE55CGID0g5aSE55CGLnJlcGxhY2UoL1tcXFxcclxcXFxuXShcXFxcKFxcXFwpKS8sICckMScpLnJlcGxhY2UoL1tcXFxcclxcXFxuXVxcXFwpXFxcXChcXFxcKSQvbSwgXFxcIilcXFwiKTtcXHJcXG4gICAgICB2YXIgbGlzdCA9IFxcX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cXFxcbicpXTtcXG4gICAgaWYgKOaLvOaOpeWIhuexuy5pbmNsdWRlcygnOycpKSB7XFxuICAgICAgICDmi7zmjqXliIbnsbsgPSDmi7zmjqXliIbnsbsuc3BsaXQoJzsnKTtcXG4gICAgfVxcbiAgICBpZiAo5ou85o6l5YiG57G7LmNvbnN0cnVjdG9yID09IEFycmF5KSB7XFxuICAgICAgICDmi7zmjqXliIbnsbsuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICBjYXRlZ29yaWVzID0gY2F0ZWdvcmllcy5jb25jYXQocGRmYShodG1sLCBpdGVtKSk7XFxuICAgICAgICB9KVxcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgY2F0ZWdvcmllcyA9IFtwZGZhKGh0bWwsIOWkp+exu+WumuS9jSkuam9pbignXFxcXG4nKV0uY29uY2F0KHBkZmEoaHRtbCwg5ou85o6l5YiG57G7KSk7XFxuICAgIH1cXG4gICAgaWYgKHR5cGVvZiAo6ZmE5Yqg5a6a5L2NKSAhPSAndW5kZWZpbmVkJyAmJiDpmYTliqDlrprkvY0ubGVuZ3RoID4gMCkge1xcbiAgICAgICAg6ZmE5Yqg5a6a5L2NLmZvckVhY2goeCA9PiB7XFxuICAgICAgICAgICAgdmFyIOS4gOe6pyA9IHBkZmEoaHRtbCwgeC7kuIDnuqflrprkvY0pLm1hcChzID0+IHtcXG4gICAgICAgICAgICAgICAgdmFyIOWumuS9jSA9IHBkZmEocywgeC7lsI/nsbspLm1hcChxID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IHBkZmgocSwgeC7moIfpopgpO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHVybCA9ICdhJ1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHgu6ZO+5o6lLmluY2x1ZGVzKCdAQCcpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGUgPSB4LumTvuaOpS5zcGxpdCgnQEAnKVswXVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlID0gcGRmaChxLCB4LumTvuaOpS5zcGxpdCgnQEAnKVsxXSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHgu6L2s5o2iID09IHRydWUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGA8bGkgZGF0YS10eXBlPVxcXCIke3N0YXRlfVxcXCIgZGF0YS12YWw9XFxcIiR7dmFsdWV9XFxcIj48YSBocmVmPVxcXCJcXFwiPiR7dGl0bGV9PC9hPjwvbGk+YFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBgPGEgdHlwZT1cXFwiQGV4dHJhXFxcIiBzdGF0ZT1cXFwiJHtzdGF0ZX1cXFwiIHZhbHVlPVxcXCIke3ZhbHVlfVxcXCI+JHt0aXRsZX08L2E+YDtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhyZWYgPSBwZChxLCB4LumTvuaOpSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGA8YSBocmVmPVxcXCIke2hyZWZ9XFxcIj4ke3RpdGxlfTwvYT5gO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIOWumuS9jTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBjYXRlZ29yaWVzLnB1c2go5LiA57qnLmpvaW4oJ1xcXFxuJykpO1xcbiAgICAgICAgfSk7XFxuICAgIH1cXG59IGVsc2Uge1xcbiAgICBjYXRlZ29yaWVzID0gW3BkZmEoaHRtbCwg5aSn57G75a6a5L2NKS5qb2luKCdcXFxcbicpXTtcXG59XFxuXFxubGV0IGl0ZW1zID0gW107XFxubGV0IGNhdGVzID0gW107XFx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AgICAgIH1cXG4gICAgICAgIH0pXFxuICAgIH1cXG4gICAgaWYgKHBhZ2UgPT0gMSApIHtcXG4gICAgaWYgKOaKmOWPoOeKtuaAgSkge1xcbiAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGZvbGQgPT09ICcxJyA/IOaKmOWPoCA6IOWxleW8gCxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKFxcXCIjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKCh0aXRsZSwgZm9sZCwgdSwgYWxsLCBleHBzKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgZm9sZCA9IGdldE15VmFyKE1ZX1JVTEUuZ3JvdXAsIGZvbGQpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYoZ2V0TXlWYXIoJ2NhdGVfZW1wdHknLCdlbXB0eScpPT0nZW1wdHknKXtcXG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aLvOaOpemDqOWIhuS4uuepuic7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICAgICAgICAgIHZhciBb5bGV5byALCDmipjlj6BdID0gZXhwcztcXG4gICAgICAgICAgICAgICAgICAgIGlmIChmb2xkID09IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgY3ggPSBmaW5kSXRlbXNCeUNscyh0aXRsZSArICdjYXRlX2J1dHRvbicpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnB1dE15VmFyKCdjYXRlX2J1dHRvbicsIGN4KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWxldGVJdGVtQnlDbHModGl0bGUgKyAnY2F0ZV9idXR0b24nKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGN4ID0gc3RvcmFnZTAuZ2V0TXlWYXIoJ2NhdGVfYnV0dG9uJywgW10pLm1hcCh4ID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeFsnY29sX3R5cGUnXSA9IHhbJ2NvbF90eXBlJ10gPyB4Wydjb2xfdHlwZSddIDogeFsndHlwZSddO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geDtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBhZGRJdGVtQWZ0ZXIodGl0bGUgKyAnY2F0ZV9saW5lJywgY3gpXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAvKmFsbC5mb3JFYWNoKChpdGVtKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoaXRlbSk7XFxuICAgICAgICAgICAgICAgICAgICB9KTsqL1xcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh0aXRsZSArICdjYXRlX2V4cCcsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogZm9sZCA9PSAxID8g5bGV5byAIDog5oqY5Y+gLFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKE1ZX1JVTEUuZ3JvdXAsIGZvbGQgPT09IFxcXCIxXFxcIiA/IFxcXCIwXFxcIiA6IFxcXCIxXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICB9LCBNWV9SVUxFLnRpdGxlLCBmb2xkLCDnirbmgIEsIOWFqOa4hSwgW+WxleW8gCwg5oqY5Y+gXSksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBpZDogTVlfUlVMRS50aXRsZSArICdjYXRlX2V4cCcsXFxuICAgICAgICAgICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfmuIXpmaTnirbmgIEnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCh4LCBhbGwsIGNsKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoeCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoJ2hlYWQuY2F0ZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGwuZm9yRWFjaCgoaXRlbSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJNeVZhcihpdGVtKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbC5mb3JFYWNoKChpdGVtKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKGl0ZW0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwg54q25oCBLCDlhajmuIUsIOa4hemZpClcXG4gICAgICAgICAgICAgICAgICAgIH1dXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcbiAgICB9ZWxzZXtcXG4gICAgICAgdmFyIGJvPUpTT04ucGFyc2UoZ2V0TXlWYXIoJ2hlYWQuY2F0ZScsJ1tdJykpLmV2ZXJ5KHg9Png9PT1cXFwiMFxcXCIpO1xcbiAgICAgICBpZighYm8pe1xcbiAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICB0aXRsZTon4oCc4oCc4oCd4oCdJysn4pm7Jy5mb250Y29sb3IoJyMzQ0IzNzEn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RlbXAsIGtleToga2V5LCBwYWdlOiBwYWdlLCBjbGVhcnM6IOa4hemZpCwgc3RhdGU6IOeKtuaAgSwgYWxsY2xlYXJzOiDlhajmuIVcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICBsZXQgdXJsID0gcGQoaXRlbSwgX+Wkp+exu+mTvuaOpSk7XFxuICAgICAgICAgICAgICAgIGlmICjlpKfnsbvlpITnkIYpIHtcXG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKOS4gOe6p+WIhuexu+WkhOeQhilcXG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKCQuc3RyaW5naWZ5KOS4gOe6p+WIhuexu+WkhOeQhikpXFxuICAgICAgICAgICAgICAgICAgICBsZXQgaW5wdXQgPSB1cmw7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKFxcXCJyZXN1bHQgPSBcXFwiICsg5LiA57qn5YiG57G75aSE55CGKTtcXG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKHJlc3VsdClcXG4gICAgICAgICAgICAgICAgICAgIHVybCA9IHJlc3VsdDtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBzZXRUaXRsZShrZXkudG9TdHJpbmcoKSwgY2F0ZV90ZW1wW2luZGV4XSwgdGl0bGUpLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCh1cmwgKyAnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld19jYXRlID0gW107XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNsZWFycy5mb3JFYWNoKChpdGVtKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoaXRlbSlcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5hbGxjbGVhcnMuZm9yRWFjaCgoaXRlbSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKGl0ZW0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wLmZvckVhY2goKGNhdGUsIGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19jYXRlLnB1c2goaW5kZXggPT09IDAgPyBwYXJhbXMua2V5LnRvU3RyaW5nKCkgOiBcXFwiMFxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwiaGVhZC5jYXRlXFxcIiwgSlNPTi5zdHJpbmdpZnkobmV3X2NhdGUpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMuc3RhdGUsIGlucHV0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgfSwgcGFyYW1zKVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJibGFua19ibG9ja1xcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBpZDogTVlfUlVMRS50aXRsZSArICdjYXRlX2xpbmUnLFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMuZm9yRWFjaCgoaXRlbSwga2V5KSA9PiB7XFxuICAgICAgICAgICAgICAgIHZhciBleHRyYXBvcyA9IGZhbHNlO1xcbiAgICAgICAgICAgICAgICBpZiAoaXRlbS5pbmNsdWRlcygndHlwZT1cXFwiQGV4dHJhXFxcIicpKSB7XFxuICAgICAgICAgICAgICAgICAgICBleHRyYXBvcyA9IHRydWU7XFxuICAgICAgICAgICAgICAgICAgICAvL2xvZygn6ZmE5Yqg5a6a5L2NJylcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICBpZiAoZXh0cmFwb3MpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IHBkZmgoaXRlbSwgJ2EmJlRleHQnKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgKOaOkumZpCkgIT0gJ3VuZGVmaW5lZCcgJiYg5o6S6ZmkICE9ICcnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUgPSB0aXRsZS5yZXBsYWNlKG5ldyBSZWdFeHAo5o6S6ZmkLCBcXFwiZ1xcXCIpLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB2YXIganNvbiA9IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBwZGZoKGl0ZW0sICdhJiZzdGF0ZScpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlOiBwZGZoKGl0ZW0sICdhJiZ2YWx1ZScpLFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcblxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gcGRmaChpdGVtLCDliIbnsbvmoIfpopgpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiAo5o6S6ZmkKSAhPSAndW5kZWZpbmVkJyAmJiDmjpLpmaQgIT0gJycpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA9IHRpdGxlLnJlcGxhY2UobmV3IFJlZ0V4cCjmjpLpmaQsIFxcXCJnXFxcIiksIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgICAgIHZhciBqc29uID0gJyc7XFxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKHRydWUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIOWIhuexu+mTvuaOpS5pbmNsdWRlcygnQEBAJyk6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb24gPSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBwZGZoKGl0ZW0sIOWIhuexu+mTvuaOpS5zcGxpdCgnQEBAJylbMF0pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHBkZmgoaXRlbSwg5YiG57G76ZO+5o6lLnNwbGl0KCdAQEAnKVsxXSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSDliIbnsbvpk77mjqUuaW5jbHVkZXMoJ0BAJyk6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb24gPSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiDliIbnsbvpk77mjqUuc3BsaXQoJ0BAJylbMF0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTogcGRmaChpdGVtLCDliIbnsbvpk77mjqUuc3BsaXQoJ0BAJylbMV0pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzb24gPSBwZChpdGVtLCDliIbnsbvpk77mjqUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIC8qdmFyIGpzb2495YiG57G76ZO+5o6lLmluY2x1ZGVzKCdAQEAnKT97XFxuICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6cGRmaChpdGVtLOWIhuexu+mTvuaOpS5zcGxpdCgnQEBAJylbMF0pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZTpwZGZoKGl0ZW0s5YiG57G76ZO+5o6lLnNwbGl0KCdAQEAnKVsxXSksXFxuICAgICAgICAgICAgICAgICAgICAgfTpwZChpdGVtLOWIhuexu+mTvuaOpSk7XFxuICAgICAgICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgICAgICAganNvbj3liIbnsbvpk77mjqUuaW5jbHVkZXMoJ0BAJyk/e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOuWIhuexu+mTvuaOpS5zcGxpdCgnQEAnKVswXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6cGRmaChpdGVtLOWIhuexu+mTvuaOpS5zcGxpdCgnQEAnKVsxXSksXFxuICAgICAgICAgICAgICAgICAgICAgfTpwZChpdGVtLOWIhuexu+mTvuaOpSk7Ki9cXG5cXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICBsZXQgcGFyYW1zID0ge1xcbiAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsIGluZGV4OiBpbmRleCwga2V5OiBrZXksIHBhZ2U6IHBhZ2UsIGpzb246IGpzb24sIHN0YXRlOiDnirbmgIEsIGFsbGNsZWFyczog5YWo5riFXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgY2F0ZXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogc2V0VGl0bGUoa2V5LnRvU3RyaW5nKCksIGNhdGVfdGVtcFtpbmRleF0sIHRpdGxlKSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgnaGlrZXI6Ly9lbXB0eScgKyAnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmFsbGNsZWFycy5mb3JFYWNoKChpdGVtKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoaXRlbSlcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXBbcGFyYW1zLmluZGV4XSA9IHBhcmFtcy5rZXkudG9TdHJpbmcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwiaGVhZC5jYXRlXFxcIiwgSlNPTi5zdHJpbmdpZnkocGFyYW1zLmNhdGVfdGVtcCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwYXJhbXMuanNvbi5jb25zdHJ1Y3RvciA9PT0gT2JqZWN0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdkdF8nICsgcGFyYW1zLmpzb24udHlwZSwgcGFyYW1zLmpzb24udmFsdWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy5zdGF0ZSwgcGFyYW1zLmpzb24pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgfSwgcGFyYW1zKSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogTVlfUlVMRS50aXRsZSArICdjYXRlX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGNhdGVzLnB1c2goe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIixcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIGNsczogTVlfUlVMRS50aXRsZSArICdjYXRlX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgfSlcXG59XFxuXFxuXFxuaWYgKGZvbGQgPT09IFxcXCIxXFxcIiB8fCDmipjlj6DnirbmgIEgPT0gZmFsc2UpIHtcXG4gICAgaXRlbXMgPSBpdGVtcy5jb25jYXQoY2F0ZXMpO1xcbn1cXG5pZiAoZm9sZCA9PT0gXFxcIjBcXFwiKSB7XFxuICAgIHN0b3JhZ2UwLnB1dE15VmFyKCdjYXRlX2J1dHRvbicsIGNhdGVzKVxcbn1cXG5pZihjYXRlcy5sZW5ndGg9PTApe1xcbiAgICAgcHV0TXlWYXIoJ2NhdGVfZW1wdHknLCdlbXB0eScpO1xcbn1lbHNle1xcbiAgICAgcHV0TXlWYXIoJ2NhdGVfZW1wdHknLCdub2VtcHR5Jyk7XFxufVxcblxcbmlmICh0eXBlb2Ygc2V0UHJlUmVzdWx0ICE9ICd1bmRlZmluZWQnJiZf5Yqo5oCB6L+U5ZueKSB7XFxuICAgIGl0ZW1zID0gZC5jb25j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V3X3NpbmdsZVxcXCIsXFxuICAgICAgICB1cmw6IFxcXCJhYm91dDpibGFua1xcXCIsXFxuICAgICAgICBkZXNjOiBcXFwiNTAmJmxpc3RcXFwiLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBqczogJC50b1N0cmluZygoaCwgdXJsKSA9PiB7XFxuICAgICAgICAgICAgICAgIHZhciBodG1sID0gZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50O1xcbiAgICAgICAgICAgICAgICBodG1sLmlubmVySFRNTCA9IGg7XFxuXFxuICAgICAgICAgICAgICAgIGNvbnN0IHRleHRDb250YWluZXIgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgndGV4dENvbnRhaW5lcicpO1xcbiAgICAgICAgICAgICAgICBjb25zdCB0ZXh0ID0gdGV4dENvbnRhaW5lci5pbm5lckhUTUw7XFxuICAgICAgICAgICAgICAgIHRleHRDb250YWluZXIub25jbGljaz1mdW5jdGlvbigpe1xcbiAgICAgICAgICAgICAgICAgICAgd2luZG93LmxvY2F0aW9uLmhyZWYgPSB1cmx8fFxcXCJhYm91dDpibGFuay9ub3RpY2VcXFwiO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8vIOiuvue9ruaWh+acrOWuueWZqOWuveW6puS4uuaWh+acrOWGheWuueeahOWuveW6plxcbiAgICAgICAgICAgICAgICB0ZXh0Q29udGFpbmVyLnN0eWxlLndpZHRoID0gYCR7dGV4dENvbnRhaW5lci5vZmZzZXRXaWR0aH1weGA7XFxuXFxuICAgICAgICAgICAgICAgIC8vIOWkjeWItuaWh+acrOWGheWuueW5tui/veWKoOWIsOaWh+acrOWuueWZqOWQjumdolxcbiAgICAgICAgICAgICAgICB0ZXh0Q29udGFpbmVyLmlubmVySFRNTCArPSAnICcgKyB0ZXh0O1xcblxcbiAgICAgICAgICAgICAgICAvLyDliqjmgIHorqHnrpfliqjnlLvmjIHnu63ml7bpl7RcXG4gICAgICAgICAgICAgICAgY29uc3QgZHVyYXRpb24gPSAodGV4dENvbnRhaW5lci5vZmZzZXRXaWR0aCAvIHRleHRDb250YWluZXIucGFyZW50RWxlbWVudC5vZmZzZXRXaWR0aCkgKiAxMDtcXG5cXG4gICAgICAgICAgICAgICAgdmFyIHN0eWxlRWxlbWVudHMgPSBkb2N1bWVudC5oZWFkLmdldEVsZW1lbnRzQnlUYWdOYW1lKCdzdHlsZScpO1xcblxcblxcbiAgICAgICAgICAgICAgICBzdHlsZUVsZW1lbnRzWzJdLmlubmVySFRNTCA9IGAubWFycXVlZSBzcGFuIHtcXG4gICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGlubGluZS1ibG9jaztcXG4gICAgICAgICAgICAgICAgICAgIHBhZGRpbmctbGVmdDogMTAwJTtcXG4gICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbjogbWFycXVlZSAke2R1cmF0aW9ufXMgbGluZWFyIGluZmluaXRlXFxuICAgICAgICAgICAgICAgIH1gO1xcblxcbiAgICAgICAgICAgIH0sIGh0bWwsIHVybCksXFxuICAgICAgICAgICAgdXJsSW50ZXJjZXB0b3I6ICQudG9TdHJpbmcoKGNvbnRlbnQpID0+IHtcXG4gICAgICAgICAgICAgICAgaWYgKGlucHV0PT09XFxcImFib3V0OmJsYW5rL25vdGljZVxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkLnRvU3RyaW5nKChjb250ZW50KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZmJhLm9wZW4oSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuWFrOWRilxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vZW1wdHkjbm9SZWNvcmRIaXN0b3J5IyNub0hpc3RvcnkjJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmluZFJ1bGU6IFxcXCJqczpcXFwiICsgJCQkLnRvU3RyaW5nKChjb250ZW50KSA9PiBzZXRSZXN1bHQoW3tcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBjb250ZW50LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJyaWNoX3RleHRcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XSksY29udGVudClcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgICAgICAgICB9LCBjb250ZW50KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sIGNvbnRlbnQgfHwgdGV4dCksXFxuICAgICAgICB9XFxuICAgIH0pO1xcbn1cIn1dIiwiaWNvbiI6Imhpa2VyOi8vaW1hZ2VzL3J1bGVfdHlwZV90b29sIiwicHJveHkiOiIifQ==
Add Comment
Please, Sign In to add comment