Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥⚙ 轻合集设置 ⚙@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcInRleHRfMVwiLFwibmFtZVwiOlwiQ2xhc3NUYWJcIixcInBhdGhcIjpcIkNsYXNzVGFiXCIsXCJydWxlXCI6XCJ2YXIge1xcbiAgICBRSU5HX1RJVExFLCB0aXRsZSwgdXJsLFxcbiAgICBjbGFzc19uYW1lLCBjbGFzc191cmwsXFxuICAgIGFyZWFfbmFtZSwgYXJlYV91cmwsXFxuICAgIHllYXJfbmFtZSwgeWVhcl91cmwsXFxuICAgIHNvcnRfbmFtZSwgc29ydF91cmxcXG59ID0gJC5pbXBvcnRQYXJhbVxcbmNvbnN0IENsYXNzVGFiID0gZnVuY3Rpb24oY2xhc3NBcnJheSwgcGFyYW1zKSB7XFxuICAgIE9iamVjdC5hc3NpZ24odGhpcywgcGFyYW1zKVxcbiAgICB0aGlzLmFyciA9IGNsYXNzQXJyYXkubWFwKHYgPT4gdGhpcy5pbml0KHYpKVxcbiAgICB0aGlzLnNpZ24gPSAnJCcgKyBRSU5HX1RJVExFICsgJ18nICsgKHRoaXMubmFtZSB8fCAnJykgKyAnXydcXG4gICAgdGhpcy5jb2xvciA9IHRoaXMuY29s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FzcyhpZCkpXFxuICAgICAgICAgICAgY2xhc3NfbmFtZS5mb3JFYWNoKChuYW1lLCBpKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCB1cmwgPSBjbGFzc191cmxbaV0sXFxuICAgICAgICAgICAgICAgICAgICBub3cgPSBKU09OLnN0cmluZ2lmeSh7IG5hbWU6IG5hbWUsIHVybDogdXJsIH0pXFxuICAgICAgICAgICAgICAgIGVsLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHNlbGVjdGVkID09IG5vdyA/ICfigJzigJzigJ3igJ0nICsgbmFtZS5mb250Y29sb3IodGhpcy5jb2xvcikuYm9sZCgpIDogbmFtZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogc2VsZWN0ZWQgPT0gbm93ID8gJ2hpa2VyOi8vZW1wdHknIDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoc2lnbiwgaWQsIG5vdykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihzaWduICsgaWQsIG5vdylcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgICAgICB9LCB0aGlzLnNpZ24sIGlkLCBub3cpLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgZWwucHVzaCh7IGNvbF90eXBlOiB0aGlzLmJvdW5kYXJ5IH0pXFxuICAgICAgICB9KVxcbiAgICB9LFxcbiAgICBpbml0KGNsYXNzT2JqZWN0KSB7XFxuICAgICAgICBpZiAodHlwZW9mIGNsYXNzT2JqZWN0LmNsYXNzX25hbWUgPT0gJ3N0cmluZycpXFxuICAgICAgICAgICAgY2xhc3NPYmplY3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AgZm9yIChsZXQgaSA9IDA7IGkgPCByZXF1aXJlbGlzdC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgICAgICB0cnkgeyAvL+i/nOeoi+S+nei1lue0ouW8lVxcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJlcyA9IHJlcXVlc3QocmVxdWlyZWxpc3RbaV0gKyAnRHJlYW1Pek8vSk0vbWFpbi9KTScsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB3aXRoU3RhdHVzQ29kZTogdHJ1ZVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIGlmIChKU09OLnBhcnNlKHJlcykuc3RhdHVzQ29kZSA9PSAyMDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZmlsZUV4aXN0KHVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlRmlsZSh1cmwpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmVEb3dubG9hZChyZXF1aXJlbGlzdFtpXSArICdEcmVhbU96Ty9KTS9tYWluL0pNJyx1cmwpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZURvd25sb2FkKHJlcXVpcmVsaXN0W2ldICsgJ0RyZWFtT3pPL0pNL21haW4vSk0nLHVybClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxuICAgICAgICAgICAgYmFjayhmYWxzZSlcXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v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ICAgICAgICBsZXQgdXJsID0gZ2V0TXlWYXIoJ3JlbW90ZVVybCcpXFxuICAgICAgICBpZiAoIXVybC5zdGFydHNXaXRoKCdoaWtlcjovLycpICYmICF1cmwuc3RhcnRzV2l0aCgnZmlsZTovLycpKVxcbiAgICAgICAgICAgIHVybCA9ICdoaWtlcjovL2ZpbGVzL2xpYnMvJyArIG1kNSh1cmwpICsgJy5qcydcXG4gICAgICAgIGVsc2UgaWYgKHVybC5zdGFydHNXaXRoKCdoaWtlcjovL3BhZ2UvJykpIHVybCA9ICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgaWYgKGlucHV0ID09ICflpIfku70nKSByZXR1cm4gJCgnaGlrZXI6Ly9maWxlcy90bXAvJyArIFFJTkdfVElUTEUgKyAnX2JhY2t1cC5qc29uJywgJ+i+k+WFpeWkh+S7vei3r+W+hCcpXFxuICAgICAgICAgICAgLmlucHV0KCh1cmwsIHVwZGF0ZUludGVydmFsLCBuZXdXaW5kb3csIHRhYkZvbGQsIGRpc2FibGVDdXN0b20pID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gcmVxdWVzdCh1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgY3VzdG9tRGF0YSA9IHJlYWRGaWxlKCdjdXN0b21EYXRhJylcXG4gICAgICAgICAgICAgICAgd3JpdGVGaWxlKGlucHV0LCBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJbnRlcnZhbDogdXBkYXRlSW50ZXJ2YWwsXFxuICAgICAgICAgICAgICAgICAgICBuZXdXaW5kb3c6IG5ld1dpbmRvdyxcXG4gICAgICAgICAgICAgICAgICAgIHRhYkZvbGQ6IHRhYkZvbGQsXFxuICAgICAgICAgICAgICAgICAgICBkaXNhYmxlQ3VzdG9tOiBkaXNhYmxlQ3VzdG9tLFxcbiAgICAgICAgICAgICAgICAgICAgY3VzdG9tRGF0YTogY3VzdG9tRGF0YSxcXG4gICAgICAgIC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figJzigJzigJ3igJ0nICsgJ/Cfk50nLnNtYWxsKCkgKyAnJm5ic3Ag6L275ZCI6ZuG6Ieq5a6a5LmJICZuYnNwJy5ib2xkKCkuZm9udGNvbG9yKCcjNzU3NTc1JykgKyAoZGlzYWJsZUN1c3RvbSA/ICfinYwnIDogJ+KtlScpLnNtYWxsKCksXFxuICAgIHVybDogJChbKGRpc2FibGVDdXN0b20gPyAn5ZCv55SoJyA6ICfnpoHnlKgnKSArICflkIjpm4boh6rlrprkuYknLCAn5riF6Zmk6Ieq5a6a5LmJ5pWw5o2uJywgJ+e8lui+kUpTT04nXSwgMSkuc2VsZWN0KCgpID0+IHtcXG4gICAgICAgIHN3aXRjaCAoaW5wdXQuc2xpY2UoMCwgMikpIHtcXG4gICAgICAgICAgICBjYXNlICfmuIXpmaQnOlxcbiAgICAgICAgICAgICAgICBkZWxldGVGaWxlKCdjdXN0b21EYXRhJylcXG4gICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICBjYXNlICflkK/nlKgnOlxcbiAgICAgICAgICAgICAgICBzYXZlRmlsZSgnZGlzYWJsZUN1c3RvbScsICcnKVxcbiAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgIGNhc2UgJ+emgeeUqCc6XFxuICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdkaXNhYmxlQ3VzdG9tJywgJ1QnKVxcbiAgICAgICAgICAgICAgICBpbnB1dCArPSAnXFxcXG7lsI/nqIvluo/lkK/nlKgv56aB55So44CB6YeN5paw5o6S5bqP562J5pON5L2c5Z2H5LiN5Lya5L2T546w5Zyo6aaW6aG15bCP56iL5bqP5YiX6KGo5LitJ1xcbiAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgIGNhc2UgJ+e8lui+kSc6XFxuICAgICAgICAgICAgICAgIGxldCB1cmwgPSBnZXRNeVZhcigncmVtb3RlVXJsJylcXG4gICAgICAgICAgICAgICAgaWYgKCF1cmwuc3RhcnRzV2l0aCgnaG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HNhdmVGaWxlKCdjdXN0b21EYXRhJywgSlNPTi5zdHJpbmdpZnkocnVsZXMpKVxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgIGNhc2UgJ+mHjeaWsOaOkuW6jyc6XFxuICAgICAgICAgICAgbGV0IHNvcnRGbGFnID0gcGFyc2VJbnQoZ2V0TXlWYXIoJ3NvcnRGbGFnJywgJy0xJykpXFxuICAgICAgICAgICAgZC50aXRsZSA9IChzb3J0RmxhZyA9PSBpID8gJ/CflIMgICcgOiAnJykgKyBkLnRpdGxlXFxuICAgICAgICAgICAgaWYgKHNvcnRGbGFnID09IC0xKVxcbiAgICAgICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzb3J0RmxhZycsIGkudG9TdHJpbmcoKSlcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mAieaLqeimgeenu+WKqOWIsOeahOS9jee9ridcXG4gICAgICAgICAgICAgICAgfSwgaSlcXG4gICAgICAgICAgICBlbHNlXFxuICAgICAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgob2xkSW5kZXgsIG5ld0luZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdjdXN0b21EYXRhJykgfHwgJ1tdJylcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzLnNwbGljZShuZXdJbmRleCwgMCwgcnVsZXMuc3BsaWNlKG9sZEluZGV4LCAxKVswXSlcXG4gICAgICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdjdXN0b21EYXRhJywgSlNPTi5zdHJpbmdpZnkocnVsZXMpKVxcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgJy0xJylcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LCBzb3J0RmxhZywgaSlcXG4gICAgICAgICAgICBicmVha1xcbiAgICAgICAgY2FzZSAn5pu05pS55Zu+5qCHJzpcXG4gICAgICAgICAgICBkLnVybCA9ICQodi5pY29uIHx8ICcnLCAn6L6T5YWl5paw5Zu+5qCH5Zyw5Z2A5oiW6aKc6Imy5Luj56CB77yaJykuaW5wdXQoKGkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpXFxuICAgICAgICAgICAgICAgIGlmIChpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzW2ldLmljb24gPSBpbnB1dFxcbiAgICAgICAgICAgICAgICBlbHNlXFxuICAgICAgICAgICAgICAgICAgICBkZWxldGUgcnVsZXNbaV0uaWNvblxcbiAgICAgICAgICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSlcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICBjYXNlICflr7zlhaXmtbfpmJQnOlxcbiAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoa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LnNoaWZ0KCkpLmZvckVhY2goKGRhdGEpID0+IHtcXG4gICAgICAgIGxldCBbdGl0bGUsIGltZywgZGVzYywgdXJsXSA9IGZpbmRSdWxlLm1hcCgodiwgaSkgPT4ge1xcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKHYgPT0gJyonKSByZXR1cm4gJydcXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgdiA9IChpID09IDEgfHwgaSA9PSAzKSA/XFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2VEb20oZGF0YSwgdikgOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlRG9tRm9ySHRtbChkYXRhLCB2KVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGkgIT0gMykgdiA9IHJ1bkNvZGUodilcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2XFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsgcmV0dXJuICcnIH1cXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICByZXMgPSB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSwgdXJsOiB1cmwsXFxuICAgICAgICAgICAgICAgIGRlc2M6IGRlc2MsIGltZzogaW1nLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogTVlfUlVMRS5jb2xfdHlwZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIGlmIChyZXMudXJsKSB7XFxuICAgICAgICAgICAgaWYgKHJlcy51cmwuaW5jbHVkZXMoJ0BsYXp5UnVsZT0nKSkge1xcbiAgICAgICAgICAgICAgICBsZXQgcmVJbmRleCA9IHJlcy51cmwuaW5kZXhPZignLmpzOicpXFxuICAgICAgICAgICAgICAgIGlmIChyZUluZGV4ID49IDApIHJlcy51cmwgPSByZXMudXJsLnNsaWNlKDAsIHJlSW5kZXgpICsgJy5qczonICsgaGlqYWNrTGF6eVJ1bGUgKyAnOycgKyByZXMudXJsLnNsaWNlKHJlSW5kZXggKyA0KVxcbiAgICAgICAgICAgIH0gZWxzZSAgaWYgKGRldGFpbEZpbmRSdWxlKSB7XFxuICAgICAgICAgICAgICAgIHJlcy5leHRyYSA9IHtcXG4gICAgICAgICAgICAgICAgICAgIHVybDogZ2VuRXhVcmwodXJsKSxcXG4gICAgICAgICAgICAgICAgICAgIFJVTEU6IGJhc2U2NEVuY29kZShKU09OLnN0cmluZ2lmeShPYmplY3QuYXNzaWduKGdlbk15UnVsZSgpLCB7IGRldGFpbF9maW5kX3J1bGU6IGRldGFpbEZpbmRSdWxlIH0pKSksXFxuICAgICAgICAgICAgICAgICAgICBwYWdlVGl0bGU6IGlzSW5kZXggJiYgdGl0bGVcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXMudXJsID0gJ2hpa2VyOi8vcGFnZS9mcmFtZUxvYWQ/cnVsZT0nICsgUUlOR19USVRMRVxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoTVlfUlVMRS5kZXRhaWxfZmluZF9ydWxlKSB7XFxuICAgICAgICAgICAgICAgIHJlcy5leHRyYSA9IHtcXG4gICAgICAgICAgICAgICAgICAgIHVybDogZ2VuRXhVcmwodXJsKSxcXG4gICAgICAgICAgICAgICAgICAgIFJVTEU6IGJhc2U2NEVuY29kZShKU09OLnN0cmluZ2lmeShnZW5NeVJ1bGUoKSkpLFxcbiAgICAgICAgICAgICAgICAgICAgcGFnZVRpdGxlOiBpc0luZGV4ICYmIHRpdGxlXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmVzLnVybCA9ICdoaWtlcjovL3BhZ2UvZnJhbWVMb2FkP3J1bGU9JyArIFFJTkdfVElUTEVcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBteUNvbGxfZWwucHVzaChyZXMpXFxuICAgIH0pXFxuICAgIHNldFJlc3VsdChteUNvbGxfZWwpXFxufVxcblwifSx7XCJjb2xfdHlwZVwiOlwibW92aWV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cHV0TXlWYXIoXFxcImpqc1xcXCIsXFxcIuaUtui1t1xcXCIpO1xcXCJoaWtlcjovL2VtcHR5XFxcIic7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAn566A5LuLIDxzbWFsbD48c21hbGw+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiMxOUI4OURcXFwiPuWxleW8gD48L3NwYW4+PC9zbWFsbD48L3NtYWxsPicsXFxuICAgICAgICAgICAgaW1nOiBcXFwiaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vcmUvMTk3LnBuZ1xcXCIsXFxuICAgICAgICAgICAgdXJsOiAkKFxcXCIjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKChqamlkLCBkZWNpZCwgZGVzX2Rlc2MpID0+IHtcXG4gICAgICAgICAgICAgICAgaWYgKGdldE15VmFyKFxcXCJqanNcXFwiLCBcXFwi5pS26LW3XFxcIikgPT0gXFxcIuaUtui1t1xcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJqanNcXFwiLCBcXFwi5bGV5byAXFxcIik7XFxuXFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogamppZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfnroDku4sgPHNtYWxsPjxzbWFsbD48c3BhbiBzdHlsZT1cXFwiY29sb3I6IzE5Qjg5RFxcXCI+5pS26LW3Pjwvc3Bhbj48L3NtYWxsPjwvc21hbGw+J1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG5cXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHRTaXplOiAxNCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZVNwYWNpbmc6IDMsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBkZWNpZFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICc8c3BhbiBzdHlsZT1cXFwiY29sb3I6IzgwODA4MFxcXCI+JyArIGRlc19kZXNjICsgJy4uLjwvc3Bhbj4nXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcImpqc1xcXCIsIFxcXCLmlLbotbdcXFwiKTtcXG5cXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBqamlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+eugOS7iyA8c21hbGw+PHNtYWxsPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjojMTlCODlEXFxcIj7lsZXlvIA+PC9zcGFuPjwvc21hbGw+PC9zbWFsbD4nXFxuICAgICAgICAgICAgICAgICAgICB9KVxcblxcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IDE0LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lU3BhY2luZzogMyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGRlY2lkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJzxzcGFuIHN0eWxlPVxcXCJjb2xvcjojODA4MDgwXFxcIj4nICsgZGVzX2Rlc2Muc3Vic3RyKDAsIDMwKSArICcuLi48L3NwYW4+J1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIH0sIE1ZX1JVTEUgKyBcXFwiX2pqaWRcXFwiLCBNWV9SVUxFICsgXFxcIl9kZWNpZFxcXCIsIGRlc19kZXNjKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcImF2YXRhclxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IE1ZX1JVTEUgKyBcXFwiX2pqaWRcXFwiXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAnPHNwYW4gc3R5bGU9XFxcImNvbG9yOiM4MDgwODBcXFwiPicgKyBkZXNfZGVzYy5zdWJzdHIoMCwgMzApICsgJy4uLjwvc3Bhbj4nLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwicmljaF90ZXh0XFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogMTQsXFxuICAgICAgICAgICAgICAgIGxpbmVTcGFjaW5nOiAzLFxcbiAgICAgICAgICAgICAgICBpZDogTVlfUlVMRSArIFxcXCJfZGVjaWRcXFwiXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgICAgIH0pXFxuICAgICAgICB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BjYXRlZ29yaWVzLmZvckVhY2goKGNhdGVnb3J5LCBpbmRleCkgPT4ge1xcbiAgICAgICAgbGV0IHN1Yl9jYXRlZ29yaWVzID0gcGRmYShjYXRlZ29yeSwg5bCP57G75a6a5L2NKTtcXG4gICAgICAgIGlmIChpbmRleCA9PT0gMCkge1xcbiAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0ZW0sIOWIhuexu+agh+mimClcXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZijmjpLpmaQpICE9ICd1bmRlZmluZWQnICYmIOaOkumZpCAhPSAnJykge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGUgPSB0aXRsZS5yZXBsYWNlKG5ldyBSZWdFeHAo5o6S6ZmkLCBcXFwiZ1xcXCIpLCBcXFwiXFxcIilcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gXFxcIuKAnOKAnOKAneKAnVxcXCIgKyB0aXRsZS5mb250Y29sb3Io5YiG57G76aKc6ImyKSA6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHBkKGl0ZW0sIOWIhuexu+mTvuaOpSkgKyAnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld19jYXRlID0gW11cXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wLmZvckVhY2goKGNhdGUsIGluZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19jYXRlLnB1c2goaW5kZXggPT09IDAgPyBwYXJhbXMua2V5LnRvU3RyaW5nKCkgOiBcXFwiMFxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihNWV9SVUxFLnRpdGxlLCBKU09OLnN0cmluZ2lmeShuZXdfY2F0ZSkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoTVlfUlVMRS51cmwsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhZ2U6IHBhZ2UsXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfSBlbHNlIGlmIChmb2xkID09PSAnMScpIHtcXG4gICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gcGRmaChpdGVtLCDliIbnsbvmoIfpopgpXFxuICAgICAgICAgICAgICAgIGlmICh0eXBlb2Yo5o6S6ZmkKSAhPSAndW5kZWZpbmVkJyAmJiDmjpLpmaQgIT0gJycpIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlID0gdGl0bGUucmVwbGFjZShuZXcgUmVnRXhwKOaOkumZpCwgXFxcImdcXFwiKSwgXFxcIlxcXCIpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBrZXkudG9TdHJpbmcoKSA9PT0gY2F0ZV90ZW1wW2luZGV4XSA/IFxcXCLigJzigJzigJ3igJ1cXFwiICsgdGl0bGUuZm9udGNvbG9yKOWIhuexu+minOiJsikgOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChwZChpdGVtLCDliIbnsbvpk77mjqUpICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXBbcGFyYW1zLmluZGV4XSA9IHBhcmFtcy5rZXkudG9TdHJpbmcoKVxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5jYXRlX3RlbXApKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKE1ZX1JVTEUudXJsLCBpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogcGFnZSxcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICA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gaW5qZWN0SW5kZXgpIHtcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBrZXlzLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgICAgICAgICBjb25zdCBrZXkgPSBrZXlzW2ldXFxuICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tRm9sZExheW91dF1ba2V5XSA9IGxheW91dFtrZXldO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXCLor7fkvKDlhaXmraPnoa7nmoTmipjlj6DnlYzpnaLlhYPntKDvvIFcXFwiKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAvLyBpbmplY3RJbmRleCDmipjlj6DmjInpkq7mj5LlhaXnrKwgaW5qZWN0SW5kZXgg6KGMXFxuICAgICAgICAgICAgaWYgKGluamVjdEluZGV4KSB7XFxuICAgICAgICAgICAgICAgIGlmICghKHR5cGVvZiAoaW5qZWN0SW5kZXgpID09PSAnbnVtYmVyJykpIHtcXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFwi5oqY5Y+g5oyJ6ZKu5o+S5YWl6KGM6K+35Lyg5YWl5pWw5a2X77yBXFxcIilcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAoaW5qZWN0SW5kZXggPCAxKSB7XFxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIuaKmOWPoOaMiemSruaPkuWFpeihjOivt+S8oOWFpeWkp+S6jiAwIOeahOaVtOaVsO+8gVxcXCIpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYgKGluamVjdEluZGV4ID4gdGhpc1tzeW1ib2xNYXAubUZvbGRJbmRleF0pIHtcXG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcXFwi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ICAgICAgICAgICAgICBsZXQgcGFyc2UgPSBwYXJzZURvbTtcXG4gICAgICAgICAgICAgICAgaWYgKHVybFJ1bGUucGFyc2VPcHRpb24pIHtcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAodXJsUnVsZS5wYXJzZU9wdGlvbikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBhcnNlRG9tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwZFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb207XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBhcnNlRG9tRm9ySHRtbFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGRmaFxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb21Gb3JIdG1sO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHVybFJ1bGVbXFxcIuino+aekOaWueazlVxcXCJdKSB7XFxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKHVybFJ1bGVbXFxcIuino+aekOaWueazlVxcXCJdKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGFyc2VEb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcInBkXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwicGFyc2VEb21Gb3JIdG1sXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJwZGZoXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbUZvckh0bWw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb207XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgdXJsID0gcGFyc2Uoc3JjLCBtVXJsUnVsZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmICh1cmxSdWxlLmRlYWxVcmwpIHtcXG4gICAgICAgICAgICAgICAgdXJsID0gdXJsUnVsZS5kZWFsVXJsKHVybClcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHVybFJ1bGVbJ+S6jOasoeWkhOeQhiddKSB7XFxuICAgICAgICAgICAgICAgIHVybCA9IHVybFJ1bGVbJ+S6jOasoeWkhOeQhiddKHVybClcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGlmICh1cmxSdWxlLnN0YXJ0c1dpdGgoXFxcIkBqczpcXFwiKSkge1xcbiAgICAgICAgICAgICAgICB1cmwgPSB0aGlzLmV2YWxKU1J1bGUoc3JjLCB1cmxSdWxlKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB1cmwgPSBwYXJzZURvbShzcmMsIHVybFJ1bGUpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiB1cmwgfHwgXFxcIlxcXCI7XFxuICAgIH0sXFxuICAgIGJ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ICAgIH1cXG4gICAgICAgICAgICAvLyBsb2cobGlzdClcXG4gICAgICAgICAgICBsaXN0Lm1hcChjYXRlZ29yeSA9PiB7XFxuICAgICAgICAgICAgICAgIGNhdGVnb3JpZXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICBsaXN0OiBjYXRlZ29yeSxcXG4gICAgICAgICAgICAgICAgICAgIHN1Ykxpc3RSdWxlOiBydWxlT2JqLnN1Ykxpc3RSdWxlIHx8IHJ1bGVPYmpbXFxcIuWtkOWIhuexu1xcXCJdLFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGVSdWxlOiBydWxlT2JqLnRpdGxlUnVsZSB8fCBydWxlT2JqW1xcXCLliIbnsbvmoIfpophcXFwiXSxcXG4gICAgICAgICAgICAgICAgICAgIHVybFJ1bGU6IHJ1bGVPYmoudXJsUnVsZSB8fCBydWxlT2JqW1xcXCLliIbnsbvpk77mjqVcXFwiXSxcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pXFxuXFxuICAgICAgICAvLyBsb2coJC5zdHJpbmdpZnkoY2F0ZWdvcmllcykpXFxuXFxuICAgICAgICBsZXQgaW5pdF9jYXRlID0gW11cXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgMjA7IGkrKykge1xcbiAgICAgICAgICAgIGluaXRfY2F0ZS5wdXNoKFxcXCIwXFxcIilcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGNvbnN0IGNhdGVfdGVtcF9qc29uID0gZ2V0TXlWYXIobVRhZyArIHRoaXMuVkFSTUFQLkNBVEVHT1JZLCBKU09OLnN0cmluZ2lmeShpbml0X2NhdGUpKVxcbiAgICAgICAgY29uc3QgY2F0ZV90ZW1wID0gSlNPTi5wYXJzZShjYXRlX3RlbXBfanNvbilcXG5cXG4gICAgICAgIGlmICh0aGlzW3N5bWJvbE1hcC5tUGFnZV0gPT09IDEpIHtcXG5cXG4gICAgICAgICAgICBjYXRlZ29y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XB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1UYWc6IG1UYWcsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzRm9sZDogdGhpc1tzeW1ib2xNYXAubUZvbGRdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBWQVJNQVA6IHRoaXMuVkFSTUFQXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IHRoaXNbc3ltYm9sTWFwLm1Gb2xkTGF5b3V0XS5jb2xfdHlwZSB8fCBcXFwic2Nyb2xsX2J1dHRvblxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tTGF5b3V0XS5wdXNoKGZvbGRMYXlvdXQpXFxuICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgLy/lhbfkvZPliJfooajkuIvnmoTliIbnsbtcXG4gICAgICAgICAgICAgICAgbGV0IHN1Yl9jYXRlZ29yaWVzID0gW107XFxuICAgICAgICAgICAgICAgIGlmIChjYXRlZ29yeS5zdWJMaXN0UnVsZS5zdGFydHNXaXRoKFxcXCJAanM6XFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzID0gdGhpcy5ldmFsSlNSdWxlKGNhdGVnb3J5Lmxpc3QsIGNhdGVnb3J5LnN1Ykxpc3RSdWxlKVxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMgPSBwYXJzZURvbUZvckFycmF5KGNhdGVnb3J5Lmxpc3QsIGNhdGVnb3J5LnN1Ykxpc3RSdWxlKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAoaW5kZXggPCAodGhpc1tzeW1ib2xNYXAubUZvbGRJbmRleF0gfHwgMSkpIHtcXG4gICAgICAgICAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHRoaXMuZ2V0VGl0bGUoaXRlbSwgY2F0ZWdvcnkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IHRoaXMuZ2V0VXJsKGl0ZW0sIGNhdGVnb3J5KVxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1MYXlvdXRdLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyAn4oCc4oCc4oCd4oCdPGI+PGZvbnQgY29sb3I9JyArIHRoaXNbc3ltYm9sTWFwLm1Db2xvcl0gKyAnPicgKyB0aXRsZSArICcgPC9mb250PjwvYj4nIDogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCh1cmwpLmxhenlSdWxlKChwYXJhbXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdfY2F0ZSA9IFtdXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocGFyYW1zLmluZGV4ID09PSAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcC5mb3JFYWNoKChjYXRlLCBpbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY2F0ZS5wdXNoKGluZGV4ID09PSAwID8gcGFyYW1zLmtleS50b1N0cmluZygpIDogXFxcIjBcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy50YWcgKyBwYXJhbXMuVkFSTUFQLkNBVEVHT1JZLCBKU09OLnN0cmluZ2lmeShwYXJhbXMuaW5kZXggPT09IDAgPyBuZXdfY2F0ZSA6IHBhcmFtcy5jYXRlX3RlbXApKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIocGFyYW1zLnRhZyArIHBhcmFtcy5WQVJNQVAuVVJMLCBpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVkFSTUFQOiB0aGlzLlZBUk1BUCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhZzogbVRhZyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogdGhpc1tzeW1ib2xNYXAubVBhZ2VdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1MYXlvdXRdLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzW3N5bWJvbE1hcC5tRm9sZF0gPT09ICcwJykge1xcbiAgICAgICAgICAgICAgICAgICAgc3ViX2NhdGVnb3JpZXMuZm9yRWFjaCgoaXRlbSwga2V5KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gdGhpcy5nZXRUaXRsZShpdGVtLCBjYXRlZ29yeSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gdGhpcy5nZXRVcmwoaXRlbSwgY2F0ZWdvcnkpXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBrZXkudG9TdHJpbmcoKSA9PT0gY2F0ZV90ZW1wW2luZGV4XSA/ICfigJzigJzigJ3igJ08Yj48Zm9udCBjb2xvcj0nICsgdGhpc1tzeW1ib2xNYXAubUNvbG9yXSArICc+JyArIHRpdGxlICsgJyA8L2ZvbnQ+PC9iPicgOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHVybCkubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcFtwYXJhbXMuaW5kZXhdID0gcGFyYW1zLmtleS50b1N0cmluZygpXFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMudGFnICsgcGFyYW1zLlZBUk1BUC5DQVRFR09SWSwgSlNPTi5zdHJpbmdpZnkocGFyYW1zLmNhdGVfdGVtcCkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihwYXJhbXMudGFnICsgcGFyYW1zLlZBUk1BUC5VUkwsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaW5kZXgsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWQVJNQVA6IHRoaXMuVkFSTUFQLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFnOiBtVGFnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiB0aGlzW3N5bWJvbE1hcC5tUGFnZV0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJibGFua19ibG9ja1xcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgIH0sXFxuXFxuICAgIOeVjOmdoihsYXlvdXQpIHtcXG4gICAgICAgIHJldHVybiB0aGlzLmxheW91dChsYXlvdXQpXFxuICAgIH0sXFxuICAgIOWIhuexu+mTvuaOpSh0cnVlVXJsKSB7XFxuICAgICAgICByZXR1cm4gdGhpcy50cnVlVXJsKHRydWVVcmwpO1xcbiAgICB9LFxcbiAgICDpobXnoIEocGFnZSkge1xcbiAgICAgICAgcmV0dXJuIHRoaXMucGFnZShwYWdlKTtcXG4gICAgfSxcXG4gICAg5rqQ56CBKGh0bWwpIHtcXG4gICAgICAgIHJldHVybiB0aGlzLmh0bWwoaHRtbCk7XFxuICAgIH0sXFxuICAgIOWumuS9jeS4gOe6p+WIhuexuyhsaXN0KSB7XFxuICAgICAgICByZXR1cm4gdGhpcy5saXN0KGxpc3QpO1xcbiAgICB9LFxcbiAgICDlrprkvY3lrZDliIbnsbsoc3ViTGlzdCkge1xcbiAgICAgICAgcmV0dXJuIHRoaXMuc3ViTGlzdChzdWJMaXN0KTtcXG4gICAgfSxcXG4gICAg5a6a5L2N5YiG57G75qCH6aKYKHRpdGxlKSB7XFxuICAgICAgICByZXR1cm4gdGhpcy50aXRsZSh0aXRsZSk7XFxuICAgIH0sXFxuICAgIOWumuS9jeWIhuexu+mTvuaOpSh1cmwpIHtcXG4gICAgICAgIHJldHVybiB0aGlzLnVybCh1cmwpO1xcbiAgICB9LFxcbiAgICDlvIDlkK/lhoXnva7mipjlj6Dlip/og70oKSB7XFxuICAgICAgICByZXR1cm4gdGhpcy5mb2xkSW5uZXIodHJ1ZSk7XFxuICAgIH0sXFxuICAgIOWFs+mXreWGhee9ruaKmOWPoOWKn+iDvSgpIHtcXG4gICAgICAgIHJldHVybiB0aGlzLmZvbGRJbm5lcihmYWxzZSk7XFx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AgICAgdGhpcy5yZWdleE1hcC5wdXNoKHJlZ0V4cClcXG4gICAgICAgIH1cXG4gICAgICAgIHJldHVybiB0aGlzO1xcbiAgICB9LFxcbiAgICBkZWJ1ZygpIHtcXG4gICAgICAgIHRoaXMucGFyYW1zLmRlYnVnID0gdHJ1ZVxcbiAgICAgICAgcmV0dXJuIHRoaXM7XFxuICAgIH0sXFxuICAgIGV4ZWMoKSB7XFxuICAgICAgICB0aGlzLmNoZWNrUGFyYW1zKClcXG4gICAgICAgIGxldCB0cnVlX3VybCA9ICcnXFxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRoaXMucmVnZXhNYXAubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICBsZXQgcmVnT2JqID0gdGhpcy5yZWdleE1hcFtpXTtcXG4gICAgICAgICAgICBsZXQgdXJsRXhwID0gcmVnT2JqLnJlZztcXG4gICAgICAgICAgICBpZiAodHlwZW9mIHVybEV4cCA9PT0gJ3N0cmluZycpIHtcXG4gICAgICAgICAgICAgICAgdXJsRXhwID0gbmV3IFJlZ0V4cCh1cmxFeHApXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmICh1cmxFeHAudGVzdCh0aGlzLnBhcmFtcy51cmwpKSB7XFxuICAgICAgICAgICAgICAgIGlmICh0aGlzLnBhcmFtcy5kZWJ1Zykge1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKHVybEV4cC50b1N0cmluZygpKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHRydWVfdXJsID0gcmVnT2JqLmV4ZWMoKTtcXG4gICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgaWYgKHRydWVfdXJsKSB7XFxuICAgICAgICAgICAgcmV0dXJuIHRydWVfdXJsO1xcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5wYXJhbXMudXJsXFxuICAgIC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5c1tpXV1cXG4gICAgfVxcbn1cXG5cXG5mdW5jdGlvbiDkuIDnuqcob2JqKSB7XFxuICAgIHZhciBkID0gW107XFxuICAgIGlmICgkLnR5cGUob2JqKSA9PSBcXFwic3RyaW5nXFxcIikge1xcbiAgICAgICAgb2JqID0gY29udmVydDEob2JqKVxcbiAgICB9XFxuICAgIGlmIChvYmou6KeE5YiZKSB7XFxuICAgICAgICBsZXQgYyA9IGNvbnZlcnQxKG9iai7op4TliJkpXFxuICAgICAgICBtZXJnZShjLCBvYmopXFxuICAgIH1cXG4gICAgbGV0IGFyciA9IHBkZmEoZ2V0UmVzQ29kZSgpLCBvYmou5YiX6KGoKTtcXG4gICAgICAgaWYgKG9iai7liJfooajlpITnkIYgIT0gbnVsbCkge1xcbiAgICAgICAgICAgIGFyciA9IG9iai7pk77mjqXlpITnkIYoYXJyKVxcbiAgICAgICAgfVxcbiAgICBmb3IgKGxldCBpdCBvZiBhcnIpIHtcXG4gICAgICAgIGxldCB1cmwgPSBwZChpdCwgb2JqLumTvuaOpSlcXG4gICAgICAgIGlmIChvYmou6ZO+5o6l5aSE55CGICE9IG51bGwpIHtcXG4gICAgICAgICAgICB1cmwgPSBvYmou6ZO+5o6l5aSE55CGKHVybClcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCB0aXRsZSA9IHBkZmgoaXQsIG9iai7moIfpopgpXFxuICAgICAgICBpZiAob2JqLuagh+mimOWkhOeQhiAhPSBudWxsKSB7XFxuICAgICAgICAgICAgdGl0bGUgPSBvYmou5qCH6aKY5aSE55CGKHRpdGxlKVxcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IHBpYyA9IHBkKGl0LCBvYmou5Zu+54mHKVxcbiAgICAgICAgaWYgKG9iai7lm77niYflpITnkIYgIT0gbnVsbCkge1xcbiAgICAgICAgICAgIHBpYyA9IG9iai7lm77niYflpITnkIYocGljKVxcbiAgICAgICAgfVxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZT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ioJqc29uID0gW107XFxuICAgIHZhciDljZXot6/nur/nq6DoioIgPSAn56ug6IqC5YiX6KGoJ1xcblxcbiAgICB2YXIg5YiX6KGo5ZCNID0gW107XFxuICAgIGlmICgh5aSa6Lev57q/5ZCmKSB7XFxuXFxuICAgICAgICDliJfooajlkI0ucHVzaCjljZXot6/nur/nq6DoioIpXFxuXFxuICAgIH0gZWxzZSB7XFxuXFxuICAgICAgICBwZGZhKOa6kOaVsOaNriwg6Lev57q/5YiX6KGoKS5mb3JFYWNoKGZ1bmN0aW9uKGRhdGEpIHtcXG4gICAgICAgICAgICDliJfooajlkI0ucHVzaChwZGZoKGRhdGEsIOi3r+e6v+WQjSkpXFxuICAgICAgICB9KTtcXG5cXG4gICAgfVxcblxcbiAgICB2YXIg6ZuG5pWw57uEID0gW107XFxuXFxuXFxudmFyIOaOkumZpOeroOiKgiA9IFtdO1xcbmlmKOmAiembhuWIl+ihqC5pbmNsdWRlcygnJCcpKXtcXG7mjpLpmaTnq6DoioIgPSDpgInpm4bliJfooaguc3BsaXQoJyQnKVxcbumAiembhuWIl+ihqCA9IOaOkumZpOeroOiKgi5zaGlmdCgpXFxufVxcblxcbiAgICBpZiAoIeWkmui3r+e6v+WQpikge1xcbiAgICAgICAg6ZuG5pWw57uELnB1c2gocGRmYSjmupDmlbDmja4sIOmAiembhuWIl+ihqCkpXFxuICAgIH0gZWxzZSB7XFxuICAgICAgICBwZGZhKOa6kOaVsOaNriwg6YCJ6ZuG5oC75YiX6KGoKS5mb3JFYWNoKGZ1bmN0aW9uKGRhdGEpIHtcXG4gICAgICAgICAgICDpm4bmlbDnu4QucHVzaChwZGZhKGRhdGEsIOmAiembhuWIl+ihqCkpXFxuICAgICAgICB9KTtcXG4gICAgfVxcblxcblxcbiAgICBmb3IgKGxldCBpIGluIOmbhuaVsOe7hCkge1xcblxcbiAgICAgICAgdmFyIGRvTGlzdCA9IFtdO1xcblxcbuaOkumZpOeroOiKgi5mb3JFYWNoKGZ1bmN0aW9uKGRhdGEpIHtcXG4gICAgdmFyIOagh+ivhmlkID0g6ZuG5pWw57uEW2ldLmZpbmRJbmRleCjov5Tlm54gPT4g6L+U5ZueLmluZGV4T2YoZGF0YSkgIT0gLTEpO1xcbiAgICBpZiAo5qCH6K+GaWQgIT0gLTEpIHtcXG4gICAgICDpm4bmlbDnu4RbaV0uc3BsaWNlKOagh+ivhmlkLCAxKVxcbiAgICB9O1xcbiAgfSk7XFxuXFxuICAgICAgICBmb3IgKGxldCBpdCBvZiDpm4bmlbDnu4RbaV0pIHtcXG4gICAgICAgICAgICB2YXIgZG9MaXN0dXJsID0gcGRmaChpdCwg6ZuGdXJsKVxcbiAgICAgICAgICAgIGRvTGlzdHVybCA9IGRvTGlzdHVybC5pbmNsdWRlcyhcXFwiaHR0cFxcXCIpID8gZG9MaXN0dXJsIDog5YmN57yAICsgZG9MaXN0dXJsXFxuICAgICAgICAgICAgZG9MaXN0LnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChpdCwg6ZuG5ZCNKSxcXG4gICAgICAgICAgICAgICAgdXJsOiBkb0xpc3R1cmxcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfVxcblxcbiAgICAgICAgdmFyIGJvb2tOYW1lID0gIeWkmui3r+e6v+WQpiA/IOagh+mimCA6IOagh+mimCArICctJyArIOWIl+ihqOWQjVtpXVxcblxcbiAgICAgICAg56ug6IqCanNvbi5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTog5YiX6KGo5ZCNW2ldLFxcbiAgICAgICAgICAgIGxpc3Q6IGRvTGlzdCxcXG4gICAgICAgICAgICBzanNzOiB7XFxuICAgICAgICAgICAgICAgIGNoYXB0ZXJMaXN0OiBkb0xpc3QsXFxuICAgICAgICAgICAgICAgIGluZm86IHtcXG4gICAgICAgICAgICAgICAgICAgIGJvb2tOYW1lOiBib29rTmFtZSwgLy/mvKvnlLvlkI3np7AsXFxuICAgICAgICAgICAgICAgICAgICBydWxlTmFtZTogTVlfUlVMRS50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIGJvb2tUb3BQaWM6IOWbvueJhyxcXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZTog5ryr55S76Kej5p6QLFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBkZWZhdWx0VmlldzogXFxcIjFcXFwiXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSlcXG4gICAgfVxcbiAgICByZXR1cm4g56ug6IqCanNvblxcbn1cXG5cXG5cXG5mdW5jdGlvbiDmt7vliqDlpLTpg6jliJfooagoZCwg5qCH6aKYLCDlm77niYcsIOaPj+i/sCwg5L2c6ICFLCDml7bpl7QsIOWIhuexuyzpobVVUkwpIHtcXG5cXG4gICAg5qCH6aKYID0gIeagh+mimCA/ICcnIDog5qCH6aKYICsgJ1xcXFxuJ1xcbiAgICDlm77niYcgPSAh5Zu+54mHID8gJycgOiDlm77niYdcXG4gICAg5o+P6L+wID0gIeaPj+i/sCA/ICcnIDog5o+P6L+wLnJlcGxhY2UoXFxcIuabtOaWsOiHs++8mlxcXCIsICcnKVxcblxcbiAgICDkvZzogIUgPSAh5L2c6ICFID8gJycgOiAnXFxcXG4nICsg5L2c6ICFXFxuICAgIOaXtumXtCA9ICHml7bpl7QgPyAnJyA6ICdcXFxcbicgKyDml7bpl7RcXG4gICAg5YiG57G7ID0gIeWIhuexuyA/ICcnIDogJ1xcXFxuJyArIOWIhuexu1xcblxcblxcbiAgICB2YXIg5aS06YOodGl0bGUgPSBbJ+KAmOKAmOKAmeKAmTxiPicsJzwvYj4gPHNtYWxsPjxmb250IGNvbG9yPSNGQTcyOTg+JywnPC9mb250PicsJzwvc21hbGw+J11cXG4gICAgdmFyIOWktOmDqGRlc2MgPSBbJ+KAmOKAmOKAmeKAmTxmb250IGNvbG9yPSNmOGVjYzk+JywnPC9mb250PiddXFxuXFxuXFxuXFxuICAgIOWktOmDqHRpdGxlID0g5aS06YOodGl0bGVbMF0r5qCH6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CArIFxcXCLnroDku4vmlLZcXFwiLCBcXFwi5bey5pS26LW3XFxcIik7XFxuICAgICAgICBqaiA9IGpqID09IFxcXCLlt7LmlLbotbdcXFwiID8gXFxcIuWxleW8gFxcXCIgOiBcXFwi5bey5pS26LW3XFxcIjtcXG4gICAgICAgIHB1dE15VmFyKGpzYmwsIGpqKVxcbiAgICAgICAgdXBkYXRlSXRlbSh7XFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IOW9k+WJjVVSTCArIFxcXCJfYnRcXFwiXFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICB0aXRsZTog5pS2LnJlcGxhY2UoXFxcIueugOS7i+aUtlxcXCIsIGpqKVxcbiAgICAgICAgfSlcXG5cXG4gICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOiDlvZPliY1VUkwgKyBcXFwiX216XFxcIlxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgdGl0bGU6IGpqID09IFxcXCLlt7LmlLbotbdcXFwiID8g5pS25YaF5a65LnJlcGxhY2UoXFxcIueugOS7i1xcXCIsIOeugOS7i+WGheWuueaUtikgOiDmlLblhoXlrrkucmVwbGFjZShcXFwi566A5LuLXFxcIiwg566A5LuL5YaF5a65KVxcbiAgICAgICAgfSlcXG4gICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgfSwg566A5LuL5YaF5a65LCDnroDku4vlhoXlrrnmlLYsIGJ0dGl0bGUsIG16dGV4dCwg6aG1VVJMKVxcblxcblxcbiAgICAvL+agh+mimFxcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IGJ0dGl0bGUucmVwbGFjZShcXFwi566A5LuL5pS2XFxcIiwgamopLFxcbiAgICAgICAgdXJsOiBqanVybCxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIixcXG4gICAgICAgIHBpY191cmw6IOWbvueJhyxcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgaWQ6IOmhtVVSTCArIFxcXCJfYnRcXFwiXFxuICAgICAgICB9XFxuICAgIH0pO1xcblxcbiAgICAvL+eugOS7i1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IGpqID09IFxcXCLlt7LmlLbotbdcXFwiID8gbXp0ZXh0LnJlcGxhY2UoXFxcIueugOS7i1xcXCIsIOeugOS7i+WGheWuueaUtikgOiBtenRleHQucmVwbGFjZShcXFwi566A5LuLXFxcIiwg566A5LuL5YaF5a65KSxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwicmljaF90ZXh0XFxcIixcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgaWQ6IOmhtVVSTCArIFxcXCJfbXpcXFwiXFxuICAgICAgICB9XFxuICAgIH0pO1xcblxcbn1cXG5cXG5mdW5jdGlvbiDmt7vliqDliJfooajnq6DoioIoZCwg5qCH6aKY5pWw5o2uLCDliJfooajmlbDmja4sIOino+aekOS7o+eggSwg6aG1VVJMLCDlm77niYcpIHtcXG5cXG5cXG4gICAgLy9k5LiO5aSW55WMZO+8jOS4uuWQjOWGheWtmOWcsOWdgO+8jOS4jeeUqOi/lOWbnlxcbiAgICAvL+agh+mimOaVsOaNriAg5Y2z5qCH6aKY5ZCN5a2XXFxuICAgIC8v5YiX6KGo5pWw5o2u5b+F6aG75pivSlNPTiAg5qC85byP5pivW3t0aXRsZTonJyx1cmw6JycsfSwuLi4uLl0gIOS4lHVybOW/hemhu+acieWJjee8gFxcblxcbiAgICAvL+Wbvuagh+iOt+WPllxcbiAgICBpZiAoIeWbvueJhykge1xcbiAgICAgICAg5Zu+54mHID0gJ2h0dHBzOi8vbGFubWVpZ3VvamlhbmcuY29tL3R1Ymlhby9xLzE4LnBuZydcXG4gICAgfVxcblxcbiAgICAvL+mhtVVSTCDojrflj5ZcXG4gICAgaWYgKC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An5YCS5bqPJykge1xcbiAgICAgICAgICAgIOWIl+ihqOaVsOaNri5yZXZlcnNlKClcXG4gICAgICAgIH1cXG4gICAgICAgIOWIl+ihqOaVsOaNri5mb3JFYWNoKGZ1bmN0aW9uKGRhdGEsIHNzaWQpIHtcXG4gICAgICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGRhdGEudGl0bGUsXFxuICAgICAgICAgICAgICAgIHVybDogZGF0YS51cmwgKyDop6PmnpDku6PnoIEsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBpZDog6aG1VVJMICsgXFxcIl/pgInpm4ZcXFwiICsgc3NpZFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9KTtcXG5cXG5cXG4gICAgICAgIHB1dE15VmFyKOmhtVVSTCArIFxcXCLnq6DoioLmjpLluo9cXFwiLCDmj5DnpLopXFxuICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgIH0sIOagh+mimOWQjSwg5qCH6aKY5pWw5o2uLCDliJfooajmlbDmja4sIOino+aekOS7o+eggSwg6aG1VVJMKVxcblxcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IOagh+mimOWQjS5yZXBsYWNlKCfot6/nur8nLCDmoIfpopjmlbDmja4pLnJlcGxhY2UoJ+aOkuW6jycsIOaOkuW6jyksXFxuICAgICAgICBwaWNfdXJsOiDlm77niYcsXFxuICAgICAgICB1cmw6IOaOkuW6j3VybCxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIixcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgaWQ6IOmhtVVSTCArIFxcXCJf5o6S5bqPXFxcIlxcbiAgICAgICAgfVxcbiAgICB9KTtcXG5cXG4gICAgaWYgKOaOkuW6jyA9PSAn5YCS5bqPJykge1xcbiAgICAgIC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WYgKOWkmui3r+e6v+WQpikge1xcblxcbiAgICAgICAgdmFyIOi3r+e6v+mAieS4rSA9ICfigJjigJjigJnigJk8Zm9udCBjb2xvcj0jMDk4QUMxPumAieS4rTwvZm9udD4nXFxuXFxuXFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAn4oCY4oCY4oCZ4oCZ8J+Tljxmb250IGNvbG9yPVxcXCIjRkE3Mjk4XFxcIj4g5Zu+5rqQ5YiX6KGoPC9mb250PiDvvJonLFxcbiAgICAgICAgICAgIHVybDogXFxcInRvYXN0Oi8v54K55oiR5bmy5ZWl5ZGiXFxcIixcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2ZsZXhfYnV0dG9uJ1xcbiAgICAgICAgfSk7XFxuXFxuXFxuICAgICAgICDot6/nur/mlbDmja4uZm9yRWFjaChmdW5jdGlvbihkYXRhLCBpZCkge1xcblxcbiAgICAgICAgICAgIHZhciBqanVybCA9ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKOmhtVVSTCxpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICBzZXRJdGVtKOmhtVVSTCArICfpgInmi6nliJfooagnLGlkKycnKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgIH0s6aG1VVJMLGlkKTtcXG5cXG4gICAgICAgICAgICB2YXIg5qCH6aKY5ZCNID0gaWQgPT0g6YCJ5oup5YiX6KGoID8g6Lev57q/6YCJ5LitLnJlcGxhY2UoJ+mAieS4rScsIGRhdGEudGl0bGUpIDogZGF0YS50aXRsZTtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTog5qCH6aKY5ZCNLFxcbiAgICAgICAgICAgICAgICB1cmw6IGpqdXJsLFxcbiAgICAgICAgICAgICAgIC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aW1tZXJzaXZlVGhlbWUjI2F1dG9DYWNoZSMnLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibW92aWVfM1xcXCIsXFxuZXh0cmE6IHtcXG4gICAgICAgICAgICBuYW1lOiBwZGZoKGRhdGEsIOagh+mimCksXFxuICAgICAgICAgICAgdXJsOiBwZChkYXRhLCDpk77mjqUpLFxcbiAgICAgICAgICAgIHF6OiBNWV9IT01FXFxuICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgfSk7XFxuICAgIHNldFJlc3VsdChkKTtcXG59XFxuXFxuXFxuXFxuZnVuY3Rpb24g5pCc57SiKOWIl+ihqCwg5qCH6aKYLCDpk77mjqUsIOaPj+i/sCwg6K+m5oOFLCDlm77niYcsIOiuv+mXruWktCkge1xcbiAgICB2YXIgZCA9IFtdO1xcbiAgICDorr/pl67lpLQgPSAh6K6/6Zeu5aS0ID8gJycgOiDorr/pl67lpLRcXG4gICAgcGRmYShnZXRSZXNDb2RlKCksIOWIl+ihqCkuZm9yRWFjaChmdW5jdGlvbihkYXRhKSB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBwZGZoKGRhdGEsIOagh+mimCksXFxuICAgICAgICAgICAgZGVzYzogcGRmaChkYXRhLCDmj4/ov7ApLFxcbiAgICAgICAgICAgIHBpY191cmw6IHBkKGRhdGEsIOWbvueJhykgKyBcXFwiQFJlZmVyZXI9XFxcIiArIOiuv+mXruWktCxcXG4gICAgICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5I2ltbWVyc2l2ZVRoZW1lIyNhdXRvQ2FjaGUjJyxcXG4gICAgICAgICAgICBjb250ZW50OiBwZGZoKGRhdGEsIOivpuaDhSksXFxuXFxuZXh0cmE6IHtcXG4gICAgICAgICAgICBuYW1lOiBwZGZoKGRhdGEsIOagh+mimCksXFxuICAgICAgICAgICAgdXJsOiBwZChkYXRhLCDpk77mjqUpLFxcbiAgICAgICAgICAgIHF6OiBNWV9IT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3r+e6v++8m2ZhbHNlIOWImeS9v+eUqOeroOi3r+e6v1xcbi8vVUEgIOS4jeWhq+WImeS9v+eUqOaJi+acuuerryAgJ1BDJ+WImeaJi+acuuerr1xcblxcbmlmICjlvZPliY3pobXlkI0pIHtcXG4gICAgc2V0UGFnZVRpdGxlKOW9k+WJjemhteWQjSlcXG59XFxuXFxuaWYo6Ziy6YeN6L295ZCmKXtcXG4vL+e9kemhteWGheWuuSvpmLLmraLph43mi4lcXG4gICAgdmFyIGNvZGUgPSDmt7vliqDpmLLmraLnvZHpobUo5b2T5YmNVVJMLCBVQSlcXG59ZWxzZXtcXG4gICAgdmFyIGNvZGUgPSBnZXRDb2RlKClcXG59XFxuICAgIFxcblxcbiAgICAvL+WktOmDqOWIl+ihqOaVsOaNrlxcbiAgICB2YXIg5aS06YOoID0gIeWktOmDqOWIl+ihqCA/IGNvZGUgOiBwZGZhKGNvZGUsIOWktOmDqOWIl+ihqClbMF07XFxuICAgIOagh+mimCA9IHBkZmgo5aS06YOoLCDmoIfpopgpXFxuICAgIOWbvueJhyA9IHBkZmgo5aS06YOoLCDlm77niYcpfHzlm77niYdcXG4gICAgaWYgKOWbvueJhykge1xcbiAgICAgICAg5Zu+54mHID0g5Zu+54mHLmluY2x1ZGVzKCdodHRwJykgPyDlm77niYcgOiDliY3nvIAgKyDlm77niYdcXG4gICAgICAgIGlmICgh6K6/6Zeu5aS0KSB7fSBlbHNlIGlmICjorr/pl67lpLQuc3Vic3RyKDAsIDEpID09ICdAJykge1xcbiAgICAgICAgICAgIOWbvueJhyA9IOWbvueJhyArIOiuv+mXruWktFxcbiAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICDlm77niYcgPSDlm77niYcgKyBcXFwiQFJlZmVyZXI9XFxcIiArIOiuv+mXruWktFxcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIFxcblxcbuaPj+i/sCA9IOaPj+i/sC5pbmNsdWRlcygnJCcpID8g5o+P6L+wLnNwbGl0KCckJylbMV0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IueroOiKguaOkuW6j1xcXCIsICcjMWFhZDE5XFxcIj7mraPluo8nKTtcXG4gICAgICAgIHZhciDmj5DnpLogPSDmjpLluo8gPT0gJyNGRjAwMDBcXFwiPuWAkuW6jycgPyAnIzFhYWQxOVxcXCI+5q2j5bqPJyA6ICcjRkYwMDAwXFxcIj7lgJLluo8nO1xcbiAgICAgICAgdXBkYXRlSXRlbSh7XFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IE1ZX1VSTCArIFxcXCJf5o6S5bqPXFxcIlxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgdGl0bGU6IOaOkuW6j+WQjS5yZXBsYWNlKCfmjpLluo8nLCDmj5DnpLopXFxuICAgICAgICB9KVxcbiAgICAgICAgaWYgKOaOkuW6jyA9PSAnIzFhYWQxOVxcXCI+5q2j5bqPJykge1xcbiAgICAgICAgICAgIOeroOiKgi5yZXZlcnNlKClcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCBjcCA9IOeroOiKgi5tYXAoKGRhdGEsIHNzaWQpID0+IHtcXG4gICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChkYXRhLCAnYSYmVGV4dCcpLFxcbiAgICAgICAgICAgICAgICB1cmw6IHBkKGRhdGEsICdhJiZocmVmJykgKyBsYXp5LFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTog56ug6IqCLmxlbmd0aCA+IDMgPyAndGV4dF80JyA6ICd0ZXh0XzInLFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgY2xzOiBNWV9VUkwgKyBcXFwiX+mAiembhlxcXCJcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH07XFxuICAgICAgICB9KTtcXG4gICAgICAgIGRlbGV0ZUl0ZW1CeUNscyhNWV9VUkwgKyBcXFwiX+mAiembhlxcXCIpO1xcbiAgICAgICAgYWRkSXRlb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GlkID8gJ+KAnOKAnCcgKyBkYXRhICsgJ+KAneKAnScgOiBkYXRhLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogTVlfVVJMICsgXFxcIl/nur/ot69cXFwiICsgeGxpZFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIHB1dE15VmFyKE1ZX1VSTCwgaWQpXFxuICAgICAgICAgICAgdmFyIOeroOiKgiA9IGxpc3RzW2dldE15VmFyKE1ZX1VSTCwgJzAnKV07XFxuICAgICAgICAgICAgaWYgKOaOkuW6jyA9PSAnI0ZGMDAwMFxcXCI+5YCS5bqPJykge1xcbiAgICAgICAgICAgICAgICDnq6DoioIucmV2ZXJzZSgpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxldCBjcCA9IOeroOiKgi5tYXAoKGRhdGEsIHNzaWQpID0+IHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGRhdGEsICdhJiZUZXh0JyksXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IHBkKGRhdGEsICdhJiZocmVmJykgKyBsYXp5LFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IOeroOiKgi5sZW5ndGggPiAzID8gJ3RleHRfNCcgOiAndGV4dF8yJyxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBNWV9VUkwgKyBcXFwiX+mAiembhlxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoTVlfVVJMICsgXFxcIl/pgInpm4ZcXFwiKTtcXG4gICAgICAgICAgICBhZGR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ino+aekCpcIixcInBhdGhcIjpcImpzXCIsXCJydWxlXCI6XCJ2YXIg5ryr55S76Kej5p6QID0gJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgdmFyIHVybCA9IGlucHV0LnJlcGxhY2UoJ20nLCd3d3cnKTtcXG4gICAgICAgICAgICBldmFsKHBkZmgoZmV0Y2hQQyh1cmwpLCBcXFwiYm9keSYmc2NyaXB0JiZIdG1sXFxcIikpO1xcbiAgICAgICAgICAgIHZhciBwaWNzID0gW107XFxuICAgICAgICAgICAgaWYgKGNoYXB0ZXJJbWFnZXMubGVuZ3RoID4gMSkge1xcbiAgICAgICAgICAgICAgICBjaGFwdGVySW1hZ2VzLmZvckVhY2goaW1nID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHBpY3MucHVzaChpbWcrJ0BSZWZlcmVyPScrdXJsKVxcbiAgICAgICAgICAgICAgICB9KX0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IHJlcXVlc3QoaW5wdXQpO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGxpc3QgPSBwZGZhKGh0bWwsICdib2R5JiYuc2Nyb2xsLWl0ZW0nKTtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBmaXJzdCA9IHBkZmEoaHRtbCwgJ2JvZHkmJiNpbWFnZScpO1xcbiAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGZpcnN0LmNvbmNhdChsaXN0KTtcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QuZm9yRWFjaChpbWcgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaWNzLnB1c2gocGRmaChpbWcsICdpbWcmJmRhdGEtc3JjfHxzcmMnKSsnQFJlZmVyZXI9JytpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJwaWNzOi8vXFxcIiArIHBpY3Muam9pbihcXF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gICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn5pu05paw6K+m5oOFIDxzbWFsbD48c21hbGw+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiMxOUI4OURcXFwiPuaUtui1tz48L3NwYW4+PC9zbWFsbD48L3NtYWxsPidcXG4gICAgICAgICAgICB9KVxcblxcbiAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IDE0LFxcbiAgICAgICAgICAgICAgICAgICAgbGluZVNwYWNpbmc6IDMsXFxuICAgICAgICAgICAgICAgICAgICBpZDogZGVjaWRcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICc8c3BhbiBzdHlsZT1cXFwiY29sb3I6IzgwODA4MFxcXCI+JyArIGRlc19kZXNjICsgJzwvc3Bhbj4nXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHB1dE15VmFyKFxcXCJqanNcXFwiLCBcXFwi5pS26LW3XFxcIik7XFxuXFxuICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBpZDogamppZFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+abtOaWsOivpuaDhTxzbWFsbD48c21hbGw+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiMxOUI4OURcXFwiPuWxleW8gD48L3NwYW4+PC9zbWFsbD48L3NtYWxsPidcXG4gICAgICAgICAgICB9KVxcblxcbiAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgdGV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c57SiKG9iaikge1xcbiAgICB2YXIgZCA9IFtdO1xcbiAgICBpZiAoJC50eXBlKG9iaikgPT0gXFxcInN0cmluZ1xcXCIpIHtcXG4gICAgICAgIG9iaiA9IGNvbnZlcnQxKG9iailcXG4gICAgfVxcbiAgICBpZiAob2JqLuinhOWImSkge1xcbiAgICAgICAgbGV0IGMgPSBjb252ZXJ0MShvYmou6KeE5YiZKVxcbiAgICAgICAgbWVyZ2UoYywgb2JqKVxcbiAgICB9XFxuICAgIGxldCBhcnIgPSBwZGZhKGdldFJlc0NvZGUoKSwgb2JqLuWIl+ihqCk7XFxuICAgICAgIGlmIChvYmou5YiX6KGo5aSE55CGICE9IG51bGwpIHtcXG4gICAgICAgICAgICBhcnIgPSBvYmou6ZO+5o6l5aSE55CGKGFycilcXG4gICAgICAgIH1cXG4gICAgZm9yIChsZXQgaXQgb2YgYXJyKSB7XFxuICAgICAgICBsZXQgdXJsID0gcGQoaXQsIG9iai7pk77mjqUpXFxuICAgICAgICBpZiAob2JqLumTvuaOpeWkhOeQhiAhPSBudWxsKSB7XFxuICAgICAgICAgICAgdXJsID0gb2JqLumTvuaOpeWkhOeQhih1cmwpXFxuICAgICAgICB9XFxuICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0LCBvYmou5qCH6aKYKVxcbiAgICAgICAgaWYgKG9iai7moIfpopjlpITnkIYgIT0gbnVsbCkge1xcbiAgICAgICAgICAgIHRpdGxlID0gb2JqLuagh+mimOWkhOeQhih0aXRsZSlcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCBwaWMgPSBwZChpdCwgb2JqLuWbvueJhylcXG4gICAgICAgIGlmIChvYmou5Zu+54mH5aSE55CGICE9IG51bGwpIHtcXG4gICAgICAgICAgICBwaWMgPSBvYmou5Zu+54mH5aSE55CGKHBpYylcXG4gICAgICAgIH1cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IG9iai7moIfpopggPyBwZGZoKGl0LCBvYmou5qCH6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aXJlbGlzdFtpXSArICdEcmVhbU96Ty9KTS9tYWluL0pNJywge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhTdGF0dXNDb2RlOiB0cnVlXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKEpTT04ucGFyc2UocmVzKS5zdGF0dXNDb2RlID09IDIwMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmaWxlRXhpc3QodXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGVGaWxlKHVybClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZURvd25sb2FkKHJlcXVpcmVsaXN0W2ldICsgJ0RyZWFtT3pPL0pNL21haW4vSk0nLHVybClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlRG93bmxvYWQocmVxdWlyZWxpc3RbaV0gKyAnRHJlYW1Pek8vSk0vbWFpbi9KTScsdXJsKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge31cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXG4gICAgICAgICAgICBiYWNrKGZhbHNlKVxcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7Lmm7TmlrAnXFxuICAgICAgICB9LCB1cmwpLFxcbiAgICAgICAgaW1nOiAnaGlrZXI6Ly9pbWFnZXMvaWNvbjQnLFxcbiAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInXFxuICAgIH1dLFxcbiAgICB1cGRhdGVJbnRlcnZhbCA9IHJlYWRGaWx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xlQ3VzdG9tID8gJ+KdjCcgOiAn4q2VJykuc21hbGwoKSxcXG4gICAgdXJsOiAkKFsoZGlzYWJsZUN1c3RvbSA/ICflkK/nlKgnIDogJ+emgeeUqCcpICsgJ+WQiOmbhuiHquWumuS5iScsICfmuIXpmaToh6rlrprkuYnmlbDmja4nLCAn57yW6L6RSlNPTiddLCAxKS5zZWxlY3QoKCkgPT4ge1xcbiAgICAgICAgc3dpdGNoIChpbnB1dC5zbGljZSgwLCAyKSkge1xcbiAgICAgICAgICAgIGNhc2UgJ+a4hemZpCc6XFxuICAgICAgICAgICAgICAgIGRlbGV0ZUZpbGUoJ2N1c3RvbURhdGEnKVxcbiAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgIGNhc2UgJ+WQr+eUqCc6XFxuICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdkaXNhYmxlQ3VzdG9tJywgJycpXFxuICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgY2FzZSAn56aB55SoJzpcXG4gICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2Rpc2FibGVDdXN0b20nLCAnVCcpXFxuICAgICAgICAgICAgICAgIGlucHV0ICs9ICdcXFxcbuWwj+eoi+W6j+WQr+eUqC/npoHnlKjjgIHph43mlrDmjpLluo/nrYnmk43kvZzlnYfkuI3kvJrkvZPnjrDlnKjpppbpobXlsI/nqIvluo/liJfooajkuK0nXFxuICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgY2FzZSAn57yW6L6RJzpcXG4gICAgICAgICAgICAgICAgbGV0IHVybCA9IGdldE15VmFyKCdyZW1vdGVVcmwnKVxcbiAgICAgICAgICAgICAgICBpZiAoIXVybC5zdGFydHNXaXRoKCdoaWtlcjovL2ZpbGVzLycpICYmICF1cmwuc3RhcnRzV2l0aCgnZmlsZTovLycpKVxcbiAgICAgICAgICAgICAgICAgICAgdXJsID0gJ2hpa2VyOi8vZmlsZXMvbGlicy8nICsgbWQ1KHV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ICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgaSlcXG4gICAgICAgICAgICBicmVha1xcbiAgICAgICAgY2FzZSAn6YeN5paw5o6S5bqPJzpcXG4gICAgICAgICAgICBsZXQgc29ydEZsYWcgPSBwYXJzZUludChnZXRNeVZhcignc29ydEZsYWcnLCAnLTEnKSlcXG4gICAgICAgICAgICBkLnRpdGxlID0gKHNvcnRGbGFnID09IGkgPyAn8J+UgyAgJyA6ICcnKSArIGQudGl0bGVcXG4gICAgICAgICAgICBpZiAoc29ydEZsYWcgPT0gLTEpXFxuICAgICAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgaS50b1N0cmluZygpKVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6YCJ5oup6KaB56e75Yqo5Yiw55qE5L2N572uJ1xcbiAgICAgICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgIGVsc2VcXG4gICAgICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChvbGRJbmRleCwgbmV3SW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKVxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXMuc3BsaWNlKG5ld0luZGV4LCAwLCBydWxlcy5zcGxpY2Uob2xkSW5kZXgsIDEpWzBdKVxcbiAgICAgICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2N1c3RvbURhdGEnLCBKU09OLnN0cmluZ2lmeShydWxlcykpXFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCAnLTEnKVxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgIH0sIHNvcnRGbGFnLCBpKVxcbiAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICBjYXNlICfmm7TmlLnlm77moIcnOlxcbiAgICAgICAgICAgIGQudXJsID0gJCh2Lmljb24gfHwgJycsICfovpPlhaXmlrDlm77moIflnLDlnYDmiJbpopzoibLku6PnoIHvvJonKS5pbnB1dCgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdjdXN0b21EYXRhJykgfHwgJ1tdJylcXG4gICAgICAgICAgICAgICAgaWYgKGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgcnVsZXNbaV0uaWNvbiA9IGlucHV0XFxuICAgICAgICAgICAgICAgIGVsc2VcXG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBydWxlc1tpXS5pY29uXFxuICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdjdXN0b21EYXRhJywgSlNPTi5zdHJpbmdpZnkocnVsZXMpKVxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgIGNhc2UgJ+WvvOWFpea1t+mYlCc6XFxuICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBkYXRhID0gJC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvZGF0YUxvYWQ/cnVsZT0nICsgZ2V0TXlWYXIoJ215Q29sbG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gYXJyLmZvckVhY2goKHYpID0+IHtcXFxcbiAgICAgICAgICAgIGxldCB7IGlkLCBjbGFzc19uYW1lLCBjbGFzc191cmwgfSA9IHYsXFxcXG4gICAgICAgICAgICBzZWxlY3RlZCA9IEpTT04uc3RyaW5naWZ5KHRoaXMuZ2V0Q2xhc3MoaWQpKVxcXFxuICAgICAgICAgICAgY2xhc3NfbmFtZS5mb3JFYWNoKChuYW1lLCBpKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHVybCA9IGNsYXNzX3VybFtpXSxcXFxcbiAgICAgICAgICAgICAgICAgICAgbm93ID0gSlNPTi5zdHJpbmdpZnkoeyBuYW1lOiBuYW1lLCB1cmw6IHVybCB9KVxcXFxuICAgICAgICAgICAgICAgIGVsLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogc2VsZWN0ZWQgPT0gbm93ID8gJ+KAnOKAnOKAneKAnScgKyBuYW1lLmZvbnRjb2xvcih0aGlzLmNvbG9yKS5ib2xkKCkgOiBuYW1lLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IHNlbGVjdGVkID09IG5vdyA/ICdoaWtlcjovL2VtcHR5JyA6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHNpZ24sIGlkLCBub3cpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihzaWduICsgaWQsIG5vdylcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcXFxuICAgICAgICAgICAgICAgICAgICB9LCB0aGlzLnNpZ24sIGlkLCBub3cpLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxcXG4gICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICB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FxcXFxcIikuY29uZmlybSgodXJsKSA9PiB7XFxcXG4gICAgICAgICAgICAvL+i/nOeoi+S+nei1lue0ouW8leaWh+S7tuS7o+eQhuWcsOWdgOWIl+ihqFxcXFxuICAgICAgICAgICAgbGV0IHJlcXVpcmVsaXN0ID0gWydodHRwczovL3Jhdy5pcWlxLmlvLycsICdodHRwczovL2docHJveHkubmV0L2h0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS8nLCAnaHR0cHM6Ly9naHByb3h5LmNvbS9odHRwczovL3Jhdy5naXRodWJ1c2VyY29udGVudC5jb20vJywgJ2h0dHBzOi8vY2RuLnN0YXRpY2FseS5jb20vZ2gvJywgJ2h0dHBzOi8vZ2l0aHViLmpldm9ucy52aXAvaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tLyddXFxcXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHJlcXVpcmVsaXN0Lmxlbmd0aDsgaSsrKSB7XFxcXG4gICAgICAgICAgICAgICAgdHJ5IHsgLy/ov5znqIvkvp3otZbntKLlvJVcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJlcyA9IHJlcXVlc3QocmVxdWlyZWxpc3RbaV0gKyAnRHJlYW1Pek8vSk0vbWFpbi9KTScsIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhTdGF0dXNDb2RlOiB0cnVlXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgIGlmIChKU09OLnBhcnNlKHJlcykuc3RhdHVzQ29kZSA9PSAyMDApIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmaWxlRXhpc3QodXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZUZpbGUodXJsKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmVEb3dubG9hZChyZXF1aXJlbGlzdFtpXSArICdEcmVhbU96Ty9KTS9tYWluL0pNJyx1cmwpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZURvd25sb2FkKHJlcXVpcmVsaXN0W2ldICsgJ0RyZWFtT3pPL0pNL21haW4vSk0nLHVybClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVha1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge31cXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxcXG4gICAgICAgICAgICBiYWNrKGZhbHNlKVxcXFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suabtOaWsCdcXFxcbiAgICAgICAgfSwgdXJsKSxcXFxcbiAgICAgICAgaW1nOiAnaGlrZXI6Ly9pbWFnZXMvaWNvbjQnLFxcXFxuICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcidcXFxcbiAgICB9XSxcXFxcbiAgICB1cGRhdGVJbnRlcnZhbCA9IHJlYWRGaWxlKCd1cGRhdGVJbnRlcnZhbCcpIHx8ICcxJyxcXFxcbiAgICBuZXdXaW5kb3cgPSByZWFkRmlsZSgnbmV3V2luZG93JyksXFxcXG4gICAgdGFiRm9sZCA9IHJlYWRGaWxlKCd0YWJGb2xkJyksXFxcXG4gICAgZGlzYWJsZUN1c3RvbSA9IHJlYWRGaWxlKCdkaXNhYmxlQ3VzdG9tJyksXFxcXG4gICAgZWRpdE1vZGUgPSBkaXNhYmxlQ3VzdG9tID8gJ+WvvOWFpea1t+mYlCcgOiBnZXRNeVZhcignZWRpdE1vZGUnLCAn5ZCv55SoL+emgeeUqCcpXFxcXG5cXFxcbm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bSA/ICflkK/nlKgnIDogJ+emgeeUqCcpICsgJ+WQiOmbhuiHquWumuS5iScsICfmuIXpmaToh6rlrprkuYnmlbDmja4nLCAn57yW6L6RSlNPTiddLCAxKS5zZWxlY3QoKCkgPT4ge1xcXFxuICAgICAgICBzd2l0Y2ggKGlucHV0LnNsaWNlKDAsIDIpKSB7XFxcXG4gICAgICAgICAgICBjYXNlICfmuIXpmaQnOlxcXFxuICAgICAgICAgICAgICAgIGRlbGV0ZUZpbGUoJ2N1c3RvbURhdGEnKVxcXFxuICAgICAgICAgICAgICAgIGJyZWFrXFxcXG4gICAgICAgICAgICBjYXNlICflkK/nlKgnOlxcXFxuICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdkaXNhYmxlQ3VzdG9tJywgJycpXFxcXG4gICAgICAgICAgICAgICAgYnJlYWtcXFxcbiAgICAgICAgICAgIGNhc2UgJ+emgeeUqCc6XFxcXG4gICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2Rpc2FibGVDdXN0b20nLCAnVCcpXFxcXG4gICAgICAgICAgICAgICAgaW5wdXQgKz0gJ1xcXFxcXFxcbuWwj+eoi+W6j+WQr+eUqC/npoHnlKjjgIHph43mlrDmjpLluo/nrYnmk43kvZzlnYfkuI3kvJrkvZPnjrDlnKjpppbpobXlsI/nqIvluo/liJfooajkuK0nXFxcXG4gICAgICAgICAgICAgICAgYnJlYWtcXFxcbiAgICAgICAgICAgIGNhc2UgJ+e8lui+kSc6XFxcXG4gICAgICAgICAgICAgICAgbGV0IHVybCA9IGdldE15VmFyKCdyZW1vdGVVcmwnKVxcXFxuICAgICAgICAgICAgICAgIGlmICghdXJsLnN0YXJ0c1dpdGgoJ2hpa2VyOi8vZmlsZXMvJykgJiYgIXVybC5zdGFydHNXaXRoKCdmaWxlOi8vJykpXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybCA9ICdoaWtlcjovL2ZpbGVzL2xpYnMvJyArIG1kNSh1cmwpICsgJy5qcydcXFxcbiAgICAgICAg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gICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcXFxuICAgICAgICAgICAgfSwgaSlcXFxcbiAgICAgICAgICAgIGJyZWFrXFxcXG4gICAgICAgIGNhc2UgJ+mHjeaWsOaOkuW6jyc6XFxcXG4gICAgICAgICAgICBsZXQgc29ydEZsYWcgPSBwYXJzZUludChnZXRNeVZhcignc29ydEZsYWcnLCAnLTEnKSlcXFxcbiAgICAgICAgICAgIGQudGl0bGUgPSAoc29ydEZsYWcgPT0gaSA/ICfwn5SDICAnIDogJycpICsgZC50aXRsZVxcXFxuICAgICAgICAgICAgaWYgKHNvcnRGbGFnID09IC0xKVxcXFxuICAgICAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCBpLnRvU3RyaW5nKCkpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6YCJ5oup6KaB56e75Yqo5Yiw55qE5L2N572uJ1xcXFxuICAgICAgICAgICAgICAgIH0sIGkpXFxcXG4gICAgICAgICAgICBlbHNlXFxcXG4gICAgICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChvbGRJbmRleCwgbmV3SW5kZXgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzLnNwbGljZShuZXdJbmRleCwgMCwgcnVsZXMuc3BsaWNlKG9sZEluZGV4LCAxKVswXSlcXFxcbiAgICAgICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2N1c3RvbURhdGEnLCBKU09OLnN0cmluZ2lmeShydWxlcykpXFxcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzb3J0RmxhZycsICctMScpXFxcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxcXG4gICAgICAgICAgICAgICAgfSwgc29ydEZsYWcsIGkpXFxcXG4gICAgICAgICAgICBicmVha1xcXFxuICAgICAgICBjYXNlICfmm7TmlLnlm77moIcnOlxcXFxuICAgICAgICAgICAgZC51cmwgPSAkKHYuaWNvbiB8fCAnJywgJ+i+k+WFpeaWsOWbvuagh+WcsOWdgOaIluminOiJsuS7o+egge+8micpLmlucHV0KChpKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpXFxcXG4gICAgICAgICAgICAgICAgaWYgKGlucHV0KVxcXFxuICAgICAgICAgICAgICAgICAgICBydWxlc1tpXS5pY29uID0gaW5wdXRcXFxcbiAgICAgICAgICAgICAgICBlbHNlXFxcXG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSBydWxlc1tpXS5pY29uXFxcXG4gICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2N1c3RvbURhdGEnLCBKU09OLnN0cmluZ2lmeShydWxlcykpXFxcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcXFxuICAgICAgICAgICAgfSwgaSlcXFxcbiAgICAgICAgICAgIGJyZWFrXFxcXG4gICAgICAgIGNhc2UgJ+WvvOWFpea1t+mYlCc6XFxcXG4gICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF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3J1bGU9JyArIFFJTkdfVElUTEUpLFxcXFxuICAgICAgICBbXywgZmluZFJ1bGUsIGRldGFpbEZpbmRSdWxlXSA9IE1ZX1JVTEUuZmluZF9ydWxlLm1hdGNoKC9eKFtcXFxcXFxcXHNcXFxcXFxcXFNdKj8pKD86PT0+KFtcXFxcXFxcXHNcXFxcXFxcXFNdKikpPyQvKVxcXFxuICAgIGZpbmRSdWxlID0gZmluZFJ1bGUuc3BsaXQoJzsnKVxcXFxuICAgIHBhcnNlRG9tRm9yQXJyYXkoZ2V0UmVzQ29kZSgpLCBmaW5kUnVsZS5zaGlmdCgpKS5mb3JFYWNoKChkYXRhKSA9PiB7XFxcXG4gICAgICAgIGxldCBbdGl0bGUsIGltZywgZGVzYywgdXJsXSA9IGZpbmRSdWxlLm1hcCgodiwgaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmICh2ID09ICcqJykgcmV0dXJuICcnXFxcXG4gICAgICAgICAgICAgICAgICAgIGVsc2UgdiA9IChpID09IDEgfHwgaSA9PSAzKSA/XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZURvbShkYXRhLCB2KSA6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZURvbUZvckh0bWwoZGF0YSwgdilcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGkgIT0gMykgdiA9IHJ1bkNvZGUodilcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZcXFxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7IHJldHVybiAnJyB9XFxcXG4gICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgIHJlcyA9IHtcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsIHVybDogdXJsLFxcXFxuICAgICAgICAgICAgICAgIGRlc2M6IGRlc2MsIGltZzogaW1nLFxcXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBNWV9SVUxFLmNvbF90eXBlXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIGlmIChyZXMudXJsKSB7XFxcXG4gICAgICAgICAgICBpZiAocmVzLnVybC5pbmNsdWRlcygnQGxhenlSdWxlPScpKSB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHJlSW5kZXggPSByZXMudXJsLmluZGV4T2YoJy5qczonKVxcXFxuICAgICAgICAgICAgICAgIGlmIChyZUluZGV4ID49IDApIHJlcy51cmwgPSByZXMudXJsLnNsaWNlKDAsIHJlSW5kZXgpICsgJy5qczonICsgaGlqYWNrTGF6eVJ1bGUgKyAnOycgKyByZXMudXJsLnNsaWNlKHJlSW5kZXggKyA0KVxcXFxuICAgICAgICAgICAgfSBlbHNlICBpZiAoZGV0YWlsRmluZFJ1bGUpIHtcXFxcbiAgICAgICAgICAgICAgICByZXMuZXh0cmEgPSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogZ2VuRXhVcmwodXJsKSxcXFxcbiAgICAgICAgICAgICAgICAgICAgUlVMRTogYmFzZTY0RW5jb2RlKEpTT04uc3RyaW5naWZ5KE9iamVjdC5hc3NpZ24oZ2VuTXlSdWxlKCksIHsgZGV0YWlsX2ZpbmRfcnVsZTogZGV0YWlsRmluZFJ1bGUgfSkpKSxcXFxcbiAgICAgICAgICAgICAgICAgICAgcGFnZVRpdGxlOiBpc0luZGV4ICYmIHRpdGxlXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIHJlcy51cmwgPSAnaGlrZXI6Ly9wYWdlL2ZyYW1lTG9hZD9ydWxlPScgKyBRSU5HX1RJVExFXFxcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKE1ZX1JVTEUuZGV0YWlsX2ZpbmRfcnVsZSkge1xcXFxuICAgICAgICAgICAgICAgIHJlcy5leHRyYSA9IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBnZW5FeFVybCh1cmwpLFxcXFxuICAgICAgICAg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iaHR0cHM6Ly9sYW5tZWlndW9qaWFuZy5jb20vdHViaWFvL21vcmUvMTk3LnBuZ1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgdXJsOiAkKFxcXFxcXFwiI25vTG9hZGluZyNcXFxcXFxcIikubGF6eVJ1bGUoKGpqaWQsIGRlY2lkLCBkZXNfZGVzYykgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGlmIChnZXRNeVZhcihcXFxcXFxcImpqc1xcXFxcXFwiLCBcXFxcXFxcIuaUtui1t1xcXFxcXFwiKSA9PSBcXFxcXFxcIuaUtui1t1xcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXFxcXFwiampzXFxcXFxcXCIsIFxcXFxcXFwi5bGV5byAXFxcXFxcXCIpO1xcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogamppZFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn566A5LuLIDxzbWFsbD48c21hbGw+PHNwYW4gc3R5bGU9XFxcXFxcXCJjb2xvcjojMTlCODlEXFxcXFxcXCI+5pS26LW3Pjwvc3Bhbj48L3NtYWxsPjwvc21hbGw+J1xcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogMTQsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZVNwYWNpbmc6IDMsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IGRlY2lkXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICc8c3BhbiBzdHlsZT1cXFxcXFxcImNvbG9yOiM4MDgwODBcXFxcXFxcIj4nICsgZGVzX2Rlc2MgKyAnLi4uPC9zcGFuPidcXFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcXFxcXCJqanNcXFxcXFxcIiwgXFxcXFxcXCLmlLbotbdcXFxcXFxcIik7XFxcXG5cXFxcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBqamlkXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfnroDku4sgPHNtYWxsPjxzbWFsbD48c3BhbiBzdHlsZT1cXFxcXFxcImNvbG9yOiMxOUI4OURcXFxcXFxcIj7lsZXlvIA+PC9zcGFuPjwvc21hbGw+PC9zbWFsbD4nXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxcXG5cXFxcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHRTaXplOiAxNCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5lU3BhY2luZzogMyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogZGVjaWRcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0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bmUwVGl0bGUpID09PSBsaW5lVGl0bGUgPyBcXFxcXFxcIuWIh+aNojrigJjigJhcXFxcXFxcIiArIGxpbmVUaXRsZSArIFxcXFxcXFwiXFxcXFxcXCIgOiBsaW5lVGl0bGUgKyBcXFxcXFxcIuKAmOKAmDrliIfmjaJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgodmFyS2V5LCBsaW5lSW5kZXgsIGxpbmVUaXRsZSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcih2YXJLZXksIGxpbmVJbmRleC50b1N0cmluZygpKVxcXFxuICAgICAgICAgICAgICAgICAgICAvLyBsb2coTVlfUlVMRS51cmwpXFxcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKChNWV9SVUxFLnRpdGxlICsgJyNsaW5lLXRpdGxlJyksIGxpbmVUaXRsZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgbG9nKE1ZX1JVTEUudGl0bGUgKyBnZXRNeVZhcigoTVlfUlVMRS50aXRsZSArICcjbGluZS10aXRsZScpKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKVxcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL+W3suWIh+aNouiHs1xcXFxcXFwiICsgbGluZVRpdGxlXFxcXG4gICAgICAgICAgICAgICAgfSwgdmFyS2V5LCBpLCBsaW5lVGl0bGUpLFxcXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nXFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgfSBjYXRjaCAoZSkge31cXFxcbiAgICB9XFxcXG4gICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxcXG4gICAgICAgICAgICB9KTtcXFxcbn1cXFwifSx7XFxcImNvbF90eXBlXFxcIjpcXFwibW92aWV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29yaWVzID0gcGRmYShjYXRlZ29yeSwg5bCP57G75a6a5L2NKTtcXFxcbiAgICAgICAgaWYgKGluZGV4ID09PSAwKSB7XFxcXG4gICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0ZW0sIOWIhuexu+agh+mimClcXFxcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mKOaOkumZpCkgIT0gJ3VuZGVmaW5lZCcgJiYg5o6S6ZmkICE9ICcnKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlID0gdGl0bGUucmVwbGFjZShuZXcgUmVnRXhwKOaOkumZpCwgXFxcXFxcXCJnXFxcXFxcXCIpLCBcXFxcXFxcIlxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyBcXFxcXFxcIuKAnOKAnOKAneKAnVxcXFxcXFwiICsgdGl0bGUuZm9udGNvbG9yKOWIhuexu+minOiJsikgOiB0aXRsZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHBkKGl0ZW0sIOWIhuexu+mTvuaOpSkgKyAnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3X2NhdGUgPSBbXVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcC5mb3JFYWNoKChjYXRlLCBpbmRleCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19jYXRlLnB1c2goaW5kZXggPT09IDAgPyBwYXJhbXMua2V5LnRvU3RyaW5nKCkgOiBcXFxcXFxcIjBcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihNWV9SVUxFLnRpdGxlLCBKU09OLnN0cmluZ2lmeShuZXdfY2F0ZSkpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihNWV9SVUxFLnVybCwgaW5wdXQpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiBwYWdlLFxcXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXFxcbiAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiYmxhbmtfYmxvY2tcXFxcXFxcIlxcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgIH0gZWxzZSBpZiAoZm9sZCA9PT0gJzEnKSB7XFxcXG4gICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0ZW0sIOWIhuexu+agh+mimClcXFxcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mKOaOkumZpCkgIT0gJ3VuZGVmaW5lZCcgJiYg5o6S6ZmkICE9ICcnKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlID0gdGl0bGUucmVwbGFjZShuZXcgUmVnRXhwKOaOkumZpCwgXFxcXFxcXCJnXFxcXFxcXCIpLCBcXFxcXFxcIlxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LnRvU3RyaW5nKCkgPT09IGNhdGVfdGVtcFtpbmRleF0gPyBcXFxcXFxcIuKAnOKAnOKAneKAnVxcXFxcXFwiICsgdGl0bGUuZm9udGNvbG9yKOWIhuexu+minOiJsikgOiB0aXRsZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKHBkKGl0ZW0sIOWIhuexu+mTvuaOpSkgKyAnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoTVlfUlVMRS50aXRsZSwgSlNPTi5zdHJpbmdpZnkocGFyYW1zLmNhdGVfdGVtcCkpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihNWV9SVUxFLnVybCwgaW5wdXQpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcXFxuICAgICAgICAgICAg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AobGV0IGkgPSAwOyBpIDwga2V5cy5sZW5ndGg7IGkrKykge1xcXFxuICAgICAgICAgICAgICAgICAgICBjb25zdCBrZXkgPSBrZXlzW2ldXFxcXG4gICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1Gb2xkTGF5b3V0XVtrZXldID0gbGF5b3V0W2tleV07XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcXFxcXCLor7fkvKDlhaXmraPnoa7nmoTmipjlj6DnlYzpnaLlhYPntKDvvIFcXFxcXFxcIilcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIC8vIGluamVjdEluZGV4IOaKmOWPoOaMiemSruaPkuWFpeesrCBpbmplY3RJbmRleCDooYxcXFxcbiAgICAgICAgICAgIGlmIChpbmplY3RJbmRleCkge1xcXFxuICAgICAgICAgICAgICAgIGlmICghKHR5cGVvZiAoaW5qZWN0SW5kZXgpID09PSAnbnVtYmVyJykpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXFxcXFwi5oqY5Y+g5oyJ6ZKu5o+S5YWl6KGM6K+35Lyg5YWl5pWw5a2X77yBXFxcXFxcXCIpXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIGlmIChpbmplY3RJbmRleCA8IDEpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxcXFxcXFwi5oqY5Y+g5oyJ6ZKu5o+S5YWl6KGM6K+35Lyg5YWl5aSn5LqOIDAg55qE5pW05pWw77yBXFxcXFxcXCIpXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIGlmIChpbmplY3RJbmRleCA+IHRoaXNbc3ltYm9sTWFwLm1Gb2xkSW5kZXhdKSB7XFxcXG4gICAgICAgIC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b2YgdXJsUnVsZSA9PT0gJ29iamVjdCcpIHtcXFxcbiAgICAgICAgICAgIGxldCBtVXJsUnVsZSA9IHVybFJ1bGUucnVsZSB8fCB1cmxSdWxlWyfop6PmnpDop4TliJknXSB8fCAnYSYmaHJlZic7XFxcXG4gICAgICAgICAgICBpZiAobVVybFJ1bGUuc3RhcnRzV2l0aChcXFxcXFxcIkBqczpcXFxcXFxcIikpIHtcXFxcbiAgICAgICAgICAgICAgICB1cmwgPSB0aGlzLmV2YWxKU1J1bGUoc3JjLCBtVXJsUnVsZSk7XFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIGxldCBwYXJzZSA9IHBhcnNlRG9tO1xcXFxuICAgICAgICAgICAgICAgIGlmICh1cmxSdWxlLnBhcnNlT3B0aW9uKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAodXJsUnVsZS5wYXJzZU9wdGlvbikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFxcXFxcInBhcnNlRG9tXFxcXFxcXCI6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXFxcXFwicGRcXFxcXFxcIjpcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFxcXFxcInBhcnNlRG9tRm9ySHRtbFxcXFxcXFwiOlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFxcXFxcInBkZmhcXFxcXFxcIjpcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJzZSA9IHBhcnNlRG9tRm9ySHRtbDtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodXJsUnVsZVtcXFxcXFxcIuino+aekOaWueazlVxcXFxcXFwiXSkge1xcXFxuICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKHVybFJ1bGVbXFxcXFxcXCLop6PmnpDmlrnms5VcXFxcXFxcIl0pIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcXFxcXCJwYXJzZURvbVxcXFxcXFwiOlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFxcXFxcInBkXFxcXFxcXCI6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcXFxcXCJwYXJzZURvbUZvckh0bWxcXFxcXFxcIjpcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcXFxcXCJwZGZoXFxcXFxcXCI6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyc2UgPSBwYXJzZURvbUZvckh0bWw7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlID0gcGFyc2VEb207XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgdXJsID0gcGFyc2Uoc3JjLCBtVXJsUnVsZSk7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICBpZiAodXJsUnVsZS5kZWFsVXJsKSB7XFxcXG4gICAgICAgICA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gcnVsZU9ialtcXFxcXFxcIuWIhuexu+agh+mimFxcXFxcXFwiXSxcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsUnVsZTogcnVsZU9iai51cmxSdWxlIHx8IHJ1bGVPYmpbXFxcXFxcXCLliIbnsbvpk77mjqVcXFxcXFxcIl0sXFxcXG4gICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICB9KVxcXFxuXFxcXG4gICAgICAgIC8vIGxvZygkLnN0cmluZ2lmeShjYXRlZ29yaWVzKSlcXFxcblxcXFxuICAgICAgICBsZXQgaW5pdF9jYXRlID0gW11cXFxcbiAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCAyMDsgaSsrKSB7XFxcXG4gICAgICAgICAgICBpbml0X2NhdGUucHVzaChcXFxcXFxcIjBcXFxcXFxcIilcXFxcbiAgICAgICAgfVxcXFxuXFxcXG4gICAgICAgIGNvbnN0IGNhdGVfdGVtcF9qc29uID0gZ2V0TXlWYXIobVRhZyArIHRoaXMuVkFSTUFQLkNBVEVHT1JZLCBKU09OLnN0cmluZ2lmeShpbml0X2NhdGUpKVxcXFxuICAgICAgICBjb25zdCBjYXRlX3RlbXAgPSBKU09OLnBhcnNlKGNhdGVfdGVtcF9qc29uKVxcXFxuXFxcXG4gICAgICAgIGlmICh0aGlzW3N5bWJvbE1hcC5tUGFnZV0gPT09IDEpIHtcXFxcblxcXFxuICAgICAgICAgICAgY2F0ZWdvcmllcy5mb3JFYWNoKChjYXRlZ29yeSwgaW5kZXgpID0+IHtcXFxcblxcXFxuICAgICAgICAgICAgICAgIC8vIOaKmOWPoCBVSVxcXFxuICAgICAgICAgICAgICAgIGlmICh0aGlzW3N5bWJvbE1hcC5tRm9sZElubmVyRW5hYmxlXSAmJiB0aGlzW3N5bWJvbE1hcC5tRm9sZExheW91dF0uaW5qZWN0SW5kZXggPT09IChpbmRleCsxKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICBsZXQgZm9sZEx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xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gdGhpcy5nZXRUaXRsZShpdGVtLCBjYXRlZ29yeSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSB0aGlzLmdldFVybChpdGVtLCBjYXRlZ29yeSlcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpc1tzeW1ib2xNYXAubUxheW91dF0ucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGtleS50b1N0cmluZygpID09PSBjYXRlX3RlbXBbaW5kZXhdID8gJ+KAnOKAnOKAneKAnTxiPjxmb250IGNvbG9yPScgKyB0aGlzW3N5bWJvbE1hcC5tQ29sb3JdICsgJz4nICsgdGl0bGUgKyAnIDwvZm9udD48L2I+JyA6IHRpdGxlLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCh1cmwpLmxhenlSdWxlKChwYXJhbXMpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5ld19jYXRlID0gW11cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBhcmFtcy5pbmRleCA9PT0gMCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcC5mb3JFYWNoKChjYXRlLCBpbmRleCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19jYXRlLnB1c2goaW5kZXggPT09IDAgPyBwYXJhbXMua2V5LnRvU3RyaW5nKCkgOiBcXFxcXFxcIjBcXFxcXFxcIilcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcFtwYXJhbXMuaW5kZXhdID0gcGFyYW1zLmtleS50b1N0cmluZygpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIocGFyYW1zLnRhZyArIHBhcmFtcy5WQVJNQVAuQ0FURUdPUlksIEpTT04uc3RyaW5naWZ5KHBhcmFtcy5pbmRleCA9PT0gMCA/IG5ld19jYXRlIDogcGFyYW1zLmNhdGVfdGVtcCkpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy50YWcgKyBwYXJhbXMuVkFSTUFQLlVSTCwgaW5wdXQpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OiBpbmRleCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVkFSTUFQOiB0aGlzLlZBUk1BUCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFnOiBtVGFnLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogdGhpc1tzeW1ib2xNYXAubVBhZ2VdLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgICAgICB0aGlzW3N5bWJvbE1hcC5tTGF5b3V0XS5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImJsYW5rX2Jsb2NrXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0aGlzW3N5bWJvbE1hcC5tRm9sZF0gPT09ICcwJykge1xcXFxuICAgICAgICAgICAgICAgICAgICBzdWJfY2F0ZWdvcmllcy5mb3JFYWNoKChpdGVtLCBrZXkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0aXRsZSA9IHRoaXMuZ2V0VGl0bGUoaXRlbSwgY2F0ZWdvcnkpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gdGhpcy5nZXRVcmwoaXRlbSwgY2F0ZWdvcnkpXFxcXG5cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1MYXlvdXRdLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBrZXkudG9TdHJpbmcoKSA9PT0gY2F0ZV90ZW1wW2luZGV4XSA/ICfigJzigJzigJ3igJ08Yj48Zm9udCBjb2xvcj0nICsgdGhpc1tzeW1ib2xNYXAubUNvbG9yXSArICc+JyArIHRpdGxlICsgJyA8L2ZvbnQ+PC9iPicgOiB0aXRsZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQodXJsKS5sYXp5UnVsZSgocGFyYW1zKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcy5jYXRlX3RlbXBbcGFyYW1zLmluZGV4XSA9IHBhcmFtcy5rZXkudG9TdHJpbmcoKVxcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKHBhcmFtcy50YWcgKyBwYXJhbXMuVkFSTUFQLkNBVEVHT1JZLCBKU09OLnN0cmluZ2lmeShwYXJhbXMuY2F0ZV90ZW1wKSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIocGFyYW1zLnRhZyArIHBhcmFtcy5WQVJNQVAuVVJMLCBpbnB1dClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXRlX3RlbXA6IGNhdGVfdGVtcCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6IGluZGV4LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWQVJNQVA6IHRoaXMuVkFSTUFQLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YWc6IG1UYWcsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleToga2V5LFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiB0aGlzW3N5bWJvbE1hcC5tUGFnZV0sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICAgICAgICAgIHRoaXNbc3ltYm9sTWFwLm1MYXlvdXRdLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiYmxhbmtfYmxvY2tcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgfVxcXFxuICAgIH0sXFxcXG5cXFxcbiAgICDnlYzpnaIobGF5b3V0KSB7XFxcXG4gICAgICAgIHJldHVybiB0aGlzLmxheW91dChsYXlvdXQpXFxcXG4gICAgfSxcXFxcbiAgICDliIbnsbvpk77mjqUodHJ1ZVVybCkge1xcXFxuICAgICAgICByZXR1cm4gdGhpcy50cnVlVXJsKHRydWVVcmwpO1xcXFxuICAgIH0sXFxcXG4gICAg6aG156CBKHBhZ2UpIHtcXFxcbiAgICAgICAgcmV0dXJuIHRoaXMucGFnZShwYWdlKTtcXFxcbiAgICB9LFxcXFxuICAgIOa6kOeggShodG1sKSB7XFxcXG4gICAgICAgIHJldHVybiB0aGlzLmh0bWwoaHRtbCk7XFxcXG4gICAgfSxcXFxcbiAgICDlrprkvY3kuIDnuqfliIbnsbsobGlzdCkge1xcXFxuICAgICAgICByZXR1cm4gdGhpcy5saXN0KGxpc3QpO1xcXFxuICAgIH0sXFxcXG4gICAg5a6a5L2N5a2Q5YiG57G7KHN1Ykxpc3QpIHtcXFxcbiAgICAgICAgcmV0dXJuIHRoaXMuc3ViTGlzdChzdWJMaXN0KTtcXFxcbiAgICB9LFxcXFxuICAgIOWumuS9jeWIhuexu+agh+mimCh0aXRsZSkge1xcXFxuICAgICAgICByZXR1cm4gdGhpcy50aXRsZSh0aXRsZSk7XFxcXG4gICAgfSxcXFxcbiAgICDlrprkvY3liIbnsbvpk77mjqUodXJsKSB7XFxcXG4gICAgICAgIHJldHVybiB0aGlzLnVybCh1cmwpO1xcXFxuICAgIH0sXFxcXG4gICAg5byA5ZCv5Y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AgcmV0dXJuIHRoaXM7XFxcXG4gICAgfSxcXFxcbiAgICBkZWJ1ZygpIHtcXFxcbiAgICAgICAgdGhpcy5wYXJhbXMuZGVidWcgPSB0cnVlXFxcXG4gICAgICAgIHJldHVybiB0aGlzO1xcXFxuICAgIH0sXFxcXG4gICAgZXhlYygpIHtcXFxcbiAgICAgICAgdGhpcy5jaGVja1BhcmFtcygpXFxcXG4gICAgICAgIGxldCB0cnVlX3VybCA9ICcnXFxcXG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgdGhpcy5yZWdleE1hcC5sZW5ndGg7IGkrKykge1xcXFxuICAgICAgICAgICAgbGV0IHJlZ09iaiA9IHRoaXMucmVnZXhNYXBbaV07XFxcXG4gICAgICAgICAgICBsZXQgdXJsRXhwID0gcmVnT2JqLnJlZztcXFxcbiAgICAgICAgICAgIGlmICh0eXBlb2YgdXJsRXhwID09PSAnc3RyaW5nJykge1xcXFxuICAgICAgICAgICAgICAgIHVybEV4cCA9IG5ldyBSZWdFeHAodXJsRXhwKVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgaWYgKHVybEV4cC50ZXN0KHRoaXMucGFyYW1zLnVybCkpIHtcXFxcbiAgICAgICAgICAgICAgICBpZiAodGhpcy5wYXJhbXMuZGVidWcpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgbG9nKHVybEV4cC50b1N0cmluZygpKVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB0cnVlX3VybCA9IHJlZ09iai5leGVjKCk7XFxcXG4gICAgICAgICAgICAgICAgYnJlYWs7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgaWYgKHRydWVfdXJsKSB7XFxcXG4gICAgICAgICAgICByZXR1cm4gdHJ1ZV91cmw7XFxcXG4gICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICByZXR1cm4gdGhpcy5wYXJhbXMudXJsXFxcXG4gICA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SwgdGFyZ2V0KSB7XFxcXG4gICAgbGV0IGtleXMgPSBPYmplY3Qua2V5cyhzb3VyY2UpXFxcXG4gICAgZm9yIChsZXQgaSBpbiBrZXlzKSB7XFxcXG4gICAgICAgIHRhcmdldFtrZXlzW2ldXSA9IHNvdXJjZVtrZXlzW2ldXVxcXFxuICAgIH1cXFxcbn1cXFxcblxcXFxuZnVuY3Rpb24g5LiA57qnKG9iaikge1xcXFxuICAgIHZhciBkID0gW107XFxcXG4gICAgaWYgKCQudHlwZShvYmopID09IFxcXFxcXFwic3RyaW5nXFxcXFxcXCIpIHtcXFxcbiAgICAgICAgb2JqID0gY29udmVydDEob2JqKVxcXFxuICAgIH1cXFxcbiAgICBpZiAob2JqLuinhOWImSkge1xcXFxuICAgICAgICBsZXQgYyA9IGNvbnZlcnQxKG9iai7op4TliJkpXFxcXG4gICAgICAgIG1lcmdlKGMsIG9iailcXFxcbiAgICB9XFxcXG4gICAgbGV0IGFyciA9IHBkZmEoZ2V0UmVzQ29kZSgpLCBvYmou5YiX6KGoKTtcXFxcbiAgICAgICBpZiAob2JqLuWIl+ihqOWkhOeQhiAhPSBudWxsKSB7XFxcXG4gICAgICAgICAgICBhcnIgPSBvYmou6ZO+5o6l5aSE55CGKGFycilcXFxcbiAgICAgICAgfVxcXFxuICAgIGZvciAobGV0IGl0IG9mIGFycikge1xcXFxuICAgICAgICBsZXQgdXJsID0gcGQoaXQsIG9iai7pk77mjqUpXFxcXG4gICAgICAgIGlmIChvYmou6ZO+5o6l5aSE55CGICE9IG51bGwpIHtcXFxcbiAgICAgICAgICAgIHVybCA9IG9iai7pk77mjqXlpITnkIYodXJsKVxcXFxuICAgICAgICB9XFxcXG4gICAgICAgIGxldCB0aXRsZSA9IHBkZmgoaXQsIG9iai7moIfpopgpXFxcXG4gICAgICAgIGlmIChvYmou5qCH6aKY5aSE55CGICE9IG51bGwpIHtcXFxcbiAgICAgICAgICAgIHRpdGxlID0gb2JqLuagh+mimOWkhOeQhih0aXRsZSlcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBsZXQgcGljID0gcGQoaXQsIG9iai7lm77niYcpXFxcXG4gICAgICAgIGlmIChvYmou5Zu+54mH5aSE55CGICE9IG51bGwpIHtcXFxcbiAgICAgICAgICAgIHBpYyA9IG9iai7lm77niYflpITnkIYocGljKVxcXFxuICAgICAgICB9XFxcXG4gICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTogb2JqLuagh+mimCA/IHBkZmgoaXQsIG9iai7moIfpopgpIDogXFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgIHVybDogdXJsKycjYXV0b0NhY2hlIycsXFxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgIGRlc2M6IG9iai7mj4/ov7AgPyBwZGZoKGl0LCBvYmou5o+P6L+wKSA6IFxcXFxcXFwiXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICBwaWNfdXJsOiBwaWMsXFxcXG4gICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgIHl0aXRsZTogdGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgeXBpYzogcGljLFxcXFxuICAgICAgICAgICAgICAgIHl1cmw6IHVybC5yZXBsYWNlKCdoaWtlcjovL2VtcHR5IyMnLCcnKVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9KTtcXFxcblxcXFxuICAgIH1cXFxcbiAgICBzZXRSZXN1bHQoZCk7XFxcXG59XFxcXG52YXIgdG9vbCA9IHtcXFxcbiAgICDkuIDnuqc6IOS4gOe6p1xcXFxufVxcXFxuJC5leHBvcnRzID0gdG9vbFxcXCJ9LHtcXFwiY29sX3R5cGVcXFwiOlxcXCJtb3ZpZV8zXFxcIixcXFwibmFtZVxcXCI6XFxcIuS4gOe6p1vkuoxdKlxcXCIsXFxcInBhdGhcXFwiOlxcXCJ5aWppXFxcIixcXFwicnVsZVxcXCI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Ifor4ZpZCwgMSlcXFxcbiAgICB9O1xcXFxuICB9KTtcXFxcblxcXFxuICAgICAgICBmb3IgKGxldCBpdCBvZiDpm4bmlbDnu4RbaV0pIHtcXFxcbiAgICAgICAgICAgIHZhciBkb0xpc3R1cmwgPSBwZGZoKGl0LCDpm4Z1cmwpXFxcXG4gICAgICAgICAgICBkb0xpc3R1cmwgPSBkb0xpc3R1cmwuaW5jbHVkZXMoXFxcXFxcXCJodHRwXFxcXFxcXCIpID8gZG9MaXN0dXJsIDog5YmN57yAICsgZG9MaXN0dXJsXFxcXG4gICAgICAgICAgICBkb0xpc3QucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHBkZmgoaXQsIOmbhuWQjSksXFxcXG4gICAgICAgICAgICAgICAgdXJsOiBkb0xpc3R1cmxcXFxcbiAgICAgICAgICAgIH0pXFxcXG4gICAgICAgIH1cXFxcblxcXFxuICAgICAgICB2YXIgYm9va05hbWUgPSAh5aSa6Lev57q/5ZCmID8g5qCH6aKYIDog5qCH6aKYICsgJy0nICsg5YiX6KGo5ZCNW2ldXFxcXG5cXFxcbiAgICAgICAg56ug6IqCanNvbi5wdXNoKHtcXFxcbiAgICAgICAgICAgIHRpdGxlOiDliJfooajlkI1baV0sXFxcXG4gICAgICAgICAgICBsaXN0OiBkb0xpc3QsXFxcXG4gICAgICAgICAgICBzanNzOiB7XFxcXG4gICAgICAgICAgICAgICAgY2hhcHRlckxpc3Q6IGRvTGlzdCxcXFxcbiAgICAgICAgICAgICAgICBpbmZvOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGJvb2tOYW1lOiBib29rTmFtZSwgLy/mvKvnlLvlkI3np7AsXFxcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVOYW1lOiBNWV9SVUxFLnRpdGxlLFxcXFxuICAgICAgICAgICAgICAgICAgICBib29rVG9wUGljOiDlm77niYcsXFxcXG4gICAgICAgICAgICAgICAgICAgIHBhcnNlQ29kZTog5ryr55S76Kej5p6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xcbiAgICAgICAgICAgIH0s6aG1VVJMLGlkKTtcXFxcblxcXFxuICAgICAgICAgICAgdmFyIOagh+mimOWQjSA9IGlkID09IOmAieaLqeWIl+ihqCA/IOi3r+e6v+mAieS4rS5yZXBsYWNlKCfpgInkuK0nLCBkYXRhLnRpdGxlKSA6IGRhdGEudGl0bGU7XFxcXG4gICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiDmoIfpopjlkI0sXFxcXG4gICAgICAgICAgICAgICAgdXJsOiBqanVybCxcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2ZsZXhfYnV0dG9uJyxcXFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICBpZDog6aG1VVJMICsgXFxcXFxcXCJf6Lev57q/XFxcXFxcXCIgKyBpZFxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICB9KTtcXFxcblxcXFxuICAgIH1cXFxcbiAgICByZXR1cm4g6YCJ5oup5YiX6KGoXFxcXG59XFxcXG5cXFxcblxcXFxuZnVuY3Rpb24g5re75Yqg6YCJ5oup5LiL6L29KGQsIOi3r+e6v+aVsOaNriwg5aSa6Lev57q/5ZCmKSB7XFxcXG5cXFxcbiAgICAvL+i3r+e6v+aVsOaNriDmoLzlvI9be3RpdGxlOifot6/nur/lkI0nLHNqc3M6J+S4i+i9vei1hOaWmeS/oeaBryd9LC4uLi5dXFxcXG4gICAgLy/lpJrot6/nur/lkKYgIGZhbHNlIOWImeWPquacieKRoOS4quS4i+i9vSDmoIfpopjkuLog54K55Ye75LiL6L2977ybdHJ1ZSDliJnlpJrkuKrkuIvovb1cXFxcblxcXFxuaWYo5aSa6Lev57q/5ZCmKXtcXFxcblxcXFxuZC5wdXNoKHtcXFxcbiAgICAgICAgdGl0bGU6ICfigJjigJjigJnigJnwn5OlPGZvbnQgY29sb3I9XFxcXFxcXCIjZ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xcXCIpO1xcXFxuICAgICAgICAgICAgdmFyIOaOkuW6jyA9IGdldE15VmFyKE1ZX1VSTCArIFxcXFxcXFwi56ug6IqC5o6S5bqPXFxcXFxcXCIsICcjMWFhZDE5XFxcXFxcXCI+5q2j5bqPJyk7XFxcXG4gICAgICAgICAgICB2YXIg5o+Q56S6ID0g5o6S5bqPID09ICcjRkYwMDAwXFxcXFxcXCI+5YCS5bqPJyA/ICcjMWFhZDE5XFxcXFxcXCI+5q2j5bqPJyA6ICcjRkYwMDAwXFxcXFxcXCI+5YCS5bqPJztcXFxcblxcXFxuICAgICAgICAgICAg57q/6LevLmZvckVhY2goKGRhdGEsIHhsaWQpID0+IHtcXFxcbiAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGlkID09IHhsaWQgPyAn4oCc4oCcJyArIGRhdGEgKyAn4oCd4oCdJyA6IGRhdGEsXFxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogTVlfVVJMICsgXFxcXFxcXCJf57q/6LevXFxcXFxcXCIgKyB4bGlkXFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgIH0pXFxcXG4gICAgICAgICAgICBwdXRNeVZhcihNWV9VUkwsIGlkKVxcXFxuICAgICAgICAgICAgdmFyIOeroOiKgiA9IGxpc3RzW2dldE15VmFyKE1ZX1VSTCwgJzAnKV07XFxcXG4gICAgICAgICAgICBpZiAo5o6S5bqPID09ICcjRkYwMDAwXFxcXFxcXCI+5YCS5bqPJykge1xcXFxuICAgICAgICAgICAgICAgIOeroOiKgi5yZXZlcnNlKClcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGxldCBjcCA9IOeroOiKgi5tYXAoKGRhdGEsIHNzaWQpID0+IHtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChkYXRhLCAnYSYmVGV4dCcpLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IHBkKGRhdGEsICdhJiZocmVmJykgKyBsYXp5LFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTog56ug6IqCLmxlbmd0aCA+IDMgPyAndGV4dF80JyA6ICd0ZXh0XzInLFxcXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBNWV9VUkwgKyBcXFxcXFxcIl/pgInpm4ZcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfTtcXFxcbiAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKE1ZX1VSTCArIFxcXFxcXFwiX+mAiembhlxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgIGFkZEl0ZW1CZWZvcmUoTVlfVVJMICsgXFxcXFxcXCJmb290ZXJcXFxcXFxcIiwgY3ApO1xcXFxuICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiXFxcXG4gICAgICAgIH0sIHRhYnMsIGxhenksIGlkKSxcXFxcbiAgICAgICAgY29sX3R5cGU6ICdmbGV4X2J1dHRvbicsXFxcXG4gICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICBpZDogTVlfVVJMICsgXFxcXFxcXCJf57q/6LevXFxcXFxcXCIgKyBpZFxcXFxuICAgICAgICB9XFxcXG4gICAgfSk7XFxcXG59KVxcXFxuXFxcXG5pZiAo5o6S5bqPID09ICcjRkYwMDAwXFxcXFxcXCI+5YCS5bqPJykge1xcXFxuICAgIGxpc3QucmV2ZXJzZSgpXFxcXG59XFxcXG5saXN0LmZvckVhY2goKGRhdGEsIGlkKSA9PiB7XFxcX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mVyPScrdXJsKVxcXFxuICAgICAgICAgICAgICAgIH0pfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGh0bWwgPSByZXF1ZXN0KGlucHV0KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGxpc3QgPSBwZGZhKGh0bWwsICdib2R5JiYuc2Nyb2xsLWl0ZW0nKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGZpcnN0ID0gcGRmYShodG1sLCAnYm9keSYmI2ltYWdlJyk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QgPSBmaXJzdC5jb25jYXQobGlzdCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QuZm9yRWFjaChpbWcgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpY3MucHVzaChwZGZoKGltZywgJ2ltZyYmZGF0YS1zcmN8fHNyYycpKydAUmVmZXJlcj0nK2lucHV0KVxcXFxuICAgICAgICAgICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJwaWNzOi8vXFxcXFxcXCIgKyBwaWNzLmpvaW4oXFxcXFxcXCImJlxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgdmFyIGxhenkgPSBgQGxhenlSdWxlPS5qczpgICsg5ryr55S76Kej5p6QO1xcXCJ9LHtcXFwiY29sX3R5cGVcXFwiOlxcXCJtb3ZpZV8zXFxcIixcXFwibmFtZVxcXCI6XFxcIuS6keWPo+S7pCpcXFwiLFxcXCJwYXRoXFxcIjpcXFwiaW1wb3J0XFxcIixcXFwicnVsZVxcXCI6XFxcIndyaXRlRmlsZSgnaGlrZXI6Ly9maWxlcy8vcnVsZXMvVHovSk0nLGZldGNoKGlucHV0KSlcXFxcbid0b2FzdDovL+W3suS7juS6keWPo+S7pOiOt+WPluiBmua8q+a6kCdcXFwifSx7XFxcImN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FxcXFxuICAgICAgICAgICAgICAgICAgICBsaW5lU3BhY2luZzogMyxcXFxcbiAgICAgICAgICAgICAgICAgICAgaWQ6IGRlY2lkXFxcXG4gICAgICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogJzxzcGFuIHN0eWxlPVxcXFxcXFwiY29sb3I6IzgwODA4MFxcXFxcXFwiPicgKyBkZXNfZGVzYyArICc8L3NwYW4+J1xcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIlxcXFxuICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgcHV0TXlWYXIoXFxcXFxcXCJqanNcXFxcXFxcIiwgXFxcXFxcXCLmlLbotbdcXFxcXFxcIik7XFxcXG5cXFxcbiAgICAgICAgICAgIHVwZGF0ZUl0ZW0oe1xcXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBqamlkXFxcXG4gICAgICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+abtOaWsOivpuaDhTxzbWFsbD48c21hbGw+PHNwYW4gc3R5bGU9XFxcXFxcXCJjb2xvcjojMTlCODlEXFxcXFxcXCI+5bGV5byAPjwvc3Bhbj48L3NtYWxsPjwvc21hbGw+J1xcXFxuICAgICAgICAgICAgfSlcXFxcblxcXFxuICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IDE0LFxcXFxuICAgICAgICAgICAgICAgICAgICBsaW5lU3BhY2luZzogMyxcXFxcbiAgICAgICAgICAgICAgICAgICAgaWQ6IGRlY2lkXFxcXG4gICAgICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTogJzxzcGFuIHN0eWxlPVxc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cXG4gICAgbGV0IGtleXMgPSBPYmplY3Qua2V5cyhzb3VyY2UpXFxcXG4gICAgZm9yIChsZXQgaSBpbiBrZXlzKSB7XFxcXG4gICAgICAgIHRhcmdldFtrZXlzW2ldXSA9IHNvdXJjZVtrZXlzW2ldXVxcXFxuICAgIH1cXFxcbn1cXFxcblxcXFxuZnVuY3Rpb24g5pCc57SiKG9iaikge1xcXFxuICAgIHZhciBkID0gW107XFxcXG4gICAgaWYgKCQudHlwZShvYmopID09IFxcXFxcXFwic3RyaW5nXFxcXFxcXCIpIHtcXFxcbiAgICAgICAgb2JqID0gY29udmVydDEob2JqKVxcXFxuICAgIH1cXFxcbiAgICBpZiAob2JqLuinhOWImSkge1xcXFxuICAgICAgICBsZXQgYyA9IGNvbnZlcnQxKG9iai7op4TliJkpXFxcXG4gICAgICAgIG1lcmdlKGMsIG9iailcXFxcbiAgICB9XFxcXG4gICAgbGV0IGFyciA9IHBkZmEoZ2V0UmVzQ29kZSgpLCBvYmou5YiX6KGoKTtcXFxcbiAgICAgICBpZiAob2JqLuWIl+ihqOWkhOeQhiAhPSBudWxsKSB7XFxcXG4gICAgICAgICAgICBhcnIgPSBvYmou6ZO+5o6l5aSE55CGKGFycilcXFxcbiAgICAgICAgfVxcXFxuICAgIGZvciAobGV0IGl0IG9mIGFycikge1xcXFxuICAgICAgICBsZXQgdXJsID0gcGQoaXQsIG9iai7pk77mjqUpXFxcXG4gICAgICAgIGlmIChvYmou6ZO+5o6l5aSE55CGICE9IG51bGwpIHtcXFxcbiAgICAgICAgICAgIHVybCA9IG9iai7pk77mjqXlpITnkIYodXJsKVxcXFxuICAgICAgICB9XFxcXG4gICAgICAgIGxldCB0aXRsZSA9IHBkZmgoaXQsIG9iai7moIfpopgpXFxcXG4gICAgICAgIGlmIChvYmou5qCH6aKY5aSE55CGICE9IG51bGwpIHtcXFxcbiAgICAgICAgICAgIHRpdGxlID0gb2JqLuagh+mimOWkhOeQhih0aXRsZSlcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBsZXQgcGljID0gcGQoaXQsIG9iai7lm77niYcpXFxcXG4gICAgICAgIGlmIChvYmou5Zu+54mH5aSE55CGICE9IG51bGwpIHtcXFxcbiAgICAgICAgICAgIHBpYyA9IG9iai7lm77niYflpITnkIYocGljKVxcXFxuICAgICAgICB9XFxcXG4gICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTogb2JqLuagh+mimCA/IHBkZmgoaXQsIG9iai7moIfpopgpIDogXFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgIHVybDogdXJsKycjYXV0b0NhY2hlIycsXFxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgIGRlc2M6IG9iai7mj4/ov7AgPyBwZGZoKGl0LCBvYmou5o+P6L+wKSA6IFxcXFxcXFwiXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICBjb250ZW50OiBvYmou6K+m5oOFID8gcGRmaChpdCwgb2JqLuivpuaDhSkgOiBcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgcGljX3VybDogcGljLFxcXFxuICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICB5dGl0bGU6IHRpdGxlLFxcXFxuICAgICAgICAgICAgICAgIHlwaWM6IHBpYyxcXFxcbiAgICAgICAgICAgICAgICB5dXJsOiB1cmwucmVwbGFjZSgnaGlrZXI6Ly9lbXB0eSMjJywnJylcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSk7XFxcXG5cXFxcbiAgICB9XFxcXG4gICAgc2V0UmVzdWx0KGQpO1xcXFxufVxcXFxudmFyIHRvb2wgPSB7XFxcXG4gICAg5pCc57SiOiDmkJzntKJcXFxcbn1cXFxcbiQuZXhwb3J0cyA9IHRvb2xcXFwifV1cIixcInByb3h5XCI6XCJcIn0iLCJwaWNVcmwiOiJodHRwczovL2xhbm1laWd1b2ppYW5nLmNvbS90dWJpYW8va2UvMjgucG5nIiwidGl0bGUiOiLimpkg6L275ZCI6ZuG6K6+572uIOKamSJ9
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement