xiaomianao666

小程序:YR

Nov 11th, 2022
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@YR@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiWVIiLCJhdXRob3IiOiIiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IyNmeXBhZ2UiLCJ2ZXJzaW9uIjo0MywiY29sX3R5cGUiOiJtb3ZpZV8zIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJ0b29sIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6JC5yZXF1aXJlKCdoaWtlcjovL3BhZ2UvcHJvJykiLCJzZWFyY2hfdXJsIjoiIiwiZ3JvdXAiOiLikaDmjqjojZAiLCJzZWFyY2hGaW5kIjoiIiwiZGV0YWlsX2NvbF90eXBlIjoibW92aWVfMSIsImRldGFpbF9maW5kX3J1bGUiOiIiLCJzZGV0YWlsX2NvbF90eXBlIjoibW92aWVfMSIsInNkZXRhaWxfZmluZF9ydWxlIjoiIiwidWEiOiJtb2JpbGUiLCJwcmVSdWxlIjoiIiwicGFnZXMiOiJbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuS6jOe6p+ino+aekFwiLFwicGF0aFwiOlwicFwiLFwicnVsZVwiOlwianM6XFxudmFyIGQgPSBbXTtcXG5sZXQgdXJsID0gYmFzZTY0RGVjb2RlKGdldFBhcmFtKFxcXCJ1XFxcIikpO1xcbmxldCBodG1sID0gcmVxdWVzdCh1cmwpO1xcbmxldCBhbGlzdCA9IHBkZmEoaHRtbCwgXFxcImJvZHkmJmFcXFwiKTtcXG5sZXQgYXJyID0gYWxpc3QubWFwKGl0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md0aCA9PSAwKSB7XFxuICAgIC8v5Yy56YWN5aSx6LSlXFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogXFxcIlxcXCIsXFxuICAgICAgICB1cmw6IHVybCxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwieDVfd2Vidmlld19zaW5nbGVcXFwiLFxcbiAgICAgICAgZGVzYzogXFxcImZsb2F0JiYxMDAlXFxcIixcXG4gICAgICAgIHBpY191cmw6IFxcXCJcXFwiLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBjYW5CYWNrOiB0cnVlXFxuICAgICAgICB9XFxuICAgIH0pO1xcbiAgICB0b2FzdChcXFwiQUnljLnphY3lpLHotKXvvIzlt7Lkvb/nlKhYNeWKoOi9vVxcXCIpO1xcbiAgICBzZXRSZXN1bHQoZCk7XFxufSBlbHNlIHtcXG4gICAgLy/kuLrnur/ot6/liqDliIblibLnur9cXG4gICAgbGV0IGQyID0gW107XFxuICAgIGZvciAobGV0IGkgPSAwOyBpIDwgZC5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgZDIucHVzaChkW2ldKTtcXG4gICAgICAgIGlmIChpIDwgZC5sZW5ndGggLSAxKSB7XFxuICAgICAgICAgICAgbGV0IGl0ID0gZFtpXTtcXG4gICAgICAgICAgICBsZXQgdDEgPSBwYXJzZUludChjbGVhclRleHQoaXQudGl0bGUpKTtcXG4gICAgICAgICAgICBsZXQgbmV4dCA9IGRbaSArIDFdO1xcbiAgICAgICAgICAgIGxldCB0MiA9IHBhcnNlSW50KGNsZWFyVGV4dChuZXh0LnRpdGxlKSk7XFxuICAgICAgICAgICAgaWYgKHQyIC0gdDEgPiAxIHx8IHQxIC0gdDIgPiAxKSB7XFxuICAgICAgICAgICAgICAgIGQyLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJiaWdfYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAg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ArIHA7XFxuICAgIGlmIChkYXRhLmxlbmd0aCA+IDApIHtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLliqDovb3nrKxcXFwiICsgcCArIFxcXCLpobXkuK3vvIzov5vluqbvvJoxL1xcXCIgKyBkYXRhLmxlbmd0aCxcXG4gICAgICAgICAgICB1cmw6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICAgICAgZGVzYzogXFxcIlxcXCIsXFxuICAgICAgICAgICAgcGljX3VybDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IHBhZ2VpZFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcbiAgICB9XFxuICAgIHNldFJlc3VsdChkKTtcXG4gICAgbG9nKGRhdGEubGVuZ3RoKTtcXG4gICAgaWYgKGRhdGEubGVuZ3RoID4gMCkge1xcbiAgICAgICAgLy/lpJrnur/nqIvliqDovb0gICAgICAgIFxcbiAgICAgICAgbGV0IHJlYWxQYWdlID0gXFxcIlxcXCIgPT0gciA/IDEgOiBwO1xcbiAgICAgICAgbGV0IHRhc2tzID0gZGF0YS5tYXAoaXQgPT4ge1xcbiAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgIGZ1bmM6IGZ1bmN0aW9uKHJ1bGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBydWxlLmZpbmQocywgcmVhbFBhZ2UpO1xcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBwYXJhbTogaXQsXFxuICAgICAgICAgICAgICAgIGlkOiBcXFwicnVsZUBcXFwiICsgaXQubmFtZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pO1xcblxcbiAgICAgICAgYmF0Y2hFeGVjdXRlKHRhc2tzLCB7XFxuICAgICAgICAgICAgZnVuYzogZnVuY3Rpb24ocGFyYW0sIGlkLCBlcnJvciwgcmVzdWx0KSB7XFxuICAgICAgICAgICAgICAgIC8vbG9nKFxcXCJsaXN0ZW5lcjogXFxcIiArIChyZXN1bHQgfHwgW10pLmxlbmd0aClcXG4gICAgICAgICAgICAgICAgcGFyYW0uaSA9IHBhcmFtLmkgKyAxO1xcbiAgICAgICAgICAgICAgICBpZiAocmVzdWx0KSB7XFxuICAgICAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGl0IG9mIHJlc3VsdCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJhbS5qID0gcGFyYW0uaiArIDE7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZEl0ZW1CZWZvcmUocGFnZWlkLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogd3JhcChpdC50aXRsZSwgcyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBpdC5kZXNjLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiBpdC51cmwsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBpdC5waWNfdXJsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IGl0LnBpY191cmwgPyAnbW92aWVfMV92ZXJ0aWNhbF9waWMnIDogXFxcInRleHRfMVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYTogaXQuZXh0cmFcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcblxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGlmIChwYXJhbS5pID49IHBhcmFtLmFsbCkge1xcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlSXRlbShwYWdlaWQpXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIuWKoOi9veesrFxcXCIgKyBNWV9QQUdFICsgXFxcIumhteS4re+8jOi/m+W6pu+8mlxcXCIgKyAocGFyYW0uaSArIDEpICsgXFxcIi9cXFwiICsgcGFyYW0uYWxsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2NlbnRlcl8xXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZDogcGFnZWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgcGFyYW06IHtcXG4gICAgICAgICAgICAgICAgYWxsOiBkYXRhLmxlbmd0aCxcXG4gICAgICAgICAgICAgICAgaTogMCxcXG4gICAgICAgICAgICAgICAgajogLTFcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9XFxufSBlbHNlIHtcXG4gICAgbGV0IHtcXG4gICAgICAgIGxvYWRcXG4gICAgfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2RhdGFcXFwiKTtcXG4gICAgbGV0IGRhdGEgPSBsb2FkKC0xLCBudWxsKTtcXG4gICAgaWYgKGRhdGEubGVuZ3RoID4gMCkge1xcbiAgICAgICAgZm9yIChsZXQgaXQgb2YgZGF0YSkge1xcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBpdC5uYW1lLFxcbiAgICAgICAgICAgICAgICB1cmw6IFxcXCJzZWxlY3Q6Ly9cXFwiICsgSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLor7fpgInmi6nmk43kvZxcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sOiAxLFxcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9uczogW1xcXCLorr/pl67pppbpobVcXFwiLCBcXFwi5pCc57Si5q2k56uZXFxcIl0sXFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygodXJsKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGlucHV0ID09IFxcXCLorr/pl67pppbpobVcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1ZX1VSTCA9IHVybDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ4NTovL1xcXCIgKyBnZXRIb21lKHVybClcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vcGFnZS9zaW5nbGVzXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0sIGl0LnVybClcXG4gICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiZmxleF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgcGljX3VybDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBSVUxFOiB7XFxuICAgICAgICAgICAgICAgICA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FxuICAgICAgICAgICAgbG9nKFxcXCLph43or5XkuoZcXFwiKTtcXG4gICAgICAgICAgICBodG1sID0gcmVxdWVzdCh1cmwsIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiB1cmxcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pOyAgICAgICAgICAgXFxuICAgICAgICB9ICAgICAgICAgXFxuICAgICAgICB0ZXN0KHVybCwgaHRtbCwgZCwgb2xkLCBrZXksIHJ1bGUpO1xcbiAgICB9IGVsc2Uge1xcbiAgICAgICAgLy/oh6rliqjor4bliKtwb3N06K+35rGCXFxuICAgICAgICBodG1sID0gcmVxdWVzdCh1cmwpO1xcbiAgICAgICAgbGV0IGZvcm0gPSBwZGZoKGh0bWwsIFxcXCJib2R5JiZmb3JtJiZIdG1sXFxcIik7XFxuICAgICAgICBsZXQgYWN0aW9uID0gcGQoaHRtbCwgXFxcImZvcm0mJmFjdGlvblxcXCIsIHVybCk7XFxuICAgICAgICBsZXQgaW5wdXRzID0gcGRmYShodG1sLCBcXFwiYm9keSYmZm9ybSYmaW5wdXRcXFwiKTtcXG4gICAgICAgIGxldCBib2R5ID0ge307XFxuICAgICAgICBmb3IgKGxldCBpdCBvZiBpbnB1dHMpIHtcXG4gICAgICAgICAgICBsZXQgbmFtZSA9IHBkZmgoaXQsIFxcXCJpbnB1dCYmbmFtZVxcXCIpO1xcbiAgICAgICAgICAgIGlmIChuYW1lICYmIG5hbWUgIT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICAgICAgbGV0IHZhbHVlID0gcGRmaChpdCwgXFxcImlucHV0JiZ2YWx1ZVxcXCIpO1xcbiAgICAgICAgICAgICAgICBib2R5W25hbWVdID0gdmFsdWUgfHwga2V5O1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGh0bWwgPSBwb3N0KGFjdGlvbiwge1xcbiAg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XG4gICAgICAgICAgICAgICAgdGl0bGU6IHQsXFxuICAgICAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vcGFnZS9wP3U9XFxcIiArIGJhc2U2NEVuY29kZShpdC5ocmVmKSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0XzFcXFwiLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBcXFwi4oCc4oCc4oCd4oCdPGZvbnQgY29sb3I9I2YxM2I2NmE+XFxcIiArIHJ1bGUgKyBcXFwiPC9mb250PlxcXCJcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgfVxcbiAgICByZXR1cm4gZDtcXG59XFxuJC5leHBvcnRzID0gc2VhcmNoO1wifSx7XCJjb2xfdHlwZVwiOlwibW92aWVfM1wiLFwibmFtZVwiOlwi5aKe5YigXCIsXCJwYXRoXCI6XCJtYW5hZ2VcIixcInJ1bGVcIjpcIiQuZXhwb3J0cyA9IGZ1bmN0aW9uKGQsIG5hbWVzKSB7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogXFxcIiArIFxcXCIsXFxuICAgICAgICB1cmw6ICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKHJyKSA9PiB7XFxuICAgICAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKFxcXCJhaWFkZFxcXCIpO1xcbiAgICAgICAgICAgIGFkZEl0ZW1BZnRlcihyciArIFxcXCJhaXNkZWxcXFwiLCBbe1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuivt+i+k+WFpee9keermeWQjeensFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImlucHV0XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogXFxcInB1dE15VmFyKCduYW1lJywgaW5wdXQpXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IFxcXCJhaWFkZFxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcIuivt+i+k+WFpee9keermeaQnOe0ouWcsOWdgFxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImlucHV0XFxcIixcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiBmYWxzZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBvbkNoYW5nZTogXFxcInB1dE15VmFyKCdzdXJsJywgaW5wdXQpXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBjbHM6IFxcXCJhaWFkZFxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLmj5DkuqTkv53lrZhcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2NlbnRlcl8xXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHN1cmwgPSBnZXRNeVZhcihcXFwic3VybFxcXCIsIFxcXCJcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmFtZSA9IGdldE15VmFyKFxcXCJuYW1lXFxcIiwgXFxcIlxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdXJsID09IFxcXCJcXFwiIHx8IG5hbWUgPT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+ivt+i+k+WFpeWujOaVtOWGheWuuVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHIgPSBkZWNvZGVVUklDb21wb25lbnQoc3VybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgciA9IHIucmVwbGFjZShuZXcgUmVnRXhwKFxcXCJbXFxcXHU0ZTAwLVxcXFx1OWZhNV0rXFxcIiwgXFxcImdcXFwiKSwgXFxcIioqXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkUnVsZVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9kYXRhXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYWRkUnVsZShuYW1lLCByKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lt7Lkv53lrZhcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsczogXFxcImFpYWRkXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgXSk7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgfSwgTVlfUlVMRS50aXRsZSksXFxuICAgICAgICBjb2xfdHlwZTogXFxcImZsZXhfYnV0dG9uXFxcIixcXG4gICAgfSk7XFxuICAgIGQucHVzaCh7XFxuICAgICAgICB0aXRsZTogXFxcIiAtIFxcXCIsXFxuICAgICAgICB1cmw6IFxcXCJzZWxlY3Q6Ly9cXFwiICsgSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgIG9wdGlvbnM6IG5hbWVzLFxcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi6K+36YCJ5oup6KaB5Yig6Zmk55qE56uZ54K5XFxcIixcXG4gICAgICAgICAgICBqczogJC50b1N0cmluZygoKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCB7XFxuICAgICAgICAgICAgICAgICAgICByZW1vdmVSdWxlXFxuICAgICAgICAgICAgICAgIH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9kYXRhXFxcIik7XFxuICAgICAgICAgICAgICAgIHJlbW92ZVJ1bGUoaW5wdXQpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vT0tcXFwiO1xcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KSxcXG4gICAgICAgIGNvbF90eXBlOiBcXFwiZmxleF9idXR0b25cXFwiLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBpZDogTVlfUlVMRS50aXRsZSArIFxcXCJhaXNkZWxcXFwiXFxuICAgICAgICB9XFxuICAgIH0pO1xcbn1cIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIumqjOivgeeggVwiLFwicGF0aFwiOlwieXptXCIsXCJydWxlXCI6XCJmdW5jdGlvbiBjaGVjayh1cmwsIGh0bWwsIGQpIHtcXG4gICAgbGV0IHJlbG9hZCA9IGZhbHNlO1xcbiAgICBpZiAoL+mqjOivgeeggXzns7vnu5/lronlhajpqozor4EvLnRlc3QoaHRtbCkpIHtcXG4gICAgIC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NvZGUpLnJldCwge1xcbiAgICAgICAgICAgIGhlYWRlcnM6IGhlYWRlcnMsXFxuICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCdcXG4gICAgICAgIH0pO1xcbiAgICAgICAgcmVsb2FkID0gdHJ1ZTtcXG4gICAgfVxcbiAgICByZXR1cm4gcmVsb2FkO1xcbn1cXG5cXG5mdW5jdGlvbiB0ZXN0KHVybCwgaHRtbCwgZCwgb2xkLCBrZXksIHJ1bGUpIHtcXG4gICAgaWYgKC8156eSfOmikee5gS8udGVzdChodG1sKSkge1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+aQnOe0oumcgOmXtOmalDXnp5LvvIzngrnlh7vph43mlrDliqDovb0nLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF8xXFxcIixcXG4gICAgICAgICAgICBkZXNjOiBcXFwi4oCc4oCc4oCd4oCdPGZvbnQgY29sb3I9I2YxM2I2NmE+XFxcIiArIHJ1bGUgKyBcXFwiPC9mb250PlxcXCIsXFxuICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKHVybCwgb2xkLCBrZXksIHJ1bGUpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHNwID0gJC5yZXF1aXJlKFxcXCJoaWtlcjovL3BhZ2Uvc3BcXFwiKTtcXG4gICAgICAgICAgICAgICAgbGV0IGQgPSBzcChvbGQsIGtleSwgcnVsZSk7XFxuICAgICAgICAgICAgICAgIGxldCB7XFxuICAgICAgICAgICAgICAgICAgICB3cmFwXFxuICAgICAgICAgICAgICAgIH0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS90b29sXFxcIik7XFxuICAgICAgICAgICAgICAgIGZvciAobGV0IGl0IG9mIGQpIHtcXG4gICAgICAgICAgICAgICAgICAgIGl0LnRpdGxlID0gd3JhcChpdC50aXRsZSwga2V5KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB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