Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥Bato.to@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcInRleHRfMVwiLFwibmFtZVwiOlwiQ2xhc3NUYWJcIixcInBhdGhcIjpcIkNsYXNzVGFiXCIsXCJydWxlXCI6XCJ2YXIge1xcbiAgICBRSU5HX1RJVExFLCB0aXRsZSwgdXJsLFxcbiAgICBjbGFzc19uYW1lLCBjbGFzc191cmwsXFxuICAgIGFyZWFfbmFtZSwgYXJlYV91cmwsXFxuICAgIHllYXJfbmFtZSwgeWVhcl91cmwsXFxuICAgIHNvcnRfbmFtZSwgc29ydF91cmxcXG59ID0gJC5pbXBvcnRQYXJhbVxcbmNvbnN0IENsYXNzVGFiID0gZnVuY3Rpb24oY2xhc3NBcnJheSwgcGFyYW1zKSB7XFxuICAgIE9iamVjdC5hc3NpZ24odGhpcywgcGFyYW1zKVxcbiAgICB0aGlzLmFyciA9IGNsYXNzQXJyYXkubWFwKHYgPT4gdGhpcy5pbml0KHYpKVxcbiAgICB0aGlzLnNpZ24gPSAnJCcgKyBRSU5HX1RJVExFICsgJ18nICsgKHRoaXMubmFtZSB8fCAnJykgKyAnXydcXG4gICAgdGhpcy5jb2xvciA9IHRoaXMuY29sb3IgfHwgJyM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FxuICAgICAgICAgICAgY2xhc3NfbmFtZS5mb3JFYWNoKChuYW1lLCBpKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCB1cmwgPSBjbGFzc191cmxbaV0sXFxuICAgICAgICAgICAgICAgICAgICBub3cgPSBKU09OLnN0cmluZ2lmeSh7IG5hbWU6IG5hbWUsIHVybDogdXJsIH0pXFxuICAgICAgICAgICAgICAgIGVsLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHNlbGVjdGVkID09IG5vdyA/ICfigJzigJzigJ3igJ0nICsgbmFtZS5mb250Y29sb3IodGhpcy5jb2xvcikuYm9sZCgpIDogbmFtZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogc2VsZWN0ZWQgPT0gbm93ID8gJ2hpa2VyOi8vZW1wdHknIDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoc2lnbiwgaWQsIG5vdykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihzaWduICsgaWQsIG5vdylcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgICAgICB9LCB0aGlzLnNpZ24sIGlkLCBub3cpLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgZWwucHVzaCh7IGNvbF90eXBlOiB0aGlzLmJvdW5kYXJ5IH0pXFxuICAgICAgICB9KVxcbiAgICB9LFxcbiAgICBpbml0KGNsYXNzT2JqZWN0KSB7XFxuICAgICAgICBpZiAodHlwZW9mIGNsYXNzT2JqZWN0LmNsYXNzX25hbWUgPT0gJ3N0cmluZycpXFxuICAgICAgICAgICAgY2xhc3NPYmplY3QuY2xhc3Nfb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9IDA7IGkgPCByZXF1aXJlbGlzdC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgICAgICB0cnkgeyAvL+i/nOeoi+S+nei1lue0ouW8lVxcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJlcyA9IHJlcXVlc3QocmVxdWlyZWxpc3RbaV0gKyAnRHJlYW1Pek8vSk0vbWFpbi9KTScsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB3aXRoU3RhdHVzQ29kZTogdHJ1ZVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIGlmIChKU09OLnBhcnNlKHJlcykuc3RhdHVzQ29kZSA9PSAyMDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZmlsZUV4aXN0KHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlRmlsZSh1cmwpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmVEb3dubG9hZChyZXF1aXJlbGlzdFtpXSArICdEcmVhbU96Ty9KTS9tYWluL0pNJyx1cmwpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZURvd25sb2FkKHJlcXVpcmVsaXN0W2ldICsgJ0RyZWFtT3pPL0pNL21haW4vSk0nLHVybClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxuICAgICAgICAgICAgYmFjayhmYWxzZSlcXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5pu05pawJ1xcbi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sID0gZ2V0TXlWYXIoJ3JlbW90ZVVybCcpXFxuICAgICAgICBpZiAoIXVybC5zdGFydHNXaXRoKCdoaWtlcjovLycpICYmICF1cmwuc3RhcnRzV2l0aCgnZmlsZTovLycpKVxcbiAgICAgICAgICAgIHVybCA9ICdoaWtlcjovL2ZpbGVzL2xpYnMvJyArIG1kNSh1cmwpICsgJy5qcydcXG4gICAgICAgIGVsc2UgaWYgKHVybC5zdGFydHNXaXRoKCdoaWtlcjovL3BhZ2UvJykpIHVybCA9ICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgaWYgKGlucHV0ID09ICflpIfku70nKSByZXR1cm4gJCgnaGlrZXI6Ly9maWxlcy90bXAvJyArIFFJTkdfVElUTEUgKyAnX2JhY2t1cC5qc29uJywgJ+i+k+WFpeWkh+S7vei3r+W+hCcpXFxuICAgICAgICAgICAgLmlucHV0KCh1cmwsIHVwZGF0ZUludGVydmFsLCBuZXdXaW5kb3csIHRhYkZvbGQsIGRpc2FibGVDdXN0b20pID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gcmVxdWVzdCh1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgY3VzdG9tRGF0YSA9IHJlYWRGaWxlKCdjdXN0b21EYXRhJylcXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKGlucHV0LCBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJbnRlcnZhbDogdXBkYXRlSW50ZXJ2YWwsXFxuICAgICAgICAgICAgICAgICAgICBuZXdXaW5kb3c6IG5ld1dpbmRvdyxcXG4gICAgICAgICAgICAgICAgICAgIHRhYkZvbGQ6IHRhYkZvbGQsXFxuICAgICAgICAgICAgICAgICAgICBkaXNhYmxlQ3VzdG9tOiBkaXNhYmxlQ3VzdG9tLFxcbiAgICAgICAgICAgICAgICAgICAgY3VzdG9tRGF0YTogY3VzdG9tRGF0YSxcXG4gICAgICAgICAgICAgICAgICAgIHJ1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0nICsgJ/Cfk50nLnNtYWxsKCkgKyAnJm5ic3Ag6IGa5ryr6Ieq5a6a5LmJICZuYnNwJy5ib2xkKCkuZm9udGNvbG9yKCcjNzU3NTc1JykgKyAoZGlzYWJsZUN1c3RvbSA/ICfinYwnIDogJ+KtlScpLnNtYWxsKCksXFxuICAgIHVybDogJChbKGRpc2FibGVDdXN0b20gPyAn5ZCv55SoJyA6ICfnpoHnlKgnKSArICflkIjpm4boh6rlrprkuYknLCAn5riF6Zmk6Ieq5a6a5LmJ5pWw5o2uJywgJ+e8lui+kUpTT04nXSwgMSkuc2VsZWN0KCgpID0+IHtcXG4gICAgICAgIHN3aXRjaCAoaW5wdXQuc2xpY2UoMCwgMikpIHtcXG4gICAgICAgICAgICBjYXNlICfmuIXpmaQnOlxcbiAgICAgICAgICAgICAgICBkZWxldGVGaWxlKCdjdXN0b21EYXRhJylcXG4gICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICBjYXNlICflkK/nlKgnOlxcbiAgICAgICAgICAgICAgICBzYXZlRmlsZSgnZGlzYWJsZUN1c3RvbScsICcnKVxcbiAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgIGNhc2UgJ+emgeeUqCc6XFxuICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdkaXNhYmxlQ3VzdG9tJywgJ1QnKVxcbiAgICAgICAgICAgICAgICBpbnB1dCArPSAnXFxcXG7lsI/nqIvluo/lkK/nlKgv56aB55So44CB6YeN5paw5o6S5bqP562J5pON5L2c5Z2H5LiN5Lya5L2T546w5Zyo6aaW6aG15bCP56iL5bqP5YiX6KGo5LitJ1xcbiAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgIGNhc2UgJ+e8lui+kSc6XFxuICAgICAgICAgICAgICAgIGxldCB1cmwgPSBnZXRNeVZhcigncmVtb3RlVXJsJylcXG4gICAgICAgICAgICAgICAgaWYgKCF1cmwuc3RhcnRzV2l0aCgnaGlrZXI6Ly9maWxlcy8n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0b21EYXRhJywgSlNPTi5zdHJpbmdpZnkocnVsZXMpKVxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgIGNhc2UgJ+mHjeaWsOaOkuW6jyc6XFxuICAgICAgICAgICAgbGV0IHNvcnRGbGFnID0gcGFyc2VJbnQoZ2V0TXlWYXIoJ3NvcnRGbGFnJywgJy0xJykpXFxuICAgICAgICAgICAgZC50aXRsZSA9IChzb3J0RmxhZyA9PSBpID8gJ/CflIMgICcgOiAnJykgKyBkLnRpdGxlXFxuICAgICAgICAgICAgaWYgKHNvcnRGbGFnID09IC0xKVxcbiAgICAgICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzb3J0RmxhZycsIGkudG9TdHJpbmcoKSlcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mAieaLqeimgeenu+WKqOWIsOeahOS9jee9ridcXG4gICAgICAgICAgICAgICAgfSwgaSlcXG4gICAgICAgICAgICBlbHNlXFxuICAgICAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgob2xkSW5kZXgsIG5ld0luZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdjdXN0b21EYXRhJykgfHwgJ1tdJylcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzLnNwbGljZShuZXdJbmRleCwgMCwgcnVsZXMuc3BsaWNlKG9sZEluZGV4LCAxKVswXSlcXG4gICAgICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdjdXN0b21EYXRhJywgSlNPTi5zdHJpbmdpZnkocnVsZXMpKVxcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgJy0xJylcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LCBzb3J0RmxhZywgaSlcXG4gICAgICAgICAgICBicmVha1xcbiAgICAgICAgY2FzZSAn5pu05pS55Zu+5qCHJzpcXG4gICAgICAgICAgICBkLnVybCA9ICQodi5pY29uIHx8ICcnLCAn6L6T5YWl5paw5Zu+5qCH5Zyw5Z2A5oiW6aKc6Imy5Luj56CB77yaJykuaW5wdXQoKGkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpXFxuICAgICAgICAgICAgICAgIGlmIChpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzW2ldLmljb24gPSBpbnB1dFxcbiAgICAgICAgICAgICAgICBlbHNlXFxuICAgICAgICAgICAgICAgICAgICBkZWxldGUgcnVsZXNbaV0uaWNvblxcbiAgICAgICAgICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSlcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICBjYXNlICflr7zlhaXmtbfpmJQnOlxcbiAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcbiAgICAg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goKGRhdGEpID0+IHtcXG4gICAgICAgIGxldCBbdGl0bGUsIGltZywgZGVzYywgdXJsXSA9IGZpbmRSdWxlLm1hcCgodiwgaSkgPT4ge1xcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHYgPT0gJyonKSByZXR1cm4gJydcXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgdiA9IChpID09IDEgfHwgaSA9PSAzKSA/XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VEb20oZGF0YSwgdikgOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlRG9tRm9ySHRtbChkYXRhLCB2KVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGkgIT0gMykgdiA9IHJ1bkNvZGUodilcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2XFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsgcmV0dXJuICcnIH1cXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICByZXMgPSB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSwgdXJsOiB1cmwsXFxuICAgICAgICAgICAgICAgIGRlc2M6IGRlc2MsIGltZzogaW1nLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogTVlfUlVMRS5jb2xfdHlwZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIGlmIChyZXMudXJsKSB7XFxuICAgICAgICAgICAgaWYgKHJlcy51cmwuaW5jbHVkZXMoJ0BsYXp5UnVsZT0nKSkge1xcbiAgICAgICAgICAgICAgICBsZXQgcmVJbmRleCA9IHJlcy51cmwuaW5kZXhPZignLmpzOicpXFxuICAgICAgICAgICAgICAgIGlmIChyZUluZGV4ID49IDApIHJlcy51cmwgPSByZXMudXJsLnNsaWNlKDAsIHJlSW5kZXgpICsgJy5qczonICsgaGlqYWNrTGF6eVJ1bGUgKyAnOycgKyByZXMudXJsLnNsaWNlKHJlSW5kZXggKyA0KVxcbiAgICAgICAgICAgIH0gZWxzZSAgaWYgKGRldGFpbEZpbmRSdWxlKSB7XFxuICAgICAgICAgICAgICAgIHJlcy5leHRyYSA9IHtcXG4gICAgICAgICAgICAgICAgICAgIHVybDogZ2VuRXhVcmwodXJsKSxcXG4gICAgICAgICAgICAgICAgICAgIFJVTEU6IGJhc2U2NEVuY29kZShKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKGdlbk15UnVsZSgpLCB7IGRldGFpbF9maW5kX3J1bGU6IGRldGFpbEZpbmRSdWxlIH0pKSksXFxuICAgICAgICAgICAgICAgICAgICBwYWdlVGl0bGU6IGlzSW5kZXggJiYgdGl0bGVcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXMudXJsID0gJ2hpa2VyOi8vcGFnZS9mcmFtZUxvYWQ/cnVsZT0nICsgUUlOR19USVRMRVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoTVlfUlVMRS5kZXRhaWxfZmluZF9ydWxlKSB7XFxuICAgICAgICAgICAgICAgIHJlcy5leHRyYSA9IHtcXG4gICAgICAgICAgICAgICAgICAgIHVybDogZ2VuRXhVcmwodXJsKSxcXG4gICAgICAgICAgICAgICAgICAgIFJVTEU6IGJhc2U2NEVuY29kZShKU09OLnN0cmluZ2lmeShnZW5NeVJ1bGUoKSkpLFxcbiAgICAgICAgICAgICAgICAgICAgcGFnZVRpdGxlOiBpc0luZGV4ICYmIHRpdGxlXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmVzLnVybCA9ICdoaWtlcjovL3BhZ2UvZnJhbWVMb2FkP3J1bGU9JyArIFFJTkdfVElUTEVcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBteUNvbGxfZWwucHVzaChyZXMpXFxuICAgIH0pXFxuICAgIHNldFJlc3VsdChteUNvbGxfZWwpXFxufVxcblwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5p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sXFxcIuaUtui1t1xcXCIpO1xcXCJoaWtlcjovL2VtcHR5XFxcIic7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAn566A5LuLIDxzbWFsbD48c21hbGw+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiMxOUI4OURcXFwiPuWxleW8gD48L3NwYW4+PC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICAgICAgaW1nOiBcXFwiaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vcmUvMTk3LnBuZ1xcXCIsXFxuICAgICAgICAgICAgdXJsOiAkKFxcXCIjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKChqamlkLCBkZWNpZCwgZGVzX2Rlc2MpID0+IHtcXG4gICAgICAgICAgICAgICAgaWYgKGdldE15VmFyKFxcXCJqanNcXFwiLCBcXFwi5pS26LW3XFxcIikgPT0gXFxcIuaUtui1t1xcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJqanNcXFwiLCBcXFwi5bGV5byAXFxcIik7XFxuXFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogamppZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfnroDku4sgPHNtYWxsPjxzbWFsbD48c3BhbiBzdHlsZT1cXFwiY29sb3I6IzE5Qjg5RFxcXCI+5pS26LW3Pjwvc3Bhbj48L3NtYWxsPjwvc21hbGw+J1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG5cXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHRTaXplOiAxNCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZVNwYWNpbmc6IDMsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBkZWNpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICc8c3BhbiBzdHlsZT1cXFwiY29sb3I6IzgwODA4MFxcXCI+JyArIGRlc19kZXNjICsgJy4uLjwvc3Bhbj4nXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcImpqc1xcXCIsIFxcXCLmlLbotbdcXFwiKTtcXG5cXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBqamlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+eugOS7iyA8c21hbGw+PHNtYWxsPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjojMTlCODlEXFxcIj7lsZXlvIA+PC9zcGFuPjwvc21hbGw+PC9zbWFsbD4nXFxuICAgICAgICAgICAgICAgICAgICB9KVxcblxcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IDE0LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lU3BhY2luZzogMyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGRlY2lkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJzxzcGFuIHN0eWxlPVxcXCJjb2xvcjojODA4MDgwXFxcIj4nICsgZGVzX2Rlc2Muc3Vic3RyKDAsIDMwKSArICcuLi48L3NwYW4+J1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIH0sIE1ZX1JVTEUgKyBcXFwiX2pqaWRcXFwiLCBNWV9SVUxFICsgXFxcIl9kZWNpZFxcXCIsIGRlc19kZXNjKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IE1ZX1JVTEUgKyBcXFwiX2pqaWRcXFwiXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAnPHNwYW4gc3R5bGU9XFxcImNvbG9yOiM4MDgwODBcXFwiPicgKyBkZXNfZGVzYy5zdWJzdHIoMCwgMzApICsgJy4uLjwvc3Bhbj4nLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwicmljaF90ZXh0XFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogMTQsXFxuICAgICAgICAgICAgICAgIGxpbmVTcGFjaW5nOiAzLFxcbiAgICAgICAgICAgICAgICBpZDogTVlfUlVMRSArIFxcXCJfZGVjaWRcXFwiXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgICAgIH0pXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgI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XQgbGluZTBUaXRsZSA9ICcnXFxuICAgIHRyeSB7XFxuICAgICAgICBsaW5lMFRpdGxlID0gcGRmaChsaXN0WzBdLCBsaW5lVGl0bGVSdWxlKTtcXG4gICAgfSBjYXRjaCAoZSkge31cXG4gICAgbG9nKE1ZX1JVTEUudGl0bGUgKyBnZXRNeVZhcigoTVlfUlVMRS50aXRsZSArICcjbGluZS10aXRsZScpKSlcXG4gICAgZm9yIChsZXQgaSBpbiBsaXN0KSB7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIGxldCBsaW5lVGl0bGUgPSBwZGZoKGxpc3RbaV0sIGxpbmVUaXRsZVJ1bGUpO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcigoTVlfUlVMRS50aXRsZSArICcjbGluZS10aXRsZScpLCBsaW5lMFRpdGxlKSA9PT0gbGluZVRpdGxlID8gXFxcIuWIh+aNojrigJjigJhcXFwiICsgbGluZVRpdGxlICsgXFxcIlxcXCIgOiBsaW5lVGl0bGUgKyBcXFwi4oCY4oCYOuWIh+aNolxcXCIsXFxuICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKCh2YXJLZXksIGxpbmVJbmRleCwgbGluZVRpdGxlKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcih2YXJLZXksIGxpbmVJbmRleC50b1N0cmluZygpKVxcbiAgICAgICAgICAgICAgICAgICAgLy8gbG9nKE1ZX1JVTEUudXJsKVxcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoKE1ZX1JVTEUudGl0bGUgKyAnI2xpbmUtdGl0bGUnKSwgbGluZVRpdGxlKVxcbiAgICAgICAgICAgICAgICAgICAgbG9nKE1ZX1JVTEUudGl0bGUgKyBnZXRNeVZhcigoTVlfUlVMRS50aXRsZSArICcjbGluZS10aXRsZScpKSlcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG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wg5bCP57G75a6a5L2NKTtcXG4gICAgICAgIGlmIChpbmRleCA9PT0gMCkge1xcbiAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0ZW0sIOWIhuexu+agh+mimClcXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZijmjpLpmaQpICE9ICd1bmRlZmluZWQnICYmIOaOkumZpCAhPSAnJykge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGUgPSB0aXRsZS5yZXBsYWNlKG5ldyBSZWdFeHAo5o6S6ZmkLCBcXFwiZ1xcXCIpLCBcXFwiXFxcIilcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gXFxcIuKAnOKAnOKAneKAnVxcXCIgKyB0aXRsZS5mb250Y29sb3Io5YiG57G76aKc6ImyKSA6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHBkKGl0ZW0sIOWIhuexu+mTvuaOpSkgKyAnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld19jYXRlID0gW11cXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wLmZvckVhY2goKGNhdGUsIGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19jYXRlLnB1c2goaW5kZXggPT09IDAgPyBwYXJhbXMua2V5LnRvU3RyaW5nKCkgOiBcXFwiMFxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihNWV9SVUxFLnRpdGxlLCBKU09OLnN0cmluZ2lmeShuZXdfY2F0ZSkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoTVlfUlVMRS51cmwsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHBhZ2UsXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfSBlbHNlIGlmIChmb2xkID09PSAnMScpIHtcXG4gICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gcGRmaChpdGVtLCDliIbnsbvmoIfpopgpXFxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2Yo5o6S6ZmkKSAhPSAndW5kZWZpbmVkJyAmJiDmjpLpmaQgIT0gJycpIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlID0gdGl0bGUucmVwbGFjZShuZXcgUmVnRXhwKOaOkumZpCwgXFxcImdcXFwiKSwgXFxcIlxcXCIpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBrZXkudG9TdHJpbmcoKSA9PT0gY2F0ZV90ZW1wW2luZGV4XSA/IFxcXCLigJzigJzigJ3igJ1cXFwiICsgdGl0bGUuZm9udGNvbG9yKOWIhuexu+minOiJsikgOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChwZChpdGVtLCDliIbnsbvpk77mjqUpICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXBbcGFyYW1zLmluZGV4XSA9IHBhcmFtcy5rZXkudG9TdHJpbmcoKVxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5jYXRlX3RlbXApKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKE1ZX1JVTEUudXJsLCBpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogcGFnZSxcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxu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XCJzY3JvbGxfYnV0dG9uXFxcIiB9O1xcbiAgICAgKiAgICAgICAg5Y+C5pWw6YeH55So5Y+v6YCJ6KaG55uW5qih5byP77yM5LiN5YaZ55qE5Y+C5pWw5YiZ5L2/55So6buY6K6kO1xcbiAgICAgKiAgICAgICAg5q+U5aaC5Lyg5YWlIHsgY29sX3R5cGU6XFxcInRleHRfMVxcXCIgfe+8jOmCo+acgOe7iOe7k+aenOWwseaYryB7IHRpdGxlOlxcXCLmoIfpopgxXFxcIiwgdXJsOlxcXCJ4eHhcXFwiLCBjb2xfdHlwZTpcXFwidGV4dF8xXFxcIiB9XFxuICAgICAqIEByZXR1cm5zIHtDYXRlZ29yaWVzSGVhZGVyfVxcbiAgICAgKi9cXG4gICAgZm9sZExheW91dChsYXlvdXQpIHtcXG4gICAgICAgIGlmICh0eXBlb2YgbGF5b3V0ID09PSAnb2JqZWN0Jykge1xcbiAgICAgICAgICAgIGxldCBrZXlzID0gT2JqZWN0LmtleXMobGF5b3V0KVxcbiAgICAgICAgICAgIGxldCBpbmplY3RJbmRleCA9IGxheW91dC5pbmplY3RJbmRleCB8fCBsYXlvdXRbJ+aKmOWPoOaMiemSruaPkuWFpeihjCddXFxuICAgICAgICAgICAgaWYgKGxheW91dC50aXRsZSB8fCBsYXlvdXQudXJsIHx8IGxheW91dC5jb2xfdHlwZSB8fCBpbmplY3RJbmRleCkge1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGtleXMubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGtleSA9IGtleXNbaV1cXG4gICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1Gb2xkTGF5b3V0XVtrZXldID0gbGF5b3V0W2tleV07XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIuivt+S8oOWFpeato+ehrueahOaKmOWPoOeVjOmdouWFg+e0oO+8gVxcXCIpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIC8vIGluamVjdEluZGV4IOaKmOWPoOaMiemSruaPkuWFpeesrCBpbmplY3RJbmRleCDooYxcXG4gICAgICAgICAgICBpZiAoaW5qZWN0SW5kZXgpIHtcXG4gICAgICAgICAgICAgICAgaWYgKCEodHlwZW9mIChpbmplY3RJbmRleCkgPT09ICdudW1iZXInKSkge1xcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCLmipjlj6DmjInpkq7mj5LlhaXooYzor7fkvKDlhaXmlbDlrZfvvIFcXFwiKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmIChpbmplY3RJbmRleCA8IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFwi5oqY5Y+g5oyJ6ZKu5o+S5YWl6KGM6K+35Lyg5YWl5aSn5LqOIDAg55qE5pW05pWw77yBXFxcIilcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAoaW5qZWN0SW5kZXggPiB0aGlzW3N5bWJvbE1hcC5tRm9sZEluZGV4XSkge1xcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCLmipjlj6DmjInpkq7mj5LlhaXooYzkuI3lvpflpKfkuo7mmL7npLrmipjlj6DooYzmlbDvvIHor7fosIPnlKggLmZvbGRJbmRleChpbmRleCkg5oiWIC7nrKzlh6DooYzlvIDlp4vmipjlj6AoaW5kZXgpIOS8oOWFpeato+ehrueahOaYvuekuuaKmOWPoOihjOaVsFxcXCIpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUZvbGRMYXlvdXRdLmluamVjdEluZGV4ID0gaW5qZWN0SW5kZXggfHwgMTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVs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WxzZSB7XFxuICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAucnVsZU9iakxpc3RdLnB1c2gocnVsZU9iailcXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiB0aGlzO1xcbiAgICB9LFxcbiAgICBldmFsSlNSdWxlKGl0ZW0sIGpzUnVsZSkge1xcbiAgICAgICAgbGV0IHJ1bGUgPSBqc1J1bGUucmVwbGFjZShcXFwiQGpzOlxcXCIsIFxcXCJcXFwiKVxcbiAgICAgICAgcnVsZSA9IHJ1bGUudHJpbSgpXFxuICAgICAgICAvLyBsb2coJC5zdHJpbmdpZnkocnVsZSkpXFxuICAgICAgICBsZXQgaW5wdXQgPSBpdGVtXFxuICAgICAgICBpZiAocnVsZS5zdGFydHNXaXRoKFxcXCIoXFxcIikpIHtcXG4gICAgICAgICAgICBldmFsKCdyZXN1bHQgPSAnICsgcnVsZSlcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgLyoqXFxuICAgICAgICAgICAgICog6L+Y5Y6f5oiQICQudG9TdHJpbmcoLi4uKSDnmoTmnIDnu4jnu5PmnpzvvIzovr7liLDmnIDnu4jlpITnkIbmlrnlvI/ot5/kuIrpnaLnmoQgaWYg5LiA6Ie055qE55uu55qEXFxuICAgICAgICAgICAgICovXFxuICAgICAgICAgICAgZXZhbCgncmVzdWx0ID0gJyArICcoKCkgPT4geycgKyBydWxlICsgJ30pKCknKVxcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIChyZXN1bHQgfHwgJycpXFxuICAgIH0sXFxuICAgIGdldFRpdGxlKHNyYywgY2F0ZWdvcnkpIHtcXG4gICAgICAgIGxldCB0aXRsZSA9ICcnXFxuICAgICAgICBsZXQgdGl0bGVSdWxlID0gY2F0ZWdvcnkudGl0bGVSdWxlIHx8ICdhJiZUZXh0J1xcbiAgICAgICAgaWYgKHRpdGxlUnVsZS5zdGFydHNXaXRoKFxcXCJAanM6XFxcIikpIHtcXG4gICAgICAgICAgICB0aXRsZSA9IHRoaXMuZXZhbEpTUnVsZShzcmMsIHRpdGxlUnVsZSlcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdGl0bGUgPSBwYXJzZURvbUZvckh0bWwoc3JjLCB0aXRsZVJ1bGUpXFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gdGl0bGUgfHwgXFxcIlxcXCI7XFxuICAgIH0sXFxuICAgIGdldFVybChzcmMsIGNhdGVnb3J5KSB7XFxuICAgICAgICBsZXQgdXJsID0gJydcXG4gICAgICAgIGxldCB1cmxSdWxlID0gY2F0ZWdvcnkudXJsUnVsZSB8fCAnYSYmaHJlZidcXG4gICAgICAgIGlmICh0eXBlb2YgdXJsUnVsZSA9PT0gJ29iamVjdCcpIHtcXG4gICAgICAgICAgICBsZXQgbVVybFJ1bGUgPSB1cmxSdWxlLnJ1bGUgfHwgdXJsUnVsZVsn6Kej5p6Q6KeE5YiZJ10gfHwgJ2EmJmhyZWYnO1xcbiAgICAgICAgICAgIGlmIChtVXJsUnVsZS5zdGFydHNXaXRoKFxcXCJAanM6XFxcIikpIHtcXG4gICAgICAgICAgICAgICAgdXJsID0gdGhpcy5ldmFsSlNSdWxlKHNyYywgbVVybFJ1bGUpO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGxldCBwYXJzZSA9IHBhcnNlRG9tO1xcbiAgICAgICAgICAgICAgICBpZiAodXJsUnVsZS5wYXJzZU9wdGlvbikge1xcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoICh1cmxSdWxlLnBhcnNlT3B0aW9uKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGFyc2VEb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBkXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGFyc2VEb21Gb3JIdG1sXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwZGZoXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbUZvckh0bWw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb207XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodXJsUnVsZVtcXFwi6Kej5p6Q5pa55rOVXFxcIl0pIHtcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAodXJsUnVsZVtcXFwi6Kej5p6Q5pa55rOVXFxcIl0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwYXJzZURvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGRcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwYXJzZURvbUZvckh0bWxcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBkZmhcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tRm9ySHRtbDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbTtcXG4gICAgICAgICAgICAgICAgICAg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9sZExheW91dF0udGl0bGUgfHwgKHRoaXNbc3ltYm9sTWFwLm1Gb2xkXSA9PT0gJzEnID8gJ+KAnOKAnOKAneKAnTxiPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjogI0ZGMDAwMFxcXCI+4oioPC9zcGFuPjwvYj4nIDogJ+KAnOKAnOKAneKAnTxiPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjogIzFhYWQxOVxcXCI+4oinPC9zcGFuPjwvYj4nKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHRoaXNbc3ltYm9sTWFwLm1Gb2xkTGF5b3V0XS51cmwgfHwgJChcXFwiaGlrZXI6Ly9lbXB0eSNub0hpc3RvcnkjXFxcIikubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMubVRhZyArIHBhcmFtcy5WQVJNQVAuRk9MRCwgZ2V0TXlWYXIocGFyYW1zLm1UYWcgKyBwYXJhbXMuVkFSTUFQLkZPTEQsIHBhcmFtcy5pc0ZvbGQpID09PSAnMScgPyAnMCcgOiAnMScpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbVRhZzogbVRhZyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaXNGb2xkOiB0aGlzW3N5bWJvbE1hcC5tRm9sZF0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFZBUk1BUDogdGhpcy5WQVJNQVBcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogdGhpc1tzeW1ib2xNYXAubUZvbGRMYXlvdXRdLmNvbF90eXBlIHx8IFxcXCJzY3JvbGxfYnV0dG9uXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1MYXlvdXRdLnB1c2goZm9sZExheW91dClcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICAvL+WFt+S9k+WIl+ihqOS4i+eahOWIhuexu1xcbiAgICAgICAgICAgICAgICBsZXQgc3ViX2NhdGVnb3JpZXMgPSBbXTtcXG4gICAgICAgICAgICAgICAgaWYgKGNhdGVnb3J5LnN1Ykxpc3RSdWxlLnN0YXJ0c1dpdGgoXFxcIkBqczpcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMgPSB0aGlzLmV2YWxKU1J1bGUoY2F0ZWdvcnkubGlzdCwgY2F0ZWdvcnkuc3ViTGlzdFJ1bGUpXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBzdWJfY2F0ZWdvcmllcyA9IHBhcnNlRG9tRm9yQXJyYXkoY2F0ZWdvcnkubGlzdCwgY2F0ZWdvcnkuc3ViTGlzdFJ1bGUpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmIChpbmRleCA8ICh0aGlzW3N5bWJvbE1hcC5tRm9sZEluZGV4XSB8fCAxKSkge1xcbiAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMuZm9yRWFjaCgoaXRlbSwga2V5KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gdGhpcy5nZXRUaXRsZShpdGVtLCBjYXRlZ29yeSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gdGhpcy5nZXRVcmwoaXRlbSwgY2F0ZWdvcnkpXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBrZXkudG9TdHJpbmcoKSA9PT0gY2F0ZV90ZW1wW2luZGV4XSA/ICfigJzigJzigJ3igJ08Yj48Zm9udCBjb2xvcj0nICsgdGhpc1tzeW1ib2xNYXAubUNvbG9yXSArICc+JyArIHRpdGxlICsgJyA8L2ZvbnQ+PC9iPicgOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHVybCkubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld19jYXRlID0gW11cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwYXJhbXMuaW5kZXggPT09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wLmZvckVhY2goKGNhdGUsIGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19jYXRlLnB1c2goaW5kZXggPT09IDAgPyBwYXJhbXMua2V5LnRvU3RyaW5nKCkgOiBcXFwiMFxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXBbcGFyYW1zLmluZGV4XSA9IHBhcmFtcy5rZXkudG9TdHJpbmcoKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIocGFyYW1zLnRhZyArIHBhcmFtcy5WQVJNQVAuQ0FURUdPUlksIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5pbmRleCA9PT0gMCA/IG5ld19jYXRlIDogcGFyYW1zLmNhdGVfdGVtcCkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMudGFnICsgcGFyYW1zLlZBUk1BUC5VUkwsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWQVJNQVA6IHRoaXMuVkFSTUFQLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFnOiBtVGFnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiB0aGlzW3N5bWJvbE1hcC5tUGFnZV0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJibGFua19ibG9ja1xcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXNbc3ltYm9sTWFwLm1Gb2xkXSA9PT0gJzAnKSB7XFxuICAgICAgICAgICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSB0aGlzLmdldFRpdGxlKGl0ZW0sIGNhdGVnb3J5KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSB0aGlzLmdldFVybChpdGVtLCBjYXRlZ29yeSlcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tTGF5b3V0XS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gJ+KAnOKAnOKAneKAnTxiPjxmb250IGNvbG9yPScgKyB0aGlzW3N5bWJvbE1hcC5tQ29sb3JdICsgJz4nICsgdGl0bGUgKyAnIDwvZm9udD48L2I+JyA6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQodXJsKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy50YWcgKyBwYXJhbXMuVkFSTUFQLkNBVEVHT1JZLCBKU09OLnN0cmluZ2lmeShwYXJhbXMuY2F0ZV90ZW1wKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy50YWcgKyBwYXJhbXMuVkFSTUFQLlVSTCwgaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OiBpbmRleCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFZBUk1BUDogdGhpcy5WQVJNQVAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YWc6IG1UYWcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHRoaXNbc3ltYm9sTWFwLm1QYWdlXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tTGF5b3V0XS5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgfSxcXG5cXG4gICAg55WM6Z2iKGxheW91dCkge1xcbiAgICAgICAgcmV0dXJuIHRoaXMubGF5b3V0KGxheW91dClcXG4gICAgfSxcXG4gICAg5YiG57G76ZO+5o6lKHRydWVVcmwpIHtcXG4gICAgICAgIHJldHVybiB0aGlzLnRydWVVcmwodHJ1ZVVybCk7XFxuICAgIH0sXFxuICAgIOmhteeggShwYWd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CA9IFtcXG4gICAgICAgIHtcXG4gICAgICAgICAgICByZWc6ICcodm9kdHlwZXx2aWRlb3QpXFxcXFxcXFwvXFxcXFxcXFx3KycsXFxuICAgICAgICAgICAgZXhlYzogKCkgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5wYXJhbXMudXJsXFxuICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvLVxcXFxkKy5odG1sLywgJy0nICsgdGhpcy5wYXJhbXMucGFnZSArICcuaHRtbCcpXFxuICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvKCh2b2R0eXBlfHZpZGVvdClcXFxcL1xcXFx3KykuaHRtbC8sICckMS0nICsgdGhpcy5wYXJhbXMucGFnZSArICcuaHRtbCcpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICByZWc6ICdcXFxcXFxcXC8/W1xcXFxcXFxcd1xcXFxcXFxcZF0rLS4qPy0uKj8tLio/LS4qPy0uKj8tLio/LS4qPy1cXFxcXFxcXGQqLS0tXFxcXFxcXFxkKi5odG1sJyxcXG4gICAgICAgICAgICBleGVjOiAoKSA9PiB7XFxuICAgICAgICAgICAgICAgIHJldHVybiB0aGlzLnBhcmFtcy51cmxcXG4gICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlKC9cXFxcZCooLS0tLmh0bWwpLywgdGhpcy5wYXJhbXMucGFnZSArICckMScpXFxuICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvKC0tLVxcXFxkKy5odG1sKS8sIHRoaXMucGFyYW1zLnBhZ2UgKyAnJDEnKTsgLy8g5ou85o6l6aG156CBXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSxcXG4gICAgICAgIHtcXG4gICAgICAgICAgICByZWc6ICcoKFxcXFxcXFxcL3ZvZFxcXFxcXFxcL3Nob3cpPyhcXFxcXFxcXC9hcmVhXFxcXFxcXFwvW1xcXFxcXFxcd1xcXFxcXFxcZCVdKy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xcbiAgICAgICAgICAgIGxldCByZWdPYmogPSB0aGlzLnJlZ2V4TWFwW2ldO1xcbiAgICAgICAgICAgIGxldCB1cmxFeHAgPSByZWdPYmoucmVnO1xcbiAgICAgICAgICAgIGlmICh0eXBlb2YgdXJsRXhwID09PSAnc3RyaW5nJykge1xcbiAgICAgICAgICAgICAgICB1cmxFeHAgPSBuZXcgUmVnRXhwKHVybEV4cClcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKHVybEV4cC50ZXN0KHRoaXMucGFyYW1zLnVybCkpIHtcXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMucGFyYW1zLmRlYnVnKSB7XFxuICAgICAgICAgICAgICAgICAgICBsb2codXJsRXhwLnRvU3RyaW5nKCkpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgdHJ1ZV91cmwgPSByZWdPYmouZXhlYygpO1xcbiAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBpZiAodHJ1ZV91cmwpIHtcXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZV91cmw7XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHJldHVybiB0aGlzLnBhcmFtcy51cmxcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAg6I635Y+W5aSE55CG57uT5p6cKCkge1xcbiAgICAgICAgcmV0dXJuIHRoaXMuZXhlYygpXFxuICAgIH0sXFxuICAgIOmTvuaOpSh1cmwpIHtcXG4gICAgICAgIHJldHVybiB0aGlzLmJhc2VVcmwodXJsKVxcbiAgICB9LFxcbiAgICDpobXnoIEocGFnZSkge1xcbiAgICAgICAgcmV0dXJuIHRoaXMucGFnZShwYWdlKVxcbiAgICB9LFxcbiAgICDmj5LlhaXmlrDlpITnkIbop4TliJkocmVnRXhwKSB7XFxuICAgICAgICByZXR1cm4gdGhpcy5hZGRFeHRyYShyZWdFeHApXFxuICAgIH0sXFxuICAgIOiwg+ivleaooeW8jygpIHtcXG4gICAgICAgIHJldHVybiB0aGlzLmRlYnVnKCk7XFxuICAgIH1cXG59KVxcbiQuZXhwb3J0cz1uZXcgVXJsUHJvY2Vzc29yKClcXG4kLmV4cG9ydHNcXG5cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuS4gOe6pypcIixcInBhdGhcIjpcInlqdG9vbFwiLFwicnVsZVwiOlwiZnVuY3Rpb24gY29udmVydDEoc3RyKSB7XFxuICAgIGxldCBjID0gc3RyLnNwbGl0KFxcXCI7XFxcIilcXG4gICAgcmV0dXJuIHtcXG4gICAgICAgIOWIl+ihqDogY1swXSxcXG4gICAgICAgIOagh+mimDogY1sxXSxcXG4gICAgICAgIOWbvueJhzogY1syXSxcXG4gICAgICAgIOaPj+i/sDogY1szXSxcXG4gICAgICAgIOmTvuaOpTogY1s0XVxcbiAgICB9XFxufVxcblxcbmZ1bmN0aW9uIG1lcmdlKHNvdXJjZSwgdGFyZ2V0KSB7XFxuICAgIGxldCBrZXlzID0gT2JqZWN0LmtleXMoc291cmNlKVxcbiAgICBmb3IgKGxldCBpIGluIGtleXMpIHtcXG4gICAgICAgIHRhcmdldFtrZXlzW2ldXSA9IHNvdXJjZVtrZXlzW2ldXVxcbiAgICB9XFxufVxcblxcbmZ1bmN0aW9uIOS4gOe6pyhvYmopIHtcXG4gICAgdmFyIGQgPSBbXTtcXG4gICAgaWYgKCQudHlwZShvYmopID09IFxcXCJzdHJpbmdcXFwiKSB7XFxuICAgICAgICBvYmogPSBjb252ZXJ0MShvYmopXFxuICAgIH1cXG4gICAgaWYgKG9iai7op4TliJkpIHtcXG4gICAgICAgIGxldCBjID0gY29udmVydDEob2JqLuinhOWImSlcXG4gICAgICAgIG1lcmdlKGMsIG9iailcXG4gICAgfVxcbiAgICBsZXQgYXJyID0gcGRmYShnZXRSZXNDb2RlKCksIG9iai7liJfooagpO1xcbiAgICAgICBpZiAob2JqLuWIl+ihqOWkhOeQhiAhPSBudWxsKSB7XFxuICAgICAgICAgICAgYXJyID0gb2JqLumTvuaOpeWkhOeQhihhcnIpXFxuICAgICAgICB9XFxuICAgIGZvciAobGV0IGl0IG9mIGFycikge1xcbiAgICAgICAgbGV0IHVybCA9IHBkKGl0LCBvYmou6ZO+5o6lKVxcbiAgICAgICAgaWYgKG9iai7pk77mjqXlpITnkIYgIT0gbnVsbCkge1xcbiAgICAgICAgICAgIHVybCA9IG9iai7pk77mjqXlpITnkIYodXJsKVxcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IHRpdGxlID0gcGRmaChpdCwgb2JqLuagh+mimClcXG4gICAgICAgIGlmIChvYmou5qCH6aKY5aSE55CGICE9IG51bGwpIHtcXG4gICAgICAgICAgICB0aXRsZSA9IG9iai7moIfpopjlpITnkIYodGl0bGUpXFxuICAgICAgICB9XFxuICAgICAgICBsZXQgcGljID0gcGQoaXQsIG9iai7lm77niYcpXFxuICAgICAgICBpZiAob2JqLuWbvueJh+WkhOeQhiAhPSBudWxsKSB7XFxuICAgICAgICAgICAgcGljID0gb2JqLuWbvueJh+WkhOeQhihwaWMpXFxuICAgICAgICB9XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBvYmou5qCH6aKYID8gcGRmaChpdCwgb2JqLuagh+mimCkgOiBcXFwiXFxcIixcXG4gICAgICAgICAgICB1cmw6IHVybCsnI2F1dG9DYWNoZSMnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBkZXNjOiBvYmou5o+P6L+wID8gcGRmaChpdCwgb2JqLuaPj+i/sCkgOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBwaWNfdXJsOiBwaWMsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgeXRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgeXBpYzogcGljLFxcbiAgICAgICAgICAgICAgICB5dXJsOiB1cmwucm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0dXJsLmluY2x1ZGVzKFxcXCJodHRwXFxcIikgPyBkb0xpc3R1cmwgOiDliY3nvIAgKyBkb0xpc3R1cmxcXG4gICAgICAgICAgICBkb0xpc3QucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGl0LCDpm4blkI0pLFxcbiAgICAgICAgICAgICAgICB1cmw6IGRvTGlzdHVybFxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9XFxuXFxuICAgICAgICB2YXIgYm9va05hbWUgPSAh5aSa6Lev57q/5ZCmID8g5qCH6aKYIDog5qCH6aKYICsgJy0nICsg5YiX6KGo5ZCNW2ldXFxuXFxuICAgICAgICDnq6DoioJqc29uLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiDliJfooajlkI1baV0sXFxuICAgICAgICAgICAgbGlzdDogZG9MaXN0LFxcbiAgICAgICAgICAgIHNqc3M6IHtcXG4gICAgICAgICAgICAgICAgY2hhcHRlckxpc3Q6IGRvTGlzdCxcXG4gICAgICAgICAgICAgICAgaW5mbzoge1xcbiAgICAgICAgICAgICAgICAgICAgYm9va05hbWU6IGJvb2tOYW1lLCAvL+a8q+eUu+WQjeensCxcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVOYW1lOiBNWV9SVUxFLnRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgYm9va1RvcFBpYzog5Zu+54mHLFxcbiAgICAgICAgICAgICAgICAgICAgcGFyc2VDb2RlOiDmvKvnlLvop6PmnpAsXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIGRlZmF1bHRWaWV3OiBcXFwiMVxcXCJcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9XFxuICAgIHJldHVybiDnq6DoioJqc29uXFxufVxcblxcblxcbmZ1bmN0aW9uIOa3u+WKoOWktOmDqOWIl+ihqChkLCDmoIfpopgsIOWbvueJhywg5o+P6L+wLCDkvZzogIUsIOaXtumXtCwg5YiG57G7LOmh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S7i+agt+W8j1xcbiAgICB2YXIgbXp0ZXh0ID0gXFxcIiZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOzxzbWFsbD7nroDku4s8L3NtYWxsPjxicj5cXFwiXFxuICAgIHZhciBidHRpdGxlID0gJzxmb250IGNvbG9yPVxcXCIjMDk4QUMxXFxcIj7mvKvnlLvnroDku4sgIDwvZm9udD48c21hbGw+PHNtYWxsPjxmb250IGNvbG9yPVxcXCIjZjQ3OTgzXFxcIj7nroDku4vmlLY+PC9mb250Pjwvc21hbGw+PC9zbWFsbD4nXFxuXFxuICAgIC8v5bGV5byA5LiO5pS257yp5pON5L2cXFxuICAgIHZhciBqaiA9IGdldE15VmFyKOmhtVVSTCArIFxcXCLnroDku4vmlLZcXFwiLCBcXFwi5bey5pS26LW3XFxcIik7XFxuICAgIHZhciBqanVybCA9ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKOeugOS7i+WGheWuuSwg566A5LuL5YaF5a655pS2LCDmlLYsIOaUtuWGheWuuSwg5b2T5YmNVVJMKSA9PiB7XFxuICAgICAgICB2YXIganNibCA9IOW9k+WJjVVSTCArIFxcXCLnroDku4vmlLZcXFwiO1xcbiAgICAgICAgdmFyIGpqID0gZ2V0TXlWYXIo5b2T5YmNVVJMICsgXFxcIueugOS7i+aUtlxcXCIsIFxcXCLlt7LmlLbotbdcXFwiKTtcXG4gICAgICAgIGpqID0gamogPT0gXFxcIuW3suaUtui1t1xcXCIgPyBcXFwi5bGV5byAXFxcIiA6IFxcXCLlt7LmlLbotbdcXFwiO1xcbiAgICAgICAgcHV0TXlWYXIoanNibCwgamopXFxuICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDog5b2T5YmNVVJMICsgXFxcIl9idFxcXCJcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHRpdGxlOiDmlLYucmVwbGFjZShcXFwi566A5LuL5pS2XFxcIiwgamopXFxuICAgICAgICB9KVxcblxcbiAgICAgICAgdXBkYXRlSXRlbSh7XFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IOW9k+WJjVVSTCArIFxcXCJfbXpcXFwiXFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICB0aXRsZTogamogPT0gXFxcIuW3suaUtui1t1xcXCIgPyDmlLblhoXlrrkucmVwbGFjZShcXFwi566A5LuLXFxcIiwg566A5LuL5YaF5a655pS2KSA6IOaUtuWGheWuuS5yZXBsYWNlKFxcXCLnroDku4tcXFwiLCDnroDku4vlhoXlrrkpXFxuICAgICAgICB9KVxcbiAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICB9LCDnroDku4vlhoXlrrksIOeugOS7i+WGheWuueaUtiwgYnR0aXRsZSwgbXp0ZXh0LCDpobVVUkwpXFxuXFxuXFxuICAgIC8v5qCH6aKYXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogYnR0aXRsZS5yZXBsYWNlKFxcXCLnroDku4vmlLZcXFwiLCBqaiksXFxuICAgICAgICB1cmw6IGpqdXJsLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgcGljX3VybDog5Zu+54mHLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBpZDog6aG1VVJMICsgXFxcIl9idFxcXCJcXG4gICAgICAgIH1cXG4gICAgfSk7XFxuXFxuICAgIC8v566A5LuLXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogamogPT0gXFxcIuW3suaUtui1t1xcXCIgPyBtenRleHQucmVwbGFjZShcXFwi566A5LuLXFxcIiwg566A5LuL5YaF5a655pS2KSA6IG16dGV4dC5yZXBsYWNlKFxcXCLnroDku4tcXFwiLCDnroDku4vlhoXlrrkpLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJyaWNoX3RleHR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ID8gJ+ato+W6jycgOiAn5YCS5bqPJztcXG5cXG4gICAgdmFyIOaOkuW6j3VybCA9ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKOagh+mimOWQjSwg5qCH6aKY5pWw5o2uLCDliJfooajmlbDmja4sIOino+aekOS7o+eggSwg6aG1VVJMKSA9PiB7XFxuICAgICAgICB2YXIg5o6S5bqPID0gZ2V0TXlWYXIo6aG1VVJMICsgXFxcIueroOiKguaOkuW6j1xcXCIsIFxcXCLmraPluo9cXFwiKTtcXG4gICAgICAgIHZhciDmj5DnpLogPSDmjpLluo8gPT0gJ+WAkuW6jycgPyAn5q2j5bqPJyA6ICflgJLluo8nO1xcbiAgICAgICAgdXBkYXRlSXRlbSh7XFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IOmhtVVSTCArIFxcXCJf5o6S5bqPXFxcIlxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgdGl0bGU6IOagh+mimOWQjS5yZXBsYWNlKCfot6/nur8nLCDmoIfpopjmlbDmja4pLnJlcGxhY2UoJ+aOkuW6jycsIOaPkOekuilcXG4gICAgICAgIH0pXFxuXFxuXFxuICAgICAgICBpZiAo5o+Q56S6ID09ICflgJLluo8nKSB7XFxuICAgICAgICAgICAg5YiX6KGo5pWw5o2uLnJldmVyc2UoKVxcbiAgICAgICAgfVxcbiAgICAgICAg5YiX6KGo5pWw5o2uLmZvckVhY2goZnVuY3Rpb24oZGF0YSwgc3NpZCkge1xcbiAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogZGF0YS50aXRsZSxcXG4gICAgICAgICAgICAgICAgdXJsOiBkYXRhLnVybCArIOino+aekOS7o+eggSxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIGlkOiDpobVVUkwgKyBcXFwiX+mAiembhlxcXCIgKyBzc2lkXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0pO1xcblxcblxcbiAgICAgICAgcHV0TXlWYXIo6aG1VVJMICsgXFxcIueroOiKguaOkuW6j1xcXCIsIOaPkOekuilcXG4gICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgfSwg5qCH6aKY5ZCNLCDmoIfpopjmlbDmja4sIOWIl+ihqOaVsOaNriwg6Kej5p6Q5Luj56CBLCDpobVVUkwpXFxuXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTog5qCH6aKY5ZCNLnJlcGxhY2UoJ+i3r+e6vycsIOagh+mimOaVsOaNrikucmVwbGFjZSgn5o6S5bqPJywg5o6S5bqPKSxcXG4gICAgICAgIHBpY191cmw6IOWbvueJhyxcXG4gICAgICAgIHVybDog5o6S5bqPdXJsLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBpZDog6aG1VVJMICsgXFxcIl/mjpLluo9cXFwiXFxuICAgICAgICB9XFxuICAgIH0pO1xcblxcbiAgICBpZiAo5o6S5bqPID09ICflgJLluo8nKSB7XFxuICAgICAgICDliJfooajmlbDmja4ucmV2ZXJzZSgpXFxuICAgIH1cXG5cXG4gICAg5YiX6KGo5pWw5o2uLmZvckVhY2goZnVuY3Rpb24oZGF0YSwgaWQpIHtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IGRhdGEudGl0bGUsXFxuICAgICAgICAgICAgdXJsOiBkYXRhLnVybCArIOino+aekOS7o+eggSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMlxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IOmhtVVSTCArIFxcXCJf6YCJ6ZuGXFxcIiArIGlkXFxuICAgICAgICAgICAgfVxcbiAg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XFxuICAgICAgICB9KTtcXG5cXG5cXG4gICAgICAgIOi3r+e6v+aVsOaNri5mb3JFYWNoKGZ1bmN0aW9uKGRhdGEsIGlkKSB7XFxuXFxuICAgICAgICAgICAgdmFyIGpqdXJsID0gJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgo6aG1VVJMLGlkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHNldEl0ZW0o6aG1VVJMICsgJ+mAieaLqeWIl+ihqCcsaWQrJycpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCI7XFxuICAgICAgICAgICAgfSzpobVVUkwsaWQpO1xcblxcbiAgICAgICAgICAgIHZhciDmoIfpopjlkI0gPSBpZCA9PSDpgInmi6nliJfooaggPyDot6/nur/pgInkuK0ucmVwbGFjZSgn6YCJ5LitJywgZGF0YS50aXRsZSkgOiBkYXRhLnRpdGxlO1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiDmoIfpopjlkI0sXFxuICAgICAgICAgICAgICAgIHVybDogamp1cmwsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgaWQ6IOmhtVVSTCArIFxcXCJf6Lev57q/XFxcIiArIGlkXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0pO1xcblxcbiAgICB9XFxuICAgIHJldHVybiDpgInmi6nliJfooahcXG59XFxuXFxuXFxuZnVuY3Rpb24g5re75Yqg6YCJ5oup5LiL6L29KGQsIOi3r+e6v+aVsOaNriwg5aSa6Lev57q/5ZCmKSB7XFxuXFxuICAgIC8v6Lev57q/5pWw5o2uIOagvOW8j1t7dGl0bGU6J+i3r+e6v+WQjScs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3JFYWNoKChkYXRhLCBpZCkgPT4ge1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IGdldE15VmFyKE1ZX1VSTCwgJzAnKSA9PSBpZCA/ICfigJzigJwnICsgZGF0YSArICfigJ3igJ0nIDogZGF0YSxcXG4gICAgICAgIHVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgo57q/6LevLCBsYXp5LCBpZCkgPT4ge1xcbiAgICAgICAgICAgIHZhciBsaXN0cyA9IHN0b3JhZ2UwLmdldE15VmFyKFxcXCJsaXN0c1xcXCIpO1xcbiAgICAgICAgICAgIHZhciDmjpLluo8gPSBnZXRNeVZhcihNWV9VUkwgKyBcXFwi56ug6IqC5o6S5bqPXFxcIiwgJyMxYWFkMTlcXFwiPuato+W6jycpO1xcbiAgICAgICAgICAgIHZhciDmj5DnpLogPSDmjpLluo8gPT0gJyNGRjAwMDBcXFwiPuWAkuW6jycgPyAnIzFhYWQxOVxcXCI+5q2j5bqPJyA6ICcjRkYwMDAwXFxcIj7lgJLluo8nO1xcblxcbiAgICAgICAgICAgIOe6v+i3ry5mb3JFYWNoKChkYXRhLCB4bGlkKSA9PiB7XFxuICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGlkID09IHhsaWQgPyAn4oCc4oCcJyArIGRhdGEgKyAn4oCd4oCdJyA6IGRhdGEsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBNWV9VUkwgKyBcXFwiX+e6v+i3r1xcXCIgKyB4bGlkXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgcHV0TXlWYXIoTVlfVVJMLCBpZClcXG4gICAgICAgICAgICB2YXIg56ug6IqCID0gbGlzdHNbZ2V0TXlWYXIoTVlfVVJMLCAnMCcpXTtcXG4gICAgICAgICAgICBpZiAo5o6S5bqPID09ICcjRkYwMDAwXFxcIj7lgJLluo8nKSB7XFxuICAgICAgICAgICAgICAgIOeroOiKgi5yZXZlcnNlKClcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbGV0IGNwID0g56ug6IqCLm1hcCgoZGF0YSwgc3NpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHBkZmgoZGF0YSwgJ2EmJlRleHQnKSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogcGQoZGF0YSwgJ2EmJmhyZWYnKSArIGxhenksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTog56ug6IqCLmxlbmd0aCA+IDMgPyAndGV4dF80JyA6ICd0ZXh0XzInLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IE1ZX1VSTCArIFxcXCJf6YCJ6ZuGXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGRlbGV0ZUl0ZW1CeUNscyhNWV9VUkwgKyBcXFwiX+mAiembhlxcXCIpO1xcbiAgICAgICAgICAgIGFkZEl0ZW1CZWZvcmUoTVlfVVJMICsgXFxcImZvb3RlclxcXCIsIGNwKTtcXG4gICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICB9LCB0YWJzLCBsYXp5LCBpZCksXFxuICAgICAgICBjb2xfdHlwZTogJ2ZsZXhfYnV0dG9uJyxcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgaWQ6IE1ZX1VSTCArIFxcXCJf57q/6LevXFxcIiArIGlkXFxuICAgICAgICB9XFxuICAgIH0pO1xcbn0pXFxuXFxuaWYgKOaOkuW6jyA9PSAn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ICAgICAgICAgICAgIGNoYXB0ZXJJbWFnZXMuZm9yRWFjaChpbWcgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcGljcy5wdXNoKGltZysnQFJlZmVyZXI9Jyt1cmwpXFxuICAgICAgICAgICAgICAgIH0pfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBodG1sID0gcmVxdWVzdChpbnB1dCk7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IHBkZmEoaHRtbCwgJ2JvZHkmJi5zY3JvbGwtaXRlbScpO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGZpcnN0ID0gcGRmYShodG1sLCAnYm9keSYmI2ltYWdlJyk7XFxuICAgICAgICAgICAgICAgICAgICBsaXN0ID0gZmlyc3QuY29uY2F0KGxpc3QpO1xcbiAgICAgICAgICAgICAgICAgICAgbGlzdC5mb3JFYWNoKGltZyA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpY3MucHVzaChwZGZoKGltZywgJ2ltZyYmZGF0YS1zcmN8fHNyYycpKydAUmVmZXJlcj0nK01ZX0hPTUUpXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwicGljczovL1xcXCIgKyBwaWNzLmpvaW4oXFxcIiYmXFxcIilcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgdmFyIGxhenkgPSBgQGxhenlSdWxlPS5qczpgICsg5ryr55S76Kej5p6QO1wifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5LqR5Y+j5LukKlwiLFwicGF0aFwiOlwiaW1wb3J0XCIsXCJydWxlXCI6XCJ3cml0ZUZpbGUoJ2hpa2VyOi8vZmlsZXMvL3J1bGVzL1R6L0pNJyxmZXRjaChpbnB1dCkpXFxuJ3RvYXN0Oi8v5bey5LuO5LqR5Y+j5Luk6I635Y+W6IGa5ryr5rqQJ1w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bdcXFwiKSB7XFxuICAgICAgICAgICAgcHV0TXlWYXIoXFxcImpqc1xcXCIsIFxcXCLlsZXlvIBcXFwiKTtcXG5cXG4gICAgICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBqamlkXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn5pu05paw6K+m5oOFIDxzbWFsbD48c21hbGw+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiMxOUI4OURcXFwiPuaUtui1tz48L3NwYW4+PC9zbWFsbD48L3NtYWxsPidcXG4gICAgICAgICAgICB9KVxcblxcbiAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IDE0LFxcbiAgICAgICAgICAgICAgICAgICAgbGluZVNwYWNpbmc6IDMsXFxuICAgICAgICAgICAgICAgICAgICBpZDogZGVjaWRcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICc8c3BhbiBzdHlsZT1cXFwiY29sb3I6IzgwODA4MFxcXCI+JyArIGRlc19kZXNjICsgJzwvc3Bhbj4nXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHB1dE15VmFyKFxcXCJqanNcXFwiLCBcXFwi5pS26LW3XFxcIik7XFxuXFxuICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBpZDogamppZFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+abtOaWsOivpuaDhTxzbWFsbD48c21hbGw+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiMxOUI4OURcXFwiPuWxleW8gD48L3NwYW4+PC9zbWFsbD48L3NtYWxsPidcXG4gICAgICAgICAgICB9KVxcblxcbiAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IDE0LFxcbiAgICAgICAgICAgICAgICAgICAgbGluZVNwYWNpbmc6IDMsXFxuICAgICAgICAgICAgICAgICAgICBpZDogZGVjaWRcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICc8c3BhbiBzdHlsZT1cXFwiY29sb3I6IzgwODA4MFxcXCI+JyArIGRlc19kZXNjLnN1YnN0cigwLCAxNTApXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICB9XFxuXFxuICAgIH0sIE1ZX1JVTEUgKyBcXFwiX2pqaWRcXFwiLCBNWV9SVUxFICsgXFxcIl9kZWNpZFxcXCIsIGRlc19kZXNjKSxcXG4gICAgY29sX3R5cGU6IFxcXCJhdmF0YXJcXFwiLFxcbiAgICBleHRyYToge1xcbiAgICAgICAgaWQ6IE1ZX1JVTEUgKyBcXFwiX2pqaWRcXFwiXFxuICAgIH1cXG59KTtcXG5cXG5pdGVtcy5wdXNoKHtcXG4gICAgdGl0bGU6ICc8c3BhbiBzdHlsZT1cXFwiY29sb3I6IzgwODA4MFxcXCI+JyArIGRlc19kZXNjLnN1YnN0cigwLCAxNTApLFxcbiAgICBjb2xfdHlwZTogXFxcInJpY2hfdGV4dFxcXCIsXFxuICAgIGV4dHJhOiB7XFxuICAgICAgICB0ZXh0U2l6ZTogMTQsXFxuICAgICAgICBsaW5lU3BhY2luZzogMyxcXG4gICAgICAgIGlkOiBNWV9SVUxFICsgXFxcIl9kZWNpZFxcXCJcXG4gICAgfVxcbn0pO1xcblxcb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xuICAgICAgICDpk77mjqU6IGNbMl0sXFxuICAgICAgICDmj4/ov7A6IGNbM10sXFxuICAgICAgICDor6bmg4U6IGNbNF0sXFxuICAgICAgICDlm77niYc6IGNbNV1cXG4gICAgfVxcbn1cXG5cXG5mdW5jdGlvbiBtZXJnZShzb3VyY2UsIHRhcmdldCkge1xcbiAgICBsZXQga2V5cyA9IE9iamVjdC5rZXlzKHNvdXJjZSlcXG4gICAgZm9yIChsZXQgaSBpbiBrZXlzKSB7XFxuICAgICAgICB0YXJnZXRba2V5c1tpXV0gPSBzb3VyY2Vba2V5c1tpXV1cXG4gICAgfVxcbn1cXG5cXG5mdW5jdGlvbiDmkJzntKIob2JqKSB7XFxuICAgIHZhciBkID0gW107XFxuICAgIGlmICgkLnR5cGUob2JqKSA9PSBcXFwic3RyaW5nXFxcIikge1xcbiAgICAgICAgb2JqID0gY29udmVydDEob2JqKVxcbiAgICB9XFxuICAgIGlmIChvYmou6KeE5YiZKSB7XFxuICAgICAgICBsZXQgYyA9IGNvbnZlcnQxKG9iai7op4TliJkpXFxuICAgICAgICBtZXJnZShjLCBvYmopXFxuICAgIH1cXG4gICAgbGV0IGFyciA9IHBkZmEoZ2V0UmVzQ29kZSgpLCBvYmou5YiX6KGoKTtcXG4gICAgICAgaWYgKG9iai7liJfooajlpITnkIYgIT0gbnVsbCkge1xcbiAgICAgICAgICAgIGFyciA9IG9iai7pk77mjqXlpITnkIYoYXJyKVxcbiAgICAgICAgfVxcbiAgICBmb3IgKGxldCBpdCBvZiBhcnIpIHtcXG4gICAgICAgIGxldCB1cmwgPSBwZChpdCwgb2JqLumTvuaOpSlcXG4gICAgICAgIGlmIChvYmou6ZO+5o6l5aSE55CGICE9IG51bGwpIHtcXG4gICAgICAgICAgICB1cmwgPSBvYmou6ZO+5o6l5aSE55CGKHVybClcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCB0aXRsZSA9IHBkZmgoaXQsIG9iai7moIfpopgpXFxuICAgICAgICBpZiAob2JqLuagh+mimOWkhOeQhiAhPSBudWxsKSB7XFxuICAgICAgICAgICAgdGl0bGUgPSBvYmou5qCH6aKY5aSE55CGKHRpdGxlKVxcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IHBpYyA9IHBkKGl0LCBvYmou5Zu+54mHKVxcbiAgICAgICAgaWYgKG9iai7lm77niYflpITnkIYgIT0gbnVsbCkge1xcbiAgICAgICAgICAgIHBpYyA9IG9iai7lm77niYflpITnkIYocGljKVxcbiAgICAgICAgfVxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogb2JqLuagh+mimCA/IHBkZmgoaXQsIG9iai7moIfpopgpIDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgdXJsOiB1cmwrJyNhdXRvQ2FjaGUjJyxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgZGVzYzogb2JqLuaPj+i/sCA/IHBkZmgoaXQsIG9iai7mj4/ov7ApIDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgY29udGVudDogb2JqLuivpuaDhSA/IHBkZmgoaXQsIG9iai7or6bmg4UpIDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgcGljX3VybDogcGljLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIHl0aXRsZTogdGl0bGUsXFxuICAgICAgICAgICAgICAgIHlwaWM6IHBpYyxcXG4gICAgICAgICAgICAgICAgeXVybDogdXJsLnJlcGxhY2UoJ2hpa2VyOi8vZW1wdHkjIycsJycpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuXFxuICAgIH1cXG4gICAgc2V0UmVzdWx0KGQpO1xcbn1cXG52YXIgdG9vbCA9IHtcXG4gICAg5pCc57SiOiDmkJzntKJcXG59XFxuJC5leHBvcnRzID0gdG9vbFwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5Zu+54mH6Kej5a+GKlwiLFw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vbUZvckh0bWwoZGF0YSwgdilcXG4gICAgICAgICAgICAgICAgICAgIGlmIChpICE9IDMpIHYgPSBydW5Db2RlKHYpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdlxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7IHJldHVybiAnJyB9XFxuICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgcmVzID0ge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsIHVybDogdXJsLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBkZXNjLCBpbWc6IGltZyxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IE1ZX1JVTEUuY29sX3R5cGVcXG4gICAgICAgICAgICB9XFxuICAgICAgICBpZiAocmVzLnVybCkge1xcbiAgICAgICAgICAgIGlmIChyZXMudXJsLmluY2x1ZGVzKCdAbGF6eVJ1bGU9JykpIHtcXG4gICAgICAgICAgICAgICAgbGV0IHJlSW5kZXggPSByZXMudXJsLmluZGV4T2YoJy5qczonKVxcbiAgICAgICAgICAgICAgICBpZiAocmVJbmRleCA+PSAwKSByZXMudXJsID0gcmVzLnVybC5zbGljZSgwLCByZUluZGV4KSArICcuanM6JyArIGhpamFja0xhenlSdWxlICsgJzsnICsgcmVzLnVybC5zbGljZShyZUluZGV4ICsgNClcXG4gICAgICAgICAgICB9IGVsc2UgIGlmIChkZXRhaWxGaW5kUnVsZSkge1xcbiAgICAgICAgICAgICAgICByZXMuZXh0cmEgPSB7XFxuICAgICAgICAgICAgICAgICAgICB1cmw6IGdlbkV4VXJsKHVybCksXFxuICAgICAgICAgICAgICAgICAgICBSVUxFOiBiYXNlNjRFbmNvZGUoSlNPTi5zdHJpbmdpZnkoT2JqZWN0LmFzc2lnbihnZW5NeVJ1bGUoKSwgeyBkZXRhaWxfZmluZF9ydWxlOiBkZXRhaWxGaW5kUnVsZSB9KSkpLFxcbiAgICAgICAgICAgICAgICAgICAgcGFnZVRpdGxlOiBpc0luZGV4ICYmIH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1wdHknIDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoc2lnbiwgaWQsIG5vdykgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKHNpZ24gKyBpZCwgbm93KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIHRoaXMuc2lnbiwgaWQsIG5vdyksXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXFxcbiAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIGVsLnB1c2goeyBjb2xfdHlwZTogdGhpcy5ib3VuZGFyeSB9KVxcXFxuICAgICAgICB9KVxcXFxuICAgIH0sXFxcXG4gICAgaW5pdChjbGFzc09iamVjdCkge1xcXFxuICAgICAgICBpZiAodHlwZW9mIGNsYXNzT2JqZWN0LmNsYXNzX25hbWUgPT0gJ3N0cmluZycpXFxcXG4gICAgICAgICAgICBjbGFzc09iamVjdC5jbGFzc19uYW1lID0gY2xhc3NPYmplY3QuY2xhc3NfbmFtZS5zcGxpdCgnJicpXFxcXG4gICAgICAgIGlmICh0eXBlb2YgY2xhc3NPYmplY3QuY2xhc3NfdXJsID09ICdzdHJpbmcnKVxcXFxuICAgICAgICAgICAgY2xhc3NPYmplY3QuY2xhc3NfdXJsID0gY2xhc3NPYmplY3QuY2xhc3NfdXJsLnNwbGl0KCcmJykubWFwKCh2KSA9PiB2LnRyaW0oKSlcXFxcbiAgICAgICAgcmV0dXJuIGNsYXNzT2JqZWN0XFxcXG4gICAgfSxcXFxcbiAgICBwdXNoKGNsYXNzT2JqZWN0KSB7XFxcXG4gICAgICAgIHRoaXMuYXJyLnB1c2godGhpcy5pbml0KGNsYXNzT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dWVzdChyZXF1aXJlbGlzdFtpXSArICdEcmVhbU96Ty9KTS9tYWluL0pNJywge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgd2l0aFN0YXR1c0NvZGU6IHRydWVcXFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKEpTT04ucGFyc2UocmVzKS5zdGF0dXNDb2RlID09IDIwMCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZpbGVFeGlzdCh1cmwpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlRmlsZSh1cmwpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZURvd25sb2FkKHJlcXVpcmVsaXN0W2ldICsgJ0RyZWFtT3pPL0pNL21haW4vSk0nLHVybClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVha1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlRG93bmxvYWQocmVxdWlyZWxpc3RbaV0gKyAnRHJlYW1Pek8vSk0vbWFpbi9KTScsdXJsKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXFxcbiAgICAgICAgICAgIGJhY2soZmFsc2UpXFxcXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5pu05pawJ1xcXFxuICAgICAgICB9LCB1cmwpLFxcXFxuICAgICAgICBpbWc6ICdoaWtlcjovL2ltYWdlcy9pY29uNCcsXFxcXG4gICAgICAgIGNvbF90eXBlOiA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kge1xcXFxuICAgICAgICBjYXNlICflkK/nlKgv56aB55SoJzpcXFxcbiAgICAgICAgICAgIGQudGl0bGUgPSAodi52aXNpYmxlID8gJ/Cfn6IgICcgOiAn8J+UtCAgJykgKyBkLnRpdGxlXFxcXG4gICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdjdXN0b21EYXRhJykgfHwgJ1tdJylcXFxcbiAgICAgICAgICAgICAgICBydWxlc1tpXS52aXNpYmxlID0gIXJ1bGVzW2ldLnZpc2libGVcXFxcbiAgICAgICAgICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSlcXFxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxcXG4gICAgICAgICAgICB9LCBpKVxcXFxuICAgICAgICAgICAgYnJlYWtcXFxcbiAgICAgICAgY2FzZSAn6YeN5paw5o6S5bqPJzpcXFxcbiAgICAgICAgICAgIGxldCBzb3J0RmxhZyA9IHBhcnNlSW50KGdldE15VmFyKCdzb3J0RmxhZycsICctMScpKVxcXFxuICAgICAgICAgICAgZC50aXRsZSA9IChzb3J0RmxhZyA9PSBpID8gJ/CflIMgICcgOiAnJykgKyBkLnRpdGxlXFxcXG4gICAgICAgICAgICBpZiAoc29ydEZsYWcgPT0gLTEpXFxcXG4gICAgICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzb3J0RmxhZycsIGkudG9TdHJpbmcoKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/pgInmi6nopoHnp7vliqjliLDnmoTkvY3nva4nXFxcXG4gICAgICAgICAgICAgICAgfSwgaSlcXFxcbiAgICAgICAgICAgIGVsc2VcXFxcbiAgICAgICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKG9sZEluZGV4LCBuZXdJbmRleCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdjdXN0b21EYXRhJykgfHwgJ1tdJylcXFxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXMuc3BsaWNlKG5ld0luZGV4LCAwLCBydWxlcy5zcGxpY2Uob2xkSW5kZXgsIDEpWzBdKVxcXFxuICAgICAgICAgICAgICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgJy0xJylcXFxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXFxcbiAgICAgICAgICAgICAgICB9LCBzb3J0RmxhZywgaSlcXFxcbiAgICAgICAgICAgIGJyZWFrXFxcXG4gICAgICAgIGNhc2UgJ+abtOaUueWbvuaghyc6XFxcXG4gICAgICAgICAgICBkLnVybCA9ICQodi5pY29uIHx8ICcnLCAn6L6T5YWl5paw5Zu+5qCH5Zyw5Z2A5oiW6aKc6Imy5Luj56CB77yaJykuaW5wdXQoKGkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdjdXN0b21EYXRhJykgfHwgJ1tdJylcXFxcbiAgICAgICAgICAgICAgICBpZiAoaW5wdXQpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzW2ldLmljb24gPSBpbnB1dFxcXFxuICAgICAgICAgICAgICAgIGVsc2VcXFxcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHJ1bGVzW2ldLmljb25cXFxcbiAgICAgICAgICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSlcXFxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxcXG4gICAgICAgICAgICB9LCBpKVxcXFxuICAgICAgICAgICAgYnJlYWtcXFxcbiAgICAgICAgY2FzZSAn5a+85YWl5rW36ZiUJzpcXFxcbiAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGxldCBkYXRhID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvZGF0YUxvYWQ/cnVsZT0nICsgZ2V0TXlWYXIoJ215Q29sbGVjdGlvbicpLCB0cnVlKVxcXFxuICAgICAgICAgICAgICAgIHJldHVybiAncnVsZTovLycgKyBiYXNlNjRFbmNvZGUoSlNPTi5zdHJpbmdpZnkoZGF0YVtpXSkpXFxcXG4gICAgICAgICAgICB9LCBpKVxcXFxuICAgICAgICAgICAgYnJlYWtcXFxcbiAgICB9XFxcXG4gICAgZWwucHVzaChkKVxcXFxufSlcXFxcbnNldFJlc3VsdChlbClcXFwifSx7XFxcImNvbF90eXBlXFxcIjpcXFwibW92aWVfM1xcXCIsXFxcIm5hbWVcXFwiOlxcXCLpobXpnaLovb3lhaVcXFwiLFxcXCJwYXRoXFxcIjpcXFwiZnJhbWVMb2FkXFxcIixcXFwicnVsZVxcXCI6XFxcImpzOlxcXFxuY29uc3QgUUlOR19USVRMRSA9IGdld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09IDMpID9cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlRG9tKGRhdGEsIHYpIDpcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlRG9tRm9ySHRtbChkYXRhLCB2KVxcXFxuICAgICAgICAgICAgICAgICAgICBpZiAoaSAhPSAzKSB2ID0gcnVuQ29kZSh2KVxcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdlxcXFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsgcmV0dXJuICcnIH1cXFxcbiAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgcmVzID0ge1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSwgdXJsOiB1cmwsXFxcXG4gICAgICAgICAgICAgICAgZGVzYzogZGVzYywgaW1nOiBpbWcsXFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IE1ZX1JVTEUuY29sX3R5cGVcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgaWYgKHJlcy51cmwpIHtcXFxcbiAgICAgICAgICAgIGlmIChyZXMudXJsLmluY2x1ZGVzKCdAbGF6eVJ1bGU9JykpIHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgcmVJbmRleCA9IHJlcy51cmwuaW5kZXhPZignLmpzOicpXFxcXG4gICAgICAgICAgICAgICAgaWYgKHJlSW5kZXggPj0gMCkgcmVzLnVybCA9IHJlcy51cmwuc2xpY2UoMCwgcmVJbmRleCkgKyAnLmpzOicgKyBoaWphY2tMYXp5UnVsZSArICc7JyArIHJlcy51cmwuc2xpY2UocmVJbmRleCArIDQpXFxcXG4gICAgICAgICAgICB9IGVsc2UgIGlmIChkZXRhaWxGaW5kUnVsZSkge1xcXFxuICAgICAgICAgICAgICAgIHJlcy5leHRyYSA9IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBnZW5FeFVybCh1cmwpLFxcXFxuICAgICAgICAgICAgICAgICAgICBSVUxFOiBiYX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U6ICfnroDku4sgPHNtYWxsPjxzbWFsbD48c3BhbiBzdHlsZT1cXFxcXFxcImNvbG9yOiMxOUI4OURcXFxcXFxcIj7mlLbotbc+PC9zcGFuPjwvc21hbGw+PC9zbWFsbD4nXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxcXG5cXFxcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHRTaXplOiAxNCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lU3BhY2luZzogMyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogZGVjaWRcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJzxzcGFuIHN0eWxlPVxcXFxcXFwiY29sb3I6IzgwODA4MFxcXFxcXFwiPicgKyBkZXNfZGVzYyArICcuLi48L3NwYW4+J1xcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFxcXFxcImpqc1xcXFxcXFwiLCBcXFxcXFxcIuaUtui1t1xcXFxcXFwiKTtcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGpqaWRcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+eugOS7iyA8c21hbGw+PHNtYWxsPjxzcGFuIHN0eWxlPVxcXFxcXFwiY29sb3I6IzE5Qjg5RFxcXFxcXFwiPuWxleW8gD48L3NwYW4+PC9zbWFsbD48L3NtYWxsPidcXFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IDE0LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVTcGFjaW5nOiAzLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBkZWNpZFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAnPHNwYW4gc3R5bGU9XFxcXFxcXCJjb2xvcjojODA4MDgwXFxcXFxcXCI+JyArIGRlc19kZXNjLnN1YnN0cigwLCAzMCkgKyAnLi4uPC9zcGFuPidcXFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuXFxcXG4gICAgICAgICAgICB9LCBNWV9SVUxFICsgXFxcXFxcXCJfamppZFxcXFxcXFwiLCBNWV9SVUxFICsgXFxcXFxcXCJfZGVjaWRcXFxcXFxcIiwgZGVzX2Rlc2MpLFxcXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiYXZhdGFyXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgIGlkOiBNWV9SVUxFICsgXFxcXFxcXCJfamppZFxcXFxcXFwiXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH0pO1xcXFxuXFxcXG4gICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTogJzxzcGFuIHN0eWxlPVxcXFxcXFwiY29sb3I6IzgwODA4MFxcXFxcXFwiPicgKyBkZXNfZGVzYy5zdWJzdHIoMCwgMzApICsgJy4uLjwvc3Bhbj4nLFxcXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwicmljaF90ZXh0XFxcXFxcXCIsXFxcXG4gICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgIHRleHRTaXplOiAxNCxcXFxcbiAgICAgICAgICAgICAgICBsaW5lU3BhY2luZzogMyxcXFxcbiAgICAgICAgICAgICAgICBpZDogTVlfUlVMRSArIFxcXFxcXFwiX2RlY2lkXFxcXFxcXCJcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSk7XFxcXG4gICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxcXG4gICAgICAgIH0pXFxcXG4gICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxcXG4gICAgICAgIH0pXFxcXG4gICAgfSBjYXRjaCAoZSkge31cXFxcbn1cXFxcblxcXFxuZnVuY3Rpb24gZG93bihUaXRsZSwgY2hhcHRlclBpYywgbGlzdCwgY2hhcHRlclRpdGxlLCBjaGFwdGVyTGluZSwgZG93bmxvYWRsYXp5KSB7XFxcXG4gICAgdHJ5IHtcXFxcbiAgICAgICAgbGV0IGRvTGlzdCA9IGxpc3QubWFwKChpdGVtKSA9PiAoe1xcXFxuICAgICAgICAgICAgdGl0bGU6IHBkZmgoaXRlbSwgY2hhcHRlclRpdGxlKSxcXFxcbiAgICAgICAgICAgIHVybDogcGQoaXRlbSwgY2hhcHRlckxpbmUpLFxcXFxuICAgICAgICB9KSk7XFxcXG4gICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnTxiPjxzcGF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sZSArIGdldE15VmFyKChNWV9SVUxFLnRpdGxlICsgJyNsaW5lLXRpdGxlJykpKVxcXFxuICAgIGZvciAobGV0IGkgaW4gbGlzdCkge1xcXFxuICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgbGV0IGxpbmVUaXRsZSA9IHBkZmgobGlzdFtpXSwgbGluZVRpdGxlUnVsZSk7XFxcXG4gICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRNeVZhcigoTVlfUlVMRS50aXRsZSArICcjbGluZS10aXRsZScpLCBsaW5lMFRpdGxlKSA9PT0gbGluZVRpdGxlID8gXFxcXFxcXCLliIfmjaI64oCY4oCYXFxcXFxcXCIgKyBsaW5lVGl0bGUgKyBcXFxcXFxcIlxcXFxcXFwiIDogbGluZVRpdGxlICsgXFxcXFxcXCLigJjigJg65YiH5o2iXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKHZhcktleSwgbGluZUluZGV4LCBsaW5lVGl0bGUpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIodmFyS2V5LCBsaW5lSW5kZXgudG9TdHJpbmcoKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgLy8gbG9nKE1ZX1JVTEUudXJsKVxcXFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcigoTVlfUlVMRS50aXRsZSArICcjbGluZS10aXRsZScpLCBsaW5lVGl0bGUpXFxcXG4gICAgICAgICAgICAgICAgICAgIGxvZyhNWV9SVUxFLnRpdGxlICsgZ2V0TXlWYXIoKE1ZX1JVTEUudGl0bGUgKyAnI2xpbmUtdGl0bGUnKSkpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwidG9hc3Q6Ly/lt7LliIfmjaLoh7NcXFxcXFxcIiArIGxpbmVUaXRs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o6lKSArICcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChwYXJhbXMpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdfY2F0ZSA9IFtdXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wLmZvckVhY2goKGNhdGUsIGluZGV4KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3X2NhdGUucHVzaChpbmRleCA9PT0gMCA/IHBhcmFtcy5rZXkudG9TdHJpbmcoKSA6IFxcXFxcXFwiMFxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KG5ld19jYXRlKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKE1ZX1JVTEUudXJsLCBpbnB1dClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgfSwge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHBhZ2UsXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcXFxuICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZT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biAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKE1ZX1JVTEUudXJsLCBpbnB1dClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgfSwge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHBhZ2UsXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcXFxuICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJibGFua19ibG9ja1xcXFxcXFwiXFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgfVxcXFxuICAgIH0pXFxcXG59XFxcIn0se1xcXCJjb2xfdHlwZVxcXCI6XFxcIm1vdmllXzNcXFwiLFxcXCJuYW1lXFxcIjpcXFwi5Yqo5oCBW+S4gF0qXFxcIixcXFwicGF0aFxcXCI6XFxcImNhdGVnb3JpZXMtaGVhZGVyXFxcIixcXFwicnVsZVxcXCI6XFxcIi8qKlxcXFxuICog5pys5Zyw572R6aG15o+S5Lu26ZO+5o6lIGhpa2VyOi8vZmlsZXMvcnVsZXMvanMvY2F0ZWdvcmllcy1oZWFkZXIuanNcXFxcbiAqIOWtkOmhtemdoumTvuaOpSBoaWtlcjovL3BhZ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Hx8IGluamVjdEluZGV4KSB7XFxcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBrZXlzLmxlbmd0aDsgaSsrKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGtleSA9IGtleXNbaV1cXFxcbiAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUZvbGRMYXlvdXRdW2tleV0gPSBsYXlvdXRba2V5XTtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFxcXFxcIuivt+S8oOWFpeato+ehrueahOaKmOWPoOeVjOmdouWFg+e0oO+8gVxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgLy8gaW5qZWN0SW5kZXgg5oqY5Y+g5oyJ6ZKu5o+S5YWl56ysIGluamVjdEluZGV4IOihjFxcXFxuICAgICAgICAgICAgaWYgKGluamVjdEluZGV4KSB7XFxcXG4gICAgICAgICAgICAgICAgaWYgKCEodHlwZW9mIChpbmplY3RJbmRleCkgPT09ICdudW1iZXInKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcXFxcXCLmipjlj6DmjInpkq7mj5LlhaXooYzor7fkvKDlhaXmlbDlrZfvvIFcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgaWYgKGluamVjdEluZGV4IDwgMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcXFxcXCLmipjlj6DmjInpkq7mj5LlhaXooYzor7fkvKDlhaXlpKfkuo4gMCDnmoTmlbTmlbDvvIFcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgaWYgKGluamVjdEluZGV4ID4gdGhpc1tzeW1ib2xNYXA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09PSAnb2JqZWN0Jykge1xcXFxuICAgICAgICAgICAgbGV0IG1VcmxSdWxlID0gdXJsUnVsZS5ydWxlIHx8IHVybFJ1bGVbJ+ino+aekOinhOWImSddIHx8ICdhJiZocmVmJztcXFxcbiAgICAgICAgICAgIGlmIChtVXJsUnVsZS5zdGFydHNXaXRoKFxcXFxcXFwiQGpzOlxcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgICAgIHVybCA9IHRoaXMuZXZhbEpTUnVsZShzcmMsIG1VcmxSdWxlKTtcXFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHBhcnNlID0gcGFyc2VEb207XFxcXG4gICAgICAgICAgICAgICAgaWYgKHVybFJ1bGUucGFyc2VPcHRpb24pIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoICh1cmxSdWxlLnBhcnNlT3B0aW9uKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXFxcXFwicGFyc2VEb21cXFxcXFxcIjpcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcXFxcXCJwZFxcXFxcXFwiOlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb207XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXFxcXFwicGFyc2VEb21Gb3JIdG1sXFxcXFxcXCI6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXFxcXFwicGRmaFxcXFxcXFwiOlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb21Gb3JIdG1sO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDpcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tO1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh1cmxSdWxlW1xcXFxcXFwi6Kej5p6Q5pa55rOVXFxcXFxcXCJdKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAodXJsUnVsZVtcXFxcXFxcIuino+aekOaWueazlVxcXFxcXFwiXSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFxcXFxcInBhcnNlRG9tXFxcXFxcXCI6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXFxcXFwicGRcXFxcXFxcIjpcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFxcXFxcInBhcnNlRG9tRm9ySHRtbFxcXFxcXFwiOlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFxcXFxcInBkZmhcXFxcXFxcIjpcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tRm9ySHRtbDtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB1cmwgPSBwYXJzZShzcmMsIG1VcmxSdWxlKTtcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGlmICh1cmxSdWxlLmRlYWxVcmwpIHtcXFxcbiAgICAgICAgICAgICAgICB1cmwgPS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ICAgICAgICAgICAgICAgVkFSTUFQOiB0aGlzLlZBUk1BUFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogdGhpc1tzeW1ib2xNYXAubUZvbGRMYXlvdXRdLmNvbF90eXBlIHx8IFxcXFxcXFwic2Nyb2xsX2J1dHRvblxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1MYXlvdXRdLnB1c2goZm9sZExheW91dClcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG5cXFxcbiAgICAgICAgICAgICAgICAvL+WFt+S9k+WIl+ihqOS4i+eahOWIhuexu1xcXFxuICAgICAgICAgICAgICAgIGxldCBzdWJfY2F0ZWdvcmllcyA9IFtdO1xcXFxuICAgICAgICAgICAgICAgIGlmIChjYXRlZ29yeS5zdWJMaXN0UnVsZS5zdGFydHNXaXRoKFxcXFxcXFwiQGpzOlxcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICBzdWJfY2F0ZWdvcmllcyA9IHRoaXMuZXZhbEpTUnVsZShjYXRlZ29yeS5saXN0LCBjYXRlZ29yeS5zdWJMaXN0UnVsZSlcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICBzdWJfY2F0ZWdvcmllcyA9IHBhcnNlRG9tRm9yQXJyYXkoY2F0ZWdvcnkubGlzdCwgY2F0ZWdvcnkuc3ViTGlzdFJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBpZiAoaW5kZXggPCAodGhpc1tzeW1ib2xNYXAubUZvbGRJbmRleF0gfHwgMSkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMuZm9yRWFjaCgoaXRlbSwga2V5KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSB0aGlzLmdldFRpdGxlKGl0ZW0sIGNhdGVnb3J5KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHRoaXMuZ2V0VXJsKGl0ZW0sIGNhdGVnb3J5KVxcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tTGF5b3V0XS5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyAn4oCc4oCc4oCd4oCdPGI+PGZvbnQgY29sb3I9JyArIHRoaXNbc3ltYm9sTWFwLm1Db2xvcl0gKyAnPicgKyB0aXRsZSArICcgPC9mb250PjwvYj4nIDogdGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHVybCkubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3X2NhdGUgPSBbXVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocGFyYW1zLmluZGV4ID09PSAwKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wLmZvckVhY2goKGNhdGUsIGluZGV4KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3X2NhdGUucHVzaChpbmRleCA9PT0gMCA/IHBhcmFtcy5rZXkudG9TdHJpbmcoKSA6IFxcXFxcXFwiMFxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMudGFnICsgcGFyYW1zLlZBUk1BUC5DQVRFR09SWSwgSlNPTi5zdHJpbmdpZnkocGFyYW1zLmluZGV4ID09PSAwID8gbmV3X2NhdGUgOiBwYXJhbXMuY2F0ZV90ZW1wKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIocGFyYW1zLnRhZyArIHBhcmFtcy5WQVJNQVAuVVJMLCBpbnB1dClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWQVJNQVA6IHRoaXMuVkFSTUFQLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YWc6IG1UYWcsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiB0aGlzW3N5bWJvbE1hcC5tUGFnZV0sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1MYXlvdXRdLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiYmxhbmtfYmxvY2tcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHRoaXNbc3ltYm9sTWFwLm1Gb2xkXSA9PT0gJzAnKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gdGhpcy5nZXRUaXRsZShpdGVtLCBjYXRlZ29yeSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSB0aGlzLmdldFVybChpdGVtLCBjYXRlZ29yeSlcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gJ+KAnOKAnOKAneKAnTxiPjxmb250IGNvbG9yPScgKyB0aGlzW3N5bWJvbE1hcC5tQ29sb3JdICsgJz4nICsgdGl0bGUgKyAnIDwvZm9udD48L2I+JyA6IHRpdGxlLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCh1cmwpLmxhenlSdWxlKChwYXJhbXMpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcFtwYXJhbXMuaW5kZXhdID0gcGFyYW1zLmtleS50b1N0cmluZygpXFxcXG5cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIocGFyYW1zLnRhZyArIHBhcmFtcy5WQVJNQVAuQ0FURUdPUlksIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5jYXRlX3RlbXApKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMudGFnICsgcGFyYW1zLlZBUk1BUC5VUkwsIGlucHV0KVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJoaWtlcjovL2VtcHR5XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFZBUk1BUDogdGhpcy5WQVJNQVAsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhZzogbVRhZyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHRoaXNbc3ltYm9sTWFwLm1QYWdlXSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2x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cXG4gICAgfSxcXFxcbiAgICBkZWJ1ZygpIHtcXFxcbiAgICAgICAgdGhpcy5wYXJhbXMuZGVidWcgPSB0cnVlXFxcXG4gICAgICAgIHJldHVybiB0aGlzO1xcXFxuICAgIH0sXFxcXG4gICAgZXhlYygpIHtcXFxcbiAgICAgICAgdGhpcy5jaGVja1BhcmFtcygpXFxcXG4gICAgICAgIGxldCB0cnVlX3VybCA9ICcnXFxcXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdGhpcy5yZWdleE1hcC5sZW5ndGg7IGkrKykge1xcXFxuICAgICAgICAgICAgbGV0IHJlZ09iaiA9IHRoaXMucmVnZXhNYXBbaV07XFxcXG4gICAgICAgICAgICBsZXQgdXJsRXhwID0gcmVnT2JqLnJlZztcXFxcbiAgICAgICAgICAgIGlmICh0eXBlb2YgdXJsRXhwID09PSAnc3RyaW5nJykge1xcXFxuICAgICAgICAgICAgICAgIHVybEV4cCA9IG5ldyBSZWdFeHAodXJsRXhwKVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgaWYgKHVybEV4cC50ZXN0KHRoaXMucGFyYW1zLnVybCkpIHtcXFxcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5wYXJhbXMuZGVidWcpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgbG9nKHVybEV4cC50b1N0cmluZygpKVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB0cnVlX3VybCA9IHJlZ09iai5leGVjKCk7XFxcXG4gICAgICAgICAgICAgICAgYnJlYWs7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgaWYgKHRydWVfdXJsKSB7XFxcXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZV91cmw7XFxcXG4gICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5wYXJhbXMudXJsXFxcXG4gICAgICAgIH1cXFxcbiAgICB9LF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G4gICAgbGV0IGtleXMgPSBPYmplY3Qua2V5cyhzb3VyY2UpXFxcXG4gICAgZm9yIChsZXQgaSBpbiBrZXlzKSB7XFxcXG4gICAgICAgIHRhcmdldFtrZXlzW2ldXSA9IHNvdXJjZVtrZXlzW2ldXVxcXFxuICAgIH1cXFxcbn1cXFxcblxcXFxuZnVuY3Rpb24g5LiA57qnKG9iaikge1xcXFxuICAgIHZhciBkID0gW107XFxcXG4gICAgaWYgKCQudHlwZShvYmopID09IFxcXFxcXFwic3RyaW5nXFxcXFxcXCIpIHtcXFxcbiAgICAgICAgb2JqID0gY29udmVydDEob2JqKVxcXFxuICAgIH1cXFxcbiAgICBpZiAob2JqLuinhOWImSkge1xcXFxuICAgICAgICBsZXQgYyA9IGNvbnZlcnQxKG9iai7op4TliJkpXFxcXG4gICAgICAgIG1lcmdlKGMsIG9iailcXFxcbiAgICB9XFxcXG4gICAgbGV0IGFyciA9IHBkZmEoZ2V0UmVzQ29kZSgpLCBvYmou5YiX6KGoKTtcXFxcbiAgICAgICBpZiAob2JqLuWIl+ihqOWkhOeQhiAhPSBudWxsKSB7XFxcXG4gICAgICAgICAgICBhcnIgPSBvYmou6ZO+5o6l5aSE55CGKGFycilcXFxcbiAgICAgICAgfVxcXFxuICAgIGZvciAobGV0IGl0IG9mIGFycikge1xcXFxuICAgICAgICBsZXQgdXJsID0gcGQoaXQsIG9iai7pk77mjqUpXFxcXG4gICAgICAgIGlmIChvYmou6ZO+5o6l5aSE55CGICE9IG51bGwpIHtcXFxcbiAgICAgICAgICAgIHVybCA9IG9iai7pk77mjqXlpITnkIYodXJsKVxcXFxuICAgICAgICB9XFxcXG4gICAgICAgIGxldCB0aXRsZSA9IHBkZmgoaXQsIG9iai7moIfpopgpXFxcXG4gICAgICAgIGlmIChvYmou5qCH6aKY5aSE55CGICE9IG51bGwpIHtcXFxcbiAgICAgICAgICAgIHRpdGxlID0gb2JqLuagh+mimOWkhOeQhih0aXRsZSlcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBsZXQgcGljID0gcGQoaXQsIG9iai7lm77niYcpXFxcXG4gICAgICAgIGlmIChvYmou5Zu+54mH5aSE55CGICE9IG51bGwpIHtcXFxcbiAgICAgICAgICAgIHBpYyA9IG9iai7lm77niYflpITnkIYocGljKVxcXFxuICAgICAgICB9XFxcXG4gICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTogb2JqLuagh+mimCA/IHBkZmgoaXQsIG9iai7moIfpopgpIDogXFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgIHVybDogdXJsKycjYXV0b0NhY2hlIycsXFxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgIGRlc2M6IG9iai7mj4/ov7AgPyBwZGZoKGl0LCBvYmou5o+P6L+wKSA6IFxcXFxcXFwiXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICBwaWNfdXJsOiBwaWMsXFxcXG4gICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgIHl0aXRsZTogdGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgeXBpYzogcGljLFxcXFxuICAgICAgICAgICAgICAgIHl1cmw6IHVybC5yZXBsYWNlKCdoaWtlcjovL2VtcHR5IyMnLCcnKVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9KTtcXFxcblxcXFxuICAgIH1cXFxcbiAgICBzZXRSZXN1bHQoZCk7XFxcXG59XFxcXG52YXIgdG9vbCA9IHtcXFxcbiAgICDkuIDnuqc6IOS4gOe6p1xcXFxufVxcXFxuJC5leHBvcnRzID0gdG9vbFxcXCJ9LHtcXFwiY29sX3R5cGVcXFwiOlxcXCJtb3ZpZV8zXFxcIixcXFwibmFtZVxcXCI6XFxcIuS4gOe6p1vkuoxdKlxcXCIsXFxcInBhdGhcXFwiOlxcXCJ5aWppXFxcIixcXFwicnVsZVxcXCI6XFxcImZ1bmN0aW9uIOS4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AgICB9O1xcXFxuICB9KTtcXFxcblxcXFxuICAgICAgICBmb3IgKGxldCBpdCBvZiDpm4bmlbDnu4RbaV0pIHtcXFxcbiAgICAgICAgICAgIHZhciBkb0xpc3R1cmwgPSBwZGZoKGl0LCDpm4Z1cmwpXFxcXG4gICAgICAgICAgICBkb0xpc3R1cmwgPSBkb0xpc3R1cmwuaW5jbHVkZXMoXFxcXFxcXCJodHRwXFxcXFxcXCIpID8gZG9MaXN0dXJsIDog5YmN57yAICsgZG9MaXN0dXJsXFxcXG4gICAgICAgICAgICBkb0xpc3QucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHBkZmgoaXQsIOmbhuWQjSksXFxcXG4gICAgICAgICAgICAgICAgdXJsOiBkb0xpc3R1cmxcXFxcbiAgICAgICAgICAgIH0pXFxcXG4gICAgICAgIH1cXFxcblxcXFxuICAgICAgICB2YXIgYm9va05hbWUgPSAh5aSa6Lev57q/5ZCmID8g5qCH6aKYIDog5qCH6aKYICsgJy0nICsg5YiX6KGo5ZCNW2ldXFxcXG5cXFxcbiAgICAgICAg56ug6IqCanNvbi5wdXNoKHtcXFxcbiAgICAgICAgICAgIHRpdGxlOiDliJfooajlkI1baV0sXFxcXG4gICAgICAgICAgICBsaXN0OiBkb0xpc3QsXFxcXG4gICAgICAgICAgICBzanNzOiB7XFxcXG4gICAgICAgICAgICAgICAgY2hhcHRlckxpc3Q6IGRvTGlzdCxcXFxcbiAgICAgICAgICAgICAgICBpbmZvOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGJvb2tOYW1lOiBib29rTmFtZSwgLy/mvKvnlLvlkI3np7AsXFxcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVOYW1lOiBNWV9SVUxFLnRpdGxlLFxcXFxuICAgICAgICAgICAgICAgICAgICBib29rVG9wUGljOiDlm77niYcsXFxcXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZTog5ryr55S76Kej5p6QLFxcXFxuICAgICAgICAgICAg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G1VVJMLGlkKTtcXFxcblxcXFxuICAgICAgICAgICAgdmFyIOagh+mimOWQjSA9IGlkID09IOmAieaLqeWIl+ihqCA/IOi3r+e6v+mAieS4rS5yZXBsYWNlKCfpgInkuK0nLCBkYXRhLnRpdGxlKSA6IGRhdGEudGl0bGU7XFxcXG4gICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiDmoIfpopjlkI0sXFxcXG4gICAgICAgICAgICAgICAgdXJsOiBqanVybCxcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2ZsZXhfYnV0dG9uJyxcXFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICBpZDog6aG1VVJMICsgXFxcXFxcXCJf6Lev57q/XFxcXFxcXCIgKyBpZFxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICB9KTtcXFxcblxcXFxuICAgIH1cXFxcbiAgICByZXR1cm4g6YCJ5oup5YiX6KGoXFxcXG59XFxcXG5cXFxcblxcXFxuZnVuY3Rpb24g5re75Yqg6YCJ5oup5LiL6L29KGQsIOi3r+e6v+aVsOaNriwg5aSa6Lev57q/5ZCmKSB7XFxcXG5cXFxcbiAgICAvL+i3r+e6v+aVsOaNriDmoLzlvI9be3RpdGxlOifot6/nur/lkI0nLHNqc3M6J+S4i+i9vei1hOaWmeS/oeaBryd9LC4uLi5dXFxcXG4gICAgLy/lpJrot6/nur/lkKYgIGZhbHNlIOWImeWPquacieKRoOS4quS4i+i9vSDmoIfpopjkuLog54K55Ye75LiL6L2977ybdHJ1ZSDliJnlpJrkuKrkuIvovb1cXFxcblxcXFxuaWYo5aSa6Lev57q/5ZCmKXtcXFxcblxcXFxuZC5wdXNoKHtcXFxcbiAgICAgICAgdGl0bGU6ICfigJjigJjigJnigJnwn5OlPGZvbnQgY29sb3I9XFxcXFxcXCIjZjQ3OTgzXFxcXFxcXCI+I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AgICAgdmFyIOaOkuW6jyA9IGdldE15VmFyKE1ZX1VSTCArIFxcXFxcXFwi56ug6IqC5o6S5bqPXFxcXFxcXCIsICcjMWFhZDE5XFxcXFxcXCI+5q2j5bqPJyk7XFxcXG4gICAgICAgICAgICB2YXIg5o+Q56S6ID0g5o6S5bqPID09ICcjRkYwMDAwXFxcXFxcXCI+5YCS5bqPJyA/ICcjMWFhZDE5XFxcXFxcXCI+5q2j5bqPJyA6ICcjRkYwMDAwXFxcXFxcXCI+5YCS5bqPJztcXFxcblxcXFxuICAgICAgICAgICAg57q/6LevLmZvckVhY2goKGRhdGEsIHhsaWQpID0+IHtcXFxcbiAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGlkID09IHhsaWQgPyAn4oCc4oCcJyArIGRhdGEgKyAn4oCd4oCdJyA6IGRhdGEsXFxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogTVlfVVJMICsgXFxcXFxcXCJf57q/6LevXFxcXFxcXCIgKyB4bGlkXFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICBwdXRNeVZhcihNWV9VUkwsIGlkKVxcXFxuICAgICAgICAgICAgdmFyIOeroOiKgiA9IGxpc3RzW2dldE15VmFyKE1ZX1VSTCwgJzAnKV07XFxcXG4gICAgICAgICAgICBpZiAo5o6S5bqPID09ICcjRkYwMDAwXFxcXFxcXCI+5YCS5bqPJykge1xcXFxuICAgICAgICAgICAgICAgIOeroOiKgi5yZXZlcnNlKClcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGxldCBjcCA9IOeroOiKgi5tYXAoKGRhdGEsIHNzaWQpID0+IHtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChkYXRhLCAnYSYmVGV4dCcpLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IHBkKGRhdGEsICdhJiZocmVmJykgKyBsYXp5LFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTog56ug6IqCLmxlbmd0aCA+IDMgPyAndGV4dF80JyA6ICd0ZXh0XzInLFxcXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBNWV9VUkwgKyBcXFxcXFxcIl/pgInpm4ZcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfTtcXFxcbiAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKE1ZX1VSTCArIFxcXFxcXFwiX+mAiembhlxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgIGFkZEl0ZW1CZWZvcmUoTVlfVVJMICsgXFxcXFxcXCJmb290ZXJcXFxcXFxcIiwgY3ApO1xcXFxuICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgIH0sIHRhYnMsIGxhenksIGlkKSxcXFxcbiAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbicsXFxcXG4gICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICBpZDogTVlfVVJMICsgXFxcXFxcXCJf57q/6LevXFxcXFxcXCIgKyBpZFxcXFxuICAgICAgICB9XFxcXG4gICAgfSk7XFxcXG59KVxcXFxuXFxcXG5pZiAo5o6S5bqPID09ICcjRkYwMDAwXFxcXFxcXCI+5YCS5bqPJykge1xcXFxuICAgIGxpc3QucmV2ZXJzZSgpXFxcXG59XFxcXG5saXN0LmZvckVhY2goKGRhdGEsIGlkKSA9PiB7XFxcXG4gICAgZC5wdXNoKHtcXFx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xcImpqc1xcXFxcXFwiLCBcXFxcXFxcIuaUtui1t1xcXFxcXFwiKSA9PSBcXFxcXFxcIuaUtui1t1xcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICBwdXRNeVZhcihcXFxcXFxcImpqc1xcXFxcXFwiLCBcXFxcXFxcIuWxleW8gFxcXFxcXFwiKTtcXFxcblxcXFxuICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWQ6IGpqaWRcXFxcbiAgICAgICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn5pu05paw6K+m5oOFIDxzbWFsbD48c21hbGw+PHNwYW4gc3R5bGU9XFxcXFxcXCJjb2xvcjojMTlCODlEXFxcXFxcXCI+5pS26LW3Pjwvc3Bhbj48L3NtYWxsPjwvc21hbGw+J1xcXFxuICAgICAgICAgICAgfSlcXFxcblxcXFxuICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IDE0LFxcXFxuICAgICAgICAgICAgICAgICAgICBsaW5lU3BhY2luZzogMyxcXFxcbiAgICAgICAgICAgICAgICAgICAgaWQ6IGRlY2lkXFxcXG4gICAgICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogJzxzcGFuIHN0eWxlPVxcXFxcXFwiY29sb3I6IzgwODA4MFxcXFxcXFwiPicgKyBkZXNfZGVzYyArICc8L3NwYW4+J1xcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIlxcXFxuICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgcHV0TXlWYXIoXFxcXFxcXCJqanNcXFxcXFxcIiwgXFxcXFxcXCLmlLbotbdcXFxcXFxcIik7XFxcXG5cXFxcbiAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBqamlkXFxcXG4gICAgICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+abtOaWsOivpuaDhTxzbWFsbD48c21hbGw+PHNwYW4gc3R5bGU9XFxcXFxcXCJjb2xvcjojMTlCODlEXFxcXFxcXCI+5bGV5byAPjwvc3Bhbj48L3NtYWxsPjwvc21hbGw+J1xcXFxuICAgICAgICAgICAgfSlcXFxcblxcXFxuICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IDE0LFxcXFxuICAgICAgICAgICAgICAgICAgICBsaW5lU3BhY2luZzogMyxcXFxcbiAgICAgICAgICAgICAgICAgICAgaWQ6IGRlY2lkXFxcXG4gICAgICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogJzxzcGFuIHN0eWxlPVxcXFxcXFwiY29sb3I6IzgwODA4MFxcXFxcXFwiPicgKyBkZXNfZGVzYy5zdWJzdHIoMCwgMTUwKVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIlxcXFxuICAgICAgICB9XFxcXG5cXFxcbiAgICB9LCBNWV9SVUxFICsgXFxcXFxcXCJfamppZFxcXFxcXFwiLCBNWV9SVUxFICsgXFxcXFxcXCJfZGVjaWRcXFxcXFxcIiwgZGVzX2Rlc2MpLFxcXFxuICAgIGNvbF90eXBlOiBcXFxcXFxcImF2YXRhclxcXFxcXFwiLFxcXFxuICAgIGV4dHJhOiB7XFxcXG4gICAgICAgIGlkOiBNWV9SVUxFICsgXFxcXFxcXCJf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gICAgaWYgKCQudHlwZShvYmopID09IFxcXFxcXFwic3RyaW5nXFxcXFxcXCIpIHtcXFxcbiAgICAgICAgb2JqID0gY29udmVydDEob2JqKVxcXFxuICAgIH1cXFxcbiAgICBpZiAob2JqLuinhOWImSkge1xcXFxuICAgICAgICBsZXQgYyA9IGNvbnZlcnQxKG9iai7op4TliJkpXFxcXG4gICAgICAgIG1lcmdlKGMsIG9iailcXFxcbiAgICB9XFxcXG4gICAgbGV0IGFyciA9IHBkZmEoZ2V0UmVzQ29kZSgpLCBvYmou5YiX6KGoKTtcXFxcbiAgICAgICBpZiAob2JqLuWIl+ihqOWkhOeQhiAhPSBudWxsKSB7XFxcXG4gICAgICAgICAgICBhcnIgPSBvYmou6ZO+5o6l5aSE55CGKGFycilcXFxcbiAgICAgICAgfVxcXFxuICAgIGZvciAobGV0IGl0IG9mIGFycikge1xcXFxuICAgICAgICBsZXQgdXJsID0gcGQoaXQsIG9iai7pk77mjqUpXFxcXG4gICAgICAgIGlmIChvYmou6ZO+5o6l5aSE55CGICE9IG51bGwpIHtcXFxcbiAgICAgICAgICAgIHVybCA9IG9iai7pk77mjqXlpITnkIYodXJsKVxcXFxuICAgICAgICB9XFxcXG4gICAgICAgIGxldCB0aXRsZSA9IHBkZmgoaXQsIG9iai7moIfpopgpXFxcXG4gICAgICAgIGlmIChvYmou5qCH6aKY5aSE55CGICE9IG51bGwpIHtcXFxcbiAgICAgICAgICAgIHRpdGxlID0gb2JqLuagh+mimOWkhOeQhih0aXRsZSlcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBsZXQgcGljID0gcGQoaXQsIG9iai7lm77niYcpXFxcXG4gICAgICAgIGlmIChvYmou5Zu+54mH5aSE55CGICE9IG51bGwpIHtcXFxcbiAgICAgICAgICAgIHBpYyA9IG9iai7lm77niYflpITnkIYocGljKVxcXFxuICAgICAgICB9XFxcXG4gICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTogb2JqLuagh+mimCA/IH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