Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@JustLive@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiSnVzdExpdmUiLCJhdXRob3IiOiJKb2UmJumaj+mjjiYm5Y+R57Kq5raC5aKZJiZSeCYmWnJ1aXJ5IiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjZnlwYWdlIiwidmVyc2lvbiI6MjAyMzEwMjYsImNvbF90eXBlIjoibW92aWVfMyIsImNsYXNzX25hbWUiOiIiLCJ0eXBlIjoidmlkZW8iLCJjbGFzc191cmwiOiIiLCJhcmVhX25hbWUiOiIiLCJhcmVhX3VybCI6IiIsInNvcnRfbmFtZSI6IiIsInllYXJfbmFtZSI6IiIsInNvcnRfdXJsIjoiIiwieWVhcl91cmwiOiIiLCJmaW5kX3J1bGUiOiJqczpcbmxldCBzID0gW107XG5sZXQgZCA9IFtdO1xubGV0IGFwaSA9ICQucmVxdWlyZShcInB1YmxpY1wiKS5BcGk7XG5sZXQgaGVhZGVycyA9ICQucmVxdWlyZShcInB1YmxpY1wiKS5oZWFkZXJzO1xubGV0IHVpZCA9IGdldEl0ZW0oXCJ1aWRcIiwgXCJcIik7XG5sZXQgY2xhcyA9IGdldE15VmFyKFwiY2xhc3NcIiwgXCJhbGxcIik7XG5cbmlmIChnZXRNeVZhcihcIlZlcnNcIiwgXCIwXCIpID09IFwiMFwiKSB7XG4gICAgbGV0IHZlcnMgPSBKU09OLnBhcnNlKGZldGNoKGFwaSArIFwidmVyc2lvblVwZGF0ZVwiLCBoZWFkZXJzKSkuZGF0YS5sYXRlc3RWZXJzaW9uO1xuICAgIHB1dE15VmFyKFwiVmVyc1wiLCB2ZXJzKTtcbn07XG5sZXQgcHV0dmVyID0gZ2V0TXlWYXIoXCJWZXJzXCIsIFwiMFwiKTtcbmxldCBzZXR2ZXIgPSBnZXRJdGVtKFwiVmVyc1wiLCBcIjAuMy40X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blwiLFxuICAgICAgICAgICAgcGFnZVRpdGxlOiBcIuaIkeeahOWFs+azqFwiXG4gICAgICAgIH1cbiAgICB9KTtcbiAgICBzLnB1c2goe1xuICAgICAgICB0aXRsZTogXCLmkJzntKJcIixcbiAgICAgICAgZGVzYzogdWlkID09IFwiXCIgPyBcIuaQnCDntKIg6ZyAIOWFiCDnmbsg5b2VXCIgOiBcIuWPryDku6Ug5bCRIOWtlyDvvIzkuI0g5Y+vIOmUmSDlrZcg77yBXCIsXG4gICAgICAgIHVybDogJC50b1N0cmluZygoKSA9PiB7XG4gICAgICAgICAgICBwdXRNeVZhcihcIk15a2V5XCIsIGlucHV0KTtcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXG4gICAgICAgIH0pLFxuICAgICAgICBjb2xfdHlwZTogXCJpbnB1dFwiLFxuICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgZGVmYXVsdFZhbHVlOiBnZXRNeVZhcihcIk15a2V5XCIpXG4gICAgICAgIH1cbiAgICB9LCB7XG4gICAgICAgIGNvbF90eXBlOiBcImJpZ19ibGFua19ibG9ja1wiXG4gICAgfSwge1xuICAgICAgICBjb2xfdHlwZTogXCJiaWdfYmxhbmtfYmxvY2tcIlxuICAgIH0sIHtcbiAgICAgICAgY29sX3R5cGU6IFwibGluZV9ibGFua1wiXG4gICAgfSk7XG5cbiAgICAvL+eDremXqOebtOaSrVxuICAgIHMucHVzaCh7XG4gICAgICAgIHRpdGxlOiAnPGZvbnQgY29sb3I9XCIjMGFhMzQ0XCI+54Ot6Zeo55u05pKtPC9mb250PicsXG4gICAgICAgIGRlc2M6ICc8Zm9udCBjb2xvcj1cIiMwYWEzNDRcIj7inq5cXHRcXHQ8L2ZvbnQ+JyxcbiAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCgpID0+IHtcbiAgICAgICAgICAgIHB1dE15VmFyKFwidHlwZU5hbWVWYXJcIiwgJ+WFqOmDqCcpO1xuICAg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xcIiwgXCLlk5Tlk6lcIiwgXCLmipbpn7NcIiwgXCLnvZHmmJNcIl07XG4gICAgbGV0IGx1cmwgPSBbXCJhbGxcIiwgXCJodXlhXCIsIFwiZG91eXVcIiwgXCJiaWxpYmlsaVwiLCBcImRvdXlpblwiLCBcImNjXCJdO1xuICAgIGZvciAobGV0IGkgaW4gbGVpKSB7XG4gICAgICAgIHMucHVzaCh7XG4gICAgICAgICAgICB0aXRsZTogbHVybFtpXSA9PSBjbGFzID8gXCLigJjigJjigJnigJk8Yj5cIiArIGxlaVtpXS5mb250Y29sb3IoXCIjRkE3Mjk4XCIpICsgXCI8L2I+XCIgOiBsZWlbaV0sXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHVybCkgPT4ge1xuICAgICAgICAgICAgICAgIHB1dE15VmFyKFwiY2xhc3NcIiwgdXJsKTtcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFwiaGlrZXI6Ly9lbXB0eVwiO1xuICAgICAgICAgICAgfSwgbHVybFtpXSksXG4gICAgICAgICAgICBjb2xfdHlwZTogXCJzY3JvbGxfYnV0dG9uXCJcbiAgICAgICAgfSlcbiAgICB9O1xuICAgIHMucHVzaCh7XG4gICAgICAgIGNvbF90eXBlOiBcImJpZ19ibGFua19ibG9ja1wiXG4gICAgfSwge1xuICAgICAgICBjb2xfdHlwZTogXCJiaWdfYmxhbmtfYmxvY2tcIlxuICAgIH0pO1xuXG4gICAgcy5wdXNoKHtcbiAgICAgICAgaW1nOiBcIlwiLFxuICAgICAgICB1cmw6IFwiaGlrZXI6Ly9lbXB0eVwiLFxuICAgICAgICBjb2xfdHlwZTogXCJjYXJkX3BpY18zXCIsXG4gICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICBjbHM6IFwiY2xzX2xvYWRcIlxuICAgICAgICB9XG4gICAgfSwge1xuICAgICAgICBpbWc6IFwiaHR0cHM6Ly9oaWtlcmZhbnMuY29tL3dlaXN5ci9pbWcvTG9hZGluZzEuZ2lmXCIsXG4gICAgICAgIHVybDogXCJoaWtlcjovL2VtcHR5XCIsXG4gICAgICAgIGNvbF90eXBlOiBcInBpY18zXCIsXG4gICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICBjbHM6IFwiY2xzX2xvYWRcIlxuICAgICAgICB9XG4gICAgfSk7XG4gICAgc2V0UHJlUmVzdWx0KHMpO1xufTtcblxuLy/mkJzntKLliJfooahcbmlmIChnZXRNeVZhcihcIk15a2V5XCIpKSB7XG4gICAgaWYgKE1ZX1BBR0UgPT0gJzEnKSB7XG4gICAgICAgIGlmICh1aWQgPT0gXCJcIikge1xuICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICB0aXRsZTogXCLnmbvlvZXlkI7nu6fnu63mkJzntKJcIixcbiAgICAgICAgICAgICAgICBkZXNjOiBcIueCueWHu+eZu+W9lVwiLFxuICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKFwic1R5cGVcIiwgJ2xpdmluZycpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vcGFnZS9oaXN0b3J5I25vSGlzdG9yeSMjbm9SZWNvcmRIaXN0b3J5Iyc7XG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFwidGV4dF9jZW50ZXJfMVwiXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgbGV0IHNzX3VybCA9IGFwaSArIFwic2VhcmNoP3BsYXRmb3JtPVwiICsgY2xhcyArIFwiJmtleVdvcmRzPVwiICsgZ2V0TXlWYXIoXCJNeWtleVwiKSArIFwiJnVpZD1cIiArIHVpZDtcbiAgICAgICAgICAgICAgICBsZXQganNvbiA9IEpTT04ucGFyc2UoZmV0Y2goc3NfdXJsLCBoZWFkZXJzKSkuZGF0YTtcbiAgICAgICAgICAgICAgICBsZXQgcGxhY2UgPSBcInNvXCI7XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSBpbiBqc29uKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0ganNvbltpXTtcbiAgICAgICAgICAgICAgICAgICAgJC5yZXF1aXJlKFwicHVibGljXCIpLkxpc3RzKGFwaSwgdWlkLCBwbGFjZSwgZCwgZGF0YS5yb29tSWQsIGRhdGEucGxhdGZvcm0sIGRhdGEubmlja05hbWUsIGRhdGEuY2F0ZU5hbWUsIGRhdGEuZm9sbG93ZXJzLCBkYXRhLmhlYWRQaWMsIGRhdGEuaXNMaXZlKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcIuKAnOKAnOWIsOW6leS6huWRouKAneKAnVwiLFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiAn54K55Ye76L+U5Zue6aaW6aG1JyxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKCgpID0+IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKFwiTXlrZXlcIilcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcbiAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcInRleHRfY2VudGVyXzFcIlxuICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFw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UmVzdWx0KGQpOyIsInNlYXJjaF91cmwiOiJoaWtlcjovL2VtcHR5P2t3PSoqIiwiZ3JvdXAiOiIx5b2x5pCcIiwic2VhcmNoRmluZCI6ImpzOlxuaWYgKGdldEl0ZW0oXCJ1aWRcIiwgXCJcIikgPT0gXCJcIikge1xuICAgIHZhciBkID0gW107XG4gICAgZC5wdXNoKHtcbiAgICAgICAgdGl0bGU6IFwi6K+35YWI55m76ZmGXCIsXG4gICAgICAgIHVybDogXCJoaWtlcjovL3BhZ2UvaGlzdG9yeVwiXG4gICAgfSk7XG59IGVsc2Uge1xuICAgIHB1dE15VmFyKFwiUl91bGVcIiwgTVlfUlVMRS50aXRsZSk7XG4gICAgc2V0UmVzdWx0KFt7XG4gICAgICAgIHVybDogJ2hpa2VyOi8vc2VhcmNoP3M9JyArIGdldFBhcmFtKFwia3dcIiksXG4gICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICBydWxlczogJC50b1N0cmluZygoKSA9PiB7XG4gICAgICAgICAgICAgICAgbGV0IGRhdGEgPSBbXTsgJC5yZXF1aXJlKFwic2VhcmNoXCIpLmVuZ2luZXMuZm9yRWFjaCgoTWFwLCBpKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGRhdGEucHVzaCh7XG4gICAgICAgICAgICAgICAgICAgICAgICBcInRpdGxlXCI6IE1hcCxcbiAgICAgICAgICAgICAgICAgICAgICAgIFwic2VhcmNoX3VybFwiOiBidWlsZFVybChcImhpa2VyOi8vZW1wdHlcIiwge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGt3OiBcIioqXCIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogXCJmeXBhZ2VcIixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmdpbmU6IE1hcFxuICAgICAgICAgICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgICAgICAgICBcInNlYXJjaEZpbmRcIjogXCJqczokLnJlcXVpcmUoJ2hpa2VyOi8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MV0uanM7XFxuICAgICAgICAgICAgdXBkYXRlSXRlbShcXFwiaWRfXFxcIiArIHBsYXRmb3JtICsgcm9vbWlkLCB7XFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBjbHM6IGNscyxcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBcXFwiaWRfXFxcIiArIHBsYXRmb3JtICsgcm9vbWlkLFxcbiAgICAgICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlLFxcbiAgICAgICAgICAgICAgICAgICAgbG9uZ0NsaWNrOiBbe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXQgPT0gXFxcIjFcXFwiID8gXFxcIuW3suWFs+azqFxcXCIgOiBcXFwi5pyq5YWz5rOoXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBqczogJC5yZXF1aXJlKFxcXCJwdWJsaWNcXFwiKS5Mb25nQ2xpY2soYXBpLCB1aWQsIHJvb21pZCwgcGxhdGZvcm0pLFxcbiAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi5a6Y572R6ZO+5o6lXFxcIixcXG4gICAgICAgICAgICAgICAgICAgICAgICBqczoganMyXFxuICAgICAgICAgICAgICAgICAgICB9XVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgaWYgKGdldE15VmFyKFxcXCJzVHlwZVxcXCIsIFxcXCJcXFwiKSAhPT0gXFxcIlxcXCIgJiYgdGl0ID09IDApIHtcXG4gICAgICAgICAgICAgICAgZGVsZXRlSXRlbShcXFwiaWRfXFxcIiArIHBsYXRmb3JtICsgcm9vbWlkKTtcXG4gICAgICAgICAgICB9O1xcbiAgICAgICAgfTtcXG4gICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly9cXFwiICsgcmUuZGF0YTtcXG4gICAgfSwgYXBpLCB1aWQsIGhlYW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XCIgKyByb29taWQsIGhlYWRlcnMpKS5kYXRhIHx8IFtdO1xcbiAgICBpZiAoT2JqZWN0LmtleXMoanNvbikubGVuZ3RoICE9PSAwKSB7XFxuICAgICAgICBmb3IgKGxldCB4bCBpbiBqc29uKSB7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHhsLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMlxcXCIsXFxuICAgICAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgobGlzdCwgbWlkKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgbmFtZSA9IFtdO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHVybHMgPSBbXVxcbiAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSBpbiBsaXN0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpID0gbGlzdFtpXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBuYW1lLnB1c2gobGkucXVhbGl0eU5hbWUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJscy5wdXNoKGxpLnBsYXlVcmwpXFxuICAgICAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEpTT04uc3RyaW5naWZ5KHVybHMpICE9PSAnW1xcXCJcXFwiXScgPyBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZXM6IG5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsczogdXJscyxcXG4gICAgICAgICAgICAgICAgICAgICAgICBkYW5tdTogL2RvdXl15pqC5pegLy50ZXN0KHVybHMpID8gXFxcIndlYjovL2h0dHA6Ly9kb3V5dV9kYW5tdS5kZXYudHlyYW50Zy5jb20vP3JpZD1cXFwiICsgbWlkICsgXFxcIiZ2ZXI9MVxcXCIgOiBcXFwiXFxcIlxcbi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wiO1xcbiAgICB9LCBhcGksIG9uLCBvZmYpLFxcbiAgICBleHRyYToge1xcbiAgICAgICAgaWQ6IFxcXCJpZF9tdWx0aWxpbmVcXFwiXFxuICAgIH1cXG59KVxcbmlmICh1aWQgPT0gXFxcIlxcXCIpIHtcXG4gICAgaWYgKHpjID09IFxcXCLnmbsg5b2VXFxcIikge1xcbiAgICAgICAgcy5wdXNoKHtcXG4gICAgICAgICAgICBkZXNjOiBcXFwi5pi156ewIO+8iDEtMjDkvY3vvIlcXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcXFwic2V0SXRlbSgnbmljaycsIGlucHV0KVxcXCIsXFxuICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2VcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaW5wdXRcXFwiXFxuICAgICAgICB9KVxcbiAgICB9O1xcbiAgICBzLnB1c2goe1xcbiAgICAgICAgZGVzYzogXFxcIui0puWPtyDvvIg2LTIw5L2N5pWw5a2X5oiW6Iux5paH77yJXFxcIixcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgb25DaGFuZ2U6IFxcXCJzZXRJdGVtKCdhY2NvdW50JywgaW5wdXQpXFxcIixcXG4gICAgICAgICAgICB0aXRsZVZpc2libGU6IGZhbHNlXFxuICAgICAgICB9LFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJpbnB1dFxcXCJcXG4gICAgfSwge1xcbiAgICAgICAgZGVzYzogXFxcIuWvhueggSDvvIg2LTIw5L2N5pWw5a2X5oiW6Iux5paH77yJXFxcIixcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgb25DaGFuZ2U6IFxcXCJzZXRJdGVtKCdwYXNzd29yZCcsIGlucHV0KVxcXCIsXFxuICAgICAgICAgICAgdGl0bGVWaXNpYmxlOiBmYWxzZVxcbiAgICAgICAgf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b3JkPVxcXCIgKyBtZDUocGFzc3dvcmQpLCAkLnJlcXVpcmUoXFxcInB1YmxpY1xcXCIpLmhlYWRlcnMpKTtcXG4gICAgICAgICAgICAgICAgLy9sb2coY29va2llcylcXG4gICAgICAgICAgICAgICAgaWYgKGNvb2tpZXMuY29kZSA9PSAyMDApIHtcXG4gICAgICAgICAgICAgICAgICAgIHNldEl0ZW0oXFxcInVpZFxcXCIsIGNvb2tpZXMuZGF0YS51aWQpO1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbShcXFwibmlja25hbWVcXFwiLCBjb29raWVzLmRhdGEubmlja05hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgc2V0SXRlbShcXFwidXNlcm5hbWVcXFwiLCBjb29raWVzLmRhdGEudXNlck5hbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgYmFjaygpO1xcbiAgICAgICAgICAgICAgICAgICAgY2xlYXJJdGVtKFxcXCJuaWNrXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKFxcXCJ6dWNlXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gemMgPT0gXFxcIueZuyDlvZVcXFwiID8gXFxcInRvYXN0Oi8v5rOo5YaM5oiQ5Yqf77yM5bey55m75b2VXFxcIiA6IFxcXCJ0b2FzdDovL+eZu+W9leaIkOWKn1xcXCI7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoemMgPT0gXFxcIueZuyDlvZVcXFwiKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL1xcXCIgKyBjb29raWVzLm1lc3NhZ2U7XFxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySXRlbShcXFwibmlja25hbWVcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGVhckl0ZW0oXFxcInVzZX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6Ly9lbXB0eVxcXCIsXFxuICAgIGNvbF90eXBlOiBcXFwicGljXzFfY2VudGVyXFxcIixcXG4gICAgZXh0cmE6IHtcXG4gICAgICAgIGNsczogXFxcImNsc19sb2FkXFxcIlxcbiAgICB9XFxufSk7XFxuc2V0UHJlUmVzdWx0KHMpO1xcbmlmICh1aWQgPT0gXFxcIlxcXCIpIHtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIGNvbF90eXBlOiAncmljaF90ZXh0J1xcbiAgICB9LCB7XFxuICAgICAgICBkZXNjOiBcXFwi55m7IOW9lSDlkI4g5p+lIOeciyDlhbMg5rOoXFxcIixcXG4gICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgY29sX3R5cGU6IFxcXCJ0ZXh0X2NlbnRlcl8xXFxcIixcXG4gICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxuICAgICAgICB9XFxuICAgIH0pO1xcbn0gZWxzZSB7XFxuICAgIGxldCByZXMgPSBKU09OLnBhcnNlKHJlcXVlc3QoYXBpICsgXFxcImdldFJvb21zT24/dWlkPVxcXCIgKyB1aWQsIGhlYWRlcnMpKS5kYXRhO1xcbiAgICBpZiAocmVzLmxlbmd0aCA9PSAwKSB7XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiAncmljaF90ZXh0J1xcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIGRlc2M6IFxcXCLmt7sg5YqgIOWFsyDms6gg5ZCOIOafpSDnnItcXFwiLFxcbiAgICAgICAgICAgIHVybDogXFxcImhpa2VyOi8vZW1wdHlcXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwidGV4dF9jZW50ZXJfMVxcXCIsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXFxuICAgICAgICAgICAgfVxcbiA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YXIoXFxcInR5cGVOYW1lVmFyXFxcIiwgIWdldE15VmFyKCd0eXBlTmFtZVZhcicpID8gJ+WFqOmDqCcgOiBnZXRNeVZhcigndHlwZU5hbWVWYXInKSk7XFxuICAgIHB1dE15VmFyKCdhcmVhJywgJ2FyZWFOYW1lJylcXG5cXG4gICAgZm9yIChsZXQgaSBpbiByZXMpIHtcXG4gICAgICAgIGxldCByID0gcmVzW2ldO1xcbiAgICAgICAgZm9yIChsZXQgeCBvZiByKSB7XFxuICAgICAgICAgICAgaWYgKCF0eXBlTmFtZXMuaW5jbHVkZXMoeC50eXBlTmFtZSkpIHtcXG4gICAgICAgICAgICAgICAgdHlwZU5hbWVzLnB1c2goeC50eXBlTmFtZSk7XFxuICAgICAgICAgICAgICAgIGJpZ0xpc3QucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogZ2V0TXlWYXIoJ3R5cGVOYW1lVmFyJykgPT0geC50eXBlTmFtZSA/IFxcXCLigJjigJjigJnigJk8Yj5cXFwiICsgeC50eXBlTmFtZS5mb250Y29sb3IoXFxcIiNGQTcyOThcXFwiKSArIFxcXCI8L2I+XFxcIiA6IHgudHlwZU5hbWUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHR5cGVOYW1lVmFyLCByLCBzLCB0eXBlTmFtZXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwidHlwZU5hbWVWYXJcXFwiLCB0eXBlTmFtZVZhcik7XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbShcXFwiaWRfanVzdGJqXFxcIiwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogXFxcIjxiPlxcXFx0XFxcIiArIHR5cGVOYW1lVmFyLmZvbnRjb2xvcihcXFwiI0ZBNzI5OFxcXCIpICsgXFxcIjwvYj5cXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbShcXFwiaWRfanVzdHFiXFxcIiwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogZ2V0TXlWYXIoXFxcInR5cGVOYW1lVmFyXFxcIiwgXFxcIuWFqOmDqFxcXCIpID09IFxcXCLlhajpg6hcXFwiID8gXFxcIuKAmOKAmOKAmeKAmTxiPlxcXCIgKyBcXFwi5YWo6YOoXFxcIi5mb250Y29sb3IoXFxcIiNGQTcyOThcXFwiKSArIFxcXCI8L2I+XFxcIiA6IFxcXCLlhajpg6hcXFwiXFxuICAgICAgICAgICAgICAgICAgICAgICAgfSk7XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGxpID0gc3RvcmFnZTAuZ2V0TXlWYXIoXFxcIk5hbWVzXFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaiBpbiBsaSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbGlzID0gbGlbal07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oXFxcImlkX2p1c3RcXFwiICsgaiwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldE15VmFyKFxcXCJ0eXBlTmFtZVZhclxcXCIsIFxcXCLlhajpg6hcXFwiKSA9PSBsaXMgPyBcXFwi4oCY4oCY4oCZ4oCZPGI+XFxcIiArIGxpcy5mb250Y29sb3IoXFxcIiNGQTcyOThcXFwiKSArIFxcXCI8L2I+XFxcIiA6IGxpc1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZUl0ZW1CeUNscyhcXFwiY2xzX2p1c3R4bFxcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHNtYWxMaXN0ID0gci5tYXAoKGxpKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogbGkuYXJlYU5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbWc6IGxpLmFyZWFQaWMsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cmw6IFxcXCJoaWtlcjovL3BhZ2UvbmV3Q2xhc3NMaXN0P3R5cGVOYW1lPVxcXCIgKyBsaS50eXBlTmFtZSArIFxcXCImYXJlYU5hbWU9XFxcIiArIGxpLmFyZWFOYW1lICsgXFxcIiZwYWdlPWZ5cGFnZVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcImljb25fNVxcXCIsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlTmFtZTogbGkudHlwZU5hbWUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsczogXFxcImNsc19qdXN0eGxcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluaGVyaXRUaXRsZTogZmFsc2VcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZEl0ZW1BZnRlcihcXFwiaWRfanVzdHhselxcXCIsIHNtYWxMaXN0KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9LCB4LnR5cGVOYW1lLCByLCByZXMsIHR5cGVOYW1lcyksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogXFxcInNjcm9sbF9idXR0b25cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZDogXFxcImlkX2p1c3RcXFwiICsgaVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH07XFxuXFxuICAgICAgICAgICAgc21hbGxMaXN0LnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogeC5hcmVhTmFtZSxcXG4gICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL25ld0NsYXNzTGlzdD90eXBlTmFtZT0nICsgeC50eXBlTmFtZSArICcmYXJlYU5hbWU9JyArIHguYXJlYU5hbWUgKyBcXFwiJnBhZ2U9ZnlwYWdlXFxcIixcXG4gICAgICAgICAgICAgICAgaW1nOiB4LmFyZWFQaWMgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpY29uXzVcXFwiLFxcbiAgICAgICAgICAgICAgICB0eXBlTmFtZTogeC50eXBlTmFtZSxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIGNsczogXFxcImNsc19qdXN0eGxcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgaW5oZXJpdFRpdGxlOiBmYWxzZVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcXG4gICAgICAgIH1cXG4gICAgfTtcXG5cXG4gICAgc3RvcmFnZTAucHV0TXlWYXIoXFxcIk5hbWVzXFxcIiwgdHlwZU5hbWVzKTtcXG4gICAgYmlnTGlzdC51bnNoaWZ0KHtcXG4gICAgICAgIHRpdGxlOiBnZXRNeVZhcihcXFwidHlwZU5hbWVWYXJcXFwiLCBcXFwi5YWo6YOoXFxcIikgPT0gXFxcIuWFqOmDqFxcXCIgPyBcXFwi4oCY4oCY4oC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ucmVxdWlyZShcXFwicHVibGljXFxcIikuTG9uZ0NsaWNrKGFwaSwgdWlkLCByb29tSWQsIHBsYXRGb3JtKSxcXG4gICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiBcXFwi5a6Y572R6ZO+5o6lXFxcIixcXG4gICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHJvb21pZCwgcGxhdGZvcm0pID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAocGxhdGZvcm0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIFxcXCJkb3V5dVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB1cmwgPSBcXFwiaHR0cHM6Ly9tLmRvdXl1LmNvbS9cXFwiICsgcm9vbWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiYmlsaWJpbGlcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdXJsID0gXFxcImh0dHBzOi8vbGl2ZS5iaWxpYmlsaS5jb20vaDUvXFxcIiArIHJvb21pZFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgXFxcImh1eWFcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdXJsID0gXFxcImh0dHBzOi8vbS5odXlhLmNvbS9cXFwiICsgcm9vbWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiZG91eWluXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVybCA9IFxcXCJodHRwczovL2xpdmUuZG91eWluLmNvbS9cXFwiICsgcm9vbWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBcXFwiY2NcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgdXJsID0gXFxcImh0dHBzOi8vaDUuY2MuMTYzLmNvbS9jYy9cXFwiICsgcm9vbWlkXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdXJsXFxuICAgICAgICAgICAgICAgIH0sIHJvb21JZCwgcGxhdEZvcm0pXFxuICAgICAgICAgICAgfV1cXG4gICAgICAgIH1cXG4gICAgfSlcXG59O1xcblxcbiQuZXhwb3J0cy5Mb25nQ2xpY2sgPSBmdW5jdGlvbihhcGksIHVpZCwgcm9vbWlkLCBwbGF0Zm9ybSkge1xcbiAgICByZXR1cm4gJC50b1N0cmluZygoYXBpLCB1aWQsIHJvb21pZCwgcGxhdGZvcm0pID0+IHtcXG4gICAgICAgIGlmIChnZXRJdGVtKHBsYXRmb3JtICsgcm9vbWlkLCBcXFwiMFxcXCIpID09IFxcXCIwXFxcIikge1xcbiAgICAgICAgICAgIHZhciBmb2xsID0gXFxcImZvbGxvd1xcXCI7XFxuICAgICAgICAgICAgc2V0SXRlbShwbGF0Zm9ybSArIHJvb21pZCwgXFxcIjFcXFwiKTtcXG4gICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgdmFyIGZvbGwgPSBcXFwidW5Gb2xsb3dcXFwiO1xcbiAgICAgICAgICAgIGNsZWFySXRlbShwbGF0Zm9ybSArIHJvb21pZCk7XFxuICAgICAgICB9O1xcbiAgICAgICAgbGV0IHJlcyA9IEpTT04ucGFyc2UocmVxdWVzdChhcGkgKyBmb2xsICsgXFxcIj9wbGF0Zm9ybT1cXFwiICsgcGxhdGZvcm0gKyBcXFwiJnJvb21JZD1cXFwiICsgcm9vbWlkICsgXFxcIiZ1aWQ9XFxcIiArIHVpZCwgJC5yZXF1aXJlKFxcXCJwdWJsaWNcXFwiKS5oZWFkZXJzKSk7XFxuXFxuICAgICAgICBsZXQgc3VicyA9IGZpbmRJdGVtc0J5Q2xzKFxcXCJjbHNfU3Vic1xcXCIpIHx8IFtdO1xcbiAgICAgICAgaWYgKHN1YnMubGVuZ3RoID09IDApIHtcXG4gICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5rKh5pyJ6I635Y+W5Yiw5YWz5rOo5YiX6KGoXFxcIjtcXG4gICAgICAgIH07XFxuICAgICAgICBsZXQgdGl0ID0gZ2V0SXRlbShwbGF0Zm9ybSArIHJvb21pZCwgXFxcIjBcXFwiKTtcXG4gICAgICAgIGZvciAobGV0IGkgaW4gc3Vicykge1xcbiAgICAgICAgICAgIGxldCBsaSA9IHN1YnNbaV07XFxuICAgICAgICAgICAgbGV0IGNscyA9IGxpLmV4dHJhLmNscztcXG4gICAgICAgICAgICBsZXQganMyID0gbGkuZXh0cmEubG9uZ0NsaWNrWzFdLmpzO1xcbiAgICAgICAgICAgIHVwZGF0ZUl0ZW0oXFxcImlkX1xcXCIgKyBwbGF0Zm9ybSArIHJvb21pZCwge1xcbiAgICAgICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICAgICAgY2xzOiBjbHMsXFxuICAgICAgICAgICAgICAgICAgICBpZDogXFxcImlkX1xcXCIgKyBwbGF0Zm9ybSArIHJvb21pZCxcXG4gICAgICAgICAgICAgICAgICAgIGluaGVyaXRUaXRsZTogZmFsc2UsXFxuICAgICAgICAgICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRpdCA9PSBcXFwiMVxcXCIgPyBcXFwi5bey5YWz5rOoXFxcIiA6IFxcXCLmnKrlhbPms6hcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGpzOiAkLnJlcXVpcmUoXFxcInB1YmxpY1xcXCIpLkxvbmdDbGljayhhcGksIHVpZCwgcm9vbWlkLCBwbGF0Zm9ybSksXFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IFxcXCLlrpjnvZHpk77mjqVcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGpzOiBqczJcXG4gICAgICAgICAgICAgICAgICAgIH1dXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBpZiAoZ2V0TXlWYXIoXFxcInNUeXBlXFxcIiwgXFxcIlxcXCIpICE9PSBcXFwiXFxcIiAmJiB0aXQgPT0gMCkge1xcbiAgICAgICAgICAgICAgICBkZWxldGVJdGVtKFxcXCJpZF9cXFwiICsgcGxhdGZvcm0gKyByb29taWQpO1xcbiAgICAgICAgICAgIH07XFxuICAgICAgICB9O1xcbiAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL1xcXCIgKyByZXMuZGF0YTtcXG4gICAgfSwgYXBpLCB1aWQsIHJvb21pZCwgcGxhdGZvcm0pO1xcbn07XFxuXFxuJC5leHBvcnRzLkxhenkgPSBmdW5jdGlvbihpc0xpdmUpIHtcXG4gICAgcmV0dXJuICQoXFxcIlxcXCIpLmxhenlSdWxlKChpc0xpdmUpID0+IHtcXG4gICAgICAgIGlmIChpc0xpdmUgPT0gMCkgcmV0dXJuIFxcXCJ0b2FzdDovL+ebtOaSreW3sue7k+adn++8gVxcXCI7XFxuICAgICAgICBsZXQgbWlkID0gaW5wdXQuc3BsaXQoXFxcInJvb21JZD1cXFwiKVsxXTtcXG4gICAgICAgIGxldCBqc29uID0gSlNPTi5wYXJzZShmZXRjaChpbnB1dCwgJC5yZXF1aXJlKFxcXCJwdWJsaWM/JnJ1bGU9XFxcIiArIGdldE15VmFyKFxcXCJSX3VsZVxcXCIsIE1ZX1JVTEUudGl0bGUpKS5oZWFkZXJzKSkuZGF0YSB8fCBbXTtcXG4gICAgICAgIGxldCB0b2FzID0gXFxcInRvYXN0Oi8v55u05pKt5bey57uT5p2f5oiW5rKh5pyJ6I635Y+W5Yiw5pWw5o2uXFxcIjtcXG4gICAgICAgIGlmIChPYmplY3Qua2V5cyhqc29uKS5sZW5ndGggPT0gMCkgcmV0dXJuIHRvYXM7XFxuICAgICAgICBmb3IgKGxldCB4bCBpbiBqc29uKSB7XFxuICAgICAgICAgICAgbGV0IG5hbWUgPSBbXTtcXG4gICAgICAgICAgICBsZXQgdXJscyA9IFtdXFxuICAgICAgICAgICAgbGV0IGxpc3QgPSBqc29uW3hsXTtcXG4gICAgICAgICAgICBmb3IgKHZhciBpIGluIGxpc3QpIHtcXG4gICAgICAgICAgICAgICAgbGV0IGxpID0gbGlzdFtpXTtcXG4gICAgICAgICAgICAgICAgbmFtZS5wdXNoKGxpLnF1YWxpdHlOYW1lKVxcbiAgICAgICAgICAgICAgICB1cmxzLnB1c2gobGkucGxheVVybClcXG4gICAgICAgICAgICB9O1xcbiAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeSh1cmxzKSA9PSAnW1xcXCJcXFwiXScgPyB0b2FzIDogSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICBuYW1lczogbmFtZSxcXG4gICAgICAgICAgICAgICAgdXJsczogdXJscyxcXG4gICAgICAgICAgICAgICAgZGFubXU6IC9kb3V5deaaguaXoC8udGVzdCh1cmxzKSA/IFxcXCJ3ZWI6Ly9odHRwOi8vZG91eXVfZGFubXUuZGV2LnR5cmFudGcuY29tLz9yaWQ9XFxcIiArIG1pZCArIFxcXCImdmVyPTFcXFwiIDogL2h1eWEvLnRlc3QodXJscykgPyBcXFwiXFxcIiA6IFxcXCJcXFwiXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9O1xcbiAgICB9LCBpc0xpdmUpO1xcbn07XFxuXFxuJC5leHBvcnRzLkVtcHR5ID0gZnVuY3Rpb24oZCkge1xcbiAgICBkLnB1c2goe1xcbiAgICAgICAgdGl0bGU6ICc8YnI+PGJyPicsXFxuICAgICAgICBjb2xfdHlwZTogJ3JpY2hfdGV4dCdcXG4gICAgfSwge1xcbiAgICAgICAgZGVzYzogXFxcIuaagiAg5pegICDmiL8gIOmXtFxcXFxuXFxcXG7or7cgIOWIhyAg5o2iICDlhbYgIOWugyAg5bmzICDlj7BcXFwiLFxcbiAgICAgICAgdXJsOiAnaGlrZXI6Ly9lbXB0eScsXFxuICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2VcXG4gICAgICAgIH1cXG4gICAgfSk7XFxufTtcIn1dIiwiaWNvbiI6Imh0dHBzOi8vbS5kaWFubHV0LmNvbS9kL2ZpbGUvaW1hZ2UvMjAyMjA0MTYvMTY1MDA3OTU1MDU0NDQ2My5qcGciLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment