Advertisement
xiaomianao666

邀您一起看:酷扑TV

Dec 15th, 2021
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥酷扑TV@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIkpTT07mjqXlj6PmlbDmja5cIixcInBhdGhcIjpcIlJlc0NvZGVcIixcInJ1bGVcIjpcIntbXX1cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuaQnOe0olwiLFwicGF0aFwiOlwic2VhclwiLFwicnVsZVwiOlwidmFyIHJlcyA9IHt9O1xcbnZhciBpdGVtcyA9IFtdO1xcbi8v6K6+572u5pCc57Si57q/56iLXFxudmFyIHNzbW9kZSA9IEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vZmlsZXMvcnVsZXMveHlxL2FwcG1zZXQuanNvbicsIHt9KSkuc3Ntb2RlO1xcbnZhciBrZXkgPSBNWV9VUkwuc3BsaXQoJyQkJCcpWzFdO1xcbi8vc2V0RXJyb3IobGUpO1xcbmlmIChzc21vZGUgPT0gJzAnKSB7XFxuICAgIHNldFBhZ2VUaXRsZShrZXkgKyAnIOeahOaQnOe0oue7k+aenCcpXFxufTtcXG4vL3ZhciBodG1sID0gSlNPTi5wYXJzZShKU09OL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ICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGxpc3QgPSBKU09OLnBhcnNlKGspXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcblxcblxcbiAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IE1ZX1RZUEUgPT0gXFxcImhvbWVcXFwiID8gXFxcIueCueWHu+afpeeciyBcXFwiICsgdHl0aXQgKyBcXFwiIOWIhuexuyDigJzigJxcXFwiICsga2V5ICsgXFxcIuKAneKAnSDnmoTogZrmkJznu5PmnpxcXFwiIDogXFxcIueCueWHu+afpeeciyBcXFwiICsgdHl0aXQgKyBcXFwiIOWIhuexuyBcXFwiICsga2V5ICsgXFxcIiDnmoTogZrmkJznu5PmnpxcXFwiLFxcbiAgICAgICAgICAgIHVybDogJCgnaGlrZXI6Ly9lbXB0eSQkJCcgKyBrZXkgKyAnJCQkZnlwYWdlJCQkJykucnVsZSgobGlzdCwgdHl0aXQpID0+IHtcXG4gICAgICAgICAgICAgICAgdmFyIHJlcyA9IHt9O1xcbiAgICAgICAgICAgICAgICB2YXIgaXRlbXMgPSBbXTtcXG4gICAgICAgICAgICAgICAgLy/lj5bmkJzntKLnur/nqIvorr7nva5cXG4gICAgICAgICAgICAgICAgdmFyIHNzeGMgPSBKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL2ZpbGVzL3J1bGVzL3h5cS9hcHBtc2V0Lmpzb24nLCB7fSkpLnNzY291bnQ7XFxuICAgICAgICAgICAgICAgIC8v6K6+572u6LaF5pe25pe26Ze077yM6LaK5bCP6LaK5b+r77yM5Y2V5L2N5q+r56eSXFxuICAgICAgICAgICAgICAgIC8vdmFyIHRpbWVvdSA9IDUwMDA7XFxuICAgICAgICAgICAgICAgIHZhciBrZXkgPSBNWV9VUkwuc3BsaXQoJyQkJCcpWzFdO1xcbiAgICAgICAgICAgICAgICB2YXIgbnVtID0gTVlfVVJMLnNwbGl0KCckJCQnKVsyXTtcXG4gICAgICAgICAgICAgICAgdmFyIGxlID0gcGFyc2VJbnQobnVtICogc3N4Yyk7XFxuICAgICAgICAgICAgICAgIHZhciBEYXRhID0gW107XFxuICAgICAgICAgICAgICAgIHZhciBUaXQgPSBbXTtcXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IGxlIC0gc3N4YzsgaiA8IGxlOyBqKyspIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChqIDwgbGlzdC5sZW5ndGgpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgbGluayA9IGxpc3Rbal0udXJsO1xcblxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvQVBQ5b2x6KeGLy50ZXN0KHR5dGl0KSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobGluay5pbmRleE9mKCdhcGkucGhwL2FwcC8nKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGhtdXJsID0gbGluayArICdzZWFyY2g/cGc9MSZ0ZXh0PScgKyBrZXkgKyAnJnRva2VuPSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobGluay5pbmRleE9mKCd4Z2FwcC5waHAvdjEvJykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBobXVybCA9IGxpbmsgKyAnc2VhcmNoP3BnPTEmdGV4dD0nICsga2V5O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9pb3Blbnl1bi8udGVzdChsaW5rKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBobXVybCA9IGxpbmsgKyAnL2xpc3Q/cGFnZT1meXBhZ2UmbGltaXQ9MTAmd2Q9JyArIGtleTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGhtdXJsID0gbGluayArICc/cGFnZT0xJmxpbWl0PTEwJndkPScgKyBrZXk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9UVuW9seinhi8udGVzdCh0eXRpdCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC8xOWp4fDI5M3lzfHpoYWlrYW55c3xqaVxcXFwtZGluZ1xcXFwtaGV8cGhvZWJlfHl1bmJvXFxcXC5ieGlufGxhbnJlbnRrfGhldGFveXN8cHh1bnwxMzlcXFxcLjE1NXxma2tkeXwwNTYxNTh8YWl4aXhpfHJ1b3hpbmV3fGZlaWZhbjEyM3xzaXFpdHYvLnRlc3QobGluaykpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBobXVybCA9IGxpbmsgKyAnP2FjPWxpc3Qmem09JyArIGtleSArICcmcGFnZT0xJztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBobXVybCA9IGxpbmsgKyAnP2FjPWxpc3Qmd2Q9JyArIGtleSArICcmcGFnZT0xJztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAvL0RhdGEucHVzaCh7dXJsOiBobXVybCxvcHRpb25zOiB7aGVhZGVyczoge1xcXCJVc2VyLUFnZW50XFxcIjogXFxcIkRhcnQvMi4xMyAoZGFydDppbylcXFwifSx0aW1lb3V0OiB0aW1lb3V9fSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgRGF0YS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBobXVybCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogXFxcIkRhcnQvMi4xMyAoZGFydDppbylcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBUaXQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdDogbGlzdFtqXS50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluazogbGluayxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwbm06IHR5dGl0XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB9IC8vaWZcXG4gICAgICAgICAgICAgICAgfSAvL2ZvciBqXFxuXFxuICAgICAgICAgICAgICAgIC8vLS0t5Luj56CB5YiG55WM57q/LS0tLSBcXG4gICAgICAgICAgICAgICAgaWYgKERhdGEgIT0gJycpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBiaHRtbCA9IGJhdGNoRmV0Y2goRGF0YSk7XFxuICAgICAgICAgICAgICAgICAgICAvL3dyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy94eXEvYXBwRXJyb3IuanNvblxcXCIsSlNPTi5zdHJpbmdpZnkoYmh0bWwpKTtcXG5cXG4gICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGsgPSAwOyBrIDwgYmh0bWwubGVuZ3RoOyBrKyspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IGJodG1sW2tdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vbG9nKGh0bWwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWwgPSBodG1sLnN1YnN0cmluZygwLCAyKSA9PSAnXFxcXHJcXFxcbicgPyBodG1sLnJlcGxhY2UoJ1xcXFxyXFxcXG4nLCAnJykgOiBodG1sO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9idHdhZi8udGVzdChodG1sKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sID0gZmV0Y2goRGF0YVtrXS51cmwgKyAnJmJ0d2FmJyArIGh0bWwubWF0Y2goL2J0d2FmKC4qPylcXFxcXFxcIi8pWzFdLCB7fSk7XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChodG1sID09IFxcXCJcXFwiIHx8IGh0bWwgPT0gbnVsbCB8fCBodG1sLnN1YnN0cmluZygwLCA1KSA9PSAnZXJyb3InIHx8ICFodG1sLnN0YXJ0c1dpdGgoJ3snKSkge1xcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBUaXRba10udGl0ICsgJyAnICsgJ+acquaQnOe0ouWIsO+8jOeCueWHu+iuv+mXruWOn+e9kemhtScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IERhdGFba10udXJsICsgYEBsYXp5UnVsZT0uanM6aW5wdXQuc3BsaXQoJzsnKVswXWAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMSdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChodG1sLmxlbmd0aCA8IDgwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFRpdFtrXS50aXQgKyAnICcgKyAn6L+U5Zue5pWw5o2u5LiN5a6M5pW077yM54K55Ye76K6/6Zeu5Y6f572R6aG1JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogRGF0YVtrXS51cmwgKyBgQGxhenlSdWxlPS5qczppbnB1dC5zcGxpdCgnOycpWzBdYCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF8xJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IEpTT04ucGFyc2UoaHRtbCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vbG9nKGh0bWwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdHlwZXQgPSBUaXRba10udHlwbm07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0ZG9taW4gPSBUaXRba10ubGluaztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGh0bWwubGlzdCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGxpc3QgPSBodG1sLmxpc3Q7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaHRtbC5kYXRhLmxpc3QpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsaXN0ID0gaHRtbC5kYXRhLmxpc3Q7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaHRtbC5kYXRhKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IGh0bWwuZGF0YTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsaXN0ID0gW107XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxpc3QubGVuZ3RoIDwgMSkge1xcblxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFRpdFtrXS50aXQgKyAnICcgKyAn5YiX6KGo5bCP5LqOMe+8jOaXoOazleWxleekuu+8jOeCueWHu+iuv+mXruWOn+e9kemhtScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBEYXRhW2tdLnVybCArIGBAbGF6eVJ1bGU9LmpzOmlucHV0LnNwbGl0KCc7JylbMF1gLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF8xJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxpc3QubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoL1RW5b2x6KeGLy50ZXN0KHR5cGV0KSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSBsaXN0W2ldLnRpdGxlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGljID0gbGlzdFtpXS5waWM7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSBsaXN0W2ldLm5leHRsaW5rO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVtID0gbGlzdFtpXS5zdGF0ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9BUFDlvbHop4YvLnRlc3QodHlwZXQpKSB7XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0ZG9taW4uaW5kZXhPZignYXBpLnBocC9hcHAvJykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IGxpc3RbaV0udm9kX25hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGljID0gbGlzdFtpXS52b2RfcGljO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9mYW50dWFuLy50ZXN0KHRkb21pbikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmlkID0gJ2h0dHBzOi8vZmFudHVhbi53a2ZpbGUuY29tL2FwaS5waHAvYXBwL3ZpZGVvX2RldGFpbD9pZD0nICsgbGlzdFtpXS52b2RfaWQgKyAnJnRva2VuPSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSB0ZG9taW4gKyAndmlkZW9fZGV0YWlsP2lkPScgKyBsaXN0W2ldLnZvZF9pZCArICcmdG9rZW49JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZW0gPSBsaXN0W2ldLnZvZF9yZW1hcmtzO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy92YXIgY29uPWxpc3RbaV0udHlwZS50eXBlX2RlcztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0ZG9taW4uaW5kZXhPZigneGdhcHAucGhwL3YxLycpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSBsaXN0W2ldLnZvZF9uYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBpYyA9IGxpc3RbaV0udm9kX3BpYztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSB0ZG9taW4gKyAndmlkZW9fZGV0YWlsP2lkPScgKyBsaXN0W2ldLnZvZF9pZDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZW0gPSBsaXN0W2ldLnZvZF9yZW1hcmtzO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy92YXIgY29uPWxpc3RbaV0udHlwZS50eXBlX2RlcztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IGxpc3RbaV0udm9kX25hbWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGljID0gbGlzdFtpXS52b2RfcGljO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9pb3Blbnl1bi8udGVzdCh0ZG9taW4pKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHZpZCA9IHRkb21pbiArICcvZGV0YWlsSUQ/dm9kX2lkPScgKyBsaXN0W2ldLnZvZF9pZCArICcmdG9rZW49JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHZpZCA9IHRkb21pbiArICcvZGV0YWlsP3ZvZF9pZD0nICsgbGlzdFtpXS52b2RfaWQgKyAnJnRva2VuPSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVtID0gbGlzdFtpXS52b2RfcmVtYXJrcztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vdmFyIGNvbj1saXN0W2ldLnR5cGUudHlwZV9kZXM7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy92YXIgY29uPWxpc3RbaV0uc3RhdGU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9sb2codmlkKTtcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IE1ZX1RZUEUgPT0gXFxcImhvbWVcXFwiID8gdGl0bGUucmVwbGFjZShrZXksICfigJzigJwnICsga2V5ICsgJ+KAneKAnScpICsgJ1xcXFxuJyArIHJlbSA6IHRpdGxlICsgcmVtLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBwaWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHZpZCArICc7Z2V0O3V0Zi04O3tVc2VyLUFnZW50QERhcnQvMi4xMyAoZGFydDppbyl9JykucnVsZSgodHlwZXQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZXMgPSB7fTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBpdGVtcyA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGh0bWwgPSBKU09OLnBhcnNlKGdldFJlc0NvZGUoKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJzI1NSYmZmxvYXQnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd4NV93ZWJ2aWV3X3NpbmdsZSdcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG15dXJsID0gTVlfVVJMLm1hdGNoKC8oW1xcXFxTXSo/OlxcXFwvXFxcXC9bXFxcXFNdKj8pXFxcXC8vKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvQVBQ5b2x6KeGLy50ZXN0KHR5cGV0KSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL2FwcG1vdmxpc3QnLCB7fSkpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvVFblvbHop4YvLnRlc3QodHlwZXQpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL3BhZ2UvdHZtb3ZsaXN0Jywge30pKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcy5kYXRhID0gaXRlbXM7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRIb21lUmVzdWx0KHJlcyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHR5cGV0KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9jb250ZW50OiByZW0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IHR5cGV0ICsgJyA9PiAnICsgVGl0W2tdLnRpdCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX3ZlcnRpY2FsX3BpYydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gLy9mb3IgaVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IC8vaWYgbGlzdC5sZW5ndGhcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9IC8vZm9yIGsgYmh0bWwubGVuZ3RoXFxuICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgcmVzLmRhdGEgPSBpdGVtcztcXG4gICAgICAgICAgICAgICAgc2V0SG9tZVJlc3VsdChyZXMpO1xcbiAgICAgICAgICAgIH0sIGxpc3QsIHR5dGl0KSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMSdcXG4gICAgICAgIH0pO1xcblxcbiAgICB9IC8vZm9yIGlcXG59OyAvL2VuZCBtb2RlIDFcXG5cXG5pZiAoc3Ntb2RlID09ICcwJyB8fCBNWV9UWVBFID09ICdob21lJykge1xcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IGRsaXN0Lmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICB2YXIgbGlzdCA9IGRsaXN0W2ldLmxpc3Q7XFxuICAgICAgICB2YXIgdHl0aXQgPSBkbGlzdFtpXS50aXRsZVxcbiAgICAgICAgaWYgKHJhbmRvbSkge1xcbiAgICAgICAgICAgIGxldCBrID0gZ2V0VmFyKE1ZX1JVTEUudGl0bGUgKyBcXFwiLVxcXCIgKyB0eXRpdCwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgIGlmIChrID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICAgIGxpc3QgPSByYW5kb21Tb3J0MyhsaXN0KVxcbiAgICAgICAgICAgICAgICBwdXRWYXIoTVlfUlVMRS50aXRsZSArIFxcXCItXFxcIiArIHR5dGl0LCBKU09OLnN0cmluZ2lmeShsaXN0KSlcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBsaXN0ID0gSlNPTi5wYXJzZShrKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBNWV9UWVBFID09IFxcXCJob21lXFxcIiA/IFxcXCIg6YCJ5oup5LiA5LiqIFxcXCIrZGxpc3RbaV0udGl0bGUrXFxcIiDpobnnm67mn6XnnIsg4oCc4oCcXFxcIiArIGtleSArIFxcXCLigJ3igJ0g55qE5pCc57Si57uT5p6cXFxcIiA6IFxcXCIg6YCJ5oup5LiA5LiqIFxcXCIrZGxpc3RbaV0udGl0bGUrXFxcIiDpobnnm67mn6XnnIsgXFxcIiArIGtleSArIFxcXCIg55qE5pCc57Si57uT5p6cXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMSdcXG4gICAgICAgIH0pO1xcblxcbiAgICAgICAgZm9yICh2YXIgaiA9IDA7IGogPCBsaXN0Lmxlbmd0aDsgaisrKSB7XFxuICAgICAgICAgICAgdmFyIGxpbmsgPSBsaXN0W2pdLnVybDtcXG5cXG4gICAgICAgICAgICBpZiAoL0FQUOW9seinhi8udGVzdCh0eXRpdCkpIHtcXG4gICAgICAgICAgICAgICAgaWYgKGxpbmsuaW5kZXhPZignYXBpLnBocC9hcHAvJykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBobXVybCA9IGxpbmsgKyAnc2VhcmNoP3BnPWZ5cGFnZSZ0ZXh0PScgKyBrZXkgKyAnJnRva2VuPSc7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobGluay5pbmRleE9mKCd4Z2FwcC5waHAvdjEvJykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBobXVybCA9IGxpbmsgKyAnc2VhcmNoP3BnPWZ5cGFnZSZ0ZXh0PScgKyBrZXk7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoL2lvcGVueXVuLy50ZXN0KGxpbmspKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGhtdXJsID0gbGluayArICcvbGlzdD9wYWdlPWZ5cGFnZSZsaW1pdD0xMCZ3ZD0nICsga2V5O1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJz9wYWdlPWZ5cGFnZSZsaW1pdD0xMCZ3ZD0nICsga2V5O1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBlbHNlIGlmICgvVFblvbHop4YvLnRlc3QodHl0aXQpKSB7XFxuICAgICAgICAgICAgICAgIGlmICgvMTlqeHwyOTN5c3x6aGFpa2FueXN8amlcXFxcLWRpbmdcXFxcLWhlfHBob2ViZXx5dW5ib1xcXFwuYnhpbnxsYW5yZW50a3xoZXRhb3lzfHB4dW58MTM5XFxcXC4xNTV8ZmtrZHl8MDU2MTU4fGFpeGl4aXxydW94aW5ld3xmZWlmYW4xMjN8c2lxaXR2Ly50ZXN0KGxpbmspKSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJz9hYz1saXN0JnptPScgKyBrZXkgKyAnJnBhZ2U9ZnlwYWdlJztcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBobXVybCA9IGxpbmsgKyAnP2FjPWxpc3Qmd2Q9JyArIGtleSArICcmcGFnZT1meXBhZ2UnO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogbGlzdFtqXS50aXRsZSxcXG4gICAgICAgICAgICAgICAgaW1nOiBsaXN0W2pdLmltZyxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCdoaWtlcjovL2VtcHR5I3gjJyArIGhtdXJsICsgJyN4IycgKyBsaW5rICsgJyN4IycgKyB0eXRpdCArICcjeCMnICsga2V5ICsgJyN4IycpLnJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgJC5yZXF1a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O3V0Zi04O3tVc2VyLUFnZW50QERhcnQvMi4xMyAoZGFydDppbyl9JztcXG4gICAgfVxcbiAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgIHBpY191cmw6IGltZyArICdAUmVmZXJlcj0nLFxcbiAgICAgICAgdXJsOiAkKGxpbmspLnJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgIHZhciByZXMgPSB7fTtcXG4gICAgICAgICAgICB2YXIgaXRlbXMgPSBbXTtcXG4gICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICcnLFxcbiAgICAgICAgICAgICAgICBkZXNjOiAnMjU1JiZmbG9hdCcsXFxuICAgICAgICAgICAgICAgIHVybDogJycsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAneDVfd2Vidmlld19zaW5nbGUnXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgcmVmcmVzaFg1V2ViVmlldygnJyk7XFxuICAgICAgICAgICAgdmFyIGh0bWwgPSBKU09OLnBhcnNlKGdldFJlc0NvZGUoKSk7XFxuICAgICAgICAgICAgdmFyIG15dXJsID0gTVlfVVJMLm1hdGNoKC8oW1xcXFxTXSo/OlxcXFwvXFxcXC9bXFxcXFNdKj8pXFxcXC8vKVsxXTtcXG4gICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9hcHBtb3ZsaXN0Jywge30pKS5ydWxlKTtcXG4gICAgICAgICAgICByZXMuZGF0YSA9IGl0ZW1zO1xcbiAgICAgICAgICAgIHNldEhvbWVSZXN1bHQocmVzKTtcXG4gICAgICAgIH0pLFxcbiAgICAgICAgZGVzYzogZGVzYyxcXG4gICAgICAgIGNvbF90eXBlOiAnbW92aWVfM19tYXJxdWVlJ1xcbiAgICB9KTtcXG59XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXC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gICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGppZWsgPSBcXFwiXFxcIjtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvL3NldEVycm9yKGppZWspOyAgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGNhdGNoIChlKSB7fVxcbiAgICAgICAgaWYgKGppZWsgIT0gJycgJiYgamllayAhPSBudWxsKSB7XFxuICAgICAgICAgICAgaWYgKGppZWsuc3Vic3RyaW5nKDAsIDQpID09ICdodHRwJykge1xcbiAgICAgICAgICAgICAgICBqaWVrID0gamllaztcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGppZWsuc3Vic3RyaW5nKDAsIDIpID09ICdcXFxcL1xcXFwvJykge1xcbiAgICAgICAgICAgICAgICBqaWVrID0gJ2h0dHBzOicgKyBqaWVrO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIC8v5a+55aSx5pWI5o6l5Y+j6L+b6KGM5pu/5o2iXFxuICAgICAgICBpZiAoL2Nva2Vtdi8udGVzdChteXVybCkgJiYgL2Nva2VxaWV8eGlufDkwbW0vLnRlc3QocHRhYikpIHtcXG4gICAgICAgICAgICBqaWVrID0gJ2h0dHBzOi8vcGxheWVyLjkwbW0ubWUvcGxheS5waHA/dXJsPSc7XFxuICAgICAgICB9IGVsc2UgaWYgKC9qc29uXFxcXC5tM3U4XFxcXC50di8udGVzdChqaWVrKSkge1xcbiAgICAgICAgICAgIGppZWsgPSAnaHR0cHM6Ly9qeC5tM3U4LnR2L2ppZXhpLz91cmw9JztcXG4gICAgICAgIH0gZWxzZSBpZiAoL2NqdDUyMS8udGVzdChteXVybCkpIHtcXG4gICAgICAgICAgICBqaWVrID0gY29udHNbaV0ucGxheWVyX2luZm8ucGFyc2U7XFxuICAgICAgICB9XFxuICAgICAgICAvL+WjsOaYjumTvuaOpVxcbiAgICAgICAgdmFyIGxpbmsgPSBqaWVrICsgdmxpbms7XFxuICAgICAgICBpZiAoL1xcXFwubTN1OHxcXFxcLm1wNHxvYmpcXFxcL3Rvcy8udGVzdCh2bGluaykgJiYgL2h0dHAvLnRlc3QodmxpbmspKSB7XFxuICAgICAgICAgICAgbGluayA9IHZsaW5rO1xcbiAgICAgICAgfVxcbiAgICAgICAgLy9sb2cobGluayk7XFxuICAgICAgICBpZiAobGlzdC5sZW5ndGggPD0gNCkge1xcbiAgICAgICAgICAgIHZhciBjbHQgPSAndGV4dF8yJztcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdmFyIGNsdCA9IGlzTmFOKHRpdGxlKSA/ICdmbGV4X2J1dHRvbicgOiAndGV4dF81J1xcbiAgICAgICAgfTtcXG4gICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgocHRhYiwgbGluaywgbXl1cmwpID0+IHtcXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gb3BlbnVybChyZXN1cmwpIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXN1cmwubWF0Y2goL3lvdWt1fG1ndHZ8aXhpZ3VhfHFxLmNvbXxxaXlpfG1pZ3V8YmlsaWJpbGl8c29odXxwcHR2fGxlfDE5MDUuY29tLykgJiYgcmVzdXJsLnNlYXJjaCgvaHRtbHxiaWxpYmlsaS8pICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGVuRG4gPSBKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL2ZpbGVzL3J1bGVzL3h5cS9hcHBtc2V0Lmpzb24nLCB7fSkpLmVuRG47XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGVuRG4gPT0gJzEnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZygn6LCD55So5pat5o+S6Kej5p6QJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoXFxcInZhciBjb25maWcgPVxcXCIgKyBmZXRjaChcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeVBhcnNlU2V0Lmpzb25cXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoZmV0Y2goY29uZmlnLmNqKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBheXRtUGFyc2UocmVzdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdXJsXFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VybFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICB2YXIgc3JjdXJsID0gbGluaztcXG4gICAgICAgICAgICAgICAgLy9sb2coc3JjdXJsKTtcXG4gICAgICAgICAgICAgICAgLy/liqjmgIHop6PmnpDku6PnoIHlvIDlp4tcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgIC8v5aSE55CG5oyH5a6a6KeG6aKR5LiO57q/6LevXFxuICAgICAgICAgICAgICAgICAgICBpZiAoL1xcXFwubTN1OHxcXFxcLm1wNHxvYmpcXFxcL3Rvcy8udGVzdChzcmN1cmwpICYmIC9odHRwLy50ZXN0KHNyY3VybCkgJiYgIS9cXFxcLmh0bWwvLnRlc3Qoc3JjdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvd2tmaWxlLy50ZXN0KHNyY3VybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNyY3VybCArICc7e1JlZmVyZXJAaHR0cHM6Ly9mYW50dWFuLndrZmlsZS5jb20vfSdcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9kdW9kdW96eS8udGVzdChwdGFiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIganNvbiA9IGZldGNoKCdodHRwczovL3BsYXllci5kdW9kdW96eS5jb20vZGRwbGF5L2FwaS5waHA/dXJsPScgKyBzcmN1cmwsIHt9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04ucGFyc2UoanNvbikudXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAvXFxcXD0vLnRlc3Qoc3JjdXJsKSA/IHNyY3VybC5zcGxpdCgnPScpWzFdIDogc3JjdXJsICsgJyNpc1ZpZGVvPXRydWUjJztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHNyY3VybC5pbmRleE9mKFxcXCIvc2hhcmUvXFxcIikgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbGluayA9IHNyY3VybC5zcGxpdChcXFwiL3NoYXJlXFxcIilbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBmYyA9IGZldGNoKHNyY3VybCwge30pLnJlcGxhY2UoXFxcInZhciBwdXJsXFxcIiwgXFxcInZhciBtYWluXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmYy5pbmRleE9mKFxcXCJtYWluXFxcIikgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBtYXQgPSBmYy5tYXRjaCgvdmFyIG1haW4uKj87LylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKG1hdCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGxheSA9IChtYWluLmluZGV4T2YoXFxcImh0dHBcXFwiKSAhPSAtMSA/IG1haW4gOiBsaW5rICsgbWFpbik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbWFpbiA9IGZjLm1hdGNoKC91cmw6Lio/W1xcXFwnXFxcXFxcXCJdKC4qPylbXFxcXCdcXFxcXFxcIl0vKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwbGF5ID0gKG1haW4uaW5kZXhPZihcXFwiaHR0cFxcXCIpICE9IC0xID8gbWFpbiA6IGxpbmsgKyBtYWluKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGxheTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAneDVXZWJWaWV3Oi8vJyArIChzcmN1cmwpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8v5rGf5rmW5b2x6KeG57q/6LevXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHB0YWIgPT0gJ3JlbnJlbm1pJyAmJiBteXVybC5zZWFyY2goL2poZHl3LykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IHJlcXVlc3QoJ2h0dHBzOi8vY2FjaGUxLmpoZHl3LnZpcDo4MDkxL3JybWkucGhwP3VybD0nICsgc3JjdXJsLnNwbGl0KCd1cmw9JylbMV0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vbG9nKGh0bWwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKGh0bWwpLnVybDtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocHRhYiA9PSAnZnFmaWxtJyAmJiBteXVybC5zZWFyY2goL2poZHl3LykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2h0dHBzOi8vd3d3LmpoZHl3LnZpcC9qaWV4aS9mcS5waHA/dXJsPScgKyBzcmN1cmwuc3BsaXQoJ3VybD0nKVsxXSArICcmbmV4dD0nO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwdGFiID09ICdycnNwJyAmJiBteXVybC5zZWFyY2goL2poZHl3LykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2h0dHBzOi8vd3d3LmpoZHl3LnZpcC9qaWV4aS9yci5waHA/dXJsPScgKyBzcmN1cmwuc3BsaXQoJ3VybD0nKVsxXSArICcmbmV4dD0nO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvamh5dW5cXFxcLnBocC8udGVzdChzcmN1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy9yZXR1cm4gJ3g1V2ViVmlldzovLycrc3JjdXJsLnJlcGxhY2UoJ2h0dHA6Ly9zdmlwLmpoeXVuLmp4LmNuOjEyMzQvamh5dW4ucGhwP3VybD0nLCAnaHR0cHM6Ly9hcGkuamhkeXcudmlwLz91cmw9Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGpobGluID0gc3JjdXJsLnJlcGxhY2UoJ2h0dHA6Ly9zdmlwLmpoeXVuLmp4LmNuOjEyMzQvamh5dW4ucGhwP3VybD0nLCAnaHR0cHM6Ly9hcGkuamhkeXcudmlwLz91cmw9Jyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBhcnNlRG9tRm9ySHRtbChyZXF1ZXN0KGpobGluKSwgJyN2aWRlbyYmc291cmNlJiZzcmMnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL+axn+a5lue6v+i3r+e7k+adn1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwdGFiID09ICdhbGl6eScpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgcHVybCA9IGZldGNoKCdodHRwczovL2ZvdWJpbi5jb20vamlleGkucGhwP3VybD0nICsgc3JjdXJsLnNwbGl0KCd1cmw9JylbMV0sIHt9KS5tYXRjaCgvXFxcXFxcXCJ1cmxcXFxcXFxcIjpcXFxcXFxcIiguKj8pXFxcXFxcXCIvKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHVybDtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoLzk4M3ZpcC8udGVzdChzcmN1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04ucGFyc2UoZmV0Y2goc3JjdXJsLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogTU9CSUxFX1VBXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZGlyZWN0OiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aEhlYWRlcnM6IHRydWVcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSkuaGVhZGVycy5sb2NhdGlvblswXTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL3hcXFxcLW5cXFxcLmNjfG5oZHo2NjYvLnRlc3Qoc3JjdXJsKSAmJiAvXFxcXC5odG1sfGJpbGliaWxpLy50ZXN0KHNyY3VybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3BlbnVybChzcmN1cmwuc3Vic3RyaW5nKHNyY3VybC5pbmRleE9mKCc9aHR0cCcpICsgMSkpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgLy/lpITnkIbmjIflrprop4bpopHlkoznur/ot6/nu5PmnZ9cXG4gICAgICAgICAgICAgICAgICAgIC8vLS0tLeWIhuWJsue6vy0tLS0vL1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNjb2RlID0gSlNPTi5wYXJzZShmZXRjaChzcmN1cmwsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogXFxcIkRhcnQvMi4xMyAoZGFydDppbylcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWRpcmVjdDogZmFsc2UsXFxuICAgICAgICAgICAgICAgICAgICAgICAgd2l0aFN0YXR1c0NvZGU6IHRydWVcXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcXG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKHNjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChzY29kZS5zdGF0dXNDb2RlID09ICczMDInIHx8IHNjb2RlLnN0YXR1c0NvZGUgPT0gJzMwMScpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL+aJk+W8gOino+aekOaciTMwMumHjeWumuWQkeeahOmTvuaOpVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZWR1cmwgPSBzY29kZS5oZWFkZXJzLmxvY2F0aW9uWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXD1odHRwLy50ZXN0KHJlZHVybCkgJiYgL2h0bWx8YmlsaWJpbGkvLnRlc3QocmVkdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gSlNPTi5wYXJzZShmZXRjaChyZWR1cmwsIHt9KSkudXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL1xcXFw9aHR0cC8udGVzdChyZWR1cmwpICYmIC9cXFxcLm0zdTh8XFxcXC5tcDR8XFxcXC5mbHYvLnRlc3QocmVkdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVkdXJsLnN1YnN0cmluZyhyZWR1cmwuaW5kZXhPZignPWh0dHAnKSArIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZWR1cmxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vdmFyIGh0bWwgPSByZXF1ZXN0KHNyY3VybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGh0bWwgPSBzY29kZS5ib2R5O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXDxib2R5Ly50ZXN0KGh0bWwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZygn5bCd6K+V572R6aG16Kej5p6QJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmVDYWNoZSgnaHR0cHM6Ly9jb2RlLmFsaXl1bi5jb20vbHprMjM1NTkvUHVibGljUnVsZS9yYXcvbWFzdGVyL3g1cnVsZS5qcycsIDI0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHg1cnVsZShzcmN1cmwsc3JjdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9yZXR1cm4gb3BlbnVybChzcmN1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vanNvbuino+aekOeahOWPlumTvuaOpVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcHVybCA9IGh0bWwubWF0Y2goL1tcXFxcJ1xcXFxcXFwiXXVybFtcXFxcJ1xcXFxcXFwiXTouKj9bXFxcXCdcXFxcXFxcIl0oLio/KVtcXFxcJ1xcXFxcXFwiXS8pWzFdLnJlcGxhY2UoL1xcXFxcXFxcL2csICcnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9odHRwLy50ZXN0KHB1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocHRhYiA9PSAnYmlsaWJpbGknKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmwgKyAnO3tSZWZlcmVyQGh0dHBzOi8vd3d3LmJpbGliaWxpLmNvbS8mJlVzZXItQWdlbnRATW96aWxsYS81LjB9JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocHRhYiA9PSAnbWd0dicpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHVybCArICcjaXNWaWRlbz10cnVlIycgKyAnO3tSZWZlcmVyQHd3dy5tZ3R2LmNvbSYmVXNlci1BZ2VudEBNb3ppbGxhLzUuMH0nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHVybCArICcjaXNWaWRlbz10cnVlIydcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL1xcXFw9aHR0cC8udGVzdChzcmN1cmwpICYmIC9cXFxcLmh0bWx8YmlsaWJpbGkvLnRlc3Qoc3JjdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9wZW51cmwoc3JjdXJsLnN1YnN0cmluZyhzcmN1cmwuaW5kZXhPZignPWh0dHAnKSArIDEpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v6Z2eaHR0cOW8gOWktOeahOaJk+W8gOWOn+mTvuaOpSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKHNyY3VybC5zdWJzdHJpbmcoc3JjdXJsLmluZGV4T2YoJz1odHRwJykgKyAxKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgLy/miqXplJnliKTmlq3lpITnkIZcXG4gICAgICAgICAgICAgICAgICAgIGlmIChzcmN1cmwuc3Vic3RyaW5nKDAsIDIpID09ICdcXFxcL1xcXFwvJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKCdodHRwczonICsgc3JjdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL1xcXFw9aHR0cC8udGVzdChzcmN1cmwpICYmIC9cXFxcLmh0bWx8YmlsaWJpbGkvLnRlc3Qoc3JjdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vcmV0dXJuIHNyY3VybC5zcGxpdCgnPScpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKHNyY3VybC5zdWJzdHJpbmcoc3JjdXJsLmluZGV4T2YoJz1odHRwJykgKyAxKSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKHNyY3VybClcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL3JldHVybiAneDVXZWJWaWV3Oi8vJytzcmN1cmxcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvL+WKqOaAgeino+aekOS7o+eggee7k+adn1xcbiAgICAgICAgICAgIH0sIHB0YWIsIGxpbmssIG15dXJsKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogY2x0XFxuICAgICAgICB9KTtcXG4gICAgfVxcbn1cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIlRW566A5LuL5LiO6YCJ6ZuGXCIsXCJwYXRoXCI6XCJ0dm1vdmxpc3RcIixcInJ1bGVcIjpcInZhciB0YWJzID0gT2JqZWN0LmtleXMoaHRtbC52aWRlb2xpc3QpO1xcbnZhciB0aHVtYiA9IGh0bWwuaW1nX3VybDtcXG5ldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9kbnBsdWdpbicsIHt9KSkucnVsZSk7XFxuaXRlbXMucHVzaCh7XFxuICAgIHRpdGxlOiAn5Ymn5oOF566A5LuL77yaJyxcXG4gICAgZGVzYzogaHRtbC5pbnRybyxcXG4gICAgcGljX3VybDogdGh1bWIsXFxuICAgIHVybDogZG5wdWcsXFxuICAgIGNvbF90eXBlOiAnbW92aWVfMV92ZXJ0aWNhbF9waWMnXFxufSk7XFxuXFxuZm9yICh2YXIgaSA9IDA7IGkgPCB0YWJzLmxlbmd0aDsgaSsrKSB7XFxuICAgIHZhciBsaXN0ID0gaHRtbC52aWRlb2xpc3RbdGFic1tpXV07XFxuICAgIHZhciBwdGFiID0gdGFic1tpXTtcXG4gICAgaXRlbXMucHVzaCh7XFxuICAgICAgICB0aXRsZTogcHRhYiArICcg8J+UlycgKyBbaSArIDFdICsgJy8nICsgW3RhYnMubGVuZ3RoXSxcXG4gICAgICAgIGNvbF90eXBlOiAndGV4dF8xJ1xcbiAgICB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ICcxJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coJ+iwg+eUqOaWreaPkuino+aekCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKFxcXCJ2YXIgY29uZmlnID1cXFwiICsgZmV0Y2goXFxcImhpa2VyOi8vZmlsZXMvY2FjaGUvTXlQYXJzZVNldC5qc29uXFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHJlc3VybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VybFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXN1cmxcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICAgICAgLy9sb2coc3JjdXJsKTtcXG4gICAgICAgICAgICAgICAgLy/liqjmgIHop6PmnpDku6PnoIHlvIDlp4tcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXC5tM3U4fFxcXFwubXA0fG9ialxcXFwvdG9zLy50ZXN0KHNyY3VybCkgJiYgL2h0dHAvLnRlc3Qoc3JjdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAvXFxcXD0vLnRlc3Qoc3JjdXJsKSA/IHNyY3VybC5zcGxpdCgnPScpWzFdIDogc3JjdXJsICsgJyNpc1ZpZGVvPXRydWUjJztcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3JjdXJsLmluZGV4T2YoXFxcIi9zaGFyZS9cXFwiKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsaW5rID0gc3JjdXJsLnNwbGl0KFxcXCIvc2hhcmVcXFwiKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGZjID0gZmV0Y2goc3JjdXJsLCB7fSkucmVwbGFjZShcXFwidmFyIHB1cmxcXFwiLCBcXFwidmFyIG1haW5cXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZjLmluZGV4T2YoXFxcIm1haW5cXFwiKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG1hdCA9IGZjLm1hdGNoKC92YXIgbWFpbi4qPzsvKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwobWF0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwbGF5ID0gKG1haW4uaW5kZXhPZihcXFwiaHR0cFxcXCIpICE9IC0xID8gbWFpbiA6IGxpbmsgKyBtYWluKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBtYWluID0gZmMubWF0Y2goL3VybDouKj9bXFxcXCdcXFxcXFxcIl0oLio/KVtcXFxcJ1xcXFxcXFwiXS8pWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBsYXkgPSAobWFpbi5pbmRleE9mKFxcXCJodHRwXFxcIikgIT0gLTEgPyBtYWluIDogbGluayArIG1haW4pXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwbGF5O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd4NVdlYlZpZXc6Ly8nICsgKHNyY3VybClcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHB0YWIgPT0gJ2FsaXp5Jykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwdXJsID0gZmV0Y2goJ2h0dHBzOi8vZm91YmluLmNvbS9qaWV4aS5waHA/dXJsPScgKyBzcmN1cmwsIHt9KS5tYXRjaCgvXFxcXFxcXCJ1cmxcXFxcXFxcIjpcXFxcXFxcIiguKj8pXFxcXFxcXCIvKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHVybDtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoLzE5anhcXFxcLnZpcHxuZnlpbmdzaGkvLnRlc3Qoc3JjdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwdXJsID0gSlNPTi5wYXJzZShmZXRjaChzcmN1cmwucmVwbGFjZSgnaHR0cDovLycsICdodHRwczovLycpLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogTU9CSUxFX1VBXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZGlyZWN0OiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aEhlYWRlcnM6IHRydWVcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSkuaGVhZGVycy5sb2NhdGlvblswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoL3RpdGFuLm1ndHYvLnRlc3QocHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmwgKyAnI2lzVmlkZW89dHJ1ZSMnICsgJzt7UmVmZXJlckB3d3cubWd0di5jb20mJlVzZXItQWdlbnRATW96aWxsYS81LjB9JztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9vYmpcXFxcL3Rvcy8udGVzdChwdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHVybCArICcjaXNWaWRlbz10cnVlIyc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICAgICAgLy8tLS0t5YiG5Ymy57q/LS0tLS8vXFxuICAgICAgICAgICAgICAgICAgICB2YXIgc2NvZGUgPSBKU09OLnBhcnNlKGZldGNoKHNyY3VybCwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBNT0JJTEVfVUFcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZGlyZWN0OiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB3aXRoU3RhdHVzQ29kZTogdHJ1ZVxcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNjb2RlLnN0YXR1c0NvZGUgPT0gJzMwMicgfHwgc2NvZGUuc3RhdHVzQ29kZSA9PSAnMzAxJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwdXJsID0gc2NvZGUuaGVhZGVycy5sb2NhdGlvblswXTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy92YXIgaHRtbCA9IHJlcXVlc3Qoc3JjdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IHNjb2RlLmJvZHk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy9sb2coaHRtbCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9cXFxcXFxcInVybFxcXFxcXFwiXFxcXDpcXFxcXFxcImh0dHAvLnRlc3QoaHRtbCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHB1cmwgPSBodG1sLm1hdGNoKC9cXFxcXFxcInVybFxcXFxcXFwiOlxcXFxcXFwiKC4qPylcXFxcXFxcIi8pWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaHRtbC5zdGFydHNXaXRoKCd7JykpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHB1cmwgPSBzcmN1cmwuc3Vic3RyaW5nKHNyY3VybC5pbmRleE9mKCc9aHR0cCcpICsgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy92YXIgcHVybCA9IHNyY3VybFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlQ2FjaGUoJ2h0dHBzOi8vY29kZS5hbGl5dW4uY29tL2x6azIzNTU5L1B1YmxpY1J1bGUvcmF3L21hc3Rlci94NXJ1bGUuanMnLCAyNCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB4NXJ1bGUoc3JjdXJsLHNyY3VybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vcmV0dXJuICd4NVdlYlZpZXc6Ly8nKyhzcmN1cmwpIFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGlmICgvdGl0YW4ubWd0di8udGVzdChwdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsICsgJyNpc1ZpZGVvPXRydWUjJyArICc7e1JlZmVyZXJAd3d3Lm1ndHYuY29tJiZVc2VyLUFnZW50QE1vemlsbGEvNS4wfSc7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9vYmpcXFxcL3Rvcy8udGVzdChwdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsICsgJyNpc1ZpZGVvPXRydWUjJztcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmxcXG4gICAgICAgICAgICAgICAgICAgIH07XFxuXFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChzcmN1cmwuc3Vic3RyaW5nKDAsIDIpID09ICdcXFxcL1xcXFwvJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKCdodHRwczonICsgc3JjdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL1xcXFw9aHR0cC8udGVzdChzcmN1cmwpICYmIC9cXFxcLmh0bWx8YmlsaWJpbGkvLnRlc3Qoc3JjdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vcmV0dXJuIHNyY3VybC5zcGxpdCgnPScpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKHNyY3VybC5zdWJzdHJpbmcoc3JjdXJsLmluZGV4T2YoJz1odHRwJykgKyAxKSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKHNyY3VybClcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvL+WKqOaAgeino+aekOS7o+eggee7k+adn1xcbiAgICAgICAgIC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aHRtbC5saXN0O1xcbiAgICB9IGVsc2UgaWYgKGh0bWwuZGF0YS5saXN0KSB7XFxuICAgICAgICB2YXIgbGlzdCA9IGh0bWwuZGF0YS5saXN0O1xcbiAgICB9IGVsc2UgaWYgKGh0bWwuZGF0YSkge1xcbiAgICAgICAgdmFyIGxpc3QgPSBodG1sLmRhdGE7XFxuICAgIH1cXG5cXG4gICAgaWYgKGxpc3QubGVuZ3RoIDwgMSkge1xcbiAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICfmnKrmkJzntKLliLDvvIzngrnlh7vorr/pl67ljp/nvZHpobUnLFxcbiAgICAgICAgICAgIHVybDogc3BsWzFdICsgYEBsYXp5UnVsZT0uanM6aW5wdXQuc3BsaXQoJzsnKVswXWAsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnXFxuICAgICAgICB9KTtcXG4gICAgfSBlbHNlIHtcXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGlzdC5sZW5ndGg7IGkrKykge1xcblxcbiAgICAgICAgICAgIGlmICgvQVBQ5b2x6KeGLy50ZXN0KHR5cGV0KSkge1xcbiAgICAgICAgICAgICAgICBpZiAodGRvbWluLmluZGV4T2YoJ2FwaS5waHAvYXBwLycpICE9IC0xKSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSBsaXN0W2ldLnZvZF9uYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHBpYyA9IGxpc3RbaV0udm9kX3BpYztcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvZmFudHVhbi8udGVzdCh0ZG9taW4pKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHZpZCA9ICdodHRwczovL2ZhbnR1YW4ud2tmaWxlLmNvbS9hcGkucGhwL2FwcC92aWRlb19kZXRhaWw/aWQ9JyArIGxpc3RbaV0udm9kX2lkICsgJyZ0b2tlbj0nO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmlkID0gdGRvbWluICsgJ3ZpZGVvX2RldGFpbD9pZD0nICsgbGlzdFtpXS52b2RfaWQgKyAnJnRva2VuPSc7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB2YXIgcmVtID0gbGlzdFtpXS52b2RfcmVtYXJrcztcXG4gICAgICAgICAgICAgICAgICAgIC8vdmFyIGNvbj1saXN0W2ldLnR5cGUudHlwZV9kZXM7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodGRvbWluLmluZGV4T2YoJ3hnYXBwLnBocC92MS8nKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gbGlzdFtpXS52b2RfbmFtZTtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBwaWMgPSBsaXN0W2ldLnZvZF9waWM7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgdmlkID0gdGRvbWluICsgJ3ZpZGVvX2RldGFpbD9pZD0nICsgbGlzdFtpXS52b2RfaWQ7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgcmVtID0gbGlzdFtpXS52b2RfcmVtYXJrcztcXG4gICAgICAgICAgICAgICAgICAgIC8vdmFyIGNvbj1saXN0W2ldLnR5cGUudHlwZV9kZXM7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSBsaXN0W2ldLnZvZF9uYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHBpYyA9IGxpc3RbaV0udm9kX3BpYztcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvaW9wZW55dW4vLnRlc3QodGRvbWluKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSB0ZG9taW4gKyAnL2RldGFpbElEP3ZvZF9pZD0nICsgbGlzdFtpXS52b2RfaWQgKyAnJnRva2VuPSc7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSB0ZG9taW4gKyAnL2RldGFpbD92b2RfaWQ9JyArIGxpc3RbaV0udm9kX2lkICsgJyZ0b2tlbj0nO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlbSA9IGxpc3RbaV0udm9kX3JlbWFya3M7XFxuICAgICAgICAgICAgICAgICAgICAvL3ZhciBjb249bGlzdFtpXS50eXBlLnR5cGVfZGVzO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBlbHNlIGlmICgvVFblvbHop4YvLnRlc3QodHlwZXQpKSB7XFxuICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IGxpc3RbaV0udGl0bGU7XFxuICAgICAgICAgICAgICAgIHZhciBwaWMgPSBsaXN0W2ldLnBpYztcXG4gICAgICAgICAgICAgICAgLy92YXIgdmlkPXRkb21pbisnL2RldGFpbD92b2RfaWQ9JytsaXN0W2ldLm5leHRsaW5rKycmcmVsX2xpbWl0PTEwJztcXG4gICAgICAgICAgICAgICAgdmFyIHZpZCA9IGxpc3RbaV0ubmV4dGxpbms7XFxuICAgICAgICAgICAgICAgIHZhciByZW0gPSBsaXN0W2ldLnN0YXRlO1xcbiAgICAgICAgICAgICAgICAvL3ZhciBjb249bGlzdFtpXS5zdGF0ZTtcXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZS5yZXBsYWNlKGtleSwgJ+KAnOKAnCcgKyBrZXkgKyAn4oCd4oCdJyksXFxuICAgICAgICAgICAgICAgIHBpY191cmw6IHBpYyArICdAUmVmZXJlcj0nLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQodmlkKyc7Z2V0O3V0Zi04O3tVc2VyLUFnZW50QERhcnQvMi4xMyAoZGFydDppbyl9JykucnVsZSgodHlwZXQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciByZXMgPSB7fTtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBpdGVtcyA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGh0bWwgPSBKU09OLnBhcnNlKGdldFJlc0NvZGUoKSk7XFxuICAgICAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJzI1NSYmZmxvYXQnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJycsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd4NV93ZWJ2aWV3X3NpbmdsZSdcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFg1V2ViVmlldygnJyk7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgbXl1cmwgPSBNWV9VUkwubWF0Y2goLyhbXFxcXFNdKj86XFxcXC9cXFxcL1tcXFxcU10qPylcXFxcLy8pWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKC9BUFDlvbHop4YvLnRlc3QodHlwZXQpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL3BhZ2UvYXBwbW92bGlzdCcsIHt9KSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9UVuW9seinhi8udGVzdCh0eXBldCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS90dm1vdmxpc3QnLCB7fSkpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmVzLmRhdGEgPSBpdGVtcztcXG4g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zZSB7XFxuICAgICAgICAgICAgaWYgKC9pb3Blbnl1bi8udGVzdChtdXJsKSkge1xcbiAgICAgICAgICAgICAgICB2YXIgbGluayA9IG11cmwgKyAnL2RldGFpbElEP3ZvZF9pZD0nICsgdXJsICsgJyZyZWxfbGltaXQ9MTA7Z2V0O3V0Zi04O3tVc2VyLUFnZW50QERhcnQvMi4xMyAoZGFydDppbyl9JztcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB2YXIgbGluayA9IG11cmwgKyAndmlkZW9fZGV0YWlsP2lkPScgKyB1cmwgKyAnJnRva2VuPTtnZXQ7dXRmLTg7e1VzZXItQWdlbnRARGFydC8yLjEzIChkYXJ0OmlvKX0nO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICBwaWNfdXJsOiBpbWcgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICB1cmw6ICQobGluaykucnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgIHZhciByZXMgPSB7fTtcXG4gICAgICAgICAgICAgICAgdmFyIGl0ZW1zID0gW107XFxuICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICcnLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogJzI1NSYmZmxvYXQnLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAnJyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAneDVfd2Vidmlld19zaW5nbGUnXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoWDVXZWJWaWV3KCcnKTtcXG4gICAgICAgICAgICAgICAgdmFyIGh0bWwgPSBKU09OLnBhcnNlKGdldFJlc0NvZGUoKSk7XFxuICAgICAgICAgICAgICAgIHZhciBte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gn55S15b2xJui/nue7reWJpybnu7zoibom5Yqo5ryrJykuc3BsaXQoJyYnKTtcXG4gICAgICAgIHZhciB0eXBsID0gKCdtb3ZpZSZ0dnBsYXkmdHZzaG93JmNvbWljJykuc3BsaXQoJyYnKTtcXG5cXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgdHlwdC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgIHZhciB0eXVybCA9IG11cmwgKyAnP2FjPWxpc3QmY2xhc3M9JyArIHR5cGxbaV0gKyAnJnBhZ2U9ZnlwYWdlJmFyZWE9JnR5cGU9JnN0YXJ0PSc7XFxuICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0eXB0W2ldLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQodHl1cmwpLnJ1bGUoKG11cmwpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciByZXMgPSB7fTtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBpdGVtcyA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIG11cmwgPSBtdXJsO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGh0bWwgPSBKU09OLnBhcnNlKGdldFJlc0NvZGUoKSk7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS90dmxpc3RkYXRhJywge30pKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJlcy5kYXRhID0gaXRlbXM7XFxuICAgICAgICAgICAgICAgICAgICBzZXRIb21lUmVzdWx0KHJlcyk7XFxuICAgICAgICAgICAgICAgIH0sIG11cmwpLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2ZsZXhfYnV0dG9uJ1xcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9XFxuICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2xpb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sICsgXFxcIm5hdj90b2tlbj1cXFwiLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogXFxcIkRhcnQvMi4xMyAoZGFydDppbylcXFwiXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBpZiAodHlwY29kZS5pbmRleE9mKCfmo4DmtYvkuK0nKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICB0eXBjb2RlID0gZmV0Y2gobXVybCArIFxcXCJuYXY/dG9rZW49XFxcIiArICcmYnR3YWYnICsgdHlwY29kZS5tYXRjaCgvYnR3YWYoLio/KVxcXFxcXFwiLylbMV0sIHt9KTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIHR5cGVjID0gSlNPTi5wYXJzZSh0eXBjb2RlKS5kYXRhO1xcblxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICB2YXIgdHlwY29kZSA9IHJlcXVlc3QobXVybCArIFxcXCIvdHlwZXNcXFwiLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogXFxcIkRhcnQvMi4xMyAoZGFydDppbylcXFwiXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBpZiAodHlwY29kZS5pbmRleE9mKCfmo4DmtYvkuK0nKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICB0eXBjb2RlID0gZmV0Y2gobXVybCArIFxcXCIvdHlwZXNcXFwiICsgJz9idHdhZicgKyB0eXBjb2RlLm1hdGNoKC9idHdhZiguKj8pXFxcXFxcXCIvKVsxXSwge30pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB2YXIgdHlwZWMgPSBKU09OLnBhcnNlKHR5cGNvZGUpLmRhdGEubG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MucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0eXB0W2ldLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQodHl1cmwpLnJ1bGUoKG11cmwpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciByZXMgPSB7fTtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBpdGVtcyA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIG11cmwgPSBtdXJsO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlc2NvZGUgPSBnZXRSZXNDb2RlKCk7XFxuICAgICAgICAgICAgICAgICAgICBpZiAocmVzY29kZS5pbmRleE9mKCfmo4DmtYvkuK0nKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc2NvZGUgPSBmZXRjaChNWV9VUkwgKyAnJmJ0d2FmJyArIHJlc2NvZGUubWF0Y2goL2J0d2FmKC4qPylcXFxcXFxcIi8pWzFdLCB7fSk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IEpTT04ucGFyc2UocmVzY29kZSk7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9hcHBsaXN0ZGF0YScsIHt9KSkucnVsZSk7XFxuXFxuICAgICAgICAgICAgICAgICAgICByZXMuZGF0YSA9IGl0ZW1zO1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SG9tZVJlc3VsdChyZXMpO1xcbiAgICAgICAgICAgICAgICB9LCBtdXJsKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbidcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfVxcbiAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICAgICAgfSk7XFxuICAgIH0gY2F0Y2ggKGUpIHt9XFxuXFx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ZnlwYWdlJCQkJykucnVsZSgobGlzdCwgdHl0aXQpID0+IHtcXFxcbiAgICAgICAgICAgICAgICB2YXIgcmVzID0ge307XFxcXG4gICAgICAgICAgICAgICAgdmFyIGl0ZW1zID0gW107XFxcXG4gICAgICAgICAgICAgICAgLy/lj5bmkJzntKLnur/nqIvorr7nva5cXFxcbiAgICAgICAgICAgICAgICB2YXIgc3N4YyA9IEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vZmlsZXMvcnVsZXMveHlxL2FwcG1zZXQuanNvbicsIHt9KSkuc3Njb3VudDtcXFxcbiAgICAgICAgICAgICAgICAvL+iuvue9rui2heaXtuaXtumXtO+8jOi2iuWwj+i2iuW/q++8jOWNleS9jeavq+enklxcXFxuICAgICAgICAgICAgICAgIC8vdmFyIHRpbWVvdSA9IDUwMDA7XFxcXG4gICAgICAgICAgICAgICAgdmFyIGtleSA9IE1ZX1VSTC5zcGxpdCgnJCQkJylbMV07XFxcXG4gICAgICAgICAgICAgICAgdmFyIG51bSA9IE1ZX1VSTC5zcGxpdCgnJCQkJylbMl07XFxcXG4gICAgICAgICAgICAgICAgdmFyIGxlID0gcGFyc2VJbnQobnVtICogc3N4Yyk7XFxcXG4gICAgICAgICAgICAgICAgdmFyIERhdGEgPSBbXTtcXFxcbiAgICAgICAgICAgICAgICB2YXIgVGl0ID0gW107XFxcXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaiA9IGxlIC0gc3N4YzsgaiA8IGxlOyBqKyspIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGogPCBsaXN0Lmxlbmd0aCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGxpbmsgPSBsaXN0W2pdLnVybDtcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9BUFDlvbHop4YvLnRlc3QodHl0aXQpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxpbmsuaW5kZXhPZignYXBpLnBocC9hcHAvJykgIT0gLTEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGhtdXJsID0gbGluayArICdzZWFyY2g/cGc9MSZ0ZXh0PScgKyBrZXkgKyAnJnRva2VuPSc7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChsaW5rLmluZGV4T2YoJ3hnYXBwLnBocC92MS8nKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJ3NlYXJjaD9wZz0xJnRleHQ9JyArIGtleTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoL2lvcGVueXVuLy50ZXN0KGxpbmspKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJy9saXN0P3BhZ2U9ZnlwYWdlJmxpbWl0PTEwJndkPScgKyBrZXk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJz9wYWdlPTEmbGltaXQ9MTAmd2Q9JyArIGtleTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL1RW5b2x6KeGLy50ZXN0KHR5dGl0KSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvMTlqeHwyOTN5c3x6aGFpa2FueXN8amlcXFxcXFxcXC1kaW5nXFxcXFxcXFwtaGV8cGhvZWJlfHl1bmJvXFxcXFxcXFwuYnhpbnxsYW5yZW50a3xoZXRhb3lzfHB4dW58MTM5XFxcXFxcXFwuMTU1fGZra2R5fDA1NjE1OHxhaXhpeGl8cnVveGluZXd8ZmVpZmFuMTIzfHNpcWl0di8udGVzdChsaW5rKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJz9hYz1saXN0JnptPScgKyBrZXkgKyAnJnBhZ2U9MSc7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGhtdXJsID0gbGluayArICc/YWM9bGlzdCZ3ZD0nICsga2V5ICsgJyZwYWdlPTEnO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vRGF0YS5wdXNoKHt1cmw6IGhtdXJsLG9wdGlvbnM6IHtoZWFkZXJzOiB7XFxcXFxcXCJVc2VyLUFnZW50XFxcXFxcXCI6IFxcXFxcXFwiRGFydC8yLjEzIChkYXJ0OmlvKVxcXFxcXFwifSx0aW1lb3V0OiB0aW1lb3V9fSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBEYXRhLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogaG11cmwsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uczoge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIlVzZXItQWdlbnRcXFxcXFxcIjogXFxcXFxcXCJEYXJ0LzIuMTMgKGRhcnQ6aW8pXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgVGl0LnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdDogbGlzdFtqXS50aXRsZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5rOiBsaW5rLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cG5tOiB0eXRpdFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gLy9pZlxcXFxuICAgICAgICAgICAgICAgIH0gLy9mb3IgalxcXFxuXFxcXG4gICAgICAgICAgICAgICAgLy8tLS3ku6PnoIHliIbnlYznur8tLS0tIFxcXFxuICAgICAgICAgICAgICAgIGlmIChEYXRhICE9ICcnKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHZhciBiaHRtbCA9IGJhdGNoRmV0Y2goRGF0YSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIC8vd3JpdGVGaWxlKFxcXFxcXFwiaGlrZXI6Ly9maWxlcy9ydWxlcy94eXEvYXBwRXJyb3IuanNvblxcXFxcXFwiLEpTT04uc3RyaW5naWZ5KGJodG1sKSk7XFxcXG5cXFxcbiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgayA9IDA7IGsgPCBiaHRtbC5sZW5ndGg7IGsrKykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGh0bWwgPSBiaHRtbFtrXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vbG9nKGh0bWwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sID0gaHRtbC5zdWJzdHJpbmcoMCwgMikgPT0gJ1xcXFxcXFxcclxcXFxcXFxcbicgPyBodG1sLnJlcGxhY2UoJ1xcXFxcXFxcclxcXFxcXFxcbicsICcnKSA6IGh0bWw7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9idHdhZi8udGVzdChodG1sKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWwgPSBmZXRjaChEYXRhW2tdLnVybCArICcmYnR3YWYnICsgaHRtbC5tYXRjaCgvYnR3YWYoLio/KVxcXFxcXFxcXFxcXFxcXCIvKVsxXSwge30pO1xcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaHRtbCA9PSBcXFxcXFxcIlxcXFxcXFwiIHx8IGh0bWwgPT0gbnVsbCB8fCBodG1sLnN1YnN0cmluZygwLCA1KSA9PSAnZXJyb3InIHx8ICFodG1sLnN0YXJ0c1dpdGgoJ3snKSkge1xcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBUaXRba10udGl0ICsgJyAnICsgJ+acquaQnOe0ouWIsO+8jOeCueWHu+iuv+mXruWOn+e9kemhtScsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogRGF0YVtrXS51cmwgKyBgQGxhenlSdWxlPS5qczppbnB1dC5zcGxpdCgnOycpWzBdYCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG5cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaHRtbC5sZW5ndGggPCA4MCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogVGl0W2tdLnRpdCArICcgJyArICfov5Tlm57mlbDmja7kuI3lrozmlbTvvIzngrnlh7vorr/pl67ljp/nvZHpobUnLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IERhdGFba10udXJsICsgYEBsYXp5UnVsZT0uanM6aW5wdXQuc3BsaXQoJzsnKVswXWAsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF8xJ1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IEpTT04ucGFyc2UoaHRtbCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9sb2coaHRtbCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHR5cGV0ID0gVGl0W2tdLnR5cG5tO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0ZG9taW4gPSBUaXRba10ubGluaztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaHRtbC5saXN0KSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsaXN0ID0gaHRtbC5saXN0O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaHRtbC5kYXRhLmxpc3QpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGxpc3QgPSBodG1sLmRhdGEubGlzdDtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGh0bWwuZGF0YSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IGh0bWwuZGF0YTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IFtdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobGlzdC5sZW5ndGggPCAxKSB7XFxcXG5cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogVGl0W2tdLnRpdCArICcgJyArICfliJfooajlsI/kuo4x77yM5peg5rOV5bGV56S677yM54K55Ye76K6/6Zeu5Y6f572R6aG1JyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogRGF0YVtrXS51cmwgKyBgQGxhenlSdWxlPS5qczppbnB1dC5zcGxpdCgnOycpWzBdYCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF8xJ1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGlzdC5sZW5ndGg7IGkrKykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9UVuW9seinhi8udGVzdCh0eXBldCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSBsaXN0W2ldLnRpdGxlO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwaWMgPSBsaXN0W2ldLnBpYztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmlkID0gbGlzdFtpXS5uZXh0bGluaztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVtID0gbGlzdFtpXS5zdGF0ZTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL0FQUOW9seinhi8udGVzdCh0eXBldCkpIHtcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0ZG9taW4uaW5kZXhPZignYXBpLnBocC9hcHAvJykgIT0gLTEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gbGlzdFtpXS52b2RfbmFtZTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBpYyA9IGxpc3RbaV0udm9kX3BpYztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9mYW50dWFuLy50ZXN0KHRkb21pbikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSAnaHR0cHM6Ly9mYW50dWFuLndrZmlsZS5jb20vYXBpLnBocC9hcHAvdmlkZW9fZGV0YWlsP2lkPScgKyBsaXN0W2ldLnZvZF9pZCArICcmdG9rZW49JztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSB0ZG9taW4gKyAndmlkZW9fZGV0YWlsP2lkPScgKyBsaXN0W2ldLnZvZF9pZCArICcmdG9rZW49JztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVtID0gbGlzdFtpXS52b2RfcmVtYXJrcztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy92YXIgY29uPWxpc3RbaV0udHlwZS50eXBlX2RlcztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRkb21pbi5pbmRleE9mKCd4Z2FwcC5waHAvdjEvJykgIT0gLTEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gbGlzdFtpXS52b2RfbmFtZTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBpYyA9IGxpc3RbaV0udm9kX3BpYztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHZpZCA9IHRkb21pbiArICd2aWRlb19kZXRhaWw/aWQ9JyArIGxpc3RbaV0udm9kX2lkO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVtID0gbGlzdFtpXS52b2RfcmVtYXJrcztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy92YXIgY29uPWxpc3RbaV0udHlwZS50eXBlX2RlcztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGl0bGUgPSBsaXN0W2ldLnZvZF9uYW1lO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGljID0gbGlzdFtpXS52b2RfcGljO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoL2lvcGVueXVuLy50ZXN0KHRkb21pbikpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSB0ZG9taW4gKyAnL2RldGFpbElEP3ZvZF9pZD0nICsgbGlzdFtpXS52b2RfaWQgKyAnJnRva2VuPSc7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmlkID0gdGRvbWluICsgJy9kZXRhaWw/dm9kX2lkPScgKyBsaXN0W2ldLnZvZF9pZCArICcmdG9rZW49JztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVtID0gbGlzdFtpXS52b2RfcmVtYXJrcztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy92YXIgY29uPWxpc3RbaV0udHlwZS50eXBlX2RlcztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG5cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vdmFyIGNvbj1saXN0W2ldLnN0YXRlO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9sb2codmlkKTtcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IE1ZX1RZUEUgPT0gXFxcXFxcXCJob21lXFxcXFxcXCIgPyB0aXRsZS5yZXBsYWNlKGtleSwgJ+KAnOKAnCcgKyBrZXkgKyAn4oCd4oCdJykgKyAnXFxcXFxcXFxuJyArIHJlbSA6IHRpdGxlICsgcmVtLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IHBpYyArICdAUmVmZXJlcj0nLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCh2aWQgKyAnO2dldDt1dGYtODt7VXNlci1BZ2VudEBEYXJ0LzIuMTMgKGRhcnQ6aW8pfScpLnJ1bGUoKHR5cGV0KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZXMgPSB7fTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGl0ZW1zID0gW107XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBodG1sID0gSlNPTi5wYXJzZShnZXRSZXNDb2RlKCkpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnJyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6ICcyNTUmJmZsb2F0JyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJycsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3g1X3dlYnZpZXdfc2luZ2xlJ1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG15dXJsID0gTVlfVVJMLm1hdGNoKC8oW1xcXFxcXFxcU10qPzpcXFxcXFxcXC9cXFxcXFxcXC9bXFxcXFxcXFxTXSo/KVxcXFxcXFxcLy8pWzFdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoL0FQUOW9seinhi8udGVzdCh0eXBldCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL2FwcG1vdmxpc3QnLCB7fSkpLnJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9UVuW9seinhi8udGVzdCh0eXBldCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL3R2bW92bGlzdCcsIHt9KSkucnVsZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXMuZGF0YSA9IGl0ZW1zO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRIb21lUmVzdWx0KHJlcyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgdHlwZXQpLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vY29udGVudDogcmVtLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc2M6IHR5cGV0ICsgJyA9PiAnICsgVGl0W2tdLnRpdCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfdmVydGljYWxfcGljJ1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gLy9mb3IgaVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gLy9pZiBsaXN0Lmxlbmd0aFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9IC8vZm9yIGsgYmh0bWwubGVuZ3RoXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuXFxcXG4gICAgICAgICAgICAgICAgcmVzLmRhdGEgPSBpdGVtcztcXFxcbiAgICAgICAgICAgICAgICBzZXRIb21lUmVzdWx0KHJlcyk7XFxcXG4gICAgICAgICAgICB9LCBsaXN0LCB0eXRpdCksXFxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMSdcXFxcbiAgICAgICAgfSk7XFxcXG5cXFxcbiAgICB9IC8vZm9yIGlcXFxcbn07IC8vZW5kIG1vZGUgMVxcXFxuXFxcXG5pZiAoc3Ntb2RlID09ICcwJyB8fCBNWV9UWVBFID09ICdob21lJykge1xcXFxuICAgIGZvciAodmFyIGkgPSAwOyBpIDwgZGxpc3QubGVuZ3RoOyBpKyspIHtcXFxcbiAgICAgICAgdmFyIGxpc3QgPSBkbGlzdFtpXS5saXN0O1xcXFxuICAgICAgICB2YXIgdHl0aXQgPSBkbGlzdFtpXS50aXRsZVxcXFxuICAgICAgICBpZiAocmFuZG9tKSB7XFxcXG4gICAgICAgICAgICBsZXQgayA9IGdldFZhcihNWV9SVUxFLnRpdGxlICsgXFxcXFxcXCItXFxcXFxcXCIgKyB0eXRpdCwgXFxcXFxcXCJcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICBpZiAoayA9PSBcXFxcXFxcIlxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgbGlzdCA9IHJhbmRvbVNvcnQzKGxpc3QpXFxcXG4gICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudGl0bG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xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobGluay5pbmRleE9mKCd4Z2FwcC5waHAvdjEvJykgIT0gLTEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGhtdXJsID0gbGluayArICdzZWFyY2g/cGc9ZnlwYWdlJnRleHQ9JyArIGtleTtcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAoL2lvcGVueXVuLy50ZXN0KGxpbmspKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJy9saXN0P3BhZ2U9ZnlwYWdlJmxpbWl0PTEwJndkPScgKyBrZXk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaG11cmwgPSBsaW5rICsgJz9wYWdlPWZ5cGFnZSZsaW1pdD0xMCZ3ZD0nICsga2V5O1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSBlbHNlIGlmICgvVFblvbHop4YvLnRlc3QodHl0aXQpKSB7XFxcXG4gICAgICAgICAgICAgICAgaWYgKC8xOWp4fDI5M3lzfHpoYWlrYW55c3xqaVxcXFxcXFxcLWRpbmdcXFxcXFxcXC1oZXxwaG9lYmV8eXVuYm9cXFxcXFxcXC5ieGlufGxhbnJlbnRrfGhldGFveXN8cHh1bnwxMzlcXFxcXFxcXC4xNTV8ZmtrZHl8MDU2MTU4fGFpeGl4aXxydW94aW5ld3xmZWlmYW4xMjN8c2lxaXR2Ly50ZXN0KGxpbmspKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHZhciBobXVybCA9IGxpbmsgKyAnP2FjPWxpc3Qmem09JyArIGtleSArICcmcGFnZT1meXBhZ2UnO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAg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XFxcXFxcIiRcXFxcXFxcIilbMV07XFxcXG4gICAgICAgICAgICB2YXIgdGl0bGUgPSBsaXN0W2pdLnNwbGl0KFxcXFxcXFwiJFxcXFxcXFwiKVswXTtcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgaWYgKGh0bWwuZGF0YS52b2RfdXJsX3dpdGhfcGxheWVyKSB7XFxcXG4gICAgICAgICAgICAgICAgdmFyIGppZWsgPSBjb250c1tpXS5wYXJzZV9hcGk7XFxcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGh0bWwuZGF0YS52b2RfaW5mbyAmJiBodG1sLmRhdGEudm9kX2luZm8udm9kX3VybF93aXRoX3BsYXllcikge1xcXFxuICAgICAgICAgICAgICAgIHZhciBqaWVrID0gY29udHNbaV0ucGFyc2VfYXBpO1xcXFxuICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICBpZiAoY29udHNbaV0ucGxheWVyX2luZm8ucGFyc2UyICYmIChjb250c1tpXS5wbGF5ZXJfaW5mby5wYXJzZTIpLmluZGV4T2YoXFxcXFxcXCI9XFxcXFxcXCIpICE9IC0xKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHZhciBqaWVrID0gKGNvbnRzW2ldLnBsYXllcl9pbmZvLnBhcnNlMikubWF0Y2goLy4qP3VybD18Lio/dj18Lio/dmlkPS8pWzBdLnJlcGxhY2UoXFxcXFxcXCIuLlxcXFxcXFwiLCBcXFxcXFxcIi5cXFxcXFxcIikucmVwbGFjZSgnanNvbmJzJywgJycpO1xcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY29udHNbaV0ucGxheWVyX2luZm8ucGFyc2UgJiYgKGNvbnRzW2ldLnBsYXllcl9pbmZvLnBhcnNlKS5pbmRleE9mKFxcXFxcXFwiPVxcXFxcXFwiKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgamllayA9IChjb250c1tpXS5wbGF5ZXJfaW5mby5wYXJzZSkubWF0Y2goLy4qP3VybD18Lio/dj18Lio/dmlkPS8pWzBdLnJlcGxhY2UoXFxcXFxcXCIuLlxcXFxcXFwiLCBcXFxcXFxcIi5cXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGppZWsgPSBcXFxcXFxcIlxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAvL3NldEVycm9yKGppZWspOyAgICAgICAgICAgICAgICBcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSBjYXRjaCAoZSkge31cXFxcbiAgICAgICAgaWYgKGppZWsgIT0gJycgJiYgamllayAhPSBudWxsKSB7XFxcXG4gICAgICAgICAgICBpZiAoamllay5zdWJzdHJpbmcoMCwgNCkgPT0gJ2h0dHAnKSB7XFxcXG4gICAgICAgICAgICAgICAgamllayA9IGppZWs7XFxcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGppZWsuc3Vic3RyaW5nKDAsIDIpID09ICdcXFxcXFxcXC9cXFxcXFxcXC8nKSB7XFxcXG4gICAgICAgICAgICAgICAgamllayA9ICdodHRwczonICsgamllaztcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfVxcXFxuICAgICAgICAvL+WvueWkseaViOaOpeWPo+i/m+ihjOabv+aNolxcXFxuICAgICAgICBpZiAoL2Nva2Vtdi8udGVzdChteXVybCkgJiYgL2Nva2VxaWV8eGlufDkwbW0vLnRlc3QocHRhYikpIHtcXFxcbiAgICAgICAgICAgIGppZWsgPSAnaHR0cHM6Ly9wbGF5ZXIuOTBtbS5tZS9wbGF5LnBocD91cmw9JztcXFxcbiAgICAgICAgfSBlbHNlIGlmICgvanNvblxcXFxcXFxcLm0zdThcXFxcXFxcXC50di8udGVzdChqaWVrKSkge1xcXFxuICAgICAgICAgICAgamllayA9ICdodHRwczovL2p4Lm0zdTgudHYvamlleGkvP3VybD0nO1xcXFxuICAgICAgICB9IGVsc2UgaWYgKC9janQ1MjEvLnRlc3QobXl1cmwpKSB7XFxcXG4gICAgICAgICAgICBqaWVrID0gY29udHNbaV0ucGxheWVyX2luZm8ucGFyc2U7XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgLy/lo7DmmI7pk77mjqVcXFxcbiAgICAgICAgdmFyIGxpbmsgPSBqaWVrICsgdmxpbms7XFxcXG4gICAgICAgIGlmICgvXFxcXFxcXFwubTN1OHxcXFxcXFxcXC5tcDR8b2JqXFxcXFxcXFwvdG9zLy50ZXN0KHZsaW5rKSAmJiAvaHR0cC8udGVzdCh2bGluaykpIHtcXFxcbiAgICAgICAgICAgIGxpbmsgPSB2bGluaztcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICAvL2xvZyhsaW5rKTtcXFxcbiAgICAgICAgaWYgKGxpc3QubGVuZ3RoIDw9IDQpIHtcXFxcbiAgICAgICAgICAgIHZhciBjbHQgPSAndGV4dF8yJztcXFxcbiAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgIHZhciBjbHQgPSBpc05hTih0aXRsZSkgPyAnZmxleF9idXR0b24nIDogJ3RleHRfNSdcXFxcbiAgICAgICAgfTtcXFxcbiAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxcXG4gICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgocHRhYiwgbGluaywgbXl1cmwpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBvcGVudXJsKHJlc3VybCkge1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAocmVzdXJsLm1hdGNoKC95b3VrdXxtZ3R2fGl4aWd1YXxxcS5jb218cWl5aXxtaWd1fGJpbGliaWxpfHNvaHV8cHB0dnxsZXwxOTA1LmNvbS8pICYmIHJlc3VybC5zZWFyY2goL2h0bWx8YmlsaWJpbGkvKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGVuRG4gPSBKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL2ZpbGVzL3J1bGVzL3h5cS9hcHBtc2V0Lmpzb24nLCB7fSkpLmVuRG47XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZW5EbiA9PSAnMScpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coJ+iwg+eUqOaWreaPkuino+aekCcpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoXFxcXFxcXCJ2YXIgY29uZmlnID1cXFxcXFxcIiArIGZldGNoKFxcXFxcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeVBhcnNlU2V0Lmpzb25cXFxcXFxcIikpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoZmV0Y2goY29uZmlnLmNqKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGF5dG1QYXJzZShyZXN1cmwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdXJsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xcXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlc3VybFxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfTtcXFxcbiAgICAgICAgICAgICAgICB2YXIgc3JjdXJsID0gbGluaztcXFxcbiAgICAgICAgICAgICAgICAvL2xvZyhzcmN1cmwpO1xcXFxuICAgICAgICAgICAgICAgIC8v5Yqo5oCB6Kej5p6Q5Luj56CB5byA5aeLXFxcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgLy/lpITnkIbmjIflrprop4bpopHkuI7nur/ot69cXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKC9cXFxcXFxcXC5tM3U4fFxcXFxcXFxcLm1wNHxvYmpcXFxcXFxcXC90b3MvLnRlc3Qoc3JjdXJsKSAmJiAvaHR0cC8udGVzdChzcmN1cmwpICYmICEvXFxcXFxcXFwuaHRtbC8udGVzdChzcmN1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoL3drZmlsZS8udGVzdChzcmN1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNyY3VybCArICc7e1JlZmVyZXJAaHR0cHM6Ly9mYW50dWFuLndrZmlsZS5jb20vfSdcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL2R1b2R1b3p5Ly50ZXN0KHB0YWIpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGpzb24gPSBmZXRjaCgnaHR0cHM6Ly9wbGF5ZXIuZHVvZHVvenkuY29tL2RkcGxheS9hcGkucGhwP3VybD0nICsgc3JjdXJsLCB7fSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04ucGFyc2UoanNvbikudXJsO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gL1xcXFxcXFxcPS8udGVzdChzcmN1cmwpID8gc3JjdXJsLnNwbGl0KCc9JylbMV0gOiBzcmN1cmwgKyAnI2lzVmlkZW89dHJ1ZSMnO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHNyY3VybC5pbmRleE9mKFxcXFxcXFwiL3NoYXJlL1xcXFxcXFwiKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbGluayA9IHNyY3VybC5zcGxpdChcXFxcXFxcIi9zaGFyZVxcXFxcXFwiKVswXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZmMgPSBmZXRjaChzcmN1cmwsIHt9KS5yZXBsYWNlKFxcXFxcXFwidmFyIHB1cmxcXFxcXFxcIiwgXFxcXFxcXCJ2YXIgbWFpblxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZmMuaW5kZXhPZihcXFxcXFxcIm1haW5cXFxcXFxcIikgIT0gLTEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG1hdCA9IGZjLm1hdGNoKC92YXIgbWFpbi4qPzsvKVswXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChtYXQpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGxheSA9IChtYWluLmluZGV4T2YoXFxcXFxcXCJodHRwXFxcXFxcXCIpICE9IC0xID8gbWFpbiA6IGxpbmsgKyBtYWluKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbWFpbiA9IGZjLm1hdGNoKC91cmw6Lio/W1xcXFxcXFxcJ1xcXFxcXFxcXFxcXFxcXCJdKC4qPylbXFxcXFxcXFwnXFxcXFxcXFxcXFxcXFxcIl0vKVsxXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHBsYXkgPSAobWFpbi5pbmRleE9mKFxcXFxcXFwiaHR0cFxcXFxcXFwiKSAhPSAtMSA/IG1haW4gOiBsaW5rICsgbWFpbilcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwbGF5O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAneDVXZWJWaWV3Oi8vJyArIChzcmN1cmwpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL+axn+a5luW9seinhue6v+i3r1xcXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHB0YWIgPT0gJ3JlbnJlbm1pJyAmJiBteXVybC5zZWFyY2goL2poZHl3LykgIT0gLTEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBodG1sID0gcmVxdWVzdCgnaHR0cHM6Ly9jYWNoZTEuamhkeXcudmlwOjgwOTEvcnJtaS5waHA/dXJsPScgKyBzcmN1cmwuc3BsaXQoJ3VybD0nKVsxXSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL2xvZyhodG1sKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKGh0bWwpLnVybDtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwdGFiID09ICdmcWZpbG0nICYmIG15dXJsLnNlYXJjaCgvamhkeXcvKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdodHRwczovL3d3dy5qaGR5dy52aXAvamlleGkvZnEucGhwP3VybD0nICsgc3JjdXJsLnNwbGl0KCd1cmw9JylbMV0gKyAnJm5leHQ9JztcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwdGFiID09ICdycnNwJyAmJiBteXVybC5zZWFyY2goL2poZHl3LykgIT0gLTEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaHR0cHM6Ly93d3cuamhkeXcudmlwL2ppZXhpL3JyLnBocD91cmw9JyArIHNyY3VybC5zcGxpdCgndXJsPScpWzFdICsg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XN0KHNyY3VybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKGZldGNoKHNyY3VybCwge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJVc2VyLUFnZW50XFxcXFxcXCI6IE1PQklMRV9VQVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVkaXJlY3Q6IGZhbHNlLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhIZWFkZXJzOiB0cnVlXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSkuaGVhZGVycy5sb2NhdGlvblswXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgveFxcXFxcXFxcLW5cXFxcXFxcXC5jY3xuaGR6NjY2Ly50ZXN0KHNyY3VybCkgJiYgL1xcXFxcXFxcLmh0bWx8YmlsaWJpbGkvLnRlc3Qoc3JjdXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9wZW51cmwoc3JjdXJsLnN1YnN0cmluZyhzcmN1cmwuaW5kZXhPZignPWh0dHAnKSArIDEpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAvL+WkhOeQhuaMh+WumuinhumikeWSjOe6v+i3r+e7k+adn1xcXFxuICAgICAgICAgICAgICAgICAgICAvLy0tLS3liIblibLnur8tLS0tLy9cXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNjb2RlID0gSlNPTi5wYXJzZShmZXRjaChzcmN1cmwsIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIlVzZXItQWdlbnRcXFxcXFxcIjogXFxcXFxcXCJEYXJ0LzIuMTMgKGRhcnQ6aW8pXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWRpcmVjdDogZmFsc2UsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB3aXRoU3RhdHVzQ29kZTogdHJ1ZVxcXFxuICAgICAgICAgICAgICAgICAgICB9KSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIC8vbG9nKHNjb2RlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNjb2RlLnN0YXR1c0NvZGUgPT0gJzMwMicgfHwgc2NvZGUuc3RhdHVzQ29kZSA9PSAnMzAxJykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy/miZPlvIDop6PmnpDmnIkzMDLph43lrprlkJHnmoTpk77mjqVcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciByZWR1cmwgPSBzY29kZS5oZWFkZXJzLmxvY2F0aW9uWzBdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9cXFxcXFxcXD1odHRwLy50ZXN0KHJlZHVybCkgJiYgL2h0bWx8YmlsaWJpbGkvLnRlc3QocmVkdXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKGZldGNoKHJlZHVybCwge30pKS51cmw7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9cXFxcXFxcXD1odHRwLy50ZXN0KHJlZHVybCkgJiYgL1xcXFxcXFxcLm0zdTh8XFxcXFxcXFwubXA0fFxcXFxcXFxcLmZsdi8udGVzdChyZWR1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlZHVybC5zdWJzdHJpbmcocmVkdXJsLmluZGV4T2YoJz1odHRwJykgKyAxKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlZHVybFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy92YXIgaHRtbCA9IHJlcXVlc3Qoc3JjdXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBodG1sID0gc2NvZGUuYm9keTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvXFxcXFxcXFw8Ym9keS8udGVzdChodG1sKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZygn5bCd6K+V572R6aG16Kej5p6QJyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZUNhY2hlKCdodHRwczovL2NvZGUuYWxpeXVuLmNvbS9semsyMzU1OS9QdWJsaWNSdWxlL3Jhdy9tYXN0ZXIveDVydWxlLmpzJywgMjQpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB4NXJ1bGUoc3JjdXJsLHNyY3VybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9yZXR1cm4gb3BlbnVybChzcmN1cmwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2pzb27op6PmnpDnmoTlj5bpk77mjqVcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcHVybCA9IGh0bWwubWF0Y2goL1tcXFxcXFxcXCdcXFxcXFxcXFxcXFxcXFwiXXVybFtcXFxcXFxcXCdcXFxcXFxcXFxcXFxcXFwiXTouKj9bXFxcXFxcXFwnXFxcXFxcXFxcXFxcXFxcIl0oLio/KVtcXFxcXFxcXCdcXFxcXFxcXFxcXFxcXFwiXS8pWzFdLnJlcGxhY2UoL1xcXFxcXFxcXFxcXFxcXFwvZywgJycpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvaHR0cC8udGVzdChwdXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocHRhYiA9PSAnYmlsaWJpbGknKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHVybCArICc7e1JlZmVyZXJAaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tLyYmVXNlci1BZ2VudEBNb3ppbGxhLzUuMH0nO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHB0YWIgPT0gJ21ndHYnKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHVybCArICcjaXNWaWRlbz10cnVlIycgKyAnO3tSZWZlcmVyQHd3dy5tZ3R2LmNvbSYmVXNlci1BZ2VudEBNb3ppbGxhLzUuMH0nO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmwgKyAnI2lzVmlkZW89dHJ1ZSMnXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvXFxcXFxcXFw9aHR0cC8udGVzdChzcmN1cmwpICYmIC9cXFxcXFxcXC5odG1sfGJpbGliaWxpLy50ZXN0KHNyY3VybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9wZW51cmwoc3JjdXJsLnN1YnN0cmluZyhzcmN1cmwuaW5kZXhPZignPWh0dHAnKSArIDEpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+mdnmh0dHDlvIDlpLTnmoTmiZPlvIDljp/pk77mjqUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKHNyY3VybC5zdWJzdHJpbmcoc3JjdXJsLmluZGV4T2YoJz1odHRwJykgKyAxKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIC8v5oql6ZSZ5Yik5pat5aSE55CGXFxcXG4gICAgICAgICAgICAgICAgICAgIGlmIChzcmN1cmwuc3Vic3RyaW5nKDAsIDIpID09ICdcXFxcXFxcXC9cXFxcXFxcXC8nKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3BlbnVybCgnaHR0cHM6JyArIHNyY3VybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL1xcXFxcXFxcPWh0dHAvLnRlc3Qoc3JjdXJsKSAmJiAvXFxcXFxcXFwuaHRtbHxiaWxpYmlsaS8udGVzdChzcmN1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL3JldHVybiBzcmN1cmwuc3BsaXQoJz0nKVsxXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBvcGVudXJsKHNyY3VybC5zdWJzdHJpbmcoc3JjdXJsLmluZGV4T2YoJz1odHRwJykgKyAxKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3BlbnVybChzcmN1cmwpXFxcXG4gICAgICAgICAgICAgIC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YXIgZW5EbiA9IEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vZmlsZXMvcnVsZXMveHlxL2FwcG1zZXQuanNvbicsIHt9KSkuZW5EbjtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlbkRuID09ICcxJykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZygn6LCD55So5pat5o+S6Kej5p6QJyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChcXFxcXFxcInZhciBjb25maWcgPVxcXFxcXFwiICsgZmV0Y2goXFxcXFxcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL015UGFyc2VTZXQuanNvblxcXFxcXFwiKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChmZXRjaChjb25maWcuY2opKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHJlc3VybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXN1cmxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVzdXJsXFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9O1xcXFxuICAgICAgICAgICAgICAgIC8vbG9nKHNyY3VybCk7XFxcXG4gICAgICAgICAgICAgICAgLy/liqjmgIHop6PmnpDku6PnoIHlvIDlp4tcXFxcbiAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAoL1xcXFxcXFxcLm0zdTh8XFxcXFxcXFwubXA0fG9ialxcXFxcXFxcL3Rvcy8udGVzdChzcmN1cmwpICYmIC9odHRwLy50ZXN0KHNyY3VybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAvXFxcXFxcXFw9Ly50ZXN0KHNyY3VybCkgPyBzcmN1cmwuc3BsaXQoJz0nKVsxXSA6IHNyY3VybCArICcjaXNWaWRlbz10cnVlIyc7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoc3JjdXJsLmluZGV4T2YoXFxcXFxcXCIvc2hhcmUvXFxcXFxcXCIpICE9IC0xKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBsaW5rID0gc3JjdXJsLnNwbGl0KFxcXFxcXFwiL3NoYXJlXFxcXFxcXCIpWzBdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBmYyA9IGZldGNoKHNyY3VybCwge30pLnJlcGxhY2UoXFxcXFxcXCJ2YXIgcHVybFxcXFxcXFwiLCBcXFxcXFxcInZhciBtYWluXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmYy5pbmRleE9mKFxcXFxcXFwibWFpblxcXFxcXFwiKSAhPSAtMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgbWF0ID0gZmMubWF0Y2goL3ZhciBtYWluLio/Oy8pWzBdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKG1hdCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwbGF5ID0gKG1haW4uaW5kZXhPZihcXFxcXFxcImh0dHBcXFxcXFxcIikgIT0gLTEgPyBtYWluIDogbGluayArIG1haW4pO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBtYWluID0gZmMubWF0Y2goL3VybDouKj9bXFxcXFxcXFwnXFxcXFxcXFxcXFxcXFxcIl0oLio/KVtcXFxcXFxcXCdcXFxcXFxcXFxcXFxcXFwiXS8pWzFdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcGxheSA9IChtYWluLmluZGV4T2YoXFxcXFxcXCJodHRwXFxcXFxcXCIpICE9IC0xID8gbWFpbiA6IGxpbmsgKyBtYWluKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBsYXk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd4NVdlYlZpZXc6Ly8nICsgKHNyY3VybClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwdGFiID09ICdhbGl6eScpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwdXJsID0gZmV0Y2goJ2h0dHBzOi8vZm91YmluLmNvbS9qaWV4aS5waHA/dXJsPScgKyBzcmN1cmwsIHt9KS5tYXRjaCgvXFxcXFxcXFxcXFxcXFxcInVybFxcXFxcXFxcXFxcXFxcXCI6XFxcXFxcXFxcXFxcXFxcIiguKj8pXFxcXFxcXFxcXFxcXFxcIi8pWzFdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmw7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoLzE5anhcXFxcXFxcXC52aXB8bmZ5aW5nc2hpLy50ZXN0KHNyY3VybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwdXJsID0gSlNPTi5wYXJzZShmZXRjaChzcmN1cmwucmVwbGFjZSgnaHR0cDovLycsICdodHRwczovLycpLCB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIlVzZXItQWdlbnRcXFxcXFxcIjogTU9CSUxFX1VBXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWRpcmVjdDogZmFsc2UsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aEhlYWRlcnM6IHRydWVcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKS5oZWFkZXJzLmxvY2F0aW9uWzBdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC90aXRhbi5tZ3R2Ly50ZXN0KHB1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmwgKyAnI2lzVmlkZW89dHJ1ZSMnICsgJzt7UmVmZXJlckB3d3cubWd0di5jb20mJlVzZXItQWdlbnRATW96aWxsYS81LjB9JztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoL29ialxcXFxcXFxcL3Rvcy8udGVzdChwdXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwdXJsICsgJyNpc1ZpZGVvPXRydWUjJztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAvLy0tLS3liIblibLnur8tLS0tLy9cXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHNjb2RlID0gSlNPTi5wYXJzZShmZXRjaChzcmN1cmwsIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIlVzZXItQWdlbnRcXFxcXFxcIjogTU9CSUxFX1VBXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVkaXJlY3Q6IGZhbHNlLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgd2l0aFN0YXR1c0NvZGU6IHRydWVcXFxcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAoc2NvZGUuc3RhdHVzQ29kZSA9PSAnMzAyJyB8fCBzY29kZS5zdGF0dXNDb2RlID09ICczMDEnKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgcHVybCA9IHNjb2RlLmhlYWRlcnMubG9jYXRpb25bMF07XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL3ZhciBodG1sID0gcmVxdWVzdChzcmN1cmwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGh0bWwgPSBzY29kZS5ib2R5O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy9sb2coaHRtbCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoL1xcXFxcXFxcXFxcXFxcXCJ1cmxcXFxcXFxcXFxcXFxcXFwiXFxcXFxcXFw6XFxcXFxcXFxcXFxcXFxcImh0dHAvLnRlc3QoaHRtbCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcHVybCA9IGh0bWwubWF0Y2goL1xcXFxcXFxcXFxcXFxcXCJ1cmxcXFxcXFxcXFxcXFxcXFwiOlxcXFxcXFxcXFxcXFxcXCIoLio/KVxcXFxcXFxcXFxcXFxcXCIvKVsxXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaHRtbC5zdGFydHNXaXRoKCd7JykpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgcHVybCA9IHNyY3VybC5zdWJzdHJpbmcoc3JjdXJsLmluZGV4T2YoJz1odHRwJykgKyAxKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy92YXIgcHVybCA9IHNyY3VybFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmVDYWNoZSgnaHR0cHM6Ly9jb2RlLmFsaXl1bi5jb20vbHprMjM1NTkvUHVibGljUnVsZS9yYXcvbWFzdGVyL3g1cnVsZS5qcycsIDI0KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geDVydWxlKHNyY3VybCxzcmN1cmwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vcmV0dXJuICd4NVdlYlZpZXc6Ly8nKyhzcmN1cmwpIFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvdGl0YW4ubWd0di8udGVzdChwdXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1cmwgKyAnI2lzVmlkZW89dHJ1ZSMnICsgJzt7UmVmZXJlckB3d3cubWd0di5jb20mJlVzZXItQWdlbnRATW96aWxsYS81LjB9JztcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvb2JqXFxcXFxcXFwvdG9zLy50ZXN0KHB1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHVybCArICcjaXNWaWRlbz10cnVlIyc7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcHVybFxcXFxuICAgICAgICAgICAgICAgICAgICB9O1xcXFxuXFxcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAoc3JjdXJsLnN1YnN0cmluZygwLCAyKSA9PSAnXFxcXFxcXFwvXFxcXFxcXFwvJykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9wZW51cmwoJ2h0dHBzOicgKyBzcmN1cmwpO1xcXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9cXFxcXFxcXD1odHRwLy50ZXN0KHNyY3VybCkgJiYgL1xcXFxcXFxcLmh0bWx8YmlsaWJpbGkvLnRlc3Qoc3JjdXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy9yZXR1cm4gc3JjdXJsLnNwbGl0KCc9JylbMV07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3BlbnVybChzcmN1cmwuc3Vic3RyaW5nKHNyY3VybC5pbmRleE9mKCc9aHR0cCcpICsgMSkpO1xcXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9wZW51cmwoc3JjdXJsKVxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIC8v5Yqo5oCB6Kej5p6Q5Luj56CB57uT5p2fXFxcXG4gICAgICAgICAgICB9LCBwdGFiLCBzcmN1cmwsIG15dXJsKSxcXFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBjbHRcXFxcbiAgICAgICAgfSk7XFxcXG4gICAgfVxcXFxufVxcXCJ9LHtcXFwiY29sX3R5cGVcXFwiOlxcXCJtb3ZpZV8zXFxcIixcXFwibmFtZVxcXCI6XFxcIuWIl+ihqOaooeW8j+aQnOe0ouS6jOe6p1xcXCIsXFxcInBhdGhcXFwiOlxcXCJzZWFyZXJqXFxcIixcXFwicnVsZVxcXCI6XFxcInZhciByZXMgPSB7fTtcXFxcbnZhciBpdGVtcyA9IFtdO1xc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dCA9IGh0bWwuZGF0YS5saXN0O1xcXFxuICAgIH0gZWxzZSBpZiAoaHRtbC5kYXRhKSB7XFxcXG4gICAgICAgIHZhciBsaXN0ID0gaHRtbC5kYXRhO1xcXFxuICAgIH1cXFxcblxcXFxuICAgIGlmIChsaXN0Lmxlbmd0aCA8IDEpIHtcXFxcbiAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTogJ+acquaQnOe0ouWIsO+8jOeCueWHu+iuv+mXruWOn+e9kemhtScsXFxcXG4gICAgICAgICAgICB1cmw6IHNwbFsxXSArIGBAbGF6eVJ1bGU9LmpzOmlucHV0LnNwbGl0KCc7JylbMF1gLFxcXFxuICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnXFxcXG4gICAgICAgIH0pO1xcXFxuICAgIH0gZWxzZSB7XFxcXG4gICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGlzdC5sZW5ndGg7IGkrKykge1xcXFxuXFxcXG4gICAgICAgICAgICBpZiAoL0FQUOW9seinhi8udGVzdCh0eXBldCkpIHtcXFxcbiAgICAgICAgICAgICAgICBpZiAodGRvbWluLmluZGV4T2YoJ2FwaS5waHAvYXBwLycpICE9IC0xKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IGxpc3RbaV0udm9kX25hbWU7XFxcXG4gICAgICAgICAgICAgICAgICAgIHZhciBwaWMgPSBsaXN0W2ldLnZvZF9waWM7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmICgvZmFudHVhbi8udGVzdCh0ZG9taW4pKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmlkID0gJ2h0dHBzOi8vZmFudHVhbi53a2ZpbGUuY29tL2FwaS5waHAvYXBwL3ZpZGVvX2RldGFpbD9pZD0nICsgbGlzdFtpXS52b2RfaWQgKyAnJnRva2VuPSc7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmlkID0gdGRvbWluICsgJ3ZpZGVvX2RldGFpbD9pZD0nICsgbGlzdFtpXS52b2RfaWQgKyAnJnRva2VuPSc7XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlbSA9IGxpc3RbaV0udm9kX3JlbWFya3M7XFxcXG4gICAgICAgICAgICAgICAgICAgIC8vdmFyIGNvbj1saXN0W2ldLnR5cGUudHlwZV9kZXM7XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0ZG9taW4uaW5kZXhPZigneGdhcHAucGhwL3YxLycpICE9IC0xKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IGxpc3RbaV0udm9kX25hbWU7XFxcXG4gICAgICAgICAgICAgICAgICAgIHZhciBwaWMgPSBsaXN0W2ldLnZvZF9waWM7XFxcXG4gICAgICAgICAgICAgICAgICAgIHZhciB2aWQgPSB0ZG9taW4gKyAndmlkZW9fZGV0YWlsP2lkPScgKyBsaXN0W2ldLnZvZF9pZDtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlbSA9IGxpc3RbaV0udm9kX3JlbWFya3M7XFxcXG4gICAgICAgICAgICAgICAgICAgIC8vdmFyIGNvbj1saXN0W2ldLnR5cGUudHlwZV9kZXM7XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gbGlzdFtpXS52b2RfbmFtZTtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHBpYyA9IGxpc3RbaV0udm9kX3BpYztcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKC9pb3Blbnl1bi8udGVzdCh0ZG9taW4pKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmlkID0gdGRvbWluICsgJy9kZXRhaWxJRD92b2RfaWQ9JyArIGxpc3RbaV0udm9kX2lkICsgJyZ0b2tlbj0nO1xcXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHZpZCA9IHRkb21pbiArICcvZGV0YWlsP3ZvZF9pZD0nICsgbGlzdFtpXS52b2RfaWQgKyAnJnRva2VuPSc7XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlbSA9IGxpc3RbaV0udm9kX3JlbWFya3M7XFxcXG4gICAgICAgICAgICAgICAgICAgIC8vdmFyIGNvbj1saXN0W2ldLnR5cGUudHlwZV9kZXM7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSBlbHNlIGlmICgvVFblvbHop4YvLnRlc3QodHlwZXQpKSB7XFxcXG4gICAgICAgICAgICAgICAgdmFyIHRpdGxlID0gbGlzdFtpXS50aXRsZTtcXFxcbiAgICAgICAgICAgICAgICB2YXIgcGljID0gbGlzdFtpXS5waWM7XFxcXG4gICAgICAgICAgICAgICAgLy92YXIgdmlkPXRkb21pbisnL2RldGFpbD92b2RfaWQ9JytsaXN0W2ldLm5leHRsaW5rKycmcmVsX2xpbWl0PTEwJztcXFxcbiAgICAgICAgICAgICAgICB2YXIgdmlkID0gbGlzdFtpXS5uZXh0bGluaztcXFxcbiAgICAgICAgICAgICAgICB2YXIgcmVtID0gbGlzdFtpXS5zdGF0ZTtcXFxcbiAgICAgICAgICAgICAgICAvL3ZhciBjb249bGlzdFtpXS5zdGF0ZTtcXFxcbiAgICAgICAgICAgIH1cXFxcblxcXFxuICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLnJlcGxhY2Uoa2V5LCAn4oCc4oCcJyArIGtleSArICfigJ3igJ0nKSxcXFxcbiAgICAgICAgICAgICAgICBwaWNfdXJsOiBwaWMgKyAnQFJlZmVyZXI9JyxcXFxcbiAgICAgICAgICAgICAgICB1cmw6ICQodmlkKyc7Z2V0O3V0Zi04O3tVc2VyLUFnZW50QERhcnQvMi4xMyAoZGFydDppbyl9JykucnVsZSgodHlwZXQpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJlcyA9IHt9O1xcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgaXRlbXMgPSBbXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGh0bWwgPSBKU09OLnBhcnNlKGdldFJlc0NvZGUoKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICcnLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogJzI1NSYmZmxvYXQnLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAnJyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAneDVfd2Vidmlld19zaW5nbGUnXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoWDVXZWJWaWV3KCcnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIG15dXJsID0gTVlfVVJMLm1hdGNoKC8oW1xcXFxcXFxcU10qPzpcXFxcXFxcXC9cXFxcXFxcXC9bXFxcXFxcXFxTXSo/KVxcXFxcXFxcLy8pWzFdO1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAoL0FQUOW9seinhi8udGVzdCh0eXBldCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL2FwcG1vdmxpc3QnLCB7fSkpLnJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9UVuW9seinhi8udGVzdCh0eXBldCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWw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cmdG9rZW49O2dldDt1dGYtODt7VXNlci1BZ2VudEBEYXJ0LzIuMTMgKGRhcnQ6aW8pfSc7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH0gZWxzZSBpZiAoaHRtbC5kYXRhICYmIGh0bWwuZGF0YS5saXN0KSB7XFxcXG4gICAgICAgICAgICB2YXIgbGluayA9IG11cmwgKyAnL2RldGFpbD92b2RfaWQ9JyArIHVybCArICcmcmVsX2xpbWl0PTEwO2dldDt1dGYtODt7VXNlci1BZ2VudEBEYXJ0LzIuMTMgKGRhcnQ6aW8pfSc7XFxcXG4gICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICBpZiAoL2lvcGVueXVuLy50ZXN0KG11cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgdmFyIGxpbmsgPSBtdXJsICsgJy9kZXRhaWxJRD92b2RfaWQ9JyArIHVybCArICcmcmVsX2xpbWl0PTEwO2dldDt1dGYtODt7VXNlci1BZ2VudEBEYXJ0LzIuMTMgKGRhcnQ6aW8pfSc7XFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIHZhciBsaW5rID0gbXVybCArICd2aWRlb19kZXRhaWw/aWQ9JyArIHVybCArICcmdG9rZW49O2dldDt1dGYtODt7VXNlci1BZ2VudEBEYXJ0LzIuMTMgKGRhcnQ6aW8pfSc7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTogdGl0bGUsXFxcXG4gICAgICAgICAgICBwaWNfdXJsOiBpbWcgKyAnQFJlZmVyZXI9JyxcXFxcbiAgICAgICAgICAgIHVybDogJChsaW5rKS5ydWxlKCgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICB2YXIgcmVzID0ge307XFxcXG4gICAgICAgICAgICAgICAgdmFyIGl0ZW1zID0gW107XFxcXG4gICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnJyxcXFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogJzI1NSYmZmxvYXQnLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICcnLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3g1X3dlYnZpZXdfc2luZ2xlJ1xcXFxuICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hYNVdlYlZpZXcoJycpO1xcXFxuICAgICAgICAgICAgICAgIHZhciBodG1sID0gSlNPTi5wYXJzZShnZXRSZXNDb2RlKCkpO1xcXFxuICAgICAgICAgICAgICAgIHZhciBteXVybCA9IE1ZX1VSTC5tYXRjaCgvKFtcXFxcXFxcXFNdKj86XFxcXFxcXFwvXFxcXFxcXFwvW1xcXFxcXFxcU10qPylcXFxcXFxcXC8vKVsxXTtcXFxcbiAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9hcHBtb3ZsaXN0Jywge30pKS5ydWxlKTtcXFxcbiAgICAgICAgICAgICAgICByZXMuZGF0YSA9IGl0ZW1zO1xcXFxuICAgICAgICAgICAgICAgIHNldEhvbWVSZXN1bHQocmVzKTtcXFxcbiAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgZGVzYzogZGVzYyxcXFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfM19tYXJxdWVlJ1xcXFxuICAgICAgICB9KTtcXFxcbiAgICB9XFxcXG59XFxcIn0se1xcXCJjb2xfdHlwZVxcXCI6XFxcIm1vdmllXzNcXFwiLFxcXCJuYW1lXFxcIjpcXFwi6aaW5qyh5a+85YWl562J5b6FXFxcIixcXFwicGF0aFxcXCI6XFxcIndhaXRcXFwiLFxcXCJydWxlXFxcIjpcXFwiZnVuY3Rpb24gY2FuVXNlKCkge1xcXFxuICAgIC8v5aaC5p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oi6YW35omRVFYifQ==
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement