xiaomianao666

小程序:福利吧Ⓜ️

Nov 10th, 2022
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@福利吧Ⓜ️@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi56aP5Yip5ZCn4pOC77iPIiwiYXV0aG9yIjoiIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSNmeUFsbCNmeXBhZ2UjaHR0cHM6Ly9mdWxpYmEyMDIzLm5ldCIsInZlcnNpb24iOjEsImNvbF90eXBlIjoibW92aWVfMV92ZXJ0aWNhbF9waWMiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6Im90aGVyIiwiY2xhc3NfdXJsIjoiIiwiYXJlYV9uYW1lIjoiIiwiYXJlYV91cmwiOiIiLCJzb3J0X25hbWUiOiIiLCJ5ZWFyX25hbWUiOiIiLCJzb3J0X3VybCI6IiIsInllYXJfdXJsIjoiIiwiZmluZF9ydWxlIjoianM6XG4vL+S7peS4i+aYryDliJfooajop6PmnpDop4TliJnvvIhKU++8iVxudmFyIHJlcyA9IHt9O1xudmFyIGl0ZW0gPSBbXTtcblxuLy8gdmFyIHR5cGU9TVlfVVJMLnNwbGl0KCcjJylbMV07XG52YXIgcGFnZT1NWV9VUkwuc3BsaXQoJyMnKVsyXTtcbnZhciBtVXJsPU1ZX1VSTC5zcGxpdCgnIycpWzNdO1xuXG5pZihnZXRNeVZhcignZnVsaWJhLnRpdGxlQ29sb3InKT09XCJcIikgcHV0TXlWYXIoJ2Z1bGliYS50aXRsZUNvbG9yJyxcIiNGQTcyOThcIik7XG5pZihnZXRNeVZhcignZnVsaWJhLmRlc2NDb2xvcicpPT1cIlwiKSBwdXRNeVZhcignZnVsaWJhLmRlc2NDb2xvcicsXCIjNzA4MDkwXCIpO1xuXG5pZihnZXRNeVZhcignZnVsaWJhLmNhdGVnb3J5TnVtJyk9PVwiXCIpIHB1dE15VmFyKCdmdW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Pi9nLCAnPGxpbmsgZGF0YS12PicsIGxpbmtUYWdSZXBsYWNlbWVudDIpXG4gICAgICAgICAgICAucmVwbGFjZVdpdGhDYWxsYmFjaygvPChzb3VyY2V8dmlkZW8pKFtcXHNcXFNdKj8pPFxcLyhzb3VyY2V8dmlkZW8pPi9nLCAnPHZpZGVvIGRhdGEtdj4nLCB2aWRlb1RhZ1JlcGxhY2VtZW50Mik7XG4gICAgICAgICAgICAvLyAucmVwbGFjZSgvPHA+PFxcL3A+L2csJycpO1xuXG5cblxuICAgICAgICBsZXQgdGVtcCA9IHBhcnNlRG9tRm9ySHRtbChnZXROZXdUZXh0KHF1b3RlQ29udGVudCwnZGl2JyksICdUZXh0Jyk7XG4gICAgICAgIGlmKGdldE15VmFyKCdmdWxpYmEuc2hvd01vZGUnKT09JzMnKXtcbiAgICAgICAgICAgIGlmKCF0ZW1wLm1hdGNoKC9eXFxzKiQvKSkgaHRtbExpc3QgKz0gJ+KXhyZuYnNwOyZuYnNwOyZuYnNwOyZuYnNwOycgKyB0ZW1wICsgJzxicj4nO1xuICAgICAgICAgICAgaWYoaj09Y29udGVudGxpc3QubGVuZ3RoLTEgJiYgaHRtbExpc3QgIT09ICcnKXtcbiAgICAgICAgICAgICAgICBkLnB1c2goe3RpdGxlOiBodG1sTGlzdCxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IHNpemUsXG4gICAgICAgICAgICAgICAgICAgIGNsaWNrOiB0cnVlXG4gICAgICAgICAgICAgICAgfX0pO1xuICAgICAgICAgICAgICAgIGh0bWxMaXN0ID0gJyc7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1lbHNle1xuICAgICAgICAgICAgaWYoIXRlbXAubWF0Y2goL15cXHMqJC8pIHx8IHF1b3RlQ29udGVudC5pbmNsdWRlcygnYmxvY2txdW90ZT4nKSB8fCAocXVvdGVDb250ZW50LmluY2x1ZGVzKCdkaXY+JykgJiYgcXVvdGVDb250ZW50Lm1hdGNoKC88KGRpdikoW1xcc1xcU10qPyk8XFwvKGRpdik+L2cpID09IG51bGwpKSBodG1sTGlzdCArPSBxdW90ZUNvbnRlbnQ7XG4gICAgICAgICAgICBpZihpbWdsaXN0Lmxlbmd0aCA+IDAgfHwgaj09Y29udGVudGxpc3QubGVuZ3RoLTEpe1xuICAgICAgICAgICAgICAgIGxldCB0ZW1wID0gcGFyc2VEb21Gb3JIdG1sKGdldE5ld1RleHQoaHRtbExpc3QsJ2RpdicpLCAnVGV4dCcpO1xuICAgICAgICAgICAgICAgIGlmKCF0ZW1wLm1hdGNoKC9eXFxzKiQvKSAmJiBnZXRNeVZhcignZnVsaWJhLnNob3dNb2RlJykhPT0nMScpIGQucHVzaCh7dGl0bGU6IGh0bWxMaXN0LFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0U2l6ZTogc2l6ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGljazogdHJ1ZVxuICAgICAgICAgICAgICAgICAgICAgICAgfX0pO1xuICAgICAgICAgICAgICAgIGh0bWxMaXN0ID0gJyc7XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgayA9IDA7IGsgPCBpbWdsaXN0Lmxlbmd0aDsgaysrKXtcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6aW1nbGlzdFtrXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDpnZXRNeVZhcignZnVsaWJhLmJyb3dzZXJMaW5rJykraW1nbGlzdFtrXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOmdldE15VmFyKCdmdWxpYmEuYmlnSW1nJyksXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHRTaXplOiBzaXplLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiB0cnVlXG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0gICBcblxuICAgIC8v5aSN5p2C5paH5pysLeeUsUh0bWzmoLzlvI8t5pu/5o2i5o6J5Zu+54mHLS0t6KeG6aKR6ZO+5o6l5Lmf5pu/5o2i5o6J55So5p+l55yL6KeG6aKR5pu/5LujLS0t572R56uZ5Zyw5Z2A5LiN55So5pu/5o2i77yM55u05o6l55SoXG4gICAgLy8gcXVvdGVDb250ZW50ID0gZ2V0TmV3VGV4dChxdW90ZUNvbnRlbnQsJ2RpdicpO1xuICAgIC8vIGxldCB0ZW1wID0gcGFyc2VEb21Gb3JIdG1sKGdldE5ld1RleHQocXVvdGVDb250ZW50LCdkaXYnKSwgJ1RleHQnKTtcbiAgICAvLyBpZighcXVvdGVDb250ZW50LmluY2x1ZGVzKCc9XCJodHRwJykpIHF1b3RlQ29udGVudCA9IHRlbXA7XG4gICAgLy8gaWYoIXRlbXAubWF0Y2goL15cXHMqJC8pKSBkLnB1c2goe3RpdGxlOiBxdW90ZUNvbnRlbnR9KTtcblxuICAgIC8v5ryr55S75qih5byPXG4gICAgLy8gdmFyIHBpY3M9W107XG4gICAgLy9mb3IgKGxldCBrID0gMDsgayA8IGltZ2xpc3QubGVuZ3RoOyBrKyspe1xuICAgIC8vICAgICBwaWNzLnB1c2goaW1nbGlzdFtrXSk7XG4gICAgLy8gfVxuICAgIC8vIFwicGljczovL1wiK3BpY3Muam9pbihcIiYmXCIpO1xuXG4gICAgLy8gaWYoaW1nbGlzdC5sZW5ndGg9PTApIGNvbnRpbnVlO1xuICAgIC8vIGZvciAobGV0IGsgPSAwOyBrIDwgaW1nbGlzdC5sZW5ndGg7IGsrKyl7XG4gICAgLy8gICAgIGQucHVzaCh7XG4gICAgLy8gICAgICAgICBwaWNfdXJsOmltZ2xpc3Rba10sXG4gICAgLy8gICAgICAgICB1cmw6aW1nbGlzdFtrXSxcbiAgICAvLyAgICAgICAgIGNvbF90eXBlOmdldE15VmFyKCdmdWxpYmEuYmlnSW1nJylcbiAgICAvLyAgICAgfSk7XG4gICAgLy8gfVxufWVsc2V7XG4gICAgLy8gaWYoZ2V0TXlWYXIoJ2Z1bGliYS5zaG93TW9kZScpPT0nMScpIGNvbnRlbnQgPSBHZXRJbWdUYWdBcnJheShjb250ZW50LC88aW1nKFtcXHNcXFNdKj8pPi9nKTtcbiAgICBpZihnZXRNeVZhcignZnVsaWJhLnNob3dNb2RlJyk9PScxJyl7XG4gICAgICAgIGxldCBtYXRjaEFycmF5ID0gY29udGVudC5tYXRjaCgvPGltZyhbXFxzXFxTXSo/KT4vZyk7XG4gICAgICAgIGxldCBpbWdsaXN0ID0gJyc7XG4gICAgICAgIGlmIChtYXRjaEFycmF5ICE9IG51bGwpIHtcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbWF0Y2hBcnJheS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIGxldCBwaWMgPSBtYXRjaEFycmF5W2ldIC5yZXBsYWNlV2l0aENhbGxiYWNrKC88aW1nKFtcXHNcXFNdKj8pPi9nLCAnPGltZyBkYXRhLXY+JywgaW1nVGFnUmVwbGFjZW1lbnRPbmUpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoLzxzaG93aW1nL2csICc8aW1nJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcbiAgICAgICAgICAgICAgICBpZihnZXRNeVZhcignZnVsaWJhLmhpZGVJbWcnKSA9PSAnMCcpIGQucHVzaCh7dGl0bGU6IHBpYyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IHNpemUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2s6IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgIH19KTtcbiAgICAgICAgICAgICAgICBpbWdsaXN0ICs9IHBpYztcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZihnZXRNeVZhcignZnVsaWJhLmhpZGVJbWcnKSA9PSAnMScpIGQucHVzaCh7dGl0bGU6IGltZ2xpc3QsXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRleHRTaXplOiBzaXplLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsaWNrOiB0cnVlXG4gICAgICAgICAgICAgICAgICAgICAgICB9fSk7XG4gICAgfWVsc2V7XG4gICAgICAgIGNvbnRlbnQgPSBjb250ZW50LnJlcGxhY2VXaXRoQ2FsbGJhY2soLzxpbWcoW1xcc1xcU10qPyk+L2csICc8aW1nIGRhdGEtdj4nLCBpbWdUYWdSZXBsYWNlbWVudE9uZSlcbiAgICAgICAgICAgIC5yZXBsYWNlKC88c2hvd2ltZy9nLCAnPGltZycpXG4gICAgICAgICAgICAucmVwbGFjZVdpdGhDYWxsYmFjaygvPChpZnJhbWUpKFtcXHNcXFNdKj8pPFxcLyhpZnJhbWUpPi9nLCAnPGxpbmsgZGF0YS12PicsIGxpbmtUYWdSZXBsYWNlbWVudDIpXG4gICAgICAgICAgICAucmVwbGFjZVdpdGhDYWxsYmFjaygvPChzb3VyY2V8dmlkZW8pKFtcXHNcXFNdKj8pPFxcLyhzb3VyY2V8dmlkZW8pPi9nLCAnPHZpZGVvIGRhdGEtdj4nLCB2aWRlb1RhZ1JlcGxhY2VtZW50Mik7XG5cbiAgICAgICAgbGV0IGNvbnRlbnRsaXN0ID0gY29udGVudC5zcGxpdCgnXFxuJyk7XG4gICAgICAgIGxldCBodG1sTGlzdCA9ICcnO1xuICAgICAgICBmb3IobGV0IGo9MDtqPGNvbnRlbnRsaXN0Lmxlbmd0aDtqKyspe1xuICAgICAgICAgICAgbGV0IHF1b3RlQ29udGVudCA9IGNvbnRlbnRsaXN0W2pdO1xuXG4gICAgICAgICAgICBsZXQgdGVtcCA9IHBhcnNlRG9tRm9ySHRtbChnZXROZXdUZXh0KHF1b3RlQ29udGVudCwnZGl2JyksICdUZXh0Jyk7XG4gICAgICAgICAgICBpZihnZXRNeVZhcignZnVsaWJhLnNob3dNb2RlJyk9PSczJyl7XG4gICAgICAgICAgICAgICAgaWYoIXRlbXAubWF0Y2goL15cXHMqJC8pKSBodG1sTGlzdCArPSAnPHA+Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7Jm5ic3A7JyArIHRlbXAgKyAnPC9wPic7XG4gICAgICAgICAgICAgICAgaWYoaj09Y29udGVudGxpc3QubGVuZ3RoLTEgJiYgaHRtbExpc3QgIT09ICcnKXtcbiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHt0aXRsZTogaHRtbExpc3QsXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IHNpemUsXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGljazogdHJ1ZVxuICAgICAgICAgICAgICAgICAgICB9fSk7XG4gICAgICAgICAgICAgICAgICAgIGh0bWxMaXN0ID0gJyc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfWVsc2V7XG4gICAgICAgICAgICAgICAgaWYoIXRlbXAubWF0Y2goL15cXHMqJC8pIHx8IHF1b3RlQ29udGVudC5pbmNsdWRlcygnYmxvY2txdW90ZT4nKSB8fCAocXVvdGVDb250ZW50LmluY2x1ZGVzKCdkaXY+JykgJiYgcXVvdGVDb250ZW50Lm1hdGNoKC88KGRpdikoW1xcc1xcU10qPyk8XFwvKGRpdik+L2cpID09IG51bGwpKSBodG1sTGlzdCArPSBxdW90ZUNvbnRlbnQ7XG5cbiAgICAgICAgICAgICAgICBpZihxdW90ZUNvbnRlbnQubWF0Y2goLzxpbWcoW1xcc1xcU10qPyk+L2cpICE9PSBudWxsIHx8IGo9PWNvbnRlbnRsaXN0Lmxlbmd0aC0xKXtcbiAgICAgICAgICAgICAgICAgICAgaWYoZ2V0TXlWYXIoJ2Z1bGliYS5zaG93TW9kZScpIT09JzEnICYmIGh0bWxMaXN0ICE9PSAnJykgZC5wdXNoKHt0aXRsZTogaHRtbExpc3QsXG4gICAgICAgICAgICAgICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IHNpemUsXG4gICAgICAgICAgICAgICAgICAgICAgICBjbGljazogdHJ1ZVxuICAgICAgICAgICAgICAgICAgICB9fSk7XG4gICAgICAgICAgICAgICAgICAgIGh0bWxMaXN0ID0gJyc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmKHF1b3RlQ29udGVudC5tYXRjaCgvPGltZyhbXFxzXFxTXSo/KT4vZykgIT09IG51bGwpIGQucHVzaCh7dGl0bGU6IHF1b3RlQ29udGVudCxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IHNpemUsXG4gICAgICAgICAgICAgICAgICAgIGNsaWNrOiB0cnVlXG4gICAgICAgICAgICAgICAgfX0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxufVxuXG5cbmQucHVzaCh7Y29sX3R5cGU6ICdsaW5lX2JsYW5rJ30pO1xubGV0IHRpcHMgPSAn6K+l5paH56ug5p2l5rqQ5LqO56aP5Yip5ZCn77yM5aaC5oKo5Zac5qyi77yM6K+36L+b5YWl56aP5Yip5ZCn572R6aG154mIJztcbmxldCB3YXJuaW5nID0gJ+atpOinhOWImeS7hemZkOWtpuS5oOS9v+eUqO+8jOWmguacieS4jeWmpe+8jOivt+acrOWQp+S4u+iBlOezu+aIkeWIoOmZpCc7XG5cbi8vIGlmKGdldE15VmFyKCdmdWxpYmEuc2hvd01vZGUnKT09JzAnIHx8IGdldE15VmFyKCdmdWxpYmEuc2hvd01vZGUnKT09JzInKXtcbmlmKGdldE15VmFyKCdmdWxpYmEub3BlbkNvbW1lbnQnKT09JzAnKXtcbiAgICBldmFsKEpTT04ucGFyc2UocmVxdWVzdChcImhpa2VyOi8vcGFnZS9jb21tZW50XCIpKS5ydWxlKTtcblxuICAgIGQucHVzaCh7dGl0bGU6IEdldFRpcHModGlwcyx3YXJuaW5nKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dFNpemU6IHNpemUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xpY2s6IHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgIH19KTtcbiAgICBkLnB1c2goe2NvbF90eXBlOiAnbGluZV9ibGFuayd9KTtcblxuICAgIGlmKGNvbW1lbnQubGVuZ3RoID4gMCl7XG4gICAgICAgIGxldCBjb21tZW50TnVtID0gcGFyc2VEb21Gb3JIdG1sKGh0bWwsJy5hcnRpY2xlLW1ldGEmJnNwYW4sMiYmVGV4dCcpLnJlcGxhY2UoJ+ivhOiuuicsJ/Cfk6Lng63or4TmlbAnKTtcbiAgICAgICAgY29tbWVudE51bSA9IEdldEhvbWUoMykrZ2V0U3Ryb25nVGV4dChnZXRCaWdUZXh0KGNvbW1lbnROdW0pKTtcbiAgICAgICAgZm9yIChsZXQgbCA9IDA7IGwgPCBjb21tZW50Lmxlbmd0aDsgbCsrKXtcbiAgICAgICAgICAgIGxldCBsaXN0ID0gcGFyc2VEb21Gb3JBcnJheShjb21tZW50W2xdLCcuY29tbWVudCcpO1xuICAgICAgICAgICAgZC5wdXNoKHtjb2xfdHlwZTogJ2xpbmUnfSk7XG5cbiAgICAgICAgICAgIGZvciAobGV0IG0gPSAwOyBtIDwgbGlzdC5sZW5ndGg7IG0rKykge1xuICAgICAgICAgICAgICAgIGxldCBmbG9vciA9ICcnOyBsZXQgbWFpbiA9ICcnOyAgbGV0IGF1dG9yID0gJyc7IGxldCB0aW1lID0gJyc7XG4gICAgICAgICAgICAgICAgdHJ5e1xuICAgICAgICAgICAgICAgICAgICBpZihtPT0wKSBmbG9vciA9ICfwn4+iJyArIHBhcnNlRG9tRm9ySHRtbChsaXN0W21dLCcuY29tdC1mJiZUZXh0JykucmVwbGFjZSgnIycsJycpKyfmpbwnO1xuICAgICAgICAgICAgICAgIH1jYXRjaChlKXtcbiAgICAgICAgICAgICAgICAgICAgZmxvb3IgPSBsKyfmpbzlsYLplJnor68hISEnK21cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdHJ5e1xuICAgICAgICAgICAgICAgICAgICBtYWluID0gIHBhcnNlRG9tRm9ySHRtbChsaXN0W21dLCcuY29tdC1tYWluJiZwJiZUZXh0Jyk7XG4gICAgICAgICAgICAgICAgfWNhdGNoKGUpe1xuICAgICAgICAgICAgICAgICAgICBtYWluID0gbCsn5Zue5aSN5YaF5a656ZSZ6K+vISEhJyttXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRyeXtcbiAgICAgICAgICAgICAgICAgICAgYXV0b3IgPSAn8J+RsScgKyBwYXJzZURvbUZvckh0bWwobGlzdFttXSwnLmNvbXQtYXV0aG9yJiZUZXh0Jyk7XG4gICAgICAgICAgICAgICAgfWNhdGNoKGUpe1xuICAgICAgICAgICAgICAgICAgICBhdXRvciA9IGwrJ+S9nOiAheWQjeensOmUmeivryEhIScrbVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0cnl7XG4gICAgICAgICAgICAgICAgICAgIHRpbWUgPSAn8J+VoicgKyBwYXJzZURvbUZvckh0bWwobGlzdFttXSwnLmNvbXQtbWV0YS0tc3BhbiYmVGV4dCcpLnJlcGxhY2UoJ+WbnuWkjScsJycpO1xuICAgICAgICAgICAgICAgIH1jYXRjaChlKXtcbiAgICAgICAgICAgICAgICAgICAgdGltZSA9IGwrJ+aXtumXtOmUmeivryEhIScrbVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGxldCBjb21tZW50VGV4dCA9IEdldENvbW1lbnQobWFpbixhdXRvcix0aW1lLGZsb29yKTtcbiAgICAgICAgICAgICAgICBpZihsPT0wICYmIG09PTApIGNvbW1lbnRUZXh0ID0gY29tbWVudE51bSArJzxicj48YnI+JysgY29tbWVudFRleHQ7XG5cbiAgICAgICAgICAgICAgICBjb21tZW50VGV4dD1jb21tZW50VGV4dFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlV2l0aENhbGxiYWNrKC8oaHR0cDpcXC9cXC98ZnRwOlxcL1xcL3xodHRwczpcXC9cXC98KVtcXHdcXC1fXSsoXFwuW1xcd1xcLV9dKykrKFtcXHdcXC1cXC4sQD9ePSUmYW1wOzovflxcKyNdKltcXHdcXC1cXEA/Xj0lJmFtcDsvflxcKyNdKT8vZywgJzxuIGRhdGEtdj4nLCBudWxsVGFnUmVwbGFjZW1lbnQyKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlV2l0aENhbGxiYWNrKC88YSguKj8pIGhyZWY9XCIoLio/KWFsaXl1bmRyaXZlKC4qPylcIiguKj8pPFxcL2E+L2csICc8YSBkYXRhLXY+JywgYVRhZ1JlcGxhY2VtZW50Mik7XG4gICAgICAgICAgICAgICAgZC5wdXNoKHt0aXRsZTogY29tbWVudFRleHQsXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgICAgIHRleHRTaXplOiBzaXplLFxuICAgICAgICAgICAgICAgICAgICBjbGljazogdHJ1ZVxuICAgICAgICAgICAgICAgIH19KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbn1cblxucmVzLmRhdGE9ZDtcbnNldEhvbWVSZXN1bHQocmVzKTsiLCJzZGV0YWlsX2NvbF90eXBlIjoibW92aWVfMSIsInNkZXRhaWxfZmluZ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