Advertisement
xiaomianao666

邀您一起看:丁度·巴拉斯

Nov 27th, 2022
405
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥丁度·巴拉斯@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuS6jOe6p+ino+aekFwiLFwicGF0aFwiOlwicFwiLFwicnVsZVwiOlwianM6XFxudmFyIGQgPSBbXTtcXG5sZXQgdXJsID0gYmFzZTY0RGVjb2RlKGdldFBhcmFtKFxcXCJ1XFxcIikpO1xcbmxldCBodG1sID0gcmVxdWVzdCh1cmwpO1xcbmxldCBhbGlzdCA9IHBkZmEoaHRtbCwgXFxcImJvZHkmJmFcXFwiKTtcXG5sZXQgYXJyID0gYWxpc3QubWFwKGl0ID0+IHtcXG4gICAgcmV0dXJuIHtcXG4gICAgICAgIC8vaHRtbDogaXQsXFxuICAgICAgICB0ZXh0OiBwZGZoKGl0LCBcXFwiYSYmVGV4dFxcXCIpLFxcbiAgICAgICAgdGl0bGU6IHBkZmgoaXQsIFxcXCJhJiZ0aXRsZVxcXCIpLFxcbiAgICAgICAgaHJlZjogcGQoaXQsIFxcXCJhJiZocmVmXFxcIiwgdXJsKVxcbiAgICB9XFxufSk7XFxuLy9sb2coYXJyKTtcXG5sZXQgZGVidWcgPSBmYW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cbiAgICB9XFxuICAgIHJldHVybiBpdCAtIGJyb3RoZXIgPCAyICYmIGl0IC0gYnJvdGhlciA+IC0yO1xcbn1cXG5cXG5mb3IgKGxldCBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykge1xcbiAgICBsZXQgaXQgPSBhcnJbaV07XFxuICAgIGxldCB0ID0gaXQudGV4dDtcXG4gICAgaWYgKCFpdC5ocmVmIHx8IGl0LmhyZWYgPT0gXFxcIlxcXCIpIHtcXG4gICAgICAgIGNvbnRpbnVlO1xcbiAgICB9XFxuICAgIGxldCBwcmUgPSBpID09IDAgPyBudWxsIDogYXJyW2kgLSAxXTtcXG4gICAgbGV0IG5leHQgPSBpID09IChhcnIubGVuZ3RoIC0gMSkgPyBudWxsIDogYXJyW2kgKyAxXTtcXG4gICAgaWYgKGlzQ2hhcHRlcihpdCwgcHJlLCBuZXh0KSkge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogdCxcXG4gICAgICAgICAgICB1cmw6IFxcXCJ2aWRlbzovL1xcXCIgKyBpdC5ocmVmLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8zXFxcIixcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDogaXQuaHJlZlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICB9XFxufVxcbmlmIChkLmxlbmd0aCA9PSAwKSB7XFxuICAgIC8v5Yy56YWN5aSx6LSlXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogXFxcIlxcXCIsXFxuICAgICAgICB1cmw6IHVybCxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwieDVfd2Vidmlld19zaW5nbGVcXFwiLFxcbiAgICAgICAgZGVzYzogXFxcImZsb2F0JiYxMDAlXFxcIixcXG4gICAgICAgIHBpY191cmw6IFxcXCJcXFwiLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBjYW5CYWNrOiB0cnVlXFxuICAgICAgICB9XFxuICAgIH0pO1xcbiAgICB0b2FzdChcXFwiQUnljLnphY3lpLHotKXvvIzlt7Lkvb/nlKhYNeWKoOi9vVxcXCIpO1xcbiAgICBzZXRSZXN1bHQoZCk7XFxufSBlbHNlIHtcXG4gICAgLy/kuLrnur/ot6/liqDliIblibLnur9cXG4gICAgbGV0IGQyID0gW107XFxuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgZDIucHVzaChkW2ldKTtcXG4gICAgICAgIGlmIChpIDwgZC5sZW5ndGggLSAxKSB7XFxuICAgICAgICAgICAgbGV0IGl0ID0gZFtpXTtcXG4gICAgICAgICAgICBsZXQgdDEgPSBwYXJzZUludChjbGVhclRleHQoaXQudGl0bGUpKTtcXG4gICAgICAgICAgICBsZXQgbmV4dCA9IGRbaSArIDFdO1xcbiAgICAgICAgICAgIGxldCB0MiA9IHBhcnNlSW50KGNsZWFyVGV4dChuZXh0LnRpdGxlKSk7XFxuICAgICAgICAgICAgaWYgKHQyIC0gdDEgPiAxIHx8IHQxIC0gdDIgPiAxKSB7XFxuICAgICAgICAgICAgICAgIGQyLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJiaWdfYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICBkMi5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibGluZV9ibGFua1xcXCJcXG4gICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIGQyLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJiaWdfYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfVxcblxcbiAgICBzZXRSZXN1bHQ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lxcXCIsXFxuICAgICAgICAgICAgcGljX3VybDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IHBhZ2VpZFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICB9XFxuICAgIHNldFJlc3VsdChkKTtcXG4gICAgbG9nKGRhdGEubGVuZ3RoKTtcXG4gICAgaWYgKGRhdGEubGVuZ3RoID4gMCkge1xcbiAgICAgICAgLy/lpJrnur/nqIvliqDovb0gICAgICAgIFxcbiAgICAgICAgbGV0IHJlYWxQYWdlID0gXFxcIlxcXCIgPT0gciA/IDEgOiBwO1xcbiAgICAgICAgbGV0IHRhc2tzID0gZGF0YS5tYXAoaXQgPT4ge1xcbiAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgIGZ1bmM6IGZ1bmN0aW9uKHJ1bGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBydWxlLmZpbmQocywgcmVhbFBhZ2UpO1xcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBwYXJhbTogaXQsXFxuICAgICAgICAgICAgICAgIGlkOiBcXFwicnVsZUBcXFwiICsgaXQubmFtZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcblxcbiAgICAgICAgYmF0Y2hFeGVjdXRlKHRhc2tzLCB7XFxuICAgICAgICAgICAgZnVuYzogZnVuY3Rpb24ocGFyYW0sIGlkLCBlcnJvciwgcmVzdWx0KSB7XFxuICAgICAgICAgICAgICAgIC8vbG9nKFxcXCJsaXN0ZW5lcjogXFxcIiArIChyZXN1bHQgfHwgW10pLmxlbmd0aClcXG4gICAgICAgICAgICAgICAgcGFyYW0uaSA9IHBhcmFtLmkgKyAxO1xcbiAgICAgICAgICAgICAgICBpZiAocmVzdWx0KSB7XFxuICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGl0IG9mIHJlc3VsdCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbS5qID0gcGFyYW0uaiArIDE7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZEl0ZW1CZWZvcmUocGFnZWlkLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogd3JhcChpdC50aXRsZSwgcyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBpdC5kZXNjLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBpdC51cmwsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBpdC5waWNfdXJsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IGl0LnBpY191cmwgPyAnbW92aWVfMV92ZXJ0aWNhbF9waWMnIDogXFxcInRleHRfMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYTogaXQuZXh0cmFcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcblxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmIChwYXJhbS5pID49IHBhcmFtLmFsbCkge1xcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlSXRlbShwYWdlaWQpXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuWKoOi9veesrFxcXCIgKyBNWV9QQUdFICsgXFxcIumhteS4re+8jOi/m+W6pu+8mlxcXCIgKyAocGFyYW0uaSArIDEpICsgXFxcIi9cXFwiICsgcGFyYW0uYWxsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2NlbnRlcl8xXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogcGFnZWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgcGFyYW06IHtcXG4gICAgICAgICAgICAgICAgYWxsOiBkYXRhLmxlbmd0aCxcXG4gICAgICAgICAgICAgICAgaTogMCxcXG4gICAgICAgICAgICAgICAgajogLTFcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9XFxufSBlbHNlIHtcXG4gICAgbGV0IHtcXG4gICAgICAgIGxvYWRcXG4gICAgfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2RhdGFcXFwiKTtcXG4gICAgbGV0IGRhdGEgPSBsb2FkKC0xLCBudWxsKTtcXG4gICAgaWYgKGRhdGEubGVuZ3RoID4gMCkge1xcbiAgICAgICAgZm9yIChsZXQgaXQgb2YgZGF0YSkge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpdC5uYW1lLFxcbiAgICAgICAgICAgICAgICB1cmw6IFxcXCJzZWxlY3Q6Ly9cXFwiICsgSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLor7fpgInmi6nmk43kvZxcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sOiAxLFxcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9uczogW1xcXCLorr/pl67pppbpobVcXFwiLCBcXFwi5pCc57Si5q2k56uZXFxcIl0sXFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygodXJsKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXCLorr/pl67pppbpobVcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1ZX1VSTCA9IHVybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ4NTovL1xcXCIgKyBnZXRIb21lKHVybClcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vcGFnZS9zaW5nbGVzXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0sIGl0LnVybClcXG4gICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiZmxleF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgcGljX3VybDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBSVUxFOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogaXQubmFtZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGl0LnVybFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgICAgICAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9tYW5hZ2VcXFwiKShkLCBkYXRhLm1hcChpdCA9PiBpdC5uYW1lKSk7XFxuICAgIH1cXG59XFxuXFxuc2V0UmVzdWx0KGQpO1wifSx7X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Bsb2FkOiBsb2FkLFxcbiAgICBhZGRSdWxlOiBhZGRSdWxlLFxcbiAgICByZW1vdmVSdWxlOiByZW1vdmVSdWxlXFxufVwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5pCc57Si6Kej5p6QXCIsXCJwYXRoXCI6XCJzcFwiLFwicnVsZVwiOlwiZnVuY3Rpb24gc2VhcmNoKHVybCwga2V5LCBydWxlKSB7XFxuICAgIGxldCBkID0gW107XFxuICAgIGxldCBodG1sID0gXFxcIlxcXCI7XFxuICAgIGlmICh1cmwuaW5jbHVkZXMoXFxcIioqXFxcIikpIHtcXG4gICAgICAgIC8vZ2V06K+35rGCXFxuICAgICAgICBsZXQgb2xkID0gdXJsO1xcbiAgICAgICAgdXJsID0gdXJsLnJlcGxhY2UoXFxcIioqXFxcIiwga2V5KTtcXG4gICAgICAgIGh0bWwgPSByZXF1ZXN0KHVybCk7XFxuICAgICAgICAvL+iHquWKqOi/h+mqjOivgeeggeWSjOmikee5geiuv+mXrumZkOWItlxcbiAgICAgICAgbGV0IHtcXG4gICAgICAgICAgICBjaGVjaywgdGVzdFxcbiAgICAgICAgfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3l6bVxcXCIpO1xcbiAgICAgICAgaWYgKGNoZWNrKHVybCwgaHRtbCwgZCkpIHtcXG4gICAgICAgICAgICBsb2coXFxcIumHjeivleS6hlxcXCIpO1xcbiAgICAgICAgICAgIGh0bWwgPSByZXF1ZXN0KHVybCwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IHVybFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7ICAgICAgICAgICBcXG4gICAgICAgIH0gICAgICAgICBcXG4gICAgICAgIHRlc3QodXJsLCBodG1sLCBkLCBvbGQsIGtleSwgcnVsZSk7XFxuICAgIH0gZWxzZSB7XFxuICA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gICAgfVxcbiAgICB9XFxuICAgIHJldHVybiBkO1xcbn1cXG4kLmV4cG9ydHMgPSBzZWFyY2g7XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLlop7liKBcIixcInBhdGhcIjpcIm1hbmFnZVwiLFwicnVsZVwiOlwiJC5leHBvcnRzID0gZnVuY3Rpb24oZCwgbmFtZXMpIHtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwiICsgXFxcIixcXG4gICAgICAgIHVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgocnIpID0+IHtcXG4gICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoXFxcImFpYWRkXFxcIik7XFxuICAgICAgICAgICAgYWRkSXRlbUFmdGVyKHJyICsgXFxcImFpc2RlbFxcXCIsIFt7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwi6K+36L6T5YWl572R56uZ5ZCN56ewXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaW5wdXRcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZVZpc2libGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcXFwicHV0TXlWYXIoJ25hbWUnLCBpbnB1dClcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogXFxcImFpYWRkXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwi6K+36L6T5YWl572R56uZ5pCc57Si5Zyw5Z2AXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaW5wdXRcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZVZpc2libGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcXFwicHV0TXlWYXIoJ3N1cmwnLCBpbnB1dClcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogXFxcImFpYWRkXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuaPkOS6pOS/neWtmFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfY2VudGVyXzFcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKFxcXCIjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3VybCA9IGdldE15VmFyKFxcXCJzdXJsXFxcIiwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuYW1lID0gZ2V0TXlWYXIoXFxcIm5hbWVcXFwiLCBcXFwiXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHN1cmwgPT0gXFxcIlxcXCIgfHwgbmFtZSA9PSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6K+36L6T5YWl5a6M5pW05YaF5a65XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgciA9IGRlY29kZVVSSUNvbXBvbmVudChzdXJsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByID0gci5yZXBsYWNlKG5ldyBSZWdFeHAoXFxcIltcXFxcdTRlMDAtXFxcXHU5ZmE1XStcXFwiLCBcXFwiZ1xcXCIpLCBcXFwiKipcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRSdWxlXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2RhdGFcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBhZGRSdWxlKG5hbWUsIHIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+W3suS/neWtmFxcXCI7XFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2xzOiBcXFwiYWlhZGRcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBdKTtcXG4gICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICB9LCBNWV9SVUxFLnRpdGxlKSxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwiZmxleF9idXR0b25cXFwiLFxcbiAgICB9KTtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwiIC0gXFxcIixcXG4gICAgICAgIHVybDogXFxcInNlbGVjdDovL1xcXCIgKyBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgb3B0aW9uczogbmFtZXMsXFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLor7fpgInmi6nopoHliKDpmaTnmoTnq5nngrlcXFwiLFxcbiAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHtcXG4gICAgICAgICAgICAgICAgICAgIHJlbW92ZVJ1bGVcXG4gICAgICAgICAgICAgICAgfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2RhdGFcXFwiKTtcXG4gICAgICAgICAgICAgICAgcmVtb3ZlUnVsZShpbnB1dCk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly9PS1xcXCI7XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJmbGV4X2J1dHRvblxcXCIsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGlkOiBNWV9SVUxFLnRpdGxlICsgXFxcImFpc2RlbFxcXCJcXG4gICAgICAgIH1cXG4gICAgfSk7XFxufVwifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi6aqM6K+B56CBXCIsXCJwYXRoXCI6XCJ5em1cIixcInJ1bGVcIjpcImZ1bmN0aW9uIGNoZWNrKHVybCwgaHRtbCwgZCkge1xcbiAgICBsZXQgcmVsb2FkID0gZmFsc2U7XFxuICAgIGlmICgv6aqM6K+B56CBfOezu+e7n+WuieWFqOmqjOivgS8udGVzdChodG1sKSkge1xcbiAgICAgICAgbGV0IGhlYWRlcnMgPSB7XFxuICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOiBNT0JJTEVfVUEsXFxuICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiB1cmxcXG4gICAgICAgIH07XFxuICAgICAgICBNWV9IT01FID0gZ2V0SG9tZSh1cmwpO1xcbiAgICAgICAgbGV0IHNzeXogPSAnVGxvR25uaWtUaHJmcy81ZkRObGs1Q1NzYmFHdEFIN1cvdU1aanVZb0l1cEI2YkNvbzlDb3RMUUhmUElkR2dia2J5bktxTDJhVUUyWHk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0KGh0bWwpKSB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAn5pCc57Si6ZyA6Ze06ZqUNeenku+8jOeCueWHu+mHjeaWsOWKoOi9vScsXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzFcXFwiLFxcbiAgICAgICAgICAgIGRlc2M6IFxcXCLigJzigJzigJ3igJ08Zm9udCBjb2xvcj0jZjEzYjY2YT5cXFwiICsgcnVsZSArIFxcXCI8L2ZvbnQ+XFxcIixcXG4gICAgICAgICAgICB1cmw6ICQoKS5sYXp5UnVsZSgodXJsLCBvbGQsIGtleSwgcnVsZSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgc3AgPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9zcFxcXCIpO1xcbiAgICAgICAgICAgICAgICBsZXQgZCA9IHNwKG9sZCwga2V5LCBydWxlKTtcXG4gICAgICAgICAgICAgICAgbGV0IHtcXG4gICAgICAgICAgICAgICAgICAgIHdyYXBcXG4gICAgICAgICAgICAgICAgfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3Rvb2xcXFwiKTtcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaXQgb2YgZCkge1xcbiAgICAgICAgICAgICAgICAgICAgaXQudGl0bGUgPSB3cmFwKGl0LnRpdGxlLCBrZXkpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGFkZEl0ZW1BZnRlcih1cmwsIGQpO1xcbiAgICAgICAgICAgICAgICBkZWxldGVJdGVtKHVybCk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly9PS1xcXCI7XFxuICAgICAgICAgICAgfSwgdXJsLCBvbGQsIGtleSwgcnVsZSksXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IHVybFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1x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xlOiB0LFxcbiAgICAgICAgICAgIHVybDogXFxcInZpZGVvOi8vXFxcIiArIGl0LmhyZWYsXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzNcXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOiBpdC5ocmVmXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSk7XFxuICAgIH1cXG59XFxuaWYgKGQubGVuZ3RoID09IDApIHtcXG4gICAgLy/ljLnphY3lpLHotKVcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiBcXFwiXFxcIixcXG4gICAgICAgIHVybDogdXJsLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJ4NV93ZWJ2aWV3X3NpbmdsZVxcXCIsXFxuICAgICAgICBkZXNjOiBcXFwiZmxvYXQmJjEwMCVcXFwiLFxcbiAgICAgICAgcGljX3VybDogXFxcIlxcXCIsXFxuICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgIGNhbkJhY2s6IHRydWVcXG4gICAgICAgIH1cXG4gICAgfSk7XFxuICAgIHRvYXN0KFxcXCJBSeWMuemFjeWksei0pe+8jOW3suS9v+eUqFg15Yqg6L29XFxcIik7XFxuICAgIHNldFJlc3VsdChkKTtcXG59IGVsc2Uge1xcbiAgICAvL+S4uue6v+i3r+WKoOWIhuWJsue6v1xcbiAgICBsZXQgZDIgPSBbXTtcXG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPCBkLmxlbmd0aDsgaSsrKSB7XFxuICAgICAgICBkMi5wdXNoKGRbaV0pO1xcbiAgICAgICAgaWYgKGkgPCBkLmxlbmd0aCAtIDEpIHtcXG4gICAgICAgICAgICBsZXQgaXQgPSBkW2ldO1xcbiAgICAgICAgICAgIGxldCB0MSA9IHBhcnNlSW50KGNsZWFyVGV4dChpdC50aXRsZSkpO1xcbiAgICAgICAgICAgIGxldCBuZXh0ID0gZFtpICsgMV07XFxuICAgICAgICAgICA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0IGkgPSAwOyBpIDwgZC5sZW5ndGg7IGkrKykge1xcXFxuICAgICAgICBkMi5wdXNoKGRbaV0pO1xcXFxuICAgICAgICBpZiAoaSA8IGQubGVuZ3RoIC0gMSkge1xcXFxuICAgICAgICAgICAgbGV0IGl0ID0gZFtpXTtcXFxcbiAgICAgICAgICAgIGxldCB0MSA9IHBhcnNlSW50KGNsZWFyVGV4dChpdC50aXRsZSkpO1xcXFxuICAgICAgICAgICAgbGV0IG5leHQgPSBkW2kgKyAxXTtcXFxcbiAgICAgICAgICAgIGxldCB0MiA9IHBhcnNlSW50KGNsZWFyVGV4dChuZXh0LnRpdGxlKSk7XFxcXG4gICAgICAgICAgICBpZiAodDIgLSB0MSA+IDEgfHwgdDEgLSB0MiA+IDEpIHtcXFxcbiAgICAgICAgICAgICAgICBkMi5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiYmlnX2JsYW5rX2Jsb2NrXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICBkMi5wdXNoKHtcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwibGluZV9ibGFua1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgZDIucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImJpZ19ibGFua19ibG9ja1xcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1cXFxcbiAgICB9XFxcXG5cXFxcbiAgICBzZXRSZXN1bHQoZDIpO1xcXFxufVxcXCJ9LHtcXFwiY29sX3R5cGVcXFwiOlxcXCJ0ZXh0XzFcXFwiLFxcXCJuYW1lXFxcIjpcXFwi5pCc57Si5rWL6K+VXFxcIixcXFwicGF0aFxcXCI6XFxcInN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sgcDtcXFxcbiAgICBpZiAoZGF0YS5sZW5ndGggPiAwKSB7XFxcXG4gICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTogXFxcXFxcXCLliqDovb3nrKxcXFxcXFxcIiArIHAgKyBcXFxcXFxcIumhteS4re+8jOi/m+W6pu+8mjEvXFxcXFxcXCIgKyBkYXRhLmxlbmd0aCxcXFxcbiAgICAgICAgICAgIHVybDogXFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFxcXFxcInRleHRfY2VudGVyXzFcXFxcXFxcIixcXFxcbiAgICAgICAgICAgIGRlc2M6IFxcXFxcXFwiXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICBwaWNfdXJsOiBcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICBpZDogcGFnZWlkXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH0pO1xcXFxuICAgIH1cXFxcbiAgICBzZXRSZXN1bHQoZCk7XFxcXG4gICAgbG9nKGRhdGEubGVuZ3RoKTtcXFxcbiAgICBpZiAoZGF0YS5sZW5ndGggPiAwKSB7XFxcXG4gICAgICAgIC8v5aSa57q/56iL5Yqg6L29ICAgICAgICBcXFxcbiAgICAgICAgbGV0IHJlYWxQYWdlID0gXFxcXFxcXCJcXFxcXFxcIiA9PSByID8gMSA6IHA7XFxcXG4gICAgICAgIGxldCB0YXNrcyA9IGRhdGEubWFwKGl0ID0+IHtcXFxcbiAgICAgICAgICAgIHJldHVybiB7XFxcXG4gICAgICAgICAgICAgICAgZnVuYzogZnVuY3Rpb24ocnVsZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcnVsZS5maW5kKHMsIHJlYWxQYWdlKTtcXFxcbiAgICAgICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgICAgIHBhcmFtOiBpdCxcXFxcbiAgICAgICAgICAgICAgICBpZDogXFxcXFxcXCJydWxlQFxcXFxcXFwiICsgaXQubmFtZVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9KTtcXFxcblxcXFxuICAgICAgICBiYXRjaEV4ZWN1dGUodGFza3MsIHtcXFxcbiAgICAgICAgICAgIGZ1bmM6IGZ1bmN0aW9uKHBhcmFtLCBpZCwgZXJyb3IsIHJlc3VsdCkge1xcXFxuICAgICAgICAgICAgICAgIC8vbG9nKFxcXFxcXFwibGlzdGVuZXI6IFxcXFxcXFwiICsgKHJlc3VsdCB8fCBbXSkubGVuZ3RoKVxcXFxuICAgICAgICAgICAgICAgIHBhcmFtLmkgPSBwYXJhbS5pICsgMTtcXFxcbiAgICAgICAgICAgICAgICBpZiAocmVzdWx0KSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpdCBvZiByZXN1bHQpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbS5qID0gcGFyYW0uaiArIDE7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkSXRlbUJlZm9yZShwYWdlaWQsIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHdyYXAoaXQudGl0bGUsIHMpLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBpdC5kZXNjLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IGl0LnVybCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGljX3VybDogaXQucGljX3VybCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IGl0LnBpY191cmwgPyAnbW92aWVfMV92ZXJ0aWNhbF9waWMnIDogXFxcXFxcXCJ0ZXh0XzFcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IGl0LmV4dHJhXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge31cXFxcblxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBpZiAocGFyYW0uaSA+PSBwYXJhbS5hbGwpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlSXRlbShwYWdlaWQpXFxcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcXFxcXCLliqDovb3nrKxcXFxcXFxcIiArIE1ZX1BBR0UgKyBcXFxcXFxcIumhteS4re+8jOi/m+W6pu+8mlxcXFxcXFwiICsgKHBhcmFtLmkgKyAxKSArIFxcXFxcXFwiL1xcXFxcXFwiICsgcGFyYW0uYWxsLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwidGV4dF9jZW50ZXJfMVxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IFxcXFxcXFwiXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlkOiBwYWdlaWRcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgcGFyYW06IHtcXFxcbiAgICAgICAgICAgICAgICBhbGw6IGRhdGEubGVuZ3RoLFxcXFxuICAgICAgICAgICAgICAgIGk6IDAsXFxcXG4gICAgICAgICAgICAgICAgajogLTFcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSlcXFxcbiAgICB9XFxcXG59IGVsc2Uge1xcXFxuICAgIGxldCB7XFxcXG4gICAgICAgIGxvYWRcXFxcbiAgICB9ID0gJC5yZXF1aXJlKFxcXFxcXFwiaGlrZXI6Ly9wYWdlL2RhdGFcXFxcXFxcIik7XFxcXG4gICAgbGV0IGRhdGEgPSBsb2FkKC0xLCBudWxsKTtcXFxcbiAgICBpZiAoZGF0YS5sZW5ndGggPiAwKSB7XFxcXG4gICAgICAgIGZvciAobGV0IGl0IG9mIGRhdGEpIHtcXFxcbiAgICAgICAgICAgIGQucHVzaCh7XFxcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGl0Lm5hbWUsXFxcXG4gICAgICAgICAgICAgICAgdXJsOiBcXFxcXFxcInNlbGVjdDovL1xcXFxcXFwiICsgSlNPTi5zdHJpbmdpZnkoe1xcXFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcXFxcXCLor7fpgInmi6nmk43kvZxcXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICAgICAgY29sOiAxLFxcXFxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zOiBbXFxcXFxcXCLorr/pl67pppbpobVcXFxcXFxcIiwgXFxcXFxcXCLmkJzntKLmraTnq5lcXFxcXFxcIl0sXFxcXG4gICAgICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCh1cmwpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbnB1dCA9PSBcXFxcXFxcIuiuv+mXrummlumhtVxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTVlfVVJMID0gdXJsO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcIng1Oi8vXFxcXFxcXCIgKyBnZXRIb21lKHVybClcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwiaGlrZXI6Ly9wYWdlL3NpbmdsZXNcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9LCBpdC51cmwpXFxcXG4gICAgICAgICAgICAgICAgfSksXFxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiZmxleF9idXR0b25cXFxcXFxcIixcXFxcbiAgICAgICAgICAgICAgICBkZXNjOiBcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgIHBpY191cmw6IFxcXFxcXFwiXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgUlVMRToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogaXQubmFtZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogaXQudXJsXFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICAkLnJlcXVpcmUoXFxcXFxcXCJoaWtlcjovL3BhZ2UvbWFuYWdlXFxcXFxcXCIpKGQsIGRhdGEubWFwKGl0ID0+IGl0Lm5hbWUpKTtcXFxcbiAgICB9XFxcXG59XFxcXG5cXFxcbnNldFJlc3VsdChkKTtcXFwifSx7XFxcImNvbF90eXBlXFxcIjpcXFwibW92aWVfM1xcXCIsXFxcIm5hbWVcXFwiOlxcXCLmlbDmja5cXFwiLFxcXCJwYXRoXFxcIjpcXFwiZGF0YVxcXCIsXFxcInJ1bGVc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uWinuWIoFxcXCIsXFxcInBhdGhcXFwiOlxcXCJtYW5hZ2VcXFwiLFxcXCJydWxlXFxcIjpcXFwiJC5leHBvcnRzID0gZnVuY3Rpb24oZCwgbmFtZXMpIHtcXFxcbiAgICBkLnB1c2goe1xcXFxuICAgICAgICB0aXRsZTogXFxcXFxcXCIgKyBcXFxcXFxcIixcXFxcbiAgICAgICAgdXJsOiAkKFxcXFxcXFwiI25vTG9hZGluZyNcXFxcXFxcIikubGF6eVJ1bGUoKHJyKSA9PiB7XFxcXG4gICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoXFxcXFxcXCJhaWFkZFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgIGFkZEl0ZW1BZnRlcihyciArIFxcXFxcXFwiYWlzZGVsXFxcXFxcXCIsIFt7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFxcXFxcIuivt+i+k+WFpee9keermeWQjeensFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJpbnB1dFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiBmYWxzZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcXFxcXFxcInB1dE15VmFyKCduYW1lJywgaW5wdXQpXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IFxcXFxcXFwiYWlhZGRcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgICAgICB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFxcXFxcIuivt+i+k+WFpee9keermeaQnOe0ouWcsOWdgFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJpbnB1dFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiBmYWxzZSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcXFxcXFxcInB1dE15VmFyKCdzdXJsJywgaW5wdXQpXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IFxcXFxcXFwiYWlhZGRcXFxcXFxcIlxcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgICAgICB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFxcXFxcIuaPkOS6pOS/neWtmFxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcXFxcXCJ0ZXh0X2NlbnRlcl8xXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChcXFxcXFxcIiNub0xvYWRpbmcjXFxcXFxcXCIpLmxhenlSdWxlKCgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBzdXJsID0gZ2V0TXlWYXIoXFxcXFxcXCJzdXJsXFxcXFxcXCIsIFxcXFxcXFwiXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IG5hbWUgPSBnZXRNeVZhcihcXFxcXFxcIm5hbWVcXFxcXFxcIiwgXFxcXFxcXCJcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3VybCA9PSBcXFxcXFxcIlxcXFxcXFwiIHx8IG5hbWUgPT0gXFxcXFxcXCJcXFxcXFxcIikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcInRvYXN0Oi8v6K+36L6T5YWl5a6M5pW05YaF5a65XFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCByID0gZGVjb2RlVVJJQ29tcG9uZW50KHN1cmwpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgciA9IHIucmVwbGFjZShuZXcgUmVnRXhwKFxcXFxcXFwiW1xcXFxcXFxcdTRlMDAtXFxcXFxcXFx1OWZhNV0rXFxcXFxcXCIsIFxcXFxcXFwiZ1xcXFxcXFwiKSwgXFxcXFxcXCIqKlxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkUnVsZVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSA9ICQucmVxdWlyZShcXFxcXFxcImhpa2VyOi8vcGFnZS9kYXRhXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgYWRkUnVsZShuYW1lLCByKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL+W3suS/neWtmFxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogXFxcXFxcXCJhaWFkZFxcXFxcXFwiXFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICBdKTtcXFxcbiAgICAgICAgICAgIHJldHVybiBcXFxcXFxcImhpa2VyOi8vZW1wdHlcXFxcXFxcIlxcXFxuICAgICAgICB9LCBNWV9SVUxFLnRpdGxlKSxcXFxcbiAgICAgICAgY29sX3R5cGU6IFxcXFxcXFwiZmxleF9idXR0b25cXFxcXFxcIixcXFxcbiAgICB9KTtcXFxcbiAgICBkLnB1c2goe1xcXFxuICAgICAgICB0aXRsZTogXFxcXFxcXCIgLSBcXFxcXFxcIixcXFxcbiAgICAgICAgdXJsOiBcXFxcXFxcInNlbGVjdDovL1xcXFxcXFwiICsgSlNPTi5zdHJpbmdpZnkoe1xcXFxuICAgICAgICAgICAgb3B0aW9uczogbmFtZXMsXFxcXG4gICAgICAgICAgICB0aXRsZTogXFxcXFxcXCLor7fpgInmi6nopoHliKDpmaTnmoTnq5nngrlcXFxcXFxcIixcXFxcbiAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQge1xcXFxuICAgICAgICAgICAgICAgICAgICByZW1vdmVSdWxlXFxcXG4gICAgICAgICAgICAgICAgfSA9ICQucmVxdWlyZShcXFxcXFxcImhpa2VyOi8vcGFnZS9kYXRhXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgIHJlbW92ZVJ1bGUoaW5wdXQpO1xcXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwidG9hc3Q6Ly9PS1xcXFxcXFwiO1xcXFxuICAgICAgICAgICAgfSlcXFxcbiAgICAgICAgfSksXFxcXG4gICAgICAgIGNvbF90eXBlOiBcXFxcXFxcImZsZXhfYnV0dG9uXFxcXFxcXCIsXFxcXG4gICAgICAgIGV4dHJhOiB7XFxcXG4gICAgICAgICAgICBpZDogTVlfUlVMRS50aXRsZSArIFxcXFxcXFwiYWlzZGVsXFxcXFxcXCJcXFxcbiAgICAgICAgfVxcXFxuICAgIH0pO1xcXFxufVxcXCJ9LHtcXFwiY29sX3R5cGVcXFwiOlxcXCJt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