Advertisement
xiaomianao666

邀您一起看:我被总裁黑上了

Oct 17th, 2022
408
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥我被总裁黑上了@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCIuY3lfemhhbmdqaWVfdG9wJiZwJiZUZXh0XCIsXCJsaXN0VG9DbGVhckFzc29jaWF0ZWRGS1wiOltdLFwibGlzdFRvQ2xlYXJTZWxmRktcIjpbXSxcInBhZ2VMaXN0XCI6W3tcImNvbF90eXBlXCI6XCJ0ZXh0XzFcIixcIm5hbWVcIjpcIkNsYXNzVGFiXCIsXCJwYXRoXCI6XCJDbGFzc1RhYlwiLFwicnVsZVwiOlwiY29uc3QgQ2xhc3NUYWIgPSBmdW5jdGlvbihjbGFzc0FycmF5LCBwYXJhbXMpIHtcXG4gICAgT2JqZWN0LmFzc2lnbih0aGlzLCBwYXJhbXMpXFxuICAgIHRoaXMuYXJyID0gY2xhc3NBcnJheS5tYXAodiA9PiB0aGlzLmluaXQodikpXFxuICAgIHRoaXMuc2lnbiA9ICckJyArIFFJTkdfVElUTEUgKyAnXycgKyAodGhpcy5uYW1lIHx8ICcnKSArICdfJ1xcbiAgICB0aGlzLmNvbG9yID0gdGhpcy5jb2xvciB8fCAnIzEyYjY2OCdcXG4gICAgdGhpcy5ib3VuZGFyeSA9IHRoaXMuYm91bmRhcnkgfHwgJ2JsYW5rX2Jsb2NrJ1xcbn1cXG5DbGFzc1RhYi5wcm90b3R5cGUgPSB7XFxuICAgIGNvbnN0cnVjdG9yOiB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gICAgICAgICAgICAgICBub3cgPSBKU09OLnN0cmluZ2lmeSh7IG5hbWU6IG5hbWUsIHVybDogdXJsIH0pXFxuICAgICAgICAgICAgICAgIGVsLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHNlbGVjdGVkID09IG5vdyA/ICfigJzigJzigJ3igJ0nICsgbmFtZS5mb250Y29sb3IodGhpcy5jb2xvcikuYm9sZCgpIDogbmFtZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogc2VsZWN0ZWQgPT0gbm93ID8gJ2hpa2VyOi8vZW1wdHknIDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoc2lnbiwgaWQsIG5vdykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihzaWduICsgaWQsIG5vdylcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgICAgICB9LCB0aGlzLnNpZ24sIGlkLCBub3cpLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgZWwucHVzaCh7IGNvbF90eXBlOiB0aGlzLmJvdW5kYXJ5IH0pXFxuICAgICAgICB9KVxcbiAgICB9LFxcbiAgICBpbml0KGNsYXNzT2JqZWN0KSB7XFxuICAgICAgICBpZiAodHlwZW9mIGNsYXNzT2JqZWN0LmNsYXNzX25hbWUgPT0gJ3N0cmluZycpXFxuICAgICAgICAgICAgY2xhc3NPYmplY3QuY2xhc3NfbmFtZSA9IGNsYXNzT2JqZWN0LmNsYXNzX25hbWUuc3BsaXQoJyYnKVxcbiAgICAgICAgaWYgKHR5cGVvZiBjbGFzc09iamVjdC5jbGFzc191cmwgPT0gJ3N0cm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ZpbGU6Ly8nKSlcXG4gICAgICAgICAgICB1cmwgPSAnaGlrZXI6Ly9maWxlcy9saWJzLycgKyBtZDUodXJsKSArICcuanMnXFxuICAgICAgICBlbHNlIGlmKHVybC5zdGFydHNXaXRoKCdoaWtlcjovL3BhZ2UvJykpIHVybCA9ICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgaWYgKGlucHV0ID09ICflpIfku70nKSByZXR1cm4gJCgnaGlrZXI6Ly9maWxlcy90bXAvJyArIFFJTkdfVElUTEUgKyAnX2JhY2t1cC5qc29uJywgJ+i+k+WFpeWkh+S7vei3r+W+hCcpXFxuICAgICAgICAgICAgLmlucHV0KCh1cmwsIHVwZGF0ZUludGVydmFsLCBuZXdXaW5kb3csIHRhYkZvbGQsIGRpc2FibGVDdXN0b20pID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gcmVxdWVzdCh1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgY3VzdG9tRGF0YSA9IHJlYWRGaWxlKCdjdXN0b21EYXRhJylcXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKGlucHV0LCBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJbnRlcnZhbDogdXBkYXRlSW50ZXJ2YWwsXFxuICAgICAgICAgICAgICAgICAgICBuZXdXaW5kb3c6IG5ld1dpbmRvdyxcXG4gICAgICAgICAgICAgICAgICAgIHRhYkZvbGQ6IHRhYkZvbGQsXFxuICAgICAgICAgICAgICAgICAgICBkaXNhYmxlQ3VzdG9tOiBkaXNhYmxlQ3VzdG9tLFxcbiAgICAgICAgICAgICAgICAgICAgY3VzdG9tRGF0YTogY3VzdG9tRGF0YSxcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzOiBydWxlc1xcbiAgICAgICAgICAgICAgICB9KSlcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suWkh+S7ve+8jOazqOaEj+iLpeS7k+W6k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cXG4gICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2N1c3RvbURhdGEnLCBKU09OLnN0cmluZ2lmeShydWxlcykpXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgaSlcXG4gICAgICAgICAgICBicmVha1xcbiAgICAgICAgY2FzZSAn6YeN5paw5o6S5bqPJzpcXG4gICAgICAgICAgICBsZXQgc29ydEZsYWcgPSBwYXJzZUludChnZXRNeVZhcignc29ydEZsYWcnLCAnLTEnKSlcXG4gICAgICAgICAgICBkLnRpdGxlID0gKHNvcnRGbGFnID09IGkgPyAn8J+UgyAgJyA6ICcnKSArIGQudGl0bGVcXG4gICAgICAgICAgICBpZiAoc29ydEZsYWcgPT0gLTEpXFxuICAgICAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgaS50b1N0cmluZygpKVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6YCJ5oup6KaB56e75Yqo5Yiw55qE5L2N572uJ1xcbiAgICAgICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgIGVsc2VcXG4gICAgICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChvbGRJbmRleCwgbmV3SW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKVxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXMuc3BsaWNlKG5ld0luZGV4LCAwLCBydWxlcy5zcGxpY2Uob2xkSW5kZXgsIDEpWzBdKVxcbiAgICAgICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2N1c3RvbURhdGEnLCBKU09OLnN0cmluZ2lmeShydWxlcykpXFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCAnLTEnKVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgIH0sIHNvcnRGbGFnLCBpKVxcbiAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICBjYXNlICfmm7TmlLnlm77moIcnOlxcbiAgICAgICAgICAgIGQudXJsID0gJCh2Lmljb24gfHwgJycsICfovpPlhaXmlrDlm77moIflnLDlnYDmiJbpopzoibLku6PnoIHvvJonKS5pbnB1dCgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdjdXN0b21EYXRhJykgfHwgJ1tdJylcXG4gICAgICAgICAgICAgICAgaWYgKGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXNbaV0uaWNvbiA9IGlucHV0XFxuICAgICAgICAgICAgICAgIGVsc2VcXG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBydWxlc1tpXS5pY29uXFxuICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdjdXN0b21EYXRhJywgSlNPTi5zdHJpbmdpZnkocnVsZXMpKVxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgIGNhc2UgJ+WvvOWFpea1t+mYlCc6XFxuICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIyc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odi51cmwuaW5jbHVkZXMoJ0BydWxlPScpKSB7XFxuICAgICAgICAgICAgICAgIGxldCBbXywgdXJsLCBydWxlXSA9IHYudXJsLm1hdGNoKC9eKFtcXFxcc1xcXFxTXSo/KUBydWxlPShbXFxcXHNcXFxcU10qKSQvKVxcbiAgICAgICAgICAgICAgICB2LnVybCA9IHVybFxcbiAgICAgICAgICAgICAgICBNWV9fUlVMRS5kZXRhaWxfZmluZF9ydWxlID0gcnVsZVxcbiAgICAgICAgICAgICAgICBNWV9fUlVMRS5kZXRhaWxfY29sX3R5cGUgPSBNWV9SVUxFLmNvbF90eXBlXFxuICAgICAgICAgICAgfSBlbHNlIGlmICh2LnVybC5zdGFydHNXaXRoKCdoaWtlcjovL3BhZ2UvJykpIHtcXG4gICAgICAgICAgICAgICAgaWYgKHYudXJsLmluY2x1ZGVzKCdydWxlPScpIHx8IHYuZXh0cmEucnVsZSlcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2XFxuICAgICAgICAgICAgICAgIGxldCBbXywgcGF0aCwgZmxhZywgcGFyYW1zXSA9IHYudXJsLm1hdGNoKC9eaGlrZXI6XFxcXC9cXFxcL3BhZ2VcXFxcLyguKz8pKCMuKj8pPyg/OlxcXFw/KC4qKSk/JC8pLFxcbiAgICAgICAgICAgICAgICAgICAgc3ViUGFnZSA9IE1ZX1JVTEUucGFnZUxpc3QuZmluZCgodikgPT4gdi5wYXRoID09IHBhdGgpLFxcbiAgICAgICAgICAgICAgICAgICAgc3ViVXJsID0gKHBhcmFtcyB8fCAnJykuc3BsaXQoJyYnKS5maW5kKCh2KSA9PiB2LnN0YXJ0c1dpdGgoJ3VybD0nKSlcXG4gICAgICAgICAgICAgICAgdi51cmwgPSAoc3ViVXJsID8gc3ViVXJsLnNsaWNlKDQpLnJlcGxhY2UoL++8n++8ny9nLCAnPycpLnJlcGxhY2UoL++8hu+8hi9nLCAnJicpIDogKHYuZXh0cmEgfHwge30pLnVybCkgfHwgJ2hpa2VyOi8vZW1wdHknICsgZmxhZyArICc/JyArIChwYXJhbXMgfHwgJycpXFxuICAgICAgICAgICAgICAgIE1ZX19SVUxFLmRldGFpbF9maW5kX3J1bGUgPSBzdWJQYWdlLnJ1bGVcXG4gICAgICAgICAgICAgICAgTVlfX1JVTEUuZGV0YWlsX2NvbF90eXBlID0gc3ViUGFnZS5jb2xfdHlwZVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAodi51cmwuaW5jbHVkZXMoJ0BsYXp5UnVsZT0nKSkge1xcbiAgICAgICAgICAgICAgICBsZXQgcmVJbmRleCA9IHYudXJsLmluZGV4T2YoJy5qczonKVxcbiAgICAgICAgICAgICAgICBpZiAocmVJbmRleCA+PSAwKSB2LnVybCA9IHYudXJsLnNsaWNlKDAsIHJlSW5kZXgpICsgJy5qczpcXFxcbmlmKE1ZX1JVTEUpT2JqZWN0LmFzc2lnbihNWV9SVUxFLCAnICsgYXNzaWduTGF6eVJ1bGUgKyAnKTsnICsgdi51cmwuc2xpY2UocmVJbmRleCArIDQpXFxuICAgICAgICAgICAgICAgIHJldHVybiB2XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChpc0luZGV4KSB7XFxuICAgICAgICAgICAgICAgIGlmICghTVlfUlVMRS5kZXRhaWxfZmluZF9ydWxlIHx8IC9oaWtlcjpcXFxcL1xcXFwvKD8hZW1wdHkuKyQpLy50ZXN0KHYudXJsKSkgcmV0dXJuIHZcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB2LmV4dHJhID0gT2JqZWN0LmFzc2lnbih7fSwgdi5leHRyYSwge1xcbiAgICAgICAgICAgICAgICB1cmw6IGdlbkV4VXJsKHYudXJsKSxcXG4gICAgICAgICAgICAgICAgUlVMRTogTVlfX1JVTEUsXFxuICAgICAgICAgICAgICAgIHBhZ2VUaXRsZTogaXNJbmRleCAmJiB2LnRpdGxlXFxuICAgICAgICAgICAg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ICAgICAgICAgICAgICAgICAgIGlmIChpICE9IDMpIHYgPSBydW5Db2RlKHYpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdlxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7IHJldHVybiAnJyB9XFxuICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgcmVzID0ge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsIHVybDogdXJsLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBkZXNjLCBpbWc6IGltZyxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IE1ZX1JVTEUuY29sX3R5cGVcXG4gICAgICAgICAgICB9XFxuICAgICAgICBpZiAocmVzLnVybCkge1xcbiAgICAgICAgICAgIGlmIChyZXMudXJsLmluY2x1ZGVzKCdAbGF6eVJ1bGU9JykpIHtcXG4gICAgICAgICAgICAgICAgbGV0IHJlSW5kZXggPSByZXMudXJsLmluZGV4T2YoJy5qczonKVxcbiAgICAgICAgICAgICAgICBpZiAocmVJbmRleCA+PSAwKSByZXMudXJsID0gcmVzLnVybC5zbGljZSgwLCByZUluZGV4KSArICcuanM6XFxcXG5pZihNWV9SVUxFKU9iamVjdC5hc3NpZ24oTVlfUlVMRSwgJyArIGFzc2lnbkxhenlSdWxlICsgJyk7JyArIHJlcy51cmwuc2xpY2UocmVJbmRleCArIDQpXFxuICAgICAgICAgICAgfSBlbHNlICBpZiAoZGV0YWlsRmluZFJ1bGUpIHtcXG4gICAgICAgICAgICAgICAgcmVzLmV4dHJhID0ge1xcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBnZW5FeFVybCh1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgUlVMRTogT2JqZWN0LmFzc2lnbihnZW5NeVJ1bGUoKSwgeyBkZXRhaWxfZmluZF9ydWxlOiBkZXRhaWxGaW5kUnVsZSB9KSxcXG4gICAgICAgICAgICAgICAgICAgIHBhZ2VUaXRsZTogaXNJbmRleCAmJiB0aXRsZVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJlcy51cmwgPSAnaGlrZXI6Ly9wYWdlL2ZyYW1lTG9hZD9ydWxlPScgKyBRSU5HX1RJVExFXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChNWV9SVUxFLmRldGFpbF9maW5kX3J1bGUpIHtcXG4gICAgICAgICAgICAgICAgcmVzLmV4dHJhID0ge1xcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBnZW5FeFVybCh1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgUlVMRTogZ2VuTXlSdWxlKCksXFxuICAgICAgICAgICAgICAgICAgICBwYWdlVGl0bGU6IGlzSW5kZXggJiYgdGl0bGVcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXMudXJsID0gJ2hpa2VyOi8vcGFnZS9mcmFtZUxvYWQ/cnVsZT0nICsgUUlOR19USVRMRVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIG15Q29sbGVjdGlvbl9lbC5wdXNoKHJlcylcXG4gICAgfSlcXG4gICAgc2V0UmVzdWx0KG15Q29sbGVjdGlvbl9lbClcXG59XFxuXCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLmlbDmja7ovb3lhaVcIixcInBhdGhcIjpcImRhdGFMb2FkXCIsXCJydWxlXCI6XCIkLmV4cG9ydHMgPSBmdW5jdGlvbihzaG93QWxsKSB7XFxuICAgIGxldCB1cmwgPSBnZXRNeVZhcigncmVtb3RlVXJsJyksXFxuICAgICAgICBkYXRhID0gW11cXG4gICAgaWYgKHVybC5zdGFydHNXaXRoKCdoaWtlcjovLycpIHx8IHVybC5zdGFydHNXaXRoKCdmaWxlOi8vJykpIHtcXG4gICAgICAgIC8vIOWmguaenOS4uuacrOWcsOaWh+S7tuWImeS4jei/m+ihjOe8k+WtmFxcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBsZXQgb3Jp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0YSB8fCAnW10nKVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICBsb2coJ+W3suiOt+WPluWIsOaVsOaNricpXFxuICAgICAgICAgICAgZGF0YSA9IHJlbW90ZURhdGFcXG4gICAgICAgIH1cXG4gICAgfVxcbiAgICBkYXRhID0gZGF0YS5maWx0ZXIoKHYpID0+IHsgcmV0dXJuIHYudGl0bGUgIT0gZ2V0TXlWYXIoJ215Q29sbGVjdGlvbicpICYmICEodi5hdXRob3IgfHwgJycpLmluY2x1ZGVzKCfovbvlkIjpm4bnlJ/miJDlmagnKSB9KVxcbiAgICBpZiAocmVhZEZpbGUoJ2Rpc2FibGVDdXN0b20nKSkgcmV0dXJuIGRhdGFcXG4gICAgZWxzZSB7IC8vIOWGmeWFpeiHquWumuS5ieaVsOaNrlxcbiAgICAgICAgbGV0IGN1c3RvbURhdGEgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdjdXN0b21EYXRhJykgfHwgJ1tdJyksXFxuICAgICAgICAgICAgcmV3cml0ZURhdGEgPSBbXVxcbiAgICAgICAgY3VzdG9tRGF0YSA9IGN1c3RvbURhdGEucmVkdWNlKChzZWxmLCB2KSA9PiB7XFxuICAgICAgICAgICAgbGV0IGluZGV4ID0gZGF0YS5maW5kSW5kZXgoKHZ2KSA9PiB2LnRpdGxlID09IHZ2LnRpdGxlKVxcbiAgICAgICAgICAgIGlmIChpbmRleCA+PSAwKSB7XFxuICAgICAgICAgICAgICAgIHNlbGYucHVzaCh2KVxcbiAgICAgICAgICAgICAgICBsZXQgcnVsZSA9IGRhdGEuc3BsaWNlKGluZGV4LCAxKVswXVxcbiAgICAgICAgICAgICAgICBpZiAoc2hvd0FsbCB8fCB2LnZpc2libGUpXFxuICAgICAgICAgICAgICAgICAgICByZXdyaXRlRGF0YS5wdXNoKE9iamVjdC5hc3NpZ24ocnVsZSwgdikpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiBzZWxmXFxuICAgICAgICB9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c19kZXNjKSA9PiB7XFxuICAgICAgICAgICAgICAgIGlmIChnZXRWYXIoXFxcImpqc1xcXCIsIFxcXCLmlLbotbdcXFwiKSA9PSBcXFwi5pS26LW3XFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKFxcXCJqanNcXFwiLCBcXFwi5bGV5byAXFxcIik7XFxuXFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogamppZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfnroDku4sgPHNtYWxsPjxzbWFsbD48c3BhbiBzdHlsZT1cXFwiY29sb3I6IzE5Qjg5RFxcXCI+5pS26LW3Pjwvc3Bhbj48L3NtYWxsPjwvc21hbGw+J1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG5cXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHRTaXplOiAxNCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZVNwYWNpbmc6IDMsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBkZWNpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICc8c3BhbiBzdHlsZT1cXFwiY29sb3I6IzgwODA4MFxcXCI+JyArIGRlc19kZXNjICsgJy4uLjwvc3Bhbj4nXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKFxcXCJqanNcXFwiLCBcXFwi5pS26LW3XFxcIik7XFxuXFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogamppZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfnroDku4sgPHNtYWxsPjxzbWFsbD48c3BhbiBzdHlsZT1cXFwiY29sb3I6IzE5Qjg5RFxcXCI+5bGV5byAPjwvc3Bhbj48L3NtYWxsPjwvc21hbGw+J1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG5cXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHRTaXplOiAxNCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZVNwYWNpbmc6IDMsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBkZWNpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICc8c3BhbiBzdHlsZT1cXFwiY29sb3I6IzgwODA4MFxcXCI+JyArIGRlc19kZXNjLnN1YnN0cigwLCAzMCkgKyAnLi4uPC9zcGFuPidcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICB9LCBNWV9SVUxFICsgXFxcIl9qamlkXFxcIiwgTVlfUlVMRSArIFxcXCJfZGVjaWRcXFwiLCBkZXNfZGVzYyksXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFw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wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnTxiPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjogIzFhYWQxOVxcXCI+5LiL6L295ryr55S78J+UuTwvc3Bhbj48L2I+JyxcXG4gICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvZG93bmxvYWQudmlldyNub1JlY29yZEhpc3RvcnkjI25vUmVmcmVzaCM/cnVsZT3mnKzlnLDotYTmupDnrqHnkIZcXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgY2hhcHRlckxpc3Q6IGRvTGlzdCxcXG4gICAgICAgICAgICAgICAgaW5mbzoge1xcbiAgICAgICAgICAgICAgICAgICAgYm9va05hbWU6IHBkZmgoaHRtbCwgVGl0bGUpLFxcbiAgICAgICAgICAgICAgICAgICAgcnVsZU5hbWU6IE1ZX1JVTEUudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBib29rVG9wUGljOiBwZChodG1sLCBjaGFwdGVyUGljKSxcXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZTogZG93bmxvYWRsYXp5XFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIGRlZmF1bHRWaWV3OiBcXFwiMVxcXCJcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICAgICAgfSk7XFxuICAgIH0gY2F0Y2ggKGUpIHt9XFxufVxcblxcbmZ1bmN0aW9uIGNoYXB0ZXIoY2hhcHRlckxpc3QsIGNoYXB0ZXJUaXRsZSwgY2hhcHRlclVybCwgZGVmYXVsdE9yZGVyLCBoYXNMaW5lKSB7XFxuICAgIHZhciBsaXN0ID0gY2hhcHRlckxpc3Q7XF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cbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRWYXIoKE1ZX1JVTEUudGl0bGUgKyAnI2xpbmUtdGl0bGUnKSwgbGluZTBUaXRsZSkgPT09IGxpbmVUaXRsZSA/IFxcXCLliIfmjaI64oCY4oCYXFxcIiArIGxpbmVUaXRsZSArIFxcXCJcXFwiIDogbGluZVRpdGxlICsgXFxcIuKAmOKAmDrliIfmjaJcXFwiLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgodmFyS2V5LCBsaW5lSW5kZXgsIGxpbmVUaXRsZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKHZhcktleSwgbGluZUluZGV4LnRvU3RyaW5nKCkpXFxuICAgICAgICAgICAgICAgICAgICAvLyBsb2coTVlfUlVMRS51cmwpXFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoKE1ZX1JVTEUudGl0bGUgKyAnI2xpbmUtdGl0bGUnKSwgbGluZVRpdGxlKVxcbiAgICAgICAgICAgICAgICAgICAgbG9nKE1ZX1JVTEUudGl0bGUgKyBnZXRWYXIoKE1ZX1JVTEUudGl0bGUgKyAnI2xpbmUtdGl0bGUnKSkpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5bey5YiH5o2i6IezXFxcIiArIGxpbmVUaXRsZVxcbiAgICAgICAgICAgICAgICB9LCB2YXJLZXksIGksIGxpbmVUaXRsZSksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9IGNhdGNoIChlKSB7fVxcbiAgICB9XFxuICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgICAgICAgICB9KTtcXG59XCJ9LHtcImNvbF90eXBlX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PC9iPicgOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChwZChpdGVtLCDliIbnsbvpk77mjqUpICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdfY2F0ZSA9IFtdXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcC5mb3JFYWNoKChjYXRlLCBpbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY2F0ZS5wdXNoKGluZGV4ID09PSAwID8gcGFyYW1zLmtleS50b1N0cmluZygpIDogXFxcIjBcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KG5ld19jYXRlKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoTVlfUlVMRS51cmwsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHBhZ2UsXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfSBlbHNlIGlmIChmb2xkID09PSAnMScpIHtcXG4gICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gcGRmaChpdGVtLCDliIbnsbvmoIfpopgpXFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyAn4oCc4oCc4oCd4oCdPGI+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiAnICsg5YiG57G76aKc6ImyICsgJ1xcXCI+JyArIHRpdGxlICsgJzwvc3Bhbj48L2I+JyA6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHBkKGl0ZW0sIOWIhuexu+mTvuaOpSkgKyAnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcFtwYXJhbXMuaW5kZXhdID0gcGFyYW1zLmtleS50b1N0cmluZygpXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5jYXRlX3RlbXApKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnVybCwgaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXA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AgICBsZXQgaW5qZWN0SW5kZXggPSBsYXlvdXQuaW5qZWN0SW5kZXggfHwgbGF5b3V0Wyfmipjlj6DmjInpkq7mj5LlhaXooYwnXVxcbiAgICAgICAgICAgIGlmIChsYXlvdXQudGl0bGUgfHwgbGF5b3V0LnVybCB8fCBsYXlvdXQuY29sX3R5cGUgfHwgaW5qZWN0SW5kZXgpIHtcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBrZXlzLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgICAgICAgICBjb25zdCBrZXkgPSBrZXlzW2ldXFxuICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tRm9sZExheW91dF1ba2V5XSA9IGxheW91dFtrZXldO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCLor7fkvKDlhaXmraPnoa7nmoTmipjlj6DnlYzpnaLlhYPntKDvvIFcXFwiKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAvLyBpbmplY3RJbmRleCDmipjlj6DmjInpkq7mj5LlhaXnrKwgaW5qZWN0SW5kZXgg6KGMXFxuICAgICAgICAgICAgaWYgKGluamVjdEluZGV4KSB7XFxuICAgICAgICAgICAgICAgIGlmICghKHR5cGVvZiAoaW5qZWN0SW5kZXgpID09PSAnbnVtYmVyJykpIHtcXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFwi5oqY5Y+g5oyJ6ZKu5o+S5YWl6KGM6K+35Lyg5YWl5pWw5a2X77yBXFxcIilcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAoaW5qZWN0SW5kZXggPCAxKSB7XFxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIuaKmOWPoOaMiemSruaPkuWFpeihjOivt+S8oOWFpeWkp+S6jiAwIOeahOaVtOaVsO+8gVxcXCIpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYgKGluamVjdEluZGV4ID4gdGhpc1tzeW1ib2xNYXAubUZvbGRJbmRleF0pIHtcXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFwi5oqY5Y+g5oyJ6ZKu5o+S5YWl6KGM5LiN5b6X5aSn5LqO5pi+56S65oqY5Y+g6KGM5pWw77yB6K+36LCD55SoIC5mb2xkSW5kZXgoaW5kZXgpIOaIliAu56ys5Yeg6KGM5byA5aeL5oqY5Y+gKGluZGV4KSDkvKDlhaXmraPnoa7nmoTmmL7npLrmipjlj6DooYzmlbBcXFwiKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1Gb2xkTGF5b3V0XS5pbmplY3RJbmRleCA9IGluamVjdEluZGV4IHx8IDE7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIuivt+S8oOWFpeato+ehrueahOaKmOWPoOeVjOmdouWFg+e0oO+8gVxcXCIpXFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gdGhpcztcXG4gICAgfSxcXG4gICAgLy8g5b2T5YmN5piv5ZCm5oqY5Y+gXFxuICAgIGZvbGQoaXNGb2xkKSB7XFxuICAgICAgICBpZiAodHlwZW9mIChpc0ZvbGQpID09PSAnc3RyaW5nJykge1xcbiAgICAgICAgICAgIGlzRm9sZCA9IGlzRm9sZCA9PT0gJzEnXFxuICAgICAgICB9XFxuICAgICAgICBpZiAoaXNGb2xkKSB7XFxuICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUZvbGRdID0gJzEnO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tRm9sZF0gPSAnMCc7XFxuICAgICAgIC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JiZocmVmJztcXG4gICAgICAgICAgICBpZiAobVVybFJ1bGUuc3RhcnRzV2l0aChcXFwiQGpzOlxcXCIpKSB7XFxuICAgICAgICAgICAgICAgIHVybCA9IHRoaXMuZXZhbEpTUnVsZShzcmMsIG1VcmxSdWxlKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2UgPSBwYXJzZURvbTtcXG4gICAgICAgICAgICAgICAgaWYgKHVybFJ1bGUucGFyc2VPcHRpb24pIHtcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAodXJsUnVsZS5wYXJzZU9wdGlvbikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBhcnNlRG9tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwZFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb207XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBhcnNlRG9tRm9ySHRtbFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGRmaFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb21Gb3JIdG1sO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHVybFJ1bGVbXFxcIuino+aekOaWueazlVxcXCJdKSB7XFxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKHVybFJ1bGVbXFxcIuino+aekOaWueazlVxcXCJdKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGFyc2VEb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBkXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGFyc2VEb21Gb3JIdG1sXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwZGZoXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbUZvckh0bWw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb207XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgdXJsID0gcGFyc2Uoc3JjLCBtVXJsUnVsZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmICh1cmxSdWxlLmRlYWxVcmwpIHtcXG4gICAgICAgICAgICAgICAgdXJsID0gdXJsUnVsZS5kZWFsVXJsKHVybClcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHVybFJ1bGVbJ+S6jOasoeWkhOeQhiddKSB7XFxuICAgICAgICAgICAgICAgIHVybCA9IHVybFJ1bGVbJ+S6jOasoeWkhOeQhiddKHVybClcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGlmICh1cmxSdWxlLnN0YXJ0c1dpdGgoXFxcIkBqczpcXFwiKSkge1xcbiAgICAgICAgICAgICAgICB1cmwgPSB0aGlzLmV2YWxKU1J1bGUoc3JjLCB1cmxSdWxlKTtc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iAgICAgICAgICAgICAgICBsaXN0ID0gdGhpcy5ldmFsSlNSdWxlKGh0bWwsIGxpc3RSdWxlKVxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGxpc3QgPSBwYXJzZURvbUZvckFycmF5KGh0bWwsIGxpc3RSdWxlKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAvLyBsb2cobGlzdClcXG4gICAgICAgICAgICBsaXN0Lm1hcChjYXRlZ29yeSA9PiB7XFxuICAgICAgICAgICAgICAgIGNhdGVnb3JpZXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICBsaXN0OiBjYXRlZ29yeSxcXG4gICAgICAgICAgICAgICAgICAgIHN1Ykxpc3RSdWxlOiBydWxlT2JqLnN1Ykxpc3RSdWxlIHx8IHJ1bGVPYmpbXFxcIuWtkOWIhuexu1xcXCJdLFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGVSdWxlOiBydWxlT2JqLnRpdGxlUnVsZSB8fCBydWxlT2JqW1xcXCLliIbnsbvmoIfpophcXFwiXSxcXG4gICAgICAgICAgICAgICAgICAgIHVybFJ1bGU6IHJ1bGVPYmoudXJsUnVsZSB8fCBydWxlT2JqW1xcXCLliIbnsbvpk77mjqVcXFwiXSxcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pXFxuXFxuICAgICAgICAvLyBsb2coJC5zdHJpbmdpZnkoY2F0ZWdvcmllcykpXFxuXFxuICAgICAgICBsZXQgaW5pdF9jYXRlID0gW11cXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgMjA7IGkrKykge1xcbiAgICAgICAgICAgIGluaXRfY2F0ZS5wdXNoKFxcXCIwXFxcIilcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGNvbnN0IGNhdGVfdGVtcF9qc29uID0gZ2V0TXlWYXIobVRhZyArIHRoaXMuVkFSTUFQLkNBVEVHT1JZLCBKU09OLnN0cmlu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LlZBUk1BUC5GT0xELCBwYXJhbXMuaXNGb2xkKSA9PT0gJzEnID8gJzAnIDogJzEnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1UYWc6IG1UYWcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzRm9sZDogdGhpc1tzeW1ib2xNYXAubUZvbGRdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBWQVJNQVA6IHRoaXMuVkFSTUFQXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IHRoaXNbc3ltYm9sTWFwLm1Gb2xkTGF5b3V0XS5jb2xfdHlwZSB8fCBcXFwic2Nyb2xsX2J1dHRvblxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tTGF5b3V0XS5wdXNoKGZvbGRMYXlvdXQpXFxuICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgLy/lhbfkvZPliJfooajkuIvnmoTliIbnsbtcXG4gICAgICAgICAgICAgICAgbGV0IHN1Yl9jYXRlZ29yaWVzID0gW107XFxuICAgICAgICAgICAgICAgIGlmIChjYXRlZ29yeS5zdWJMaXN0UnVsZS5zdGFydHNXaXRoKFxcXCJAanM6XFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzID0gdGhpcy5ldmFsSlNSdWxlKGNhdGVnb3J5Lmxpc3QsIGNhdGVnb3J5LnN1Ykxpc3RSdWxlKVxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMgPSBwYXJzZURvbUZvckFycmF5KGNhdGVnb3J5Lmxpc3QsIGNhdGVnb3J5LnN1Ykxpc3RSdWxlKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAoaW5kZXggPCAodGhpc1tzeW1ib2xNYXAubUZvbGRJbmRleF0gfHwgMSkpIHtcXG4gICAgICAgICAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHRoaXMuZ2V0VGl0bGUoaXRlbSwgY2F0ZWdvcnkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHRoaXMuZ2V0VXJsKGl0ZW0sIGNhdGVnb3J5KVxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1MYXlvdXRdLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyAn4oCc4oCc4oCd4oCdPGI+PGZvbnQgY29sb3I9JyArIHRoaXNbc3ltYm9sTWFwLm1Db2xvcl0gKyAnPicgKyB0aXRsZSArICcgPC9mb250PjwvYj4nIDogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCh1cmwpLmxhenlSdWxlKChwYXJhbXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdfY2F0ZSA9IFtdXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocGFyYW1zLmluZGV4ID09PSAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcC5mb3JFYWNoKChjYXRlLCBpbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY2F0ZS5wdXNoKGluZGV4ID09PSAwID8gcGFyYW1zLmtleS50b1N0cmluZygpIDogXFxcIjBcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy50YWcgKyBwYXJhbXMuVkFSTUFQLkNBVEVHT1JZLCBKU09OLnN0cmluZ2lmeShwYXJhbXMuaW5kZXggPT09IDAgPyBuZXdfY2F0ZSA6IHBhcmFtcy5jYXRlX3RlbXApKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIocGFyYW1zLnRhZyArIHBhcmFtcy5WQVJNQVAuVVJMLCBpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVkFSTUFQOiB0aGlzLlZBUk1BUCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhZzogbVRhZyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogdGhpc1tzeW1ib2xNYXAubVBhZ2VdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1MYXlvdXRdLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzW3N5bWJvbE1hcC5tRm9sZF0gPT09ICcwJykge1xcbiAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMuZm9yRWFjaCgoaXRlbSwga2V5KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gdGhpcy5nZXRUaXRsZShpdGVtLCBjYXRlZ29yeSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gdGhpcy5nZXRVcmwoaXRlbSwgY2F0ZWdvcnkpXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBrZXkudG9TdHJpbmcoKSA9PT0gY2F0ZV90ZW1wW2luZGV4XSA/ICfigJzigJzigJ3igJ08Yj48Zm9udCBjb2xvcj0nICsgdGhpc1tzeW1ib2xNYXAubUNvbG9yXSArICc+JyArIHRpdGxlICsgJyA8L2ZvbnQ+PC9iPicgOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHVybCkubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcFtwYXJhbXMuaW5kZXhdID0gcGFyYW1zLmtleS50b1N0cmluZygpXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMudGFnICsgcGFyYW1zLlZBUk1BUC5DQVRFR09SWSwgSlNPTi5zdHJpbmdpZnkocGFyYW1zLmNhdGVfdGVtcCkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMudGFnICsgcGFyYW1zLlZBUk1BUC5VUkwsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWQVJNQVA6IHRoaXMuVkFSTUFQLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFnOiBtVGFnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiB0aGlzW3N5bWJvbE1hcC5tUGFnZV0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJibGFua19ibG9ja1xcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgIH0sXFxuXFxuICAgIOeVjOmdoihsYXlvdXQpIHtcXG4gICAgICAgIHJldHVybiB0aGlzLmxheW91dChsYXlvdXQpXFxuICAgIH0sXFxuICAgIOWIhuexu+mTvuaOpSh0cnVlVXJsKSB7XFxuICAgICAgICByZXR1cm4gdGhpcy50cnVlVXJsKHRydWVVcmwpO1xcbiAgICB9LFxcbiAgICDpobXnoIEocGFnZSkge1xcbiAgICAgICAgcmV0dXJuIHRoaXMucGFnZShwYWdlKTtcXG4gICAgfSxcXG4gICAg5rqQ56CBKGh0bWwpIHtcXG4gICAgICAgIHJldHVybiB0aGlzLmh0bWwoaHRtbCk7XFxuICAgIH0sXFxuICAgIOWumuS9jeS4gOe6p+WIhuexuyhsaXN0KSB7XFxuICAgICAgICByZXR1cm4gdGhpcy5saXN0KGxpc3QpO1xcbiAgICB9LFxcbiAgICDlrprkvY3lrZDliIbnsbsoc3ViTGlzdCkge1xcbiAgICAgICAgcmV0dXJuIHRoaXMuc3ViTGlzdChzdWJMaXN0KTtcXG4gICAgfSxcXG4gICAg5a6a5L2N5YiG57G75qCH6aKYKHRpdGxlKSB7XFxuICAgICAgICByZXR1cm4gdGhpcy50aXRsZSh0aXRsZSk7XFxuICAgIH0sXFxuICAgIOWumuS9jeWIhuexu+mTvuaOpSh1cmwpIHtcXG4gICAgICAgIHJldHVybiB0aGlzLnVybCh1cmwpO1xcbiAgICB9LFxcbiAgICDlvIDlkK/lho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V4cC5jb25zdHJ1Y3RvciA9PT0gQXJyYXkpIHtcXG4gICAgICAgICAgICB0aGlzLnJlZ2V4TWFwID0gdGhpcy5yZWdleE1hcC5jb25jYXQocmVnRXhwKVxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICB0aGlzLnJlZ2V4TWFwLnB1c2gocmVnRXhwKVxcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIHRoaXM7XFxuICAgIH0sXFxuICAgIGRlYnVnKCkge1xcbiAgICAgICAgdGhpcy5wYXJhbXMuZGVidWcgPSB0cnVlXFxuICAgICAgICByZXR1cm4gdGhpcztcXG4gICAgfSxcXG4gICAgZXhlYygpIHtcXG4gICAgICAgIHRoaXMuY2hlY2tQYXJhbXMoKVxcbiAgICAgICAgbGV0IHRydWVfdXJsID0gJydcXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdGhpcy5yZWdleE1hcC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgIGxldCByZWdPYmogPSB0aGlzLnJlZ2V4TWFwW2ldO1xcbiAgICAgICAgICAgIGxldCB1cmxFeHAgPSByZWdPYmoucmVnO1xcbiAgICAgICAgICAgIGlmICh0eXBlb2YgdXJsRXhwID09PSAnc3RyaW5nJykge1xcbiAgICAgICAgICAgICAgICB1cmxFeHAgPSBuZXcgUmVnRXhwKHVybEV4cClcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKHVybEV4cC50ZXN0KHRoaXMucGFyYW1zLnVybCkpIHtcXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMucGFyYW1zLmRlYnVnKSB7XFxuICAgICAgICAgICAgICAgICAgICBsb2codXJsRXhwLnRvU3RyaW5nKCkpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgdHJ1ZV91cmwgPSByZWdPYmouZXhlYygpO1xcbiAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICA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0YXJnZXQpIHtcXG4gICAgbGV0IGtleXMgPSBPYmplY3Qua2V5cyhzb3VyY2UpXFxuICAgIGZvciAobGV0IGkgaW4ga2V5cykge1xcbiAgICAgICAgdGFyZ2V0W2tleXNbaV1dID0gc291cmNlW2tleXNbaV1dXFxuICAgIH1cXG59XFxuXFxuZnVuY3Rpb24g5LiA57qnKG9iaikge1xcbiAgICB2YXIgZCA9IFtdO1xcbiAgICBpZiAoJC50eXBlKG9iaikgPT0gXFxcInN0cmluZ1xcXCIpIHtcXG4gICAgICAgIG9iaiA9IGNvbnZlcnQxKG9iailcXG4gICAgfVxcbiAgICBpZiAob2JqLuinhOWImSkge1xcbiAgICAgICAgbGV0IGMgPSBjb252ZXJ0MShvYmou6KeE5YiZKVxcbiAgICAgICAgbWVyZ2UoYywgb2JqKVxcbiAgICB9XFxuICAgIGxldCBhcnIgPSBwZGZhKGdldFJlc0NvZGUoKSwgb2JqLuWIl+ihqCk7XFxuICAgICAgIGlmIChvYmou5YiX6KGo5aSE55CGICE9IG51bGwpIHtcXG4gICAgICAgICAgICBhcnIgPSBvYmou6ZO+5o6l5aSE55CGKGFycilcXG4gICAgICAgIH1cXG4gICAgZm9yIChsZXQgaXQgb2YgYXJyKSB7XFxuICAgICAgICBsZXQgdXJsID0gcGQoaXQsIG9iai7pk77mjqUpXFxuICAgICAgICBpZiAob2JqLumTvuaOpeWkhOeQhiAhPSBudWxsKSB7XFxuICAgICAgICAgICAgdXJsID0gb2JqLumTvuaOpeWkhOeQhih1cmwpXFxuICAgICAgICB9XFxuICAgICAgICBsZXQgcGljID0gcGQoaXQsIG9iai7lm77niYcpXFxuICAgICAgICBpZiAob2JqLuWbvueJh+WkhOeQhiAhPSBudWxsKSB7XFxuICAgICAgICAgICAgcGljID0gb2JqLuWbvueJh+WkhOeQhihwaWMpXFxuICAgICAgICB9XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBwZGZoKGl0LCBvYmou5qCH6aKYKSxc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IGRvTGlzdHVybCA9IHBkZmgoaXQsIOmbhnVybClcXG4gICAgICAgICAgICBkb0xpc3R1cmwgPSBkb0xpc3R1cmwuaW5jbHVkZXMoXFxcImh0dHBcXFwiKSA/IGRvTGlzdHVybCA6IOWJjee8gCArIGRvTGlzdHVybFxcbiAgICAgICAgICAgIGRvTGlzdC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHBkZmgoaXQsIOmbhuWQjSksXFxuICAgICAgICAgICAgICAgIHVybDogZG9MaXN0dXJsXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIHZhciBib29rTmFtZSA9ICHlpJrot6/nur/lkKYgPyDmoIfpopggOiDmoIfpopggKyAnLScgKyDliJfooajlkI1baV1cXG5cXG4gICAgICAgIOeroOiKgmpzb24ucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IOWIl+ihqOWQjVtpXSxcXG4gICAgICAgICAgICBsaXN0OiBkb0xpc3QsXFxuICAgICAgICAgICAgc2pzczoge1xcbiAgICAgICAgICAgICAgICBjaGFwdGVyTGlzdDogZG9MaXN0LFxcbiAgICAgICAgICAgICAgICBpbmZvOiB7XFxuICAgICAgICAgICAgICAgICAgICBib29rTmFtZTogYm9va05hbWUsIC8v5ryr55S75ZCN56ewLFxcbiAgICAgICAgICAgICAgICAgICAgcnVsZU5hbWU6IE1ZX1JVTEUudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBib29rVG9wUGljOiDlm77niYcsXFxuICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGU6IOa8q+eUu+ino+aekCxcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgZGVmYXVsdFZpZXc6IFxcXCIxXFxcIlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgIH1cXG4gICAgcmV0dXJuIOeroOiKgmpzb25cXG59XFxuXFxuXFxuZnVuY3Rpb24g5re75Yqg5aS06YOo5YiX6KGoKG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XCLnroDku4vmlLZcXFwiLCBqailcXG4gICAgICAgIH0pXFxuXFxuICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDog5b2T5YmNVVJMICsgXFxcIl9telxcXCJcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHRpdGxlOiBqaiA9PSBcXFwi5bey5pS26LW3XFxcIiA/IOaUtuWGheWuuS5yZXBsYWNlKFxcXCLnroDku4tcXFwiLCDnroDku4vlhoXlrrnmlLYpIDog5pS25YaF5a65LnJlcGxhY2UoXFxcIueugOS7i1xcXCIsIOeugOS7i+WGheWuuSlcXG4gICAgICAgIH0pXFxuICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgIH0sIOeugOS7i+WGheWuuSwg566A5LuL5YaF5a655pS2LCBidHRpdGxlLCBtenRleHQsIOmhtVVSTClcXG5cXG5cXG4gICAgLy/moIfpophcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBidHRpdGxlLnJlcGxhY2UoXFxcIueugOS7i+aUtlxcXCIsIGpqKSxcXG4gICAgICAgIHVybDogamp1cmwsXFxuICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgICAgICBwaWNfdXJsOiDlm77niYcsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGlkOiDpobVVUkwgKyBcXFwiX2J0XFxcIlxcbiAgICAgICAgfVxcbiAgICB9KTtcXG5cXG4gICAgLy/nroDku4tcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBqaiA9PSBcXFwi5bey5pS26LW3XFxcIiA/IG16dGV4dC5yZXBsYWNlKFxcXCLnroDku4tcXFwiLCDnroDku4vlhoXlrrnmlLYpIDogbXp0ZXh0LnJlcGxhY2UoXFxcIueugOS7i1xcXCIsIOeugOS7i+WGheWuuSksXFxuICAgICAgICBjb2xfdHlwZTogX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o8nID8gJ+ato+W6jycgOiAn5YCS5bqPJztcXG5cXG4gICAgdmFyIOaOkuW6j3VybCA9ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKOagh+mimOWQjSwg5qCH6aKY5pWw5o2uLCDliJfooajmlbDmja4sIOino+aekOS7o+eggSwg6aG1VVJMKSA9PiB7XFxuICAgICAgICB2YXIg5o6S5bqPID0gZ2V0VmFyKOmhtVVSTCArIFxcXCLnq6DoioLmjpLluo9cXFwiLCBcXFwi5q2j5bqPXFxcIik7XFxuICAgICAgICB2YXIg5o+Q56S6ID0g5o6S5bqPID09ICflgJLluo8nID8gJ+ato+W6jycgOiAn5YCS5bqPJztcXG4gICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOiDpobVVUkwgKyBcXFwiX+aOkuW6j1xcXCJcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHRpdGxlOiDmoIfpopjlkI0ucmVwbGFjZSgn6Lev57q/Jywg5qCH6aKY5pWw5o2uKS5yZXBsYWNlKCfmjpLluo8nLCDmj5DnpLopXFxuICAgICAgICB9KVxcblxcblxcbiAgICAgICAgaWYgKOaPkOekuiA9PSAn5YCS5bqPJykge1xcbiAgICAgICAgICAgIOWIl+ihqOaVsOaNri5yZXZlcnNlKClcXG4gICAgICAgIH1cXG4gICAgICAgIOWIl+ihqOaVsOaNri5mb3JFYWNoKGZ1bmN0aW9uKGRhdGEsIHNzaWQpIHtcXG4gICAgICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGRhdGEudGl0bGUsXFxuICAgICAgICAgICAgICAgIHVybDogZGF0YS51cmwgKyDop6PmnpDku6PnoIEsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBpZDog6aG1VVJMICsgXFxcIl/pgInpm4ZcXFwiICsgc3NpZFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9KTtcXG5cXG5cXG4gICAgICAgIHB1dFZhcijpobVVUkwgKyBcXFwi56ug6IqC5o6S5bqPXFxcIiwg5o+Q56S6KVxcbiAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICB9LCDmoIfpopjlkI0sIOagh+mimOaVsOaNriwg5YiX6KGo5pWw5o2uLCDop6PmnpDku6PnoIEsIOmhtVVSTClcXG5cXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiDmoIfpopjlkI0ucmVwbGFjZSgn6Lev57q/Jywg5qCH6aKY5pWw5o2uKS5yZXBsYWNlKCfmjpLluo8nLCDmjpLluo8pLFxcbiAgICAgICAgcGljX3VybDog5Zu+54mHLFxcbiAgICAgICAgdXJsOiDmjpLluo91cmwsXFxuICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGlkOiDpobVVUkwgKyBcXFwiX+aOkuW6j1xcXCJcXG4gICAgICAgIH1cXG4gICAgfSk7XFxuXFxuICAgIGlmICjmjpLluo8gPT0gJ+WAkuW6jycpIHtcXG4gICAgICAgIOWIl+ihqOaVsOaNri5yZXZlcnNlKClcXG4gICAgfVxcblxcbiAgICDliJfooajmlbDmja4uZm9yRWFjaChmdW5jdGlvbihkYXRhLCBpZCkge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogZGF0YS50aXRsZSxcXG4gICAgICAgICAgICB1cmw6IGRhdGEudXJsICsg6Kej5p6Q5Luj56CBLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8yXFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDog6aG1VVJMICsgXFxcIl/pgInpm4ZcXFwiICsgaWRcXG4gICAgICAgICAgICB9XFxuICAgIC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cblxcbiAgICAgICAg6Lev57q/5pWw5o2uLmZvckVhY2goZnVuY3Rpb24oZGF0YSwgaWQpIHtcXG5cXG4gICAgICAgICAgICB2YXIgamp1cmwgPSAkKFxcXCIjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKCjpobVVUkwsaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgc2V0SXRlbSjpobVVUkwgKyAn6YCJ5oup5YiX6KGoJyxpZCsnJyk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICB9LOmhtVVSTCxpZCk7XFxuXFxuICAgICAgICAgICAgdmFyIOagh+mimOWQjSA9IGlkID09IOmAieaLqeWIl+ihqCA/IOi3r+e6v+mAieS4rS5yZXBsYWNlKCfpgInkuK0nLCBkYXRhLnRpdGxlKSA6IGRhdGEudGl0bGU7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IOagh+mimOWQjSxcXG4gICAgICAgICAgICAgICAgdXJsOiBqanVybCxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBpZDog6aG1VVJMICsgXFxcIl/ot6/nur9cXFwiICsgaWRcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfSk7XFxuXFxuICAgIH1cXG4gICAgcmV0dXJuIOmAieaLqeWIl+ihqFxcbn1cXG5cXG5cXG5mdW5jdGlvbiDmt7vliqDpgInmi6nkuIvovb0oZCwg6Lev57q/5pWw5o2uLCDlpJrot6/nur/lkKYpIHtcXG5cXG4gICAgLy/ot6/nur/mlbDmja4g5qC85byPW3t0aXRsZTon6Lev57q/5ZCNJyxzanNzOifkuIvovb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CckJykgPyDliIbnsbsuc3BsaXQoJyQnKVsxXSArIHBkZmgo5aS06YOoLCDliIbnsbsuc3BsaXQoJyQnKVswXSkgOiBwZGZoKOWktOmDqCwg5YiG57G7KVxcblxcbiAgICBcXG4gICAgLy/lpLTpg6jliJfooahcXG4gICAg5re75Yqg5aS06YOo5YiX6KGoKGQsIOagh+mimCwg5Zu+54mHLCDmj4/ov7AsIOS9nOiAhSwg5pe26Ze0LCDliIbnsbss5b2T5YmNVVJMKVxcbiAgICBcXG4gICAgLy/ot6/nur/lkI3kuI7pgInpm4bmlbDmja5cXG4gICAgdmFyIOeroOiKgmpzb24gPSDkvJjljJbot6/nur/nq6DoioLmlbDmja4o5aSa6Lev57q/5ZCmLCBjb2RlLCDot6/nur/liJfooags6Lev57q/5ZCNLOmAiembhuaAu+WIl+ihqCzpgInpm4bliJfooags6ZuG5ZCNLOmbhnVybCzliY3nvIAs5b2T5YmN6aG15ZCNLOWbvueJhylcXG5cXG4gICAgLy/nroDku4tcXG4gICAg5re75Yqg566A5LuLKGQsIHBkZmgoY29kZSwg566A5LuLKSwg5b2T5YmNVVJMLCAnJylcXG5cXG4gICAvL+W9k+ayoeacieeroOiKguWGheWuue+8jOWwseS4jeaYvuekulxcbiAgICBpZiAo56ug6IqCanNvbi5sZW5ndGggPiAwKSB7XFxuXFxuICAgICAgICAvL+i3r+e6v+mAieaLqVxcbiAgICAgICAgdmFyIOmAieaLqeWIl+ihqCA9IOa3u+WKoOmAieaLqei3r+e6vyhkLCDnq6DoioJqc29uLCDlvZPliY1VUkwsIOWkmui3r+e6v+WQpilcXG5cXG4gICAgICAgIC8v6YCJ5oup5LiL6L29XFxuICAgICAgICDmt7vliqDpgInmi6nkuIvovb0oZCwg56ug6IqCanNvbizlpJrot6/nur/lkKYpXFxuXFxuICAgICAgICAvL+aOkuW6j+S4jumAiembhlxcbiAgICAgICAgdmFyIGxhenkgPSBgQGxhenlSdWxlPS5qczpgICsg5ryr55S76Kej5p6QO1xcbiAgICA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AnScgOiBkYXRhLFxcbiAgICAgICAgdXJsOiAkKFxcXCIjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKCjnur/ot68sIGxhenksIGlkKSA9PiB7XFxuICAgICAgICAgICAgdmFyIGxpc3RzID0gc3RvcmFnZTAuZ2V0TXlWYXIoXFxcImxpc3RzXFxcIik7XFxuICAgICAgICAgICAgdmFyIOaOkuW6jyA9IGdldE15VmFyKE1ZX1VSTCArIFxcXCLnq6DoioLmjpLluo9cXFwiLCAnIzFhYWQxOVxcXCI+5q2j5bqPJyk7XFxuICAgICAgICAgICAgdmFyIOaPkOekuiA9IOaOkuW6jyA9PSAnI0ZGMDAwMFxcXCI+5YCS5bqPJyA/ICcjMWFhZDE5XFxcIj7mraPluo8nIDogJyNGRjAwMDBcXFwiPuWAkuW6jyc7XFxuXFxuICAgICAgICAgICAg57q/6LevLmZvckVhY2goKGRhdGEsIHhsaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogaWQgPT0geGxpZCA/ICfigJzigJwnICsgZGF0YSArICfigJ3igJ0nIDogZGF0YSxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IE1ZX1VSTCArIFxcXCJf57q/6LevXFxcIiArIHhsaWRcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBwdXRNeVZhcihNWV9VUkwsIGlkKVxcbiAgICAgICAgICAgIHZhciDnq6DoioIgPSBsaXN0c1tnZXRNeVZhcihNWV9VUkwsICcwJyldO1xcbiAgICAgICAgICAgIGlmICjmjpLluo8gPT0gJyNGRjAwMDBcXFwiPuWAkuW6jycpIHtcXG4gICAgICAgICAgICAgICAg56ug6IqCLnJldmVyc2UoKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBsZXQgY3AgPSDnq6DoioIubWFwKChkYXRhLCBzc2lkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChkYXRhLCAnYSYmVGV4dCcpLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBwZChkYXRhLCAnYSYmaHJlZicpICsgbGF6eSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF8yJyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBNWV9VUkwgKyBcXFwiX+mAiembhlxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoTVlfVVJMICsgXFxcIl/pgInpm4ZcXFwiKTtcXG4gICAgICAgICAgICBhZGRJdGVtQmVmb3JlKE1ZX1VSTCArIFxcXCJmb290ZXJcXFwiLCBjcCk7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgfSwgdGFicywgbGF6eSwgaWQpLFxcbiAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbicsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGlkOiBNWV9VUkwgKyBcXFwiX+e6v+i3r1xcXCIgKyBpZFxcbiAgICAgICAgfVxcbiAgICB9KTtcXG59KVxcblxcbmlmICjmjpLluo8gPT0gJyNGRjAwMDBcXFwiPuWAkuW6jycpIHtcXG4gICAgbGlzdC5yZXZlcnNlKClcXG59XFxubGlzdC5mb3JFYWNoKChkYXRhLCBpZCkgPT4ge1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IHBkZmgoZGF0YSwgJ2EmJlRleHQnKSxcXG4gICAgICAgIHVybDogcGQoZGF0Y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csIGRlc2MsIHVybF0gPSBmaW5kUnVsZS5tYXAoKHYsIGkpID0+IHtcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgIGlmICh2ID09ICcqJykgcmV0dXJuICcnXFxuICAgICAgICAgICAgICAgICAgICBlbHNlIHYgPSAoaSA9PSAxIHx8IGkgPT0gMykgP1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlRG9tKGRhdGEsIHYpIDpcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZURvbUZvckh0bWwoZGF0YSwgdilcXG4gICAgICAgICAgICAgICAgICAgIGlmIChpICE9IDMpIHYgPSBydW5Db2RlKHYpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdlxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7IHJldHVybiAnJyB9XFxuICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgcmVzID0ge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsIHVybDogdXJsLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBkZXNjLCBpbWc6IGltZyxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IE1ZX1JVTEUuY29sX3R5cGVcXG4gICAgICAgICAgICB9XFxuICAgICAgICBpZiAocmVzLnVybCkge1xcbiAgICAgICAgICAgIGlmIChyZXMudXJsLmluY2x1ZGVzKCdAbGF6eVJ1bGU9JykpIHtcXG4gICAgICAgICAgICAgICAgbGV0IHJlSW5kZXggPSByZXMudXJsLmluZGV4T2YoJy5qczonKVxcbiAgICAgICAgICAgICAgICBpZiAocmVJbmRleCA+PSAwKSByZXMudXJsID0gcmVzLnVybC5zbGljZSgwLCByZUluZGV4KSArICcuanM6XFxcXG5pZihNWV9SVUxFKU9iamVjdC5hc3NpZ24oTVlfUlVMRSwgJyArIGFzc2lnbkxhenlSdWxlICsgJyk7JyArIHJlcy51cmwuc2xpY2UocmVJbmRleCArIDQpXFxuICAgICAgICAgICAgfSBlbHNlICBpZiAoZGV0YWlsRmluZFJ1bGUpIHtcXG4gICAgICAgICAgICAgICAgcmVzLmV4dHJhID0ge1xcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBnZW5FeFVybCh1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgUlVMRTogT2JqZWN0LmFzc2lnbihnZW5NeVJ1bGUoKSwgeyBkZXRhaWxfZmluZF9ydWxlOiBkZXRhaWxGaW5kUnVsZSB9KSxcXG4gICAgICAgICAgICAgICAgICAgIHBhZ2VUaXRsZTogaXNJbmRleCAmJiB0aXRsZVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJlcy51cmwgPSAnaGlrZXI6Ly9wYWdlL2ZyYW1lTG9hZD9ydWxlPScgKyBRSU5HX1RJVExFXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChNWV9SVUxFLmRldGFpbF9maW5kX3J1bGUpIHtcXG4gICAgICAgICAgICAgICAgcmVzLmV4dHJhID0ge1xcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBnZW5FeFVybCh1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgUlVMRTogZ2VuTXlSdWxlKCksXFxuICAgICAgICAgICAgICAgICAgICBwYWdlVGl0bGU6IGlzSW5kZXggJiYgdGl0bGVcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXMudXJsID0gJ2hpa2VyOi8vcGFnZS9mcmFtZUxvYWQ/cnVsZT0nICsgUUlOR19USVRMRVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIG15Q29sbGVjdGlvbl9lbC5wdXNoKHJlcylcXG4gICAgfSlcXG4gICAgc2V0UmVzdWx0KG15Q29sbGVjdGlvbl9lbClcXG59XFxuXCIsXCJncm91cFwiOlwiMO+4j+KDo+S7k+W6k+mbhuWQiFwiLFwidWFcIjpcImF1dG9cIixcInByZVJ1bGVcIjpcInB1dE15VmFyKCdteUNvbGxlY3R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AgICAgICAgICAgICAgICAgIHVybDogc2VsZWN0ZWQgPT0gbm93ID8gJ2hpa2VyOi8vZW1wdHknIDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoc2lnbiwgaWQsIG5vdykgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKHNpZ24gKyBpZCwgbm93KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIHRoaXMuc2lnbiwgaWQsIG5vdyksXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXFxcbiAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIGVsLnB1c2goeyBjb2xfdHlwZTogdGhpcy5ib3VuZGFyeSB9KVxcXFxuICAgICAgICB9KVxcXFxuICAgIH0sXFxcXG4gICAgaW5pdChjbGFzc09iamVjdCkge1xcXFxuICAgICAgICBpZiAodHlwZW9mIGNsYXNzT2JqZWN0LmNsYXNzX25hbWUgPT0gJ3N0cmluZycpXFxcXG4gICAgICAgICAgICBjbGFzc09iamVjdC5jbGFzc19uYW1lID0gY2xhc3NPYmplY3QuY2xhc3NfbmFtZS5zcGxpdCgnJicpXFxcXG4gICAgICAgIGlmICh0eXBlb2YgY2xhc3NPYmplY3QuY2xhc3NfdXJsID09ICdzdHJpbmcnKVxcXFxuICAgICAgICAgICAgY2xhc3NPYmplY3QuY2xhc3NfdXJsID0gY2xhc3NPYmplY3QuY2xhc3NfdXJsLnNwbGl0KCcmJykubWFwKCh2KSA9PiB2LnRyaW0oKSlcXFxcbiAgICAgICAgcmV0dXJuIGNsYXNzT2JqZWN0XFxcXG4gICAgfSxcXFxcbiAgICBwdXNoKGNsYXNzT2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ge1xcXFxuICAgICAgICBsZXQgdXJsID0gZ2V0TXlWYXIoJ3JlbW90ZVVybCcpXFxcXG4gICAgICAgIGlmICghdXJsLnN0YXJ0c1dpdGgoJ2hpa2VyOi8vJykgJiYgIXVybC5zdGFydHNXaXRoKCdmaWxlOi8vJykpXFxcXG4gICAgICAgICAgICB1cmwgPSAnaGlrZXI6Ly9maWxlcy9saWJzLycgKyBtZDUodXJsKSArICcuanMnXFxcXG4gICAgICAgIGVsc2UgaWYodXJsLnN0YXJ0c1dpdGgoJ2hpa2VyOi8vcGFnZS8nKSkgdXJsID0gJ2hpa2VyOi8vZW1wdHknXFxcXG4gICAgICAgIGlmIChpbnB1dCA9PSAn5aSH5Lu9JykgcmV0dXJuICQoJ2hpa2VyOi8vZmlsZXMvdG1wLycgKyBRSU5HX1RJVExFICsgJ19iYWNrdXAuanNvbicsICfovpPlhaXlpIfku73ot6/lvoQnKVxcXFxuICAgICAgICAgICAgLmlucHV0KCh1cmwsIHVwZGF0ZUludGVydmFsLCBuZXdXaW5kb3csIHRhYkZvbGQsIGRpc2FibGVDdXN0b20pID0+IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSByZXF1ZXN0KHVybCksXFxcXG4gICAgICAgICAgICAgICAgICAgIGN1c3RvbURhdGEgPSByZWFkRmlsZSgnY3VzdG9tRGF0YScpXFxcXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKGlucHV0LCBKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUludGVydmFsOiB1cGRhdGVJbnRlcnZhbCxcXFxcbiAgICAgICAgICAgICAgICAgICAgbmV3V2luZG93OiBuZXdXaW5kb3csXFxcXG4gICAgICAgICAgICAgICAgICAgIHRhYkZvbGQ6IHRhYkZvbGQsXFxcXG4gICAgICAgICAgICAgICAgICAgIGRpc2FibGVDdXN0b206IGRpc2FibGVDdXN0b20sXFxcXG4gICAgICAgICAgICAgICAgICAgIGN1c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cXFxcbiAgICAgICAgY2FzZSAn5ZCv55SoL+emgeeUqCc6XFxcXG4gICAgICAgICAgICBkLnRpdGxlID0gKHYudmlzaWJsZSA/ICfwn5+iICAnIDogJ/CflLQgICcpICsgZC50aXRsZVxcXFxuICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpXFxcXG4gICAgICAgICAgICAgICAgcnVsZXNbaV0udmlzaWJsZSA9ICFydWxlc1tpXS52aXNpYmxlXFxcXG4gICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2N1c3RvbURhdGEnLCBKU09OLnN0cmluZ2lmeShydWxlcykpXFxcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcXFxuICAgICAgICAgICAgfSwgaSlcXFxcbiAgICAgICAgICAgIGJyZWFrXFxcXG4gICAgICAgIGNhc2UgJ+mHjeaWsOaOkuW6jyc6XFxcXG4gICAgICAgICAgICBsZXQgc29ydEZsYWcgPSBwYXJzZUludChnZXRNeVZhcignc29ydEZsYWcnLCAnLTEnKSlcXFxcbiAgICAgICAgICAgIGQudGl0bGUgPSAoc29ydEZsYWcgPT0gaSA/ICfwn5SDICAnIDogJycpICsgZC50aXRsZVxcXFxuICAgICAgICAgICAgaWYgKHNvcnRGbGFnID09IC0xKVxcXFxuICAgICAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCBpLnRvU3RyaW5nKCkpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6YCJ5oup6KaB56e75Yqo5Yiw55qE5L2N572uJ1xcXFxuICAgICAgICAgICAgICAgIH0sIGkpXFxcXG4gICAgICAgICAgICBlbHNlXFxcXG4gICAgICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChvbGRJbmRleCwgbmV3SW5kZXgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzLnNwbGljZShuZXdJbmRleCwgMCwgcnVsZXMuc3BsaWNlKG9sZEluZGV4LCAxKVswXSlcXFxcbiAgICAgICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2N1c3RvbURhdGEnLCBKU09OLnN0cmluZ2lmeShydWxlcykpXFxcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzb3J0RmxhZycsICctMScpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxcXG4gICAgICAgICAgICAgICAgfSwgc29ydEZsYWcsIGkpXFxcXG4gICAgICAgICAgICBicmVha1xcXFxuICAgICAgICBjYXNlICfmm7TmlLnlm77moIcnOlxcXFxuICAgICAgICAgICAgZC51cmwgPSAkKHYuaWNvbiB8fCAnJywgJ+i+k+WFpeaWsOWbvuagh+WcsOWdgOaIluminOiJsuS7o+egge+8micpLmlucHV0KChpKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpXFxcXG4gICAgICAgICAgICAgICAgaWYgKGlucHV0KV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FnICsgJz8nICsgKHBhcmFtcyB8fCAnJylcXFxcbiAgICAgICAgICAgICAgICBNWV9fUlVMRS5kZXRhaWxfZmluZF9ydWxlID0gc3ViUGFnZS5ydWxlXFxcXG4gICAgICAgICAgICAgICAgTVlfX1JVTEUuZGV0YWlsX2NvbF90eXBlID0gc3ViUGFnZS5jb2xfdHlwZVxcXFxuICAgICAgICAgICAgfSBlbHNlIGlmICh2LnVybC5pbmNsdWRlcygnQGxhenlSdWxlPScpKSB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHJlSW5kZXggPSB2LnVybC5pbmRleE9mKCcuanM6JylcXFxcbiAgICAgICAgICAgICAgICBpZiAocmVJbmRleCA+PSAwKSB2LnVybCA9IHYudXJsLnNsaWNlKDAsIHJlSW5kZXgpICsgJy5qczpcXFxcXFxcXG5pZihNWV9SVUxFKU9iamVjdC5hc3NpZ24oTVlfUlVMRSwgJyArIGFzc2lnbkxhenlSdWxlICsgJyk7JyArIHYudXJsLnNsaWNlKHJlSW5kZXggKyA0KVxcXFxuICAgICAgICAgICAgICAgIHJldHVybiB2XFxcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKGlzSW5kZXgpIHtcXFxcbiAgICAgICAgICAgICAgICBpZiAoIU1ZX1JVTEUuZGV0YWlsX2ZpbmRfcnVsZSB8fCAvaGlrZXI6XFxcXFxcXFwvXFxcXFxcXFwvKD8hZW1wdHkuKyQpLy50ZXN0KHYudXJsKSkgcmV0dXJuIHZcXFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHZcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIHYuZXh0cmEgPSBPYmplY3QuYXNzaWduKHt9LCB2LmV4dHJhLCB7XFxcXG4gICAgICAgICAgICAgICAgdXJsOiBnZW5FeFVybCh2LnVybCksXFxcXG4gICAgICAgICAgICAgICAgUlVMRTogTVlfX1JVTEUsXFxcXG4gICAgICAgICAgICAgICAgcGF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1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VEb20oZGF0YSwgdikgOlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VEb21Gb3JIdG1sKGRhdGEsIHYpXFxcXG4gICAgICAgICAgICAgICAgICAgIGlmIChpICE9IDMpIHYgPSBydW5Db2RlKHYpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2XFxcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkgeyByZXR1cm4gJycgfVxcXFxuICAgICAgICAgICAgfSksXFxcXG4gICAgICAgICAgICByZXMgPSB7XFxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLCB1cmw6IHVybCxcXFxcbiAgICAgICAgICAgICAgICBkZXNjOiBkZXNjLCBpbWc6IGltZyxcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogTVlfUlVMRS5jb2xfdHlwZVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICBpZiAocmVzLnVybCkge1xcXFxuICAgICAgICAgICAgaWYgKHJlcy51cmwuaW5jbHVkZXMoJ0BsYXp5UnVsZT0nKSkge1xcXFxuICAgICAgICAgICAgICAgIGxldCByZUluZGV4ID0gcmVzLnVybC5pbmRleE9mKCcuanM6JylcXFxcbiAgICAgICAgICAgICAgICBpZiAocmVJbmRleCA+PSAwKSByZXMudXJsID0gcmVzLnVybC5zbGljZSgwLCByZUluZGV4KSArICcuanM6XFxcXFxcXFxuaWYoTVlfUlVMRSlPYmplY3QuYXNzaWduKE1ZX1JVTEUsICcgKyBhc3NpZ25MYXp5UnVsZSArICcpOycgKyByZXMudXJsLnNsaWNlKHJlSW5kZXggKyA0KVxcXFxuICAgICAgICAgICAgfSBlbHNlICBpZiAoZGV0YWlsRmluZFJ1bGUpIHtcXFxcbiAgICAgICAgICAgICAgICByZXMuZXh0cmEgPSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogZ2VuRXhVcmwodXJsKSxcXFxcbi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XFxcXFwiampzXFxcXFxcXCIsIFxcXFxcXFwi5bGV5byAXFxcXFxcXCIpO1xcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogamppZFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn566A5LuLIDxzbWFsbD48c21hbGw+PHNwYW4gc3R5bGU9XFxcXFxcXCJjb2xvcjojMTlCODlEXFxcXFxcXCI+5pS26LW3Pjwvc3Bhbj48L3NtYWxsPjwvc21hbGw+J1xcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogMTQsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZVNwYWNpbmc6IDMsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGRlY2lkXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICc8c3BhbiBzdHlsZT1cXFxcXFxcImNvbG9yOiM4MDgwODBcXFxcXFxcIj4nICsgZGVzX2Rlc2MgKyAnLi4uPC9zcGFuPidcXFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKFxcXFxcXFwiampzXFxcXFxcXCIsIFxcXFxcXFwi5pS26LW3XFxcXFxcXCIpO1xcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogamppZFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn566A5LuLIDxzbWFsbD48c21hbGw+PHNwYW4gc3R5bGU9XFxcXFxcXCJjb2xvcjojMTlCODlEXFxcXFxcXCI+5bGV5byAPjwvc3Bhbj48L3NtYWxsPjwvc21hbGw+J1xcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogMTQsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZVNwYWNpbmc6IDMsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGRlY2lkXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICc8c3BhbiBzdHlsZT1cXFxcXFxcImNvbG9yOiM4MDgwODBcXFxcXFxcIj4nICsgZGVzX2Rlc2Muc3Vic3RyKDAsIDMwKSArICcuLi48L3NwYW4+J1xcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG5cXFxcbiAgICAgICAgICAgIH0sIE1ZX1JVTEUgKyBcXFxcXFxcIl9qamlkXFxcXFxcXCIsIE1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GxhenkpIHtcXFxcbiAgICB0cnkge1xcXFxuICAgICAgICBsZXQgZG9MaXN0ID0gbGlzdC5tYXAoKGl0ZW0pID0+ICh7XFxcXG4gICAgICAgICAgICB0aXRsZTogcGRmaChpdGVtLCBjaGFwdGVyVGl0bGUpLFxcXFxuICAgICAgICAgICAgdXJsOiBwZChpdGVtLCBjaGFwdGVyTGluZSksXFxcXG4gICAgICAgIH0pKTtcXFxcbiAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgIHRpdGxlOiAn4oCc4oCc4oCd4oCdPGI+PHNwYW4gc3R5bGU9XFxcXFxcXCJjb2xvcjogIzFhYWQxOVxcXFxcXFwiPuS4i+i9vea8q+eUu/CflLk8L3NwYW4+PC9iPicsXFxcXG4gICAgICAgICAgICB1cmw6IFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2Rvd25sb2FkLnZpZXcjbm9SZWNvcmRIaXN0b3J5IyNub1JlZnJlc2gjP3J1bGU95pys5Zyw6LWE5rqQ566h55CGXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJ0ZXh0X2NlbnRlcl8xXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgIGNoYXB0ZXJMaXN0OiBkb0xpc3QsXFxcXG4gICAgICAgICAgICAgICAgaW5mbzoge1xcXFxuICAgICAgICAgICAgICAgICAgICBib29rTmFtZTogcGRmaChodG1sLCBUaXRsZSksXFxcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVOYW1lOiBNWV9SVUxFLnRpdGxlLFxcXFxuICAgICAgICAgICAgICAgICAgICBib29rVG9wUGljOiBwZChodG1sLCBjaGFwdGVyUGljKSxcXFxcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VDb2RlOiBkb3dubG9hZGxhenlcXFxcbiAgICAgICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgICAgIGRlZmF1bHRWaWV3OiBcXFx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ZX1JVTEUudXJsKVxcXFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoKE1ZX1JVTEUudGl0bGUgKyAnI2xpbmUtdGl0bGUnKSwgbGluZVRpdGxlKVxcXFxuICAgICAgICAgICAgICAgICAgICBsb2coTVlfUlVMRS50aXRsZSArIGdldFZhcigoTVlfUlVMRS50aXRsZSArICcjbGluZS10aXRsZScpKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL+W3suWIh+aNouiHs1xcXFxcXFwiICsgbGluZVRpdGxlXFxcXG4gICAgICAgICAgICAgICAgfSwgdmFyS2V5LCBpLCBsaW5lVGl0bGUpLFxcXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nXFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgfSBjYXRjaCAoZSkge31cXFxcbiAgICB9XFxcXG4gICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxcXG4gICAgICAgICAgICB9KTtcXFxcbn1cXFwifSx7XFxcImNvbF90eXBlXFxcIjpcXFwibW92aWVfM1xcXCIsXFxcIm5hbWVcXFwiOlxcXCLop6PmnpBb5YyFXVxcXCIsXFxcInBhdGhcXFwiOlxcXCJiempzXFxcIixcXFwicnVsZVxcXCI6XFxcInZhciDmvKvnlLvop6PmnpAgPSAkLnRvU3RyaW5nKCgpID0+IHtcXFxcbiAgICB2YXIgaWQgPSB0cnVlO1xcXFxuICAgIHZhciBjb2RlID0gcmVxdWVzdChpbnB1dClcXFxcbiAgICB2YXIgcGljcyA9IFtdO1xcXFxuICAgIHZhciB0b19SZXBlYXQgPSBmYWxzZTtcXFxcblxcXFxuXFxcXG4gICAgd2hpbGUgKGlkKSB7XFxcXG4gICAgICAgIHBkZmEoY29kZSwgXFxcXFxcXCIuY2hhcHR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9zcGFuPjwvYj4nIDogdGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChwZChpdGVtLCDliIbnsbvpk77mjqUpICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld19jYXRlID0gW11cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXAuZm9yRWFjaCgoY2F0ZSwgaW5kZXgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY2F0ZS5wdXNoKGluZGV4ID09PSAwID8gcGFyYW1zLmtleS50b1N0cmluZygpIDogXFxcXFxcXCIwXFxcXFxcXCIpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KG5ld19jYXRlKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnVybCwgaW5wdXQpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiBwYWdlLFxcXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXFxcbiAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiYmxhbmtfYmxvY2tcXFxcXFxcIlxcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgIH0gZWxzZSBpZiAoZm9sZCA9PT0gJzEnKSB7XFxcXG4gICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0ZW0sIOWIhuexu+agh+mimClcXFxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyAn4oCc4oCc4oCd4oCdPGI+PHNwYW4gc3R5bGU9XFxcXFxcXCJjb2xvcjogJyArIOWIhuexu+minOiJsiArICdcXFxcXFxcIj4nICsgdGl0bGUgKyAnPC9zcGFuPjwvYj4nIDogdGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChwZChpdGVtLCDliIbnsbvpk77mjqUpICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcFtwYXJhbXMuaW5kZXhdID0gcGFyYW1zLmtleS50b1N0cmluZygpXFxcXG5cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnRpdGxlLCBKU09OLnN0cmluZ2lmeShwYXJhbXMuY2F0ZV90ZW1wKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihNWV9SVUxFLnVybCwgaW5wdXQpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiBwYWdlLFxcXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXFxcbiAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiYmxhbmtfYmxvY2tcXFxcXFxcIlxcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgIH1cXFxcbiAgICB9KVxcXFxufVxcXCJ9LHtcXFwiY29sX3R5cGVcXFwiOlxcXCJtb3ZpZV8zXFxcIixcXFwibmFtZVxcXCI6XFxcIuWKqOaAgVvkuIBdXFxcIixcXFwicGF0aFxcXCI6XFxcImNhdGVnb3JpZXMtaGVhZGVyXFxcIixcXFwicnVsZVxcXCI6XFxcImNvbnN0IHN5bWJvbE1hcCA9IHtcXFxcbiAgICAvLyBjaGVja1BhcmFtczogU3ltYm9sKCdjaGVja1BhcmFtcycpLFxcXFxuICAgIG1MYXlvdXQ6IFN5bWJvbCgnbUxheW91dCcpLFxcXFxuICAgIHRydWVfdXJsOiBTeW1ib2woJ3RydWVfdXJsJyksXFxcXG4gICAgbVBhZ2U6IFN5bWJvbCgnbVBhZ2UnKSxcXFxcbiAgICBzcmM6IFN5bWJvbCgnc3JjJyksXFxcXG4gICAgcnVsZU9iakxpc3Q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gICAgICAgICBpZiAobGF5b3V0LnRpdGxlIHx8IGxheW91dC51cmwgfHwgbGF5b3V0LmNvbF90eXBlIHx8IGluamVjdEluZGV4KSB7XFxcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBrZXlzLmxlbmd0aDsgaSsrKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGtleSA9IGtleXNbaV1cXFxcbiAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUZvbGRMYXlvdXRdW2tleV0gPSBsYXlvdXRba2V5XTtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFxcXFxcIuivt+S8oOWFpeato+ehrueahOaKmOWPoOeVjOmdouWFg+e0oO+8gVxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgLy8gaW5qZWN0SW5kZXgg5oqY5Y+g5oyJ6ZKu5o+S5YWl56ysIGluamVjdEluZGV4IOihjFxcXFxuICAgICAgICAgICAgaWYgKGluamVjdEluZGV4KSB7XFxcXG4gICAgICAgICAgICAgICAgaWYgKCEodHlwZW9mIChpbmplY3RJbmRleCkgPT09ICdudW1iZXInKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcXFxcXCLmipjlj6DmjInpkq7mj5LlhaXooYzor7fkvKDlhaXmlbDlrZfvvIFcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgaWYgKGluamVjdEluZGV4IDwgMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcXFxcXCLmipjlj6DmjInpkq7mj5LlhaXooYzor7fkvKDlhaXlpKfkuo4gMCDnmoTmlbTmlbDvvIFcXFxcXFxcIilcXFxcbiAgICAgICAgICA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vcnkudXJsUnVsZSB8fCAnYSYmaHJlZidcXFxcbiAgICAgICAgaWYgKHR5cGVvZiB1cmxSdWxlID09PSAnb2JqZWN0Jykge1xcXFxuICAgICAgICAgICAgbGV0IG1VcmxSdWxlID0gdXJsUnVsZS5ydWxlIHx8IHVybFJ1bGVbJ+ino+aekOinhOWImSddIHx8ICdhJiZocmVmJztcXFxcbiAgICAgICAgICAgIGlmIChtVXJsUnVsZS5zdGFydHNXaXRoKFxcXFxcXFwiQGpzOlxcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgICAgIHVybCA9IHRoaXMuZXZhbEpTUnVsZShzcmMsIG1VcmxSdWxlKTtcXFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHBhcnNlID0gcGFyc2VEb207XFxcXG4gICAgICAgICAgICAgICAgaWYgKHVybFJ1bGUucGFyc2VPcHRpb24pIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoICh1cmxSdWxlLnBhcnNlT3B0aW9uKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXFxcXFwicGFyc2VEb21cXFxcXFxcIjpcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcXFxcXCJwZFxcXFxcXFwiOlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb207XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXFxcXFwicGFyc2VEb21Gb3JIdG1sXFxcXFxcXCI6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXFxcXFwicGRmaFxcXFxcXFwiOlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb21Gb3JIdG1sO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tO1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh1cmxSdWxlW1xcXFxcXFwi6Kej5p6Q5pa55rOVXFxcXFxcXCJdKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAodXJsUnVsZVtcXFxcXFxcIuino+aekOaWueazlVxcXFxcXFwiXSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFxcXFxcInBhcnNlRG9tXFxcXFxcXCI6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXFxcXFwicGRcXFxcXFxcIjpcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFxcXFxcInBhcnNlRG9tRm9ySHRtbFxcXFxcXFwiOlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFxcXFxcInBkZmhcXFxcXFxcIjpcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tRm9ySHRtbDtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB1cmwgPSBwYXJzZShzcmMsIG1VcmxSdWxlKTtcXFxcbiAgICAgICAgICAgIH1cXFxcbiA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gICAgICAgICAgaXNGb2xkOiB0aGlzW3N5bWJvbE1hcC5tRm9sZF0sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgVkFSTUFQOiB0aGlzLlZBUk1BUFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogdGhpc1tzeW1ib2xNYXAubUZvbGRMYXlvdXRdLmNvbF90eXBlIHx8IFxcXFxcXFwic2Nyb2xsX2J1dHRvblxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1MYXlvdXRdLnB1c2goZm9sZExheW91dClcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG5cXFxcbiAgICAgICAgICAgICAgICAvL+WFt+S9k+WIl+ihqOS4i+eahOWIhuexu1xcXFxuICAgICAgICAgICAgICAgIGxldCBzdWJfY2F0ZWdvcmllcyA9IFtdO1xcXFxuICAgICAgICAgICAgICAgIGlmIChjYXRlZ29yeS5zdWJMaXN0UnVsZS5zdGFydHNXaXRoKFxcXFxcXFwiQGpzOlxcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICBzdWJfY2F0ZWdvcmllcyA9IHRoaXMuZXZhbEpTUnVsZShjYXRlZ29yeS5saXN0LCBjYXRlZ29yeS5zdWJMaXN0UnVsZSlcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICBzdWJfY2F0ZWdvcmllcyA9IHBhcnNlRG9tRm9yQXJyYXkoY2F0ZWdvcnkubGlzdCwgY2F0ZWdvcnkuc3ViTGlzdFJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBpZiAoaW5kZXggPCAodGhpc1tzeW1ib2xNYXAubUZvbGRJbmRleF0gfHwgMSkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMuZm9yRWFjaCgoaXRlbSwga2V5KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSB0aGlzLmdldFRpdGxlKGl0ZW0sIGNhdGVnb3J5KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHRoaXMuZ2V0VXJsKGl0ZW0sIGNhdGVnb3J5KVxcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tTGF5b3V0XS5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyAn4oCc4oCc4oCd4oCdPGI+PGZvbnQgY29sb3I9JyArIHRoaXNbc3ltYm9sTWFwLm1Db2xvcl0gKyAnPicgKyB0aXRsZSArICcgPC9mb250PjwvYj4nIDogdGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHVybCkubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3X2NhdGUgPSBbXVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocGFyYW1zLmluZGV4ID09PSAwKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wLmZvckVhY2goKGNhdGUsIGluZGV4KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3X2NhdGUucHVzaChpbmRleCA9PT0gMCA/IHBhcmFtcy5rZXkudG9TdHJpbmcoKSA6IFxcXFxcXFwiMFxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMudGFnICsgcGFyYW1zLlZBUk1BUC5DQVRFR09SWSwgSlNPTi5zdHJpbmdpZnkocGFyYW1zLmluZGV4ID09PSAwID8gbmV3X2NhdGUgOiBwYXJhbXMuY2F0ZV90ZW1wKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIocGFyYW1zLnRhZyArIHBhcmFtcy5WQVJNQVAuVVJMLCBpbnB1dClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWQVJNQVA6IHRoaXMuVkFSTUFQLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YWc6IG1UYWcsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiB0aGlzW3N5bWJvbE1hcC5tUGFnZV0sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1MYXlvdXRdLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiYmxhbmtfYmxvY2tcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXNbc3ltYm9sTWFwLm1Gb2xkXSA9PT0gJzAnKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gdGhpcy5nZXRUaXRsZShpdGVtLCBjYXRlZ29yeSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSB0aGlzLmdldFVybChpdGVtLCBjYXRlZ29yeSlcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gJ+KAnOKAnOKAneKAnTxiPjxmb250IGNvbG9yPScgKyB0aGlzW3N5bWJvbE1hcC5tQ29sb3JdICsgJz4nICsgdGl0bGUgKyAnIDwvZm9udD48L2I+JyA6IHRpdGxlLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCh1cmwpLmxhenlSdWxlKChwYXJhbXMpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcFtwYXJhbXMuaW5kZXhdID0gcGFyYW1zLmtleS50b1N0cmluZygpXFxcXG5cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIocGFyYW1zLnRhZyArIHBhcmFtcy5WQVJNQVAuQ0FURUdPUlksIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5jYXRlX3RlbXApKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMudGFnICsgcGFyYW1zLlZBUk1BUC5VUkwsIGlucHV0KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFZBUk1BUDogdGhpcy5WQVJNQVAsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhZzogbVRhZyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHRoaXNbc3ltYm9sTWFwLm1QYWdlXSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJibGFua19ibG9ja1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICB9XFxcXG4gICAgfSxcXFxcblxcXFxuICAgIOeVjOmdoihsYXlvdXQpIHtcXFxcbiAgICAgICAgcmV0dXJuIHRoaXMubGF5b3V0KGxheW91dClcXFxcbiAgICB9LFxcXFxuICAgIOWIhuexu+mTvuaOpSh0cnVlVXJsKSB7XFxcXG4gICAgICAgIHJldHVybiB0aGlzLnRydWVVcmwodHJ1ZVVybCk7XFxcXG4gICAgfSxcXFxcbiAgICDpobXnoIEocGFnZSkge1xcXFxuICAgICAgICByZXR1cm4gdGhpcy5wYWdlKHBhZ2UpO1xcXFxuICAgIH0sXFxcXG4gICAg5rqQ56CBKGh0bWwpIHtcXFxcbiAgICAgICAgcmV0dXJuIHRoaXMuaHRtbChodG1sKTtcXFxcbiAgICB9LFxcXFxuICAgIOWumuS9jeS4gOe6p+WIhuexuyhsaXN0KSB7XFxcXG4gICAgICAgIHJldHVybiB0aGlzLmxpc3QobGlzdCk7XFxcXG4gICAgfSxcXFxcbiAgICDlrprkvY3lrZDliIbnsbsoc3ViTGlzdCkge1xcXFxuICAgICAgICByZXR1cm4gdGhpcy5zdWJMaXN0KHN1Ykxpc3QpO1xcXFxuICAgIH0sXFxcXG4gICAg5a6a5L2N5YiG57G75qCH6aKYKHRpdGxlKSB7XFxcXG4gICAgICAgIHJldHVybiB0aGlzLnRpdGxlKHRpdGxlKTtcXFxcbiAgICB9LFxcXFxuICAgIOWumuS9jeWIhuexu+mTvuaOpSh1cmwpIHtcXFxcbiAgICAgICAg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FxcXG4gICAgICAgICAgICB0aGlzLnJlZ2V4TWFwLnB1c2gocmVnRXhwKVxcXFxuICAgICAgICB9XFxcXG4gICAgICAgIHJldHVybiB0aGlzO1xcXFxuICAgIH0sXFxcXG4gICAgZGVidWcoKSB7XFxcXG4gICAgICAgIHRoaXMucGFyYW1zLmRlYnVnID0gdHJ1ZVxcXFxuICAgICAgICByZXR1cm4gdGhpcztcXFxcbiAgICB9LFxcXFxuICAgIGV4ZWMoKSB7XFxcXG4gICAgICAgIHRoaXMuY2hlY2tQYXJhbXMoKVxcXFxuICAgICAgICBsZXQgdHJ1ZV91cmwgPSAnJ1xcXFxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRoaXMucmVnZXhNYXAubGVuZ3RoOyBpKyspIHtcXFxcbiAgICAgICAgICAgIGxldCByZWdPYmogPSB0aGlzLnJlZ2V4TWFwW2ldO1xcXFxuICAgICAgICAgICAgbGV0IHVybEV4cCA9IHJlZ09iai5yZWc7XFxcXG4gICAgICAgICAgICBpZiAodHlwZW9mIHVybEV4cCA9PT0gJ3N0cmluZycpIHtcXFxcbiAgICAgICAgICAgICAgICB1cmxFeHAgPSBuZXcgUmVnRXhwKHVybEV4cClcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGlmICh1cmxFeHAudGVzdCh0aGlzLnBhcmFtcy51cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMucGFyYW1zLmRlYnVnKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxvZyh1cmxFeHAudG9TdHJpbmcoKSlcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgdHJ1ZV91cmwgPSByZWdPYmouZXhlYygpO1xcXFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9XFxcXG4gICAgICAgIGlmICh0cnVlX3VybCkge1xcXFxuICAgICAgICAgICAgcmV0dXJuIHRydW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uICAgICAgICDpk77mjqU6IGNbNF1cXFxcbiAgICB9XFxcXG59XFxcXG5cXFxcbmZ1bmN0aW9uIG1lcmdlKHNvdXJjZSwgdGFyZ2V0KSB7XFxcXG4gICAgbGV0IGtleXMgPSBPYmplY3Qua2V5cyhzb3VyY2UpXFxcXG4gICAgZm9yIChsZXQgaSBpbiBrZXlzKSB7XFxcXG4gICAgICAgIHRhcmdldFtrZXlzW2ldXSA9IHNvdXJjZVtrZXlzW2ldXVxcXFxuICAgIH1cXFxcbn1cXFxcblxcXFxuZnVuY3Rpb24g5LiA57qnKG9iaikge1xcXFxuICAgIHZhciBkID0gW107XFxcXG4gICAgaWYgKCQudHlwZShvYmopID09IFxcXFxcXFwic3RyaW5nXFxcXFxcXCIpIHtcXFxcbiAgICAgICAgb2JqID0gY29udmVydDEob2JqKVxcXFxuICAgIH1cXFxcbiAgICBpZiAob2JqLuinhOWImSkge1xcXFxuICAgICAgICBsZXQgYyA9IGNvbnZlcnQxKG9iai7op4TliJkpXFxcXG4gICAgICAgIG1lcmdlKGMsIG9iailcXFxcbiAgICB9XFxcXG4gICAgbGV0IGFyciA9IHBkZmEoZ2V0UmVzQ29kZSgpLCBvYmou5YiX6KGoKTtcXFxcbiAgICAgICBpZiAob2JqLuWIl+ihqOWkhOeQhiAhPSBudWxsKSB7XFxcXG4gICAgICAgICAgICBhcnIgPSBvYmou6ZO+5o6l5aSE55CGKGFycilcXFxcbiAgICAgICAgfVxcXFxuICAgIGZvciAobGV0IGl0IG9mIGFycikge1xcXFxuICAgICAgICBsZXQgdXJsID0gcGQoaXQsIG9iai7pk77mjqUpXFxcXG4gICAgICAgIGlmIChvYmou6ZO+5o6l5aSE55CGICE9IG51bGwpIHtcXFxcbiAgICAgICAgICAgIHVybCA9IG9iai7pk77mjqXlpITnkIYodXJsKVxcXFxuICAgICAgICB9XFxcXG4gICAgICAgIGxldCBwaWMgPSBwZChpdCwgb2JqLuWbvueJhylcXFxcbiAgICAgICAgaWYgKG9iai7lm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blkI0pLFxcXFxuICAgICAgICAgICAgICAgIHVybDogZG9MaXN0dXJsXFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICB9XFxcXG5cXFxcbiAgICAgICAgdmFyIGJvb2tOYW1lID0gIeWkmui3r+e6v+WQpiA/IOagh+mimCA6IOagh+mimCArICctJyArIOWIl+ihqOWQjVtpXVxcXFxuXFxcXG4gICAgICAgIOeroOiKgmpzb24ucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTog5YiX6KGo5ZCNW2ldLFxcXFxuICAgICAgICAgICAgbGlzdDogZG9MaXN0LFxcXFxuICAgICAgICAgICAgc2pzczoge1xcXFxuICAgICAgICAgICAgICAgIGNoYXB0ZXJMaXN0OiBkb0xpc3QsXFxcXG4gICAgICAgICAgICAgICAgaW5mbzoge1xcXFxuICAgICAgICAgICAgICAgICAgICBib29rTmFtZTogYm9va05hbWUsIC8v5ryr55S75ZCN56ewLFxcXFxuICAgICAgICAgICAgICAgICAgICBydWxlTmFtZTogTVlfUlVMRS50aXRsZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgYm9va1RvcFBpYzog5Zu+54mHLFxcXFxuICAgICAgICAgICAgICAgICAgICBwYXJzZUNvZGU6IOa8q+eUu+ino+aekCxcXFxcbiAgICAgICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgICAgIGRlZmF1bHRWaWV3OiBcXFxcXFxcIjFcXFxcXFxcIlxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9KVxcXFxuICAgIH1cXFxcbiAgICByZXR1cm4g56ug6IqCanNvblxcXFxufVxcXFxuXFxcXG5cXFxcbmZ1bmN0aW9uIOa3u+WKoOWktOmDqOWIl+ihqChkLCDmoIfpopgsIOWbvueJhywg5o+P6L+wLCDkvZzogIUsIOaXtumXtCwg5YiG57G7LOmhtVVSTCkge1xcXFxuXFxcXG4gICAg5qCH6aKYID0gIeagh+mimCA/ICcnIDog5qCH6aKYICsgJ1xcXFxcXFxcbidcXFxcb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ID0g5o6S5bqPID09ICflgJLluo8nID8gJ+ato+W6jycgOiAn5YCS5bqPJztcXFxcbiAgICAgICAgdXBkYXRlSXRlbSh7XFxcXG4gICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgIGlkOiDpobVVUkwgKyBcXFxcXFxcIl/mjpLluo9cXFxcXFxcIlxcXFxuICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgIHRpdGxlOiDmoIfpopjlkI0ucmVwbGFjZSgn6Lev57q/Jywg5qCH6aKY5pWw5o2uKS5yZXBsYWNlKCfmjpLluo8nLCDmj5DnpLopXFxcXG4gICAgICAgIH0pXFxcXG5cXFxcblxcXFxuICAgICAgICBpZiAo5o+Q56S6ID09ICflgJLluo8nKSB7XFxcXG4gICAgICAgICAgICDliJfooajmlbDmja4ucmV2ZXJzZSgpXFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAg5YiX6KGo5pWw5o2uLmZvckVhY2goZnVuY3Rpb24oZGF0YSwgc3NpZCkge1xcXFxuICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGRhdGEudGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgdXJsOiBkYXRhLnVybCArIOino+aekOS7o+eggSxcXFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICBpZDog6aG1VVJMICsgXFxcXFxcXCJf6YCJ6ZuGXFxcXFxcXCIgKyBzc2lkXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgIH0pO1xcXFxuXFxcXG5cXFxcbiAgICAgICAgcHV0VmFyKOmhtVVSTCArIFxcXFxcXFwi56ug6IqC5o6S5bqPXFxcXFxcXCIsIOaPkOekuilcXFxcbiAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgfSwg5qCH6aKY5ZCN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ICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IE1ZX1VSTCArIFxcXFxcXFwiX+e6v+i3r1xcXFxcXFwiICsgeGxpZFxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgcHV0TXlWYXIoTVlfVVJMLCBpZClcXFxcbiAgICAgICAgICAgIHZhciDnq6DoioIgPSBsaXN0c1tnZXRNeVZhcihNWV9VUkwsICcwJyldO1xcXFxuICAgICAgICAgICAgaWYgKOaOkuW6jyA9PSAnI0ZGMDAwMFxcXFxcXFwiPuWAkuW6jycpIHtcXFxcbiAgICAgICAgICAgICAgICDnq6DoioIucmV2ZXJzZSgpXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICBsZXQgY3AgPSDnq6DoioIubWFwKChkYXRhLCBzc2lkKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHBkZmgoZGF0YSwgJ2EmJlRleHQnKSxcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBwZChkYXRhLCAnYSYmaHJlZicpICsgbGF6eSxcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzInLFxcXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBNWV9VUkwgKyBcXFxcXFxcIl/pgInpm4ZcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfTtcXFxcbiAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKE1ZX1VSTCArIFxcXFxcXFwiX+mAiembhlxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgIGFkZEl0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bWcuYmFpZHUuY29tLm1hbmh1YXBpLmNvbS8yMDE3MDgzMC8xMDUxNDMuanBnQFJlZmVyZXI9IiwidGl0bGUiOiLmiJHooqvmgLvoo4Hpu5HkuIrkuoYifQ==
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement