Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥⚙ 轻合集设置 ⚙@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcInRleHRfMVwiLFwibmFtZVwiOlwiQ2xhc3NUYWJcIixcInBhdGhcIjpcIkNsYXNzVGFiXCIsXCJydWxlXCI6XCJmdW5jdGlvbiBDbGFzc1RhYihjbGFzc0FycmF5LCBwYXJhbXMpIHtcXG4gICAgT2JqZWN0LmFzc2lnbih0aGlzLCBwYXJhbXMpXFxuICAgIHRoaXMuYXJyID0gY2xhc3NBcnJheS5tYXAodiA9PiB0aGlzLmluaXQodikpXFxuICAgIHRoaXMuc2lnbiA9ICckJyArIE1ZX1JVTEUudGl0bGUgKyAnXycgKyAodGhpcy5uYW1lIHx8ICcnKSArICdfJ1xcbiAgICB0aGlzLmNvbG9yID0gdGhpcy5jb2xvciB8fCAnIzEyYjY2OCdcXG4gICAgdGhpcy5ib3VuZGFyeSA9IHRoaXMuYm91bmRhcnkgfHwgJ2JsYW5rX2Jsb2NrJ1xcbn1cXG5DbGFzc1RhYi5wcm90b3R5cGUgPSB7XFxuICAgIGNvbnN0cnVjdG9yOiBDbGFzc1RhYixcXG4gICAgbG9hZChlbCkge1xcbiAgICAgICAgbGV0IGZvbGRlZCA9IGdldFZhcignZm9sZF8nICsgdGhpcy5zaWduLCAnJylcXG4gICAgICAgIGlmICh0aGlzLmZvbGQpIGVsLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAn4oCc4oCc4oCd4oCdPHNwYW4gc3R5bGU9XFxcImNvbG9yOiMwNDllZmZcXFwiPicgKyAoZm9sZGVkID8gJ+KWticgOiAn4pa8JyksXFxuICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChzaWduLCBmb2xkZWQpID0+IHtcXG4gICAgICAgICAgICAgICAgcHV0VmFyKCdmb2xkXycgKyBzaWduLCB7ICcnOiAnVCcsICdUJzogJycgfSBbZm9sZGVkXSlcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LCB0aGlzLnNpZ24sIGZvbGRlZCksXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgfSlcXG4gICAgICAgIGxldCBhcnIgPSBmb2xkZWQgPyBbdGhpcy5hcnJbMF1dIDogdGhpcy5hcnJcXG4gICAgICAgIGFyci5mb3JFYWNoKCh2KSA9PiB7XFxuICAgICAgICAgICAgbGV0IHsgaWQsIGNsYXNzX25hbWUsIGNsYXNzX3VybCB9ID0gdixcXG4gICAgICAgICAgICAgICAgc2VsZWN0ZWQgPSBKU09OLnN0cmluZ2lmeSh0aGlzLmdldENsYXNzKGlkKSlcXG4gICAgICAgICAgICBjbGFzc19uYW1lLmZvckVhY2goKG5hbWUsIGkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHVybCA9IGNsYXNzX3VybFtpXSxcXG4gICAgICAgICAgICAgICAgICAgIG5vdyA9IEpTT04uc3RyaW5naWZ5KHsgbmFtZTogbmFtZSwgdXJsOiB1cmwgfSlcXG4gICAgICAgICAgICAgICAgZWwucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogKHNlbGVjdGVkID09IG5vdyA/ICfigJzigJzigJ3igJ08c3BhbiBzdHlsZT1cXFwiY29sb3I6JyArIHRoaXMuY29sb3IgKyAnXFxcIj48Yj4nIDogJycpICsgbmFtZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoc2lnbiwgaWQsIG5vdykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihzaWduICsgaWQsIG5vdylcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoc2lnbiwgbm93KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgICAgIH0sIHRoaXMuc2lnbiwgaWQsIG5vdyksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBlbC5wdXNoKHsgY29sX3R5cGU6IHRoaXMuYm91bmRhcnkgfSlcXG4gICAgICAgIH0pXFxuICAgIH0sXFxuICAgIGluaXQoY2xhc3NPYmplY3QpIHtcXG4gICAgICAgIGlmICh0eXBlb2YgY2xhc3NPYmplY3QuY2xhc3NfbmFtZSA9PSAnc3RyaW5nJylcXG4gICAgICAgICAgICBjbGFzc09iamVjdC5jbGFzc19uYW1lID0gY2xhc3NPYmplY3QuY2xhc3NfbmFtZS5zcGxpdCgnJicpXFxuICAgICAgICBpZiAodHlwZW9mIGNsYXNzT2JqZWN0LmNsYXNzX3VybCA9PSAnc3RyaW5nJylcXG4gICAgICAgICAgICBjbGFzc09iamVjdC5jbGFzc191cmwgPSBjbGFzc09iamVjdC5jbGFzc191cmwuc3BsaXQoJyYnKVxcb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AgICB9XFxuICAgIHNldEhvbWVSZXN1bHQgPSBzZXRSZXN1bHRcXG4gICAgc2V0U2VhcmNoUmVzdWx0ID0gc2V0UmVzdWx0XFxuXFxuICAgIGV2YWwoTVlfUlVMRS5maW5kX3J1bGUuc2xpY2UoMykpXFxufSBlbHNlIHtcXG4gICAgbGV0IGZpbmRSdWxlID0gTVlfUlVMRS5maW5kX3J1bGUuc3BsaXQoJzsnKVxcbiAgICBwYXJzZURvbUZvckFycmF5KGluZGV4SHRtbCwgZmluZFJ1bGUuc2hpZnQoKSkuZm9yRWFjaCgoZGF0YSkgPT4ge1xcbiAgICAgICAgbGV0IFt0aXRsZSwgaW1nLCBkZXNjLCB1cmxdID0gZmluZFJ1bGUubWFwKCh2LCBpKSA9PiB7XFxuICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAodiA9PSAnKicpIHJldHVybiAnJ1xcbiAgICAgICAgICAgICAgICAgICAgZWxzZSB2ID0gKGkgPT0gMSB8fCBpID09IDMpID9cXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZURvbShkYXRhLCB2KSA6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VEb21Gb3JIdG1sKGRhdGEsIHYpXFxuICAgICAgICAgICAgICAgICAgICBpZiAoaSAhPSAzKSB2ID0gcnVuQ29kZSh2KVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkgeyByZXR1cm4gJycgfVxcbiAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgIHJlcyA9IHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICB1cmw6IHVybCxcXG4gICAgICAgICAgICAgICAgZGVzYzogZGVzYyxcXG4gICAgICAgICAgICAgICAgaW1nOiBpbWcsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBNWV9SVUxFLmNvbF90eXB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1hdGNoKC9eKFtcXFxcc1xcXFxTXSo/KUBydWxlPShbXFxcXHNcXFxcU10qKSQvKVxcbiAgICAgICAgICAgICAgICB2LnVybCA9IHVybFxcbiAgICAgICAgICAgICAgICBNWV9fUlVMRS5kZXRhaWxfZmluZF9ydWxlID0gcnVsZVxcbiAgICAgICAgICAgICAgICBNWV9fUlVMRS5kZXRhaWxfY29sX3R5cGUgPSBNWV9SVUxFLmNvbF90eXBlXFxuICAgICAgICAgICAgfSBlbHNlIGlmICh2LnVybC5zdGFydHNXaXRoKCdoaWtlcjovL3BhZ2UvJykpIHtcXG4gICAgICAgICAgICAgICAgaWYgKHYudXJsLmluY2x1ZGVzKCdydWxlPScpIHx8ICh2LmV4dHJhIHx8IHt9KS5ydWxlKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZcXG4gICAgICAgICAgICAgICAgbGV0IFtfLCBwYXRoLCBwYXJhbXNdID0gdi51cmwuc3BsaXQoJyMnKVswXS5tYXRjaCgvXmhpa2VyOlxcXFwvXFxcXC9wYWdlXFxcXC8oLis/KSg/OlxcXFw/KC4qKSk/JC8pLFxcbiAgICAgICAgICAgICAgICAgICAgc3ViUGFnZSA9IE1ZX1JVTEUucGFnZUxpc3QuZmluZCgodikgPT4gdi5wYXRoID09IHBhdGgpLFxcbiAgICAgICAgICAgICAgICAgICAgc3ViVXJsID0gKHBhcmFtcyB8fCAnJykuc3BsaXQoJyYnKS5maW5kKCh2KSA9PiB2LnN0YXJ0c1dpdGgoJ3VybD0nKSlcXG4gICAgICAgICAgICAgICAgdi51cmwgPSBzdWJVcmwgPyBzdWJVcmwuc2xpY2UoNCkucmVwbGFjZSgv77yf77yfL2csICc/JykucmVwbGFjZSgv77yG77yGL2csICcmJykgOiAodi5leHRyYSB8fCB7fSkudXJsIHx8ICdoaWtlcjovL2VtcHR5PycgKyAocGFyYW1zIHx8ICcnKVxcbiAgICAgICAgICAgICAgICBNWV9fUlVMRS5kZXRhaWxfZmluZF9ydWxlID0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uICAgIH1cXG4gICAgc2V0SG9tZVJlc3VsdCA9IHNldFJlc3VsdFxcbiAgICBzZXRTZWFyY2hSZXN1bHQgPSBzZXRSZXN1bHRcXG5cXG4gICAgZXZhbChNWV9SVUxFLmZpbmRfcnVsZS5zbGljZSgzKSlcXG59IGVsc2Uge1xcbiAgICBsZXQgW18sIGZpbmRSdWxlLCBkZXRhaWxGaW5kUnVsZV0gPSBNWV9SVUxFLmZpbmRfcnVsZS5tYXRjaCgvXiguKj8pKD86PT0+KC4qKSk/JC8pXFxuICAgIGZpbmRSdWxlID0gZmluZFJ1bGUuc3BsaXQoJzsnKVxcbiAgICBwYXJzZURvbUZvckFycmF5KGluZGV4SHRtbCwgZmluZFJ1bGUuc2hpZnQoKSkuZm9yRWFjaCgoZGF0YSkgPT4ge1xcbiAgICAgICAgbGV0IFt0aXRsZSwgaW1nLCBkZXNjLCB1cmxdID0gZmluZFJ1bGUubWFwKCh2LCBpKSA9PiB7XFxuICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAodiA9PSAnKicpIHJldHVybiAnJ1xcbiAgICAgICAgICAgICAgICAgICAgZWxzZSB2ID0gKGkgPT0gMSB8fCBpID09IDMpID9cXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZURvbShkYXRhLCB2KSA6XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VEb21Gb3JIdG1sKGRhdGEsIHYpXFxuICAgICAgICAgICAgICAgICAgICBpZiAoaSAhPSAzKSB2ID0gcnVuQ29kZSh2KVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkgeyByZXR1cm4gJycgfVxcbiAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgIHJlcyA9IHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICB1cmw6IHVybCxcXG4gICAgICAgICAgICAgIC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gICBzZXRSZXN1bHQobXlDb2xsZWN0aW9uX2VsKVxcbn1cXG5cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuW3peWFt+mbhlwiLFwicGF0aFwiOlwidXRpbGl0eVwiLFwicnVsZVwiOlwiJC5leHBvcnRzID0ge1xcbiAgICBkYXRhTG9hZDogZnVuY3Rpb24oc2hvd0FsbCkge1xcbiAgICAgICAgLy/mo4Dmn6Xpl7TpmpTvvIzpu5jorqTkuIDlpKlcXG4gICAgICAgIGxldCBtaW4gPSA2MCAqIDI0ICogMSxcXG4gICAgICAgICAgICBkYXRhID0gW10sXFxuICAgICAgICAgICAgdGltZSA9IHBhcnNlSW50KHJlYWRGaWxlKCd1cGRhdGV0aW1lJykpIHx8IDAsXFxuICAgICAgICAgICAgbm93ID0gbmV3IERhdGUoKS5nZXRUaW1lKClcXG4gICAgICAgIGlmIChub3cgLSB0aW1lID4gMTAwMCAqIDYwICogbWluKSB7XFxuICAgICAgICAgICAgbG9nKCfmm7TmlrDkuobmlbDmja4nKVxcbiAgICAgICAgICAgIC8vIOiOt+WPlui/nOeoi+aVsOaNrlxcbiAgICAgICAgICAgIGxldCB1cmwgPSBnZXRJdGVtKCdyZW1vdGVVcmwnKVxcbiAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgIGRhdGEgPSBmZXRjaCh1cmwpXFxuICAgICAgICAgICAgICAgIGlmICh1cmwuc3RhcnRzV2l0aCgnaGlrZXI6Ly9wYWdlLycpKVxcbiAgICAgICAgICAgICAgICAgICAgZGF0YSA9IEpTT04ucGFyc2UoZGF0YSkucnVsZVxcbiAgICAgICAgICAgICAgICBkYXRhID0gSlNPTi5wYXJzZShkYXRhKVxcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgZGF0YSA9IFtdXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGRhdGEgPSBkYXRhLmZpbHRlcigodikgPT4geyByZXR1cm4gdi50aXRsZSAhPSBnZXRJdGVtKCdteUNvbGxlY3Rpb24nKSAmJiAhdi5hdXRob3IuaW5jbHVkZXMoJ+i9u+WQiOmbhueUn+aIkOWZqCcpIH0pXFxuICAgICAgICAgICAgc2F2ZUZpbGUoJ2RhdGFDYWNoZScsIEpTT04uc3RyaW5naWZ5KGRhdGEpKVxcbiAgICAgICAgICAgIHNhdmVGaWxlKCd1cGRhdGV0aW1lJywgJycgKyBub3cpXFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGxvZygn5rKh5pyJ5pu05paw5pWw5o2uJylcXG4gICAgICAgICAgICBkYXRhID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnZGF0YUNhY2hlJykpXFxuICAgICAgICB9XFxuICAgICAgICAvLyDlhpnlhaXoh6rlrprkuYnmlbDmja5cXG4gICAgICAgIGxldCBjdXN0b21EYXRhID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpLFxcbiAgICAgICAgICAgIHJld3JpdGVEYXRhID0gW11cXG4gICAgICAgIGN1c3RvbURhdGEgPSBjdXN0b21EYXRhLnJlZHVjZSgoc2VsZiwgdikgPT4ge1xcbiAgICAgICAgICAgIGxldCBpbmRleCA9IGRhdGEuZmluZEluZGV4KCh2dikgPT4gdi50aXRsZSA9PSB2di50aXRsZSlcXG4gICAgICAgICAgICBpZiAoaW5kZXggPj0gMCkge1xcbiAgICAgICAgICAgICAgICBzZWxmLnB1c2godilcXG4gICAgICAgICAgICAgICAgbGV0IHJ1bGUgPSBkYXRhLnNwbGljZShpbmRleCwgMSlbMF1cXG4gICAgICAgICAgICAgICAgaWYoc2hvd0FsbCB8fCB2LnZpc2libGUpXFxuICAgICAgICAgICAgICAgICAgICByZXdyaXRlRGF0YS5wdXNoKE9iamVjdC5hc3NpZ24ocnVsZSwgdikpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiBzZWxmXFxuICAg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YWdlTnVtID09IDEgPyB1cmxbMF1bMl0gOiB1cmxbMF1bMV0pXFxuICAgICAgICBsZXQgb3B0aW9ucyA9IHsgaGVhZGVyczogaGVhZGVycywgbWV0aG9kOiB1cmxbMV0gfVxcbiAgICAgICAgLy8gcG9zdOaWueazleaXtui9rOaNouWPguaVsFxcbiAgICAgICAgaWYgKC9ecG9zdCQvaS50ZXN0KG9wdGlvbnNbJ21ldGhvZCddKSkge1xcbiAgICAgICAgICAgIGxldCBbb3JpVXJsLCBib2R5XSA9IHVybFswXS5zcGxpdCgnPycpXFxuICAgICAgICAgICAgdXJsWzBdID0gb3JpVXJsLnJlcGxhY2UoL++8n++8ny9nLCAnPycpXFxuICAgICAgICAgICAgaWYgKGJvZHkuc3RhcnRzV2l0aCgnSnNvbkJvZHk9JykpIGJvZHkgPSBib2R5LnNsaWNlKDkpXFxuICAgICAgICAgICAgb3B0aW9uc1snYm9keSddID0gYm9keVxcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKHVybFsyXSkgb3B0aW9ucy5oZWFkZXJzWydDb250ZW50LVR5cGUnXSA9ICd0ZXh0L3BsYWluO2NoYXJzdD0nICsgdXJsWzJdXFxuICAgICAgICBpZiAodXJsWzNdKSB1cmxbM10ubWF0Y2goL3soLiopfS8pWzFdLnNwbGl0KCcmJicpLmZvckVhY2goKHYpID0+IHtcXG4gICAgICAgICAgICBsZXQgW2tleSwgdmFsdWVdID0gdi5zcGxpdCgnQCcpXFxuICAgICAgICAgICAgb3B0aW9ucy5oZWFkZXJzW2tleV0gPSBydW5Db2RlKHZhbHVlKVxcbiAgICAgICAgfSlcXG4gICAgICAgIC8vIOa3u+WKoOWFqOWxgFVBXFxuICAgICAgICBpZiAoIW9wdGlvbnMuaGVhZGVyc1snVXNlci1BZ2VudCddKSB7XFxuICAgICAgICAgICAgaWYgKE1ZX1JVTEUudWEgPT0gJ3BjJylcXG4gICAgICAgICAgICAgICAgb3B0aW9ucy5oZWFkZXJzWydVc2VyLUFnZW50J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VtZSMnXFxuICAgICAgICAgICAgcmV0dXJuIHZcXG4gICAgICAgIH0pKVxcbiAgICAgICAgbWV0aG9kX3NldFJlc3VsdC5pbnZva2UoamF2YUNvbnRleHQsIG15Q29sbGVjdGlvbl9lbCwgcGFyYW0xLCBwYXJhbTIsIHBhcmFtMylcXG4gICAgfVxcbiAgICBzZXRIb21lUmVzdWx0ID0gc2V0UmVzdWx0XFxuICAgIHNldFNlYXJjaFJlc3VsdCA9IHNldFJlc3VsdFxcblxcbiAgICBldmFsKE1ZX1JVTEUuZmluZF9ydWxlLnNsaWNlKDMpKVxcbn0gZWxzZSB7XFxuICAgIGxldCBmaW5kUnVsZSA9IE1ZX1JVTEUuZmluZF9ydWxlLnNwbGl0KCc7JylcXG4gICAgcGFyc2VEb21Gb3JBcnJheShpbmRleEh0bWwsIGZpbmRSdWxlLnNoaWZ0KCkpLmZvckVhY2goKGRhdGEpID0+IHtcXG4gICAgICAgIGxldCBbdGl0bGUsIHVybCwgZGVzYywgY29udGVudCwgaW1nXSA9IGZpbmRSdWxlLm1hcCgodiwgaSkgPT4ge1xcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHYgPT0gJyonKSByZXR1cm4gJydcXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgdiA9IChpID09IDEgfHwgaSA9PSA0KSA/XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VEb20oZGF0YSwgdikgOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlRG9tRm9ySHRtbChkYXRhLCB2KVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGkgIT0gMSkgdiA9IHJ1bkNvZGUodilcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2XFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsgcmV0dXJuICcnIH1cXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICByZXMgPSB7XFxuICAgICAgICAgICAgICAgIHR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kaXRNb2RlID0gZ2V0VmFyKCdteUNvbGxlY3Rpb24tZWRpdE1vZGUnLCAn5ZCv55SoL+emgeeUqCcpXFxuXFxuZWwucHVzaCh7XFxuICAgIHRpdGxlOiAn8J+UjSDmkJzntKLmqKHlvI86ICcgKyAoc2VhcmNoVGhkID09IDAgPyAn5YiXJyA6ICfogZonICsgc2VhcmNoVGhkKSxcXG4gICAgdXJsOiAkKFsn5YiX6KGo5pCc57SiJywgJ+iBmuWQiOaQnOe0oiddLCAxKS5zZWxlY3QoKHNlYXJjaFRoZCkgPT4ge1xcbiAgICAgICAgaWYgKGlucHV0ID09ICfliJfooajmkJzntKInKSB7XFxuICAgICAgICAgICAgc2F2ZUZpbGUoJ3NlYXJjaFRoZCcsICcwJylcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGlmIChzZWFyY2hUaGQgPT0gMCkgc2VhcmNoVGhkID0gNVxcbiAgICAgICAgICAgIHJldHVybiAkKHNlYXJjaFRoZCwgJ+i+k+WFpeaQnOe0oue6v+eoi++8jOacgOWlveS4jeimgei2hei/hzE2JykuaW5wdXQoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICBzYXZlRmlsZSgnc2VhcmNoVGhkJywgaW5wdXQpXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfVxcbiAgICB9LCBzZWFyY2hUaGQpLFxcbiAgICBjb2xfdHlwZTogJ3RleHRfMidcXG59LCB7XFxuICAgIHRpdGxlOiAn8J+WpSDni6znq4vpppbpobU6ICcgKyAobmV3V2luZG93ID8gJ+aYrycgOiAn5ZCmJyksXFxuICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgobmV3V2luZG93KSA9PiB7XFxuICAgICAgICBzYXZlRmlsZSgnbmV3V2luZG93JywgbmV3V2luZG93ID8gJycgOiAnMScpXFxuICAgICAgICBy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oZmFsc2UpXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LCB2KVxcbiAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICBjYXNlICfph43mlrDmjpLluo8nOlxcbiAgICAgICAgICAgIGxldCBzb3J0RmxhZyA9IHBhcnNlSW50KGdldFZhcignbXlDb2xsZWN0aW9uLXNvcnRGbGFnJywgJy0xJykpXFxuICAgICAgICAgICAgZC50aXRsZSA9IChzb3J0RmxhZyA9PSBpID8gJ/CflIQgJyA6ICcnKSArIGQudGl0bGVcXG4gICAgICAgICAgICBpZiAoc29ydEZsYWcgPT0gLTEpXFxuICAgICAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdteUNvbGxlY3Rpb24tc29ydEZsYWcnLCBpLnRvU3RyaW5nKCkpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/pgInmi6nopoHnp7vliqjliLDnmoTkvY3nva4nXFxuICAgICAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICAgICAgZWxzZVxcbiAgICAgICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKG9sZEluZGV4LCBuZXdJbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpXFxuICAgICAgICAgICAgICAgICAgICBydWxlcy5zcGxpY2UobmV3SW5kZXgsIDAsIHJ1bGVzLnNwbGljZShvbGRJbmRleCwgMSlbMF0pXFxuICAgICAgICAgICAgICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSlcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcignbXlDb2xsZWN0aW9uLXNvcnRGbGFnJywgJy0xJylcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LCBzb3J0RmxhZywgaSlcXG4gICAgICAgICAgICBicmVha1xcbiAgICAgICAgY2FzZSAn5pu05pS55Zu+5qCHJzpcXG4gICAgICAgICAgICBkLnVybCA9ICQodi5pY29uIHx8ICcnLCAn6L6T5YWl5paw5Zu+5qCH5Zyw5Z2A5oiW6aKc6Imy5Luj56CB77yaJykuaW5wdXQoKHJ1bGUpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpLFxcbiAgICAgICAgICAgICAgICAgICAgaW5kZXggPSBydWxlcy5maW5kSW5kZXgoKHYpID0+IHYudGl0bGUgPT0gcnVsZS50aXRsZSlcXG4gICAgICAgICAgICAgICAgaWYgKGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXNbaW5kZXhdLmljb24gPSBpbnB1dFxcbiAgICAgICAgICAgICAgICBlbHNlXFxuICAgICAgICAgICAgICAgICAgICBkZWxldGUgcnVsZXNbaW5kZXhdLmljb25cXG4gICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2N1c3RvbURhdGEnLCBKU09OLnN0cmluZ2lmeShydWxlcykpXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgdilcXG4gICAgICAgICAgICBicmVha1xcbiAgICAgICAgY2FzZSAn5a+85YWl5rW36ZiUJzpcXG4gICAgICAgICAgICBkL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fYmxhbmtfYmxvY2snXFxcXG4gICAgfSk7XFxcXG4gICAgaWYgKGdldFZhcignc2hzb3J0JykgPT0gJzEnKSB7XFxcXG4gICAgICAgIGZvciAodmFyIGogPSBsaXN0Lmxlbmd0aCAtIDE7IGogPj0gMDsgai0tKSB7XFxcXG4gICAgICAgICAgICB2YXIgam0gPSBwYXJzZURvbUZvckh0bWwobGlzdFtqXSwgJ1RleHQnKTtcXFxcbiAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGptLFxcXFxuICAgICAgICAgICAgICAgIHVybDogcGFyc2VEb20obGlzdFtqXSwgJ2EmJmhyZWYnKSArIFxcXFxcXFwiI2F1dG9QYWdlIyNyZWFkVGhlbWUjXFxcXFxcXCIgKyBgQHJ1bGU9anM6YCArICQudG9TdHJpbmcoKCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgZCA9IFtdO1xcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgZGVzX3RpdGxlID0gcGFyc2VEb21Gb3JIdG1sKGdldFJlc0NvZGUoKSwgJyNjMSYmaDEmJlRleHQnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnPGJpZz4nICsgZGVzX3RpdGxlICsgJzwvYmlnPicsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3JpY2hfdGV4dCdcXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBjb250ID0gcGFyc2VEb21Gb3JBcnJheShnZXRSZXNDb2RlKCksICcjY29udGVudCYmcCcpO1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IGNvbnQubWFwKGl0ID0+ICfjgIDjgIAnICsgcGFyc2VEb21Gb3JIdG1sKGl0LCAncCYmSHRtbCcpKS5qb2luKFxcXFxcXFwiPGJyPjxicj5cXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogaHRtbCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcInJpY2hfdGV4dFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogMTgsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2s6IHRydWVcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChkKTtcXFxcbiAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogam0ubGVuZ3RoID4gNSA/ICd0ZXh0XzEnIDogJ3RleHRfMScsXFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgfVxcXFxuICAgIH0gZWxzZSB7XFxcXG4gICAgICAgIGZvciAodmFyIGogPSAwOyBqIDwgbGlzdC5sZW5ndGg7IGorKykge1xcXFxuICAgICAgICAgICAgdmFyIGptID0gcGFyc2VEb21Gb3JIdG1sKGxpc3Rbal0sICdUZXh0Jyk7XFxcXG4gICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiBqbSxcXFxcbiAgICAgICAgICAgICAgICB1cmw6IHBhcnNlRG9tKGxpc3Rbal0sICdhJiZocmVmJykgKyBcXFxcXFxcIiNhdXRvUGFnZSMjcmVhZFRoZW1lI1xcXFxcXFwiICsgYEBydWxlPWpzOmAgKyAkLnRvU3RyaW5nKCgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IGQgPSBbXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGRlc190aXRsZSA9IHBhcnNlRG9tRm9ySHRtbChnZXRSZXNDb2RlKCksICcjYzEmJmgxJiZUZXh0Jyk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJzxiaWc+JyArIGRlc190aXRsZSArICc8L2JpZz4nLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdyaWNoX3RleHQnXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgY29udCA9IHBhcnNlRG9tRm9yQXJyYXkoZ2V0UmVzQ29kZSgpLCAnI2NvbnRlbnQmJnAnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSBjb250Lm1hcChpdCA9PiAn44CA44CAJyArIHBhcnNlRG9tRm9ySHRtbChpdCwgJ3AmJkh0bWwnKSkuam9pbihcXFxcXFxcIjxicj48YnI+XFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGh0bWwsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJyaWNoX3RleHRcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IDE4LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiB0cnVlXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICBzZXRSZXN1bHQoZCk7XFxcXG4gICAgICAgICAgICAgICAgfSksXFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IGptLmxlbmd0aCA+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xlID8gJ/Cfn6IgJyA6ICfwn5S0ICcpICsgZC50aXRsZVxcbiAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocnVsZSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdjdXN0b21EYXRhJykgfHwgJ1tdJyksXFxuICAgICAgICAgICAgICAgICAgICBpbmRleCA9IHJ1bGVzLmZpbmRJbmRleCgodikgPT4gdi50aXRsZSA9PSBydWxlLnRpdGxlKVxcbiAgICAgICAgICAgICAgICBydWxlc1tpbmRleF0udmlzaWJsZSA9ICFydWxlc1tpbmRleF0udmlzaWJsZVxcbiAgICAgICAgICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSlcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LCB2KVxcbiAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICBjYXNlICfph43mlrDmjpLluo8nOlxcbiAgICAgICAgICAgIGxldCBzb3J0RmxhZyA9IHBhcnNlSW50KGdldFZhcignbXlDb2xsZWN0aW9uLXNvcnRGbGFnJywgJy0xJykpXFxuICAgICAgICAgICAgZC50aXRsZSA9IChzb3J0RmxhZyA9PSBpID8gJ/CflIQgJyA6ICcnKSArIGQudGl0bGVcXG4gICAgICAgICAgICBpZiAoc29ydEZsYWcgPT0gLTEpXFxuICAgICAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdteUNvbGxlY3Rpb24tc29ydEZsYWcnLCBpLnRvU3RyaW5nKCkpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/pgInmi6nopoHnp7vliqjliLDnmoTkvY3nva4nXFxuICAgICAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICAgICAgZWxzZVxcbiAgICAgICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKG9sZEluZGV4LCBuZXdJbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpXFxuICAgICAgICAgICAgICAgICAgICBydWxlcy5zcGxpY2UobmV3SW5kZXgsIDAsIHJ1bGVzLnNwbGljZShvbGRJbmRleCwgMSlbMF0pXFxuICAgICAgICAgICAgICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSlcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcignbXlDb2xsZWN0aW9uLXNvcnRGbGFnJywgJy0xJylcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LCBzb3J0RmxhZywgaSlcXG4gICAgICAgICAgICBicmVha1xcbiAgICAgICAgY2FzZSAn5pu05pS55Zu+5qCHJzpcXG4gICAgICAgICAgICBkLnVybCA9ICQodi5pY29uIHx8ICcnLCAn6L6T5YWl5paw5Zu+5qCH5Zyw5Z2A5oiW6aKc6Imy5Luj56CB77yaJykuaW5wdXQoKHJ1bGUpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpLFxcbiAgICAgICAgICAgICAgICAgICAgaW5kZXggPSBydWxlcy5maW5kSW5kZXgoKHYpID0+IHYudGl0bGUgPT0gcnVsZS50aXRsZSlcXG4gICAgICAgICAgICAgICAgaWYgKGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXNbaW5kZXhdLmljb24gPSBpbnB1dFxcbiAgICAgICAgICAgICAgICBlbHNlXFxuICAgICAgICAgICAgICAgICAgICBkZWxldGUgcnVsZXNbaW5kZXhdLmljb25cXG4gICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2N1c3RvbURhdGEnLCBKU09OLnN0cmluZ2lmeShydWxlcykpXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgdilcXG4gICAgICAgICAgICBicmVha1xcbiAgICAgICAgY2FzZSAn5a+85YWl5rW36ZiUJzpcXG4gICAgICAgICAgICBkLnVybCA9ICdydWxlOi8vJyArIGJhc2U2NEVuY29kZShKU09OLnN0cmluZ2lmeShkYXRhW2ldKSlcXG4gICAgICAgICAgICBicmVha1xcbiAgICB9XFxuICAgIGVsLnB1c2goZClcXG59KVxcbnNldFJlc3VsdChlbClcXG5cIixcImdyb3VwXCI6XCLikaDovbvlkIjpm4ZcIixcInVhXCI6XCJtb2JpbGVcIixcInByZVJ1bGVcIjpcInNldEl0ZW0oJ215Q29sbGVjdGlvbicsIE1ZX1JVTEUudGl0bGUpXFxuc2V0SXRlbSgncmVtb3RlVXJsJywgJ2hpa2VyOi8vcGFnZS9kYXRhJylcIixcInBhZ2VzXCI6XCJbe1xcXCJjb2xfdHlwZVxcXCI6XFxcInRleHRfMVxcXCIsXFxcIm5hbWVcXFwiOlxcXCJDbGFzc1RhYlxcXCIsXFxcInBhdGhcXFwiOlxcXCJDbGFzc1RhYlxcXCIsXFxcInJ1bGVcXFwiOlxcXCJmdW5jdGlvbiBDbGFzc1RhYihjbGFzc0FycmF5LCBwYXJhbXMpIHtcX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fdHlwZTogJ3Njcm9sbF9idXR0b24nXFxcXG4gICAgICAgIH0pXFxcXG4gICAgICAgIGxldCBhcnIgPSBmb2xkZWQgPyBbdGhpcy5hcnJbMF1dIDogdGhpcy5hcnJcXFxcbiAgICAgICAgYXJyLmZvckVhY2goKHYpID0+IHtcXFxcbiAgICAgICAgICAgIGxldCB7IGlkLCBjbGFzc19uYW1lLCBjbGFzc191cmwgfSA9IHYsXFxcXG4gICAgICAgICAgICAgICAgc2VsZWN0ZWQgPSBKU09OLnN0cmluZ2lmeSh0aGlzLmdldENsYXNzKGlkKSlcXFxcbiAgICAgICAgICAgIGNsYXNzX25hbWUuZm9yRWFjaCgobmFtZSwgaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGxldCB1cmwgPSBjbGFzc191cmxbaV0sXFxcXG4gICAgICAgICAgICAgICAgICAgIG5vdyA9IEpTT04uc3RyaW5naWZ5KHsgbmFtZTogbmFtZSwgdXJsOiB1cmwgfSlcXFxcbiAgICAgICAgICAgICAgICBlbC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IChzZWxlY3RlZCA9PSBub3cgPyAn4oCc4oCc4oCd4oCdPHNwYW4gc3R5bGU9XFxcXFxcXCJjb2xvcjonICsgdGhpcy5jb2xvciArICdcXFxcXFxcIj48Yj4nIDogJycpICsgbmFtZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChzaWduLCBpZCwgbm93KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoc2lnbiArIGlkLCBub3cpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoc2lnbiwgbm93KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxcXG4gIC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ICAgICAgcmV0dXJuIHZcXFxcbiAgICAgICAgfSkpXFxcXG4gICAgICAgIG1ldGhvZF9zZXRSZXN1bHQuaW52b2tlKGphdmFDb250ZXh0LCBteUNvbGxlY3Rpb25fZWwsIHBhcmFtMSwgcGFyYW0yLCBwYXJhbTMpXFxcXG4gICAgfVxcXFxuICAgIHNldEhvbWVSZXN1bHQgPSBzZXRSZXN1bHRcXFxcbiAgICBzZXRTZWFyY2hSZXN1bHQgPSBzZXRSZXN1bHRcXFxcblxcXFxuICAgIGV2YWwoTVlfUlVMRS5maW5kX3J1bGUuc2xpY2UoMykpXFxcXG59IGVsc2Uge1xcXFxuICAgIGxldCBmaW5kUnVsZSA9IE1ZX1JVTEUuZmluZF9ydWxlLnNwbGl0KCc7JylcXFxcbiAgICBwYXJzZURvbUZvckFycmF5KGluZGV4SHRtbCwgZmluZFJ1bGUuc2hpZnQoKSkuZm9yRWFjaCgoZGF0YSkgPT4ge1xcXFxuICAgICAgICBsZXQgW3RpdGxlLCBpbWcsIGRlc2MsIHVybF0gPSBmaW5kUnVsZS5tYXAoKHYsIGkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAodiA9PSAnKicpIHJldHVybiAnJ1xcXFxuICAgICAgICAgICAgICAgICAgICBlbHNlIHYgPSAoaSA9PSAxIHx8IGkgPT0gMykgP1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VEb20oZGF0YSwgdikgOlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VEb21Gb3JIdG1sKGRhdGEsIHYpXFxcXG4gICAgICAgICAgICAgICAgICAgIGlmIChpICE9IDMpIHYgPSBydW5Db2RlKHYpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2XFxcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkgeyByZXR1cm4gJycgfVxcXFxuICAgICAgICAgICAgfSksXFxcXG4gICAgICAgICAgICBy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BBcnJheS5wcm90b3R5cGUucHVzaC5hcHBseShteUNvbGxlY3Rpb25fZWwsIGVsLm1hcCgodikgPT4ge1xcXFxuICAgICAgICAgICAgbGV0IE1ZX19SVUxFID0gT2JqZWN0LmFzc2lnbih7fSwgTVlfUlVMRSlcXFxcbiAgICAgICAgICAgIHYuY29sX3R5cGUgPSB2LmNvbF90eXBlIHx8IE1ZX1JVTEUuY29sX3R5cGVcXFxcblxcXFxuICAgICAgICAgICAgaWYgKCF2LnVybCkge1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiB2XFxcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHYudXJsLmluY2x1ZGVzKCdAcnVsZT0nKSkge1xcXFxuICAgICAgICAgICAgICAgIGxldCBbXywgdXJsLCBydWxlXSA9IHYudXJsLm1hdGNoKC9eKFtcXFxcXFxcXHNcXFxcXFxcXFNdKj8pQHJ1bGU9KFtcXFxcXFxcXHNcXFxcXFxcXFNdKikkLylcXFxcbiAgICAgICAgICAgICAgICB2LnVybCA9IHVybFxcXFxuICAgICAgICAgICAgICAgIE1ZX19SVUxFLmRldGFpbF9maW5kX3J1bGUgPSBydWxlXFxcXG4gICAgICAgICAgICAgICAgTVlfX1JVTEUuZGV0YWlsX2NvbF90eXBlID0gTVlfUlVMRS5jb2xfdHlwZVxcXFxuICAgICAgICAgICAgfSBlbHNlIGlmICh2LnVybC5zdGFydHNXaXRoKCdoaWtlcjovL3BhZ2UvJykpIHtcXFxcbiAgICAgICAgICAgICAgICBpZiAodi51cmwuaW5jbHVkZXMoJ3J1bGU9JykgfHwgKHYuZXh0cmEgfHwge30pLnJ1bGUpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2XFxcXG4gICAgICAgICAgICAgICAgbGV0IFtfLCBwYXRoLCBwYXJhbXNdID0gdi51cmwuc3BsaXQoJyMnKVswXS5tYXRjaCgvXmhpa2VyOlxcXFxcXFxcL1xcXFxcXFxcL3BhZ2VcXFxcXFxcXC8oLis/KSg/O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ZS5tYXAoKHYsIGkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICBpZiAodiA9PSAnKicpIHJldHVybiAnJ1xcXFxuICAgICAgICAgICAgICAgICAgICBlbHNlIHYgPSAoaSA9PSAxIHx8IGkgPT0gMykgP1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VEb20oZGF0YSwgdikgOlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VEb21Gb3JIdG1sKGRhdGEsIHYpXFxcXG4gICAgICAgICAgICAgICAgICAgIGlmIChpICE9IDMpIHYgPSBydW5Db2RlKHYpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2XFxcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkgeyByZXR1cm4gJycgfVxcXFxuICAgICAgICAgICAgfSksXFxcXG4gICAgICAgICAgICByZXMgPSB7XFxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcXFxuICAgICAgICAgICAgICAgIHVybDogdXJsLFxcXFxuICAgICAgICAgICAgICAgIGRlc2M6IGRlc2MsXFxcXG4gICAgICAgICAgICAgICAgaW1nOiBpbWcsXFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IE1ZX1JVTEUuY29sX3R5cGVcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgaWYgKHJlcy51cmwpIHtcXFxcbiAgICAgICAgICAgIGlmIChyZXMudXJsLmluY2x1ZGVzKCdAbGF6eVJ1bGU9JykpIHtcXFxcbiAgICAgICAgICAgICAgICByZXMudXJsID0gcmVzLnVybC5yZXBsYWNlKCcuanM6JywgJy5qczpcXFxcXFxcXG5pZihNWV9SVUxFKU9iamVjdC5hc3NpZ24oTVlfUlVMRSwnICsgJC5zdHJpbmdpZnkoeyBwYWdlczogTVlfUlVMRS5wYWdlcywgcGFnZUxpc3Q6IE1ZX1JVTEUucGFnZUxpc3QsIGZpbmRfc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AgICAgICAgICB0aW1lID0gcGFyc2VJbnQocmVhZEZpbGUoJ3VwZGF0ZXRpbWUnKSkgfHwgMCxcXFxcbiAgICAgICAgICAgIG5vdyA9IG5ldyBEYXRlKCkuZ2V0VGltZSgpXFxcXG4gICAgICAgIGlmIChub3cgLSB0aW1lID4gMTAwMCAqIDYwICogbWluKSB7XFxcXG4gICAgICAgICAgICBsb2coJ+abtOaWsOS6huaVsOaNricpXFxcXG4gICAgICAgICAgICAvLyDojrflj5bov5znqIvmlbDmja5cXFxcbiAgICAgICAgICAgIGxldCB1cmwgPSBnZXRJdGVtKCdyZW1vdGVVcmwnKVxcXFxuICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICBkYXRhID0gZmV0Y2godXJsKVxcXFxuICAgICAgICAgICAgICAgIGlmICh1cmwuc3RhcnRzV2l0aCgnaGlrZXI6Ly9wYWdlLycpKVxcXFxuICAgICAgICAgICAgICAgICAgICBkYXRhID0gSlNPTi5wYXJzZShkYXRhKS5ydWxlXFxcXG4gICAgICAgICAgICAgICAgZGF0YSA9IEpTT04ucGFyc2UoZGF0YSlcXFxcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgICAgICBkYXRhID0gW11cXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGRhdGEgPSBkYXRhLmZpbHRlcigodikgPT4geyByZXR1cm4gdi50aXRsZSAhPSBnZXRJdGVtKCdteUNvbGxlY3Rpb24nKSAmJiAhdi5hdXRob3IuaW5jbHVkZXMoJ+i9u+WQiOmbhueUn+aIkOWZqCcpIH0pXFxcXG4gICAgICAgICAgICBzYXZlRmlsZSgnZGF0YUNhY2hlJywgSlNPTi5zdHJpbmdpZnkoZGF0YSkpXFxcXG4gICAgICAgICAgICBzYXZlRmlsZSgndXBkYXRldGltZScsICcnICsgbm93KVxcXFxuICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgbG9nKCfmsqHmnInmm7TmlrDmlbDmja4nKVxcXFxuICAgICAgICAgICAgZGF0YSA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2RhdGFDYWNoZScpKVxcXFxuICAgICAgICB9XFxcXG4gICAgICAgIC8vIOWGmeWFpeiHquWumuS5ieaVsOaNrlxcXFxuICAgICAgICBsZXQgY3VzdG9tRGF0YSA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKSxcXFxcbiAgICAgICAgICAgIHJld3JpdGVEYXRhID0gW11cXFxcbiAgICAgICAgY3VzdG9tRGF0YSA9IGN1c3RvbURhdGEucmVkdWNlKChzZWxmLCB2KSA9PiB7XFxcXG4gICAgICAgICAgICBsZXQgaW5kZXggPSBkYXRhLmZpbmRJbmRleCgodnYpID0+IHYudGl0bGUgPT0gdnYudGl0bGUpXFxcXG4gICAgICAgICAgICBpZiAoaW5kZXggPj0gMCkge1xcXFxuICAgICAgICAgICAgICAgIHNlbGYucHVzaCh2KVxcXFxuICAgICAgICAgICAgICAgIGxldCBydWxlID0gZGF0YS5zcGxpY2UoaW5kZXgsIDEpWzBdXFxcXG4gICAgICAgICAgICAgICAgaWYoc2hvd0FsbCB8fCB2LnZpc2libGUpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJld3JpdGVEYXRhLnB1c2goT2JqZWN0LmFzc2lnbihydWxlLCB2KSlcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIHJldHVybiBzZWxmXFxcXG4gICAgICAgIH0sIFtdKVxcXFxuICAgICAgICBkYXRhLmZvckVhY2goKHYpID0+IGN1c3RvbURhdGEucHVzaCh7IHRpdGxlOiB2LnRpdGxlLCB2aXNpYmxlOiB0cnVlIH0pKVxcXFxuICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KGN1c3RvbURhdGEpKVxcXFxuICAgICAgICByZXR1cm4gcmV3cml0ZURhdGEuY29uY2F0KGRhdGEpXFx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AgaWYgKC9ecG9zdCQvaS50ZXN0KG9wdGlvbnNbJ21ldGhvZCddKSkge1xcXFxuICAgICAgICAgICAgbGV0IFtvcmlVcmwsIGJvZHldID0gdXJsWzBdLnNwbGl0KCc/JylcXFxcbiAgICAgICAgICAgIHVybFswXSA9IG9yaVVybC5yZXBsYWNlKC/vvJ/vvJ8vZywgJz8nKVxcXFxuICAgICAgICAgICAgaWYgKGJvZHkuc3RhcnRzV2l0aCgnSnNvbkJvZHk9JykpIGJvZHkgPSBib2R5LnNsaWNlKDkpXFxcXG4gICAgICAgICAgICBvcHRpb25zWydib2R5J10gPSBib2R5XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgaWYgKHVybFsyXSkgb3B0aW9ucy5oZWFkZXJzWydDb250ZW50LVR5cGUnXSA9ICd0ZXh0L3BsYWluO2NoYXJzdD0nICsgdXJsWzJdXFxcXG4gICAgICAgIGlmICh1cmxbM10pIHVybFszXS5tYXRjaCgveyguKil9LylbMV0uc3BsaXQoJyYmJykuZm9yRWFjaCgodikgPT4ge1xcXFxuICAgICAgICAgICAgbGV0IFtrZXksIHZhbHVlXSA9IHYuc3BsaXQoJ0AnKVxcXFxuICAgICAgICAgICAgb3B0aW9ucy5oZWFkZXJzW2tleV0gPSBydW5Db2RlKHZhbHVlKVxcXFxuICAgICAgICB9KVxcXFxuICAgICAgICAvLyDmt7vliqDlhajlsYBVQVxcXFxuICAgICAgICBpZiAoIW9wdGlvbnMuaGVhZGVyc1snVXNlci1BZ2VudCddKSB7XFxcXG4gICAgICAgICAgICBpZiAoTVlfUlVMRS51YSA9PSAncGMnKVxcXFxuICAgICAgICAgICAgICAgIG9wdGlvbnMuaGVhZGVyc1snVXNlci1BZ2VudCddID0gUENfVUFcXFxcbiAgICAgICAgICAgIGVsc2UgaWYgKE1ZX1JVTEUudWEgPT0gJ21vYmlsZScpXFxcXG4gICAgICAgICAgICAgICAgb3B0aW9ucy5oZWFkZXJzWydVc2VyLUFnZW50J10gPSBNT0JJT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cbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlRG9tRm9ySHRtbChkYXRhLCB2KVxcXFxuICAgICAgICAgICAgICAgICAgICBpZiAoaSAhPSAxKSB2ID0gcnVuQ29kZSh2KVxcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdlxcXFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsgcmV0dXJuICcnIH1cXFxcbiAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgcmVzID0ge1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSArICfigJzigJzigJ3igJ08YnI+JyArIChSVUxFLnRpdGxlLmZvbnRjb2xvcignIzEyYjY2OCcpICsgJyDilqogJyArIGRlc2MuZm9udGNvbG9yKCcjNjY2NjY2JykpLnNtYWxsKCksXFxcXG4gICAgICAgICAgICAgICAgdXJsOiB1cmwsXFxcXG4gICAgICAgICAgICAgICAgZGVzYzogY29udGVudCxcXFxcbiAgICAgICAgICAgICAgICBpbWc6IGltZ1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICBpZighcmVzLmltZykgcmVzLmNvbF90eXBlID0gJ3RleHRfMSdcXFxcbiAgICAgICAgaWYgKHJlcy51cmwpIHtcXFxcbiAgICAgICAgICAgIGlmIChyZXMudXJsLmluY2x1ZGVzKCdAbGF6eVJ1bGU9JykpIHtcXFxcbiAgICAgICAgICAgICAgICByZXMudXJsID0gcmVzLnVybC5yZXBsYWNlKCcuanM6JywgJy5qczpcXFxcXFxcXG5pZihNWV9SVUxFKU9iamVjdC5hc3NpZ24oTVlfUlVMRSwnICsgJC5zdHJpbmdpZnkoeyBwYWdlczogTVlfUlVMRS5wYWdlcywgcGFnZUxpc3Q6IE1ZX1JVTEUucGFnZUxpc3QsIGZpbmRfcnVsZTogJycsIHBhcmFtczogJycgfSkgKyAnKTtNWV9VUkw9XFxcXFxcXCInICsgTVlfVVJMICsgJ1xcXFxcXFwiOycpXFxcXG4gICAgICAgICAg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XG4gICAgICAgIGNhc2UgJ+WQr+eUqC/npoHnlKgnOlxcXFxuICAgICAgICAgICAgZC50aXRsZSA9ICh2LnZpc2libGUgPyAn8J+foiAnIDogJ/CflLQgJykgKyBkLnRpdGxlXFxcXG4gICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHJ1bGUpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdjdXN0b21EYXRhJykgfHwgJ1tdJyksXFxcXG4gICAgICAgICAgICAgICAgICAgIGluZGV4ID0gcnVsZXMuZmluZEluZGV4KCh2KSA9PiB2LnRpdGxlID09IHJ1bGUudGl0bGUpXFxcXG4gICAgICAgICAgICAgICAgcnVsZXNbaW5kZXhdLnZpc2libGUgPSAhcnVsZXNbaW5kZXhdLnZpc2libGVcXFxcbiAgICAgICAgICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSlcXFxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxcXG4gICAgICAgICAgICB9LCB2KVxcXFxuICAgICAgICAgICAgYnJlYWtcXFxcbiAgICAgICAgY2FzZSAn6YeN5paw5o6S5bqPJzpcXFxcbiAgICAgICAgICAgIGxldCBzb3J0RmxhZyA9IHBhcnNlSW50KGdldFZhcignbXlDb2xsZWN0aW9uLXNvcnRGbGFnJywgJy0xJykpXFxcXG4gICAgICAgICAgICBkLnRpdGxlID0gKHNvcnRGbGFnID09IGkgPyAn8J+UhCAnIDogJycpICsgZC50aXRsZVxcXFxuICAgICAgICAgICAgaWYgKHNvcnRGbGFnID09IC0xKVxcXFxuICAgICAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ215Q29sbGVjdGlvbi1zb3J0RmxhZycsIGkudG9TdHJpbmcoKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/pgInmi6nopoHnp7vliqjliLDnmoTkvY3nva4nXFxcXG4gICAgICAgICAgICAgICAgfSwgaSlcXFxcbiAgICAgICAgICAgIGVsc2VcXFxcbiAgICAgICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKG9sZEluZGV4LCBuZXdJbmRleCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdjdXN0b21EYXRhJykgfHwgJ1tdJylcXFxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXMuc3BsaWNlKG5ld0luZGV4LCAwLCBydWxlcy5zcGxpY2Uob2xkSW5kZXgsIDEpWzBdKVxcXFxuICAgICAgICAgICAgICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdteUNvbGxlY3Rpb24tc29ydEZsYWcnLCAnLTEnKVxcXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcXFxuICAgICAgICAgICAgICAgIH0sIHNvcnRGbGFnLCBpKVxcXFxuICAgICAgICAgICAgYnJlYWtcXFxcbiAgICAgICAgY2FzZSAn5pu05pS55Zu+5qCHJzpcXFxcbiAgICAgICAgICAgIGQudXJsID0gJCh2Lmljb24gfHwgJycsICfovpPlhaXmlrDlm77moIflnLDlnYDmiJbpopzoibLku6PnoIHvvJonKS5pbnB1dCgocnVsZSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKSxcXFxcbiAgICAgICAgICAgICAgICAgICAgaW5kZXggPSBydWxlcy5maW5kSW5kZXgoKHYpID0+IHYudGl0bGUgPT0gcnVsZS50aXRsZSlcXFxcbiAgICAgICAgICAgICAgICBpZiAoaW5wdXQpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzW2luZGV4XS5pY29uID0gaW5wdXRcXFxcbiAgICAgICAgICAgICAgICBlbHNlXFxcXG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBydWxlc1tpbmRleF0uaWNvblxcXFxuICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdjdXN0b21EYXRhJywgSlNPTi5zdHJpbmdpZnkocnVsZXMpKVxcXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXFxcbiAgICAgICAgICAgIH0sIHYpXFxcXG4gICAgICAgICAgICBicmVha1xcXFxuICAgICAgICBjYXNlICflr7zlhaXmtbfpmJQnOlxcXFxuICAgICAgICAgICAgZC51cmwgPSAncnVsZTovLycgKyBiYXNlNjRFbmNvZGUoSlNPTi5zdHJpbmdpZnkoZGF0YVtpXSkpXFxcXG4gICAgICAgICAgICBicmVha1xcXFxuICAgIH1cXFxcbiAgICBlbC5wdXNoKGQpXFxcXG59KVxcXFxuc2V0UmVzdWx0KGVsKVxcXFxuXFxcIn0se1xcXCJjb2xfdHlwZVxcXCI6XFxcIm1vdmllXzNcXFwiLFxcXCJuYW1lXFxcIjpcXFwi6KeE5YiZ5YiX6KGoXFxcIixcXFwicGF0aFxcXCI6XFxcImRhdGFcXFwiLFxcXCJydWxlXFxcIjpcXFwiW3tcXFxcbiAgICAgICAgXFxcXFxcXCJ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ICAgICAgICAgIHZhciBqbSA9IHBhcnNlRG9tRm9ySHRtbChsaXN0W2pdLCAnVGV4dCcpO1xcXFxcXFxcbiAgICAgICAgICAgIGQucHVzaCh7XFxcXFxcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiBqbSxcXFxcXFxcXG4gICAgICAgICAgICAgICAgdXJsOiBwYXJzZURvbShsaXN0W2pdLCAnYSYmaHJlZicpICsgXFxcXFxcXFxcXFxcXFxcIiNhdXRvUGFnZSMjcmVhZFRoZW1lI1xcXFxcXFxcXFxcXFxcXCIgKyBgQHJ1bGU9anM6YCArICQudG9TdHJpbmcoKCkgPT4ge1xcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IGQgPSBbXTtcXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgIHZhciBkZXNfdGl0bGUgPSBwYXJzZURvbUZvckh0bWwoZ2V0UmVzQ29kZSgpLCAnI2MxJiZoMSYmVGV4dCcpO1xcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJzxiaWc+JyArIGRlc190aXRsZSArICc8L2JpZz4nLFxcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAncmljaF90ZXh0J1xcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgY29udCA9IHBhcnNlRG9tRm9yQXJyYXkoZ2V0UmVzQ29kZSgpLCAnI2NvbnRlbnQmJnAnKTtcXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gY29udC5tYXAoaXQgPT4gJ+OAgOOAgCcgKyBwYXJzZURvbUZvckh0bWwoaXQsICdwJiZIdG1sJykpLmpvaW4oXFxcXFxcXFxcXFxcXFxcIjxicj48YnI+XFxcXFxcXFxcXFxcXFxcIik7XFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBodG1sLFxcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcXFxcXFxcXFwicmljaF90ZXh0XFxcXFxcXFxcXFxcXFxcIixcXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogMTgsXFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiB0cnVlXFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICBzZXRSZXN1bHQoZCk7XFxcXFxcXFxuICAgICAgICAgICAgICAgIH0pLFxcXFxcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogam0ubGVuZ3RoID4gNSA/ICd0ZXh0XzEnIDogJ3RleHRfMScsXFxcXFxcXFxuICAgICAgICAgICAgfSk7XFxcXFxcXFxuICAgICAgICB9XFxcXFxcXFxuICAgIH0gZWxzZSB7XFxcXFxcXFxuICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IGxpc3QubGVuZ3RoOyBqKyspIHtcXFxcXFxcXG4gICAgICAgICAgICB2YXIgam0gPSBwYXJzZURvbUZvckh0bWwobGlzdFtqXSwgJ1RleHQnKTtcXFxcXFxcXG4gICAgICAgICAgICBkLnB1c2goe1xcXFxcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogam0sXFxcXFxcXFxuICAgICAgICAgICAgICAgIHVybDogcGFyc2VEb20obGlzdFtqXSwgJ2EmJmhyZWYnKSArIFxcXFxcXFxcXFxcXFxcXCIjYXV0b1BhZ2UjI3JlYWRUaGVtZSNcXFxcXFxcXFxcXFxcXFwiICsgYEBydWxlPWpzOmAgKyAkLnRvU3RyaW5nKCgpID0+IHtcXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBkID0gW107XFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICB2YXIgZGVzX3RpdGxlID0gcGFyc2VEb21Gb3JIdG1sKGdldFJlc0NvZGUoKSwgJyNjMSYmaDEmJlRleHQnKTtcXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICc8YmlnPicgKyBkZXNfdGl0bGUgKyAnPC9iaWc+JyxcXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3JpY2hfdGV4dCdcXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IGNvbnQgPSBwYXJzZURvbUZvckFycmF5KGdldFJlc0NvZGUoKSwgJyNjb250ZW50JiZwJyk7XFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IGNvbnQubWFwKGl0ID0+ICfjgIDjgIAnICsgcGFyc2VEb21Gb3JIdG1sKGl0LCAncCYmSHRtbCcpKS5qb2luKFxcXFxcXFxcXFxcXFxcXCI8YnI+PGJyPlxcXFxcXFxcXFxcXFxcXCIpO1xcXFxcXFxcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogaHRtbCxcXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXFxcXFxcXFxcInJpY2hfdGV4dFxcXFxcXFxcXFxcXFxcXCIsXFxcXFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IDE4LFxcXFxcXFxcbiAgICAgICAgICAgICAgICAg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