Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_懒人专用系列———VIP视频破解@base64://Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICDmh5LkurrkuJPnlKjvvIzlhajnvZFWSVDop4bpopHlhY3otLnnoLTop6Pljrvlub/lkYrjgIHlhajnvZHpn7PkuZDnm7TmjqXkuIvovb3jgIHnn6XkuY7lop7lvLrjgIHnn63op4bpopHml6DmsLTljbDkuIvovb3jgIHnmb7luqbnvZHnm5jnm7TmjqXkuIvovb3nrYnlpJrlip/og73lt6XlhbfnrrHvvIzlip/og73lj6/ni6znq4vlvIDlhbPjgILplb/mnJ/mm7TmlrDvvIzmlL7lv4Pkvb/nlKjjgIJ2NgovLyBAbmFtZXNwYWNlIAkgbGFuaGFoYQovLyBAdmVyc2lvbiAgICAgIDYuNi43Ci8vIEBkZXNjcmlwdGlvbiAg6Ieq55So5aSa5Yqf6IO96ISa5pys5bel5YW3566x77yM5a6M5YWo5YWN6LS544CB5peg5bm/5ZGK44CB5peg6ZyA5YWz5rOo5YWs5LyX5Y+377yM6ZuG5ZCI5LqG5LyY6YW344CB54ix5aWH6Im644CB6IW+6K6v44CBQuermShiaWxpYmlsaSnjgIHoipLmnpznrYnlhajnvZFWSVDop4bpopEoUEMr56e75Yqo56uvKeWFjei0ueegtOino+WOu+W5v+WRiu+8jOe9keaYk+S6kemfs+S5kOOAgVFR6Z+z5LmQ44CB6YW354uX44CB6YW35oiR44CB6Jm+57Gz44CB6Jy76JyTRk3jgIHojZTmnp1GTeOAgeWWnOmprOaLiembheetiee9keermemfs+S5kOWSjOacieWjsOS5pumfs+mikeWFjeWuouaIt+err+S4i+i9ve+8jOefpeS5juWinuW8uijnn6XkuY7op4bpopHkuIvovb3jgIHljrvlub/lkYrjgIHlhbPplK7or43lsY/olL3jgIHljrvpmaTkvqfovrnmoI/nrYkp77yM6KeG6aKR5peg5rC05Y2w5LiL6L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AgICAgeyJuYW1lIjoiT0siLCJ1cmwiOiJodHRwczovL29ranguY2MvP3VybD0ifSwKICAgICAgICAgICAgeyJuYW1lIjoiUkRISyIsInVybCI6Imh0dHBzOi8vangucmRoay5uZXQvP3Y9In0sCiAgICAgICAgICAgIHsibmFtZSI6IuS6uuS6uui/tyIsInVybCI6Imh0dHBzOi8vanguYmxiby5jYzo0NDMzLz91cmw9In0sCiAgICAgICAgICAgIHsibmFtZSI6IuaAneWPpDMiLCJ1cmwiOiJodHRwczovL2pzYXAuYXR0YWtpZHMuY29tLz91cmw9In0sCiAgICAgICAgICAgIHsibmFtZSI6IuWQrOS5kCIsInVybCI6Imh0dHBzOi8vanguZGo2dS5jb20vP3VybD0ifSwKICAgICAgICBdOwoKICAgICAgICBsZXQgdXNlV2ViID0gWydtLmJpbGliaWxpLmNvbScsJ3lvdWt1LmNvbScsJ3d3dy55b3VrdS5jb20nLCdtLnlvdWt1LmNvbScsJ20udi5xcS5jb20nLCdtLmlxaXlpLmNvbScsJ20ubWd0di5jb20nLCdtLnR2LnNvaHUuY29tJywnbS4xOTA1LmNvbScsJ20ucHB0di5jb20nLCdtLmxlLmNvbSddOwoKICAgICAgICBpZih1c2VXZWIuaW5kZXhPZihsb2NhdGlvbi5ob3N0KSA9PSAtMSl7CiAgICAgICAgICAgIGNvbnNvbGUubG9nKCfkuI3mmK/lupTnlKjnvZHnq5knKTtyZXR1cm47CiAgICAgICAgfQoKICAgICAgICBmdW5jdGlvbiBzZXRDb29raWUoY25hbWUsY3ZhbHVlLGV4ZGF5cyl7CgogICAgICAgICAgICB2YXIgZCA9IG5ldyBEYXRlKCk7CgogICAgICAgICAgICBkLnNldFRpbWUoZC5nZXRUaW1lKCkrKGV4ZGF5cyoyNCo2MCo2MCoxMDAwKSk7CgogICAgICAgICAgICB2YXIgZXhwaXJlcyA9ICJleHBpcmVzPSIrZC50b0dNVFN0cmluZygpOwoKICAgICAgICAgICAgZG9jdW1lbnQuY29va2llID0gY25hbWUrIj0iK2N2YWx1ZSsiOyAiK2V4cGlyZXM7CiAgICAgICAgfQoKICAgICAgICBmdW5jdGlvbiBnZXRDb29raWUoY25hbWUpewogICAgICAgICAgICB2YXIgbmFtZSA9IGNuYW1lICsgIj0iOwogICAgICAgICAgICB2YXIgY2EgPSBkb2N1bWVudC5jb29raWUuc3BsaXQoJzsnKTsKICAgICAgICAgICAgZm9yKHZhciBpPTA7IGk8Y2EubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIHZhciBjID0gY2FbaV0udHJpbSgpOwogICAgICAgICAgICAgICAgaWYgKGMuaW5kZXhPZihuYW1lKT09MCkgeyByZXR1cm4gYy5zdWJzdHJpbmcobmFtZS5sZW5ndGgsYy5sZW5ndGgpOyB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuICIiOwogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gY3JlYXRlRWxlbWVudChkb20sZG9tSWQpewoKICAgICAgICAgICAgdmFyIHJvb3RFbGVtZW50ID0gZG9jdW1lbnQuYm9keTsKCiAgICAgICAgICAgIHZhciBuZXdFbGVtZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudChkb20pOwoKICAgICAgICAgICAgbmV3RWxlbWVudC5pZCA9IGRvbUlkOwoKICAgICAgICAgICAgdmFyIG5ld0VsZW1lbnRIdG1sQ29udGVudCA9IGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKCcnKTsKCiAgICAgICAgICAgIHJvb3RFbGVtZW50LmFwcGVuZENoaWxkKG5ld0VsZW1lbnQpOwoKICAgICAgICAgICAgbmV3RWxlbWVudC5hcHBlbmRDaGlsZChuZXdFbGVtZW50SHRtbENvbnRlbnQpOwoKICAgICAgICB9CgogICAgICAgIGZ1bmN0aW9uIHRvYXN0KG1zZyxkdXJhdGlvbil7CgogICAgICAgICAgICBkdXJhdGlvbj1pc05hTihkdXJhdGlvbik/MzAwMDpkdXJhdGlvbjsKCiAgICAgICAgICAgIGxldCB0b2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F5VmlkZW9TdHlsZSA9IGAKICAgICAgICAgICAgLnpobV9wbGF5X3ZpZG9lX2ljb257CiAgICAgICAgICAgICAgICBwYWRkaW5nLXRvcDoycHg7Y3Vyc29yOnBvaW50ZXI7CiAgICAgICAgICAgICAgICB6LWluZGV4Ojk5OTk5OTk7CiAgICAgICAgICAgICAgICBkaXNwbGF5OmJsb2NrOwogICAgICAgICAgICAgICAgcG9zaXRpb246Zml4ZWQ7bGV0OjBweDt0b3A6MzYwcHg7dGV4dC1hbGlnbjpjZW50ZXI7b3ZlcmZsb3c6dmlzaWJsZQogICAgICAgICAgICB9CiAgICAgICAgICAgIC56aG1fcGxheV92aWRlb193cmFwewogICAgICAgICAgICAgICAgcG9zaXRpb246Zml4ZWQ7bGVmdDo0MHB4O3RvcDozNjBweDsKICAgICAgICAgICAgICAgIHotaW5kZXg6OTk5OTk5OTsKICAgICAgICAgICAgICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICAgICAgICAgICAgICB3aWR0aDozMDBweDsKICAgICAgICAgICAgfQogICAgICAgICAgICAuemhtX3BsYXlfdmlkZW9fbGluZXsKICAgICAgICAgICAgICAgIHdpZHRoOjMyMHB4OwogICAgICAgICAgICAgICAgaGVpZ2h0OjMxNnB4OwogICAgICAgICAgICAgICAgb3ZlcmZsb3cteTpzY3JvbGw7CiAgICAgICAgICAgICAgICBvdmVyZmxvdy14OmhpZGRlbjsKICAgICAgICAgICAgfQogICAgICAgICAgICAuemhtX3BsYXlfdmlkZV9saW5lX3VsewogICAgICAgICAgICAgICAgd2lkdGg6MzAwcHg7CiAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0OwogICAgICAgICAgICAgICAgZmxleC1mbG93OiByb3cgd3JhcDsKICAgICAgICAgICAgICAgIGxpc3Qtc3R5bGU6IG5vbmU7CiAgICAgICAgICAgICAgICBwYWRkaW5nOjBweDsKICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7CgogICAgICAgICAgICB9CiAgICAgICAgICAgIC56aG1fcGxheV92aWRlb19saW5lX3VsX2xpewogICAgICAgICAgICAgICAgcGFkZGluZzo0cHggMHB4OwogICAgICAgICAgICAgICAgbWFyZ2luOjJweDsKICAgICAgICAgICAgICAgIHdpZHRoOjMwJTsKICAgICAgICAgICAgICAgIGNvbG9yOiNGRkY7CiAgICAgICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjsKICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6I2YyNDQ0MzsKICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6MHB4IDBweCAxMHB4ICNmZmY7CiAgICAgICAgICAgICAgICBmb250LXNpemU6MTRweDsKICAgICAgICAgICAgfQogICAgICAgICAgICAuemhtX3BsYXlfdmlkZW9fbGluZV91bF9saTpob3ZlcnsKICAgICAgICAgICAgICAgIGNvbG9yOiMyNjAwMzM7CiAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiNmY2MwYzAKICAgICAgICAgICAgfQogICAgICAgICAgICAuemhtX2xpbmVfc2VsZWN0ZWR7CiAgICAgICAgICAgICAgICBjb2xvcjojMjYwMDMzOwogICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojZmNjMGMwCiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIC56aG1fcGxheV92aWRlb19qeHsKICAgICAgICAgICAgICAgIHdpZHRoOjEwMCU7CiAgICAgICAgICAgICAgICBoZWlnaHQ6MTAwJTsKICAgICAgICAgICAgICAgIHotaW5kZXg6OTk5OTk5OwogICAgICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO3RvcDowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYDsKCiAgICAgICAgICAgIGRvbVN0eWxlLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKHBsYXlWaWRlb1N0eWxlKSk7CgogIC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SHRtbDsKCiAgICAgICAgICAgIGxldCBqeFZpZGVvV2ViID0ganhWaWRlb0RhdGEuZmlsdGVyKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgIHJldHVybiBsb2NhdGlvbi5ocmVmLm1hdGNoKGl0ZW0ubWF0Y2gpOwoKICAgICAgICAgICAgfSkKCiAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1sb2dvJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgbGV0IGp4VmlkZW9XZWIgPSBqeFZpZGVvRGF0YS5maWx0ZXIoZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgIHJldHVybiBsb2NhdGlvbi5ocmVmLm1hdGNoKGl0ZW0ubWF0Y2gpOwoKICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgaWYoanhWaWRlb1dlYi5sZW5ndGggPT0gMCl7CgogICAgICAgICAgICAgICAgICAgIHRvYXN0KCfor7flnKjop4bpopHmkq3mlL7pobXngrnlh7vlm77moIcnKTsKCiAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgdmFyIHtmdW5jTmFtZSxtYXRjaDpub3dNYXRjaCxub2RlOm5vd05vZGUsbmFtZTpub3dOYW1lfSA9IGp4VmlkZW9XZWJbMF07CgogICAgICAgICAgICAgICAgICAgIGxldCBwbGF5TGluZURpdiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy56aG1fcGxheV92aWRlb193cmFwJyk7CgogICAgICAgICAgICAgICAgICAgIGxldCBwbGF5U2hvdyA9IHBsYXlMaW5lRGl2LnN0eWxlLmRpc3BsYXk7CgogICAgICAgICAgICAgICAgICAgIHBsYXlTaG93ID09ICdub25lJz8gcGxheUxpbmVEaXYuc3R5bGUuZGlzcGxheSA9ICdibG9jayc6cGxheUxpbmVEaXYuc3R5bGUuZGlzcGxheSA9ICdub25lJzsKCiAgICAgICAgICAgICAgICAgICAgdmFyIHBsYXlMaW5lVGQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcucGxheUxpbmVUZCcpOwoKICAgICAgICAgICAgICAgICAgICBwbGF5TGluZVRkLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICBpdGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlMaW5lVGQuZm9yRWFjaChmdW5jdGlvbihlKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZS5zZXRBdHRyaWJ1dGUoJ2NsYXNzJywncGxheUxpbmVUZCB6aG1fcGxheV92aWRlb19saW5lX3VsX2xpJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0QXR0cmlidXRlKCdjbGFzcycsJ3BsYXlMaW5lVGQgemhtX3BsYXlfdmlkZW9fbGluZV91bF9saSB6aG1fbGluZV9zZWxlY3RlZCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldENvb2tpZSgncGxheUxpbmVBY3Rpb24nLHRoaXMuZ2V0QXR0cmlidXRlKCd1cmwnKSwzMCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5vd1dlYk5vZGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKG5vd05vZGUpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG5vd1dlYk5vZGUpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3dXZWJOb2RlLmlubmVySFRNTCA9IHBsYXlKeEh0bWw7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5SWZyYW1lID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3BsYXlJZnJhbWUnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheUlmcmFtZS5zcmM9IGl0ZW0uZ2V0QXR0cmlidXRlKCd1cmwnKStsb2NhdGlvbi5ocmVmOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn6KeG6aKR572R56uZ57uT54K55LiN5a2Y5ZyoJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICB9KQoKICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKGUpewoKICAgICAgICAgICAgICAgIGxldCBpPTA7CgogICAgICAgICAgICAgICAgZS5wYXRoLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0uY2xhc3NOYW1lPT0naWNvbkxvZ28nKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGk9MTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGkpOwogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgIGlmKGk9PTApewoKICAgICAgICAgICAgICAgICAgICBsZXQgaXNTaG93ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnpobV9wbGF5X3ZpZGVvX3dyYXAnKS5zdHlsZS5kaXNwbGF5OwoKICAgICAgICAgICAgICAgICAgICBpZihpc1Nob3cgPT0gJ2Jsb2NrJyl7CgogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuemhtX3BsYXlfdmlk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jIpLAoKICAgICAgICB4aWd1YVZpZGVvRG93bmxvYWQ6R01fZ2V0VmFsdWUoJ3hpZ3VhVmlkZW9Eb3dubG9hZCcsMjIpLAoKICAgICAgICBiaWxpVmlkZW9Eb3dubG9hZDpHTV9nZXRWYWx1ZSgnYmlsaVZpZGVvRG93bmxvYWQnLDIyKSwKCiAgICAgICAgeW91dHViZVZpZGVvRG93bmxvYWQ6R01fZ2V0VmFsdWUoJ3lvdXR1YmVWaWRlb0Rvd25sb2FkJywyMiksCiAgICAgICAgfQoKICAgICAgICB2YXIge2NvdXBvblVybCwKICAgICAgICAgICAgY291cG9uSG9zdCwKICAgICAgICAgICAgemhtQXBpVXJsLAogICAgICAgICAgICB3ZWJVcmwsCiAgICAgICAgICAgIGljb25WaXBUb3AsCiAgICAgICAgICAgIGljb25WaXBQb3NpdGlvbiwKICAgICAgICAgICAgaWNvblZpcFdpZHRoLAogICAgICAgICAgICBqeENvZGVJbmZvLAogICAgICAgICAgICBjb3Vwb25UaW1lck51bSwKICAgICAgICAgICAgY291cG9uV2FpdFRpbWUsCiAgICAgICAgICAgIGljb25XYWl0VGltZSwKICAgICAgICAgICAgc2VsZWN0ZWRMZWZ0LAogICAgICAgICAgICBzZWxlY3RlZFJpZ2h0LAogICAgICAgICAgICB2aWRlb1BsYXlMaW5lQWRkLAogICAgICAgICAgICBkeVZpZGVvRG93bmxvYWQsCiAgICAgICAgICAgIGtzVmlkZW9Eb3dubG9hZCwKICAgICAgICAgICAgeGlndWFWaWRlb0Rvd25sb2FkLAogICAgICAgICAgICBiaWxpVmlkZW9Eb3dubG9hZCwKICAgICAgICAgICAgeW91dHViZVZpZGVvRG93bmxvYWQKICAgICAgICB9ID0gQ29uZmlnOwogICAgICAgIC8qLS1sYW5nLS0qLwogICAgICAgIHZhciBsYW5nID0gewogICAgICAgICAgICBzZXQ6J+iuvue9ricsCiAgICAgICAgICAgIGljb25Qb3NpdGlvbjon5Zu+5qCH5L2N572uJywKICAgICAgICAgICAgcGxheVZpZGVvOifop4bpopHop6PmnpAnLAogICAgICAgICAgICBwbGF5TXVzaWM6J+mfs+S5kOS4i+i9vScsCiAgICAgICAgICAgIHpoTmljZTon55+l5LmO5aKe5by6JywKICAgICAgICAgICAgdmlkZW9Eb3dubG9hZDon6KeG6aKR5LiL6L29JywKICAgICAgICAgICAgYmFpZHVEb3dubG9hZDon55m+5bqm5LiL6L29JywKICAgICAgICAgICAgaWNvbkhlaWdodDon5Zu+5qCH6auY5bqmJywKICAgICAgICAgICAgaWNvbldpZHRoOiflm77moIflpKflsI8nLAogICAgICAgICAgICBpY29uTGluZTon5rC05bmz5L2N572uJywKICAgICAgICAgICAgaWNvbldhaXRUaW1lOifnrYnlvoXml7bpl7QnLAogICAgICAgICAgICBpY29uTGVmdDon6Z2g5bemJywKICAgICAgICAgICAgaWNvblJpZ2h0OifpnaDlj7MnLAogICAgICAgICAgICB0aXBJY29uSGVpZ2h0Oifpu5jorqQzNjAs5bu66K6uMX41MDAnLAogICAgICAgICAgICB0aXBJY29uV2lkdGg6J+m7mOiupDQwLOW7uuiurjIwfjUwJywKICAgICAgICAgICAgdGlwRXJyb3JJY29uSGVpZ2h0Oic85Zu+5qCH5L2N572uPuS4reeahDzlm77moIfpq5jluqY+5bqU5Li6MTAwMOS7peWGheato+aVtOaVsO+8jOW7uuiurjF+NTAwJywKICAgICAgICAgICAgdGlwRXJyb3JJY29uV2lkdGg6Jzzlm77moIfkvY3nva4+5Lit55qEPOWbvuagh+Wkp+Wwjz7lupTkuLoxMDDku6XlhoXmraPmlbTmlbDvvIzlu7rorq4yMH41MCcsCiAgICAgICAgICAgIHNldFBsYXlWaWRlbzon6Kej5p6Q6K6+572uJywKICAgICAgICAgICAgcGxheVZpZGVvTGluZUFkZDon5re75Yqg57q/6LevJywKICAgICAgICAgICAgdGlwUGxheVZpZGVvTGluZUFkZDon6K+36L6T5YWl57q/6Lev5ZCN56ew5ZKM6Kej5p6Q5Zyw5Z2A77yM5L6LOiLnur/ot6/lha1odHRwczovL2p4LnpkeS5jb20vP3VybD0i77yM5q+P57q/6Lev5LiA6KGM44CCJywKICAgICAgICAgICAgemhTZXQ6J+efpeS5juiuvue9ricsCiAgICAgICAgICAgIHpoVmlkZW9DbG9zZTon5bGP6JS96KeG6aKRJywKICAgICAgICAgICAgemhWaWRlb0Rvd25sb2FkOifop4bpopHkuIvovb0nLAogICAgICAgICAgICB6aEFEQ2xvc2U6J+Wxj+iUveW5v+WRiicsCiAgICAgICAgICAgIHpoQ2xvc2VMZWZ0OiflhbPpl63kvqfovrnmoI8nLAogICAgICAgICAgICB6aENoYW5nZUxpbms6J+mTvuaOpeebtOaOpei3s+i9rCcsCiAgICAgICAgICAgIHNwZWNpYWxDb2x1bW46J+agh+iusOaWh+eroCcsCiAgICAgICAgICAgIHZpZGVvVGl0bGU6J+agh+iusOinhumikScsCiAgICAgICAgICAgIHpoS2V5d29yZENsb3NlOiflsY/olL3lhbPplK7or40nLAogICAgICAgICAgICB0aXBLZXl3b3JkOifor7fovpPlhaXlhbPplK7or40s55SoIiwi5Y+36ZqU5byAJywKICAgICAgICAgICAgYXV0aG9yTmFtZUNsb3NlOiflsY/olL3nlKjmiLcnLAogICAgICAgICAgICB0aXBBdXRob3JOYW1lOifor7fovpPlhaXnlKjmiLflkI0s55SoIiwi5Y+36ZqU5byAJywKICAgICAgICAgICAgeWFueHVhbkNsb3NlOiflsY/olL3nm5DpgIknLAogICAgICAgICAgICBkeVZpZGVvRG93bmxvYWQ6J+aKlumfs+S4i+i9vScsCiAgICAgICAgICAgIGtzVmlkZW9Eb3dubG9hZDon5b+r5omL5LiL6L29JywKICAgICAgICAgICAgeGlndWFWaWRlb0Rvd25sb2FkOifopb/nk5zkuIvovb0nLAogICAgICAgICAgICBiaWxpVmlkZW9Eb3dubG9hZDonQuermSAoYmlsaWJpbGkpIOS4i+i9vScsCiAgICAgICAgICAgIHlvdXR1YmVWaWRlb0Rvd25sb2FkOid5b3V0dWJl5LiL6L29JywKICAgICAgICAgICAgcXVlc3Rpb246J+W4uOingemXrumimCcsCiAgICAgICAgICAgIHFxR3JvdXA6J+S6pOa1gee+pCcsCiAgICAgICAgICAgIHJld2FyZDon5omT6LWPJywKICAgICAgICAgICAgcmVkUmV3YXJkOifnuqLljIUnLAogICAgICAgICAgICB0aGFuazon5oSf6LCiJywKCiAgICAgICAgfTsKCiAgICAgICAgLyotLWRhdGFzLS0qLwogICAgICAgIHZhciBkYXRhcyA9IHsKCiAgICAgICAgICAgIGdldENvdXBvbjpbe2lzT3BlbjoyMix3ZWI6WwogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJjb3Vwb24iLG5hbWU6InRhb2JhbyIsbm9kZToiLkpfTGlua0FkZCIsbWF0Y2g6L2l0ZW1cLnRhb2Jhb1wuY29tL30sCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6ImNvdXBvbiIsbmFtZToidG1hbGxDYW9zaGkiLG5vZGU6IiNKX0xpbmtCdXkiLG1hdGNoOi9eaHR0cHM/OlwvXC9jaGFvc2hpLmRldGFpbC50bWFsbC5jb21cLy99LAogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJjb3Vwb24iLG5hbWU6InRtYWxsIixub2RlOiIuQmFzaWNDb250ZW50LS1hY3Rpb25zLS0xY284c3g4IixtYXRjaDovXmh0dHBzPzpcL1wvZGV0YWlsXC50bWFsbFwuY29tL30sCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6ImNvdXBvbiIsbmFtZToidG1hbGwiLG5vZGU6IiNKX0xpbmtCdXkiLG1hdGNoOi9eaHR0cHM/OlwvXC9kZXRhaWxcLnRtYWxsXC5jb20vfSwKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToiY291cG9uIixuYW1lOiJ0bWFsbE90aGVyIixub2RlOiIudG0tbXNnLWJveCIsbWF0Y2g6L15odHRwcz86XC9cL2RldGFpbFwudG1hbGxcLmNvbS99LAogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJjb3Vwb24iLG5hbWU6InRtYWxsIixub2RlOiIjSl9MaW5rQnV5IixtYXRjaDovXmh0dHBzPzpcL1wvZGV0YWlsXC50bWFsbFwuaGsvfSwKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToiY291cG9uIixuYW1lOiJqZCIsbm9kZToiI2Nob29zZS1idG5zIixtYXRjaDovaXRlbVwuamRcLmNvbS99LAogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJjb3Vwb24iLG5hbWU6ImpkIixub2RlOiIjY2hvb3NlLWJ0bnMiLG1hdGNoOi9cLnlpeWFvamRcLmNvbS99LAogICAgICAgICAgICBdfV0sCiAgICAgICAgICAgIGp4VmlkZW86W3tpc09wZW46R01fZ2V0VmFsdWUoJ21vdmllTGlzdCcsJzIyJyksd2ViOlsKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheVZpZGVvIixtYXRjaDovaHR0cHM/OlwvXC92XC5xcVwuY29tLyxuYW1lOidxcVBDJ30sCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlWaWRlbyIsIG1hdGNoOi9odHRwcz86XC9cL21cLnZcLnFxXC5jb20vLG5hbWU6J3FxTW9iaWxlJ30sCgogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5VmlkZW8iLCBtYXRjaDovXmh0dHBzPzpcL1wvd3d3XC5pcWl5aVwuY29tLyxuYW1lOidpcWl5aVBjJ30sCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlWaWRlbyIsIG1hdGNoOi9eaHR0cHM/OlwvXC93d3dcLmlxXC5jb20vfSwKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheVZpZGVvIiwgbm9kZToiLm0tdmlkZW8tcGxheWVyLXdyYXAiLG1hdGNoOi9eaHR0cHM/OlwvXC9tLmlxaXlpXC5jb20vLGFyZWFDbGFzc05hbWU6J20tc2xpZGluZy1saXN0J30sCgogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5VmlkZW8iLCBub2RlOiIjcGxheWVyI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iJwbGF5VmlkZW8iLCBub2RlOiIjcGxheWVyV3JhcCIsbm9kZVR5cGU6J2lkJyxtYXRjaDovZmlsbVwuc29odVwuY29tL30sCgogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5VmlkZW8iLCBtYXRjaDovdHVkb3VcLmNvbS99LAoKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheVZpZGVvIixtYXRjaDovbGVcLmNvbS99LAoKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheVZpZGVvIixtYXRjaDovcHB0dlwuY29tL30sCgogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5VmlkZW8iLG1hdGNoOi8xOTA1XC5jb20vfSwKCiAgICAgICAgICAgIF19XSwKCiAgICAgICAgICAgIGp4TXVzaWM6W3tpc09wZW46R01fZ2V0VmFsdWUoJ211c2ljTGlzdCcsJzIyJyksd2ViOlsKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheU11c2ljIixuYW1lOiduZXRlYXNlJyxtYXRjaDovXmh0dHBzPzpcL1wvbXVzaWNcLjE2M1wuY29tLyx0aXA6J+ivt+WcqOmfs+S5kOWNleabsumhteeCueWHu+Wbvuagh+S4i+i9vSd9LAoKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheU11c2ljIixuYW1lOidxcScsbWF0Y2g6L15odHRwcz86XC9cL3lcLnFxXC5jb20vLHRpcDon6K+354K55Ye75pKt5pS+6ZyA6KaB5LiL6L2955qE5q2M5puy77yM5Zyo5pKt5pS+6aG154K55Ye75Zu+5qCH5LiL6L29J30sCgogICAgICAgICAgICAgICAge2Z1bmNOYW1lOiJwbGF5TXVzaWMiLG5hbWU6J2t1Z291JyxtYXRjaDova3Vnb3VcLmNvbS8sdGlwOifor7fngrnlh7vmkq3mlL7pnIDopoHkuIvovb3nmoTmrYzmm7LvvIznhLblkI7lnKjnvZHpobXkuIvmlrnmkq3mlL7lmajlhoXngrnlh7si5LiL6L29Iid9LAoKICAgICAgICAgICAgICAgIHtmdW5jTmFtZToicGxheU11c2ljIixuYW1lOidrdXdvJyxtYXRjaDova3V3b1wuY24vLHRpcDon6K+354K55Ye75pKt5pS+6ZyA6KaB5LiL6L2955qE5q2M5puy77yM54S25ZCO5Zyo572R6aG15LiL5pa55pKt5pS+5Zmo5YaF54K55Ye7IuS4i+i9vSInfSwKCiAgICAgICAgICAgICAgICB7ZnVuY05hbWU6InBsYXlNdXNpYyIsbmFtZToneGltYWxheWEnLG1hdGNoOi9eaHR0cHM/OlwvXC93d3dcLnhpbWFsYXlhXC5jb20vLHRpcDon6K+354K55Ye75pKt5pS+6ZyA6KaB5LiL6L2955qE5q2M5puy77yM54S25ZCO5Zyo572R6aG15LiL5pa55pKt5pS+5Zmo5YaF54K55Ye7IuS4i+i9vSInfQogICAgICAgICAgICBdfV0sCgogICAgICAgICAgICBwbGF5TGluZTpbCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLnuq/lh4AxIiwidXJsIjoiaHR0cHM6Ly96MS5tMTkwNy50b3AvP2p4PSIsIm1vYmlsZSI6MX0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiJC56uZMSIsInVybCI6Imh0dHBzOi8vanguanNvbnBsYXllci5jb20vcGxheWVyLz91cmw9IiwibW9iaWxlIjoxfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IueIseixhiIsInVybCI6Imh0dHBzOi8vanguYWlkb3Vlci5uZXQvP3VybD0iLCJtb2JpbGUiOjF9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiQkwiLCJ1cmwiOiJodHRwczovL3ZpcC5ibGppZXguY29tLz92PSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLlhrDosYYiLCJ1cmwiOiJodHRwczovL2FwaS5xaWFucWkubmV0L3ZpcC8/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLnmb7ln58iLCJ1cmwiOiJodHRwczovL2p4LjYxOGcuY29tLz91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IkNLIiwidXJsIjoiaHR0cHM6Ly93d3cuY2twbGF5ZXIudmlwL2ppZXhpLz91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IkNIb2siLCJ1cmwiOiJodHRwczovL3d3dy5nYWk0LmNvbS8/dXJsPSIsIm1vYmlsZSI6MX0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiJja21vdiIsInVybCI6Imh0dHBzOi8vd3d3LmNrbW92LnZpcC9hcGkucGhwP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiSDgiLCJ1cmwiOiJodHRwczovL3d3dy5oOGp4LmNvbS9qaWV4aS5waHA/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiJKWSIsInVybCI6Imh0dHBzOi8vangucGxheWVyankuY29tLz91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6Iuino+aekCIsInVybCI6Imh0dHBzOi8vY2ttb3YuY2N5ampkLmNvbS9ja21vdi8/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLop6PmnpBsYSIsInVybCI6Imh0dHBzOi8vYXBpLmppZXhpLmxhLz91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IuiAgeadvyIsInVybCI6Imh0dHBzOi8vdmlwLmxhb2JhbmRxLmNvbS9qaWV4aS5waHA/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiJNQU8iLCJ1cmwiOiJodHRwczovL3d3dy5tdG9zei5jb20vbTN1OC5waHA/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiJNM1U4IiwidXJsIjoiaHR0cHM6Ly9qeC5tM3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8/dXJsPSIsIm1vYmlsZSI6MX0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiLnu7TlpJoiLCJ1cmwiOiJodHRwczovL2p4Lml2aXRvLmNuLz91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IuiZvuexsyIsInVybCI6Imh0dHBzOi8vangueG1mbHYuY29tLz91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IuS6keerryIsInVybCI6Imh0dHBzOi8vc2IuNWdzZW8ubmV0Lz91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IuS6keaekCIsInVybCI6Imh0dHBzOi8vangueXBhcnNlLmNvbS9pbmRleC5waHA/dXJsPSIsIm1vYmlsZSI6MH0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiIwNTIzIiwidXJsIjoiaHR0cHM6Ly9nby55aDA1MjMuY24veS5jeT91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IjE35LqRIiwidXJsIjoiaHR0cHM6Ly93d3cuMTcxN3l1bi5jb20vangvdHkucGhwP3VybD0iLCJtb2JpbGUiOjB9LAogICAgICAgICAgICAgICAgeyJuYW1lIjoiMTgwIiwidXJsIjoiaHR0cHM6Ly9qeC4wMDAxODAudG9wL2p4Lz91cmw9IiwibW9iaWxlIjowfSwKICAgICAgICAgICAgICAgIHsibmFtZSI6IjRLIiwidXJsIjoiaHR0cHM6Ly9qeC40a2R2LmNvbS8/dXJsPSIsIm1vYmlsZSI6MX0sCiAgICAgICAgICAgICAgICB7Im5hbWUiOiI4MDkwIiwidXJsIjoiaHR0cHM6Ly93d3cuODA5MGcuY24vP3VybD0iLCJtb2JpbGUiOjB9CiAgICAgICAgICAgIF0sCgogICAgICAgICAgICB6aE5pY2U6W3tpc09wZW46R01fZ2V0VmFsdWUoJ3poaWh1TGlzdCcsJzIyJyksd2ViOlsKICAgICAgICAgICAgICA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YWxzZSx2YWx1ZTonaid9LAogICAgICAgICAgICAgICAge2NvZGU6NzQsaXNTaGlmdDp0cnVlLHZhbHVlOidKJ30sCiAgICAgICAgICAgICAgICB7Y29kZTo3NSxpc1NoaWZ0OmZhbHNlLHZhbHVlOidrJ30sCiAgICAgICAgICAgICAgICB7Y29kZTo3NSxpc1NoaWZ0OnRydWUsdmFsdWU6J0snfSwKICAgICAgICAgICAgICAgIHtjb2RlOjc2LGlzU2hpZnQ6ZmFsc2UsdmFsdWU6J2wnfSwKICAgICAgICAgICAgICAgIHtjb2RlOjc2LGlzU2hpZnQ6dHJ1ZSx2YWx1ZTonTCd9LAogICAgICAgICAgICBdLAoKICAgICAgICAgICAgZG93bmxvYWRPcHRpb246W3tuYW1lOifnm7TmjqXkuIvovb0nLGlkOid0b0Rvd25sb2FkJ30se25hbWU6J+WkjeWItumTvuaOpScsaWQ6J3RvQ29weSd9LHtuYW1lOifmiZPlvIDmlofku7YnLGlkOid0b0xpbmsnfV0KCiAgICAgICAgfQoKICAgICAgICB2YXIge2dldENvdXBvbixqeFZpZGVvLGp4TXVzaWMscGxheUxpbmUsemhOaWNlLHRhb2Jhbyx2aWRlb0Rvd25sb2FkLGtleUNvZGUsZG93bmxvYWRPcHRpb24sYmFpZHV9ID0gZGF0YXM7CgogICAgICAgIC8qLS1DbGFzcy0tKi8KICAgICAgICBjbGFzcyBCYXNlQ2xhc3N7CgogICAgICAgICAgICBjb25zdHJ1Y3RvcigpewoKICAgICAgICAgICAgICAgIGlmKEdNX2dldFZhbHVlKCdpY29uUG9zaXRpb25TZXRQYWdlJykgIT0gMCl7CgogICAgICAgICAgICAgICAgICAgIGljb25WaXBUb3AgPSBHTV9nZXRWYWx1ZSgnaWNvblRvcCcpIHx8IEdNX2dldFZhbHVlKCdpY29uVG9wJykgPT0gMD9HTV9nZXRWYWx1ZSgnaWNvblRvcCcpOmljb25WaXBUb3A7CgogICAgICAgICAgICAgICAgICAgIGljb25WaXBQb3NpdGlvbiA9IEdNX2dldFZhbHVlKCdpY29uUG9zaXRpb24nKT9HTV9nZXRWYWx1ZSgnaWNvblBvc2l0aW9uJyk6aWNvblZpcFBvc2l0aW9uOwoKICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZExlZnQgPSBpY29uVmlwUG9zaXRpb249PSdsZWZ0Jz8nc2VsZWN0ZWQnOicnOwoKICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZFJpZ2h0ID0gaWNvblZpcFBvc2l0aW9uPT0ncmlnaHQnPydzZWxlY3RlZCc6Jyc7CgogICAgICAgICAgICAgICAgICAgIGljb25WaXBXaWR0aCA9IEdNX2dldFZhbHVlKCdpY29uV2lkdGgnKT9HTV9nZXRWYWx1ZSgnaWNvbldpZHRoJyk6aWNvblZpcFdpZHRoOwoKICAgICAgICAgICAgICAgICAgICBpY29uV2FpdFRpbWUgPSBHTV9nZXRWYWx1ZSgnaWNvbldhaXRUaW1lJyk/R01fZ2V0VmFsdWUoJ2ljb25XYWl0VGltZScpKjEwMDA6aWNvbldhaXRUaW1lOwoKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBHTV9yZWdpc3Rlck1lbnVDb21tYW5kKCLorr7nva4iLCAoKSA9PiB0aGlzLm1lbnVTZXQoKSk7CgogICAgICAgICAgICB9CgogICAgICAgICAgICBtZW51U2V0KCl7CgogICAgICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKCiAgICAgICAgICAgICAgICBsZXQgbWVudVNldFN0eWxlID0gYAogICAgICAgICAgICAgICAgICAgICAgICAuemhtTWFza3sKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6OTk5OTk5OTk5OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojMDAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IGZpeGVkO3RvcDogMDtyaWdodDogMDtib3R0b206IDA7bGVmdDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wYWNpdHk6MC44OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC53cmFwLWJveHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6MTAwMDAwMDAwMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOmZpeGVkOzt0b3A6IDUwJTtsZWZ0OiA1MCU7dHJhbnNmb3JtOiB0cmFuc2xhdGUoLTUwJSwgLTIwMHB4KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiAzMDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiAjNTU1OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDVweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJmbG93OmhpZGRlbjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQ6MTZweCBudW1Gb250LFBpbmdGYW5nU0MtUmVndWxhcixUYWhvbWEsTWljcm9zb2Z0IFlhaGVpLHNhbnMtc2VyaWYgIWltcG9ydGFudDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtd2VpZ2h0OjQwMCAhaW1wb3J0YW50OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZXRXcmFwSGVhZHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6I2YyNDQ0MztoZWlnaHQ6NDBweDtjb2xvcjojZmZmO3RleHQtYWxpZ246Y2VudGVyO2xpbmUtaGVpZ2h0OjQwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNldFdyYXBMaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNldFdyYXBMaSBsaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6ICNmZmY7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItYm90dG9tOjFweCBzb2xpZCAjZWVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luOjBweCAhaW1wb3J0YW50OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzoxMnB4IDIwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO2FsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaXN0LXN0eWxlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAuc2V0V3JhcExpQ29udGVudHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO2FsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNldFdyYXBTYXZlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246YWJzb2x1dGU7dG9wOi0ycHg7cmlnaHQ6MTBweDtmb250LXNpemU6MjRweDtjdXJzb3I6cG9pbnRlcgogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0Rm9vdHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOmFic29sdXRlO2JvdHRvbTowcHg7cGFkZGluZzoxMHB4IDIwcHg7d2lkdGg6MTAwJTsKICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDoxMDAwMDAwMDA5O2JhY2tncm91bmQ6I2ZlZjllZjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldEZvb3RMaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0Rm9vdExpIGxpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogaW5saW5lLWZsZXg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOjBweCAycHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47YWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZTogMTJweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldEZvb3RMaSBsaSBhewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6IzU1NTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldEZvb3RMaSBhOmhvdmVyIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiNmZTZkNzM7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRQYWdlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDoxMDAwMDAwMDAxOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246YWJzb2x1dGU7dG9wOjBweDtsZWZ0OjMwMHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZDojZmZmOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6MzAwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6MTAwJTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuaWNvblNldFVsSGVhZHsKICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRQYWdlSGVhZHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1ib3R0b206MXB4IHNvbGlkICNjY2M7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6NDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUtaGVpZ2h0OjQwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6I2ZlNmQ3MzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiNmZmY7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6IDE1cHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmljb25TZXRQYWdlTGl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW46MHB4O3BhZGRpbmc6MHB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0UGFnZUxpIGxpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlzdC1zdHlsZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6OHB4IDIwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpoaWh1U2V0UGFnZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHotaW5kZXg6MTAwMDAwMDAwMjtwb3NpdGlvbjphYnNvbHV0ZTt0b3A6MHB4O2xlZnQ6MzAwcHg7YmFja2dyb3VuZDojZmZmO3dpZHRoOjMwMHB4O2hlaWdodDoxMDAlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0UGFnZUlucHV0ewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogZmxleCAhaW1wb3J0YW50O2p1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjthbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aGlodVNldFBhZ2VMaXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7cGFkZGluZzowcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6MzAwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdy15OiBzY3JvbGw7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpoaWh1U2V0UGFnZUxpOjotd2Via2l0LXNjcm9sbGJhciB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKua7muWKqOadoeaVtOS9k+agt+W8jyovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aCA6IDJweDsgIC8q6auY5a695YiG5Yir5a+55bqU5qiq56uW5rua5Yqo5p2h55qE5bC65a+4Ki8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDogMXB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aGlodVNldFBhZ2VMaTo6LXdlYmtpdC1zY3JvbGxiYXItdGh1bWIgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgLyrmu5rliqjmnaHph4zpnaLlsI/mlrnlnZcqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1cyAgIDogMnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZlNmQ3MzsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhpaHVTZXRQYWdlTGk6Oi13ZWJraXQtc2Nyb2xsYmFyLXRyYWNrIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8q5rua5Yqo5p2h6YeM6Z2i6L2o6YGTKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3cgICA6IGluc2V0IDAgMCA1cHggcmdiYSgwLCAwLCAwLCAwLjIpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZCAgIDogI2VkZWRlZDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDEwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpoaWh1U2V0UGFnZUxpIGxpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWJvdHRvbToxcHggc29saWQgI2VlZTtwYWRkaW5nOjEycHggMjBweDtkaXNwbGF5OmJsb2NrOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aGlodVNldFBhZ2VDb250ZW50ewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogZmxleCAhaW1wb3J0YW50O2p1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbjthbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAuY2lyY3VsYXJ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogNDBweDtoZWlnaHQ6IDIwcHg7Ym9yZGVyLXJhZGl1czogMTZweDt0cmFuc2l0aW9uOiAuM3M7Y3Vyc29yOiBwb2ludGVyO2JveC1zaGFkb3c6IDAgMCAzcHggIzk5OSBpbnNldDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAucm91bmQtYnV0dG9uewogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDIwcHg7aGVpZ2h0OiAyMHB4Oztib3JkZXItcmFkaXVzOiA1MCU7Ym94LXNoYWRvdzogMCAxcHggNXB4IHJnYmEoMCwwLDAsLjUpO3RyYW5zaXRpb246IC4zcztwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLmJhY2t7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXI6IHNvbGlkICNGRkY7IGJvcmRlci13aWR0aDogMCAzcHggM3B4IDA7IGRpc3BsYXk6IGlubGluZS1ibG9jazsgcGFkZGluZzogM3B4O3RyYW5zZm9ybTogcm90YXRlKDEzNWRlZyk7ICAtd2Via2l0LXRyYW5zZm9ybTogcm90YXRlKDEzNWRlZyk7bWFyZ2luLWxlZnQ6MTBweDtjdXJzb3I6cG9pbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudG8tcmlnaHR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW4tbGVmdDoyMHB4OyBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7IHBhZGRpbmc6IDNweDt0cmFuc2Zvcm06IHJvdGF0ZSgtNDVkZWcpOyAtd2Via2l0LXRyYW5zZm9ybTogcm90YXRlKC00NWRlZyk7Y3Vyc29yOnBvaW50ZXI7CgogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5pY29uU2V0U2F2ZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZToyNHB4O2N1cnNvcjpwb2ludGVyO21hcmdpbi1yaWdodDo1cHg7bWFyZ2luLWJvdHRvbTo0cHg7Y29sb3I6I0ZGRjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3NldF9wYWdlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDoxMDAwMDAwMDAzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246YWJzb2x1dGU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b3A6MHB4O2xlZnQ6MzAwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kOiNmZmY7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDozMDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDoxMDAlOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC56aG1fc2V0X3BhZ2VfaGVhZGVyewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWJvdHRvbToxcHggc29saWQgI2NjYzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDo0MHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZS1oZWlnaHQ6NDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGlnbi1pdGVtczogY2VudGVyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojZmU2ZDczOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6I2ZmZjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZTogMTVweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3NldF9wYWdlX2NvbnRlbnR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4ICFpbXBvcnRhbnQ7anVzdGlmeS1jb250ZW50OiBzcGFjZS1iZXR3ZWVuO2FsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnpobV9zZXRfcGFnZV9saXN0ewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFyZ2luOjBweDtwYWRkaW5nOjBweDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAuemhtX3NldF9wYWdlX2xpc3QgbGl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKmJvcmRlci1ib3R0b206MXB4IHNvbGlkICNjY2M7Ki8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6MTJweCAyMHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTpibG9jazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1ib3R0b206MXB4IHNvbGlkICNlZWU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgbGk6bGFzdC1jaGlsZHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1ib3R0b206bm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAvKi1mb3JtLSovCiAgICAgICAgICAgICAgICAgICAgICAgIDpyb290IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0tYmFzZS1jb2xvcjogIzQzNGE1NjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0td2hpdGUtY29sb3ItcHJpbWFyeTogI2Y3ZjhmODsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0td2hpdGUtY29sb3Itc2Vjb25kYXJ5OiAjZmVmZWZlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1ncmF5LWNvbG9yLXByaW1hcnk6ICNjMmMyYzI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLWdyYXktY29sb3Itc2Vjb25kYXJ5OiAjYzJjMmMyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1ncmF5LWNvbG9yLXRlcnRpYXJ5OiAjNjc2Zjc5OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1hY3RpdmUtY29sb3I6ICMyMjdjOWQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLXZhbGlkLWNvbG9yOiAjYzJjMmMyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1pbnZhbGlkLWNvbG9yOiAjZjcyZjQ3OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLS1pbnZhbGlkLWljb246IHVybCgiZGF0YTppbWFnZS9zdmcreG1sO2NoYXJzZXQ9dXRmOCwlM0NzdmclMjB4bWxucyUzRCUyMmh0dHAlM0ElMkYlMkZ3d3cudzMub3JnJTJGMjAwMCUyRnN2ZyUyMiUyMHdpZHRoJTNEJTIyMjQlMjIlMjBoZWlnaHQlM0QlMjIyNCUyMiUyMHZpZXdCb3glM0QlMjIwJTIwMCUyMDI0JTIwMjQlMjIlM0UlMjAlM0NwYXRoJTIwZCUzRCUyMk0xMy40MSUyMDEybDQuMy00LjI5YTElMjAxJTIwMCUyMDElMjAwLTEuNDItMS40MkwxMiUyMDEwLjU5bC00LjI5LTQuM2ExJTIwMSUyMDAlMjAwJTIwMC0xLjQyJTIwMS40Mmw0LjMlMjA0LjI5LTQuMyUyMDQuMjlhMSUyMDElMjAwJTIwMCUyMDAlMjAwJTIwMS40MiUyMDElMjAxJTIwMCUyMDAlMjAwJTIwMS40MiUyMDBsNC4yOS00LjMlMjA0LjI5JTIwNC4zYTElMjAxJTIwMCUyMDAlMjAwJTIwMS40MiUyMDAlMjAxJTIwMSUyMDAlMjAwJTIwMCUyMDAtMS40MnolMjIlMjBmaWxsJTNEJTIyJTIzZjcyZjQ3JTIyJTIwJTJGJTNFJTNDJTJGc3ZnJTNFIik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXQgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAxNnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IHJlbGF0aXZlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmlnaHQ6MHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtbW96LWFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcHBlYXJhbmNlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZCB2YXIoLS1ncmF5LWNvbG9yLXByaW1hcnkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogM3B4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAxLjdlbTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiAxLjc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzogMnB4IDFlbTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHQtb3ZlcmZsb3c6IGVsbGlwc2lzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbjogYmFja2dyb3VuZC1jb2xvciAwLjNzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6NTUlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOjE0cHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXRfX2JvZHk6LW1zLWlucHV0LXBsYWNlaG9sZGVyIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbG9yOiB2YXIoLS1ncmF5LWNvbG9yLXNlY29uZGFyeSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXRfX2JvZHk6Oi1tb3otcGxhY2Vob2xkZXIgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6IHZhcigtLWdyYXktY29sb3Itc2Vjb25kYXJ5KTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keTo6cGxhY2Vob2xkZXIgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3I6IHZhcigtLWdyYXktY29sb3Itc2Vjb25kYXJ5KTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAqLCA6OmFmdGVyLCA6OmJlZm9yZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaXppbmc6IGluaXRpYWwgIWltcG9ydGFudDsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keVtkYXRhLWlzLXZhbGlkXSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nLXJpZ2h0OiAxZW07CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXRfX2JvZHlbZGF0YS1pcy12YWxpZD10cnVlXSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLXZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keVtkYXRhLWlzLXZhbGlkPWZhbHNlXSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLWludmFsaWQtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdzogaW5zZXQgMCAwIDAgMXB4IHZhcigtLWludmFsaWQtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0LWlucHV0X19ib2R5OmZvY3VzIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0tYWN0aXZlLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCB2YXIoLS1hY3RpdmUtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0bGluZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fYm9keTotd2Via2l0LWF1dG9maWxsIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb24tZGVsYXk6IDk5OTlzOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLXdlYmtpdC10cmFuc2l0aW9uLXByb3BlcnR5OiBiYWNrZ3JvdW5kLWNvbG9yOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbi1wcm9wZXJ0eTogYmFja2dyb3VuZC1jb2xvcjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dC1pbnB1dF9fdmFsaWRhdG9yIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtcG9zaXRpb246IHJpZ2h0IDAuNWVtIGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtcmVwZWF0OiBuby1yZXBlYXQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLXNpemU6IDEuNWVtOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogaW5saW5lLWJsb2NrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAxMDAlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVmdDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvcDogMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOiAxMDAlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgei1pbmRleDogLTE7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHQtaW5wdXRfX2JvZHlbZGF0YS1pcy12YWxpZD1mYWxzZV0gKyAudGV4dC1pbnB1dF9fdmFsaWRhdG9yIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQtaW1hZ2U6IHZhcigtLWludmFsaWQtaWNvbik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNlbGVjdC1ib3ggewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNpemluZzogaW5oZXJpdDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZTogMTZweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb246IGJhY2tncm91bmQtY29sb3IgMC41cyBlYXNlLW91dDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOjkwcHg7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNlbGVjdC1ib3g6OmFmdGVyIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0tZ3JheS1jb2xvci1zZWNvbmRhcnkpIHRyYW5zcGFyZW50IHRyYW5zcGFyZW50IHRyYW5zcGFyZW50OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXN0eWxlOiBzb2xpZDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci13aWR0aDogNnB4IDRweCAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm90dG9tOiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudDogIiI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWlnaHQ6IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJnaW46IGF1dG8gMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvaW50ZXItZXZlbnRzOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmlnaHQ6IC03MnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9wOiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDA7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6LWluZGV4OiAxOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZWxlY3QtYm94X19ib2R5IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaXppbmc6IGluaGVyaXQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtd2Via2l0LWFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtbW96LWFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcHBlYXJhbmNlOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogdHJhbnNwYXJlbnQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZCB2YXIoLS1ncmF5LWNvbG9yLXByaW1hcnkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1czogM3B4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAxLjdlbTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiAxLjc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nLWxlZnQ6IDFlbTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmctcmlnaHQ6IGNhbGMoMWVtICsgMTZweCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aDogMTQwJTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZToxNHB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZy10b3A6MnB4OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZy1ib3R0b206MnB4OwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZWxlY3QtYm94X19ib2R5W2RhdGEtaXMtdmFsaWQ9dHJ1ZV0gewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9yZGVyLWNvbG9yOiB2YXIoLS12YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93OiBpbnNldCAwIDAgMCAxcHggdmFyKC0tdmFsaWQtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC5zZWxlY3QtYm94X19ib2R5W2RhdGEtaXMtdmFsaWQ9ZmFsc2VdIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0taW52YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93OiBpbnNldCAwIDAgMCAxcHggdmFyKC0taW52YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNlbGVjdC1ib3hfX2JvZHkuZm9jdXMtdmlzaWJsZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLWFjdGl2ZS1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93OiBpbnNldCAwIDAgMCAxcHggdmFyKC0tYWN0aXZlLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG91dGxpbmU6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnNlbGVjdC1ib3hfX2JvZHk6LXdlYmtpdC1hdXRvZmlsbCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cmFuc2l0aW9uLWRlbGF5OiA5OTk5czsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC13ZWJraXQtdHJhbnNpdGlvbi1wcm9wZXJ0eTogYmFja2dyb3VuZC1jb2xvcjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zaXRpb24tcHJvcGVydHk6IGJhY2tncm91bmQtY29sb3I7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHRhcmVhX19ib2R5IHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC13ZWJraXQtYXBwZWFyYW5jZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC1tb3otYXBwZWFyYW5jZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFwcGVhcmFuY2U6IG5vbmU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlcjogMXB4IHNvbGlkIHZhcigtLWdyYXktY29sb3ItcHJpbWFyeSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItcmFkaXVzOiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYm94LXNpemluZzogYm9yZGVyLWJveDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvbnQ6IGluaGVyaXQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZWZ0OiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0dGVyLXNwYWNpbmc6IGluaGVyaXQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzogMWVtOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzaXplOiBub25lOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9wOiAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhbnNpdGlvbjogYmFja2dyb3VuZC1jb2xvciAwLjVzIGVhc2Utb3V0OwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDEwMCU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0YXJlYV9fYm9keTpvbmx5LWNoaWxkIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2l6ZTogdmVydGljYWw7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHRhcmVhX19ib2R5OmZvY3VzIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0tYWN0aXZlLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCB2YXIoLS1hY3RpdmUtY29sb3IpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0bGluZTogbm9uZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAudGV4dGFyZWFfX2JvZHlbZGF0YS1pcy12YWxpZD10cnVlXSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXItY29sb3I6IHZhcigtLXZhbGlkLWNvbG9yKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaGFkb3c6IGluc2V0IDAgMCAwIDFweCB2YXIoLS12YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgLnRleHRhcmVhX19ib2R5W2RhdGEtaXMtdmFsaWQ9ZmFsc2VdIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvcmRlci1jb2xvcjogdmFyKC0taW52YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3gtc2hhZG93OiBpbnNldCAwIDAgMCAxcHggdmFyKC0taW52YWxpZC1jb2xvcik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIC50ZXh0YXJlYSAuX2R1bW15LWJveCB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBib3JkZXI6IDFweCBzb2xpZDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJveC1zaXppbmc6IGJvcmRlci1ib3g7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtaW4taGVpZ2h0OiAyNDBweDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG92ZXJmbG93OiBoaWRkZW47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdmVyZmxvdy13cmFwOiBicmVhay13b3JkOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFkZGluZzogMWVtOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlzaWJpbGl0eTogaGlkZGVuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpdGUtc3BhY2U6IHByZS13cmFwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgd29yZC13cmFwOiBicmVhay13b3JkOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIC50b0xlZnRNb3ZlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbmltYXRpb246bW92ZVRvTGVmdCAwLjVzIGluZmluaXRlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgLXdlYmtpdC1hbmltYXRpb246bW92ZVRvTGVmdCAwLjVzIGluZmluaXRlOyAvKlNhZmFyaSBhbmQgQ2hyb21lKi8KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbi1pdGVyYXRpb24tY291bnQ6MTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuaW1hdGlvbi1maWxsLW1vZGU6IGZvcndhcmRzOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBAa2V5ZnJhbWVzIG1vdmVUb0xlZnR7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tIHtsZWZ0OjIwMHB4O30KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvIHtsZWZ0OjBweDt9CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIEAtd2Via2l0LWtleWZyYW1lcyBtb3ZlVG9MZWZ0IC8qU2FmYXJpIGFuZCBDaHJvbWUqL3sKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyb20ge2xlZnQ6MjAwcHg7fQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8ge2xlZnQ6MHB4O30KICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgLnRvUmlnaHRNb3ZlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgbmltYXRpb246bW92ZVRvUmlnaHQgMnMgaW5maW5pdGU7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjptb3ZlVG9SaWdodCAycyBpbmZpbml0ZTsgLypTYWZhcmkgYW5kIENocm9tZSovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb24taXRlcmF0aW9uLWNvdW50OjE7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmltYXRpb24tZmlsbC1tb2RlOiBmb3J3YXJkczsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICBAa2V5ZnJhbWVzIG1vdmVUb1JpZ2h0ewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbSB7bGVmdDowcHg7fQogICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8ge2xlZnQ6MjAwMHB4O30KICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgQC13ZWJraXQta2V5ZnJhbWVzIG1vdmVUb1JpZ2h0IC8qU2FmYXJpIGFuZCBDaHJvbWUqL3sKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyb20ge2xlZnQ6MHB4O30KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvIHtsZWZ0OjIwMHB4O30KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIGA7CgogICAgICAgICAgICAgICAgZG9tU3R5bGUgLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKG1lbnVTZXRTdHlsZSkpOwoKICAgICAgICAgICAgICAgIGRvbUhlYWQuYXBwZW5kQ2hpbGQoZG9tU3R5bGUpOwoKICAgICAgICAgICAgICAgIHZhciBzZXRMaXN0SnNvbj0gWwogICAgICAgICAgICAgICAgICAgIHsnbGlzdE5hbWUnOmxhbmcuaWNvblBvc2l0aW9uLCdzZXRMaXN0SUQnOidpY29uUG9zaXRpb25TZXRQYWdlJywnc2V0UGFnZUlEJzonbW92aWVJY29uU2V0UGFnZScsJ3Rha2VQbGFjZSc6JzBweCd9LAogICAgICAgICAgICAgICAgICAgIHsnbGlzdE5hbWUnOmxhbmcucGxheVZpZGVvLCdzZXRMaXN0SUQnOidtb3ZpZUxpc3QnLCdzZXRQYWdlSUQnOidtb3ZpZVZpZGVvU2V0UGFnZScsJ3Rha2VQbGFjZSc6JzBweCd9LAogICAgICAgICAgICAgICAgICAgIHsnbGlzdE5hbWUnOmxhbmcucGxheU11c2ljLCdzZXRMaXN0SUQnOidtdXNpY0xpc3QnLCdzZXRQYWdlSUQnOicnLCd0YWtlUGxhY2UnOicwcHgnfSwKICAgICAgICAgICAgICAgICAgICB7J2xpc3ROYW1lJzpsYW5nLnpoTmljZSwnc2V0TGlzdElEJzonemhpaHVMaXN0Jywnc2V0UGFnZUlEJzonemhpaHVJY29uU2V0UGFnZScsJ3Rha2VQbGFjZSc6JzBweCd9LAogICAgICAgICAgICAgICAgICAgIHsnbGlzdE5hbWUnOmxhbmcudmlkZW9Eb3dubG9hZCwnc2V0TGlzdElEJzondmlkZW9Eb3dubG9hZExpc3QnLCdzZXRQYWdlSUQnOid2aWRlb0Rvd25sb2FkU2V0UGFnZScsJ3Rha2VQbGFjZSc6JzBweCd9LAogICAgICAgICAgICAgICAgICAgIHsnbGlzdE5hbWUnOmxhbmcuYmFpZHVEb3dubG9hZCwnc2V0TGlzdElEJzonYmFpZHVMaXN0Jywnc2V0UGFnZUlEJzonJywndGFrZVBsYWNlJzonMHB4J30sCiAgICAgICAgICAgICAgICBdOwoKICAgICAgICAgICAgICAgIHZhciB6aGlodU9wdGlvbkpzb24gPSBbCiAgICAgICAgICAgICAgICAgICAgeydvcHRpb25OYW1lJzpsYW5nLnpoVmlkZW9DbG9zZSwnb3B0aW9uSUQnOidyZW1vdmVWaWRlbycsJ2RlZmF1bHQnOicwJ30sCiAgICAgICAgICAgICAgICAgICAgeydvcHRpb25OYW1lJzpsYW5nLnpoVmlkZW9Eb3dubG9hZCwnb3B0aW9uSUQnOidkb3dubG9hZFZpZGVvJywnZGVmYXVsdCc6JzIyJ30sCiAgICAgICAgICAgICAgICAgICAgeydvcHRpb25OYW1lJzpsYW5nLnpoQURDbG9zZSwnb3B0aW9uSUQnOidyZW1vdmVBRCcsJ2RlZmF1bHQnOicyMid9LAogICAgICAgICAgICAgICAgICAgIHsnb3B0aW9uTmFtZSc6bGFuZy56aENsb3NlTGVmdCwnb3B0aW9uSUQnOidyZW1vdmVSaWdodCcsJ2RlZmF1bHQnOicwJ30sCiAgICAgICAgICAgICAgICAgICAgeydvcHRpb25OYW1lJzpsYW5nLnpoQ2hhbmdlTGluaywnb3B0aW9uSUQnOidjaGFuZ2VMaW5rJywnZGVmYXVsdC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RVbEhlYWQnPjxsaSBjbGFzcz0nemhtX3NldF9wYWdlX2hlYWRlcic+PHNwYW4gY2xhc3M9J2JhY2snPjwvc3Bhbj48c3Bhbj4iK2xhbmcudmlkZW9Eb3dubG9hZCsiPC9zcGFuPjxzcGFuICBjbGFzcz0naWNvblNldFNhdmUnPsOXPC9saT48L3VsPiI7CgogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8dWwgY2xhc3M9J3pobV9zZXRfcGFnZV9saXN0Jz4iOwoKICAgICAgICAgICAgICAgIGZvcihsZXQgaT0wO2k8dmlkZW9Eb3dubG9hZE9wdGlvbkpzb24ubGVuZ3RoO2krKyl7CgogICAgICAgICAgICAgICAgICAgIGxldCBiYWNrQ29sb3Isc3dpdGNoQmFja0NvcmxvcixkaXNwbGF5OwoKICAgICAgICAgICAgICAgICAgICBsZXQgb3B0aW9uVmFsdWUgPSBHTV9nZXRWYWx1ZSh2aWRlb0Rvd25sb2FkT3B0aW9uSnNvbltpXS5vcHRpb25JRCx2aWRlb0Rvd25sb2FkT3B0aW9uSnNvbltpXS5kZWZhdWx0KTsKCiAgICAgICAgICAgICAgICAgICAgaWYob3B0aW9uVmFsdWUgIT0gJzIyJyl7CgogICAgICAgICAgICAgICAgICAgICAgICBiYWNrQ29sb3IgPSAnI2ZmZic7CgogICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2hCYWNrQ29ybG9yID0gJyNGRkYnOwoKICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheSA9ICdub25lJzsKCiAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICBiYWNrQ29sb3IgPSAnI2ZlNmQ3Myc7CgogICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2hCYWNrQ29ybG9yID0gJyNGRkU1RTUnOwoKICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheSA9ICdibG9jayc7CgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAg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WRlbysiPC9zcGFuPjxzcGFuICBjbGFzcz0naWNvblNldFNhdmUnPsOXPC9saT48L3VsPiI7CgogICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8dWwgY2xhc3M9J3pobV9zZXRfcGFnZV9saXN0Jz4iOwoKICAgICAgICAgICAgICAgIGZvcihsZXQgaT0wO2k8cGxheVZpZGVvT3B0aW9uSnNvbi5sZW5ndGg7aSsrKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IGJhY2tDb2xvcixzd2l0Y2hCYWNrQ29ybG9yLGRpc3BsYXk7CgogICAgICAgICAgICAgICAgICAgIGxldCBvcHRpb25WYWx1ZSA9IEdNX2dldFZhbHVlKHBsYXlWaWRlb09wdGlvbkpzb25baV0ub3B0aW9uSUQscGxheVZpZGVvT3B0aW9uSnNvbltpXS5kZWZhdWx0KTsKCiAgICAgICAgICAgICAgICAgICAgaWYob3B0aW9uVmFsdWUgIT0gJzIyJyl7CgogICAgICAgICAgICAgICAgICAgICAgICBiYWNrQ29sb3IgPSAnI2ZmZic7CgogICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2hCYWNrQ29ybG9yID0gJyNGRkYnOwoKICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheSA9ICdub25lJzsKCiAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICBiYWNrQ29sb3IgPSAnI2ZlNmQ3Myc7CgogICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2hCYWNrQ29ybG9yID0gJyNGRkU1RTUnOwoKICAgICAgICAgICAgICAgICAgICAgICAgZGlzcGxheSA9ICdibG9jayc7CgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8bGk+IjsKCiAgICAgICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8ZGl2IGNsYXNzPSd6aG1fc2V0X3BhZ2VfY29udGVudCc+IjsKCiAgICAgICAgICAgICAgICAgICAgc2V0S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HTV9nZXRWYWx1ZSgncGxheVZpZGVvTGluZVRleHQnLCcnKSsiPC90ZXh0YXJlYT4iOwoKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjwvZGl2PjwvZGl2PjwvbGk+IjsKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjwvdWw+IgoKICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPC9kaXY+IgoKICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPGRpdiBjbGFzcz0nemhpaHVTZXRQYWdlJyBpZD0nemhpaHVJY29uU2V0UGFnZSc+IjsKCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9Ijx1bCBjbGFzcz0naWNvblNldFVsSGVhZCc+PGxpIGNsYXNzPSdpY29uU2V0UGFnZUhlYWQnPjxzcGFuIGNsYXNzPSdiYWNrJz48L3NwYW4+PHNwYW4+IitsYW5nLnpoU2V0KyI8L3NwYW4+PHNwYW4gIGNsYXNzPSdpY29uU2V0U2F2ZSc+w5c8L2xpPjwvdWw+IjsKCiAgICAgICAgICAgICAgICBzZXRIdG1sICs9Ijx1bCBjbGFzcz0nemhpaHVTZXRQYWdlTGknPiI7CgogICAgICAgICAgICAgICAgZm9yKHZhciBvcHRpb25OPTA7b3B0aW9uTjx6aGlodU9wdGlvbkpzb24ubGVuZ3RoO29wdGlvbk4rKyl7CgogICAgICAgICAgICAgICAgICAgIGxldCBiYWNrQ29sb3Isc3dpdGNoQmFja0NvcmxvcjsKCiAgICAgICAgICAgICAgICAgICAgbGV0IG9wdGlvblZhbHVlID0gR01fZ2V0VmFsdWUoemhpaHVPcHRpb25Kc29uW29wdGlvbk5dLm9wdGlvbklELHpoaWh1T3B0aW9uSnNvbltvcHRpb25OXS5kZWZhdWx0KTsKCiAgICAgICAgICAgICAgICAgICAgaWYob3B0aW9uVmFsdWUgIT0gJzIyJyl7CgogICAgICAgICAgICAgICAgICAgICAgICBiYWNrQ29sb3IgPSAnI2ZmZic7CgogICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2hCYWNrQ29ybG9yID0gJyNGRkYnOwoKICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tDb2xvciA9ICcjZmU2ZDczJzsKCiAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaEJhY2tDb3Jsb3IgPSAnI0ZGRTVFNSc7CgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgc2V0SHRtbCArPSI8bGkgPjxkaXYgY2xhc3M9J3poaWh1U2V0UGFnZUNvbnRlbnQnPjxzcGFuPiIremhpaHVPcHRpb25Kc29uW29wdGlvbk5dLm9wdGlvbk5hbWUrIjwvc3Bhbj4iOwoKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgY2xhc3M9J2NpcmN1bGFyJyBzdHlsZT0nYmFja2dyb3VuZC1jb2xvcjogIitzd2l0Y2hCYWNrQ29ybG9yKyI7JyBpZD0iK3poaWh1T3B0aW9uSnNvbltvcHRpb25OXS5vcHRpb25JRCsiPjxkaXYgY2xhc3M9J3JvdW5kLWJ1dHRvbicgc3R5bGU9J2JhY2tncm91bmQ6ICIrYmFja0NvbG9yKyI7bGVmdDogIitvcHRpb25WYWx1ZSsicHg7Jz48L2Rpdj48L2Rpdj48L2Rpdj4iOwoKICAgICAgICAgICAgICAgICAgICBpZih6aGlodU9wdGlvbkpzb25bb3B0aW9uTl0ub3B0aW9uSUQgPT0gJ3JlbW92ZUtleXdvcmQnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBrZXl3b3JkU2hvdzsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKEdNX2dldFZhbHVlKCdyZW1vdmVLZXl3b3JkJywnMCcpID09ICcyMicpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleXdvcmRTaG93ID0gJ2Jsb2NrJzsKCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5d29yZFNob3cgPSAnbm9uZSc7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPGRpdiBzdHlsZT0nbWFyZ2luLXRvcDoxMHB4O2Rpc3BsYXk6IitrZXl3b3JkU2hvdysiO3BhZGRpbmc6NXB4IDBweDsnIGlkPSd6aGlodUtleXdvcmQnPjxzcGFuIGNsYXNzPSd0ZXh0LWlucHV0Jz48aW5wdXQgdmFsdWU9JyIrR01fZ2V0VmFsdWUoJ2lucHV0WmhLZXl3b3JkJywnJykrIicgaWQ9J2lucHV0WmhLZXl3b3JkJyBjbGFzcz0ndGV4dC1pbnB1dF9fYm9keScgcGxhY2Vob2xkZXI9JyIrbGFuZy50aXBLZXl3b3JkKyInIHN0eWxlPSd3aWR0aDo4OCUnPjxzcGFuPjwvZGl2PiI7CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBpZih6aGlodU9wdGlvbkpzb25bb3B0aW9uTl0ub3B0aW9uSUQgPT0gJ3JlbW92ZUF1dGhvck5hbWUnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhdXRob3JOYW1lU2hvdzsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKEdNX2dldFZhbHVlKCdyZW1vdmVBdXRob3JOYW1lJywnMCcpID09ICcyMicpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF1dGhvck5hbWVTaG93ID0gJ2Jsb2NrJzsKCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYXV0aG9yTmFtZVNob3cgPSAnbm9uZSc7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPGRpdiBzdHlsZT0nbWFyZ2luLXRvcDoxMHB4O2Rpc3BsYXk6IithdX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AgICAgICAgICAgICAgIGlmKGxpc3RWYWx1ZSAhPSAyMil7CiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2tDb2xvciA9ICcjZmZmJzsKICAgICAgICAgICAgICAgICAgICAgICAgYXJyb3dDb2xvcj0gJyNFRUUnOwogICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2hCYWNrQ29ybG9yID0gJyNGRkYnOwoKICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKICAgICAgICAgICAgICAgICAgICAgICAgYmFja0NvbG9yID0gJyNmZTZkNzMnOwogICAgICAgICAgICAgICAgICAgICAgICBhcnJvd0NvbG9yID0gJyNDQ0MnOwogICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2hCYWNrQ29ybG9yID0gJyNGRkU1RTUnOwogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgaWYoc2V0TGlzdEpzb25bc2V0Tl0uc2V0UGFnZUlEID09ICcnKXsKICAgICAgICAgICAgICAgICAgICAgICAgYXJyb3dDb2xvciA9ICcjRUVFJzsKICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPGxpPjxzcGFuPiIrc2V0TGlzdEpzb25bc2V0Tl0ubGlzdE5hbWUrIjwvc3Bhbj4iOwoKICAgICAgICAgICAgICAgICAgICBzZXRIdG1sICs9IjxkaXYgY2xhc3M9J3NldFdyYXBMaUNvbnRlbnQnPiI7CgogICAgICAgICAgICAgICAgICAgIHNldEh0bWwgKz0iPGRpdiBjbGFzcz0nY2lyY3VsYXInIGlkPSciK3NldExpc3RKc29uW3NldE5dLnNldExpc3RJRCsiJyBzdHlsZT0nYmFja2dyb3VuZC1jb2xvcjogIitzd2l0Y2hCYWNrQ29ybG9yKyI7Jz48ZGl2IGNsYXNzPSdyb3VuZC1idXR0b24nIHN0eWxlPSdiYWNrZ3JvdW5kOiAiK2JhY2tDb2xvcisiO2xlZnQ6ICIrbGlzdFZhbHVlKyJweCc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mdldD0nX2JsYW5rJz4iK2xhbmcucmVkUmV3YXJkKyI8L2E+PC9saT7jg7s8bGk+PGEgaHJlZj0naHR0cHM6Ly84MG5vdGUuY29tLzIwMjIvMDMvMzIzLmh0bWwnIHRhcmdldD0nX2JsYW5rJz4iK2xhbmcudGhhbmsrIjwvYT48L2xpPiI7CgogICAgICAgICAgICAgICAgc2V0SHRtbCArPSc8L3VsPic7CgogICAgICAgICAgICAgICAgc2V0SHRtbCArPSc8L2Rpdj4nOwoKICAgICAgICAgICAgICAgIHNldEh0bWwgKz0gIjwvZGl2PiI7CgogICAgICAgICAgICAgICAgaWYoZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3NldE1hc2snKSkgcmV0dXJuOwoKICAgICAgICAgICAgICAgIHRoaXMuY3JlYXRlRWxlbWVudCgnZGl2JywnemhtTWVudScpOwoKICAgICAgICAgICAgICAgIGxldCB6aG1NZW51ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3pobU1lbnUnKTsKCiAgICAgICAgICAgICAgICB6aG1NZW51LmlubmVySFRNTCA9IHNldEh0bWw7CgogICAgICAgICAgICAgICAgbGV0IHRpbWVyWmhtSWNvbiA9IHNldEludGVydmFsKGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgIGlmIChkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtTWVudScpKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXJaaG1JY29uKTsgLy8g5Y+W5raI5a6a5pe25ZmoCgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgY2lyY3VsYXIgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuY2lyY3VsYXInKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGNpcmN1bGFyLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsIGZ1bmN0aW9uKF9lKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGJ1dHRvblN0eWxlID0gaXRlbS5jaGlsZHJlblswXS5zdHlsZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxlZnQgPSBidXR0b25TdHlsZS5sZWZ0OwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZWZ0ID0gcGFyc2VJbnQobGVmdCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsaXN0TGVmdFZhbHVlOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihsZWZ0PT0wKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1dHRvblN0eWxlLmxlZnQgPSAnMjJweCc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidXR0b25TdHlsZS5iYWNrZ3JvdW5kID0gJyNmZTZkNzMnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5zdHlsZS5iYWNrZ3JvdW5kPScjZmZFNUU1JzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0ubmV4dFNpYmxpbmcgJiYgaXRlbS5uZXh0U2libGluZy5nZXRBdHRyaWJ1dGUoJ2RhdGEnKSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5uZXh0U2libGluZy5zZXRBdHRyaWJ1dGUoJ3N0eWxlJywnYm9yZGVyOiBzb2xpZCAjY2NjO2JvcmRlci13aWR0aDogMCAzcHggM3B4IDA7JykKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlzdExlZnRWYWx1ZSA9IDIyOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1dHRvblN0eWxlLmxlZnQgPSAnMHB4JzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1dHRvblN0eWxlLmJhY2tncm91bmQgPSAnI2ZmZic7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLnN0eWxlLmJhY2tncm91bmQ9JyNmZmYnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5uZXh0U2libGluZyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5uZXh0U2libGluZy5zZXRBdHRyaWJ1dGUoJ3N0eWxlJywnYm9yZGVyOiBzb2xpZCAjRUVFO2JvcmRlci13aWR0aDogMCAzcHggM3B4IDA7JykKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpc3RMZWZ0VmFsdWUgPSAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNldExpc3RJRCA9IGl0ZW0uaWQ7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHNldExpc3RJRCA9PSAncmVtb3ZlS2V5d29yZCcgJiYgbGlzdExlZnRWYWx1ZT09MjIpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3poaWh1S2V5d29yZCcpLnN0eWxlLmRpc3BsYXk9J2Jsb2NrJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3pobVRha2VQbGFjZScpLnN0eWxlPSAnaGVpZ2h0OjIyMHB4JzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHNldExpc3RJRCA9PSAncmVtb3ZlS2V5d29yZCcgJiYgbGlzdExlZnRWYWx1ZT09MCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhpaHVLZXl3b3JkJykuc3R5bGUuZGlzcGxheT0nbm9uZSc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2RvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1UYWtlUGxhY2UnKS5zdHlsZT0gJ2hlaWdodDoxODBweCc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihzZXRMaXN0SUQgPT0gJ3JlbW92ZUF1dGhvck5hbWUnICYmIGxpc3RMZWZ0VmFsdWU9PTIyKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aGlodUF1dGhvck5hbWUnKS5zdHlsZS5kaXNwbGF5PSdibG9jayc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2RvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1UYWtlUGxhY2UnKS5zdHlsZT0gJ2hlaWdodDoyNjBweCc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihzZXRMaXN0SUQgPT0gJ3JlbW92ZUF1dGhvck5hbWUnICYmIGxpc3RMZWZ0VmFsdWU9PTApewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3poaWh1QXV0aG9yTmFtZScpLnN0eWxlLmRpc3BsYXk9J25vbmUnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9kb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtVGFrZVBsYWNlJykuc3R5bGU9ICdoZWlnaHQ6MTIwcHgnOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoc2V0TGlzdElEID09ICd2aWRlb1BsYXlMaW5lQWRkJyAmJiBsaXN0TGVmdFZhbHVlPT0yMil7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjdmlkZW9QbGF5TGluZUFkZFRleHRhcmVhJykuc3R5bGUuZGlzcGxheT0nYmxvY2snOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoc2V0TGlzdElEID09ICd2aWRlb1BsYXlMaW5lQWRkJyAmJiBsaXN0TGVmdFZhbHVlPT0wKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN2aWRlb1BsYXlMaW5lQWRkVGV4dGFyZWEnKS5zdHlsZS5kaXNwbGF5PSdub25lJzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKHNldExpc3RJRCxsaXN0TGVmdFZhbHVlKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgfSk7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdG9SaWdodCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy50by1yaWdodCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgdG9SaWdodC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCBmdW5jdGlvbihlKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxlZnQgPSBpdGVtLnByZXZpb3VzU2libGluZy5jaGlsZHJlblswXS5zdHlsZS5sZWZ0OwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZWZ0ID0gcGFyc2VJbnQobGVmdCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGxlZnQgIT0gMjIpIHJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNldFBhZ2VJRCA9IGl0ZW0uZ2V0QXR0cmlidXRlKCdkYXRhJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYWdlSWQgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZChzZXRQYWdlSUQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWdlSWQuY2xhc3NOYW1lPSdpY29uU2V0UGFnZSB0b0xlZnRNb3ZlJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/nn6XkuY7orr7nva7mmoLkvY3pq5jluqYKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoc2V0UGFnZUlEPT0nemhpaHVJY29uU2V0UGFnZScpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3pobVRha2VQbGFjZScpLnN0eWxlPSBgaGVpZ2h0OjY4cHhgOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/lrp7ml7blm77moIfpq5jluqYKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihzZXRQYWdlSUQgPT0gJ21vdmllSWNvblNldFBhZ2UnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNpY29uVG9wJykudmFsdWU9ZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiI3pobWxvZ28iKS5vZmZzZXRUb3A7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0b0JhY2sgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuYmFjaycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgdG9CYWNrLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsIGZ1bmN0aW9uKGUpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGFyZW50RG9tID0gaXRlbS5wYXJlbnROb2RlLnBhcmVudE5vZGUucGFyZW50Tm9kZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyZW50RG9tLmNsYXNzTmFtZT0naWNvblNldFBhZ2UgdG9SaWdodE1vdmUnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtVGFrZVBsYWNlJykuc3R5bGU9J2hlaWdodDo0MHB4OycKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzZXRTYXZlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLmljb25TZXRTYXZlJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBzZXRTYXZlLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsKCk9PnsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGljb25Ub3AgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnaWNvblRvcCcpLnZhbHVlOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWNvblBvc2l0aW9uID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2ljb25Qb3NpdGlvbicpLnZhbHVlOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWNvbldpZHRoID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2ljb25XaWR0aCcpLnZhbHVlOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWNvbldhaXRUaW1lID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2ljb25XYWl0VGltZScpLnZhbHVlOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGxheVZpZGVvTGluZVRleHQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjcGxheVZpZGVvTGluZVRleHRhcmVhJykudmFsdWU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5VmlkZW9MaW5lTGVmdCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN2aWRlb1BsYXlMaW5lQWRkJykuY2hpbGRyZW5bMF0uc3R5bGUubGVmdDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGlucHV0WmhLZXl3b3JkID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2lucHV0WmhLZXl3b3JkJykudmFsdWU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpbnB1dEF1dGhvck5hbWUgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnaW5wdXRaaEF1dGhvck5hbWUnKS52YWx1ZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaWNvblRvcCAhPSAnJyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighKC8oXlswLTldWzAtOV17MCwyfSQpLy50ZXN0KGljb25Ub3ApKSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxlcnQobGFuZy50aXBFcnJvckljb25IZWlnaHQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0VmFsdWUoJ2ljb25Ub3AnLGljb25Ub3ApOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaWNvblBvc2l0aW9uICE9ICcnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdpY29uUG9zaXRpb24nLGljb25Qb3NpdGlvbik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpY29uV2FpdFRpbWUgIT0gJycpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0VmFsdWUoJ2ljb25XYWl0VGltZScsaWNvbldhaXRUaW1lKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGljb25XaWR0aCAhPScnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCEoLyheKFsxLTldWzAtOV0/KSQpLy50ZXN0KGljb25XaWR0aCkpKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGVydChsYW5nLnRpcEVycm9ySWNvbldpZHRoKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdpY29uV2lkdGgnLGljb25XaWR0aCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihHTV9nZXRWYWx1ZSgndmlkZW9QbGF5TGluZUFkZCcpID09IDIyKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHBsYXlWaWRlb0xpbmVUZXh0KXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGluZU9iaiA9IF90aGlzLmdldExpbmUocGxheVZpZGVvTGluZVRleHQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGxpbmVPYmoubGVuZ3RoPjApewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgncGxheVZpZGVvTGluZVRleHQnLHBsYXlWaWRlb0xpbmVUZXh0KTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGVydCgn57q/6Lev6L6T5YWl5LiN5q2j56GuJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0VmFsdWUoJ3BsYXlWaWRlb0xpbmVUZXh0JywnJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgncGxheVZpZGVvTGluZVRleHQnLHBsYXlWaWRlb0xpbmVUZXh0KTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGlucHV0WmhLZXl3b3JkICE9ICcnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX3NldFZhbHVlKCdpbnB1dFpoS2V5d29yZCcsaW5wdXRaaEtleXdvcmQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKEdNX2dldFZhbHVlKCdpbnB1dFpoS2V5d29yZCcpKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9kZWxldGVWYWx1ZSgnaW5wdXRaaEtleXdvcmQnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGlucHV0QXV0aG9yTmFtZSAhPSAnJyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgnaW5wdXRaaEF1dGhvck5hbWUnLGlucHV0QXV0aG9yTmFtZSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoR01fZ2V0VmFsdWUoJ2lucHV0WmhBdXRob3JOYW1lJykpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX2RlbGV0ZVZhbHVlKCdpbnB1dFpoQXV0aG9yTmFtZScpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGlzdG9yeS5nbygwKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgnaWNvblRvcCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NoYW5nZScsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWNvblRvcCA9IHRoaXMudmFsdWU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoISgvKF5bMS05XVxkKiQpLy50ZXN0KGljb25Ub3ApKSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0QXR0cmlidXRlKCdkYXRhLWlzLXZhbGlkJywnZmFsc2UnKQoKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRBdHRyaWJ1dGUoJ2RhdGEtaXMtdmFsaWQnLCd0cnVlJykKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CgogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ2ljb25XaWR0aCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NoYW5nZScsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWNvbldpZHRoID0gdGhpcy52YWx1ZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighKC8oXlsxLTldXGQqJCkvLnRlc3QoaWNvbldpZHRoKSkpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzLnNldEF0dHJpYnV0ZSgnZGF0YS1pcy12YWxpZCcsJ2ZhbHNlJykKCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0QXR0cmlidXRlKCdkYXRhLWlzLXZhbGlkJywndHJ1ZScpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwoKICAgICAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICAgICAgLy/ohb7orq/op4bpopHlv6vmjbfplK7lhrLnqoEKICAgICAgICAgICAgICAgICAgICAgICAgaWYoY291cG9uVXJsLm1hdGNoKC92XC5xcVwuY29tXC94XC9jb3Zlci8pKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYWRkTGluZVRleHQgPWRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNwbGF5VmlkZW9MaW5lVGV4dGFyZWEnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRMaW5lVGV4dC5hZGRFdmVudExpc3RlbmVyKCdrZXlkb3duJyxmdW5jdGlvbihlKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHN0YXJ0UG9zID0gYWRkTGluZVRleHQuc2VsZWN0aW9uU3RhcnQ7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBlbmRQb3MgPSBhZGRMaW5lVGV4dC5zZWxlY3Rpb25FbmQ7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdGFydFBvcyA9PT0gdW5kZWZpbmVkIHx8IGVuZFBvcyA9PT0gdW5kZWZpbmVkKSByZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleUNvZGUuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGUua2V5Q29kZSA9PSBpdGVtLmNvZGUgJiYgZS5zaGlmdEtleT09aXRlbS5pc1NoaWZ0KXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGV4dFZhbHVlID0gYWRkTGluZVRleHQudmFsdWU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHN0YXJ0VmFsdWUgPSB0ZXh0VmFsdWUuc3Vic3RyaW5nKDAsc3RhcnRQb3MpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBlbmRWYWx1ZSA9IHRleHRWYWx1ZS5zdWJzdHJpbmcoc3RhcnRQb3MpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhbGxWYWx1ZSA9IHN0YXJ0VmFsdWUraXRlbS52YWx1ZStlbmRWYWx1ZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRMaW5lVGV4dC52YWx1ZT1hbGxWYWx1ZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRMaW5lVGV4dC5zZWxlY3Rpb25TdGFydCA9IHN0YXJ0UG9zKzE7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkTGluZVRleHQuc2VsZWN0aW9uRW5kID0gZW5kUG9zKzE7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgY3JlYXRlRWxlbWVudChkb20sZG9tSWQpewoKICAgICAgICAgICAgICAgIHZhciByb290RWxlbWVudCA9IGRvY3VtZW50LmJvZHk7CgogICAgICAgICAgICAgICAgdmFyIG5ld0VsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KGRvbSk7CgogICAgICAgICAgICAgICAgbmV3RWxlbWVudC5pZCA9IGRvbUlkOwoKICAgICAgICAgICAgICAgIHZhciBuZXdFbGVtZW50SHRtbENvbnRlbnQgPSBkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZSgnJyk7CgogICAgICAgICAgICAgICAgcm9vdEVsZW1lbnQuYXBwZW5kQ2hpbGQobmV3RWxlbWVudCk7CgogICAgICAgICAgICAgICAgbmV3RWxlbWVudC5hcHBlbmRDaGlsZChuZXdFbGVtZW50SHRtbENvbnRlbnQpOwoKICAgICAgICAgICAgfQoKICAgICAgICAgICAgcmVxdWVzdChtZXRob2QsdXJsLGRhdGEsaXNDb29raWU9JycpewoKICAgICAgICAgICAgICAgIGxldCByZXF1ZXN0ID0gbmV3IFhNTEh0dHBSZXF1ZXN0KCk7CgogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLHJlamVjdCk9PnsKCiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdC5vbnJlYWR5c3RhdGVjaGFuZ2U9ZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHJlcXVlc3QucmVhZHlTdGF0ZT09NCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocmVxdWVzdC5zdGF0dXM9PTIwMCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUocmVxdWVzdC5yZXNwb25zZVRleHQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWplY3QocmVxdWVzdC5zdGF0dXMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdC5vcGVuKG1ldGhvZCx1cmwpOwogICAgICAgICAgICAgICAgICAgIGlmKGlzQ29va2llKXsKICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWVzdC53aXRoQ3JlZGVudGlhbHMgPSB0cnVlOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICByZXF1ZXN0LnNldFJlcXVlc3RIZWFkZXIoJ0NvbnRlbnQtVHlwZScsICdhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQnKTsKICAgICAgICAgICAgICAgICAgICByZXF1ZXN0LnNlbmQoZGF0YSk7CgogICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIHNldENvb2tpZShjbmFtZSxjdmFsdWUsZXhkYXlzKXsKCiAgICAgICAgICAgICAgICB2YXIgZCA9IG5ldyBEYXRlKCk7CgogICAgICAgICAgICAgICAgZC5zZXRUaW1lKGQuZ2V0VGltZSgpKyhleGRheXMqMjQqNjAqNjAqMTAwMCkpOwoKICAgICAgICAgICAgICAgIHZhciBleHBpcmVzID0gImV4cGlyZXM9IitkLnRvR01UU3RyaW5nKCk7CgogICAgICAgICAgICAgICAgZG9jdW1lbnQuY29va2llID0gY25hbWUrIj0iK2N2YWx1ZSsiOyAiK2V4cGlyZXM7CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGdldENvb2tpZShjbmFtZSl7CiAgICAgICAgICAgICAgICB2YXIgbmFtZSA9IGNuYW1lICsgIj0iOwogICAgICAgICAgICAgICAgdmFyIGNhID0gZG9jdW1lbnQuY29va2llLnNwbGl0KCc7Jyk7CiAgICAgICAgICAgICAgICBmb3IodmFyIGk9MDsgaTxjYS5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgIHZhciBjID0gY2FbaV0udHJpbSgpOwogICAgICAgICAgICAgICAgICAgIGlmIChjLmluZGV4T2YobmFtZSk9PTApIHsgcmV0dXJuIGMuc3Vic3RyaW5nKG5hbWUubGVuZ3RoLGMubGVuZ3RoKTsgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcmV0dXJuICIiOwogICAgICAgICAgICB9CgogICAgICAgICAgICBnZXRRdWVyeVN0cmluZyhlKSB7CiAgICAgICAgICAgICAgICB2YXIgdCA9IG5ldyBSZWdFeHAoIihefCYpIiArIGUgKyAiPShbXiZdKikoJnwkKSIpOwogICAgICAgICAgICAgICAgdmFyIGEgPSB3aW5kb3cubG9jYXRpb24uc2VhcmNoLnN1YnN0cigxKS5tYXRjaCh0KTsKICAgICAgICAgICAgICAgIGlmIChhICE9IG51bGwpIHJldHVybiBhWzJdOwogICAgICAgICAgICAgICAgcmV0dXJuICIiOwogICAgICAgICAgICB9CgogICAgICAgICAgICBnZXRVcmxQYXJhbXModXJsKXsKICAgICAgICAgICAgICAgIGxldCByZWcgPSAvKFtePyYrI10rKT0oW14/JisjXSspL2c7CiAgICAgICAgICAgICAgICBsZXQgb2JqPXt9OwogICAgICAgICAgICAgICAgdXJsLnJlcGxhY2UocmVnLChyZXMsJDEsJDIpPT57b2JqWyQxXT0kMn0pOwogICAgICAgICAgICAgICAgcmV0dXJuIG9iajsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgZ2V0TGluZSh0ZXh0KXsKCiAgICAgICAgICAgICAgICBsZXQgdGV4dEFyciA9IHRleHQuc3BsaXQoJ1xuJyk7CgogICAgICAgICAgICAgICAgaWYodGV4dEFyci5sZW5ndGggPiAwKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmVPYmogPSBbXTsKCiAgICAgICAgICAgICAgICAgICAgbGV0IG1hdGNoID0gL14oLispKGh0dHBzPzpcL1wvLispJC87CgogICAgICAgICAgICAgICAgICAgIHRleHRBcnIuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0gPSBpdGVtLnJlcGxhY2UoL1xzKiwqL2csJycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWl0ZW0pIHJldHVybiB0cnVlOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmVNYXRjaCA9IGl0ZW0ubWF0Y2gobWF0Y2gpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYobGluZU1hdGNoKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lT2JqLnB1c2goeyduYW1lJzpsaW5lTWF0Y2hbMV0uc3Vic3RyaW5nKDAsNCksJ3VybCc6bGluZU1hdGNoWzJdfSk7CgogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lT2JqPVtdOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbGluZU9iajsKCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIHN0YXRpYyBnZXRFbGVtZW50KGNzcyl7CgogICAgICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLHJlamVjdCk9PnsKCiAgICAgICAgICAgICAgICAgICAgbGV0IG51bSA9IDA7CgogICAgICAgICAgICAgICAgICAgIGxldCB0aW1lciA9IHNldEludGVydmFsKGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICBudW0rKwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoY3NzKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRvbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShkb20pOwoKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobnVtPT0yMCl7Y2xlYXJJbnRlcnZhbCh0aW1lcik7cmVzb2x2ZShmYWxzZSk7fQogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIH0sMzAwKQoKICAgICAgICAgICAgICAgICAgICB9KQoKCiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIHN0YXRpYyB0b2FzdChtc2csZHVyYXRpb24pewoKICAgICAgICAgICAgICAgIGR1cmF0aW9uPWlzTmFOKGR1cmF0aW9uKT8zMDAwOmR1cmF0aW9uOwoKICAgICAgICAgICAgICAgIGxldCB0b2FzdERvbSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpOwoKICAgICAgICAgICAgICAgIHRvYXN0RG9tLmlubmVySFRNTCA9IG1zZzsKCiAgICAgICAgICAgICAgICAvL3RvYXN0RG9tLnN0eWxlLmNzc1RleHQ9IndpZHRoOiA2MCU7bWluLXdpZHRoOiAxNTBweDtvcGFjaXR5OiAwLjc7aGVpZ2h0OiAzMHB4O2NvbG9yOiByZ2IoMjU1LCAyNTUsIDI1NSk7bGluZS1oZWlnaHQ6IDMwcHg7dGV4dC1hbGlnbjogY2VudGVyO2JvcmRlci1yYWRpdXM6IDVweDtwb3NpdGlvbjogZml4ZWQ7dG9wOiA0MCU7bGVmdDogMjAlO3otaW5kZXg6IDk5OTk5OTtiYWNrZ3JvdW5kOiByZ2IoMCwgMCwgMCk7Zm9udC1zaXplOiAxMnB4OyI7CiAgICAgICAgICAgICAgICB0b2FzdERvbS5zdHlsZS5jc3NUZXh0PSdwYWRkaW5nOjJweCAxNXB4O21pbi1oZWlnaHQ6IDM2cHg7bGluZS1oZWlnaHQ6IDM2cHg7dGV4dC1hbGlnbjogY2VudGVyO3RyYW5zZm9ybTogdHJhbnNsYXRlKC01MCUpO2JvcmRlci1yYWRpdXM6IDRweDtjb2xvcjogcmdiKDI1NSwgMjU1LCAyNTUpO3Bvc2l0aW9uOiBmaXhlZDt0b3A6IDUwJTtsZWZ0OiA1MCU7ei1pbmRleDogOTk5OTk5OTtiYWNrZ3JvdW5kOiByZ2IoMCwgMCwgMCk7Zm9udC1zaXplOiAxNnB4OycKCiAgICAgICAgICAgICAgICBkb2N1bWVudC5ib2R5LmFwcGVuZENoaWxkKHRvYXN0RG9tKTsKCiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkgewoKICAgICAgICAgICAgICAgICAgICB2YXIgZCA9IDAuNTsKCiAgICAgICAgICAgICAgICAgICAgdG9hc3REb20uc3R5bGUud2Via2l0VHJhbnNpdGlvbiA9ICctd2Via2l0LXRyYW5zZm9ybSAnICsgZCArICdzIGVhc2UtaW4sIG9wYWNpdHkgJyArIGQgKyAncyBlYXNlLWluJzsKCiAgICAgICAgICAgICAgICAgICAgdG9hc3REb20uc3R5bGUub3BhY2l0eSA9ICcwJzsKCiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpIHsgZG9jdW1lbnQuYm9keS5yZW1vdmVDaGlsZCh0b2FzdERvbSkgfSwgZCAqIDEwMDApOwoKICAgICAgICAgICAgICAgIH0sIGR1cmF0aW9uKTsKCiAgICAgICAgICAgIH0KICAgICAgICAgICAgLy9jcmVhdGUgemhtTG9nb0ljb24KICAgICAgICAgICAgemhtTG9nbygpewoKICAgICAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CgogICAgICAgICAgICAgICAgbGV0IHNvcnREaXYgPSBpY29uVmlwUG9zaXRpb249PSdsZWZ0Jz8ncm93Jzoncm93LXJldmVyc2UnOwoKICAgICAgICAgICAgICAgIGxldCBwbGF5VmlkZW9TdHlsZSA9IGAKICAgICAgICAgICAgICAgIC56aG1fcGxheV92aWRvZV9pY29uewogICAgICAgICAgICAgICAgICAgcGFkZGluZy10b3A6MnB4OwogICAgICAgICAgICAgICAgICAgY3Vyc29yOnBvaW50ZXI7CiAgICAgICAgICAgICAgICAgICB6LWluZGV4Ojk5OTk5OTk7CiAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjpmaXhlZDske2ljb25WaXBQb3NpdGlvbn06NXB4O3RvcDoke2ljb25WaXBUb3B9cHg7CiAgICAgICAgICAgICAgICAgICB0ZXh0LWFsaWduOmNlbnRlcjsKICAgICAgICAgICAgICAgICAgIG92ZXJmbG93OnZpc2libGU7CiAgICAgICAgICAgICAgICAgICBkaXNwbGF5OmZsZXg7CiAgICAgICAgICAgICAgICAgICBmbGV4LWRpcmVjdGlvbjoke3NvcnREaXZ9OwogICAgICAgICAgICAgICAgICAgd2lkdGg6YXV0bzsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fcGxheV92aWRlb193cmFwewogICAgICAgICAgICAgICAgICAgei1pbmRleDo5OTk5OTk5OwogICAgICAgICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjsKICAgICAgICAgICAgICAgICAgIHdpZHRoOjMwMHB4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVvX2xpbmV7CiAgICAgICAgICAgICAgICAgICB3aWR0aDozMjBweDsKICAgICAgICAgICAgICAgICAgIGhlaWdodDozMTZweDsKICAgICAgICAgICAgICAgICAgIG92ZXJmbG93LXk6c2Nyb2xsOwogICAgICAgICAgICAgICAgICAgb3ZlcmZsb3cteDpoaWRkZW47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX3BsYXlfdmlkZV9saW5lX3VsewogICAgICAgICAgICAgICAgICAgd2lkdGg6MzAwcHg7CiAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0OwogICAgICAgICAgICAgICAgICAgZmxleC1mbG93OiByb3cgd3JhcDsKICAgICAgICAgICAgICAgICAgIGxpc3Qtc3R5bGU6IG5vbmU7CiAgICAgICAgICAgICAgICAgICBwYWRkaW5nOjBweDsKICAgICAgICAgICAgICAgICAgIG1hcmdpbjowcHg7CgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVvX2xpbmVfdWxfbGl7CiAgICAgICAgICAgICAgICAgICBwYWRkaW5nOjRweCAwcHg7CiAgICAgICAgICAgICAgICAgICBtYXJnaW46MnB4OwogICAgICAgICAgICAgICAgICAgd2lkdGg6MzAlOwogICAgICAgICAgICAgICAgICAgY29sb3I6I0ZGRjsKICAgICAgICAgICAgICAgICAgIHRleHQtYWxpZ246Y2VudGVyOwogICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojZjI0NDQzOwogICAgICAgICAgICAgICAgICAgYm94LXNoYWRvdzowcHggMHB4IDEwcHggI2ZmZjsKICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZToxNHB4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVvX2xpbmVfdWxfbGk6aG92ZXJ7CiAgICAgICAgICAgICAgICAgICBjb2xvcjojMjYwMDMzOwogICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojZmNjMGMwCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2xpbmVfc2VsZWN0ZWR7CiAgICAgICAgICAgICAgICAgICBjb2xvcjojMjYwMDMzOwogICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjojZmNjMGMwCiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgLnpobV9wbGF5X3ZpZGVvX2p4ewogICAgICAgICAgICAgICAgICAgd2lkdGg6MTAwJTsKICAgICAgICAgICAgICAgICAgIGhlaWdodDoxMDAlOwogICAgICAgICAgICAgICAgICAgei1pbmRleDo5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gemhtUGxheS5pbm5lckhUTUwgPSBwbGF5V3JhcEh0bWw7CgogICAgICAgICAgICAgfQogICAgICAgICAgICAgLy/lt6bplK7mjInkuIvmi5bliqgKICAgICAgICAgICAgIC8vdHlwZTrmoLnmja7kuI3lkIznsbvlnovvvIzlpITnkIblm77moIfljZXlh7vkuovliqEKICAgICAgICAgICAgIHpobUxvZ29EcmFnKHR5cGUsd2ViKXsKCiAgICAgICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKCiAgICAgICAgICAgICAgICAgdmFywqB6aG1Mb2dvRHJhZz1kb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIjemhtbG9nbyIpOwoKICAgICAgICAgICAgICAgICB2YXIgemhtTG9nb0ljb24gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIuaWNvbkxvZ28iKTsKCiAgICAgICAgICAgICAgICAgaWYoIXpobUxvZ29EcmFnIHx8ICF6aG1Mb2dvSWNvbilyZXR1cm47CgogICAgICAgICAgICAgICAgIHpobUxvZ29EcmFnLm9ubW91c2Vkb3duID0gZnVuY3Rpb24oZXZlbnQpewoKICAgICAgICAgICAgICAgICAgICAgaWYoZXZlbnQud2hpY2g9PTMpcmV0dXJuIGZhbHNlOy8v5bGP6JS95Y+z6ZSuCgogICAgICAgICAgICAgICAgICAgICBsZXQgc2Vkb3duVG9wID0gemhtTG9nb0RyYWcub2Zmc2V0VG9wOwoKICAgICAgICAgICAgICAgICAgICAgbGV0IHpobUxvZ29JY29uSGVpZ2h0ID0gemhtTG9nb0ljb24ub2Zmc2V0SGVpZ2h0OwoKICAgICAgICAgICAgICAgICAgICAgbGV0IGJvdHRvbVNwYWNlID0gMTA7CgogICAgICAgICAgICAgICAgICAgICBpZihldmVudC50YXJnZXQuY2xhc3NOYW1lICE9ICdpY29uTG9nbycpcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICAgLy9sZXTCoHNoaWZ0WMKgPcKgZXZlbnQuY2xpZW50WMKgLcKgemhtTG9nb0RyYWcuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkubGVmdDsKICAgICAgICAgICAgICAgICAgICAgbGV0IHNoaWZ0eCA9IDU7CgogICAgICAgICAgICAgICAgICAgICBsZXTCoHNoaWZ0WSA9IGV2ZW50LmNsaWVudFktemhtTG9nb0RyYWcuZ2V0Qm91bmRpbmdDbGllbnRSZWN0KCkudG9wOwoKICAgICAgICAgICAgICAgICAgICAgemhtTG9nb0RyYWcuc3R5bGUucG9zaXRpb27CoD3CoCdmaXhlZCc7CgogICAgICAgICAgICAgICAgICAgICB6aG1Mb2dvRHJhZy5zdHlsZS56SW5kZXjCoD3CoDk5OTk5OTk7CgogICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5ib2R5LmFwcGVuZCh6aG1Mb2dvRHJhZyk7CgogICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbsKgb25Nb3VzZU1vdmUoZXZlbnQpewoKICAgICAgICAgICAgICAgICAgICAgICAgIC8vemhtTG9nb0RyYWcuc3R5bGUubGVmdMKgPcKgcGFnZVjCoC3CoHNoaWZ0WMKgK8KgJ3B4JzsKICAgICAgICAgICAgICAgICAgICAgICAgIHpobUxvZ29EcmFnLnN0eWxlLmxlZnTCoD3CoCc1cHgnOwoKICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBoZWlnaHQgPSB3aW5kb3cuaW5uZXJIZWlnaHQgLSB6aG1Mb2dvSWNvbkhlaWdodC1ib3R0b21TcGFjZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgeSA9IGV2ZW50LnBhZ2VZLXNoaWZ0WTsKCiAgICAgICAgICAgICAgICAgICAgICAgICB5ID0gTWF0aC5taW4oTWF0aC5tYXgoMCwgeSksIGhlaWdodCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgemhtTG9nb0RyYWcuc3R5bGUudG9wID0geSsncHgnOwogICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgIC8v5ZyobW91c2Vtb3Zl5LqL5Lu25LiK56e75Yqo5Zu+5qCHCiAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ21vdXNlbW92ZScsb25Nb3VzZU1vdmUpOwogICAgICAgICAgICAgICAgICAgICAvL+advuW8gOS6i+S7tgogICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5vbm1vdXNldXAgPSBmdW5jdGlvbihlKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRWYWx1ZSgnaWNvblRvcCcsemhtTG9nb0RyYWcub2Zmc2V0VG9wKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5yZW1vdmVFdmVudExpc3RlbmVyKCdtb3VzZW1vdmUnLMKgb25Nb3VzZU1vdmUpOwoKICAgICAgICAgICAgICAgICAgICAgICAgIHpobUxvZ29EcmFnLm9ubW91c2V1cMKgPcKgbnVsbDsKCiAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGVpZ2h0ID0gemhtTG9nb0RyYWcub2Zmc2V0VG9wK3pobUxvZ29JY29uSGVpZ2h0K2JvdHRvbVNwYWNlOwoKICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHpobUxvZ29EcmFnLm9mZnNldFRvcCA8IDApewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICB6aG1Mb2dvRHJhZy5zdHlsZS50b3AgPScwcHgnOwogICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHdpbmRvdy5pbm5lckhlaWdodCA8IGhlaWdodCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgIHpobUxvZ29EcmFnLnN0eWxlLnRvcCA9d2luZG93LmlubmVySGVpZ2h0LXpobUxvZ29JY29uSGVpZ2h0LWJvdHRvbVNwYWNlKydweCc7CgogICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgLy9jbGlja+S6i+S7tuWkhOeQhgogICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoKHR5cGUpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICd2aWRlbyc6CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih6aG1Mb2dvRHJhZy5vZmZzZXRUb3A9PXNlZG93blRvcCAmJiB3ZWIubGVuZ3RoID4gMCAmJiB6aG1Mb2dvRHJhZy5vZmZzZXRUb3A+MCAmJiB3aW5kb3cuaW5uZXJIZWlnaHQgPiBoZWlnaHQpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLnJlcXVlc3QoJ2dldCcsYCR7emhtQXBpVXJsfS9qeGNvZGUucGhwP2luPSR7anhDb2RlSW5mby5pbn0mY29kZT0ke2p4Q29kZUluZm8uY29kZX1gKS50aGVuKChyZXN1bHQpPT57CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLmhyZWY9YCR7emhtQXBpVXJsfS9qeGp4LnBocD9scnNwbT0ke3Jlc3VsdH0memhtX2p4PSR7bG9jYXRpb24uaHJlZn1gOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLmNhdGgoZXJyPT57fSkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHpobUxvZ29EcmFnLm9mZnNldFRvcD09c2Vkb3duVG9wICYmIHdlYi5sZW5ndGggPT0gMCAmJiB6aG1Mb2dvRHJhZy5vZmZzZXRUb3A+MCAmJiB3aW5kb3cuaW5uZXJIZWlnaHQgPiBoZWlnaHQpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn6K+35Zyo6KeG6aKR5pKt5pS+6aG154K55Ye75Zu+5qCHJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ211c2ljJzoKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHpobUxvZ29EcmFnLm9mZnNldFRvcD09c2Vkb3duVG9wICYmIGUudGFyZ2V0LmNsYXNzTmFtZSA9PSAnaWNvbkxvZ28nKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2RvY3VtZW50LnJlbW92ZUV2ZW50TGlzdGVuZXIoJ21vdXNlbW92ZScswqBvbk1vdXNlTW92ZSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy96aG1Mb2dvRHJhZy5vbm1vdXNldXDCoD3CoG51bGw7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG11c2ljVXJsRGF0YSA9IFsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7bWF0Y2g6L15odHRwcz86XC9cL211c2ljXC4xNjNcLmNvbVwvI1wvKD86c29uZ3xkailcP2lkL30sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge21hdGNoOi9eaHR0cHM/OlwvXC95XC5tdXNpY1wuMTYzXC5jb21cL21cLyg/OnNvbmd8ZGopXD9pZC99LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHttYXRjaDovXmh0dHBzPzpcL1wvbXVzaWNcLjE2M1wuY29tXC8oPzpzb25nfGRqKVw/aWQvfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7bWF0Y2g6L15odHRwcz86XC9cL3lcLnFxXC5jb21cL25cL3J5cXFcL3BsYXllci99LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHttYXRjaDova3Vnb3VcLmNvbS99LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHttYXRjaDova3V3b1wuY24vfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7bWF0Y2g6L15odHRwcz86XC9cL3d3d1wueGltYWxheWFcLmNvbS99LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBtdXNpY1VybCA9IG11c2ljVXJsRGF0YS5maWx0ZXIoZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBsb2NhdGlvbi5ocmVmLm1hdGNoKGl0ZW0ubWF0Y2gpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobXVzaWNVcmwubGVuZ3RoPT0wKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KHdlYlswXS50aXApOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoKHdlYlswXS5uYW1lKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICduZXRlYXNlJzoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV0ZWFzZUZ1bigpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdxcSc6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHFxRnVuKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ2t1Z291JzoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga3Vnb3VGdW4oKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAna3V3byc6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGt1d29GdW4oKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAneGltYWxheWEnOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4aW1hbGF5YUZ1bigpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBuZXRlYXNlRnVuKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmxQYXJhbXMgPSBfdGhpcy5nZXRVcmxQYXJhbXMobG9jYXRpb24uaHJlZik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHVybFBhcmFtcy5pZCA9PSB1bmRlZmluZWQpIHJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ldGVhc2VVcmxFbmNvZGUgPSBlbmNvZGVVUklDb21wb25lbnQoJ2h0dHBzOi8vbXVzaWMuMTYzLmNvbS9zb25nP2lkPScrdXJsUGFyYW1zLmlkKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG9wZW5VcmwgPSB3ZWJVcmwrJz91cmw9JytuZXRlYXNlVXJsRW5jb2RlOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cub3BlbihvcGVuVXJsKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gcXFGdW4oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHFxU29uZ01hdGNoOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIucGxheWVyX211c2ljX19pbmZvIikpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXFTb25nTWF0Y2ggPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIucGxheWVyX211c2ljX19pbmZvIikuY2hpbGROb2Rlc1swXS5ocmVmLm1hdGNoKC9zb25nRGV0YWlsXC8oXFMqKVw/Lyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIiNzaW1fc29uZ19pbmZvIikpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXFTb25nTWF0Y2ggPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIjc2ltX3NvbmdfaW5mbyIpLmNoaWxkTm9kZXNbMF0uaHJlZi5tYXRjaCgvc29uZ1wvKFxTKikuaHRtbC8pOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHFxU29uZ01hdGNoID0gJyc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighcXFTb25nTWF0Y2hbMV0pe2NvbnNvbGUubG9nKCfmsqHmnInojrflj5bliLDmrYzmm7JJRCcpOyByZXR1cm59OwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXVkaW9MaW5rID0gZW5jb2RlVVJJQ29tcG9uZW50KGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoImF1ZGlvIikuc3JjKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG9wZW5VcmwgPSB3ZWJVcmwrJz9pZD0nK3FxU29uZ01hdGNoWzFdKycmdHlwZT1xcSZwbGF5VXJsPScrYXVkaW9MaW5rOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cub3BlbihvcGVuVXJsKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24ga3Vnb3VGdW4oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1ZGlvTW9kdWxlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2F1ZGlvTW9kdWxlJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGF1ZGlvTW9kdWxlKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNhdWRpb01vZHVsZScpLnN0eWxlPSdib3R0b206MHB4Oyc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjc2hvd0hpZGVfcGxheWJhcicpLmNsYXNzTmFtZSA9ICdpY29uIHNob3ctcGxheWJhci1idG4nOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfor7fngrnlh7vmkq3mlL7pnIDopoHkuIvovb3nmoTmrYzmm7LvvIznhLblkI7lnKjnvZHpobXkuIvmlrnmkq3mlL7lmajlhoXngrnlh7si5LiL6L29IicsMjAwMCkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24ga3V3b0Z1bigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucGxheUNvbnRyb2wnKS5zdHlsZT0nYm90dG9tOjBweCc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn6K+354K55Ye75pKt5pS+6ZyA6KaB5LiL6L2955qE5q2M5puy77yM54S25ZCO5Zyo572R6aG15LiL5pa55pKt5pS+5Zmo5YaF54K55Ye7IuS4i+i9vSInLDIwMDApCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHhpbWFsYXlhRnVuKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy54bS1wbGF5ZXInKS5zdHlsZT0nYm90dG9tOjBweCc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn6K+354K55Ye75pKt5pS+6ZyA6KaB5LiL6L2955qE5q2M5puy77yM54S25ZCO5Zyo572R6aG15LiL5pa55pKt5pS+5Zmo5YaF54K55Ye7IuS4i+i9vSInLDIwMDApCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ3lvdXR1YmUnOgoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgogICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgfTsKCiAgICAgICAgICAgICAgICAgfTsKCiAgICAgICAgICAgICAgICAgemhtTG9nb0RyYWcub25kcmFnc3RhcnTCoD3CoGZ1bmN0aW9uKCl7CiAgICAgICAgICAgICAgICAgICAgIHJldHVybsKgZmFsc2U7CiAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgIH0KCiAgICAgICAgfQoKICAgICAgICBjbGFzcyBDb3Vwb25DbGFzcyBleHRlbmRzIEJhc2VDbGFzc3sKCiAgICAgICAgICAgIGNvbnN0cnVjdG9yKCl7CgogICAgICAgICAgICAgICAgc3VwZXIoKTsKCiAgICAgICAgICAgICAgICB0aGlzLmRpdkVsZW1lbnQgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCJkaXYiKTsKCiAgICAgICAgICAgICAgICB0aGlzLmRpdkVsZW1lbnQuaWQ9J3pobV9kaXZfcyc7CgogICAgICAgICAgICB9CiAgICAgICAgICAgIHRhb2JhbygpewoKICAgICAgICAgICAgICAgIGxldCBub2RlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI0pfanVWYWxpZCcpOwoKICAgICAgICAgICAgICAgIG5vZGUuc3R5bGU9J292ZXJmbG93OmluaGVyaXQ7JwoKICAgICAgICAgICAgICAgIGxldCBjbGFzc05hbWUgPSAnemhtX3RhYl90YW9iYW8nOwoKICAgICAgICAgICAgICAgIHRoaXMuZ2V0Q291cG9uSW5mbyhub2RlLGNsYXNzTmFtZSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgdG1hbGwoKXsKCiAgICAgICAgICAgICAgICBsZXQgbm9kZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5BY3Rpb25zLS1sZWZ0QnV0dG9ucy0tMU0zS2tGNycpP2RvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5BY3Rpb25zLS1sZWZ0QnV0dG9ucy0tMU0zS2tGNycpOmRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNKX0xpbmtCdXknKS5wYXJlbnROb2RlOwoKICAgICAgICAgICAgICAgIGxldCBjbGFzc05hbWUgPSAnemhtX3RhYl90bWFsbCc7CgogICAgICAgICAgICAgICAgdGhpcy5nZXRDb3Vwb25JbmZvKG5vZGUsY2xhc3NOYW1lKTsKICAgICAgICAgICAgfQogICAgICAgICAgICB0bWFsbENhb3NoaSgpewoKICAgICAgICAgICAgICAgIGxldCBub2RlID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI0pfTGlua0J1eScpLnBhcmVudE5vZGU7CgogICAgICAgICAgICAgICAgbGV0IGNsYXNzTmFtZSA9ICd6aG1fdGFiX3RtYWxsJzsKCiAgICAgICAgICAgICAgICB0aGlzLmdldENvdXBvbkluZm8obm9kZSxjbGFzc05hbWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHRtYWxsT3RoZXIoKXsKCiAgICAgICAgICAgICAgICBsZXQgbm9kZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy50bS1tc2ctYm94Jyk7CgogICAgICAgICAgICAgICAgbGV0IGNsYXNzTmFtZSA9ICd6aG1fdGFiX3RtYWxsJzsKCiAgICAgICAgICAgICAgICB0aGlzLmdldENvdXBvbkluZm8obm9kZSxjbGFzc05hbWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGpkKCl7CiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KCgpPT57CgogICAgICAgICAgICAgICAgICAgIGxldCBqZEdvb2RzSWQgPSBjb3Vwb25VcmwubWF0Y2goL2pkXC5jb21cLyhcUyopLmh0bWwvKTsKCiAgICAgICAgICAgICAgICAgICAgbGV0IG5vZGU9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNjaG9vc2UtYnRucycpOwoKICAgICAgICAgICAgICAgICAgICBub2RlLmJlZm9yZSh0aGlzLmRpdkVsZW1lbnQpOwoKICAgICAgICAgICAgICAgICAgICB0aGlzLnJlcXVlc3QoJ2dldCcsYGh0dHBzOi8venVpaHVpbWFpLm5ldC92cmhyL2luZGV4X2pkX25ldy5waHA/Z29vZHNfaWQ9JHtqZEdvb2RzSWRbMV19YCkudGhlbigocmVzdWx0KT0+ewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlc3A9IEpTT04ucGFyc2UocmVzdWx0KTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBodG1sPScnOwoKICAgICAgICAgICAgICAgICAgICAgICAgcmVzcC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWwgKz0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBgCiAgICAgICAgPGRpdiBjbGFzcz0iemhtX2NvdXBvbiIgc3R5bGU9Im1hcmdpbi1sZWZ0OjEwcHg7Ij4KICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX2xlZnQiPgogICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX2ltZ19pY29uIj4KICAgICAgICA8aW1nIHNyYz0iZGF0YTppbWFnZS9naWY7YmFzZTY0LFIwbEdPRGxoWkFCa0FIai9BQ0gvQzA1RlZGTkRRVkJGTWk0d0F3RUFBQUFoK1FRSkxBSC9BQ3dBQUFBQVpBQmtBS2Y2QkRuNkJEbjZCRG42QkRuNkJEbjZCRG42QkRuNkJEbjZCRG42QkRuNkJEcjZCVHI2QlRyNkJUcjZCVHI2QlRyNkJUcjZC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Y2lrbUNEbGFDT0x2NFhGRncra1F0bncxREd1WVZyU2hza20ycUNwamNsaHJXUElpemxGUHJLTkNmSXlRa0gxSUdQalN6bVhUT0ptY2FPSjlkZ0dhbEZNNVlHVUVxelpLQWMrUm5RUGN2QllnRDJsc2psVzAyVU41Ylk1eEloZE1qcjY5OXBvMUxqTEJ4R0hNclcwU3p6anNsaGFVaFF2L1Z3UWRvQTBSY0NnNkpRSkhSdE5LYk5GSHYxTVFBQUFJZjRWVFdGa1pTQjNhWFJvSUZOamNtVmxibFJ2UjJsbUFEcz0iID4gICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX2NvbnRlbnQiPgogICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9tb25leSIgc3R5bGU9J21hcmdpbi10b3A6N3B4Oyc+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9hbW91bnRfbW9uZXkiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX21vbmV5X3NpZ24iIHN0eWxlPSdtYXJnaW4tdG9wOi0xMHB4Oyc+wqU8L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9tb25leV9udW0iPiR7aXRlbS5kaXNjb3VudH08L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9jb25kaXRpb24iPua7oSR7aXRlbS5xdW90YX3lhYPlj6/nlKg8L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fdGltZSIgc3R5bGU9J21hcmdpbi10b3A6MTBweDsnPgogICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fdGVybSI+5pyJ5pWI5pyfPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9kYXRlIj4ke2l0ZW0uZW5kVGltZX08L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX2NpcmNsZSI+PC9kaXY+CiAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9saW5rX2NvdXBvbiI+CiAgICAgICAgICAgICAgICA8YSBjbGFzcz0iemhtX2xpbmtfdGV4dCIgaHJlZj0iJHtpdGVtLmNvdXBvbl9saW5rfSIgdGFyZ2V0PSdfYmxhbmsnIHJlbD0nbm9vcGVuZXIgbm9yZWZlcnJlciBub2ZvbGxvdycgc3R5bGU9Im1hcmdpbi1sZWZ0OjE2cHg7d2lkdGg6MzRweDsiPumihuWPljwvYT4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgPC9kaXY+CiAgICAgICAgYAogICAgICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCd6aG1fZGl2X3MnKS5pbm5lckhUTUwgPSBodG1sOwoKICAgICAgICAgICAgICAgICAgICB9KQoKCgogICAgICAgICAgICAgICAgfSxjb3Vwb25XYWl0VGltZSkKICAgICAgICAgICAgfQoKICAgICAgICAgICAgZ2V0Q291cG9uSW5mbyhub2RlLGNsYXNzTmFtZSl7CgogICAgICAgICAgICAgICAgc2V0VGltZW91dCgoKT0+ewoKICAgICAgICAgICAgICAgICAgICBsZXQgZ29vZHNfaWQgPSB0aGlzLmdldFF1ZXJ5U3RyaW5nKCdpZCcpOwoKICAgICAgICAgICAgICAgICAgICBpZighZ29vZHNfaWQpe2NvbnNvbGUubG9nKCdnb29kc19pZCcpO3JldHVybn07CgogICAgICAgICAgICAgICAgICAgIGlmKGNsYXNzTmFtZSA9PSAnemhtX3RhYl90YW9iYW8nKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUucXVlcnlTZWxlY3RvcignZGl2Om50aC1vZi10eXBlKDEpJykuYmVmb3JlKHRoaXMuZGl2RWxlbWVudCk7CgogICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICBub2RlLmJlZm9yZSh0aGlzLmRpdkVsZW1lbnQpOwogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgdGhpcy5yZXF1ZXN0KCdnZXQnLGBodHRwczovL3d3dy56dWlodWltYWkubmV0L3ZyaHIvaW5kZXhfbmV3LnBocD9nb29kc19pZD0ke2dvb2RzX2lkfWApLnRoZW4oKHJlc3VsdCk9PnsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHJlc3VsdCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlc3A9IEpTT04ucGFyc2UocmVzdWx0KTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYAogICAgICAgIDxkaXYgY2xhc3M9InpobV9jb3Vwb24iPgogICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fbGVmdCI+CiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1faW1nX2ljb24iPgogICAgICAgIDxpbWcgc3JjPSJkYXRhOmltYWdlL2dpZjtiYXNlNjQsUjBsR09EbGhaQUJrQUhqL0FDSC9DMDVGVkZORFFWQkZNaTR3QXdFQUFBQWgrUVFKTEFIL0FDd0FBQUFBWkFCa0FLZjZCRG42QkRuNkJEbjZCRG42QkRuNkJEbjZCRG42QkRuNkJEbjZCRG42QkRyNkJUcjZCVHI2QlRyNkJUcjZCVHI2QlRyNkJqcjZCanI2Qmp2NkJqdjZCanY2Qmp2NkJ6djZCenY2Q0R6NkNEejZDVDM2Q1QzNkNUMzZDajc2Q3o3NkN6LzZDei82RE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KOWRnR2FsRk01WUdVRXF6WktBYytSblFQY3ZCWWdEMmxzamxXMDJVTjViWTV4SWhkTWpyNjk5cG8xTGpMQnhHSE1yVzBTenpqc2xoYVVoUXYvVndRZG9BMFJjQ2c2SlFKSFJ0TktiTkZIdjFNUUFBQUlmNFZUV0ZrWlNCM2FYUm9JRk5qY21WbGJsUnZSMmxtQURzPSIgPiAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fY29udGVudCI+CiAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX21vbmV5Ij4KICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX2Ftb3VudF9tb25leSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fbW9uZXlfc2lnbiI+wqU8L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9tb25leV9udW0iPiR7cmVzcC55b3VodWlxdWFufTwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX2NvbmRpdGlvbiI+JHtyZXNwLmNvdXBvbl9pbmZvfTwvZGl2PgogICAgICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV90aW1lIj4KICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX3Rlcm0iPuacieaViOacnzwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJ6aG1fZGF0ZSI+JHtyZXNwLmNvdXBvbl9lbmRfdGltZX08L2Rpdj4KICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgIDwvZGl2PgogICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgPGRpdiBjbGFzcz0iemhtX2NpcmNsZSI+PC9kaXY+CiAgICAgICAgICAgIDxkaXYgY2xhc3M9InpobV9saW5rX2NvdXBvbiIgc3R5bGU9Im1hcmdpbi1yaWdodDoiPgogICAgICAgICAgICAgICAgPGEgY2xhc3M9InpobV9saW5rX3RleHQiIG9uY2xpY2s9IndpbmRvdy5vcGVuKCcke3Jlc3AuY291cG9uX2xpbmt9JykiPumihuWPljwvYT4KICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgPC9kaXY+CiAgICAgICAgYDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCd6aG1fZGl2X3MnKS5pbm5lckhUTUw9aHRtbDsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICB9LGNvdXBvbldhaXRUaW1lKTsKICAgICAgICAgICAgfQoKICAgICAgICB9CgogICAgICAgIGNsYXNzIFBsYXlWaWRlb0NsYXNzIGV4dGVuZHMgQmFzZUNsYXNzewogICAgICAgICAgICBjb25zdHJ1Y3RvcigpewogICAgICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgfQoKICAgICAgICB9CgogICAgICAgIGNsYXNzIFBsYXlNdXNpY0NsYXNzIGV4dGVuZHMgQmFzZUNsYXNzewogICAgICAgICAgICBjb25zdHJ1Y3RvcigpewogICAgICAgICAgICAgICAgc3VwZXIoKTsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgeG1seUNyZWF0ZUNoZWNrYm94KCl7CgogICAgICAgICAgICAgICAgbGV0IHNvdW5kTGlzdGxpID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLnNvdW5kLWxpc3QgdWwgbGknKTsKCiAgICAgICAgICAgICAgICBzb3VuZExpc3RsaS5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICBsZXQgY2hlY2tib3hlZCA9IGl0ZW0ucXVlcnlTZWxlY3RvcignaW5wdXQnKTsKCiAgICAgICAgICAgICAgICAgICAgaWYoY2hlY2tib3hlZCl7CiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IGl0ZW0ucXVlcnlTZWxlY3RvcignLnRleHQnKTsKCiAgICAgICAgICAgICAgICAgICAgaWYoIXRpdGxlKXsKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH07CgogICAgICAgICAgICAgICAgICAgIHRpdGxlLnN0eWxlID0gIndpZHRoOjM2MHB4IjsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHNyYyA9IHRpdGxlLnF1ZXJ5U2VsZWN0b3IoJ2EnKS5nZXRBdHRyaWJ1dGUoJ2hyZWYnKTsKCiAgICAgICAgICAgICAgICAgICAgbGV0IGZpcnN0RG9tID0gaXRlbS5xdWVyeVNlbGVjdG9yKCcuaWNvbi13cmFwcGVyJyk7CgogICAgICAgICAgICAgICAgICAgIGxldCBpbnB1dERvbSA9IGZpcnN0RG9tLmNsb25lTm9kZSh0cnVlKTsKCiAgICAgICAgICAgICAgICAgICAgaW5wdXREb20uc3R5bGU9ICdtaW4td2lkdGg6IDBweDsnOwoKICAgICAgICAgICAgICAgICAgICBpbnB1dERvbS5pbm5lckhUTUwgPSAiPGlucHV0IHR5cGU9J2NoZWNrYm94JyBuYW1lPSd6aG1DaGVja2JveCcgdmFsdWU9IitzcmMrIiA+IjsKCiAgICAgICAgICAgICAgICAgICAgZmlyc3REb20uYmVmb3JlKGlucHV0RG9tKTsKCiAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgY2xhc3MgWmhDbGFzcyBleHRlbmRzIEJhc2VDbGFzc3sKCiAgICAgICAgICAgIGNvbnN0cnVjdG9yKCl7CiAgICAgICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHNob3dTcGVjaWFsQ29sdW1uKCl7CgogICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZiA9PSAnaHR0cHM6Ly93d3cuemhpaHUuY29tLycpewoKICAgICAgICAgICAgICAgICAgICBsZXQgY2FyZFJlY29tbWVuZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5GZWVkJyk7CgogICAgICAgICAgICAgICAgICAgIGlmKGNhcmRSZWNvbW1lbmQubGVuZ3RoID4wKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGNhcmRSZWNvbW1lbmQuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLnF1ZXJ5U2VsZWN0b3IoJy5zcGVjaWFsQ29sdW1uJykpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVpvcCA9IEpTT04ucGFyc2UoaXRlbS5nZXRBdHRyaWJ1dGUoJ2RhdGEtemEtZXh0cmEtbW9kdWxlJykpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFkYXRhWm9wKXJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdHlwZSA9IGRhdGFab3AuY2FyZC5jb250ZW50LnR5cGU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZSA9PSAnUG9zdCcpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBpdGVtLnF1ZXJ5U2VsZWN0b3IoJ2Rpdj5kaXY+aDI+c3Bhbj5hJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCF0aXRsZSlyZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdFbGVtZW50ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgnYnV0dG9uJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuY2xhc3NOYW1lID0gJ3NwZWNpYWxDb2x1bW4gQnV0dG9uIFZvdGVCdXR0b24gVm90ZUJ1dHRvbi0tdXAnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdFbGVtZW50LnN0eWxlID0gJ2xpbmUtaGVpZ2h0OjIwcHg7cGFkZGluZzowcHggNXB4O21hcmdpbi1yaWdodDo1cHg7Ym9yZGVyLXJhZGl1czoycHg7JzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3RWxlbWVudC5pbm5lclRleHQgPSAn5paH56ugJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUuYmVmb3JlKG5ld0VsZW1lbnQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYubWF0Y2goL2h0dHBzPzpcL1wvd3d3LnpoaWh1LmNvbVwvc2VhcmNoLykpewogICAgICAgICAgICAgICAgICAgIGxldCBuPTA7CgogICAgICAgICAgICAgICAgICAgIGxldCB0aW1lcj0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjYXJkU2VhcmNoID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLlNlYXJjaFJlc3VsdC1DYXJkJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZihuKys+NjAwKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBpZihjYXJkU2VhcmNoLmxlbmd0aCA+MCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FyZFNlYXJjaC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLnF1ZXJ5U2VsZWN0b3IoJy5zcGVjaWFsQ29sdW1uJykpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVpvcCA9IEpTT04ucGFyc2UoaXRlbS5nZXRBdHRyaWJ1dGUoJ2RhdGEtemEtZXh0cmEtbW9kdWxlJykpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighZGF0YVpvcClyZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXBlID0gZGF0YVpvcC5jYXJkLmNvbnRlbnQudHlwZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZSA9PSAnUG9zdCcpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gaXRlbS5xdWVyeVNlbGVjdG9yKCdkaXY+ZGl2PmgyPnNwYW4+ZGl2PmEnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCF0aXRsZSlyZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3RWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2J1dHRvbicpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3RWxlbWVudC5jbGFzc05hbWUgPSAnc3BlY2lhbENvbHVtbiBCdXR0b24gVm90ZUJ1dHRvbiBWb3RlQnV0dG9uLS11cCc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdFbGVtZW50LnN0eWxlID0gJ2xpbmUtaGVpZ2h0OjIwcHg7cGFkZGluZzowcHggNXB4O21hcmdpbi1yaWdodDo1cHg7JzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0VsZW1lbnQuaW5uZXJUZXh0ID0gJ+aWh+eroCc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZS5iZWZvcmUobmV3RWxlbWVudCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgICAgIH0KCgogICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHNob3dWaWRlb1RpdGxlKCl7CgogICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZiA9PSAnaHR0cHM6Ly93d3cuemhpaHUuY29tLycpewoKICAgICAgICAgICAgICAgICAgICBsZXQgY2FyZFJlY29tbWVuZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5GZWVkJyk7CgogICAgICAgICAgICAgICAgICAgIGlmKGNhcmRSZWNvbW1lbmQubGVuZ3RoID4wKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGNhcmRSZWNvbW1lbmQuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLnF1ZXJ5U2VsZWN0b3IoJy52aWRlb1RpdGxlJykpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVpvcCA9IEpTT04ucGFyc2UoaXRlbS5nZXRBdHRyaWJ1dGUoJ2RhdGEtemEtZXh0cmEtbW9kdWxlJykpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFkYXRhWm9wKXJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaGFzVmlkZW8gPSBkYXRhWm9wLmNhcmQuaGFzX3ZpZGVvOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGhhc1ZpZGVvID09IHRydWUpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0ucXVlcnlTZWxlY3RvcignZGl2PmRpdj5oMj5kaXY+YScpKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlID0gaXRlbS5xdWVyeVNlbGVjdG9yKCdkaXY+ZGl2PmgyPmRpdj5hJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKGl0ZW0ucXVlcnlTZWxlY3RvcignZGl2PmRpdj5oMj5zcGFuPmEnKSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA9IGl0ZW0ucXVlcnlTZWxlY3RvcignZGl2PmRpdj5oMj5zcGFuPmEnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3RWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2J1dHRvbicpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdFbGVtZW50LmNsYXNzTmFtZSA9ICd2aWRlb1RpdGxlJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3RWxlbWVudC5zdHlsZSA9ICdiYWNrZ3JvdW5kOiByZ2JhKDI1NSwgMTMxLCA4NiwgMC4xMik7Y29sb3I6IHJnYigyNTUsIDczLCAxMik7bGluZS1oZWlnaHQ6MjBweDtwYWRkaW5nOjFweCA2cHg7bWFyZ2luLXJpZ2h0OjVweDtib3JkZXItcmFkaXVzOjJweDtmb250LXNpemU6MTRweDsnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdFbGVtZW50LmlubmVyVGV4dCA9ICfop4bpopEnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZS5iZWZvcmUobmV3RWxlbWVudCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5tYXRjaCgvaHR0cHM/OlwvXC93d3cuemhpaHUuY29tXC9zZWFyY2gvKSl7CgogICAgICAgICAgICAgICAgICAgIGxldCBuPTA7CgogICAgICAgICAgICAgICAgICAgIGxldCB0aW1lcj0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjYXJkU2VhcmNoID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLlNlYXJjaFJlc3VsdC1DYXJkJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZihuKys+NjAwKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBpZihjYXJkU2VhcmNoLmxlbmd0aCA+MCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FyZFNlYXJjaC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLnF1ZXJ5U2VsZWN0b3IoJy52aWRlb1RpdGxlJykpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVpvcCA9IEpTT04ucGFyc2UoaXRlbS5nZXRBdHRyaWJ1dGUoJ2RhdGEtemEtZXh0cmEtbW9kdWxlJykpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighZGF0YVpvcClyZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXBlID0gZGF0YVpvcC5jYXJkLmNvbnRlbnQudHlwZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodHlwZSA9PSAnWnZpZGVvJyApewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gaXRlbS5xdWVyeVNlbGVjdG9yKCdkaXY+ZGl2PmgyPnNwYW4+ZGl2PmEnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCF0aXRsZSlyZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3RWxlbWVudCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2J1dHRvbicpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3RWxlbWVudC5jbGFzc05hbWUgPSAndmlkZW9UaXRsZSc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdFbGVtZW50LnN0eWxlID0gJ2JhY2tncm91bmQ6IHJnYmEoMjU1LCAxMzEsIDg2LCAwLjEyKTtjb2xvcjogcmdiKDI1NSwgNzMsIDEyKTtsaW5lLWhlaWdodDoyMHB4O3BhZGRpbmc6MXB4IDZweDttYXJnaW4tcmlnaHQ6NXB4O2JvcmRlci1yYWRpdXM6MnB4O2ZvbnQtc2l6ZToxNHB4Oyc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdFbGVtZW50LmlubmVyVGV4dCA9ICfop4bpopEnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGUuYmVmb3JlKG5ld0VsZW1lbnQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgICAgICB9CgoKICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmVtb3ZlVmlkZW8oKXsKCiAgICAgICAgICAgICAgICBsZXQgY2FyZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5GZWVkJyk7CgogICAgICAgICAgICAgICAgY2FyZC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVpvcCA9IEpTT04ucGFyc2UoaXRlbS5nZXRBdHRyaWJ1dGUoJ2RhdGEtemEtZXh0cmEtbW9kdWxlJykpOwoKICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW8gPSBkYXRhWm9wLmNhcmQuY29udGVudC52aWRlb19pZDsKCiAgICAgICAgICAgICAgICAgICAgaWYodmlkZW8pewoKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5wYXJlbnROb2RlLnN0eWxlPSdkaXNwbGF5Om5vbmU7JzsKCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmVtb3ZlQUQoKXsKCiAgICAgICAgICAgICAgICBsZXQgemhIaWRlQUQgPSBgLlBjLWNhcmQsLlBjLXdvcmR7ZGlzcGxheTpub25lICFpbXBvcnRhbnQ7fS5Ub3BzdG9yeUl0ZW0tLWFkdmVydENhcmR7ZGlzcGxheTpub25lICFpbXBvcnRhbnR9YDsKCiAgICAgICAgICAgICAgICBkb21TdHlsZSAuYXBwZW5kQ2hpbGQoZG9jdW1lbnQuY3JlYXRlVGV4dE5vZGUoemhIaWRlQUQpKTsKCiAgICAgICAgICAgICAgICBkb21IZWFkLmFwcGVuZENoaWxkKGRvbVN0eWxlKTsKCiAgICAgICAgICAgIH0KICAgICAgICAgICAgZG93bmxvYWRWaWRlbygpewoKICAgICAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CgogICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJywoZSk9PnsKCiAgICAgICAgICAgICAgICAgICAgaWYoZS50YXJnZXQuaW5uZXJUZXh0ID09ICfkuIvovb0nKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb0RvbTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaT0wO2k8ZS5wYXRoLmxlbmd0aDtpKyspewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGUucGF0aFtpXS5jbGFzc05hbWUgPT0gJ0ZlZWQnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW9Eb20gPSBlLnBhdGhbaV07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmlkZW9JZDsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHZpZGVvRG9tKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9EYXRhID0gSlNPTi5wYXJzZSh2aWRlb0RvbS5nZXRBdHRyaWJ1dGUoJ2RhdGEtemEtZXh0cmEtbW9kdWxlJykpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvSWQgPSB2aWRlb0RhdGEuY2FyZC5jb250ZW50LnZpZGVvX2lkOwoKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvVXJsID0gd2luZG93LmxvY2F0aW9uLmhyZWY7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvT2JqID0gdmlkZW9Vcmwuc3BsaXQoJz8nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWRlb0lkID0gdmlkZW9PYmpbMF0uc3BsaXQoJy8nKS5wb3AoKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCd2aWRlbycpKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvVXJsID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcigndmlkZW8nKS5zcmM7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX2Rvd25sb2FkKHZpZGVvVXJsLHZpZGVvSWQpOwoKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXZpZGVvSWQpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+S4uuiOt+WPluinhumikWlkJyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSAnaHR0cHM6Ly9sZW5zLnpoaWh1LmNvbS9hcGkvdjQvdmlkZW9zLycrdmlkZW9JZDsKCiAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLnJlcXVlc3QoJ2dldCcsdXJsKS50aGVuKChyZXN1bHQpPT57CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBKU09OLnBhcnNlKHJlc3VsdCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZGF0YS5wbGF5bGlzdCAhPSB1bmRlZmluZWQpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGxheV91cmwgPSBkYXRhLnBsYXlsaXN0LkxELnBsYXlfdXJsOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9OYW1lID0gdmlkZW9JZCsiLm1wNCI7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX2Rvd25sb2FkKHBsYXlfdXJsLHZpZGVvTmFtZSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn5LiL6L295aSx6LSl77yBJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ0RPTU5vZGVJbnNlcnRlZCcsKGUpID0+IHsKCiAgICAgICAgICAgICAgICAgICAgaWYoIWUucmVsYXRlZE5vZGUucXVlcnlTZWxlY3RvcikgcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICB2YXIgcGxheUJhciA9IGUucmVsYXRlZE5vZGUucXVlcnlTZWxlY3RvcignOnNjb3BlID4gZGl2Omxhc3QtY2hpbGQgPiBkaXY6Zmlyc3QtY2hpbGQgPiBkaXY6bnRoLW9mLXR5cGUoMiknKTsKCiAgICAgICAgICAgICAgICAgICAgaWYoIXBsYXlCYXIgfHwgcGxheUJhci5xdWVyeVNlbGVjdG9yKCcuemhtRG93bmxvYWQnKSkgcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICB2YXIgcGxheUJ1dCA9IHBsYXlCYXIucXVlcnlTZWxlY3RvcignOnNjb3BlID4gZGl2Omxhc3QtY2hpbGQnKTsKCiAgICAgICAgICAgICAgICAgICAgaWYoIXBsYXlCdXQpIHJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgdmFyIHBsYXlCdXRMaSA9IHBsYXlCdXQucXVlcnlTZWxlY3RvcignZGl2OmZpcnN0LWNoaWxkJyk7CgogICAgICAgICAgICAgICAgICAgIGlmKCFwbGF5QnV0TGkpIHJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgdmFyIGRvd25sb2FkQnV0ID0gcGxheUJ1dExpLmNsb25lTm9kZSh0cnVlKTsKCiAgICAgICAgICAgICAgICAgICAgZG93bmxvYWRCdXQuY2xhc3NOYW1lID0gcGxheUJ1dExpLmNsYXNzTmFtZSArICcgemhtRG93bmxvYWQnOwoKICAgICAgICAgICAgICAgICAgICBpZighZG93bmxvYWRCdXQucXVlcnlTZWxlY3RvcignLl8xdGc4b2lyJykpIHJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgZG93bmxvYWRCdXQucXVlcnlTZWxlY3RvcignLl8xdGc4b2lyJykuaW5uZXJUZXh0PSfkuIvovb0nOwoKICAgICAgICAgICAgICAgICAgICBwbGF5QnV0TGkuYmVmb3JlKGRvd25sb2FkQnV0KTsKCiAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgaWYoZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnpobURvd25sb2FkJykpcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9Eb20gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCd2aWRlbycpOwoKICAgICAgICAgICAgICAgICAgICBpZighZG9jdW1lbnQucXVlcnlTZWxlY3RvcigndmlkZW8nKSlyZXR1cm47CgogICAgICAgICAgICAgICAgICAgIGxldCBidXR0b24gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuX2UyOTZwZycpOwoKICAgICAgICAgICAgICAgICAgICBpZihidXR0b24ubGVuZ3RoPDIpcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICBsZXQgZG93bmxvYWRCdXQgPSBidXR0b25bMV0uY2xvbmVOb2RlKHRydWUpOwoKICAgICAgICAgICAgICAgICAgICBpZighZG93bmxvYWRCdXQucXVlcnlTZWxlY3RvcignLl8xdGc4b2lyJykpcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICBkb3dubG9hZEJ1dC5xdWVyeVNlbGVjdG9yKCcuXzF0ZzhvaXInKS5pbm5lclRleHQ9J+S4i+i9vSc7CgogICAgICAgICAgICAgICAgICAgIGRvd25sb2FkQnV0LnNldEF0dHJpYnV0ZSgnaWQnLCdkb3dubG9hZFZpZGVvJyk7CgogICAgICAgICAgICAgICAgICAgIGJ1dHRvblsxXS5iZWZvcmUoZG93bmxvYWRCdXQpOwoKICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhkb3dubG9hZEJ1dCk7CgogICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNkb3dubG9hZFZpZGVvJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICB2YXIgdmlkZW9JZDsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5aVmlkZW8tcGxheWVyJykpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB6VmlkZW8gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuWlZpZGVvJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvRGF0YSA9IEpTT04ucGFyc2UoelZpZGVvLmdldEF0dHJpYnV0ZSgnZGF0YS16YS1leHRyYS1tb2R1bGUnKSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW9JZCA9IHZpZGVvRGF0YS5jYXJkLmNvbnRlbnQudmlkZW9faWQ7CgogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9VcmwgPSB3aW5kb3cubG9jYXRpb24uaHJlZjsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9PYmogPSB2aWRlb1VybC5zcGxpdCgnPycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvSWQgPSB2aWRlb09ialswXS5zcGxpdCgnLycpLnBvcCgpOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXZpZGVvSWQpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+S4uuiOt+WPluinhumikWlkJyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSAnaHR0cHM6Ly9sZW5zLnpoaWh1LmNvbS9hcGkvdjQvdmlkZW9zLycrdmlkZW9JZDsKCiAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLnJlcXVlc3QoJ2dldCcsdXJsKS50aGVuKChyZXN1bHQpPT57CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBKU09OLnBhcnNlKHJlc3VsdCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZGF0YS5wbGF5bGlzdCAhPSB1bmRlZmluZWQpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGxheV91cmwgPSBkYXRhLnBsYXlsaXN0LkxELnBsYXlfdXJsOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9OYW1lID0gdmlkZW9JZCsiLm1wNCI7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX2Rvd25sb2FkKHBsYXlfdXJsLHZpZGVvTmFtZSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn5LiL6L295aSx6LSl77yBJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgIH0sMjAwMCk7CgogICAgICAgICAgICB9CiAgICAgICAgICAgIHJlbW92ZVJpZ2h0KCl7CiAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmLm1hdGNoKC9eaHR0cHM/OlwvXC93d3dcLnpoaWh1XC5jb21cL3Blb3BsZVwvLiovKSl7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGxldCB6aEZ1bGxTY3JlZW4gPSBgLkdsb2JhbFNpZGVCYXIge2Rpc3BsYXk6IG5vbmUgIWltcG9ydGFudDt9CiAgICAgICAgICAgICAgICAgICAgLmNzcy0xcXl5dGo3e2Rpc3BsYXk6IG5vbmUgIWltcG9ydGFudDt9CiAgICAgICAgICAgICAgICAgICAgLlF1ZXN0aW9uLXNpZGVDb2x1bW57ZGlzcGxheTpub25lICFpbXBvcnRhbnR9CiAgICAgICAgICAgICAgICAgICAgLlRvcHN0b3J5LW1haW5Db2x1bW57d2lkdGg6MTAwJSAhaW1wb3J0YW50fQogICAgICAgICAgICAgICAgICAgIC5RdWVzdGlvbi1tYWluQ29sdW1ue3dpZHRoOjEwMDBweCAhaW1wb3J0YW50fQogICAgICAgICAgICAgICAgICAgIC5jc3MtY2F6ZzQ4e21hcmdpbjogMHB4IDE2cHggMHB4IDBweCAhaW1wb3J0YW50O30KICAgICAgICAgICAgICAgICAgICAuUXVlc3Rpb25XYWl0aW5nLW1haW5Db2x1bW57d2lkdGg6MTAwJSAhaW1wb3J0YW50O30KICAgICAgICAgICAgICAgICAgICAuY3NzLTFqNWQzbGx7cGFkZGluZy1sZWZ0OjEwcHg7fQogICAgICAgICAgICAgICAgICAgIC5jc3MteWhqd29le2p1c3RpZnktY29udGVudDogc3BhY2UtYmV0d2VlbiAhaW1wb3J0YW50O30KICAgICAgICAgICAgICAgICAgICBgOwogICAgICAgICAgICAgICAgZG9tU3R5bGUgLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKHpoRnVsbFNjcmVlbikpOwoKICAgICAgICAgICAgICAgIGRvbUhlYWQuYXBwZW5kQ2hpbGQoZG9tU3R5bGUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGNoYW5nZUxpbmsoKXsKCiAgICAgICAgICAgICAgICBpZihjb3Vwb25VcmwuaW5kZXhPZigndGFyZ2V0JykgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICBsZXQgb2JqID0gdGhpcy5nZXRVcmxQYXJhbXMoY291cG9uVXJsKTsKCiAgICAgICAgICAgICAgICAgICAgaWYob2JqLnRhcmdldCA9PSB1bmRlZmluZWQpIHJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmsgPSBkZWNvZGVVUklDb21wb25lbnQob2JqLnRhcmdldCk7CgogICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLmhyZWY9bGluazsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZW1vdmVLZXl3b3JkKCl7CgogICAgICAgICAgICAgICAgdmFyIEdNS2V5d29yZCA9IEdNX2dldFZhbHVlKCdpbnB1dFpoS2V5d29yZCcsJzAnKTsKCiAgICAgICAgICAgICAgICBpZihHTUtleXdvcmQgPT0gJzAnIHx8IEdNS2V5d29yZCA9PSAnJykgcmV0dXJuOwoKICAgICAgICAgICAgICAgIGxldCBrZXl3b3JkID0gR01LZXl3b3JkLnNwbGl0KCcsJyk7CgogICAgICAgICAgICAgICAgbGV0IGNvbnRlbnQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuQ29udGVudEl0ZW0nKTsKCiAgICAgICAgICAgICAgICBrZXl3b3JkLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgIGNvbnRlbnQuZm9yRWFjaChmdW5jdGlvbih2YWx1ZSl7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVpvcCA9IEpTT04ucGFyc2UodmFsdWUuZ2V0QXR0cmlidXRlKCdkYXRhLXpvcCcpKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRhdGFab3AgJiYgZGF0YVpvcC50aXRsZS5pbmRleE9mKGl0ZW0pICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaXRlbUNhcmQgPSB2YWx1ZS5wYXJlbnROb2RlLnBhcmVudE5vZGUucGFyZW50Tm9kZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaXRlbUNhcmRDbGFzcz0gaXRlbUNhcmQuY2xhc3NOYW1lOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW1DYXJkQ2xhc3MuaW5kZXhPZignVG9wc3RvcnlJdGVtLWlzUmVjb21tZW5kJykgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtQ2FyZC5zdHlsZT0nZGlzcGxheTpub25lJzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgfQogICAgICAgICAgICByZW1vdmVBdXRob3JOYW1lKCl7CgogICAgICAgICAgICAgICAgdmFyIEdNQXV0aG9yTmFtZSA9IEdNX2dldFZhbHVlKCdpbnB1dFpoQXV0aG9yTmFtZScsJzAnKTsKCiAgICAgICAgICAgICAgICBpZihHTUF1dGhvck5hbWUgPT0gJzAnIHx8IEdNQXV0aG9yTmFtZSA9PSAnJykgcmV0dXJuOwoKICAgICAgICAgICAgICAgIGxldCBhdXRob3JOYW1lID0gR01BdXRob3JOYW1lLnNwbGl0KCcsJyk7CgogICAgICAgICAgICAgICAgLy/mkJzntKLpobUKICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYubWF0Y2goL15odHRwcz86XC9cL3d3dy56aGlodS5jb21cL3NlYXJjaC8pKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IG49MDsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHRpbWVyID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHVzZXJMaW5rID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLkNhcmQnKTsKCiAgICAgICAgICAgICAgICAgICAgaWYodXNlckxpbmsubGVuZ3RoID4gNSl7CgogICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIHVzZXJMaW5rLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXV0aG9yID0gaXRlbS5xdWVyeVNlbGVjdG9yKCdiJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZihhdXRob3IpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGF1dGhvck5hbWUuaW5kZXhPZihhdXRob3IuaW5uZXJUZXh0KSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uc3R5bGUgPSAnZGlzcGxheTpub25lJzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYobj4zMCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CgogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuKys7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgfSwxMDApCgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLy/lm57nrZTpobUKICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYubWF0Y2goL15odHRwcz86XC9cL3d3dy56aGlodS5jb21cL3F1ZXN0aW9uXC8uKi8pKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IGl0ZW1Eb20gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuTGlzdC1pdGVtJyk7CgogICAgICAgICAgICAgICAgICAgIGlmKGl0ZW1Eb20ubGVuZ3RoPjApewoKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbURvbS5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250ZW50ID0gaXRlbS5xdWVyeVNlbGVjdG9yKCcuQ29udGVudEl0ZW0nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihjb250ZW50KXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGFab3AgPSBKU09OLnBhcnNlKGNvbnRlbnQuZ2V0QXR0cmlidXRlKCdkYXRhLXpvcCcpKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0aG9yTmFtZS5pbmRleE9mKGRhdGFab3AuYXV0aG9yTmFtZSkgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5zdHlsZSA9ICdkaXNwbGF5Om5vbmUnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8v562J5L2g5Zue562U6aG1CiAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmID09ICdodHRwczovL3d3dy56aGlodS5jb20vcXVlc3Rpb24vd2FpdGluZycpewoKICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgcXVlc3Rpb25MaXN0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLmpzTmF2aWdhYmxlJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZihxdWVzdGlvbkxpc3QubGVuZ3RoPjApewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1ZXN0aW9uTGlzdC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXV0aG9yRG9tVGV4dCA9IGl0ZW0ucXVlcnlTZWxlY3RvcignLmNzcy10bnNheGgnKS5pbm5lclRleHQ7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGF1dGhvckRvbVRleHQpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1dGhvciA9IGF1dGhvckRvbVRleHQucmVwbGFjZSgnIicsJycpLnJlcGxhY2UoJ+eahOaPkOmXricsJycpLnJlcGxhY2UoLyheXHMrKXwoXHMrJCkvZywnJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihhdXRob3IpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGF1dGhvck5hbWUuaW5kZXhPZihhdXRob3IpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5zdHlsZT0nZGlzcGxheTpub25lOyc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgfSwzMDApCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvL+aOqOiNkOmhtQogICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZiA9PSAnaHR0cHM6Ly93d3cuemhpaHUuY29tLycpewoKICAgICAgICAgICAgICAgICAgICBsZXQgY29udGVudCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5Db250ZW50SXRlbScpOwoKICAgICAgICAgICAgICAgICAgICBjb250ZW50LmZvckVhY2goZnVuY3Rpb24odmFsdWUpewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGFab3AgPSBKU09OLnBhcnNlKHZhbHVlLmdldEF0dHJpYnV0ZSgnZGF0YS16b3AnKSk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZihhdXRob3JOYW1lLmluZGV4T2YoZGF0YVpvcC5hdXRob3JOYW1lKSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGl0ZW1DYXJkID0gdmFsdWUucGFyZW50Tm9kZS5wYXJlbnROb2RlLnBhcmVudE5vZGU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbUNhcmQpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtQ2FyZC5zdHlsZT0nZGlzcGxheTpub25lJzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIHJlbW92ZVlhbnh1YW4oKXsKCiAgICAgICAgICAgICAgICAvL+WbnuetlOmhtQogICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5tYXRjaCgvXmh0dHBzPzpcL1wvd3d3LnpoaWh1LmNvbVwvcXVlc3Rpb25cLy4qLykpewoKICAgICAgICAgICAgICAgICAgICBsZXQgaXRlbURvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5MaXN0LWl0ZW0nKTsKCiAgICAgICAgICAgICAgICAgICAgaWYoaXRlbURvbS5sZW5ndGg+MCl7CgogICAgICAgICAgICAgICAgICAgICAgICBpdGVtRG9tLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRlbnQgPSBpdGVtLnF1ZXJ5U2VsZWN0b3IoJy5LZmVDb2xsZWN0aW9uLU9yZGluYXJ5TGFiZWwtY29udGVudCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNvbnRlbnQgJiYgY29udGVudC5pbm5lclRleHQuaW5kZXhPZign55uQ6YCJJykgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLnN0eWxlID0gJ2Rpc3BsYXk6bm9uZSc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIGxldCBhbnN3ZXJDYXJkID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLkFuc3dlckNhcmQnKTsKCiAgICAgICAgICAgICAgICAgICAgaWYoYW5zd2VyQ2FyZCl7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29udGVudCA9IGFuc3dlckNhcmQucXVlcnlTZWxlY3RvcignLktmZUNvbGxlY3Rpb24tT3JkaW5hcnlMYWJlbC1jb250ZW50Jyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZihjb250ZW50ICYmIGNvbnRlbnQuaW5uZXJUZXh0LmluZGV4T2YoJ+ebkOmAiScpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbnN3ZXJDYXJkLnN0eWxlID0gJ2Rpc3BsYXk6bm9uZSc7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIC8v5pCc57Si6aG1CiAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmLm1hdGNoKC9eaHR0cHM/OlwvXC93d3cuemhpaHUuY29tXC9zZWFyY2gvKSl7CgogICAgICAgICAgICAgICAgICAgbGV0IG51bSA9IDA7CgogICAgICAgICAgICAgICAgICAgbGV0IHRpbWVyID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjYXJkTGlzdCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5DYXJkJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZihjYXJkTGlzdC5sZW5ndGggPiA1KXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXJkTGlzdC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdHlwZSA9IGl0ZW0ucXVlcnlTZWxlY3RvcignLktmZUNvbGxlY3Rpb24tUGNDb2xsZWdlQ2FyZC10eXBlJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHR5cGUgJiYgdHlwZS5pbm5lclRleHQuaW5kZXhPZign55uQ6YCJ5LiT5qCPJykgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5zdHlsZSA9ICdkaXNwbGF5Om5vbmUnOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1dGhvciA9IGl0ZW0ucXVlcnlTZWxlY3RvcignYicpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXV0aG9yWWFueHVhbiA9IFsn5pWF5LqL5qGj5qGI5bGAJywgJ+ebkOmAieaOqOiNkCcsICfnm5DpgInnp5Hmma4nLCAn55uQ6YCJ5oiQ6ZW/6K6h5YiSJywgJ+efpeS5juebkOmAieS8muWRmCcsICfnn6XkuY7nm5DpgInliJvkvZzogIUnLCAn55uQ6YCJ5b+D55CGJywgJ+ebkOmAieWBpeW6t+W/heS/ruivvicsICfnm5DpgInlpYflppnnianor60nLCAn55uQ6YCJ55Sf5rS76aaGJywgJ+ebkOmAieiBjOWcuicsICfnm5DpgInmloflrabnlITpgIknLCAn55uQ6YCJ5L2c6ICF5bCP566h5a62JywgJ+ebkOmAieWNmueJqemmhicsICfnm5DpgInngrnph5EnLCAn55uQ6YCJ5rWL6K+E5a6kJywgJ+ebkOmAieenkeaKgOWJjeayvycsICfnm5DpgInkvJrlkZjnsr7lk4EnLCAn5Y6G5Y+y546v5ri46K6wJ107CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGF1dGhvciAmJiBhdXRob3JZYW54dWFuLmluZGV4T2YoYXV0aG9yLmlubmVyVGV4dCkgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5zdHlsZSA9ICdkaXNwbGF5Om5vbmUnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKG51bT4zMCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CgogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBudW0rKzsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICB9LDEwMCkKCiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgLy/mjqjojZDpobUKICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYgPT0gJ2h0dHBzOi8vd3d3LnpoaWh1LmNvbS8nKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRlbnQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuQ29udGVudEl0ZW0nKTsKCiAgICAgICAgICAgICAgICAgICAgY29udGVudC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRlbnQgPSBpdGVtLnF1ZXJ5U2VsZWN0b3IoJy5LZmVDb2xsZWN0aW9uLU9yZGluYXJ5TGFiZWwtY29udGVudCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoY29udGVudCAmJiBjb250ZW50LmlubmVyVGV4dC5pbmRleE9mKCfnm5DpgIknKSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5zdHlsZSA9ICdkaXNwbGF5Om5vbmUnOwoKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CgogICAgICAgIH0KCiAgICAgICAgY2xhc3MgVmlkZW9Eb3dubG9hZENsYXNzIGV4dGVuZHMgQmFzZUNsYXNzewoKICAgICAgICAgICAgY29uc3RydWN0b3IoKXsKCiAgICAgICAgICAgICAgICBzdXBlcigpOwogICAgICAgICAgICB9CgogICAgICAgICAgICBkeVZpZGVvRG93bmxvYWQoKXsKCiAgICAgICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwoKICAgICAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdsb2FkJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICBhc3luYyBmdW5jdGlvbiBnZXRDb250cm9scygpewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvRG9tID0gYXdhaXQgQmFzZUNsYXNzLmdldEVsZW1lbnQoJy54Zy12aWRlby1jb250YWluZXInKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCF2aWRlb0RvbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+ayoeacieaJvuWIsERPTScpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZzTmF2ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmZ1eV93bWN0Om50aC1vZi10eXBlKDUpJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZigodnNOYXYgJiYgdnNOYXYuY2xhc3NOYW1lLmluZGV4T2YoJ0xYWDc5bGU1JykgIT0gLTEpIHx8IGNvdXBvblVybC5pbmRleE9mKCd2c2RldGFpbCcpICE9IC0xKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfnu7zoibrmoI/nm67lhbPpl63kuIvovb0nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmNyZWF0ZUR5VmlkZW9Eb3dubG9hZCgpOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvUGxheURvbUFsbCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJ3ZpZGVvJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9JbmRleCA9IHZpZGVvUGxheURvbUFsbC5sZW5ndGg+MT92aWRlb1BsYXlEb21BbGwubGVuZ3RoLTI6dmlkZW9QbGF5RG9tQWxsLmxlbmd0aC0xOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvUGxheURvbSA9IHZpZGVvUGxheURvbUFsbFt2aWRlb0luZGV4XTsKCiAgICAgICAgICAgICAgICAgICAgICAgIC8vbGV0IHZpZGVvUGxheURvbSA9IHZpZGVvUGxheURvbUFsbC5sZW5ndGg+MT92aWRlb1BsYXlEb21BbGxbdmlkZW9QbGF5RG9tQWxsLmxlbmd0aC0yXTp2aWRlb1BsYXlEb21BbGxbdmlkZW9QbGF5RG9tQWxsLmxlbmd0aC0xXTsKCiAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvUGxheURvbS5hZGRFdmVudExpc3RlbmVyKCdlbmRlZCcsZnVuY3Rpb24oKXsgLy/nu5PmnZ8KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygi5pKt5pS+57uT5p2fIik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1dG9QbGF5ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnhnLXN3aXRjaC1jaGVja2VkJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoYXV0b1BsYXkpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXRDb250cm9scygpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIH0sIGZhbHNlKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0b0Rvd25sb2FkJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfmraPlnKjkuIvovb3or7fnqI3kvq8nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaW5mbyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5OdTY2UF9iYScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhY2NvdW50ID0gaW5mb1t2aWRlb0luZGV4KjJdLmlubmVyVGV4dDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGVBcnIgPSBpbmZvW3ZpZGVvSW5kZXgqMisxXS5pbm5lclRleHQuc3BsaXQoJyMnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSB0aXRsZUFyclswXT90aXRsZUFyclswXTp0aXRsZUFyclsxXTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9kb3dubG9hZCh2aWRlb1BsYXlEb20uY2hpbGRyZW5bMF0uc3JjLHRpdGxlK2FjY291bnQrIi5tcDQiKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjdG9Db3B5JykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCflt7LlpI3liLbliLDliarotLTmnb8nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRDbGlwYm9hcmQodmlkZW9QbGF5RG9tLmNoaWxkcmVuWzBdLnNyYyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcudG9MaW5rJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4odmlkZW9QbGF5RG9tLmNoaWxkcmVuWzBdLnNyYyk7CgogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKCiAgICAgICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoIndoZWVsIixnZXRDb250cm9scyk7CgogICAgICAgICAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdrZXlkb3duJyxmdW5jdGlvbihlKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGUuY29kZT09J0Fycm93RG93bicgfHwgZS5jb2RlPT0nQXJyb3dVcCcpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdldENvbnRyb2xzKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgYXN5bmMgZnVuY3Rpb24gaW5zZXJ0ZWREb20oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb0RvbSA9IGF3YWl0IEJhc2VDbGFzcy5nZXRFbGVtZW50KCd2aWRlbycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXZpZGVvRG9tKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5rKh5pyJ5om+5YiwRE9NJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICB2aWRlb0RvbS5hZGRFdmVudExpc3RlbmVyKCdET01Ob2RlSW5zZXJ0ZWQnLChlKSA9PiB7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgaW5zZXJ0ZWREb20oKTsKCiAgICAgICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxnZXRDb250cm9scyk7CgogICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGNyZWF0ZUR5VmlkZW9Eb3dubG9hZCgpewoKICAgICAgICAgICAgICAgIGxldCBjb250cm9sQWxsID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbCgnLnhnLXJpZ2h0LWdyaWQnKTsKCiAgICAgICAgICAgICAgICBsZXQgY29udHJvbHMgPSBjb250cm9sQWxsLmxlbmd0aD4xP2NvbnRyb2xBbGxbY29udHJvbEFsbC5sZW5ndGgtMl06Y29udHJvbEFsbFtjb250cm9sQWxsLmxlbmd0aC0xXTsKCiAgICAgICAgICAgICAgICBsZXQgdmlkZW9Eb3dubG9hZERvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1Eb3V5aW5Eb3dubG9hZCcpOwoKICAgICAgICAgICAgICAgIGlmKHZpZGVvRG93bmxvYWREb20pewoKICAgICAgICAgICAgICAgICAgICB2aWRlb0Rvd25sb2FkRG9tLnBhcmVudE5vZGUucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh2aWRlb0Rvd25sb2FkRG9tLnBhcmVudE5vZGUpOwoKICAgICAgICAgICAgICAgICAgICAvL3ZpZGVvRG93bmxvYWREb20ucGFyZW50Tm9kZS5wYXJlbnROb2RlLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQodmlkZW9Eb3dubG9hZERvbS5wYXJlbnROb2RlLnBhcmVudE5vZGUpCiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgbGV0IHBsYXlTZXRpbmcgPSBjb250cm9scy5xdWVyeVNlbGVjdG9yK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ICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgZG93bmxvYWRUZXh0LnNldEF0dHJpYnV0ZSgnZGF0YS11cmwnLGxpbmtVcmwpOwoKICAgICAgICAgICAgICAgIGRvd25sb2FkVGV4dC5yZW1vdmVBdHRyaWJ1dGUoJ3RhcmdldCcpOwoKICAgICAgICAgICAgICAgIGRvd25sb2FkVGV4dC5zZXRBdHRyaWJ1dGUoJ2hyZWYnLCdqYXZhc2NyaXB0OnZvaWQoMCk7Jyk7CgogICAgICAgICAgICAgICAgZG93bmxvYWREb20ub25tb3VzZW92ZXI9ZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgZG93bmxvYWREb20uY2xhc3NOYW1lPSd4Z3BsYXllci1wbGF5YmFjay1zZXR0aW5nIHNsaWRlLXNob3cnOwoKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5vbm1vdXNlb3V0PWZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgIGRvd25sb2FkRG9tLmNsYXNzTmFtZT0neGdwbGF5ZXItcGxheWJhY2stc2V0dGluZyc7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgbGV0IGRvd25sb2FkSHRtbCA9ICcnOwoKICAgICAgICAgICAgICAgIGRvd25sb2FkT3B0aW9uLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgIGRvd25sb2FkSHRtbCArPSBgPGRpdiBjbGFzcz0ieGdwbGF5ZXItcGxheXJhdGlvLWl0ZW0gJHtpdGVtLmlkfSIgaWQ9IiR7aXRlbS5pZH0iPiR7aXRlbS5uYW1lfTwvZGl2PmA7CgogICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5xdWVyeVNlbGVjdG9yKCcueGdwbGF5ZXItcGxheXJhdGlvLXdyYXAnKS5pbm5lckhUTUwgPSBkb3dubG9hZEh0bWw7CgogICAgICAgICAgICAgICAgZG93bmxvYWREb20ucXVlcnlTZWxlY3RvcignLnhncGxheWVyLXNsaWRlcicpLnN0eWxlPSd3aWR0aDo2MHB4IGltcG9ydGFudDsnOwoKICAgICAgICAgICAgICAgIGxldCBhdXRvUGxheSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy54Z3BsYXllci1hdXRvcGxheS1zZXR0aW5nJyk7CgogICAgICAgICAgICAgICAgYXV0b1BsYXkuYWZ0ZXIoZG93bmxvYWREb20pOwoKICAgICAgICAgICAgICAgIGxldCBkaXZEb20gPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdkaXYnKTsKCiAgICAgICAgICAgICAgICBkaXZEb20uc3R5bGU9InBvc2l0aW9uOiBhYnNvbHV0ZTt6LWluZGV4Oi05OTk7aGVpZ2h0OjgwcHg7d2lkdGg6NDBweDttYXJnaW4tdG9wOi04MHB4OyIKCiAgICAgICAgICAgICAgICBkb3dubG9hZERvbS5hcHBlbmRDaGlsZChkaXZEb20pOwoKICAgICAgICAgICAgfQoKICAgICAgICAgICAga3NWaWRlb0Rvd25sb2FkKCl7CgogICAgICAgICAgICAgICAgdmFyIF90aGlzID0gdGhpczsKCiAgICAgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcignbG9hZCcsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgYXN5bmMgZnVuY3Rpb24gZ2V0Q29udHJvbHMoKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb0RvbSA9IGF3YWl0IEJhc2VDbGFzcy5nZXRFbGVtZW50KCcucGxheWVyLXZpZGVvJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZighdmlkZW9Eb20pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmsqHmnInmib7liLBET00nKTtyZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBpZih2aWRlb0RvbS5nZXRBdHRyaWJ1dGUoJ3NyYycpLm1hdGNoKC9eYmxvYi8pKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCdibG9i6KeG6aKR5peg5rOV5LiL6L29Jyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5jcmVhdGVLc1ZpZGVvRG93bmxvYWQodmlkZW9Eb20pOwoKICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW9Eb20uYWRkRXZlbnRMaXN0ZW5lcigncGxheWluZycsZnVuY3Rpb24oKXsgLy/mkq3mlL7kuK0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCLmkq3mlL7kuK0iKTsKICAgICAgICAgICAgICAgICAgICAgICAgfSk7CgogICAgICAgICAgICAgICAgICAgICAgICB2aWRlb0RvbS5hZGRFdmVudExpc3RlbmVyKCdlbmRlZCcsZnVuY3Rpb24oKXsgLy/nu5PmnZ8KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygi5pKt5pS+57uT5p2fIik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1dG9QbGF5ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmF1dG8td2FycHBlcicpLmdldEF0dHJpYnV0ZSgnYXV0b3BsYXknKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihhdXRvUGxheSl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgfSwgZmFsc2UpOwoKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3RvRG93bmxvYWQnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ato+WcqOS4i+i9veivt+eojeS+rycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5VGltZVRvdGFsID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnRvdGFsJykuaW5uZXJUZXh0OwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzZWNvbmQgPSBwbGF5VGltZVRvdGFsLm1hdGNoKC8oLispOiguKykvKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2Vjb25kVG90YWwgPSBzZWNvbmRbMV0qNjArcGFyc2VJbnQoc2Vjb25kWzJdKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVVybCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1Lc0Rvd25sb2FkJykuZ2V0QXR0cmlidXRlKCdkYXRhLXVybCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhY2NvdW50ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnByb2ZpbGUtdXNlci1uYW1lLXRpdGxlJyk/ZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnByb2ZpbGUtdXNlci1uYW1lLXRpdGxlJykuaW5uZXJUZXh0OmRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5mZWVkLWF1dGhvcicpLmlubmVyVGV4dDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcudmlkZW8taW5mby10aXRsZScpP2RvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy52aWRlby1pbmZvLXRpdGxlJykuaW5uZXJUZXh0Om5ldyBEYXRlKCkuZ2V0VGltZSgpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb0ZpbGVOYW1lID0gKGFjY291bnQgJiYgdGl0bGUpP2FjY291bnQrJy0nK3RpdGxlKycubXA0JzpuZXcgRGF0ZSgpLmdldFRpbWUoKSsnLm1wNCc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fZG93bmxvYWQoZGF0YVVybCx2aWRlb0ZpbGVOYW1lKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjdG9Db3B5JykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCflt7LlpI3liLbliLDliarotLTmnb8nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9zZXRDbGlwYm9hcmQodmlkZW9Eb20uZ2V0QXR0cmlidXRlKCdzcmMnKSk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjdG9MaW5rJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93Lm9wZW4odmlkZW9Eb20uZ2V0QXR0cmlidXRlKCdzcmMnKSk7CgogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIGdldENvbnRyb2xzKCk7CgogICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbihlKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGdldENvbnRyb2xzKCk7CgogICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCJ3aGVlbCIsZ2V0Q29udHJvbHMpOwoKICAgICAgICAgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lcigna2V5ZG93bicsZnVuY3Rpb24oZSl7CgogICAgICAgICAgICAgICAgICAgICAgICBpZihlLmNvZGU9PSdBcnJvd0Rvd24nIHx8IGUuY29kZT09J0Fycm93VXAnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXRDb250cm9scygpOwogICAgICAgICAgICAgICAgICAgICAgICB9CgoKICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgIH0pCgoKICAgICAgICAgICAgfQoKICAgICAgICAgICAgY3JlYXRlS3NWaWRlb0Rvd25sb2FkKHZpZGVvRG9tKXsKCiAgICAgICAgICAgICAgICBsZXQgbWF0Y2ggPSAvXmh0dHBzPzpcL1wvd3d3XC5rdWFpc2hvdVwuY29tXC8oLispLzsKCiAgICAgICAgICAgICAgICBsZXQgcmVzcCA9IGxvY2F0aW9uLmhyZWYubWF0Y2gobWF0Y2gpOwoKICAgICAgICAgICAgICAgIGlmKCFyZXNwIHx8IChyZXNwWzFdLmluZGV4T2YoJ3Nob3J0LXZpZGVvJykgPT0gLTEgJiYgcmVzcFsxXS5pbmRleE9mKCd2aWRlbycpID09LTEgJiYgcmVzcFsxXS5pbmRleE9mKCduZXctcmVjbycpID09IC0xKSl7CgogICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCflvZPliY3kuI3mmK/op4bpopHmkq3mlL7pobUnKTtyZXR1cm47CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgaWYocmVzcFsxXS5pbmRleE9mKCdzaG9ydC12aWRlbycpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXllckFyZWEgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcudmlkZW8tY29udGFpbmVyLXBsYXllcicpOwoKICAgICAgICAgICAgICAgICAgICBsZXQgcGxheWVyQXJlYVdpZHRoID0gcGxheWVyQXJlYS5zdHlsZS53aWR0aC5tYXRjaCgvKC4rKXB4Lyk7CgogICAgICAgICAgICAgICAgICAgIGxldCBwbGF5ZXJCYXJQcm9ncmVzcyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wbGF5ZXItYmFyLXByb2dyZXNzJyk7CgogICAgICAgICAgICAgICAgICAgIHBsYXllckJhclByb2dyZXNzLnN0eWxlLndpZHRoID0gcGxheWVyQXJlYVdpZHRoWzFdLTMwMCsncHgnOwoKICAgICAgICAgICAgICAgICAgICBsZXQgdGltZVRvdGFsID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnRvdGFsJyk7CgogICAgICAgICAgICAgICAgICAgIHRpbWVUb3RhbC5zdHlsZS5yaWdodD0nMTYwcHgnOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGxldCBjb250cm9scyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5yaWdodCcpOwoKICAgICAgICAgICAgICAgIGxldCB2aWRlb0Rvd25sb2FkRG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3pobUtzRG93bmxvYWQnKTsKCiAgICAgICAgICAgICAgICBpZih2aWRlb0Rvd25sb2FkRG9tKXsKCiAgICAgICAgICAgICAgICAgICAgdmlkZW9Eb3dubG9hZERvbS5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHZpZGVvRG93bmxvYWREb20pOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGxldCBkZXRhaWxEb20gPSBjb250cm9scy5xdWVyeVNlbGVjdG9yKCdkaXY6bnRoLW9mLXR5cGUoMSknKTsKCiAgICAgICAgICAgICAgICBsZXQgeGdJY29uID0gZGV0YWlsRG9tLmNsb25lTm9kZSh0cnVlKTsKCiAgICAgICAgICAgICAgICBsZXQgbGlua1VybCA9IHZpZGVvRG9tLmdldEF0dHJpYnV0ZSgnc3JjJyk7CgogICAgICAg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ICAvL+mHjeaehOaSreaUvuaTjeS9nOaMiemSrgoKICAgICAgICAgICAgICAgIGxldCB6aG1Lc0J1dHRvbiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1Lc0J1dHRvbicpOwoKICAgICAgICAgICAgICAgIC8vY29uc29sZS5sb2coemhtS3NCdXR0b24pOwoKICAgICAgICAgICAgICAgIGlmKHpobUtzQnV0dG9uKXsKCiAgICAgICAgICAgICAgICAgICAgLy96aG1Lc0J1dHRvbi5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHpobUtzQnV0dG9uKTsKCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGxldCBidXR0b25JY29uID0gZGV0YWlsRG9tLmNsb25lTm9kZSh0cnVlKTsKICAgICAgICAgICAgICAgIC8vY29uc29sZS5sb2coYnV0dG9uSWNvbik7CiAgICAgICAgICAgICAgICBidXR0b25JY29uLnNldEF0dHJpYnV0ZSgnaWQnLCd6aG1Lc0J1dHRvbicpOwoKICAgICAgICAgICAgICAgIGxldCBidXR0b25JY29uSW1nID0gYnV0dG9uSWNvbi5xdWVyeVNlbGVjdG9yKCcudW5tdXRlZC1pY29uJyk7CgogICAgICAgICAgICAgICAgaWYoYnV0dG9uSWNvbkltZyl7CiAgICAgICAgICAgICAgICAgICAgYnV0dG9uSWNvbkltZy5zdHlsZSA9ICdiYWNrZ3JvdW5kOiB1cmwoaHR0cHM6Ly9zMi0xMDYyMy5rd2ltZ3MuY29tL3VkYXRhL3BrZy9jbG91ZGNkbi9pbWcvcGxheWVyLXNldHRpbmcuYWQxZjVjZTguc3ZnKSBuby1yZXBlYXQnOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGRldGFpbERvbS5hZnRlcihidXR0b25JY29uKTsKCiAgICAgICAgICAgICAgICBsZXQgcGxTbGlkZXIgPSBidXR0b25JY29uLnF1ZXJ5U2VsZWN0b3IoJy5wbC1zbGlkZXInKTsKCiAgICAgICAgICAgICAgICBwbFNsaWRlci5zdHlsZT0nd2lkdGg6YXV0bztwYWRkaW5nOjEwcHggMTBweCAyNXB4IDEwcHg7JzsKCiAgICAgICAgICAgICAgICBwbFNsaWRlci5pbm5lckhUTUwgPSAiIjsKCiAgICAgICAgICAgICAgICBsZXQgYnV0dG9uRm91ciA9IGNvbnRyb2xzLnF1ZXJ5U2VsZWN0b3IoJ2RpdjpudGgtb2YtdHlwZSg0KScpOwoKICAgICAgICAgICAgICAgIGJ1dHRvbkZvdXIuc3R5bGUubWFyZ2luPScwcHgnOwoKICAgICAgICAgICAgICAgIGxldCBhdXRvUGxheSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wbGF5LXNldHRpbmctY29udGFpbmVyJyk7CgogICAgICAgICAgICAgICAgaWYoYXV0b1BsYXkpewogICAgICAgICAgICAgICAgICAgIGF1dG9QbGF5LnN0eWxlLm1hcmdpbj0nMHB4IDQwcHggMHB4IDBweCc7CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgbGV0IGJ1dHRvbkZpdmUgPSBjb250cm9scy5xdWVyeVNlbGVjdG9yKCdkaXY6bnRoLW9mLXR5cGUoNSknKTsKCiAgICAgICAgICAgICAgICBpZihidXR0b25GaXZlKXsKCiAgICAgICAgICAgICAgICAgICAgYnV0dG9uRml2ZS5zdHlsZS5tYXJnaW49JzE1cHggMHB4JzsKCiAgICAgICAgICAgICAgICAgICAgYnV0dG9uRml2ZS5vbm1vdXNlb3Zlcj1mdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0b29sVGlwID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmt3YWktcGxheWVyLXJvdGF0ZS10b29sdGlwJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodG9vbFRpcCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvb2xUaXAucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh0b29sVGlwKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCgogICAgICAgICAgICAgICAgICAgICAgICB9LDMwKQoKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIHBsU2xpZGVyLmFwcGVuZENoaWxkKGJ1dHRvbkZpdmUpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbGV0IGJ1dHRvblNpeCA9IGNvbnRyb2xzLnF1ZXJ5U2VsZWN0b3IoJ2RpdjpudGgtb2YtdHlwZSg2KScpOwoKICAgICAgICAgICAgICAgIGlmKGJ1dHRvblNpeCl7CgogICAgICAgICAgICAgICAgICAgIGJ1dHRvblNpeC5zdHlsZS5tYXJnaW49JzE1cHggMHB4JzsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHRvb2xUaXAgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcua3dhaS1wbGF5ZXItZnVsbHNjcmVlbi10b29sdGlwJyk7CgogICAgICAgICAgICAgICAgICAgIGJ1dHRvblNpeC5vbm1vdXNlb3Zlcj1mdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0b29sVGlwID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmt3YWktcGxheWVyLWZ1bGxzY3JlZW4tdG9vbHRpcCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHRvb2xUaXApewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b29sVGlwLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQodG9vbFRpcCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgfSwzMCkKCiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBwbFNsaWRlci5hcHBlbmRDaGlsZChidXR0b25TaXgpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgcGxTbGlkZXIuYXBwZW5kQ2hpbGQoYnV0dG9uRm91cik7CgogICAgICAgICAgICB9CgogICAgICAgICAgICB4aWd1YVZpZGVvRG93bmxvYWQoKXsKCiAgICAgICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwoKICAgICAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdsb2FkJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICBhc3luYyBmdW5jdGlvbiBnZXRDb250cm9scygpewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvRG9tID0gYXdhaXQgQmFzZUNsYXNzLmdldEVsZW1lbnQoJ3ZpZGVvJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZighdmlkZW9Eb20pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmsqHmnInmib7liLBET00nKTtyZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5jcmVhdGVYaWd1YVZpZGVvRG93bmxvYWQoKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIEdNX3htbGh0dHBSZXF1ZXN0KHsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICJnZXQiLAoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJ2h0dHA6Ly80Ny45OS4xNTguMTE4L3ZpZGVvLWNyYWNrL3YyL3BhcnNlP2NvbnRlbnQ9JytlbmNvZGVVUklDb21wb25lbnQobG9jYXRpb24uaHJlZiksCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogJycsCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczogeydBY2NlcHQnOiAndGV4dC9wbGFpbiwgdGV4dC9odG1sLGFwcGxpY2F0aW9uL2pzb24nfSwKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbmxvYWQ6IGZ1bmN0aW9uKHJlcyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHJlcy5zdGF0dXM9PTIwMCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzcCA9IEpTT04ucGFyc2UocmVzLnJlc3BvbnNlVGV4dCkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2aWRlb1NyYyA9ICcnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocmVzcC5jb2RlID09IDApewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW9TcmMgPSByZXNwLmRhdGEudXJsOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0b0Rvd25sb2FkJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCF2aWRlb1NyYyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ivpeinhumikeaXoOazleS4i+i9vScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvVGl0bGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcudmlkZW9UaXRsZSBoMScpLmlubmVyVGV4dDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvQXV0aG9yID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmF1dGhvcl9fdXNlck5hbWUnKS50aXRsZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfmraPlnKjkuIvovb3or7fnqI3kvq8nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fZG93bmxvYWQodmlkZW9TcmMsdmlkZW9UaXRsZSsnQCcrdmlkZW9BdXRob3IrJy5tcDQnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjdG9Db3B5JykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCF2aWRlb1NyYyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+ivpeinhumikeS4jeiDveWkjeWItuWcsOWdgCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCflt7LlpI3liLbliLDliarotLTmnb8nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fc2V0Q2xpcGJvYXJkKHZpZGVvU3JjKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3RvTGluaycpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighdmlkZW9TcmMpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfor6Xop4bpopHkuI3og73nm7TmjqXmiZPlvIAnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKHZpZGVvU3JjKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbihlKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZS5wYXRoLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpdGVtLmNsYXNzTmFtZSA9PSAneGdwbGF5ZXItY29udHJvbC1pdGVtIGNvbnRyb2xfcGxheW5leHQgY29tbW9uLWNvbnRyb2wtaXRlbScpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24ucmVsb2FkKCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LDEwMDApCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgb2JqTGluayA9IHt9OwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlLnBhdGguZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0uaHJlZil7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqTGluay5ocmVmID0gaXRlbS5ocmVmP2l0ZW0uaHJlZjonJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpMaW5rLnRhcmdldCA9IGl0ZW0udGFyZ2V0P2l0ZW0udGFyZ2V0OicnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihvYmpMaW5rLmhyZWYgJiYgb2JqTGluay50YXJnZXQgIT0gJ19ibGFuaycpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZiA9IG9iakxpbmsuaHJlZjsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgb25lcnJvciA6IGZ1bmN0aW9uKGVycil7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ2Vycm9yJykKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhlcnIpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcigndmlkZW8nKS5hZGRFdmVudExpc3RlbmVyKCdlbmRlZCcsZnVuY3Rpb24oKXsgLy/nu5PmnZ8KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygi5pKt5pS+57uT5p2fIik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbi5yZWxvYWQoKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LDU1MDApOwoKICAgICAgICAgICAgICAgICAgICAgICAgfSwgZmFsc2UpOwoKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIGdldENvbnRyb2xzKCk7CiAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICB9CgogICAgICAgICAgICBjcmVhdGVYaWd1YVZpZGVvRG93bmxvYWQoKXsKCiAgICAgICAgICAgICAgICBsZXQgcmlnaHRHcmlkID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnhnLXJpZ2h0LWdyaWQnKTsKCiAgICAgICAgICAgICAgICBsZXQgcGxheUNvbnRyb2wgPSByaWdodEdyaWQucXVlcnlTZWxlY3RvcignZGl2Om50aC1vZi10eXBlKDIpJyk7CgogICAgICAgICAgICAgICAgbGV0IGNvbnRyb2wgPSBwbGF5Q29udHJvbC5jbG9uZU5vZGUodHJ1ZSk7CgogICAgICAgICAgICAgICAgbGV0IGVudHJ5PSBjb250cm9sLnF1ZXJ5U2VsZWN0b3IoJy54Z3BsYXllci1jb250cm9sLWl0ZW1fX2VudHJ5Jyk7CgogICAgICAgICAgICAgICAgZW50cnkuaW5uZXJIVE1MID0gJzxkaXYgY2xhc3M9InhncGNQbGF5ZXJfdGV4dEVudHJ5Ij48c3Bhbj7kuIvovb08L3NwYW4+PC9kaXY+JzsKCiAgICAgICAgICAgICAgICBsZXQgcG9wb3ZlciA9IGNvbnRyb2wucXVlcnlTZWxlY3RvcignLnhncGxheWVyLWNvbnRyb2wtaXRlbV9fcG9wb3ZlcicpOwoKICAgICAgICAgICAgICAgIGxldCBkb3dubG9hZExpc3QgPSAnPHVsPic7CgogICAgICAgICAgICAgICAgZG93bmxvYWRPcHRpb24uZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgZG93bmxvYWRMaXN0ICs9IGA8bGkgdGFiaW5kZXg9IjAiIHJvbGU9Im1lbnVpdGVtcmFkaW8iIGFyaWEtY2hlY2tlZD0iZmFsc2UiIGlkPSIke2l0ZW0uaWR9Ij4ke2l0ZW0ubmFtZX08L2xpPmA7CgogICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICBkb3dubG9hZExpc3QgKz0gJzwvdWw+JzsKCiAgICAgICAgICAgICAgICBwb3BvdmVyLmlubmVySFRNTCA9IGRvd25sb2FkTGlzdDsKCiAgICAgICAgICAgICAgICBwbGF5Q29udHJvbC5iZWZvcmUoY29udHJvbCk7CgogICAgICAgICAgICAgICAgbGV0IGRpdkRvbSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpOwoKICAgICAgICAgICAgICAgIGRpdkRvbS5zdHlsZT0id2lkdGg6IDgwcHg7IGhlaWdodDogMTQwcHg7cG9zaXRpb246YWJzb2x1dGU7Ym90dG9tOjQwcHg7bGVmdDoyMHB4O3otaW5kZXg6LTEiOwoKICAgICAgICAgICAgICAgIGNvbnRyb2wuYXBwZW5kQ2hpbGQoZGl2RG9tKTsKCiAgICAgICAgICAgICAgICBjb250cm9sLm9ubW91c2VvdmVyPWZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgIHBvcG92ZXIuc3R5bGUuZGlzcGxheT0nYmxvY2snOwoKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBjb250cm9sLm9ubW91c2VvdXQ9ZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgcG9wb3Zlci5zdHlsZS5kaXNwbGF5PSdub25lJzsKCiAgICAgICAgICAgICAgICB9CgoKICAgICAgICAgICAgfQoKICAgICAgICAgICAgYmlsaVZpZGVvRG93bmxvYWQoKXsKCiAgICAgICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwoKICAgICAgICAgICAgICAgIHdpbmRvdy5hZGRFdmVudExpc3RlbmVyKCdsb2FkJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICBhc3luYyBmdW5jdGlvbiBnZXRDb250cm9scygpewoKICAgICAgICAgICAgICAgICAgICAgICAgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCdiYW5ndW1pJykgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCByaWdodENvbnRyb2wgPSBhd2FpdCBCYXNlQ2xhc3MuZ2V0RWxlbWVudCgnLnNxdWlydGxlLWNvbnRyb2xsZXItd3JhcC1yaWdodCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFyaWdodENvbnRyb2wpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5rKh5pyJ5om+5YiwRE9NJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmNyZWF0ZUJpbGlWaWRlb0Rvd25sb2FkKCk7CgogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbj0wOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aW1lciA9IHNldEludGVydmFsKGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkb20gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuYmlsaWJpbGktcGxheWVyLXZpZGVvLWJ0bi1xdWFsaXR5Jyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkb21PdGhlciA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5icHgtcGxheWVyLWN0cmwtcXVhbGl0eScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkb20pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lcik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy5jcmVhdGVCaWxpVmlkZW9Eb3dubG9hZCgpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihkb21PdGhlcil7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLmNyZWF0ZUJpbGlWaWRlb0Rvd25sb2FkT3RoZXIoKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKG4rKz4zMCljbGVhckludGVydmFsKHRpbWVyKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwxMDApCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgLy9fdGhpcy5jcmVhdGVCaWxpVmlkZW9Eb3dubG9hZCgpOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpbWVyWmhtSWNvbiA9IHNldEludGVydmFsKGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvRG9tID0gW3tuYW1lOid2aWRlbycsdHlwZTonZG9tJ30se25hbWU6J2J3cF92aWRlbycsdHlwZTonZG9tJ30se25hbWU6Jy5iaWxpYmlsaS1wbGF5ZXItdmlkZW8nLHR5cGU6J2NsYXNzJ31dOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaSA9IDA7aTx2aWRlb0RvbS5sZW5ndGg7aSsrKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvID0gdmlkZW9Eb21baV0udHlwZSA9PSAnZG9tJz9kb2N1bWVudC5xdWVyeVNlbGVjdG9yKHZpZGVvRG9tW2ldLm5hbWUpOmRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IodmlkZW9Eb21baV0ubmFtZSkuZmlyc3RDaGlsZDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodmlkZW8pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbCh0aW1lclpobUljb24pOyAvL+WPlua2iOWumuaXtuWZqAoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW8uYWRkRXZlbnRMaXN0ZW5lcigncGxheScsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygi5pKt5pS+5byA5aeLIik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3RoaXMuY3JlYXRlQmlsaVZpZGVvRG93bmxvYWQoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWRlby5hZGRFdmVudExpc3RlbmVyKCdlbmRlZCcsZnVuY3Rpb24oKXsgLy/nu5PmnZ8KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmLmluZGV4T2YoJ2Jhbmd1bWknKSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBiaWxpRG93bmxvYWQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjYmlsaURvd25sb2FkJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKGJpbGlEb3dubG9hZCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpbGlEb3dubG9hZC5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKGJpbGlEb3dubG9hZCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9OwoKICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgZ2V0Q29udHJvbHMoKTsKCiAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgfQoKICAgICAgICAgICAgY3JlYXRlQmlsaVZpZGVvRG93bmxvYWQoKXsKCiAgICAgICAgICAgICAgICB2YXIgX3RoaXMgPSB0aGlzOwoKICAgICAgICAgICAgICAgIGFzeW5jIGZ1bmN0aW9uIGdldENvbnRyb2xzKCl7CgogICAgICAgICAgICAgICAgICAgIGxldCBkb3dubG9hZEljb24gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjYmlsaURvd25sb2FkJyk7CgogICAgICAgICAgICAgICAgICAgIGlmKGRvd25sb2FkSWNvbil7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfkuIvovb3mjInpkq7lt7LlrZjlnKgnKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmLmluZGV4T2YoJ2Jhbmd1bWknKSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgcXVhbGl0eSA9IGF3YWl0IEJhc2VDbGFzcy5nZXRFbGVtZW50KCcuc3F1aXJ0bGUtcXVhbGl0eS13cmFwJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZighcXVhbGl0eSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+ayoeacieaJvuWIsERPTScpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRyb2wgPSBxdWFsaXR5LmNsb25lTm9kZSh0cnVlKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wucXVlcnlTZWxlY3RvcignLnNxdWlydGxlLXZpZGVvLXF1YWxpdHktdGV4dCcpLmlubmVyVGV4dD0n5LiL6L29JzsKCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wuc2V0QXR0cmlidXRlKCdpZCcsJ2JpbGlEb3dubG9hZCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgcXVhbGl0eS5iZWZvcmUoY29udHJvbCk7CgogICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKGxvY2F0aW9uLmhyZWYuaW5kZXhPZigndmlkZW8nKSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXV0b0ljb25Eb20gPSBhd2FpdCBCYXNlQ2xhc3MuZ2V0RWxlbWVudCgnLmJpbGliaWxpLXBsYXllci12aWRlby1idG4tcXVhbGl0eScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWF1dG9JY29uRG9tKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5rKh5pyJ5om+5YiwRE9NJyk7cmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRyb2wgPSBhdXRvSWNvbkRvbS5jbG9uZU5vZGUodHJ1ZSk7CgogICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLnN0eWxlPSdtYXJnaW4tcmlnaHQ6MjBweDsnOwoKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5xdWVyeVNlbGVjdG9yKCcuYnVpLXNlbGVjdC1yZXN1bHQnKS5pbm5lclRleHQ9J+S4i+i9vSc7CgogICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLnF1ZXJ5U2VsZWN0b3IoJy5idWktc2VsZWN0LXJlc3VsdCcpLnNldEF0dHJpYnV0ZSgnaWQnLCdiaWxpRG93bmxvYWQnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGF1dG9JY29uRG9tLmJlZm9yZShjb250cm9sKTsKCiAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5b2T5YmN6aG16Z2i5LiN5piv6KeG6aKR5oiW55Wq5YmnJyk7cmV0dXJuOwoKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNiaWxpRG93bmxvYWQnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBidmlkID0gJycsYXZpZD0nJzsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYuaW5kZXhPZignYmFuZ3VtaScpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBidmlkID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmF2LWxpbmsnKS5pbm5lclRleHQ7CgogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihsb2NhdGlvbi5ocmVmLmluZGV4T2YoJ3ZpZGVvJykgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYXJhbXMgPSBsb2NhdGlvbi5ocmVmLm1hdGNoKC9odHRwczpcL1wvd3d3LmJpbGliaWxpLmNvbVwvdmlkZW9cLyguKylcPy8pOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHBhcmFtc1sxXS5pbmRleE9mKCdhdicpICE9LTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdmlkID0gcGFyYW1zWzFdLnJlcGxhY2UoJ2F2JywnJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ2aWQgPSBwYXJhbXNbMV0uc3Vic3RyaW5nKHBhcmFtc1sxXS5sZW5ndGgtMSk9PScvJz9wYXJhbXNbMV0uc3Vic3RyaW5nKDAscGFyYW1zWzFdLmxlbmd0aC0xKTpwYXJhbXNbMV07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+W9k+WJjemhtemdouaXoOazleS4i+i9vScpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWJ2aWQgJiYgIWF2aWQpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmnKrojrflj5Zidmlk5oiWYXZpZCcpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9ICJodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC93ZWItaW50ZXJmYWNlL3ZpZXc/YnZpZD0iK2J2aWQrIiZhaWQ9IithdmlkOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVyaSA9IF90aGlzLnJlcXVlc3QoJ2dldCcsdXJsKS50aGVuKChyZXN1bHQpPT57CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlc3AgPSBKU09OLnBhcnNlKHJlc3VsdCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocmVzcC5jb2RlIDwgMCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn6K+l6KeG6aKR5peg5rOV5LiL6L29Jyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfop4bpopHkv6Hmga/mjqXlj6Pov5Tlm57mlbDmja7plJnor68nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/pgInpm4ZjaWQKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGFnZUlkID0gX3RoaXMuZ2V0UXVlcnlTdHJpbmcoJ3AnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY2lkID0gJyc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocGFnZUlkKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lkID0gcmVzcC5kYXRhLnBhZ2VzW3BhZ2VJZC0xXS5jaWQ7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNpZCA9IHJlc3AuZGF0YS5jaWQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coY2lkKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGluayA9ICdodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC9wbGF5ZXIvcGxheXVybD9hdmlkPScrcmVzcC5kYXRhLmFpZCsnJmNpZD0nK2NpZCsnJnFuPTExMic7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlcyA9IF90aGlzLnJlcXVlc3QoJ2dldCcsbGluaykudGhlbigocmVzdWx0KT0+ewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YSA9IEpTT04ucGFyc2UocmVzdWx0KTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZGF0YS5jb2RlIDwgMCl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn6K+l6KeG6aKR5peg5rOV5LiL6L29Jyk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfop4bpopHlnLDlnYDmjqXlj6Pov5Tlm57mlbDmja7plJnor68nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZG93bmxvYWRVcmwgPSBkYXRhLmRhdGEuZHVybFswXS51cmw7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vR01fZG93bmxvYWQoZG93bmxvYWRVcmwpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cub3Blbihkb3dubG9hZFVybCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBnZXRDb250cm9scygpOwoKICAgICAgICAgICAgfQoKICAgICAgICAgICAgY3JlYXRlQmlsaVZpZGVvRG93bmxvYWRPdGhlcigpewoKICAgICAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CgogICAgICAgICAgICAgICAgYXN5bmMgZnVuY3Rpb24gZ2V0Q29udHJvbHMoKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IGRvd25sb2FkSWNvbiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNiaWxpRG93bmxvYWQnKTsKCiAgICAgICAgICAgICAgICAgICAgaWYoZG93bmxvYWRJY29uKXsKICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+S4i+i9veaMiemSruW3suWtmOWcqCcpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIGlmKGxvY2F0aW9uLmhyZWYuaW5kZXhPZignYmFuZ3VtaScpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBxdWFsaXR5ID0gYXdhaXQgQmFzZUNsYXNzLmdldEVsZW1lbnQoJy5zcXVpcnRsZS1xdWFsaXR5LXdyYXAnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFxdWFsaXR5KXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn5rKh5pyJ5om+5YiwRE9NJyk7cmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29udHJvbCA9IHF1YWxpdHkuY2xvbmVOb2RlKHRydWUpOwoKICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coY29udHJvbC5xdWVyeVNlbGVjdG9yKCcuc3F1aXJ0bGUtdmlkZW8tcXVhbGl0eS10ZXh0JykpOwoKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5xdWVyeVNlbGVjdG9yKCcuc3F1aXJ0bGUtdmlkZW8tcXVhbGl0eS10ZXh0JykuaW5uZXJUZXh0PSfkuIvovb0nOwoKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5zZXRBdHRyaWJ1dGUoJ2lkJywnYmlsaURvd25sb2FkJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBxdWFsaXR5LmJlZm9yZShjb250cm9sKTsKCiAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCd2aWRlbycpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdXRvSWNvbkRvbSA9IGF3YWl0IEJhc2VDbGFzcy5nZXRFbGVtZW50KCcuYnB4LXBsYXllci1jdHJsLXF1YWxpdHknKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFhdXRvSWNvbkRvbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+ayoeacieaJvuWIsERPTScpO3JldHVybjsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250cm9sID0gYXV0b0ljb25Eb20uY2xvbmVOb2RlKHRydWUpOwoKICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5zdHlsZT0nbWFyZ2luLXJpZ2h0OjIwcHg7JzsKCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wucXVlcnlTZWxlY3RvcignLmJweC1wbGF5ZXItY3RybC1xdWFsaXR5LXJlc3VsdCcpLmlubmVyVGV4dD0n5LiL6L29JzsKCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wucXVlcnlTZWxlY3RvcignLmJweC1wbGF5ZXItY3RybC1xdWFsaXR5LW1lbnUnKS5zZXRBdHRyaWJ1dGUoJ2lkJywnYmlsaURvd25sb2FkJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgbWVudUl0ZW1zID0gY29udHJvbC5xdWVyeVNlbGVjdG9yQWxsKCcuYnB4LXBsYXllci1jdHJsLXF1YWxpdHktbWVudS1pdGVtJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBtZW51SXRlbXMuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVZhbHVlID0gaXRlbS5nZXRBdHRyaWJ1dGUoJ2RhdGEtVmFsdWUnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkYXRhVmFsdWUgIT0gMTYgJiYgZGF0YVZhbHVlICE9IDgwKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKGl0ZW0pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgfSk7CgogICAgICAgICAgICAgICAgICAgICAgICBhdXRvSWNvbkRvbS5iZWZvcmUoY29udHJvbCk7CgogICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sLm9ubW91c2VvdmVyPSgpPT57CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5xdWVyeVNlbGVjdG9yKCcuYnB4LXBsYXllci1jdHJsLXF1YWxpdHktbWVudScpLnN0eWxlLmRpc3BsYXk9J2Jsb2NrJzsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2wub25tb3VzZW91dD0oKT0+ewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5xdWVyeVNlbGVjdG9yKCcuYnB4LXBsYXllci1jdHJsLXF1YWxpdHktbWVudScpLnN0eWxlLmRpc3BsYXk9J25vbmUnOwoKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCflvZPliY3pobXpnaLkuI3mmK/op4bpopHmiJbnlarliacnKTtyZXR1cm47CgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2JpbGlEb3dubG9hZCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbihlKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBiaWxpRGF0YVZhbHVlID0gZS50YXJnZXQuZ2V0QXR0cmlidXRlKCdkYXRhLVZhbHVlJyk/ZS50YXJnZXQuZ2V0QXR0cmlidXRlKCdkYXRhLVZhbHVlJyk6Jyc7CgogICAgICAgICAgICAgICAgICAgICAgICBpZighYmlsaURhdGFWYWx1ZSlyZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgYnZpZCA9ICcnLGF2aWQ9Jyc7CgogICAgICAgICAgICAgICAgICAgICAgICBpZihsb2NhdGlvbi5ocmVmLmluZGV4T2YoJ2Jhbmd1bWknKSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgYnZpZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5hdi1saW5rJykuaW5uZXJUZXh0OwoKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYobG9jYXRpb24uaHJlZi5pbmRleE9mKCd2aWRlbycpICE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbm93VXJsID0gbG9jYXRpb24uaHJlZi5zcGxpdCgnPycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwYXJhbXMgPSBub3dVcmxbMF0ubWF0Y2goL2h0dHBzOlwvXC93d3cuYmlsaWJpbGkuY29tXC92aWRlb1wvKC4rKS8pOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHBhcmFtc1sxXS5pbmRleE9mKCdhdicpICE9LTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdmlkID0gcGFyYW1zWzFdLnJlcGxhY2UoJ2F2JywnJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ2aWQgPSBwYXJhbXNbMV0uc3Vic3RyaW5nKHBhcmFtc1sxXS5sZW5ndGgtMSk9PScvJz9wYXJhbXNbMV0uc3Vic3RyaW5nKDAscGFyYW1zWzFdLmxlbmd0aC0xKTpwYXJhbXNbMV07CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBCYXNlQ2xhc3MudG9hc3QoJ+W9k+WJjemhtemdouaXoOazleS4i+i9vScpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoIWJ2aWQgJiYgIWF2aWQpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfmnKrojrflj5Zidmlk5oiWYXZpZCcpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9ICJodHRwczovL2FwaS5iaWxpYmlsaS5jb20veC93ZWItaW50ZXJmYWNlL3ZpZXc/YnZpZD0iK2J2aWQrIiZhaWQ9IithdmlkOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVyaSA9IF90aGlzLnJlcXVlc3QoJ2dldCcsdXJsKS50aGVuKChyZXN1bHQpPT57CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlc3AgPSBKU09OLnBhcnNlKHJlc3VsdCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocmVzcC5jb2RlIDwgMCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VDbGFzcy50b2FzdCgn6K+l6KeG6aKR5peg5rOV5LiL6L29Jyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfop4bpopHkv6Hmga/mjqXlj6Pov5Tlm57mlbDmja7plJnor68nKTtyZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/pgInpm4ZjaWQKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGFnZUlkID0gX3RoaXMuZ2V0UXVlcnlTdHJpbmcoJ3AnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY2lkID0gJyc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYocGFnZUlkKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lkID0gcmVzcC5kYXRhLnBhZ2VzW3BhZ2VJZC0xXS5jaWQ7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNpZCA9IHJlc3AuZGF0YS5jaWQ7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmsgPSAnaHR0cHM6Ly9hcGkuYmlsaWJpbGkuY29tL3gvcGxheWVyL3BsYXl1cmw/YXZpZD0nK3Jlc3AuZGF0YS5haWQrJyZjaWQ9JytjaWQrJyZxbj0nK2JpbGlEYXRhVmFsdWU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlcyA9IF90aGlzLnJlcXVlc3QoJ2dldCcsbGluaywnJyx0cnVlKS50aGVuKChyZXN1bHQpPT57CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0gSlNPTi5wYXJzZShyZXN1bHQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihkYXRhLmNvZGUgPCAwKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmFzZUNsYXNzLnRvYXN0KCfor6Xop4bpopHml6Dms5XkuIvovb0nKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+inhumikeWcsOWdgOaOpeWPo+i/lOWbnuaVsOaNrumUmeivrycpO3JldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkb3dubG9hZFVybCA9IGRhdGEuZGF0YS5kdXJsWzBdLnVybDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9HTV9kb3dubG9hZChkb3dubG9hZFVybCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKGRvd25sb2FkVXJsKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGdldENvbnRyb2xzKCk7CgogICAgICAgICAgICB9CgogICAgICAgICAgICB5b3V0dWJlVmlkZW9Eb3dubG9hZCgpewoKICAgICAgICAgICAgICAgIHZhciBfdGhpcyA9IHRoaXM7CgogICAgICAgICAgICAgICAgbGV0IHRpbWVyID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IGxvY2F0aW9uLmhyZWYubWF0Y2goL15odHRwcz86XC9cL3d3d1wueW91dHViZVwuY29tXC8od2F0Y2hcP3Y9Lit8c2hvcnRzXC8uKykvKTsKCiAgICAgICAgICAgICAgICAgICAgaWYodXJsKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB5b3V0dWJlSWNvbiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN6aG1sb2dvJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZih5b3V0dWJlSWNvbil7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB5b3V0dWJlSWNvbi5zdHlsZS5vcGFjaXR5PTE7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBfdGhpcy56aG1Mb2dvKCk7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGxheVdyYXBIdG1sID0gIjxkaXYgY2xhc3M9J3pobV9wbGF5X3ZpZGVvX2xpbmUnPiI7CgogICAgICAgICAgICAgICAgICAgICAgICBwbGF5V3JhcEh0bWwgKz0iPHVsIGNsYXNzPSd6aG1fcGxheV92aWRlX2xpbmVfdWwnPiI7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGxheUxpbmUgPSBbCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7bmFtZTon5LiL6L2957q/6LevMScsdXJsOidodHRwczovL3poLnNhdmVmcm9tLm5ldC8xNzYvI3VybD0nfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtuYW1lOifkuIvovb3nur/ot68yJyx1cmw6J2h0dHBzOi8vbXlkb3duZG93bi5jb20veTIjJ30sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7bmFtZTon5LiL6L2957q/6LevMycsdXJsOidodHRwczovL3d3dy55dGRvd25may5jb20vc2VhcmNoP3VybD0nfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtuYW1lOifkuIvovb3nur/ot680Jyx1cmw6J2h0dHBzOi8veW91dC5jb20vdmlkZW8vP3VybD0nfQogICAgICAgICAgICAgICAgICAgICAgICBdOwoKICAgICAgICAgICAgICAgICAgICAgICAgcGxheUxpbmUuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5V3JhcEh0bWwgKz1gPGxpIGNsYXNzPSdwbGF5TGluZVRkIHpobV9wbGF5X3ZpZGVvX2xpbmVfdWxfbGknIHVybD0nJHtpdGVtLnVybH0nID4ke2l0ZW0ubmFtZX08L2xpPmA7CgogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgcGxheVdyYXBIdG1sICs9IjwvdWw+PC9kaXY+IjsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB6aG1QbGF5ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3pobWxvZ28nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5TGluZURvbSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2RpdicpOwoKICAgICAgICAgICAgICAgICAgICAgICAgcGxheUxpbmVEb20uY2xhc3NOYW1lID0gJ3BsYXlMaW5lRGl2IHpobV9wbGF5X3ZpZGVvX3dyYXAnOwoKICAgICAgICAgICAgICAgICAgICAgICAgcGxheUxpbmVEb20uc3R5bGUuZGlzcGxheSA9ICdub25lJzsKCiAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlMaW5lRG9tLmlubmVySFRNTCA9IHBsYXlXcmFwSHRtbDsKCiAgICAgICAgICAgICAgICAgICAgICAgIHpobVBsYXkuYXBwZW5kQ2hpbGQocGxheUxpbmVEb20pOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlMaW5lVGQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcucGxheUxpbmVUZCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgcGxheUxpbmVUZC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKGl0ZW0uZ2V0QXR0cmlidXRlKCd1cmwnKStsb2NhdGlvbi5ocmVmKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wbGF5QnV0dG9uJykub25tb3VzZW92ZXI9KCk9PnsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIucGxheUxpbmVEaXYiKS5zdHlsZS5kaXNwbGF5PSdibG9jayc7CgogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucGxheUJ1dHRvbicpLm9ubW91c2VvdXQ9KCk9PnsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIucGxheUxpbmVEaXYiKS5zdHlsZS5kaXNwbGF5PSdub25lJzsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIF90aGlzLnpobUxvZ29EcmFnKCd5b3V0dWJlJywnJyk7CgogICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHpobUljb24gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtSWNvbicpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoemhtSWNvbil7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgemhtSWNvbi5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHpobUljb24pOwogICAgICAgICAgICAgICAgICAgICAgICB9CgoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHpobWxvZ28gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtbG9nbycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoemhtbG9nbyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgLy96aG1sb2dvLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoemhtbG9nbyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgemhtbG9nby5zdHlsZS5vcGFjaXR5PTA7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIH0sNTAwKQoKICAgICAgICAgICAgfQogICAgICAgIH0KCiAgICAgICAgdmFyIGFsbFdlYiA9IFsuLi5nZXRDb3Vwb24sLi4uanhWaWRlbywuLi5qeE11c2ljLC4uLnpoTmljZSwuLi50YW9iYW8sLi4udmlkZW9Eb3dubG9hZCwuLi5iYWlkdV07CgogICAgICAgIHZhciBub3dXZWI9W107CgogICAgICAgIGFsbFdlYi5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgaWYoaXRlbS5pc09wZW4gPT0gMCkgcmV0dXJuIHRydWU7CgogICAgICAgICAgICBpdGVtLndlYi5mb3JFYWNoKGZ1bmN0aW9uKHZhbCl7CgogICAgICAgICAgICAgICAgbGV0IHJlc3VsdCA9IGxvY2F0aW9uLmhyZWYubWF0Y2godmFsLm1hdGNoKTsKCiAgICAgICAgICAgICAgICBpZihyZXN1bHQpewoKICAgICAgICAgICAgICAgICAgICBub3dXZWIucHVzaCh2YWwpOwoKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSkKCiAgICAgICAgfSkKCiAgICAgICAgaWYobm93V2ViLmxlbmd0aD09MCl7CgogICAgICAgICAgICBsZXQgYmFzZUNsYXNzID0gbmV3IEJhc2VDbGFzcygpOwoKICAgICAgICAgICAgY29uc29sZS5sb2coJ+ayoeacieWMuemFjeivpee9keermeaIluivpeaooeWdl+W3suWFs+mXrScpO3JldHVybjsKICAgICAgICB9CgogICAgICAgIG5vd1dlYi5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgc3dpdGNoKGl0ZW0uZnVuY05hbWUpewogICAgICAgICAgICAgICAgY2FzZSAnY291cG9uJzoKCiAgICAgICAgICAgICAgICAgICAgY291cG9uRnVuYyhpdGVtKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgJ3BsYXlWaWRlbyc6CiAgICAgICAgICAgICAgICAgICAgcGxheVZpZGVvRnVuYygpOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAncGxheU11c2ljJzoKICAgICAgICAgICAgICAgICAgICBwbGF5TXVzaWNGdW5jKGl0ZW0pOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAnemhOaWNlJzoKICAgICAgICAgICAgICAgICAgICB6aE5pY2VGdW5jKCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICdiYWlkdSc6CiAgICAgICAgICAgICAgICAgICAgdmFyIGJhc2VDbGFzcyA9IG5ldyBCYXNlQ2xhc3M7CiAgICAgICAgICAgICAgICAgICAgYmFpZHVGdW5jKCk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICd2aWRlb0Rvd25sb2FkJzoKCiAgICAgICAgICAgICAgICAgICAgdmFyIHZpZGVvRG93bmxvYWRDbGFzcyA9IG5ldyBWaWRlb0Rvd25sb2FkQ2xhc3MoKTsKCiAgICAgICAgICAgICAgICAgICAgdmFyIHtmdW5jTmFtZSxtYXRjaDpub3dNYXRjaCxub2RlOm5vd05vZGUsbmFtZTpub3dOYW1lfSA9IGl0ZW07CgogICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0uaXNXZWJPcGVuID09IDApewoKICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coaXRlbS5uYW1lKyflt7LlhbPpl60nKTtyZXR1cm47CgogICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgdmlkZW9Eb3dubG9hZENsYXNzW25vd05hbWVdKCk7CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBicmVhazsKCiAgICAgICAgICAgICAgICBjYXNlICd0YW9iYW9TZWFyY2gnOgogICAgICAgICAgICAgICAgICAgIHRhb2Jhb1NlYXJjaEZ1bmMoaXRlbSkKICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgogICAgICAgICAgICB9CgogICAgICAgIH0pCgogICAgICAgIGZ1bmN0aW9uIGNvdXBvbkZ1bmMoaXRlbSl7CgogICAgICAgICAgICB2YXIgY291cG9uQ2xhc3MgPSBuZXcgQ291cG9uQ2xhc3MoKTsKCiAgICAgICAgICAgIHZhciB7ZnVuY05hbWUsbWF0Y2g6bm93TWF0Y2gsbm9kZTpub3dOb2RlLG5hbWU6bm93TmFtZX0gPSBpdGVtOwoKICAgICAgICAgICAgdmFyIGNvdXBvblN0eWxlID1gCiAgICAgICAgICAgICAgICAgICAgaHRtbHsKICAgICAgICAgICAgICAgICAgICAtLXJpZ2h0OjEwMCU7CiAgICAgICAgICAgICAgICAgICAgLS1sZWZ0OjEwMCU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2NvdXBvbnsKICAgICAgICAgICAgICAgICAgICB3aWR0aDpmaXQtY29udGVudDsKICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgIGZsZXgtZGlyZWN0aW9uOnJvdzsKICAgICAgICAgICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWJldHdlZW47CiAgICAgICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6ZmxleC1zdGFydDsKICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6MTRweDsKICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgICAgICAgICAgICAgICAgbWFyZ2luLWJvdHRvbToxNXB4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9sZWZ0ewogICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICAgICAgZmxleC1kaXJlY3Rpb246cm93OwogICAgICAgICAgICAgICAgICAgIGp1c3RpZnktY29udGVudDpmbGV4LXN0YXJ0OwogICAgICAgICAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOjE0cHg7CiAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZDogcmFkaWFsLWdyYWRpZW50KGNpcmNsZSBhdCByaWdodCB0b3AsIHRyYW5zcGFyZW50IDhweCwjZmZmIDApIHRvcCBsZWZ0IC92YXIoLS1yaWdodCkgNTElIG5vLXJlcGVhdCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByYWRpYWwtZ3JhZGllbnQoY2lyY2xlIGF0IHJpZ2h0IGJvdHRvbSwgdHJhbnNwYXJlbnQgOHB4LCAjZmZmIDApIGJvdHRvbSBsZWZ0IC92YXIoLS1yaWdodCkgNTElIG5vLXJlcGVhdDsKICAgICAgICAgICAgICAgICAgICBmaWx0ZXI6IGRyb3Atc2hhZG93KDJweCAycHggM3B4ICM4ODgpOwogICAgICAgICAgICAgICAgICAgIGhlaWdodDo4NHB4OwogICAgICAgICAgICAgICAgICAgIHdpZHRoOjEwMCU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2ltZ19pY29uewogICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6NHB4IDBweCAwcHggNXB4OwogICAgICAgICAgICAgICAgICAgIG1hcmdpbi1yaWdodDo1cHg7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2ltZ19pY29uIGltZ3sKICAgICAgICAgICAgICAgICAgICB3aWR0aDo0N3B4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9jb250ZW50ewogICAgICAgICAgICAgICAgICAgIGRpc3BsYXk6IGZsZXg7CiAgICAgICAgICAgICAgICAgICAgZmxleC1kaXJlY3Rpb246Y29sdW1uOwogICAgICAgICAgICAgICAgICAgIG1hcmdpbi1yaWdodDogMThweDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fbW9uZXl7CiAgICAgICAgICAgICAgICAgICAgZGlzcGxheTogZmxleDsKICAgICAgICAgICAgICAgICAgICBmbGV4LWRpcmVjdGlvbjpyb3c7CiAgICAgICAgICAgICAgICAgICAganVzdGlmeS1jb250ZW50OiBmbGV4LXN0YXJ0OwogICAgICAgICAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBjZW50ZXI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2Ftb3VudF9tb25leXsKICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgIGFsaWduLWl0ZW1zOiBmbGV4LXN0YXJ0OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9tb25leV9zaWduewogICAgICAgICAgICAgICAgICAgIGNvbG9yOiNmMjMwMzA7CiAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOiAyMHB4OwogICAgICAgICAgICAgICAgICAgIGZvbnQtZmFtaWx5OiBBcmlhbDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fbW9uZXlfbnVtewogICAgICAgICAgICAgICAgICAgIGNvbG9yOiNmMjMwMzA7CiAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOjM2cHg7CiAgICAgICAgICAgICAgICAgICAgbWFyZ2luLWxlZnQ6IDJweDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fY29uZGl0aW9uewogICAgICAgICAgICAgICAgICAgIGNvbG9yOiNmYjBmM2E7CiAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogI2ZmZjRlYzsKICAgICAgICAgICAgICAgICAgICBtYXJnaW4tdG9wOjVweDsKICAgICAgICAgICAgICAgICAgICBtYXJnaW4tbGVmdDogNXB4OwogICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6MnB4IDVweDsKICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6MTJweDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fdGltZXsKICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgIGZsZXgtZGlyZWN0aW9uOnJvdzsKICAgICAgICAgICAgICAgICAgICBtYXJnaW4tdG9wOiAtNXB4OwogICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6MnB4IDRweDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fdGVybXsKICAgICAgICAgICAgICAgICAgICBjb2xvcjojZmIwZjNhOwogICAgICAgICAgICAgICAgICAgIGJvcmRlcjogMXB4IHNvbGlkICNmYjBmM2E7CiAgICAgICAgICAgICAgICAgICAgYm9yZGVyLXJhZGl1czoycHg7CiAgICAgICAgICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjsKICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOjBweCA0cHg7CiAgICAgICAgICAgICAgICAgICAgZm9udC1zaXplOjEycHg7CiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiAxOHB4OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9kYXRlewogICAgICAgICAgICAgICAgICAgIGZvbnQtc2l6ZTogMTRweDsKICAgICAgICAgICAgICAgICAgICBmb250LXdlaWdodDogNTAwOwogICAgICAgICAgICAgICAgICAgIHBhZGRpbmctbGVmdDo4cHg7CgogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9jaXJjbGV7CiAgICAgICAgICAgICAgICAgICAgYmFja2dyb3VuZDogI2ZiMGYzYSB1cmwoZGF0YTppbWFnZS9wbmc7YmFzZTY0LGlWQk9SdzBLR2dvQUFBQU5TVWhFVWdBQUFBZ0FBQUFJQ0FZQUFBREVENzZMQUFBQUNYQklXWE1BQUFzU0FBQUxFZ0hTM1g3OEFBQUF6VWxFUVZRWWxTM05NVW9EUVJpRzRYY211OWxBWEJRYnErMUNDcXVjd3NiT08zZ0FTMjloNFFtOGdSZElNS1ZnbFFWQkZpU0ZqWUtCcVdaMmQvN1BJdllQUEU2U01DSHZjRDhIdUx6QlVzSUtEeVk4QU40UlUrSjkvOG5IOG9MWUozd1djaHhCakpIdFprTjFmc2JwOW9tdmh6djZjY0RqUUpMYXRsWFhkWklrNWF3a0tWemRLazlXOGdCRlVWRFhOUUEyakpUQTdHU09tUjJMcG1rSUlXQTU0NnNwdk81d0wyOVF6M0dTQkJDSG5ud0l6TzRmMGZNYVlvS3kvQWNtOEE2K2Z4a1gxNUFOcWltWThRZW1DbTkyMHIxYVVBQUFBQUJKUlU1RXJrSmdnZz09KSByZXBlYXQteTsKICAgICAgICAgICAgICAgICAgICBtYXJnaW4tdG9wOjEwcHg7CiAgICAgICAgICAgICAgICAgICAgd2lkdGg6IDEwcHg7CiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OjY2cHg7CiAgICAgICAgICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlOwogICAgICAgICAgICAgICAgICAgIHJpZ2h0OjQ0cHg7CiAgICAgICAgICAgICAgICAgICAgei1pbmRleDoyOwogICAgICAgICAgICAgICAgICAgIGZpbHRlcjpub25lOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgLnpobV9saW5rX2NvdXBvbnsKICAgICAgICAgICAgICAgICAgICBkaXNwbGF5OiBmbGV4OwogICAgICAgICAgICAgICAgICAgIGZsZXgtZGlyZWN0aW9uOnJvdzsKICAgICAgICAgICAgICAgICAgICBhbGlnbi1pdGVtczpjZW50ZXI7CiAgICAgICAgICAgICAgICAgICAgZmlsdGVyOiBkcm9wLXNoYWRvdygycHggMnB4IDNweCAjODg4KTsKICAgICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kOiByYWRpYWwtZ3JhZGllbnQoY2lyY2xlIGF0IGxlZnQgdG9wLCB0cmFuc3BhcmVudCA4cHgsICNmYjA1M2EgMCkgdG9wIHJpZ2h0IC92YXIoLS1sZWZ0KSA1MCUgbm8tcmVwZWF0LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJhZGlhbC1ncmFkaWVudChjaXJjbGUgYXQgbGVmdCBib3R0b20sIHRyYW5zcGFyZW50IDhweCwgI2ZiMDUzYSAwKSBib3R0b20gcmlnaHQgL3ZhcigtLWxlZnQpIDUwJSBuby1yZXBlYXQ7CiAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OiA4NHB4OwoKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC56aG1fbGlua190ZXh0ewogICAgICAgICAgICAgICAgICAgIGN1cnNvcjpwb2ludGVyOwogICAgICAgICAgICAgICAgICAgIG1hcmdpbi10b3A6IDEwcHg7CiAgICAgICAgICAgICAgICAgICAgbWFyZ2luLWxlZnQ6IDEycHg7CiAgICAgICAgICAgICAgICAgICAgd3JpdGluZy1tb2RlOnZlcnRpY2FsLWxyOwogICAgICAgICAgICAgICAgICAgIGxldHRlci1zcGFjaW5nOjEwcHg7CiAgICAgICAgICAgICAgICAgICAgY29sb3I6ICNmZmYgIWltcG9ydGFudDsKICAgICAgICAgICAgICAgICAgICBmb250LXNpemU6MTZweDsKICAgICAgICAgICAgICAgICAgICBmb250LWZhbWlseToiTWljcm9zb2Z0IFlhSGVpIjsKICAgICAgICAgICAgICAgICAgICB0ZXh0LWRlY29yYXRpb246bm9uZTsKICAgICAgICAgICAgICAgICAgICB3aWR0aDozOHB4OwogICAgICAgICAgICAgICAgICAgIGJhY2tncm91bmQ6IHJhZGlhbC1ncmFkaWVudChjaXJjbGUgYXQgbGVmdCB0b3AsIHRyYW5zcGFyZW50IDhweCwgI2ZiMDUzYSAwKSB0b3AgcmlnaHQgL3ZhcigtLWxlZnQpIDUwJSBuby1yZXBlYXQsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmFkaWFsLWdyYWRpZW50KGNpcmNsZSBhdCBsZWZ0IGJvdHRvbSwgdHJhbnNwYXJlbnQgOHB4LCAjZmIwNTNhIDApIGJvdHRvbSByaWdodCAvdmFyKC0tbGVmdCkgNTAlIG5vLXJlcGVhdDsKCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAuemhtX2xpbmtfdGV4dDpob3ZlcnsKICAgICAgICAgICAgICAgIHRleHQtZGVjb3JhdGlvbjpub25lOwogICAgICAgICAgICAgICAgZm9udC13ZWlnaHQ6ODAwOwogICAgICAgICAgICAgICAgZm9udC1mYW1pbHk6Ik1pY3Jvc29mdCBZYUhlaSI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBgOwoKICAgICAgICAgICAgZG9tU3R5bGUgLmFwcGVuZENoaWxkKGRvY3VtZW50LmNyZWF0ZVRleHROb2RlKGNvdXBvblN0eWxlKSk7CgogICAgICAgICAgICBkb21IZWFkLmFwcGVuZENoaWxkKGRvbVN0eWxlKTsKCiAgICAgICAgICAgIGxldCBuPTA7CgogICAgICAgICAgICBsZXQgY291cG9uVGltZXIgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgIG4rKzsKCiAgICAgICAgICAgICAgICBsZXQgcGFnZU5vZGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKG5vd05vZGUpCgogICAgICAgICAgICAgICAgaWYocGFnZU5vZGUpewoKICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKGNvdXBvblRpbWVyKTsKCiAgICAgICAgICAgICAgICAgICAgY291cG9uQ2xhc3Nbbm93TmFtZV0oKTsKCiAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgaWYobj09Y291cG9uVGltZXJOdW0pIGNsZWFySW50ZXJ2YWwoY291cG9uVGltZXIpOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgfSwxMDApCiAgICAgICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gcGxheVZpZGVvRnVuYygpewoKICAgICAgICAgICAgdmFyIHBsYXlWaWRlb0NsYXNzID0gbmV3IFBsYXlWaWRlb0NsYXNzKCk7CgogICAgICAgICAgICBwbGF5VmlkZW9DbGFzcy56aG1Mb2dvKCk7CgogICAgICAgICAgICAvL2N1c3RvbSBhZGQgbGluZQoKICAgICAgICAgICAgaWYoR01fZ2V0VmFsdWUoJ3ZpZGVvUGxheUxpbmVBZGQnKT09MjIgJiYgR01fZ2V0VmFsdWUoJ3BsYXlWaWRlb0xpbmVUZXh0JykpewoKICAgICAgICAgICAgICAgIGxldCBsaW5lT2JqID0gcGxheVZpZGVvQ2xhc3MuZ2V0TGluZShHTV9nZXRWYWx1ZSgncGxheVZpZGVvTGluZVRleHQnKSk7CgogICAgICAgICAgICAgICAgaWYobGluZU9iail7CgogICAgICAgICAgICAgICAgICAgIHBsYXlMaW5lID0gWy4uLmxpbmVPYmosLi4ucGxheUxpbmVdOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgfQoKICAgICAgICAgICAgLy90ZW1wbGF0ZTppY29uLHBsYXlMaW5lOwogICAgICAgICAgICBsZXQgcGxheVdyYXBIdG1sID0gIjxkaXYgY2xhc3M9J3pobV9wbGF5X3ZpZGVvX2xpbmUnPiI7CgogICAgICAgICAgICBwbGF5V3JhcEh0bWwgKz0iPGRpdj48dWwgY2xhc3M9J3pobV9wbGF5X3ZpZGVfbGluZV91bCc+IjsKCiAgICAgICAgICAgIHBsYXlMaW5lLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgbGV0IHNlbGVjdGVkID0gJyc7CgogICAgICAgICAgICAgICAgaWYocGxheVZpZGVvQ2xhc3MuZ2V0Q29va2llKCdwbGF5TGluZUFjdGlvbicpID09IGl0ZW0udXJsKXsKCiAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWQgPSAnemhtX2xpbmVfc2VsZWN0ZWQnOwoKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICBwbGF5V3JhcEh0bWwgKz1gPGxpIGNsYXNzPSdwbGF5TGluZVRkIHpobV9wbGF5X3ZpZGVvX2xpbmVfdWxfbGkgJHtzZWxlY3RlZH0nIHVybD0nJHtpdGVtLnVybH0nID4ke2l0ZW0ubmFtZX08L2xpPmA7CgogICAgICAgICAgICB9KQoK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ICAgICAgICB7ZnVuY05hbWU6InBsYXlWaWRlbyIsIG5vZGU6IiN2b2RQbGF5ZXIiLG5vZGVUeXBlOidpZCcsbWF0Y2g6L3d3d1wuMTkwNS5jb21cL3ZvZFwvcGxheVwvL30sCiAgICAgICAgICAgIF07CgogICAgICAgICAgICBsZXQganhWaWRlb1dlYiA9IGp4VmlkZW9EYXRhLmZpbHRlcihmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICByZXR1cm4gbG9jYXRpb24uaHJlZi5tYXRjaChpdGVtLm1hdGNoKTsKCiAgICAgICAgICAgIH0pCgogICAgICAgICAgICBwbGF5VmlkZW9DbGFzcy56aG1Mb2dvRHJhZygndmlkZW8nLGp4VmlkZW9XZWIpOwoKICAgICAgICAgICAgLy/mmK/lkKblnKjmkq3mlL7pobUKICAgICAgICAgICAgaWYoanhWaWRlb1dlYi5sZW5ndGggPiAwKXsKCiAgICAgICAgICAgICAgICB2YXIge2Z1bmNOYW1lLG1hdGNoOm5vd01hdGNoLG5vZGU6bm93Tm9kZSxuYW1lOm5vd05hbWV9ID0ganhWaWRlb1dlYlswXTsKCiAgICAgICAgICAgICAgICAvL+m8oOagh+e7j+i/h+aYvuekuue6v+i3rwogICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnBsYXlCdXR0b24nKS5vbm1vdXNlb3Zlcj0oKT0+ewoKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIucGxheUxpbmVEaXYiKS5zdHlsZS5kaXNwbGF5PSdibG9jayc7CgogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5wbGF5QnV0dG9uJykub25tb3VzZW91dD0oKT0+ewoKICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIucGxheUxpbmVEaXYiKS5zdHlsZS5kaXNwbGF5PSdub25lJzsKCiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgLy/pgInmi6nnur/ot6/op6PmnpDmkq3mlL4KCiAgICAgICAgICAgICAgICB2YXIgcGxheUxpbmVUZCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5wbGF5TGluZVRkJyk7CgogICAgICAgICAgICAgICAgcGxheUxpbmVUZC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICBpdGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgcGxheUxpbmVUZC5mb3JFYWNoKGZ1bmN0aW9uKGUpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUuc2V0QXR0cmlidXRlKCdjbGFzcycsJ3BsYXlMaW5lVGQgemhtX3BsYXlfdmlkZW9fbGluZV91bF9saScpOwogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRBdHRyaWJ1dGUoJ2NsYXNzJywncGxheUxpbmVUZCB6aG1fcGxheV92aWRlb19saW5lX3VsX2xpIHpobV9saW5lX3NlbGVjdGVkJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBwbGF5VmlkZW9DbGFzcy5zZXRDb29raWUoJ3BsYXlMaW5lQWN0aW9uJyx0aGlzLmdldEF0dHJpYnV0ZSgndXJsJyksMzApOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5vd1dlYk5vZGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKG5vd05vZGUpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYobm93V2ViTm9kZSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbm93V2ViTm9kZS5pbm5lckhUTUwgPSBwbGF5SnhIdG1sOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwbGF5SWZyYW1lID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3BsYXlJZnJhbWUnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5SWZyYW1lLnNyYz0gaXRlbS5nZXRBdHRyaWJ1dGUoJ3VybCcpK2xvY2F0aW9uLmhyZWY7CgogICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygn6KeG6aKR572R56uZ57uT54K55LiN5a2Y5ZyoJyk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgIC8qLS3nibnmrorlpITnkIYtLSovCiAgICAgICAgICAgICAgICAvL+S8mOmFt+WOu+W5v+WRigogICAgICAgICAgICAgICAgaWYobm93Tm9kZT09IiNwbGF5ZXIiKXsKCiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHlvdWt1QWQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuYWR2ZXJ0aXNlLWxheWVyJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgeWtBZCA9IHlvdWt1QWQubGFzdENoaWxkOwoKICAgICAgICAgICAgICAgICAgICAgICAgeWtBZC5wYXJlbnROb2RlLnJlbW92ZUNoaWxkKHlrQWQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmt1aS1kYXNoYm9hcmQtMCcpLnN0eWxlPSdkaXNwbGF5OmZsZXgnOwoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlWaWRlbyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy52aWRlby1sYXllciB2aWRlbycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgcGxheVZpZGVvLnBsYXkoKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuPTA7CgogICAgICAgICAgICAgICAgICAgICAgICAvL+aaguWBnAogICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcua3VpLXBsYXktaWNvbi0wJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnZpZGVvLWxheWVyIHZpZGVvJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobisrJTIgPT0gMCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvLnBhdXNlKCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZpZGVvLnBsYXkoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgICAgICAgICAgICAgcGxheVZpZGVvLmFkZEV2ZW50TGlzdGVuZXIoJ3RpbWV1cGRhdGUnLGZ1bmN0aW9uKCl7IC8v5pKt5pS+5pe26Ze05pS55Y+YCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHlvdWt1QWQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuYWR2ZXJ0aXNlLWxheWVyJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHlrQWQgPSB5b3VrdUFkLmxhc3RDaGlsZDsKCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoeWtBZCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHlrQWQucGFyZW50Tm9kZS5yZW1vdmVDaGlsZCh5a0FkKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcua3VpLWRhc2hib2FyZC0wJykuc3R5bGU9J2Rpc3BsYXk6ZmxleCc7CiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgICAgICAgICB9LDMwMDApCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvL+eIseWlh+iJuuWOu+W5v+WRigogICAgICAgICAgICAgICAgaWYobm93Tm9kZT09IiNmbGFzaGJveCIpewoKICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgZG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnNraXBwYWJsZS1hZnRlcicpOwoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoZG9tKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb20uY2xpY2soKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgfSwzMDAwKQoKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAvL+iFvuiur+WOu3ZpcOW8ueeqlwogICAgICAgICAgICAgICAgaWYobm93Tm9kZT09IiNwbGF5ZXItY29udGFpbmVyIil7CgogICAgICAgICAgICAgICAgICAgIGxldCBuID0gMDsKCiAgICAgICAgICAgICAgICAgICAgbGV0IHRpbWVyID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKG4rKyA8IDEwMCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhbmVsVGlwVmlwID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnBhbmVsLW92ZXJsYXknKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihwYW5lbFRpcFZpcCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhbmVsVGlwVmlwLnN0eWxlLmRpc3BsYXk9J25vbmUnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHRpbWVyKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOwoKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICB9LDEwMCkKCgoKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAvL+S5kOinhumAiembhuWkhOeQhgogICAgICAgICAgICAgICAgaWYobm93Tm9kZSA9PSAiI2xlX3BsYXlib3giKXsKCiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGpCbG9jayA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5qX2Jsb2NrJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBpZighakJsb2NrKSByZXR1cm47CgogICAgICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGk9MDtpPGpCbG9jay5sZW5ndGg7aSsrKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmlkZW9JZCA9IGpCbG9ja1tpXS5nZXRBdHRyaWJ1dGUoJ2RhdGEtdmlkJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmsgPSBgaHR0cHM6Ly93d3cubGUuY29tL3B0di92cGxheS8ke3ZpZGVvSWR9Lmh0bWxgOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpCbG9ja1tpXS5maXJzdENoaWxkLnNldEF0dHJpYnV0ZSgnaHJlZicsbGluayk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9LDMwMDApCiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgLy9C56uZ5aSn5Lya5ZGYdXJs5aSE55CG77yM6aG16Z2iY2xhc3PkuI3kuIDoh7QKICAgICAgICAgICAgICAgIGlmKG5vd05vZGUgPT0gIi5wbGF5ZXItY29udGFpbmVyIil7CgogICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucGxheWVyLWNvbnRhaW5lcicpICYmICFkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuYnB4LXBsYXllci1jb250YWluZXInKSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbm93Tm9kZSA9ICcucGxheWVyLW1hc2snOwoKICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbm93Tm9kZSA9ICcuYnB4LXBsYXllci1jb250YWluZXInOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIH0sMzAwMCkKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAvL+WFqOWxgGNsaWNr55uR5ZCsCiAgICAgICAgICAgICAgICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oZSl7CgogICAgICAgICAgICAgICAgICAgIC8q54ix5aWH6Im66YCJ6ZuG5Y675bm/5ZGKKi8KICAgICAgICAgICAgICAgICAgICBpZihub3dOYW1lPT0naXFpeWlQYycpewoKICAgICAgICAgICAgICAgICAgICAgICAgZS5wYXRoLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5jbGFzc05hbWUuaW5kZXhPZignc2VsZWN0LWl0ZW0nKSE9IC0xKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZj1sb2NhdGlvbi5ocmVmOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LDEwMDApCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnNraXBwYWJsZS1hZnRlcicpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRvbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvbS5jbGljaygpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICB9LDUwMDApCgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgbGV0IGFyZWFDbGFzc05hbWUgPSBbXTsKCiAgICAgICAgICAgICAgICAgICAgZS5wYXRoLmZpbHRlcihmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0uY2xhc3NOYW1lID09IG5vd1dlYlswXS5hcmVhQ2xhc3NOYW1lKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmVhQ2xhc3NOYW1lPWl0ZW07CgogICAgICAgICAgICAgICAgICAgICAgICB9OwoKICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICBpZihhcmVhQ2xhc3NOYW1lLmxlbmd0aCA9PSAwKXsKICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+S4jeWcqOmAiembhuiMg+WbtCcpOwogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICBpZihub3dOYW1lPT0ncXFQQycpewoKICAgICAgICAgICAgICAgICAgICAgICAgZS5wYXRoLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5jbGFzc05hbWU9PSdlcGlzb2RlLWxpc3QtcmVjdF9faXRlbScgfHwgaXRlbS5jbGFzc05hbWUuaW5kZXhPZignZXBpc29kZS1pdGVtJykgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbi5ocmVmPWxvY2F0aW9uLmhyZWY7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sMTAwMCkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgaWYobm93TmFtZSA9PSAnYmlsaVBjJyl7CiAgICAgICAgICAgICAgICAgICAgICAgIC8v5Zyo5YWD57Sg6IyD5Zu05YaF77yM5LiN55So6Lez6L2s77yMCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjbGFzc05hbWUgPSBbJ2JweC1wbGF5ZXItdmlkZW8tYXJlYSddOy8v54K55Ye75YWD57Sg6IyD5Zu077yM6IyD5Zu05Y+W6KeG6aKR5pKt5Y+R5Yy65Z+f44CC5ZCO57ut5pyJ6Lez6L2s6ZSZ6K+v77yM5paw5aKe5Yy65Z+f5Y2z5Y+v44CCCgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgbWF0Y2hOdW0gPSAwOwoKICAgICAgICAgICAgICAgICAgICAgICAgZS5wYXRoLmZpbHRlcihmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihjbGFzc05hbWUuaW5kZXhPZihpdGVtLmNsYXNzTmFtZSkgIT0gLTEpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoTnVtKys7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgaWYobWF0Y2hOdW0gPiAwKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAvL+inhumikemhtemdoumAiembhui3s+i9rAogICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZpZGVvQ2xhc3NOYW1lID0gWyd2aWRlby1lcGlzb2RlLWNhcmQnXTsvL+inhumikemhtemdoue7rembhmRvbQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUucGF0aC5maWx0ZXIoZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHZpZGVvQ2xhc3NOYW1lLmluZGV4T2YoaXRlbS5jbGFzc05hbWUpICE9IC0xKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZiA9IGxvY2F0aW9uLmhyZWY7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIHZhciBvYmpMaW5rID0ge307CgogICAgICAgICAgICAgICAgICAgIGUucGF0aC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5ocmVmKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpMaW5rLmhyZWYgPSBpdGVtLmhyZWY/aXRlbS5ocmVmOicnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9iakxpbmsudGFyZ2V0ID0gaXRlbS50YXJnZXQ/aXRlbS50YXJnZXQ6Jyc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgIGlmKG9iakxpbmsuaHJlZiAmJiBvYmpMaW5rLnRhcmdldCAhPSAnX2JsYW5rJyl7CgogICAgICAgICAgICAgICAgICAgICAgICBsb2NhdGlvbi5ocmVmID0gb2JqTGluay5ocmVmOwoKICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgIC8q6IW+6K6v6KeG6aKR54K55Ye75YW25a6D6KeG6aKR6Lez6L2sKi8KICAgICAgICAgICAgICAgIGlmKG5vd05hbWU9PSdxcVBDJyl7CgogICAgICAgICAgICAgICAgICAgIGxldCBmaWd1cmUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuZmlndXJlJyk7CgogICAgICAgICAgICAgICAgICAgIGxldCBmaWd1cmVEZXRhaWwgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcuZmlndXJlX2RldGFpbCcpOwoKICAgICAgICAgICAgICAgICAgICBsZXQgbGlzdEl0ZW0gPSBbLi4uZmlndXJlLC4uLmZpZ3VyZURldGFpbF07CgogICAgICAgICAgICAgICAgICAgIGlmKGxpc3RJdGVtLmxlbmd0aCA+IDApewoKICAgICAgICAgICAgICAgICAgICAgICAgbGlzdEl0ZW0uZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGluayA9IHRoaXMuZ2V0QXR0cmlidXRlKCdocmVmJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGxpbmspewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZiA9IGxpbms7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICB9KTsKCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgfQoKICAgICAgICB9CgogICAgICAgIGZ1bmN0aW9uIHBsYXlNdXNpY0Z1bmMoKXsKCiAgICAgICAgICAgIGlmKHNlbGYuZnJhbWVFbGVtZW50ICYmIHNlbGYuZnJhbWVFbGVtZW50LnRhZ05hbWUgPT0gIklGUkFNRSIpewoKICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgdmFyIHBsYXlNdXNpY0NsYXNzID0gbmV3IFBsYXlNdXNpY0NsYXNzKCk7CgogICAgICAgICAgICB2YXIgbXVzaWNJZCA9IE1hdGguY2VpbChNYXRoLnJhbmRvbSgpKjEwMDAwMDAwMCk7CgogICAgICAgICAgICAvL25ldGVhc2Ug6Lev55Sx5Lik5qyh77yM6ZyA6YeN5a6a5LmJCiAgICAgICAgICAgIHZhciBuZXdVcmwgPSBsb2NhdGlvbi5ocmVmOwoKICAgICAgICAgICAgbGV0IGp4TXVzaWNXZWIgPSBqeE11c2ljWzBdLndlYi5maWx0ZXIoZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgcmV0dXJuIG5ld1VybC5tYXRjaChpdGVtLm1hdGNoKTsKCiAgICAgICAgICAgIH0pCgogICAgICAgICAgICBpZihqeE11c2ljV2ViLmxlbmd0aCl7CgogICAgICAgICAgICAgICAgbGV0IHRpbWVyWmhtSWNvbiA9IHNldEludGVydmFsKGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgIGlmIChkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjemhtSWNvbicpKXsKCiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXJaaG1JY29uKTsgLy8g5Y+W5raI5a6a5pe25ZmoCgogICAgICAgICAgICAgICAgICAgICAgICBpZihqeE11c2ljV2ViWzBdLm5hbWU9PSdrdXdvJyl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29udHJvbCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5pY29uLWJhcl9pY29uX2Rvd25sb2FkXycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWNvbiA9IGNvbnRyb2wuY2xvbmVOb2RlKHRydWUpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uLmNsYXNzTmFtZSA9ICcnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uLnN0eWxlPSdtYXJnaW4tbGVmdDoxMHB4Oyc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGljb24uaW5uZXJIVE1MID0gIjxhIHN0eWxlPSdmb250LXNpemU6MTBweDt3aGl0ZS1zcGFjZTogbm93cmFwO2N1cnNvcjpwb2ludGVyO2NvbG9yOiM1NTU7JyBpZD0na3V3b0Rvd25sb2FkJz7kuIvovb08L2E+IjsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnRyb2xzID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmNvbF9yJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2xzLmJlZm9yZShpY29uKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI2t1d29Eb3dubG9hZCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1ZGlvU3JjID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiYXVkaW8iKS5zcmM7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc29uZ05hbWUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcuY29udHJvbCAuc29uZ19uYW1lJykudGl0bGU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXJ0aXN0ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLmNvbnRyb2wgLmFydGlzdCcpLnRpdGxlOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR01fZG93bmxvYWQoYXVkaW9TcmMsc29uZ05hbWUrJy0nK2FydGlzdCsnLm1wMycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sMjAwMCkKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoanhNdXNpY1dlYlswXS5uYW1lPT0neGltYWxheWEnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/mkq3mlL7lmajliJvlu7rkuIvovb1pY29uCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHhtQ29udHJvbHMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcueG0tcGxheWVyLW9wcmF0aW9ucycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29udHJvbCA9IHhtQ29udHJvbHMucXVlcnlTZWxlY3RvcignYTpudGgtb2YtdHlwZSgyKScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWNvbiA9IGNvbnRyb2wuY2xvbmVOb2RlKHRydWUpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpY29uLmlubmVySFRNTCA9ICI8c3BhbiBzdHlsZT0nZm9udC1zaXplOjEwcHg7d2hpdGUtc3BhY2U6IG5vd3JhcDtjdXJzb3I6cG9pbnRlcjtjb2xvcjojRkZGOycgaWQ9J3hpbWFEb3dubG9hZCc+5LiL6L29PC9zcGFuPiI7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHhtQ29udHJvbHMuc3R5bGU9J3Bvc2l0aW9uOiByZWxhdGl2ZTttYXJnaW4tbGVmdDotMjBweDsnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcueG0tcGxheWVyLXByb2dyZXNzJykuc3R5bGUud2lkdGg9JzQ1MHB4JzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignLnhtLXBsYXllci1wbGF5dGltZScpLnN0eWxlPSdwb3NpdGlvbjogYWJzb2x1dGU7cmlnaHQ6NDBweDsnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4bUNvbnRyb2xzLnByZXBlbmQoaWNvbik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/mkq3mlL7lmajkuIvovb3kuovku7YKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjeGltYURvd25sb2FkJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZm1UaXRsZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5mbS10aXRsZScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZtVGl0bGVNYXRjaCA9IGZtVGl0bGUuaHJlZi5tYXRjaCgvXmh0dHBzPzpcL1wvd3d3XC54aW1hbGF5YVwuY29tXC9zb3VuZFwvKFxTKikkLyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gJ2h0dHBzOi8vbW9iaWxlLnhpbWFsYXlhLmNvbS9tb2JpbGUtcGxheXBhZ2UvdHJhY2svdjMvYmFzZUluZm8vJytuZXcgRGF0ZSgpLmdldFRpbWUoKSsnP2RldmljZT13ZWImdHJhY2tJZD0nK2ZtVGl0bGVNYXRjaFsxXTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlNdXNpY0NsYXNzLnJlcXVlc3QoJ2dldCcsdXJsKS50aGVuKChyZXN1bHQpPT57CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBKU09OLnBhcnNlKHJlc3VsdCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBsYXlVcmwgPSBkYXRhLnRyYWNrSW5mby5wbGF5VXJsTGlzdFsxXS51cmw7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHN0cjEgPSBwbGF5VXJsLnJlcGxhY2VBbGwoJy0nLCcrJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHN0cjIgPSBzdHIxLnJlcGxhY2VBbGwoJ18nLCcvJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG51bSA9IHN0cjIubGVuZ3RoJTQ7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobnVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyMiArPSAnPT09PScuc3Vic3RyKG51bSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRlY3J5cHRlZCA9IENyeXB0b0pTLkFFUy5kZWNyeXB0KHsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2lwaGVydGV4dDogQ3J5cHRvSlMuZW5jLkJhc2U2NC5wYXJzZShzdHIyKQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIENyeXB0b0pTLmVuYy5IZXgucGFyc2UoImFhYWQzZTRmZDU0MGIwZjc5ZGNhOTU2MDZlNzJiZjkzIiksIHsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kZTogQ3J5cHRvSlMubW9kZS5FQ0IsCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZGRpbmc6IENyeXB0b0pTLnBhZC5Qa2NzNwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLnRvU3RyaW5nKENyeXB0b0pTLmVuYy5VdGY4KTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhkZWNyeXB0ZWQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRlY3J5cHRlZCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX2Rvd25sb2FkKGRlY3J5cHRlZCxkYXRhLnRyYWNrSW5mby50aXRsZSsnLm1wMycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfop6Plr4blnLDlnYDlpLHotKUnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v6aG16Z2i5YiX6KGo5Yib5bu65om56YeP5LiL6L29CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybE1hdGNoID0gbmV3VXJsLm1hdGNoKC9eaHR0cHM6XC9cL3d3dy54aW1hbGF5YS5jb21cL2FsYnVtXC9bMC05XSsvKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYodXJsTWF0Y2gpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNvdW5kTGlzdCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNhbmNob3Jfc291bmRfbGlzdCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoc291bmRMaXN0KXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc291bmRMaXN0SGVhZCA9IHNvdW5kTGlzdC5xdWVyeVNlbGVjdG9yKCcuaGVhZCcpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzb3VuZExpc3RIZWFkVGl0bGUgPSBzb3VuZExpc3RIZWFkLnF1ZXJ5U2VsZWN0b3IoJy5zb3J0JykubGFzdENoaWxkOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0gW3tuYW1lOifmibnph4/kuIvovb0nLGlkOidiYXRjaERvd25sb2FkJ30se25hbWU6J+mHjee9ricsaWQ6J3Jlc2V0J30se25hbWU6J+WFqOmAiScsaWQ6J3NlbGVjdEFsbCd9XTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb250cm9sID0gc291bmRMaXN0SGVhZFRpdGxlLmNsb25lTm9kZSh0cnVlKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5zZXRBdHRyaWJ1dGUoJ2lkJyxpdGVtLmlkKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5pbm5lclRleHQgPSBpdGVtLm5hbWU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvdW5kTGlzdEhlYWRUaXRsZS5hZnRlcihjb250cm9sKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udHJvbC5iZWZvcmUoIiB8ICIpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlNdXNpY0NsYXNzLnhtbHlDcmVhdGVDaGVja2JveCgpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNzZWxlY3RBbGwnKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHpobUNoZWNrYm94ID0gc291bmRMaXN0LnF1ZXJ5U2VsZWN0b3JBbGwoImlucHV0W25hbWU9J3pobUNoZWNrYm94J10iKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgemhtQ2hlY2tib3guZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFpdGVtLmNoZWNrZWQpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW0uY2hlY2tlZD10cnVlOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3Jlc2V0JykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB6aG1DaGVja2JveCA9IHNvdW5kTGlzdC5xdWVyeVNlbGVjdG9yQWxsKCJpbnB1dFtuYW1lPSd6aG1DaGVja2JveCddIik7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHpobUNoZWNrYm94LmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLmNoZWNrZWQgPSBmYWxzZTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNiYXRjaERvd25sb2FkJykuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vQmFzZUNsYXNzLnRvYXN0KCflt7LkuIvovb3vvIzor7fnqI3lgJknKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHpobUNoZWNrYm94ID0gc291bmRMaXN0LnF1ZXJ5U2VsZWN0b3JBbGwoImlucHV0W25hbWU9J3pobUNoZWNrYm94J10iKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgemhtQ2hlY2tib3guZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0uY2hlY2tlZCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNjck1hdGNoID0gaXRlbS52YWx1ZS5tYXRjaCgvXC9zb3VuZFwvKFswLTldKykvKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gJ2h0dHBzOi8vbW9iaWxlLnhpbWFsYXlhLmNvbS9tb2JpbGUtcGxheXBhZ2UvdHJhY2svdjMvYmFzZUluZm8vJytuZXcgRGF0ZSgpLmdldFRpbWUoKSsnP2RldmljZT13ZWImdHJhY2tJZD0nK3Njck1hdGNoWzFdOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlNdXNpY0NsYXNzLnJlcXVlc3QoJ2dldCcsdXJsKS50aGVuKChyZXN1bHQpPT57CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0gSlNPTi5wYXJzZShyZXN1bHQpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGxheVVybCA9IGRhdGEudHJhY2tJbmZvLnBsYXlVcmxMaXN0WzFdLnVybDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHN0cjEgPSBwbGF5VXJsLnJlcGxhY2VBbGwoJy0nLCcrJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzdHIyID0gc3RyMS5yZXBsYWNlQWxsKCdfJywnLycpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbnVtID0gc3RyMi5sZW5ndGglNDsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYobnVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cjIgKz0gJz09PT0nLnN1YnN0cihudW0pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRlY3J5cHRlZCA9IENyeXB0b0pTLkFFUy5kZWNyeXB0KHsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNpcGhlcnRleHQ6IENyeXB0b0pTLmVuYy5CYXNlNjQucGFyc2Uoc3RyMikKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgQ3J5cHRvSlMuZW5jLkhleC5wYXJzZSgiYWFhZDNlNGZkNTQwYjBmNzlkY2E5NTYwNmU3MmJmOTMiKSwgewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kZTogQ3J5cHRvSlMubW9kZS5FQ0IsCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWRkaW5nOiBDcnlwdG9KUy5wYWQuUGtjczcKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkudG9TdHJpbmcoQ3J5cHRvSlMuZW5jLlV0ZjgpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nKGRlY3J5cHRlZCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRlY3J5cHRlZCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHTV9kb3dubG9hZChkZWNyeXB0ZWQsZGF0YS50cmFja0luZm8udGl0bGUrJy5tcDMnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCfop6Plr4blnLDlnYDlpLHotKUnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v5q2j5bqP5YCS5bqP5LqL5Lu2CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291bmRMaXN0SGVhZC5xdWVyeVNlbGVjdG9yKCcuc29ydCcpLmZpcnN0Q2hpbGQuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBsYXlNdXNpY0NsYXNzLnhtbHlDcmVhdGVDaGVja2JveCgpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LDIwMDApCgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc291bmRMaXN0SGVhZFRpdGxlLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5TXVzaWNDbGFzcy54bWx5Q3JlYXRlQ2hlY2tib3goKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwyMDAwKQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v57+76aG15LqL5Lu2CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhZ2VCYXIgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcucGFnaW5hdGlvbi1wYWdlJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZUJhci5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheU11c2ljQ2xhc3MueG1seUNyZWF0ZUNoZWNrYm94KCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sMjAwMCkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/ot7PpobXkuovku7YKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJ2J1dHRvblt0eXBlPXN1Ym1pdF0nKS5hZGRFdmVudExpc3RlbmVyKCdjbGljaycsZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheU11c2ljQ2xhc3MueG1seUNyZWF0ZUNoZWNrYm94KCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sMTAwMCkKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKCd1cmzlnLDlnYDplJnor68nKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwxMDAwKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+WFqOWxgOeCueWHu+S6i+S7tgogICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLGZ1bmN0aW9uKGUpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgb2JqTGluayA9IHt9OwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlLnBhdGguZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0uaHJlZil7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqTGluay5ocmVmID0gaXRlbS5ocmVmP2l0ZW0uaHJlZjonJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvYmpMaW5rLnRhcmdldCA9IGl0ZW0udGFyZ2V0P2l0ZW0udGFyZ2V0OicnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihvYmpMaW5rLmhyZWYgJiYgb2JqTGluay50YXJnZXQgIT0gJ19ibGFuaycpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZiA9IG9iakxpbmsuaHJlZjsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgaWYoanhNdXNpY1dlYlswXS5uYW1lPT0na3Vnb3UnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYURvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJ2EnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhRG9tLmZvckVhY2goZnVuY3Rpb24oaXRlbSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhT2JqID0gaXRlbS5nZXRBdHRyaWJ1dGUoJ2RhdGFvYmonKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZGF0YU9iail7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtLnJlbW92ZUF0dHJpYnV0ZSgnZGF0YW9iaicpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5zZXRBdHRyaWJ1dGUoJ3RhcmdldCcsJ19ibGFuaycpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nKGRhdGFPYmopOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNvdXBvblVybC5pbmRleE9mKCdtaXhzb25nJykhPS0xIHx8IGNvdXBvblVybC5pbmRleE9mKCdzb25nJykgIT0gLTEgfHwgY291cG9uVXJsLmluZGV4T2YoJ3NoYXJlJykgIT0gLTEpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdm9sdW1lRG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3ZvbHVtZScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRvd25sb2FkRG9tID0gdm9sdW1lRG9tLmNsb25lTm9kZSh0cnVlKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvd25sb2FkRG9tLnJlbW92ZUF0dHJpYnV0ZSgnaWQnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvd25sb2FkRG9tLnN0eWxlPSdtYXJnaW4tdG9wOjMwcHgnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG93bmxvYWREb20uaW5uZXJIVE1MID0gIjxhIHN0eWxlPSdjb2xvcjojZmZmO2ZvbnQtc2l6ZToxMHB4O3doaXRlLXNwYWNlOm5vd3JhcDtjdXJzb3I6cG9pbnRlcjsnIGlkPSdrdWdvdURvd25sb2FkJyBqYXZhc2NyaXB0OnZvaWQoMCk7PuS4i+i9vTwvYT4iOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdm9sdW1lRG9tLmJlZm9yZShkb3dubG9hZERvbSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2b2x1bWVEb20uc3R5bGU9J2xlZnQ6NTBweDsnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI21vZGUnKS5zdHlsZT0nbWFyZ2luLWxlZnQ6OTBweDsnOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3BiX2Rvd25sb2FkJykuc3R5bGU9J21hcmdpbi1sZWZ0OjEzMHB4Oyc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcjcGJfc2hhcmUnKS5zdHlsZT0nbWFyZ2luLWxlZnQ6MTcwcHg7JzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNsaXN0Jykuc3R5bGU9J3JpZ2h0Oi0yMHB4Oyc7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcja3Vnb3VEb3dubG9hZCcpLmFkZEV2ZW50TGlzdGVuZXIoJ2NsaWNrJyxmdW5jdGlvbigpewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdWRpbyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyNteUF1ZGlvJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF1ZGlvU3JjID0gYXVkaW8uZ2V0QXR0cmlidXRlKCdzcmMnKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc2luZ2VyTmFtZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJy5zaW5nZXJOYW1lJykudGl0bGU7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHNvbmdOYW1lID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3NvbmdOYW1lVGVtcCcpLnRpdGxlOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdNX2Rvd25sb2FkKGF1ZGlvU3JjLHNvbmdOYW1lKyctJytzaW5nZXJOYW1lLnN1YnN0cigwLHNpbmdlck5hbWUubGVuZ3RoLTEpKycubXAzJyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LDEwMDApCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhjb3Vwb25VcmwpOwogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgICAgICBpZihqeE11c2ljV2ViWzBdLm5hbWU9PSduZXRlYXNlJyAmJiBsb2NhdGlvbi5ocmVmID09ICdodHRwczovL211c2ljLjE2My5jb20vc3QvZG93bmxvYWQnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB6aG1QbGF5ID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3pobUljb24nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbGF5TXVzaWNDbGFzcy56aG1Mb2dvKCk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgcGxheU11c2ljQ2xhc3MuemhtTG9nb0RyYWcoJ211c2ljJyxqeE11c2ljV2ViKTsKCiAgICAgICAgICAgICAgICAgICAgICAgIH0saWNvbldhaXRUaW1lKTsKCiAgICAgICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgICAgICBwbGF5TXVzaWNDbGFzcy5jcmVhdGVFbGVtZW50KCdkaXYnLCd6aG1JY29uJyk7CiAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgfWVsc2V7CgogICAgICAgICAgICAgICAgICAgIGxldCB6aG1QbGF5RG9tID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3pobUljb24nKTsKCiAgICAgICAgICAgICAgICAgICAgaWYoemhtUGxheURvbSl7CgogICAgICAgICAgICAgICAgICAgICAgICB6aG1QbGF5RG9tLnBhcmVudE5vZGUucmVtb3ZlQ2hpbGQoemhtUGxheURvbSk7CgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ+W9k+WJjemfs+mikee9keWdgOayoeaciea3u+WKoOWMuemFjeaIluWMuemFjemUmeivrycpOwoKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgfQoKICAgICAgICBmdW5jdGlvbiB6aE5pY2VGdW5jKCl7CgogICAgICAgICAgICB2YXIgemhDbGFzcyA9IG5ldyBaaENsYXNzKCk7CgogICAgICAgICAgICAvL+WFs+mXreeZu+W9leW8ueahhgogICAgICAgICAgICAoYXN5bmMgZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICBsZXQgbG9naW5Nb2RhbFdyYXBwZXIgPSBhd2FpdCBCYXNlQ2xhc3MuZ2V0RWxlbWVudCgiLk1vZGFsLXdyYXBwZXIiKTsKCiAgICAgICAgICAgICAgICBpZihsb2dpbk1vZGFsV3JhcHBlcil7CgogICAgICAgICAgICAgICAgICAgIGxldCBjbG9zZUJ1dHRvbiA9IGxvZ2luTW9kYWxXcmFwcGVyLnF1ZXJ5U2VsZWN0b3IoJy5Nb2RhbC1jbG9zZUJ1dHRvbicpOwoKICAgICAgICAgICAgICAgICAgICBpZihjbG9zZUJ1dHRvbil7CgogICAgICAgICAgICAgICAgICAgICAgICBjbG9zZUJ1dHRvbi5jbGljaygpOwoKICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgfSkoKQoKICAgICAgICAgICAgdmFyIHpoRGF0YSA9IFsKICAgICAgICAgICAgICAgIHtmdW5jOidyZW1vdmVWaWRlbycsaXNPcGVuOkdNX2dldFZhbHVlKCdyZW1vdmVWaWRlbycsJzAnKSxpc09uc2Nyb2xsOjEsb25sb2FkOjF9LAogICAgICAgICAgICAgICAge2Z1bmM6J3JlbW92ZUFEJyxpc09wZW46R01fZ2V0VmFsdWUoJ3JlbW92ZUFEJywnMjInKSxpc09uc2Nyb2xsOjAsb25sb2FkOjB9LAogICAgICAgICAgICAgICAge2Z1bmM6J2Rvd25sb2FkVmlkZW8nLGlzT3BlbjpHTV9nZXRWYWx1ZSgnZG93bmxvYWRWaWRlbycsJzIyJyksaXNPbnNjcm9sbDowLG9ubG9hZDowfSwKICAgICAgICAgICAgICAgIHtmdW5jOidyZW1vdmVSaWdodCcsaXNPcGVuOkdNX2dldFZhbHVlKCdyZW1vdmV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gICAgfSkKCiAgICAgICAgICAgIHdpbmRvdy5vbmxvYWQ9ZnVuY3Rpb24oKXsKICAgICAgICAgICAgICAgIHpoRGF0YS5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewogICAgICAgICAgICAgICAgICAgIGlmKGl0ZW0uaXNPcGVuPT0yMiAmJiBpdGVtLm9ubG9hZD09MSl7CiAgICAgICAgICAgICAgICAgICAgICAgIHpoQ2xhc3NbaXRlbS5mdW5jXSgpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgIH0KICAgICAgICAgICAgd2luZG93Lm9uc2Nyb2xsID0gZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICB2YXIgc2Nyb2xsVG9wID0gZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LnNjcm9sbFRvcDsKCiAgICAgICAgICAgICAgICBpZihzY3JvbGxUb3AgPiAyMDApewoKICAgICAgICAgICAgICAgICAgICB6aERhdGEuZm9yRWFjaChmdW5jdGlvbihpdGVtKXsKICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXRlbS5pc09wZW49PTIyICYmIGl0ZW0uaXNPbnNjcm9sbD09MSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgemhDbGFzc1tpdGVtLmZ1bmNdKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgIH0KCiAgICAgICAgfQoKICAgICAgICBmdW5jdGlvbiB0YW9iYW9TZWFyY2hGdW5jKGl0ZW0pewoKICAgICAgICAgICAgbGV0IHRpbWVyID0gc2V0SW50ZXJ2YWwoZnVuY3Rpb24oKXsKCiAgICAgICAgICAgICAgICBsZXQgdGFvYmFvSWNvbkRvbSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJyN0YW9iYW9JY29uU2VsZWN0Jyk7CgogICAgICAgICAgICAgICAgbGV0IGJhc2VDbGFzcyA9IG5ldyBCYXNlQ2xhc3MoKTsKCiAgICAgICAgICAgICAgICBsZXQgZmlsdGVyVG1hbGwgPSBiYXNlQ2xhc3MuZ2V0UXVlcnlTdHJpbmcoJ2ZpbHRlcl90aWFubWFvJyk7CgogICAgICAgICAgICAgICAgaWYoIXRhb2Jhb0ljb25Eb20pewoKICAgICAgICAgICAgICAgICAgICBsZXQgZmlsdGVycyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5maWx0ZXJzID5hJyk7CgogICAgICAgICAgICAgICAgICAgIGlmKGZpbHRlcnMubGVuZ3RoPjApewoKICAgICAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBpPTA7aTxmaWx0ZXJzLmxlbmd0aDtpKyspewoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkYXRhVmFsdWUgPSBmaWx0ZXJzW2ldLmdldEF0dHJpYnV0ZSgnZGF0YS12YWx1ZScpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRhdGFWYWx1ZSA9PSAndG1hbGwnKXsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9jb25zb2xlLmxvZyhkYXRhVmFsdWUpOwoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGFvYmFvRG9tID0gZmlsdGVyc1tpXS5jbG9uZU5vZGUodHJ1ZSk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhb2Jhb0RvbS5xdWVyeVNlbGVjdG9yKCcudGV4dCcpLmlubmVyVGV4dD0n5reY5a6dJzsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFvYmFvRG9tLnNldEF0dHJpYnV0ZSgnaWQnLCd0YW9iYW9JY29uU2VsZWN0Jyk7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhb2Jhb0RvbS5zZXRBdHRyaWJ1dGUoJ2RhdGEtdmFsdWUnLCd0YW9iYW8nKTsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZmlsdGVyVG1hbGw9PSd0YW9iYW8nKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFvYmFvRG9tLnNldEF0dHJpYnV0ZSgnZGF0YS1hY3Rpb24nLCdyZW1vdmUnKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFvYmFvRG9tLmNsYXNzTmFtZT0nZmlsdGVyIGljb24tdGFnIEpfQWpheCBpY29uLWhvdmVyJzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFvYmFvRG9tLnJlbW92ZUF0dHJpYnV0ZSgnZGF0YS1hY3Rpb24nKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFvYmFvRG9tLmNsYXNzTmFtZT0nZmlsdGVyIGljb24tdGFnIEpfQWpheCc7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJzW2ldLmJlZm9yZSh0YW9iYW9Eb20pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICB9ZWxzZXsKCiAgICAgICAgICAgICAgICAgICAgaWYoZmlsdGVyVG1hbGw9PSd0YW9iYW8nKXsKICAgICAgICAgICAgICAgICAgICAgICAgdGFvYmFvSWNvbkRvbS5zZXRBdHRyaWJ1dGUoJ2RhdGEtYWN0aW9uJywncmVtb3ZlJyk7CiAgICAgICAgICAgICAgICAgICAgICAgIHRhb2Jhb0ljb25Eb20uY2xhc3NOYW1lPSdmaWx0ZXIgaWNvbi10YWcgSl9BamF4IGljb24taG92ZXInOwogICAgICAgICAgICAgICAgICAgIH1lbHNlewogICAgICAgICAgICAgICAgICAgICAgICB0YW9iYW9JY29uRG9tLnJlbW92ZUF0dHJpYnV0ZSgnZGF0YS1hY3Rpb24nKTsKICAgICAgICAgICAgICAgICAgICAgICAgdGFvYmFvSWNvbkRvbS5jbGFzc05hbWU9J2ZpbHRlciBpY29uLXRhZyBKX0FqYXgnOwogICAgICAgICAgICAgICAgICAgIH0KCgogICAgICAgICAgICAgICAgfQoKCgogICAgICAgICAgICAgICAgaWYoZmlsdGVyVG1hbGw9PSd0YW9iYW8nKXsKCiAgICAgICAgICAgICAgICAgICAgbGV0IGdvb2RzTGlzdCA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJy5pdGVtcyA+IC5pdGVtJyk7CgogICAgICAgICAgICAgICAgICAgIGdvb2RzTGlzdC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0pewoKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGljb25MaUNsYXNzID0gaXRlbS5xdWVyeVNlbGVjdG9yKCcuaWNvbnM+bGk+YT5zcGFuJyk7CgogICAgICAgICAgICAgICAgICAgICAgICBsZXQgY2xhc3NOYW1lVG09WydpY29uLXNlcnZpY2UtdGlhbm1hbycsJ2ljb24tc2VydmljZS10aWFubWFvZ3VvamknXTsKCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGljb25MaUNsYXNzICYmIGNsYXNzTmFtZVRtLmluZGV4T2YoaWNvbkxpQ2xhc3MuY2xhc3NOYW1lKSAhPSAtMSl7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbS5zdHlsZT0nZGlzcGxheTpub25lOyc7CgogICAgICAgICAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgICAgIH0pCgogICAgICAgICAgICAgICAgICAgIC8vY2xlYXJJbnRlcnZhbCh0aW1lcik7CgogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgfSw1MDApCgogICAgICAgIH0KCiAgICAgICAgZnVuY3Rpb24gYmFpZHVGdW5jKCl7CiAgICAgICAgbGV0IHB0ID0gJycsIHNlbGVjdExpc3QgPSBbXSwgcGFyYW1zID0ge30sIG1vZGUgPSAnJywgd2lkdGggPSA4MDAsIHBhbiA9IHt9LCBjb2xvciA9ICcnLAogICAgICAgIGRvYyA9ICQoZG9jdW1lbnQpLCBwcm9ncmVzcyA9IHt9LCByZXF1ZXN0ID0ge30sIGlucyA9IHt9LCBpZG0gPSB7fTsKICAgICAgICBjb25zdCB2ZXJzaW9uID0gJzYuMC4yJzsKICAgICAgICBjb25zdCBhdXRob3IgPSAnR3JlYXN5Rm9yayc7CiAgICAgICAgY29uc3QgbmFtZSA9ICfnvZHnm5jnm7Tpk77kuIvovb3liqnmiYsnOwogICAgICAgIGNvbnN0IGN1c3RvbUNsYXNzID0gewogICAgICAgIHBvcHVwOiAncGwtcG9wdXAnLAogICAgICAgIGhlYWRlcjogJ3BsLWhlYWRlcicsCiAgICAgICAgdGl0bGU6ICdwbC10aXRsZScsCiAgICAgICAgY2xvc2VCdXR0b246ICdwbC1jbG9zZScsCiAgICAgICAgY29udGVudDogJ3BsLWNvbnRlbnQnLAogICAgICAgIGlucHV0OiAncGwtaW5wdXQnLAogICAgICAgIGZvb3RlcjogJ3BsLWZvb3RlcicKICAgIH07CgogICAgY29uc3QgdGVybWluYWxUeXBlID0gewogICAgICAgIHdjOiAiV2luZG93cyBDTUQiLAogICAgICAgIHdwOiAiV2luZG93cyBQb3dlclNoZWxsIiwKICAgICAgICBsdDogIkxpbnV4IOe7iOerryIsCiAgICAgICAgbHM6ICJMaW51eCBTaGVsbCIsCiAgICAgICAgbXQ6ICJNYWNPUyDnu4jnq68iLAogICAgfTsKCiAgICBsZXQgdG9hc3QgPSBTd2FsLm1peGluKHsKICAgICAgICB0b2FzdDogdHJ1ZSwKICAgICAgICBwb3NpdGlvbjogJ3RvcCcsCiAgICAgICAgc2hvd0NvbmZpcm1CdXR0b246IGZhbHNlLAogICAgICAgIHRpbWVyOiAzNTAwLAogICAgICAgIHRpbWVyUHJvZ3Jlc3NCYXI6IGZhbHNlLAogICAgICAgIGRpZE9wZW46ICh0b2FzdCkgPT4gewogICAgICAgICAgICB0b2FzdC5hZGRFdmVudExpc3RlbmVyKCdtb3VzZWVudGVyJywgU3dhbC5zdG9wVGltZXIpOwogICAgICAgICAgICB0b2FzdC5hZGRFdmVudExpc3RlbmVyKCdtb3VzZWxlYXZlJywgU3dhbC5yZXN1bWVUaW1lcik7CiAgICAgICAgfQogICAgfSk7CgogICAgY29uc3QgbWVzc2FnZSA9IHsKICAgICAgICBzdWNjZXNzOiAodGV4dCkgPT4gewogICAgICAgICAgICB0b2FzdC5maXJlKHt0aXRsZTogdGV4dCwgaWNvbjogJ3N1Y2Nlc3MnfSk7CiAgICAgICAgfSwKICAgICAgICBlcnJvcjogKHRleHQpID0+IHsKICAgICAgICAgICAgdG9hc3QuZmlyZSh7dGl0bGU6IHRleHQsIGljb246ICdlcnJvcid9KTsKICAgICAgICB9LAogICAgICAgIHdhcm5pbmc6ICh0ZXh0KSA9PiB7CiAgICAgICAgICAgIHRvYXN0LmZpcmUoe3RpdGxlOiB0ZXh0LCBpY29uOiAnd2FybmluZyd9KTsKICAgICAgICB9LAogICAgICAgIGluZm86ICh0ZXh0KSA9PiB7CiAgICAgICAgICAgIHRvYXN0LmZpcmUoe3RpdGxlOiB0ZXh0LCBpY29uOiAnaW5mbyd9KTsKICAgICAgICB9LAogICAgICAgIHF1ZXN0aW9uOiAodGV4dCkgPT4gewogICAgICAgICAgICB0b2FzdC5maXJlKHt0aXRsZTogdGV4dCwgaWNvbjogJ3F1ZXN0aW9uJ30pOwogICAgICAgIH0KICAgIH07CgogICAgbGV0IGJhc2UgPSB7CgogICAgICAgIGdldENvb2tpZShuYW1lKSB7CiAgICAgICAgICAgIGxldCBhcnIgPSBkb2N1bWVudC5jb29raWUucmVwbGFjZSgvXHMvZywgIiIpLnNwbGl0KCc7Jyk7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwLCBsID0gYXJyLmxlbmd0aDsgaSA8IGw7IGkrKykgewogICAgICAgICAgICAgICAgbGV0IHRlbXBBcnIgPSBhcnJbaV0uc3BsaXQoJz0nKTsKICAgICAgICAgICAgICAgIGlmICh0ZW1wQXJyWzBdID09PSBuYW1lKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRlY29kZVVSSUNvbXBvbmVudCh0ZW1wQXJyWzFdKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gJyc7CiAgICAgICAgfSwKCiAgICAgICAgaXNUeXBlKG9iaikgewogICAgICAgICAgICByZXR1cm4gT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZy5jYWxsKG9iaikucmVwbGFjZSgvXlxbb2JqZWN0ICguKylcXSQvLCAnJDEnKS50b0xvd2VyQ2FzZSgpOwogICAgICAgIH0sCgogICAgICAgIGdldFZhbHVlKG5hbWUpIHsKICAgICAgICAgICAgcmV0dXJuIEdNX2dldFZhbHVlKG5hbWUpOwogICAgICAgIH0sCgogICAgICAgIHNldFZhbHVlKG5hbWUsIHZhbHVlKSB7CiAgICAgICAgICAgIEdNX3NldFZhbHVlKG5hbWUsIHZhbHVlKTsKICAgICAgICB9LAoKICAgICAgICBnZXRTdG9yYWdlKGtleSkgewogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgcmV0dXJuIEpTT04ucGFyc2UobG9jYWxTdG9yYWdlLmdldEl0ZW0oa2V5KSk7CiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgIHJldHVybiBsb2NhbFN0b3JhZ2UuZ2V0SXRlbShrZXkpOwogICAgICAgICAgICB9CiAgICAgICAgfSwKCiAgICAgICAgc2V0U3RvcmFnZShrZXksIHZhbHVlKSB7CiAgICAgICAgICAgIGlmICh0aGlzLmlzVHlwZSh2YWx1ZSkgPT09ICdvYmplY3QnIHx8IHRoaXMuaXNUeXBlKHZhbHVlKSA9PT0gJ2FycmF5JykgewogICAgICAgICAgICAgICAgcmV0dXJuIGxvY2FsU3RvcmFnZS5zZXRJdGVtKGtleSwgSlNPTi5zdHJpbmdpZnkodmFsdWUpKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gbG9jYWxTdG9yYWdlLnNldEl0ZW0oa2V5LCB2YWx1ZSk7CiAgICAgICAgfSwKCiAgICAgICAgc2V0Q2xpcGJvYXJkKHRleHQpIHsKICAgICAgICAgICAgR01fc2V0Q2xpcGJvYXJkKHRleHQsICd0ZXh0Jyk7CiAgICAgICAgfSwKCiAgICAgICAgZShzdHIpIHsKICAgICAgICAgICAgcmV0dXJuIGJ0b2EodW5lc2NhcGUoZW5jb2RlVVJJQ29tcG9uZW50KHN0cikpKTsKICAgICAgICB9LAoKICAgICAgICBkKHN0cikgewogICAgICAgICAgICByZXR1cm4gZGVjb2RlVVJJQ29tcG9uZW50KGVzY2FwZShhdG9iKHN0cikpKTsKICAgICAgICB9LAoKICAgICAgICBnZXRFeHRlbnNpb24obmFtZSkgewogICAgICAgICAgICBjb25zdCByZWcgPSAvKD8hXC4pXHcrJC87CiAgICAgICAgICAgIGlmIChyZWcudGVzdChuYW1lKSkgewogICAgICAgICAgICAgICAgbGV0IG1hdGNoID0gbmFtZS5tYXRjaChyZWcpOwogICAgICAgICAgICAgICAgcmV0dXJuIG1hdGNoWzBdLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgIH0sCgogICAgICAgIHNpemVGb3JtYXQodmFsdWUpIHsKICAgICAgICAgICAgaWYgKHZhbHVlID09PSArdmFsdWUpIHsKICAgICAgICAgICAgICAgIGxldCB1bml0ID0gWyJCIiwgIktCIiwgIk1CIiwgIkdCIiwgIlRCIiwgIlBCIiwgIkVCIiwgIlpCIiwgIllCIl07CiAgICAgICAgICAgICAgICBsZXQgaW5kZXggPSBNYXRoLmZsb29yKE1hdGgubG9nKHZhbHVlKSAvIE1hdGgubG9nKDEwMjQpKTsKICAgICAgICAgICAgICAgIGxldCBzaXplID0gdmFsdWUgLyBNYXRoLnBvdygxMDI0LCBpbmRleCk7CiAgICAgICAgICAgICAgICBzaXplID0gc2l6ZS50b0ZpeGVkKDEpOwogICAgICAgICAgICAgICAgcmV0dXJuIHNpemUgKyB1bml0W2luZGV4XTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gJyc7CiAgICAgICAgfSwKCiAgICAgICAgc29ydEJ5TmFtZShhcnIpIHsKICAgICAgICAgICAgY29uc3QgaGFuZGxlID0gKCkgPT4gewogICAgICAgICAgICAgICAgcmV0dXJuIChhLCBiKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgcDEgPSBhLmZpbGVuYW1lID8gYS5maWxlbmFtZSA6IGEuc2VydmVyX2ZpbGVuYW1lOwogICAgICAgICAgICAgICAgICAgIGNvbnN0IHAyID0gYi5maWxlbmFtZSA/IGIuZmlsZW5hbWUgOiBiLnNlcnZlcl9maWxlbmFtZTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gcDEubG9jYWxlQ29tcGFyZShwMiwgInpoLUNOIik7CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICB9OwogICAgICAgICAgICBhcnIuc29ydChoYW5kbGUoKSk7CiAgICAgICAgfSwKCiAgICAgICAgYmxvYkRvd25sb2FkKGJsb2IsIGZpbGVuYW1lKSB7CiAgICAgICAgICAgIGlmIChibG9iIGluc3RhbmNlb2YgQmxvYikgewogICAgICAgICAgICAgICAgY29uc3QgdXJsID0gVVJMLmNyZWF0ZU9iamVjdFVSTChibG9iKTsKICAgICAgICAgICAgICAgIGNvbnN0IGEgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdhJyk7CiAgICAgICAgICAgICAgICBhLmhyZWYgPSB1cmw7CiAgICAgICAgICAgICAgICBhLmRvd25sb2FkID0gZmlsZW5hbWU7CiAgICAgICAgICAgICAgICBhLmNsaWNrKCk7CiAgICAgICAgICAgICAgICBVUkwucmV2b2tlT2JqZWN0VVJMKHVybCk7CiAgICAgICAgICAgIH0KICAgICAgICB9LAoKICAgICAgICBwb3N0KHVybCwgZGF0YSwgaGVhZGVycywgdHlwZSkgewogICAgICAgICAgICBpZiAodGhpcy5pc1R5cGUoZGF0YSkgPT09ICdvYmplY3QnKSB7CiAgICAgICAgICAgICAgICBkYXRhID0gSlNPTi5zdHJpbmdpZnkoZGF0YSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG5ldyBQcm9taXNlKChyZXNvbHZlLCByZWplY3QpID0+IHsKICAgICAgICAgICAgICAgIEdNX3htbGh0dHBSZXF1ZXN0KHsKICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICJQT1NUIiwgdXJsLCBoZWFkZXJzLCBkYXRhLAogICAgICAgICAgICAgICAgICAgIHJlc3BvbnNlVHlwZTogdHlwZSB8fCAnanNvbicsCiAgICAgICAgICAgICAgICAgICAgb25sb2FkOiAocmVzKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgPT09ICdibG9iJyA/IHJlc29sdmUocmVzKSA6IHJlc29sdmUocmVzLnJlc3BvbnNlIHx8IHJlcy5yZXNwb25zZVRleHQpOwogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgICAgb25lcnJvcjogKGVycikgPT4gewogICAgICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyKTsKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0sCgogICAgICAgIGdldCh1cmwsIGhlYWRlcnMsIHR5cGUsIGV4dHJhKSB7CiAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7CiAgICAgICAgICAgICAgICBsZXQgcmVxdWVzdE9iaiA9IEdNX3htbGh0dHBSZXF1ZXN0KHsKICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICJHRVQiLCB1cmwsIGhlYWRlcnMsCiAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2VUeXBlOiB0eXBlIHx8ICdqc29uJywKICAgICAgICAgICAgICAgICAgICBvbmxvYWQ6IChyZXMpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlcy5zdGF0dXMgPT09IDIwNCkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWVzdE9iai5hYm9ydCgpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWRtW2V4dHJhLmluZGV4XSA9IHRydWU7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGUgPT09ICdibG9iJykgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzLnN0YXR1cyA9PT0gMjAwICYmIGJhc2UuYmxvYkRvd25sb2FkKHJlcy5yZXNwb25zZSwgZXh0cmEuZmlsZW5hbWUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShyZXMpOwogICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZShyZXMucmVzcG9uc2UgfHwgcmVzLnJlc3BvbnNlVGV4dCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIG9ucHJvZ3Jlc3M6IChyZXMpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGV4dHJhICYmIGV4dHJhLmZpbGVuYW1lICYmIGV4dHJhLmluZGV4KSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXMudG90YWwgPiAwID8gcHJvZ3Jlc3NbZXh0cmEuaW5kZXhdID0gKHJlcy5sb2FkZWQgKiAxMDAgLyByZXMudG90YWwpLnRvRml4ZWQoMikgOiBwcm9ncmVzc1tleHRyYS5pbmRleF0gPSAwLjAwOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICBvbmxvYWRzdGFydCgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEgJiYgZXh0cmEuZmlsZW5hbWUgJiYgZXh0cmEuaW5kZXggJiYgKHJlcXVlc3RbZXh0cmEuaW5kZXhdID0gcmVxdWVzdE9iaik7CiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICBvbmVycm9yOiAoZXJyKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnIpOwogICAgICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSk7CiAgICAgICAgfSwKCiAgICAgICAgZ2V0RmluYWxVcmwodXJsLCBoZWFkZXJzKSB7CiAgICAgICAgICAgIHJldHVybiBuZXcgUHJvbWlzZSgocmVzb2x2ZSwgcmVqZWN0KSA9PiB7CiAgICAgICAgICAgICAgICBsZXQgcmVxdWVzdE9iaiA9IEdNX3htbGh0dHBSZXF1ZXN0KHsKICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICJHRVQiLCB1cmwsIGhlYWRlcnMsCiAgICAgICAgICAgICAgICAgICAgb25sb2FkOiAocmVzKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlc29sdmUocmVzLmZpbmFsVXJsKTsKICAgICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgICAgIG9uZXJyb3I6IChlcnIpID0+IHsKICAgICAgICAgICAgICAgICAgICAgICAgcmVqZWN0KGVycik7CiAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9KTsKICAgICAgICB9LAoKICAgICAgICBhZGRTdHlsZShpZCwgdGFnLCBjc3MpIHsKICAgICAgICAgICAgdGFnID0gdGFnIHx8ICdzdHlsZSc7CiAgICAgICAgICAgIGxldCBkb2MgPSBkb2N1bWVudCwgc3R5bGVEb20gPSBkb2MuZ2V0RWxlbWVudEJ5SWQoaWQpOwogICAgICAgICAgICBpZiAoc3R5bGVEb20pIHJldHVybjsKICAgICAgICAgICAgbGV0IHN0eWxlID0gZG9jLmNyZWF0ZUVsZW1lbnQodGFnKTsKICAgICAgICAgICAgc3R5bGUucmVsID0gJ3N0eWxlc2hlZXQnOwogICAgICAgICAgICBzdHlsZS5pZCA9IGlkOwogICAgICAgICAgICB0YWcgPT09ICdzdHlsZScgPyBzdHlsZS5pbm5lckhUTUwgPSBjc3MgOiBzdHlsZS5ocmVmID0gY3NzOwogICAgICAgICAgICBkb2MuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ2hlYWQnKVswXS5hcHBlbmRDaGlsZChzdHlsZSk7CiAgICAgICAgfSwKCiAgICAgICAgZmluZFJlYWN0KGRvbSwgdHJhdmVyc2VVcCA9IDApIHsKICAgICAgICAgICAgY29uc3Qga2V5ID0gT2JqZWN0LmtleXMoZG9tKS5maW5kKGtleSA9PiB7CiAgICAgICAgICAgICAgICByZXR1cm4ga2V5LnN0YXJ0c1dpdGgoIl9fcmVhY3RGaWJlciQiKQogICAgICAgICAgICAgICAgICAgIHx8IGtleS5zdGFydHNXaXRoKCJfX3JlYWN0SW50ZXJuYWxJbnN0YW5jZSQiKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGNvbnN0IGRvbUZpYmVyID0gZG9tW2tleV07CiAgICAgICAgICAgIGlmIChkb21GaWJlciA9PSBudWxsKSByZXR1cm4gbnVsbDsKCiAgICAgICAgICAgIGlmIChkb21GaWJlci5fY3VycmVudEVsZW1lbnQpIHsKICAgICAgICAgICAgICAgIGxldCBjb21wRmliZXIgPSBkb21GaWJlci5fY3VycmVudEVsZW1lbnQuX293bmVyOwogICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0cmF2ZXJzZVVwOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICBjb21wRmliZXIgPSBjb21wRmliZXIuX2N1cnJlbnRFbGVtZW50Ll9vd25lcjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBjb21wRmliZXIuX2luc3RhbmNlOwogICAgICAgICAgICB9CgogICAgICAgICAgICBjb25zdCBHZXRDb21wRmliZXIgPSBmaWJlciA9PiB7CiAgICAgICAgICAgICAgICBsZXQgcGFyZW50RmliZXIgPSBmaWJlci5yZXR1cm47CiAgICAgICAgICAgICAgICB3aGlsZSAodHlwZW9mIHBhcmVudEZpYmVyLnR5cGUgPT0gInN0cmluZyIpIHsKICAgICAgICAgICAgICAgICAgICBwYXJlbnRGaWJlciA9IHBhcmVudEZpYmVyLnJldHVybjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHJldHVybiBwYXJlbnRGaWJlcjsKICAgICAgICAgICAgfTsKICAgICAgICAgICAgbGV0IGNvbXBGaWJlciA9IEdldENvbXBGaWJlcihkb21GaWJlcik7CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdHJhdmVyc2VVcDsgaSsrKSB7CiAgICAgICAgICAgICAgICBjb21wRmliZXIgPSBHZXRDb21wRmliZXIoY29tcEZpYmVyKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gY29tcEZpYmVyLnN0YXRlTm9kZSB8fCBjb21wRmliZXI7CiAgICAgICAgfSwKCiAgICAgICAgaW5pdERlZmF1bHRDb25maWcoKSB7CiAgICAgICAgICAgIGxldCB2YWx1ZSA9IFt7CiAgICAgICAgICAgICAgICBuYW1lOiAnc2V0dGluZ19ycGNfZG9tYWluJywKICAgICAgICAgICAgICAgIHZhbHVlOiAnaHR0cDovL2xvY2FsaG9zdCcKICAgICAgICAgICAgfSwgewogICAgICAgICAgICAgICAgbmFtZTogJ3NldHRpbmdfcnBjX3BvcnQnLAogICAgICAgICAgICAgICAgdmFsdWU6ICcxNjgwMCcKICAgICAgICAgICAgfSwgewogICAgICAgICAgICAgICAgbmFtZTogJ3NldHRpbmdfcnBjX3BhdGgnLAogICAgICAgICAgICAgICAgdmFsdWU6ICcvanNvbnJwYycKICAgICAgICAgICAgfSwgewogICAgICAgICAgICAgICAgbmFtZTogJ3NldHRpbmdfcnBjX3Rva2VuJywKICAgICAgICAgICAgICAgIHZhbHVlOiAnJwogICAgICAgICAgICB9LCB7CiAgICAgICAgICAgICAgICBuYW1lOiAnc2V0dGluZ19ycGNfZGlyJywKICAgICAgICAgICAgICAgIHZhbHVlOiAnRDonCiAgICAgICAgICAgIH0sIHsKICAgICAgICAgICAgICAgIG5hbWU6ICdzZXR0aW5nX3Rlcm1pbmFsX3R5cGUnLAogICAgICAgICAgICAgICAgdmFsdWU6ICd3YycKICAgICAgICAgICAgfSwgewogICAgICAgICAgICAgICAgbmFtZTogJ3NldHRpbmdfdGhlbWVfY29sb3InLAogICAgICAgICAgICAgICAgdmFsdWU6ICcjMDlBQUZGJwogICAgICAgICAgICB9LCB7CiAgICAgICAgICAgICAgICBuYW1lOiAnc2V0dGluZ19pbml0X2NvZGUnLAogICAgICAgICAgICAgICAgdmFsdWU6ICcnCiAgICAgICAgICAgIH1dOwoKICAgICAgICAgICAgdmFsdWUuZm9yRWFjaCgodikgPT4gewogICAgICAgICAgICAgICAgYmFzZS5nZXRWYWx1ZSh2Lm5hbWUpID09PSB1bmRlZmluZWQgJiYgYmFzZS5zZXRWYWx1ZSh2Lm5hbWUsIHYudmFsdWUpOwogICAgICAgICAgICB9KTsKICAgICAgICB9LAoKICAgICAgICBzaG93U2V0dGluZygpIHsKICAgICAgICAgICAgbGV0IGRvbSA9ICcnLCBidG4gPSAnJywKICAgICAgICAgICAgICAgIGNvbG9yTGlzdCA9IFsnIzA5QUFGRicsICcjY2MzMjM1JywgJyM1MjZlZmEnLCAnIzUxOGMxNycsICcjZWQ5NDRiJywgJyNmOTY5YTUnLCAnI2JjYTI4MCddOwogICAgICAgICAgICBkb20gKz0gYDxsYWJlbCBjbGFzcz0icGwtc2V0dGluZ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T4gewogICAgICAgICAgICAgICAgZG9tICs9IGA8b3B0aW9uIHZhbHVlPSIke2t9IiAke2Jhc2UuZ2V0VmFsdWUoJ3NldHRpbmdfdGVybWluYWxfdHlwZScpID09PSBrID8gJ3NlbGVjdGVkJyA6ICcnfT4ke3Rlcm1pbmFsVHlwZVtrXX08L29wdGlvbj5gOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZG9tICs9IGA8L3NlbGVjdD48L2xhYmVsPmA7CiAgICAgICAgICAgIGRvbSArPSBgPGxhYmVsIGNsYXNzPSJwbC1zZXR0aW5nLWxhYmVsIj48ZGl2IGNsYXNzPSJwbC1sYWJlbCI+5Li76aKY6aKc6ImyPC9kaXY+IDxkaXYgY2xhc3M9InBsLWNvbG9yIj4ke2J0bn08ZGl2PjwvbGFiZWw+YDsKICAgICAgICAgICAgZG9tID0gJzxkaXY+JyArIGRvbSArICc8L2Rpdj4nOwoKICAgICAgICAgICAgU3dhbC5maXJlKHsKICAgICAgICAgICAgICAgIHRpdGxlOiAn5Yqp5omL6YWN572uJywKICAgICAgICAgICAgICAgIGh0bWw6IGRvbSwKICAgICAgICAgICAgICAgIGljb246ICdpbmZvJywKICAgICAgICAgICAgICAgIHNob3dDbG9zZUJ1dHRvbjogdHJ1ZSwKICAgICAgICAgICAgICAgIHNob3dDb25maXJtQnV0dG9uOiBmYWxzZSwKICAgICAgICAgICAgICAgIGZvb3RlcjogcGFuLmZvb3RlciwKICAgICAgICAgICAgfSkudGhlbigoKSA9PiB7CiAgICAgICAgICAgICAgICBtZXNzYWdlLnN1Y2Nlc3MoJ+iuvue9ruaIkOWKn++8gScpOwogICAgICAgICAgICAgICAgaGlzdG9yeS5nbygwKTsKICAgICAgICAgICAgfSk7CgogICAgICAgICAgICBkb2Mub24oJ2NsaWNrJywgJy5saXN0ZW5lci1jb2xvcicsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBiYXNlLnNldFZhbHVlKCdzZXR0aW5nX3RoZW1lX2NvbG9yJywgZS50YXJnZXQuZGF0YXNldC5jb2xvcik7CiAgICAgICAgICAgICAgICBtZXNzYWdlLnN1Y2Nlc3MoJ+iuvue9ruaIkOWKn++8gScpOwogICAgICAgICAgICAgICAgaGlzdG9yeS5nbygwKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignaW5wdXQnLCAnLmxpc3RlbmVyLWRvbWFpbicsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBiYXNlLnNldFZhbHVlKCdzZXR0aW5nX3JwY19kb21haW4nLCBlLnRhcmdldC52YWx1ZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2lucHV0JywgJy5saXN0ZW5lci1wb3J0JywgYXN5bmMgKGUpID0+IHsKICAgICAgICAgICAgICAgIGJhc2Uuc2V0VmFsdWUoJ3NldHRpbmdfcnBjX3BvcnQnLCBlLnRhcmdldC52YWx1ZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2lucHV0JywgJy5saXN0ZW5lci1wYXRoJywgYXN5bmMgKGUpID0+IHsKICAgICAgICAgICAgICAgIGJhc2Uuc2V0VmFsdWUoJ3NldHRpbmdfcnBjX3BhdGgnLCBlLnRhcmdldC52YWx1ZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2lucHV0JywgJy5saXN0ZW5lci10b2tlbicsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBiYXNlLnNldFZhbHVlKCdzZXR0aW5nX3JwY190b2tlbicsIGUudGFyZ2V0LnZhbHVlKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignaW5wdXQnLCAnLmxpc3RlbmVyLWRpcicsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBiYXNlLnNldFZhbHVlKCdzZXR0aW5nX3JwY19kaXInLCBlLnRhcmdldC52YWx1ZSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2NoYW5nZScsICcubGlzdGVuZXItdGVybWluYWwnLCBhc3luYyAoZSkgPT4gewogICAgICAgICAgICAgICAgYmFzZS5zZXRWYWx1ZSgnc2V0dGluZ190ZXJtaW5hbF90eXBlJywgZS50YXJnZXQudmFsdWUpOwogICAgICAgICAgICB9KTsKICAgICAgICB9LAoKICAgICAgICByZWdpc3Rlck1lbnVDb21tYW5kKCkgewogICAgICAgICAgICBHTV9yZWdpc3Rlck1lbnVDb21tYW5kKCfimpnvuI8g6K6+572uJywgKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5zaG93U2V0dGluZygpOwogICAgICAgICAgICB9KTsKICAgICAgICB9LAoKICAgICAgICBjcmVhdGVUaXAoKSB7CiAgICAgICAgICAgICQoJ2JvZHknKS5hcHBlbmQoJzxkaXYgY2xhc3M9InBsLXRvb2x0aXAiPjwvZGl2PicpOwoKICAgICAgICAgICAgZG9jLm9uKCdtb3VzZWVudGVyIG1vdXNlbGVhdmUnLCAnLmxpc3RlbmVyLXRpcCcsIChlKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoZS50eXBlID09PSAnbW91c2VlbnRlcicpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgZmlsZW5hbWUgPSBlLmN1cnJlbnRUYXJnZXQuaW5uZXJUZXh0OwogICAgICAgICAgICAgICAgICAgIGxldCBzaXplID0gZS5jdXJyZW50VGFyZ2V0LmRhdGFzZXQuc2l6ZTsKICAgICAgICAgICAgICAgICAgICBsZXQgdGlwID0gYCR7ZmlsZW5hbWV9PHNwYW4gc3R5bGU9Im1hcmdpbi1sZWZ0OiAxMHB4O2NvbG9yOiAjZjU2YzZjOyI+JHtzaXplfTwvc3Bhbj5gOwogICAgICAgICAgICAgICAgICAgICQoZS5jdXJyZW50VGFyZ2V0KS5jc3Moe29wYWNpdHk6ICcwLjUnfSk7CiAgICAgICAgICAgICAgICAgICAgJCgnLnBsLXRvb2x0aXAnKS5odG1sKHRpcCkuY3NzKHsKICAgICAgICAgICAgICAgICAgICAgICAgJ2xlZnQnOiBlLnBhZ2VYICsgMTAgKyAncHgnLAogICAgICAgICAgICAgICAgICAgICAgICAndG9wJzogZS5wYWdlWSAtIGUuY3VycmVudFRhcmdldC5vZmZzZXRUb3AgPiAxNCA/IGUucGFnZVkgKyAncHgnIDogZS5wYWdlWSArIDIwICsgJ3B4JwogICAgICAgICAgICAgICAgICAgIH0pLnNob3coKTsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgJChlLmN1cnJlbnRUYXJnZXQpLmNzcyh7b3BhY2l0eTogJzEnfSk7CiAgICAgICAgICAgICAgICAgICAgJCgnLnBsLXRvb2x0aXAnKS5oaWRlKDApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICB9LAoKICAgICAgICBjcmVhdGVMb2FkaW5nKCkgewogICAgICAgICAgICByZXR1cm4gJCgnPGRpdiBjbGFzcz0icGwtbG9hZGluZyI+PGRpdiBjbGFzcz0icGwtbG9hZGluZy1ib3giPjxkaXY+PGRpdj48L2Rpdj48ZGl2PjwvZGl2PjwvZGl2PjwvZGl2PjwvZGl2PicpOwogICAgICAgIH0sCgogICAgICAgIGNyZWF0ZURvd25sb2FkSWZyYW1lKCkgewogICAgICAgICAgICBsZXQgJGRpdiA9ICQoJzxkaXYgc3R5bGU9InBhZGRpbmc6MDttYXJnaW46MDtkaXNwbGF5OmJsb2NrIj48L2Rpdj4nKTsKICAgICAgICAgICAgbGV0ICRpZnJhbWUgPSAkKCc8aWZyYW1lIHNyYz0iamF2YXNjcmlwdDo7IiBpZD0iZG93bmxvYWRJZnJhbWUiIHN0eWxlPSJkaXNwbGF5Om5vbmUiPjwvaWZyYW1lPicpOwogICAgICAgICAgICAkZGl2LmFwcGVuZCgkaWZyYW1lKTsKICAgICAgICAgICAgJCgnYm9keScpLmFwcGVuZCgkZGl2KTsKICAgICAgICB9LAoKICAgICAgICBnZXRNaXJyb3JMaXN0KGxpbmssIG1pcnJvciwgdGhyZWFkID0gMikgewogICAgICAgICAgICBsZXQgaG9zdCA9IG5ldyBVUkwobGluaykuaG9zdDsKICAgICAgICAgICAgbGV0IG1pcnJvcnMgPSBbXTsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBtaXJyb3IubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIGZvciAobGV0IGogPSAwOyBqIDwgdGhyZWFkOyBqKyspIHsKICAgICAgICAgICAgICAgICAgICBsZXQgaXRlbSA9IGxpbmsucmVwbGFjZShob3N0LCBtaXJyb3JbaV0pICsgJyYnLnJlcGVhdChqKTsKICAgICAgICAgICAgICAgICAgICBtaXJyb3JzLnB1c2goaXRlbSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgcmV0dXJuIG1pcnJvcnMuam9pbignXG4nKTsKICAgICAgICB9LAoKICAgICAgICBhZGRQYW5MaW5rZXJTdHlsZSgpIHsKICAgICAgICAgICAgY29sb3IgPSBiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3RoZW1lX2NvbG9yJyk7CiAgICAgICAgICAgIGxldCBjc3MgPSBgCiAgICAgICAgICAgIGJvZHk6Oi13ZWJraXQtc2Nyb2xsYmFyIHsgZGlzcGxheTogbm9uZSB9CiAgICAgICAgICAgIDo6LXdlYmtpdC1zY3JvbGxiYXIgeyB3aWR0aDogNnB4OyBoZWlnaHQ6IDEwcHggfQogICAgICAgICAgICA6Oi13ZWJraXQtc2Nyb2xsYmFyLXRyYWNrIHsgYm9yZGVyLXJhZGl1czogMDsgYmFja2dyb3VuZDogbm9uZSB9CiAgICAgICAgICAgIDo6LXdlYmtpdC1zY3JvbGxiYXItdGh1bWIgeyBiYWNrZ3JvdW5kLWNvbG9yOiByZ2JhKDg1LDg1LDg1LC40KSB9CiAgICAgICAgICAgIDo6LXdlYmtpdC1zY3JvbGxiYXItdGh1bWIsOjotd2Via2l0LXNjcm9sbGJhci10a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XR0b246IHRydWUsCiAgICAgICAgICAgICAgICAgICAgY29uZmlybUJ1dHRvblRleHQ6ICfnoLTop6MnCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIGlmIChyZXN1bHQuaXNEaXNtaXNzZWQgJiYgcmVzdWx0LmRpc21pc3MgPT09ICdjbG9zZScpIHJldHVybjsKICAgICAgICAgICAgICAgIGlmIChwYW4ubnVtID09IHBhbi5udW0pIHsKICAgICAgICAgICAgICAgICAgICBiYXNlLnNldFZhbHVlKCdzZXR0aW5nX2luaXRfY29kZScsIHBhbi5udW0pOwogICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc3VjY2Vzcygi5pqX5Y+35q2j56GuIik7CiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoKSA9PiB7CiAgICAgICAgICAgICAgICAgICAgICAgIGhpc3RvcnkuZ28oMCk7CiAgICAgICAgICAgICAgICAgICAgfSwgMTUwMCk7CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgIGF3YWl0IFN3YWwuZmlyZSh7CiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiLmmpflj7fkuI3mraPnoa4iLAogICAgICAgICAgICAgICAgICAgICAgICB0ZXh0OiAi5pqX5Y+35LiN5q2j56GuIiwKICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlybUJ1dHRvblRleHQ6ICfph43mlrDovpPlhaUnLAogICAgICAgICAgICAgICAgICAgICAgICBpbWFnZVVybDogcGFuLmltZywKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICBhd2FpdCB0aGlzLmluaXREaWFsb2coKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICB9OwoKICAgIGxldCBiYWlkdSA9IHsKCiAgICAgICAgX2dldEV4dHJhKCkgewogICAgICAgICAgICBsZXQgc2VLZXkgPSBkZWNvZGVVUklDb21wb25lbnQoYmFzZS5nZXRDb29raWUoJ0JEQ0xORCcpKTsKICAgICAgICAgICAgcmV0dXJuICd7JyArICcic2VrZXkiOiInICsgc2VLZXkgKyAnIicgKyAifSI7CiAgICAgICAgfSwKCiAgICAgICAgX2dldFN1cmwoKSB7CgogICAgICAgICAgICAgICAgbGV0IHJlc3AgPSBsb2NhdGlvbi5ocmVmLm1hdGNoKC9odHRwcz86XC9cLy4rXC5iYWlkdVwuY29tXC8oc1wvfHN1cmw9KSguKylcPy8pOwoKICAgICAgICAgICAgICAgIGlmIChyZXNwKSB7CiAgICAgICAgICAgICAgICAgICAgLy9jb25zb2xlLmxvZyhyZXNwWzJdLCdyZXNwJyk7CiAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXNwWzJdOwoKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIC8qCiAgICAgICAgICAgICAgICBsZXQgcmVnID0gLyg/PD1zXC98c3VybD0pKFthLXpBLVowLTlfLV0rKS9nOwoKICAgICAgICAgICAgICAgIGlmKHJlZy50ZXN0KGxvY2F0aW9uLmhyZWYpKXsKICAgICAgICAgICAgICAgICAgICAvL2NvbnNvbGUubG9nKGxvY2F0aW9uLmhyZWYubWF0Y2gocmVnKVswXSwncmVnJyk7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGxvY2F0aW9uLmhyZWYubWF0Y2gocmVnKVswXTsKCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgcmV0dXJuICcnOwoKICAgICAgICB9LAoKICAgICAgICBfZ2V0RmlkTGlzdCgpIHsKICAgICAgICAgICAgbGV0IGZpZGxpc3QgPSBbXTsKICAgICAgICAgICAgc2VsZWN0TGlzdC5mb3JFYWNoKHYgPT4gewogICAgICAgICAgICAgICAgaWYgKCt2LmlzZGlyID09PSAxKSByZXR1cm47CiAgICAgICAgICAgICAgICBmaWRsaXN0LnB1c2godi5mc19pZCk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICByZXR1cm4gJ1snICsgZmlkbGlzdCArICddJzsKICAgICAgICB9LAoKICAgICAgICBfcmVzZXREYXRhKCkgewogICAgICAgICAgICBwcm9ncmVzcyA9IHt9OwogICAgICAgICAgICAkLmVhY2gocmVxdWVzdCwgKGtleSkgPT4gewogICAgICAgICAgICAgICAgKHJlcXVlc3Rba2V5XSkuYWJvcnQoKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICQuZWFjaChpbnMsIChrZXkpID0+IHsKICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwoaW5zW2tleV0pOwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgaWRtID0ge307CiAgICAgICAgICAgIGlucyA9IHt9OwogICAgICAgICAgICByZXF1ZXN0ID0ge307CiAgICAgICAgfSwKCiAgICAgICAgc2V0QkRVU1MoKSB7CiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICBHTV9jb29raWUgJiYgR01fY29va2llKCdsaXN0Jywge25hbWU6ICdCRFVTUyd9LCAoY29va2llcywgZXJyb3IpID0+IHsKICAgICAgICAgICAgICAgICAgICBpZiAoIWVycm9yKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGJhc2Uuc2V0U3RvcmFnZSgiYmFpZHV5dW5QbHVnaW5fQkRVU1MiLCB7QkRVU1M6IGNvb2tpZXNbMF0udmFsdWV9KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfSBjYXRjaCAoZSkgewogICAgICAgICAgICB9CiAgICAgICAgfSwKCiAgICAgICAgZ2V0QkRVU1MoKSB7CiAgICAgICAgICAgIGxldCBiYWlkdXl1blBsdWdpbl9CRFVTUyA9IGJhc2UuZ2V0U3RvcmFnZSgnYmFpZHV5dW5QbHVnaW5fQkRVU1MnKSA/IGJhc2UuZ2V0U3RvcmFnZSgnYmFpZHV5dW5QbHVnaW5fQkRVU1MnKSA6ICd7ImJhaWR1eXVuUGx1Z2luX0JEVVNTIjoiIn0nOwogICAgICAgICAgICByZXR1cm4gYmFpZHV5dW5QbHVnaW5fQkRVU1MuQkRVU1MgfHwgJyc7CiAgICAgICAgfSwKCiAgICAgICAgY29udmVydExpbmtUb0FyaWEobGluaywgZmlsZW5hbWUsIHVhKSB7CiAgICAgICAgICAgIGxldCBCRFVTUyA9IHRoaXMuZ2V0QkRVU1MoKTsKICAgICAgICAgICAgaWYgKCEhQkRVU1MpIHsKICAgICAgICAgICAgICAgIGZpbGVuYW1lID0gZmlsZW5hbWUucmVwbGFjZSgnICcsICdfJyk7CiAgICAgICAgICAgICAgICByZXR1cm4gZW5jb2RlVVJJQ29tcG9uZW50KGBhcmlhMmMgIiR7bGlua30iIC0tb3V0ICIke2ZpbGVuYW1lfSIgLS1oZWFkZXIgIlVzZXItQWdlbnQ6ICR7dWF9IiAtLWhlYWRlciAiQ29va2llOiBCRFVTUz0ke0JEVVNTfSJgKTsKICAgICAgICAgICAgfQogICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgbGluazogcGFuLmFzc2lzdGFudCwKICAgICAgICAgICAgICAgIHRleHQ6IHBhbi5pbml0WzVdCiAgICAgICAgICAgIH07CiAgICAgICAgfSwKCiAgICAgICAgY29udmVydExpbmtUb0JDKGxpbmssIGZpbGVuYW1lLCB1YSkgewogICAgICAgICAgICBsZXQgQkRVU1MgPSB0aGlzLmdldEJEVVNTKCk7CiAgICAgICAgICAgIGlmICghIUJEVVNTKSB7CiAgICAgICAgICAgICAgICBsZXQgY29va2llID0gYEJEVVNTPSR7QkRVU1N9YDsKICAgICAgICAgICAgICAgIGxldCBiYyA9IGBBQS8ke2VuY29kZVVSSUNvbXBvbmVudChmaWxlbmFtZSl9Lz91cmw9JHtlbmNvZGVVUklDb21wb25lbnQobGluayl9JmNvb2tpZT0ke2VuY29kZVVSSUNvbXBvbmVudChjb29raWUpfSZ1c2VyX2FnZW50PSR7ZW5jb2RlVVJJQ29tcG9uZW50KHVhKX1aWmA7CiAgICAgICAgICAgICAgICByZXR1cm4gZW5jb2RlVVJJQ29tcG9uZW50KGBiYzovL2h0dHAvJHtiYXNlLmUoYmMpfWApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICBsaW5rOiBwYW4uYXNzaXN0YW50LAogICAgICAgICAgICAgICAgdGV4dDogcGFuLmluaXRbNV0KICAgICAgICAgICAgfTsKICAgICAgICB9LAoKICAgICAgICBjb252ZXJ0TGlua1RvQ3VybChsaW5rLCBmaWxlbmFtZSwgdWEpIHsKICAgICAgICAgICAgbGV0IEJEVVNTID0gdGhpcy5nZXRCRFVTUygpOwogICAgICAgICAgICBpZiAoISFCRFVTUykgewogICAgICAgICAgICAgICAgbGV0IHRlcm1pbmFsID0gYmFzZS5nZXRWYWx1ZSgnc2V0dGluZ190ZXJtaW5hbF90eXBlJyk7CiAgICAgICAgICAgICAgICBmaWxlbmFtZSA9IGZpbGVuYW1lLnJlcGxhY2UoJyAnLCAnXycpOwogICAgICAgICAgICAgICAgcmV0dXJuIGVuY29kZVVSSUNvbXBvbmVudChgJHt0ZXJtaW5hbCAhPT0gJ3dwJyA/ICdjdXJsJyA6ICdjdXJsLmV4ZSd9IC1MICIke2xpbmt9IiAtLW91dHB1dCAiJHtmaWxlbmFtZX0iIC1BICIke3VhfSIgLWIgIkJEVVNTPSR7QkRVU1N9ImApOwogICAgICAgICAgICB9CiAgICAgICAgICAgIHJldHVybiB7CiAgICAgICAgICAgICAgICBsaW5rOiBwYW4uYXNzaXN0YW50LAogICAgICAgICAgICAgICAgdGV4dDogcGFuLmluaXRbNV0KICAgICAgICAgICAgfTsKICAgICAgICB9LAoKICAgICAgICBhZGRQYWdlTGlzdGVuZXIoKSB7CiAgICAgICAgICAgIGZ1bmN0aW9uIF9mYWN0b3J5KGUpIHsKICAgICAgICAgICAgICAgIGxldCB0YXJnZXQgPSAkKGUudGFyZ2V0KTsKICAgICAgICAgICAgICAgIGxldCBpdGVtID0gdGFyZ2V0LnBhcmVudHMoJy5wbC1pdGVtJyk7CiAgICAgICAgICAgICAgICBsZXQgbGluayA9IGl0ZW0uZmluZCgnLnBsLWl0ZW0tbGluaycpOwogICAgICAgICAgICAgICAgbGV0IHByb2dyZXNzID0gaXRlbS5maW5kKCcucGwtaXRlbS1wcm9ncmVzcycpOwogICAgICAgICAgICAgICAgbGV0IHRpcCA9IGl0ZW0uZmluZCgnLnBsLWl0ZW0tdGlwJyk7CiAgICAgICAgICAgICAgICByZXR1cm4gewogICAgICAgICAgICAgICAgICAgIGl0ZW0sIGxpbmssIHByb2dyZXNzLCB0aXAsIHRhcmdldCwKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGZ1bmN0aW9uIF9yZXNldChpKSB7CiAgICAgICAgICAgICAgICBpbnNbaV0gJiYgY2xlYXJJbnRlcnZhbChpbnNbaV0pOwogICAgICAgICAgICAgICAgcmVxdWVzdFtpXSAmJiByZXF1ZXN0W2ldLmFib3J0KCk7CiAgICAgICAgICAgICAgICBwcm9ncmVzc1tpXSA9IDA7CiAgICAgICAgICAgICAgICBpZG1baV0gPSBmYWxzZTsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgZG9jLm9uKCdtb3VzZWVudGVyIG1vdXNlbGVhdmUgY2xpY2snLCAnLnBsLWJ1dHRvbi5nLWRyb3Bkb3duLWJ1dHRvbicsIChlKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoZS50eXBlID09PSAnbW91c2VsZWF2ZScpIHsKICAgICAgICAgICAgICAgICAgICAkKGUuY3VycmVudFRhcmdldCkucmVtb3ZlQ2xhc3MoJ2J1dHRvbi1vcGVuJyk7CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICQoZS5jdXJyZW50VGFyZ2V0KS5hZGRDbGFzcygnYnV0dG9uLW9wZW4nKTsKICAgICAgICAgICAgICAgICAgICAkKGUuY3VycmVudFRhcmdldCkuZmluZCgnLnBsLWRyb3Bkb3duLW1lbnUnKS5zaG93KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ21vdXNlbGVhdmUnLCAnLnBsLWJ1dHRvbi5nLWRyb3Bkb3duLWJ1dHRvbiAucGwtZHJvcGRvd24tbWVudScsIChlKSA9PiB7CiAgICAgICAgICAgICAgICAkKGUuY3VycmVudFRhcmdldCkuaGlkZSgpOwogICAgICAgICAgICB9KTsKCiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLnBsLWJ1dHRvbi1tb2RlJywgKGUpID0+IHsKICAgICAgICAgICAgICAgIG1vZGUgPSBlLnRhcmdldC5kYXRhc2V0Lm1vZGU7CiAgICAgICAgICAgICAgICBTd2FsLnNob3dMb2FkaW5nKCk7CiAgICAgICAgICAgICAgICB0aGlzLmdldFBDU0xpbmsoKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLmxpc3RlbmVyLWxpbmstYXBpJywgYXN5bmMgKGUpID0+IHsKICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTsKICAgICAgICAgICAgICAgIGxldCBvID0gX2ZhY3RvcnkoZSk7CiAgICAgICAgICAgICAgICBsZXQgJHdpZHRoID0gby5pdGVtLmZpbmQoJy5wbC1wcm9ncmVzcy1pbm5lcicpOwogICAgICAgICAgICAgICAgbGV0ICR0ZXh0ID0gby5pdGVtLmZpbmQoJy5wbC1wcm9ncmVzcy1pbm5lci10ZXh0Jyk7CiAgICAgICAgICAgICAgICBsZXQgZmlsZW5hbWUgPSBvLmxpbmtbMF0uZGF0YXNldC5maWxlbmFtZTsKICAgICAgICAgICAgICAgIGxldCBpbmRleCA9IG8ubGlua1swXS5kYXRhc2V0LmluZGV4OwogICAgICAgICAgICAgICAgX3Jlc2V0KGluZGV4KTsKICAgICAgICAgICAgICAgIGJhc2UuZ2V0KG8ubGlua1swXS5kYXRhc2V0LmxpbmssIHsiVXNlci1BZ2VudCI6IHBhbi51YX0sICdibG9iJywge2ZpbGVuYW1lLCBpbmRleH0pOwogICAgICAgICAgICAgICAgaW5zW2luZGV4XSA9IHNldEludGVydmFsKCgpID0+IHsKICAgICAgICAgICAgICAgICAgICBsZXQgcHJvZyA9ICtwcm9ncmVzc1tpbmRleF0gfHwgMDsKICAgICAgICAgICAgICAgICAgICBsZXQgaXNJRE0gPSBpZG1baW5kZXhdIHx8IGZhbHNlOwogICAgICAgICAgICAgICAgICAgIGlmIChpc0lETSkgewogICAgICAgICAgICAgICAgICAgICAgICBvLnRpcC5oaWRlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIG8ucHJvZ3Jlc3MuaGlkZSgpOwogICAgICAgICAgICAgICAgICAgICAgICBvLmxpbmsudGV4dCgn5bey5oiQ5Yqf5ZSk6LW3SURN77yM6K+35p+l55yLSURN5LiL6L295qGG77yBJykuYW5pbWF0ZSh7b3BhY2l0eTogJzAuNSd9LCAic2xvdyIpLnNob3coKTsKICAgICAgICAgICAgICAgICAgICAgICAgY2xlYXJJbnRlcnZhbChpbnNbaW5kZXhdKTsKICAgICAgICAgICAgICAgICAgICAgICAgaWRtW2luZGV4XSA9IGZhbHNlOwogICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIG8ubGluay5oaWRlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIG8udGlwLmhpZGUoKTsKICAgICAgICAgICAgICAgICAgICAgICAgby5wcm9ncmVzcy5zaG93KCk7CiAgICAgICAgICAgICAgICAgICAgICAgICR3aWR0aC5jc3MoJ3dpZHRoJywgcHJvZyArICclJyk7CiAgICAgICAgICAgICAgICAgICAgICAgICR0ZXh0LnRleHQocHJvZyArICclJyk7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwcm9nID09PSAxMDApIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwoaW5zW2luZGV4XSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9ncmVzc1tpbmRleF0gPSAwOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgby5pdGVtLmZpbmQoJy5wbC1wcm9ncmVzcy1zdG9wJykuaGlkZSgpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgby5pdGVtLmZpbmQoJy5wbC1wcm9ncmVzcy10aXAnKS5odG1sKCfkuIvovb3lrozmiJDvvIzmraPlnKjlvLnlh7rmtY/op4jlmajkuIvovb3moYbvvIEnKTsKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0sIDUwMCk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2NsaWNrJywgJy5saXN0ZW5lci1yZXRyeScsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBsZXQgbyA9IF9mYWN0b3J5KGUpOwogICAgICAgICAgICAgICAgby50aXAuaGlkZSgpOwogICAgICAgICAgICAgICAgby5saW5rLnNob3coKTsKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLmxpc3RlbmVyLWhvdycsIGFzeW5jIChlKSA9PiB7CiAgICAgICAgICAgICAgICBsZXQgbyA9IF9mYWN0b3J5KGUpOwogICAgICAgICAgICAgICAgbGV0IGluZGV4ID0gby5saW5rWzBdLmRhdGFzZXQuaW5kZXg7CiAgICAgICAgICAgICAgICBpZiAocmVxdWVzdFtpbmRleF0pIHsKICAgICAgICAgICAgICAgICAgICByZXF1ZXN0W2luZGV4XS5hYm9ydCgpOwogICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwoaW5zW2luZGV4XSk7CiAgICAgICAgICAgICAgICAgICAgby5wcm9ncmVzcy5oaWRlKCk7CiAgICAgICAgICAgICAgICAgICAgby50aXAuc2hvdygpOwogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLmxpc3RlbmVyLXN0b3AnLCBhc3luYyAoZSkgPT4gewogICAgICAgICAgICAgICAgbGV0IG8gPSBfZmFjdG9yeShlKTsKICAgICAgICAgICAgICAgIGxldCBpbmRleCA9IG8ubGlua1swXS5kYXRhc2V0LmluZGV4OwogICAgICAgICAgICAgICAgaWYgKHJlcXVlc3RbaW5kZXhdKSB7CiAgICAgICAgICAgICAgICAgICAgcmVxdWVzdFtpbmRleF0uYWJvcnQoKTsKICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKGluc1tpbmRleF0pOwogICAgICAgICAgICAgICAgICAgIG8udGlwLmhpZGUoKTsKICAgICAgICAgICAgICAgICAgICBvLnByb2dyZXNzLmhpZGUoKTsKICAgICAgICAgICAgICAgICAgICBvLmxpbmsuc2hvdygwKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLmxpc3RlbmVyLWJhY2snLCBhc3luYyAoZSkgPT4gewogICAgICAgICAgICAgICAgbGV0IG8gPSBfZmFjdG9yeShlKTsKICAgICAgICAgICAgICAgIG8udGlwLmhpZGUoKTsKICAgICAgICAgICAgICAgIG8ubGluay5zaG93KCk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2NsaWNrJywgJy5saXN0ZW5lci1saW5rLWFyaWEsIC5saXN0ZW5lci1jb3B5LWFsbCcsIChlKSA9PiB7CiAgICAgICAgICAgICAgICBlLnByZXZlbnREZWZhdWx0KCk7CiAgICAgICAgICAgICAgICBpZiAoIWUudGFyZ2V0LmRhdGFzZXQubGluaykgewogICAgICAgICAgICAgICAgICAgICQoZS50YXJnZXQpLnJlbW92ZUNsYXNzKCdsaXN0ZW5lci1jb3B5LWFsbCcpLmFkZENsYXNzKCdwbC1idG4tZGFuZ2VyJykuaHRtbChgJHtwYW4uaW5pdFs1XX3wn5GJPGEgaHJlZj0iJHtwYW4uYXNzaXN0YW50fSIgdGFyZ2V0PSJfYmxhbmsiIGNsYXNzPSJwbC1hIj7ngrnlh7vmraTlpITlronoo4U8L2E+8J+RiGApOwogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBiYXNlLnNldENsaXBib2FyZChkZWNvZGVVUklDb21wb25lbnQoZS50YXJnZXQuZGF0YXNldC5saW5rKSk7CiAgICAgICAgICAgICAgICAgICAgJChlLnRhcmdldCkudGV4dCgn5aSN5Yi25oiQ5Yqf77yM5b+r5Y6757KY6LS05ZCn77yBJykuYW5pbWF0ZSh7b3BhY2l0eTogJzAuNSd9LCAic2xvdyIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZG9jLm9uKCdjbGljaycsICcubGlzdGVuZXItbGluay1ycGMnLCBhc3luYyAoZSkgPT4gewogICAgICAgICAgICAgICAgbGV0IHRhcmdldCA9ICQoZS5jdXJyZW50VGFyZ2V0KTsKICAgICAgICAgICAgICAgIHRhcmdldC5maW5kKCcuaWNvbicpLnJlbW92ZSgpOwogICAgICAgICAgICAgICAgdGFyZ2V0LmZpbmQoJy5wbC1sb2FkaW5nJykucmVtb3ZlKCk7CiAgICAgICAgICAgICAgICB0YXJnZXQucHJlcGVuZChiYXNlLmNyZWF0ZUxvYWRpbmcoKSk7CiAgICAgICAgICAgICAgICBsZXQgcmVzID0gYXdhaXQgdGhpcy5zZW5kTGlua1RvUlBDKGUuY3VycmVudFRhcmdldC5kYXRhc2V0LmZpbGVuYW1lLCBlLmN1cnJlbnRUYXJnZXQuZGF0YXNldC5saW5rKTsKICAgICAgICAgICAgICAgIGlmIChyZXMgPT09ICdzdWNjZXNzJykgewogICAgICAgICAgICAgICAgICAgICQoJy5saXN0ZW5lci1ycGMtdGFzaycpLnNob3coKTsKICAgICAgICAgICAgICAgICAgICB0YXJnZXQucmVtb3ZlQ2xhc3MoJ3BsLWJ0bi1kYW5nZXInKS5odG1sKCflj5HpgIHmiJDlip/vvIzlv6vljrvnnIvnnIvlkKfvvIEnKS5hbmltYXRlKHtvcGFjaXR5OiAnMC41J30sICJzbG93Iik7CiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHJlcyA9PT0gJ2Fzc2lzdGFudCcpIHsKICAgICAgICAgICAgICAgICAgICB0YXJnZXQuYWRkQ2xhc3MoJ3BsLWJ0bi1kYW5nZXInKS5odG1sKGAke3Bhbi5pbml0WzVdffCfkYk8YSBocmVmPSIke3Bhbi5hc3Npc3RhbnR9IiB0YXJnZXQ9Il9ibGFuayIgY2xhc3M9InBsLWEiPueCueWHu+atpOWkhOWuieijhTwvYT7wn5GIYCk7CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgIHRhcmdldC5hZGRDbGFzcygncGwtYnRuLWRhbmdlcicpLnRleHQoJ+WPkemAgeWksei0pe+8jOivt+ajgOafpeaCqOeahFJQQ+mFjee9ruS/oeaBr++8gScpLmFuaW1hdGUoe29wYWNpdHk6ICcwLjUnfSwgInNsb3ciKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGRvYy5vbignY2xpY2snLCAnLmxpc3RlbmVyLXNlbmQtcnBjJywgKGUpID0+IHsKICAgICAgICAgICAgICAgICQoJy5saXN0ZW5lci1saW5rLXJwYycpLmNsaWNrKCk7CiAgICAgICAgICAgICAgICAkKGUudGFyZ2V0KS50ZXh0KCflj5HpgIHlrozmiJDvvIzlj5HpgIHnu5Pmnpzop4HkuIrmlrnmjInpkq7vvIEnKS5hbmltYXRlKHtvcGFjaXR5OiAnMC41J30sICJzbG93Iik7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2NsaWNrJywgJy5saXN0ZW5lci1vcGVuLXNldHRpbmcnLCAoKSA9PiB7CiAgICAgICAgICAgICAgICBiYXNlLnNob3dTZXR0aW5nKCk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2Mub24oJ2NsaWNrJywgJy5saXN0ZW5lci1ycGMtdGFzaycsICgpID0+IHsKICAgICAgICAgICAgICAgIGxldCBycGMgPSBKU09OLnN0cmluZ2lmeSh7CiAgICAgICAgICAgICAgICAgICAgZG9tYWluOiBiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3JwY19kb21haW4nKSwKICAgICAgICAgICAgICAgICAgICBwb3J0OiBiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3JwY19wb3J0JyksCiAgICAgICAgICAgICAgICB9KSwgdXJsID0gYCR7cGFuLmR9Lz9ycGM9JHtiYXNlLmUocnBjKX0jJHtiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3JwY190b2tlbicpfWA7CiAgICAgICAgICAgICAgICBHTV9vcGVuSW5UYWIodXJsLCB7YWN0aXZlOiB0cnVlfSk7CiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkb2N1bWVudC5kb2N1bWVudEVsZW1lbnQuYWRkRXZlbnRMaXN0ZW5lcignbW91c2V1cCcsIChlKSA9PiB7CiAgICAgICAgICAgICAgICBpZiAoZS50YXJnZXQubm9kZU5hbWUgPT09ICdBJyAmJiB+ZS50YXJnZXQuY2xhc3NOYW1lLmluZGV4T2YoJ3BsLWEnKSkgewogICAgICAgICAgICAgICAgICAgIGUuc3RvcFByb3BhZ2F0aW9uKCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sIHRydWUpOwogICAgICAgIH0sCgogICAgICAgIGFkZEJ1dHRvbigpIHsKICAgICAgICAgICAgaWYgKCFwdCkgcmV0dXJuOwogICAgICAgICAgICBsZXQgJHRvb2xXcmFwOwogICAgICAgICAgICBsZXQgJGJ1dHRvbiA9ICQoYDxkaXYgY2xhc3M9ImctZHJvcGRvd24tYnV0dG9uIHBvaW50ZXIgcGwtYnV0dG9uIj48ZGl2IHN0eWxlPSJjb2xvcjojZmZmO2JhY2tncm91bmQ6ICR7Y29sb3J9O2JvcmRlci1jb2xvcjoke2NvbG9yfSIgY2xhc3M9ImctYnV0dG9uIGctYnV0dG9uLWJsdWUiPjx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AgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAoZmlkTGlzdC5sZW5ndGggPT09IDIpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbWVzc2FnZS5lcnJvcign5o+Q56S677ya6K+35omT5byA5paH5Lu25aS55ZCO5Yu+6YCJ5paH5Lu277yBJyk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmaWRMaXN0ID0gZW5jb2RlVVJJQ29tcG9uZW50KGZpZExpc3QpOwogICAgICAgICAgICAgICAgdXJsID0gYCR7cGFuLnBjc1swXX0mZnNpZHM9JHtmaWRMaXN0fWA7CiAgICAgICAgICAgICAgICByZXMgPSBhd2FpdCBiYXNlLmdldCh1cmwsIHsiVXNlci1BZ2VudCI6IHBhbi51YX0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChwdCA9PT0gJ3NoYXJlJykgewogICAgICAgICAgICAgICAgdGhpcy5nZXRTaGFyZURhdGEoKTsKICAgICAgICAgICAgICAgIGlmIChzZWxlY3RMaXN0Lmxlbmd0aCA9PT0gMCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBtZXNzYWdlLmVycm9yKCfmj5DnpLrvvJror7flhYjli77pgInopoHkuIvovb3nmoTmlofku7bvvIEnKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChmaWRMaXN0Lmxlbmd0aCA9PT0gMikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBtZXNzYWdlLmVycm9yKCfmj5DnpLrvvJror7fmiZPlvIDmlofku7blpLnlkI7li77pgInmlofku7bvvIEnKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmICghcGFyYW1zLnNpZ24pIHsKICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gYCR7cGFuLnBjc1syXX0mc3VybD0ke3BhcmFtcy5zdXJsfSZsb2dpZD0ke3BhcmFtcy5sb2dpZH1gOwogICAgICAgICAgICAgICAgICAgIGxldCByID0gYXdhaXQgYmFzZS5nZXQodXJsKTsKICAgICAgICAgICAgICAgICAgICBpZiAoci5lcnJubyA9PT0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuc2lnbiA9IHIuZGF0YS5zaWduOwogICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMudGltZXN0YW1wID0gci5kYXRhLnRpbWVzdGFtcDsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGlhbG9nID0gYXdhaXQgU3dhbC5maXJlKHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvYXN0OiB0cnVlLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgaWNvbjogJ2luZm8nLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGDmj5DnpLrvvJror7flsIbmlofku7Y8c3BhbiBjbGFzcz0idGFnLWRhbmdlciI+W+S/neWtmOWIsOe9keebmF08L3NwYW4+8J+RieWJjeW+gDxzcGFuIGNsYXNzPSJ0YWctZGFuZ2VyIj5b5oiR55qE572R55uYXTwvc3Bhbj7kuK3kuIvovb3vvIFgLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0NvbmZpcm1CdXR0b246IHRydWUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maXJtQnV0dG9uVGV4dDogJ+eCueWHu+S/neWtmCcsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbjogJ3RvcCcsCiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGlhbG9nLmlzQ29uZmlybWVkKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKCcudG9vbHMtc2hhcmUtc2F2ZS1oYicpWzBdLmNsaWNrKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmICghcGFyYW1zLmJkc3Rva2VuKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1lc3NhZ2UuZXJyb3IoJ+aPkOekuu+8muivt+WFiOeZu+W9lee9keebmO+8gScpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbGV0IGZvcm1EYXRhID0gbmV3IEZvcm1EYXRhKCk7CiAgICAgICAgICAgICAgICBmb3JtRGF0YS5hcHBlbmQoJ2VuY3J5cHQnLCBwYXJhbXMuZW5jcnlwdCk7CiAgICAgICAgICAgICAgICBmb3JtRGF0YS5hcHBlbmQoJ3Byb2R1Y3QnLCBwYXJhbXMucHJvZHVjdCk7CiAgICAgICAgICAgICAgICBmb3JtRGF0YS5hcHBlbmQoJ3VrJywgcGFyYW1zLnVrKTsKICAgICAgICAgICAgICAgIGZvcm1EYXRhLmFwcGVuZCgncHJpbWFyeWlkJywgcGFyYW1zLnByaW1hcnlpZCk7CiAgICAgICAgICAgICAgICBmb3JtRGF0YS5hcHBlbmQoJ2ZpZF9saXN0JywgZmlkTGlzdCk7CiAgICAgICAgICAgICAgICBmb3JtRGF0YS5hcHBlbmQoJ2xvZ2lkJywgcGFyYW1zLmxvZ2lkKTsKICAgICAgICAgICAgICAgIHBhcmFtcy5zaGFyZVR5cGUgPT09ICdzZWNyZXQnID8gZm9ybURhdGEuYXBwZW5kKCdleHRyYScsIHBhcmFtcy5leHRyYSkgOiAnJzsKICAgICAgICAgICAgICAgIHVybCA9IGAke3Bhbi5wY3NbMV19JnNpZ249JHtwYXJhbXMuc2lnbn0mdGltZXN0YW1wPSR7cGFyYW1zLnRpbWVzdGFtcH1gOwogICAgICAgICAgICAgICAgcmVzID0gYXdhaXQgYmFzZS5wb3N0KHVybCwgZm9ybURhdGEsIHsiVXNlci1BZ2VudCI6IHBhbi51YX0pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChyZXMuZXJybm8gPT09IDApIHsKICAgICAgICAgICAgICAgIGxldCBodG1sID0gdGhpcy5nZW5lcmF0ZURvbShyZXMubGlzdCk7CiAgICAgICAgICAgICAgICB0aGlzLnNob3dNYWluRGlhbG9nKHBhblttb2RlXVswXSwgaHRtbCwgcGFuW21vZGVdWzFdKTsKICAgICAgICAgICAgfSBlbHNlIGlmIChyZXMuZXJybm8gPT09IDExMikgewogICAgICAgICAgICAgICAgcmV0dXJuIG1lc3NhZ2UuZXJyb3IoJ+aPkOekuu+8mumhtemdoui/h+acn++8jOivt+WIt+aWsOmHjeivle+8gScpOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgbWVzc2FnZS5lcnJvcign5o+Q56S677ya6I635Y+W5LiL6L296ZO+5o6l5aSx6LSl77yB6K+35Yi35paw572R6aG15ZCO6YeN6K+V77yBJyk7CiAgICAgICAgICAgIH0KICAgICAgICB9LAoKICAgICAgICBnZW5lcmF0ZURvbShsaXN0KSB7CiAgICAgICAgICAgIGxldCBjb250ZW50ID0gJzxkaXYgY2xhc3M9InBsLW1haW4iPic7CiAgICAgICAgICAgIGxldCBhbGlua0FsbFRleHQgPSAnJzsKICAgICAgICAgICAgYmFzZS5zb3J0QnlOYW1lKGxpc3QpOwogICAgICAgICAgICBsaXN0LmZvckVhY2goKHYsIGkpID0+IHsKICAgICAgICAgICAgICAgIGlmICh2LmlzZGlyID09PSAxKSByZXR1cm47CiAgICAgICAgICAgICAgICBsZXQgZmlsZW5hbWUgPSB2LnNlcnZlcl9maWxlbmFtZSB8fCB2LmZpbGVuYW1lOwogICAgICAgICAgICAgICAgbGV0IGV4dCA9IGJhc2UuZ2V0RXh0ZW5zaW9uKGZpbGVuYW1lKTsKICAgICAgICAgICAgICAgIGxldCBzaXplID0gYmFzZS5zaXplRm9ybWF0KHYuc2l6ZSk7CiAgICAgICAgICAgICAgICBsZXQgZGxpbmsgPSB2LmRsaW5rOwogICAgICAgICAgICAgICAgaWYgKG1vZGUgPT09ICdhcGknKSB7CiAgIC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icGwtcHJvZ3Jlc3MiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0icGwtcHJvZ3Jlc3Mtb3V0ZXIiPjwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0icGwtcHJvZ3Jlc3MtaW5uZXIiIHN0eWxlPSJ3aWR0aDo1JSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InBsLXByb2dyZXNzLWlubmVyLXRleHQiPjAlPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzcGFuIGNsYXNzPSJwbC1wcm9ncmVzcy1zdG9wIGxpc3RlbmVyLXN0b3AiPuWPlua2iOS4i+i9vTwvc3Bhbj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4gY2xhc3M9InBsLXByb2dyZXNzLXRpcCI+5pyq5Y+R546wSURN77yM5L2/55So6Ieq5bim5rWP6KeI5Zmo5LiL6L29PC9zcGFuPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz0icGwtcHJvZ3Jlc3MtaG93IGxpc3RlbmVyLWhvdyI+5aaC5L2V5ZSk6LW3SURN77yfPC9zcGFuPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PjwvZGl2PmA7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAobW9kZSA9PT0gJ2FyaWEnKSB7CiAgICAgICAgICAgICAgICAgICAgbGV0IGFsaW5rID0gdGhpcy5jb252ZXJ0TGlua1RvQXJpYShkbGluaywgZmlsZW5hbWUsIHBhbi51YSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiAoYWxpbmspID09PSAnb2JqZWN0JykgewogICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50ICs9IGA8ZGl2IGNsYXNzPSJwbC1pdGVtIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJwbC1pdGVtLW5hbWUgbGlzdGVuZXItdGlwIiBkYXRhLXNpemU9IiR7c2l6ZX0iPiR7ZmlsZW5hbWV9PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgY2xhc3M9InBsLWl0ZW0tbGluayBwbC1hIiB0YXJnZXQ9Il9ibGFuayIgaHJlZj0iJHthbGluay5saW5rfSIgdGl0bGU9IueCueWHu+WkjeWItmFyaWEyY+mTvuaOpSIgZGF0YS1maWxlbmFtZT0iJHtmaWxlbmFtZX0iIGRhdGEtbGluaz0iJHthbGluay5saW5rfSI+JHtkZWNvZGVVUklDb21wb25lbnQoYWxpbmsudGV4dCl9PC9hPiA8L2Rpdj5gOwogICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGFsaW5rQWxsVGV4dCArPSBhbGluayArICdcclxuJzsKICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudCArPSBgPGRpdiBjbGFzcz0icGwtaXRlbSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0icGwtaXRlbS1uYW1lIGxpc3RlbmVyLXRpcCIgZGF0YS1zaXplPSIke3NpemV9Ij4ke2ZpbGVuYW1lfTwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhIGNsYXNzPSJwbC1pdGVtLWxpbmsgcGwtYSBsaXN0ZW5lci1saW5rLWFyaWEiIGhyZWY9IiR7YWxpbmt9IiB0aXRsZT0i54K55Ye75aSN5Yi2YXJpYTJj6ZO+5o6lIiBkYXRhLWZpbGVuYW1lPSIke2ZpbGVuYW1lfSIgZGF0YS1saW5rPSIke2FsaW5rfSI+JHtkZWNvZGVVUklDb21wb25lbnQoYWxpbmspfTwvYT4gPC9kaXY+YDsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAobW9kZSA9PT0gJ3JwYycpIHsKICAgICAgICAgICAgICAgICAgICBjb250ZW50ICs9IGA8ZGl2IGNsYXNzPSJwbC1pdGVtIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJwbC1pdGVtLW5hbWUgbGlzdGVuZXItdGlwIiBkYXRhLXNpemU9IiR7c2l6ZX0iPiR7ZmlsZW5hbWV9PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGJ1dHRvbiBjbGFzcz0icGwtaXRlbS1saW5rIGxpc3RlbmVyLWxpbmstcnBjIHBsLWJ0bi1wcmltYXJ5IHBsLWJ0bi1pbmZvIiBkYXRhLWZpbGVuYW1lPSIke2ZpbGVuYW1lfSIgZGF0YS1saW5rPSIke2RsaW5rfSI+PGVtIGNsYXNzPSJpY29uIGljb24tZGV2aWNlIj48L2VtPjxzcGFuIHN0eWxlPSJtYXJnaW4tbGVmdDogNXB4OyI+5o6o6YCB5YiwIFJQQyDkuIvovb3lmag8L3NwYW4+PC9idXR0b24+PC9kaXY+YDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlmIChtb2RlID09PSAnY3VybCcpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgYWxpbmsgPSB0aGlzLmNvbnZlcnRMaW5rVG9DdXJsKGRsaW5rLCBmaWxlbmFtZSwgcGFuLnVhKTsKICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIChhbGluaykgPT09ICdvYmplY3QnKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQgKz0gYDxkaXYgY2xhc3M9InBsLWl0ZW0iPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9InBsLWl0ZW0tbmFtZSBsaXN0ZW5lci10aXAiIGRhdGEtc2l6ZT0iJHtzaXplfSI+JHtmaWxlbmFtZX08L2Rpdj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8YSBjbGFzcz0icGwtaXRlbS1saW5rIHBsLWEiIHRhcmdldD0iX2JsYW5rIiBocmVmPSIke2FsaW5rLmxpbmt9IiB0aXRsZT0i54K55Ye75aSN5Yi2Y3VybOmTvuaOpSIgZGF0YS1maWxlbmFtZT0iJHtmaWxlbmFtZX0iIGRhdGEtbGluaz0iJHthbGluay5saW5rfSI+JHtkZWNvZGVVUklDb21wb25lbnQoYWxpbmsudGV4dCl9PC9hPiA8L2Rpdj5gOwogICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGFsaW5rQWxsVGV4dCArPSBhbGluayArICdcclxuJzsKICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudCArPSBgPGRpdiBjbGFzcz0icGwtaXRlbSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBjbGFzcz0icGwtaXRlbS1uYW1lIGxpc3RlbmVyLXRpcCIgZGF0YS1zaXplPSIke3NpemV9Ij4ke2ZpbGVuYW1lfTwvZGl2PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxhIGNsYXNzPSJwbC1pdGVtLWxpbmsgcGwtYSBsaXN0ZW5lci1saW5rLWFyaWEiIGhyZWY9IiR7YWxpbmt9IiB0aXRsZT0i54K55Ye75aSN5Yi2Y3VybOmTvuaOpSIgZGF0YS1maWxlbmFtZT0iJHtmaWxlbmFtZX0iIGRhdGEtbGluaz0iJHthbGlua30iPiR7ZGVjb2RlVVJJQ29tcG9uZW50KGFsaW5rKX08L2E+IDwvZGl2PmA7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKG1vZGUgPT09ICdiYycpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgYWxpbmsgPSB0aGlzLmNvbnZlcnRMaW5rVG9CQyhkbGluaywgZmlsZW5hbWUsIHBhbi51YSk7CiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiAoYWxpbmspID09PSAnb2JqZWN0JykgewogICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50ICs9IGA8ZGl2IGNsYXNzPSJwbC1pdGVtIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJwbC1pdGVtLW5hbWUgbGlzdGVuZXItdGlwIiBkYXRhLXNpemU9IiR7c2l6ZX0iPiR7ZmlsZW5hbWV9PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgY2xhc3M9InBsLWl0ZW0tbGluayBwbC1hIiBocmVmPSIke2RlY29kZVVSSUNvbXBvbmVudChhbGluay5saW5rKX0iIHRpdGxlPSLngrnlh7vnlKjmr5TnibnlvZfmmJ/kuIvovb0iIGRhdGEtZmlsZW5hbWU9IiR7ZmlsZW5hbWV9IiBkYXRhLWxpbms9IiR7YWxpbmt9Ij4ke2RlY29kZVVSSUNvbXBvbmVudChhbGluay50ZXh0KX08L2E+IDwvZGl2PmA7CiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgICAgYWxpbmtBbGxUZXh0ICs9IGFsaW5rICsgJ1xyXG4nOwogICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50ICs9IGA8ZGl2IGNsYXNzPSJwbC1pdGVtIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSJwbC1pdGVtLW5hbWUgbGlzdGVuZXItdGlwIiBkYXRhLXNpemU9IiR7c2l6ZX0iPiR7ZmlsZW5hbWV9PC9kaXY+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGEgY2xhc3M9InBsLWl0ZW0tbGluayBwbC1hIiB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HRpbmdfcnBjX3BvcnQnKSwKICAgICAgICAgICAgICAgIHBhdGg6IGJhc2UuZ2V0VmFsdWUoJ3NldHRpbmdfcnBjX3BhdGgnKSwKICAgICAgICAgICAgICAgIHRva2VuOiBiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3JwY190b2tlbicpLAogICAgICAgICAgICAgICAgZGlyOiBiYXNlLmdldFZhbHVlKCdzZXR0aW5nX3JwY19kaXInKSwKICAgICAgICAgICAgfTsKICAgICAgICAgICAgbGV0IEJEVVNTID0gdGhpcy5nZXRCRFVTUygpOwogICAgICAgICAgICBpZiAoIUJEVVNTKSByZXR1cm4gJ2Fzc2lzdGFudCc7CgogICAgICAgICAgICBsZXQgdXJsID0gYCR7cnBjLmRvbWFpbn06JHtycGMucG9ydH0ke3JwYy5wYXRofWA7CiAgICAgICAgICAgIGxldCBycGNEYXRhID0gewogICAgICAgICAgICAgICAgaWQ6IG5ldyBEYXRlKCkuZ2V0VGltZSgpLAogICAgICAgICAgICAgICAganNvbnJwYzogJzIuMCcsCiAgICAgICAgICAgICAgICBtZXRob2Q6ICdhcmlhMi5hZGRVcmknLAogICAgICAgICAgICAgICAgcGFyYW1zOiBbYHRva2VuOiR7cnBjLnRva2VufWAsIFtsaW5rXSwgewogICAgICAgICAgICAgICAgICAgIGRpcjogcnBjLmRpciwKICAgICAgICAgICAgICAgICAgICBvdXQ6IGZpbGVuYW1lLAogICAgICAgICAgICAgICAgICAgIGhlYWRlcjogW2BVc2VyLUFnZW50OiAke3Bhbi51YX1gLCBgQ29va2llOiBCRFVTUz0ke0JEVVNTfWBdCiAgICAgICAgICAgICAgICB9XQogICAgICAgICAgICB9OwogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgbGV0IHJlcyA9IGF3YWl0IGJhc2UucG9zdCh1cmwsIHJwY0RhdGEsIHsiVXNlci1BZ2VudCI6IHBhbi51YX0sICcnKTsKICAgICAgICAgICAgICAgIGlmIChyZXMucmVzdWx0KSByZXR1cm4gJ3N1Y2Nlc3MnOwogICAgICAgICAgICAgICAgcmV0dXJuICdmYWlsJzsKICAgICAgICAgICAgfSBjYXRjaCAoZSkgewogICAgICAgICAgICAgICAgcmV0dXJuICdmYWlsJzsKICAgICAgICAgICAgfQogICAgICAgIH0sCgogICAgICAgIGdldFNlbGVjdGVkTGlzdCgpIHsKICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIHJldHVybiByZXF1aXJlKCdzeXN0ZW0tY29yZTpjb250ZXh0L2NvbnRleHQuanMnKS5pbnN0YW5jZUZvclN5c3RlbS5saXN0LmdldFNlbGVjdGVkKCk7CiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsKICAgICAgICAgICAgICAgIHJldHVybiBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCcud3Atcy1jb3JlLXBhbicpLl9fdnVlX18uc2VsZWN0ZWRMaXN0OwogICAgICAgICAgICB9CiAgICAgICAgfSwKCiAgICAgICAgZ2V0TG9naWQoKSB7CiAgICAgICAgICAgIGxldCB1dCA9IHJlcXVpcmUoInN5c3RlbS1jb3JlOmNvbnRleHQvY29udGV4dC5qcyIpLmluc3RhbmNlRm9yU3lzdGVtLnRvb2xzLmJhc2VTZXJ2aWNlOwogICAgICAgICAgICByZXR1cm4gdXQuYmFzZTY0RW5jb2RlKGJhc2UuZ2V0Q29va2llKCJCQUlEVUlEIikpOwogICAgICAgIH0sCgogICAgICAgIGdldFNoYXJlRGF0YSgpIHsKICAgICAgICAgICAgbGV0IHJlcyA9IGxvY2Fscy5kdW1wKCk7CiAgICAgICAgICAgIHBhcmFtcy5zaGFyZVR5cGUgPSAnc2VjcmV0JzsKICAgICAgICAgICAgcGFyYW1zLnNpZ24gPSAnJzsKICAgICAgICAgICAgcGFyYW1zLnRpbWVzdGFtcCA9ICcnOwogICAgICAgICAgICBwYXJhbXMuYmRzdG9rZW4gPSByZXMuYmRzdG9rZW4udmFsdWU7CiAgICAgICAgICAgIHBhcmFtcy5jaGFubmVsID0gJ2NodW5sZWknOwogICAgICAgICAgICBwYXJhbXMuY2xpZW50dHlwZSA9IDA7CiAgICAgICAgICAgIHBhcmFtcy53ZWIgPSAxOwogICAgICAgICAgICBwYXJhbXMuYXBwX2lkID0gMjUwNTI4OwogICAgICAgICAgICBwYXJhbXMuZW5jcnlwdCA9IDA7CiAgICAgICAgICAgIHBhcmFtcy5wcm9kdWN0ID0gJ3NoYXJlJzsKICAgICAgICAgICAgcGFyYW1zLmxvZ2lkID0gdGhpcy5nZXRMb2dpZCgpOwogICAgICAgICAgICBwYXJhbXMucHJpbWFyeWlkID0gcmVzLnNoYXJlaWQudmFsdWU7CiAgICAgICAgICAgIHBhcmFtcy51ayA9IHJlcy5zaGFyZV91ay52YWx1ZTsKICAgICAgICAgICAgcGFyYW1zLnNoYXJlVHlwZSA9PT0gJ3NlY3JldCcgJiYgKHBhcmFtcy5leHRyYSA9IHRoaXMuX2dldEV4dHJhKCkpOwogICAgICAgICAgICBwYXJhbXMuc3VybCA9IHRoaXMuX2dldFN1cmwoKTsKICAgICAgICB9LAoKICAgICAgICBkZXRlY3RQYWdlKCkgewogICAgICAgICAgICBsZXQgcGF0aCA9IGxvY2F0aW9uLnBhdGhuYW1lOwogICAgICAgICAgICBpZiAoL15cL2Rpc2tcL2hvbWUvLnRlc3QocGF0aCkpIHJldHVybiAnaG9tZSc7CiAgICAgICAgICAgIGlmICgvXlwvZGlza1wvbWFpbi8udGVzdChwYXRoKSkgcmV0dXJuICdtYWluJzsKICAgICAgICAgICAgaWYgKC9eXC8oc3xzaGFyZSlcLy8udGVzdChwYXRoKSkgcmV0dXJuICdzaGFyZSc7CiAgICAgICAgICAgIHJldHVybiAnJzsKICAgICAgICAgICAgcmV0dXJuICcnOwogICAgICAgIH0sCgogICAgICAgIHNob3dNYWluRGlhbG9nKHRpdGxlLCBodG1sLCBmb290ZXIpIHsKICAgICAgICAgICAgU3dhbC5maXJlKHsKICAgICAgICAgICAgICAgIHRpdGxlLAogICAgICAgICAgICAgICAgaHRtbCwKICAgICAgICAgICAgICAgIGZvb3RlciwKICAgICAgICAgICAgICAgIGFsbG93T3V0c2lkZUNsaWNrOiBmYWxzZSwKICAgICAgICAgICAgICAgIHNob3dDbG9zZUJ1dHRvbjogdHJ1ZSwKICAgICAgICAgICAgICAgIHNob3dDb25maXJtQnV0dG9uOiBmYWxzZSwKICAgICAgICAgICAgICAgIHBvc2l0aW9uOiAndG9wJywKICAgICAgICAgICAgICAgIHdpZHRoLAogICAgICAgICAgICAgICAgcGFkZGluZzogJzE1cHggMjBweCA1cHgnLAogICAgICAgICAgICAgICAgY3VzdG9tQ2xhc3MsCiAgICAgICAgICAgIH0pLnRoZW4oKCkgPT4gewogICAgICAgICAgICAgICAgdGhpcy5fcmVzZXREYXRhKCk7CiAgICAgICAgICAgIH0pOwogICAgICAgIH0sCgogICAgICAgIGFzeW5jIGluaXRQYW5MaW5rZXIoKSB7CiAgICAgICAgICAgIGJhc2UuaW5pdERlZmF1bHRDb25maWcoKTsKICAgICAgICAgICAgYmFzZS5hZGRQYW5MaW5rZXJTdHlsZSgpOwogICAgICAgICAgICBwdCA9IHRoaXMuZGV0ZWN0UGFnZSgpOwogICAgICAgICAgICBsZXQgcmVzID0gYXdhaXQgYmFzZS5wb3N0CiAgICAgICAgICAgIChgaHR0cHM6Ly9hcGkueW91eGlhb2hvdS5jb20vY29uZmlnP3Zlcj0ke3ZlcnNpb259JmE9JHthdXRob3J9YCwge30sIHt9LCAndGV4dCcpOwogICAgICAgICAgICBwYW4gPSBKU09OLnBhcnNlKGJhc2UuZChyZXMpKTsKICAgICAgICAgICAgT2JqZWN0LmZyZWV6ZSAmJiBPYmplY3QuZnJlZXplKHBhbik7CiAgICAgICAgICAgIGNvbnNvbGUubG9nKHBhbik7CiAgICAgICAgICAgIHBhbi5udW0gPT09IGJhc2UuZ2V0VmFsdWUoJ3NldHRpbmdfaW5pdF9jb2RlJykgPyB0aGlzLmFkZEJ1dHRvbigpIDogdGhpcy5hZGRJbml0QnV0dG9uKCk7CiAgICAgICAgICAgIGJhc2UuY3JlYXRlVGlwKCk7CiAgICAgICAgICAgIGJhc2UucmVnaXN0ZXJNZW51Q29tbWFuZCgpOwogICAgICAgIH0KICAgIH07CgogICAgbGV0IG1haW4gPSB7CiAgICAgICAgaW5pdCgpIHsKICAgICAgICAgICAgaWYgKC8ocGFufHl1bikuYmFpZHUuY29tLy50ZXN0KGxvY2F0aW9uLmhvc3QpKSB7CiAgICAgICAgICAgICAgICBiYWlkdS5pbml0UGFuTGlua2VyKCk7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICB9OwoKICAgIG1haW4uaW5pdCgpOwogICAgfQogICAgfQp9KSgpOw==
Add Comment
Please, Sign In to add comment