Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥HG影视-三体@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJqczpcXG5ldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9jaGFwdGVyJywge30pKS5ydWxlKTtcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuaOpeWPo+aVsOaNrjIwMjIvMTAvMTJcIixcInBhdGhcIjpcIlJlc0NvZGVcIixcInJ1bGVcIjpcIuS8mOi0qEDmmpblhYnlvbHop4Y9aHR0cHM6Ly9hcHAuYmwyMTAuY29tL2FwaS5waHAvdjEudm9kI+aaluWFieW9seinhlxcbuS8mOi0qEDlpYjpnZ7ov7c9aHR0cHM6Ly9hcHAubmV0ZmxpeG1pLmNvbS9hcGkucGhwL3YxLnZvZCPlpYjpnZ7ov7flvbHop4ZcXG7kvJjotKhA576O5Ymn6IyDPWh0dHA6Ly90dHptei5uZXQvYXBpLnBocC92MS52b2Qj576O5Ymn6IyDXFxu5LyY6LSoQOmbtuWIu+W9semZoj1odHRwczovL3lzLmxpbmcwMC5jbi9hcGkucGhwL3YxLnZvZCPpm7bliLvlvbHpmaJcXG7kvJjotKhA5q615Y+L5b2x6KeGPWh0dHBzOi8vc2hhbmdqaWh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gICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJz9hYz1saXN0JnptPScgKyBrZXkgKyAnJnBhZ2U9ZnlwYWdlJztcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBobXVybCA9IGxpbmsgKyAnP2FjPWxpc3Qmd2Q9JyArIGtleSArICcmcGFnZT1meXBhZ2UnO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgaWYgKC9kaWppYXhpYS8udGVzdChsaW5rKSkge1xcbiAgICAgICAgICAgICAgICAgICAgbGluayA9ICdodHRwOi8vd3d3LmRpamlheGlhLmNvbS9hcGkucGhwL2FwcC8nXFxuICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgIGlmIChsaW5rLmluZGV4T2YoJ2FwaS5waHAvYXBwLycpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJ3NlYXJjaD9wZz1meXBhZ2UmdGV4dD0nICsga2V5ICsgJyZ0b2tlbj0nO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGxpbmsuaW5kZXhPZigneGdhcHAucGhwL3YxLycpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJ3NlYXJjaD9wZz1meXBhZ2UmdGV4dD0nICsga2V5O1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKC9pb3Blbnl1bi8udGVzdChsaW5rKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBobXVybCA9IGxpbmsgKyAnL2xpc3Q/cGFnZT1meXBhZ2UmbGltaXQ9MTAmd2Q9JyArIGtleTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGhtdXJsID0gbGluayArICc/cGFnZT1meXBhZ2UmbGltaXQ9MTAmd2Q9JyArIGtleTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGxpc3Rbal0udGl0bGUsXFxuICAgICAgICAgICAgICAgIGltZzogbGlzdFtqXS5pbWcsXFxuICAgICAgICAgICAgICAgIHVybDogJCgnaGlrZXI6Ly9lbXB0eSN4IycgKyBobXVybCArICcjeCMnICsgbGluayArICcjeCMnICsgbGl0aXQgKyAnI3gjJyArIGtleSArICcjeCMnKS5ydWxlKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL3NlYXJlcmonKTtcXG4gICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnaWNvbl9yb3VuZF9zbWFsbF80J1xcbiAgICAgICAgICAgICAgICAvL2NvbF90eXBlOiAndGV4dF8zJ1xcbiAgICAgICAgICAgICAgICAvL2xpbms6bGluayxcXG4gICAgICAgICAgICAgICAgLy90eXBlOiBpXFxuICAgICAgICAgICAgfSk7XFxuXFxuICAgICAgICB9IC8vZm9yIGpcXG5cXG5cXG4gICAgfSAvL2ZvciBpXFxuXFxufSAvL2VuZCBtb2RlIDBcXG5cXG5cXG5yZXMuZGF0YSA9IGl0ZW1zO1xcbnNldEhvbWVSZXN1bHQocmVzKTtcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIkFQUOWIhuexu+WIl+ihqFwiLFwicGF0aFwiOlwiYXBwbGlzdGRhdGFcIixcInJ1bGVcIjpcImlmIChodG1sLmxpc3QpIHtcXG4gICAgdmFyIGxpc3QgPSBodG1sLmxpc3Q7XFxufSBlbHNlIGlmIChodG1sLmRhdGEgJiYgaHRtbC5kYXRhLmx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pLnNwbGl0KCcsJylbMF07XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdmFyIGppZWsgPSBcXFwiXFxcIjtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgLy9zZXRFcnJvcihqaWVrKTsgICAgICAgICAgICAgICAgXFxuICAgICAgICB9XFxuICAgIH0gY2F0Y2ggKGUpIHt9XFxuICAgIC8vamlla+aLvOaOpVxcbiAgICBpZiAoamllayAhPSAnJyAmJiBqaWVrICE9IG51bGwpIHtcXG4gICAgICAgIGlmIChqaWVrLnN1YnN0cmluZygwLCA0KSA9PSAnaHR0cCcpIHtcXG4gICAgICAgICAgICBqaWVrID0gamllaztcXG4gICAgICAgIH0gZWxzZSBpZiAoamllay5zdWJzdHJpbmcoMCwgMikgPT0gJ1xcXFwvXFxcXC8nKSB7XFxuICAgICAgICAgICAgamllayA9ICdodHRwczonICsgamllaztcXG4gICAgICAgIH1cXG4gICAgfSBlbHNlIHtcXG4gICAgICAgIGppZWsgPSBcXFwiXFxcIjtcXG4gICAgfVxcbiAgICAvL+WvueWkseaViOaOpeWPo+i/m+ihjOabv+aNolxcbiAgICBpZiAoL2Nva2Vtdi8udGVzdChteXVybCkgJiYgL2Nva2VxaWV8eGlufDkwbW0vLnRlc3QocHRhYikpIHtcXG4gICAgICAgIGppZWsgPSAnaHR0cHM6Ly9wbGF5ZXIuOTBtbS5tZS9wbGF5LnBocD91cmw9JztcXG4gICAgfSBlbHNlIGlmICgvXFxcXC5tM3U4XFxcXC50dnx3d3dcXFxcLngtblxcXFwuY2MvLnRlc3QoamllaykpIHtcXG4gICAgICAgIGppZWsgPSAnaHR0cHM6Ly9qeC5tM3U4LnR2L2ppZXhpLz91cmw9JztcXG4gICAgfSBlbHNlIGlmICgvY2p0NTIxLy50ZXN0KG15dXJsKSkge1xcbiAgICAgICAgamllayA9IGNvbnRzW2dldE15VmFyKHRpdGxlLCAnMCcpXS5wbGF5ZXJfaW5mby5wYXJzZTtc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3LnZpcC8/dXJsPScpO1xcbiAgICB9IGVsc2UgaWYgKC93d3dcXFxcLmFpbGVtb1xcXFwubWUvLnRlc3QoamllaykpIHtcXG4gICAgICAgIGppZWsgPSBqaWVrLnJlcGxhY2UoJ2FpbGVtbycsICdhaWxlbW9vJyk7XFxuICAgIH07XFxuICAgIC8v5omT5Y2w5o6l5Y+jXFxuICAgIHRyeSB7XFxuICAgICAgICBpZiAoaiA9PSAnMCcpIHtcXG4gICAgICAgICAgICBpZiAoaHRtbC5kYXRhLnZvZF91cmxfd2l0aF9wbGF5ZXIpIHtcXG4gICAgICAgICAgICAgICAgbG9nKCdcXFxcbue6v+i3r++8micgKyBwdGFiICsgJ1xcXFxu6KeG6aKR77yaJyArIHZsaW5rICsgJ1xcXFxuJyArICfop6PmnpDmjqXlj6PvvJpcXFxcbicgKyBqaWVrKTtcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGh0bWwuZGF0YS52b2RfaW5mbyAmJiBodG1sLmRhdGEudm9kX2luZm8udm9kX3VybF93aXRoX3BsYXllcikge1xcbiAgICAgICAgICAgICAgICBsb2coJ1xcXFxu57q/6Lev77yaJyArIHB0YWIgKyAnXFxcXG7op4bpopHvvJonICsgdmxpbmsgKyAnXFxcXG4nICsgJ+ino+aekOaOpeWPo++8mlxcXFxuJyArIGppZWspO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGlmIChjb250c1tnZXRNeVZhcih0aXRsZSwgJzAnKV0ucGxheWVyX2luZm8ucGFyc2UyICYmIChjb250c1tnZXRNeVZhcih0aXRsZSwgJzAnKV0ucGxheWVyX2luZm8ucGFyc2UyKS5pbmRleE9mKFxcXCI9XFxcIikgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxvZygnXFxcXG7nur/ot6/vvJonICsgcHRhYiArICdcXFxcbuinhumike+8micgKyB2bGluayArICdcXFxcbicgKyAn6Kej5p6Q5o6l5Y+j77yaXFxcXG4nICsgY29udHNbZ2V0TXlWYXIodGl0bGUsICcwJyldLnBsYXllcl9pbmZvLnBhcnNlMi5yZXBsYWNlKC9cXFxcLlxcXFwuL2csIFxcXCIuXFxcIikucmVwbGFjZSgvXFxcXCwvZywgXFxcIlxcXFxuXFxcXG5cXFwiKSk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY29udHNbZ2V0TXlWYXIodGl0bGUsICcwJyldLnBsYXllcl9pbmZvLnBhcnNlICYmIChjb250c1tnZXRNeVZhcih0aXRsZSwgJzAnKV0ucGxheWVyX2luZm8ucGFyc2UpLmluZGV4T2YoXFxcIj1cXFwiKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKCdcXFxcbue6v+i3r++8micgKyBwdGFiICsgJ1xcXFxu6KeG6aKR77yaJyArIHZsaW5rICsgJ1xcXFxuJyArICfop6PmnpDmjqXlj6PvvJpcXFxcbicgKyBjb250c1tnZXRNeVZhcih0aXRsZSwgJzAnKV0ucGxheWVyX2luZm8ucGFyc2UucmVwbGFjZSgvXFxcXC5cXFxcLi9nLCBcXFwiLlxcXCIpLnJlcGxhY2UoL1xcXFwsL2csIFxcXCJcXFxcblxcXFxuXFxcIikpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKCdcXFxcbue6v+i3r++8micgKyBwdGFiICsgJ1xcXFxu6KeG6aKR77yaJyArIHZsaW5rICsgJ1xcXFxuJyArICfop6PmnpDmjqXlj6PvvJpcXFxcbicgKyBqaWVrKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvL3NldEVycm9yKGppZWspOyAgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgIH0gY2F0Y2ggKGUpIHt9XFxuICAgIC8v5aOw5piO6ZO+5o6lXFxuICAgIHZhciBsaW5rID0gamllayArIHZsaW5rO1xcbiAgICAvKlxcbiAgICBpZiAoL1xcXFw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cXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgZW5EbiA9IEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vZmlsZXMvcnVsZXMveHlxL2FwcG1zZXQuanNvbicsIHt9KSkuZW5EbjtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZW5EbiA9PSAnMScpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKCfosIPnlKjmlq3mj5Lop6PmnpBodG1sJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoXFxcInZhciBjb25maWcgPVxcXCIgKyBmZXRjaChcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeVBhcnNlU2V0Lmpzb25cXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoZmV0Y2goY29uZmlnLmNqKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBheXRtUGFyc2UocmVzdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdXJsXFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL1xcXFwubTN1OHxcXFxcLm1wNHxvYmpcXFxcL3Rvc3xuZXRlYXNlXFxcXC5jb20vLnRlc3QocmVzdXJsKSAmJiAvaHR0cC8udGVzdChyZXN1cmwpICYmICEvXFxcXC5odG1sfFxcXFwubTN1OFxcXFwudHYvLnRlc3QocmVzdXJsKSAmJiAhL1xcXFw9aHR0cC8udGVzdChyZXN1cmwpICYmIHB0YWIgIT0gJ2R1b2R1b3p5Jykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvd2tmaWxlLy50ZXN0KHJlc3VybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VybCArICc7e1JlZmVyZXJAaHR0cHM6Ly9mYW50dWFuLndrZmlsZS5jb20vfSdcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gL1xcXFw9aHQvLnRlc3QocmVzdXJsKSA/IHJlc3VybC5zdWJzdHJpbmcocmVzdXJsLmluZGV4T2YoJz1odCcpICsgMSkgOiByZXN1cmwgKyAnI2lzVmlkZW89dHJ1ZSMnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy/osIPnlKjmlq3mj5LpgJrnlKjlh73mlbDop6PmnpBcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgZW5EbiA9IEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vZmlsZXMvcnVsZXMveHlxL2FwcG1zZXQuanNvbicsIHt9KSkuZW5EbjtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZW5EbiA9PSAnMScpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKCfosIPnlKjmlq3mj5LpgJrnlKjlh73mlbDop6PmnpBcXFxcbicgKyBwdGFiICsgJyjpgJrnlKjlh73mlbApJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoXFxcInZhciBjb25maWcgPVxcXCIgKyBmZXRjaChcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeVBhcnNlU2V0Lmpzb25cXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoZmV0Y2goY29uZmlnLmNqKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuYW1lID0gcHRhYiArICco6YCa55So5Ye95pWwKSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBQYXJzZVNbbmFtZV0ocmVzdXJsLCBteXVybCk7XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwdGFiID09ICdkZHp5Jykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBnZXRyYW5kb20odXJsc3RyKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByYW5kU3RyID0gdXJsc3RyLnN1YnN0cmluZygwLCA4KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZyA9IHVybHN0ci5zdWJzdHJpbmcoOCwgdXJsc3RyLmxlbmd0aCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWJzdHIgPSBiYXNlNjREZWNvZGUoc3RyaW5nKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzdWJzdHIuc3Vic3RyaW5nKDgsIHN1YnN0ci5sZW5ndGggLSA4KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGp4aHRtbCA9IHJlcXVlc3QoXFxcImh0dHBzOi8vcGxheS5zdW95b3UuY2MveHBsYXkvP3VybD1cXFwiICsgdmxpbmssIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3d3dy5qdWJhaWJhaS5jYy9cXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKGp4aHRtbC5tYXRjaCgvdmFyIGNvbmZpZ1tcXFxcc1xcXFxTXSo/fS8pWzBdKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGRkd3kgPSBwb3N0KFxcXCJodHRwczovL3BsYXkuc3VveW91LmNjL3hwbGF5L2hkMEwzVGpING04elNLMU4uanBnXFxcIiwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogTU9CSUxFX1VBXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9keToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJ1cmxcXFwiOiBjb25maWcudXJsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJ2a2V5XFxcIjogY29uZmlnLnZrZXksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInRva2VuXFxcIjogY29uZmlnLnRva2VuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2V0cmFuZG9tKEpTT04ucGFyc2UoZGR3eSkudXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9taWFvcGFydHkvLnRlc3QocHRhYikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZUNhY2hlKCdodHRwczovL2FnaXQuYWkvbHprMjM1NTkvUHVibGljUnVsZS9yYXcvYnJhbmNoL21hc3Rlci94NXJ1bGUuanMnLCAyNCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB4NXJ1bGUoJ2h0dHBzOi8vd3d3LmZ1bjRrLmNvbS9hcGxheWVyLz91cmw9JyArIHJlc3VybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VybFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH07XFxuXFxuICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAvKlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZW5EbiA9IEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vZmlsZXMvcnVsZXMveHlxL2FwcG1zZXQuanNvbicsIHt9KSkuZW5EbjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGVuRG4gPT0gJzEnICYmIHZsaW5rLm1hdGNoKC95b3VrdXxtZ3R2fGl4aWd1YXxxcS5jb218cWl5aXxtaWd1fGJpbGliaWxpfHNvaHV8cHB0dnxsZXwxOTA1LmNvbS8pICYmIHZsaW5rLnNlYXJjaCgvaHRtbHxiaWxpYmlsaXxpeGlndWEvKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKCflt7LlvIDlkK/mlq3mj5LvvIzlsIbosIPnlKjmlq3mj5Lop6PmnpBodG1sJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKFxcXCJ2YXIgY29uZmlnID1cXFwiICsgZmV0Y2goXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlQYXJzZVNldC5qc29uXFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChmZXRjaChjb25maWcuY2opKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBheXRtUGFyc2UodmxpbmspO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OyovXFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XFxuXFxuICAgICAgICAgICAgICAgIHZhciBzcmN1cmwgPSBsaW5rO1xcbiAgICAgICAgICAgICAgICAvL2xvZyhzcmN1cmwpO1xcbiAgICAgICAgICAgICAgICAvL+WKqOaAgeino+aekOS7o+eggeW8gOWni1xcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgLy/lpITnkIbmjIflrprop4bpopHkuI7nur/ot69cXG4gICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXC5tM3U4fFxcXFwubXA0fG9ialxcXFwvdG9zfG5ldGVhc2VcXFxcLmNvbS8udGVzdChzcmN1cmwpICYmIC9odHRwLy50ZXN0KHNyY3VybCkgJiYgIS9cXFxcLmh0bWx8XFxcXC5tM3U4XFxcXC4vLnRlc3Qoc3JjdXJsKSAmJiAhL1xcXFw9aHR0cC8udGVzdChzcmN1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC93a2ZpbGUvLnRlc3Qoc3JjdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3JjdXJsICsgJzt7UmVmZXJlckBodHRwczovL2ZhbnR1YW4ud2tmaWxlLmNvbS99J1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAvXFxcXD1odC8udGVzdChzcmN1cmwpID8gc3JjdXJsLnN1YnN0cmluZyhzcmN1cmwuaW5kZXhPZignPWh0JykgKyAxKSA6IHNyY3VybCArICcjaXNWaWRlbz10cnVlIyc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvaGQ4XFxcXC5wdy8udGVzdCh2bGluaykgJiYgL1xcXFwubTN1OHxcXFxcLm1wNC8udGVzdCh2bGluaykpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdmxpbms7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHNyY3VybC5pbmRleE9mKFxcXCIvc2hhcmUvXFxcIikgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbGluayA9IHNyY3VybC5zcGxpdChcXFwiL3NoYXJlXFxcIilbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBmYyA9IGZldGNoKHNyY3VybCwge30pLnJlcGxhY2UoXFxcInZhciBwdXJsXFxcIiwgXFxcInZhciBtYWluXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmYy5pbmRleE9mKFxcXCJtYWluXFxcIikgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBtYXQgPSBmYy5tYXRjaCgvdmFyIG1haW4uKj87LylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKG1hdCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGxheSA9IChtYWluLmluZGV4T2YoXFxcImh0dHBcXFwiKSAhPSAtMSA/IG1haW4gOiBsaW5rICsgbWFpbik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbWFpbiA9IGZjLm1hdGNoKC91cmw6Lio/W1xcXFwnXFxcXFxcXCJdKC4qPylbXFxcXCdcXFxcXFxcIl0vKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwbGF5ID0gKG1haW4uaW5kZXhPZihcXFwiaHR0cFxcXCIpICE9IC0xID8gbWFpbiA6IGxpbmsgKyBtYWluKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGxheTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAneDVXZWJWaWV3Oi8vJyArIChzcmN1cmwpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvOTgzdmlwLy50ZXN0KHNyY3VybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5wYXJzZShmZXRjaChzcmN1cmwsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBNT0JJTEVfVUFcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVkaXJlY3Q6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoSGVhZGVyczogdHJ1ZVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKS5oZWFkZXJzLmxvY2F0aW9uWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgveFxcXFwtblxcXFwuY2N8bmhkejY2Ni8udGVzdChzcmN1cmwpICYmIC9cXFxcLmh0bWx8YmlsaWJpbGkvLnRlc3Qoc3JjdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKHZsaW5rKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIC8v5aSE55CG5oyH5a6a6KeG6aKR5ZKM57q/6Lev57uT5p2fXFxuICAgICAgICAgICAgICAgICAgICAvLy0tLS3liIblibLnur8tLS0tLy9cXG4gICAgICAgICAgICAgICAgICAgIHZhciBzY29kZSA9IEpTT04ucGFyc2UoZmV0Y2goc3JjdXJsLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFxcXCJva2h0dHAvNC4xLjBcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWRpcmVjdDogZmFsc2UsXFxuICAgICAgICAgICAgICAgICAgICAgICAgd2l0aFN0YXR1c0NvZGU6IHRydWVcXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcXG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKHNjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChzY29kZS5zdGF0dXNDb2RlID09ICczMDInIHx8IHNjb2RlLnN0YXR1c0NvZGUgPT0gJzMwMScpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL+aJk+W8gOino+aekOaciTMwMumHjeWumuWQkeeahOmTvuaOpVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZWR1cmwgPSBzY29kZS5oZWFkZXJzLmxvY2F0aW9uWzBdLnJlcGxhY2UoL1xcXFxcXFxcL2csICcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoL1xcXFw9aHR0cC8udGVzdChyZWR1cmwpICYmIC9odG1sfGJpbGliaWxpfGtleVxcXFw9Ly50ZXN0KHJlZHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04ucGFyc2UoZmV0Y2gocmVkdXJsLCB7fSkpLnVybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9cXFxcPWh0dHAvLnRlc3QocmVkdXJsKSAmJiAvXFxcXC5tM3U4fFxcXFwubXA0fFxcXFwuZmx2Ly50ZXN0KHJlZHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlZHVybC5zdWJzdHJpbmcocmVkdXJsLmluZGV4T2YoJz1odHRwJykgKyAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9odHRwLy50ZXN0KHJlZHVybCkgJiYgL2tleVxcXFw9fHVpZFxcXFw9fHZpZFxcXFw9Ly50ZXN0KHJlZHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04ucGFyc2UoZmV0Y2gocmVkdXJsLCB7fSkpLnVybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9odHRwLy50ZXN0KHJlZHVybCkgJiYgL2h0bWx8YmlsaWJpbGkvLnRlc3QocmVkdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3BlbnVybCh2bGluayk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlZHVybFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy92YXIgaHRtbCA9IHJlcXVlc3Qoc3JjdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IHNjb2RlLmJvZHk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy9sb2coaHRtbCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC80MDQgTm90IEZvdW5kfOWkh+ahiOWQjuWPr+e7p+e7reiuv+mXri8udGVzdChodG1sKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3BlbnVybCh2bGluayk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvXFxcXDxib2R5Ly50ZXN0KGh0bWwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZygn5bCd6K+V6Z2eSlNPTuaOpeWPo+e9kemhteino+aekCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlQ2FjaGUoJ2h0dHBzOi8vYWdpdC5haS9semsyMzU1OS9QdWJsaWNSdWxlL3Jhdy9icmFuY2gvbWFzdGVyL3g1cnVsZS5qcycsIDI0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHg1cnVsZShzcmN1cmwsIHNyY3VybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vcmV0dXJuIG9wZW51cmwoc3JjdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2pzb27op6PmnpDnmoTlj5bpk77mjqVcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHB1cmwgPSBodG1sLm1hdGNoKC9bXFxcXCdcXFxcXFxcIl11cmxbXFxcXCdcXFxcXFxcIl06Lio/W1xcXFwnXFxcXFxcXCJdKC4qPylbXFxcXCdcXFxcXFxcIl0vKVsxXS5yZXBsYWNlKC9cXFxcXFxcXC9nLCAnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vbG9nKHB1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoL2h0dHAvLnRlc3QocHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwdGFiID09ICdiaWxpYmlsaScpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHVybCArICc7e1JlZmVyZXJAaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tLyYmVXNlci1BZ2VudEBNb3ppbGxhLzUuMH0nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwdGFiID09ICdtZ3R2Jykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsICsgJyNpc1ZpZGVvPXRydWUjJyArICc7e1JlZmVyZXJAd3d3Lm1ndHYuY29tJiZVc2VyLUFnZW50QE1vemlsbGEvNS4wfSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9vamJrLy50ZXN0KHB1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmwgKyAnO3tSZWZlcmVyQGh0dHBzOi8vYmFrLm9qYmtqeC5jb20vfSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC92aWRlb19tcDR8dHlwZVxcXFw9bTN1OHxwdFxcXFw9bTN1OHxcXFxcL3ZpZGVvXFxcXC90b3NcXFxcLy8udGVzdChwdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsICsgJyNpc1ZpZGVvPXRydWUjJztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+mdnmh0dHDlvIDlpLTnmoTmiZPlvIDljp/pk77mjqUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3BlbnVybCh2bGluaylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgLy/miqXplJnliKTmlq3lpITnkIZcXG4gICAgICAgICAgICAgICAgICAgIGxvZygn5omn6KGM5oql6ZSZ6Lez6L2s5aSE55CGJyk7XFxuICAgICAgICAgICAgICAgICAgICAvKmlmIChzcmN1cmwuc3Vic3RyaW5nKDAsIDIpID09ICdcXFxcL1xcXFwvJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKCdodHRwczonICsgc3JjdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL1xcXFw9aHR0cC8udGVzdChzcmN1cmwpICYmIC9cXFxcLmh0bWx8YmlsaWJpbGkvLnRlc3Qoc3JjdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vcmV0dXJuIHNyY3VybC5zcGxpdCgnPScpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKHNyY3VybC5zdWJzdHJpbmcoc3JjdXJsLmluZGV4T2YoJz1odHRwJykgKyAxKSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgeyovXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3BlbnVybCh2bGluaylcXG4gICAgICAgICAgICAgICAgICAgIC8vcmV0dXJuICd4NVdlYlZpZXc6Ly8nK3NyY3VybFxcbiAgICAgICAgICAgICAgICAgICAgLy99XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy/liqjmgIHop6PmnpDku6PnoIHnu5PmnZ9cXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHB0YWIsXFxuICAgICAgICAgICAgbGluayxcXG4gICAgICAgICAgICBteXVybCxcXG4gICAgICAgICAgICB2bGluayksXFxuICAgICAgICBjb2xfdHlwZTogY2x0XFxuICAgIH0pO1xcbn1cXG4vL31cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIlRW566A5LuL5LiO6YCJ6ZuGXCIsXCJwYXRoXCI6XCJ0dm1vdmxpc3RcIixcInJ1b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oZS9NeVBhcnNlU2V0Lmpzb25cXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChmZXRjaChjb25maWcuY2opKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHJlc3VybCk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXN1cmxcXG4gICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL1xcXFw9TFRcXFxcLS8udGVzdChyZXN1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICBsb2coJ+iwg+eUqOaWreaPkmx0bmLpgJrnlKjop6PmnpAnKTtcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoXFxcInZhciBjb25maWcgPVxcXCIgKyBmZXRjaChcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeVBhcnNlU2V0Lmpzb25cXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIG5hbWUgPSAnbHRuYijpgJrnlKjlh73mlbApJztcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBQYXJzZVNbbmFtZV0ocmVzdXJsLnN1YnN0cmluZyhyZXN1cmwuaW5kZXhPZignPUxULScpICsgMSkpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VybFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfTtcXG5cXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICB2YXIgZW5EbiA9IEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vZmlsZXMvcnVsZXMveHlxL2FwcG1zZXQuanNvbicsIHt9KSkuZW5EbjtcXG4gICAgICAgICAgICAgICAgaWYgKGVuRG4gPT0gJzEnICYmIHNyY3VybC5tYXRjaCgveW91a3V8bWd0dnxpeGlndWF8cXEuY29tfHFpeWl8bWlndXxiaWxpYmlsaXxzb2h1fHBwdHZ8bGV8MTkwNS5jb20vKSAmJiBzcmN1cmwuc2VhcmNoKC9odG1sfGJpbGliaWxpfGl4aWd1YS8pICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICBsb2coJ+W3suW8gOWQr+aWreaPku+8jOWwhuiwg+eUqOaWreaPkuino+aekGh0bWwnKTtcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoXFxcInZhciBjb25maWcgPVxcXCIgKyBmZXRjaChcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeVBhcnNlU2V0Lmpzb25cXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGF5dG1QYXJzZShzcmN1cmwuc3Vic3RyaW5nKHNyY3VybC5pbmRleE9mKCc9aHR0cCcpICsgMSkpO1xcbiAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XFxuXFxuICAgICAgICAgICAgLy9sb2coc3JjdXJsKTtcXG4gICAgICAgICAgICAvL+WKqOaAgeino+aekOS7o+eggeW8gOWni1xcbiAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgIGlmICgvXFxcXC5tM3U4fFxcXFwubXA0fG9ialxcXFwvdG9zLy50ZXN0KHNyY3VybCkgJiYgL2h0dHAvLnRlc3Qoc3JjdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC9cXFxcPWh0Ly50ZXN0KHNyY3VybCkgPyBzcmN1cmwuc3Vic3RyaW5nKHNyY3VybC5pbmRleE9mKCc9aHQnKSArIDEpIDogc3JjdXJsICsgJyNpc1ZpZGVvPXRydWUjJztcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzcmN1cmwuaW5kZXhPZihcXFwiL3NoYXJlL1xcXCIpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsaW5rID0gc3JjdXJsLnNwbGl0KFxcXCIvc2hhcmVcXFwiKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgZmMgPSBmZXRjaChzcmN1cmwsIHt9KS5yZXBsYWNlKFxcXCJ2YXIgcHVybFxcXCIsIFxcXCJ2YXIgbWFpblxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmYy5pbmRleE9mKFxcXCJtYWluXFxcIikgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG1hdCA9IGZjLm1hdGNoKC92YXIgbWFpbi4qPzsvKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChtYXQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGxheSA9IChtYWluLmluZGV4T2YoXFxcImh0dHBcXFwiKSAhPSAtMSA/IG1haW4gOiBsaW5rICsgbWFpbik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG1haW4gPSBmYy5tYXRjaCgvdXJsOi4qP1tcXFxcJ1xcXFxcXFwiXSguKj8pW1xcXFwnXFxcXFxcXCJdLylbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwbGF5ID0gKG1haW4uaW5kZXhPZihcXFwiaHR0cFxcXCIpICE9IC0xID8gbWFpbiA6IGxpbmsgKyBtYWluKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBsYXk7XFxuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd4NVdlYlZpZXc6Ly8nICsgKHNyY3VybClcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwdGFiID09ICdhbGl6eScpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBwdXJsID0gZmV0Y2goJ2h0dHBzOi8vZm91YmluLmNvbS9qaWV4aS5waHA/dXJsPScgKyBzcmN1cmwsIHt9KS5tYXRjaCgvXFxcXFxcXCJ1cmxcXFxcXFxcIjpcXFxcXFxcIiguKj8pXFxcXFxcXCIvKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC8xOWp4XFxcXC52aXB8bmZ5aW5nc2hpLy50ZXN0KHNyY3VybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBwdXJsID0gSlNPTi5wYXJzZShmZXRjaChzcmN1cmwucmVwbGFjZSgnaHR0cDovLycsICdodHRwczovLycpLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IE1PQklMRV9VQVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVkaXJlY3Q6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhIZWFkZXJzOiB0cnVlXFxuICAgICAgICAgICAgICAgICAgICB9KSkuaGVhZGVycy5sb2NhdGlvblswXTtcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvdGl0YW4ubWd0di8udGVzdChwdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsICsgJyNpc1ZpZGVvPXRydWUjJyArICc7e1JlZmVyZXJAd3d3Lm1ndHYuY29tJiZVc2VyLUFnZW50QE1vemlsbGEvNS4wfSc7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9vYmpcXFxcL3Rvcy8udGVzdChwdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsICsgJyNpc1ZpZGVvPXRydWUjJztcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmxcXG4gICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLyplbHNlIGlmICgvemhhaWthbnlzLy50ZXN0KHNyY3VybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcHVybCA9IEpTT04ucGFyc2UoZmV0Y2goc3JjdXJsICsgJyZhcHA9MTAwMDMmYWNjb3VudD0yNzI3NzUwMjgmcGFzc3dvcmQ9cXEyNzI3NzUwMjgnLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogTU9CSUxFX1VBXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZGlyZWN0OiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aEhlYWRlcnM6IHRydWVcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSkuaGVhZGVycy5sb2NhdGlvblswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoL3RpdGFuLm1ndHYvLnRlc3QocHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmwgKyAnI2lzVmlkZW89dHJ1ZSMnICsgJzt7UmVmZXJlckB3d3cubWd0di5jb20mJlVzZXItQWdlbnRATW96aWxsYS81LjB9JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9vYmpcXFxcL3Rvcy8udGVzdChwdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHVybCArICcjaXNWaWRlbz10cnVlIyc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSovXFxuXFxuICAgICAgICAgICAgICAgIC8vLS0tLeWIhuWJsue6vy0tLS0vL1xcbiAgICAgICAgICAgICAgICB2YXIgc2NvZGUgPSBKU09OLnBhcnNlKGZldGNoKHNyY3VybCwge1xcbiAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogTU9CSUxFX1VBXFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgcmVkaXJlY3Q6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgd2l0aFN0YXR1c0NvZGU6IHRydWVcXG4gICAgICAgICAgICAgICAgfSkpO1xcbiAgICAgICAgICAgICAgICAvL2xvZyhzY29kZSk7XFxuICAgICAgICAgICAgICAgIGlmIChzY29kZS5zdGF0dXNDb2RlID09ICczMDInIHx8IHNjb2RlLnN0YXR1c0NvZGUgPT0gJzMwMScpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBwdXJsID0gc2NvZGUuaGVhZGVycy5sb2NhdGlvblswXS5yZXBsYWNlKC9cXFxcXFxcXC9nLCAnJyk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAvL3ZhciBodG1sID0gcmVxdWVzdChzcmN1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGh0bWwgPSBzY29kZS5ib2R5O1xcbiAgICAgICAgICAgICAgICAgICAgLy9sb2coaHRtbCk7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoLzQwNCBOb3QgRm91bmR85aSH5qGI5ZCO5Y+v57un57ut6K6/6ZeufOS4jeWtmOWcqC8udGVzdChodG1sKSB8fCBodG1sID09ICcnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9wZW51cmwoc3JjdXJsLnN1YnN0cmluZyhzcmN1cmwuaW5kZXhPZignPWh0dHAnKSArIDEpKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL1xcXFxcXFwidXJsXFxcXFxcXCJcXFxcOlxcXFxcXFwiaHR0cC8udGVzdChodG1sKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwdXJsID0gaHRtbC5tYXRjaCgvXFxcXFxcXCJ1cmxcXFxcXFxcIjpcXFxcXFxcIiguKj8pXFxcXFxcXCIvKVsxXS5yZXBsYWNlKC9cXFxcXFxcXC9nLCAnJyk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGh0bWwuc3RhcnRzV2l0aCgneycpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHB1cmwgPSBzcmN1cmwuc3Vic3RyaW5nKHNyY3VybC5pbmRleE9mKCc9aHR0cCcpICsgMSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vdmFyIHB1cmwgPSBzcmN1cmxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlQ2FjaGUoJ2h0dHBzOi8vYWdpdC5haS9semsyMzU1OS9QdWJsaWNSdWxlL3Jhdy9icmFuY2gvbWFzdGVyL3g1cnVsZS5qcycsIDI0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geDVydWxlKHNyY3VybCwgc3JjdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL3JldHVybiAneDVXZWJWaWV3Oi8vJysoc3JjdXJsKSBcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICAgICAgLy9sb2cocHVybCk7XFxuICAgICAgICAgICAgICAgIGlmICgvdGl0YW4ubWd0di8udGVzdChwdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmwgKyAnI2lzVmlkZW89dHJ1ZSMnICsgJzt7UmVmZXJlckB3d3cubWd0di5jb20mJlVzZXItQWdlbnRATW96aWxsYS81LjB9JztcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvb2JqXFxcXC90b3MvLnRlc3QocHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsICsgJyNpc1ZpZGVvPXRydWUjJztcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsXFxuICAgICAgICAgICAgICAgIH07XFxuXFxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICBpZiAoc3JjdXJsLnN1YnN0cmluZygwLCAyKSA9PSAnXFxcXC9cXFxcLycpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKCdodHRwczonICsgc3JjdXJsKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvXFxcXD1odHRwLy50ZXN0KHNyY3VybCkgJiYgL1xcXFwuaHRtbHxiaWxpYmlsaS8udGVzdChzcmN1cmwpKSB7XFxuICAgICAgICAgICAgICAgICA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sZTogJ+acquaQnOe0ouWIsO+8jOeCueWHu+iuv+mXruWOn+e9kemhtScsXFxuICAgICAgICAgICAgdXJsOiBzcGxbMV0gKyBgQGxhenlSdWxlPS5qczppbnB1dC5zcGxpdCgnOycpWzBdYCxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMSdcXG4gICAgICAgIH0pO1xcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBsaXN0Lmxlbmd0aDsgaSsrKSB7XFxuXFxuICAgICAgICAgICAgaWYgKC9cXFxcL3ZvZFxcXFwvLy50ZXN0KHRkb21pbikpIHtcXG4gICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gbGlzdFtpXS50aXRsZTtcXG4gICAgICAgICAgICAgICAgdmFyIHBpYyA9IGxpc3RbaV0ucGljO1xcbiAgICAgICAgICAgICAgICAvL3ZhciB2aWQ9dGRvbWluKycvZGV0YWlsP3ZvZF9pZD0nK2xpc3RbaV0ubmV4dGxpbmsrJyZyZWxfbGltaXQ9MTAnO1xcbiAgICAgICAgICAgICAgICB2YXIgdmlkID0gbGlzdFtpXS5uZXh0bGluaztcXG4gICAgICAgICAgICAgICAgdmFyIHJlbSA9IGxpc3RbaV0uc3RhdGU7XFxuICAgICAgICAgICAgICAgIC8vdmFyIGNvbj1saXN0W2ldLnN0YXRlO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGlmICh0ZG9taW4uaW5kZXhPZignYXBpLnBocC9hcHAvJykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IGxpc3RbaV0udm9kX25hbWU7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgcGljID0gbGlzdFtpXS52b2RfcGljO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKC9mYW50dWFuLy50ZXN0KHRkb21pbikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmlkID0gJ2h0dHBzOi8vZmFudHVhbi53a2ZpbGUuY29tL2FwaS5waHAvYXBwL3ZpZGVvX2RldGFpbD9pZD0nICsgbGlzdFtpXS52b2RfaWQgKyAnJnRva2VuPSc7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSB0ZG9taW4gKyAndmlkZW9fZGV0YWlsP2lkPScgKyBsaXN0W2ldLnZvZF9pZCArICcmdG9rZW49JztcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHZhciByZW0gPSBsaXN0W2ldLnZvZF9yZW1hcmtzO1xcbiAgICAgICAgICAgICAgICAgICAgLy92YXIgY29uPWxpc3RbaV0udHlwZS50eXBlX2RlcztcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0ZG9taW4uaW5kZXhPZigneGdhcHAucGhwL3YxLycpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSBsaXN0W2ldLnZvZF9uYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHBpYyA9IGxpc3RbaV0udm9kX3BpYztcXG4gICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSB0ZG9taW4gKyAndmlkZW9fZGV0YWlsP2lkPScgKyBsaXN0W2ldLnZvZF9pZDtcXG4gICAgICAgICAgICAgICAgICAgIHZhciByZW0gPSBsaXN0W2ldLnZvZF9yZW1hcmtzO1xcbiAgICAgICAgICAgICAgICAgICAgLy92YXIgY29uPWxpc3RbaV0udHlwZS50eXBlX2RlcztcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IGxpc3RbaV0udm9kX25hbWU7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgcGljID0gbGlzdFtpXS52b2RfcGljO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKC9pb3Blbnl1bi8udGVzdCh0ZG9taW4pKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHZpZCA9IHRkb21pbiArICcvZGV0YWlsSUQ/dm9kX2lkPScgKyBsaXN0W2ldLnZvZF9pZCArICcmdG9rZW49JztcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZigvZ3JlbGlnaHRpbmcvLnRlc3QodGRvbWluKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHZpZCA9IHRkb21pbiArICcvP2lkcz0nICsgbGlzdFtpXS52b2RfaWQgKyAnJnRva2VuPSc7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSB0ZG9taW4gKyAnL2RldGFpbD9rZXk9JyArIGRhdGVTdHIgKyAnJnZvZF9pZD0nICsgbGlzdFtpXS52b2RfaWQgKyAnJnRva2VuPSc7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB2YXIgcmVtID0gbGlzdFtpXS52b2RfcmVtYXJrcztcXG4gICAgICAgICAgICAgICAgICAgIC8vdmFyIGNvbj1saXN0W2ldLnR5cGUudHlwZV9kZXM7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZS5yZXBsYWNlKGtleSwgJ+KAnOKAnCcgKyBrZXkgKyAn4oCd4oCdJyksXFxuICAgICAgICAgICAgICAgIHBpY191cmw6IHBpYyArICdAUmVmZXJlcj0nLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQodGRvbWluLmluZGV4T2YoXFxcIm1vZ2FpX2FwaVxcXCIpICE9IC0xID8gdmlkICsgJztnZXQ7dXRmLTg7e1VzZXItQWdlbnRARGFydC8yLjE0IChkYXJ0OmlvKX0nIDogdmlkICsgJztnZXQ7dXRmLTg7e1VzZXItQWdlbnRAb2todHRwLzQuMS4wfScpLnJ1bGUoKHRkb21pbikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlcyA9IHt9O1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGl0ZW1zID0gW107XFxuICAgICAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IEpTT04ucGFyc2UoZ2V0UmVzQ29kZSgpKTtcXG4gICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAnMjU1JiZmbG9hdCcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAnJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3g1X3dlYnZpZXdfc2luZ2xlJ1xcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoWDVXZWJWaWV3KCcnKTtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBteXVybCA9IE1ZX1VSTC5tYXRjaCgvKFtcXFxcU10qPzpcXFxcL1xcXFwvW1xcXFxTXSo/KVxcXFwvLylbMV07XFxuICAgICAgICAgICAgICAgICAgICBpZiAoL1xcXFwvdm9kXFxcXC8vLnRlc3QodGRvbWluKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL3R2bW92bGlzdCcsIHt9KSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL2FwcG1vdmxpc3QnLCB7fSkpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmVzLmRhdGEgPSBpdGVtcztcXG4gICAg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G11cmwpKSB7XFxuICAgICAgICAgICAgdmFyIGxpbmsgPSBtdXJsICsgJy9kZXRhaWxJRD92b2RfaWQ9JyArIHVybCArICcmcmVsX2xpbWl0PTEwO2dldDt1dGYtODt7VXNlci1BZ2VudEBEYXJ0LzIuMTQgKGRhcnQ6aW8pfSc7XFxuICAgICAgICB9IGVsc2UgaWYgKC9kaWppYXhpYS8udGVzdChtdXJsKSkge1xcbiAgICAgICAgICAgIHZhciBsaW5rID0gJ2h0dHA6Ly93d3cuZGlqaWF4aWEuY29tL2FwaS5waHAvYXBwL3ZpZGVvX2RldGFpbD9pZD0nICsgdXJsO1xcbiAgICAgICAgfVxcbiAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcbiAgICAgICAgICAgIHBpY191cmw6IGltZyArICdAUmVmZXJlcj0nLFxcbiAgICAgICAgICAgIHVybDogJChsaW5rKS5ydWxlKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgdmFyIHJlcyA9IHt9O1xcbiAgICAgICAgICAgICAgICB2YXIgaXRlbXMgPSBbXTtcXG4gICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJycsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiAnMjU1JiZmbG9hdCcsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICcnLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd4NV93ZWJ2aWV3X3NpbmdsZSdcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hYNVdlYlZpZXcoJycpO1xcbiAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IEpTT04ucGFyc2UoZ2V0UmVzQ29kZSgpKTtcXG4gICAgICAgICAgICAgICAgdmFyIG15dXJsID0gTVlfVVJMLm1hdGNoKC8oW1xcXFxTXSo/OlxcXFwvXFxcXC9bXFxcXFNdKj8pXF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coJyArIHNzeGMgKyAnKScsXFxuICAgIHVybDogXFxcImlucHV0Oi8vXFxcIiArIEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgIHZhbHVlOiBcXFwiNVxcXCIsXFxuICAgICAgICBoaW50OiBcXFwi6K+36L6T5YWl5LiA5Liq5pW05pWw5pWw5a2X77yM5o6o6I2Q5pyA5aSn5LiN6KaB6LaF6L+HMTXjgIJcXFwiLFxcbiAgICAgICAganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgIHZhciBudW0gPSBwYXJzZUludChpbnB1dCkudG9TdHJpbmcoKTtcXG4gICAgICAgICAgICBpZiAobnVtID09ICdOYU4nIHx8IG51bSA8IDEpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+i+k+WFpeeahOWAvOWlveWDj+S4jeato+ehruOAgic7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdmFyIGZpbGVVcmwgPSBmZXRjaChcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy94eXEvYXBwbXNldC5qc29uXFxcIiwge30pLnJlcGxhY2UoL1xcXFxcXFwic3Njb3VudFxcXFxcXFwiOlxcXFxcXFwiW1xcXFxkXSpcXFxcXFxcIi8sICdcXFxcXFxcInNzY291bnRcXFxcXFxcIjpcXFxcXFxcIicgKyBudW0gKyAnXFxcXFxcXCInKTtcXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL3h5cS9hcHBtc2V0Lmpzb25cXFwiLCBmaWxlVXJsKTtcXG4gICAgICAgICAgICAgICAgYmFjayh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S/neWtmOiuvue9ruaQnOe0oue6v+eoi+WujOaIkO+8gSdcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KSxcXG4gICAgfSksXFxuICAgIGNvbF90eXBlOiAndGV4dF8yJ1xcbn0pO1xcblxcbmQucHVzaCh7XFxuICAgIHRpdGxlOiAn5pu05paw55u45YWzJyxcXG4gICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xcbn0pO1xcbmQucHVzaCh7XFxuICAgIHRpdGxlOiAn5qOA5rWL5pu05pawJyxcXG4gICAgdXJsOiAkKCcnKS5sYXp5UnVsZSgobG9jdmVyKSA9PiB7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHZhciByZW1mID0gZmV0Y2hDYWNoZSgnaHR0cHM6Ly9jb2RlYmVyZy5vcmcvbHprMjM1NTkvY2xvdWRydWxlL3Jhdy9icmFuY2gvbWFzdGVyL2FwcG1vdmllLnR4dCcsIDI0KTtcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICByZW1mID0gJyc7XFxuICAgICAgICB9XFxuICAgICAgICBpZiAoL++/pWJhc2U2NC8udGVzdChyZW1mKSkge1xcbiAgICAgICAgICAgIHZhciByZW12ID0gSlNPTi5wYXJzZShiYXNlNjREZWNvZGUocmVtZi5zcGxpdCgnQCcpWzJdKSkudmVyc2lvbjtcXG4gICAgICAgIH0gZWxzZSBpZiAoL++/pWhvbWVfcnVsZe+/pS8udGVzdChyZW1mKSkge1xcbiAgICAgICAgICAgIHZhciByZW12ID0gSlNPTi5wYXJzZShyZW1mLnNwbGl0KCfvv6Vob21lX3J1bGXvv6UnKVsxXSkudmVyc2lvbjtcXG4gICAgICAgIH07XFxuICAgICAgICBpZiAoL++/pWhvbWVfcnVsZS8udGVzdChyZW1mKSkge1xcbiAgICAgICAgICAgIGxvZygn6L+c56iL54mI5pys77yaJyArIHJlbXYpO1xcbiAgICAgICAgICAgIGxvZygn5pys5Zyw54mI5pys77yaJyArIGxvY3Zlcik7XFxuICAgICAgICAgICAgaWYgKGxvY3ZlciAhPSByZW12KSB7XFxuICAgICAgICAgICAgICAgIHB1dFZhcignYXBwbnZlcicsIHJlbWYpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5pyJ5paw54mI5pys77yM54K55a+85YWl5pu05paw5Y+v5pu05paw6KeE5YiZ44CCJztcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5pqC5peg5paw54mI5pys77yMMjTlsI/ml7blhoXmo4DmtYvml6DmlYjjgIInXFxuICAgICAgICAgICAgfTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+ajgOa1i+abtOaWsOWksei0pe+8jOWPr+iDveS6keerr+aKvemjjuS6huOAgidcXG4gICAgICAgIH1cXG4gICAgfSwgbG9jdmVyKSxcXG4gICAgY29sX3R5cGU6ICd0ZXh0XzInXFxufSk7XFxuaWYgKGdldFZhcignYXBwbnZlcicpKSB7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJ+WvvOWFpeabtOaWsCcsXFxuICAgICAgICB1cmw6ICQoJycpLmxhenlSdWxlKCgpID0+IHtcXG4gICAgICAgICAgICByZXR1cm4gZ2V0VmFyKCdhcHBudmVyJyk7XFxuICAgICAgICB9KSxcXG4gICAgICAgIGNvbF90eXBlOiAndGV4dF8yJ1xcbiAgICB9KTtcXG59XFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6ICfmjqXlj6Pnm7jlhbMnLFxcbiAgICAvL3VybDonaGlrZXI6Ly9lbXB0eScsXFxuICAgIHVybDogJCgnaGlrZXI6Ly9lbXB0eScpLmxhenlSdWxlKCgpID0+IHtcXG4gICAgICAgIHZhciByZW1maWxlID0gJyc7XFxuICAgICAgICAvL2xvZyhyZW1maWxlKTtcXG4gICAgICAgIGlmICgvXFxcXD1odHRwLy50ZXN0KHJlbWZpbGUpKSB7XFxuICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL3h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xKSB7XFxuICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX2luZm8udm9kX3BsYXlfdXJsLnNwbGl0KCckJCQnKTtcXG4gICAgICAgIH1cXG4gICAgfSBlbHNlIGlmIChodG1sLmRhdGEubGVuZ3RoID09IDEpIHtcXG4gICAgICAgIHZhciBjb250cyA9IGh0bWwuZGF0YVswXS52b2RfcGxheV9saXN0O1xcbiAgICAgICAgLy9sb2coY29udHMpO1xcbiAgICAgICAgaWYgKGNvbnRzLmxlbmd0aCA8IDEpIHtcXG4gICAgICAgICAgICBjb250cyA9IGh0bWwuZGF0YVswXS52b2RfcGxheV91cmwuc3BsaXQoJyQkJCcpO1xcbiAgICAgICAgfVxcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgdmFyIGNvbnRzID0gaHRtbC5kYXRhLnZvZF9wbGF5X2xpc3Q7XFxuICAgICAgICBpZiAoY29udHMubGVuZ3RoIDwgMSkge1xcbiAgICAgICAgICAgIGNvbnRzID0gaHRtbC5kYXRhLnZvZF9wbGF5X3VybC5zcGxpdCgnJCQkJyk7XFxuICAgICAgICB9XFxuICAgIH1cXG5cXG4gICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjb250cy5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgaWYgKGh0bWwudmlkZW9saXN0KSB7XFxuICAgICAgICAgICAgdmFyIGxpc3QgPSBodG1sLnZpZGVvbGlzdFtjb250c1tpXV07XFxuICAgICAgICB9IGVsc2UgaWYgKGNvbnRzW2ldLnVybHMpIHtcXG4gICAgICAgICAgICB2YXIgbGlzdCA9IGNvbnRzW2ldLnVybHM7XFxuICAgICAgICB9IGVsc2UgaWYgKGNvbnRzW2ldLnVybCkge1xcbiAgICAgICAgICAgIHZhciBsaXN0ID0gY29udHNbaV0udXJsLnNwbGl0KFxcXCIjXFxcIik7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHZhciBsaXN0ID0gY29udHNbaV0uc3BsaXQoXFxcIiNc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JdO1xcbnZhciBsZSA9IHBhcnNlSW50KG51bSAqIHNzeGMpO1xcbnZhciBUaXQgPSBbXTtcXG5sZXQgbGlzdCA9IE1ZX1BBUkFNUy5saXN0O1xcbmxldCB0eXRpdCA9IE1ZX1BBUkFNUy50eXRpdDtcXG5sZXQgcGFnZWlkID0gXFxcIl9fYXBwXFxcIiArIG51bTtcXG50cnkge1xcbiAgICBmb3IgKHZhciBqID0gbGUgLSBzc3hjOyBqIDwgbGU7IGorKykge1xcbiAgICAgICAgaWYgKGogPCBsaXN0Lmxlbmd0aCkge1xcbiAgICAgICAgICAgIHZhciBsaW5rID0gbGlzdFtqXS51cmw7XFxuICAgICAgICAgICAgdmFyIGxpdGl0ID0gbGlzdFtqXS5tdXJsO1xcbiAgICAgICAgICAgIGlmICgvXFxcXC92b2RcXFxcLy9pLnRlc3QobGluaykpIHtcXG4gICAgICAgICAgICAgICAgaWYgKC8zN1xcXFwuMTYxfDIxNlxcXFwuOTh8cGhvZWJlfGhmeXM4fGZlaWZhbjEyfHR2enl8aGR5YW5ndHZ8dGt5c3x0ZWdvdXlzLy50ZXN0KGxpbmspKSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJz9hYz1saXN0JnptPScgKyBrZXkgKyAnJnBhZ2U9MSc7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJz9hYz1saXN0JndkPScgKyBrZXkgKyAnJnBhZ2U9MSc7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBpZiAoL2RpamlheGlhLy50ZXN0KGxpbmspKSB7XFxuICAgICAgICAgICAgICAgICAgICBsaW5rID0gJ2h0dHA6Ly93d3cuZGlqaWF4aWEuY29tL2FwaS5waHAvYXBwLydcXG4gICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICAgICAgaWYgKGxpbmsuaW5kZXhPZignYXBpLnBocC9hcHAvJykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBobXVybCA9IGxpbmsgKyAnc2VhcmNoP3BnPTEmdGV4dD0nICsga2V5ICsgJyZ0b2tlbj0nO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGxpbmsuaW5kZXhPZigneGdhcHAucGhwL3YxLycpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJ3NlYXJjaD9wZz0xJnRleHQ9JyArIGtleTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvaW9wZW55dW4vLnRlc3QobGluaykpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJy9saXN0P3BhZ2U9ZnlwYWdlJmxpbWl0PTEwJndkPScgKyBrZXk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBobXVybCA9IGxpbmsgKyAnP3BhZ2U9MSZsaW1pdD0xMCZ3ZD0nICsga2V5O1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIC8vRGF0YS5wdXNoKHt1cmw6IGhtdXJsLG9wdGlvbnM6IHtoZWFkZXJzOiB7XFxcIlVzZXItQWdlbnRcXFwiOiBcXFwiRGFydC8yLjE0IChkYXJ0OmlvKVxcXCJ9LHRpbWVvdXQ6IHRpbWVvdX19KTtcXG4gICAgICAgICAgICBEYXRhLnB1c2goe1xcbiAgICAgICAgICAgICAgICB1cmw6IGhtdXJsLFxcbiAgICAgICAgICAgICAgICBvcHRpb25zOiB7XFxuICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBsaW5rLmluZGV4T2YoXFxcIm1vZ2FpX2FwaVxcXCIpICE9IC0xID8gXFxcIkRhcnQvMi4xNCAoZGFydDppbylcXFwiIDogXFxcIm9raHR0cC80LjEuMFxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICB0aW1lb3V0OiB0aW1lb3VcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIFRpdC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0OiBsaXN0W2pdLnRpdGxlLFxcbiAgICAgICAgICAgICAgICBsaW5rOiBsaW5rLFxcbiAgICAgICAgICAgICAgICB0eXBubTogbGl0aXRcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0gLy9pZlxcbiAgICB9IC8vZm9yIGpcXG59IGNhdGNoIChlKSB7fVxcbmlmIChEYXRhLmxlbmd0aCA8PSAwKSB7XFxuICAgIHNldFJlc3VsdChbXSk7XFxufSBlbHNlIHtcXG4gICAgaXRlbXMucHVzaCh7XFxuICAgICAgICB0aXRsZTogXFxcIuato+WcqOWKoOi9veS4reesrFxcXCIgKyBNWV9QQUdFICsgXFxcIumhte+8jOi/m+W6pu+8mjEvXFxcIiArIERhdGEubGVuZ3RoLFxcbiAgICAgICAgdXJsOiBcXFwiXFxcIixcXG4gICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICBkZXNjOiBcXFwiXFxcIixcXG4gICAgICAgIHBpY191cmw6IFxcXCJcXFwiLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBpZDogcGFnZWlkXFxuICAgICAgICB9XFxuICAgIH0pO1xcbiAgICBzZXRSZXN1bHQoaXRlbXMpO1xcbiAgICBsZXQgdGFza3MgPSBbXTtcXG5cXG4gICAgZm9yIChsZXQgayBpbiBEYXRhKSB7XFxuICAgICAgICBsZXQgaXQgPSBEYXRhW2tdO1xcbiAgICAgICAgdGFza3MucHVzaCh7XFxuICAgICAgICAgICAgZnVuYzogZnVuY3Rpb24ocGFyYW0pIHtcXG4gICAgICAgICAgICAgICAgbGV0IGQgPSBbXTtcXG4gICAgICAgICAgICAgICAgbGV0IGh0bWwgPSBmZXRjaChwYXJhbS5pdC51cmwsIHBhcmFtLml0Lm9wdGlvbnMpO1xcbiAgICAgICAgICAgICAgICAvL2xvZyhodG1sKTtcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgIGh0bWwgPSBodG1sLnN1YnN0cmluZygwLCAyKSA9PSAnXFxcXHJcXFxcbicgPyBodG1sLnJlcGxhY2UoJ1xcXFxyXFxcXG4nLCAnJykgOiBodG1sO1xcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcbiAgICAgICAgICAgICAgICBpZiAoL2J0d2FmLy50ZXN0KGh0bWwpKSB7XFxuICAgICAgICAgICAgICAgICAgICBodG1sID0gZmV0Y2gocGFyYW0uaXQudXJsICsgJyZidHdhZicgKyBodG1sLm1hdGNoKC9idHdhZiguKj8pXFxcXFxcXCIvKVsxXSwge30pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmIChodG1sID09IFxcXCJcXFwiIHx8IGh0bWwgPT0gbnVsbCB8fCBodG1sLnN1YnN0cmluZygwLCA1KSA9PSAnZXJyb3InIHx8ICFodG1sLmVuZHNXaXRoKCd9JykpIHtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHBhcmFtLnRpdC50aXQgKyAnICcgKyAn5pyq5pCc57Si5Yiw77yM54K55Ye76K6/6Zeu5Y6f572R6aG1JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHBhcmFtLml0LnVybCArIGBAbGF6eVJ1bGU9LmpzOmlucHV0LnNwbGl0KCc7JylbMF1gLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGh0bWwubGVuZ3RoIDwgODApIHtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHBhcmFtLnRpdC50aXQgKyAnICcgKyAn6L+U5Zue5pWw5o2u5LiN5a6M5pW077yM54K55Ye76K6/6Zeu5Y6f572R6aG1JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHBhcmFtLml0LnVybCArIGBAbGF6eVJ1bGU9LmpzOmlucHV0LnNwbGl0KCc7JylbMF1gLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgaHRtbCA9IEpTT04ucGFyc2UoaHRtbCk7XFxuICAgICAgICAgICAgICAgICAgICAvL2xvZyhodG1sKTtcXG4gICAgICAgICAgICAgICAgICAgIHZhciB0eXBldCA9IHBhcmFtLnRpdC50eXBubTtcXG4gICAgICAgICAgICAgICAgICAgIHZhciB0ZG9taW4gPSBwYXJhbS50aXQubGluaztcXG4gICAgICAgICAgICAgICAgICAgIGlmIChodG1sLmxpc3QpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IGh0bWwubGlzdDtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaHRtbC5kYXRhLmxpc3QpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IGh0bWwuZGF0YS5saXN0O1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChodG1sLmRhdGEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IGh0bWwuZGF0YTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGxpc3QgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGlmIChsaXN0Lmxlbmd0aCA8IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogcGFyYW0udGl0LnRpdCArICcgJyArICfliJfooajlsI/kuo4x77yM5peg5rOV5bGV56S677yM54K55Ye76K6/6Zeu5Y6f572R6aG1JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBwYXJhbS5pdC51cmwgKyBgQGxhenlSdWxlPS5qczppbnB1dC5zcGxpdCgnOycpWzBdYCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGlzdC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoL1xcXFwvdm9kXFxcXC8vLnRlc3QodGRvbWluKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gbGlzdFtpXS50aXRsZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwaWMgPSBsaXN0W2ldLnBpYztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSBsaXN0W2ldLm5leHRsaW5rO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHJlbSA9IGxpc3RbaV0uc3RhdGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodGRvbWluLmluZGV4T2YoJ2FwaS5waHAvYXBwLycpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gbGlzdFtpXS52b2RfbmFtZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGljID0gbGlzdFtpXS52b2RfcGljO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvZmFudHVhbi8udGVzdCh0ZG9taW4pKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSAnaHR0cHM6Ly9mYW50dWFuLndrZmlsZS5jb20vYXBpLnBocC9hcHAvdmlkZW9fZGV0YWlsP2lkPScgKyBsaXN0W2ldLnZvZF9pZCArICcmdG9rZW49JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmlkID0gdGRvbWluICsgJ3ZpZGVvX2RldGFpbD9pZD0nICsgbGlzdFtpXS52b2RfaWQgKyAnJnRva2VuPSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZW0gPSBsaXN0W2ldLnZvZF9yZW1hcmtzO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vdmFyIGNvbj1saXN0W2ldLnR5cGUudHlwZV9kZXM7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRkb21pbi5pbmRleE9mKCd4Z2FwcC5waHAvdjEvJykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSBsaXN0W2ldLnZvZF9uYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwaWMgPSBsaXN0W2ldLnZvZF9waWM7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHZpZCA9IHRkb21pbiArICd2aWRlb19kZXRhaWw/aWQ9JyArIGxpc3RbaV0udm9kX2lkO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZW0gPSBsaXN0W2ldLnZvZF9yZW1hcmtzO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vdmFyIGNvbj1saXN0W2ldLnR5cGUudHlwZV9kZXM7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IGxpc3RbaV0udm9kX25hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBpYyA9IGxpc3RbaV0udm9kX3BpYztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoL2lvcGVueXVuLy50ZXN0KHRkb21pbikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHZpZCA9IHRkb21pbiArICcvZGV0YWlsSUQ/dm9kX2lkPScgKyBsaXN0W2ldLnZvZF9pZCArICcmdG9rZW49JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9ncmVsaWdodGluZy8udGVzdCh0ZG9taW4pKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSB0ZG9taW4gKyAnLz9pZHM9JyArIGxpc3RbaV0udm9kX2lkICsgJyZ0b2tlbj0nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSB0ZG9taW4gKyAnL2RldGFpbD9rZXk9JyArIGRhdGVTdHIgKyAnJnZvZF9pZD0nICsgbGlzdFtpXS52b2RfaWQgKyAnJnRva2VuPSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZW0gPSBsaXN0W2ldLnZvZF9yZW1hcmtzO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vdmFyIGNvbj1saXN0W2ldLnR5cGUudHlwZV9kZXM7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy92YXIgY29uPWxpc3RbaV0uc3RhdGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vbG9nKHZpZCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogTVlfVFlQRSA9PSBcXFwiaG9tZVxcXCIgPyB0aXRsZS5yZXBsYWNlKGtleSwgJ+KAnOKAnCcgKyBrZXkgKyAn4oCd4oCdJykgKyAnXFxcXG4nICsgcmVtIDogdGl0bGUgKyByZW0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBwaWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCh0ZG9taW4uaW5kZXhPZihcXFwibW9nYWlfYXBpXFxcIikgIT0gLTEgPyB2aWQgKyAnO2dldDt1dGYtODt7VXNlci1BZ2VudEBEYXJ0LzIuMTQgKGRhcnQ6aW8pfScgOiB2aWQgKyAnO2dldDt1dGYtODt7VXNlci1BZ2VudEBva2h0dHAvNC4xLjB9JykucnVsZSgodGRvbWluLCB0a3QsIHBhdHQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVzID0ge307XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGl0ZW1zID0gW107XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRrdCAhPSAnJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRQYWdlVGl0bGUodGt0ICsgJy0nICsgcGF0dCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBodG1sID0gSlNPTi5wYXJzZShnZXRSZXNDb2RlKCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6ICcyNTUmJmZsb2F0JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAnJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd4NV93ZWJ2aWV3X3NpbmdsZSdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbXl1cmwgPSBNWV9VUkwubWF0Y2goLyhbXFxcXFNdKj86XFxcXC9cXFxcL1tcXFxcU10qPylcXFxcLy8pWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXC92b2RcXFxcLy8udGVzdCh0ZG9taW4pKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL3R2bW92bGlzdCcsIHt9KSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL3BhZ2UvYXBwbW92bGlzdCcsIHt9KSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcy5kYXRhID0gaXRlbXM7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0SG9tZVJlc3VsdChyZXMpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgdGRvbWluLCBwYXJhbS50aXQudGl0LCB0aXRsZSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2NvbnRlbnQ6IHJlbSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IHR5dGl0ICsgJyA9PiAnICsgcGFyYW0udGl0LnRpdCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV92ZXJ0aWNhbF9waWMnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gLy9mb3IgaVxcbiAgICAgICAgICAgICAgICAgICAgfSAvL2lmIGxpc3QubGVuZ3RoXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuIGQ7XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBwYXJhbToge1xcbiAgICAgICAgICAgICAgICBpdDogaXQsXFxuICAgICAgICAgICAgICAgIHRpdDogVGl0W2tdXFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBpZDogXFxcInRhc2tcXFwiXFxuICAgICAgICB9KVxcbiAgICB9XFxuXFxuICAgIGJhdGNoRXhlY3V0ZSh0YXNrcywge1xcbiAgICAgICAgZnVuYzogZnVuY3Rpb24ocGFyYW0sIGlkLCBlcnJvciwgcmVzdWx0KSB7XFxuICAgICAgICAgICAgLy9sb2coXFxcImxpc3RlbmVyOiBcXFwiICsgKHJlc3VsdCB8fCBbXSkubGVuZ3RoKVxcbiAgICAgICAgICAgIHBhcmFtLmkgPSBwYXJhbS5pICsgMTtcXG4gICAgICAgICAgICBpZiAocmVzdWx0KSB7XFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGl0IG9mIHJlc3VsdCkge1xcbiAgICAgICAgICAgICAgICAgICAgcGFyYW0uaiA9IHBhcmFtLmogKyAxO1xcbiAgICAgICAgICAgICAgICAgICAgYWRkSXRlbUJlZm9yZShwYWdlaWQsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXQudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogaXQuZGVzYyxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGl0LnVybCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBpdC5waWNfdXJsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBpdC5jb2xfdHlwZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogXFxcIl9fYXBwXFxcIiArIE1ZX1BBR0UgKyBcXFwiQFxcXCIgKyBwYXJhbS5qXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAocGFyYW0uaSA+PSBwYXJhbS5hbGwpIHtcXG4gICAgICAgICAgICAgICAgZGVsZXRlSXRlbShwYWdlaWQpXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuato+WcqOWKoOi9veesrFxcXCIgKyBNWV9QQUdFICsgXFxcIumhte+8jOi/m+W6pu+8mlxcXCIgKyAocGFyYW0uaSArIDEpICsgXFxcIi9cXFwiICsgcGFyYW0uYWxsLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHBpY191cmw6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogcGFnZWlkXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSxcXG4gICAgICAgIHBhcmFtOiB7XFxuICAgICAgICAgICAgYWxsOiBEYXRhLmxl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zaCjorrDlvZVbaV0pO1xcbiAgICBpZiAo5paw6K6w5b2VLmxlbmd0aCA9PSAwKSB7XFxuICAgICAgICDmlrDorrDlvZUucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IOiusOW9lVtpXS50eXBlLFxcbiAgICAgICAgICAgIGxpc3Q6IOW9k+WJjeadoeebrlxcbiAgICAgICAgfSk7XFxuICAgIH0gZWxzZSB7XFxuICAgICAgICBsZXQgcmVzID0g5paw6K6w5b2VLnNvbWUoaXRlbSA9PiB7XFxuICAgICAgICAgICAgLy/liKTmlq3nsbvlnovvvIzmnInlsLHmt7vliqDliLDlvZPliY3poblcXG4gICAgICAgICAgICBpZiAoaXRlbS50aXRsZSA9PSDorrDlvZVbaV0udHlwZSkge1xcbiAgICAgICAgICAgICAgICBpdGVtLmxpc3QgPSDlvZPliY3mnaHnm64uY29uY2F0KGl0ZW0ubGlzdC5maWx0ZXIoZCA9PiBkLnVybCAhPSDorrDlvZVbaV0udXJsKSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICBpZiAoIXJlcykge1xcbiAgICAgICAgICAgIC8v5aaC5p6c5rKh5om+55u45ZCM57G75Z6L5re75Yqg5LiA5Liq57G75Z6LXFxuICAgICAgICAgICAg5paw6K6w5b2VLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTog6K6w5b2VW2ldLnR5cGUsXFxuICAgICAgICAgICAgICAgIGxpc3Q6IOW9k+WJjeadoeebrlxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICB9XFxufVxcbnZhciBuZXdmaWxlID0ge307XFxubmV3ZmlsZS5kYXRhID0g5paw6K6w5b2VO1xcbi8vbG9nKHJlbWZpbGUpO1wifV0sXCJwYXJhbXNcIjpcIntcXFwiaWRcXFwiOlxcXCJfX2FwcDFAMTFcXFwifVwiLFwic2F2ZWRcIjpmYWxzZSxcInRpdGxl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7XFxcXG4gICAgICAgICAgICB2YXIgbGluayA9IGxpc3Rbal0udXJsO1xcXFxuICAgICAgICAgICAgdmFyIGxpdGl0ID0gbGlzdFtqXS5tdXJsO1xcXFxuICAgICAgICAgICAgaWYgKC9cXFxcXFxcXC92b2RcXFxcXFxcXC8vLnRlc3QobGluaykpIHtcXFxcbiAgICAgICAgICAgICAgICBpZiAoLzM3XFxcXFxcXFwuMTYxfDIxNlxcXFxcXFxcLjk4fHBob2ViZXxoZnlzOHxmZWlmYW4xMnx0dnp5fGhkeWFuZ3R2fHRreXN8dGVnb3V5cy8udGVzdChsaW5rKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJz9hYz1saXN0JnptPScgKyBrZXkgKyAnJnBhZ2U9ZnlwYWdlJztcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJz9hYz1saXN0JndkPScgKyBrZXkgKyAnJnBhZ2U9ZnlwYWdlJztcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIGlmICgvZGlqaWF4aWEvLnRlc3QobGluaykpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGluayA9ICdodHRwOi8vd3d3LmRpamlheGlhLmNvbS9hcGkucGhwL2FwcC8nXFxcXG4gICAgICAgICAgICAgICAgfTtcXFxcbiAgICAgICAgICAgICAgICBpZiAobGluay5pbmRleE9mKCdhcGkucGhwL2FwcC8nKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJ3NlYXJjaD9wZz1meXBhZ2UmdGV4dD0nICsga2V5ICsgJyZ0b2tlbj0nO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobGluay5pbmRleE9mKCd4Z2FwcC5waHAvdjEvJykgIT0gLTEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGhtdXJsID0gbGluayArICdzZWFyY2g/cGc9ZnlwYWdlJnRleHQ9JyArIGtleTtcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAoL2lvcGVueXVuLy50ZXN0KGxpbmspKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJy9saXN0P3BhZ2U9ZnlwYWdlJmxpbWl0PTEwJndkPScgKyBrZXk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJz9wYWdlPWZ5cGFnZSZsaW1pdD0xMCZ3ZD0nICsga2V5O1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGxpc3Rbal0udGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgaW1nOiBsaXN0W2pdLmltZyxcXFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoJ2hpa2VyOi8vZW1wdHkjeCMnICsgaG11cmwgKyAnI3gjJyArIGxpbmsgKyAnI3gjJyArIGxpdGl0ICsgJyN4IycgKyBrZXkgKyAnI3gjJykucnVsZSgoKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL3NlYXJlcmonKTtcXFxcbiAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2ljb25fcm91bmRfc21hbGxfNCdcXFxcbiAgICAgICAgICAgICAgICAvL2NvbF90eXBlOiAndGV4dF8zJ1xcXFxuICAgICAgICAgICAgICAgIC8vbGluazpsaW5rL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XFwiKS5zcGxpdCgnLCcpWzBdLnJlcGxhY2UoJ2pzb25icycsICcnKTtcXFxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoY29udHNbZ2V0TXlWYXIodGl0bGUsICcwJyldLnBsYXllcl9pbmZvLnBhcnNlICYmIChjb250c1tnZXRNeVZhcih0aXRsZSwgJzAnKV0ucGxheWVyX2luZm8ucGFyc2UpLmluZGV4T2YoXFxcXFxcXCI9XFxcXFxcXCIpICE9IC0xKSB7XFxcXG4gICAgICAgICAgICAgICAgdmFyIGppZWsgPSAoY29udHNbZ2V0TXlWYXIodGl0bGUsICcwJyldLnBsYXllcl9pbmZvLnBhcnNlKS5yZXBsYWNlKC9cXFxcXFxcXC5cXFxcXFxcXC4vZywgXFxcXFxcXCIuXFxcXFxcXCIpLnNwbGl0KCcsJylbMF07XFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIHZhciBqaWVrID0gXFxcXFxcXCJcXFxcXFxcIjtcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIC8vc2V0RXJyb3Ioamllayk7ICAgICAgICAgICAgICAgIFxcXFxuICAgICAgICB9XFxcXG4gICAgfSBjYXRjaCAoZSkge31cXFxcbiAgICAvL2ppZWvmi7zmjqVcXFxcbiAgICBpZiAoamllayAhPSAnJyAmJiBqaWVrICE9IG51bGwpIHtcXFxcbiAgICAgICAgaWYgKGppZWsuc3Vic3RyaW5nKDAsIDQpID09ICdodHRwJykge1xcXFxuICAgICAgICAgICAgamllayA9IGppZWs7XFxcXG4gICAgICAgIH0gZWxzZSBpZiAoamllay5zdWJzdHJpbmcoMCwgMikgPT0gJ1xcXFxcXFxcL1xcXFxcXFxcLycpIHtcXFxcbiAgICAgICAgICAgIGppZWsgPSAnaHR0cHM6JyArIGppZWs7XFxcXG4gICAgICAgIH1cXFxcbiAgICB9IGVsc2Uge1xcXFxuICAgICAgICBqaWVrID0gXFxcXFxcXCJcXFxcXFxcIjtcX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kZXhPZihcXFxcXFxcIj1cXFxcXFxcIikgIT0gLTEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgbG9nKCdcXFxcXFxcXG7nur/ot6/vvJonICsgcHRhYiArICdcXFxcXFxcXG7op4bpopHvvJonICsgdmxpbmsgKyAnXFxcXFxcXFxuJyArICfop6PmnpDmjqXlj6PvvJpcXFxcXFxcXG4nICsgY29udHNbZ2V0TXlWYXIodGl0bGUsICcwJyldLnBsYXllcl9pbmZvLnBhcnNlLnJlcGxhY2UoL1xcXFxcXFxcLlxcXFxcXFxcLi9nLCBcXFxcXFxcIi5cXFxcXFxcIikucmVwbGFjZSgvXFxcXFxcXFwsL2csIFxcXFxcXFwiXFxcXFxcXFxuXFxcXFxcXFxuXFxcXFxcXCIpKTtcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICBsb2coJ1xcXFxcXFxcbue6v+i3r++8micgKyBwdGFiICsgJ1xcXFxcXFxcbuinhumike+8micgKyB2bGluayArICdcXFxcXFxcXG4nICsgJ+ino+aekOaOpeWPo++8mlxcXFxcXFxcbicgKyBqaWVrKTtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgLy9zZXRFcnJvcihqaWVrKTsgICAgICAgICAgICAgICAgXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1cXFxcbiAgICB9IGNhdGNoIChlKSB7fVxcXFxuICAgIC8v5aOw5piO6ZO+5o6lXFxcXG4gICAgdmFyIGxpbmsgPSBqaWVrICsgdmxpbms7XFxcXG4gICAgLypcXFxcbiAgICBpZiAoL1xcXFxcXFxcLm0zdTh8XFxcXFxcXFwubXA0fG9ialxcXFxcXFxcL3Rvcy8udGVzdCh2bGluaykgJiYgL2h0dHAvLnRlc3QodmxpbmspKSB7XFxcXG4gICAgICAgIGxpbmsgPSB2bGluaztcXFxcbiAgICB9XFxcXG4gICAgKi9cXFxcbiAgICAvL2xvZyhsaW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L3h5cS9hcHBtc2V0Lmpzb24nLCB7fSkpLmVuRG47XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZW5EbiA9PSAnMScpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coJ+iwg+eUqOaWreaPkuino+aekGh0bWwnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKFxcXFxcXFwidmFyIGNvbmZpZyA9XFxcXFxcXCIgKyBmZXRjaChcXFxcXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlQYXJzZVNldC5qc29uXFxcXFxcXCIpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBheXRtUGFyc2UocmVzdXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VybFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvXFxcXFxcXFwubTN1OHxcXFxcXFxcXC5tcDR8b2JqXFxcXFxcXFwvdG9zfG5ldGVhc2VcXFxcXFxcXC5jb20vLnRlc3QocmVzdXJsKSAmJiAvaHR0cC8udGVzdChyZXN1cmwpICYmICEvXFxcXFxcXFwuaHRtbHxcXFxcXFxcXC5tM3U4XFxcXFxcXFwudHYvLnRlc3QocmVzdXJsKSAmJiAhL1xcXFxcXFxcPWh0dHAvLnRlc3QocmVzdXJsKSAmJiBwdGFiICE9ICdkdW9kdW96eScpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvd2tmaWxlLy50ZXN0KHJlc3VybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdXJsICsgJzt7UmVmZXJlckBodHRwczovL2ZhbnR1YW4ud2tmaWxlLmNvbS99J1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gL1xcXFxcXFxcPWh0Ly50ZXN0KHJlc3VybCkgPyByZXN1cmwuc3Vic3RyaW5nKHJlc3VybC5pbmRleE9mKCc9aHQnKSArIDEpIDogcmVzdXJsICsgJyNpc1ZpZGVvPXRydWUjJztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8v6LCD55So5pat5o+S6YCa55So5Ye95pWw6Kej5p6QXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgZW5EbiA9IEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vZmlsZXMvcnVsZXMveHlxL2FwcG1zZXQuanNvbicsIHt9KSkuZW5EbjtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlbkRuID09ICcxJykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZygn6LCD55So5pat5o+S6YCa55So5Ye95pWw6Kej5p6QXFxcXFxcXFxuJyArIHB0YWIgKyAnKOmAmueUqOWHveaVsCknKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKFxcXFxcXFwidmFyIGNvbmZpZyA9XFxcXFxcXCIgKyBmZXRjaChcXFxcXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlQYXJzZVNldC5qc29uXFxcXFxcXCIpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBuYW1lID0gcHRhYiArICco6YCa55So5Ye95pWwKSc7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFBhcnNlU1tuYW1lXShyZXN1cmwsIG15dXJsKTtcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwdGFiID09ICdkZHp5Jykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGdldHJhbmRvbSh1cmxzdHIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmFuZFN0ciA9IHVybHN0ci5zdWJzdHJpbmcoMCwgOCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZyA9IHVybHN0ci5zdWJzdHJpbmcoOCwgdXJsc3RyLmxlbmd0aCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1YnN0ciA9IGJhc2U2NERlY29kZShzdHJpbmcpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3Vic3RyLnN1YnN0cmluZyg4LCBzdWJzdHIubGVuZ3RoIC0gOCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIganhodG1sID0gcmVxdWVzdChcXFxcXFxcImh0dHBzOi8vcGxheS5zdW95b3UuY2MveHBsYXkvP3VybD1cXFxcXFxcIiArIHZsaW5rLCB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiUmVmZXJlclxcXFxcXFwiOiBcXFxcXFxcImh0dHBzOi8vd3d3Lmp1YmFpYmFpLmNjL1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKGp4aHRtbC5tYXRjaCgvdmFyIGNvbmZpZ1tcXFxcXFxcXHNcXFxcXFxcXFNdKj99LylbMF0pO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBkZHd5ID0gcG9zdChcXFxcXFxcImh0dHBzOi8vcGxheS5zdW95b3UuY2MveHBsYXkvaGQwTDNUakg0bTh6U0sxTi5qcGdcXFxcXFxcIiwge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIlVzZXItQWdlbnRcXFxcXFxcIjogTU9CSUxFX1VBXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvZHk6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwidXJsXFxcXFxcXCI6IGNvbmZpZy51cmwsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInZrZXlcXFxcXFxcIjogY29uZmlnLnZrZXksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInRva2VuXFxcXFxcXCI6IGNvbmZpZy50b2tlblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGdldHJhbmRvbShKU09OLnBhcnNlKGRkd3kpLnVybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9taWFvcGFydHkvLnRlc3QocHRhYikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlQ2FjaGUoJ2h0dHBzOi8vYWdpdC5haS9semsyMzU1OS9QdWJsaWNSdWxlL3Jhdy9icmFuY2gvbWFzdGVyL3g1cnVsZS5qcycsIDI0KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geDVydWxlKCdodHRwczovL3d3dy5mdW40ay5jb20vYXBsYXllci8/dXJsPScgKyByZXN1cmwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdXJsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfTtcXFxcblxcXFxuICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIC8qXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGVuRG4gPSBKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL2ZpbGVzL3J1bGVzL3h5cS9hcHBtc2V0Lmpzb24nLCB7fSkpLmVuRG47XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGVuRG4gPT0gJzEnICYmIHZsaW5rLm1hdGNoKC95b3VrdXxtZ3R2fGl4aWd1YXxxcS5jb218cWl5aXxtaWd1fGJpbGliaWxpfHNvaHV8cHB0dnxsZXwxOTA1LmNvbS8pICYmIHZsaW5rLnNlYXJjaCgvaHRtbHxiaWxpYmlsaXxpeGlndWEvKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coJ+W3suW8gOWQr+aWreaPku+8jOWwhuiwg+eUqOaWreaPkuino+aekGh0bWwnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChcXFxcXFxcInZhciBjb25maWcgPVxcXFxcXFwiICsgZmV0Y2goXFxcXFxcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL015UGFyc2VTZXQuanNvblxcXFxcXFwiKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoZmV0Y2goY29uZmlnLmNqKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBheXRtUGFyc2UodmxpbmspO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07Ki9cXFxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcXFxuXFxcXG4gICAgICAgICAgICAgICAgdmFyIHNyY3VybCA9IGxpbms7XFxcXG4gICAgICAgICAgICAgICAgLy9sb2coc3JjdXJsKTtcXFxcbiAgICAgICAgICAgICAgICAvL+WKqOaAgeino+aekOS7o+eggeW8gOWni1xcXFxuICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIC8v5aSE55CG5oyH5a6a6KeG6aKR5LiO57q/6LevXFxcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXFxcXFwubTN1OHxcXFxcXFxcXC5tcDR8b2JqXFxcXFxcXFwvdG9zfG5ldGVhc2VcXFxcXFxcXC5jb20vLnRlc3Qoc3JjdXJsKSAmJiAvaHR0cC8udGVzdChzcmN1cmwpICYmICEvXFxcXFxcXFwuaHRtbHxcXFxcXFxcXC5tM3U4XFxcXFxcXFwuLy50ZXN0KHNyY3VybCkgJiYgIS9cXFxcXFxcXD1odHRwLy50ZXN0KHNyY3VybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvd2tmaWxlLy50ZXN0KHNyY3VybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3JjdXJsICsgJzt7UmVmZXJlckBodHRwczovL2ZhbnR1YW4ud2tmaWxlLmNvbS99J1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gL1xcXFxcXFxcPWh0Ly50ZXN0KHNyY3VybCkgPyBzcmN1cmwuc3Vic3RyaW5nKHNyY3VybC5pbmRleE9mKCc9aHQnKSArIDEpIDogc3JjdXJsICsgJyNpc1ZpZGVvPXRydWUjJztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvaGQ4XFxcXFxcXFwucHcvLnRlc3QodmxpbmspICYmIC9cXFxcXFxcXC5tM3U4fFxcXFxcXFxcLm1wNC8udGVzdCh2bGluaykpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB2bGluaztcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChzcmN1cmwuaW5kZXhPZihcXFxcXFxcIi9zaGFyZS9cXFxcXFxcIikgIT0gLTEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGxpbmsgPSBzcmN1cmwuc3BsaXQoXFxcXFxcXCIvc2hhcmVcXFxcXFxcIilbMF07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGZjID0gZmV0Y2goc3JjdXJsLCB7fSkucmVwbGFjZShcXFxcXFxcInZhciBwdXJsXFxcXFxcXCIsIFxcXFxcXFwidmFyIG1haW5cXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZjLmluZGV4T2YoXFxcXFxcXCJtYWluXFxcXFxcXCIpICE9IC0xKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBtYXQgPSBmYy5tYXRjaCgvdmFyIG1haW4uKj87LylbMF07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwobWF0KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBsYXkgPSAobWFpbi5pbmRleE9mKFxcXFxcXFwiaHR0cFxcXFxcXFwiKSAhPSAtMSA/IG1haW4gOiBsaW5rICsgbWFpbik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG1haW4gPSBmYy5tYXRjaCgvdXJsOi4qP1tcXFxcXFxcXCdcXFxcXFxcXFxcXFxcXFwiXSguKj8pW1xcXFxcXFxcJ1xcXFxcXFxcXFxcXFxcXCJdLylbMV07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwbGF5ID0gKG1haW4uaW5kZXhPZihcXFxcXFxcImh0dHBcXFxcXFxcIikgIT0gLTEgPyBtYWluIDogbGluayArIG1haW4pXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGxheTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3g1V2ViVmlldzovLycgKyAoc3JjdXJsKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoLzk4M3ZpcC8udGVzdChzcmN1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5wYXJzZShmZXRjaChzcmN1cmwsIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiVXNlci1BZ2VudFxcXFxcXFwiOiBNT0JJTEVfVUFcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZGlyZWN0OiBmYWxzZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoSGVhZGVyczogdHJ1ZVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSkpLmhlYWRlcnMubG9jYXRpb25bMF07XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL3hcXFxcXFxcXC1uXFxcXFxcXFwuY2N8bmhkejY2Ni8udGVzdChzcmN1cmwpICYmIC9cXFxcXFxcXC5odG1sfGJpbGliaWxpLy50ZXN0KHNyY3VybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKHZsaW5rKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAvL+WkhOeQhuaMh+WumuinhumikeWSjOe6v+i3r+e7k+adn1xcXFxuICAgICAgICAgICAgICAgICAgICAvLy0tLS3liIblibLnur8tLS0tLy9cXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNjb2RlID0gSlNPTi5wYXJzZShmZXRjaChzcmN1cmwsIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIlVzZXItQWdlbnRcXFxcXFxcIjogXFxcXFxcXCJva2h0dHAvNC4xLjBcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZGlyZWN0OiBmYWxzZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhTdGF0dXNDb2RlOiB0cnVlXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgLy9sb2coc2NvZGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAoc2NvZGUuc3RhdHVzQ29kZSA9PSAnMzAyJyB8fCBzY29kZS5zdGF0dXNDb2RlID09ICczMDEnKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL+aJk+W8gOino+aekOaciTMwMumHjeWumuWQkeeahOmTvuaOpVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHJlZHVybCA9IHNjb2RlLmhlYWRlcnMubG9jYXRpb25bMF0ucmVwbGFjZSgvXFxcXFxcXFxcXFxcXFxcXC9nLCAnJyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoL1xcXFxcXFxcPWh0dHAvLnRlc3QocmVkdXJsKSAmJiAvaHRtbHxiaWxpYmlsaXxrZXlcXFxcXFxcXD0vLnRlc3QocmVkdXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKGZldGNoKHJlZHVybCwge30pKS51cmw7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9cXFxcXFxcXD1odHRwLy50ZXN0KHJlZHVybCkgJiYgL1xcXFxcXFxcLm0zdTh8XFxcXFxcXFwubXA0fFxcXFxcXFxcLmZsdi8udGVzdChyZWR1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlZHVybC5zdWJzdHJpbmcocmVkdXJsLmluZGV4T2YoJz1odHRwJykgKyAxKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL2h0dHAvLnRlc3QocmVkdXJsKSAmJiAva2V5XFxcXFxcXFw9fHVpZFxcXFxcXFxcPXx2aWRcXFxcXFxcXD0vLnRlc3QocmVkdXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKGZldGNoKHJlZHVybCwge30pKS51cmw7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9odHRwLy50ZXN0KHJlZHVybCkgJiYgL2h0bWx8YmlsaWJpbGkvLnRlc3QocmVkdXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKHZsaW5rKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlZHVybFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy92YXIgaHRtbCA9IHJlcXVlc3Qoc3JjdXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBodG1sID0gc2NvZGUuYm9keTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vbG9nKGh0bWwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC80MDQgTm90IEZvdW5kfOWkh+ahiOWQjuWPr+e7p+e7reiuv+mXri8udGVzdChodG1sKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKHZsaW5rKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL1xcXFxcXFxcPGJvZHkvLnRlc3QoaHRtbCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coJ+WwneivlemdnkpTT07mjqXlj6PnvZHpobXop6PmnpAnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlQ2FjaGUoJ2h0dHBzOi8vYWdpdC5haS9semsyMzU1OS9QdWJsaWNSdWxlL3Jhdy9icmFuY2gvbWFzdGVyL3g1cnVsZS5qcycsIDI0KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geDVydWxlKHNyY3VybCwgc3JjdXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL3JldHVybiBvcGVudXJsKHNyY3VybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vanNvbuino+aekOeahOWPlumTvuaOpVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwdXJsID0gaHRtbC5tYXRjaCgvW1xcXFxcXFxcJ1xcXFxcXFxcXFxcXFxcXCJddXJsW1xcXFxcXFxcJ1xcXFxcXFxcXFxcXFxcXCJdOi4qP1tcXFxcXFxcXCdcXFxcXFxcXFxcXFxcXFwiXSguKj8pW1xcXFxcXFxcJ1xcXFxcXFxcXFxcXFxcXCJdLylbMV0ucmVwbGFjZSgvXFxcXFxcXFxcXFxcXFxcXC9nLCAnJyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9sb2cocHVybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9odHRwLy50ZXN0KHB1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwdGFiID09ICdiaWxpYmlsaScpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsICsgJzt7UmVmZXJlckBodHRwczovL3d3dy5iaWxpYmlsaS5jb20vJiZVc2VyLUFnZW50QE1vemlsbGEvNS4wfSc7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocHRhYiA9PSAnbWd0dicpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsICsgJyNpc1ZpZGVvPXRydWUjJyArICc7e1JlZmVyZXJAd3d3Lm1ndHYuY29tJiZVc2VyLUFnZW50QE1vemlsbGEvNS4wfSc7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL29qYmsvLnRlc3QocHVybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsICsgJzt7UmVmZXJlckBodHRwczovL2Jhay5vamJranguY29tL30nO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC92aWRlb19tcDR8dHlwZVxcXFxcXFxcPW0zdTh8cHRcXFxcXFxcXD1tM3U4fFxcXFxcXFxcL3ZpZGVvXFxcXFxcXFwvdG9zXFxcXFxcXFwvLy50ZXN0KHB1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHVybCArICcjaXNWaWRlbz10cnVlIyc7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHVybFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v6Z2eaHR0cOW8gOWktOeahOaJk+W8gOWOn+mTvuaOpSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9wZW51cmwodmxpbmspXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAvL+aKpemUmeWIpOaWreWkhOeQhlxcXFxuICAgICAgICAgICAgICAgICAgICBsb2coJ+aJp+ihjOaKpemUmei3s+i9rOWkhOeQhicpO1xcXFxuICAgICAgICAgICAgICAgICAgICAvKmlmIChzcmN1cmwuc3Vic3RyaW5nKDAsIDIpID09ICdcXFxcXFxcXC9cXFxcXFxcXC8nKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3BlbnVybCgnaHR0cHM6JyArIHNyY3VybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL1xcXFxcXFxcPWh0dHAvLnRlc3Qoc3JjdXJsKSAmJiAvXFxcXFxcXFwuaHRtbHxiaWxpYmlsaS8udGVzdChzcmN1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL3JldHVybiBzcmN1cmwuc3BsaXQoJz0nKVsxXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKHNyY3VybC5zdWJzdHJpbmcoc3JjdXJsLmluZGV4T2YoJz1odHRwJykgKyAxKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7Ki9cXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9wZW51cmwodmxpbmspXFxcXG4gICAgICAgICAgICAgICAgICAgIC8vcmV0dXJuICd4NVdlYlZpZXc6Ly8nK3NyY3VybFxcXFxuICAgICAgICAgICAgICAgICAgICAvL31cXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgLy/liqjmgIHop6PmnpDku6PnoIHnu5PmnZ9cXFxcbiAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICBwdGFiLFxcXFxuICAgICAgICAgICAgbGluayxcXFxcbiAgICAgICAgICAgIG15dXJsLFxcXFxuICAgICAgICAgICAgdmxpbmspLFxcXFxuICAgICAgICBjb2xfdHlwZTogY2x0XFxcXG4gICAgfSk7XFxcXG59XFxcXG4vL31cXFwifSx7XFxcImNvbF90eXBlXFxcIjpcXFwibW92aWVfM1xcXCIsXFxcIm5hbWVcXFwiOlxcXCJUVueugOS7i+S4jumAiembhlxcXCIsXFxcInBhdGhcXFwiOlx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NldC5qc29uJywge30pKS5lbkRuO1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAoZW5EbiA9PSAnMScpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZygn6LCD55So5pat5o+S6Kej5p6QJyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBldmFsKFxcXFxcXFwidmFyIGNvbmZpZyA9XFxcXFxcXCIgKyBmZXRjaChcXFxcXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlQYXJzZVNldC5qc29uXFxcXFxcXCIpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoZmV0Y2goY29uZmlnLmNqKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHJlc3VybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdXJsXFxcXG4gICAgICAgICAgICAgICAgICAgIH07XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvXFxcXFxcXFw9TFRcXFxcXFxcXC0vLnRlc3QocmVzdXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICBsb2coJ+iwg+eUqOaWreaPkmx0bmLpgJrnlKjop6PmnpAnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgZXZhbChcXFxcXFxcInZhciBjb25maWcgPVxcXFxcXFwiICsgZmV0Y2goXFxcXFxcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL015UGFyc2VTZXQuanNvblxcXFxcXFwiKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoZmV0Y2goY29uZmlnLmNqKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHZhciBuYW1lID0gJ2x0bmIo6YCa55So5Ye95pWwKSc7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBQYXJzZVNbbmFtZV0ocmVzdXJsLnN1YnN0cmluZyhyZXN1cmwuaW5kZXhPZignPUxULScpICsgMSkpO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXN1cmxcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9O1xcXFxuXFxcXG4gICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgIHZhciBlbkRuID0gSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9maWxlcy9ydWxlcy94eXEvYXBwbXNldC5qc29uJywge30pKS5lbkRuO1xcXFxuICAgICAgICAgICAgICAgIGlmIChlbkRuID09ICcxJyAmJiBzcmN1cmwubWF0Y2goL3lvdWt1fG1ndHZ8aXhpZ3VhfHFxLmNvbXxxaXlpfG1pZ3V8YmlsaWJpbGl8c29odXxwcHR2fGxlfDE5MDUuY29tLykgJiYgc3JjdXJsLnNlYXJjaCgvaHRtbHxiaWxpYmlsaXxpeGlndWEvKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICBsb2coJ+W3suW8gOWQr+aWreaPku+8jOWwhuiwg+eUqOaWreaPkuino+aekGh0bWwnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgZXZhbChcXFxcXFxcInZhciBjb25maWcgPVxcXFxcXFwiICsgZmV0Y2goXFxcXFxcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL015UGFyc2VTZXQuanNvblxcXFxcXFwiKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoZmV0Y2goY29uZmlnLmNqKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBheXRtUGFyc2Uoc3JjdXJsLnN1YnN0cmluZyhzcmN1cmwuaW5kZXhPZignPWh0dHAnKSArIDEpKTtcXFxcbiAgICAgICAgICAgICAgICB9O1xcXFxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge31cXFxcblxcXFxuICAgICAgICAgICAgLy9sb2coc3JjdXJsKTtcXFxcbiAgICAgICAgICAgIC8v5Yqo5oCB6Kej5p6Q5Luj56CB5byA5aeLXFxcXG4gICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgIGlmICgvXFxcXFxcXFwubTN1OHxcXFxcXFxcXC5tcDR8b2JqXFxcXFxcXFwvdG9zLy50ZXN0KHNyY3VybCkgJiYgL2h0dHAvLnRlc3Qoc3JjdXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gL1xcXFxcXFxcPWh0Ly50ZXN0KHNyY3VybCkgPyBzcmN1cmwuc3Vic3RyaW5nKHNyY3VybC5pbmRleE9mKCc9aHQnKSArIDEpIDogc3JjdXJsICsgJyNpc1ZpZGVvPXRydWUjJztcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHNyY3VybC5pbmRleE9mKFxcXFxcXFwiL3NoYXJlL1xcXFxcXFwiKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGxpbmsgPSBzcmN1cmwuc3BsaXQoXFxcXFxcXCIvc2hhcmVcXFxcXFxcIilbMF07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgZmMgPSBmZXRjaChzcmN1cmwsIHt9KS5yZXBsYWNlKFxcXFxcXFwidmFyIHB1cmxcXFxcXFxcIiwgXFxcXFxcXCJ2YXIgbWFpblxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmYy5pbmRleE9mKFxcXFxcXFwibWFpblxcXFxcXFwiKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBtYXQgPSBmYy5tYXRjaCgvdmFyIG1haW4uKj87LylbMF07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChtYXQpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwbGF5ID0gKG1haW4uaW5kZXhPZihcXFxcXFxcImh0dHBcXFxcXFxcIikgIT0gLTEgPyBtYWluIDogbGluayArIG1haW4pO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbWFpbiA9IGZjLm1hdGNoKC91cmw6Lio/W1xcXFxcXFxcJ1xcXFxcXFxcXFxcXFxcXCJdKC4qPylbXFxcXFxcXFwnXFxcXFxcXFxcXFxcXFxcIl0vKVsxXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGxheSA9IChtYWluLmluZGV4T2YoXFxcXFxcXCJodHRwXFxcXFxcXCIpICE9IC0xID8gbWFpbiA6IGxpbmsgKyBtYWluKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwbGF5O1xcXFxuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3g1V2ViVmlldzovLycgKyAoc3JjdXJsKVxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwdGFiID09ICdhbGl6eScpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHB1cmwgPSBmZXRjaCgnaHR0cHM6Ly9mb3ViaW4uY29tL2ppZXhpLnBocD91cmw9JyArIHNyY3VybCwge30pLm1hdGNoKC9cXFxcXFxcXFxcXFxcXFwidXJsXFxcXFxcXFxcXFxcXFxcIjpcXFxcXFxcXFxcXFxcXFwiKC4qPylcXFxcXFxcXFxcXFxcXFwiLylbMV07XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoLzE5anhcXFxcXFxcXC52aXB8bmZ5aW5nc2hpLy50ZXN0KHNyY3VybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHB1cmwgPSBKU09OLnBhcnNlKGZldGNoKHNyY3VybC5yZXBsYWNlKCdodHRwOi8vJywgJ2h0dHBzOi8vJyksIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIlVzZXItQWdlbnRcXFxcXFxcIjogTU9CSUxFX1VBXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVkaXJlY3Q6IGZhbHNlLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgd2l0aEhlYWRlcnM6IHRydWVcXFxcbiAgICAgICAgICAgICAgICAgICAgfSkpLmhlYWRlcnMubG9jYXRpb25bMF07XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvdGl0YW4ubWd0di8udGVzdChwdXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmwgKyAnI2lzVmlkZW89dHJ1ZSMnICsgJzt7UmVmZXJlckB3d3cubWd0di5jb20mJlVzZXItQWdlbnRATW96aWxsYS81LjB9JztcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvb2JqXFxcXFxcXFwvdG9zLy50ZXN0KHB1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHVybCArICcjaXNWaWRlbz10cnVlIyc7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHVybFxcXFxuICAgICAgICAgICAgICAgICAgICB9O1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAvKmVsc2UgaWYgKC96aGFpa2FueXMvLnRlc3Qoc3JjdXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHB1cmwgPSBKU09OLnBhcnNlKGZldGNoKHNyY3VybCArICcmYXBwPTEwMDAzJmFjY291bnQ9MjcyNzc1MDI4JnBhc3N3b3JkPXFxMjcyNzc1MDI4Jywge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJVc2VyLUFnZW50XFxcXFxcXCI6IE1PQklMRV9VQVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVkaXJlY3Q6IGZhbHNlLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhIZWFkZXJzOiB0cnVlXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSkuaGVhZGVycy5sb2NhdGlvblswXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvdGl0YW4ubWd0di8udGVzdChwdXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsICsgJyNpc1ZpZGVvPXRydWUjJyArICc7e1JlZmVyZXJAd3d3Lm1ndHYuY29tJiZVc2VyLUFnZW50QE1vemlsbGEvNS4wfSc7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9vYmpcXFxcXFxcXC90b3MvLnRlc3QocHVybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHVybCArICcjaXNWaWRlbz10cnVlIyc7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9Ki9cXFxcblxcXFxuICAgICAgICAgICAgICAgIC8vLS0tLeWIhuWJsue6vy0tLS0vL1xcXFxuICAgICAgICAgICAgICAgIHZhciBzY29kZSA9IEpTT04ucGFyc2UoZmV0Y2goc3JjdXJsLCB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiVXNlci1BZ2VudFxcXFxcXFwiOiBNT0JJTEVfVUFcXFxcbiAgICAgICAgICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgICAgICAgICAgcmVkaXJlY3Q6IGZhbHNlLFxcXFxuICAgICAgICAgICAgICAgICAgICB3aXRoU3RhdHVzQ29kZTogdHJ1ZVxcXFxuICAgICAgICAgICAgICAgIH0pKTtcXFxcbiAgICAgICAgICAgICAgICAvL2xvZyhzY29kZSk7XFxcXG4gICAgICAgICAgICAgICAgaWYgKHNjb2RlLnN0YXR1c0NvZGUgPT0gJzMwMicgfHwgc2NvZGUuc3RhdHVzQ29kZSA9PSAnMzAxJykge1xcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgcHVybCA9IHNjb2RlLmhlYWRlcnMubG9jYXRpb25bMF0ucmVwbGFjZSgvXFxcXFxcXFxcXFxcXFxcXC9nLCAnJyk7XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgLy92YXIgaHRtbCA9IHJlcXVlc3Qoc3JjdXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGh0bWwgPSBzY29kZS5ib2R5O1xcXFxuICAgICAgICAgICAgICAgICAgICAvL2xvZyhodG1sKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKC80MDQgTm90IEZvdW5kfOWkh+ahiOWQjuWPr+e7p+e7reiuv+mXrnzkuI3lrZjlnKgvLnRlc3QoaHRtbCkgfHwgaHRtbCA9PSAnJykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9wZW51cmwoc3JjdXJsLnN1YnN0cmluZyhzcmN1cmwuaW5kZXhPZignPWh0dHAnKSArIDEpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvXFxcXFxcXFxcXFxcXFxcInVybFxcXFxcXFxcXFxcXFxcXCJcXFxcXFxcXDpcXFxcXFxcXFxcXFxcXFwiaHR0cC8udGVzdChodG1sKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHB1cmwgPSBodG1sLm1hdGNoKC9cXFxcXFxcXFxcXFxcXFwidXJsXFxcXFxcXFxcXFxcXFxcIjpcXFxcXFxcXFxcXFxcXFwiKC4qPylcXFxcXFxcXFxcXFxcXFwiLylbMV0ucmVwbGFjZSgvXFxcXFxcXFxcXFxcXFxcXC9nLCAnJyk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaHRtbC5zdGFydHNXaXRoKCd7JykpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwdXJsID0gc3JjdXJsLnN1YnN0cmluZyhzcmN1cmwuaW5kZXhPZignPWh0dHAnKSArIDEpO1xcXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy92YXIgcHVybCA9IHNyY3VybFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZUNhY2hlKCdodHRwczovL2FnaXQuYWkvbHprMjM1NTkvUHVibGljUnVsZS9yYXcvYnJhbmNoL21hc3Rlci94NXJ1bGUuanMnLCAyNCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geDVydWxlKHNyY3VybCwgc3JjdXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vcmV0dXJuICd4NVdlYlZpZXc6Ly8nKyhzcmN1cmwpIFxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfTtcXFxcbiAgICAgICAgICAgICAgICAvL2xvZyhwdXJsKTtcXFxcbiAgICAgICAgICAgICAgICBpZiAoL3RpdGFuLm1ndHYvLnRlc3QocHVybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmwgKyAnI2lzVmlkZW89dHJ1ZSMnICsgJzt7UmVmZXJlckB3d3cubWd0di5jb20mJlVzZXItQWdlbnRATW96aWxsYS81LjB9JztcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9vYmpcXFxcXFxcXC90b3MvLnRlc3QocHVybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmwgKyAnI2lzVmlkZW89dHJ1ZSMnO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsXFxcXG4gICAgICAgICAgICAgICAgfTtcXFxcblxcXFxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgIGlmIChzcmN1cmwuc3Vic3RyaW5nKDAsIDIpID09ICdcXFxcXFxcXC9cXFxcXFxcXC8nKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKCdodHRwczonICsgc3JjdXJsKTtcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9cXFxcXFxcXD1odHRwLy50ZXN0KHNyY3VybCkgJiYgL1xcXFxcXFxcLmh0bWx8YmlsaWJpbGkvLnRlc3Qoc3JjdXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAvL3JldHVybiBzcmN1cmwuc3BsaXQoJz0nKVs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3RbaV0uc3RhdGU7XFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIGlmICh0ZG9taW4uaW5kZXhPZignYXBpLnBocC9hcHAvJykgIT0gLTEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gbGlzdFtpXS52b2RfbmFtZTtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHBpYyA9IGxpc3RbaV0udm9kX3BpYztcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKC9mYW50dWFuLy50ZXN0KHRkb21pbikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSAnaHR0cHM6Ly9mYW50dWFuLndrZmlsZS5jb20vYXBpLnBocC9hcHAvdmlkZW9fZGV0YWlsP2lkPScgKyBsaXN0W2ldLnZvZF9pZCArICcmdG9rZW49JztcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSB0ZG9taW4gKyAndmlkZW9fZGV0YWlsP2lkPScgKyBsaXN0W2ldLnZvZF9pZCArICcmdG9rZW49JztcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgcmVtID0gbGlzdFtpXS52b2RfcmVtYXJrcztcXFxcbiAgICAgICAgICAgICAgICAgICAgLy92YXIgY29uPWxpc3RbaV0udHlwZS50eXBlX2RlcztcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRkb21pbi5pbmRleE9mKCd4Z2FwcC5waHAvdjEvJykgIT0gLTEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gbGlzdFtpXS52b2RfbmFtZTtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHBpYyA9IGxpc3RbaV0udm9kX3BpYztcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHZpZCA9IHRkb21pbiArICd2aWRlb19kZXRhaWw/aWQ9JyArIGxpc3RbaV0udm9kX2lkO1xcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgcmVtID0gbGlzdFtpXS52b2RfcmVtYXJrcztcXFxcbiAgICAgICAgICAgICAgICAgICAgLy92YXIgY29uPWxpc3RbaV0udHlwZS50eXBlX2RlcztcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSBsaXN0W2ldLnZvZF9uYW1lO1xcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgcGljID0gbGlzdFtpXS52b2RfcGljO1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAoL2lvcGVueXVuLy50ZXN0KHRkb21pbikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSB0ZG9taW4gKyAnL2RldGFpbElEP3ZvZF9pZD0nICsgbGlzdFtpXS52b2RfaWQgKyAnJnRva2VuPSc7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZigvZ3JlbGlnaHRpbmcvLnRlc3QodGRvbWluKSl7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmlkID0gdGRvbWluICsgJy8/aWRzPScgKyBsaXN0W2ldLnZvZF9pZCArICcmdG9rZW49JztcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSB0ZG9taW4gKyAnL2RldGFpbD9rZXk9JyArIGRhdGVTdHIgKyAnJnZvZF9pZD0nICsgbGlzdFtpXS52b2RfaWQgKyAnJnRva2VuPSc7XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlbSA9IGxpc3RbaV0udm9kX3JlbWFya3M7XFxcXG4gICAgICAgICAgICAgICAgICAgIC8vdmFyIGNvbj1saXN0W2ldLnR5cGUudHlwZV9kZXM7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfVxcXFxuXFxcXG4gICAgICAgICAgICBpdGVtcy5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUucmVwbGFjZShrZXksICfigJzigJwnICsga2V5ICsgJ+KAneKAnScpLFxcXFxuICAgICAgICAgICAgICAgIHBpY191cmw6IHBpYyArICdAUmVmZXJlcj0nLFxcXFxuICAgICAgICAgICAgICAgIHVybDogJCh0ZG9taW4uaW5kZXhPZihcXFxcXFxcIm1vZ2FpX2FwaVxcXFxcXFwiKSAhPSAtMSA/IHZpZCArICc7Z2V0O3V0Zi04O3tVc2VyLUFnZW50QERhcnQvMi4xNCAoZGFydDppbyl9JyA6IHZpZCArICc7Z2V0O3V0Zi04O3tVc2VyLUFnZW50QG9raHR0cC80LjEuMH0nKS5ydWxlKCh0ZG9taW4pID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlcyA9IHt9O1xcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgaXRlbXMgPSBbXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGh0bWwgPSBKU09OLnBhcnNlKGdldFJlc0NvZGUoKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICcnLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJzI1NSYmZmxvYXQnLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAnJyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAneDVfd2Vidmlld19zaW5nbGUnXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoWDVXZWJWaWV3KCcnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIG15dXJsID0gTVlfVVJM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BpLnBocC9hcHAvdmlkZW9fZGV0YWlsP2lkPScgKyB1cmw7XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxcXG4gICAgICAgICAgICBwaWNfdXJsOiBpbWcgKyAnQFJlZmVyZXI9JyxcXFxcbiAgICAgICAgICAgIHVybDogJChsaW5rKS5ydWxlKCgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICB2YXIgcmVzID0ge307XFxcXG4gICAgICAgICAgICAgICAgdmFyIGl0ZW1zID0gW107XFxcXG4gICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnJyxcXFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogJzI1NSYmZmxvYXQnLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICcnLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3g1X3dlYnZpZXdfc2luZ2xlJ1xcXFxuICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hYNVdlYlZpZXcoJycpO1xcXFxuICAgICAgICAgICAgICAgIHZhciBodG1sID0gSlNPTi5wYXJzZShnZXRSZXNDb2RlKCkpO1xcXFxuICAgICAgICAgICAgICAgIHZhciBteXVybCA9IE1ZX1VSTC5tYXRjaCgvKFtcXFxcXFxcXFNdKj86XFxcXFxcXFwvXFxcXFxcXFwvW1xcXFxcXFxcU10qPylcXFxcXFxcXC8vKVsxXTtcXFxcbiAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9hcHBtb3ZsaXN0Jywge30pKS5ydWxlKTtcXFxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcXFxuICAgICAgICAgICAgICAgIHJlcy5k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w55u45YWzJyxcXFxcbiAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxcXG59KTtcXFxcbmQucHVzaCh7XFxcXG4gICAgdGl0bGU6ICfmo4DmtYvmm7TmlrAnLFxcXFxuICAgIHVybDogJCgnJykubGF6eVJ1bGUoKGxvY3ZlcikgPT4ge1xcXFxuICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgdmFyIHJlbWYgPSBmZXRjaENhY2hlKCdodHRwczovL2NvZGViZXJnLm9yZy9semsyMzU1OS9jbG91ZHJ1bGUvcmF3L2JyYW5jaC9tYXN0ZXIvYXBwbW92aWUudHh0JywgMjQpO1xcXFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgICAgICByZW1mID0gJyc7XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgaWYgKC/vv6ViYXNlNjQvLnRlc3QocmVtZikpIHtcXFxcbiAgICAgICAgICAgIHZhciByZW12ID0gSlNPTi5wYXJzZShiYXNlNjREZWNvZGUocmVtZi5zcGxpdCgnQCcpWzJdKSkudmVyc2lvbjtcXFxcbiAgICAgICAgfSBlbHNlIGlmICgv77+laG9tZV9ydWxl77+lLy50ZXN0KHJlbWYpKSB7XFxcXG4gICAgICAgICAgICB2YXIgcmVtdiA9IEpTT04ucGFyc2UocmVtZi5zcGxpdCgn77+laG9tZV9ydWxl77+lJylbMV0pLnZlcnNpb247XFxcXG4gICAgICAgIH07XFxcXG4gICAgICAgIGlmICgv77+laG9tZV9ydWxlLy50ZXN0KHJlbWYpKSB7XFxcXG4gICAgICAgICAgICBsb2coJ+i/nOeoi+eJiOacrO+8micgKyByZW12KTtcXFxcbiAgICAgICAgICAgIGxvZygn5pys5Zyw54mI5pys77yaJyArIGxvY3Zlcik7XFxcXG4gICAgICAgICAgICBpZiAobG9jdmVyICE9IHJlbXYpIHtcXFxcbiAgICAgICAgICAgICAgICBwdXRWYXIoJ2FwcG52ZXInLCByZW1mKTtcXFxcbiAgICAgICAgICA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ybC5zcGxpdCgnJCQkJyk7XFxcXG4gICAgICAgIH1cXFxcbiAgICB9IGVsc2UgaWYgKGh0bWwuZGF0YS52b2RfaW5mbyAmJiBodG1sLmRhdGEudm9kX2luZm8udm9kX3VybF93aXRoX3BsYXllcikge1xcXFxuICAgICAgICB2YXIgY29udHMgPSBodG1sLmRhdGEudm9kX2luZm8udm9kX3VybF93aXRoX3BsYXllcjtcXFxcbiAgICAgICAgaWYgKGNvbnRzLmxlbmd0aCA8IDEpIHtcXFxcbiAgICAgICAgICAgIGNvbnRzID0gaHRtbC5kYXRhLnZvZF9pbmZvLnZvZF9wbGF5X3VybC5zcGxpdCgnJCQkJyk7XFxcXG4gICAgICAgIH1cXFxcbiAgICB9IGVsc2UgaWYgKGh0bWwuZGF0YS5sZW5ndGggPT0gMSkge1xcXFxuICAgICAgICB2YXIgY29udHMgPSBodG1sLmRhdGFbMF0udm9kX3BsYXlfbGlzdDtcXFxcbiAgICAgICAgLy9sb2coY29udHMpO1xcXFxuICAgICAgICBpZiAoY29udHMubGVuZ3RoIDwgMSkge1xcXFxuICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGFbMF0udm9kX3BsYXlfdXJsLnNwbGl0KCckJCQnKTtcXFxcbiAgICAgICAgfVxcXFxuICAgIH0gZWxzZSB7XFxcXG4gICAgICAgIHZhciBjb250cyA9IGh0bWwuZGF0YS52b2RfcGxheV9saXN0O1xcXFxuICAgICAgICBpZiAoY29udHMubGVuZ3RoIDwgMSkge1xcXFxuICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX3BsYXlfdXJsLnNwbGl0KCckJCQnKTtcXFxcbiAgICAgICAgfVxcXFxuICAgIH1cXFxcblxcXFxuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgY29udHMubGVuZ3RoOyBpKyspIHtcXFxcbiAgICAgICAgaWYgKGh0bWwudmlkZW9saXN0KSB7XFxcXG4gICAgICAgICAgICB2YXIgbGlzdCA9IGh0bWwudmlkZW9saXN0W2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WJlfGhmeXM4fGZlaWZhbjEyfHR2enl8aGR5YW5ndHZ8dGt5c3x0ZWdvdXlzLy50ZXN0KGxpbmspKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHZhciBobXVybCA9IGxpbmsgKyAnP2FjPWxpc3Qmem09JyArIGtleSArICcmcGFnZT0xJztcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJz9hYz1saXN0JndkPScgKyBrZXkgKyAnJnBhZ2U9MSc7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICBpZiAoL2RpamlheGlhLy50ZXN0KGxpbmspKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxpbmsgPSAnaHR0cDovL3d3dy5kaWppYXhpYS5jb20vYXBpLnBocC9hcHAvJ1xcXFxuICAgICAgICAgICAgICAgIH07XFxcXG4gICAgICAgICAgICAgICAgaWYgKGxpbmsuaW5kZXhPZignYXBpLnBocC9hcHAvJykgIT0gLTEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGhtdXJsID0gbGluayArICdzZWFyY2g/cGc9MSZ0ZXh0PScgKyBrZXkgKyAnJnRva2VuPSc7XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChsaW5rLmluZGV4T2YoJ3hnYXBwLnBocC92MS8nKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJ3NlYXJjaD9wZz0xJnRleHQ9JyArIGtleTtcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAoL2lvcGVueXVuLy50ZXN0KGxpbmspKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJy9saXN0P3BhZ2U9ZnlwYWdlJmxpbWl0PTEwJndkPScgKyBrZXk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJz9wYWdlPTEmbGltaXQ9MTAmd2Q9JyArIGtleTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIC8vRGF0YS5wdXNoKHt1cmw6IGhtdXJsLG9wdGlvbnM6IHtoZWFkZXJzOiB7XFxcXFxcXCJVc2VyLUFnZW50XFxcXFxcXCI6IFxcXFxcXFwiRGFydC8yLjE0IChkYXJ0OmlvKVxcXFxcXFwifSx0aW1lb3V0OiB0aW1lb3V9fSk7XFxcXG4gICAgICAgICAgICBEYXRhLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgIHVybDogaG11cmwsXFxcXG4gICAgICAgICAgICAgICAgb3B0aW9uczoge1xcXFxuICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIlVzZXItQWdlbnRcXFxcXFxcIjogbGluay5pbmRleE9mKFxcXFxcXFwibW9nYWlfYXBpXFxcXFxcXCIpICE9IC0xID8gXFxcXFxcXCJEYXJ0LzIuMTQgKGRhcnQ6aW8pXFxcXFxcXCIgOiBcXFxcXFxcIm9raHR0cC80LjEuMFxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICAgICAgICAgIHRpbWVvdXQ6IHRpbWVvdVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgVGl0LnB1c2goe1xcXFxuICAgICAgICAgICAgICAgIHRpdDogbGlzdFtqXS50aXRsZSxcXFxcbiAgICAgICAgICAgICAgICBsaW5rOiBsaW5rLFxcXFxuICAgICAgICAgICAgICAgIHR5cG5tOiBsaXRpdFxcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgIH0gLy9pZlxcXFxuICAgIH0gLy9mb3IgalxcXFxufSBjYXRjaCAoZSkge31cXFxcbmlmIChEYXRhLmxlbmd0aCA8PSAwKSB7XFxcXG4gICAgc2V0UmVzdWx0KFtdKTtcXFxcbn0gZWxzZSB7XFxcXG4gICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgIHRpdGxlOiBcXFxcXFxcIuato+WcqOWKoOi9veS4reesrFxcXFxcXFwiICsgTVlfUEFHRSArIFxcXFxcXFwi6aG177yM6L+b5bqm77yaMS9cXFxcXFxcIiArIERhdGEubGVuZ3RoLFxcXFxuICAgICAgICB1cmw6IFxcXFxcXFwiXFxcXFxcXCIsXFxcXG4gICAgICAgIGNvbF90eXBlOiBcXFxcXFxcInRleHRfY2VudGVyXzFcXFxcXFxcIixcXFxcbiAgICAgICAgZGVzYzogXFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICAgICAgcGljX3VybDogXFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgIGlkOiBwYWdlaWRcXFxcbiAgICAgICAgfVxcXFxuICAgIH0pO1xcXFxuICAgIHNldFJlc3VsdChpdGVtcyk7XFxcXG4gICAgbGV0IHRhc2tzID0gW107XFxcXG5cXFxcbiAgICBmb3IgKGxldCBrIGluIERhdGEpIHtcXFxcbiAgICAgICAgbGV0IGl0ID0gRGF0YVtrXTtcXFxcbiAgICAgICAgdGFza3MucHVzaCh7XFxcXG4gICAgICAgICAgICBmdW5jOiBmdW5jdGlvbihwYXJhbSkge1xcXFxuICAgICAgICAgICAgICAgIGxldCBkID0gW107XFxcXG4gICAgICAgICAgICAgICAgbGV0IGh0bWwgPSBmZXRjaChwYXJhbS5pdC51cmwsIHBhcmFtLml0Lm9wdGlvbnMpO1xcXFxuICAgICAgICAgICAgICAgIC8vbG9nKGh0bWwpO1xcXFxuICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGh0bWwgPSBodG1sLnN1YnN0cmluZygwLCAyKSA9PSAnXFxcXFxcXFxyXFxcXFxcXFxuJyA/IGh0bWwucmVwbGFjZSgnXFxcXFxcXFxyXFxcXFxcXFxuJywgJycpIDogaHRtbDtcXFxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcXFxuICAgICAgICAgICAgICAgIGlmICgvYnR3YWYvLnRlc3QoaHRtbCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaHRtbCA9IGZldGNoKHBhcmFtLml0LnVybCArICcmYnR3YWYnICsgaHRtbC5tYXRjaCgvYnR3YWYoLio/KVxcXFxcXFxcXFxcXFxcXCIvKVsxXSwge30pO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBpZiAoaHRtbCA9PSBcXFxcXFxcIlxcXFxcXFwiIHx8IGh0bWwgPT0gbnVsbCB8fCBodG1sLnN1YnN0cmluZygwLCA1KSA9PSAnZXJyb3InIHx8ICFodG1sLmVuZHNXaXRoKCd9JykpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBwYXJhbS50aXQudGl0ICsgJyAnICsgJ+acquaQnOe0ouWIsO+8jOeCueWHu+iuv+mXruWOn+e9kemhtScsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHBhcmFtLml0LnVybCArIGBAbGF6eVJ1bGU9LmpzOmlucHV0LnNwbGl0KCc7JylbMF1gLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IFxcXFxcXFwiXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaHRtbC5sZW5ndGggPCA4MCkge1xcXFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHBhcmFtLnRpdC50aXQgKyAnICcgKyAn6L+U5Zue5pWw5o2u5LiN5a6M5pW077yM54K55Ye76K6/6Zeu5Y6f572R6aG1JyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogcGFyYW0uaXQudXJsICsgYEBsYXp5UnVsZT0uanM6aW5wdXQuc3BsaXQoJzsnKVswXWAsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGljX3VybDogXFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaHRtbCA9IEpTT04ucGFyc2UoaHRtbCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKGh0bWwpO1xcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgdHlwZXQgPSBwYXJhbS50aXQudHlwbm07XFxcXG4gICAgICAgICAgICAgICAgICAgIHZhciB0ZG9taW4gPSBwYXJhbS50aXQubGluaztcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGh0bWwubGlzdCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGxpc3QgPSBodG1sLmxpc3Q7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaHRtbC5kYXRhLmxpc3QpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsaXN0ID0gaHRtbC5kYXRhLmxpc3Q7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaHRtbC5kYXRhKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IGh0bWwuZGF0YTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsaXN0ID0gW107XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGxpc3QubGVuZ3RoIDwgMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogcGFyYW0udGl0LnRpdCArICcgJyArICfliJfooajlsI/kuo4x77yM5peg5rOV5bGV56S677yM54K55Ye76K6/6Zeu5Y6f572R6aG1JyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHBhcmFtLml0LnVybCArIGBAbGF6eVJ1bGU9LmpzOmlucHV0LnNwbGl0KCc7JylbMF1gLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXFxcXFwiXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGljX3VybDogXFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGlzdC5sZW5ndGg7IGkrKykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXFxcXFwvdm9kXFxcXFxcXFwvLy50ZXN0KHRkb21pbikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gbGlzdFtpXS50aXRsZTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBpYyA9IGxpc3RbaV0ucGljO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmlkID0gbGlzdFtpXS5uZXh0bGluaztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHJlbSA9IGxpc3RbaV0uc3RhdGU7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRkb21pbi5pbmRleE9mKCdhcGkucGhwL2FwcC8nKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gbGlzdFtpXS52b2RfbmFtZTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwaWMgPSBsaXN0W2ldLnZvZF9waWM7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoL2ZhbnR1YW4vLnRlc3QodGRvbWluKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSAnaHR0cHM6Ly9mYW50dWFuLndrZmlsZS5jb20vYXBpLnBocC9hcHAvdmlkZW9fZGV0YWlsP2lkPScgKyBsaXN0W2ldLnZvZF9pZCArICcmdG9rZW49JztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHZpZCA9IHRkb21pbiArICd2aWRlb19kZXRhaWw/aWQ9JyArIGxpc3RbaV0udm9kX2lkICsgJyZ0b2tlbj0nO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHJlbSA9IGxpc3RbaV0udm9kX3JlbWFya3M7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL3ZhciBjb249bGlzdFtpXS50eXBlLnR5cGVfZGVzO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRkb21pbi5pbmRleE9mKCd4Z2FwcC5waHAvdjEvJykgIT0gLTEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IGxpc3RbaV0udm9kX25hbWU7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGljID0gbGlzdFtpXS52b2RfcGljO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHZpZCA9IHRkb21pbiArICd2aWRlb19kZXRhaWw/aWQ9JyArIGxpc3RbaV0udm9kX2lkO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHJlbSA9IGxpc3RbaV0udm9kX3JlbWFya3M7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL3ZhciBjb249bGlzdFtpXS50eXBlLnR5cGVfZGVzO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gbGlzdFtpXS52b2RfbmFtZTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwaWMgPSBsaXN0W2ldLnZvZF9waWM7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoL2lvcGVueXVuLy50ZXN0KHRkb21pbikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmlkID0gdGRvbWluICsgJy9kZXRhaWxJRD92b2RfaWQ9JyArIGxpc3RbaV0udm9kX2lkICsgJyZ0b2tlbj0nO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvZ3JlbGlnaHRpbmcvLnRlc3QodGRvbWluKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSB0ZG9taW4gKyAnLz9pZHM9JyArIGxpc3RbaV0udm9kX2lkICsgJyZ0b2tlbj0nO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmlkID0gdGRvbWluICsgJy9kZXRhaWw/a2V5PScgKyBkYXRlU3RyICsgJyZ2b2RfaWQ9JyArIGxpc3RbaV0udm9kX2lkICsgJyZ0b2tlbj0nO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHJlbSA9IGxpc3RbaV0udm9kX3JlbWFya3M7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL3ZhciBjb249bGlzdFtpXS50eXBlLnR5cGVfZGVzO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG5cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy92YXIgY29uPWxpc3RbaV0uc3RhdGU7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9sb2codmlkKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogTVlfVFlQRSA9PSBcXFxcXFxcImhvbWVcXFxcXFxcIiA/IHRpdGxlLnJlcGxhY2Uoa2V5LCAn4oCc4oCcJyArIGtleSArICfigJ3igJ0nKSArICdcXFxcXFxcXG4nICsgcmVtIDogdGl0bGUgKyByZW0sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IHBpYyArICdAUmVmZXJlcj0nLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQodGRvbWluLmluZGV4T2YoXFxcXFxcXCJtb2dhaV9hcGlcXFxcXFxcIikgIT0gLTEgPyB2aWQgKyAnO2dldDt1dGYtODt7VXNlci1BZ2VudEBEYXJ0LzIuMTQgKGRhcnQ6aW8pfScgOiB2aWQgKyAnO2dldDt1dGYtODt7VXNlci1BZ2VudEBva2h0dHAvNC4xLjB9JykucnVsZSgodGRvbWluLCB0a3QsIHBhdHQpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZXMgPSB7fTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpdGVtcyA9IFtdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHRrdCAhPSAnJykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFBhZ2VUaXRsZSh0a3QgKyAnLScgKyBwYXR0KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBodG1sID0gSlNPTi5wYXJzZShnZXRSZXNDb2RlKCkpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICcnLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6ICcyNTUmJmZsb2F0JyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICcnLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAneDVfd2Vidmlld19zaW5nbGUnXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBteXVybCA9IE1ZX1VSTC5tYXRjaCgvKFtcXFxcXFxcXFNdKj86XFxcXFxcXFwvXFxcXFxcXFwvW1xcXFxcXFxcU10qPylcXFxcXFxcXC8vKVsxXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXFxcXFwvdm9kXFxcXFxcXFwvLy50ZXN0KHRkb21pbikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS90dm1vdmxpc3QnLCB7fSkpLnJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9hcHBtb3ZsaXN0Jywge30pKS5ydWxlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzLmRhdGEgPSBpdGVtcztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldEhvbWVSZXN1bHQocmVzKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgdGRvbWluLCBwYXJhbS50aXQudGl0LCB0aXRsZSksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vY29udGVudDogcmVtLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiB0eXRpdCArICcgPT4gJyArIHBhcmFtLnRpdC50aXQsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV92ZXJ0aWNhbF9waWMnXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IC8vZm9yIGlcXFxcbiAgICAgICAgICAgICAgICAgICAgfSAvL2lmIGxpc3QubGVuZ3RoXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIHJldHVybiBkO1xcXFxuICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgIHBhcmFtOiB7XFxcXG4gICAgICAgICAgICAgICAgaXQ6IGl0LFxcXFxuICAgICAgICAgICAgICAgIHRpdDogVGl0W2tdXFxcXG4gICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgaWQ6IFxcXFxcXFwidGFza1xcXFxcXFwiXFxcXG4gICAgICAgIH0pXFxcXG4gICAgfVxcXFxuXFxcXG4gICAgYmF0Y2hFeGVjdXRlKHRhc2tzLCB7XFxcXG4gICAgICAgIGZ1bmM6IGZ1bmN0aW9uKHBhcmFtLCBpZCwgZXJyb3IsIHJlc3VsdCkge1xcXFxuICAgICAgICAgICAgLy9sb2coXFxcXFxcXCJsaXN0ZW5lcjogXFxcXFxcXCIgKyAocmVzdWx0IHx8IFtdKS5sZW5ndGgpXFxcXG4gICAgICAgICAgICBwYXJhbS5pID0gcGFyYW0uaSArIDE7XFxcXG4gICAgICAgICAgICBpZiAocmVzdWx0KSB7XFxcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaXQgb2YgcmVzdWx0KSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHBhcmFtLmogPSBwYXJhbS5qICsgMTtcXFxcbiAgICAgICAgICAgICAgICAgICAgYWRkSXRlbUJlZm9yZShwYWdlaWQsIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdC50aXRsZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IGl0LmRlc2MsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGl0LnVybCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IGl0LnBpY191cmwsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogaXQuY29sX3R5cGUsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBcXFxcXFxcIl9fYXBwXFxcXFxcXCIgKyBNWV9QQUdFICsgXFxcXFxcXCJAXFxcXFxcXCIgKyBwYXJhbS5qXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICBpZiAocGFyYW0uaSA+PSBwYXJhbS5hbGwpIHtcXFxcbiAgICAgICAgICAgICAgICBkZWxldGVJdGVtKHBhZ2VpZClcXFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIuato+WcqOWKoOi9veesrFxcXFxcXFwiICsgTVlfUEFHRSArIFxcXFxcXFwi6aG177yM6L+b5bqm77yaXFxcXFxcXCIgKyAocGFyYW0uaSArIDEpICsgXFxcXFxcXCIvXFxcXFxcXCIgKyBwYXJhbS5hbGwsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwidGV4dF9jZW50ZXJfMVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IHBhZ2VpZFxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSxcXFxcbiAgICAgICAgcGFyYW06IHtcXFxcbiAgICAgICAgICAgIGFsbDogRGF0YS5sZW5ndGgsXFxcXG4gICAgICAgICAgICBpOiAwLFxcXFxuICAgICAgICAgICAgajogLTFcXFxcbiAgICAgICAgfVxcXFxuICAgIH0pXFxcXG59XFxcIn0se1xcXCJjb2xfdHlwZVxcXCI6XFxcIm1vdmllXzNcXFwiLFxcXCJuYW1lXFxcIjpcXFwi5pWw5o2u6L2s5o2iXFxcIixcXFwicGF0aFxcXCI6XFxcImNvbnZlclxcXCIsXFxcInJ1bGVcXFwiOlxcXCIvL2pzOlxcXFxuLy9yZW0ocmVzKTtcXFxcbnZhciDorrDlvZUgPSBbXTtcXFxcbnZhciDovpPlhaXmnaHnm64gPSByZW1maWxlLm1hdGNoKC8uKz1odHRwLisvZyk7XFxcXG5mb3IgKHZhciBqIGluIOi+k+WFpeadoeebrikge1xcXFxuICAgIHZhciB0aXRsZSA9IOi+k+WFpeadoeebrltqXS5zcGxpdCgnQCcpWzFdLnNwbGl0KCc9JylbMF07XFxcXG4gICAgdmFyIHVybCA9IOi+k+WFpeadoeebrltqXS5zc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add Comment
Please, Sign In to add comment
Advertisement