Advertisement
xiaomianao666

邀您一起看:异人君莫邪

Mar 13th, 2024
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥异人君莫邪@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcInRleHRfMVwiLFwibmFtZVwiOlwi5pS26JeP6aG1XCIsXCJwYXRoXCI6XCJhbHBcIixcInJ1bGVcIjpcImpzOlxcbnNldFBhZ2VUaXRsZSgn6LWE5rqQ5pS26JePJylcXG52YXIgZCA9IFtdOyAgICBcXG52YXIgIGl0ZW09W107XFxuLy9sb2coTVlfVVJMKVxcbnZhciBzID0gTVlfVVJMLnNwbGl0KFxcXCJsaW5rPVxcXCIpWzFdXFxuIHMgPSBkZWNvZGVVUklDb21wb25lbnQocyk7XFxuLy9sb2cocylcXG5ldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG5wdXRNeVZhcigndGltZScsbm93VGltZSgpICk7XFxuaWYgKGdldE15VmFyKCdpdGVtJyk9PScnKXtcXG4gICBpZiAocy5pbmNsdWRlcyhcXFwi6LWE5rqQ5bqT5YiG5LqrXFxcIikpe1xcbiAgICAgIHM9SlNPTi5wYXJzZShzLnNwbGl0KFxcXCLCpVxcXCIpWzFdKVxcbiAgICAgIGl0ZW0ucHVzaChzKTtcXG4gICB9IGVsc2Uge1xcbiAgICAgIGlmIChzLmluY2x1ZGVzKFxcXCJtM3U4XFxcIikpIHtcXG4gICAgICAgICAgcz1zLnJlcGxhY2UoLyhodHRwcz86XFxcXC9cXFxcL1xcXFxTKi5tM3U4KS9pZywnwqXCpSQxwqXCpScpO1xcbiAgICAgICAgICBsb2cocylcXG4gICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgcz1zLnJlcGxhY2UoLyhodHRwcz86XFxcXC9cXFxcL1thLXpBLVowLTlcXFxcLlxcXFw/PVxcXFwvXSopL2lnLCfCpcKlJDHCpcKlJyk7XFxuICAgICAgIH1cXG4gICAgICB2YXIgY29udGVudD1zLnNwbGl0KCfCpcKlJyk7XFxuICAgICAgY29udGVudCA9IGNvbnRlbnQuZmlsdGVyKHYgPT4gdik7XFxuICAgICAgZm9yICggdmFyIGkgPSAwOyBpPCBjb250ZW50Lmxlbmd0aDsgaSsrICkge1xcbiAgICAgICAgICBpZiAoY29udGVudFtpXS5pbmNsdWRlcyhcXFwiaHR0cFxcXCIpKXtcXG4gICAgICAgICAgICAgIHZhciB0aXRsZT1jb250ZW50W2ktMV07XFxuICAgICAgICAgICAgICBpZiAodGl0bGU9PScnfHx0aXRsZT09dW5kZWZpbmVkKSB7IHRpdGxlPSfmnKrojrflj5bliLDlkI3np7AnIH07XFxuICAgICAgICAgICAgICAgIHRpdGxlPXRpdGxlLnJlcGxhY2UoJ1xcXFxuJyxcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgIGl0ZW0ucHVzaCh7ICAgICAgICAgICBcXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IHRpdGxlLnJlcGxhY2UoL15cXFxccyp8XFxcXHMqJC9nLFxcXCJcXFwiKSwgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgICAgICB1cmw6Y29udGVudFtpXSxcXG4gICAgICAgICAgICAgICAgICAgIHRpbWU6Z2V0TXlWYXIoJ3RpbWUnLCcnKSxcXG4gICAgICAgICAgICAgICAgICAgIHR5cGU6J+acquWIhuexuydcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICB9XFxuICAgICAgfVxcbiAgIH1cXG4gICBwdXRNeVZhcignaXRlbScsIEpTT04uc3RyaW5naWZ5KGl0ZW0pKTtcXG59IFxcbmFkZExpc3RlbmVyKFxcXCJvbkNsb3NlXFxcIiwgJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICBjbGVhck15VmFyKFxcXCJpdGVtXFxcIik7cmVmcmVzaFBhZ2UoKTtcXG4gICAgfSkpO1xcbml0ZW09SlNPTi5wYXJzZShnZXRNeVZhcignaXRlbScpKVxcblxcbml0ZW0uZm9yRWFjaCgodixpKSA9PiB7XFxuICAgICBsZXQgZWwgPSB7XFxuICAgICAgICAgIHRpdGxlOifwn5OCICcrdi5uYW1lLCAgICAgXFxuICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8xXFxcIixcXG4gICAgICB9ICAgXFxuICAgICAgZWwudXJsPSAkKHYudXJsKS5sYXp5UnVsZSgoKSA9PiB7XFxubG9nKGlucHV0KVxcbiAgICAgICAgICBpZiAoaW5wdXQuaW5jbHVkZXMoXFxcImFsaVxcXCIpKXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL2FsaXl1bj9wYWdlPWZ5cGFnZSZydWxlPeS6keebmOWQmy7nroAmcmVhbHVybD0nICtpbnB1dCA7IFxcbiAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0LmluY2x1ZGVzKFxcXCJxdWFya1xcXCIpKXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAgXFxcImhpa2VyOi8vcGFnZS9xdWFya0xpc3Q/cmVhbHVybD1cXFwiICsgZW5jb2RlVVJJQ29tcG9uZW50KGlucHV0KSArIFxcXCImcnVsZT1RdWFyay7nroAmc2hhcmVQd2Q9XFxcIjtcXG4gICAgICAgICAgfVxcbiAgICAgICB9KTtcXG4gICAgICBlbC5leHRyYT0geyBcXG4gICAgICAgICAgcGFnZVRpdGxlOnYubmFtZSxcXG4gICAgICAgICAgbG9uZ0NsaWNrOlt7XFxuICAgICAgICAgICAgICAgIHRpdGxlOifnvJbovpHlkI3np7AnLFxcbiAgICAgICAgICAgICAgICBqczokLnRvU3RyaW5nKCh2LGkpPT57IFxcbnJldHVybiAkKHYubmFtZSwgJ+OAkCcrdi5uYW1lKyfjgJHlkI3np7AnKS5pbnB1dCgoaSkgPT57XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+S4jeiDveS4uuepulxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgIGxldCBpdGVtPUpTT04ucGFyc2UoZ2V0TXlWYXIoJ2l0ZW0nKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtW2ldLm5hbWU9aW5wdXQ7XFxuICAgICAgICAgICAgICBwdXRNeVZhcignaXRlbScsIEpTT04uc3RyaW5naWZ5KGl0ZW0pKTsgXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/ph43lkb3lkI3miJDlip/vvIEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0saSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICB9LHYsaSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgfSx7XFxuICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOifnvJbovpHliIbnsbsnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICBqczokLnRvU3RyaW5nKCh2LGkpPT57IFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNob3dTZWxlY3RPcHRpb25zKHtcXG4gICAgICAgICAgICAgICAgICAgXFxcInRpdGxlXFxcIjogXFxcIuabtOaUueOAkFxcXCIrdi50eXBlK1xcXCLjgJHkuLpcXFwiLCBcXG4gICAgICAgICAgICAgICAgXFxcIm9wdGlvbnNcXFwiIDogW1xcXCLnlLXlvbFcXFwiLCBcXFwi55S16KeG5YmnXFxcIixcXFwi5Yqo5ryrXFxcIixcXFwi57u86Im6XFxcIixcXFwi57qq5b2V54mHXFxcIixcXFwiTVZcXFwiLFxcXCLlkIjpm4ZcXFwiLFxcXCLnn63op4bpopFcXFwiXSwgXFxuICAgICAgICAgICAgICAgICBjb2w6IDQsIFxcbiAgICAgICAgICAgICAgICAganM6JC50b1N0cmluZygoaSk9PnsgICAgICAgICAgICAgICAgICAgICBcXG4gICAgICAgICAgbGV0IGl0ZW09SlNPTi5wYXJzZShnZXRNeVZhcignaXRlbScpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpdGVtW2ldLnR5cGUgPSBpbnB1dDtcXG4gICAgICAgICAgICAgIHB1dE15VmFyKCdpdGVtJywgSlNPTi5zdHJpbmdpZnkoaXRlbSkpOyBcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdG9hc3QoJ+WIhuexu+aIkOWKn+abtOaUueS4uuOAkCcraW5wdXQrJ+OAkScpO1xcbiAgICAgICAgICAgICAgICAgfSxpKVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICB9LHYsaSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgfSx7XFxuICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOifmt7vliqDmlLbol48nLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICBqczokLnRvU3RyaW5nKCh2LGkpPT57IFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJjb25maXJtOi8v56Gu6K6k5pS26JeP77yaXFxcIiArIHYubmFtZSArIFxcXCIuanM6XFxcIiArICQudG9TdHJpbmcoKGkpID0+eyAgICAgICAgICAgICAgXFxuZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFwiKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxuICAgICAgICAgICAgIGxldCBpdGVtPUpTT04ucGFyc2UoZ2V0TXlWYXIoJ2l0ZW0nKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhLmZpbHRlcih2ID0+di5uYW1lPT1pdGVtW2ldLm5hbWUpPT0nJyl7ICAgICBcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcz0gaXRlbVtpXS5uYW1lLnJlcGxhY2UoL1xcXFxzLyxcXFwiJFxcXCIpLnNwbGl0KFxcXCIkXFxcIilbMF0gOyAgICAgICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZldGNoVXJsID0gICdodHRwczovL20uZG91YmFuLmNvbS9zZWFyY2gvP3F1ZXJ5PScrcysnJnR5cGU9MTAwMic7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSBmZXRjaChmZXRjaFVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpc3QgID1cXG5wZGZhKGNvZGUsXFxcImJvZHkmJi5zZWFyY2hfcmVzdWx0c19zdWJqZWN0cyYmdWwmJmxpXFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGljID0gcGRmaChsaXN0WzBdLFxcXCJsaSYmaW1nJiZzcmNcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaWQ9IHBkZmgobGlzdFswXSxcXFwibGkmJmEmJmhyZWZcXFwiKS5zcGxpdChcXFwiL1xcXCIpWzNdXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdHlwZWh0bWw9XFxuZmV0Y2goXFxcImh0dHBzOi8vbS5kb3ViYW4uY29tXFxcIitwZGZoKGxpc3RbMF0sXFxcImxpJiZhJiZocmVmXFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVR5cGU9XFxucGRmaCh0eXBlaHRtbCxcXFwiYm9keSYmc2VjdGlvbiwxJiZkYXRhLXR5cGVcXFwiKVxcbi8vbG9nKGRhdGFUeXBlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1baV0uaWQ9aWQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVtpXS5waWM9cGljOyBcXG4gICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVtpXS5kYXRhVHlwZT1kYXRhVHlwZTsgXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoKGUpe2l0ZW1baV0uaWQ9Jyd9ICAgICAgICAgICAgICAgICAgICAgICAgXFxuY29uZmlnLmRhdGEuc3BsaWNlKGNvbmZpZy5kYXRhLmZpbHRlcihpID0+IGkudG9wKS5sZW5ndGgsIDAsaXRlbVtpXSApXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShnZXRJdGVtKCdmaWxlJyksIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/mlLbol4/miJDlip/vvIFcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5bey57uP5pS26JeP6L+H5LqG77yBXFxcIn1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LGkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgIH0sdixpKVxcbiAgICAgICAgICB9XVxcbiAgICAgIH1cXG4gICAgICBkLnB1c2goZWwpXFxufSkgICAgICBcXG5cXG5zZXRSZXN1bHQoZCk7XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLliqDovb3mlbDmja5cIixcInBhdGhcIjpcImNvbmZpZ1wiLFwicnVsZVwiOlwiZnVuY3Rpb24gZ2V0Q29uZmlnKCkge1xcbiAgICBsZXQgIG1vZGUgPSBnZXRJdGVtKCdtb2RlJywgJ+acrOWcsCcpO1xcbiAgICBpZiAobW9kZSA9PSBcXFwi5pys5ZywXFxcIikgIHsgc2V0SXRlbSgnZmlsZScsICAnaGlrZXI6Ly9maWxlcy9ydWxlcy9jYXR6ei9hbGl5dW5rdS9sb2NhbC5qc29uJyk7fSAgICBcXG4gICAgIGVsc2UgeyBzZXRJdGVtKCdmaWxlJywgJ2hpa2VyOi8vZmlsZXMvcnVsZXMvY2F0enovYWxpeXVua3UvcGFua3UuanNvbicpOyB9XFxuICAgICB0cnkge1xcbiAgICAgICAgbGV0IGNvbmZpZyA9IGZldGNoKGdldEl0ZW0oJ2ZpbGUnKSk7XFxuICAgICAgICBpZiAoIWNvbmZpZyB8fCBjb25maWcgPT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICByZXR1cm4ge1xcbiAgICAgICAgICAgICAgICBkYXRhOiBbXSxcXG4gICAgICAgICAgICAgICAgdmVyc2lvbjogMFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgcmV0dXJuIEpTT04ucGFyc2UoY29uZmlnKVxcbiAgICAgICAgfVxcbiAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHRvYXN0KFxcXCLmlbDmja7mlofku7bmoLzlvI/lh7rplJnvvIFcXFwiKVxcbiAgICAgICAgfSBjYXRjaCAoZSkge31cXG4gICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgZGF0YTogW10sXFxuICAgICAgICAgICAgdmVyc2lvbjogMFxcbiAgICAgICAgfVxcbiAgICB9XFxufVxcbmZ1bmN0aW9uIG5vd1RpbWUoKSB7XFxuICAgICAgICB2YXIgZGF0ZSA9IG5ldyBEYXRlKCk7XFxuICAgICAgICB2YXIgWVkgPSBkYXRlLmdldEZ1bGxZZWFyKCkgKyAnLSc7XFxuICAgICAgICB2YXIgTU0gPSAoZGF0ZS5nZXRNb250aCgpICsgMSA8IDEwID8gJzAnICsgKGRhdGUuZ2V0TW9udGgoKSArIDEpIDogZGF0ZS5nZXRNb250aCgpICsgMSkgKyAnLSc7XFxuICAgICAgICB2YXIgREQgPSAoZGF0ZS5nZXREYXRlKCkgPCAxMCA/ICcwJyArIChkYXRlLmdldERhdGUoKSkgOiBkYXRlLmdldERhdGUoKSk7XFxuICAgICAgICByZXR1cm4gWVkgKyBNTSArIEREIDtcXG59XFxuZnVuY3Rpb24gc29ydHMobGlzdCwgbWV0aG9kKSB7XFxuICAgICAgICBsZXQgdG9wbGlzdD1saXN0LmZpbHRlcihpID0+IGkudG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KHlvI9cXFwiKSAge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCdtb2RlJywgJ+acrOWcsCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChtb2RlID09IFxcXCLov5znqIvmqKHlvI9cXFwiKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgc2V0SXRlbSgnbW9kZScsICfov5znqIsnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgICAgIH0gXFxuICAgICAgICAgICAgICB9LCBpbnB1dClcXG4gICAgICAgICAgIH0pICAgXFxuICAgIH0pOyAgICBcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwi5pi+56S66K6+572uXFxcIixcXG4gICAgICAgIGRlc2M6IFxcXCJcXFwiLFxcbiAgICAgICAgcGljX3VybDogXFxcImh0dHBzOi8vZ2hwcm94eS5uZXQvaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL2xzMTI1NzgxMDAzL2xtdHViaWFvL21haW4vbWVzc3kvMTcuc3ZnXFxcIixcXG4gICAgICAgIGNvbF90eXBlOiBcXFwiaWNvbl9yb3VuZF80XFxcIixcXG4gICAgICAgIHVybDogICQocGFnZW51bSwgJ+i+k+WFpeWNlemhteWIl+ihqOaVsOmHjycpLmlucHV0KCgpID0+IHtcXG4gICAgICAgICAgICBpZiAocGFyc2VJbnQoaW5wdXQpID49IDEwKSB7XFxuICAgICAgICAgICAgICAgIHNldEl0ZW0oJ3BhZ2VudW0nLCBpbnB1dCk7XFxuICAgICAgICAgICAgfSBlbHNlIHsgc2V0SXRlbSgncGFnZW51bScsICcyMCcpfVxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL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FwidG9hc3Q6Ly/or7fliIfmjaLliLDov5znqIvmqKHlvI/lho3lkIzmraXvvIHvvIHvvIFcXFwiOiAkKCfnoa7orqTlkIzmraUnKS5jb25maXJtKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgdHJ5IHsgXFxuICAgICAgICAgICAgICAgICAgICAgIGxldCB3ZWJkYXYgPSBidWlsZFdlYkRhdignaHR0cDovL21vcnJhaW5ueS5hc3VzY29tbS5jbjo1MDA1L3dlYi9wYW5rdScsICdob3RjYXRzJywgJ3poZW45OTIxNzYnKTsgXFxud2ViZGF2LnVwbG9hZCgncGFua3UuanNvbicsJ2hpa2VyOi8vZmlsZXMvcnVsZXMvY2F0enovYWxpeXVua3UvcGFua3UuanNvbicpXFxuICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+WQjOatpeaIkOWKn++8gVxcXCJcXG4gICAgICAgICAgICAgICAgfSBjYXRjaChlKSB7IHRvYXN0KFxcXCLlkIzmraXlpLHotKXvvIFcXFwiKX1cXG4gICAgICAgIH0pLFxcbiAgICB9KVxcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6IFxcXCJcXFwiLFxcbiAgICAgICAgZGVzYzogXFxcIlxcXCIsXFxuICAgICAgICBjb2xfdHlwZTogXFxcImxpbmVcXFwiLFxcbiAgICAgICAgdXJsOiBcXFwiJ1xcXCIsXFxuICAgIH0pXFxuXFxuICAgIGFkZExpc3RlbmVyKFxcXCJvblJlZnJlc2hcXFwiLCAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgIGNsZWFyTXlWYXIoXFxcImVkaXRNb2RlXFxcIik7fSkpOyAgICBcXG5cXG4gICAgbGV0IGVkaXRNb2RlID0gZ2V0TXlWYXIoJ2VkaXRNb2RlJywgJ+aJuemHj+WIhuexuycpO1xcbiAgICBbICfmibnph4/liIbnsbsnLCfph43mlrDmjpLluo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cGU6IFxcXCJ0ZXh0X2NlbnRlcl8xXFxcIixcXG4gICAgICAgICAgICAgIHVybDogJChbIFxcXCLnlLXlvbFcXFwiLFxcXCLnlLXop4bliadcXFwiLFxcXCLnu7zoibpcXFwiLFxcXCLliqjmvKtcXFwiLFxcXCJNVlxcXCIsXFxcIue6quW9leeJh1xcXCIsXFxcIuWQiOmbhlxcXCIsXFxcIuefreinhumikVxcXCJdLDQpLnNlbGVjdCgoY29uZmlnKSA9PiB7ICAgICAgICAgICAgXFxuICAgICAgICAgICAgICBmb3IgKHZhciBpPTA7aTxjb25maWcuZGF0YS5sZW5ndGg7aSsrKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhW2ldLmNoZWNrZWQpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLnR5cGU9aW5wdXQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0uY2hlY2tlZD1mYWxzZVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgXFxud3JpdGVGaWxlKGdldEl0ZW0oJ2ZpbGUnKSwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5omA6YCJ6LWE5rqQ5YiG57G75pu05pS55oiQ5Yqf77yBXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgfSxjb25maWcpXFxuICAgICAgICAgIH0pIDogXFxcIlxcXCJcXG4gICAgIGJyZWFrO1xcbiAgICAgY2FzZSBcXFwi5om56YeP5Yig6ZmkXFxcIjpcXG4gICAgICAgICAgIGZsYWdEZWxldGUubGVuZ3RoP1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuKAnOKAnOKAneKAneWIoOmZpOehruiupFxcXCIuYm9sZCgpLFxcbiAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2NlbnRlcl8xXFxcIixcXG4gICAgICAgICAgICAgICAgIHVybDogJCgn56Gu6K6k5Yig6ZmkJykuY29uZmlybSgoY29uZmlnKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhLmZvckVhY2goKHgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAheC5kZWxldGUgPyBydWxlcy5wdXNoKHgpIDogbnVsbFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhPXJ1bGVzO1xcbndyaXRlRmlsZShnZXRJdGVtKCdmaWxlJyksSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgICAgICB9LGNvbmZpZylcXG4gICAgICAgICAgfSkgOiBcXFwiXFxcIlxcbiAgICAgIGJyZWFrXFxuICB9O1xcblxcbmV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcIikpLnJ1bGUpO1xcbiAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgY29uZmlnLmRhdGEuZm9yRWFjaCgodiwgaSkgPT4ge1xcbiAgICAgICAgbGV0IGVsID0ge1xcbiAgICAgICAgICAgICB0aXRsZTogdi50b3AgPyAn8J+GmScrdi5uYW1lIDogdi5uYW1lLFxcbiAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMlxcXCJcXG4gICAgICAgICAgICAgfVxcbiAgICAgICAgc3dpdGNoIChlZGl0TW9kZSkge1xcbiAgICAgICAgICAgIGNhc2UgJ+aJuemHj+WIhuexuyc6XFxuICAgICAgICAgICAgICAgIGlmICh2LnR5cGU9PSfmnKrliIbnsbsnKXtcXG4gICAgICAgICAgICAgICAgICAgIGVsLnRpdGxlPSfwn5OMJysnW+acquWIhuexu10nK2VsLnRpdGxlXFxuICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICBlbC50aXRsZT0nWycrdi50eXBlKyddJytlbC50aXRsZVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBlbC50aXRsZSA9ICh2LmNoZWNrZWQgPyAn4pyFJyA6ICcgJykgKyBlbC50aXRsZTtcXG4gICAgICAgICAgICAgICAgZWwudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0uY2hlY2tlZCA9ICFjb25maWcuZGF0YVtpXS5jaGVja2VkOyAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoZ2V0SXRlbSgnZmlsZScpLEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIGkpO1xcbiAgICAgICAgICBicmVha1xcbiAgICAgICAgICBjYXNlICfph43mlrDmjpLluo8nOlxcbiAgICAgICAgICAgICAgICBsZXQgc29ydEZsYWcgPSBwYXJzZUludChnZXRNeVZhcignc29ydEZsYWcnLCAnLTEnKSlcXG4gICAgICAgICAgICAgICAgZWwudGl0bGUgPSAoc29ydEZsYWcgPT0gaSA/ICfwn5SDICAnIDogJycpICsgZWwudGl0bGVcXG4gICAgICAgICAgICAgICAgaWYgKHNvcnRGbGFnID09IC0xKVxcbiAgICAgICAgICAgICAgICAgICAgZWwudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzb3J0RmxhZycsIGkudG9TdHJpbmcoKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgICAgICBlbHNlXFxuICAgICAgICAgICAgICAgICAgICBlbC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChvbGRJbmRleCwgbmV3SW5kZXgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFbb2xkSW5kZXhdLnRvcCYmbmV3SW5kZXg8Y29uZmlnLmRhdGEuZmlsdGVyKGkgPT4gaS50b3ApLmxlbmd0aCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGEuc3BsaWNlKG5ld0luZGV4LCAwLCBjb25maWcuZGF0YS5zcGxpY2Uob2xkSW5kZXgsIDEpWzBdKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoZ2V0SXRlbSgnZmlsZScpLCAgICAgICAgIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzb3J0RmxhZycsICctMScpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoIWNvbmZpZy5kYXRhW29sZEluZGV4XS50b3AmJm5ld0luZGV4PmNvbmZpZy5kYXRhLmZpbHRlcihpID0+IGkudG9wKS5sZW5ndGgtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGEuc3BsaWNlKG5ld0luZGV4LCAwLCBjb25maWcuZGF0YS5zcGxpY2Uob2xkSW5kZXgsIDEpWzBdKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoZ2V0SXRlbSgnZmlsZScpLCAgICAgICAgIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzb3J0RmxhZycsICctMScpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/np7vliqjnmoTkvY3nva7kuI3mraPnoa7vvIEnXFxuICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgICAgIH0sIHNvcnRGbGFnLCBpKVxcbiAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgY2FzZSAn5om56YeP5Yig6ZmkJzpcXG4gICAgICAgICAgICAgICAgZWwudGl0bGUgPSAodi5kZWxldGUgPyAn4p2MJyA6ICcnKSArIGVsLnRpdGxlOyAgICAgIFxcbiAgICAgICAgICAgICAgICBlbC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxuICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcIikpLnJ1bGUpO1xcbiAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0uZGVsZXRlID0gIWNvbmZpZy5kYXRhW2ldLmRlbGV0ZTsgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGdldEl0ZW0oJ2ZpbGUnKSxKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICAgICAgfSwgaSk7ICAgICAgICAgIFxcbiAgICAgICAgICAgYnJlYWtcXG4gICAgICAgIH1cXG4gICAgICAgIGQucHVzaChlbClcXG4gICAgfSk7XFxuICAgIHJldHVybiBkO1xcbn1cXG5cXG4kLmV4cG9ydHMgPSB7XFxuICAgIHNldHRpbmc6IHNldHRpbmdcXG59XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLplb/mjInoj5zljZVcIixcInBhdGhcIjpcImxvbmdDbGlja1wiLFwicnVsZVwiOlwidmFyIGxvbmdDbGljaz1bXFxuICAgIHtcXG4gICAgICAgdGl0bGU6ICfpnZLosYbmkJzntKInLCBcXG4gICAgICAgICAganM6JC50b1N0cmluZygodik9PnsgXFxuICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vc2VhcmNoP3M9JyArdi5uYW1lLnJlcGxhY2UoL1xcXFxzLyxcXFwiJFxcXCIpLnNwbGl0KFxcXCIkXFxcIilbMF0gKyAnJnJ1bGU96Z2S6LGGJ30sdikgIFxcbiAgICAgfSx7XFxuICAgICAgIHRpdGxlOiAn57yW6L6R5ZCN56ewJywgXFxuICAgICAgIGpzOiQudG9TdHJpbmcoKHYpPT57IFxcbnJldHVybiAkKHYubmFtZSwgJ+OAkCcrdi5uYW1lKyfjgJHlkI3np7AnKS5pbnB1dCgobmFtZSkgPT4geyBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICAgICAgICAgbGV0IHJlbkZsYWc9MTtcXG4gICAgICAgICAgIGlmIChpbnB1dCkge1xcbiAgICAgICAgICAgICAgZm9yICh2YXIgaj0wO2o8Y29uZmlnLmRhdGEubGVuZ3RoO2orKykgIHtcXG4gICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhW2pdLm5hbWUucmVwbGFjZSgvXFxcXHMvZyxcXFwiXFxcIik9PWlucHV0LnJlcGxhY2UoL1xcXFxzL2csXFxcIlxcXCIpKSB7ICAgICAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICAgICAgICAgcmVuRmxhZz0wO1xcbiAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgIGlmIChyZW5GbGFnKSB7XFxuICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaT0wO2k8Y29uZmlnLmRhdGEubGVuZ3RoO2krKykge1xcbiAgICAgICAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFbaV0ubmFtZT09bmFtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLm5hbWU9aW5wdXQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLnRpbWUgPSBnZXRNeVZhcigndGltZScsJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWNvbmZpZy5kYXRhW2ldLnRvcCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YS5zcGxpY2UoY29uZmlnLmRhdGEuZmlsdGVyKGkgPT4gaS50b3ApLmxlbmd0aCwgMCwgY29uZmlnLmRhdGEuc3BsaWNlKGksIDEpWzBdKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGEuc3BsaWNlKDAsIDAsIGNvbmZpZy5kYXRhLnNwbGljZShpLCAxKVswXSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICB9IFxcbiAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShnZXRJdGVtKCdmaWxlJyksIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcbiAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgICAgIHRvYXN0KCfph43lkb3lkI3miJDlip/vvIEnKTtcXG4gICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgIHRvYXN0KCfmlofku7blkI3lt7LlrZjlnKjvvIEnKVxcbiAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICB0b2FzdCgn5ZCN56ew5LiN6IO95Li656m677yBJylcXG4gICAgICAgICAgIH1cXG4gICAgICAgICB9LHYubmFtZSlcXG4gICAgICAgfSx2KSAgXFxuICAgIH0se1xcbiAgICAgICB0aXRsZTogJ+KYhee8lui+kea1t+aKpScsIFxcbiAgICAgICBqczokLnRvU3RyaW5nKCh2KT0+eyBcXG5yZXR1cm4gJCh2LmltZywgJ+OAkCcrdi5uYW1lKyfjgJHmtbfmiqUnKS5pbnB1dCgobmFtZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxuICAgICAgICAgaWYgKGlucHV0ID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgIGZvciAodmFyIGk9MDtpPGNvbmZpZy5kYXRhLmxlbmd0aDtpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhW2ldLm5hbWU9PW5hbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0uaW1nPWlucHV0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgIH1cXG4gd3JpdGVGaWxlKGdldEl0ZW0oJ2ZpbGUnKSwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgIHRvYXN0KCfmtbfmiqXnva7nqbrmiJDlip/vvIEnKTtcXG4gICAgICAgICAgfSBlbHNlIGlmIChpbnB1dC5tYXRjaCgvanBnfHBuZ3x3ZWJwfGdpZnxqcGVnfGJtcHxzdmcvaSk9PW51bGwpeyBcXG4gICAgICAgICAgICAgdG9hc3QoJ+WPquiDveS4uuWbvueJh+agvOW8jyEnKVxcbiAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICBmb3IgKHZhciBpPTA7aTxjb25maWcuZGF0YS5sZW5ndGg7aSsrKSB7XFxuICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcuZGF0YVtpXS5uYW1lPT1uYW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLmltZz1pbnB1dDtcXG4gICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICB9XFxuIHdyaXRlRmlsZShnZXRJdGVtKCdmaWxlJyksIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICB0b2FzdCgn5rW35oql5pu05pS55oiQ5Yqf77yBJyk7XFxuICAgICAgICAgIH0gXFxuICAgICAgICAgfSx2Lm5hbWUpXFxuICAgICAgIH0sdikgIFxcbiAgICB9LHtcXG4gICAgICAgdGl0bGU6ICfimIXlop7liqDlnLDlnYAnLCBcXG4gICAgICAganM6JC50b1N0cmluZygodik9PnsgXFxuICAgICAgICAgIGlmICh2LnVybDIhPXVuZGVmaW5lZCkge1xcbiAgICAgICAgICAgICByZXR1cm4gIFxcXCJ0b2FzdDovL+e9keWdgOW3sui+vuS4iumZkO+8gVxcXCJcXG4gICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgIHJldHVybiAkKCcnLCfovpPlhaXjgJAnK3YubmFtZSsn44CR5paw5Zyw5Z2AJykuaW5wdXQoKG5hbWUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFwiKSkucnVsZSk7XFxuICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICAgICAgIGlmIChpbnB1dC5tYXRjaCgvaHR0cC8pPT1udWxsKXsgXFxuICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5peg5pWI572R5Z2A77yBXFxcIlxcbiAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICBmb3IgKHZhciBpPTA7aTxjb25maWcuZGF0YS5sZW5ndGg7aSsrKSB7XFxuICAgICAgICAgICAgICAgIGlmIChjb25maWcuZGF0YVtpXS5uYW1lPT1uYW1lKXtcXG4gIChjb25maWcuZGF0YVtpXS51cmwxPT11bmRlZmluZWQpP2NvbmZpZy5kYXRhW2ldLnVybDE9aW5wdXQ6Y29uZmlnLmRhdGFbaV0udXJsMj1pbnB1dDtcXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICB9ICAgXFxuICAgICAgICAgICAgICAgd3JpdGVGaWxlKGdldEl0ZW0oJ2ZpbGUnKSwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+aWsOWinue9keWdgOaIkOWKn++8gSdcXG4gICAgICAgICAgIH1cXG4gICAgICAgICB9LHYubmFtZSlcXG4gICAgICAgfVxcbiAgICAgIH0sdikgIFxcbiAgICB9LHtcXG4gICAgICAgdGl0bGU6ICfnvJbovpHlnLDlnYAnLCBcXG4gICAgICAganM6JC50b1N0cmluZygodik9PntcXG4gICAgICAgICAgIGxldCB1cmxzPXYudXJsK1xcXCIkXFxcIit2LnVybDErXFxcIiRcXFwiK3YudXJsMjtcXG4gICAgICAgICAgIHVybHM9dXJscy5zcGxpdChcXFwiJFxcXCIpO1xcbiAgICAgICAgICAgdXJscz11cmxzLmZpbHRlcihpdGVtID0+IGl0ZW0hPVxcXCJ1bmRlZmluZWRcXFwiKTtcXG4gICAgICAgICAgIGZvciAobGV0IGk9MDtpPHVybHMubGVuZ3RoO2krKyl7XFxuICAgICAgICAgICAgICAgICB1cmxzW2ldPVxcXCLlnLDlnYBcXFwiKyhpPT0wP1xcXCLkuIBcXFwiOmk9PTE/XFxcIuS6jFxcXCI6XFxcIuS4iVxcXCIpXFxuICAgICAgICAgICB9XFxuICAgICAgICAgICByZXR1cm4gJCh1cmxzKS5zZWxlY3QoKHYpID0+IHtcXG4gICAgICAgICAgICAgIHZhciBlZGl0VXJsPXYudXJsO1xcbiAgICAgICAgICAgICAgaWYgKGlucHV0PT1cXFwi5Zyw5Z2A5LqMXFxcIillZGl0VXJsPXYudXJsMTtcXG4gICAgICAgICAgICAgIGlmIChpbnB1dD09XFxcIuWcsOWdgOS4iVxcXCIpZWRpdFVybD12LnVybDI7XFxuICAgICAgICAgICAgICByZXR1cm4gJChlZGl0VXJsLCAn44CQJyt2Lm5hbWUrJ+OAkScraW5wdXQpLmlucHV0KCh1cmxObyxuYW1lKSA9PiB7XFxuIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcIikpLnJ1bGUpO1xcbiAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICAgaWYgKGlucHV0ID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5LiN6IO95Li656m6XFxcIlxcbiAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0Lm1hdGNoKC9odHRwLyk9PW51bGwpeyBcXG4gICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lnLDlnYDmnInor6/vvIFcXFwiXFxuICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICBmb3IgKHZhciBpPTA7aTxjb25maWcuZGF0YS5sZW5ndGg7aSsrKSB7XFxuICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhW2ldLm5hbWU9PW5hbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgaWYgKHVybE5vPT1cXFwi5Zyw5Z2A5LiAXFxcIil7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0udXJsPWlucHV0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodXJsTm89PVxcXCLlnLDlnYDkuoxcXFwiKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS51cmwxPWlucHV0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLnVybDI9aW5wdXQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICB9ICAgXFxuICAgICAgICAgICAgICAgd3JpdGVGaWxlKGdldEl0ZW0oJ2ZpbGUnKSwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+OAkCcrdXJsTm8rJ+OAkeS/ruaUueaIkOWKn++8gSdcXG4gICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0saW5wdXQsdi5uYW1lKVxcbiAgICAgICAgIH0sdilcXG4gICAgICB9LHYpICBcXG4gICAgfSx7XFxuICAgICAgIHRpdGxlOiAn57yW6L6R5bCB6Z2iJywgXFxuICAgICAgIGpzOiQudG9TdHJpbmcoKHYpPT57IFxcbnJldHVybiAkKHYucGljLCAn44CQJyt2Lm5hbWUrJ+OAkeWwgemdoicpLmlucHV0KChuYW1lKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcIikpLnJ1bGUpO1xcbiAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICBpZiAoaW5wdXQgPT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICAgZm9yICh2YXIgaT0wO2k8Y29uZmlnLmRhdGEubGVuZ3RoO2krKykge1xcbiAgICAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFbaV0ubmFtZT09bmFtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS5waWM9aW5wdXQ7XFxuICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgfVxcbiB3cml0ZUZpbGUoZ2V0SXRlbSgnZmlsZScpLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgdG9hc3QoJ+WwgemdouWbvueJh+e9ruepuuaIkOWKn++8gScpO1xcbiAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0Lm1hdGNoKC9qcGd8cG5nfHdlYnB8Z2lmfGpwZWd8Ym1wfHN2Zy9pKT09bnVsbCl7IFxcbiAgICAgICAgICAgICB0b2FzdCgn5Y+q6IO95Li65Zu+54mH5qC85byPIScpXFxuICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgIGZvciAodmFyIGk9MDtpPGNvbmZpZy5kYXRhLmxlbmd0aDtpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhW2ldLm5hbWU9PW5hbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0ucGljPWlucHV0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAg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tZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0udHlwZT1pbnB1dDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICB9XFxuICAgICAgICAgIH1cXG4gICAgICAgICAgd3JpdGVGaWxlKGdldEl0ZW0oJ2ZpbGUnKSwgICAgICAgICBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICB0b2FzdCgn5YiG57G75oiQ5Yqf5pu05pS55Li644CQJytpbnB1dCsn44CRJyk7XFxuICAgICAgICAgICAgICAgICB9LHYpXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9LHYpXFxufSx7XFxuICAgICAgIHRpdGxlOiAn6LGG55OjaWQnLCBcXG4gICAgICAganM6JC50b1N0cmluZygodik9PnsgXFxucmV0dXJuICQodi5pZCwgJ+OAkCcrdi5uYW1lKyfjgJHosYbnk6NpZCcpLmlucHV0KChuYW1lKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcIikpLnJ1bGUpO1xcbiAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXG4gICAgICAgICBpZiAoaW5wdXQgPT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICAgZm9yICh2YXIgaT0wO2k8Y29uZmlnLmRhdGEubGVuZ3RoO2krKykge1xcbiAgICAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFbaV0ubmFtZT09bmFtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS5pZD1pbnB1dDtcXG4gICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICB9XFxuIHdyaXRlRmlsZShnZXRJdGVtKCdmaWxlJyksIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICB0b2FzdCgnaWTnva7nqbrmiJDlip/vvIEnKTtcXG4gICAgICAgICAgfSBlbHNlIGlmIChpbnB1dC5tYXRjaCgvXlswLTldKiQvKT09bnVsbCl7IFxcbiAgICAgICAgICAgICB0b2FzdCgnaWTlj6rog73kuLrmlbDlrZchJylcXG4gICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgZm9yICh2YXIgaT0wO2k8Y29uZmlnLmRhdGEubGVuZ3RoO2krKykge1xcbiAgICAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFbaV0ubmFtZT09bmFtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS5pZD1pbnB1dDtcXG4gICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICB9XFxuIHdyaXRlRmlsZShnZXRJdGVtKCdmaWxlJyksIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICB0b2FzdCgnaWTmm7TmlLnmiJDlip/vvIEnKTtcXG4gICAgICAgICAgfSBcXG4gICAgICAgICB9LHYubmFtZSlcXG4gICAgICAgfSx2KSAgXFxuICAgIH0se1xcbiAgICAgICB0aXRsZTogJ+ixhueTo+WIhuexuycsIFxcbiAgICAgICBqczokLnRvU3RyaW5nKCh2KT0+eyBcXG4gICAgICAgICAgIHNob3dTZWxlY3RPcHRpb25zKHtcXG4gICAgICAgICAgICAgIFxcXCJ0aXRsZVxcXCI6IFxcXCLmm7TmlLlcXFwiK1xcXCLjgJBcXFwiK3YuZGF0YVR5cGUrXFxcIuOAkeS4ulxcXCIsIFxcbiAgICAgICAgICAgICAgICBcXFwib3B0aW9uc1xcXCIgOiBbXFxcInR2XFxcIiwgXFxcIm1vdmllXFxcIl0sIFxcbiAgICAgICAgICAgICAgICAgY29sOiAxLFxcbiAgICAgICAgICAgICAgICAganM6JC50b1N0cmluZygobmFtZSk9PnsgXFxuICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcIikpLnJ1bGUpO1xcbiAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICAgICAgIGZvciAodmFyIGk9MDtpPGNvbmZpZy5kYXRhLmxlbmd0aDtpKyspIHtcXG4gICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhW2ldLm5hbWU9PW5hbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0uZGF0YVR5cGU9aW5wdXQ7XFxuICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgIH1cXG4gICAgICAgICAgIHdyaXRlRmlsZShnZXRJdGVtKCdmaWxlJyksICAgICAgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgIHRvYXN0KCfosYbnk6PliIbnsbvmm7TmlLnmiJDlip/vvIEnKTtcXG4gICAgICAgICB9LHYubmFtZSlcXG4gICAgICAgIH0pO1xcbiAgICAgICB9LHYpICBcXG4gICAgfSx7XFxuICAgICAgIHRpdGxlOiAn5L+h5oGv5Yiu5YmKJywgXFxuICAgICAgIGpzOiQudG9TdHJpbmcoKHYpPT57IFxcbiAgICAgICAgICAgIGlmICghdi5waWMpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQodi5uYW1lLCAn5Yiu5YmK44CQJyt2Lm5hbWUrJ+OAkScpLmlucHV0KChuYW1lKSA9PntcXG4gICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFwiKSkucnVsZSk7ICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpOyAgXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHM9IGlucHV0LnJlcGxhY2UoL1xcXFxzLyxcXFwiJFxcXCIpLnNwbGl0KFxcXCIkXFxcIilbMF0gOyAgICAgICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZldGNoVXJsID0gICdodHRwczovL20uZG91YmFuLmNvbS9zZWFyY2gvP3F1ZXJ5PScrcysnJnR5cGU9MTAwMic7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvZGUgPSBmZXRjaChmZXRjaFVybCk7XFxuLy9sb2coY29kZSkgIFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsaXN0ICA9XFxucGRmYShjb2RlLFxcXCJib2R5JiYuc2VhcmNoX3Jlc3VsdHNfc3ViamVjdHMmJnVsJiZsaVxcXCIpXFxuLy9sb2cobGlzdFswXSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGljID0gcGRmaChsaXN0WzBdLFxcXCJsaSYmaW1nJiZzcmNcXFwiKTtcXG4vL2xvZyhwaWMpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGlkPSBwZGZoKGxpc3RbMF0sXFxcImxpJiZhJiZocmVmXFxcIikuc3BsaXQoXFxcIi9cXFwiKVszXVxcbi8vbG9nKGlkKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXBlaHRtbD1cXG5mZXRjaChcXFwiaHR0cHM6Ly9tLmRvdWJhbi5jb21cXFwiK3BkZmgobGlzdFswXSxcXFwibGkmJmEmJmhyZWZcXFwiKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGF0YVR5cGU9XFxucGRmaCh0eXBlaHRtbCxcXFwiYm9keSYmc2VjdGlvbiwxJiZkYXRhLXR5cGVcXFwiKVxcbi8vbG9nKGRhdGFUeXBlKVxcbiAgICAgICAgICAgICAgICAgZm9yICh2YXIgaT0wO2k8Y29uZmlnLmRhdGEubGVuZ3RoO2krKykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcuZGF0YVtpXS5uYW1lPT1uYW1lKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLmlkPWlkO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLnBpYz1waWM7IFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLmRhdGFUeXBlPWRhdGFUeXBlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShnZXRJdGVtKCdmaWxlJyksIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICB0b2FzdChcXFwi5Yiu5YmK5oiQ5YqfIVxcXCIpOyBcXG4gICAgICAgICAgICAgICAgICB9IGNhdGNoKGUpe3RvYXN0KFxcXCLliK7liYrlpLHotKXvvIFcXFwiKX1cXG4gICAgICAgICAgICAgICB9LHYubmFtZSlcXG4gICAgICAgICAgfSBlbHNlIHsgdG9hc3QoXFxcIuW3sue7j+WIruWJiui/hyFcXFwiKTsgfVxcbiAgICAgIH0sdilcXG4gICAgfSx7XFxuICAgICAgIHRpdGxlOiAnKOWPlua2iCnnva7pobYnLCBcXG4gICAgICAganM6JC50b1N0cmluZygodik9PnsgXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXYudG9wKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAgJChcXFwi572u6aG24oCcXFxcIit2Lm5hbWUrXFxcIuKAne+8n1xcXCIpLmNvbmZpcm0oKG5hbWUpPT57XFxuZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFwiKSkucnVsZSk7ICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpOyAgICAgICAgIFxcbiAgICAgICAgICAgZm9yICh2YXIgaT0wO2k8Y29uZmlnLmRhdGEubGVuZ3RoO2krKykge1xcbiAgICAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFbaV0ubmFtZT09bmFtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS50b3A9IWNvbmZpZy5kYXRhW2ldLnRvcDtcXG4gICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhLnNwbGljZSgwLCAwLCBjb25maWcuZGF0YS5zcGxpY2UoaSwgMSlbMF0pOyBcXG4gICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGdldEl0ZW0oJ2ZpbGUnKSwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9hc3QoXFxcIue9rumhtuaIkOWKnyFcXFwiKTsgXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgfSx2Lm5hbWUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gICQoXFxcIuWPlua2iOKAnFxcXCIrdi5uYW1lK1xcXCLigJ3nva7pobbvvJ9cXFwiKS5jb25maXJtKChuYW1lKT0+e1xcbmV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcIikpLnJ1bGUpOyAgICAgICAgICAgICBcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTsgICAgICBcXG4gICAgICAgICAgIGZvciAodmFyIGk9MDtpPGNvbmZpZy5kYXRhLmxlbmd0aDtpKyspIHtcXG4gICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhW2ldLm5hbWU9PW5hbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0udG9wPSFjb25maWcuZGF0YVtpXS50b3A7ICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGEuc3BsaWNlKGNvbmZpZy5kYXRhLmZpbHRlcihpID0+ICBpLnRvcCkubGVuZ3RoLCAwLCBjb25maWcuZGF0YS5zcGxpY2UoaSwgMSlbMF0pOyBcXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoZ2V0SXRlbSgnZmlsZScpLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b2FzdChcXFwi5Y+W5raI572u6aG25oiQ5YqfIVxcXCIpOyAgICAgICAgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICAgfSx2Lm5hbWUpXFxuICAgICAgICAgIH1cXG4gICAgICAgfSx2KVxcbiAgICB9LHtcXG4gICAgICAgIHRpdGxlOiAn5YiGIOS6qycsIFxcbiAgICAgICAgICAganM6JC50b1N0cmluZygodik9PnsgXFxuICAgICAgICAgICAgICByZXR1cm4gICQoJ+ehruWumuWIhuS6q+i1hOa6kO+8nycpLmNvbmZpcm0oKHYpID0+IHtcXG4gICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFwiKSkucnVsZSk7XFxuICAgICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxuICAgICAgICAgICAgICAgICAgdmFyIGRhdGEgPSAn6LWE5rqQ5bqT5YiG5LqrwqUnK0pTT04uc3RyaW5naWZ5KHYpO1xcbiAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiY29weTovL1xcXCIgKyBkYXRhO1xcbiAgICAgICAgICAgICAgfSwgdilcXG4gICAgICAgICAgIH0sdikgIFxcbiAgICB9LHtcXG4gICAgICAgdGl0bGU6ICfliKAgIOmZpCcsIFxcbiAgICAgICBqczokLnRvU3RyaW5nKCh2KT0+eyBcXG4gICAgICAgICAgIHJldHVybiAkKFxcXCLnoa7orqTliKDpmaTigJxcXFwiK3YubmFtZStcXFwi4oCd77yfXFxcIikuY29uZmlybSgobmFtZSk9PntcXG5ldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTsgICAgICAgICAgICAgXFxuICAgICAgICAgICBjb25maWcgPSBn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rJ+OAkOinhumikei1hOa6kOOAkSc6di5pbmNsdWRlcyhcXFwiYWxpXFxcIik/KGkrMSkrJyAtJyt0aXRsZSsnIOOAkOmYv+mHjOi1hOa6kOOAkSc6KGkrMSkrJyAtICcrdGl0bGUrJ+OAkOWkuOWFi+i1hOa6kOOAkScsXFxuICAgICAgICAgaW1nOlxcblxcXCJodHRwczovL2docHJveHkubmV0L2h0dHBzOi8vcmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbS9sczEyNTc4MTAwMy90dWJpYW8vbWFpbi9tb3ZpZS8xNDMuc3ZnXFxcIixcXG4gICAgICAgIGNvbF90eXBlOiAnYXZhdGFyJyxcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgUGFnZVRpdGxlOnRpdGxlLFxcbiAgICAgICAgICAgICAgICBsb25nQ2xpY2s6W3tcXG4gICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfmm7TmlLnlnLDlnYAnLCBcXG4gICAgICAgICAgICAgICAgICAgICAganM6JC50b1N0cmluZygodXJsLG5hbWUsaSk9PnsgXFxuICAgICAgIHJldHVybiAkKHVybCwgJ+OAkCcrbmFtZSsn44CR5Zyw5Z2AJykuaW5wdXQoKG5hbWUsdXJsTm8pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFwiKSkucnVsZSk7XFxuICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICAgICAgICBpZiAoaW5wdXQubWF0Y2goL2h0dHAvKT09bnVsbCl7IFxcbiAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+WcsOWdgOacieivr++8gVxcXCJcXG4gICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgZm9yIChsZXQgaT0wO2k8Y29uZmlnLmRhdGEubGVuZ3RoO2krKykge1xcbiAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFbaV0ubmFtZT09bmFtZSl7XFxuICAgICAgICAgICAgICAgIGlmKHVybE5vPT0wKXtcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLnVybD1pbnB1dFxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYodXJsTm89PTEpe1xcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0udXJsMT1pbnB1dFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLnVybDI9aW5wdXRcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICBwdXRNeVZhcihcXFwidXJsXFxcIixjb25maWcuZGF0YVtpXS51cmwrXFxcIiQkJFxcXCIrY29uZmlnLmRhdGFbaV0udXJsMStcXFwiJCQkXFxcIitjb25maWcuZGF0YVtpXS51cmwyKTtcXG4gICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgfVxcbiAgICAgICAgICB9ICAgXFxuICAgd3JpdGVGaWxlKGdldEl0ZW0oJ2ZpbGUnKSwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WcsOWdgOS/ruaUueaIkOWKnydcXG4gICAgICAgICAgIH1cXG4gICAgICAgICB9LG5hbWUsaSlcXG4gICAgICAgfSx2LG5hbWUsaSkgIFxcbiAgICB9LHtcXG4gICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfliKDpmaTlnLDlnYAnLCBcXG4gICAgICAgICAgICAgICAgICAgICAganM6JC50b1N0cmluZygobmFtZSxpKT0+eyBcXG4gICAgICAgcmV0dXJuICQoXFxcIuehruiupOWIoOmZpOKAnFxcXCIrbmFtZStcXFwi4oCd77yfXFxcIikuY29uZmlybSgobmFtZSx1cmxObyk9PntcXG4gICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFwiKSkucnVsZSk7XFxuICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcbiAgICAgICAgICBmb3IgKGxldCBpPTA7aTxjb25maWcuZGF0YS5sZW5ndGg7aSsrKSB7XFxuICAgICAgICAgICAgIGlmIChjb25maWcuZGF0YVtpXS5uYW1lPT1uYW1lKXtcXG4gICAgICAgICAgICAgICAgaWYodXJsTm89PTApe1xcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGNvbmZpZy5kYXRhW2ldLnVybFxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYodXJsTm89PTEpe1xcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlICAgY29uZmlnLmRhdGFbaV0udXJsMVxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGNvbmZpZy5kYXRhW2ldLnVybDJcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICBwdXRNeVZhcihcXFwidXJsXFxcIixjb25maWcuZGF0YVtpXS51cmwrXFxcIiQkJFxcXCIrY29uZmlnLmRhdGFbaV0udXJsMStcXFwiJCQkXFxcIitjb25maWcuZGF0YVtpXS51cmwyKTtcXG4gICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgfVxcbiAgICAgICAgICB9ICAgXFxuICAgd3JpdGVGaWxlKGdldEl0ZW0oJ2ZpbGUnKSwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxuICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WIoOmZpOaIkOWKnydcXG4gICAgICAgICB9LG5hbWUsaSlcXG4gICAgICAgfSxuYW1lLGkpICBcXG4gICAgfV1cXG4gICAgICAgIH0sXFxuICAgICAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKHVybCkgPT4geyBcXG4gICAgICAgICAgICAgIGlmICh1cmwuaW5jbHVkZXMoXFxcImFsaVxcXCIpKSB7IFxcbiAgICAgICAgICAgICAgICAgIHJldHVybiAgICBcXFwiaGlrZXI6Ly9wYWdlL2FsaXl1bj9wYWdlPWZ5cGFnZSZydWxlPeS6keebmOWQmy7nroAmcmVhbHVybD1cXFwiK3VybFxcbiAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodXJsLmluY2x1ZGVzKFxcXCJxdWFya1xcXCIpKSB7IFxcbiAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL3BhZ2UvcXVhcmtMaXN0P3JlYWx1cmw9XFxcIiArIGVuY29kZVVSSUNvbXBvbmVudCh1cmwpICsgXFxcIiZydWxlPVF1YXJrLueugCZzaGFyZVB3ZD1cXFwiXFxuICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgIHJldHVybiB1cmxcXG4gICAgICAgICAgICAgICB9XFxuICAgICAgICAgfSx2KSAgICAgICAgICAgXFxuICAgIH0pXFxufSk7XFxuICAgIGxldCBjb25maWcgPSBKU09OLnBhcnNlKGZldGNoKGdldFZhcigncWRiX2NvbmZpZycpKSk7XFxuXFxuICAgIGxldCBhbmFseXNpc0NvbmZpZ3MgPSBnZXRDb25maWcoJ2FuYWx5c2lzQ29uZmlncycsIGNvbmZpZyk7XFxuICAgIGxldCBleHRyYUNvbmZpZyA9IGFuYWx5c2lzQ29uZmlnc1thbmFseXNpc0NvbmZpZ3MudXNlXS5leHRyYSB8fCAne30nO1xcbiAgICBsZXQgZXh0cmEgPSB7fTtcXG4gICAgdHJ5IHtcXG4gICAgICAgIGlmIChleHRyYUNvbmZpZy5zdGFydHNXaXRoKCd7JykpIGV2YWwo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ICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgLmNvbmNhdChyZWxhdGVkSXRlbXMpXFxuICAgICAgICAgICAgLmNvbmNhdCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIC5jb25jYXQocXVpY2tTZWFyY2hJdGVtcylcXG4gICAgICAgICAgICAuY29uY2F0KHtcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgLmNvbmNhdCh2aWRlb1JlbGF0ZWRJdGVtcylcXG4gICAgICAgICAgICAuY29uY2F0KHtcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgLmNvbmNhdChsaW5rSXRlbXMpXFxuICAgICAgICAgICAgLmNvbmNhdCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIC5jb25jYXQoe1xcclxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfMScsXFxyXFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn4oCc4oCc4oCd4oCdPHNtYWxsPjxmb250IGNvbG9yPSM4NzFmNzg+5pys6KeE5YiZ5Y+K5pWw5o2u5Z2H5pS26ZuG6Ieq572R57uc77yM5LuF6ZmQ5a2m5Lmg5Lqk5rWB5L2/55So77yM6K+35LqO5a+85YWl5ZCOMjTlsI/ml7blhoXliKDpmaTvvIzkuI3lvpfku6Xku7vkvZXmlrnlvI/kvKDmkq3vvIE8L2ZvbnQ+PC9zbWFsbD4nLFxcclxcbiAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5JyxcXHJcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXHJcXG4gIC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aWQ9JyArIHYuaWQ7XFxuICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICBpZiAodi51cmwuaW5jbHVkZXMoXFxcImFsaVxcXCIpKXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9wYWdlL2FsaXl1bj9wYWdlPWZ5cGFnZSZydWxlPeS6keebmOWQmy7nroAmcmVhbHVybD0nICsgdi51cmw7IFxcbiAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodi51cmwuaW5jbHVkZXMoXFxcInF1YXJrXFxcIikpe1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICBcXFwiaGlrZXI6Ly9wYWdlL3F1YXJrTGlzdD9yZWFsdXJsPVxcXCIgKyBlbmNvZGVVUklDb21wb25lbnQodi51cmwpICsgXFxcIiZydWxlPVF1YXJrLueugCZzaGFyZVB3ZD1cXFwiO1xcbiAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgIH1cXG4gICAgICAgIH0saXRlbSkgICxcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgaWQ6IGlkKydiYXInLFxcbiAgICAgICAgfVxcbiAgICB9KVxcblxcbiAgICBpZiAoc3RhcnQgPT0gZmFsc2UgfHwgZ2V0TXlWYXIoJ2JlbnN0YXJ0JywgJ3RydWUnKSA9PSAnZmFsc2UnKSB7XFxuICAgICAgICB1blJlZ2lzdGVyVGFzayhpZClcXG4gICAgICAgIHJldHVyblxcbiAgICB9XFxuICAgIFxcblxcbiAgICBsZXQgb2JqID0ge1xcbiAgICAgICAgZGF0YTogZGF0YSxcXG4gICAgfTtcXG4gICAgcmVnaXN0ZXJUYXNrKGlkLCB0aW1lLCAkLnRvU3RyaW5nKChvYmosaWQpID0+IHtcXG4gICAgICAgIHZhciBkYXRhID0gb2JqLmRhdGE7XFxuICAgICAgICB2YXIgaSA9IE51bWJlcihnZXRNeVZhcigneWluZ2t1JyksJzAnKTtcXG4gICAgICAgIGkgPSBpICsgMTtcXG4gICAgICAgIGlmICggaSA+IGRhdGEubGVuZ3RoLTEpIHtcXG4gICAgICAgICAgICBpID0gMFxcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIGl0ZW0gPSBkYXRhW2ldO1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICB1cGRhdGVJdGVtKGlkKydiYXInLCB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpdGVtLm5hbWUsXFxuICAgICAgICAgICAgICAgIGltZzogaXRlbS5pbWcsXFxuICAgICAgICAgICAgICAgIHVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgodikgPT4geyBcXG4gICAgICAgICAgICAgIGlmICh2LmlkIT11bmRlZmluZWQmJnYuaWQhPVxcXCJcXFwiKSB7IFxcbiAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJ1cmxcXFwiLHYudXJsK1xcXCIkJCRcXFwiK3YudXJsMStcXFwiJCQkXFxcIit2LnVybDIpO1xcbiAgICAgICAgICAgICAgICAgcmV0dXJuICAgICdoaWtlcjovL3BhZ2UvU2RldGFpbCNub0hpc3RvcnkjI2ltbWVyc2l2ZVRoZW1lIz9uYW1lPScrdi5uYW1lKycmdHlwZT0nK3YuZGF0YVR5cGUrJyZpZD0nICsgdi5pZDtcXG4gICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgIGlmICh2LnVybC5pbmNsdWRlcyhcXFwiYWxpXFxcIikpe1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvYWxpeXVuP3BhZ2U9ZnlwYWdlJnJ1bGU95LqR55uY5ZCbLueugCZyZWFsdXJsPScgKyB2LnVybDsgXFxuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh2LnVybC5pbmNsdWRlcyhcXFwicXVhcmtcXFwiKSl7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gIFxcXCJoaWtlcj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QoXFxcXFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcXFxcXCIpKS5ydWxlKTtcXFxcbiAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxcXG4gICAgICAgIGxldCByZW5GbGFnID0gMTtcXFxcbiAgICAgICAgaWYgKGlucHV0KSB7XFxcXG4gICAgICAgICAgICBmb3IgKHZhciBqID0gMDsgaiA8IGNvbmZpZy5kYXRhLmxlbmd0aDsgaisrKSB7XFxcXG4gICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhW2pdLm5hbWUucmVwbGFjZSgvXFxcXFxcXFxzL2csIFxcXFxcXFwiXFxcXFxcXCIpID09IGlucHV0LnJlcGxhY2UoL1xcXFxcXFxccy9nLCBcXFxcXFxcIlxcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICByZW5GbGFnID0gMDtcXFxcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgaWYgKHJlbkZsYWcpIHtcXFxcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGNvbmZpZy5kYXRhLmxlbmd0aDsgaSsrKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcuZGF0YVtpXS5uYW1lID09IG5hbWUpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLm5hbWUgPSBpbnB1dDtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLnRpbWUgPSBnZXRNeVZhcihcXFxcXFxcInRpbWVcXFxcXFxcIiwgXFxcXFxcXCJcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWNvbmZpZy5kYXRhW2ldLnRvcCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYX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tcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL1xcXFxcXFxcdTRlMGRcXFxcXFxcXHU4MGZkXFxcXFxcXFx1NGUzYVxcXFxcXFxcdTdhN2FcXFxcXFxcIjtcXFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgaWYgKGlucHV0Lm1hdGNoKC9odHRwLykgPT0gbnVsbCkge1xcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL1xcXFxcXFxcdTU3MzBcXFxcXFxcXHU1NzQwXFxcXFxcXFx1NjcwOVxcXFxcXFxcdThiZWZcXFxcXFxcXHVmZjAxXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBjb25maWcuZGF0YS5sZW5ndGg7IGkrKykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhW2ldLm5hbWUgPT0gbmFtZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1cmxObyA9PSBcXFxcXFxcIlxcXFxcXFxcdTU3MzBcXFxcXFxcXHU1NzQwXFxcXFxcXFx1NGUwMFxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLnVybCA9IGlucHV0O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1cmxObyA9PSBcXFxcXFxcIlxcXFxcXFxcdTU3MzBcXFxcXFxcXHU1NzQwXFxcXFxcXFx1NGU4Y1xcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS51cmwxID0gaW5wdXQ7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS51cmwyID0gaW5wdXQ7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGdldEl0ZW0oXFxcXFxcXCJmaWxlXFxcXFxcXCIpLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL1xcXFxcXFxcdTMwMTBcXFxcXFxcIiArIHVybE5vICsgXFxcXFxcXCJcXFxcXFxcXHUzMDExXFxcXFxcXFx1NGZlZVxcXFxcXFxcdTY1MzlcXFxcXFxcXHU2MjEwXFxcXFxcXFx1NTI5ZlxcXFxcXFxcdWZmMDFcXFxcXFxcIjtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgLCBpbnB1dCwgdi5uYW1lKTtcXFxcbiAgICB9XFxcXG4gICAgLCB2KTtcXFxcbn1cXFxcbikoe1xcXFxcXFwibmFtZVxcXFxcXFwiOlxcXFxcXFwi5byC5Lq65ZCb6I6r6YKqICjlkajkuIkp5pu05pawOVxcXFxcXFwiLFxcXFxcXFwidXJsXFxcXFxcXCI6XFxcXFxcXCJodHRwczovL3d3dy5hbGl5dW5kcml2ZS5jb20vcy9tMlpYU0p5ZnJnS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ZXR1cm4gXFxcInRvYXN0Oi8v5Zyw5Z2A5pyJ6K+v77yBXFxcIlxcbiAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICBmb3IgKGxldCBpPTA7aTxjb25maWcuZGF0YS5sZW5ndGg7aSsrKSB7XFxuICAgICAgICAgICAgIGlmIChjb25maWcuZGF0YVtpXS5uYW1lPT1uYW1lKXtcXG4gICAgICAgICAgICAgICAgaWYodXJsTm89PTApe1xcbiAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0udXJsPWlucHV0XFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZih1cmxObz09MSl7XFxuICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS51cmwxPWlucHV0XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0udXJsMj1pbnB1dFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJ1cmxcXFwiLGNvbmZpZy5kYXRhW2ldLnVybCtcXFwiJCQkXFxcIitjb25maWcuZGF0YVtpXS51cmwxK1xcXCIkJCRcXFwiK2NvbmZpZy5kYXRhW2ldLnVybDIpO1xcbiAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICB9XFxuICAgICAgICAgIH0gICBcXG4gICB3cml0ZUZpbGUoZ2V0SXRlbSgnZmlsZScpLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXG4gICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5Zyw5Z2A5L+u5pS55oiQ5YqfJ1xcbiAgICAgICAgICAgfVxcbiAgICAgICAgIH0sbmFtZSxpKVxcbiAgICAgICB9LHYsbmFtZSxpKSAgXFxuICAgIH0se1xcbiAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+WIoOmZpOWcsOWdgCcsIFxcbiAgICAgICAgICAgICAgICAgICAgICBqczokLnRvU3RyaW5nKChuYW1lLGkpPT57IFxcbiAgICAgICByZXR1cm4gJChcXFwi56Gu6K6k5Yig6Zmk4oCcXFxcIituYW1lK1xcXCLigJ3vvJ9cXFwiKS5jb25maXJtKChuYW1lLHVybE5vKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXCIpKS5ydWxlKTtcXG4gICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxuICAgICAgICAgIGZvciAobGV0IGk9MDtpPGNvbmZpZy5kYXRhLmxlbmd0aDtpKyspIHtcXG4gICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhW2ldLm5hbWU9PW5hbWUpe1xcbiAgICAgICAgICAgICAgICBpZih1cmxObz09MCl7XFxuICAgICAgICAgICAgICAgICAgICBkZWxldGUgY29uZmlnLmRhdGFbaV0udXJsXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZih1cmxObz09MSl7XFxuICAgICAgICAgICAgICAgICAgICBkZWxldGUgICBjb25maWcuZGF0YVtpXS51cmwxXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBkZWxldGUgY29uZmlnLmRhdGFbaV0udXJsMlxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJ1cmxcXFwiLGNvbmZpZy5kYXRhW2ldLnVybCtcXFwiJCQkXFxcIitjb25maWcuZGF0YVtpXS51cmwxK1xcXCIkJCRcXFwiK2NvbmZpZy5kYXRhW2ldLnVybDIpO1xcbiAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICB9XFxuICAgICAgICAgIH0gICBcXG4gICB3cml0ZUZpbGUoZ2V0SXRlbSgnZmlsZScpLCBKU09OLnN0cmluZ2lmeShjb25maWcp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ICAgICAgICAgIGNvbF90eXBlOiAnbGluZSdcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgLmNvbmNhdChpbnRyb0l0ZW1zKVxcbiAgICAgICAgICAgIC5jb25jYXQoe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAuY29uY2F0KHJlbGF0ZWRJdGVtcylcXG4gICAgICAgICAgICAuY29uY2F0KHtcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgLmNvbmNhdChxdWlja1NlYXJjaEl0ZW1zKVxcbiAgICAgICAgICAgIC5jb25jYXQoe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAuY29uY2F0KHZpZGVvUmVsYXRlZEl0ZW1zKVxcbiAgICAgICAgICAgIC5jb25jYXQoe1xcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAuY29uY2F0KGxpbmtJdGVtcylcXG4gICAgICAgICAgICAuY29uY2F0KHtcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgLmNvbmNhdCh7XFxyXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAndGV4dF8xJyxcXHJcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ08c21hbGw+PGZvbnQgY29sb3I9Izg3MWY3OD7mnKzop4TliJnlj4rmlbDmja7lnYfmlLbpm4boh6rnvZHnu5zvvIzku4XpmZDlrabkuaDkuqTmtYHkvb/nlKjvvIzor7fkuo7lr7zlhaXlkI4yNOWwj+aXtuWGheWIoOmZpO+8jOS4jeW+l+S7peS7u+S9leaWueW8j+S8o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YWdlL2FsaXl1bj9wYWdlPWZ5cGFnZSZydWxlPeS6keebmOWQmy7nroAmcmVhbHVybD0nICtpbnB1dCA7IFxcXFxuICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQuaW5jbHVkZXMoXFxcXFxcXCJxdWFya1xcXFxcXFwiKSl7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAgXFxcXFxcXCJoaWtlcjovL3BhZ2UvcXVhcmtMaXN0P3JlYWx1cmw9XFxcXFxcXCIgKyBlbmNvZGVVUklDb21wb25lbnQoaW5wdXQpICsgXFxcXFxcXCImcnVsZT1RdWFyay7nroAmc2hhcmVQd2Q9XFxcXFxcXCI7XFxcXG4gICAgICAgICAgfVxcXFxuICAgICAgIH0pO1xcXFxuICAgICAgZWwuZXh0cmE9IHsgXFxcXG4gICAgICAgICAgcGFnZVRpdGxlOnYubmFtZSxcXFxcbiAgICAgICAgICBsb25nQ2xpY2s6W3tcXFxcbiAgICAgICAgICAgICAgICB0aXRsZTon57yW6L6R5ZCN56ewJyxcXFxcbiAgICAgICAgICAgICAgICBqczokLnRvU3RyaW5nKCh2LGkpPT57IFxcXFxucmV0dXJuICQodi5uYW1lLCAn44CQJyt2Lm5hbWUrJ+OAkeWQjeensCcpLmlucHV0KChpKSA9PntcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQgPT0gXFxcXFxcXCJcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL+S4jeiDveS4uuepulxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgbGV0IGl0ZW09SlNPTi5wYXJzZShnZXRNeVZhcignaXRlbScpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVtpXS5uYW1lPWlucHV0O1xcXFxuICAgICAgICAgICAgICBwdXRNeVZhcignaXRlbScsIEpTT04uc3RyaW5naWZ5KGl0ZW0pKTsgXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6YeN5ZG95ZCN5oiQ5Yqf77yBJ1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSxpKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgfSx2LGkpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgfSx7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6J+e8lui+keWIhuexuycsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAganM6JC50b1N0cmluZygodixpKT0+eyBcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNob3dTZWxlY3RPcHRpb25zKHtcXFxcbiAgICAgICAgICAgICAgICAgICBcXFxcXFxcInRpdGxlXFxcXFxcXCI6IFxcXFxcXFwi5pu05pS544CQXFxcXFxcXCIrdi50eXBlK1xcXFxcXFwi44CR5Li6XFxcXFxcXCIsIFxcXFxuICAgICAgICAgICAgICAgIFxcXFxcXFwib3B0aW9uc1xcXFxcXFwiIDogW1xcXFxcXFwi55S15b2xXFxcXFxcXCIsIFxcXFxcXFwi55S16KeG5YmnXFxcXFxcXCIsXFxcXFxcXCLliqjmvKtcXFxcXFxcIixcXFxcXFxcIue7vOiJulxcXFxcXFwiLFxcXFxcXFwi57qq5b2V54mHXFxcXFxcXCIsXFxcXFxcXCJNVlxcXFxcXFwiLFxcXFxcXFwi5ZCI6ZuGXFxcXFxcXCIsXFxcXFxcXCLnn63op4bpopFcXFxcXFxcIl0sIFxcXFxuICAgICAgICAgICAgICAgICBjb2w6IDQsIFxcXFxuICAgICAgICAgICAgICAgICBqczokLnRvU3RyaW5nKChpKT0+eyAgICAgICAgICAgICAgICAgICAgIFxcXFxuICAgICAgICAgIGxldCBpdGVtPUpTT04ucGFyc2UoZ2V0TXlWYXIoJ2l0ZW0nKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpdGVtW2ldLnR5cGUgPSBpbnB1dDtcXFxcbiAgICAgICAgICAgICAgcHV0TXlWYXIoJ2l0ZW0nLCBKU09OLnN0cmluZ2lmeShpdGVtKSk7IFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdG9hc3QoJ+WIhuexu+aIkOWKn+abtOaUueS4uuOAkCcraW5wdXQrJ+OAkScpO1xcXFxuICAgICAgICAgICAgICAgICB9LGkpXFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICB9LHYsaSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICB9LHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTon5re75Yqg5pS26JePJyxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICBqczokLnRvU3RyaW5nKCh2LGkpPT57IFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJjb25maXJtOi8v56Gu6K6k5pS26JeP77yaXFxcXFxcXCIgKyB2Lm5hbWUgKyBcXFxcXFxcIi5qczpcXFxcXFxcIiArICQudG9TdHJpbmcoKGkpID0+eyAgICAgICAgICAgICAgXFxcXG5ldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFxcXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFxcXFxcIikpLnJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxcXG4gICAgICAgICAgICAgbGV0IGl0ZW09SlNPTi5wYXJzZShnZXRNeVZhcignaXRlbScpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcuZGF0YS5maWx0ZXIodiA9PnYubmFtZT09aXRlbVtpXS5uYW1lKT09JycpeyAgICAgXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzPSBpdGVtW2ldLm5hbWUucmVwbGFjZSgvXFxcXFxcXFxzLyxcXFxcXFxcIiRcXFxcXFxcIikuc3BsaXQoXFxcXFxcXCIkXFxcXFxcXCIpWzBdIDsgICAgICAgICAgICAgICAgICAgIFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZldGNoVXJsID0gICdodHRwczovL20uZG91YmFuLmNvbS9zZWFyY2gvP3F1ZXJ5PScrcysnJnR5cGU9MTAwMic7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29kZSA9IGZldGNoKGZldGNoVXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBsaXN0ICA9XFxcXG5wZGZhKGNvZGUsXFxcXFxcXCJib2R5JiYuc2VhcmNoX3Jlc3VsdHNfc3ViamVjdHMmJnVsJiZsaVxcXFxcXFwiKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBpYyA9IHBkZmgobGlzdFswXSxcXFxcXFxcImxpJiZpbWcmJnNyY1xcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpZD0gcGRmaChsaXN0WzBdLFxcXFxcXFwibGkmJmEmJmhyZWZcXFxcXFxcIikuc3BsaXQoXFxcXFxcXCIvXFxcXFxcXCIpWzNdXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXBlaHRtbD1cXFxcbmZldGNoKFxcXFxcXFwiaHR0cHM6Ly9tLmRvdWJhbi5jb21cXFxcXFxcIitwZGZoKGxpc3RbMF0sXFxcXFxcXCJsaSYmYSYmaHJlZlxcXFxcXFwiKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGFUeXBlPVxcXFxucGRmaCh0eXBlaHRtbCxcXFxcXFxcImJvZHkmJnNlY3Rpb24sMSYmZGF0YS10eXBlXFxcXFxcXCIpXFxcXG4vL2xvZyhkYXRhVHlwZSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1baV0uaWQ9aWQ7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdGVtW2ldLnBpYz1waWM7IFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1baV0uZGF0YVR5cGU9ZGF0YVR5cGU7IFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoKGUpe2l0ZW1baV0uaWQ9Jyd9ICAgICAgICAgICAgICAgICAgICAgICAgXFxcXG5jb25maWcuZGF0YS5zcGxpY2UoY29uZmlnLmRhdGEuZmlsdGVyKGkgPT4gaS50b3ApLmxlbmd0aCwgMCxpdGVtW2ldIClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoZ2V0SXRlbSgnZmlsZScpLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwidG9hc3Q6Ly/mlLbol4/miJDlip/vvIFcXFxcXFxcIjtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcInRvYXN0Oi8v5bey57uP5pS26JeP6L+H5LqG77yBXFxcXFxcXCJ9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LGkpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgfSx2LGkpXFxcXG4gICAgICAgICAgfV1cXFxcbiAgICAgIH1cXFxcbiAgICAgIGQucHVzaChlbClcXFxcbn0pICAgICAgXFxcXG5cXFxcbnNldFJlc3VsdChkKTtcXFwifSx7XFxcImNvbF90eXBlXFxcIjpcXFwibW92aWVfM1xcXCIsXFxcIm5hbWVcXFwiOlxcXCLliqDovb3mlbDmja5cXFwiLFxcXCJwYXRoXFxcIjpcXFwiY29uZmlnXFxcIixcXFwicnVsZVxcXCI6XFxcImZ1bmN0aW9uIGdldENvbmZpZygpIHtcXFxcbiAgICBsZXQgIG1vZGUgPSBnZXRJdGVtKCdtb2RlJywgJ+acrOWcsCcpO1xcXFxuICAgIGlmIChtb2RlID09IFxcXFxcXFwi5pys5ZywXFxcXFxcXCIpICB7IHNldEl0ZW0oJ2ZpbGUnLCAgJ2hpa2VyOi8vZmlsZXMvcnVsZXMvY2F0enovYWxpeXVua3UvbG9jYWwuanNvbicpO30gICAgXFxcXG4gICAgIGVsc2UgeyBzZXRJdGVtKCdmaWxlJywgJ2hpa2VyOi8vZmlsZXMvcnVsZXMvY2F0enovYWxpeXVua3UvcGFua3UuanNvbicpOyB9XFxcXG4gICAgIHRyeSB7XFxcXG4gICAgICAgIGxldCBjb25maWcgPSBmZXRjaChnZXRJdGVtKCdmaWxlJykpO1xcXFxuICAgICAgICBpZiAoIWNvbmZpZyB8fCBjb25maWcgPT0gXFxcXFxcXCJcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgcmV0dXJuIHtcXFxcbiAgICAgICAgICAgICAgICBkYXRhOiBbXSxcXFxcbiAgICAgICAgICAgICAgICB2ZXJzaW9uOiAwXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICByZXR1cm4gSlNPTi5wYXJzZShjb25maWcpXFxcXG4gICAgICAgIH1cXFxcbiAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICB0b2FzdChcXFxcXFxcIuaVsOaNruaWh+S7tuagvOW8j+WHuumUme+8gVxcXFxcXFwiKVxcXFxuICAgICAgICB9IGNhdGNoIChlKSB7fVxcXFxuICAgICAgICByZXR1cm4ge1xcXFxuICAgICAgICAgICAgZGF0YTogW10sXFxcXG4gICAgICAgICAgICB2ZXJzaW9uOiAwXFxcXG4gICAgICAgIH1cXFxcbiAgICB9XFxcXG59XFxcXG5mdW5jdGlvbiBub3dUaW1lKCkge1xcXFxuICAgICAgICB2YXIgZGF0ZSA9IG5ldyBEYXRlKCk7XFxcXG4gICAgICAgIHZhciBZWSA9IGRhdGUuZ2V0RnVsbFllYXIoKSArICctJztcXFxcbiAgICAgICAgdmFyIE1NID0gKGRhdGUuZ2V0TW9udGgoKSArIDEgPCAxMCA/ICcwJyArIChkYXRlLmdldE1vbnRoKCkgKyAxKSA6IGRhdGUuZ2V0TW9udGgoKSArIDEpICsgJy0nO1xcXFxuICAgICAgICB2YXIgREQgPSAoZGF0ZS5nZXREYXRlKCkgPCAxMCA/ICcwJyArIChkYXRlLmdldERhdGUoKSkgOiBkYXRlLmdldERhdGUoKSk7XFxcXG4gICAgICAgIHJldHVybiBZWSArIE1NICsgREQgO1xcXFxufVxcXFxuZnVuY3Rpb24gc29ydHMobGlzdCwgbWV0aG9kKSB7XFxcXG4gICAgICAgIGxldCB0b3BsaXN0PWxpc3QuZmlsdGVyKGkgPT4gaS50b3ApXFxcXG4gICAgICAgIH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yY29udGVudC5jb20vbHMxMjU3ODEwMDMvbG10dWJpYW8vbWFpbi9tZXNzeS81NC5zdmdcXFxcXFxcIixcXFxcbiAgICAgICAgdXJsOiAkKG1vZGVMaXN0LCAxKS5zZWxlY3QoKCkgPT4ge1xcXFxuICAgICAgICAgICByZXR1cm4gJCgn56Gu5a6a5YiH5o2i77yfJykuY29uZmlybSgobW9kZSkgPT4geyAgXFxcXG4gICAgICAgICAgICAgICAgICBpZiAobW9kZSA9PSBcXFxcXFxcIuacrOWcsOaooeW8j1xcXFxcXFwiKSAge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ21vZGUnLCAn5pys5ZywJyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChtb2RlID09IFxcXFxcXFwi6L+c56iL5qih5byPXFxcXFxcXCIpe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oJ21vZGUnLCAn6L+c56iLJyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSBcXFxcbiAgICAgICAgICAgICAgfSwgaW5wdXQpXFxcXG4gICAgICAgICAgIH0pICAgXFxcXG4gICAgfSk7ICAgIFxcXFxuICAgIGQucHVzaCh7XFxcXG4gICAgICAgIHRpdGxlOiBcXFxcXFxcIuaYvuekuuiuvue9rlxcXFxcXFwiLFxcXFxuICAgICAgICBkZXNjOiBcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgICAgICBwaWNfdXJsOiBcXFxcXFxcImh0dHBzOi8vZ2hwcm94eS5uZXQvaHR0cHM6Ly9yYXcuZ2l0aHVidXNlcmNvbnRlbnQuY29tL2xzMTI1NzgxMDAzL2xtdHViaWFvL21haW4vbWVzc3kvMTcuc3ZnXFxcXFxcXCIsXFxcXG4gICAg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cXFxcXFwiLFxcXFxcXFwi55+t6KeG6aKRXFxcXFxcXCJdLDQpLnNlbGVjdCgoY29uZmlnKSA9PiB7ICAgICAgICAgICAgXFxcXG4gICAgICAgICAgICAgIGZvciAodmFyIGk9MDtpPGNvbmZpZy5kYXRhLmxlbmd0aDtpKyspIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcuZGF0YVtpXS5jaGVja2VkKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLnR5cGU9aW5wdXQ7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS5jaGVja2VkPWZhbHNlXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcbndyaXRlRmlsZShnZXRJdGVtKCdmaWxlJyksIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcInRvYXN0Oi8v5omA6YCJ6LWE5rqQ5YiG57G75pu05pS55oiQ5Yqf77yBXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgICAgfSxjb25maWcpXFxcXG4gICAgICAgICAgfSkgOiBcXFxcXFxcIlxcXFxcXFwiXFxcXG4gICAgIGJyZWFrO1xcXFxuICAgICBjYXNlIFxcXFxcXFwi5om56YeP5Yig6ZmkXFxcXFxcXCI6XFxcXG4gICAgICAgICAgIGZsYWdEZWxldGUubGVuZ3RoP1xcXFxuICAgICAgICAgICAgZC5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXFxcXFwi4oCc4oCc4oCd4oCd5Yig6Zmk56Gu6K6kXFxcXFxcXCIuYm9sZCgpLFxcXFxuICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJ0ZXh0X2NlbnRlcl8xXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgIHVybDogJCgn56Gu6K6k5Yig6ZmkJykuY29uZmlybSgoY29uZmlnKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IFtdO1xcXFxuICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YS5mb3JFYWNoKCh4KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAheC5kZWxldGUgPyBydWxlcy5wdXNoKHgpIDogbnVsbFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YT1ydWxlcztcXFxcbndyaXRlRmlsZShnZXRJdGVtKCdmaWxlJyksSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcXFxuICAgICAgICAgICAgICAgICAgICB9LGNvbmZpZylcXFxcbiAgICAgICAgICB9KSA6IFxcXFxcXFwiXFxcXFxcXCJcXFxcbiAgICAgIGJyZWFrXFxcXG4gIH07XFxcXG5cXFxcbmV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXFxcXFwiKSkucnVsZSk7XFxcXG4gICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxcXG4gICAgY29uZmlnLmRhdGEuZm9yRWFjaCgodiwgaSkgPT4ge1xcXFxuICAgICAgICBsZXQgZWwgPSB7XFxcXG4gICAgICAgICAgICAgdGl0bGU6IHYudG9wID8gJ/CfhpknK3YubmFtZSA6IHYubmFtZSxcXFxcbiAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJ0ZXh0XzJcXFxcXFxcIlxcXFxuICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgc3dpdGNoIChlZGl0TW9kZSkge1xcXFxuICAgICAgICAgICAgY2FzZSAn5om56YeP5YiG57G7JzpcXFxcbiAgICAgICAgICAgICAgICBpZiAodi50eXBlPT0n5pyq5YiG57G7Jyl7XFxcXG4gICAgICAgICAgICAgICAgICAgIGVsLnRpdGxlPSfwn5OMJysnW+acquWIhuexu10nK2VsLnRpdGxlXFxcXG4gICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgZWwudGl0bGU9J1snK3YudHlwZSsnXScrZWwudGl0bGVcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIGVsLnRpdGxlID0gKHYuY2hlY2tlZCA/ICfinIUnIDogJyAnKSArIGVsLnRpdGxlO1xcXFxuICAgICAgICAgICAgICAgIGVsLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGkpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFxcXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFxcXFxcIikpLnJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0uY2hlY2tlZCA9ICFjb25maWcuZGF0YVtpXS5jaGVja2VkOyAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoZ2V0SXRlbSgnZmlsZScpLEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXFxcbiAgICAgICAgICAgIH0sIGkpO1xcXFxuICAgICAgICAgIGJyZWFrXFxcXG4gICAgICAgICAgY2FzZSAn6YeN5paw5o6S5bqPJzpcXFxcbiAgICAgICAgICAgICAgICBsZXQgc29ydEZsYWcgPSBwYXJzZUludChnZXRNeVZhcignc29ydEZsYWcnLCAnLTEnKSlcXFxcbiAgICAgICAgICAgICAgICBlbC50aXRsZSA9IChzb3J0RmxhZyA9PSBpID8gJ/CflIMgICcgOiAnJykgKyBlbC50aXRsZVxcXFxuICAgICAgICAgICAgICAgIGlmIChzb3J0RmxhZyA9PSAtMSlcXFxcbiAgICAgICAgICAgICAgICAgICAgZWwudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgaS50b1N0cmluZygpKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIGkpXFxcXG4gICAgICAgICAgICAgICAgZWxzZVxcXFxuICAgICAgICAgICAgICAgICAgICBlbC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChvbGRJbmRleCwgbmV3SW5kZXgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXFxcXFwiKSkucnVsZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcuZGF0YVtvbGRJbmRleF0udG9wJiZuZXdJbmRleDxjb25maWcuZGF0YS5maWx0ZXIoaSA9PiBpLnRvcCkubGVuZ3RoKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhLnNwbGljZShuZXdJbmRleCwgMCwgY29uZmlnLmRhdGEuc3BsaWNlKG9sZEluZGV4LCAxKVswXSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoZ2V0SXRlbSgnZmlsZScpLCAgICAgICAgIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgJy0xJylcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICghY29uZmlnLmRhdGFbb2xkSW5kZXhdLnRvcCYmbmV3SW5kZXg+Y29uZmlnLmRhdGEuZmlsdGVyKGkgPT4gaS50b3ApLmxlbmd0aC0xKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhLnNwbGljZShuZXdJbmRleCwgMCwgY29uZmlnLmRhdGEuc3BsaWNlKG9sZEluZGV4LCAxKVswXSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoZ2V0SXRlbSgnZmlsZScpLCAgICAgICAgIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgJy0xJylcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v56e75Yqo55qE5L2N572u5LiN5q2j56Gu77yBJ1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICB9LCBzb3J0RmxhZywgaSlcXFxcbiAgICAgICAgICAgIGJyZWFrXFxcXG4gICAgICAgICAgICBjYXNlICfmibnph4/liKDpmaQnOlxcXFxuICAgICAgICAgICAgICAgIGVsLnRpdGxlID0gKHYuZGVsZXRlID8gJ+KdjCcgOiAnJykgKyBlbC50aXRsZTsgICAgICBcXFxcbiAgICAgICAgICAgICAgICBlbC51cmwgPSAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChpKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcXFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcXFxcXCIpKS5ydWxlKTtcXFxcbiAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXFxcbiAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS5kZWxldGUgPSAhY29uZmlnLmRhdGFbaV0uZGVsZXRlOyAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoZ2V0SXRlbSgnZmlsZScpLEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxcXG4gICAgICAgICAgICB9LCBpKTsgICAgICAgICAgXFxcXG4gICAgICAgICAgIGJyZWFrXFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgZC5wdXNoKGVsKVxcXFxuICAgIH0pO1xcXFxuICAgIHJldHVybiBkO1xcXFx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VwbGFjZSgvXFxcXFxcXFxzL2csXFxcXFxcXCJcXFxcXFxcIik9PWlucHV0LnJlcGxhY2UoL1xcXFxcXFxccy9nLFxcXFxcXFwiXFxcXFxcXCIpKSB7ICAgICAgICAgICAgICAgICAgIFxcXFxuICAgICAgICAgICAgICAgICAgICAgICByZW5GbGFnPTA7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcXFxuICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICBpZiAocmVuRmxhZykge1xcXFxuICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaT0wO2k8Y29uZmlnLmRhdGEubGVuZ3RoO2krKykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcuZGF0YVtpXS5uYW1lPT1uYW1lKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS5uYW1lPWlucHV0O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLnRpbWUgPSBnZXRNeVZhcigndGltZScsJycpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghY29uZmlnLmRhdGFbaV0udG9wKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGEuc3BsaWNlKGNvbmZpZy5kYXRhLmZpbHRlcihpID0+IGkudG9wKS5sZW5ndGgsIDAsIGNvbmZpZy5kYXRhLnNwbGljZShpLCAxKVswXSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YS5zcGxpY2UoMCwgMCwgY29uZmlnLmRhdGEuc3BsaWNlKGksIDEpWzBdKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgIH0gXFxcXG4gICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShnZXRJdGVtKCdmaWxlJyksIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcXFxuICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXFxcbiAgICAgICAgICAgICAgICAgICB0b2FzdCgn6YeN5ZG95ZCN5oiQ5Yqf77yBJyk7XFxcXG4gICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgdG9hc3QoJ+aWh+S7tuWQjeW3suWtmOWcqO+8gScpXFxcXG4gICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgIHRvYXN0KCflkI3np7DkuI3og73kuLrnqbrvvIEnKVxcXFxuICAgICAgICAgICB9XFxcXG4gICAgICAgICB9LHYubmFtZSlcXFxcbiAgICAgICB9LHYpICBcXFxcbiAgICB9LHtcXFxcbiAgICAgICB0aXRsZTogJ+KYhee8lui+kea1t+aKpScsIFxcXFxuICAgICAgIGpzOiQudG9TdHJpbmcoKHYpPT57IFxcXFxucmV0dXJuICQodi5pbWcsICfjgJAnK3YubmFtZSsn44CR5rW35oqlJykuaW5wdXQoKG5hbWUpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFxcXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFxcXFxcIikpLnJ1bGUpO1xcXFxuICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcXFxuICAgICAgICAgaWYgKGlucHV0ID09IFxcXFxcXFwiXFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgICBmb3IgKHZhciBpPTA7aTxjb25maWcuZGF0YS5sZW5ndGg7aSsrKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhW2ldLm5hbWU9PW5hbWUpe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS5pbWc9aW5wdXQ7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcXFxuICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgfVxcXFxuIHdyaXRlRmlsZShnZXRJdGVtKCdmaWxlJyksIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcXFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcXFxuICAgICAgICAgICAgdG9hc3QoJ+a1t+aKpee9ruepuuaIkOWKn++8gScpO1xcXFxuICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQubWF0Y2goL2pwZ3xwbmd8d2VicHxnaWZ8anBlZ3xibXB8c3ZnL2kpPT1udWxsKXsgXFxcXG4gICAgICAgICAgICAgdG9hc3QoJ+WPquiDveS4uuWbvueJh+agvOW8jyEnKVxcXFxuICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgZm9yICh2YXIgaT0wO2k8Y29uZmlnLmRhdGEubGVuZ3RoO2krKykge1xcXFxuICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcuZGF0YVtpXS5uYW1lPT1uYW1lKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0uaW1nPWlucHV0O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXFxcbiAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgIH1cXFxcbiB3cml0ZUZpbGUoZ2V0SXRlbSgnZmlsZScpLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXFxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXFxcbiAgICAgICAgICAgIHRvYXN0KCfmtbfmiqXmm7TmlLnmiJDlip/vvIEnKT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AgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh1cmxObz09XFxcXFxcXCLlnLDlnYDkuoxcXFxcXFxcIil7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS51cmwxPWlucHV0O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS51cmwyPWlucHV0O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxcXG4gICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICB9ICAgXFxcXG4gICAgICAgICAgICAgICB3cml0ZUZpbGUoZ2V0SXRlbSgnZmlsZScpLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXFxcbiAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcXFxuICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+OAkCcrdXJsTm8rJ+OAkeS/ruaUueaIkOWKn++8gSdcXFxcbiAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9LGlucHV0LHYubmFtZSlcXFxcbiAgICAgICAgIH0sdilcXFxcbiAgICAgIH0sdikgIFxcXFxuICAgIH0se1xcXFxuICAgICAgIHRpdGxlOiAn57yW6L6R5bCB6Z2iJywgXFxcXG4gICAgICAganM6JC50b1N0cmluZygodik9PnsgXFxcXG5yZXR1cm4gJCh2LnBpYywgJ+OAkCcrdi5uYW1lKyfjgJHlsIHpnaInKS5pbnB1dCgobmFtZSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXFxcXFwiKSkucnVsZSk7XFxcXG4gICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxcXG4gICAgICAgICBpZiAoaW5wdXQgPT0gXFxcXFxcXCJcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgIGZvciAodmFyIGk9MDtpPGNvbmZpZy5kYXRhLmxlbmd0aDtpKyspIHtcXFxcbiAgICAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFbaV0ubmFtZT09bmFtZSl7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLnBpYz1pbnB1dDtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxcXG4gICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICB9XFxcXG4gd3JpdGVGaWxlKGdldEl0ZW0oJ2ZpbGUnKSwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxcXG4gICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxcXG4gICAgICAgICAgICB0b2FzdCgn5bCB6Z2i5Zu+54mH572u56m65oiQ5Yqf77yBJyk7XFxcXG4gICAgICAgICAgfSBlbHNlIGlmIChpbnB1dC5tYXRjaCgvanBnfHBuZ3x3ZWJwfGdpZnxqcGVnfGJtcHxzdmcvaSk9PW51bGwpeyBcXFxcbiAgICAgICAgICAgICB0b2FzdCgn5Y+q6IO95Li65Zu+54mH5qC85byPIScpXFxcXG4gICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICBmb3IgKHZhciBpPTA7aTxjb25maWcuZGF0YS5sZW5ndGg7aSsrKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhW2ldLm5hbWU9PW5hbWUpe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS5waWM9aW5wdXQ7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcXFxuICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgfVxcXFxuIHdyaXRlR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gICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcXFxuICAgICAgICAgZm9yICh2YXIgaT0wO2k8Y29uZmlnLmRhdGEubGVuZ3RoO2krKykge1xcXFxuICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhW2ldLm5hbWU9PXYubmFtZSl7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS50eXBlPWlucHV0O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxcXG4gICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgfVxcXFxuICAgICAgICAgIHdyaXRlRmlsZShnZXRJdGVtKCdmaWxlJyksICAgICAgICAgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxcXG4gICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcXFxuICAgICAgICAgIHRvYXN0KCfliIbnsbvmiJDlip/mm7TmlLnkuLrjgJAnK2lucHV0KyfjgJEnKTtcXFxcbiAgICAgICAgICAgICAgICAgfSx2KVxcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgIH0sdilcXFxcbn0se1xcXFxuICAgICAgIHRpdGxlOiAn6LGG55OjaWQnLCBcXFxcbiAgICAgICBqczokLnRvU3RyaW5nKCh2KT0+eyBcXFxcbnJldHVybiAkKHYuaWQsICfjgJAnK3YubmFtZSsn44CR6LGG55OjaWQnKS5pbnB1dCgobmFtZSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXFxcXFwiKSkucnVsZSk7XFxcXG4gICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxcXG4gICAgICAgICBpZiAoaW5wdXQgPT0gXFxcXFxcXCJcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgIGZvciAodmFyIGk9MDtpPGNvbmZpZy5kYXRhLmxlbmd0aDtpKyspIHtcXFxcbiAgICAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFbaV0ubmFtZT09bmFtZSl7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLmlkPWlucHV0O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXFxcbiAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgIH1cXFxcbiB3cml0ZUZpbGUoZ2V0SXRlbSgnZmlsZScpLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXFxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXFxcbiAgICAgICAgICAgIHRvYXN0KCdpZOe9ruepuuaIkOWKn++8gScpO1xcXFxuICAgICAgICAgIH0gZWxzZSBpZiAoaW5wdXQubWF0Y2goL15bMC05XSokLyk9PW51bGwpeyBcXFxcbiAgICAgICAgICAgICB0b2FzdCgnaWTlj6rog73kuLrmlbDlrZchJylcXFxcbiAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgIGZvciAodmFyIGk9MDtpPGNvbmZpZy5kYXRhLmxlbmd0aDtpKyspIHtcXFxcbiAgICAgICAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFbaV0ubmFtZT09bmFtZSl7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLmlkPWlucHV0O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXFxcbiAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgIH1cXFxcbiB3cml0ZUZpbGUoZ2V0SXRlbSgnZmlsZScpLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXFxcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXFxcbiAgICAgICAgICAgIHRvYXN0KCdpZOabtOaUueaIkOWKn++8gScpO1xcXFxuICAgICAgICAgIH0gXFxcXG4gICAgICAgICB9LHYubmFtZSlcXFxcbiAgICAgICB9LHYpICBcXFxcbiAgICB9LHtcXFxcbiAgICAgICB0aXRsZTogJ+ixhueTo+WIhuexuycsIFxcXFxuICAgICAgIGpzOiQudG9TdHJpbmcoKHYpPT57IFxcXFxuICAgICAgICAgICBzaG93U2VsZWN0T3B0aW9ucyh7XFxcXG4gICAgICAgICAgICAgIFxcXFxcXFwidGl0bGVcXFxcXFxcIjogXFxcXFxcXCLmm7TmlLlcXFxcXFxcIitcXFxcXFxcIuOAkFxcXFxcXFwiK3YuZGF0YVR5cGUrXFxcXFxcXCLjgJHkuLpcXFxcXFxcIiwgXFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCJvcHRpb25zXFxcXFxcXCIgOiBbXFxcXFxcXCJ0dlxcXFxcXFwiLCBcXFxcXFxcIm1vdmllXFxcXFxcXCJdLCBcXFxcbiAgICAgICAgICAgICAgICAgY29sOiAxLFxcXFxuICAgICAgICAgICAgICAgICBqczokLnRvU3RyaW5nKChuYW1lKT0+eyBcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcXFxcXFxcImhpa2VyOi8vcGFnZS9jb25maWdcXFxcXFxcIikpLnJ1bGUpO1xcXFxuICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7XFxcXG4gICAgICAgICBmb3IgKHZhciBpPTA7aTxjb25maWcuZGF0YS5sZW5ndGg7aSsrKSB7XFxcXG4gICAgICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhW2ldLm5hbWU9PW5hbWUpe1xcXFxuICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS5kYXRhVHlwZT1pbnB1dDtcXFxcbiAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgfVxcXFxuICAgICAgICAgICB3cml0ZUZpbGUoZ2V0SXRlbSgnZmlsZScpLCAgICAgIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcXFxuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcXFxuICAgICAgICAgICAgdG9hc3QoJ+ixhueTo+WIhuexu+abtOaUueaIkOWKn++8gScpO1xcXFxuICAgICAgICAgfSx2Lm5hbWUpXFxcXG4gICAgICAgIH0pO1xcXFxuICAgICAgIH0sdikgIFxcXFxuICAgIH0se1xcXFxuICAgICAgIHRpdGxlOiAn5L+h5oGv5Yiu5YmKJywgXFxcXG4gICAgICAganM6JC50b1N0cmluZygodik9PnsgXFxcXG4gICAgICAgICAgICBpZiAoIXYucGljKSB7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuICQodi5uYW1lLCAn5Yiu5YmK44CQJyt2Lm5hbWUrJ+OAkScpLmlucHV0KChuYW1lKSA9PntcXFxcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXFxcbmV2YWwoSlNPTi5wYXJzZShyZXF1ZXN0KFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2NvbmZpZ1xcXFxcXFwiKSkucnVsZSk7ICAgICAgICAgICAgIFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnID0gZ2V0Q29uZmlnKCk7ICBcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzPSBpbnB1dC5yZXBsYWNlKC9cXFxcXFxcXHMvLFxcXFxcXFwiJFxcXFxcXFwiKS5zcGxpdChcXFxcXFxcIiRcXFxcXFxcIilbMF0gOyAgICAgICAgICAgICAgICAgICAgXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZmV0Y2hVcmwgPSAgJ2h0dHBzOi8vbS5kb3ViYW4uY29tL3NlYXJjaC8/cXVlcnk9JytzKycmdHlwZT0xMDAyJztcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBjb2RlID0gZmV0Y2goZmV0Y2hVcmwpO1xcXFxuLy9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ICAgICAgICBjb25maWcuZGF0YVtpXS5waWM9cGljOyBcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLmRhdGFUeXBlPWRhdGFUeXBlO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVGaWxlKGdldEl0ZW0oJ2ZpbGUnKSwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICB0b2FzdChcXFxcXFxcIuWIruWJiuaIkOWKnyFcXFxcXFxcIik7IFxcXFxuICAgICAgICAgICAgICAgICAgfSBjYXRjaChlKXt0b2FzdChcXFxcXFxcIuWIruWJiuWksei0pe+8gVxcXFxcXFwiKX1cXFxcbiAgICAgICAgICAgICAgIH0sdi5uYW1lKVxcXFxuICAgICAgICAgIH0gZWxzZSB7IHRvYXN0KFxcXFxcXFwi5bey57uP5Yiu5YmK6L+HIVxcXFxcXFwiKTsgfVxcXFxuICAgICAgfSx2KVxcXFxuICAgIH0se1xcXFxuICAgICAgIHRpdGxlOiAnKOWPlua2iCnnva7pobYnLCBcXFxcbiAgICAgICBqczokLnRvU3RyaW5nKCh2KT0+eyBcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF2LnRvcCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAgJChcXFxcXFxcIue9rumhtuKAnFxcXFxcXFwiK3YubmFtZStcXFxcXFxcIuKAne+8n1xcXFxcXFwiKS5jb25maXJtKChuYW1lKT0+e1xcXFxuZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcXFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcXFxcXCIpKS5ydWxlKTsgICAgICAgICAgICAgXFxcXG4gICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTsgICAgICAgICBcXFxcbiAgICAgICAgICAgZm9yICh2YXIgaT0wO2k8Y29uZmlnLmRhdGEubGVuZ3RoO2krKykge1xcXFxuICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcuZGF0YVtpXS5uYW1lPT1uYW1lKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0udG9wPSFjb25maWcuZGF0YVtpXS50b3A7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhLnNwbGljZSgwLCAwLCBjb25maWcuZGF0YS5zcGxpY2UoaSwgMSlbMF0pOyBcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxcXG4gICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICBcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZUZpbGUoZ2V0SXRlbSgnZmlsZScpLCBKU09OLnN0cmluZ2lmeShjb25maWcpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9hc3QoXFxcXFxcXCLnva7pobbmiJDlip8hXFxcXFxcXCIpOyBcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sdi5uYW1lKVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAgJChcXFxcXFxcIuWPlua2iOKAnFxcXFxcXFwiK3YubmFtZStcXFxcXFxcIuKAnee9rumhtu+8n1xcXFxcXFwiKS5jb25maXJtKChuYW1lKT0+e1xcXFxuZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcXFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcXFxcXCIpKS5ydWxlKTsgICAgICAgICAgICAgXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTsgICAgICBcXFxcbiAgICAgICAgICAgZm9yICh2YXIgaT0wO2k8Y29uZmlnLmRhdGEubGVuZ3RoO2krKykge1xcXFxuICAgICAgICAgICAgICAgICAgIGlmIChjb25maWcuZGF0YVtpXS5uYW1lPT1uYW1lKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGFbaV0udG9wPSFjb25maWcuZGF0YVtpXS50b3A7ICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlnLmRhdGEuc3BsaWNlKGNvbmZpZy5kYXRhLmZpbHRlcihpID0+ICBpLnRvcCkubGVuZ3RoLCAwLCBjb25maWcuZGF0YS5zcGxpY2UoaSwgMSlbMF0pOyBcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcXFxuICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlRmlsZShnZXRJdGVtKCdmaWxlJyksIEpTT04uc3RyaW5naWZ5KGNvbmZpZykpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b2FzdChcXFxcXFxcIuWPlua2iOe9rumhtuaIkOWKnyFcXFxcXFxcIik7ICAgICAgICAgICAgICAgICAgICAgIFxcXFxuICAgICAgICAgICAgIH0sdi5uYW1lKVxcXFxuICAgICAgICAgIH1cXFxcbiAgICAgICB9LHYpXFxcXG4gICAgfSx7XFxcXG4gICAgICAgIHRpdGxlOiAn5YiGIOS6qycsIFxcXFxuICAgICAgICAgICBqczokLnRvU3RyaW5nKCh2KT0+eyBcXFxcbiAgICAgICAgICAgICAgcmV0dXJuICAkKCfnoa7lrprliIbkuqvotYTmupDvvJ8nKS5jb25maXJtKCh2KSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcXFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcXFxcXCIpKS5ydWxlKTtcXFxcbiAgICAgICAgICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpO1xcXFxuICAgICAgICAgICAgICAgICAgdmFyIGRhdGEgPSAn6LWE5rqQ5bqT5YiG5LqrwqUnK0pTT04uc3RyaW5naWZ5KHYpO1xcXFxuICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiY29weTovL1xcXFxcXFwiICsgZGF0YTtcXFxcbiAgICAgICAgICAgICAgfSwgdilcXFxcbiAgICAgICAgICAgfSx2KSAgXFxcXG4gICAgfSx7XFxcXG4gICAgICAgdGl0bGU6ICfliKAgIOmZpCcsIFxcXFxuICAgICAgIGpzOiQudG9TdHJpbmcoKHYpPT57IFxcXFxuICAgICAgICAgICByZXR1cm4gJChcXFxcXFxcIuehruiupOWIoOmZpOKAnFxcXFxcXFwiK3YubmFtZStcXFxcXFxcIuKAne+8n1xcXFxcXFwiKS5jb25maXJtKChuYW1lKT0+e1xcXFxuZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcXFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcXFxcXCIpKS5ydWxlKTsgICAgICAgICAgICAgXFxcXG4gICAgICAgICAgIGNvbmZpZyA9IGdldENvbmZpZygpOyAgXFxcXG5jb25maWcuZGF0YSA9IGNvbmZpZy5kYXRhLmZpbHRlcihpID0+IGkubmF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9MDtpPGNvbmZpZy5kYXRhLmxlbmd0aDtpKyspIHtcXFxcbiAgICAgICAgICAgICBpZiAoY29uZmlnLmRhdGFbaV0ubmFtZT09bmFtZSl7XFxcXG4gICAgICAgICAgICAgICAgaWYodXJsTm89PTApe1xcXFxuICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS51cmw9aW5wdXRcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYodXJsTm89PTEpe1xcXFxuICAgICAgICAgICAgICAgICAgICBjb25maWcuZGF0YVtpXS51cmwxPWlucHV0XFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgIGNvbmZpZy5kYXRhW2ldLnVybDI9aW5wdXRcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgcHV0TXlWYXIoXFxcXFxcXCJ1cmxcXFxcXFxcIixjb25maWcuZGF0YVtpXS51cmwrXFxcXFxcXCIkJCRcXFxcXFxcIitjb25maWcuZGF0YVtpXS51cmwxK1xcXFxcXFwiJCQkXFxcXFxcXCIrY29uZmlnLmRhdGFbaV0udXJsMik7XFxcXG4gICAgICAgICAgICAgICBicmVhaztcXFxcbiAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgfSAgIFxcXFxuICAgd3JpdGVGaWxlKGdldEl0ZW0oJ2ZpbGUnKSwgSlNPTi5zdHJpbmdpZnkoY29uZmlnKSk7XFxcXG4gICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXFxcbiAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lnLDlnYDkv67mlLnmiJDlip8nXFxcXG4gICAgICAgICAgIH1cXFxcbiAgICAgICAgIH0sbmFtZSxpKVxcXFxuICAgICAgIH0sdixuYW1lLGkpICBcXFxcbiAgICB9LHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+WIoOmZpOWcsOWdgCcsIFxcXFxuICAgICAgICAgICAgICAgICAgICAgIGpzOiQudG9TdHJpbmcoKG5hbWUsaSk9PnsgXFxcXG4gICAgICAgcmV0dXJuICQoXFxcXFxcXCLnoa7orqTliKDpmaTigJxcXFxcXFxcIituYW1lK1xcXFxcXFwi4oCd77yfXFxcXFxcXCIpLmNvbmZpcm0oKG5hbWUsdXJsTm8pPT57XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgZXZhbChKU09OLnBhcnNlKHJlcXVlc3QoXFxcXFxcXCJoaWtlcjovL3BhZ2UvY29uZmlnXFxcXFxcXCIpKS5ydWxlKTtcXFxcbiAgICAgICAgICBjb25maWcgPSBnZXRDb25maWcoKTtcXFxcbiAgICAgICAgICBmb3IgKGxldCBpPTA7aTxjb25maWcuZGF0YS5sZW5ndGg7aSsrKSB7XFxcXG4gICAgICAgICAgICAgaWYgKGNvbmZpZy5kYXRhW2ldLm5hbWU9PW5hbWUpe1xcXFxuICAgICAgICAgICAgICAgIGlmKHVybE5vPT0wKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGNvbmZpZy5kYXRhW2ldLnVybFxcXFxuICAgICAgICAgICAgICAgIH0gZWxzZSBpZih1cmxObz09MSl7XFxcXG4gICAgICAgICAgICAgICAgICAgIGRlbGV0ZSAgIGNvbmZpZy5kYXRhW2ldLnVybDFcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICBkZWxldGUgY29uZmlnLmRhdGFbaV0udXJsMlxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICBwdXRNeVZhcihcXFxcXFxcInVybFxcXFxcXFwiLGNvbmZpZy5kYXRhW2ldLnVybCtcXFxcXFxcIiQkJFxcXFxcXFwiK2NvbmZpZy5kYXRhW2ldLnVybDErXFxcXFxcXCIkJCRcXFxcXFxcIitjb25maWcuZGF0YVtpXS51cmwyKTtcXFxcbiAgICAgICAgICAgICAgIGJyZWFrO1xcXFxuICAgICAgICAgICAgI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FyY2g/cz0nICsgaS50aXRsZSArICcmcnVsZT0nICsgcXVpY2tTZWFyY2hDb25maWdzW3F1aWNrU2VhcmNoSXRlbV0ubmFtZVxcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgfVxcXFxuICAgIH0pXFxcXG4gICAgc2V0SG9tZVJlc3VsdCh7XFxcXG4gICAgICAgIGRhdGE6IGluZm9JdGVtcy5jb25jYXQocmF0aW5nSXRlbXMpXFxcXG4gICAgICAgICAgICAuY29uY2F0KHtcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAuY29uY2F0KGludHJvSXRlbXMpXFxcXG4gICAgICAgICAgICAuY29uY2F0KHtcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgLmNvbmNhdChyZWxhdGVkSXRlbXMpXFxcXG4gICAgICAgICAgICAuY29uY2F0KHtcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgLmNvbmNhdChxdWlja1NlYXJjaEl0ZW1zKVxcXFxuICAgICAgICAgICAgLmNvbmNhdCh7XFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJ1xcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgIC5jb25jYXQodmlkZW9SZWxhdGVkSXRlbXMpXFxcXG4gICAgICAgICAgICAuY29uY2F0KHtcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgLmNvbmNhdChsaW5rSXRlbXMpXFxcXG4gICAgICAgICAgICAuY29uY2F0KHtcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnXFxcXG4gICAgIC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ZCbLueugCZyZWFsdXJsPScgKyB2LnVybDsgXFxcXG4gICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKHYudXJsLmluY2x1ZGVzKFxcXFxcXFwicXVhcmtcXFxcXFxcIikpe1xcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gIFxcXFxcXFwiaGlrZXI6Ly9wYWdlL3F1YXJrTGlzdD9yZWFsdXJsPVxcXFxcXFwiICsgZW5jb2RlVVJJQ29tcG9uZW50KHYudXJsKSArIFxcXFxcXFwiJnJ1bGU9UXVhcmsu566AJnNoYXJlUHdkPVxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICB9XFxcXG4gICAgICAgIH0saXRlbSkgICxcXFxcbiAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5uYW1lLnJlcGxhY2UoLzxbXj5dKz4vZywgJycpLFxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH0pXFxcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgIGxvZyhlLm1lc3NhZ2UpXFxcXG4gICAgICAgICAgICB1blJlZ2lzdGVyVGFzayhpZClcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBwdXRNeVZhcigneWluZ2t1JywgaSk7XFxcXG4gICAgfSwgb2JqLGlkKSlcXFxcbn1cXFwifV1cIixcInByb3h5XCI6XCJcIn0iLCJwaWNVcmwiOiJodHRwczovL2ltZzkuZG91YmFuaW8uY29tL3ZpZXcvcGhvdG8vc19yYXRpb19wb3N0ZXIvcHVibGljL3AyOTAyNDg1NzA1LmpwZ0BSZWZlcmVyPWh0dHBzOi8vaW1nOS5kb3ViYW5pby5jb20vdmlldy9waG90by9zX3JhdGlvX3Bvc3Rlci9wdWJsaWMvcDI5MDI0ODU3MDUuanBnIiwidGl0bGUiOiLlvILkurrlkJvojqvpgqoifQ==
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement