xiaomianao666

小程序:图书馆Pro

Jun 14th, 2023
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@图书馆Pro@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi5Zu+5Lmm6aaGUHJvIiwiYXV0aG9yIjoiSm9lIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSIsInZlcnNpb24iOjEzLCJjb2xfdHlwZSI6Im1vdmllXzMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6InJlYWQiLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbmxldCBsYXlvdXQgPSBbXTtcbmxheW91dC5wdXNoKHtcbiAgICBjb2xfdHlwZTogXCJiaWdfYmxhbmtfYmxvY2tcIlxufSk7XG5sYXlvdXQucHVzaCh7XG4gICAgY29sX3R5cGU6IFwiYmlnX2JsYW5rX2Jsb2NrXCJcbn0pO1xubGF5b3V0LnB1c2goe1xuICAgIGNvbF90eXBlOiBcImJpZ19ibGFua19ibG9ja1wiXG59KTtcbmxheW91dC5wdXNoKHtcbiAgICBjb2xfdHlwZTogXCJiaWdfYmxhbmtfYmxvY2tcIlxufSk7XG5cbmxheW91dC5wdXNoKHtcbiAgICB0aXRsZTogJzxoMSBzdHlsZT1cInRleHQtYWxpZ246IGNlbnRlcjtcIj48YmlnPjxmb250IGNvbG9yPVwiI0ZFQkQ2RlwiPuWbvuS5pummhlBybzwvZm9udD48L2JpZz48YnI+PHNtYWxsPjxmb250IGNvbG9yPVwiI0ZCNkM3M1wiPuS9oOeahOengeS6uuWbvuS5pummhjwvZm9udD48L3NtYWxsPjwvaDE+JyxcbiAgICBjb2xfdHlwZTogXCJyaWNoX3RleHRcIlxufSk7XG5sYXlvdXQucHVzaCh7XG4gICAgY29sX3R5cGU6IFwiaW5wdXRcIixcbiAgICB1cmw6IFwiJ2hpa2VyOi8vc2VhcmNoP3M9JyArIGlucHV0XCIsXG4gICAgZXh0cmE6IHtcbiAgICAgICAgcnVsZXM6ICQudG9TdHJpbmcoKCkgPT4ge1xuICAgICAgICAgICAgbGV0IGRhdGEgPSBbXTtcbiAgICAgICAgICAgICQucmVxdWlyZShcImFwaVwiKS5lbmdpbmVzLmZvckVhY2goKE1hcCwgaSkgPT4ge1xuICAgICAgICAgICAgICAgIGRhdGEucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIFwidGl0bGVcIjogTWFwLFxuICAgICAgICAgICAgICAgICAgICBcInNlYXJjaF91cmxcIjogYnVpbGRVcmwoXCJoaWtlcjovL2VtcHR5XCIsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGt3OiBcIioqXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiBcImZ5cGFnZVwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgZW5naW5lOiBNYXBcbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgIFwic2VhcmNoRmluZFwiOiBcImpzOiQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL+aQnOe0oj9ydWxlPeWbvuS5pummhlBybycpXCJcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH0pXG4gICAgICAgICAgICByZXR1cm4gSlNPTi5zdHJpbmdpZnkoZGF0YSk7XG4gICAgICAgIH0pXG4gICAgfSxcbiAgICB0aXRsZTogXCLmkJzntKJcIlxufSlcbmxheW91dC5wdXNoKHtcbiAgICBjb2xfdHlwZTogXCJiaWdfYmxhbmtfYmxvY2tcIlxufSk7XG5sYXlvdXQucHVzaCh7XG4gICAgY29sX3R5cGU6IFwiYmlnX2JsYW5rX2Jsb2NrXCJcbn0pO1xubGF5b3V0LnB1c2goe1xuICAgIGNvbF90eXBlOiBcImJpZ19ibGFua19ibG9ja1wiXG59KTtcbmxheW91dC5wdXNoKHtcbiAgICB0aXRsZTogXCLwn5SwIOWOhuWPsuiusOW9lVwiLFxuICAgIGNvbF90eXBlOiBcInRleHRfMVwiLFxuICAgIHVybDogJChcIuehruiupOa4hemZpO+8n1wiKS5jb25maXJtKCgpID0+IHtcbiAgICAgICAgY2xlYXJJdGVtKFwiaGlzdG9yeVwiKVxuICAgICAgICByZWZyZXNoUGFnZSgpXG4gICAgICAgIHRvYXN0KFwi5riF55CG5oiQ5YqfXCIpXG4gICAgfSlcbn0pO1xudmFyIGhpc3RvcnkgPSBzdG9yYWdlMC5nZXRJdGVtKFwiaGlzdG9yeVwiLCBbXSlcbmhpc3RvcnkuZm9yRWFjaChpdGVtID0+IHtcbiAgICBsYXlvdXQucHVzaCh7XG4gICAgICAgIHRpdGxlOiBpdGVtLFxuICAgICAgICB1cmw6ICdoaWtlcjovL3NlYXJjaD9zPScgKyBpdGVtLFxuICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgcnVsZXM6ICQudG9TdHJpbmcoKCkgPT4ge1xuICAgICAgICAgICAgICAgIGxldCBkYXRhID0gW107XG4gICAgICAgICAgICAgICAgJC5yZXF1aXJlKFwiYXBpXCIpLmVuZ2luZXMuZm9yRWFjaCgoTWFwLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGEucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBcInRpdGxlXCI6IE1hcCxcbiAgICAgICAgICAgICAgICAgICAgICAgIFwic2VhcmNoX3VybFwiOiBidWlsZFVybChcImhpa2VyOi8vZW1wdHlcIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGt3OiBcIioqXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogXCJmeXBhZ2VcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmdpbmU6IE1hcFxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICBcInNlYXJjaEZpbmRcIjogXCJqczokLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS/mkJzntKI/cnVsZT3lm77kuabppoZQcm8nKVwiXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KGRhdGEpO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgfSxcbiAgICAgICAgY29sX3R5cGU6IFwiZmxleF9idXR0b25cIlxuICAgIH0pXG59KVxuc2V0UmVzdWx0KGxheW91dCk7Iiwic2VhcmNoX3VybCI6Imhpa2VyOi8vZW1wdHk/a3c9KioiLCJncm91cCI6IuKRoOKRoemYheivu+i1hOiur/CfpbAiLCJzZWFyY2hGaW5kIjoianM6XG5zZXRSZXN1bHQoW3tcbiAgICB1cmw6ICdoaWtlcjovL3NlYXJjaD9zPScgKyBnZXRQYXJhbShcImt3XCIpLFxuICAgIGV4dHJhOiB7XG4gICAgICAgIHJ1bGVzOiAkLnRvU3RyaW5nKCgpID0+IHtcbiAgICAgICAgICAgIGxldCBkYXRhID0gW107XG4gICAgICAgICAgICAkLnJlcXVpcmUoXCJhcGlcIikuZW5naW5lcy5mb3JFYWNoKChNYXAsIGkpID0+IHtcbiAgICAgICAgICAgICAgICBkYXRhLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICBcInRpdGxlXCI6IE1hcCxcbiAgICAgICAgICAgICAgICAgICAgXCJzZWFyY2hfdXJsXCI6IGJ1aWxkVXJsKFwiaGlrZXI6Ly9lbXB0eVwiLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICBrdzogXCIqKlwiLFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogXCJmeXBhZ2VcIixcbiAgICAgICAgICAgICAgICAgICAgICAgIGVuZ2luZTogTWFwXG4gICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICA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AgICAgIHZhciBkID0gW11cXG4gICAgICAgICAgICAgICAgICAgIHZhciB1ID0gYnVpbGRVcmwoXFxcImh0dHBzOi8vZnJvZG8uZG91YmFuLmNvbS9hcGkvdjIvYm9vay9cXFwiICsgaWQsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBhcGlrZXk6IFxcXCIwZGFkNTUxZWMwZjg0ZWQwMjkwN2ZmNWM0MmU4ZWM3MFxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICB2YXIgcmVzID0gSlNPTi5wYXJzZShwb3N0KHUsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBib2R5OiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhvc3Q6IFxcXCJmcm9kby5kb3ViYW4uY29tXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiVXNlci1BZ2VudFxcXCI6IFxcXCJSZXh4YXItQ29yZS8wLjEuMyBhcGktY2xpZW50LzEgY29tLmRvdWJhbi5mcm9kby83LjkuMC5iZXRhMigyMTUpIEFuZHJvaWQvMjUgcHJvZHVjdC9UQVMtQUwwMCB2ZW5kb3IvSFVBV0VJIG1vZGVsL1RBUy1BTDAwICByb20vYW5kcm9pZCAgbmV0d29yay93aWZpICBwbGF0Zm9ybS9tb2JpbGUgY29tLmRvdWJhbi5mcm9kby83LjkuMC5iZXRhMigyMTUpIFJleHhhci8xLjIuMTUxICBwbGF0Zm9ybS9tb2JpbGUgMS4yLjE1MVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KSlcXG4gICAgICAgICAgICAgICAgICAgIGQudW5zaGlmdCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHJlcy50aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpbWc6IHJlcy5waWMubm9ybWFsLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogXFxcIng1Oi8vXFxcIiArIHJlcy5pbmZvX3VybCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkZXNjOiByZXMuY2FyZF9zdWJ0aXRsZSArIFxcXCJcXFxcblxcXCIgKyBzdGFyLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibW92aWVfMV92ZXJ0aWNhbF9waWNfYmx1clxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImxpbmVfYmxhbmtcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGludHJvID0gYOS9nOiAhe+8miR7cmVzLmF1dGhvci5qb2luKFxcXCIsXFxcIil9XFxcXG5cXFxcbue/u+ivke+8miR7cmVzLnRyYW5zbGF0b3Iuam9pbihcXFwiLFxcXCIpfVxcXFxuXFxcXG7nroDku4vvvJoke3Jlcy5pbnRyb31cXFxcblxcXFxu5L2c6ICF566A5LuL77yaJHtyZXMuYXV0aG9yX2ludHJvfVxcXFxuXFxcXG7mkZjlvZXvvJoke3Jlcy5jYXRhbG9nfWBcXG4gICAgICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGludHJvLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwibG9uZ190ZXh0XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgIHNldFJlc3VsdChkKVxcbiAgICAgICAgICAgICAgICB9LCBpdGVtLmlkLCBzdGFyKVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICB9LFxcbiAgICBZbGlicmFyeTogZnVuY3Rpb24oa3csIHBhZ2UpIHtcXG4gICAgICAgIHZhciBkID0gW11cXG4gICAgICAgIHZhciByZXMgPSBKU09OLnBhcnNlKHBvc3QoXFxcImh0dHBzOi8vYXBpLnlsaWJyYXJ5Lm9yZy9hcGkvc2VhcmNoL1xcXCIsIHtcXG4gICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgIFxcXCJrZXl3b3JkXFxcIjoga3csXFxuICAgICAgICAgICAgICAgIFxcXCJwYWdlXFxcIjogcGFnZSxcXG4gICAgICAgICAgICAgICAgXFxcInNlbnNpdGl2ZVxcXCI6IGZhbHNlXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pKS5kYXRhXFxuICAgICAgICByZXMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS50aXRsZSxcXG4gICAgICAgICAgICAgICAgY29udGVudDogYOS9nOiAhToke2l0ZW0uYXV0aG9yfSDlh7rniYjnpL46JHtpdGVtLnB1Ymxpc2hlcj9pdGVtLnB1Ymxpc2hlcjpcXFwi5pqC5pegXFxcIn0gSVNCTjoke2l0ZW0uaXNibj9pdGVtLmlzYm46XFxcIuaaguaXoFxcXCJ9IOWHuueJiOaXtumXtDoke2l0ZW0ueWVhcj9pdGVtLnllYXI6XFxcIuaaguaXoFxcXCJ9IOaWh+S7tuagvOW8jzoke2l0ZW0uZXh0ZW5zaW9ufSDmlofku7blpKflsI86JHskLnJlcXVpcmUoXFxcImFwaT9ydWxlPeWbvuS5pummhlByb1xcXCIpLmdldEZpbGVTaXplKGl0ZW0uZmlsZXNpemUpfWAsXFxuICAgICAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChpZCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgcmVzID0gSlNPTi5wYXJzZShwb3N0KFxcXCJodHRwczovL2FwaS55bGlicmFyeS5vcmcvYXBpL2RldGFpbC9cXFwiLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJpZFxcXCI6IGlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInNvdXJjZVxcXCI6IFxcXCJ6bGlicmFyeVxcXCJcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KSlcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgc2VydmVycyA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL2FwaT9ydWxlPeWbvuS5pummhlByb1xcXCIpLnNlcnZlcnNcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXJ2ZXJzLnVuc2hpZnQoXFxcIueZvuW6puS6keebmOi9rOWtmFxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlcy5pbl9saWJnZW4pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VydmVycy51bnNoaWZ0KFxcXCJMaWJnZW4o5o6o6I2QKVxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkKHNlcnZlcnMsIDEsIFxcXCLpgInmi6nnur/ot69cXFwiKS5zZWxlY3QoKHJlcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5wdXQgPT0gXFxcIkxpYmdlbijmjqjojZApXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBkZmgocmVxdWVzdChcXFwiaHR0cDovL2xpYnJhcnkubG9sL21haW4vXFxcIiArIHJlcy5tZDUpLCBcXFwiI2Rvd25sb2FkJiZhJiZocmVmXFxcIilcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpbnB1dCA9PSBcXFwi55m+5bqm5LqR55uY6L2s5a2YXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQucmVxdWlyZShcXFwiYXBpP3J1bGU95Zu+5Lmm6aaGUHJvXFxcIikuYmFpZHUocmVzKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGlucHV0ID09IFxcXCJpcGZz5LiL6L29XFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGBodHRwczovL2lwZnMtY2hlY2tlci4xa2J0b29sLmNvbS8ke3Jlcy5pcGZzX2NpZH1gXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaW5wdXQgKyByZXMuaXBmc19jaWRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIHJlcylcXG4gICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2coZS5tZXNzYWdlKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/op6PmnpDlpLHotKVcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sIGl0ZW0uaWQpXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pXFxuICAgICAgICBzZXRSZXN1bHQoZCk7XFxuICAgIH0sXFxuICAgIFpsaWJyYXJ5OiBmdW5jdGlvbihrdywgcGFnZSkge1xcbiAgICAgICAgdmFyIGQgPSBbXTtcXG4gICAgICAgIHZhciByZXMgPSBKU09OLnBhcnNlKHBvc3QoXFxcImh0dHBzOi8vd29ya2VyL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KSB7XFxuICAgICAgICB2YXIgZCA9IFtdXFxuICAgICAgICB2YXIgaWQgPSBKU09OLnBhcnNlKHBvc3QoXFxcImh0dHBzOi8vd3d3NS5qaXVtb2RpYXJ5LmNvbS9pbml0X2h1YnMucGhwXFxcIiwge1xcbiAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgcToga3csXFxuICAgICAgICAgICAgICAgIHJlbW90ZV9pcDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgIHRpbWVfaW50OiBEYXRlLnBhcnNlKG5ldyBEYXRlKCkpICsgXFxcIlxcXCJcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KSkuaWRcXG4gICAgICAgIHZhciByZXMgPSBKU09OLnBhcnNlKHBvc3QoXFxcImh0dHBzOi8vd3d3NS5qaXVtb2RpYXJ5LmNvbS9hamF4X2ZldGNoX2h1YnMucGhwXFxcIiwge1xcbiAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IGlkLFxcbiAgICAgICAgICAgICAgICBzZXQ6IDBcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KSkuc291cmNlc1xcbiAgICAgICAgcmVzLmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgaXRlbS5kZXRhaWxzLmRhdGEuZm9yRWFjaChpdGVtMiA9PiB7XFxuICAgICAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogaXRlbTIudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICBjb250ZW50OiBpdGVtMi5kZXMgKyBcXFwiXFxcXG5cXFwiICsgaXRlbTIudl9kZXMsXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IFxcXCJodHRwOlxcXCIgKyBpdGVtMi5pbWdfbGluayxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBpdGVtMi5pbWdfbGluayA/IFxcXCJtb3ZpZV8xX3ZlcnRpY2FsX3BpY1xcXCIgOiBcXFwidGV4dF8xXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHVybDogaXRlbTIubGlua1xcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9KVxcbiAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICB9LFxcbiAgICBjaGVja0xpYmdlbjogZnVuY3Rpb24oKSB7XFxuICAgICAgICB2YXIgZG9tYWlucyA9IFtcXFwiaHR0cDovL2xpYmdlbi5yc1xcXCIsIFxcXCJodHRwOi8vbGliZ2VuLmlzXFxcIiwgXFxcImh0dHA6Ly9saWJnZW4uc3RcXFwiXVxcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBmb3IgKGl0ZW0gb2YgZG9tYWlucykge1xcbiAgICAgICAgICAgICAgICB2YXIgY29kZSA9IEpTT04ucGFyc2UocmVxdWVzdChpdGVtLCB7XFxuICAgICAgICAgICAgICAgICAgICB3aXRoU3RhdHVzQ29kZTogdHJ1ZVxcbiAgICAgICAgICAgICAgICB9KSkuc3RhdHVzQ29kZVxcbiAgICAgICAgICAgICAgICBpZiAoY29kZSA9PSAyMDApIHtcXG4gICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oXFxcImxpYmdlblxcXCIsIGl0ZW0pXFxuICAgICAgICAgICAgICAgICAgICB0b2FzdChcXFwi5qOA5rWL5Yiw5Y+v55So6ZWc5YOP77yM6K+35Yi35paw5ZCO6YeN5paw5pCc57SiXFxcIilcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKClcXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdG9hc3QoXFxcIuaJgOaciemVnOWDj+mDveaXoOazleS9v+eUqO+8jOivt+aJk+W8gFRa5L2/55SoXFxcIilcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICBsb2coZS5tZXNzYWdlKVxcbiAgICAgICAgfVxcbiAgICB9LFxcbiAgICBMaWJnZW46IGZ1bmN0aW9uKGt3LCBwYWdlKSB7XFxuICAgICAgICB2YXIgZCA9IFtdXFxuICAgICAgICBpZiAoZ2V0SXRlbShcXFwibGliZ2VuXFxcIiwgXFxcIlxcXCIpID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgdG9hc3QoXFxcIuaXoOWPr+eUqOmVnOWDj++8jOato+WcqOajgOa1i+S4rS4uLlxcXCIpXFxuICAgICAgICAgICAgJC5yZXF1aXJlKFxcXCJhcGk/cnVsZT3lm77kuabppoZQcm9cXFwiKS5jaGVja0xpYmdlbigpXFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIHZhciB1cmwgPSBnZXRJdGVtKFxcXCJsaWJnZW5cXFwiKSArIFxcXCIvc2VhcmNoLnBocD9yZXE9XFxcIiArIGt3ICsgXFxcIiZwYWdlPVxcXCIgKyBwYWdlXFxuICAgICAgICAgICAgdmFyIHIgPSBKU09OLnBhcnNlKHJlcXVlc3QodXJsLCB7XFxuICAgICAgICAgICAgICAgIHdpdGhIZWFkZXJzOiB0cnVlXFxuICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgaWYgKHIuc3RhdHVzQ29kZSA9PSAyMDApIHtcXG4gICAgICAgICAgICAgICAgdmFyIHJlcyA9IHIuYm9keVxcbiAgICAgICAgICAgICAgICB2YXIgbGlzdCA9IHBkZmEocmVzLCBcXFwiYm9keSYmdHJcXFwiKS5maWx0ZXIoaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoaXRlbS5pbmNsdWRlcyhcXFwibm93cmFwXFxcIikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXRlbVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICBsaXN0LmZvckVhY2goaXRlbSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgbGkgPSBpdGVtLm1hdGNoKG5ldyBSZWdFeHAoXFxcIjx0ZCguKj8pPC90ZD5cXFwiLCBcXFwiZ1xcXCIpKVxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGRlc2MgPSBwZGZoKGxpWzFdLCBcXFwiYSYmVGV4dFxcXCIpXFxuICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMzsgaSA8IGxpLmxlbmd0aCAtIDM7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc2MgKz0gXFxcIu+8m1xcXCIgKyBwZGZoKGxpW2ldLCBcXFwiVGV4dFxcXCIpXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGxpWzJdLCBcXFwiVGV4dFxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnQ6IGRlc2MsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGxpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwZGZoKHJlcXVlc3QocGRmaChsaVs5XSwgXFxcImEmJmhyZWZcXFwiKSksIFxcXCIjZG93bmxvYWQmJmEmJmhyZWZcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sIGxpKVxcbiAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB0b2FzdChcXFwi6ZWc5YOP5aSx5pWI77yM6YeN5paw5qOA5rWL5LitLi4uXFxcIilcXG4gICAgICAgICAgICAgICAgJC5yZXF1aXJlKFxcXCJhcGk/cnVsZT3lm77kuabppoZQcm9cXFwiKS5jaGVja0xpYmdlbigpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgc2V0UmVzdWx0KGQpO1xcbiAgICB9LFxcbiAgICDnvZHnm5g6IGZ1bmN0aW9uKGt3LCBwYWdlKSB7XFxuICAgICAgICB2YXIgZCA9IFtdXFxuICAgICAgICB2YXIgcmVzID0gSlNPTi5wYXJzZShwb3N0KFxcXCJodHRwczovL2FwaS5ib29rcGFuLm5ldC9hcGkvc2VhcmNoL1xcXCIsIHtcXG4gICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgIFxcXCJrZXl3b3JkXFxcIjoga3csXFxuICAgICAgICAgICAgICAgIFxcXCJwYWdlXFxcIjogcGFnZSxcXG4gICAgICAgICAgICAgICAgXFxcInNlbnNpdGl2ZVxcXCI6IGZhbHNlXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH0pKS5kYXRhXFxuICAgICAgICByZXMuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogaXRlbS5pbmZvLFxcbiAgICAgICAgICAgICAgICBjb250ZW50OiBpdGVtLnNvdXJjZSxcXG4gICAgICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKGlkLCBzb3VyY2UpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHJlcyA9IEpTT04ucGFyc2UocG9zdChcXFwiaHR0cHM6Ly9hcGkuYm9va3Bhbi5uZXQvYXBpL2RldGFpbC9cXFwiLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJpZFxcXCI6IGlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInNvdXJjZVxcXCI6IHNvdXJjZVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXMuZG93bmxvYWRfbGluaykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgZGljdCA9IHt9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcy5kb3dubG9hZF9saW5rLnVuc2hpZnQoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZTogXFxcIuWOn+e9kemhtVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHJlcy51cmxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICQocmVzLmRvd25sb2FkX2xpbmsubWFwKGZ1bmN0aW9uKGl0ZW0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBpdGVtLm5hbWVcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSksIDEsIFxcXCLor7fpgInmi6nkuIvovb3nur/ot69cXFwiKS5zZWxlY3QoKGxpbmtzKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbGlua3NbbGlua3MubWFwKGZ1bmN0aW9uKGl0ZW0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXRlbS5uYW1lXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KS5pbmRleE9mKGlucHV0KV0udXJsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0sIHJlcy5kb3dubG9hZF9saW5rKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXMudXJsXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSBjYXRja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2tlblxcbiAgICAgICAgICAgICAgICByZXR1cm4gJChcXFwiL+eUteWtkOS5pi9cXFwiICsgcmVzLnRpdGxlICsgXFxcIi5cXFwiICsgcmVzLmV4dGVuc2lvbiwgXFxcIuivt+i+k+WFpeS/neWtmOi3r+W+hFxcXCIpLmlucHV0KChiZHN0b2tlbiwgcmVzKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgcmVzID0gSlNPTi5wYXJzZShwb3N0KFxcXCJodHRwczovL3Bhbi5iYWlkdS5jb20vcmVzdC8yLjAveHBhbi9maWxlP21ldGhvZD1jcmVhdGUmYmRzdG9rZW49XFxcIiArIGJkc3Rva2VuLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBDb29raWU6IHJlcXVlc3QoXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvSm9lL2JhaWR1LnR4dFxcXCIpXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBib2R5OiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemU6IHJlcy5maWxlc2l6ZSArIFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXRoOiBpbnB1dCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmxvY2tfbGlzdDogW3Jlcy5tZDVdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBydHlwZTogMFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pKVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHJlcy5lcnJubyA9PSAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+i9rOWtmOaIkOWKn1xcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzLmVycm5vID09IC04KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+i9rOWtmOWksei0pe+8jOW3sue7j+S/neWtmOi/h+i/meS4quaWh+S7tuS6hlxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmVzLmVycm5vID09IDIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6L2s5a2Y5aSx6LSl77yM6ZSZ6K+v55qE6Lev5b6EXFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsb2cocmVzLmVycm5vKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/ovazlrZjlpLHotKVcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sIGJkc3Rva2VuLCByZXMpXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIGxvZyhlLm1lc3NhZ2UpXFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+i9rOWtmOWksei0pVxcXCJcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgY29tcHV0ZVJhdGluZzogZnVuY3Rpb24oZSwgdCkge1xcbiAgICAgICAgbGV0IGkgPSBcXFwiXFxcIjtcXG4gICAgICAgIGZvciAobGV0IHIgPSAwOyByIDwgNTsgcisrKSByIDwgTWF0aC5yb3VuZCh0IC8gKGUgLyA1KSkgPyBpICs9IFxcXCLimIVcXFwiIDogaSArPSBcXFwi4piGXFxcIjtcXG4gICAgICAgIHJldHVybiBpO1xcbiAgICB9LFxcbiAgICBzZXJ2ZXJzOiBbXFxcImlwZnPkuIvovb1cXFwiLCBcXFwiaHR0cHM6Ly9kd2ViLmxpbmsvaXBmcy9cXFwiLCBcXFwiaHR0cHM6Ly9pcGZzLmpwdS5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S9cXFwiLFxcbiAgICBjb2xfdHlwZTogXFxcIng1X3dlYnZpZXdfc2luZ2xlXFxcIixcXG4gICAgZGVzYzogXFxcIjEwMCUmJmZsb2F0XFxcIixcXG4gICAgZXh0cmE6IHtcXG4gICAgICAgIGpzOiAkLnRvU3RyaW5nKCgpID0+IHtcXG4gICAgICAgICAgICB2YXIgdXJsID0gbG9jYXRpb24uaHJlZlxcbiAgICAgICAgICAgIGlmICh1cmwuaW5jbHVkZXMoXFxcImh0dHBzOi8vcGFuLmJhaWR1LmNvbS93YXBcXFwiKSkge1xcbiAgICAgICAgICAgICAgICBmYmEud3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL3J1bGVzL0pvZS9iYWlkdS50eHRcXFwiLCBmYmEuZ2V0Q29va2llKFxcXCJcXFwiKSlcXG4gICAgICAgICAgICAgICAgYWxlcnQoXFxcIuW3suiOt+WPluWIsGNvb2tpZe+8jOi/lOWbnuWNs+WPr1xcXCIpXFxuICAgICAgICAgICAgICAgIGZiYS5iYWNrKClcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KSxcXG4gICAgICAgIHVhOiBNT0JJTEVfVUEsXFxuICAgICAgICBjYW5CYWNrOiB0cnVlXFxuICAgIH1cXG59XSlcIn1dIiwiaWNvbiI6Imh0dHBzOi8vbGFubWVpZ3VvamlhbmcuY29tL3R1Ymlhby9rZS8zOC5wbmciLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment