xiaomianao666

小程序:bilili

Feb 16th, 2024
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@bilili@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiYmlsaWxpIiwiYXV0aG9yIjoi5L6g5ZCNIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjZnlwYWdlIiwidmVyc2lvbiI6MTYsImNvbF90eXBlIjoibW92aWVfMV92ZXJ0aWNhbF9waWMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InZpZGVvIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG52YXIgZCA9IFtdO1xudmFyIHBhZ2UgPSBNWV9QQUdFO1xuaXNMb2dpbiA9IEpTT04ucGFyc2UoJC5yZXF1aXJlKFwiaGlrZXI6Ly9wYWdlL2FwaVwiKS5pc0xvZ2dlZEluKCkpO1xuLy8g6aqM6K+B55m75b2VXG5pZiAoaXNMb2dpbi50eXBlID09PSB0cnVlKSB7XG4gICAgY3VycmVudFVzZXIgPSBKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIpKS51c2VyTGlzdFswXTtcbiAgICBjb29raWUgPSBjdXJyZW50VXNlci5jb29raWU7XG4gICAgdXNlck5hbWUgPSBjdXJyZW50VXNlci51c2VyTmFtZTtcbiAgICBtaWQgPSBjdXJyZW50VXNlci51c2VyTWlkO1xuICAgIHVzZXJGYWNlID0gY3VycmVudFVzZXIuZmFjZSArIFwiQFJlZmVyZXI9XCI7XG4gICAgaWYgKHBhZ2UgPT0gMSkge1xuICAgICAgICB2YXIgVGFiID0gWyfotKblj7cnLCAn54Ot5pigJywgJ+eJh+W6kycsICfmjqjpgIEnLCAn54Ot6ZeoJywgJ+iuoumYhScsICflhbPms6gnLCAn5pS26JePJywgJ+i2s+i/uScsICfliqjmgIEnXTtcbiAgICAgICAgVGFiID0gVGFiLm1hcCgoaXQpID0+IHtcbiAgICAgICAgICAgIHJldHVybiBpdCA9PT0gZ2V0SXRlbSgn6aaW6aG1JywgJ+aOqOmAgScpID8gJ/CfkYknICsgaXQgOiBpdDtcbiAgICAgICAgfSk7XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTogJzxmb250IGNvbG9yPVwiYmx1ZVwiPicgKyB1c2VyTmFtZSxcbiAgICAgICAgICAgIGRlc2M6ICc8L2ZvbnQ+4q2QPGZvbnQgY29sb3I9XCIjMTlCODlEXCI+5b2T5YmN77yaJyArIGdldEl0ZW0oJ+mmlumhtScsICfmjqjpgIEnKSArICc8L2ZvbnQ+4q2QJyxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoVGFiKSA9PiB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICQoVGFiLCAyKS5zZWxlY3QoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpbnB1dCA9IGlucHV0LnJlcGxhY2UoL/CfkYkvZywgJycpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQgPT09ICfotKblj7cnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RPcHRpb24gPSBbJ+mAgOWHuueZu+W9lScsICfliIfmjaLotKblj7cnLCflpI3liLZjb29raWUnLCAn5YiG5LqrYmZLZXknLCAn6K6+572uYmZLZXknLCAn5riF6ZmkYmZLZXknLCfinpXvuI8nXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKHNlbGVjdE9wdGlvbiwgMikuc2VsZWN0KCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGlucHV0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCLpgIDlh7rnmbvlvZVcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldHRpbmcgPSBKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNldHRpbmcudXNlckxpc3RbMF0uY29va2llID0gJyc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXR0aW5nLnVzZXJMaXN0LnNoaWZ0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzYXZlRmlsZShcImhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvYmlsaS50eHRcIiwgSlNPTi5zdHJpbmdpZnkoc2V0dGluZykpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+S9oOW3sumAgOWHulwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwi5YiH5o2i6LSm5Y+3XCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1c2VyTGlzdCA9IEpTT04ucGFyc2UocmVxdWVzdChcImhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvYmlsaS50eHRcIikpLnVzZXJMaXN0Lm1hcCgocCkgPT4geyByZXR1cm4gcC51c2VyTmFtZSB9KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKHVzZXJMaXN0LCAxKS5zZWxlY3QoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldHRpbmcgPSBKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGVtcCA9IHNldHRpbmcudXNlckxpc3RbMF07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0dGluZy51c2VyTGlzdC5mb3JFYWNoKChwLCBpbmRleCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocC51c2VyTmFtZSA9PT0gaW5wdXQgJiYgaW5kZXggIT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldHRpbmcudXNlckxpc3RbMF0gPSBwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0dGluZy51c2VyTGlzdFtpbmRleF0gPSB0ZW1wO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2F2ZUZpbGUoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIsIEpTT04uc3RyaW5naWZ5KHNldHRpbmcpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+WIh+aNouaIkOWKn1wiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwi5aSN5Yi2Y29va2llXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb29raWUgPSBKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIpKS51c2VyTGlzdFswXS5jb29raWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3B5KGNvb2tpZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+W3suWkjeWItmNvb2tpZVwiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCLliIbkuqtiZktleVwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29va2llID0gSlNPTi5wYXJzZShyZXF1ZXN0KFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFwiKSkudXNlckxpc3RbMF0uY29va2llO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmZLZXkgPSBiYXNlNjRFbmNvZGUoYmFzZTY0RW5jb2RlKGNvb2tpZSkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29weShiZktleSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+W3suWkjeWItmJmS2V5LOW/q+WOu+WIhuS6q+WQp++8jOazqOaEj+i0puWPt+WuieWFqH5cIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwi6K6+572uYmZLZXlcIjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCcnLCAn5pKt5pS+5p2D55uK5YWx5Lqr77yM5rOo5oSP5a6J5YWoJykuaW5wdXQoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldHRpbmcgPSBKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXR0aW5nLmJmS2V5ID0gaW5wdXQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2F2ZUZpbGUoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIsIEpTT04uc3RyaW5naWZ5KHNldHRpbmcpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL2JmS2V56K6+572u5oiQ5YqfXCI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXCLmuIXpmaRiZktleVwiOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0dGluZyA9IEpTT04ucGFyc2UocmVxdWVzdChcImhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvYmlsaS50eHRcIikpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0dGluZy5iZktleSA9ICcnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2F2ZUZpbGUoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIsIEpTT04uc3RyaW5naWZ5KHNldHRpbmcpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcInRvYXN0Oi8vYmZLZXnlt7LmuIXpmaRcIjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFwi4p6V77iPXCI6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJoaWtlcjovL3BhZ2UvbG9naW4jbm9SZWNvcmRIaXN0b3J5I1wiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+S9oOmAieS6huWVpe+8n1wiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgn6aaW6aG1JywgaW5wdXQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJ0b2FzdDovL+WIh+aNoummlumhteS4ujpcIiArIGlucHV0O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgIH0sIFRhYiksXG4gICAgICAgICAgICBpbWc6IHVzZXJGYWNlID09PSB1bmRlZmluZWQgPyAnaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vdmllLzIwLnN2ZycgOiB1c2VyRmFjZSxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcImF2YXRhclwiLFxuICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICBpZDogJ+mmlumhteaYvuekuidcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSk7XG4g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aUtuiXjyc6XG4gICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdCgnaGlrZXI6Ly9wYWdlL2NvbGVjdGlvbicpKS5ydWxlKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlICfotrPov7knOlxuICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS90cmFjaycpKS5ydWxlKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlICfliqjmgIEnOlxuICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS9sYXRldE5ld3MnKSkucnVsZSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KCdoaWtlcjovL3BhZ2UvVXBkYXRlVGFibGVzJykpLnJ1bGUpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgfVxufSBlbHNlIHtcbiAgICBsZXQgYSA9IFtdXG4gICAgbGV0IHRpbWUgPSAxMFxuICAgIGEucHVzaCh7XG4gICAgICAgIHRpdGxlOiBgICAgICAgICAgICAgICAgICAgICAg5L2/55So5YmN6aG755+lXG7mnKzop4TliJnosIPnlKhodHRwczovL2dpdGh1Yi5jb20vU29jaWFsU2lzdGVyWWkvYmlsaWJpbGktQVBJLWNvbGxlY3TnmoRhcGnvvIzmiYDmnInku6PnoIHlhajpg6jlvIDmupDvvIzlubbkuJTkuI3lrZjlnKjkuIrkvKDnlKjmiLfkv6Hmga/nmoTooYzkuLpcbuacrOinhOWImeS4uuWtpuS5oOebrueahO+8jOivt+S6juWvvOWFpTI05bCP5pe25YaF5Yig6Zmk77yB77yB77yBICAgICAgICAgICAgICAgICAgICAgICAgXG7lvIDlp4vkvb/nlKjmnKzop4TliJnljbPku6PooajpgbXlrojop4TliJkgICAgICAgICAgICAgICAgICAgICAgIFxuICAgICAgICAgICAgYCxcbiAgICAgICAgXCJjb2xfdHlwZVwiOiBcImxvbmdfdGV4dFwiLFxuICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgaWQ6IFwidGV4dFwiXG4gICAgICAgIH1cbiAgICB9LCB7XG4gICAgICAgIHRpdGxlOiB0aW1lICsgXCLnp5LlkI7nu6fnu61cIixcbiAgICAgICAgY29sX3R5cGU6IFwidGV4dF8xXCIsXG4gICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICBpZDogXCJ0aW1lclwiXG4gICAgICAgIH1cbiAgICB9KVxuICAgIHNldFJlc3VsdChhKVxuICAgIHdoaWxlICh0aW1lICE9IDApIHtcbiAgICAgICAgamF2YS5sYW5nLlRocmVhZC5zbGVlcCgxMDAwKVxuICAgICAgICB0aW1lIC09IDFcbiAgICAgICAgdXBkYXRlSXRlbShcInRpbWVyXCIsIHtcbiAgICAgICAgICAgIHRpdGxlOiB0aW1lICsgXCLnp5LlkI7nu6fnu61cIlxuICAgICAgICB9KVxuICAgIH1cbiAgICBhZGRJdGVtQWZ0ZXIoXCJ0aW1lclwiLCB7XG4gICAgICAgIHRpdGxlOiBcIumAieaLqeWFtuS7luW3sueZu+W9lei0puWPt1wiLFxuICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKCkgPT4ge1xuICAgICAgICAgICAgdXNlckxpc3QgPSBKU09OLnBhcnNlKHJlcXVlc3QoXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XCIpKS51c2VyTGlzdC5tYXAoKHApID0+IHsgcmV0dXJuIHAudXNlck5hbWUgfSk7XG4gICAgICAgICAgICByZXR1cm4gJCh1c2VyTGlzdCwgMSkuc2VsZWN0KCgpID0+IHtcbiAgICAgICAgICAgICAgICBzZXR0aW5nID0gSlNPTi5wYXJzZShyZXF1ZXN0KFwiaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS9iaWxpLnR4dFwiKSk7XG4gICAgICAgICAgICAgICAgdGVtcCA9IHNldHRpbmcudXNlckxpc3RbMF07XG4gICAgICAgICAgICAgICAgc2V0dGluZy51c2VyTGlzdC5tYXAoKHApID0+IHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHAudXNlck5hbWUgPT09IGlucHV0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzZXR0aW5nLnVzZXJMaXN0WzBdID0gcDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHAgPSB0ZW1wO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICBzYXZlRmlsZShcImhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvYmlsaS50eHRcIiwgSlNPTi5zdHJpbmdpZnkoc2V0dGluZykpO1xuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xuICAgICAgICAgICAgICAgIHJldHVybiBcInRvYXN0Oi8v5YiH5o2i5oiQ5YqfXCI7XG4gICAgICAgICAgICB9KVxuICAgICAgICB9KSxcbiAgICAgICAgY29sX3R5cGU6IFwidGV4dF9jZW50ZXJfMVwiXG4gICAgfSlcbiAgICBhZGRJdGVtQWZ0ZXIoXCJ0aW1lclwiLCB7XG4gICAgICAgIHRpdGxlOiBcIueZu+mZhlwiLFxuICAgICAgICBkZXNjOiBcIueZu+W9leWkseaViO+8n+eCueatpOmHjeaWsOeZu+W9lVwiLFxuICAgICAgICB1cmw6IFwiaGlrZXI6Ly9wYWdlL2xvZ2luI25vUmVjb3JkSGlzdG9yeSNcIixcbiAgICAgICAgY29sX3R5cGU6IFwidGV4dF9jZW50ZXJfMVwiXG4gICAgfSlcbiAgICBkZWxldGVJdGVtKFwidGV4dFwiKVxuICAgIGRlbGV0ZUl0ZW0oXCJ0aW1lclwiKVxufVxuc2V0UmVzdWx0KGQpO1xuIiwic2VhcmNoX3VybCI6Imhpa2VyOi8vZW1wdHkjIyoqIyNmeXBhZ2UiLCJncm91cCI6IuKR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cIjtcbiAgICAgICAgfWVsc2V7XG4gICAgICAgICAgICDlsIHpnaIgPSBpdGVtLmNvdmVyKyBcIkBSZWZlcmVyPVwiO1xuICAgICAgICB9XG4gICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTogaXRlbS50aXRsZS5yZXBsYWNlKC88ZW0gY2xhc3M9XCJrZXl3b3JkXCI+L2csICcnKS5yZXBsYWNlKC88XFwvZW0+L2csICcnKSxcbiAgICAgICAgICAgIGltZzog5bCB6Z2iLFxuICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL2ZpbG1lcmppI2ltbWVyc2l2ZVRoZW1lIycsXG4gICAgICAgICAgICBjb250ZW50OiBpdGVtLmRlc2MsXG4gICAgICAgICAgICBkZXNjOiBpdGVtLnN0eWxlcyxcbiAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgc2Vhc29uX2lkOiBpdGVtLnNlYXNvbl9pZFxuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICB9KTtcbn1cbmlmIChsaXN0Mikge1xuICAgIGxpc3QyLmZvckVhY2goaXRlbSA9PiB7XG4gICAgICAgIGlmICghaXRlbS5jb3Zlci5tYXRjaCgvaHR0cHMvKSkge1xuICAgICAgICAgICAg5bCB6Z2iID0gaXRlbS5jb3Zlci5yZXBsYWNlKCdodHRwJywnaHR0cHMnKSArIFwiQFJlZmVyZXI9XCI7XG4gICAgICAgIH1lbHNle1xuICAgICAgICAgICAg5bCB6Z2iID0gaXRlbS5jb3ZlcisgXCJAUmVmZXJlcj1cIjtcbiAgICAgICAgfVxuICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgdGl0bGU6IGl0ZW0udGl0bGUucmVwbGFjZSgvPGVtIGNsYXNzPVwia2V5d29yZFwiPi9nLCAnJykucmVwbGFjZSgvPFxcL2VtPi9nLCAnJyksXG4gICAgICAgICAgICBpbWc6IOWwgemdoixcbiAgICAgICAgICAgIHVybDogJ2hpa2VyO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vc2VyU2V0dGluZyk7XG4gICAgICAgICAgICBjb29raWUgPSBvcmlnaW5Vc2VyU2V0dGluZy5jb29raWU7XG4gICAgICAgICAgICB1c2VyTmFtZSA9IG9yaWdpblVzZXJTZXR0aW5nLnVzZXJOYW1lO1xuICAgICAgICAgICAgdXNlck1pZCA9IG9yaWdpblVzZXJTZXR0aW5nLnVzZXJNaWQ7XG4gICAgICAgICAgICBmYWNlID0gb3JpZ2luVXNlclNldHRpbmcuZmFjZTtcbiAgICAgICAgICAgIHZpcFN0YXR1cyA9IG9yaWdpblVzZXJTZXR0aW5nLnZpcFN0YXR1cztcbiAgICAgICAgICAgIGlmKGNvb2tpZT09PXVuZGVmaW5lZCl7c2V0dGluZz0ne1widXNlckxpc3RcIjpbXSxcImJmS2V5XCI6XCJcIn0nO31lbHNle1xuICAgICAgICAgICAgICAgIHNldHRpbmcgPSBKU09OLnN0cmluZ2lmeSh7XG4gICAgICAgICAgICAgICAgICAgIHVzZXJMaXN0OiBbe1xuICAgICAgICAgICAgICAgICAgICAgICAgY29va2llOiBjb29raWUsXG4gICAgICAgICAgICAgICAgICAgICAgICB1c2VyTmFtZTogdXNlck5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICB1c2VyTWlkOiB1c2VyTWlkLFxuICAgICAgICAgICAgICAgICAgICAgICAgZmFjZTogZmFjZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZpcFN0YXR1czogdmlwU3RhdHVzXG4gICAgICAgICAgICAgICAgICAgIH1dLFxuICAgICAgICAgICAgICAgICAgICBiZktleTogXCJcIlxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICBsb2coXCLmsqHmnInml6fnmoTlkIjms5XnmoTphY3nva7mlofku7ZcIik7XG4gICAgICAgICAgICBzZXR0aW5nID0gSlNPTi5zdHJpbmdpZnkoe1xuICAgICAgICAgICAgICAgIHVzZXJMaXN0OiBbXSxcbi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WJpbGkuY29tL2d1b2NodWFuZy9pbmRleCcpO1xcbiAgICAgICAgICAgICAgICDliIbnsbvliJfooaggPSBwZGZhKGh0bWwsICcuZmlsdGVyLWxpc3QmJi5maWx0ZXItYmxvY2snKTtcXG4gICAgICAgICAgICAgICAg5YiG57G75YiX6KGoLmZvckVhY2godWwgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAg562b6YCJ5p2h5Lu2ID0gcGRmaCh1bCwgJy5maWx0ZXItbmFtZSYmVGV4dCcpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoID0gcGRmYSh1bCwgJ3VsJiZsaScpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoLmZvckVhY2gobGkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwZGZoKGxpLCAnbGkmJlRleHQnKSA9PSAn5YW25LuWJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcijnrZvpgInmnaHku7YsICflhajpg6gnKSA9PSBwZGZoKGxpLCAnbGkmJlRleHQnKSA/ICfigJzigJzigJ3igJ08Yj48Zm9udCBjb2xvcj0jMWFhZDE5PicgKyBwZGZoKGxpLCAnbGkmJlRleHQnKSArICc8L2ZvbnQ+PC9iPicgOiBwZGZoKGxpLCAnbGkmJlRleHQnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChsaSwg562b6YCJ5p2h5Lu2KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcijnrZvpgInmnaHku7YsIHBkZmgobGksICdsaSYmVGV4dCcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgbGksIOetm+mAieadoeS7tiksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn55S16KeGJzpcXG4gICAgICAgIHNlYXNvblR5cGUgPSA1O1xcbiAgICAgICAgaWYgKGdldE15VmFyKCfmipjlj6AnLCAn5YWzJykgPT0gJ+W8gCcpIHtcXG4gICAgICAgICAgICBpZiAocGFnZSA9PSAxKSB7XFxuICAgICAgICAgICAgICAgIGh0bWwgPSBmZXRjaCgnaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tL3R2L2luZGV4Jyk7XFxuICAgICAgICAgICAgICAgIOWIhuexu+WIl+ihqCA9IHBkZmEoaHRtbCwgJy5maWx0ZXItbGlzdCYmLmZpbHRlci1ibG9jaycpO1xcbiAgICAgICAgICAgICAgICDliIbnsbvliJfooaguZm9yRWFjaCh1bCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICDnrZvpgInmnaHku7YgPSBwZGZoKHVsLCAnLmZpbHRlci1uYW1lJiZUZXh0Jyk7XFxuICAgICAgICAgICAgICAgICAgICDlrZDliIbnsbvliJfooaggPSBwZGZhKHVsLCAndWwmJmxpJyk7XFxuICAgICAgICAgICAgICAgICAgICDlrZDliIbnsbvliJfooaguZm9yRWFjaChsaSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBkZmgobGksICdsaSYmVGV4dCcpID09ICflhbbku5YnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldE15VmFyKOetm+mAieadoeS7tiwgJ+WFqOmDqCcpID09IHBkZmgobGksICdsaSYmVGV4dCcpID8gJ+KAnOKAnOKAneKAnTxiPjxmb250IGNvbG9yPSMxYWFkMTk+JyArIHBkZmgobGksICdsaSYmVGV4dCcpICsgJzwvZm9udD48L2I+JyA6IHBkZmgobGksICdsaSYmVGV4dCcpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGxpLCDnrZvpgInmnaHku7YpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKOetm+mAieadoeS7tiwgcGRmaChsaSwgJ2xpJiZUZXh0JykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBsaSwg562b6YCJ5p2h5Lu2KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdibGFua19ibG9jaydcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfnuqrlvZXniYcnOlxcbiAgICAgICAgc2Vhc29uVHlwZSA9IDM7XFxuICAgICAgICBpZiAoZ2V0TXlWYXIoJ+aKmOWPoCcsICflhbMnKSA9PSAn5byAJykge1xcbiAgICAgICAgICAgIGlmIChwYWdlID09IDEpIHtcXG4gICAgICAgICAgICAgICAgaHRtbCA9IGZldGNoKCdodHRwczovL3d3dy5iaWxpYmlsaS5jb20vZG9jdW1lbnRhcnkvaW5kZXgvJyk7XFxuICAgICAgICAgICAgICAgIOWIhuexu+WIl+ihqCA9IHBkZmEoaHRtbCwgJy5maWx0ZXItbGlzdCYmLmZpbHRlci1ibG9jaycpO1xcbiAgICAgICAgICAgICAgICDliIbnsbvliJfooaguZm9yRWFjaCh1bCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICDnrZvpgInmnaHku7YgPSBwZGZoKHVsLCAnLmZpbHRlci1uYW1lJiZUZXh0Jyk7XFxuICAgICAgICAgICAgICAgICAgICDlrZDliIbnsbvliJfooaggPSBwZGZhKHVsLCAndWwmJmxpJyk7XFxuICAgICAgICAgICAgICAgICAgICDlrZDliIbnsbvliJfooaguZm9yRWFjaChsaSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBkZmgobGksICdsaSYmVGV4dCcpID09ICflhbbku5YnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldE15VmFyKOetm+mAieadoeS7tiwgJ+WFqOmDqCcpID09IHBkZmgobGksICdsaSYmVGV4dCcpID8gJ+KAnOKAnOKAneKAnTxiPjxmb250IGNvbG9yPSMxYWFkMTk+JyArIHBkZmgobGksICdsaSYmVGV4dCcpICsgJzwvZm9udD48L2I+JyA6IHBkZmgobGksICdsaSYmVGV4dCcpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGxpLCDnrZvpgInmnaHku7YpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKOetm+mAieadoeS7tiwgcGRmaChsaSwgJ2xpJiZUZXh0JykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBsaSwg562b6YCJ5p2h5Lu2KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdibGFua19ibG9jaydcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfnu7zoibonOlxcbiAgICAgICAgc2Vhc29uVHlwZSA9IDc7XFxuICAgICAgICBpZiAoZ2V0TXlWYXIoJ+aKmOWPoCcsICflhbMnKSA9PSAn5byAJykge1xcbiAgICAgICAgICAgIGlmIChwYWdlID09IDEpIHtcXG4gICAgICAgICAgICAgICAgaHRtbCA9IGZldGNoKCdodHRwczovL3d3dy5iaWxpYmlsaS5jb20vdmFyaWV0eS9pbmRleCcpO1xcbiAgICAgICAgICAgICAgICDliIbnsbvliJfooaggPSBwZGZhKGh0bWwsICcuZmlsdGVyLWxpc3QmJi5maWx0ZXItYmxvY2snKTtcXG4gICAgICAgICAgICAgICAg5YiG57G75YiX6KGoLmZvckVhY2godWwgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAg562b6YCJ5p2h5Lu2ID0gcGRmaCh1bCwgJy5maWx0ZXItbmFtZSYmVGV4dCcpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoID0gcGRmYSh1bCwgJ3VsJiZsaScpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoLmZvckVhY2gobGkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwZGZoKGxpLCAnbGkmJlRleHQnKSA9PSAn5YW25LuWJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcijnrZvpgInmnaHku7YsICflhajpg6gnKSA9PSBwZGZoKGxpLCAnbGkmJlRleHQnKSA/ICfigJzigJzigJ3igJ08Yj48Zm9udCBjb2xvcj0jMWFhZDE5PicgKyBwZGZoKGxpLCAnbGkmJlRleHQnKSArICc8L2ZvbnQ+PC9iPicgOiBwZGZoKGxpLCAnbGkmJlRleHQnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChsaSwg562b6YCJ5p2h5Lu2KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcijnrZvpgInmnaHku7YsIHBkZmgobGksICdsaSYmVGV4dCcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgbGksIOetm+mAieadoeS7tiksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn55Wq5YmnJzpcXG4gICAgICAgIHNlYXNvblR5cGUgPSAxO1xcbiAgICAgICAgaWYgKGdldE15VmFyKCfmipjlj6AnLCAn5YWzJykgPT0gJ+W8gCcpIHtcXG4gICAgICAgICAgICBpZiAocGFnZSA9PSAxKSB7XFxuICAgICAgICAgICAgICAgIGh0bWwgPSBmZXRjaCgnaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tL2FuaW1lL2luZGV4Jyk7XFxuICAgICAgICAgICAgICAgIOWIhuexu+WIl+ihqCA9IHBkZmEoaHRtbCwgJy5maWx0ZXItbGlzdCYmLmZpbHRlci1ibG9jaycpO1xcbiAgICAgICAgICAgICAgICDliIbnsbvliJfooaguZm9yRWFjaCh1bCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICDnrZvpgInmnaHku7YgPSBwZGZoKHVsLCAnLmZpbHRlci1uYW1lJiZUZXh0Jyk7XFxuICAgICAgICAgICAgICAgICAgICDlrZDliIbnsbvliJfooaggPSBwZGZhKHVsLCAndWwmJmxpJyk7XFxuICAgICAgICAgICAgICAgICAgICDlrZDliIbnsbvliJfooaguZm9yRWFjaChsaSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBkZmgobGksICdsaSYmVGV4dCcpID09ICflhbbku5YnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldE15VmFyKOetm+mAieadoeS7tiwgJ+WFqOmDqCcpID09IHBkZmgobGksICdsaSYmVGV4dCcpID8gJ+KAnOKAnOKAneKAnTxiPjxmb250IGNvbG9yPSMxYWFkMTk+JyArIHBkZmgobGksICdsaSYmVGV4dCcpICsgJzwvZm9udD48L2I+JyA6IHBkZmgobGksICdsaSYmVGV4dCcpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGxpLCDnrZvpgInmnaHku7YpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKOetm+mAieadoeS7tiwgcGRmaChsaSwgJ2xpJiZUZXh0JykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBsaSwg562b6YCJ5p2h5Lu2KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdibGFua19ibG9jaydcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfnlLXlvbEnOlxcbiAgICAgICAgc2Vhc29uVHlwZSA9IDI7XFxuICAgICAgICBpZiAoZ2V0TXlWYXIoJ+aKmOWPoCcsICflhbMnKSA9PSAn5byAJykge1xcbiAgICAgICAgICAgIGlmIChwYWdlID09IDEpIHtcXG4gICAgICAgICAgICAgICAgaHRtbCA9IGZldGNoKCdodHRwczovL3d3dy5iaWxpYmlsaS5jb20vbW92aWUvaW5kZXgnKTtcXG4gICAgICAgICAgICAgICAg5YiG57G75YiX6KGoID0gcGRmYShodG1sLCAnLmZpbHRlci1saXN0JiYuZmlsdGVyLWJsb2NrJyk7XFxuICAgICAgICAgICAgICAgIOWIhuexu+WIl+ihqC5mb3JFYWNoKHVsID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIOetm+mAieadoeS7tiA9IHBkZmgodWwsICcuZmlsdGVyLW5hbWUmJlRleHQnKTtcXG4gICAgICAgICAgICAgICAgICAgIOWtkOWIhuexu+WIl+ihqCA9IHBkZmEodWwsICd1bCYmbGknKTtcXG4gICAgICAgICAgICAgICAgICAgIOWtkOWIhuexu+WIl+ihqC5mb3JFYWNoKGxpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocGRmaChsaSwgJ2xpJiZUZXh0JykgPT0gJ+WFtuS7licpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogZ2V0TXlWYXIo562b6YCJ5p2h5Lu2LCAn5YWo6YOoJykgPT0gcGRmaChsaSwgJ2xpJiZUZXh0JykgPyAn4oCc4oCc4oCd4oCdPGI+PGZvbnQgY29sb3I9IzFhYWQxOT4nICsgcGRmaChsaSwgJ2xpJiZUZXh0JykgKyAnPC9mb250PjwvYj4nIDogcGRmaChsaSwgJ2xpJiZUZXh0JyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgobGksIOetm+mAieadoeS7tikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIo562b6YCJ5p2h5Lu2LCBwZGZoKGxpLCAnbGkmJlRleHQnKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIGxpLCDnrZvpgInmnaHku7YpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2JsYW5rX2Jsb2NrJ1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgYnJlYWs7XFxuICAgIGRlZmF1bHQ6XFxuICAgICAgICBzZWFzb25UeXBlID0gNDtcXG4gICAgICAgIGlmIChnZXRNeVZhcign5oqY5Y+gJywgJ+WFsycpID09ICflvIAnKSB7XFxuICAgICAgICAgICAgaWYgKHBhZ2UgPT0gMSkge1xcbiAgICAgICAgICAgICAgICBodG1sID0gZmV0Y2goJ2h0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS9hbmltZS9pbmRleCcpO1xcbiAgICAgICAgICAgICAgICDliIbnsbvliJfooaggPSBwZGZhKGh0bWwsICcuZmlsdGVyLWxpc3QmJi5maWx0ZXItYmxvY2snKTtcXG4gICAgICAgICAgICAgICAg5YiG57G75YiX6KGoLmZvckVhY2godWwgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAg562b6YCJ5p2h5Lu2ID0gcGRmaCh1bCwgJy5maWx0ZXItbmFtZSYmVGV4dCcpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoID0gcGRmYSh1bCwgJ3VsJiZsaScpO1xcbiAgICAgICAgICAgICAgICAgICAg5a2Q5YiG57G75YiX6KGoLmZvckVhY2gobGkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwZGZoKGxpLCAnbGkmJlRleHQnKSA9PSAn5YW25LuWJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcijnrZvpgInmnaHku7YsICflhajpg6gnKSA9PSBwZGZoKGxpLCAnbGkmJlRleHQnKSA/ICfigJzigJzigJ3igJ08Yj48Zm9udCBjb2xvcj0jMWFhZDE5PicgKyBwZGZoKGxpLCAnbGkmJlRleHQnKSArICc8L2ZvbnQ+PC9iPicgOiBwZGZoKGxpLCAnbGkmJlRleHQnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChsaSwg562b6YCJ5p2h5Lu2KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcijnrZvpgInmnaHku7YsIHBkZmgobGksICdsaSYmVGV4dCcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgbGksIOetm+mAieadoeS7tiksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBicmVhaztcXG59XFxuLy8g5a2Q5YiG57G75Y+C5pWw5pig5bCEXFxuc3dpdGNoIChnZXRNeVZhcign57G75Z6LJywgJ+WFqOmDqCcpKSB7XFxuICAgIGNhc2UgJ+ato+eJhyc6XFxuICAgICAgICBzZWFzb25fdmVyc2lvbiA9IDE7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn55S15b2xJzpcXG4gICAgICAgIHNlYXNvbl92ZXJzaW9uID0gMjtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICflhbbku5YnOlxcbiAgICAgICAgc2Vhc29uX3ZlcnNpb24gPSAzO1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGRlZmF1bHQ6XFxuICAgICAgICBzZWFzb25fdmVyc2lvbiA9IC0xO1xcbiAgICAgICAgYnJlYWs7XFxufVxcbnN3aXRjaCAoZ2V0TXlWYXIoJ+mFjemfsycsICflhajpg6gnKSkge1xcbiAgICBjYXNlICfljp/lo7AnOlxcbiAgICAgICAgc3Bva2VuX2xhbmd1YWdlX3R5cGUgPSAxO1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgJ+S4reaWh+mFjemfsyc6XFxuICAgICAgICBzcG9rZW5fbGFuZ3VhZ2VfdHlwZSA9IDI7XFxuICAgICAgICBicmVhaztcXG4gICAgZGVmYXVsdDpcXG4gICAgICAgIHNwb2tlbl9sYW5ndWFnZV90eXBlID0gLTE7XFxuICAgICAgICBicmVhaztcXG59XFxuc3dpdGNoIChnZXRNeVZhcign5Zyw5Yy6JywgJ+WFqOmDqCcpKSB7XFxuICAgIGNhc2UgJ+S4reWbveWkp+mZhic6XFxuICAgICAgICBhcmVhID0gMTtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfml6XmnKwnOlxcbiAgICAgICAgYXJlYSA9IDI7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn576O5Zu9JzpcXG4gICAgICAgIGFyZWEgPSAzO1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgJ+iLseWbvSc6XFxuICAgICAgICBhcmVhID0gNDtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfkuK3lm73muK/lj7AnOlxcbiAgICAgICAgYXJlYSA9IFs2LCA3XTtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfpn6nlm70nOlxcbiAgICAgICAgYXJlYSA9IDg7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn5rOV5Zu9JzpcXG4gICAgICAgIGFyZWEgPSA5O1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgJ+azsOWbvSc6XFxuICAgICAgICBhcmVhID0gMTA7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAn6KW/54+t54mZJzpcXG4gICAgICAgIGFyZWEgPSAxMztcXG4gICAgICAgIGJyZWF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OaciCc6XFxuICAgICAgICBzZWFzb25fbW9udGggPSA0O1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgJzfmnIgnOlxcbiAgICAgICAgc2Vhc29uX21vbnRoID0gNztcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICcxMOaciCc6XFxuICAgICAgICBzZWFzb25fbW9udGggPSAxMDtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBkZWZhdWx0OlxcbiAgICAgICAgc2Vhc29uX21vbnRoID0gLTE7XFxuICAgICAgICBicmVhaztcXG59XFxuLy8g5Yik5pat5ZKM5pig5bCE5bm05Lu9XFxuc3dpdGNoIChnZXRNeVZhcign5aSn57G7JywgJ+WbveWImycpKSB7XFxuICAgIGNhc2UgJ+WbveWImyc6XFxuICAgIGNhc2UgJ+eVquWJpyc6XFxuICAgICAgICAvLyDnlarliaflkozlm73liJvjgJDkuZ/mmK/lj6vlgZrlubTku73kvYblj4LmlbDlkI3jgIHmoLzlvI/lkozlhbbku5bliIbnsbvkuI3kuIDmoLfjgJFcXG4gICAgICAgIGFuaW1lX3llYXIgPSBnZXRNeVZhcign5bm05Lu9JywgJ+WFqOmDqCcpO1xcbiAgICAgICAgc3dpdGNoIChhbmltZV95ZWFyLmluY2x1ZGVzKCctJykpIHtcXG4gICAgICAgICAgICBjYXNlIHRydWU6XFxuICAgICAgICAgICAgICAgIGVhcmx5ID0gYW5pbWVfeWVhci5zcGxpdCgnLScpWzFdO1xcbiAgICAgICAgICAgICAgICBsYXRlciA9IGFuaW1lX3llYXIuc3BsaXQoJy0nKVswXTtcXG4gICAgICAgICAgICAgICAgeWVhciA9IGBbJHtlYXJseX0sJHtOdW1iZXIobGF0ZXIpICsgMX0pYDtcXG4gICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgY2FzZSBmYWxzZTpcXG4gICAgICAgICAgICAgICAgc3dpdGNoIChhbmltZV95ZWFyKSB7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICc5MOW5tOS7oyc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgeWVhciA9ICdbMTk5MCwyMDAwKSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICc4MOW5tOS7oyc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgeWVhciA9ICdbMTk4MCwxOTkwKSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICfmm7Tml6knOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHllYXIgPSAnWywxOTgwKSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICflhajpg6gnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHllYXIgPSAtMTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgeWVhciA9IGBbJHthbmltZV95ZWFyfSwke051bWJlcihhbmltZV95ZWFyKSArIDF9KWA7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgZGVmYXVsdDpcXG4gICAgICAgIC8vIOmZpOS6hueVquWJp+WSjOWbveWIm+eahOWFtuS7luWIhuexu1xcbiAgICAgICAgdHZfeWVhciA9IGdldE15VmFyKCflubTku70nLCAn5YWo6YOoJyk7XFxuICAgICAgICBzd2l0Y2ggKHR2X3llYXIuaW5jbHVkZXMoJy0nKSkge1xcbiAgICAgICAgICAgIGNhc2UgdHJ1ZTpcXG4gICAgICAgICAgICAgICAgZWFybHkgPSB0dl95ZWFyLnNwbGl0KCctJylbMV07XFxuICAgICAgICAgICAgICAgIGxhdGVyID0gdHZfeWVhci5zcGxpdCgnLScpWzBdO1xcbiAgICAgICAgICAgICAgICByZWxlYXNlX2RhdGUgPSBgWyR7ZWFybHl9LTAxLTAxIDAwOjAwOjAwLCR7TnVtYmVyKGxhdGVyKSArIDF9LTAxLTAxIDAwOjAwOjAwKWBcXG4gICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgY2FzZSBmYWxzZTpcXG4gICAgICAgICAgICAgICAgc3dpdGNoICh0dl95ZWFyKSB7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlICc5MOW5tOS7oyc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVsZWFzZV9kYXRlID0gJ1sxOTkwLTAxLTAxIDAwOjAwOjAwLDIwMDAtMDEtMDEgMDA6MDA6MDApJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnODDlubTku6MnOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlbGVhc2VfZGF0ZSA9ICdbMTk4MC0wMS0wMSAwMDowMDowMCwxOTkwLTAxLTAxIDAwOjAwOjAwKSdcXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ+abtOaXqSc6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVsZWFzZV9kYXRlID0gJ1ssMTk4MC0wMS0wMSAwMDowMDowMCknO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAn5YWo6YOoJzpcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWxlYXNlX2RhdGUgPSAtMTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVsZWFzZV9kYXRlID0gYFske3R2X3llYXJ9LTAxLTAxIDAwOjAwOjAwLCR7TnVtYmVyKHR2X3llYXIpICsgMX0tMDEtMDEgMDA6MDA6MDApYDtcXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbn1cXG5zd2l0Y2ggKGdldE15VmFyKCfpo47moLwnLCAn5YWo6YOoJykpIHtcXG4gICAgY2FzZSAn55S15b2xJzpcXG4gICAgICAgIHN0eWxlX2lkID0gLTEwO1xcbiAgICAgICAgYnJlYWs7XFxuICAgIC8vIOeVquWJp+agj+ebrlxcbiAgICBjYXNlICfljp/liJsnOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxMDtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfmvKvnlLvmlLknOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxMTtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICflsI/or7TmlLknOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxMjtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfmuLjmiI/mlLknOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxMztcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfnibnmkYQnOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxNDtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfluIPooovmiI8nOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxNTtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfng63ooYAnOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxNjtcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICfnqb/otoonOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxNztcXG4gICAgICAgIGJyZWFrO1xcbiAgICBjYXNlICflpYflubsnOlxcbiAgICAgICAgc3R5bGVfaWQgPSAxMDAxODtcXG4gICAgICAgIGJyZWFrO1xcbiAgICAvLyDlkovot7PkuobkuIDkuKrmjY9+XFxuICAgIGNhc2UgJ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XRsZSgn6LSm5Y+355m75b2V6aG16Z2iJylcXG5kLnB1c2goe1xcbiAgICB0aXRsZTogJ2Nvb2tpZeeZu+W9lScsXFxuICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICByZXR1cm4gJCgnJywgJ+ivt+i+k+WFpeS9oOeahGNvb2tpZScpLmlucHV0KCgpID0+IHtcXG4gICAgICAgICAgICBpZiAoaW5wdXQgPT0gXFxcIlxcXCIpIHJldHVybiBcXFwidG9hc3Q6Ly9jb29raWXkuI3og73kuLrnqbpcXFwiO1xcbiAgICAgICAgICAgIGxldCB1c2VyaW5mbyA9IEpTT04ucGFyc2UoZmV0Y2goXFxcImh0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3dlYi1pbnRlcmZhY2UvbmF2XFxcIiwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogaW5wdXRcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pKS5kYXRhO1xcbiAgICAgICAgICAgIGlmICh1c2VyaW5mby5pc0xvZ2luID09PSBmYWxzZSkgcmV0dXJuIFxcXCJ0b2FzdDovL+S9oOeahGNvb2tpZeiyjOS8vOWkseaViOS6huWWlH5cXFwiO1xcbiAgICAgICAgICAgIHVzZXJJbmZvID0ge1xcbiAgICAgICAgICAgICAgICBjb29raWU6IGlucHV0LFxcbiAgICAgICAgICAgICAgICB1c2VyTmFtZTogdXNlcmluZm8udW5hbWUsXFxuICAgICAgICAgICAgICAgIHVzZXJNaWQ6ICB1c2VyaW5mby5taWQsXFxuICAgICAgICAgICAgICAgIHZpcFN0YXR1czogdXNlcmluZm8udmlwU3RhdHVzLFxcbiAgICAgICAgICAgICAgICBmYWNlOiB1c2VyaW5mby5mYWNlICsgXFxcIkBSZWZlcmVyPVxcXCJcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgc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FxcbiAgICAgICAgY29va2llID0gZ2V0VmFyKCdiaWxpQ29va2llJywnJyk7XFxuICAgICAgICBsb2coXFxcIuiOt+WPluWIsOeahGNvb2tpZTpcXFwiK2Nvb2tpZSk7XFxuICAgICAgICBpZiAoY29va2llID09IFxcXCJcXFwiKSByZXR1cm4gXFxcInRvYXN0Oi8v6I635Y+WY29va2ll5aSx6LSl77yM5YaN562J562J55yL77yfXFxcIjtcXG4gICAgICAgIGxldCB1c2VyaW5mbyA9IEpTT04ucGFyc2UoZmV0Y2goXFxcImh0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3dlYi1pbnRlcmZhY2UvbmF2XFxcIiwge1xcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgXFxcIkNvb2tpZVxcXCI6IGNvb2tpZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pKS5kYXRhO1xcbiAgICAgICAgaWYgKHVzZXJpbmZvLmlzTG9naW4gPT09IGZhbHNlKSByZXR1cm4gXFxcInRvYXN0Oi8v5L2g5YWI55m75b2V77yM5YaN6I635Y+WY29va2ll77yMT0vvvJ9cXFwiO1xcbiAgICAgICAgdXNlckluZm8gPSB7XFxuICAgICAgICAgICAgY29va2llOiBjb29raWUsXFxuICAgICAgICAgICAgdXNlck5hbWU6IHVzZXJpbmZvLnVuYW1lLFxcbiAgICAgICAgICAgIHVzZXJNaWQ6ICB1c2VyaW5mby5taWQsXFxuICAgICAgICAgICAgdmlwU3RhdHVzOiB1c2VyaW5mby52aXBTdGF0dXMsXFxuICAgICAgICAgICAgZmFjZTogdXNlcmluZm8uZmFjZSArIFxcXCJAUmVmZXJlcj1cXFwiXFxuICAgICAgICB9XFxuICAgICAgICBzZXR0aW5nID0gSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIikpO1xcbiAgICAgICAgc2V0dGluZy51c2VyTGlzdC51bnNoaWZ0KHVzZXJJbmZvKTtcXG4gICAgICAgIC8vIOi/h+a7pOaOiWNvb2tpZeS4uuepuueahOWFg+e0oFxcbiAgICAgICAgc2V0dGluZy51c2VyTGlzdCA9IHNldHRpbmcudXNlckxpc3QuZmlsdGVyKHVzZXIgPT4gdXNlci5jb29raWUgIT09ICcnKTtcXG4gICAgICAgIHNhdmVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIiwgSlNPTi5zdHJpbmdpZnkoc2V0dGluZykpO1xcbiAgICAgICAgYmFjayh0cnVlKTtcXG4gICAgICAgIHJldHVybiAndG9hc3Q6Ly/lpoLmnpzmsqHmnInnmbvpmYbmiJDlip/vvIzlu7rorq7kvaDkuIvmrKHnmbvpmYbmiJDlip/lkI7kuI3opoHngrnpgqPkuYjlv6t+J1xcbiAgICB9KSxcXG4gICAgY29sX3R5cGU6ICd0ZXh0XzEnXFxufSwge1xcbiAgICB1cmw6IFxcXCJodHRwczovL20uYmlsaWJpbGkuY29tL1xcXCIsXFxuICAgIGNvbF90eXBlOiBcXFwieDVfd2Vidmlld19zaW5nbGVcXFwiLFxcbiAgICBkZXNjOiBcXFwibGlzdCYmc2NyZWVuLTMwMFxcXCIsXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgdmFyIHRva2VuX3RpbWVyID0gZnVuY3Rpb24gKCkge1xcbiAgICAgICAgICAgICAgICB2YXIgdGltZXIgPSBzZXRJbnRlcnZhbCgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBjb29raWUgPSBmYmEuZ2V0Q29va2llKFxcXCJodHRwczovL20uYmlsaWJpbGkuY29tL1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgZmJhLnB1dFZhcignYmlsaUNvb2tpZScsIGNvb2tpZSk7XFxuICAgICAgICAgICAgICAgIH0sIDEwMClcXG4gICAgICAgICAgICB9O1xcbiAgICAg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CBjaWQsIDExNikucmVwbGFjZSgvOy9nLCBcXFwi77yb77ybXFxcIik7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAvLyDlhbHkuqvkvJrlkZjmkq3mlL7mnYPnm4pcXG4gICAgICAgICAgICBpZiAoYmFkZ2UubWF0Y2goL+S7mOi0uS8pKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkKFsn6a2U5pat6Kej5p6QJywgJ+W3sui0reS5sCddLCAxKS5zZWxlY3QoKGlucHV0LCBhaWQsIGNpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ID09ICfprZTmlq3op6PmnpAnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChmZXRjaCgnaGlrZXI6Ly9maWxlcy9jYWNoZS9QYXJzZV9Ebi5qcycsIHt9KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGF5dG1QYXJzZShsaW5rKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmJpbGlMYXp5KGFpZCwgY2lkLCAxMTYpLnJlcGxhY2UoLzsvZywgXFxcIu+8m++8m1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCBsaW5rLCBhaWQsIGNpZClcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuYmlsaUxhenkoYWlkLCBjaWQsIDExNikucmVwbGFjZSgvOy9nLCBcXFwi77yb77ybXFxcIik7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICB9XFxufSk7XFxudmFyIENvbG9yID0gXFxcIiMxOUI4OURcX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hTwvZm9udD4nLFxcbiAgICBpbWc6IOWwgemdoixcXG4gICAgdXJsOiAkKCkucnVsZSgo566A5LuLKSA9PiB7XFxuICAgICAgICByZXMgPSB7fTtcXG4gICAgICAgIHZhciBkID0gW107XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAn5b2x54mH566A5LuL77yaJyArICdcXFxcblxcXFx0XFxcXHRcXFxcdFxcXFx0XFxcXHRcXFxcdFxcXFx0JyArIOeugOS7iyxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2xvbmdfdGV4dCdcXG4gICAgICAgIH0pO1xcbiAgICAgICAgcmVzLmRhdGEgPSBkO1xcbiAgICAgICAgc2V0SG9tZVJlc3VsdChyZXMpO1xcbiAgICB9LCDnroDku4spLFxcbiAgICBjb2xfdHlwZTogJ21vdmllXzFfdmVydGljYWxfcGljX2JsdXInLFxcbiAgICBleHRyYToge1xcbiAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgIHRpdGxlOiAn6aKE5ZGK44CB6Iqx57Wu5byA5YWzJywganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICBpZiAoZ2V0SXRlbSgncHJldmlld1N3aXRjaCcsICdmb2xkJykgPT0gJ2ZvbGQnKSB7XFxuICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCdwcmV2aWV3U3dpdGNoJywgJ29wZW4nKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+mihOWRiuW3sue7j+WIh+aNouS4uuWxleekun5cXFwiO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgncHJldmlld1N3aXRjaCcsICdmb2xkJyk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/pooTlkYrkuI3lho3lsZXnpLp+XFxcIjtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pLFxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiAnZG3nm5LlrZAnLCBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL3NldHRpbmcjbm9IaXN0b3J5Iz9ydWxlPWRt55uS5a2QJztcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiAn5by55bmV5o6n5Yi2JywganM6ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICBpZiAoZ2V0SXRlbSgnaXNPdmVycmlkZVNhdmUnLCAnZmFsc2UnKSA9PSAndHJ1ZScpIHtcXG4gICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ2lzT3ZlcnJpZGVTYXZlJywgJ2ZhbHNlJyk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5by55bmV5bCG5LiN5Y+XZG3nm5LlrZDlj4LmlbDmjqfliLYnO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgnaXNPdmVycmlkZVNhdmUnLCAndHJ1ZScpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W8ueW5leWwhuWPl+WIsGRt55uS5a2Q5Y+C5pWw5o6n5Yi2JztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9XVxcbiAgICB9XFxufSk7XFxuLy8g5pu05paw5pel5Y6G5qih5Z2XXFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6ICfml6XljoYnLFxcbiAgICBpbWc6IGltZ0xpbmsu5pel5Y6GLFxcbiAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKOi/veWJp+aXpeWOhiwg5pu05paw6L+b5bqmKSA9PiB7XFxuICAgICAgICBpZiAoZ2V0TXlWYXIoJ+aXpeWOhicsICflhbMnKSA9PSAn5byAJykge1xcbiAgICAgICAgICAgIGRlbGV0ZUl0ZW0oJ+i/veWJp+aXpeWOhicpO1xcbiAgICAgICAgICAgIHB1dE15VmFyKCfml6XljoYnLCAn5YWzJyk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGFkZEl0ZW1BZnRlcign5pi+56S65qih5byPJywge1xcbiAgICAgICAgICAgICAgICB0aXRsZTog6L+95Ymn5pel5Y6GLm1hdGNoKC/lroznu5N85pyf5b6FLykgPyDov73liafml6XljoYgOiDov73liafml6XljoYgKyAnPGJyPjxmb250IGNvbG9yPVxcXCJyZWRcXFwiPuabtOaWsOiHsycgKyAo5pu05paw6L+b5bqmLm1hdGNoKC9bXFxcXHU0ZTAwLVxcXFx1OWZhNV0vKSA/IOabtOaWsOi/m+W6piA6ICgn56ysJyArICjmm7TmlrDov5vluqYgPT0gJycgPyAwIDog5pu05paw6L+b5bqmKSArICfor50nKSkgKyAnPC9mb250PicsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwicmljaF90ZXh0XFxcIixcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIGlkOiAn6L+95Ymn5pel5Y6GJ1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgcHV0TXlWYXIoJ+aXpeWOhicsICflvIAnKTtcXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LliIfmjaLml6XljobkuLo6JyArIGdldE15VmFyKCfml6XljoYnLCAn5byAJylcXG4gICAgfSwg6L+95Ymn5pel5Y6GLCDmm7TmlrDov5vluqYpLFxcbiAgICBj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knKS5ydWxlKCgpID0+IHtcXG4gICAgICAgICAgICB2YXIgZCA9IFtdO1xcbiAgICAgICAgICAgIExpc3QgPSBKU09OLnBhcnNlKGdldE15VmFyKCdEYXRhJykpLmVwaXNvZGVzO1xcbiAgICAgICAgICAgIExpc3QuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnNoYXJlX2NvcHkgKyAnPGZvbnQgY29sb3I9XFxcIiMzM2NjY2NcXFwiPlxcdOKerjwvZm9udD4nLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBpdGVtLmNvdmVyICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvQ29tbWVudHM/cD1meXBhZ2UnLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiaWRcXFwiOiBpdGVtLmFpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwidHlwZVxcXCI6IDFcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICAgICAgfSk7XFxuICAgIH0pLFxcbiAgICBjb2xfdHlwZTogJ2ljb25fNSdcXG59KTtcXG5cXG4vLyDnsr7lvannu6fnu63mqKHlnZdcXG5kLnB1c2goe1xcbiAgICB0aXRsZTogJ+WRqOi+uScsXFxuICAgIGltZzogaW1nTGluay7lkajovrksXFxuICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICBEYXRhID0gSlNPTi5wYXJzZShnZXRNeVZhcignRGF0YScpKTtcXG4gICAgICAgIC8vIOacieS6m+ayoeacieebtOaOpeWOu+aOieaHkuW+l+WkhOeQhn5cXG4gICAgICAgIGlmIChEYXRhLnNlY3Rpb24pIHtcXG4gICAgICAgICAgICDlkajovrnmlbDnu4QgPSBbXFxcIvCfj7fvuI/nm7jlhbPns7vliJdcXFwiLCBcXFwi8J+ko1BWJuiKsee1rlxcXCIsIFxcXCLwn42J56uW5bGP5Lmf57K+5b2pXFxcIiwgXFxcIvCflKXnsr7lvankuozliJtcXFwiXTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAg5ZGo6L655pWw57uEID0gW1xcXCLwn4+377iP55u45YWz57O75YiXXFxcIl07XFxuICAgICAgICB9XFxuICAgICAgICAvLyDlkajovrnmlbDnu4QgPSBbXFxcIvCfj7fvuI/nm7jlhbPns7vliJdcXFwiLCBcXFwi8J+ko1BWJuiKsee1rlxcXCIsIFxcXCLnq5blsY/kuZ/nsr7lvalcXFwiLCBcXFwi57K+5b2p5LqM5YibXFxcIl07XFxuICAgICAgICByZXR1cm4gJCjlkajovrnmlbDnu4QsIDEsICfhg6bnsr7lvannu6fnu60nKS5zZWxlY3QoKCkgPT4ge1xcbiAgICAgICAgICAgIERhdGEgPSBKU09OLnBhcnNlKGdldE15VmFyKCdEYXRhJykpO1xcbiAgICAgICAgICAgIGxhenkgPSBnZXRNeVZhcignbGF6eScpO1xcbiAgICAgICAgICAgIGlmIChpbnB1dCA9PT0gJ/Cfj7fvuI/nm7jlhbPns7vliJcnKSB7XFxuICAgICAgICAgICAgICAgIOezu+WIl+WQjeensCA9IERhdGEuc2Vhc29uX3RpdGxlXFxuICAgICAgICAgICAgICAgIOezu+WIl+aVsOaNriA9IERhdGEuc2Vhc29ucztcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQoKS5ydWxlKCjns7vliJfmlbDmja4pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGQgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgIHNldFBhZ2VUaXRsZSgn8J+Pt++4j+ebuOWFs+ezu+WIlycpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKOezu+WIl+aVsOaNriA9PSBbXSB8fCDns7vliJfmlbDmja4gPT0gJycpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+KAmOKAmOKAmeKAmTxiaWc+PGZvbnQgY29sb3I9XFxcInJlZFxcXCI+4q2Q6K+l5b2x54mH5rKh5pyJ55u45YWz57O75YiX5ZOmfuKtkDwvZm9udD48L2JpZz4nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICd0b2FzdDovL+mDveayoeacie+8jO+8jOS9oOeCueWVpeWRgH4nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn5pWs6K+35pyf5b6FficsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIOezu+WIl+aVsOaNri5mb3JFYWNoKGxpc3QgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0LnNlYXNvbl90aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiAobGlzdC5ob3Jpem9udGFsX2NvdmVyXzE2MTAgPT0gJycgPyAobGlzdC5ob3Jpem9udGFsX2NvdmVyXzE2OSA9PSAnJyA/IGxpc3QuY292ZXIgOiBsaXN0Lmhvcml6b250YWxfY292ZXJfMTY5KSA6IGxpc3QuaG9yaXpvbnRhbF9jb3Zlcl8xNjEwKSArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvZmlsbWVyamkjaW1tZXJzaXZlVGhlbWUjJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogbGlzdC5uZXdfZXAuaW5kZXhfc2hvdyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJlcF9pZFxcXCI6IGxpc3QubmV3X2VwLmlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SG9tZVJlc3VsdChkKTtcXG4gICAgICAgICAgICAgICAgfSwg57O75YiX5pWw5o2uKVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT09ICfwn6SjUFYm6Iqx57WuJykge1xcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgUFblkozoirHnta7mlbDmja4gPSBEYXRhLnNlY3Rpb25bMF0uZXBpc29kZXM7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgpLnJ1bGUoKFBW5ZKM6Iqx57Wu5pWw5o2uLCBsYXp5KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZCA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFBhZ2VUaXRsZSgn8J+ko1BWJuiKsee1ricpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChQVuWSjOiKsee1ruaVsOaNriA9PSBbXSB8fCBQVuWSjOiKsee1ruaVsOaNriA9PSAnJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfigJjigJjigJnigJk8YmlnPjxmb250IGNvbG9yPVxcXCJyZWRcXFwiPuKtkOivpeW9seeJhy/op4bpopHmsqHmnInnm7jlhbNQVuWSjOiKsee1ruWTpn7irZA8L2ZvbnQ+PC9iaWc+JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJ3RvYXN0Oi8v6YO95rKh5pyJ77yM77yM5L2g54K55ZWl5ZGAficsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn5pWs6K+35pyf5b6FficsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBQVuWSjOiKsee1ruaVsOaNri5mb3JFYWNoKGxpc3QgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QuY292ZXIgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogbGlzdC5saW5rICsgbGF6eSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IGxpc3Quc3VidGl0bGUgKyAnXFxcXG4nICsgbGlzdC5sb25nX3RpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGxpc3QubGluayxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuYWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ2aWQ6IGxpc3QuYnZpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaWQ6IGxpc3QuY2lkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhZGdlOiBsaXN0LmJhZGdlXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldEhvbWVSZXN1bHQoZCk7XFxuICAgICAgICAgICAgICAgICAgICB9LCBQVuWSjOiKsee1ruaVsOaNriwgbGF6eSlcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+ayoeacieaVsOaNruWTpn4nXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09PSAn8J+NieerluWxj+S5n+eyvuW9qScpIHtcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgIOerluWxj+S5n+eyvuW9qeaVsOaNriA9IERhdGEuc2VjdGlvblsxXS5lcGlzb2RlcztcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkKCkucnVsZSgo56uW5bGP5Lmf57K+5b2p5pWw5o2uLCBsYXp5KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZCA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFBhZ2VUaXRsZSgn8J+NieerluWxj+S5n+eyvuW9qScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICjnq5blsY/kuZ/nsr7lvanmlbDmja4gPT0gW10gfHwg56uW5bGP5Lmf57K+5b2p5pWw5o2uID09ICcnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+KAmOKAmOKAmeKAmTxiaWc+PGZvbnQgY29sb3I9XFxcInJlZFxcXCI+4q2Q6K+l5b2x54mHL+inhumikeayoeacieebuOWFs+erluWxj+efreinhumikeWTpn7irZA8L2ZvbnQ+PC9iaWc+JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJ3RvYXN0Oi8v6YO95rKh5pyJ77yM77yM5L2g54K55ZWl5ZGAficsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn5pWs6K+35pyf5b6FficsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICDnq5blsY/kuZ/nsr7lvanmlbDmja4uZm9yRWFjaChsaXN0ID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0LnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiBsaXN0LmNvdmVyICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGxpc3QubGluayArIGxhenksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBsaXN0LnN1YnRpdGxlICsgJ1xcXFxuJyArIGxpc3QubG9uZ190aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBsaXN0LmxpbmssXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0LmFpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidmlkOiBsaXN0LmJ2aWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lkOiBsaXN0LmNpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWRnZTogbGlzdC5iYWRnZVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRIb21lUmVzdWx0KGQpO1xcbiAgICAgICAgICAgICAgICAgICAgfSwg56uW5bGP5Lmf57K+5b2p5pWw5o2uLCBsYXp5KVxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5rKh5pyJ5pWw5o2u5ZOmfidcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT09ICfwn5Sl57K+5b2p5LqM5YibJykge1xcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAg57K+5b2p5LqM5Yib5pWw5o2uID0gRGF0YS5zZWN0aW9uWzJdLmVwaXNvZGVzO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoKS5ydWxlKCjnsr7lvankuozliJvmlbDmja4sIGxhenkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkID0gW107XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0UGFnZVRpdGxlKCfwn5Sl57K+5b2p5LqM5YibJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKOeyvuW9qeS6jOWIm+aVsOaNriA9PSBbXSB8fCDnsr7lvankuozliJvmlbDmja4gPT0gJycpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn4oCY4oCY4oCZ4oCZPGJpZz48Zm9udCBjb2xvcj1cXFwicmVkXFxcIj7irZDor6XlvbHniYcv6KeG6aKR5rKh5pyJ5LqM5Yib5L2c5ZOB5ZOmfuKtkDwvZm9udD48L2JpZz4nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAndG9hc3Q6Ly/pg73msqHmnInvvIzvvIzkvaDngrnllaXlkYB+JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6ICfmlazor7fmnJ/lvoV+JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIOeyvuW9qeS6jOWIm+aVsOaNri5mb3JFYWNoKGxpc3QgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyDpkojlr7npg6jliIblj4LmlbDnvLrlpLHnmoTmg4XlhrXlpoLlh6Hkurrkv67ku5nkvKDlhpnnmoTvvIzvvIxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxpc3QuYWlkID09IDAgfHwgbGlzdC5jaWQgPT0gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmllZGVvRGF0YSA9IEpTT04ucGFyc2UoZmV0Y2goXFxcImh0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3dlYi1pbnRlcmZhY2Uvdmlldz9haWQ9XFxcIiArIGxpc3QubGluay5zcGxpdCgnYXYnKVsxXSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBQQ19VQSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiAnaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tLydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZDogXFxcIkdFVFxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pKS5kYXRhO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkID0gdmllZGVvRGF0YS5haWQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidmlkID0gdmllZGVvRGF0YS5idmlkO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lkID0gdmllZGVvRGF0YS5jaWQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhaWQgPSBsaXN0LmFpZDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ2aWQgPSBsaXN0LmJ2aWQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaWQgPSBsaXN0LmNpZDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QuY292ZXIgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogbGlzdC5saW5rICsgbGF6eSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IGxpc3Quc3VidGl0bGUgKyAnXFxcXG4nICsgbGlzdC5sb25nX3RpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGxpc3QubGluayxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IGFpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidmlkOiBidmlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNpZDogY2lkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhZGdlOiBsaXN0LmJhZGdlXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldEhvbWVSZXN1bHQoZCk7XFxuICAgICAgICAgICAgICAgICAgICB9LCDnsr7lvankuozliJvmlbDmja4sIGxhenkpXFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/msqHmnInmlbDmja7lk6Z+J1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/mraPlnKjov5vlhaVcXFwiICsgaW5wdXQgKyBcXFwi55WM6Z2iLi4uXFxcIjtcXG4gICAgICAgIH0pXFxuICAgIH0pLFxcbiAgICBjb2xfdHlwZTogXFxcImljb25fNVxcXCIsXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICBpZDogJ+eyvuW9qee7p+e7rSdcXG4gICAgfVxcbn0pO1xcbi8vIOaYvuekuuaooeW8j+abtOaUueaooeWdl1xcbmQucHVzaCh7XFxuICAgIHRpdGxlOiBnZXRJdGVtKCfmqKHlvI8nLCAn5Y+M6L65JyksXFxuICAgIGltZzogZ2V0SXRlbSgn5qih5byPJywgJ+WPjOi+uScpID09ICfliJfooagnID8gaW1nTGluay7liJfooaggOiBpbWdMaW5rLuWPjOi+uSxcXG4gICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCgpID0+IHtcXG4gICAgICAgIOaYvuekuueahOWJp+mbhuWIl+ihqCA9IEpTT04ucGFyc2UoZ2V0TXlWYXIoJ+aYvuekuueahOWJp+mbhuWIl+ihqCcpKTtcXG4gICAgICAgIGlmIChnZXRJdGVtKCfmqKHlvI8nLCAn5Y+M6L65JykgPT0gJ+WIl+ihqCcpIHtcXG4gICAgICAgICAgICDmmL7npLrnmoTliafpm4bliJfooaguZm9yRWFjaChlbCA9PiB7XFxuICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oZWwubGluaywge1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8yJyxcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgc2V0SXRlbSgn5qih5byPJywgJ+WPjOi+uScpXFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIOaYvuekuueahOWJp+mbhuWIl+ihqC5mb3JFYWNoKGVsID0+IHtcXG4gICAgICAgICAgICAgICAgdXBkYXRlSXRlbShlbC5saW5rLCB7XFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBzZXRJdGVtKCfmqKHlvI8nLCAn5YiX6KGoJylcXG4gICAgICAgIH1cXG4gICAgICAgIGltZ0xpbmsgPSBzdG9yYWdlMC5nZXRNeVZhcign5Zu+5qCHJyk7XFxuICAgICAgICB1cGRhdGVJdGVtKCfmmL7npLrmqKHlvI8nLCB7XFxuICAgICAgICAgICAgdGl0bGU6IGdldEl0ZW0oJ+aooeW8jycsICflj4zovrknKSxcXG4gICAgICAgICAgICBpbWc6IGdldEl0ZW0oJ+aooeW8jycsICflj4zovrknKSA9PSAn5YiX6KGoJyA/IGltZ0xpbmsu5YiX6KGoIDogaW1nTGluay7lj4zovrksXFxuICAgICAgICB9KTtcXG4gICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LliIfmjaLmqKHlvI/kuLo6JyArIGdldEl0ZW0oJ+aooeW8jycsICflj4zovrknKVxcbiAgICB9KSxcXG4gICAgY29sX3R5cGU6ICdpY29uXzUnLFxcbiAgICBleHRyYToge1xcbiAgICAgICAgaWQ6ICfmmL7npLrmqKHlvI8nXFxuICAgIH1cXG59LCB7XFxuICAgIGNvbF90eXBlOiAnbGluZV9ibGFuaycsXFxufSk7XFxuLy8g6YCJ5o+S5qih5Z2X4oCU4oCU5bGA6YOo5Yi35paw54mIXFxu5p2l5rqQID0gJ2JsJztcXG5wdXRNeVZhcign566A5o+SJywgJC50b1N0cmluZygoKSA9PiB7XFxuICAgIGxldCB0aXRsZUFyciA9IFtdXFxuICAgIHNldEZpbGUgPSByZWFkRmlsZSgnaGlrZXI6Ly9maWxlcy9ydWxlcy9EdWFuTmlhbi9NeVBhcnNlLmpzb24nKTtcXG4gICAgdHJ5IHtcXG4gICAgICAgIGV2YWwoJ2pzb249JyArIHNldEZpbGUpO1xcbi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lWYXIoJ+WIhumbhue7iCcpKSkgKyAnPC9mb250PicsXFxuICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoanNvbiwg5p2l5rqQLCBDb2xvciwgb3AsIOW9seeJh+WQjeensCwg5pCc57Si5qih5byPLCDosIPnlKjlkI3np7ApID0+IHtcXG4gICAgICAgIGV2YWwoZ2V0TXlWYXIoJ+eugOaPkicpKTtcXG4gICAgICAgIHJldHVybiAkKGV2YWwoZ2V0TXlWYXIoJ+ino+aekOaVsOe7hCcpKSwgMykuc2VsZWN0KChqc29uLCDmnaXmupAsIENvbG9yLCBvcCwg5b2x54mH5ZCN56ewLCDmkJzntKLmqKHlvI8sIOiwg+eUqOWQjeensCkgPT4ge1xcbiAgICAgICAgICAgIHNldEZpbGUgPSBnZXRNeVZhcignc2V0RmlsZScpO1xcbiAgICAgICAgICAgIGlucHV0ID0gaW5wdXQucmVwbGFjZSgv8J+RiS9nLCAnJyk7XFxuICAgICAgICAgICAgaWYgKGlucHV0ID09PSAn4pyN77iP6L6F5YqpJykge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJCgpLnJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoJ2hpa2VyOi8vcGFnZS9ob21lP3J1bGU96YWN572u5Yqp5omLJykpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT09ICfwn5Om77iP6a2U5patJykge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vcGFnZS9Sb3V0ZT9ydWxlPU15RmllbGThtLDigb8mdHlwZT3nvJbovpEjbm9IaXN0b3J5I1xcXCI7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PT0gJ/CflI3mkJzntKInKSB7XFxuICAgICAgICAgICAgICAgIGlmICjmkJzntKLmqKHlvI8gPT0gJ+WIhue7hCcpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9zZWFyY2g/cz1cXFwiICsg5b2x54mH5ZCN56ewICsgXFxcIiZncm91cD1cXFwiICsg6LCD55So5ZCN56ewO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL3NlYXJjaD9zPVxcXCIgKyDlvbHniYflkI3np7AgKyBcXFwiJnJ1bGU9XFxcIiArIOiwg+eUqOWQjeensDtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAvLyDljp/lhYjnmoTphY3nva5cXG4gICAgICAgICAgICBvcmlnaW5TZXR0aW5ncyA9IEpTT04uc3RyaW5naWZ5KGpzb24uc2V0dGluZ3MpO1xcbiAgICAgICAgICAgIC8vIOS/ruaUuemFjee9rlxcbiAgICAgICAgICAgIGV2YWwoJ2pzb24uc2V0dGluZ3MuJyArIOadpea6kCArICc9aW5wdXQ7Jyk7XFxuICAgICAgICAgICAgc2V0RmlsZSA9IHNldEZpbGUucmVwbGFjZShvcmlnaW5TZXR0aW5ncywgSlNPTi5zdHJpbmdpZnkoanNvbi5zZXR0aW5ncykpO1xcbiAgICAgICAgICAgIHNhdmVGaWxlKCdoaWtlcjovL2ZpbGVzL3J1bGVzL0R1YW5OaWFuL015UGFyc2UuanNvbicsIHNldEZpbGUpO1xcbiAgICAgICAgICAgIC8vIOWIt+aWsOWFg+e0oFxcbiAgICAgICAgICAgIGV2YWwoZ2V0TXlWYXIoJ+eugOaPkicpKTtcXG4gICAgICAgICAgICB1cGRhdGVJdGVtKCdvcCcsIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfop6PmnpDvvJrwn5SYPGZvbnQgY29sb3I9XFxcIicgKyBDb2xvciArICdcXFwiPicgKyBvcCArICc8L2ZvbnQ+XFxcXHRcXFxcdOmhteegge+8mjxmb250IGNvbG9yPVxcXCInICsgQ29sb3IgKyAnXFxcIj4nICsgKChnZXRNeVZhcign5YiG6ZuG6LW3JywgJ+mmlumhtScpID09ICfpppbpobUnKSA/ICfpppbpobUnIDogKGdldE15VmFyKCfliIbpm4botbcnKSArICctJyArIGdldE15VmFyKCfliIbpm4bnu4gnKSkpICsgJzwvZm9udD4nLFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/liIfmjaLop6PmnpDlj6PkuLo6XFxcIiArIGlucHV0O1xcbiAgICAgICAgfSwganNvbiwg5p2l5rqQLCBDb2xvciwgb3AsIOW9seeJh+WQjeensCwg5pCc57Si5qih5byPLCDosIPnlKjlkI3np7ApXFxuICAgIH0sIGpzb24sIOadpea6kCwgQ29sb3IsIG9wLCDlvbHniYflkI3np7AsIOaQnOe0ouaooeW8jywg6LCD55So5ZCN56ewKSxcXG4gICAgaW1nOiAnaGlrZXI6Ly9maWxlcy9ydWxlcy9jeS90dWJpYW8vYmlsaWJpbGkuc3ZnJyxcXG4gICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICBleHRyYToge1xcbiAgICAgICAgaWQ6ICdvcCdcXG4gICAgfVxcbn0pO1xcbi8vIOa7muWKqOWJp+mbhuadoeagj1xcbuWJp+mbhumVv+W6piA9IOWJp+mbhuWIl+ihqC5sZW5ndGg7XFxuaWYgKOWJp+mbhumVv+W6piA+IOavj+mhtembhuaVsCkge1xcbiAgICBwdXRNeVZhcign5Yi35paw6YCJ6ZuGJywgJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICBwdXRNeVZhcign5YiG6ZuG6LW3Jywgc3RhcnQpO1xcbiAgICAgICAgcHV0TXlWYXIoJ+WIhumbhue7iCcsIGVuZCk7XFxuICAgICAgICBldmFsKGdldE15VmFyKCfnroDmj5InKSk7XFxuICAgICAgICB1cGRhdGVJdGVtKCdvcCcsIHtcXG4gICAgICAgICAgICB0aXRsZTogJ+ino+aekO+8mvCflJg8Zm9udCBjb2xvcj1cXFwiJyArIENvbG9yICsgJ1xcXCI+JyArIG9wICsgJzwvZm9udD5cXFxcdFxcXFx06aG156CB77yaPGZvbnQgY29sb3I9XFxcIicgKyBDb2xvciArICdcXFwiPicgKyAoKGdldE15VmFyKCfliIbpm4botbcnLCAn6aaW6aG1JykgPT0gJ+mmlumhtScpID8gJ+mmlumhtScgOiAoZ2V0TXlWYXIoJ+WIhumbhui1tycpICsgJy0nICsgZ2V0TXlWYXIoJ+WIhumbhue7iCcpKSkgKyAnPC9mb250PicsXFxuICAgICAgICB9KVxcbiAgICAgICAgLy8g5Yig6ZmkXFxuICAgICAgICDmmL7npLrnmoTliafpm4bliJfooaggPSBKU09OLnBhcnNlKGdldE15VmFyKCfmmL7npLrnmoTliafpm4bliJfooagnKSk7XFxuICAgICAgICDmmL7npLrnmoTliafpm4bliJfooaguZm9yRWFjaChlbCA9PiB7XFxuICAgICAgICAgICAgZGVsZXRlSXRlbShlbC5saW5rKTtcXG4gICAgICAgIH0pO1xcbiAgICAgICAgLy8g5re75YqgXFxuICAgICAgICBsYXp5ID0gZ2V0TXlWYXIoJ2xhenknKTtcXG4gICAgICAgIOWJp+mbhuWIl+ihqCA9IEpTT04ucGFyc2UoZ2V0TXlWYXIoJ+WJp+mbhuWIl+ihqCcpKTtcXG4gICAgICAgIOaYvuekuueahOWJp+mbhuWIl+ihqCA9IOWJp+mbhuWIl+ihqC5zbGljZShzdGFydCAtIDEsIGVuZCk7XFxuICAgICAgICBuZXdBcnJheSA9IFtdO1xcbiAgICAgICAgaW5kZXggPSAxO1xcbiAgICAgICAg5pi+56S655qE5Ymn6ZuG5YiX6KGoLmZvckVhY2gobGlzdCA9PiB7XFxuICAgICAgICAgICAgaWYgKGdldEl0ZW0oJ+aooeW8jycsICflj4zovrknKSA9PSAn5YiX6KGoJykge1xcbiAgICAgICAgICAgICAgICBuZXdBcnJheS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0LmxvbmdfdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QuY292ZXIgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHVybDogbGlzdC5saW5rICsgbGF6eSxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IGxpc3QudGl0bGUubWF0Y2goL1swLTldLykgPyAobGlzdC5iYWRnZSArICfnrKwnICsgbGlzdC50aXRsZSArICfor50nKSA6IGxpc3QudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogbGlzdC5saW5rLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFpZDogbGlzdC5haWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgYnZpZDogbGlzdC5idmlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNpZDogbGlzdC5jaWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgYmFkZ2U6IGxpc3QuYmFkZ2VcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgbmV3QXJyYXkucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5sb25nX3RpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBsaXN0LmNvdmVyICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IGxpc3QubGluayArIGxhenksXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBsaXN0LnRpdGxlLm1hdGNoKC9bMC05XS8pID8gKGxpc3QuYmFkZ2UgKyAn56ysJyArIGxpc3QudGl0bGUgKyAn6K+dJykgOiBsaXN0LnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8yJyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGxpc3QubGluayxcXG4gICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuYWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJ2aWQ6IGxpc3QuYnZpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjaWQ6IGxpc3QuY2lkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhZGdlOiBsaXN0LmJhZGdlXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpbmRleCArPSAxO1xcbiAgICAgICAgfSk7XFxuICAgICAgICBhZGRJdGVtQWZ0ZXIoZ2V0TXlWYXIoJ+acq+mhtScpLCBuZXdBcnJheSk7XFxuICAgICAgICBwdXRNeVZhcign5pi+56S655qE5Ymn6ZuG5YiX6KGoJywg5pi+56S655qE5Ymn6ZuG5YiX6KGoKTtcXG4gICAgfSkpO1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgIHVybDogJ2hpa2VyOi8vZW1wdHknLFxcbiAgICAgICAgdGl0bGU6ICfiiLcnLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBpZDogJ+WNoOS9jeespicsXFxuICAgICAgICB9XFxuICAgIH0pXFxuICAgIHB1dE15VmFyKCfliIbpm4botbcnLCAxKTtcXG4gICAgcHV0TXlWYXIoJ+WIhumbhue7iCcsIOavj+mhtembhuaVsCk7XFxuICAgIHB1dE15VmFyKCfliafpm4bliJfooagnLCDliafpm4bliJfooagpO1xcbiAgICDmgLvpobXmlbAgPSBNYXRoLmNlaWwo5Ymn6ZuG6ZW/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c2Uge1xcbiAgICBwdXRNeVZhcign5YiG6ZuG6LW3JywgMSk7XFxuICAgIHB1dE15VmFyKCfliIbpm4bnu4gnLCDliafpm4bplb/luqYpO1xcbn1cXG4vLyDlsZXnpLrliafpm4Y6XFxu5pi+56S655qE5Ymn6ZuG5YiX6KGoID0g5Ymn6ZuG5YiX6KGoLnNsaWNlKDAsIGdldE15VmFyKCfliIbpm4bnu4gnKSk7XFxucHV0TXlWYXIoJ+aYvuekuueahOWJp+mbhuWIl+ihqCcsIOaYvuekuueahOWJp+mbhuWIl+ihqCk7XFxuaW5kZXggPSAxO1xcbuaYvuekuueahOWJp+mbhuWIl+ihqC5mb3JFYWNoKGxpc3QgPT4ge1xcbiAgICBpZiAoZ2V0SXRlbSgn5qih5byPJywgJ+WPjOi+uScpID09ICfliJfooagnKSB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBsaXN0LmxvbmdfdGl0bGUsXFxuICAgICAgICAgICAgaW1nOiBsaXN0LmNvdmVyICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgdXJsOiBsaXN0LmxpbmsgKyBsYXp5LFxcbiAgICAgICAgICAgIGRlc2M6IGxpc3QudGl0bGUubWF0Y2goL1swLTldLykgPyAobGlzdC5iYWRnZSArICfnrKwnICsgbGlzdC50aXRsZSArICfor50nKSA6IGxpc3QudGl0bGUsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDogbGlzdC5saW5rLFxcbiAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuYWlkLFxcbiAgICAgICAgICAgICAgICBidmlkOiBsaXN0LmJ2aWQsXFxuICAgICAgICAgICAgICAgIGNpZDogbGlzdC5jaWQsXFxuICAgICAgICAgICAgICAgIGJhZGdlOiBsaXN0LmJhZGdlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgIH0gZWxzZSB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBsaXN0LmxvbmdfdGl0bGUsXFxuICAgICAgICAgICAgaW1nOiBsaXN0LmNvdmVyICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgdXJsOiBsaXN0LmxpbmsgKyBsYXp5LFxcbiAgICAgICAgICAgIGRlc2M6IGxpc3QudGl0bGUubWF0Y2goL1swLTldLykgPyAobGlzdC5iYWRnZSArICfnrKwnICsgbGlzdC50aXRsZSArICfor50nKSA6IGxpc3QudGl0bGUsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8yJyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDogbGlzdC5saW5rLFxcbiAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuYWlkLFxcbiAgICAgICAgICAgICAgICBidmlkOiBsaXN0LmJ2aWQsXFxuICAgICAgICAgICAgICAgIGNpZDogbGlzdC5jaWQsXFxuICAgICAgICAgICAgICAgIGJhZGdlOiBsaXN0LmJhZGdlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgIH1cXG4gICAgaW5kZXggKz0gMTtcXG59KTtcXG5zZXRSZXN1bHQoZCk7XFxuXCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCJ1cOS4u+mhtVwiLFwicGF0aFwiOlwidXBIb21lXCIsXCJydWxlXCI6XCJqczpcXG52YXIgZCA9IFtdO1xcbi8vIOmihOWkhOeQhlxcbnB1dE15VmFyKCd1cEluZm8nLCAn5YWzJyk7XFxuc2V0UGFnZVRpdGxlKE1ZX1BBUkFNUy50aXRsZSk7XFxuaW1nTGluayA9IHN0b3JhZ2UwLmdldE15VmFyKCflm77moIcnKTtcXG4vLyDpmLLmraLlj43niKzomavvvIzku47kuIrkuIDkuKrpobXpnaLkvKDpgJLmlbDmja7igJTigJTlj43niKzomavkuKXph41cXG51cE1pZCA9IE1ZX1BBUkFNUy5taWQgKyBcXFwiXFxcIjtcXG51cE5hbWUgPSBNWV9QQVJBTVMudGl0bGU7XFxudXBGYWNlID0gTVlfUEFSQU1TLmZhY2U7XFxucmVsYXRpb24gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS51c2VyTWFwcGluZyh1cE1pZCk7XFxuLy8g5aS05YOP5qCPXFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6ICc8Zm9udCBjb2xvcj1cXFwiYmx1ZVxcXCI+JyArIHVwTmFtZSArICc8L2ZvbnQ+JyxcXG4gICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCh1cE1pZCkgPT4ge1xcbiAgICAgICAgaWYgKGdldE15VmFyKCd1cEluZm8nLCAn5YWzJykgPT0gJ+W8gCcpIHtcXG4gICAgICAgICAgICBkZWxldGVJdGVtKCd1cEluZm8nKTtcXG4gICAgICAgICAgICBwdXRNeVZhcigndXBJbmZvJywgJ+WFsycpO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAvLyDnlKjmiLfln7rmnKzkv6Hmga9cXG4gICAgICAgICAgICAgICAgcXVlcnlKc29uID0ge1xcbiAgICAgICAgICAgICAgICAgICAgbWlkOiB1cE1pZCxcXG4gICAgICAgICAgICAgICAgICAgIHRva2VuOiAnJyxcXG4gICAgICAgICAgICAgICAgICAgIHBsYXRmb3JtOiAnd2ViJyxcXG4gICAgICAgICAgICAgICAgICAgIHdlYl9sb2NhdGlvbjogMTU1MDEwMVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHBhcm1zID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuZ2V0V2JpRW5jKHF1ZXJ5SnNvbik7XFxuICAgICAgICAgICAgICAgIGluZm9MaW5rID0gJ2h0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3NwYWNlL3diaS9hY2MvaW5mbz8nICsgcGFybXM7XFxuICAgICAgICAgICAgICAgIHVwRGF0YSA9IEpTT04ucGFyc2UoZmV0Y2goaW5mb0xpbmssIHtcXG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFBDX1VBLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJSZWZlcmVyXFxcIjogXFxcImh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS9cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWU9SlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIikpLnVzZXJMaXN0WzBdLmNvb2tpZVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KSkuZGF0YTtcXG4gICAgICAgICAgICAgICAgdXBOYW1lID0gdXBEYXRhLm5hbWU7XFxuICAgICAgICAgICAgICAgIHVwU2V4ID0gdXBEYXRhLnNleDtcXG4gICAgICAgICAgICAgICAgdXBTaWduID0gdXBEYXRhLnNpZ247XFxuICAgICAgICAgICAgICAgIHVwQmlydGhkYXkgPSB1cERhdGEuYmlydGhkYXk7XFxuICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICB1cFNjaG9vbCA9IHVwRGF0YS5zY2hvb2wubmFtZTtcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgdXBTY2hvb2wgPSAnJztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgdXBJZGVudGlmaWNhdGlvbiA9IHVwRGF0YS5vZmZpY2lhbC50aXRsZTtcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgdXBJZGVudGlmaWNhdGlvbiA9ICcnO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGFkZEl0ZW1BZnRlcignY3VycmVudFVwJywge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICd1cDonICsgdXBOYW1lICsgJ1xcXFxubWlkOicgKyB1cE1pZCArICdcXFxcbuaAp+WIqzonICsgdXBTZXggKyAnXFxcXG7nlJ/ml6U6JyArICh1cEJpcnRoZGF5ID09ICcnID8gJ+acquWhq+WGmScgOiB1cEJpcnRoZGF5KSArICdcXFxcbicgKyAodXBTY2hvb2wgPT0gJycgPyAnJyA6ICflrabmoKE6JyArIHVwU2Nob29sICsgJ1xcXFxuJykgKyAodXBTaWduID09ICcnID8gJ1xcXFxuJyA6IHVwU2lnbiArICdcXFxcbicpICsgKHVwSWRlbnRpZmljYXRpb24gPT0gJycgPyAnJyA6ICforqTor4E6JyksXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbG9uZ190ZXh0JyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6ICd1cEluZm8nXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgYWRkSXRlbUFmdGVyKCdjdXJyZW50VXAnLCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+WlveWDj+WHuuS6hueCueaEj+Wklu+8n+S7gOS5iOmDveacqOacieWRon4nLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9lbXB0eScsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xvbmdfdGV4dCcsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiAndXBJbmZvJ1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcHV0TXlWYXIoJ3VwSW5mbycsICflvIAnKTtcXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiAndG9hc3Q6Ly/kv6Hmga/mipjlj6A6JyArIGdldE15VmFyKCd1cEluZm8nLCAn5byAJylcXG4gICAgfSwgdXBNaWQpLFxcbiAgICBpbWc6IHVwRmFjZSArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICBpZDogJ2N1cnJlbnRVcCdcXG4gICAgfVxcbn0sIHtcXG4gICAgY29sX3R5cGU6ICdsaW5lJ1xcbn0pO1xcbi8vIOWFrOWRilxcbm5vdGljZVRleHQgPSBKU09OLnBhcnNlKGZldGNoKCdodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC9zcGFjZS9ub3RpY2U/bWlkPScgKyB1cE1pZCArICcmanNvbnA9anNvbnAnLCB7XFxuICAgIGhlYWRlcnM6IHtcXG4gICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogUENfVUEsXFxuICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3d3dy5iaWxpYmlsaS5jb20vXFxcIixcXG4gICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWU9SlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIikpLnVzZXJMaXN0WzBdLmNvb2tpZVxcbiAgICB9XFxufSkpLmRhdGE7XFxuaWYgKG5vdGljZVRleHQg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ICAgICAgICAgICAgIHZhciBkID0gW107XFxuICAgICAgICAgICAgICAgICAgICBsZXQgdSA9ICdodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC9wb2x5bWVyL3NwYWNlL3NlYXNvbnNfYXJjaGl2ZXNfbGlzdD9taWQ9JyArIHVwTWlkICsgJyZzZWFzb25faWQ9JyArIHNlYXNvbl9pZCArICcmc29ydF9yZXZlcnNlPWZhbHNlJnBhZ2VfbnVtPScgKyBNWV9QQUdFICsgJyZwYWdlX3NpemU9MzAnO1xcbiAgICAgICAgICAgICAgICAgICAgVmlkZW8gPSBKU09OLnBhcnNlKGZldGNoKHUsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogUENfVUEsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJSZWZlcmVyXFxcIjogXFxcImh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS9cXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSkpLmRhdGE7XFxuICAgICAgICAgICAgICAgICAgICBtYXhQYWdlID0gTWF0aC5jZWlsKFZpZGVvLnBhZ2UudG90YWwgLyBWaWRlby5wYWdlLnBhZ2Vfc2l6ZSk7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoTVlfUEFHRSA8PSBtYXhQYWdlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICflvZPliY0656ysJyArIFZpZGVvLnBhZ2UucGFnZV9udW0gKyAn6aG1XFxcXHRcXFxcdFxcXFx05YWx5pyJJyArIG1heFBhZ2UgKyAn6aG1LCcgKyBWaWRlby5wYWdlLnRvdGFsICsgJ+adoeaVsOaNricsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIFZpZGVvLmFyY2hpdmVzLmZvckVhY2gobGlzdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6ICfmkq3mlL7ph4/vvJonICsgbGlzdC5zdGF0LnZpZXcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0LmFpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHNldEhvbWVSZXN1bHQoZCk7XFxuICAgICAgICAgICAgICAgIH0sIHVwTWlkLCBzZWFzb25faWQpXFxuICAgICAgICAgICAgfSwgdXBNaWQsIHNlYXNvbl9pZClcXG4gICAgICAgIH0pO1xcbiAgICAgICAgaWYgKGxpc3QuYXJjaGl2ZXMgPT09IHVuZGVmaW5lZCkge1xcbiAgICAgICAgICAgIGxvZyhsaXN0Lm1ldGEubmFtZSArICfkuLrnqbonKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaWYgKGxpc3QuYXJjaGl2ZXMubGVuZ3RoIDwgMikge1xcbiAgICAgICAgICAgICAgICBsaXN0LmFyY2hpdmVzLmZvckVhY2gobGlzdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0LnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn5pKt5pS+6YeP77yaJyArIGxpc3Quc3RhdC52aWV3LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuYWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobGlzdC5hcmNoaXZlcy5sZW5ndGggPT0gMCkge1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLlpb3lrrbkvJnvvIzov5nlrrbkvJnmsqHmnInlkIjpm4bop4bpopHvvIFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuimgeS4jeWOu+eCueWHu+WFqOmDqOinhumikeeci+eci35cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IDI7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5hcmNoaXZlc1tpXS50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QuYXJjaGl2ZXNbaV0ucGljICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+aSreaUvumHj++8micgKyBsaXN0LmFyY2hpdmVzW2ldLnN0YXQudmlldyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS92aWRlb1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0LmFyY2hpdmVzW2ldLmFpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICB9KTtcXG59IGNhdGNoIChlKSB7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJ+WQiOmbhuS4uuepuicsXFxuICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgIGRlc2M6ICdTb3JyeSzmsqHmnInmlbDmja7lkaJ+Jyxc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c2MmcG49JyArIE1ZX1BBR0UgKyAnJnBzPTMwJztcXG4gICAgICAgICAgICAgICAgICAgIFZpZGVvID0gSlNPTi5wYXJzZShmZXRjaCh1LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFBDX1VBLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3d3dy5iaWxpYmlsaS5jb20vXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pKS5kYXRhO1xcbiAgICAgICAgICAgICAgICAgICAgbWF4UGFnZSA9IE1hdGguY2VpbChWaWRlby5wYWdlLnRvdGFsIC8gVmlkZW8ucGFnZS5zaXplKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChNWV9QQUdFIDw9IG1heFBhZ2UpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+W9k+WJjTrnrKwnICsgVmlkZW8ucGFnZS5udW0gKyAn6aG1XFxcXHRcXFxcdFxcXFx05YWx5pyJJyArIG1heFBhZ2UgKyAn6aG1LCcgKyBWaWRlby5wYWdlLnRvdGFsICsgJ+adoeaVsOaNricsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIFZpZGVvLmFyY2hpdmVzLmZvckVhY2gobGlzdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6ICfmkq3mlL7ph4/vvJonICsgbGlzdC5zdGF0LnZpZXcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0LmFpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHNldEhvbWVSZXN1bHQoZCk7XFxuICAgICAgICAgICAgICAgIH0sIHVwTWlkLCBzZXJpZXNfaWQpXFxuICAgICAgICAgICAgfSwgdXBNaWQsIHNlcmllc19pZClcXG4gICAgICAgIH0pO1xcbiAgICAgICAgaWYgKGxpc3QuYXJjaGl2ZXMgPT09IHVuZGVmaW5lZCkge1xcbiAgICAgICAgICAgIGxvZyhsaXN0Lm1ldGEubmFtZSArICfkuLrnqbonKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgaWYgKGxpc3QuYXJjaGl2ZXMubGVuZ3RoIDwgMikge1xcbiAgICAgICAgICAgICAgICBsaXN0LmFyY2hpdmVzLmZvckVhY2gobGlzdCA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0LnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn5pKt5pS+6YeP77yaJyArIGxpc3Quc3RhdC52aWV3LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuYWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobGlzdC5hcmNoaXZlcy5sZW5ndGggPT0gMCkge1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLlpb3lrrbkvJnvvIzov5nlrrbkvJnmsqHmnInlkIjpm4bop4bpopHvvIFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuimgeS4jeWOu+eCueWHu+WFqOmDqOinhumikeeci+eci35cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IDI7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5hcmNoaXZlc1tpXS50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QuYXJjaGl2ZXNbaV0ucGljICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJ+aSreaUvumHj++8micgKyBsaXN0LmFyY2hpdmVzW2ldLnN0YXQudmlldyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS92aWRlb1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0LmFyY2hpdmVzW2ldLmFpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICB9KTtcXG59IGNhdGNoIChlKSB7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogJ+ezu+WIl+S4uuepuicsXFxuICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgIGRlc2M6ICdTb3JyeSzmsqHmnInmlbDmja7lkaJ+JyxcXG4gICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMScsXFxuICAgIH0pO1xcbn1cXG4vLyB1cOaKleeov1xcbmQucHVzaCh7XFxuICAgIHRpdGxlOiAnVEHnmoTop4bpopEs54K55Ye75bGV5byA5YWo6YOoJyxcXG4gICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgdXJsOiAkKCcjbm9Mb2FkaW5nIyNub0hpc3RvcnkjJykubGF6eVJ1bGUoKHVwTWlkKSA9PiB7XFxuICAgICAgICByZXR1cm4gJCgpLnJ1bGUoKHVwTWlkKSA9PiB7XFxuICAgICAgICAgICAgdmFyIGQgPSBbXTtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBxdWVyeUpzb24gPSB7XFxuICAgICAgICAgICAgICAgICAgICBtaWQ6IHVwTWlkLFxcbiAgICAgICAgICAgICAgICAgICAgcHM6IDMwLFxcbiAgICAgICAgICAgICAgICAgICAgdGlkOiBnZXRNeVZhcignX3RpZCcsICcwJyksXFxuICAgICAgICAgICAgICAgICAgICBzcGVjaWFsX3R5cGU6ICcnLFxcbiAgICAgICAgICAgICAgICAgICAgcG46IGdldE15VmFyKCdfcGFnZScsICcxJyksXFxuICAgICAgICAgICAgICAgICAgICBrZXl3b3JkOiAnJyxcXG4gICAgICAgICAgICAgICAgICAgIG9yZGVyOiAncHViZGF0ZScsXFxuICAgICAgICAgICAgICAgICAgICBwbGF0Zm9ybTogJ3dlYicsXFxuICAgICAgICAgICAgICAgICAgICAvLyB3ZWJfbG9jYXRpb246IDE1NTAxMDEsXFxuICAgICAgICAgICAgICAgICAgICBvcmRlcl9hdm9pZGVkOiB0cnVlXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcGFybXMgPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5nZXRXYmlFbmMocXVlcnlKc29uKTtcXG4gICAgICAgICAgICAgICAgZGF0YUxpbmsgPSAnaHR0cHM6Ly9hcGkuYmlsaWJpbGkuY29tL3gvc3BhY2Uvd2JpL2FyYy9zZWFyY2g/JyArIHBhcm1zO1xcbiAgICAgICAgICAgICAgICB1cFZpZGVvRGF0YSA9IEpTT04ucGFyc2UoZmV0Y2goZGF0YUxpbmssIHtcXG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFBDX1VBLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJSZWZlcmVyXFxcIjogXFxcImh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS9cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWU9SlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIikpLnVzZXJMaXN0WzBdLmNvb2tpZVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KSkuZGF0YTtcXG4gICAgICAgICAgICAgICAgdGxpc3QgPSB1cFZpZGVvRGF0YS5saXN0LnRsaXN0O1xcbiAgICAgICAgICAgICAgICB2bGlzdCA9IHVwVmlkZW9EYXRhLmxpc3Qudmxpc3Q7XFxuICAgICAgICAgICAgICAgIC8vIOWIhuexu+WSjOmhteeggVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldE15VmFyKCdfdGlkJywgJzAnKSA9PSAwID8gJ+KAmOKAmOKAmeKAmTxmb250IGNvbG9yPVxcXCJyZWRcXFwiPuWFqOmDqDwvZm9udD4nIDogJ+WFqOmDqCcsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjI25vSGlzdG9yeSMnKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ190aWQnLCAoMCArIFxcXCJcXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ19wYWdlJywgKDEgKyBcXFwiXFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGZvciAoaXRlbSBpbiB0bGlzdCkge1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogKHRsaXN0W2l0ZW1dLnRpZCArIFxcXCJcXFwiKSA9PSBnZXRNeVZhcignX3RpZCcsICcwJykgPyAn4oCY4oCY4oCZ4oCZPGZvbnQgY29sb3I9XFxcInJlZFxcXCI+JyArICh0bGlzdFtpdGVtXS5uYW1lICsgYCgke3RsaXN0W2l0ZW1dLmNvdW50fSlgKSArICc8L2ZvbnQ+JyA6ICh0bGlzdFtpdGVtXS5uYW1lICsgYCgke3RsaXN0W2l0ZW1dLmNvdW50fSlgKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjI25vSGlzdG9yeSMnKS5sYXp5UnVsZSgodGlkKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdfdGlkJywgKHRpZCArIFxcXCJcXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdfcGFnZScsICgxICsgXFxcIlxcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgdGxpc3RbaXRlbV0udGlkKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdibGFua19ibG9jaycsXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBtYXhQYWdlID0gTWF0aC5jZWlsKHVwVmlkZW9EYXRhLnBhZ2UuY291bnQgLyB1cFZpZGVvRGF0YS5wYWdlLnBzKTtcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgcGFnZSA9IDE7IHBhZ2UgPD0gbWF4UGFnZTsgcGFnZSsrKSB7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAocGFnZSArIFxcXCJcXFwiKSA9PSBnZXRNeVZhcignX3BhZ2UnLCAnMScpID8gJ+KAmOKAmOKAmeKAmTxmb250IGNvbG9yPVxcXCJyZWRcXFwiPicgKyAocGFnZSArIFxcXCJcXFwiKSArICc8L2ZvbnQ+JyA6IChwYWdlICsgXFxcIlxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChwYWdlKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdfcGFnZScsIChwYWdlICsgXFxcIlxcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSwgcGFnZSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8vIOW5s+mTuuinhumikVxcbiAgICAgICAgICAgICAgICB2bGlzdC5mb3JFYWNoKGl0ZW0gPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcHVidGltZSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLnRpbWVDb252ZXJ0KGl0ZW0uY3JlYXRlZCk7XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogaXRlbS5waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiAn5pKt5pS+6YeP77yaJyArIGl0ZW0ucGxheSArICdcXFxcbicgKyBwdWJ0aW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhaWQ6IGl0ZW0uYWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn6aG16Z2i6LWw5Lii5LqGLi4uJyxcXG4gICAgICAgICAgICAgICAgICAgIGltZzogJ2h0dHBzOi8vaTAuaGRzbGIuY29tL2Jmcy9nZW5lcmFsL2Y3YjY2NzAxMWE0NjYxNTczMmM3MDFmNGJiMWQwN2Y3OTNmOGQxZGYucG5nQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2h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AgIGN1cnJlbnRVc2VyID0gYmlsaURhdGEudXNlckxpc3RbMF07XFxuICAgICAgICB2YXIgY29va2llID0gY3VycmVudFVzZXIuY29va2llO1xcbiAgICAgICAgbGV0IHVzZXJpbmZvID0gSlNPTi5wYXJzZShmZXRjaChcXFwiaHR0cHM6Ly9hcGkuYmlsaWJpbGkuY29tL3gvd2ViLWludGVyZmFjZS9uYXZcXFwiLCB7XFxuICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogY29va2llXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSkpLmRhdGE7XFxuICAgICAgICBpZiAodXNlcmluZm8uaXNMb2dpbiA9PT0gZmFsc2UpIHtcXG4gICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICBcXFwidXNlck5hbWVcXFwiOiAn5pyq55m75b2VJyxcXG4gICAgICAgICAgICAgICAgXFxcInVzZXJNaWRcXFwiOiAnJyxcXG4gICAgICAgICAgICAgICAgXFxcInVzZXJGYWNlXFxcIjogJycsXFxuICAgICAgICAgICAgICAgIFxcXCJ0eXBlXFxcIjogZmFsc2VcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBjdXJyZW50VXNlci51c2VyTmFtZSA9IHVzZXJpbmZvLnVuYW1lO1xcbiAgICAgICAgICAgIGN1cnJlbnRVc2VyLnVzZXJNaWQgPSB1c2VyaW5mby5taWQ7XFxuICAgICAgICAgICAgLy8gMe+8muS8muWRmOW8gOmAmu+8mzDvvJrmnKrlvIDpgJpcXG4gICAgICAgICAgICBjdXJyZW50VXNlci52aXBTdGF0dXMgPSB1c2VyaW5mby52aXBTdGF0dXM7XFxuICAgICAgICAgICAgY3VycmVudFVzZXIuZmFjZSA9IHVzZXJpbmZvLmZhY2UgKyBcXFwiQFJlZmVyZXI9XFxcIjtcXG4gICAgICAgICAgICBzYXZlR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FxuICAgICAgICAvLyDlrZfkvZPlpKflsI/jgIHlvLnluZXmraXplb9cXG4gICAgICAgIHZhciBkYW5tdVNldHRpbmc9SlNPTi5wYXJzZShyZWFkRmlsZSgnaGlrZXI6Ly9maWxlcy9kbeebkuWtkC9zZXR0aW5ncy5qc29uJykpO1xcbiAgICAgICAgdmFyIHNpemUgPSBkYW5tdVNldHRpbmcuZm9udFNpemU7XFxuICAgICAgICB2YXIgc3RlcCA9IGRhbm11U2V0dGluZy5zdGVwO1xcbiAgICAgICAgdmFyIGRhdGEgPSAnJztcXG4gICAgICAgIHRkID0gcGRmYShkYW5tdURhdGEsICdpJiZkJyk7XFxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRkLmxlbmd0aDsgaSs9c3RlcCkge1xcbiAgICAgICAgICAgIHRpbWVwb2ludCA9IHBkZmgodGRbaV0sICdkJiZwJykuc3BsaXQoXFxcIixcXFwiKVswXTtcXG4gICAgICAgICAgICBjdCA9IHBkZmgodGRbaV0sICdkJiZwJykuc3BsaXQoXFxcIixcXFwiKVsxXTtcXG4gICAgICAgICAgICBjb2xvciA9IHBkZmgodGRbaV0sICdkJiZwJykuc3BsaXQoXFxcIixcXFwiKVszXTtcXG4gICAgICAgICAgICAvLyDlvLnluZXlhoXlrrlcXG4gICAgICAgICAgICBjb250ZW50ID0gcGRmaCh0ZFtpXSwgJ2QmJlRleHQnKTtcXG4gICAgICAgICAgICBpZiAoY29udGVudC5pbmRleE9mKCc8JykgIT0gLTEgfHwgY29udGVudC5pbmRleE9mKCc+JykgIT0gLTEgfHwgY29udGVudC5pbmRleE9mKCcmJykgIT0gLTEgfHwgY29udGVudC5pbmRleE9mKCdcXFxcdTAwMDAnKSAhPSAtMSB8fCBjb250ZW50LmluZGV4T2YoJ1xcXFxiJykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHRlbXBkYXRhID0gYDxkIHA9XFxcIi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GlvLmxlbmd0aDvkuI3pnIDopoHkuobvvIzmib7liLDkuobmm7Tlpb3nmoTliKTmlq3mlrnms5XvvIzomb3nhLbmiJHlubbkuI3nn6XpgZPov5nkupvlj4LmlbDnmoTlkKvkuYnmmK/ku4DkuYhcXG4gICAgdmlkZW9MaXN0ID0gW107XFxuICAgIGF1ZGlvTGlzdCA9IFtdO1xcbiAgICBuYW1lTGlzdCA9IFtdO1xcbiAgICBoZWFkZXJzID0gW107XFxuICAgIHRyeSB7XFxuICAgICAgICBkYXRhLmF1ZGlvLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgYXVkaW9MaXN0LnB1c2goaXRlbS5iYXNlVXJsKTtcXG4gICAgICAgICAgICBoZWFkZXJzLnB1c2goe1xcbiAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IFxcXCJodHRwczovL3d3dy5iaWxpYmlsaS5jb21cXFwiLFxcbiAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFBDX1VBXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9KTtcXG4gICAgICAgIGRhdGEudmlkZW8uZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICBpZiAoaXRlbS5jb2RlY2lkID09IDcpIHtcXG4gICAgICAgICAgICAgICAgdmlkZW9MaXN0LnB1c2goaXRlbS5iYXNlVXJsICsgXFxcIiNpc1ZpZGVvPXRydWUjXFxcIik7XFxuICAgICAgICAgICAgICAgIGlmIChpdGVtLmlkID09IDEyNikge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaCgn5p2c5q+U6KeG55WMJyk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaXRlbS5pZCA9PSAxMjUpIHtcXG4gICAgICAgICAgICAgICAgICAgIG5hbWVMaXN0LnB1c2goJ0hEUiDnnJ/lvanoibInKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtLmlkID09IDEyMCkge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaCgnNEvotoXmuIUnKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtLmlkID09IDExNikge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaCgnMTA4MFA2MOmrmOW4p+eOhycpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZW0uaWQgPT0gMTEyKSB7XFxuICAgICAgICAgICAgICAgICAgICBuYW1lTGlzdC5wdXNoKCcxMDgwUCvpq5jnoIHnjocnKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtLmlkID09IDgwKSB7XFxuICAgICAgICAgICAgICAgICAgICBuYW1lTGlzdC5wdXNoKCcxMDgwUOmrmOa4hScpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZW0uaWQgPT0gNzQpIHtcXG4gICAgICAgICAgICAgICAgICAgIG5hbWVMaXN0LnB1c2goJzcyMFA2MOmrmOW4p+eOhycpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZW0uaWQgPT0gNjQpIHtcXG4gICAgICAgICAgICAgICAgICAgIG5hbWVMaXN0LnB1c2goJzcyMFDpq5jmuIUnKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpdGVtLmlkID09IDMyKSB7XFxuICAgICAgICAgICAgICAgICAgICBuYW1lTGlzdC5wdXNoKCc0ODBQ5riF5pmwJyk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaXRlbS5pZCA9PSAxNikge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaCgnMzYwUOa1geeVhScpO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGl0ZW0uaWQgPT0gNikge1xcbiAgICAgICAgICAgICAgICAgICAgbmFtZUxpc3QucHVzaCgnMjQwUOaegemAnycpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgIHVybHM6IHZpZGVvTGlzdCxcXG4gICAgICAgICAgICBhdWRpb1VybHM6IGF1ZGlvTGlzdCxcXG4gICAgICAgICAgICBoZWFkZXJzOiBoZWFkZXJzLFxcbiAgICAgICAgICAgIG5hbWVzOiBuYW1lTGlzdCxcXG4gICAgICAgICAgICBkYW5tdTogZG1cXG4gICAgICAgIH0pXFxuICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgdXJsczogW2RhdGEuZHVybFswXS51cmwgKyBcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiXSxcXG4gICAgICAgICAgICBuYW1lczogW2RhdGEucXVhbGl0eSArIFxcXCJcXFwiXSxcXG4gICAgICAgICAgICBkYW5tdTogZG0sXFxuICAgICAgICAgICAgaGVhZGVyczogW3tcXG4gICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiBcXFwiaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tXFxcIixcXG4gICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBQQ19VQVxcbiAgICAgICAgICAgIH1dXFxuICAgICAgICB9KVxcbiAgICB9XFxufVxcbi8vIOeojeWQjuWcqOeci+KAlOKAlOaAu+aTjeS9nOWIpOaWrVxcbiQuZXhwb3J0cy5qdWRnZVRvdmlldyA9IGZ1bmN0aW9uIChhaWQpIHtcXG4gICAgc2VsZWN0aW9uID0gWyfmt7vliqAnLCAn56e76ZmkJ107XFxuICAgIHJldHVybiAkKHNlbGVjdGlvbiwgMSkuc2VsZWN0KChhaWQpID0+IHtcXG4gICAgICAgIGlmIChpbnB1dCA9PSAn5re75YqgJykge1xcbiAgICAgICAgICAgIHJlcyA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmFkZFRvdmlldyhhaWQpO1xcbiAgICAgICAgICAgIGlmIChyZXMgPT0gMCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5re75Yqg5oiQ5YqfXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzID09IC0xMDEpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+i0puWPt+acqueZu+W9lVxcXCJcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHJlcyA9PSAtMTExKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly9jc3Jm5qCh6aqM5aSx6LSlXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzID09IC00MDApIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+ivt+axgumUmeivr1xcXCJcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHJlcyA9PSA5MDAwMSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5YiX6KGo5bey5ruhXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzID09IDkwMDAzKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/nqL/ku7blt7Lnu4/ooqvliKDpmaRcXFwiXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+acquefpemUmeivr1xcXCJcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHJlcyA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmRlbFRvdmlldyhhaWQpO1xcbiAgICAgICAgICAgIGlmIChyZXMgPT0gMCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v56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XJHcm91cChtaWQpO1xcbiAgICAgICAgICAgIGlmIChKU09OLnN0cmluZ2lmeShncm91cHMpID09ICd7fScpIHtcXG4gICAgICAgICAgICAgICAgYmVmb3JlVGFnaWRzLnB1c2goMCk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgcHJvcCBpbiBncm91cHMpIHtcXG4gICAgICAgICAgICAgICAgICAgIGJlZm9yZVRhZ2lkcy5wdXNoKHBhcnNlSW50KHByb3ApKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAvLyDojrflj5bmiJHnmoTliIbnu4RcXG4gICAgICAgICAgICBmb2N1c0dyb3VwTGlzdCA9IFtdO1xcbiAgICAgICAgICAgICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmdldE15QXR0ZW50aW9uR3JvdXBMaXN0KCkuZm9yRWFjaChsaXN0ID0+IHtcXG4gICAgICAgICAgICAgICAgZm9jdXNHcm91cExpc3QucHVzaChsaXN0Lm5hbWUgKyAnICcgKyBsaXN0LnRhZ2lkKTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICByZXR1cm4gJChmb2N1c0dyb3VwTGlzdCwgMSkuc2VsZWN0KChiZWZvcmVUYWdpZHMsIG1pZCkgPT4ge1xcbiAgICAgICAgICAgICAgICBhZnRlclRhZ2lkcyA9IFtdO1xcbiAgICAgICAgICAgICAgICBhZnRlclRhZ2lkcy5wdXNoKHBhcnNlSW50KGlucHV0LnNwbGl0KCcgJylbMV0pKTtcXG4gICAgICAgICAgICAgICAgZmlkcyA9IFtdO1xcbiAgICAgICAgICAgICAgICBmaWRzLnB1c2goTnVtYmVyKG1pZCkpO1xcbiAgICAgICAgICAgICAgICByZXMgPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5tb3ZlVXNlcnMoYmVmb3JlVGFnaWRzLCBhZnRlclRhZ2lkcywgZmlkcyk7XFxuICAgICAgICAgICAgICAgIGlmIChyZXMgPT0gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+enu+WKqOeUqOaIt+WIsFxcXCIgKyBpbnB1dC5zcGxpdCgnICcpWzBdICsgXFxcIuWIhue7hOaIkOWKn1xcXCJcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMgPT0gLTEwMSkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+i0puWPt+acqueZu+W9lVxcXCJcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMgPT0gLTExMSkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL2NzcmbmoKHpqozlpLHotKVcXFwiXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzID09IC00MDApIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/or7fmsYLplJnor69cXFwiXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzID09IDIyMTA0KSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5peg5p2D6ZmQXFxcIlxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHJlcyA9PSAyMjEwNSkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+acquWFs+azqFxcXCJcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/mnKrnn6XplJnor69cXFwiXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LCBiZWZvcmVUYWdpZHMsIG1pZCk7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGlmIChpbnB1dCA9PSAn5YWz5rOoJykge1xcbiAgICAgICAgICAgICAgICB2YXIgYWN0ID0gMTtcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09ICflj5blhbMnKSB7XFxuICAgICAgICAgICAgICAgIHZhciBhY3QgPSAyO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gJ+aChOaChOWFs+azqCcpIHtcXG4gICAgICAgICAgICAgICAgdmFyIGFjdCA9IDM7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn5Y+W5raI5oKE5oKE5YWz5rOoJykge1xcbiAgICAgICAgICAgICAgICB2YXIgYWN0ID0gNDtcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09ICfmi4npu5EnKSB7XFxuICAgICAgICAgICAgICAgIHZhciBhY3QgPSA1O1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gJ+WPlua2iOaLiem7kScpIHtcXG4gICAgICAgICAgICAgICAgdmFyIGFjdCA9IDY7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSAn6Lii5Ye657KJ5LidJykge1xcbiAgICAgICAgICAgICAgICB2YXIgYWN0ID0gNztcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmVzID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuYWRkQXR0ZW50aW9uKG1pZCwgYWN0LCByZV9zcmMpO1xcbiAgICAgICAgICAgIHJlbGF0aW9uID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikudXNlck1hcHBpbmcobWlkKTtcXG4gICAgICAgICAgICB1cGRhdGVJdGVtKCdyZWxhdGlvbicsIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHJlbGF0aW9uLFxcbiAgICAgICAgICAgICAgICBpbWc6IHJlbGF0aW9uID09ICfmnKrlhbPms6gnID8gc3RvcmFnZTAuZ2V0TXlWYXIoJ+WbvuaghycpLua3u+WKoOWFs+azqCA6IHN0b3JhZ2UwLmdldE15VmFyKCflm77moIcnKS7lt7LlhbPms6hcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBpZiAocmVzID09IDApIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL1xcXCIgKyBpbnB1dCArIFxcXCLmiJDlip9cXFwiXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMgPT0gLTEwMSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6LSm5Y+35pyq55m75b2VXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzID09IC0xMTEpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL2NzcmbmoKHpqozlpLHotKVcXFwiXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMgPT0gLTQwMCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6K+35rGC6ZSZ6K+vXFxcIlxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzID09IDIyMDAxKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/kuI3og73lr7noh6rlt7Hov5vooYzmraTmk43kvZxcXFwiXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMgPT0gMjIwMDMpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+eUqOaIt+S9jeS6jum7keWQjeWNlVxcXCJcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5pyq55+l6ZSZ6K+vXFxcIlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfSwgbWlkLCByZV9zcmMpXFxufVxcbi8vIOaYoOWwhOeUqOaIt+WFs+ezu1xcbiQuZXhwb3J0cy51c2VyTWFwcG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ApIHtcXG4gICAgICAgICAgICBsaWtlID0gSlNPTi5wYXJzZShmZXRjaChcXFwiaHR0cHM6Ly9hcGkuYmlsaWJpbGkuY29tL3gvd2ViLWludGVyZmFjZS92aWV3P2FpZD1cXFwiICsgYWlkKSkuZGF0YS5zdGF0Lmxpa2U7XFxuICAgICAgICAgICAgdXBkYXRlSXRlbSgnc2V0TGlrZScsIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IChsaWtlICsgMSkgKyAnJyxcXG4gICAgICAgICAgICAgICAgaW1nOiBzdG9yYWdlMC5nZXRNeVZhcign5Zu+5qCHJyku5bey54K56LWeXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+eCuei1nuaIkOWKn1xcXCI7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/ngrnotZ7lh7rplJnkuoZ+XFxcIjtcXG4gICAgICAgIH1cXG4gICAgfSBlbHNlIHtcXG4gICAgICAgIHJlcyA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLnNldExpa2UoYWlkLCAyKTtcXG4gICAgICAgIGlmIChyZXMgPT0gMCkge1xcbiAgICAgICAgICAgIGxpa2UgPSBKU09OLnBhcnNlKGZldGNoKFxcXCJodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC93ZWItaW50ZXJmYWNlL3ZpZXc/YWlkPVxcXCIgKyBhaWQpKS5kYXRhLnN0YXQubGlrZTtcXG4gICAgICAgICAgICB1cGRhdGVJdGVtKCdzZXRMaWtlJywge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogKGxpa2UgLSAxKSArICcnLFxcbiAgICAgICAgICAgICAgICBpbWc6IHN0b3JhZ2UwLmdldE15VmFyKCflm77moIcnKS7mnKrngrnotZ5cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5Y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WxpLnR4dFxcXCIpKS51c2VyTGlzdFswXS5jb29raWVcXG4gICAgICAgIH1cXG4gICAgfSkpO1xcbiAgICByZXR1cm4gcmVzLmRhdGEuaXRlbVxcbn1cXG4vLyDojrflj5bmkq3mlL7lnLDlnYBcXG4kLmV4cG9ydHMuZ2V0VXJsID0gZnVuY3Rpb24gKGF2aWQsIGNpZCwgcW4pIHtcXG4gICAgdmFyIHNldHRpbmc9SlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIikpO1xcbiAgICB2YXIgQ29va2llPXNldHRpbmcuYmZLZXkhPScnP2Jhc2U2NERlY29kZShiYXNlNjREZWNvZGUoc2V0dGluZy5iZktleSkpOnNldHRpbmcudXNlckxpc3RbMF0uY29va2llO1xcbiAgICB0cnkge1xcbiAgICAgICAgbGV0IHUgPSByZXF1ZXN0KGJ1aWxkVXJsKFxcXCJodHRwOi8vYXBpLmJpbGliaWxpLmNvbS94L3BsYXllci9wbGF5dXJsXFxcIiwge1xcbiAgICAgICAgICAgIFxcXCJhdmlkXFxcIjogYXZpZCxcXG4gICAgICAgICAgICBcXFwiY2lkXFxcIjogY2lkLFxcbiAgICAgICAgICAgIFxcXCJxblxcXCI6IHFuLFxcbiAgICAgICAgICAgIFxcXCJmbnZlclxcXCI6IDAsXFxuICAgICAgICAgICAgLy8gXFxcImZudmFsXFxcIjogNDA0OCxcXG4gICAgICAgICAgICBcXFwiZm52YWxcXFwiOiAxNixcXG4gICAgICAgICAgICBcXFwiZm91cmtcXFwiOiAxXFxuICAgICAgICB9KSwge1xcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgQ29va2llOiBDb29raWVcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICAgICAgcmV0dXJuIEpTT04ucGFyc2UodSkuZGF0YS5kYXNoXFxuICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgLy8g5LiA5Lq65LmL5LiL56ys5LiA5a2j55qE56ysMe+8jDLpm4bigJTigJTlj6/ku6Xojrflj5blpKfkvJrlkZjliafpm4bnmoTliY0zbWluXFxuICAgICAgICAgICAgbG9nKCflsJ3or5Xmm7TmlLnor7fmsYLmjqXlj6MuLi4nKTtcXG4gICAgICAgICAgICBsZXQgdSA9IHJlcXVlc3QoYnVpbGRVcmwoXFxcImh0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS9wZ2MvcGxheWVyL3dlYi9wbGF5dXJsXFxcIiwge1xcbiAgICAgICAgICAgICAgICBcXFwiYXZpZFxcXCI6IGF2aWQsXFxuICAgICAgICAgICAgICAgIFxcXCJjaWRcXFwiOiBjaWQsXFxuICAgICAgICAgICAgICAgIFxcXCJxblxcXCI6IHFuLFxcbiAgICAgICAgICAgICAgICBcXFwiZm52ZXJcXFwiOiAwLFxcbiAgICAgICAgICAgICAgICAvLyBcXFwiZm52YWxcXFwiOiA0MDQ4LFxcbiAgICAgICAgICAgICAgICBcXFwiZm52YWxcXFwiOiAxNixcXG4gICAgICAgICAgICAgICAgXFxcImZvdXJrXFxcIjogMVxcbiAgICAgICAgICAgIH0pLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgIENvb2tpZTogQ29va2llXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIC8vIOS7meeOi+eahOaXpeW4uOesrOS4ieWto+esrDEw6ZuG77yM5rKh5pyJZGFzaO+8jOacjeS6hlxcbiAgICAgICAgICAgIGlmIChKU09OLnBhcnNlKHUpLnJlc3VsdC5kYXNoKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKHUpLnJlc3VsdC5kYXNoO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGxvZygn5bCd6K+V6LWw5Y2V57q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UgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS91cEhvbWUnLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBtaWQ6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm1pZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IubmFtZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBmYWNlOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5mYWNlXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgLy8g5LiN5LiA5a6a5pyJ5paH5a2X5ZWKXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogKGxpc3QubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5kZXNjID09PSBudWxsID8gJzxmb250IGNvbG9yPVxcXCJncmV5XFxcIj51cOWkquaHkuS6hu+8jOi/nuaWh+ahiOmDveS4jeaDs+mFjS4uLjwvZm9udD4nIDogbGlzdC5tb2R1bGVzLm1vZHVsZV9keW5hbWljLmRlc2MudGV4dCkucmVwbGFjZSgvXFxcXG4vZywgJzxicj4nKSArICc8YnI+PGEgaHJlZj1cXFwiaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlXFxcIj7mn6XnnIvor4Torro8L2E+JyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZScsXFxuICAgICAgICAgICAgICAgICAgICAvLyDov5nkuKrkuI3og73nlKhsb25nX3RleHRcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAncmljaF90ZXh0JyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGxpc3QuYmFzaWMuY29tbWVudF9pZF9zdHIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogMVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5tb2R1bGVzLm1vZHVsZV9keW5hbWljLm1ham9yLmFyY2hpdmUudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5tYWpvci5hcmNoaXZlLmNvdmVyICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfbGVmdF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IGxpc3QubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5tYWpvci5hcmNoaXZlLmRlc2MsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGFpZDogbGlzdC5tb2R1bGVzLm1vZHVsZV9keW5hbWljLm1ham9yLmFyY2hpdmUuYWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICBkZXNjOic8c21hbGw+PHNtYWxsPjxmb250IGNvbG9yPVxcXCJncmV5XFxcIj7nlZnoqIA6JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfc3RhdC5jb21tZW50LmNvdW50ICsgJ1xcXFx0XFxcXHTliIbkuqs6JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfc3RhdC5mb3J3YXJkLmNvdW50ICsgJ1xcXFx0XFxcXHTllpzmrKI6JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfc3RhdC5saWtlLmNvdW50ICsgJzwvZm9udD48L3NtYWxsPjwvc21hbGw+JyxcXG4gICAgICAgICAgICAgICAgICAgIGltZzppbWdMaW5rLuWKqOaAgei2s+i/uSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDonaGlrZXI6Ly9lbXB0eScsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcidcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lX2JsYW5rJ1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGxpc3QudHlwZSA9PSAnRFlOQU1JQ19UWVBFX0ZPUldBUkQnKSB7XFxuICAgICAgICAgICAgICAgIC8vIOW8leeUqO+8jOWkmuWHuuS6hm9yaWfmjIflkJHkuIDkuKoo6L+H5Y67KeW3suWPkeW4g+eahOinhumikSzlh4bnoa7nmoTor7TmmK/lvJXnlKjkuYvliY3nmoTluJblrZDkuI3kuIDlrprmmK/op4bpopHiiJpcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5mYWNlICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOic8c21hbGw+PHNtYWxsPjxmb250IGNvbG9yPVxcXCJncmV5XFxcIj4nICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IucHViX3RpbWUgKyAnPC9mb250Pjwvc21hbGw+PC9zbWFsbD4nLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL3VwSG9tZScsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcicsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG1pZDogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IubWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZhY2U6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLmZhY2VcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogKGxpc3QubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5kZXNjID09PSBudWxsID8gJzxmb250IGNvbG9yPVxcXCJncmV5XFxcIj51cOWkquaHkuS6hu+8jOi/nuaWh+ahiOmDveS4jeaDs+mFjS4uLjwvZm9udD4nIDogbGlzdC5tb2R1bGVzLm1vZHVsZV9keW5hbWljLmRlc2MudGV4dCkucmVwbGFjZSgvXFxcXG4vZywgJzxicj4nKSArICc8YnI+PGEgaHJlZj1cXFwiaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlXFxcIj7mn6XnnIvor4Torro8L2E+JyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZScsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3JpY2hfdGV4dCcsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBsaXN0LmJhc2ljLmNvbW1lbnRfaWRfc3RyLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIOS5n+aYr+e6r+aWh+Wtl++8jOWboOS4uuWPquaYr+aWh+WtlyvlvJXnlKjml6nlt7LmipXnqL/nmoTop4bpopFcXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAxN1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgLy8g5byV55So55qE5YaF5a654oCU4oCU5oiq5pat77yI5qC55o2u5LiN5ZCM55qE5byV55So57G75Z6L6L+b6KGM5aSE55CG77yJXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJzxzbWFsbD48c21hbGw+5LiL6Z2i5YaF5a655p2l6Ieq5byV55So55qE5biW5a2QLHVw5pivOjxhIGhyZWY9XFxcImhpa2VyOi8vcGFnZS91cEhvbWVcXFwiPicgKyBsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm5hbWUgKyAnPC9hPjwvc21hbGw+PC9zbWFsbD4nLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJyaWNoX3RleHRcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBtaWQ6IGxpc3Qub3JpZy5tb2R1bGVzLm1vZHVsZV9hdXRob3IubWlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZmFjZTogbGlzdC5vcmlnLm1vZHVsZXMubW9kdWxlX2F1dGhvci5mYWNlXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibGluZVxcXCJcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGlmIChsaXN0Lm9yaWcudHlwZSA9PSAnRFlOQU1JQ19UWVBFX0FWJykge1xcbiAgICAgICAgICAgICAgICAgICAgLy8g5byV55So6KeG6aKR6K+06K+0XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5tYWpvci5hcmNoaXZlLnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGltZzogbGlzdC5vcmlnLm1vZHVsZXMubW9kdWxlX2R5bmFtaWMubWFqb3IuYXJjaGl2ZS5jb3ZlciArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV9sZWZ0X3BpYycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5tYWpvci5hcmNoaXZlLmRlc2MsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWlkOiBsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5tYWpvci5hcmNoaXZlLmFpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobGlzdC5vcmlnLnR5cGUgPT0gJ0RZTkFNSUNfVFlQRV9XT1JEJykge1xcbiAgICAgICAgICAgICAgICAgICAgLy8g5byV55So5paH5a2X6K+06K+0XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAobGlzdC5vcmlnLm1vZHVsZXMubW9kdWxlX2R5bmFtaWMuZGVzYy50ZXh0ID09PSBudWxsID8gJzxmb250IGNvbG9yPVxcXCJncmV5XFxcIj51cOWkquaHkuS6hu+8jOi/nuaWh+ahiOmDveS4jeaDs+mFjS4uLjwvZm9udD4nIDogbGlzdC5vcmlnLm1vZHVsZXMubW9kdWxlX2R5bmFtaWMuZGVzYy50ZXh0KS5yZXBsYWNlKC9cXFxcbi9nLCAnPGJyPicpICsgJzxicj48YSBocmVmPVxcXCJoaWtlcjovL3BhZ2UvQ29tbWVudHM/cD1meXBhZ2VcXFwiPuafpeeci+ivhOiuujwvYT4nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdyaWNoX3RleHQnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIOivhOiuumlk5p2l5rqQ6YO95LiN5LiA5qC3XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBsaXN0Lm9yaWcuaWRfc3RyLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyDnuq/mloflrZdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogMTdcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG5cXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChsaXN0Lm9yaWcudHlwZSA9PSAnRFlOQU1JQ19UWVBFX0RSQVcnKSB7XFxuICAgICAgICAgICAgICAgICAgICAvLyDlvJXnlKjlm77niYfor7Tor7RcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IChsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5kZXNjLnRleHQgPT09IG51bGwgPyAnPGZvbnQgY29sb3I9XFxcImdyZXlcXFwiPnVw5aSq5oeS5LqG77yM6L+e5paH5qGI6YO95LiN5oOz6YWNLi4uPC9mb250PicgOiBsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5kZXNjLnRleHQpLnJlcGxhY2UoL1xcXFxuL2csICc8YnI+JykgKyAnPGJyPjxhIGhyZWY9XFxcImhpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZVxcXCI+5p+l55yL6K+E6K66PC9hPicsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdyaWNoX3RleHQnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGxpc3Qub3JpZy5tb2R1bGVzLm1vZHVsZV9keW5hbWljLm1ham9yLmRyYXcuaWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6IDExXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBsaXN0Lm9yaWcubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5tYWpvci5kcmF3Lml0ZW1zLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiBpdGVtLnNyYyArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3BpY18zX3NxdWFyZScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogaXRlbS5zcmMgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKCflj6/og73ov5jmnInmnKrpgILphY3nmoTor7Tor7TnsbvlnosnKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvLyDliIblibJcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6ICc8c21hbGw+PHNtYWxsPjxmb250IGNvbG9yPVxcXCJncmV5XFxcIj7nlZnoqIA6JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfc3RhdC5jb21tZW50LmNvdW50ICsgJ1xcXFx0XFxcXHTliIbkuqs6JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfc3RhdC5mb3J3YXJkLmNvdW50ICsgJ1xcXFx0XFxcXHTllpzmrKI6JyArIGxpc3QubW9kdWxlcy5tb2R1bGVfc3RhdC5saWtlLmNvdW50ICsgJzwvZm9udD48L3NtYWxsPjwvc21hbGw+JyxcXG4gICAgICAgICAgICAgICAgICAgIGltZzppbWdMaW5rLuWKqOaAgei2s+i/uSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDonaGlrZXI6Ly9lbXB0eScsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcidcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lX2JsYW5rJ1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGxpc3QudHlwZSA9PSAnRFlOQU1JQ19UWVBFX1dPUkQnKSB7XFxuICAgICAgICAgICAgICAgIC8vIOe6r+aWh+Wtl1xcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOic8c21hbGw+PHNtYWxsPjxmb250IGNvbG9yPVxcXCJncmV5XFxcIj4nICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IucHViX3RpbWUgKyAnPC9mb250Pjwvc21hbGw+PC9zbWFsbD4nLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5mYWNlICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvdXBIb21lJyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYXZhdGFyJyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbWlkOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5taWQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZmFjZTogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IuZmFjZVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAobGlzdC5tb2R1bGVzLm1vZHVsZV9keW5hbWljLmRlc2MgPT09IG51bGwgPyAnPGZvbnQgY29sb3I9XFxcImdyZXlcXFwiPnVw5aSq5oeS5LqG77yM6L+e5paH5qGI6YO95LiN5oOz6YWNLi4uPC9mb250PicgOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2R5bmFtaWMuZGVzYy50ZXh0KS5yZXBsYWNlKC9cXFxcbi9nLCAnPGJyPicpICsgJzxicj48YSBocmVmPVxcXCJoaWtlcjovL3BhZ2UvQ29tbWVudHM/cD1meXBhZ2VcXFwiPuafpeeci+ivhOiuujwvYT4nLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlJyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAncmljaF90ZXh0JyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGxpc3QuYmFzaWMuY29tbWVudF9pZF9zdHIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8g57qv5paH5a2XXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogMTdcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogJzxzbWFsbD48c21hbGw+PGZvbnQgY29sb3I9XFxcImdyZXlcXFwiPueVmeiogDonICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9zdGF0LmNvbW1lbnQuY291bnQgKyAnXFxcXHRcXFxcdOWIhuS6qzonICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9zdGF0LmZvcndhcmQuY291bnQgKyAnXFxcXHRcXFxcdOWWnOasojonICsgbGlzdC5tb2R1bGVzLm1vZHVsZV9zdGF0Lmxpa2UuY291bnQgKyAnPC9mb250Pjwvc21hbGw+PC9zbWFsbD4nLFxcbiAgICAgICAgICAgICAgICAgICAgaW1nOmltZ0xpbmsu5Yqo5oCB6Laz6L+5LFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOidoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYXZhdGFyJ1xcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmVfYmxhbmsnXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobGlzdC50eXBlID09ICdEWU5BTUlDX1RZUEVfRFJBVycpIHtcXG4gICAgICAgICAgICAgICAgLy8g5Zu+54mH6K+06K+0XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IubmFtZSxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6JzxzbWFsbD48c21hbGw+PGZvbnQgY29sb3I9XFxcImdyZXlcXFwiPicgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5wdWJfdGltZSArICc8L2ZvbnQ+PC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLmZhY2UgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS91cEhvbWUnLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBtaWQ6IGxpc3QubW9kdWxlcy5tb2R1bGVfYXV0aG9yLm1pZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5tb2R1bGVzLm1vZHVsZV9hdXRob3IubmFtZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBmYWNlOiBsaXN0Lm1vZHVsZXMubW9kdWxlX2F1dGhvci5mYWNlXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IChsaXN0Lm1vZHVsZXMubW9kdWxlX2R5bmFtaWMuZGVzYyA9PT0gbnVsbCA/ICc8Zm9udCBjb2xvcj1cXFwiZ3JleVxcXCI+dXDlpKrmh5LkuobvvIzov57mlofmoYjpg73kuI3mg7PphY0uLi48L2ZvbnQ+JyA6IGxpc3QubW9kdWxlcy5tb2R1bGVfZHluYW1pYy5kZXNjLnRleHQpLnJlcGxhY2UoL1xcXFxuL2csICc8YnI+JykgKyAnPGJyPjxhIGhyZWY9XFxcImhpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZVxcXCI+5p+l55yL6K+E6K66PC9hPicsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvQ29tbWVudHM/cD1meXBhZ2UnLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdyaWNoX3RleHQnLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogbGlzdC5iYXNpYy5jb21tZW50X2lkX3N0cixcXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyDnm7jnsL/vvIjlm77niYfliqjmgIHvvIlcXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAxMVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgbGlzdC5tb2R1bGVzLm1vZHVsZV9keW5hbWljLm1ham9yLmRyYXcuaXRlbXMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaW1nOiBpdGVtLnNyYyArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAncGljXzNfc3F1YXJlJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGl0ZW0uc3JjICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiAnPHNtYWxsPjxzbWFsbD48Zm9udCBjb2xvcj1cXFwiZ3JleVxcXCI+55WZ6KiAOicgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX3N0YXQuY29tbWVudC5jb3VudCArICdcXFxcdFxcXFx05YiG5LqrOicgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX3N0YXQuZm9yd2FyZC5jb3VudCArICdcXFxcdFxcXFx05Zac5qyiOicgKyBsaXN0Lm1vZHVsZXMubW9kdWxlX3N0YXQubGlrZS5jb3VudCArICc8L2ZvbnQ+PC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6aW1nTGluay7liqjmgIHotrPov7ksXFxuICAgICAgICAgICAgICAgICAgICB1cmw6J2hpa2VyOi8vZW1wdHknLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInXFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZV9ibGFuaydcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgIH0pXFxufVxcbi8vIOaXtumXtOaXpeacn+i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pbGliaWxpLmNvbS94L3dlYi1pbnRlcmZhY2UvbmF2Jywge1xcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBQQ19VQSxcXG4gICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiBcXFwiaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tL1xcXCJcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIG1ldGhvZDogJ0dFVCdcXG4gICAgICAgIH0pKS5kYXRhO1xcbiAgICAgICAgaW1nX3VybCA9IGpzb25fY29udGVudC53YmlfaW1nLmltZ191cmw7XFxuICAgICAgICBzdWJfdXJsID0ganNvbl9jb250ZW50LndiaV9pbWcuc3ViX3VybDtcXG4gICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgaW1nX2tleTogaW1nX3VybC5zdWJzdHJpbmcoaW1nX3VybC5sYXN0SW5kZXhPZignLycpICsgMSwgaW1nX3VybC5sZW5ndGgpLnNwbGl0KCcuJylbMF0sXFxuICAgICAgICAgICAgc3ViX2tleTogc3ViX3VybC5zdWJzdHJpbmcoc3ViX3VybC5sYXN0SW5kZXhPZignLycpICsgMSwgc3ViX3VybC5sZW5ndGgpLnNwbGl0KCcuJylbMF1cXG4gICAgICAgIH1cXG4gICAgfVxcblxcbiAgICBjb25zdCB3Ymlfa2V5cyA9IGdldFdiaUtleXMoKTtcXG5cXG4gICAgY29uc3QgcXVlcnkgPSBlbmNXYmkoXFxuICAgICAgICBxdWVyeUpzb24sXFxuICAgICAgICB3Ymlfa2V5cy5pbWdfa2V5LFxcbiAgICAgICAgd2JpX2tleXMuc3ViX2tleVxcbiAgICApO1xcbiAgICByZXR1cm4gcXVlcnk7XFxufVxcblwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwidmlkZW9QYWdlXCIsXCJwYXRoXCI6XCJ2aWRlb1wiLFwicnVsZVwiOlwianM6X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iAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChhaWQsIGNpZCwgcW4pID0+IHtcXG4gICAgICAgICAgICAgICAgLy8g55yf56a75LqG5Liq5aSn6LCx77yM5piO5piO5pu/5o2i5o6J5LqG77yMdWHlrZfnrKbkuLLlj4jlj5jlm57mnaXkuobvvIzlj4jopoHlpITnkIbkuIDmrKFcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmJpbGlMYXp5KGFpZCwgY2lkLCBxbikucmVwbGFjZSgvOy9nLCBcXFwi77yb77ybXFxcIik7XFxuICAgICAgICAgICAgfSwgYWlkICsgXFxcIlxcXCIsIGNpZCArIFxcXCJcXFwiLCAnMTEyJyksXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJwaWNfMVxcXCIsXFxuICAgICAgICAgICAgZGVzYzon5pKt5pS+6YePOicrcC5zdGF0LnZpZXcrJ1xcXFx0XFxcXHRcXFxcdOW8ueW5leaVsDonK3Auc3RhdC5kYW5tYWt1KydcXFxcbuWPkeW4g+aXpeacnzonKyQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLnRpbWVDb252ZXJ0KHAuY3RpbWUpLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOidhaWQtJythaWQrJ3xjaWQtJytjaWQsXFxuICAgICAgICAgICAgICAgIGxvbmdDbGljazogW3tcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnZG3nm5LlrZAnLCBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2Uvc2V0dGluZyNub0hpc3RvcnkjP3J1bGU9ZG3nm5LlrZAnO1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICflvLnluZXmjqfliLYnLCBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGdldEl0ZW0oJ2lzT3ZlcnJpZGVTYXZlJywgJ2ZhbHNlJykgPT0gJ3RydWUnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ2lzT3ZlcnJpZGVTYXZlJywgJ2ZhbHNlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lvLnluZXlsIbkuI3lj5dkbeebkuWtkOWPguaVsOaOp+WItic7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgnaXNPdmVycmlkZVNhdmUnLCAndHJ1ZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5by55bmV5bCG5Y+X5YiwZG3nm5LlrZDlj4LmlbDmjqfliLYnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH1dXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAnPGZvbnQgY29sb3I9XFxcImJsdWVcXFwiPicgKyBwLm93bmVyLm5hbWUgKyAnPC9mb250PicsXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3VwSG9tZVxcXCIsXFxuICAgICAgICAgICAgaW1nOiBwLm93bmVyLmZhY2UgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgbWlkOiBwLm93bmVyLm1pZCxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHAub3duZXIubmFtZSxcXG4gICAgICAgICAgICAgICAgZmFjZTogcC5vd25lci5mYWNlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICAvLyDomb3nhLblj6rmnIkxUCzkvYblj6/og73lpITkuo7lkIjpm4bop4bpopHkuK3vvIzlvoDlvoDlnKh1cOS4iuS8oOS4reWxnuS6juS4gOWll+W9seeJh1xcbiAgICAgICAgaWYgKHAudWdjX3NlYXNvbikge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn8J+TgeaJgOWxnuWQiOmbhu+8mjxhIGhyZWY9XFxcImhpa2VyOi8vcGFnZS9jb2xsZWN0aW9uVmllZG9cXFwiPicrcC51Z2Nfc2Vhc29uLnRpdGxlKyc8L2E+JyxcXG4gICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL2NvbGxlY3Rpb25WaWVkbyNub0hpc3RvcnkjXFxcIixcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdyaWNoX3RleHQnLFxcbiAgICAgICAgICAgICAgICBleHRyYTogeyBcXFwidGV4dFNpemVcXFwiOiAxMiwgYWlkOiBhaWQgfVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogcC5zdGF0Lmxpa2UsXFxuICAgICAgICAgICAgaW1nOiBoYXNMaWtlID09IDEgPyBpbWdMaW5rLuW3sueCuei1niA6IGltZ0xpbmsu5pyq54K56LWeLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChhaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmxpa2VMb2dpYyhhaWQpXFxuICAgICAgICAgICAgfSwgYWlkKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfNFxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6ICdzZXRMaWtlJ1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogcC5zdGF0LmZhdm9yaXRlLFxcbiAgICAgICAgICAgIGltZzogaGFzRmF2b3VyID8gaW1nTGluay7lt7LmlLbol48gOiBpbWdMaW5rLuacquaUtuiXjyxcXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjI25vSGlzdG9yeSMnKS5sYXp5UnVsZSgoYWlkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHVwTWlkID0gSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIikpLnVzZXJNaWQ7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5mYXZvdXJMb2dpYyhhaWQsIHVwTWlkKVxcbiAgICAgICAgICAgIH0sIGFpZCksXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpY29uX3NtYWxsXzRcXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOiAnc2V0RmF2b3VyJ1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogJ+eojeWQjuWGjeeciycsXFxuICAgICAgICAgICAgaW1nOiBpbWdMaW5rLueojeWQjuWGjeeciyxcXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjI25vSGlzdG9yeSMnKS5sYXp5UnVsZSgoYWlkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9hcGlcXFwiKS5qdWRnZVRvdmlldyhhaWQpXFxuICAgICAgICAgICAgfSwgYWlkKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfNFxcXCIsXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6ICfmn6XnnIvor4TorronLFxcbiAgICAgICAgICAgIHVybDogJ2hpa2VyOi8vcGFnZS9Db21tZW50cz9wPWZ5cGFnZScsXFxuICAgICAgICAgICAgaW1nOiBpbWdMaW5rLuafpeeci+ivhOiuuixcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfNFxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgXFxcImlkXFxcIjogYWlkLFxcbiAgICAgICAgICAgICAgICBcXFwidHlwZVxcXCI6IDFcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lX2JsYW5rJ1xcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiBwLmRlc2MsXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJsb25nX3RleHRcXFwiLFxcbiAgICAgICAgfSk7XFxuICAgIH0gZWxzZSB7XFxuICAgICAgICAvLyDlrZjlnKjlpJrpm4bliIZQXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBwLnRpdGxlLFxcbiAgICAgICAgICAgIGltZzogcC5waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICBkZXNjOifmkq3mlL7ph486JytwLnN0YXQudmlldysnXFxcXHRcXFxcdFxcXFx05by55bmV5pWwOicrcC5zdGF0LmRhbm1ha3UrJ1xcXFxu5Y+R5biD5pel5pyfOicrJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikudGltZUNvbnZlcnQocC5jdGltZSksXFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIyNub0hpc3RvcnkjJykubGF6eVJ1bGUoKHApID0+IHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQoJ2hpa2VyOi8vZW1wdHk/ZnlwYWdlJykucnVsZSgocCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgZCA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogcC5kZXNjLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibG9uZ190ZXh0XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgICAgICAgICAgICAgIH0sIHApXFxuICAgICAgICAgICAgfSwgcCksXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJwaWNfMVxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICdkbeebkuWtkCcsIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9zZXR0aW5nI25vSGlzdG9yeSM/cnVsZT1kbeebkuWtkCc7XFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+W8ueW5leaOp+WIticsIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZ2V0SXRlbSgnaXNPdmVycmlkZVNhdmUnLCAnZmFsc2UnKSA9PSAndHJ1ZScpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgnaXNPdmVycmlkZVNhdmUnLCAnZmFsc2UnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W8ueW5leWwhuS4jeWPl2Rt55uS5a2Q5Y+C5pWw5o6n5Yi2JztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCdpc092ZXJyaWRlU2F2ZScsICd0cnVlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lvLnluZXlsIblj5fliLBkbeebkuWtkOWPguaVsOaOp+WItic7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfV1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6ICc8Zm9udCBjb2xvcj1cXFwiYmx1ZVxcXCI+JyArIHAub3duZXIubmFtZSArICc8L2ZvbnQ+JyxcXG4gICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvdXBIb21lXFxcIixcXG4gICAgICAgICAgICBpbWc6IHAub3duZXIuZmFjZSArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBtaWQ6IHAub3duZXIubWlkLFxcbiAgICAgICAgICAgICAgICB0aXRsZTogcC5vd25lci5uYW1lLFxcbiAgICAgICAgICAgICAgICBmYWNlOiBwLm93bmVyLmZhY2VcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiBwLnN0YXQubGlrZSxcXG4gICAgICAgICAgICBpbWc6IGhhc0xpa2UgPT0gMSA/IGltZ0xpbmsu5bey54K56LWeIDogaW1nTGluay7mnKrngrnotZ4sXFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIyNub0hpc3RvcnkjJykubGF6eVJ1bGUoKGFpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikubGlrZUxvZ2ljKGFpZClcXG4gICAgICAgICAgICB9LCBhaWQpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaWNvbl9zbWFsbF80XFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDogJ3NldExpa2UnXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiBwLnN0YXQuZmF2b3JpdGUsXFxuICAgICAgICAgICAgaW1nOiBoYXNGYXZvdXIgPyBpbWdMaW5rLuW3suaUtuiXjyA6IGltZ0xpbmsu5pyq5pS26JePLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChhaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgdXBNaWQgPSBKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvY3kvYmlsaS50eHRcXFwiKSkudXNlck1pZDtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmZhdm91ckxvZ2ljKGFpZCwgdXBNaWQpXFxuICAgICAgICAgICAgfSwgYWlkKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImljb25fc21hbGxfNFxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6ICdzZXRGYXZvdXInXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiAn56iN5ZCO5YaN55yLJyxcXG4gICAgICAgICAgICBpbWc6IGltZ0xpbmsu56iN5ZCO5YaN55yLLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChhaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmp1ZGdlVG92aWV3KGFpZClcXG4gICAgICAgICAgICB9LCBhaWQpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaWNvbl9zbWFsbF80XFxcIixcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogJ+afpeeci+ivhOiuuicsXFxuICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL0NvbW1lbnRzP3A9ZnlwYWdlJyxcXG4gICAgICAgICAgICBpbWc6IGltZ0xpbmsu5p+l55yL6K+E6K66LFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaWNvbl9zbWFsbF80XFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBcXFwiaWRcXFwiOiBhaWQsXFxuICAgICAgICAgICAgICAgIFxcXCJ0eXBlXFxcIjogMVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZV9ibGFuaydcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogJ+mAiembhuWIl+ihqCcsXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCIsXFxuICAgICAgICAgICAgZGVzYzonPHNtYWxsPjxzbWFsbD7lhbEnICsgcC52aWRlb3MgKyAn5p2h6KeG6aKRPC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICAgICAgaW1nOiBpbWdMaW5rLuWIl+ihqCxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICAgICAgfSk7XFxuICAgICAgICBwLnBhZ2VzLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgY2lkID0gaXRlbS5jaWQ7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0ucGFydCxcXG4gICAgICAgICAgICAgICAgZGVzYzpmb3JtYXRTZWNvbmRzKGl0ZW0uZHVyYXRpb24pLFxcbiAgICAgICAgICAgICAgICAvLyBpbWc6aW1nTGluay7liIZQ5YiX6KGo6aG5LFxcbiAgICAgICAgICAgICAgICBpbWc6aXRlbS5maXJzdF9mcmFtZSsnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGFpZCwgY2lkLCBxbikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmJpbGlMYXp5KGFpZCwgY2lkLCBxbikucmVwbGFjZSgvOy9nLCBcXFwi77yb77ybXFxcIik7XFxuICAgICAgICAgICAgICAgIH0sIGFpZCArIFxcXCJcXFwiLCBjaWQgKyBcXFwiXFxcIiwgJzExNicpLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOntcXG4gICAgICAgICAgICAgICAgICAgIGlkOidhaWQtJythaWQrJ3xjaWQtJytjaWQsXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSlcXG4gICAgfVxcbn0gY2F0Y2ggKGUpIHtcXG4g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sxXTtcXG4gICAgICAgICAgICBwb3N0KFxcXCJodHRwOi8vYXBpLmJpbGliaWxpLmNvbS94L3YyL3JlcGx5L2FkZFxcXCIsIHtcXG4gICAgICAgICAgICAgICAgYm9keToge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcInR5cGVcXFwiOiB0eXBlLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIm9pZFxcXCI6IGlkLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImNzcmZcXFwiOiBjc3JmLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIm1lc3NhZ2VcXFwiOiBpbnB1dFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiQ29va2llXFxcIjogSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGkudHh0XFxcIikpLmNvb2tpZVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICB9LCBpZCx0eXBlKVxcbiAgICB9KVxcbn1cXG5sZXQgZGF0YSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmdldENvbW1lbnRzKGlkLHR5cGUsTVlfUEFHRSk7XFxuLy8gbG9nKGRhdGEpO1xcbmlmKGRhdGEpe1xcbiAgICBkYXRhLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBpdGVtLm1lbWJlci51bmFtZSxcXG4gICAgICAgICAgICBpbWc6IGl0ZW0ubWVtYmVyLmF2YXRhcisnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICB1cmw6J2hpa2VyOi8vcGFnZS91cEhvbWUnLFxcbiAgICAgICAgICAgIGRlc2M6JzxzbWFsbD48c21hbGw+PGZvbnQgY29sb3I9XFxcImdyZXlcXFwiPicraXRlbS5yZXBseV9jb250cm9sLmxvY2F0aW9uICsgXFxcIiBcXFwiICsgaXRlbS5yZXBseV9jb250cm9sLnRpbWVfZGVzYysnPC9mb250Pjwvc21hbGw+PC9zbWFsbD4nLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBtaWQ6IGl0ZW0ubWVtYmVyLm1pZCxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0ubWVtYmVyLnVuYW1lLFxcbiAgICAgICAgICAgICAgICBmYWNlOiBpdGVtLm1lbWJlci5hdmF0YXJcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogaXRlbS5jb250ZW50Lm1lc3NhZ2UsXFxuICAgICAgICB9KVxcbiAgICB9KVxcbn1lbHNle1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6ICflpb3lg4/msqHmnInor4TorrrkuobllabvvIzvvIEnLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2NlbnRlcl8xXFxcIixcXG4gICAgfSlcXG59XFxuc2V0UmVzdWx0KGQpO1xcblwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi6K6i6ZiF5YiX6KGoXCIsXCJwYXRoXCI6XCJzdWJzY3JpcHRpb25cIixcInJ1bGVcIjpcImlmIChnZXRJdGVtKCforqLpmIXnsbvlnosnLCAnMScpID09ICcxJykge1xcblxcbsKgIMKgIHR5cGVyTmFtZSA9ICfov73nlaonO1xcblxcbn0gZWxzZSB7XFxuXFxuwqAgwqAgdHlwZXJOYW1lID0gJ+i/veWJpyc7XFxuXFxufVxcblxcbmQucHVzaCh7XFxuXFxuwqAgwqAgdGl0bGU6ICfov73nlaonID09IHR5cGVyTmFt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zyo55yLJylcXHJcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXHJcXG4gICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcclxcbiAgICAgICAgfSksXFxyXFxuICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxyXFxuICAgIH0pO1xcclxcbn1cXHJcXG5pZiAoZ2V0SXRlbSgn5pS26JeP57G75Z6LJywgJ+aIkeWIm+W7uueahOaUtuiXj+WkuScpID09ICfmiJHliJvlu7rnmoTmlLbol4/lpLknKSB7XFxyXFxuICAgIHRyeSB7XFxyXFxuICAgICAgICBpZiAocGFnZSA9PSAxKSB7XFxyXFxuICAgICAgICAgICAgZC5wdXNoKHtcXHJcXG4gICAgICAgICAgICAgICAgLy8gY29sX3R5cGU6ICdibGFua19ibG9jaydcXHJcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcclxcbiAgICAgICAgICAgIH0sICk7XFxyXFxuICAgICAgICB9XFxyXFxuICAgICAgICBjb2xsZWN0aW9ucyA9IEpTT04ucGFyc2UoZmV0Y2goXFxcImh0dHBzOi8vYXBpLmJpbGliaWxpLmNvbS94L3YzL2Zhdi9mb2xkZXIvbGlzdDRuYXZpZ2F0ZVxcXCIsIHtcXHJcXG4gICAgICAgICAgICBoZWFkZXJzOiB7XFxyXFxuICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWVcXHJcXG4gICAgICAgICAgICB9XFxyXFxuICAgICAgICB9KSkuZGF0YTtcXHJcXG4gICAgICAgIGdyb3VwcyA9IGNvbGxlY3Rpb25zWzBdLm1lZGlhTGlzdFJlc3BvbnNlLmxpc3Q7XFxyXFxuICAgICAgICBwdXRNeVZhcigndGVtcElkJywgSlNPTi5zdHJpbmdpZnkoZ3JvdXBzWzBdLmlkKSk7XFxyXFxuICAgICAgICBncm91cHMuZm9yRWFjaChsaXN0ID0+IHtcXHJcXG4gICAgICAgICAgICBkLnB1c2goe1xcclxcbiAgICAgICAgICAgICAgICB0aXRsZTogbGlzdC5pZCA9PSBnZXRJdGVtKCfmlLbol4/lpLknLCBKU09OLnN0cmluZ2lmeShncm91cHNbMF0uaWQpKSA/IFxcXCLigJzigJzigJ3igJ08Zm9udCBjb2xvcj0ncmVkJz5cXFwiICsgbGlzdC50aXRsZSArIFxcXCI8L2ZvbnQ+XFxcIiA6IGxpc3QudGl0bGUsXFxyXFxuICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMjbm9IaXN0b3J5IycpLmxhenlSdWxlKChsaXN0KSA9PiB7XFxyXFxuICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCfmlLbol4/lpLknLCBKU09OLnN0cmluZ2lmeShsaXN0LmlkKSk7XFxyXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXHJcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/liIfmjaLmlLbol4/lpLnkuLo6XFxcIiArIGxpc3QudGl0bGU7XFxyXFxuICAgICAgICAgICAgICAgIH0sIGxpc3QpLFxcclxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcclxcbiAgICAgICAgICAgIH0pO1xcclxcbiAgICAgICAgfSk7XFxyXFxuICAgICAgICBkLnB1c2goe1xcclxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXHJcXG4gICAgICAgIH0pO1xcclxcbiAgICAgICAgZ3JvdXBDb250ZW50ID0gSlNPTi5wYXJzZShmZXRjaChcXFwiaHR0cHM6Ly9hcGkuYmlsaWJpbGkuY29tL3gvdjMvZmF2L3Jlc291cmNlL2xpc3Q/bWVkaWFfaWQ9XFxcIiArIGdldEl0ZW0oJ+aUtuiXj+WkuScsIGdldE15VmFyKCd0ZW1wSWQnKSkgKyBcXFwiJnBuPVxcXCIgKyBwYWdlICsgXFxcIiZwcz0yMCZrZXl3b3JkPSZvcmRlcj1tdGltZSZ0eXBlPTAmdGlkPTAmcGxhdGZvcm09d2ViJmpzb25wPWpzb25wXFxcIiwge1xcclxcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXHJcXG4gICAgICAgICAgICAgICAgXFxcIkNvb2tpZVxcXCI6IGNvb2tpZVxcclxcbiAgICAgICAgICAgIH1cXHJcXG4gICAgICAgIH0pKS5kYXRhLm1lZGlhcztcXHJcXG4gICAgICAgIGdyb3VwQ29udGVudC5mb3JFYWNoKGxpc3QgPT4ge1xcclxcbiAgICAgICAgICAgIGQucHVzaCh7XFxyXFxuICAgICAgICAgICAgICAgIHRpdGxlOiBsaXN0LnRpdGxlLFxcclxcbiAgICAgICAgICAgICAgICBpbWc6IGxpc3QuY292ZXIgKyBcXFwiQFJlZmVyZXI9XFxcIixcXHJcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJyxcXHJcXG4gICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL3ZpZGVvXFxcIixcXHJcXG4gICAgICAgICAgICAgICAgZGVzYzogJ1VQOicgKyBsaXN0LnVwcGVyLm5hbWUgKyAnXFxcXG4nICsgbGlzdC5pbnRybyxcXHJcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXHJcXG4gICAgICAgICAgICAgICAgICAgIGFpZDogbGlzdC5pZCxcXHJcXG4gICAgICAgICAgICAgICAgICAgIG1pZDogbGlzdC51cHBlci5taWRcXHJcXG4gICAgICAgICAgICAgICAgfVxcclxcbiAgICAgICAgICAgIH0pO1xcclxcbiAgICAgICAgfSk7XFxyXFxuICAgIH0gY2F0Y2ggKGUpIHtcXHJcXG4gICAgICAgIHNob3dMb2FkaW5nKCflhYTlvJ/vvIzkvaDnoa7orqTkvaDmnInmlLbol4/lkJfvvIzlv6vljrvmlLbol4/kuIDkuKrop4bpopF+Jyk7XFxyXFxuICAgIH1cXHJcXG59IGVsc2Uge1xcclxcbiAgICBsYXRlclZpZXdzID0gSlNPTi5wYXJzZShmZXRjaChcXFwiaHR0cHM6Ly9hcGkuYmlsaWJpbGkuY29tL3gvdjIvaGlzdG9yeS90b3ZpZXcvd2ViP2pzb25wPWpzb25wXFxcIiwge1xcclxcbiAgICAgICAgaGVhZGVyczoge1xcclxcbiAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWVcXHJcXG4gICAgICAgIH1cXHJcXG4gICAgfSkpLmRhdGE7XFxyXFxuICAgIGNvdW50ID0gbGF0ZXJWaWV3cy5jb3VudDtcXHJcXG4gICAgZC5wdXNoKHtcXHJcXG4gICAgICAgIHRpdGxlOiBcXFwi5YWx5pyJXFxcIiArIGNvdW50ICsgXFxcIuadoeW+heeci+inhumikeiusOW9lVxcXCIsXFxyXFxuICAgICAgICB1cmw6IFxcXCJoaWtlcjovL2VtcHR5XFxcIixcXHJcXG4gICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCJcXHJcXG4gICAgfSk7XFxyXFxuICAgIGxhdGVyVmlld3MubGlzdC5mb3JFYWNoKGxpc3QgPT4ge1xcclxcbiAgICAgICAgZC5wdXNoKHtcXHJcXG4gICAgICAgICAgICB0aXRsZTogbGlzdC50aXRsZSxcXHJcXG4gICAgICAgICAgICBpbWc6IGxpc3QucGljICsgXFxcIkBSZWZlcmVyPVxcXCIsXFxyXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX2xlZnRfcGljJyxcXHJcXG4gICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvdmlkZW9cXFwiLFxcclxcbiAgICAgICAgICAgIGRlc2M6ICdVUDonICsgbGlzdC5vd25lci5uYW1lICsgJ1xcXFxuJyArIGxpc3QuZGVzYyxcXHJcXG4gICAgICAgICAgICBleHRyYToge1xcclxcbiAgICAgICAgICAgICAgICBhaWQ6IGxpc3QuYWlkLFxcclxcbiAgICAgICAgICAgICAgICBtaWQ6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gPSBbXTtcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBpbnRybyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibG9uZ190ZXh0XFxcIixcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICAgICAgICAgIH0sIGludHJvKVxcbiAgICAgICAgfSwgdmlkZW9EYXRhLmludHJvKSxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwicGljXzFcXFwiLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAnZG3nm5LlrZAnLCBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9zZXR0aW5nI25vSGlzdG9yeSM/cnVsZT1kbeebkuWtkCc7XFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+W8ueW5leaOp+WIticsIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChnZXRJdGVtKCdpc092ZXJyaWRlU2F2ZScsICdmYWxzZScpID09ICd0cnVlJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ2lzT3ZlcnJpZGVTYXZlJywgJ2ZhbHNlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W8ueW5leWwhuS4jeWPl2Rt55uS5a2Q5Y+C5pWw5o6n5Yi2JztcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgnaXNPdmVycmlkZVNhdmUnLCAndHJ1ZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lvLnluZXlsIblj5fliLBkbeebkuWtkOWPguaVsOaOp+WItic7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfV1cXG4gICAgICAgIH1cXG4gICAgfSwge1xcbiAgICAgICAgdGl0bGU6ICc8Zm9udCBjb2xvcj1cXFwiYmx1ZVxcXCI+JyArIHAub3duZXIubmFtZSArICc8L2ZvbnQ+JyxcXG4gICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS91cEhvbWVcXFwiLFxcbiAgICAgICAgaW1nOiBwLm93bmVyLmZhY2UgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIixcXG4gICAgICAgIGRlc2M6ICc8c21hbGw+PHNtYWxsPuWFseaciScgKyB2aWRlb0RhdGEuZXBfY291bnQgKyAn5p2h6KeG6aKR5pWw5o2uPC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIG1pZDogcC5vd25lci5taWQsXFxuICAgICAgICAgICAgdGl0bGU6IHAub3duZXIubmFtZSxcXG4gICAgICAgICAgICBmYWNlOiBwLm93bmVyLmZhY2VcXG4gICAgICAgIH1cXG4gICAgfSwge1xcbiAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICB9KTtcXG4gICAgdmFyIGluZGV4ID0gMTtcXG4gICAgc3RvcmFnZTAucHV0VmFyKCd2aWRlb1NlY3Rpb25zJywgdmlkZW9EYXRhLnNlY3Rpb25zKTtcXG4gICAgdmlkZW9EYXRhLnNlY3Rpb25zLmZvckVhY2goZWwgPT4ge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ/Cfk4EnICsgZWwudGl0bGUsXFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIyNub0hpc3RvcnkjJykubGF6eVJ1bGUoKGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgIGlmIChnZXRNeVZhcignaXNGb2xkXycraW5kZXgsICd5JykgPT0gJ3knKSB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignaXNGb2xkXycraW5kZXgsICduJyk7XFxuICAgICAgICAgICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoJ3NlY3Rpb24nICsgaW5kZXggKyAnLXBhcnQnKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lmipjlj6AnO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ2lzRm9sZF8nK2luZGV4LCAneScpO1xcbiAgICAgICAgICAgICAgICAgICAgdmlkZW9TZWN0aW9ucyA9IHN0b3JhZ2UwLmdldFZhcigndmlkZW9TZWN0aW9ucycpO1xcbiAgICAgICAgICAgICAgICAgICAgc2VjdGlvblBhcnRMaXN0ID0gW107XFxuICAgICAgICAgICAgICAgICAgICB2aWRlb1NlY3Rpb25zW2luZGV4IC0gMV0uZXBpc29kZXMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBhaWQgPSBpdGVtLmFpZDtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjaWQgPSBpdGVtLmNpZDtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzdGF0ID0gaXRlbS5hcmMuc3RhdDtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWN0aW9uUGFydExpc3QucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn4oCc4oCc4oCd4oCdXFxcXHRcXFxcdFxcXFx0PHNtYWxsPjwvZm9udD7ilrbvuI4nICsgaXRlbS50aXRsZSArICdcXFxcblxcXFx0XFxcXHRcXFxcdFxcXFx0XFxcXHQ8L2ZvbnQ+PC9zbWFsbD48c21hbGw+PHNtYWxsPjxmb250IGNvbG9yPWdyYXk+5pKt5pS+6YeP77yaJyArIHN0YXQudmlldyArICdcXFxcdFxcXFx0XFxcXHTlvLnluZXvvJonICsgc3RhdC5kYW5tYWt1ICsgJ1xcXFx0XFxcXHRcXFxcdOWWnOasou+8micgKyBzdGF0Lmxpa2UgKyAnPC9mb250Pjwvc21hbGw+PC9zbWFsbD4nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgoYWlkLCBjaWQsIHFuKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvYXBpXFxcIikuYmlsaUxhenkoYWlkLCBjaWQsIHFuKS5yZXBsYWNlKC87L2csIFxcXCLvvJvvvJtcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgYWlkICsgXFxcIlxcXCIsIGNpZCArIFxcXCJcXFwiLCAnMTE2JyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8xXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHsgbGluZVZpc2libGU6IGZhbHNlLCBjbHM6ICdzZWN0aW9uJyArIGluZGV4ICsgJy1wYXJ0JyxpZDonYWlkLScrYWlkKyd8Y2lkLScrY2lkIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBhZGRJdGVtQWZ0ZXIoJ1NlY3Rpb24nICsgaW5kZXgsIHNlY3Rpb25QYXJ0TGlzdCk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5bGV5byAJztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sIGluZGV4KSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMScsXFxuICAgICAgICAgICAgZXh0cmE6IHsgaWQ6ICdTZWN0aW9uJyArIGluZGV4IH1cXG4gICAgICAgIH0pO1xcbiAgICAgICAgZWwuZXBpc29kZXMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICBhaWQgPSBpdGVtLmFpZDtcXG4gICAgICAgICAgICBjaWQgPSBpdGVtLmNpZDtcXG4gICAgICAgICAgICBzdGF0ID0gaXRlbS5hcmMuc3RhdDtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnVxcXFx0XFxcXHRcXFxcdDxzbWFsbD48L2ZvbnQ+4pa277iOJyArIGl0ZW0udGl0bGUgKyAnXFxcXG5cXFxcdFxcXFx0XFxcXHRcXFxcdFxcXFx0PC9mb250Pjwvc21hbGw+PHNtYWxsPjxzbWFsbD48Zm9udCBjb2xvcj1ncmF5PuaSreaUvumHj++8micgKyBzdGF0LnZpZXcgKyAnXFxcXHRcXFxcdFxcXFx05by55bmV77yaJyArIHN0YXQuZGFubWFrdSArICdcXFxcdFxcXFx0XFxcXHTllpzmrKLvvJonICsgc3RhdC5saWtlICsgJzwvZm9udD48L3NtYWxsPjwvc21hbGw+JyxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGFpZCwgY2lkLCBxbikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaVxcXCIpLmJpbGlMYXp5KGFpZCwgY2lkLCBxbikucmVwbGFjZSgvOy9nLCBcXFwi77yb77ybXFxcIik7XFxuICAgICAgICAgICAgICAgIH0sIGFpZCArIFxcXCJcXFwiLCBjaWQgKyBcXFwiXFxcIiwgJzExNicpLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMVxcXCIsXFxuICAgICAgICAgICAgICAgIGV4d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lKGBoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L3R1Ymlhby8ke2l0ZW19LnN2Z2AsIGJhc2U2NFRvSGV4KHd1ZGFbaXRlbV0pKTtcXG4gICAgICAgICAgICBsb2coYOWIneWni+WMluesrCR7aW5kZXgrK33kuKrlm77moIc6JHtpdGVtfS4uLmApO1xcbiAgICAgICAgfVxcbiAgICAgICAgZm9yIChsZXQgaXRlbSBpbiBiaWxpKSB7XFxuICAgICAgICAgICAgd3JpdGVIZXhGaWxlKGBoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L2JpbGlfcGljLyR7aXRlbX0ucG5nYCwgYmFzZTY0VG9IZXgoYmlsaVtpdGVtXSkpO1xcbiAgICAgICAgICAgIGxvZyhg5Yid5aeL5YyW56ysJHtpbmRleCsrfeS4quWbvuaghzoke2l0ZW19Li4uYCk7XFxuICAgICAgICB9XFxuICAgICAgICBzaG93TG9hZGluZygn5Zu+5qCH5Yid5aeL5YyW5a6M5oiQ77ya5YWx6K6hJyArIGluZGV4ICsgJ+S4quWbvuaghycpO1xcbiAgICAgICAgaGlkZUxvYWRpbmcoKTtcXG4gICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgc2hvd0xvYWRpbmcoJ+Wbvuagh+WIneWni+WMluWksei0pScpO1xcbiAgICAgICAgbG9nKCflm77moIfliJ3lp4vljJblpLHotKU6JyArIGUpO1xcbiAgICAgICAgaGlkZUxvYWRpbmcoKTtcXG4gICAgfVxcblxcbn07XFxuXCJ9XSIsImljb24iOiJoaWtlcjovL2ZpbGVzL3J1bGVzL2N5L3R1Ymlhby9iaWxpYmlsaS5zdmciLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment