Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@一个轻合集@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi5LiA5Liq6L275ZCI6ZuGIiwiYXV0aG9yIjoiSm9rZXIiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IiwidmVyc2lvbiI6OTgwNSwiY29sX3R5cGUiOiJpY29uXzQiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6ImFsbCIsImNsYXNzX3VybCI6IiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxuLy8g5b2T5rKh5pyJ54us56uL5bCP56iL5bqP6aaW6aG15pe25riF6Zmk6aG16Z2i57yT5a2YXG5hZGRMaXN0ZW5lcihcIm9uQ2xvc2VcIiwgJC50b1N0cmluZygoKSA9PiB7XG4gICAgaWYocGFyc2VJbnQoZ2V0TXlWYXIoJ29wZW5lZEluZGV4JywgJzAnKSkgPT09IDApe1xuICAgICAgICBKU09OLnBhcnNlKHJlYWRGaWxlKFwiX3J1bGVIYXNoQ2FjaGVcIikgfHwgXCJbXVwiKS5mb3JFYWNoKCh2KSA9PiBkZWxldGVGaWxlKHYpKVxuICAgICAgICBkZWxldGVGaWxlKCdfcnVsZUhhc2hDYWNoZScpXG4gICAgfVxufSkpXG5jb25zdCBRSU5HX1RJVExFID0gZ2V0TXlWYXIoJ215Q29sbGVjdGlvbicpLFxuICAgIG5ld1dpbmRvdyA9IHJlYWRGaWxlKCduZXdXaW5kb3cnKSxcbiAgICB0eXBlU2hvdyA9IGdldE15VmFyKCd0eXBlU2hvdycsICcnKTtcbmxldCBlbCA9IFt7XG4gICAgICAgIHRpdGxlOiAnICcgKyBRSU5HX1RJVExFLmJvbGQoKSArICcgJm5ic3AgJm5ic3AgJyArICfimpkg6L275ZCI6ZuG6K6+572uIOKamScuc21hbGwoKSxcbiAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL0NvbmZpZz9ydWxlPScgKyBRSU5HX1RJVExFICsgJyYjbm9SZWNvcmRIaXN0b3J5IycsXG4gICAgICAgIGltZzogTVlfUlVMRS5pY29uIHx8ICdoaWtlcjovL2ltYWdlcy9pY29uMScsXG4gICAgICAgIGNvbF90eXBlOiAnYXZhdGFyJ1xuICAgIH0sIHtcbiAgICAgICAgdXJsOiAnXCJoaWtlcjovL3NlYXJjaD9zPVwiK2lucHV0JyxcbiAgICAgICAgZGVzYzogJ+aQnOS9oOaDs+imgeeahC4uLicsXG4gICAgICAgIHRpdGxlOiAn5pCc57SiJyxcbiAgICAgICAgY29sX3R5cGU6ICdpbnB1dCcsXG4gICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICBydWxlczogJC50b1N0cmluZygoUUlOR19USVRMRSwgdHlwZVNob3cpID0+IHtcbiAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9kYXRhTG9hZD9ydWxlPScgKyBRSU5HX1RJVExFKSgpXG4gICAgICAgICAgICAgICAgaWYgKHR5cGVTaG93KSBydWxlcyA9IHJ1bGVzLmZpbHRlcigodikgPT4gdi50eXBlID09IHR5cGVTaG93KVxuICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShydWxlcylcbiAgICAgICAgICAgIH0sIFFJTkdfVElUTEUsIHR5cGVTaG93KSxcbiAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0TXlWYXIoJ3NlYXJjaEtleScsICcnKSxcbiAgICAgICAgICAgIG9uQ2hhbmdlOiBcInB1dE15VmFyKCdzZWFyY2hLZXknLGlucHV0KVwiXG4gICAgICAgIH1cbiAgICB9XSxcbiAgICBydWxlcyA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL2RhdGFMb2FkP3J1bGU9JyArIFFJTkdfVElUTEUpKCksXG4gICAgdHlwZXMgPSB7Jyc6J+WFqOmDqCd9O1xuICAgIEFycmF5LmZyb20obmV3IFNldChydWxlcy5tYXAoZT0+ZS50eXBlKSkpLmZvckVhY2godD0+dHlwZXNbdF09dCk7XG5mb3IgKGxldCBrIGluIHR5cGVzKXtcbiAgICBpZiAoIWsgfHwgcnVsZXMuZmluZCgodikgPT4gdi50eXBlID09IGspKXtcblx0ICAgICAgbGV0IGNvdW50ID0gcnVsZXMuZmlsdGVyKGl0ID0+ICFrIHx8IGl0LnR5cGUgPT09IGspLmxlbmd0aDtcbiAgICAgICAgZWwucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnScgKyAoayA9PSB0eXBlU2hvdyA/ICh0eXBlc1trXStjb3VudCkuYm9sZCgpLmZvbnRjb2xvcignIzEyYjY2OCcpIDogdHlwZXNba10rY291bnQpLFxuICAgICAgICAgICAgdXJsOiBrID09IHR5cGVTaG93ID8gJ2hpa2VyOi8vZW1wdHknIDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaykgPT4ge1xuICAgICAgICAgICAgICAgIHB1dE15VmFyKCd0eXBlU2hvdycsIGspXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xuICAgICAgICAgICAgfSwgayksXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXG4gICAgICAgIH0pXG5cdH1cbn1cbmV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL3VybFBhcnNlP3J1bGU9JyArIFFJTkdfVElUTEUpKS5ydWxlKVxuaWYgKHR5cGVTaG93KSBydWxlcyA9IHJ1bGVzLmZpbHRlcigodikgPT4gdi50eXBlID09IHR5cGVTaG93KVxucnVsZXMuZm9yRWFjaCgodikgPT4ge1xuICAgIGxldCB1cmxQYXJhbSA9IHYudXJsLnNwbGl0KCc7JyksXG4gICAgICAgIHJ1bGVUbXAgPSB7XG4gICAgICAgICAgICB0aXRsZTogdi50aXRsZSwgdXJsOiB1cmxQYXJhbS5zaGlmdCgpLFxuICAgICAgICAgICAgY2xhc3NfbmFtZTogdi5jbGFzc19uYW1lLCBjbGFzc191cmw6IHYuY2xhc3NfdXJsLFxuICAgICAgICAgICAgYXJlYV9uYW1lOiB2LmFyZWFfbmFtZSwgYXJlYV91cmw6IHYuYXJlYV91cmwsXG4gICAgICAgICAgICB5ZWFyX25hbWU6IHYueWVhcl9uYW1lLCB5ZWFyX3VybDogdi55ZWFyX3VybCxcbiAgICAgICAgICAgIHNvcnRfbmFtZTogdi5zb3J0X25hbWUsIHNvcnRfdXJsOiB2LnNvcnRfdXJsXG4gICAgICAgIH0sXG4gICAgICAgIGZ5cGFnZSA9IHJ1bGVUbXAudXJsLmluY2x1ZGVzKCdmeXBhZ2UnKSA/ICdmeXBhZ2UnIDogJzEnLFxuICAgICAgICBkb21haW4gPSAoLyhodHRwcz86XFwvXFwvLis/KSg/OlxcL3wkKS9pLmV4ZWMocnVsZVRtcC51cmwpIHx8IFssICdoaWtlcjovL2VtcHR5J10pWzFdLFxuICAgICAgICBkID0ge1xuICAgICAgICAgICAgdGl0bGU6IHYudGl0bGUsXG4gICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvZnJhbWVMb2FkJyxcbiAgICAgICAgICAgIGltZzogdi5pY29uIHx8ICdoaWtlcjovL2ltYWdlcy9pY29uMScsXG4gICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgIHVybDogZG9tYWluICsgJy8jbm9IaXN0b3J5IyNub1JlY29yZEhpc3RvcnkjIyMjJyArIEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgUlVMRTogYmFzZTY0RW5jb2RlKEpTT04uc3RyaW5naWZ5KHJ1bGVUbXApKSxcbiAgICAgICAgICAgICAgICAgICAgcGFnZU51bTogZnlwYWdlLFxuICAgICAgICAgICAgICAgICAgICBRSU5HX1RJVExFOiBnZXRNeVZhcignbXlDb2xsZWN0aW9uJylcbiAgICAgICAgICAgICAgICB9KSArICcuanM6ZXZhbChKU09OLnBhcnNlKGZldGNoKFwiaGlrZXI6Ly9wYWdlL3VybFBhcnNl77yf77yfcnVsZT0nICsgUUlOR19USVRMRSArICdcIikpLnJ1bGUp77yb77ybaW5kZXhVcmwoaW5wdXQpOycgKyBwYXJhbUhhbmRsZSh1cmxQYXJhbSwgdi51YSksXG4gICAgICAgICAgICAgICAgUlVMRTogeyB0aXRsZTogdi50aXRsZSB9LFxuICAgICAgICAgICAgICAgIGlzSW5kZXg6IHRydWVcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIGlmIChuZXdXaW5kb3cpIE9iamVjdC5hc3NpZ24oZC5leHRyYSwge1xuICAgICAgICBuZXdXaW5kb3c6IHRydWUsXG4gICAgICAgIHdpbmRvd0lkOiBRSU5HX1RJVExFICsgJ18nICsgZC50aXRsZVxuICAgIH0pXG4gICAgZWwucHVzaChkKVxufSlcbnNldFJlc3VsdChlbClcbiIsInNlYXJjaF91cmwiOiJoaWtlcjovL2VtcHR5P2tleXdvcmQ9KioiLCJncm91cCI6IuKRoOi9u+WQiOmbhiIsInNlYXJjaEZpbmQiOiJqczpcbnNldFJlc3VsdChbe1xuICAgIHRpdGxlOiBcIueCueaIkeW8gOWni+i9u+WQiOmbhuKAouinhueVjOiBmuaQnFwiLFxuICAgIHVybDogXCJoaWtlcjovL3NlYXJjaD9zPVwiICsgZ2V0UGFyYW0oXCJrZXl3b3JkXCIpLFxuICAgIGV4dHJhOiB7XG4gICAgICAgIHJ1bGVzOiAkLnRvU3RyaW5nKCgpID0+IHtcbiAgICAgICAgICAgIGNvbnN0IFFJTkdfVElUTEUgPSBnZXRNeVZhcignbXlDb2xsZWN0aW9uJyksXG4gICAgICAgICAgICAgICAgdHl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sYXNzX25hbWUuZm9yRWFjaCgobmFtZSwgaSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgdXJsID0gY2xhc3NfdXJsW2ldLFxcbiAgICAgICAgICAgICAgICAgICAgbm93ID0gSlNPTi5zdHJpbmdpZnkoeyBuYW1lOiBuYW1lLCB1cmw6IHVybCB9KVxcbiAgICAgICAgICAgICAgICBlbC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBzZWxlY3RlZCA9PSBub3cgPyAn4oCc4oCc4oCd4oCdJyArIG5hbWUuZm9udGNvbG9yKHRoaXMuY29sb3IpLmJvbGQoKSA6IG5hbWUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IHNlbGVjdGVkID09IG5vdyA/ICdoaWtlcjovL2VtcHR5JyA6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHNpZ24sIGlkLCBub3cpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoc2lnbiArIGlkLCBub3cpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICAgICAgfSwgdGhpcy5zaWduLCBpZCwgbm93KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIGVsLnB1c2goeyBjb2xfdHlwZTogdGhpcy5ib3VuZGFyeSB9KVxcbiAgICAgICAgfSlcXG4gICAgfSxcXG4gICAgaW5pdChjbGFzc09iamVjdCkge1xcbiAgICAgICAgaWYgKHR5cGVvZiBjbGFzc09iamVjdC5jbGFzc19uYW1lID09ICdzdHJpbmcnKVxcbiAgICAgICAgICAgIGNsYXNzT2JqZWN0LmNsYXNzX25hbWUgPSB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XG4gICAgICAgIGlmIChpbnB1dCA9PSAn5aSH5Lu9JykgcmV0dXJuICQoJ2hpa2VyOi8vZmlsZXMvdG1wLycgKyBRSU5HX1RJVExFICsgJ19iYWNrdXAuanNvbicsICfovpPlhaXlpIfku73ot6/lvoQnKVxcbiAgICAgICAgICAgIC5pbnB1dCgodXJsLCB1cGRhdGVJbnRlcnZhbCwgbmV3V2luZG93LCB0YWJGb2xkLCBkaXNhYmxlQ3VzdG9tKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IHJlcXVlc3QodXJsKSxcXG4gICAgICAgICAgICAgICAgICAgIGN1c3RvbURhdGEgPSByZWFkRmlsZSgnY3VzdG9tRGF0YScpXFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShpbnB1dCwgSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSW50ZXJ2YWw6IHVwZGF0ZUludGVydmFsLFxcbiAgICAgICAgICAgICAgICAgICAgbmV3V2luZG93OiBuZXdXaW5kb3csXFxuICAgICAgICAgICAgICAgICAgICB0YWJGb2xkOiB0YWJGb2xkLFxcbiAgICAgICAgICAgICAgICAgICAgZGlzYWJsZUN1c3RvbTogZGlzYWJsZUN1c3RvbSxcXG4gICAgICAgICAgICAgICAgICAgIGN1c3RvbURhdGE6IGN1c3RvbURhdGEsXFxuICAgICAgICAgICAgICAgICAgICBydWxlczogcnVsZXNcXG4gICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LlpIfku73vvIzms6jmhI/oi6Xku5PlupPkuLrlrZDpobXpnaLliJnkuI3lpIfku70nXFxuICAgICAgICAgICAgfSwgdXJsLCB1cGRhdGVJbnRlcnZhbCwgbmV3V2luZG93LCB0YWJGb2xkLCBkaXNhYmxlQ3VzdG9tKVxcbiAgICAgICAgZWxzZSByZXR1cm4gJCgnaGlrZXI6Ly9maWxlcy90bXAvJyArIFFJT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WFjaCgodiwgaSkgPT4ge1xcbiAgICBsZXQgZCA9IHsgdGl0bGU6IHYudGl0bGUsIGltZzogZGF0YVtpXS5pY29uIH1cXG4gICAgc3dpdGNoIChlZGl0TW9kZSkge1xcbiAgICAgICAgY2FzZSAn5ZCv55SoL+emgeeUqCc6XFxuICAgICAgICAgICAgZC50aXRsZSA9ICh2LnZpc2libGUgPyAn8J+foiAgJyA6ICfwn5S0ICAnKSArIGQudGl0bGVcXG4gICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpXFxuICAgICAgICAgICAgICAgIHJ1bGVzW2ldLnZpc2libGUgPSAhcnVsZXNbaV0udmlzaWJsZVxcbiAgICAgICAgICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSlcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICBjYXNlICfph43mlrDmjpLluo8nOlxcbiAgICAgICAgICAgIGxldCBzb3J0RmxhZyA9IHBhcnNlSW50KGdldE15VmFyKCdzb3J0RmxhZycsICctMScpKVxcbiAgICAgICAgICAgIGQudGl0bGUgPSAoc29ydEZsYWcgPT0gaSA/ICfwn5SDICAnIDogJycpICsgZC50aXRsZVxcbiAgICAgICAgICAgIGlmIChzb3J0RmxhZyA9PSAtMSlcXG4gICAgICAgICAgICAgICAgZC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignc29ydEZsYWcnLCBpLnRvU3RyaW5nKCkpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/pgInmi6nopoHnp7vliqjliLDnmoTkvY3nva4nXFxuICAgICAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICAgICAgZWxzZVxcbiAgICAgICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKG9sZEluZGV4LCBuZXdJbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpXFxuICAgICAgICAgICAgICAgICAgICBydWxlcy5zcGxpY2UobmV3SW5kZXgsIDAsIHJ1bGVzLnNwbGljZShvbGRJbmRleCwgMSlbMF0pXFxuICAgICAgICAgICAgICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSlcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzb3J0RmxhZycsICctMScpXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICAgICAgfSwgc29ydEZsYWcsIGkpXFxuICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgIGNhc2UgJ+abtOaUueWbvuaghyc6XFxuICAgICAgICAgICAgZC51cmwgPSAkKHYuaWNvbiB8fCAnJywgJ+i+k+WFpeaWsOWbvuagh+WcsOWdgOaIluminOiJsuS7o+egge+8micpLmlucHV0KChpKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKVxcbiAgICAgICAgICAgICAgICBpZiAoaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICBydWxlc1tpXS5pY29uID0gaW5wdXRcXG4gICAgICAgICAgICAgICAgZWxzZVxcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHJ1bGVzW2ldLmljb25cXG4gICAgICAgICAgICAgICAgc2F2ZUZpbGUoJ2N1c3RvbURhdGEnLCBKU09OLnN0cmluZ2lmeShydWxlcykpXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgaSlcXG4gICAgICAgICAgICBicmVha1xcbiAgICAgICAgY2FzZSAn5a+85YWl5rW36ZiUJzpcXG4gICAgICAgICAgICBkLnVybCA9ICdydWxlOi8vJyArIGJhc2U2NEVuY29kZShKU09OLnN0cmluZ2lmeShkYXRhW2ldKSlcXG4gICAgICAgICAgICBicmVha1xcbiAgICB9XFxuICAgIGVsLnB1c2goZClcXG59KVxcbnNldFJlc3VsdChlbClcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIumhtemdoui9veWFpVwiLFwicGF0aFwiOlwiZnJhbWVMb2FkXCIsXCJydWxlXCI6XCJqczpcXG5jb25zdCBRSU5HX1RJVExFID0gZ2V0TXlWYXIoJ215Q29sbGVjdGlvbicpXFxubGV0IG15Q29sbGVjdGlvbl9lbCA9IFtdLFxcbiAgICB7IFJVTEUsIGlzSW5kZXgsIHBhZ2VUaXRsZSB9ID0gTVlfUEFSQU1TLFxcbiAgICB0aGlzUlVMRSA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL2RhdGFMb2FkP3J1bGU9JyArIFFJTkdfVElUTEUpKCkuZmluZCgodikgPT4gdi50aXRsZSA9PSBSVUxFLnRpdGxlKVxcbmlmIChpc0luZGV4KSB7XFxuICAgIFJVTEUgPSB0aGlzUlVMRVxcbn0gZWxz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xcXC9cXFxcL3BhZ2VcXFxcLyguKz8pKCMuKj8pPyg/OlxcXFw/KC4qKSk/JC8pLFxcbiAgICAgICAgICAgICAgICAgICAgc3ViUGFnZSA9IE1ZX1JVTEUucGFnZUxpc3QuZmluZCgodikgPT4gdi5wYXRoID09IHBhdGgpLFxcbiAgICAgICAgICAgICAgICAgICAgc3ViVXJsID0gKHBhcmFtcyB8fCAnJykuc3BsaXQoJyYnKS5maW5kKCh2KSA9PiB2LnN0YXJ0c1dpdGgoJ3VybD0nKSlcXG4gICAgICAgICAgICAgICAgdi51cmwgPSBzdWJVcmwgPyBzdWJVcmwuc2xpY2UoNCkucmVwbGFjZSgv77yf77yfL2csICc/JykucmVwbGFjZSgv77yG77yGL2csICcmJykgOiAodi5leHRyYSB8fCB7fSkudXJsIHx8ICdoaWtlcjovL2VtcHR5JyArIGZsYWcgKyAnPycgKyAocGFyYW1zIHx8ICcnKVxcbiAgICAgICAgICAgICAgICBNWV9fUlVMRS5kZXRhaWxfZmluZF9ydWxlID0gc3ViUGFnZS5ydWxlXFxuICAgICAgICAgICAgICAgIE1ZX19SVUxFLmRldGFpbF9jb2xfdHlwZSA9IHN1YlBhZ2UuY29sX3R5cGVcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHYudXJsLmluY2x1ZGVzKCdAbGF6eVJ1bGU9JykpIHtcXG4gICAgICAgICAgICAgICAgbGV0IHJlSW5kZXggPSB2LnVybC5pbmRleE9mKCcuanM6JylcXG4gICAgICAgICAgICAgICAgaWYgKHJlSW5kZXggPj0gMCkgdi51cmwgPSB2LnVybC5zbGljZSgwLCByZUluZGV4KSArICcuanM6XFxcXG5pZihNWV9SVUxFKU9iamVjdC5hc3NpZ24oTVlfUlVMRSwgJyArIGFzc2lnbkxhenlSdWxlICsgJyk7JyArIHYudXJsLnNsaWNlKHJlSW5kZXggKyA0KVxcbiAgICAgICAgICAgICAgICByZXR1cm4gdlxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoaXNJbmRleC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29kZSgpLCBmaW5kUnVsZS5zaGlmdCgpKS5mb3JFYWNoKChkYXRhKSA9PiB7XFxuICAgICAgICBsZXQgW3RpdGxlLCBpbWcsIGRlc2MsIHVybF0gPSBmaW5kUnVsZS5tYXAoKHYsIGkpID0+IHtcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgIGlmICh2ID09ICcqJykgcmV0dXJuICcnXFxuICAgICAgICAgICAgICAgICAgICBlbHNlIHYgPSAoaSA9PSAxIHx8IGkgPT0gMykgP1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlRG9tKGRhdGEsIHYpIDpcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZURvbUZvckh0bWwoZGF0YSwgdilcXG4gICAgICAgICAgICAgICAgICAgIGlmIChpICE9IDMpIHYgPSBydW5Db2RlKHYpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdlxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7IHJldHVybiAnJyB9XFxuICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgcmVzID0ge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsIHVybDogdXJsLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBkZXNjLCBpbWc6IGltZyxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IE1ZX1JVTEUuY29sX3R5cGVcXG4gICAgICAgICAgICB9XFxuICAgICAgICBpZiAocmVzLnVybCkge1xcbiAgICAgICAgICAgIGlmIChyZXMudXJsLmluY2x1ZGVzKCdAbGF6eVJ1bGU9JykpIHtcXG4gICAgICAgICAgICAgICAgbGV0IHJlSW5kZXggPSByZXMudXJsLmluZGV4T2YoJy5qczonKVxcbiAgICAgICAgICAgICAgICBpZiAocmVJbmRleCA+PSAwKSByZXMudXJsID0gcmVzLnVybC5zbGljZSgwLCByZUluZGV4KSArICcuanM6XFxcXG5pZihNWV9SVUxFKU9iamVjdC5hc3NpZ24oTVlfUlVMRSwgJyArIGFzc2lnbkxhenlSdWxlICsgJyk7JyArIHJlcy51cmwuc2xpY2UocmVJbmRleCArIDQpXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChkZXRhaWxGaW5kUnVsZSkge1xcbiAgICAgICAgICAgICAgICByZXMuZXh0cmEgPSB7XFxuICAgICAgICAgICAgICAgICAgICB1cmw6IGdlbkV4VXJsKHVybCksXFxuICAgICAgICAgICAgICAgICAgICBSVUxFOiBPYmplY3QuYXNzaWduKGdlbk15UnVsZSgpLCB7IGRldGFpbF9maW5kX3J1bGU6IGRldGFpbEZpbmRSdWxlIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgcGFnZVRpdGxlOiBpc0luZGV4ICYmIHRpdGxlXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmVzLnVybCA9ICdoaWtlcjovL3BhZ2UvZnJhbWVMb2FkP3J1bGU9JyArIFFJTkdfVElUTEVcXG4gICAgICAgICAgICB9IGVsc2UgaWYgKE1ZX1JVTEUuZGV0YWlsX2ZpbmRfcnVsZSkge1xcbiAgICAgICAgICAgICAgICByZXMuZXh0cmEgPSB7XFxuICAgICAgICAgICAgICAgICAgICB1cmw6IGdlbkV4VXJsKHVybCksXFxuICAgICAgICAgICAgICAgICAgICBSVUxFOiBnZW5NeVJ1bGUoKSxcXG4gICAgICAgICAgICAgICAgICAgIHBhZ2VUaXRsZTogaXNJbmRleCAmJiB0aXRsZVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJlcy51cmwgPSAnaGlrZXI6Ly9wYWdlL2ZyYW1lTG9hZD9ydWxlPScgKyBRSU5HX1RJVExFXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgbXlDb2xsZWN0aW9uX2VsLnB1c2gocmVzKVxcbiAgICB9KVxcbiAgICBzZXRSZXN1bHQobXlDb2xsZWN0aW9uX2VsKVxcbn1cXG5cIn0se1wiY29sX3R5cGVcIj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ZlRmlsZSgndXBkYXRlVGltZScsIG5vdy50b1N0cmluZygpKVxcbiAgICAgICAgICAgIGxvZygn5pu05paw5pWw5o2u5bey5YaZ5YWl5pys5ZywJylcXG4gICAgICAgIH1cXG4gICAgfSBlbHNlIHtcXG4gICAgICAgIGRhdGEgPSBKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL2ZpbGVzL2xpYnMvJyArIG1kNSh1cmwpICsgJy5qcycpIHx8ICdbXScpXFxuICAgIH1cXG4gICAgXFxuICAgIC8vZGF0YSA9IGRhdGEuZmlsdGVyKCh2KSA9PiB7IHJldHVybiB2LnRpdGxlICE9IGdldE15VmFyKCdteUNvbGxlY3Rpb24nKSAmJiAhKHYuYXV0aG9yIHx8ICcnKS5pbmNsdWRlcygn6L275ZCI6ZuG55Sf5oiQ5ZmoJykgfSlcXG4gICAgaWYgKHJlYWRGaWxlKCdkaXNhYmxlQ3VzdG9tJykpIHJldHVybiBkYXRhXFxuICAgIGVsc2UgeyAvLyDlhpnlhaXoh6rlrprkuYnmlbDmja5cXG4gICAgICAgIGxldCBjdXN0b21EYXRhID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpLFxcbiAgICAgICAgICAgIHJld3JpdGVEYXRhID0gW11cXG4gICAgICAgIGN1c3RvbURhdGEgPSBjdXN0b21EYXRhLnJlZHVjZSgoc2VsZiwgdikgPT4ge1xcbiAgICAgICAgICAgIGxldCBpbmRleCA9IGRhdGEuZmluZEluZGV4KCh2dikgPT4gdi50aXRsZSA9PSB2di50aXRsZSlcXG4gICAgICAgICAgICBpZiAoaW5kZXggPj0gMCkge1xcbiAgICAgICAgICAgICAgICBzZWxmLnB1c2godilcXG4gICAgICAgICAgICAgICAgbGV0IHJ1bGUgPSBkYXRhLnNwbGljZShpbmRleCwgMSlbMF1cXG4gICAgICAgICAgICAgICAgaWYgKHNob3dBbGwgfHwgdi52aXNpYmxlKVxcbiAgICAgICAgICAgICAgICAgICAgcm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wcFVybC5pbmNsdWRlcyhcXFwiZnJlZWthblxcXCIpKSB7XFxuICAgICAgICAgICAgYXBwVWEgPSBcXFwiRGFydC8yLjE0IChkYXJ0OmlvKVxcXCI7XFxuICAgICAgICB9IGVsc2UgaWYgKC96c2J8Zmt4c3x4YXlzfHhjeXN8c3p5c3xkeHlzfHl0eXN8cW55cy8udGVzdChhcHBVcmwpKSB7XFxuICAgICAgICAgICAgYXBwVWEgPSBcXFwiRGFydC8yLjE1IChkYXJ0OmlvKVxcXCI7XFxuICAgICAgICB9IGVsc2UgaWYgKGFwcFVybC5pbmNsdWRlcyhcXFwiLnZvZFxcXCIpKSB7XFxuICAgICAgICAgICAgYXBwVWEgPSBcXFwib2todHRwLzQuMS4wXFxcIjtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgYXBwVWEgPSBcXFwiRGFsdmlrLzIuMS4wXFxcIjsgLy9UVlxcbiAgICAgICAgfVxcbiAgICAgICAgLy/pppbpobXop4TliJnjgIHliIbnsbvop4TliJnjgIHkuoznuqfop4TliJnlkozop4bpopHop6PmnpBcXG4gICAgICAgIGlmICgv56We6amsfFRWLy50ZXN0KGFwcHR5cGUpKSB7XFxuICAgICAgICAgICAgZmluZF9ydWxlID0gXFxcImpzOlxcXCIgKyAkLnRvU3RyaW5nKGZ1bmN0aW9uKGFwcFVybCwgYXBwVWEpIHtcXG4gICAgICAgICAgICAgICAgbGV0IGl0ZW1zID0gW107XFxuICAgICAgICAgICAgICAgIGlmIChNWV9QQUdFID09IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHR5cGVKc29uID0gSlNPTi5wYXJzZShmZXRjaChhcHBVcmwgKyBcXFwiP2FjPWZsaXR0ZXJcXFwiKSwgeyBoZWFkZXJzOiB7IFxcXCJVc2VyLUFnZW50XFxcIjogYXBwVWEgfSB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBrZXkgaW4gdHlwZUpzb24pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZToga2V5LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJmbGV4X2J1dHRvblxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICQoXFxcImhpa2VyOi8vZW1wdHkjI1xcXCIgKyBhcHBVcmwgKyBcXFwiP2FjPWxpc3QmcGFnZT1meXBhZ2UmY2xhc3M9XFxcIiArIGtleSkucnVsZSgodHlwZUpzb24sIGFwcFVhKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkTGlzdGVuZXIoXFxcIm9uQ2xvc2VcXFwiLCBcXFwiY2xlYXJWYXIoJ2ZpbHRlcicpXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGl0ZW1zID0gW10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleXMgPSB7fSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlrZXlzID0gW10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlciA9IHt9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvciA9IFxcXCIjRkE3Mjk4XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpbmRleCBpbiB0eXBlSnNvbikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZUpzb25baW5kZXhdLnZhbHVlcy5sZW5ndGggPT0gMSkgY29udGludWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBrZXkgPSB0eXBlSnNvbltpbmRleF0uZmllbGQsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJOYW1lID0gXFxcIuWFqOmDqFxcXCIgKyB0eXBlSnNvbltpbmRleF0ubmFtZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlrZXlzLnB1c2goa2V5KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga2V5c1tcXFwiZlxcXCIgKyBrZXldID0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlcltcXFwiZlxcXCIgKyBrZXldID0gW2ZpbHRlck5hbWVdLmNvbmNhdCh0eXBlSnNvbltpbmRleF0udmFsdWVzKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFnZXRWYXIoXFxcImZpbHRlclxcXCIsIFxcXCJcXFwiKSkgeyBwdXRWYXIoXFxcImZpbHRlclxcXCIsIEpTT04uc3RyaW5naWZ5KGtleXMpKSB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRlbXAgPSBKU09OLnBhcnNlKGdldFZhcihcXFwiZmlsdGVyXFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChNWV9QQUdFID09IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaXRlbSBpbiBmaWx0ZXIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGluZGV4ID0gMDsgaW5kZXggPCBmaWx0ZXJbaXRlbV0ubGVuZ3RoOyBpbmRleCsrKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0ZW1wW2l0ZW1dID09IFxcXCJcXFwiID8gKGluZGV4ID09PSAwID8gXFxcIuKAnOKAnOKAneKAnVxcXCIgKyBmaWx0ZXJbaXRlbV1bMF0uYm9sZCgpLmZvbnRjb2xvcihjb2xvcikgOiBmaWx0ZXJbaXRlbV1baW5kZXhdKSA6ICh0ZW1wW2l0ZW1dID09IGZpbHRlcltpdGVtXVtpbmRleF0gPyBcXFwi4oCc4oCc4oCd4oCdXFxcIiArIGZpbHRlcltpdGVtXVtpbmRleF0uYm9sZCgpLmZvbnRjb2xvcihjb2xvcikgOiBmaWx0ZXJbaXRlbV1baW5kZXhdKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJzY3JvbGxfYnV0dG9uXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGRlcywgbmFtZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRlbXAgPSBKU09OLnBhcnNlKGdldFZhcihcXFwiZmlsdGVyXFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGVtcFtuYW1lXSA9IGRlcy5pbmRleE9mKFxcXCLlhajpg6hcXFwiKSAhPSAtMSA/IFxcXCJcXFwiIDogZGVzO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKFxcXCJmaWx0ZXJcXFwiLCBKU09OLnN0cmluZ2lmeSh0ZW1wKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIGZpbHRlcltpdGVtXVtpbmRleF0sIGl0ZW0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goeyBjb2xfdHlwZTogXFxcImJsYW5rX2Jsb2NrXFxcIiB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBNWV9VUkwuc3BsaXQoXFxcIiMjXFxcIilbMV0gKyBcXFwiJlxcXCIgKyB0eWtleXMubWFwKGN1ciA9PiBjdXIgKyBcXFwiPWZcXFwiICsgY3VyKS5qb2luKFxcXCImXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaXRlbSBpbiB0ZW1wKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybC5yZXBsYWNlKGl0ZW0sIHRlbXBbaXRlbV0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzY29kZSA9IGZldGNoKHVybCwgeyBoZWFkZXJzOiB7IFxcXCJVc2VyLUFnZW50XFxcIjogYXBwVWEgfSB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzY29kZS5pbmRleE9mKCfmo4DmtYvkuK0nKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNjb2RlID0gZmV0Y2godXJsICsgJyZidHdhZicgKyByZXNjb2RlLm1hdGNoKC9idHdhZiguKj8pXFxcXFxcXCIvKVsxXSwgeyBoZWFkZXJzOiB7IFxcXCJVc2VyLUFnZW50XFxcIjogYXBwVWEgfSB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSBKU09OLnBhcnNlKHJlc2NvZGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL3R2bGlzdGRhdGEnKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIuinhumikeWIl+ihqOWHuumUmTpcXFwiICsgZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0UmVzdWx0KGl0ZW1zKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHR5cGVKc29uW2tleV0sIGFwcFVhKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIummlumhteWIhuexu+WHuumUmTpcXFwiICsgZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IE1ZX1VSTC5zcGxpdCgnIyMnKVsxXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBodG1sID0gSlNPTi5wYXJzZShmZXRjaCh1cmwpKTtcXG4gICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL3R2bGlzdGRhdGEnKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxvZyhcXFwi6aaW6aG15o6o6I2Q5Ye66ZSZOlxcXCIgKyBlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHNldFJlc3VsdChpdGVtcyk7XFxuICAgICAgICAgICAgfSwgYXBwVXJsLCBhcHBVYSlcXG4gICAgICAgICAgICBsZXQgcnVsZV90dmxpc3RkYXRhID0gJC50b1N0cmluZyhmdW5jdGlvbigpIHtcXG4gICAgICAgICAgICAgICAgbGV0IGxpc3QgPSBodG1sLmRhdGE7XFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbGlzdC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHsgdGl0bGUsIHBpYywgbmV4dGxpbmssIHN0YXRlIH0gPSBsaXN0W2ldO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybCA9IG5leHRsaW5rLnN0YXJ0c1dpdGgoJ2h0dHAnKSA/IG5leHRsaW5rIDogYXBwVXJsICsgJz9hYz1kZXRhaWwmaWRzPScgKyBuZXh0bGluaztcXG4gICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBwaWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBzdGF0ZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzNfbWFycXVlZScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKFxcXCIjaW1tZXJzaXZlVGhlbWUjaGlrZXI6Ly9lbXB0eSMjXFxcIiArIHVybCkucnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS90dm1vdmxpc3QnKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwi5b2x54mH6K+m5oOF5Ye66ZSZOlxcXCIgKyBlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0UmVzdWx0KFtdKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGxldCBydWxlX3R2bW92bGlzdCA9ICQudG9TdHJpbmcoZnVuY3Rpb24oYXBwVXJsLCBhcHBVYSkge1xcbiAgICAgICAgICAgICAgICBhZGRMaXN0ZW5lcihcXFwib25DbG9zZVxcXCIsICQudG9TdHJpbmcoKHVybCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJWYXIoJ25vdycpO1xcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJWYXIodXJsKTtcXG4gICAgICAgICAgICAgICAgfSwgTVlfVVJMKSk7XFxuICAgICAgICAgICAgICAgIGxldCBpdGVtcyA9IFtdLFxcbiAgICAgICAgICAgICAgICAgICAgaHRtbCA9IGdldFZhcihNWV9VUkwsIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgLy9kb21pbiA9IE1ZX1VSTC5zcGxpdChcXFwiIyNcXFwiKVsxXS5tYXRjaCgvKFtcXFxcU10qPzpcXFxcL1xcXFwvW1xcXFxTXSo/KVxcXFwvLylbMV07XFxuICAgICAgICAgICAgICAgIGlmIChodG1sID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICBodG1sID0gZmV0Y2goTVlfVVJMLnNwbGl0KFxcXCIjI1xcXCIpWzFdLCB7IGhlYWRlcnM6IHsgXFxcIlVzZXItQWdlbnRcXFwiOiBhcHBVYSB9IH0pO1xcbiAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1VSTCwgaHRtbCk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaHRtbCA9IEpTT04ucGFyc2UoaHRtbCk7XFxuXFxuICAgICAgICAgICAgICAgIC8v566A5LuLXFxuICAgICAgICAgICAgICAgIGxldCB7IHRpdGxlLCBwdWJ0aW1lLCB0cnVuaywgYXJlYSwgdHlwZSwgZGlyZWN0b3IsIGFjdG9yLCBpbWdfdXJsLCBpbnRybyB9ID0gaHRtbDtcXG4gICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUgKyBcXFwiKFxcXCIgKyBwdWJ0aW1lICsgXFxcIilcXFwiICsgXFxcIlxcXFxuXFxcIiArIGFyZWEuam9pbihcXFwiL1xcXCIpICsgXFxcIi9cXFwiICsgdHlwZS5qb2luKFxcXCIvXFxcIikgKyBcXFwiL1xcXCIgKyB0cnVuayxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IFxcXCLlr7zmvJQ6XFxcIiArIGRpcmVjdG9yLmpvaW4oXFxcIixcXFwiKSArIFxcXCJcXFxcblxcXCIgKyBcXFwi5Li75ryUOlxcXCIgKyBhY3Rvci5qb2luKFxcXCIsXFxcIiksXFxuICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBpbWdfdXJsLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzFfdmVydGljYWxfcGljX2JsdXInXFxuICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5Ymn5oOF566A5LuLOicsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBpbnRybyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgnaGlrZXI6Ly9lbXB0eSNub1JlY29yZEhpc3RvcnkjJykucnVsZSgoZGVzYykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChbe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogZGVzYyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsb25nX3RleHQnXFxuICAgICAgICAgICAgICAgICAgICAgICAgfV0pO1xcbiAgICAgICAgICAgICAgICAgICAgfSwgaW50cm8pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzEnXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAvL+aWreaPklxcbiAgICAgICAgICAgICAgICBsZXQgZG5lbiA9IGdldE15VmFyKFxcXCJkbmVuXFxcIiwgXFxcIjBcXFwiKTtcXG4gICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+aWreaPkjonICsgKGRuZW4gPT0gJzEnID8gJ+KAnOKAnOKcheKAneKAnScgOiAn4p2OJyksXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJycpLmxhenlSdWxlKChkbmVuKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRuZW4gPT0gJzEnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJkbmVuXFxcIiwgXFxcIjBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey56aB55So5pat5o+S6LCD55SoISc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoXFxcImRuZW5cXFwiLCBcXFwiMVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LlvIDlkK/mlq3mj5LosIPnlKghJ1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0sIGRuZW4pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzInXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn57q/6Lev6YWN572uJyxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHkjbm9SZWNvcmRIaXN0b3J5I0BydWxlPWpzOnRoaXMuZD1bXTtyZXF1aXJlKCdodHRwczovL2dpdGVhLmNvbS9BSTk1Ny9IaWtlci9yYXcvbS92L1JvdXRlLmpzJyk7Um91dGUuc2V0UGFyc2UoKTtzZXRSZXN1bHQoZCk7XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIC8vdXJsOlxcXCJoaWtlcjovL3BhZ2UvUm91dGU/cnVsZT1NeUZpZWxk4bSw4oG/JnR5cGU96K6+572uI25vUmVjb3JkSGlzdG9yeSNcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzInXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAvL+e6v+i3r+WIl+ihqFxcbiAgICAgICAgICAgICAgICBsZXQgdGFicyA9IE9iamVjdC5rZXlzKGh0bWwudmlkZW9saXN0KTtcXG4gICAgICAgICAgICAgICAgaWYgKGdldFZhcihcXFwibm93XFxcIiwgXFxcIlxcXCIpID09IFxcXCJcXFwiKSB7IHB1dFZhcihcXFwibm93XFxcIiwgdGFic1swXSkgfVxcbiAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi4oCc4oCc4oaT4oaR4oCd4oCdXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlAbGF6eVJ1bGU9LmpzOnB1dFZhcignYXBwbXR2c29ydCcsIGdldFZhcignYXBwbXR2c29ydCcsJzEnKT09JzEnPycwJzonMScpO3JlZnJlc2hQYWdlKGZhbHNlKTsndG9hc3Q6Ly/liIfmjaLmiJDlip8hJ1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpIGluIHRhYnMpIHtcXG4gICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRWYXIoXFxcIm5vd1xcXCIpID09IHRhYnNbaV0gPyBcXFwi4oCc4oCc4oCd4oCdXFxcIiArIHRhYnNbaV0uYm9sZCgpLmZvbnRjb2xvcihcXFwiI0ZBNzI5OFxcXCIpIDogdGFic1tpXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL2VtcHR5QGxhenlSdWxlPS5qczpwdXRWYXIoJ25vdycsJ1xcXCIgKyB0YWJzW2ldICsgXFxcIicpO3JlZnJlc2hQYWdlKGZhbHNlKTsndG9hc3Q6Ly/liIfmjaLmiJDlip8hJ1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJ1xcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvL+inhumikeWIl+ihqFxcbiAgICAgICAgICAgICAgICBsZXQgcHRhYiA9IGdldFZhcihcXFwibm93XFxcIiksXFxuICAgICAgICAgICAgICAgICAgICBsaXN0ID0gaHRtbC52aWRlb2xpc3RbcHRhYl07XFxuICAgICAgICAgICAgICAgIGxvZygn5b2T5YmN57q/6LevOicgKyBwdGFiKTtcXG4gICAgICAgICAgICAgICAgaWYgKGdldFZhcignYXBwbXR2c29ydCcsICcxJykgPT0gJzAnKSB7XFxuICAgICAgICAgICAgICAgICAgICBsaXN0LnJldmVyc2UoKTtcXG4gICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaiA9IDA7IGogPCBsaXN0Lmxlbmd0aDsgaisrKSB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgc3JjdXJsID0gbGlzdFtqXS51cmw7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoLzI5M2p4MS8udGVzdChzcmN1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc3JjdXJsID0gc3JjdXJsLnJlcGxhY2UoJzI5M2p4MScsICdqeCcpO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgvOGQ4cXxkaWxpa3R2fGhhb2thbmp1MXxjenR2fGZpdFxcXFw6OHxwcHpodS8udGVzdChhcHBVcmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc3JjdXJsID0gc3JjdXJsICsgJyZhcHA9MTAwMDAmYWNjb3VudD0yNzI3NzUwMjgmcGFzc3dvcmQ9cXEyNzI3NzUwMjgnO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgbGV0IHRpdGxlID0gbGlzdFtqXS50aXRsZTtcXG4gICAgICAgICAgICAgICAgICAgIC8vdGl0bGUgPSB0aXRsZS5tYXRjaCgvKOesrHxcXFxcZHwtKSoo6ZuGfOivnXzmnJ8pL2cpID8gdGl0bGUucmVwbGFjZSgv56ysfOmbhnzor5185pyfL2csICcnKSA6IHRpdGxlO1xcbiAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF80XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGV2YWwoSlNPTi5wYXJzZShmZXRjaChcXFwiaGlrZXI6Ly9wYWdlL2xhenlQYXJzZVxcXCIpKS5ydWxlKVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgc2V0UmVzdWx0KGl0ZW1zKTtcXG4gICAgICAgICAgICB9LCBhcHBVcmwsIGFwcFVhKTtcXG4gICAgICAgICAgICBsZXQgbGF6eVBhcnNlID0gJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCB2bGluayA9IHNyY3VybDtcXG4gICAgICAgICAgICAgICAgaWYgKC8odXJsfHZpZHx2KVxcXFw9Ly50ZXN0KHNyY3VybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZsaW5rID0gc3JjdXJsLnN1YnN0cmluZyhzcmN1cmwuc2VhcmNoKC8odXJsfHZpZHx2KVxcXFw9LykpLnNwbGl0KCc9JylbMV0uc3BsaXQoJyYnKVswXTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBsZXQgZW5EbiA9IGdldE15VmFyKFxcXCJkbmVuXFxcIiwgXFxcIjBcXFwiKSxcXG4gICAgICAgICAgICAgICAgICAgIHRlc3QxID0gdmxpbmsuc2VhcmNoKC95b3VrdXxtZ3R2fGl4aWd1YXxxcS5jb218cWl5aXxtaWd1fGJpbGliaWxpfHNvaHV8cHB0dnxsZXwxOTA1LmNvbS8pICE9IC0xLFxcbiAgICAgICAgICAgICAgICAgICAgdGVzdDIgPSB2bGluay5zZWFyY2goL0xUXFxcXC18Um9uZ1hpbmdWUlxcXFwtfHJlbnJlbm1pXFxcXC18eGZ5XFxcXC18c3VveW9cXFxcLmNjfGZlblxcXFwubGFvZGl8cnVpZmVuZ2xifHh1ZXJlblxcXFwtLykgIT0gLTE7XFxuICAgICAgICAgICAgICAgIGlmICgodGVzdDEgfHwgdGVzdDIpICYmIGVuRG4gPT0gJzEnKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgnaGlrZXI6Ly9lbXB0eScpLmxhenlSdWxlKCh2bGluaykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwi6LCD55So5pat5o+S6Kej5p6QLOinhumikemTvuaOpTpcXFwiICsgdmxpbmspO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoXFxcImxldCBjb25maWcgPVxcXCIgKyBmZXRjaChcXFwiaGlrZXI6Ly9maWxlcy9jYWNoZS9NeVBhcnNlU2V0Lmpzb25cXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChmZXRjaChjb25maWcuY2opKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHZsaW5rKTtcXG4gICAgICAgICAgICAgICAgICAgIH0sIHZsaW5rKVxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQoXFxcImhpa2VyOi8vZW1wdHlcXFwiKS5sYXp5UnVsZSgocHRhYiwgc3JjdXJsLCBhcHBVcmwpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIuS9v+eUqOm7mOiupOino+aekCzop4bpopHpk77mjqU6XFxcIiArIHNyY3VybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy/liqjmgIHop6PmnpDku6PnoIHlvIDlp4tcXG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBjaGFuZ2VWaWRlb1VybCh1cmwpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/mlLnlj5jnibnlrprlnLDlnYDnmoRSZWZlcmVyXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1cmwuaW5jbHVkZXMoXFxcIndrZmlsZVxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyAnO3tSZWZlcmVyQGh0dHBzOi8vZmFudHVhbi53a2ZpbGUuY29tL30nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHB0YWIgPT0gJ2JpbGliaWxpJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gdXJsICsgJzt7UmVmZXJlckBodHRwczovL3d3dy5iaWxpYmlsaS5jb20vJiZVc2VyLUFnZW50QE1vemlsbGEvNS4wfSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocHRhYiA9PSAnbWd0dicpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybCArICc7e1JlZmVyZXJAd3d3Lm1ndHYuY29tJiZVc2VyLUFnZW50QE1vemlsbGEvNS4wfSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodXJsLmluY2x1ZGVzKFxcXCJvamJrXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybCArICc7e1JlZmVyZXJAaHR0cHM6Ly9iYWsub2pia2p4LmNvbS99JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+i/lOWbnuinhumikemTvuaOpVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXVybC5pbmNsdWRlcyhcXFwiaHR0cFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIumTvuaOpeS4jeaYr+S7pWh0dHDlvIDlpLQo5Y+v6IO95Yqg5a+G5LqGKVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9cXFxcLm0zdTgvLnRlc3QodXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWNoZU0zdTgodXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybCArICcjaXNWaWRlbz10cnVlIyc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9cXFxcLm0zdTh8XFxcXC5tcDR8b2JqXFxcXC90b3N8bmV0ZWFzZVxcXFwuY29tLy50ZXN0KHNyY3VybCkgJiYgL2h0dHAvLnRlc3Qoc3JjdXJsKSAmJiAhL1xcXFwuaHRtbC8udGVzdChzcmN1cmwpICYmICEvKHVybHx2fHZpZClcXFxcPS8udGVzdChzcmN1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIS9mZW5cXFxcLmxhb2RpfHJ1aWZlbmdsYnxzdW95b1xcXFwuY2MvLnRlc3Qoc3JjdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwi5qOA5rWL5Yiw6LWE5rqQ5Zyw5Z2A5Y+v6IO95piv6KeG6aKR6ZO+5o6lXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoYW5nZVZpZGVvVXJsKHNyY3VybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8tLS0t5YiG5Ymy57q/LS0tLS8vXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzY29kZSA9IEpTT04ucGFyc2UoZmV0Y2goc3JjdXJsLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBNT0JJTEVfVUFcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWRpcmVjdDogZmFsc2UsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoU3RhdHVzQ29kZTogdHJ1ZVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v6L+U5Zue6YeN5a6a5ZCR55qE6ZO+5o6lIFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2NvZGUuc3RhdHVzQ29kZSA9PSAnMzAyJyB8fCBzY29kZS5zdGF0dXNDb2RlID09ICczMDEnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVkdXJsID0gc2NvZGUuaGVhZGVycy5sb2NhdGlvblswXS5yZXBsYWNlKC9cXFxcXFxcXC9nLCAnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coJ+mHjeWumuWQkTonICsgcmVkdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghLyh1cmx8dmlkfHYpXFxcXD0vLnRlc3QocmVkdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGFuZ2VWaWRlb1VybChyZWR1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyplbHNlIGlmICgvXFxcXD1odHRwLy50ZXN0KHJlZHVybCkgJiYgL1xcXFwubTN1OHxcXFxcLm1wNHxcXFxcLmZsdi8udGVzdChyZWR1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHVybCA9IHJlZHVybC5zdWJzdHJpbmcocmVkdXJsLmluZGV4T2YoJz1odHRwJykgKyAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0qL1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvZGUuYm9keSA9IGZldGNoKHJlZHVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/lvIDlp4vll4XmjqJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSBzY29kZS5ib2R5O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoLzQwNCBOb3QgRm91bmR85aSH5qGI5ZCO5Y+v57un57ut6K6/6ZeuLy50ZXN0KGh0bWwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIjQwNOS6hlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9cXFxcPGJvZHkvLnRlc3QoaHRtbCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKFtcXFwi5byA5aeL6KeG6aKR5ZeF5o6iXFxcIiwgXFxcIuaJk+W8gOino+aekOe9kemhtVxcXCIsIFxcXCLkvb/nlKjlhoXnva7op6PmnpBcXFwiXSwgMSwgXFxcIuajgOa1i+WIsOino+aekOS4uue9kemhteaVsOaNrlxcXCIpLnNlbGVjdCgocHRhYiwgc3JjdXJsLCBhcHBVcmwpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQgPT0gXFxcIuW8gOWni+inhumikeWXheaOolxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZUNhY2hlKCdodHRwczovL2NvZGUuYWxpeXVuLmNvbS9semsyMzU1OS9QdWJsaWNSdWxlL3Jhdy9tYXN0ZXIveDVydWxlLmpzJywgMjQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4geDVydWxlKHNyY3VybCwgc3JjdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09IFxcXCLmiZPlvIDop6PmnpDnvZHpobVcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwid2ViOi8vXFxcIiArIHNyY3VybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09IFxcXCLkvb/nlKjlhoXnva7op6PmnpBcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2bGluayA9IHNyY3VybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC8odXJsfHZpZHx2KVxcXFw9Ly50ZXN0KHNyY3VybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZsaW5rID0gc3JjdXJsLnN1YnN0cmluZyhzcmN1cmwuc2VhcmNoKC8odXJsfHZpZHx2KVxcXFw9LykpLnNwbGl0KCc9JylbMV0uc3BsaXQoJyYnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIuS9v+eUqOWGhee9ruino+aekCzop4bpopHpk77mjqU6XFxcIiArIHZsaW5rKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0xvYWRpbmcoXFxcIuato+WcqOi/m+ihjOino+aekC4uLlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZXZhbChKU09OLnBhcnNlKGZldGNoKFxcXCJoaWtlcjovL3BhZ2UvbXlQYXJzZVxcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBwdGFiLCBzcmN1cmwsIGFwcFVybClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vbG9nKCflsJ3or5Xku45qc29u5pWw5o2u6I635Y+WJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwdXJsID0gSlNPTi5wYXJzZShodG1sKS51cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoYW5nZVZpZGVvVXJsKHB1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qbGV0IHB1cmwgPSBodG1sLm1hdGNoKC9bXFxcXCdcXFxcXFxcIl11cmxbXFxcXCdcXFxcXFxcIl06Lio/W1xcXFwnXFxcXFxcXCJdKC4qPylbXFxcXCdcXFxcXFxcIl0vKVsxXS5yZXBsYWNlKC9cXFxcXFxcXC9nLCAnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoYW5nZVZpZGVvVXJsKHB1cmwpOyovXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCfop6PmnpDlj6/og73liqDlr4bkuoYnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKCfmnKrog73miJDlip/ojrflj5bop4bpopHlnLDlnYA6JyArIGUubWVzc2FnZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2bGluayA9IHNyY3VybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC8odXJsfHZpZHx2KVxcXFw9Ly50ZXN0KHNyY3VybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZsaW5rID0gc3JjdXJsLnN1YnN0cmluZyhzcmN1cmwuc2VhcmNoKC8odXJsfHZpZHx2KVxcXFw9LykpLnNwbGl0KCc9JylbMV0uc3BsaXQoJyYnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIuWwneivleS9v+eUqOWGhee9ruino+aekCzop4bpopHpk77mjqU6XFxcIiArIHZsaW5rKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGV2YWwoSlNPTi5wYXJzZShmZXRjaChcXFwiaGlrZXI6Ly9wYWdlL215UGFyc2VcXFwiKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8v5Yqo5oCB6Kej5p6Q5Luj56CB57uT5p2fXFxuICAgICAgICAgICAgICAgICAgICB9LCBwdGFiLCBzcmN1cmwsIGFwcFVybCk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBwYWdlcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgbmFtZTogXFxcIlRW5YiX6KGoXFxcIixcXG4gICAgICAgICAgICAgICAgcGF0aDogXFxcInR2bGlzdGRhdGFcXFwiLFxcbiAgICAgICAgICAgICAgICBydWxlOiBydWxlX3R2bGlzdGRhdGFcXG4gICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgIG5hbWU6IFxcXCJUVumAiembhlxcXCIsXFxuICAgICAgICAgICAgICAgIHBhdGg6IFxcXCJ0dm1vdmxpc3RcXFwiLFxcbiAgICAgICAgICAgICAgICBydWxlOiBydWxlX3R2bW92bGlzdFxcbiAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgbmFtZTogXFxcIuinhumikeino+aekFxcXCIsXFxuICAgICAgICAgICAgICAgIHBhdGg6IFxcXCJsYXp5UGFyc2VcXFwiLFxcbiAgICAgICAgICAgICAgICBydWxlOiBsYXp5UGFyc2VcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgZmluZF9ydWxlID0gXFxcImpzOlxcXCIgKyAkLnRvU3RyaW5nKGZ1bmN0aW9uKGNoYW5nZVVybCwgYXBwVXJsLCBhcHBVYSkge1xcbiAgICAgICAgICAgICAgICBsZXQgaXRlbXMgPSBbXTtcXG4gICAgICAgICAgICAgICAgLy/ojrflj5bliIbnsbvlhoXlrrlcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB0eXBlSnNvbiA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGFwcFVybC5pbmNsdWRlcyhcXFwiYXBpLnBocC9hcHBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXBlVXJsID0gY2hhbmdlVXJsKGFwcFVybCArIFxcXCJuYXY/dG9rZW49XFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHR5cGNvZGUgPSByZXF1ZXN0KHR5cGVVcmwsIHsgaGVhZGVyczogeyBcXFwiVXNlci1BZ2VudFxcXCI6IGFwcFVhIH0gfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGNvZGUuaW5kZXhPZign5qOA5rWL5LitJykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwY29kZSA9IGZldGNoKHR5cGVVcmwgKyAnJmJ0d2FmJyArIHR5cGNvZGUubWF0Y2goL2J0d2FmKC4qPylcXFxcXFxcIi8pWzFdLCB7IGhlYWRlcnM6IHsgXFxcIlVzZXItQWdlbnRcXFwiOiBhcHBVYSB9IH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlSnNvbiA9IEpTT04ucGFyc2UodHlwY29kZSkubGlzdDtcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXCJ4Z2FwcFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHR5cGVVcmwgPSBjaGFuZ2VVcmwoYXBwVXJsICsgXFxcIm5hdj90b2tlbj1cXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdHlwY29kZSA9IHJlcXVlc3QodHlwZVVybCwgeyBoZWFkZXJzOiB7IFxcXCJVc2VyLUFnZW50XFxcIjogYXBwVWEgfSB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwY29kZS5pbmRleE9mKCfmo4DmtYvkuK0nKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBjb2RlID0gZmV0Y2godHlwZVVybCArICcmYnR3YWYnICsgdHlwY29kZS5tYXRjaCgvYnR3YWYoLio/KVxcXFxcXFwiLylbMV0sIHsgaGVhZGVyczogeyBcXFwiVXNlci1BZ2VudFxcXCI6IGFwcFVhIH0gfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVKc29uID0gSlNPTi5wYXJzZSh0eXBjb2RlKS5kYXRhO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChhcHBVcmwuaW5jbHVkZXMoXFxcIi52b2RcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXBlVXJsID0gY2hhbmdlVXJsKGFwcFVybCArIFxcXCIvdHlwZXNcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdHlwY29kZSA9IHJlcXVlc3QodHlwZVVybCwgeyBoZWFkZXJzOiB7IFxcXCJVc2VyLUFnZW50XFxcIjogYXBwVWEgfSB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwY29kZS5pbmRleE9mKCfmo4DmtYvkuK0nKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBjb2RlID0gZmV0Y2godHlwZVVybCArICc/YnR3YWYnICsgdHlwY29kZS5tYXRjaCgvYnR3YWYoLio/KVxcXFxcXFwiLylbMV0sIHsgaGVhZGVyczogeyBcXFwiVXNlci1BZ2VudFxcXCI6IGFwcFVhIH0gfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVKc29uID0gSlNPTi5wYXJzZSh0eXBjb2RlKS5kYXRhLmxpc3Q7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAvL+iOt+WPluWIhuexu+WIl+ihqFxcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCB0eXBlSnNvbi5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8v5YiG57G76KeG6aKR5Zyw5Z2AXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHR5dXJsID0gXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVBcnJheSA9IE9iamVjdC5rZXlzKHR5cGVKc29uW2ldLnR5cGVfZXh0ZW5kKS5maWx0ZXIoY3VyID0+IFtcXFwiY2xhc3NcXFwiLCBcXFwiYXJlYVxcXCIsIFxcXCJsYW5nXFxcIiwgXFxcInllYXJcXFwiXS5pbmNsdWRlcyhjdXIpKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZVVybCA9IHR5cGVBcnJheS5tYXAoY3VyID0+IGN1ciArIFxcXCI9ZlxcXCIgKyBjdXIpLmpvaW4oXFxcIiZcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXBwVXJsLmluY2x1ZGVzKCdhcGkucGhwL2FwcCcpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5dXJsID0gYXBwVXJsICsgJ3ZpZGVvP3RpZD0nICsgdHlwZUpzb25baV0udHlwZV9pZCArICcmcGFnZT1meXBhZ2UmdG9rZW49JicgKyB0eXBlVXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYXBwVXJsLmluY2x1ZGVzKCd4Z2FwcCcpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5dXJsID0gYXBwVXJsICsgJ3ZpZGVvP3RpZD0nICsgdHlwZUpzb25baV0udHlwZV9pZCArICcmcGFnZT1meXBhZ2UmJyArIHR5cGVVcmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChhcHBVcmwuaW5jbHVkZXMoXFxcIi52b2RcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoL2lvcGVueXVuLy50ZXN0KGFwcFVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5dXJsID0gYXBwVXJsICsgJy9saXN0P3R5cGU9JyArIHR5cGVKc29uW2ldLnR5cGVfaWQgKyAnJnBhZ2U9ZnlwYWdlJmJ5PWZieSZsaW1pdD05JicgKyB0eXBlVXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHl1cmwgPSBhcHBVcmwgKyAnP3R5cGU9JyArIHR5cGVKc29uW2ldLnR5cGVfaWQgKyAnJnBhZ2U9ZnlwYWdlJmJ5PWZieSZsaW1pdD05JicgKyB0eXBlVXJsO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8v5p6E5bu65Yqo5oCB5YiG57G7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0eXBlSnNvbltpXS50eXBlX25hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJChcXFwiaGlrZXI6Ly9lbXB0eSMjXFxcIiArIHR5dXJsKS5ydWxlKChhcHBVcmwsIHR5cGVfZXh0ZW5kLCBjaGFuZ2VVcmwsIGFwcFVhKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRMaXN0ZW5lcihcXFwib25DbG9zZVxcXCIsIFxcXCJjbGVhclZhcignZmlsdGVyJylcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpdGVtcyA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE1ZX1BBR0UgPT0gMSkgeyAvL+WKqOaAgeWIhuexu1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBrZXlzID0ge30sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbHRlciA9IHt9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJOYW1lcyA9IHsgY2xhc3M6IFxcXCLnsbvlnotcXFwiLCBhcmVhOiBcXFwi5Zyw5Yy6XFxcIiwgbGFuZzogXFxcIuivreiogFxcXCIsIHllYXI6IFxcXCLlubTku71cXFwiLCBzdGFyOiBcXFwi5piO5pifXFxcIiwgZGlyZWN0b3I6IFxcXCLlr7zmvJRcXFwiLCBzdGF0ZTogXFxcIueKtuaAgVxcXCIsIHZlcnNpb246IFxcXCLniYjmnKxcXFwiIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHRGaWx0ZXIgPSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmY2xhc3M6IFtcXFwi5YWo6YOo57G75Z6LX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gICAgICAga2V5c1tcXFwiZlxcXCIgKyBrZXldID0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtleXNbXFxcImZieVxcXCJdID0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBmaWx0ZXJOYW1lID0gXFxcIuWFqOmDqFxcXCIgKyBmaWx0ZXJOYW1lc1trZXldO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJbXFxcImZcXFwiICsga2V5XSA9IFtmaWx0ZXJOYW1lXS5jb25jYXQodHlwZV9leHRlbmRba2V5XS5zcGxpdChcXFwiLFxcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZpbHRlcltcXFwiZlxcXCIgKyBrZXldLmxlbmd0aCA9PSAyKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWx0ZXJbXFxcImZcXFwiICsga2V5XSA9IGRlZmF1bHRGaWx0ZXJbXFxcImZcXFwiICsga2V5XVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZ2V0VmFyKFxcXCJmaWx0ZXJcXFwiLCBcXFwiXFxcIikpIHsgcHV0VmFyKFxcXCJmaWx0ZXJcXFwiLCBKU09OLnN0cmluZ2lmeShrZXlzKSkgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB0ZW1wID0gSlNPTi5wYXJzZShnZXRWYXIoXFxcImZpbHRlclxcXCIpKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sb3IgPSBcXFwiI0ZBNzI5OFxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaXRlbSBpbiBmaWx0ZXIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaW5kZXggPSAwOyBpbmRleCA8IGZpbHRlcltpdGVtXS5sZW5ndGg7IGluZGV4KyspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0ZW1wW2l0ZW1dID09IFxcXCJcXFwiID8gKGluZGV4ID09PSAwID8gXFxcIuKAnOKAnOKAneKAnVxcXCIgKyBmaWx0ZXJbaXRlbV1bMF0uYm9sZCgpLmZvbnRjb2xvcihjb2xvcikgOiBmaWx0ZXJbaXRlbV1baW5kZXhdKSA6ICh0ZW1wW2l0ZW1dID09IGZpbHRlcltpdGVtXVtpbmRleF0gPyBcXFwi4oCc4oCc4oCd4oCdXFxcIiArIGZpbHRlcltpdGVtXVtpbmRleF0uYm9sZCgpLmZvbnRjb2xvcihjb2xvcikgOiBmaWx0ZXJbaXRlbV1baW5kZXhdKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChkZXMsIG5hbWUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRlbXAgPSBKU09OLnBhcnNlKGdldFZhcihcXFwiZmlsdGVyXFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZW1wW25hbWVdID0gZGVzLmluZGV4T2YoXFxcIuWFqOmDqFxcXCIpICE9IC0xID8gXFxcIlxcXCIgOiBkZXM7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihcXFwiZmlsdGVyXFxcIiwgSlNPTi5zdHJpbmdpZnkodGVtcCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBmaWx0ZXJbaXRlbV1baW5kZXhdLCBpdGVtKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHsgY29sX3R5cGU6IFxcXCJibGFua19ibG9ja1xcXCIgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGJ5ID0geyDpu5jorqTpobrluo86IFxcXCJcXFwiLCDmnIDmlrA6IFxcXCJ0aW1lXFxcIiwg5pyA54OtOiBcXFwiaGl0c1xcXCIsIOivhOWIhjogXFxcInNjb3JlXFxcIiB9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhcHBVcmwuaW5kZXhPZignYXBpLnBocC9hcHAnKSA9PSAtMSAmJiBhcHBVcmwuaW5kZXhPZigneGdhcHAnKSA9PSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpdGVtIGluIGJ5KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogdGVtcFtcXFwiZmJ5XFxcIl0gPT0gYnlbaXRlbV0gPyBcXFwi4oCc4oCc4oCd4oCdXFxcIiArIGl0ZW0uYm9sZCgpLmZvbnRjb2xvcihjb2xvcikgOiBpdGVtLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwic2Nyb2xsX2J1dHRvblxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGRlcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdGVtcCA9IEpTT04ucGFyc2UoZ2V0VmFyKFxcXCJmaWx0ZXJcXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBbXFxcImZieVxcXCJdID0gZGVzO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoXFxcImZpbHRlclxcXCIsIEpTT04uc3RyaW5naWZ5KHRlbXApKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgYnlbaXRlbV0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdGVtcCA9IEpTT04ucGFyc2UoZ2V0VmFyKFxcXCJmaWx0ZXJcXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gTVlfVVJMLnNwbGl0KFxcXCIjI1xcXCIpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaXRlbSBpbiB0ZW1wKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gdXJsLnJlcGxhY2UoaXRlbSwgdGVtcFtpdGVtXSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSBjaGFuZ2VVcmwodXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZXNjb2RlID0gZmV0Y2godXJsLCB7IGhlYWRlcnM6IHsgXFxcIlVzZXItQWdlbnRcXFwiOiBhcHBVYSB9IH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc2NvZGUuaW5kZXhPZign5qOA5rWL5LitJykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNjb2RlID0gZmV0Y2godXJsICsgJyZidHdhZicgKyByZXNjb2RlLm1hdGNoKC9idHdhZiguKj8pXFxcXFxcXCIvKVsxXSwgeyBoZWFkZXJzOiB7IFxcXCJVc2VyLUFnZW50XFxcIjogYXBwVWEgfSB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gSlNPTi5wYXJzZShyZXNjb2RlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL3BhZ2UvYXBwbGlzdGRhdGEnLCB7fSkpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwi6KeG6aKR5YiX6KGo5Ye66ZSZOlxcXCIgKyBlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0UmVzdWx0KGl0ZW1zKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgYXBwVXJsLCB0eXBlSnNvbltpXS50eXBlX2V4dGVuZCwgY2hhbmdlVXJsLCBhcHBVYSksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnZmxleF9idXR0b24nXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKCfpppbpobXliIbnsbvlh7rplJk6JyArIGUubWVzc2FnZSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy/ojrflj5bmjqjojZDop4bpopHliJfooahcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBNWV9VUkwuc3BsaXQoJyMjJylbMV07XFxuICAgICAgICAgICAgICAgICAgICB1cmwgPSBjaGFuZ2VVcmwodXJsKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gcmVxdWVzdCh1cmwsIHsgaGVhZGVyczogeyBcXFwiVXNlci1BZ2VudFxcXCI6IGFwcFVhIH0gfSk7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoaHRtbC5pbmRleE9mKCfmo4DmtYvkuK0nKSAhPSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGh0bWwgPSBmZXRjaCh1cmwgKyAnJmJ0d2FmJyArIGh0bWwubWF0Y2goL2J0d2FmKC4qPylcXFxcXFxcIi8pWzFdLCB7IGhlYWRlcnM6IHsgXFxcIlVzZXItQWdlbnRcXFwiOiBhcHBVYSB9IH0pO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgaHRtbCA9IEpTT04ucGFyc2UoaHRtbCk7XFxuICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9hcHBpbmRleGRhdGEnKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxvZygn6aaW6aG15o6o6I2Q5Ye66ZSZOicgKyBlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHNldFJlc3VsdChpdGVtcyk7XFxuICAgICAgICAgICAgfSwgY2hhbmdlVXJsLCBhcHBVcmwsIGFwcFVhKVxcblxcbiAgICAgICAgICAgIGxldCBydWxlX2FwcGxpc3RkYXRhID0gJC50b1N0cmluZyhmdW5jdGlvbigpIHtcXG4gICAgICAgICAgICAgICAgbGV0IGxpc3QgPSBbXTtcXG4gICAgICAgICAgICAgICAgaWYgKGFwcFVybC5pbmNsdWRlcygnYXBpLnBocC9hcHAnKSkge1xcbiAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGh0bWwubGlzdDtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChhcHBVcmwuaW5jbHVkZXMoJ3hnYXBwJykpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QgPSBodG1sLmRhdGE7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXCIudm9kXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QgPSBodG1sLmRhdGEubGlzdDtcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxpc3QubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB7IHZvZF9uYW1lLCB2b2RfcGljLCB2b2RfaWQsIHZvZF9yZW1hcmtzIH0gPSBsaXN0W2ldO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGxpbmsgPSBcXFwiXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChhcHBVcmwuaW5jbHVkZXMoJ2FwaS5waHAvYXBwJykgfHwgYXBwVXJsLmluY2x1ZGVzKCd4Z2FwcCcpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGluayA9IGFwcFVybCArICd2aWRlb19kZXRhaWw/aWQ9JyArIHZvZF9pZCArICcmdG9rZW49JztcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXCIudm9kXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0ZSA9IG5ldyBEYXRlKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGluayA9IGFwcFVybCArICcvZGV0YWlsP3ZvZF9pZD0nICsgdm9kX2lkICsgJyZyZWxfbGltaXQ9MTAma2V5PScgKyAoZGF0ZS5nZXRNb250aCgpICsgMSkgKyAoZGF0ZS5nZXREYXRlKCkgPCAxMCA/ICcwJyArIGRhdGUuZ2V0RGF0ZSgpIDogZGF0ZS5nZXREYXRlKCkpO1xcbiAgICAgICAgICAgICAgICAgICAgfTtcXG5cXG4gICAgICAgICAgICAgICAgICAgIGlmICgvaW9wZW55dW4vLnRlc3QoYXBwVXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpbmsgPSBhcHBVcmwgKyAnL2RldGFpbElEP3ZvZF9pZD0nICsgdm9kX2lkICsgJyZyZWxfbGltaXQ9MTAnO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHZvZF9uYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IHZvZF9waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiB2b2RfcmVtYXJrcyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzNfbWFycXVlZScsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKFxcXCIjaW1tZXJzaXZlVGhlbWUjaGlrZXI6Ly9lbXB0eSMjXFxcIiArIGxpbmspLnJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKGZldGNoKCdoaWtlcjovL3BhZ2UvYXBwbW92bGlzdCcpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCLlvbHniYfor6bmg4Xlh7rplJk6XFxcIiArIGUubWVzc2FnZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRSZXN1bHQoW10pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBsZXQgcnVsZV9hcHBpbmRleGRhdGEgPSAkLnRvU3RyaW5nKGZ1bmN0aW9uKCkge1xcbiAgICAgICAgICAgICAgICBsZXQgbGlzdCA9IFtdO1xcbiAgICAgICAgICAgICAgICBpZiAoYXBwVXJsLmluY2x1ZGVzKCdhcGkucGhwL2FwcCcpKSB7XFxuICAgICAgICAgICAgICAgICAgICBsaXN0ID0gaHRtbC5saXN0O1xcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGFwcFVybC5pbmNsdWRlcygneGdhcHAnKSkge1xcbiAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGh0bWwuZGF0YTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChhcHBVcmwuaW5jbHVkZXMoXFxcIi52b2RcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGh0bWwuZGF0YS5saXN0O1xcbiAgICAgICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbGlzdC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGxpc3RzID0gW10sXFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZW5hbWUgPSBcXFwiXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChhcHBVcmwuaW5jbHVkZXMoJ2FwaS5waHAvYXBwJykgfHwgYXBwVXJsLmluY2x1ZGVzKCd4Z2FwcCcpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGlzdHMgPSBsaXN0W2ldLnZsaXN0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVuYW1lID0gbGlzdFtpXS50eXBlX25hbWU7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGFwcFVybC5pbmNsdWRlcyhcXFwiLnZvZFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGlzdHMgPSBsaXN0W2ldLnZvZF9saXN0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVuYW1lID0gbGlzdFtpXS52b2RfdHlwZV9uYW1lO1xcblxcbiAgICAgICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHR5cGVuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF8xJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuXFxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IGxpc3RzLmxlbmd0aDsgaisrKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHsgdm9kX25hbWUsIHZvZF9waWMsIHZvZF9pZCwgdm9kX3JlbWFya3MgfSA9IGxpc3RzW2pdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsaW5rID0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFwcFVybC5pbmNsdWRlcygnYXBpLnBocC9hcHAnKSB8fCBhcHBVcmwuaW5jbHVkZXMoJ3hnYXBwJykpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluayA9IGFwcFVybCArICd2aWRlb19kZXRhaWw/aWQ9JyArIHZvZF9pZCArICcmdG9rZW49JmtleT0nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXCIudm9kXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGUgPSBuZXcgRGF0ZSgpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5rID0gYXBwVXJsICsgJy9kZXRhaWw/dm9kX2lkPScgKyB2b2RfaWQgKyAnJnJlbF9saW1pdD0xMCZrZXk9JyArIChkYXRlLmdldE1vbnRoKCkgKyAxKSArIChkYXRlLmdldERhdGUoKSA8IDEwID8gJzAnICsgZGF0ZS5nZXREYXRlKCkgOiBkYXRlLmdldERhdGUoKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoL2lvcGVueXVuLy50ZXN0KGFwcFVybCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluayA9IGFwcFVybCArICcvZGV0YWlsSUQ/dm9kX2lkPScgKyB2b2RfaWQgKyAnJnJlbF9saW1pdD0xMCc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogdm9kX25hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IHZvZF9waWMgKyAnQFJlZmVyZXI9JyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogdm9kX3JlbWFya3MsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfM19tYXJxdWVlJyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKFxcXCIjaW1tZXJzaXZlVGhlbWUjaGlrZXI6Ly9lbXB0eSMjXFxcIiArIGxpbmspLnJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9hcHBtb3ZsaXN0JykpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwi5b2x54mH6K+m5oOF5Ye66ZSZOlxcXCIgKyBlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChbXSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIGxldCBydWxlX2FwcG1vdmxpc3QgPSAkLnRvU3RyaW5nKGZ1bmN0aW9uKGNoYW5nZVVybCwgYXBwVXJsLCBhcHBVYSkge1xcbiAgICAgICAgICAgICAgICBhZGRMaXN0ZW5lcihcXFwib25DbG9zZVxcXCIsICQudG9TdHJpbmcoKHVybCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJWYXIoJ2FwcG5vdycpO1xcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJWYXIodXJsKTtcXG4gICAgICAgICAgICAgICAgfSwgTVlfVVJMKSk7XFxuICAgICAgICAgICAgICAgIGxldCBpdGVtcyA9IFtdLFxcbiAgICAgICAgICAgICAgICAgICAgaHRtbCA9IGdldFZhcihNWV9VUkwsIFxcXCJcXFwiKSxcXG4gICAgICAgICAgICAgICAgICAgIGRhdGEgPSB7fTtcXG4gICAgICAgICAgICAgICAgaWYgKGh0bWwgPT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSBNWV9VUkwuc3BsaXQoXFxcIiMjXFxcIilbMV07XFxuICAgICAgICAgICAgICAgICAgICB1cmwgPSBjaGFuZ2VVcmwodXJsKTtcXG4gICAgICAgICAgICAgICAgICAgIGh0bWwgPSBmZXRjaCh1cmwsIHsgaGVhZGVyczogeyBcXFwiVXNlci1BZ2VudFxcXCI6IGFwcFVhIH0gfSk7XFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoTVlfVVJMLCBodG1sKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXCJ4Z2FwcFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICBkYXRhID0gSlNPTi5wYXJzZShodG1sKS5kYXRhLnZvZF9pbmZvO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgZGF0YSA9IEpTT04ucGFyc2UoaHRtbCkuZGF0YTtcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICAvL+eugOS7i1xcbiAgICAgICAgICAgICAgICBsZXQgeyB2b2RfbmFtZSwgdm9kX3BpYywgdm9kX2NvbnRlbnQsIHZvZF9jbGFzcywgdm9kX3JlbWFya3MsIHZvZF9kaXJlY3Rvciwgdm9kX2FjdG9yLCB2b2RfYXJlYSwgdm9kX2xhbmcsIHZvZF95ZWFyIH0gPSBkYXRhO1xcbiAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB2b2RfbmFtZSArICdcXFxcbicgKyB2b2RfY2xhc3MgKyBcXFwiLFxcXCIgKyB2b2RfcmVtYXJrcyArIFxcXCJcXFxcblxcXCIgKyB2b2RfYXJlYSArIFxcXCIvXFxcIiArIHZvZF9sYW5nICsgXFxcIi9cXFwiICsgdm9kX3llYXIsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwi5a+85ryUOlxcXCIgKyB2b2RfZGlyZWN0b3IgKyBcXFwiXFxcXG7kuLvmvJQ6XFxcIiArIHZvZF9hY3RvcixcXG4gICAgICAgICAgICAgICAgICAgIHBpY191cmw6IHZvZF9waWMsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL2VtcHR5XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV92ZXJ0aWNhbF9waWNfYmx1cidcXG4gICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfliafmg4XnroDku4s6JyxcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IHZvZF9jb250ZW50LFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCdoaWtlcjovL2VtcHR5I25vUmVjb3JkSGlzdG9yeSMnKS5ydWxlKChkZXNjKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0UmVzdWx0KFt7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBkZXNjLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xvbmdfdGV4dCdcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XSk7XFxuICAgICAgICAgICAgICAgICAgICB9LCB2b2RfY29udGVudCksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMSdcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIC8v5pat5o+SXFxuICAgICAgICAgICAgICAgIGxldCBkbmVuID0gZ2V0TXlWYXIoXFxcImRuZW5cXFwiLCBcXFwiMFxcXCIpO1xcbiAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5pat5o+SOicgKyAoZG5lbiA9PSAnMScgPyAn4oCc4oCc4pyF4oCd4oCdJyA6ICfinY4nKSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoZG5lbikgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkbmVuID09ICcxJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwiZG5lblxcXCIsIFxcXCIwXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+W3suemgeeUqOaWreaPkuiwg+eUqCEnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJkbmVuXFxcIiwgXFxcIjFcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bey5byA5ZCv5pat5o+S6LCD55SoISdcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9LCBkbmVuKSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF8yJ1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+e6v+i3r+mFjee9ricsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL2VtcHR5I25vUmVjb3JkSGlzdG9yeSNAcnVsZT1qczp0aGlzLmQ9W107cmVxdWlyZSgnaHR0cHM6Ly9naXRlYS5jb20vQUk5NTcvSGlrZXIvcmF3L20vdi9Sb3V0ZS5qcycpO1JvdXRlLnNldFBhcnNlKCk7c2V0UmVzdWx0KGQpO1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICAvL3VybDogXFxcImhpa2VyOi8vcGFnZS9Sb3V0ZT9ydWxlPU15RmllbGThtLDigb8mdHlwZT3orr7nva4jbm9SZWNvcmRIaXN0b3J5I1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMidcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIC8v57q/6Lev5YiX6KGoXFxuXFxuICAgICAgICAgICAgICAgIGxldCBjb250cyA9IFtdLFxcbiAgICAgICAgICAgICAgICAgICAgdGFicyA9IFtdO1xcbiAgICAgICAgICAgICAgICBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXCJhcGkucGhwL2FwcFxcXCIpIHx8IGFwcFVybC5pbmNsdWRlcyhcXFwieGdhcHBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICAgICAgY29udHMgPSBkYXRhLnZvZF91cmxfd2l0aF9wbGF5ZXI7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBjb250cyA9IGRhdGEudm9kX3BsYXlfbGlzdDtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZiAoY29udHMubGVuZ3RoIDwgMSkge1xcbiAgICAgICAgICAgICAgICAgICAgY29udHMgPSBkYXRhLnZvZF9wbGF5X3VybC5zcGxpdCgnJCQkJyk7XFxuICAgICAgICAgICAgICAgICAgICB0YWJzID0gZGF0YS52b2RfcGxheV9mcm9tLnNwbGl0KCckJCQnKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAvL+e6v+i3r+WQjeensFxcbiAgICAgICAgICAgICAgICBsZXQgcHRhYiA9IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgcHRhYm5hbWUgPSBcXFwiXFxcIjtcXG4gICAgICAgICAgICAgICAgaWYgKGdldFZhcihcXFwiYXBwbm93XFxcIiwgXFxcIlxcXCIpID09IFxcXCJcXFwiKSB7IHB1dFZhcihcXFwiYXBwbm93XFxcIiwgXFxcIjBcXFwiKSB9XFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgY29udHMubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCBzcHRhYiA9IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhYm5hbWUgPSBcXFwiXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChhcHBVcmwuaW5jbHVkZXMoXFxcImFwaS5waHAvYXBwXFxcIikgfHwgYXBwVXJsLmluY2x1ZGVzKFxcXCJ4Z2FwcFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgc3B0YWIgPSBjb250c1tpXS5jb2RlID8gY29udHNbaV0uY29kZSA6IHRhYnNbaV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGFibmFtZSA9IGNvbnRzW2ldLm5hbWUgfHwgc3B0YWI7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNwdGFiID0gY29udHNbaV0uZnJvbSA/IGNvbnRzW2ldLmZyb20gOiB0YWJzW2ldO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRhYm5hbWUgPSBjb250c1tpXS5wbGF5ZXJfaW5mbyA/IGNvbnRzW2ldLnBsYXllcl9pbmZvLnNob3cgOiBzcHRhYjtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRWYXIoXFxcImFwcG5vd1xcXCIpID09IGkgPyBcXFwi4oCc4oCc4oCd4oCdXFxcIiArIHRhYm5hbWUuYm9sZCgpLmZvbnRjb2xvcihcXFwiI0ZBNzI5OFxcXCIpIDogdGFibmFtZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL2VtcHR5I25vTG9hZGluZyNAbGF6eVJ1bGU9LmpzOnB1dFZhcignYXBwbm93JywnXFxcIiArIGkgKyBcXFwiJyk7cmVmcmVzaFBhZ2UoZmFsc2UpOyd0b2FzdDovL+WIh+aNouaIkOWKnyEnXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKGdldFZhcihcXFwiYXBwbm93XFxcIikgPT0gaSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB0YWIgPSBzcHRhYjtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdGFibmFtZSA9IHRhYm5hbWU7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuKAnOKAnOKGk+KGkeKAneKAnVxcXCIgKyBwdGFibmFtZSArIFxcXCItXFxcIiArIHB0YWIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL2VtcHR5QGxhenlSdWxlPS5qczpwdXRWYXIoJ2FwcG1hcHBzb3J0JywgZ2V0VmFyKCdhcHBtYXBwc29ydCcsJzEnKT09JzEnPycwJzonMScpO3JlZnJlc2hQYWdlKGZhbHNlKTsndG9hc3Q6Ly/liIfmjaLmiJDlip8hJ1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMScsXFxuICAgICAgICAgICAgICAgICAgICBleHRyYTogeyBsaW5lVmlzaWJsZTogZmFsc2UgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgLy/pk77mjqXliJfooahcXG4gICAgICAgICAgICAgICAgbGV0IGxpc3QgPSBbXSxcXG4gICAgICAgICAgICAgICAgICAgIGluZGV4ID0gZ2V0VmFyKFxcXCJhcHBub3dcXFwiKTtcXG4gICAgICAgICAgICAgICAgaWYgKGFwcFVybC5pbmNsdWRlcyhcXFwiYXBpLnBocC9hcHBcXFwiKSB8fCBhcHBVcmwuaW5jbHVkZXMoXFxcInhnYXBwXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QgPSBjb250c1tpbmRleF0udXJsLnNwbGl0KFxcXCIjXFxcIik7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBsaXN0ID0gY29udHNbaW5kZXhdLnVybHMgPyBjb250c1tpbmRleF0udXJscyA6IGNvbnRzW2luZGV4XS51cmwuc3BsaXQoXFxcIiNcXFwiKTtcXG4gICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICAgICAgaWYgKGdldFZhcignYXBwbWFwcHNvcnQnLCAnMScpID09ICcwJykge1xcbiAgICAgICAgICAgICAgICAgICAgbGlzdC5yZXZlcnNlKCk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgLy/op6PmnpDmjqXlj6NcXG4gICAgICAgICAgICAgICAgbGV0IGppZWsgPSBbXTtcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChhcHBVcmwuaW5jbHVkZXMoXFxcImFwaS5waHAvYXBwXFxcIikgfHwgYXBwVXJsLmluY2x1ZGVzKFxcXCJ4Z2FwcFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgamllay5wdXNoKGNvbnRzW2luZGV4XS5wYXJzZV9hcGkgfHwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBqaWVrID0gKGNvbnRzW2luZGV4XS5wbGF5ZXJfaW5mby5wYXJzZTIgfHwgXFxcIlxcXCIpLnNwbGl0KFxcXCIsXFxcIikuY29uY2F0KChjb250c1tpbmRleF0ucGxheWVyX2luZm8ucGFyc2UgfHwgXFxcIlxcXCIpLnNwbGl0KFxcXCIsXFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGppZWsgPSBqaWVrLm1hcChjdXIgPT4gY3VyLnJlcGxhY2UoXFxcIi4uXFxcIiwgXFxcIi5cXFwiKS5yZXBsYWNlKCdqc29uYnMnLCAnJykpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcbiAgICAgICAgICAgICAgICBqaWVrID0gamllay5maWx0ZXIoY3VyID0+ICEhY3VyKTtcXG4gICAgICAgICAgICAgICAgbGV0IGp4VXJsID0gamlla1swXSB8fCBcXFwiXFxcIjtcXG4gICAgICAgICAgICAgICAgLyppZiAoanhVcmwuc3Vic3RyaW5nKDAsIDIpID09ICdcXFxcL1xcXFwvJykge1xcbiAgICAgICAgICAgICAgICAgICAganhVcmwgPSAnaHR0cHM6JyArIGp4VXJsO1xcbiAgICAgICAgICAgICAgICB9Ki9cXG4gICAgICAgICAgICAgICAgLy/miZPljbDmjqXlj6NcXG4gICAgICAgICAgICAgICAgbG9nKCdcXFxcbuW9k+WJjee6v+i3rzonICsgcHRhYiArICdcXFxcbuino+aekOWIl+ihqDonICsgJC5zdHJpbmdpZnkoamllaykpO1xcbiAgICAgICAgICAgICAgICAvL+inhumikeWIl+ihqFxcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBqID0gMDsgaiA8IGxpc3QubGVuZ3RoOyBqKyspIHtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB2bGluayA9IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlID0gXFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgICAgICBpZiAobGlzdFtqXS51cmwpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2bGluayA9IGxpc3Rbal0udXJsLnJlcGxhY2UoLyM0NTYjL2csICdodHRwJykucmVwbGFjZSgvIzEyMyMvZywgJy4nKS5yZXBsYWNlKC8jNzg5Iy9nLCAnOicpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlID0gbGlzdFtqXS5uYW1lO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2bGluayA9IGxpc3Rbal0uc3BsaXQoXFxcIiRcXFwiKVsxXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZSA9IGxpc3Rbal0uc3BsaXQoXFxcIiRcXFwiKVswXTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIC8vdGl0bGUgPSB0aXRsZS5tYXRjaCgvKOesrHxcXFxcZHwtKSoo6ZuGfOivnXzmnJ8pL2cpID8gdGl0bGUucmVwbGFjZSgv56ysfOmbhnzor5185pyfL2csICcnKSA6IHRpdGxlO1xcbiAgICAgICAgICAgICAgICAgICAgaXRlbXMucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF80XFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGV2YWwoSlNPTi5wYXJzZShmZXRjaChcXFwiaGlrZXI6Ly9wYWdlL2xhenlQYXJzZVxcXCIpKS5ydWxlKVxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgc2V0UmVzdWx0KGl0ZW1zKTtcXG4gICAgICAgICAgICB9LCBjaGFuZ2VVcmwsIGFwcFVybCwgYXBwVWEpO1xcblxcbiAgICAgICAgICAgIGxldCBsYXp5UGFyc2UgPSAkLnRvU3RyaW5nKGZ1bmN0aW9uKCkge1xcbiAgICAgICAgICAgICAgICBsZXQgZW5EbiA9IGdldE15VmFyKFxcXCJkbmVuXFxcIiwgXFxcIjBcXFwiKSxcXG4gICAgICAgICAgICAgICAgICAgIHRlc3QxID0gdmxpbmsuc2VhcmNoKC95b3VrdXxtZ3R2fGl4aWd1YXxxcS5jb218cWl5aXxtaWd1fGJpbGliaWxpfHNvaHV8cHB0dnxsZXwxOTA1LmNvbS8pICE9IC0xLFxcbiAgICAgICAgICAgICAgICAgICAgdGVzdDIgPSB2bGluay5zZWFyY2goL0xUXFxcXC18Um9uZ1hpbmdWUlxcXFwtfHJlbnJlbm1pXFxcXC18eGZ5XFxcXC18c3VveW9cXFxcLmNjfGZlblxcXFwubGFvZGl8cnVpZmVuZ2xifHh1ZXJlblxcXFwtLykgIT0gLTE7XFxuICAgICAgICAgICAgICAgIGlmICgodGVzdDEgfHwgdGVzdDIpICYmIGVuRG4gPT0gJzEnKSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgnaGlrZXI6Ly9lbXB0eScpLmxhenlSdWxlKCh2bGluaykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwiXFxcXG7osIPnlKjmlq3mj5Lop6PmnpAs6KeG6aKR6ZO+5o6lOlxcXCIgKyB2bGluayk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChcXFwibGV0IGNvbmZpZyA9XFxcIiArIGZldGNoKFxcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL015UGFyc2VTZXQuanNvblxcXCIpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBldmFsKGZldGNoKGNvbmZpZy5jaikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBheXRtUGFyc2UodmxpbmspO1xcbiAgICAgICAgICAgICAgICAgICAgfSwgdmxpbmspXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJCgnaGlrZXI6Ly9lbXB0eScpLmxhenlSdWxlKChwdGFiLCB2bGluaywganhVcmwsIGFwcFVybCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwiXFxcXG7kvb/nlKjpu5jorqTop6PmnpAs6KeG6aKR6ZO+5o6lOlxcXCIgKyB2bGluayk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy/op4bpopHpk77mjqXlpITnkIZcXG4gICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBjaGFuZ2VWaWRlb1VybCh1cmwpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/mlLnlj5jnibnlrprlnLDlnYDnmoRSZWZlcmVyXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1cmwuaW5jbHVkZXMoXFxcIndrZmlsZVxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSB1cmwgKyAnO3tSZWZlcmVyQGh0dHBzOi8vZmFudHVhbi53a2ZpbGUuY29tL30nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHB0YWIgPT0gJ2JpbGliaWxpJykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsID0gdXJsICsgJzt7UmVmZXJlckBodHRwczovL3d3dy5iaWxpYmlsaS5jb20vJiZVc2VyLUFnZW50QE1vemlsbGEvNS4wfSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocHRhYiA9PSAnbWd0dicpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybCArICc7e1JlZmVyZXJAd3d3Lm1ndHYuY29tJiZVc2VyLUFnZW50QE1vemlsbGEvNS4wfSc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodXJsLmluY2x1ZGVzKFxcXCJvamJrXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybCA9IHVybCArICc7e1JlZmVyZXJAaHR0cHM6Ly9iYWsub2pia2p4LmNvbS99JztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+i/lOWbnuinhumikemTvuaOpVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXVybC5pbmNsdWRlcyhcXFwiaHR0cFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIumTvuaOpeS4jeaYr+S7pWh0dHDlvIDlpLQo5Y+v6IO95Yqg5a+G5LqGKVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC9cXFxcLm0zdTgvLnRlc3QodXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWNoZU0zdTgodXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHVybCArICcjaXNWaWRlbz10cnVlIyc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgLy/liqjmgIHop6PmnpDku6PnoIHlvIDlp4tcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL+WkhOeQhuinhumikeagt+W8j+eahOi1hOa6kOmTvuaOpVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoL1xcXFwubTN1OHxcXFxcLm1wNHxvYmpcXFxcL3Rvc3xuZXRlYXNlXFxcXC5jb20vLnRlc3QodmxpbmspICYmIC9odHRwLy50ZXN0KHZsaW5rKSAmJiAhL1xcXFwuaHRtbC8udGVzdCh2bGluaykpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghL2ZlblxcXFwubGFvZGl8cnVpZmVuZ2xifHN1b3lvXFxcXC5jYy8udGVzdCh2bGluaykpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIuajgOa1i+WIsOi1hOa6kOWcsOWdgOWPr+iDveaYr+inhumikemTvuaOpVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGFuZ2VWaWRlb1VybCh2bGluayk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/ml6Dlj6/nlKjop6PmnpDnm7TmjqXmiqXplJlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFqeFVybCB8fCAveFxcXFwtblxcXFwuY2MvLnRlc3QoanhVcmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIuaXoOWPr+eUqOino+aekFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v5L2/55So6Kej5p6QXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwi5L2/55So6Kej5p6QOlxcXCIgKyBqeFVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsaW5rID0ganhVcmwgKyB2bGluayxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNjb2RlID0gSlNPTi5wYXJzZShmZXRjaChsaW5rLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFxcXCJEYXJ0LzIuMTMgKGRhcnQ6aW8pXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVkaXJlY3Q6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpdGhTdGF0dXNDb2RlOiB0cnVlXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v6L+U5Zue6YeN5a6a5ZCR55qE6ZO+5o6lIFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc2NvZGUuc3RhdHVzQ29kZSA9PSAnMzAyJyB8fCBzY29kZS5zdGF0dXNDb2RlID09ICczMDEnKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVkdXJsID0gc2NvZGUuaGVhZGVycy5sb2NhdGlvblswXS5yZXBsYWNlKC9cXFxcXFxcXC9nLCAnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coJ+mHjeWumuWQkTonICsgcmVkdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghLyh1cmx8dmlkfHYpXFxcXD0vLnRlc3QocmVkdXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjaGFuZ2VWaWRlb1VybChyZWR1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyplbHNlIGlmICgvXFxcXD1odHRwLy50ZXN0KHJlZHVybCkgJiYgL1xcXFwubTN1OHxcXFxcLm1wNHxcXFxcLmZsdi8udGVzdChyZWR1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHVybCA9IHJlZHVybC5zdWJzdHJpbmcocmVkdXJsLmluZGV4T2YoJz1odHRwJykgKyAxKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0qL1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2NvZGUuYm9keSA9IGZldGNoKHJlZHVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy/lvIDlp4vll4XmjqJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSBzY29kZS5ib2R5O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoLzQwNCBOb3QgRm91bmR85aSH5qGI5ZCO5Y+v57un57ut6K6/6ZeuLy50ZXN0KGh0bWwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXFxcIjQwNOS6hlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKC9cXFxcPGJvZHkvLnRlc3QoaHRtbCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKFtcXFwi5byA5aeL6KeG6aKR5ZeF5o6iXFxcIiwgXFxcIuaJk+W8gOino+aekOe9kemhtVxcXCIsIFxcXCLkvb/nlKjlhoXnva7op6PmnpBcXFwiXSwgMSwgXFxcIuajgOa1i+WIsOino+aekOS4uue9kemhteaVsOaNrlxcXCIpLnNlbGVjdCgobGluaywgcHRhYiwgdmxpbmssIGFwcFVybCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFwi5byA5aeL6KeG6aKR5ZeF5o6iXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXF1aXJlQ2FjaGUoJ2h0dHBzOi8vY29kZS5hbGl5dW4uY29tL2x6azIzNTU5L1B1YmxpY1J1bGUvcmF3L21hc3Rlci94NXJ1bGUuanMnLCAyNCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB4NXJ1bGUobGluaywgbGluayk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSBcXFwi5omT5byA6Kej5p6Q572R6aG1XFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcIndlYjovL1xcXCIgKyBsaW5rO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQgPT0gXFxcIuS9v+eUqOWGhee9ruino+aekFxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCLkvb/nlKjlhoXnva7op6PmnpBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0xvYWRpbmcoXFxcIuato+WcqOi/m+ihjOino+aekC4uLlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZXZhbChKU09OLnBhcnNlKGZldGNoKFxcXCJoaWtlcjovL3BhZ2UvbXlQYXJzZVxcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBsaW5rLCBwdGFiLCB2bGluaywgYXBwVXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vbG9nKCflsJ3or5Xku45qc29u5pWw5o2u6I635Y+WJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBwdXJsID0gSlNPTi5wYXJzZShodG1sKS51cmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoYW5nZVZpZGVvVXJsKHB1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qbGV0IHB1cmwgPSBodG1sLm1hdGNoKC9bXFxcXCdcXFxcXFxcIl11cmxbXFxcXCdcXFxcXFxcIl06Lio/W1xcXFwnXFxcXFxcXCJdKC4qPylbXFxcXCdcXFxcXFxcIl0vKVsxXS5yZXBsYWNlKC9cXFxcXFxcXC9nLCAnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoYW5nZVZpZGVvVXJsKHB1cmwpOyovXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCfop6PmnpDlj6/og73liqDlr4bkuoYnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKCdcXFxcbuacquiDveaIkOWKn+iOt+WPluinhumikeWcsOWdgDonICsgZS5tZXNzYWdlICsgXFxcIlxcXFxu5bCd6K+V5L2/55So6KeE5YiZ5YaF572u6Kej5p6QXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBldmFsKEpTT04ucGFyc2UoZmV0Y2goXFxcImhpa2VyOi8vcGFnZS9teVBhcnNlXFxcIikpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAvL+WKqOaAgeino+aekOS7o+eggee7k+adn1xcbiAgICAgICAgICAgICAgICAgICAgfSwgcHRhYiwgdmxpbmssIGp4VXJsLCBhcHBVcmwpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgcGFnZXMucHVzaCh7XFxuICAgICAgICAgICAgICAgIG5hbWU6IFxcXCJBUFDliIbnsbvliJfooahcXFwiLFxcbiAgICAgICAgICAgICAgICBwYXRoOiBcXFwiYXBwbGlzdGRhdGFcXFwiLFxcbiAgICAgICAgICAgICAgICBydWxlOiBydWxlX2FwcGxpc3RkYXRhXFxuICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICBuYW1lOiBcXFwiQVBQ6aaW6aG15YiX6KGoXFxcIixcXG4gICAgICAgICAgICAgICAgcGF0aDogXFxcImFwcGluZGV4ZGF0YVxcXCIsXFxuICAgICAgICAgICAgICAgIHJ1bGU6IHJ1bGVfYXBwaW5kZXhkYXRhXFxuICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICBuYW1lOiBcXFwiQVBQ6YCJ6ZuGXFxcIixcXG4gICAgICAgICAgICAgICAgcGF0aDogXFxcImFwcG1vdmxpc3RcXFwiLFxcbiAgICAgICAgICAgICAgICBydWxlOiBydWxlX2FwcG1vdmxpc3RcXG4gICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgIG5hbWU6IFxcXCLop4bpopHop6PmnpBcXFwiLFxcbiAgICAgICAgICAgICAgICBwYXRoOiBcXFwibGF6eVBhcnNlXFxcIixcXG4gICAgICAgICAgICAgICAgcnVsZTogbGF6eVBhcnNlXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBsZXQgbXlQYXJzZSA9IEpTT04ucGFyc2UoZmV0Y2goXFxcImhpa2VyOi8vcGFnZS9teVBhcnNlXFxcIikpLnJ1bGU7XFxuICAgICAgICBwYWdlcy5wdXNoKHtcXG4gICAgICAgICAgICBuYW1lOiBcXFwi5YaF572u6Kej5p6QXFxcIixcXG4gICAgICAgICAgICBwY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R5cGUpKSB7XFxuICAgICAgICAgICAgICAgIGxpc3QgPSBodG1sLmRhdGE7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgaWYgKGFwcFVybC5pbmNsdWRlcygnYXBpLnBocC9hcHAnKSkge1xcbiAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGh0bWwubGlzdDtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChhcHBVcmwuaW5jbHVkZXMoJ3hnYXBwJykpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxpc3QgPSBodG1sLmRhdGE7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBsaXN0ID0gaHRtbC5kYXRhLmxpc3Q7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBsaXN0Lmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgICAgIGlmICgv56We6amsfFRWLy50ZXN0KGFwcHR5cGUpKSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgeyB0aXRsZSwgcGljLCBuZXh0bGluazogdXJsLCBzdGF0ZTogZGVzYyB9ID0gbGlzdFtpXTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChhcHBVcmwuaW5jbHVkZXMoJ2FwaS5waHAvYXBwJykgfHwgYXBwVXJsLmluY2x1ZGVzKCd4Z2FwcCcpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHsgdm9kX25hbWU6IHRpdGxlLCB2b2RfcGljOiBwaWMsIHZvZF9yZW1hcmtzOiBkZXNjIH0gPSBsaXN0W2ldLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmwgPSBhcHBVcmwgKyAndmlkZW9fZGV0YWlsP2lkPScgKyBsaXN0W2ldLnZvZF9pZCArICcmdG9rZW49JztcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHsgdm9kX25hbWU6IHRpdGxlLCB2b2RfcGljOiBwaWMsIHZvZF9yZW1hcmtzOiBkZXNjIH0gPSBsaXN0W2ldO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvaW9wZW55dW4vLnRlc3QoYXBwVXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdXJsID0gYXBwVXJsICsgJy9kZXRhaWxJRD92b2RfaWQ9JyArIGxpc3RbaV0udm9kX2lkICsgJyZ0b2tlbj0nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB1cmwgPSBhcHBVcmwgKyAnL2RldGFpbD92b2RfaWQ9JyArIGxpc3RbaV0udm9kX2lkICsgJyZ0b2tlbj0nO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIHBpY191cmw6IHBpYyArICdAUmVmZXJlcj0nLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogZGVzYyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV92ZXJ0aWNhbF9waWMnLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKFxcXCIjaW1tZXJzaXZlVGhlbWUjaGlrZXI6Ly9lbXB0eSMjXFxcIiArIHVybCkucnVsZSgoYXBwdHlwZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgv56We6amsfFRWLy50ZXN0KGFwcHR5cGUpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL3R2bW92bGlzdCcpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9hcHBtb3ZsaXN0JykpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0sIGFwcHR5cGUpXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICBzZXRSZXN1bHQoaXRlbXMpO1xcbiAgICAgICAgfSwgY2hhbmdlVXJsLCBhcHB0eXBlLCBhcHBVcmwsIGFwcFVhKVxcblxcbiAgICAgICAgbGFzdF9jaGFwdGVyX3J1bGUgPSBcXFwianM6XFxcIiArICQudG9TdHJpbmcoZnVuY3Rpb24oYXBwdHlwZSwgYXBwVXJsLCBhcHBVYSkge1xcbiAgICAgICAgICAgIGxldCBjaHAgPSBbXTtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBsZXQgY29udHMgPSBbXSxcXG4gICAgICAgICAgICAgICAgICAgIGh0bWwgPSBKU09OLnBhcnNlKGZldGNoKE1ZX1VSTC5zcGxpdChcXFwiIyNcXFwiKVsxXSwgeyBoZWFkZXJzOiB7IFxcXCJVc2VyLUFnZW50XFxcIjogYXBwVWEgfSB9KSk7XFxuICAgICAgICAgICAgICAgIGlmICgv56We6amsfFRWLy50ZXN0KGFwcHR5cGUpKSB7XFxuICAgICAgICAgICAgICAgICAgICBjb250cyA9IE9iamVjdC5rZXlzKGh0bWwudmlkZW9saXN0KTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChhcHBVcmwuaW5jbHVkZXMoXFxcImFwaS5waHAvYXBwXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRzID0gaHRtbC5kYXRhLnZvZF91cmxfd2l0aF9wbGF5ZXI7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoY29udHMubGVuZ3RoIDwgMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRzID0gaHRtbC5kYXRhLnZvZF9wbGF5X3VybC5zcGxpdCgnJCQkJyk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoYXBwVXJsLmluY2x1ZGVzKFxcXCJ4Z2FwcFxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICBjb250cyA9IGh0bWwuZGF0YS52b2RfaW5mby52b2RfdXJsX3dpdGhfcGxheWVyO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRzLmxlbmd0aCA8IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb250cyA9IGh0bWwuZGF0YS52b2RfaW5mby52b2RfcGxheV91cmwuc3BsaXQoJyQkJCcpO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX3BsYXlfbGlzdDtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChjb250cy5sZW5ndGggPCAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29udHMgPSBodG1sLmRhdGEudm9kX3BsYXlfdXJsLnNwbGl0KCckJCQnKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICBsZXQgbGlzdCA9IFtdO1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNvbnRzLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoL+elnumprHxUVi8udGVzdChhcHB0eXBlKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxpc3QgPSBodG1sLnZpZGVvbGlzdFtjb250c1tpXV07XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNvbnRzW2ldLnVybHMpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsaXN0ID0gY29udHNbaV0udXJscztcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY29udHNbaV0udXJsKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGlzdCA9IGNvbnRzW2ldLnVybC5zcGxpdChcXFwiI1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsaXN0ID0gY29udHNbaV0uc3BsaXQoXFxcIiNcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIGNocC5wdXNoKGxpc3QubGVuZ3RoKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XFxuICAgICAgICAgICAgc2V0UmVzdWx0KCfmm7TmlrDoh7M6JyArIChNYXRoLm1heC5hcHBseShNYXRoLCBjaHApKSk7XFxuICAgICAgICB9LCBhcHB0eXBlLCBhcHBVcmwsIGFwcFVhKTtcXG5cXG4gICAgICAgIHJ1bGVzLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiBhcHB0aXRsZSxcXG4gICAgICAgICAgICBhdXRob3I6IGdldE15VmFyKCdyZW1vdGVVcmwnKSxcXG4gICAgICAgICAgICB0eXBlOiBhcHB0eXBlLFxcbiAgICAgICAgICAgIHVybDogaG9tZV91cmwsXFxuICAgICAgICAgICAgZmluZF9ydWxlOiBmaW5kX3J1bGUsXFxuICAgICAgICAgICAgc2VhcmNoX3VybDogc2VhcmNoX3VybCxcXG4gICAgICAgICAgICBzZWFyY2hGaW5kOiBzZWFyY2hGaW5kLFxcbiAgICAgICAgICAgIHBhZ2VzOiBKU09OLn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0di9naXQvcmF3L21hc3Rlci9qczIuMC94aWFveXN3LnBuZ1xcXCJcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICBcXFwidGl0bGVcXFwiOiBcXFwi6Zuq5Lq66LWE5rqQXFxcIixcXG4gICAgICAgICAgICBcXFwidXJsXFxcIjogXFxcImh0dHBzOi8venkucWQyMzQuY24vbW9nYWlfYXBpLnBocC92MS52b2QvXFxcIixcXG4gICAgICAgICAgICBcXFwiaW1nXFxcIjogXFxcImh0dHBzOi8vZWd3YW5nMTg2LmNvZGluZy5uZXQvcC9lZ3dhbmcxODYvZC9pcHR2L2dpdC9yYXcvbWFzdGVyL2pzMi4wL3FkMjM0LnBuZ1xcXCJcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICBcXFwidGl0bGVcXFwiOiBcXFwi5Y2X5bqc6L+95YmnXFxcIixcXG4gICAgICAgICAgICBcXFwidXJsXFxcIjogXFxcImh0dHA6Ly9pYXBwLm5mdXhzLmNsdWIvZG5tYi5waHAvdjEudm9kL1xcXCIsXFxuICAgICAgICAgICAgXFxcImltZ1xcXCI6IFxcXCJodHRwczovL2Vnd2FuZzE4Ni5jb2RpbmcubmV0L3AvZWd3YW5nMTg2L2QvaXB0di9naXQvcmF3L21hc3Rlci9qczIuMC9uYW5mdXpodWlqdW1hby5wbmdcXFwiXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgXFxcInRpdGxlXFxcIjogXFxcIuWliOiPsui/t1xcXCIsXFxuICAgICAgICAgICAgXFxcInVybFxcXCI6IFxcXCJodHRwczovL2FwcC5uZXRmbGl4bWkuY29tL2FwaS5waHAvdHYudm9kL1xcXCIsXFxuICAgICAgICAgICAgXFxcImltZ1xcXCI6IFxcXCJodHRwczovL2Vnd2FuZzE4Ni5jb2RpbmcubmV0L3AvZWd3YW5nMTg2L2QvaXB0di9naXQvcmF3L21hc3Rlci9qczIuMC9uYWlmZWltaS5wbmdcXFwiXFxuICAgICAgICB9LCB7XFxuICAgICAgIC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2FwaS5waHAvdjEudm9kL1xcXCIsXFxuICAgICAgICAgICAgXFxcImltZ1xcXCI6IFxcXCJodHRwczovL2Vnd2FuZzE4Ni5jb2RpbmcubmV0L3AvZWd3YW5nMTg2L2QvaXB0di9naXQvcmF3L21hc3Rlci9qczIuMC9mZW5mZW55aW5nc2hpLnBuZ1xcXCJcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICBcXFwidGl0bGVcXFwiOiBcXFwi6aOe5o235b2x6KeGXFxcIixcXG4gICAgICAgICAgICBcXFwidXJsXFxcIjogXFxcImh0dHBzOi8vd3d3LmZqNjA4MC5jb20vYXBpLnBocC92MS52b2QvXFxcIixcXG4gICAgICAgICAgICBcXFwiaW1nXFxcIjogXFxcImh0dHBzOi8vZWd3YW5nMTg2LmNvZGluZy5uZXQvcC9lZ3dhbmcxODYvZC9pcHR2L2dpdC9yYXcvbWFzdGVyL2pzMi4wL2ZqNjA4MC5wbmdcXFwiXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgXFxcInRpdGxlXFxcIjogXFxcIuaaluWFieW9seinhlxcXCIsXFxuICAgICAgICAgICAgXFxcInVybFxcXCI6IFxcXCJodHRwczovL2FwcC5ibDIxMC5jb20vYXBpLnBocC92MS52b2QvXFxcIixcXG4gICAgICAgICAgICBcXFwiaW1nXFxcIjogXFxcImh0dHBzOi8vZWd3YW5nMTg2LmNvZGluZy5uZXQvcC9lZ3dhbmcxODYvZC9pcHR2L2dpdC9yYXcvbWFzdGVyL2pzMi4wL251YW5ndWFuZy5wbmdcXFwiXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgXFxcInRpdGxlXFxcIjogXFxcIuWwj+icu+ick+W9seinhlxcXCIsXFxuICAgICAgICAgICAgXFxcInVybFxcXCI6IFxcXCJodHRwOi8vM2tldHYuY29tL21vZ2FpX2FwaS5waHAvdjEudm9kL1xcXCIsXFxuICAgICAgICAgICAgXFxcImltZ1xcXCI6IFxcXCJodHRwczovL2Vnd2FuZzE4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