Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥【满江红】《满江红》全集4k高清1080P完整版免费在线观看-哔哩哔哩@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImdtdE1vZGlmaWVkXCI6MCxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcInlzZnhcIixcInBhdGhcIjpcInlzZnhcIixcInJ1bGVcIjpcImpzOlxcbnZhciBkID0gW107XFxubGV0IHJ1bGUgPSBnZXRQYXJhbShcXFwiclxcXCIpLnNwbGl0KFxcXCIjI1xcXCIpWzBdO1xcbmxldCB1cmwgPSBNWV9VUkwuc3BsaXQoXFxcIiMjXFxcIilbMV07XFxubGV0IGl0ZSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3VcXFwiKShydWxlLCBnZXRIb21lKHVybCkpO1xcbmxldCBqcyA9ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICB0cnkge1xcbiAgICAgICAgaWYgKGRvY3VtZW50LnRpdGxlICYmIGRvY3VtZW50LnRpdGxlLmxlbmd0aCkge1xcbiAgICAgICAgICAgIGxldCByID0gJCQkKCkubGF6eVJ1bGUoKHQpID0+IHtcXG4gICAgICAgICAgICAgICAgc2V0UGFnZVRpdGxlKHQpO1xcbiAgICAgICAgICAgIH0sIGRvY3VtZW50LnRpdG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cG9ydHMgPSBmdW5jdGlvbihydWxlLCBvcmlnaW4pIHtcXG4gICAgcmV0dXJuICQudG9TdHJpbmcoKHJ1bGUsIG9yaWdpbikgPT4ge1xcbiAgICAgICAgbGV0IGhvc3QgPSBvcmlnaW4ucmVwbGFjZShuZXcgUmVnRXhwKFxcXCJodHRwOi8vfGh0dHBzOi8vXFxcIiksIFxcXCJcXFwiKS5zcGxpdChcXFwiL1xcXCIpWzBdO1xcbiAgICAgICAgbGV0IGhvc3RzID0gaG9zdC5zcGxpdChcXFwiLlxcXCIpO1xcbiAgICAgICAgaWYgKGhvc3RzLmxlbmd0aCA+IDIpIHtcXG4gICAgICAgICAgICBob3N0ID0gaG9zdHNbaG9zdHMubGVuZ3RoIC0gMl0gKyBcXFwiLlxcXCIgKyBob3N0c1tob3N0cy5sZW5ndGggLSAxXTtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmIChpbnB1dC5zdGFydHNXaXRoKFxcXCJtYWduZXRcXFwiKSkge1xcbiAgICAgICAgICAgIGNvbmZpcm0oe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogXFxcIua4qemmqOaPkOekulxcXCIsXFxuICAgICAgICAgICAgICAgIGNvbnRlbnQ6IFxcXCLmo4DmtYvliLDmlrDnmoTno4Hpk77lnLDlnYDvvIzngrnlh7vnoa7lrprmjInpkq7ljbPlj6/mkq3mlL7vvIzngrnlh7vlj5bmtojmjInpkq7lj6/ku6XlpI3liLbpk77mjqVcXFwiLFxcbiAgICAgICAgICAgICAgICBjb25maXJtOiAkLnRvU3RyaW5nKChtYWcpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBtYWc7XFxuICAgICAgICAgICAgICAgIH0sIGlucHV0KSxcXG4gICAgICAgICAgICAgICAgY2FuY2VsOiAkLnRvU3RyaW5nKChtYWcpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwiY29weTovL1xcXCIgKyBtYWdcXG4gICAgICAgICAgICAgICAgfSwgaW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N0cmluZygodXJsLCBydWxlKSA9PiB7XFxuICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlbihKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIumYv+mHjOS6keebmFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvZGV0YWlsP3J1bGU95LqR55uY5rGH5b2xJnVybD1cXFwiICsgdXJsICsgJz8/ZnlwYWdlJyxcXG4gICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgfSwgaW5wdXQsIHJ1bGUpXFxuICAgICAgICB9IGVsc2UgaWYgKC9cXFxcLihtcDN8ZmxhY3xtNGEpJC8udGVzdChpbnB1dCkpIHtcXG4gICAgICAgICAgICBsb2coaW5wdXQpO1xcbiAgICAgICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh1cmwsIHJ1bGUpID0+IHtcXG4gICAgICAgICAgICAgICAgZnlfYnJpZGdlX2FwcC5wbGF5VmlkZW8odXJsKTtcXG4gICAgICAgICAgICB9LCBpbnB1dCwgcnVsZSlcXG4gICAgICAgIH0gZWxzZSBpZiAoIWlucHV0LmluY2x1ZGVzKGhvc3QpICYmIGlucHV0LnN0YXJ0c1dpdGgoXFxcImh0dHBcXFwiKSkge1xcbiAgICAgICAgICAgIGxvZyhpbnB1dCk7XFxuICAgICAgICAgICAgcmV0dXJuICQudG9TdHJpbmcoKHVybCwgcnVsZSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgd2hpdGUgPSBbXFxuICAgICAgICAgICAgICAgICAgICBcXFwiZG91eWluXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJkb3ViYW5cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIml4aWd1YS5jb21cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImt1YWlzaG91XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJiaWxpYmlsaVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwid2VpYm9cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIndlaXhpblxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiYmFpZHVcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInptay5cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInN1YmhkXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJ0aHVuZGVyXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJ4aW5qdWNcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImdyYWI0a1xcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiL2J0XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJqc3IxMFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwiYXNzcnRcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInF1YXJrXFxcIlxcbiAgICAgICAgICAgICAgICBdO1xcbiAgICAgICAgICAgICAgICBsZXQgaW5XaGl0ZSA9IHdoaXRlLmZpbHRlcihpdCA9PiB1cmwuaW5jbHVkZXMoaXQpKS5sZW5ndGggPiAwO1xcbiAgICAgICAgICAgICAgICBpZiAoaW5XaGl0ZSkge1xcbiAgICAgICAgICAgICAgICAgICAgLy/ot7PnvZHpobVcXG4gICAgICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlbihKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLor6bmg4VcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS95c2Z4P3J1bGU9XFxcIiArIHJ1bGUgKyBcXFwiJnI9XFxcIiArIHJ1bGUgKyBcXFwiIyNcXFwiICsgdXJsLFxcbiAgICAgICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAvL0FJ6Kej5p6QXFxuICAgICAgICAgICAgICAgICAgICBmeV9icmlkZ2VfYXBwLm9wZW4oSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBkb2N1bWVudC50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvcD9ydWxlPVxcXCIgKyBydWxlICsgXFxcIiZyPVxcXCIgKyBydWxlICsgXFxcIiZ1PVxcXCIgKyBmeV9icmlkZ2VfYXBwLmJhc2U2NEVuY29kZSh1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9LCBpbnB1dCwgcnVsZSk7XFxuICAgICAgICB9IGVsc2UgaWYgKCFpbnB1dC5zdGFydHNXaXRoKFxcXCJodHRwXFxcIikpIHtcXG4gICAgICAgICAgICBsb2coaW5wdXQpO1xcbiAgICAgICAgICAgIC8v6IO95ZSk6LW3QVBQ55qE55m95ZCN5Y2VXFxuICAgICAgICAgICAgbGV0IHdoaXRlID0gW1xcbiAgICAgICAgICAgICAgICBcXFwicWtsaW5rXFxcIixcXG4gICAgICAgICAgICAgICAgXFxcImJkbmV0ZGlza1xcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCJ4dW5sZWlhcHBcXFwiXFxuICAgICAgICAgICAgXTtcXG4gICAgICAgICAgICBsZXQgaW5XaGl0ZSA9IHdoaXRlLmZpbHRlcihpdCA9PiBpbnB1dC5zdGFydHNXaXRoKGl0KSkubGVuZ3RoID4gMDtcXG4gICAgICAgICAgICBpZiAoIWluV2hpdGUpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gJC50b1N0cmluZygodXJsLCBydWxlKSA9PiB7XFxuICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlblRoaXJkQXBwICYmIGZ5X2JyaWRnZV9hcHAub3BlblRoaXJkQXBwKHVybCk7XFxuICAgICAgICAgICAgfSwgaW5wdXQsIHJ1bGUpXFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGxldCB3aGl0ZSA9IFtcXG4gICAgICAgICAgICAgICAgXFxcInVybD1cXFwiLFxcbiAgICAgICAgICAgICAgICBcXFwiZnNvdS5jb21cXFwiLFxcbiAgICAgICAgICAgICAgICBcXFwiYmluZy5cXFwiLCAgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICBdO1xcbiAgICAgICAgICAgIGxldCBpbldoaXRlID0gd2hpdGUuZmlsdGVyKGl0ID0+IGlucHV0LmluY2x1ZGVzKGl0KSkubGVuZ3RoID4gMDtcXG4gICAgICAgICAgICBpZiAoaW5XaGl0ZSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxldCByZWcgPSBuZXcgUmVnRXhwKFxcXCJbXFxcXHU0ZTAwLVxcXFx1OWZhNV0rXFxcIiwgXFxcImdcXFwiKTtcXG4gICAgICAgICAgICBsZXQgciA9IGRlY29kZVVSSUNvbXBvbmVudChpbnB1dCk7XFxuICAgICAgICAgICAgaWYgKHJlZy50ZXN0KHIpIHx8IChpbnB1dC5zdGFydHNXaXRoKG9yaWdpbikgJiYgaW5wdXQubGVuZ3RoIC0gb3JpZ2luLmxlbmd0aCA+IDIpKSB7XFxuICAgICAgICAgICAgICAgIC8v5pyJ5Lit5paH77yM5bqU6K+l5piv5Zyo5pCc57Si77yM6Lez5paw6aG16Z2iXFxuICAgICAgICAgICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh1cmwsIHJ1bGUpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlbihKU09OLnN0cmluZ2lmeSh7XF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JlKFxcXCJoaWtlcjovL3BhZ2UvdVxcXCIpKGdldFBhcmFtKFxcXCJyXFxcIiksIGdldEhvbWUodXJsKSk7XFxuICAgIGxldCBqcyA9ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBpZiAoZG9jdW1lbnQudGl0bGUgJiYgZG9jdW1lbnQudGl0bGUubGVuZ3RoKSB7XFxuICAgICAgICAgICAgICAgIGxldCByID0gJCQkKCkubGF6eVJ1bGUoKHQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHNldFBhZ2VUaXRsZSh0KTtcXG4gICAgICAgICAgICAgICAgfSwgZG9jdW1lbnQudGl0bGUpO1xcbiAgICAgICAgICAgICAgICBmeV9icmlkZ2VfYXBwLnBhcnNlTGF6eVJ1bGUocik7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAubG9nKGUudG9TdHJpbmcoKSk7XFxuICAgICAgICB9XFxuICAgIH0pO1xcbiAgICBsZXQganMyID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UveDVhaVxcXCIpKGdldFBhcmFtKFxcXCJyXFxcIiksIHVybCk7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogXFxcIlxcXCIsXFxuICAgICAgICB1cmw6IHVybCxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwieDVfd2Vidmlld19zaW5nbGVcXFwiLFxcbiAgICAgICAgZGVzYzogXFxcImZsb2F0JiYxMDAlXFxcIixcXG4gICAgICAgIHBpY191cmw6IFxcXCJcXFwiLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBqczoganMgKyBcXFwiO1xcXFxuXFxcIiArIGpzMixcXG4gICAgICAgICAgICB1cmxJbnRlcmNlcHRvcjogaXRlLFxcbiAgICAgICAgICAgIGNhbkJhY2s6IHRydWUsXFxuICAgICAgIC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ZXN0KGl0KSkge1xcbiAgICAgICAgICAgIHJldHVybiAtMTtcXG4gICAgICAgIH1cXG4gICAgICAgIGl0ID0gcGFyc2VJbnQoaXQpO1xcbiAgICAgICAgaWYgKGlzTmFOKGl0KSkge1xcbiAgICAgICAgICAgIHJldHVybiAtMTtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmIChpdCA+IDE5MDAgJiYgaXQgPCAyMTAwKSB7XFxuICAgICAgICAgICAgcmV0dXJuIC0xO1xcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIGl0O1xcbiAgICB9XFxuXFxuICAgIGZ1bmN0aW9uIGlzQ2hhcHRlcjAoaXQsIGJyb3RoZXIpIHtcXG4gICAgICAgIC8qaWYgKGRlYnVnKSB7XFxuICAgICAgICAgICAgbG9nKHtcXG4gICAgICAgICAgICAgICAgaXQ6IGl0LFxcbiAgICAgICAgICAgICAgICBicm90aGVyOiBicm90aGVyXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9Ki9cXG4gICAgICAgIGl0ID0gZ2V0Q2hhcHRlck51bShpdCk7XFxuICAgICAgICAvL2lmIChkZWJ1ZykgbG9nKGl0KTtcXG4gICAgICAgIGlmIChpdCA8IDApIHtcXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxuICAgICAgICB9XFxuICAgICAgICBicm90aGVyID0gZ2V0Q2hhcHRlck51bShicm90aGVyKTtcXG4gICAgICAgIC8vaWYgKGRlYnVnKSBsb2coYnJvdGhlcik7XFxuICAgICAgICBpZiAoYnJvdGhlciA8IDApIHtcXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gaXQgLSBicm90aGVyIDwgMiAmJiBpdCAtIGJyb3RoZXIgPiAtMjtcXG4gICAgfVxcblxcbiAgICBsZXQgX3dlYiA9ICQudG9TdHJpbmcoKCkgPT4ge1xcbiAgICAgICAgbGV0IHVybHMgPSBfZ2V0VXJscygpO1xcbiAgICAgICAgbGV0IHJlZyA9IC9cXFxcLmh0bWx8XFxcXC5jc3N8XFxcXC5qcy87XFxuICAgICAgICBmb3IgKGxldCBrIGluIHVybHMpIHtcXG4gICAgICAgICAgICBpZiAoIXJlZy50ZXN0KHVybHNba10pICYmIHVybHNba10ubWF0Y2goL1xcXFwubXA0fFxcXFwubTN1OC8pKSB7XFxuICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAubG9nKHVybHNba10pO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gZnlfYnJpZGdlX2FwcC5nZXRIZWFkZXJVcmwodXJsc1trXS5yZXBsYWNlKC8uKj91cmw9LywgXFxcIlxcXCIpKSArIFxcXCIjaWdub3JlSW1nPXRydWUjXFxcIjtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgIH0pO1xcblxcbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgbGV0IGl0ID0gYXJyW2ldO1xcbiAgICAgICAgbGV0IHQgPSBpdC50ZXh0O1xcbiAgICAgICAgaWYgKCFpdC5ocmVmIHx8IGl0LmhyZWYgPT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCBwcmUgPSBpID09IDAgPyBudWxsIDogYXJyW2kgLSAxXTtcXG4gICAgICAgIGxldCBuZXh0ID0gaSA9PSAoYXJyLmxlbmd0aCAtIDEpID8gbnVsbCA6IGFycltpICsgMV07XFxuICAgICAgICBpZiAoaXNDaGFwdGVyKGl0LCBwcmUsIG5leHQpKSB7XFxuICAgICAgICAgICAgaWYgKHdlYikge1xcbiAgICAgICAgICAgICAgICB2YXIgdXJseCA9IFxcXCJ3ZWJSdWxlOi8vXFxcIiArIGl0LmhyZWYgKyBcXFwiQFxcXCIgKyBfd2ViO1xcbiAgICAgICAgICAgICAgICB2YXIgZXh0cmF4ID0ge1xcbiAgICAgICAgICAgICAgICAgICAganNMb2FkaW5nSW5qZWN0OiB0cnVlLFxcbiAgICAgICAgICAgICAgICAgICAgaWQ6IGl0LmhyZWYsXFxuICAgICAgICAgICAgICAgICAgICBibG9ja1J1bGVzOiBbJy5tNGEnLCAnLm1wMycsICcuZmx2JywgJy5hdmknLCAnLjNncCcsICcubXBlZycsICcud212JywgJy5tb3YnLCAnLnJtdmInLCAnLmdpZicsICcuanBlZycsICcucG5nJywgJy5pY28nLCAnLnN2ZyddXFxuICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdmFyIHVybHggPSBcXFwidmlkZW86Ly9cXFwiICsgaXQuaHJlZjtcXG4gICAgICAgICAgICAgICAgdmFyIGV4dHJheCA9IHtcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBpdC5ocmVmXFxuICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0LFxcbiAgICAgICAgICAgICAgICB1cmw6IHVybHgsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8zXFxcIixcXG4gICAgICAgICAgICAgICAgZXh0cmE6IGV4dHJheFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIGlmIChkLmxlbmd0aCA9PSAwKSB7XFxuICAgICAgICByZXR1cm4gZDtcXG4gICAgfSBlbHNlIHtcXG5cXG4gICAgICAgIGQuc3BsaWNlKDAsIDAsIHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIvCflJdcXFwiICsgdXJsLFxcbiAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS95c2Z4P3J1bGU9XFxcIiArIHJ1bGUgKyBcXFwiJnI9XFxcIiArIHJ1bGUgKyBcXFwiIyNcXFwiICsgdXJsLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8xXFxcIixcXG4gICAgICAgICAgICBkZXNjOiBcXFwiXFxcIixcXG4gICAgICAgICAgICBwaWNfdXJsOiBcXFwiXFxcIlxcbiAgICAgICAgfSk7XFxuXFxuXFxuICAgICAgICAvL+S4uue6v+i3r+WKoOWIhuWJsue6v1xcbiAgICAgICAgbGV0IGQyID0gW107XFxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGQubGVuZ3RoOyBpKyspIHtcXG4gICAgICAgICAgICBkMi5wdXNoKGRbaV0pO1xcbiAgICAgICAgICAgIGlmIChpIDwgZC5sZW5ndGggLSAxKSB7XFxuICAgICAgICAgICAgICAgIGxldCBpdCA9IGRbaV07XFxuICAgICAgICAgICAgICAgIGxldCB0MSA9IHBhcnNlSW50KGNsZWFyVGV4dChpdC50aXRsZSkpO1xcbiAgICAgICAgICAgICAgICBsZXQgbmV4dCA9IGRbaSArIDFdO1xcbiAgICAgICAgICAgICAgICBsZXQgdDIgPSBwYXJzZUludChjbGVhclRleHQobmV4dC50aXRsZSkpO1xcbiAgICAgICAgICAgICAgICBpZiAodDIgLSB0MSA+IDEgfHwgdDEgLSB0MiA+IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgIGQyLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmlnX2JsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICBkMi5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImxpbmVfYmxhbmtcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgIGQyLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmlnX2JsYW5rX2Jsb2NrXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9XFxuICAgICAgICBkMi5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuWMuemFjeacieivr++8n+eCueaIkeS4jeWGjeWMuemFjeatpOmhtemdolxcXCIsXFxuICAgICAgICAgICAgdXJsOiAkKFxcXCIjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKCh1cmwpID0+IHtcXG4gICAgICAgICAgICAgICAgY29uZmlybSh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIua4qemmqOaPkOekulxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBjb250ZW50OiBcXFwi5aaC5p6c5Y+q5piv5Y2V5qyh5Yy56YWN5aSx6LSl77yM54K55Ye75LiL5pa55Y+W5raI5oyJ6ZKu5Yi35paw6aG16Z2i6YeN5paw5Yy56YWN77yM5aaC5p6c56Gu6K6k5peg5rOV5Yy56YWN77yM54K55Ye75LiL5pa556Gu5a6a5oyJ6ZKu5Yqg5YWl55m95ZCN5Y2VXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGNhbmNlbDogXFxcInJlZnJlc2hQYWdlKClcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29uZmlybTogJC50b1N0cmluZygodXJsKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpc3QgPSBzdG9yYWdlMC5nZXRJdGVtKFxcXCJ3aGl0ZVxcXCIsIFtdKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsaXN0LnB1c2godXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzdG9yYWdlMC5zZXRJdGVtKFxcXCJ3aGl0ZVxcXCIsIGxpc3QpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+W3suWKoOWFpeeZveWQjeWNlVxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0sIHVybClcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCJcXG4gICAgICAgICAgICB9LCB1cmwpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYXZhdGFyXFxcIixcXG4gICAgICAgICAgICBpbWc6IFxcXCJoaWtlcjovL2ltYWdlcy9hY2NvdW50XFxcIlxcbiAgICAgICAgfSk7XFxuICAgICAgICByZXR1cm4gZDI7XFxuICAgIH1cXG59XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCJ4NUFJXCIsXCJwYXRoXCI6XCJ4NWFpXCIsXCJydWxlXCI6XCIkLmV4cG9ydHMgPSBmdW5jdGlvbihydWxlLCBhbmNob3JJZCkge1xcbiAgICByZXR1cm4gJC50b1N0cmluZygocnVsZSwgYW5jaG9ySWQsIHdoaXRlKSA9PiB7XFxuICAgICAgICBpZiAod2luZG93LmNoZWNrMCA9PSBudWxsKSB7XFxuICAgICAgICAgICAgZnVuY3Rpb24gY2hlY2swKCkge1xcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKFxcXCJodG1sXFxcIikuaW5uZXJIVE1MO1xcbiAgICAgICAgICAgICAgICAgICAgZmJhLnB1dFZhcihcXFwiaHRtbDBcXFwiLCBodG1sKTtcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5wYXJzZUxhenlSdWxlQXN5bmMoJCQkKCkubGF6eVJ1bGUoKHJ1bGUsIHVybCwgYW5jaG9ySWQsIHdoaXRlKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGQgPSBbXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSBnZXRWYXIoXFxcImh0bWwwXFxcIiwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhclZhcihcXFwiaHRtbDBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHdlYiA9IGZhbHNlO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgd2hpdGUyID0gW1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcImZzb3UuY29tXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJiaW5nLlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwic3BvdC5cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaW5XaGl0ZSA9IHdoaXRlMi5maWx0ZXIoaXQgPT4gdXJsLmluY2x1ZGVzKGl0KSkubGVuZ3RoID4gMDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghaW5XaGl0ZSAmJiAhd2hpdGUuaW5jbHVkZXModXJsKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHBhcnNlID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2UvcGFyc2U/cnVsZT1cXFwiICsgcnVsZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gcGFyc2UocnVsZSwgd2ViLCB1cmwsIGh0bWwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghaW5XaGl0ZSAmJiBkLmxlbmd0aCA8IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGFyciA9IHBkZmEoaHRtbCwgXFxcImJvZHkmJmlmcmFtZVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhcnIubGVuZ3RoID4gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3JjID0gcGRmaChhcnJbMF0sIFxcXCJpZnJhbWUmJnNyY1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIuiOt+WPluWIsGlmcmFtZe+8mlxcXCIgKyBzcmMpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXdoaXRlLmluY2x1ZGVzKHNyYykpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzcmMgJiYgc3JjLnN0YXJ0c1dpdGgoXFxcImh0dHBcXFwiKSAmJiAhc3JjLm1hdGNoKC9cXFxcLm1wNHxcXFxcLm0zdTh8XFxcXC5tcDN8XFxcXC5mbHZ8XFxcXC5ta3YvKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWwgPSByZXF1ZXN0KHNyYyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IHBhcnNlKHJ1bGUsIHdlYiwgc3JjLCBodG1sKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcIuWwneivleiOt+WPlmlmcmFtZeWksei0pVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkLmxlbmd0aCA+IDApIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbMF0udXJsID0gJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgoYW5jaG9ySWQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgZGVzYyA9IGdldFZhcihhbmNob3JJZCwgXFxcIjBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGVzYyA9PSBcXFwiMFxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFg1RGVzYyhcXFwiZmxvYXQmJnNjcmVlbi0xNzBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKGFuY2hvcklkLCBcXFwiMVxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hYNURlc2MoXFxcImZsb2F0JiYwXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihhbmNob3JJZCwgXFxcIjBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIGFuY2hvcklkICsgXFxcIng1XFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWzBdLnRpdGxlID0gXFxcIuWxleW8gC/mlLbotbdcXFwiICsgZFswXS50aXRsZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihhbmNob3JJZCArIFxcXCJ4NVxcXCIsIFxcXCIwXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoWDVEZXNjKFxcXCJmbG9hdCYmMFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaXQgb2YgZCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBleHRyYSA9IGl0LmV4dHJhIHx8IHt9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhLmNscyA9IFxcXCJ4NWFpXFxcIjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdC5leHRyYSA9IGV4dHJhO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKFxcXCJ4NWFpXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRJdGVtQWZ0ZXIoYW5jaG9ySWQsIGQpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG9hc3QoXFxcIkFJ5Yy56YWN5oiQ5YqfXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGQubGVuZ3RoID4gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXCJwYXJzZUxhenlSdWxlQXN5bmM6XFxcIiArIGQubGVuZ3RoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZC5sZW5ndGggPiAwID8gXFxcIjFcXFwiIDogXFxcIjBcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKGUudG9TdHJpbmcoKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSwgcnVsZSwgbG9jYXRpb24uaHJlZiwgYW5jaG9ySWQsIHdoaXRlKSwgJCQkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoXFxcIjBcXFwiID09IGlucHV0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5jaGVja2MgPSB3aW5kb3cuY2hlY2tjICsgMTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLyppZiAod2luZG93LmNoZWNrYyA+IDEyMCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmJhLmxvZyhcXFwi5omn6KGM6LaF6L+HMzDnp5LvvIzml6Dms5Xop6PmnpBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsqL1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KHdpbmRvdy5jaGVjazAsIDI1MCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5jaGVja3VybCA9IGxvY2F0aW9uLmhyZWY7XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNoZWNrdTAoKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAod2luZG93LmNoZWNrdXJsICE9IGxvY2F0aW9uLmhyZWYpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2hhc2jlj5HnlJ/kuoblj5jljJZcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuY2hlY2tjID0gMDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2swKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgMjAwMCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoY2hlY2t1MCwgMjUwKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVja3UwKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSkpO1xcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICBmYmEubG9nKGUudG9TdHJpbmcoKSk7XFxuICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KHdpbmRvdy5jaGVjazAsIDI1MCk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgd2luZG93LmNoZWNrYyA9IDA7XFxuICAgICAgICAgICAgd2luZG93LmNoZWNrMCA9IGNoZWNrMDtcXG4gICAgICAgICAgICBjaGVjazAoKTtcXG4gICAgICAgIH1cXG4gICAgfSwgcnVsZSwgYW5jaG9ySWQsIHN0b3JhZ2UwLmdldEl0ZW0oXFxcIndoaXRlXFxcIiwgW10pKTtcXG59XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLpppbpobVcIixcIn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iAoaW5wdXQuc3RhcnRzV2l0aChcXFxcXFxcIm1hZ25ldFxcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgY29uZmlybSh7XFxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IFxcXFxcXFwi5rip6aao5o+Q56S6XFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgY29udGVudDogXFxcXFxcXCLmo4DmtYvliLDmlrDnmoTno4Hpk77lnLDlnYDvvIzngrnlh7vnoa7lrprmjInpkq7ljbPlj6/mkq3mlL7vvIzngrnlh7vlj5bmtojmjInpkq7lj6/ku6XlpI3liLbpk77mjqVcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICBjb25maXJtOiAkLnRvU3RyaW5nKChtYWcpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1hZztcXFxcbiAgICAgICAgICAgICAgICB9LCBpbnB1dCksXFxcXG4gICAgICAgICAgICAgICAgY2FuY2VsOiAkLnRvU3RyaW5nKChtYWcpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiY29weTovL1xcXFxcXFwiICsgbWFnXFxcXG4gICAgICAgICAgICAgICAgfSwgaW5wdXQpXFxcXG4gICAgICAgICAgICB9KVxcXFxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XFxcXG4gICAgICAgIH0gZWxzZSBpZiAoaW5wdXQuaW5jbHVkZXMoXFxcXFxcXCJhbGl5dW5kcml2ZS5jb21cXFxcXFxcIikpIHtcXFxcbiAgICAgICAgICAgIGxvZyhpbnB1dCk7XFxcXG4gICAgICAgICAgICBsZXQgcjEgPSBmZXRjaChcXFxcXFxcImhpa2VyOi8vaG9tZUDkupHnm5jmsYflvbFcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICBpZiAoIXIxIHx8IHIxLmxlbmd0aCA8PSA1KSB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHJ1ID0gJC50b1N0cmluZygoKSA9PiB7XFxc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lPaUpvZEhSd2N6b3ZMMmRwZEdWbExtTnZiUzltYkhreE16azNMMmhwYTJWeUxXbGplUzl5WVhjdmJXRnpkR1Z5TDJGc2FYbDFiaTV3Ym1jaWZRPT1cXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIGNvbmZpcm0oe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+a4qemmqOaPkOekuicsXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRlbnQ6ICfmnKzop4TliJnkvp3otZbkupHnm5jmsYflvbHop4TliJnvvIzngrnlh7vkuIvpnaLnmoTnoa7lrprmjInpkq7lr7zlhaXvvIzms6jmhI/lr7zlhaXlkI7kuIDlrpropoHlnKjkupHnm5jmsYflvbHnmbvlvZXpmL/ph4zkupHnm5jotKblj7fvvIzlkKbliJnkuI3og73nlKgnLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb25maXJtOiBydSxcXFxcbiAgICAgICAgICAgICAgICAgICAgY2FuY2VsOiBydVxcXFxuICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGxvZyhcXFxcXFxcImlucHV0XFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgcmV0dXJuICQudG9TdHJpbmcoKHVybCwgcnVsZSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlbihKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIumYv+mHjOS6keebmFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2RldGFpbD9ydWxlPeS6keebmOaxh+W9sSZ1cmw9XFxcXFxcXCIgKyB1cmwgKyAnPz9meXBhZ2UnLFxcXFxuICAgICAgICAgICAgICAgIH0pKVxcXFxuICAgICAgICAgICAgfSwgaW5wdXQsIHJ1bGUpXFxcXG4gICAgICAgIH0gZWxzZSBpZiAoL1xcXFxcXFxcLihtcDN8ZmxhY3xtNGEpJC8udGVzdChpbnB1dCkpIHtcXFxcbiAgICAgICAgICAgIGxvZyhpbnB1dCk7XFxcXG4gICAgICAgICAgICByZXR1cm4gJC50b1N0cmluZygodXJsLCBydWxlKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgZnlfYnJpZGdlX2FwcC5wbGF5VmlkZW8odXJsKTtcXFxcbiAgICAgICAgICAgIH0sIGlucHV0LCBydWxlKVxcXFxuICAgICAgICB9IGVsc2UgaWYgKCFpbnB1dC5pbmNsdWRlcyhob3N0KSAmJiBpbnB1dC5zdGFydHNXaXRoKFxcXFxcXFwiaHR0cFxcXFxcXFwiKSkge1xcXFxuICAgICAgICAgICAgbG9nKGlucHV0KTtcXFxcbiAgICAgICAgICAgIHJldHVybiAkLnRvU3RyaW5nKCh1cmwsIHJ1bGUpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgd2hpdGUgPSBbXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiZG91eWluXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiZG91YmFuXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiaXhpZ3VhLmNvbVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImt1YWlzaG91XFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiYmlsaWJpbGlcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJ3ZWlib1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIndlaXhpblxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImJhaWR1XFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiem1rLlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInN1YmhkXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwidGh1bmRlclxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInhpbmp1Y1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImdyYWI0a1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIi9idFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImpzcjEwXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiYXNzcnRcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJxdWFya1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgXTtcXFxcbiAgICAgICAgICAgICAgICBsZXQgaW5XaGl0ZSA9IHdoaXRlLmZpbHRlcihpdCA9PiB1cmwuaW5jbHVkZXMoaXQpKS5sZW5ndGggPiAwO1xcXFxuICAgICAgICAgICAgICAgIGlmIChpbldoaXRlKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIC8v6Lez572R6aG1XFxcXG4gICAgICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlbihKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcXFxcXCLor6bmg4VcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcXFxcXCJoaWtlcjovL3BhZ2UveXNmeD9ydWxlPVxcXFxcXFwiICsgcnVsZSArIFxcXFxcXFwiJnI9XFxcXFxcXCIgKyBydWxlICsgXFxcXFxcXCIjI1xcXFxcXFwiICsgdXJsLFxcXFxuICAgICAgICAgICAgICAgICAgICB9KSlcXFxcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgICAgICAvL0FJ6Kej5p6QXFxcXG4gICAgICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlbihKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogZG9jdW1lbnQudGl0bGUsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXFxcXFwiaGlrZXI6Ly9wYWdlL3A/cnVsZT1cXFxcXFxcIiArIHJ1bGUgKyBcXFxcXFxcIiZyPVxcXFxcXFwiICsgcnVsZSArIFxcXFxcXFwiJnU9XFxcXFxcXCIgKyBmeV9icmlkZ2VfYXBwLmJhc2U2NEVuY29kZSh1cmwpLFxcXFxuICAgICAgICAgICAgICAgICAgICB9KSlcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9LCBpbnB1dCwgcnVsZSk7XFxcXG4gICAgICAgIH0gZWxzZSBpZiAoIWlucHV0LnN0YXJ0c1dpdGgoXFxcXFxcXCJodHRwXFxcXFxcXCIpKSB7XFxcXG4gICAgICAgICAgICBsb2coaW5wdXQpO1xcXFxuICAgICAgICAgICAgLy/og73llKTotbdBUFDnmoTnmb3lkI3ljZVcXFxcbiAgICAgICAgICAgIGxldCB3aGl0ZSA9IFtcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcInFrbGlua1xcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIFxcXFxcXFwiYmRuZXRkaXNrXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCJ4dW5sZWlhcHBcXFxcXFxcIlxcXFxuICAgICAgICAgICAgXTtcXFxcbiAgICAgICAgICAgIGxldCBpbldoaXRlID0gd2hpdGUuZmlsdGVyKGl0ID0+IGlucHV0LnN0YXJ0c1dpdGgoaXQpKS5sZW5ndGggPiAwO1xcXFxuICAgICAgICAgICAgaWYgKCFpbldoaXRlKSB7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgcmV0dXJuICQudG9TdHJpbmcoKHVybCwgcnVsZSkgPT4ge1xcXFxuICAgICAgICAgICAgICAgIGZ5X2JyaWRnZV9hcHAub3BlblRoaXJkQXBwICYmIGZ5X2JyaWRnZV9hcHAub3BlblRoaXJkQXBwKHVybCk7XFxcXG4gICAgICAgICAgICB9LCBpbnB1dCwgcnVsZSlcXFxcbiAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgIGxldCB3aGl0ZSA9IFtcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcInVybD1cXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICBcXFxcXFxcImZzb3UuY29tXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCJiaW5nLlxcXFxcXFwiLCAgICAgICAgICAgICAgICBcXFxcbiAgICAgICAgICAgIF07XFxcXG4gICAgICAgICAgICBsZXQgaW5XaGl0ZSA9IHdoaXRlLmZpbHRlcihpdCA9PiBpbnB1dC5pbmNsdWRlcyhpdCkpLmxlbmd0aCA+IDA7XFxcXG4gICAgICAgICAgICBpZiAoaW5XaGl0ZSkge1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGxldCByZWcgPSBuZXcgUmVnRXhwKFxcXFxcXFwiW1xcXFxcXFxcdTRlMDAtXFxcXFxcXFx1OWZhNV0rXFxcXFxcXCIsIFxcXFxcXFwiZ1xcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgIGxldCByID0gZGVjb2RlVVJJQ29tcG9uZW50KGlucHV0KTtcXFxcbiAgICAgICAgICAgIGlmIChyZWcudGVzdChyKSB8fCAoaW5wdXQuc3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2xlYXJUZXh0KGl0KTtcXFxcbiAgICAgICAgbGV0IHJlZyA9IC9eWzAtOV0qJC87XFxcXG4gICAgICAgIGlmICghcmVnLnRlc3QoaXQpKSB7XFxcXG4gICAgICAgICAgICByZXR1cm4gLTE7XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgaXQgPSBwYXJzZUludChpdCk7XFxcXG4gICAgICAgIGlmIChpc05hTihpdCkpIHtcXFxcbiAgICAgICAgICAgIHJldHVybiAtMTtcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBpZiAoaXQgPiAxOTAwICYmIGl0IDwgMjEwMCkge1xcXFxuICAgICAgICAgICAgcmV0dXJuIC0xO1xcXFxuICAgICAgICB9XFxcXG4gICAgICAgIHJldHVybiBpdDtcXFxcbiAgICB9XFxcXG5cXFxcbiAgICBmdW5jdGlvbiBpc0NoYXB0ZXIwKGl0LCBicm90aGVyKSB7XFxcXG4gICAgICAgIC8qaWYgKGRlYnVnKSB7XFxcXG4gICAgICAgICAgICBsb2coe1xcXFxuICAgICAgICAgICAgICAgIGl0OiBpdCxcXFxcbiAgICAgICAgICAgICAgICBicm90aGVyOiBicm90aGVyXFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgfSovXFxcXG4gICAgICAgIGl0ID0gZ2V0Q2hhcHRlck51bShpdCk7XFxcXG4gICAgICAgIC8vaWYgKGRlYnVnKSBsb2coaXQpO1xcXFxuICAgICAgICBpZiAoaXQgPCAwKSB7XFxcXG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgYnJvdGhlciA9IGdldENoYXB0ZXJOdW0oYnJvdGhlcik7XFxcXG4gICAgICAgIC8vaWYgKGRlYnVnKSBsb2coYnJvdGhlcik7XFxcXG4gICAgICAgIGlmIChicm90aGVyIDwgMCkge1xcXFxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xcXFxuICAgICAgICB9XFxcXG4gICAgICAgIHJldHVybiBpd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SAxKSA/IG51bGwgOiBhcnJbaSArIDFdO1xcXFxuICAgICAgICBpZiAoaXNDaGFwdGVyKGl0LCBwcmUsIG5leHQpKSB7XFxcXG4gICAgICAgICAgICBpZiAod2ViKSB7XFxcXG4gICAgICAgICAgICAgICAgdmFyIHVybHggPSBcXFxcXFxcIndlYlJ1bGU6Ly9cXFxcXFxcIiArIGl0LmhyZWYgKyBcXFxcXFxcIkBcXFxcXFxcIiArIF93ZWI7XFxcXG4gICAgICAgICAgICAgICAgdmFyIGV4dHJheCA9IHtcXFxcbiAgICAgICAgICAgICAgICAgICAganNMb2FkaW5nSW5qZWN0OiB0cnVlLFxcXFxuICAgICAgICAgICAgICAgICAgICBpZDogaXQuaHJlZixcXFxcbiAgICAgICAgICAgICAgICAgICAgYmxvY2tSdWxlczogWycubTRhJywgJy5tcDMnLCAnLmZsdicsICcuYXZpJywgJy4zZ3AnLCAnLm1wZWcnLCAnLndtdicsICcubW92JywgJy5ybXZiJywgJy5naWYnLCAnLmpwZWcnLCAnLnBuZycsICcuaWNvJywgJy5zdmcnXVxcXFxuICAgICAgICAgICAgICAgIH07XFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIHZhciB1cmx4ID0gXFxcXFxcXCJ2aWRlbzovL1xcXFxcXFwiICsgaXQuaHJlZjtcXFxcbiAgICAgICAgICAgICAgICB2YXIgZXh0cmF4ID0ge1xcXFxuICAgICAgICAgICAgICAgICAgICBpZDogaXQuaHJlZlxcXFxuICAgICAgICAgICAgICAgIH07XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICBkLnB1c2goe1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOiB0LFxcXFxuICAgICAgICAgICAgICAgIHVybDogdXJseCxcXFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJ0ZXh0XzNcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICBleHRyYTogZXh0cmF4XFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgfVxcXFxuICAgIH1cXFxcbiAgICBpZiAoZC5sZW5ndGggPT0gMCkge1xcXFxuICAgICAgICByZXR1cm4gZDtcXFxcbiAgICB9IGVsc2Uge1xcXFxuXFxcXG4gICAgICAgIGQuc3BsaWNlKDAsIDAsIHtcXFxcbiAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIvCflJdcXFxcXFxcIiArIHVybCxcXFxcbiAgICAgICAgICAgIHVybDogXFxcXFxcXCJoaWtlcjovL3BhZ2UveXNmeD9ydWxlPVxcXFxcXFwiICsgcnVsZSArIFxcXFxcXFwiJnI9XFxcXFxcXCIgKyBydWxlICsgXFxcXFxcXCIjI1xcXFxcXFwiICsgdXJsLFxcXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwidGV4dF8xXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICBkZXNjOiBcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgcGljX3VybDogXFxcXFxcXCJcXFxcXFxcIlxcXFxuICAgICAgICB9KTtcXFxcblxcXFxuXFxcXG4gICAgICAgIC8v5Li657q/6Lev5Yqg5YiG5Ymy57q/XFxcXG4gICAgICAgIGxldCBkMiA9IFtdO1xcXFxuICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGQubGVuZ3RoOyBpKyspIHtcXFxcbiAgICAgICAgICAgIGQyLnB1c2goZFtpXSk7XFxcXG4gICAgICAgICAgICBpZiAoaSA8IGQubGVuZ3RoIC0gMSkge1xcXFxuICAgICAgICAgICAgICAgIGxldCBpdCA9IGRbaV07XFxcXG4gICAgICAgICAgICAgICAgbGV0IHQxID0gcGFyc2VJbnQoY2xlYXJUZXh0KGl0LnRpdGxlKSk7XFxcXG4gICAgICAgICAgICAgICAgbGV0IG5leHQgPSBkW2kgKyAxXTtcXFxcbiAgICAgICAgICAgICAgICBsZXQgdDIgPSBwYXJzZUludChjbGVhclRleHQobmV4dC50aXRsZSkpO1xcXFxuICAgICAgICAgICAgICAgIGlmICh0MiAtIHQxID4gMSB8fCB0MSAtIHQyID4gMSkge1xcXFxuICAgICAgICAgICAgICAgICAgICBkMi5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImJpZ19ibGFua19ibG9ja1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgICAgICBkMi5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImxpbmVfYmxhbmtcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgZDIucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJiaWdfYmxhbmtfYmxvY2tcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgZDIucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTogXFxcXFxcXCLljLnphY3mnInor6/vvJ/ngrnmiJHkuI3lho3ljLnphY3mraTpobXpnaJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgIHVybDogJChcXFxcXFxcIiNub0xvYWRpbmcjXFxcXFxcXCIpLmxhenlSdWxlKCh1cmwpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBjb25maXJtKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXFxcXFwi5rip6aao5o+Q56S6XFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbnRlbnQ6IFxcXFxcXFwi5aaC5p6c5Y+q5piv5Y2V5qyh5Yy56YWN5aSx6LSl77yM54K55Ye75LiL5pa55Y+W5raI5oyJ6ZKu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xufVxcXCJ9LHtcXFwiY29sX3R5cGVcXFwiOlxcXCJtb3ZpZV8zXFxcIixcXFwibmFtZVxcXCI6XFxcIng1QUlcXFwiLFxcXCJwYXRoXFxcIjpcXFwieDVhaVxcXCIsXFxcInJ1bGVcXFwiOlxcXCIkLmV4cG9ydHMgPSBmdW5jdGlvbihydWxlLCBhbmNob3JJZCkge1xcXFxuICAgIHJldHVybiAkLnRvU3RyaW5nKChydWxlLCBhbmNob3JJZCwgd2hpdGUpID0+IHtcXFxcbiAgICAgICAgaWYgKHdpbmRvdy5jaGVjazAgPT0gbnVsbCkge1xcXFxuICAgICAgICAgICAgZnVuY3Rpb24gY2hlY2swKCkge1xcXFxuICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBodG1sID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcihcXFxcXFxcImh0bWxcXFxcXFxcIikuaW5uZXJIVE1MO1xcXFxuICAgICAgICAgICAgICAgICAgICBmYmEucHV0VmFyKFxcXFxcXFwiaHRtbDBcXFxcXFxcIiwgaHRtbCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5wYXJzZUxhenlSdWxlQXN5bmMoJCQkKCkubGF6eVJ1bGUoKHJ1bGUsIHVybCwgYW5jaG9ySWQsIHdoaXRlKSA9PiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkID0gW107XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGh0bWwgPSBnZXRWYXIoXFxcXFxcXCJodG1sMFxcXFxcXFwiLCBcXFxcXFxcIlxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhclZhcihcXFxcXFxcImh0bWwwXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB3ZWIgPSBmYWxzZTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgd2hpdGUyID0gW1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImZzb3UuY29tXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiYmluZy5cXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJzcG90LlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGluV2hpdGUgPSB3aGl0ZTIuZmlsdGVyKGl0ID0+IHVybC5pbmNsdWRlcyhpdCkpLmxlbmd0aCA+IDA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghaW5XaGl0ZSAmJiAhd2hpdGUuaW5jbHVkZXModXJsKSkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcGFyc2UgPSAkLnJlcXVpcmUoXFxcXFxcXCJoaWtlcjovL3BhZ2UvcGFyc2U/cnVsZT1cXFxcXFxcIiArIHJ1bGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gcGFyc2UocnVsZSwgd2ViLCB1cmwsIGh0bWwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWluV2hpdGUgJiYgZC5sZW5ndGggPCAxKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXJyID0gcGRmYShodG1sLCBcXFxcXFxcImJvZHkmJmlmcmFtZVxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhcnIubGVuZ3RoID4gMCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzcmMgPSBwZGZoKGFyclswXSwgXFxcXFxcXCJpZnJhbWUmJnNyY1xcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcXFxcXCLojrflj5bliLBpZnJhbWXvvJpcXFxcXFxcIiArIHNyYyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCF3aGl0ZS5pbmNsdWRlcyhzcmMpKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzcmMgJiYgc3JjLnN0YXJ0c1dpdGgoXFxcXFxcXCJodHRwXFxcXFxcXCIpICYmICFzcmMubWF0Y2goL1xcXFxcXFxcLm1wNHxcXFxcXFxcXC5tM3U4fFxcXFxcXFxcLm1wM3xcXFxcXFxcXC5mbHZ8XFxcXFxcXFwubWt2LykpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh0bWwgPSByZXF1ZXN0KHNyYyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gcGFyc2UocnVsZSwgd2ViLCBzcmMsIGh0bWwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coXFxcXFxcXCLlsJ3or5Xojrflj5ZpZnJhbWXlpLHotKVcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGQubGVuZ3RoID4gMCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWzBdLnVybCA9ICQoXFxcXFxcXCIjbm9Mb2FkaW5nI1xcXFxcXFwiKS5sYXp5UnVsZSgoYW5jaG9ySWQpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBkZXNjID0gZ2V0VmFyKGFuY2hvcklkLCBcXFxcXFxcIjBcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGVzYyA9PSBcXFxcXFxcIjBcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hYNURlc2MoXFxcXFxcXCJmbG9hdCYmc2NyZWVuLTE3MFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoYW5jaG9ySWQsIFxcXFxcXFwiMVxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFg1RGVzYyhcXFxcXFxcImZsb2F0JiYwXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihhbmNob3JJZCwgXFxcXFxcXCIwXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9lbXB0eVxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCBhbmNob3JJZCArIFxcXFxcXFwieDVcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbMF0udGl0bGUgPSBcXFxcXFxcIuWxleW8gC/mlLbotbdcXFxcXFxcIiArIGRbMF0udGl0bGU7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcihhbmNob3JJZCArIFxcXFxcXFwieDVcXFxcXFxcIiwgXFxcXFxcXCIwXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoWDVEZXNjKFxcXFxcXFwiZmxvYXQmJjBcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGl0IG9mIGQpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBleHRyYSA9IGl0LmV4dHJhIHx8IHt9O1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEuY2xzID0gXFxcXFxcXCJ4NWFpXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpdC5leHRyYSA9IGV4dHJhO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZUl0ZW1CeUNscyhcXFxcXFxcIng1YWlcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZEl0ZW1BZnRlcihhbmNob3JJZCwgZCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvYXN0KFxcXFxcXFwiQUnljLnphY3miJDlip9cXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkLmxlbmd0aCA+IDApIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nKFxcXFxcXFwicGFyc2VMYXp5UnVsZUFzeW5jOlxcXFxcXFwiICsgZC5sZW5ndGgpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZC5sZW5ndGggPiAwID8gXFxcXFxcXCIxXFxcXFxcXCIgOiBcXFxcXFxcIjBcXFxcXFxcIjtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2coZS50b1N0cmluZygpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgfSwgcnVsZSwgbG9jYXRpb24uaHJlZiwgYW5jaG9ySWQsIHdoaXRlKSwgJCQkLnRvU3RyaW5nKCgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcXFxcXFxcIjBcXFxcXFxcIiA9PSBpbnB1dCkge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbmRvdy5jaGVja2MgPSB3aW5kb3cuY2hlY2tjICsgMTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKmlmICh3aW5kb3cuY2hlY2tjID4gMTIwKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcXFxcXCLmiafooYzotoXov4czMOenku+8jOaXoOazleino+aekFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgeyovXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCh3aW5kb3cuY2hlY2swLCAyNTApO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuY2hlY2t1cmwgPSBsb2NhdGlvbi5ocmVmO1xcXFxuXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gY2hlY2t1MCgpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHdpbmRvdy5jaGVja3VybCAhPSBsb2NhdGlvbi5ocmVmKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2hhc2jlj5HnlJ/kuoblj5jljJZcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmNoZWNrYyA9IDA7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hlY2swKCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCAyMDAwKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFRpbWVvdXQoY2hlY2t1MCwgMjUwKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGVja3UwKCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH0pKTtcXFxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5sb2coZS50b1N0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