Advertisement
xiaomianao666

邀您一起看:动漫巴士-最新好看的动漫免费在线观看

Jun 15th, 2024
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥动漫巴士-最新好看的动漫免费在线观看@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcInlzZnhcIixcInBhdGhcIjpcInlzZnhcIixcInJ1bGVcIjpcImpzOlxcbnZhciBkID0gW107XFxubGV0IHJ1bGUgPSBnZXRQYXJhbShcXFwiclxcXCIpLnNwbGl0KFxcXCIjI1xcXCIpWzBdO1xcbmxldCB1cmwgPSBNWV9VUkwuc3BsaXQoXFxcIiMjXFxcIilbMV07XFxubGV0IGl0ZSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3VcXFwiKShydWxlLCBnZXRIb21lKHVybCkpO1xcbmxldCBqcyA9ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICB0cnkge1xcbiAgICAgICAgaWYgKGRvY3VtZW50LnRpdGxlICYmIGRvY3VtZW50LnRpdGxlLmxlbmd0aCkge1xcbiAgICAgICAgICAgIGxldCByID0gJCQkKCkubGF6eVJ1bGUoKHQpID0+IHtcXG4gICAgICAgICAgICAgICAgc2V0UGFnZVRpdGxlKHQ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XRcXFwiKTtcXG4gICAgICAgICAgICByZXR1cm4gJC50b1N0cmluZygodXJsLCBydWxlKSA9PiB7XFxuICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlbihKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIumYv+mHjOS6keebmFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvZGV0YWlsP3J1bGU95LqR55uY5rGH5b2xJnVybD1cXFwiICsgdXJsICsgJz8/ZnlwYWdlJyxcXG4gICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgfSwgaW5wdXQsIHJ1bGUpXFxuICAgICAgICB9IGVsc2UgaWYgKC9cXFxcLihtcDN8ZmxhY3xtNGEpJC8udGVzdChpbnB1dCkpIHtcXG4gICAgICAgICAgICBsb2coaW5wdXQpO1xcbiAgICAgICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh1cmwsIHJ1bGUpID0+IHtcXG4gICAgICAgICAgICAgICAgZnlfYnJpZGdlX2FwcC5wbGF5VmlkZW8odXJsKTtcXG4gICAgICAgICAgICB9LCBpbnB1dCwgcnVsZSlcXG4gICAgICAgIH0gZWxzZSBpZiAoIWlucHV0LmluY2x1ZGVzKGhvc3QpICYmIGlucHV0LnN0YXJ0c1dpdGgoXFxcImh0dHBcXFwiKSkge1xcbiAgICAgICAgICAgIGxvZyhpbnB1dCk7XFxuICAgICAgICAgICAgcmV0dXJuICQudG9TdHJpbmcoKHVybCwgcnVsZSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgd2hpdGUgPSBbXFxuICAgICAgICAgICAgICAgICAgICBcXFwiZG91eWluXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJkb3ViYW5cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIml4aWd1YS5jb21cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImt1YWlzaG91XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJiaWxpYmlsaVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwid2VpYm9cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIndlaXhpblxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiYmFpZHVcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInptay5cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInN1YmhkXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJ0aHVuZGVyXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJ4aW5qdWNcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImdyYWI0a1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiL2J0XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJqc3IxMFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiYXNzcnRcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInF1YXJrXFxcIlxcbiAgICAgICAgICAgICAgICBdO1xcbiAgICAgICAgICAgICAgICBsZXQgaW5XaGl0ZSA9IHdoaXRlLmZpbHRlcihpdCA9PiB1cmwuaW5jbHVkZXMoaXQpKS5sZW5ndGggPiAwO1xcbiAgICAgICAgICAgICAgICBpZiAoaW5XaGl0ZSkge1xcbiAgICAgICAgICAgICAgICAgICAgLy/ot7PnvZHpobVcXG4gICAgICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlbihKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLor6bmg4VcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS95c2Z4P3J1bGU9XFxcIiArIHJ1bGUgKyBcXFwiJnI9XFxcIiArIHJ1bGUgKyBcXFwiIyNcXFwiICsgdXJsLFxcbiAgICAgICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAvL0FJ6Kej5p6QXFxuICAgICAgICAgICAgICAgICAgICBmeV9icmlkZ2VfYXBwLm9wZW4oSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBkb2N1bWVudC50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvcD9ydWxlPVxcXCIgKyBydWxlICsgXFxcIiZyPVxcXCIgKyBydWxlICsgXFxcIiZ1PVxcXCIgKyBmeV9icmlkZ2VfYXBwLmJhc2U2NEVuY29kZSh1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LCBpbnB1dCwgcnVsZSk7XFxuICAgICAgICB9IGVsc2UgaWYgKCFpbnB1dC5zdGFydHNXaXRoKFxcXCJodHRwXFxcIikpIHtcXG4gICAgICAgICAgICBsb2coaW5wdXQpO1xcbiAgICAgICAgICAgIC8v6IO95ZSk6LW3QVBQ55qE55m95ZCN5Y2VXFxuICAgICAgICAgICAgbGV0IHdoaXRlID0gW1xcbiAgICAgICAgICAgICAgICBcXFwicWtsaW5rXFxcIixcXG4gICAgICAgICAgICAgICAgXFxcImJkbmV0ZGlza1xcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCJ4dW5sZWlhcHBcXFwiXFxuICAgICAgICAgICAgXTtcXG4gICAgICAgICAgICBsZXQgaW5XaGl0ZSA9IHdoaXRlLmZpbHRlcihpdCA9PiBpbnB1dC5zdGFydHNXaXRoKGl0KSkubGVuZ3RoID4gMDtcXG4gICAgICAgICAgICBpZiAoIWluV2hpdGUpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gJC50b1N0cmluZygodXJsLCBydWxlKSA9PiB7XFxuICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlblRoaXJkQXBwICYmIGZ5X2JyaWRnZV9hcHAub3BlblRoaXJkQXBwKHVybCk7XFxuICAgICAgICAgICAgfSwgaW5wdXQsIHJ1bGUpXFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGxldCB3aGl0ZSA9IFtcXG4gICAgICAgICAgICAgICAgXFxcInVybD1cXFwiLFxcbiAgICAgICAgICAgICAgICBcXFwiZnNvdS5jb21cXFwiLFxcbiAgICAgICAgICAgICAgICBcXFwiYmluZy5cXFwiLCAgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICBdO1xcbiAgICAgICAgICAgIGxldCBpbldoaXRlID0gd2hpdGUuZmlsdGVyKGl0ID0+IGlucHV0LmluY2x1ZGVzKGl0KSkubGVuZ3RoID4gMDtcXG4gICAgICAgICAgICBpZiAoaW5XaGl0ZSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxldCByZWcgPSBuZXcgUmVnRXhwKFxcXCJbXFxcXHU0ZTAwLVxcXFx1OWZhNV0rXFxcIiwgXFxcImdcXFwiKTtcXG4gICAgICAgICAgICBsZXQgciA9IGRlY29kZVVSSUNvbXBvbmVudChpbnB1dCk7XFxuICAgICAgICAgICAgaWYgKHJlZy50ZXN0KHIpIHx8IChpbnB1dC5zdGFydHNXaXRoKG9yaWdpbikgJiYgaW5wdXQubGVuZ3RoIC0gb3JpZ2luLmxlbmd0aCA+IDIpKSB7XFxuICAgICAgICAgICAgICAgIC8v5pyJ5Lit5paH77yM5bqU6K+l5piv5Zyo5pCc57Si77yM6Lez5paw6aG16Z2iXFxuICAgICAgICAgICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh1cmwsIHJ1bGUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGZ5X2Jy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FjeWksei0pVxcbiAgICBsZXQgaXRlID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvdVxcXCIpKGdldFBhcmFtKFxcXCJyXFxcIiksIGdldEhvbWUodXJsKSk7XFxuICAgIGxldCBqcyA9ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBpZiAoZG9jdW1lbnQudGl0bGUgJiYgZG9jdW1lbnQudGl0bGUubGVuZ3RoKSB7XFxuICAgICAgICAgICAgICAgIGxldCByID0gJCQkKCkubGF6eVJ1bGUoKHQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHNldFBhZ2VUaXRsZSh0KTtcXG4gICAgICAgICAgICAgICAgfSwgZG9jdW1lbnQudGl0bGUpO1xcbiAgICAgICAgICAgICAgICBmeV9icmlkZ2VfYXBwLnBhcnNlTGF6eVJ1bGUocik7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAubG9nKGUudG9TdHJpbmcoKSk7XFxuICAgICAgICB9XFxuICAgIH0pO1xcbiAgICBsZXQganMyID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UveDVhaVxcXCIpKGdldFBhcmFtKFxcXCJyXFxcIiksIHVybCk7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogXFxcIlxcXCIsXFxuICAgICAgICB1cmw6IHVybCxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwieDVfd2Vidmlld19zaW5nbGVcXFwiLFxcbiAgICAgICAgZGVzYzogXFxcImZsb2F0JiYxMDAlXFxcIixcXG4gICAgICAgIHBpY191cmw6IFxcXCJcXFwiLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBqczoganMgKyBcXFwiO1xcXFxuXFxcIiArIGpzMixcXG4gICAgICAgICAgICB1cmxJbnRlcmNlcHRvcjogaXRlLFxcbiAg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C9eWzAtOV0qJC87XFxuICAgICAgICBpZiAoIXJlZy50ZXN0KGl0KSkge1xcbiAgICAgICAgICAgIHJldHVybiAtMTtcXG4gICAgICAgIH1cXG4gICAgICAgIGl0ID0gcGFyc2VJbnQoaXQpO1xcbiAgICAgICAgaWYgKGlzTmFOKGl0KSkge1xcbiAgICAgICAgICAgIHJldHVybiAtMTtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmIChpdCA+IDE5MDAgJiYgaXQgPCAyMTAwKSB7XFxuICAgICAgICAgICAgcmV0dXJuIC0xO1xcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIGl0O1xcbiAgICB9XFxuXFxuICAgIGZ1bmN0aW9uIGlzQ2hhcHRlcjAoaXQsIGJyb3RoZXIpIHtcXG4gICAgICAgIC8qaWYgKGRlYnVnKSB7XFxuICAgICAgICAgICAgbG9nKHtcXG4gICAgICAgICAgICAgICAgaXQ6IGl0LFxcbiAgICAgICAgICAgICAgICBicm90aGVyOiBicm90aGVyXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9Ki9cXG4gICAgICAgIGl0ID0gZ2V0Q2hhcHRlck51bShpdCk7XFxuICAgICAgICAvL2lmIChkZWJ1ZykgbG9nKGl0KTtcXG4gICAgICAgIGlmIChpdCA8IDApIHtcXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxuICAgICAgICB9XFxuICAgICAgICBicm90aGVyID0gZ2V0Q2hhcHRlck51bShicm90aGVyKTtcXG4gICAgICAgIC8vaWYgKGRlYnVnKSBsb2coYnJvdGhlcik7XFxuICAgICAgICBpZiAoYnJvdGhlciA8IDApIHtcXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gaXQgLSBicm90aGVyIDwgMiAmJiBpdCAtIGJyb3RoZXIgPiAtMjtcXG4gICAgfVxcblxcbiAgICBsZXQgX3dlYiA9ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgbGV0IHVybHMgPSBfZ2V0VXJscygpO1xcbiAgICAgICAgbGV0IHJlZyA9IC9cXFxcLmh0bWx8XFxcXC5jc3N8XFxcXC5qcy87XFxuICAgICAgICBmb3IgKGxldCBrIGluIHVybHMpIHtcXG4gICAgICAgICAgICBpZiAoIXJlZy50ZXN0KHVybHNba10pICYmIHVybHNba10ubWF0Y2goL1xcXFwubXA0fFxcXFwubTN1OC8pKSB7XFxuICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAubG9nKHVybHNba10pO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gZnlfYnJpZGdlX2FwcC5nZXRIZWFkZXJVcmwodXJsc1trXS5yZXBsYWNlKC8uKj91cmw9LywgXFxcIlxcXCIpKSArIFxcXCIjaWdub3JlSW1nPXRydWUjXFxcIjtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgIH0pO1xcblxcbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgbGV0IGl0ID0gYXJyW2ldO1xcbiAgICAgICAgbGV0IHQgPSBpdC50ZXh0O1xcbiAgICAgICAgaWYgKCFpdC5ocmVmIHx8IGl0LmhyZWYgPT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCBwcmUgPSBpID09IDAgPyBudWxsIDogYXJyW2kgLSAxXTtcXG4gICAgICAgIGxldCBuZXh0ID0gaSA9PSAoYXJyLmxlbmd0aCAtIDEpID8gbnVsbCA6IGFycltpICsgMV07XFxuICAgICAgICBpZiAoaXNDaGFwdGVyKGl0LCBwcmUsIG5leHQpKSB7XFxuICAgICAgICAgICAgaWYgKHdlYikge1xcbiAgICAgICAgICAgICAgICB2YXIgdXJseCA9IFxcXCJ3ZWJSdWxlOi8vXFxcIiArIGl0LmhyZWYgKyBcXFwiQFxcXCIgKyBfd2ViO1xcbiAgICAgICAgICAgICAgICB2YXIgZXh0cmF4ID0ge1xcbiAgICAgICAgICAgICAgICAgICAganNMb2FkaW5nSW5qZWN0OiB0cnVlLFxcbiAgICAgICAgICAgICAgICAgICAgaWQ6IGl0LmhyZWYsXFxuICAgICAgICAgICAgICAgICAgICBibG9ja1J1bGVzOiBbJy5tNGEnLCAnLm1wMycsICcuZmx2JywgJy5hdmknLCAnLjNncCcsICcubXBlZycsICcud212JywgJy5tb3YnLCAnLnJtdmInLCAnLmdpZicsICcuanBlZycsICcucG5nJywgJy5pY28nLCAnLnN2ZyddXFxuICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdmFyIHVybHggPSBcXFwidmlkZW86Ly9cXFwiICsgaXQuaHJlZjtcXG4gICAgICAgICAgICAgICAgdmFyIGV4dHJheCA9IHtcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBpdC5ocmVmXFxuICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0LFxcbiAgICAgICAgICAgICAgICB1cmw6IHVybHgsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8zXFxcIixcXG4gICAgICAgICAgICAgICAgZXh0cmE6IGV4dHJheFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIGlmIChkLmxlbmd0aCA9PSAwKSB7XFxuICAgICAgICByZXR1cm4gZDtcXG4gICAgfSBlbHNlIHtcXG5cXG4gICAgICAgIGQuc3BsaWNlKDAsIDAsIHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIvCflJdcXFwiICsgdXJsLFxcbiAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS95c2Z4P3J1bGU9XFxcIiArIHJ1bGUgKyBcXFwiJnI9XFxcIiArIHJ1bGUgKyBcXFwiIyNcXFwiICsgdXJsLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8xXFxcIixcXG4gICAgICAgICAgICBkZXNjOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBwaWNfdXJsOiBcXFwiXFxcIlxcbiAgICAgICAgfSk7XFxuXFxuXFxuICAgICAgICAvL+S4uue6v+i3r+WKoOWIhuWJsue6v1xcbiAgICAgICAgbGV0IGQyID0gW107XFxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGQubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICBkMi5wdXNoKGRbaV0pO1xcbiAgICAgICAgICAgIGlmIChpIDwgZC5sZW5ndGggLSAxKSB7XFxuICAgICAgICAgICAgICAgIGxldCBpdCA9IGRbaV07XFxuICAgICAgICAgICAgICAgIGxldCB0MSA9IHBhcnNlSW50KGNsZWFyVGV4dChpdC50aXRsZSkpO1xcbiAgICAgICAgICAgICAgICBsZXQgbmV4dCA9IGRbaSArIDFdO1xcbiAgICAgICAgICAgICAgICBsZXQgdDIgPSBwYXJzZUludChjbGVhclRleHQobmV4dC50aXRsZSkpO1xcbiAgICAgICAgICAgICAgICBpZiAodDIgLSB0MSA+IDEgfHwgdDEgLSB0MiA+IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgIGQyLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmlnX2JsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBkMi5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImxpbmVfYmxhbmtcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIGQyLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmlnX2JsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBkMi5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuWMuemFjeacieivr++8n+eCueaIkeS4jeWGjeWMuemFjeatpOmhtemdolxcXCIsXFxuICAgICAgICAgICAgdXJsOiAkKFxcXCIjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKCh1cmwpID0+IHtcXG4gICAgICAgICAgICAgICAgY29uZmlybSh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIua4qemmqOaPkOekulxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBjb250ZW50OiBcXFwi5aaC5p6c5Y+q5piv5Y2V5qyh5Yy56YWN5aSx6LSl77yM54K55Ye75LiL5pa55Y+W5raI5oyJ6ZKu5Yi35paw6aG16Z2i6YeN5paw5Yy56YWN77yM5aaC5p6c56Gu6K6k5peg5rOV5Yy56YWN77yM54K55Ye75LiL5pa556Gu5a6a5oyJ6ZKu5Yqg5YWl55m95ZCN5Y2VXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGNhbmNlbDogXFxcInJlZnJlc2hQYWdlKClcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29uZmlybTogJC50b1N0cmluZygodXJsKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpc3QgPSBzdG9yYWdlMC5nZXRJdGVtKFxcXCJ3aGl0ZVxcXCIsIFtdKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsaXN0LnB1c2godXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzdG9yYWdlMC5zZXRJdGVtKFxcXCJ3aGl0ZVxcXCIsIGxpc3QpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+W3suWKoOWFpeeZveWQjeWNlVxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0sIHVybClcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICB9LCB1cmwpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIixcXG4gICAgICAgICAgICBpbWc6IFxcXCJoaWtlcjovL2ltYWdlcy9hY2NvdW50XFxcIlxcbiAgICAgICAgfSk7XFxuICAgICAgICByZXR1cm4gZDI7XFxuICAgIH1cXG59XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCJ4NUFJXCIsXCJwYXRoXCI6XCJ4NWFpXCIsXCJydWxlXCI6XCIkLmV4cG9ydHMgPSBmdW5jdGlvbihydWxlLCBhbmNob3JJZCkge1xcbiAgICByZXR1cm4gJC50b1N0cmluZygocnVsZSwgYW5jaG9ySWQsIHdoaXRlKSA9PiB7XFxuICAgICAgICBpZiAod2luZG93LmNoZWNrMCA9PSBudWxsKSB7XFxuICAgICAgICAgICAgZnVuY3Rpb24gY2hlY2swKCkge1xcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKFxcXCJodG1sXFxcIikuaW5uZXJIVE1MO1xcbiAgICAgICAgICAgICAgICAgICAgZmJhLnB1dFZhcihcXFwiaHRtbDBcXFwiLCBodG1sKTtcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5wYXJzZUxhenlSdWxlQXN5bmMoJCQkKCkubGF6eVJ1bGUoKHJ1bGUsIHVybCwgYW5jaG9ySWQsIHdoaXRlKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGQgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSBnZXRWYXIoXFxcImh0bWwwXFxcIiwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhclZhcihcXFwiaHRtbDBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHdlYiA9IGZhbHNlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgd2hpdGUyID0gW1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcImZzb3UuY29tXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJiaW5nLlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpbldoaXRlID0gd2hpdGUyLmZpbHRlcihpdCA9PiB1cmwuaW5jbHVkZXMoaXQpKS5sZW5ndGggPiAwOyAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFpbldoaXRlICYmICF3aGl0ZS5pbmNsdWRlcyh1cmwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGFyc2UgPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9wYXJzZT9ydWxlPVxcXCIgKyBydWxlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQgPSBwYXJzZShydWxlLCB3ZWIsIHVybCwgaHRtbCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFpbldoaXRlICYmIGQubGVuZ3RoIDwgMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXJyID0gcGRmYShodG1sLCBcXFwiYm9keSYmaWZyYW1lXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFyci5sZW5ndGggPiAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzcmMgPSBwZGZoKGFyclswXSwgXFxcImlmcmFtZSYmc3JjXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwi6I635Y+W5YiwaWZyYW1l77yaXFxcIiArIHNyYyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghd2hpdGUuaW5jbHVkZXMoc3JjKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNyYyAmJiBzcmMuc3RhcnRzV2l0aChcXFwiaHR0cFxcXCIpICYmICFzcmMubWF0Y2goL1xcXFwubXA0fFxcXFwubTN1OHxcXFxcLm1wM3xcXFxcLmZsdnxcXFxcLm1rdi8pKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHRtbCA9IHJlcXVlc3Qoc3JjKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gcGFyc2UocnVsZSwgd2ViLCBzcmMsIGh0bWwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFwi5bCd6K+V6I635Y+WaWZyYW1l5aSx6LSlXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGQubGVuZ3RoID4gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZFswXS51cmwgPSAkKFxcXCIjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKChhbmNob3JJZCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkZXNjID0gZ2V0VmFyKGFuY2hvcklkLCBcXFwiMFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkZXNjID09IFxcXCIwXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoWDVEZXNjKFxcXCJmbG9hdCYmc2NyZWVuLTE3MFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoYW5jaG9ySWQsIFxcXCIxXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFg1RGVzYyhcXFwiZmxvYXQmJjBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKGFuY2hvcklkLCBcXFwiMFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgYW5jaG9ySWQgKyBcXFwieDVcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbMF0udGl0bGUgPSBcXFwi5bGV5byAL+aUtui1t1xcXCIgKyBkWzBdLnRpdGxlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKGFuY2hvcklkICsgXFxcIng1XFxcIiwgXFxcIjBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hYNURlc2MoXFxcImZsb2F0JiYwXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpdCBvZiBkKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGV4dHJhID0gaXQuZXh0cmEgfHwge307XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEuY2xzID0gXFxcIng1YWlcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0LmV4dHJhID0gZXh0cmE7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoXFxcIng1YWlcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZEl0ZW1BZnRlcihhbmNob3JJZCwgZCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b2FzdChcXFwiQUnljLnphY3miJDlip9cXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZC5sZW5ndGggPiAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcInBhcnNlTGF6eVJ1bGVBc3luYzpcXFwiICsgZC5sZW5ndGgpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBkLmxlbmd0aCA+IDAgPyBcXFwiMVxcXCIgOiBcXFwiMFxcXCI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coZS50b1N0cmluZygpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9LCBydWxlLCBsb2NhdGlvbi5ocmVmLCBhbmNob3JJZCwgd2hpdGUpLCAkJCQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcXFwiMFxcXCIgPT0gaW5wdXQpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmNoZWNrYyA9IHdpbmRvdy5jaGVja2MgKyAxO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKmlmICh3aW5kb3cuY2hlY2tjID4gMTIwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYmEubG9nKFxcXCLmiafooYzotoXov4czMOenku+8jOaXoOazleino+aekFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgeyovXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQod2luZG93LmNoZWNrMCwgMjUwKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy99XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmNoZWNrdXJsID0gbG9jYXRpb24uaHJlZjtcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gY2hlY2t1MCgpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh3aW5kb3cuY2hlY2t1cmwgIT0gbG9jYXRpb24uaHJlZikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vaGFzaOWPkeeUn+S6huWPmOWMllxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5jaGVja2MgPSAwO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVjazAoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAyMDAwKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChjaGVja3UwLCAyNTApO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrdTAoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5sb2coZS50b1N0cmluZygpKTtcXG4gICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQod2luZG93LmNoZWNrMCwgMjUwKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB3aW5kb3cuY2hlY2tjID0gMDtcXG4gICAgICAgICAgICB3aW5kb3cuY2hlY2swID0gY2hlY2swO1xcbiAgICAgICAgICAgIGNoZWNrMCgpO1xcbiAgICAgICAgfVxcbiAgICB9LCBydWxlLCBhbmNob3JJZCwgc3RvcmFnZTAuZ2V0SXRlbShcXFwid2hpdGVcXFwiLCBbXSkpO1xcbn1cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIummlumhtVwiLFwicGF0aFwiOlwiaG9tZVwiLFwicnVsZVwiOlwidmFyIGQgPSBbXTtcXG5sZXQgdXJsID0g572R56uZO1xcbm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Fyc2VMYXp5UnVsZShyKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgZnlfYnJpZGdlX2FwcC5sb2coZS50b1N0cmluZygpKTtcXG4gICAgICAgIH1cXG4gICAgfSk7XFxuICAgIGxldCBqczIgPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS94NWFpXFxcIikoZ2V0UGFyYW0oXFxcInJcXFwiKSwgdXJsKTtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwiXFxcIixcXG4gICAgICAgIHVybDogdXJsLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJ4NV93ZWJ2aWV3X3NpbmdsZVxcXCIsXFxuICAgICAgICBkZXNjOiBcXFwiZmxvYXQmJjEwMCVcXFwiLFxcbiAgICAgICAgcGljX3VybDogXFxcIlxcXCIsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGpzOiBqcyArIFxcXCI7XFxcXG5cXFwiICsganMyLFxcbiAgICAgICAgICAgIHVybEludGVyY2VwdG9yOiBpdGUsXFxuICAgICAgICAgICAgY2FuQmFjazogdHJ1ZSxcXG4gICAgICAgICAgICBmbG9hdFZpZGVvOiB0cnVlLFxcbiAgICAgICAgICAgIGpzTG9hZGluZ0luamVjdDogdHJ1ZSxcXG4gICAgICAgICAgICBibG9ja1J1bGVzOiBbXFxcIi5naWZcXFwiLCBcXFwiL2FkL1xcXCIsIFxcXCJnb29nbGVcXFwiLCBcXFwiL3NoL3RvL1xcXCIsIFxcXCIuR0lGXFxcIl1cXG4gICAgICAgIH1cXG4gICAgfSk7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICBjb2xfdHlwZTogXFxcImxpbmVcXFwiLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBpZDogdXJsXFxuICAgICAgICB9XFxuICAgIH0pO1xcbiAgICBpZiAoIWluV2hpdGUpIHtcXG4gICAgICAgIHRv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7zlhaXlkI7kuIDlrpropoHlnKjkupHnm5jmsYflvbHnmbvlvZXpmL/ph4zkupHnm5jotKblj7fvvIzlkKbliJnkuI3og73nlKgnLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb25maXJtOiBydSxcXFxcbiAgICAgICAgICAgICAgICAgICAgY2FuY2VsOiBydVxcXFxuICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGxvZyhcXFxcXFxcImlucHV0XFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgcmV0dXJuICQudG9TdHJpbmcoKHVybCwgcnVsZSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlbihKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIumYv+mHjOS6keebmFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2RldGFpbD9ydWxlPeS6keebmOaxh+W9sSZ1cmw9XFxcXFxcXCIgKyB1cmwgKyAnPz9meXBhZ2UnLFxcXFxuICAgICAgICAgICAgICAgIH0pKVxcXFxuICAgICAgICAgICAgfSwgaW5wdXQsIHJ1bGUpXFxcXG4gICAgICAgIH0gZWxzZSBpZiAoL1xcXFxcXFxcLihtcDN8ZmxhY3xtNGEpJC8udGVzdChpbnB1dCkpIHtcXFxcbiAgICAgICAgICAgIGxvZyhpbnB1dCk7XFxcXG4gICAgICAgICAgICByZXR1cm4gJC50b1N0cmluZygodXJsLCBydWxlKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgZnlfYnJpZGdlX2FwcC5wbGF5VmlkZW8odXJsKTtcXFxcbiAgICAgICAgICAgIH0sIGlucHV0LCBydWxlKVxcXFxuICAgICAgICB9IGVsc2UgaWYgKCFpbnB1dC5pbmNsdWRlcyhob3N0KSAmJiBpbnB1dC5zdGFydHNXaXRoKFxcXFxcXFwiaHR0cFxcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgbG9nKGlucHV0KTtcXFxcbiAgICAgICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh1cmwsIHJ1bGUpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgd2hpdGUgPSBbXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiZG91eWluXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiZG91YmFuXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiaXhpZ3VhLmNvbVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImt1YWlzaG91XFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiYmlsaWJpbGlcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJ3ZWlib1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIndlaXhpblxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImJhaWR1XFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiem1rLlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInN1YmhkXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwidGh1bmRlclxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInhpbmp1Y1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImdyYWI0a1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIi9idFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImpzcjEwXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiYXNzcnRcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJxdWFya1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgXTtcXFxcbiAgICAgICAgICAgICAgICBsZXQgaW5XaGl0ZSA9IHdoaXRlLmZpbHRlcihpdCA9PiB1cmwuaW5jbHVkZXMoaXQpKS5sZW5ndGggPiAwO1xcXFxuICAgICAgICAgICAgICAgIGlmIChpbldoaXRlKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIC8v6Lez572R6aG1XFxcXG4gICAgICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlbihKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcXFxcXCLor6bmg4VcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcXFxcXCJoaWtlcjovL3BhZ2UveXNmeD9ydWxlPVxcXFxcXFwiICsgcnVsZSArIFxcXFxcXFwiJnI9XFxcXFxcXCIgKyBydWxlICsgXFxcXFxcXCIjI1xcXFxcXFwiICsgdXJsLFxcXFxuICAgICAgICAgICAgICAgICAgICB9KSlcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAvL0FJ6Kej5p6QXFxcXG4gICAgICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlbihKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogZG9jdW1lbnQudGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXFxcXFwiaGlrZXI6Ly9wYWdlL3A/cnVsZT1cXFxcXFxcIiArIHJ1bGUgKyBcXFxcXFxcIiZyPVxcXFxcXFwiICsgcnVsZSArIFxcXFxcXFwiJnU9XFxcXFxcXCIgKyBmeV9icmlkZ2VfYXBwLmJhc2U2NEVuY29kZSh1cmwpLFxcXFxuICAgICAgICAgICAgICAgICAgICB9KSlcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9LCBpbnB1dCwgcnVsZSk7XFxcXG4gICAgICAgIH0gZWxzZSBpZiAoIWlucHV0LnN0YXJ0c1dpdGgoXFxcXFxcXCJodHRwXFxcXFxcXCIpKSB7XFxcXG4gICAgICAgICAgICBsb2coaW5wdXQpO1xcXFxuICAgICAgICAgICAgLy/og73llKTotbdBUFDnmoTnmb3lkI3ljZVcXFxcbiAgICAgICAgICAgIGxldCB3aGl0ZSA9IFtcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcInFrbGlua1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIFxcXFxcXFwiYmRuZXRkaXNrXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCJ4dW5sZWlhcHBcXFxcXFxcIlxcXFxuICAgICAgICAgICAgXTtcXFxcbiAgICAgICAgICAgIGxldCBpbldoaXRlID0gd2hpdGUuZmlsdGVyKGl0ID0+IGlucHV0LnN0YXJ0c1dpdGgoaXQpKS5sZW5ndGggPiAwO1xcXFxuICAgICAgICAgICAgaWYgKCFpbldoaXRlKSB7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgcmV0dXJuICQudG9TdHJpbmcoKHVybCwgcnVsZSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlblRoaXJkQXBwICYmIGZ5X2JyaWRnZV9hcHAub3BlblRoaXJkQXBwKHVybCk7XFxcXG4gICAgICAgICAgICB9LCBpbnB1dCwgcnVsZSlcXFxcbiAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgIGxldCB3aG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ICAgICAgIHJldHVybiBpdDtcXFxcbiAgICB9XFxcXG5cXFxcbiAgICBmdW5jdGlvbiBpc0NoYXB0ZXIwKGl0LCBicm90aGVyKSB7XFxcXG4gICAgICAgIC8qaWYgKGRlYnVnKSB7XFxcXG4gICAgICAgICAgICBsb2coe1xcXFxuICAgICAgICAgICAgICAgIGl0OiBpdCxcXFxcbiAgICAgICAgICAgICAgICBicm90aGVyOiBicm90aGVyXFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgfSovXFxcXG4gICAgICAgIGl0ID0gZ2V0Q2hhcHRlck51bShpdCk7XFxcXG4gICAgICAgIC8vaWYgKGRlYnVnKSBsb2coaXQpO1xcXFxuICAgICAgICBpZiAoaXQgPCAwKSB7XFxcXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgYnJvdGhlciA9IGdldENoYXB0ZXJOdW0oYnJvdGhlcik7XFxcXG4gICAgICAgIC8vaWYgKGRlYnVnKSBsb2coYnJvdGhlcik7XFxcXG4gICAgICAgIGlmIChicm90aGVyIDwgMCkge1xcXFxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xcXFxuICAgICAgICB9XFxcXG4gICAgICAgIHJldHVybiBpdCAtIGJyb3RoZXIgPCAyICYmIGl0IC0gYnJvdGhlciA+IC0yO1xcXFxuICAgIH1cXFxcblxcXFxuICAgIGxldCBfd2ViID0gJC50b1N0cmluZygoKSA9PiB7XFxcXG4gICAgICAgIGxldCB1cmxzID0gX2dldFVybHMoKTtcXFxcbiAgICAgICAgbGV0IHJlZyA9IC9cXFxcXFxcXC5odG1sfFxcXFxcXFxcLmNzc3xcXFxcXFxcXC5qcy87XFxcXG4gICAgICAgIGZvciAobGV0IGsgaW4gdXJscykge1xcXFxuICAgICAgICAgICAgaWYgKCFyZWcudGVzdCh1cmxzW2tdKSAmJiB1cmxzW2tdLm1hdGNoKC9cXFxcXFxcXC5tcDR8XFxcXFxcXFwubTN1OC8pKSB7XFxcXG4gICAgICAgICAgICAgICAgZnlfYnJpZGdlX2FwcC5sb2codXJsc1trXSk7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZ5X2JyaWRnZV9hcHAuZ2V0SGVhZGVyVXJsKHVybHNba10ucmVwbGFjZSgvLio/dXJsPS8sIFxcXFxcXFwiXFxcXFxcXCIpKSArIFxcXFxcXFwiI2lnbm9yZUltZz10cnVlI1xcXFxcXFwiO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9XFxcXG4gICAgfSk7XFxcXG5cXFxcbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykge1xcXFxuICAgICAgICBsZXQgaXQgPSBhcnJbaV07XFxcXG4gICAgICAgIGxldCB0ID0gaXQudGV4dDtcXFxcbiAgICAgICAgaWYgKCFpdC5ocmVmIHx8IGl0LmhyZWYgPT0gXFxcXFxcXCJcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgY29udGludWU7XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgbGV0IHByZSA9IGkgPT0gMCA/IG51bGwgOiBhcnJbaSAtIDFdO1xcXFxuICAgICAgICBsZXQgbmV4dCA9IGkgPT0gKGFyci5sZW5ndGggLSAxKSA/IG51bGwgOiBhcnJbaSArIDFdO1xcXFxuICAgICAgICBpZiAoaXNDaGFwdGVyKGl0LCBwcmUsIG5leHQpKSB7XFxcXG4gICAgICAgICAgICBpZiAod2ViKSB7XFxcXG4gICAgICAgICAgICAgICAgdmFyIHVybHggPSBcXFxcXFxcIndlYlJ1bGU6Ly9cXFxcXFxcIiArIGl0LmhyZWYgKyBcXFxcXFxcIkBcXFxcXFxcIiArIF93ZWI7XFxcXG4gICAgICAgICAgICAgICAgdmFyIGV4dHJheCA9IHtcXFxcbiAgICAgICAgICAgICAgICAgICAganNMb2FkaW5nSW5qZWN0OiB0cnVlLFxcXFxuICAgICAgICAgICAgICAgICAgICBpZDogaXQuaHJlZixcXFxcbiAgICAgICAgICAgICAgICAgICAgYmxvY2tSdWxlczogWycubTRhJywgJy5tcDMnLCAnLmZsdicsICcuYXZpJywgJy4zZ3AnLCAnLm1wZWcnLCAnLndtdicsICcubW92JywgJy5ybXZiJywgJy5naWYnLCAnLmpwZWcnLCAnLnBuZycsICcuaWNvJywgJy5zdmcnXVxcXFxuICAgICAgICAgICAgICAgIH07XFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIHZhciB1cmx4ID0gXFxcXFxcXCJ2aWRlbzovL1xcXFxcXFwiICsgaXQuaHJlZjtcXFxcbiAgICAgICAgICAgICAgICB2YXIgZXh0cmF4ID0ge1xcXFxuICAgICAgICAgICAgICAgICAgICBpZDogaXQuaHJlZlxcXFxuICAgICAgICAgICAgICAgIH07XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0LFxcXFxuICAgICAgICAgICAgICAgIHVybDogdXJseCxcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJ0ZXh0XzNcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICBleHRyYTogZXh0cmF4XFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgfVxcXFxuICAgIH1cXFxcbiAgICBpZiAoZC5sZW5ndGggPT0gMCkge1xcXFxuICAgICAgICByZXR1cm4gZDtcXFxcbiAgICB9IGVsc2Uge1xcXFxuXFxcXG4gICAgICAgIGQuc3BsaWNlKDAsIDAsIHtcXFxcbiAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIvCflJdcXFxcXFxcIiArIHVybCxcXFxcbiAgICAgICAgICAgIHVybDogXFxcXFxcXCJoaWtlcjovL3BhZ2UveXNmeD9ydWxlPVxcXFxcXFwiICsgcnVsZSArIFxcXFxcXFwiJnI9XFxcXFxcXCIgKyBydWxlICsgXFxcXFxcXCIjI1xcXFxcXFwiICsgdXJsLFxcXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwidGV4dF8xXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICBkZXNjOiBcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgcGljX3VybDogXFxcXFxcXCJcXFxcXFxcIlxcXFxuICAgICAgICB9KTtcXFxcblxcXFxuXFxcXG4gICAgICAgIC8v5Li657q/6Lev5Yqg5YiG5Ymy57q/XFxcXG4gICAgICAgIGxldCBkMiA9IFtdO1xcXFxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGQubGVuZ3RoOyBpKyspIHtcXFxcbiAgICAgICAgICAgIGQyLnB1c2goZFtpXSk7XFxcXG4gICAgICAgICAgICBpZiAoaSA8IGQubGVuZ3RoIC0gMSkge1xcXFxuICAgICAgICAgICAgICAgIGxldCBpdCA9IGRbaV07XFxcXG4gICAgICAgICAgICAgICAgbGV0IHQxID0gcGFyc2VJbnQoY2xlYXJUZXh0KGl0LnRpdGxlKSk7XFxcXG4gICAgICAgICAgICAgICAgbGV0IG5leHQgPSBkW2kgKyAxXTtcXFxcbiAgICAgICAgICAgICAgICBsZXQgdDIgPSBwYXJzZUludChjbGVhclRleHQobmV4dC50aXRsZSkpO1xcXFxuICAgICAgICAgICAgICAgIGlmICh0MiAtIHQxID4gMSB8fCB0MSAtIHQyID4gMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICBkMi5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImJpZ19ibGFua19ibG9ja1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICBkMi5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImxpbmVfYmxhbmtcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgZDIucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJiaWdfYmxhbmtfYmxvY2tcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgZDIucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTogXFxcXFxcXCLljLnphY3mnInor6/vvJ/ngrnmiJHkuI3lho3ljLnphY3mraTpobXpnaJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgIHVybDogJChcXFxcXFxcIiNub0xvYWRpbmcjXFxcXFxcXCIpLmxhenlSdWxlKCh1cmwpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBjb25maXJtKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXFxcXFwi5rip6aao5o+Q56S6XFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRlbnQ6IFxcXFxcXFwi5aaC5p6c5Y+q5piv5Y2V5qyh5Yy56YWN5aSx6LSl77yM54K55Ye75LiL5pa55Y+W5raI5oyJ6ZKu5Yi35paw6aG16Z2i6YeN5paw5Yy56YWN77yM5aaC5p6c56Gu6K6k5peg5rOV5Yy56YWN77yM54K55Ye75LiL5pa556Gu5a6a5oyJ6ZKu5Yqg5YWl55m95ZCN5Y2VXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIGNhbmNlbDogXFxcXFxcXCJyZWZyZXNoUGFnZSgpXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbmZpcm06ICQudG9TdHJpbmcoKHVybCkgPT4ge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpc3QgPSBzdG9yYWdlMC5nZXRJdGVtKFxcXFxcXFwid2hpdGVcXFxcXFxcIiwgW10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IHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcihcXFxcXFxcImh0bWxcXFxcXFxcIikuaW5uZXJIVE1MO1xcXFxuICAgICAgICAgICAgICAgICAgICBmYmEucHV0VmFyKFxcXFxcXFwiaHRtbDBcXFxcXFxcIiwgaHRtbCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5wYXJzZUxhenlSdWxlQXN5bmMoJCQkKCkubGF6eVJ1bGUoKHJ1bGUsIHVybCwgYW5jaG9ySWQsIHdoaXRlKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkID0gW107XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSBnZXRWYXIoXFxcXFxcXCJodG1sMFxcXFxcXFwiLCBcXFxcXFxcIlxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhclZhcihcXFxcXFxcImh0bWwwXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB3ZWIgPSBmYWxzZTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgd2hpdGUyID0gW1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImZzb3UuY29tXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiYmluZy5cXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpbldoaXRlID0gd2hpdGUyLmZpbHRlcihpdCA9PiB1cmwuaW5jbHVkZXMoaXQpKS5sZW5ndGggPiAwOyAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWluV2hpdGUgJiYgIXdoaXRlLmluY2x1ZGVzKHVybCkpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhcnNlID0gJC5yZXF1aXJlKFxcXFxcXFwiaGlrZXI6Ly9wYWdlL3BhcnNlP3J1bGU9XFxcXFxcXCIgKyBydWxlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IHBhcnNlKHJ1bGUsIHdlYiwgdXJsLCBodG1sKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFpbldoaXRlICYmIGQubGVuZ3RoIDwgMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGFyciA9IHBkZmEoaHRtbCwgXFxcXFxcXCJib2R5JiZpZnJhbWVcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXJyLmxlbmd0aCA+IDApIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3JjID0gcGRmaChhcnJbMF0sIFxcXFxcXFwiaWZyYW1lJiZzcmNcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXFxcXFwi6I635Y+W5YiwaWZyYW1l77yaXFxcXFxcXCIgKyBzcmMpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghd2hpdGUuaW5jbHVkZXMoc3JjKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3JjICYmIHNyYy5zdGFydHNXaXRoKFxcXFxcXFwiaHR0cFxcXFxcXFwiKSAmJiAhc3JjLm1hdGNoKC9cXFxcXFxcXC5tcDR8XFxcXFxcXFwubTN1OHxcXFxcXFxcXC5tcDN8XFxcXFxcXFwuZmx2fFxcXFxcXFxcLm1rdi8pKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBodG1sID0gcmVxdWVzdChzcmMpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IHBhcnNlKHJ1bGUsIHdlYiwgc3JjLCBodG1sKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXFxcXFwi5bCd6K+V6I635Y+WaWZyYW1l5aSx6LSlXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkLmxlbmd0aCA+IDApIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZFswXS51cmwgPSAkKFxcXFxcXFwiI25vTG9hZGluZyNcXFxcXFxcIikubGF6eVJ1bGUoKGFuY2hvcklkKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGVzYyA9IGdldFZhcihhbmNob3JJZCwgXFxcXFxcXCIwXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlc2MgPT0gXFxcXFxcXCIwXFxcXFxcXCIpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoWDVEZXNjKFxcXFxcXFwiZmxvYXQmJnNjcmVlbi0xNzBcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKGFuY2hvcklkLCBcXFxcXFxcIjFcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hYNURlc2MoXFxcXFxcXCJmbG9hdCYmMFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoYW5jaG9ySWQsIFxcXFxcXFwiMFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIjtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgYW5jaG9ySWQgKyBcXFxcXFxcIng1XFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWzBdLnRpdGxlID0gXFxcXFxcXCLlsZXlvIAv5pS26LW3XFxcXFxcXCIgKyBkWzBdLnRpdGxlO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoYW5jaG9ySWQgKyBcXFxcXFxcIng1XFxcXFxcXCIsIFxcXFxcXFwiMFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFg1RGVzYyhcXFxcXFxcImZsb2F0JiYwXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpdCBvZiBkKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZXh0cmEgPSBpdC5leHRyYSB8fCB7fTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhLmNscyA9IFxcXFxcXFwieDVhaVxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXQuZXh0cmEgPSBleHRyYTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoXFxcXFxcXCJ4NWFpXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRJdGVtQWZ0ZXIoYW5jaG9ySWQsIGQpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b2FzdChcXFxcXFxcIkFJ5Yy56YWN5oiQ5YqfXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZC5sZW5ndGggPiAwKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZyhcXFxcXFxcInBhcnNlTGF6eVJ1bGVBc3luYzpcXFxcXFxcIiArIGQubGVuZ3RoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGQubGVuZ3RoID4gMCA/IFxcXFxcXFwiMVxcXFxcXFwiIDogXFxcXFxcXCIwXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKGUudG9TdHJpbmcoKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH0sIHJ1bGUsIGxvY2F0aW9uLmhyZWYsIGFuY2hvcklkLCB3aGl0ZSksICQkJC50b1N0cmluZygoKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoXFxcXFxcXCIwXFxcXFxcXCIgPT0gaW5wdXQpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuY2hlY2tjID0gd2luZG93LmNoZWNrYyArIDE7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLyppZiAod2luZG93LmNoZWNrYyA+IDEyMCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYmEubG9nKFxcXFxcXFwi5omn6KGM6LaF6L+HMzDnp5LvvIzml6Dms5Xop6PmnpBcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsqL1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQod2luZG93LmNoZWNrMCwgMjUwKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL31cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmNoZWNrdXJsID0gbG9jYXRpb24uaHJlZjtcXFxcblxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNoZWNrdTAoKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh3aW5kb3cuY2hlY2t1cmwgIT0gbG9jYXRpb24uaHJlZikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9oYXNo5Y+R55Sf5LqG5Y+Y5YyWXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5jaGVja2MgPSAwO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrMCgpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMjAwMCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGNoZWNrdTAsIDI1MCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2t1MCgpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9KSk7XFxcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICBmYmEubG9nKGUudG9TdHJpbmcoKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQod2luZG93LmNoZWNrMCwgMjUwKTtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB3aW5kb3cuY2hlY2tjID0gMDtcXFxcbiAgICAgICAgICAgIHdpbmRvdy5jaGVjazAgPSBjaGVjazA7XFxcXG4gICAgICAgICAgICBjaGVjazAoKTtcXFxcbiAgICAgICAgfVxcXFxuICAgIH0sIHJ1bGUsIGFuY2hvcklkLCBzdG9yYWdlMC5nZXRJdGVtKFxcXFxcXFwid2hpdGVcXFxcXFxcIiwgW10pKTtcXFxcbn1cXFwifSx7XFxcImNvbF90eXBlXFxcIjpcXFwibW92aWVfM1xcXCIsXFxcIm5hbWVcXFwiOl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cImxpbmVcXFxcXFxcIixcXFxcbiAgICBleHRyYToge1xcXFxuICAgICAgICBpZDogYW5jaG9ySWRcXFxcbiAgICB9XFxcXG59KTtcXFxcblxcXFxuc2V0UmVzdWx0KGQpO1xcXCJ9XVwiLFwicHJveHlcIjpcIlwifSIsInRpdGxlIjoi5Yqo5ryr5be05aOrLeacgOaWsOWlveeci+eahOWKqOa8q+WFjei0ueWcqOe6v+ingueciyJ9
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement