xiaomianao666

小程序:轻合集.DR

Aug 25th, 2024
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@轻合集.DR@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi6L275ZCI6ZuGLkRSIiwiYXV0aG9yIjoi6L275ZCI6ZuG55Sf5oiQ5ZmoIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSIsInZlcnNpb24iOjEwMywiY29sX3R5cGUiOiJpY29uX3JvdW5kX3NtYWxsXzQiLCJjbGFzc19uYW1lIjoiIiwidHlwZSI6ImFsbCIsImNsYXNzX3VybCI6IiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxuY29uc3QgUUlOR19USVRMRSA9IGdldE15VmFyKCdteUNvbGxlY3Rpb24nKSxcbiAgICBuZXdXaW5kb3cgPSByZWFkRmlsZSgnbmV3V2luZG93JyksXG4gICAgdHlwZVNob3cgPSBnZXRNeVZhcigndHlwZVNob3cnLCAnZmluZDonKSxcbiAgICB0eXBlcyA9IHtcbiAgICAgICAgJ2FsbCc6ICfogZrlkIgnLFxuICAgICAgICAndmlkZW8nOiAn6KeG6aKRJyxcbiAgICAgICAgJ211c2ljJzogJ+mfs+mikScsXG4gICAgICAgICdsaXZlJzogJ+ebtOaSrScsXG4gICAgICAgICdjYXJ0b29uJzogJ+a8q+eUuycsXG4gICAgICAgICdyZWFkJzogJ+mYheivuycsXG4gICAgICAgICdwaWN0dXJlJzogJ+WbvumbhicsXG4gICAgICAgICduZXdzJzogJ+i1hOiurycsXG4gICAgICAgICd0b29sJzogJ+W3peWFtycsXG4gICAgICAgICdvdGhlcic6ICflhbblroMnXG4gICAgfVxubGV0IGVsID0gW3tcbiAgICAgICAgdGl0bGU6ICcgJyArIFFJTkdfVElUTEUuYm9sZCgpICsgJyAmbmJzcCAmbmJzcCAnICsgJ+KamSDovbvlkIjpm4borr7nva4g4pqZJy5zbWFsbCgpLFxuICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvQ29uZmlnP3J1bGU9JyArIFFJTkdfVElUTEUgKyAnJiNub1JlY29yZEhpc3RvcnkjJyxcbiAgICAgICAgaW1nOiBNWV9SVUxFLmljb24gfHwgJ2hpa2VyOi8vaW1hZ2VzL2ljb24xJyxcbiAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInXG4gICAgfSwge1xuICAgICAgICB1cmw6ICdcImhpa2VyOi8vc2VhcmNoP3M9XCIraW5wdXQnLFxuICAgICAgICBkZXNjOiAn5pCc5L2g5oOz6KaB55qELi4uJyxcbiAgICAgICAgdGl0bGU6ICfmkJzntKInLFxuICAgICAgICBjb2xfdHlwZTogJ2lucHV0JyxcbiAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgIHJ1bGVzOiAkLnRvU3RyaW5nKChRSU5HX1RJVExFLCB0eXBlU2hvdykgPT4ge1xuICAgICAgICAgICAgICAgIGxldCBydWxlcyA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL2RhdGFMb2FkP3J1bGU9JyArIFFJTkdfVElUTEUpKClcbiAgICAgICAgICAgICAgICBpZiAodHlwZVNob3cuc3RhcnRzV2l0aCgnZmluZDonKSkge1xuICAgICAgICAgICAgICAgICAgICBsZXQgZmlsdGVyS2V5ID0gdHlwZVNob3cuc2xpY2UoNSlcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZpbHRlcktleSkgcnVsZXMgPSBydWxlcy5maWx0ZXIoKHYpID0+IHYudGl0bGUuaW5jbHVkZXMoZmlsdGVyS2V5KSlcbiAgICAgICAgICAgICAgICB9IGVsc2UgcnVsZXMgPSBydWxlcy5maWx0ZXIoKHYpID0+IHYudHlwZSA9PSB0eXBlU2hvdylcbiAgICAgICAgICAgICAgICBy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lKFwiZmlsZTovL1wiICsgbGlzdFtpXS5maWxlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHRvYXN0KFwi5bey5riF6ZmkXCIgKyBuYW1lICsgXCLnmoRcIiArIGxpc3QubGVuZ3RoICsgXCLkuKrkvp3otZbmlofku7bvvIzlm57ljrvliLfmlrDor5Xor5XlkKdcIik7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0b2FzdChcIuayoeacieaJq+aPj+WIsFwiICsgbmFtZSArIFwi55qE5L6d6LWW5paH5Lu2XCIpO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY2xlYXJSZXF1aXJlKE1ZX1JVTEUudGl0bGUsIHRoaXMpO1xuICAgICAgICAgICAgICAgIGxldCBydSA9ICQudG9TdHJpbmcoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICB0b2FzdChcIuiusOW+l+eCueWHu+ajgOa1i+WNh+e6p+aMiemSru+8gVwiKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFwi5rW36ZiU6KeG55WM6aaW6aG16aKR6YGT6KeE5YiZ44CQRFLmqKHmnb/jgJHvv6Vob21lX3J1bGVfdXJs77+laHR0cDovL2hpa2VyLm5va2lhLnByZXNzL2hpa2VydWxlL3J1bGVsaXN0Lmpzb24/aWQ9NDU0OVwiXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgY29uZmlybSh7XG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBNWV9SVUxFLnRpdGxlICsgXCLmj5DnpLpcIixcbiAgICAgICAgICAgICAgICAgICAgY29udGVudDogXCLngrnlh7vnoa7lrprmjInpkq7lr7zlhaXmnIDmlrDniYhEUuaooeadv++8jOeEtuWQjueCueWHu0RS5qih5p2/5Lit55qEKirmo4DmtYvljYfnuqcqKuaMiemSruWNh+e6p+aPkuS7tlwiLFxuICAgICAgICAgICAgICAgICAgICBjb25maXJtOiBydVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIHJldHVybiBcImhpa2VyOi8vaG9tZUBEUuaooeadv1wiO1xuICAgICAgICAgICAgfSlcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybiBcImhpa2VyOi8vZW1wdHlcIlxuICAgIH0pLFxuICAgIGNvbF90eXBlOiBcInNjcm9sbF9idXR0b25cIixcbiAgICBkZXNjOiBcIlwiLFxuICAgIHBpY191cmw6IFwiXCJcbn0pO1xuXG5lbC5wdXNoKHR5cGVTaG93LnN0YXJ0c1dpdGgoJ2ZpbmQ6JykgPyB7XG4gICAgdGl0bGU6ICfigJzigJzigJ3igJ0nICsgKCflhajpg6gnICsgKHR5cGVTaG93WzVdID8gJ1snICsgdHlwZVNob3cuc2xpY2UoNSkgKyAnXScgOiAnJykpLmJvbGQoKS5mb250Y29sb3IoJyMxMmI2NjgnKSxcbiAgICB1cmw6ICQodHlwZVNob3cuc2xpY2UoNSksICfmn6Xmib7lsI/nqIvluo/lhbPplK7or40nKS5pbnB1dCgoKSA9PiB7XG4gICAgICAgIHB1dE15VmFyKCd0eXBlU2hvdycsICdmaW5kOicgKyBpbnB1dClcbiAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXG4gICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcbiAgICB9KSxcbiAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nXG59IDoge1xuICAgIHRpdGxlOiAn5YWo6YOoJyxcbiAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKCkgPT4ge1xuICAgICAgICBwdXRNeVZhcigndHlwZVNob3cnLCAnZmluZDonKVxuICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcbiAgICAgICAgcmV0dXJuICflho3mrKHngrnlh7vjgJDlhajpg6jjgJHlj6/mn6Xmib7lsI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XJhbSA9IHYudXJsLnNwbGl0KCc7JyksXG4gICAgICAgIHJ1bGVUbXAgPSB7XG4gICAgICAgICAgICB0aXRsZTogdi50aXRsZSxcbiAgICAgICAgICAgIHVybDogdXJsUGFyYW0uc2hpZnQoKSxcbiAgICAgICAgICAgIGNsYXNzX25hbWU6IHYuY2xhc3NfbmFtZSxcbiAgICAgICAgICAgIGNsYXNzX3VybDogdi5jbGFzc191cmwsXG4gICAgICAgICAgICBhcmVhX25hbWU6IHYuYXJlYV9uYW1lLFxuICAgICAgICAgICAgYXJlYV91cmw6IHYuYXJlYV91cmwsXG4gICAgICAgICAgICB5ZWFyX25hbWU6IHYueWVhcl9uYW1lLFxuICAgICAgICAgICAgeWVhcl91cmw6IHYueWVhcl91cmwsXG4gICAgICAgICAgICBzb3J0X25hbWU6IHYuc29ydF9uYW1lLFxuICAgICAgICAgICAgc29ydF91cmw6IHYuc29ydF91cmxcbiAgICAgICAgfSxcbiAgICAgICAgZnlwYWdlID0gcnVsZVRtcC51cmwuaW5jbHVkZXMoJ2Z5cGFnZScpID8gJ2Z5cGFnZScgOiAnMScsXG4gICAgICAgIGRvbWFpbiA9ICgvXihodHRwcz86XFwvXFwvLis/KSg/OiN8XFw/fFxcL3wkKS9pLmV4ZWMocnVsZVRtcC51cmwpIHx8IFssICdoaWtlcjovL2VtcHR5J10pWzFdLFxuICAgICAgICBkID0ge1xuICAgICAgICAgICAgdGl0bGU6IHYudGl0bGUsXG4gICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2UvZnJhbWVMb2FkJyxcbiAgICAgICAgICAgIGltZzogdi5pY29uIHx8ICdoaWtlcjovL2ltYWdlcy9pY29uMScsXG4gICAgICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgICAgIHVybDogZG9tYWluICsgJy8jbm9IaXN0b3J5IyNub1JlY29yZEhpc3RvcnkjIyMjJyArIEpTT04uc3RyaW5naWZ5KHtcbiAgICAgICAgICAgICAgICAgICAgUlVMRTogYmFzZTY0RW5jb2RlKEpTT04uc3RyaW5naWZ5KHJ1bGVUbXApKSxcbiAgICAgICAgICAgICAgICAgICAgcGFnZU51bTogZnlwYWdlLFxuICAgICAgICAgICAgICAgICAgICBRSU5HX1RJVExFOiBnZXRNeVZhcignbXlDb2xsZWN0aW9uJylcbiAgICAgICAgICAgICAgICB9KSArICcuanM6ZXZhbChKU09OLnBhcnNlKGZldGNoKFwiaGlrZXI6Ly9wYWdlL3VybFBhcnNl77yf77yfcnVsZT0nICsgUUlOR19USVRMRSArICdcIikpLnJ1bGUp77yb77ybaW5kZXhVcmwoaW5wdXQpOycgKyBwYXJhbUhhbmRsZSh1cmxQYXJhbSwgdi51YSksXG4gICAgICAgICAgICAgICAgUlVMRToge1xuICAgICAgICAgICAgICAgICAgICB0aXRsZTogdi50aXRsZVxuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgaXNJbmRleDogdHJ1ZVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgaWYgKG5ld1dpbmRvdykgT2JqZWN0LmFzc2lnbihkLmV4dHJhLCB7XG4gICAgICAgIG5ld1dpbmRvdzogdHJ1ZSxcbiAgICAgICAgd2luZG93SWQ6IFFJTkdfVElUTEUgKyAnXycgKyBkLnRpdGxlXG4gICAgfSlcbiAgICBlbC5wdXNoKGQpXG59KVxuc2V0UmVzdWx0KGVsKSIsInNlYXJjaF91cmwiOiJoaWtlcjovL2VtcHR5P2tleXdvcmQ9KioiLCJncm91cCI6IuKRoOi9u+WQiOmbhiIsInNlYXJjaEZpbmQiOiJqczpcbnNldFJlc3VsdChbe1xuICAgIHRpdGxlOiBcIueCueaIkeW8gOWni+i9u+WQiOmbhuKAouinhueVjOiBmuaQnFwiLFxuICAgIHVybDogXCJoaWtlcjovL3NlYXJjaD9zPVwiICsgZ2V0UGFyYW0oXCJrZXl3b3JkXCIpLFxuICAgIGV4dHJhOiB7XG4gICAgICAgIHJ1bGVzOiAkLnRvU3RyaW5nKCgpID0+IHtcbiAg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cbiAgICAgICAgICAgICAgICBsZXQgdXJsID0gY2xhc3NfdXJsW2ldLFxcbiAgICAgICAgICAgICAgICAgICAgbm93ID0gSlNPTi5zdHJpbmdpZnkoeyBuYW1lOiBuYW1lLCB1cmw6IHVybCB9KVxcbiAgICAgICAgICAgICAgICBlbC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBzZWxlY3RlZCA9PSBub3cgPyAn4oCc4oCc4oCd4oCdJyArIG5hbWUuZm9udGNvbG9yKHRoaXMuY29sb3IpLmJvbGQoKSA6IG5hbWUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IHNlbGVjdGVkID09IG5vdyA/ICdoaWtlcjovL2VtcHR5JyA6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHNpZ24sIGlkLCBub3cpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoc2lnbiArIGlkLCBub3cpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICAgICAgfSwgdGhpcy5zaWduLCBpZCwgbm93KSxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbidcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIGVsLnB1c2goeyBjb2xfdHlwZTogdGhpcy5ib3VuZGFyeSB9KVxcbiAgICAgICAgfSlcXG4gICAgfSxcXG4gICAgaW5pdChjbGFzc09iamVjdCkge1xcbiAgICAgICAgaWYgKHR5cGVvZiBjbGFzc09iamVjdC5jbGFzc19uYW1lID09ICdzdHJpbmcnKVxcbiAgICAgICAgICAgIGNsYXNzT2JqZWN0LmNsYXNzX25hbWUgPSBjbGFzc09iamVjdC5jbGFzc19uYW1lLnNwbGl0KCcmJylcX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ZmlsZXMvbGlicy8nICsgbWQ1KHVybCkgKyAnLmpzJ1xcbiAgICAgICAgZWxzZSBpZih1cmwuc3RhcnRzV2l0aCgnaGlrZXI6Ly9wYWdlLycpKSB1cmwgPSAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgIGlmIChpbnB1dCA9PSAn5aSH5Lu9JykgcmV0dXJuICQoJ2hpa2VyOi8vZmlsZXMvdG1wLycgKyBRSU5HX1RJVExFICsgJ19iYWNrdXAuanNvbicsICfovpPlhaXlpIfku73ot6/lvoQnKVxcbiAgICAgICAgICAgIC5pbnB1dCgodXJsLCB1cGRhdGVJbnRlcnZhbCwgbmV3V2luZG93LCB0YWJGb2xkLCBkaXNhYmxlQ3VzdG9tKSA9PiB7XFxuICAgICAgICAgICAgICAgIGxldCBydWxlcyA9IHJlcXVlc3QodXJsKSxcXG4gICAgICAgICAgICAgICAgICAgIGN1c3RvbURhdGEgPSByZWFkRmlsZSgnY3VzdG9tRGF0YScpXFxuICAgICAgICAgICAgICAgIHdyaXRlRmlsZShpbnB1dCwgSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSW50ZXJ2YWw6IHVwZGF0ZUludGVydmFsLFxcbiAgICAgICAgICAgICAgICAgICAgbmV3V2luZG93OiBuZXdXaW5kb3csXFxuICAgICAgICAgICAgICAgICAgICB0YWJGb2xkOiB0YWJGb2xkLFxcbiAgICAgICAgICAgICAgICAgICAgZGlzYWJsZUN1c3RvbTogZGlzYWJsZUN1c3RvbSxcXG4gICAgICAgICAgICAgICAgICAgIGN1c3RvbURhdGE6IGN1c3RvbURhdGEsXFxuICAgICAgICAgICAgICAgICAgICBydWxlczogcnVsZXNcXG4gICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LlpIfku73vvIzms6jmhI/oi6Xku5PlupPkuLrlrZDpobXpnaLliJnkuI3lpIfku70nXFxuICAgICAgICAgICAgfS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i5zdHJpbmdpZnkocnVsZXMpKVxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIGkpXFxuICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgIGNhc2UgJ+mHjeaWsOaOkuW6jyc6XFxuICAgICAgICAgICAgbGV0IHNvcnRGbGFnID0gcGFyc2VJbnQoZ2V0TXlWYXIoJ3NvcnRGbGFnJywgJy0xJykpXFxuICAgICAgICAgICAgZC50aXRsZSA9IChzb3J0RmxhZyA9PSBpID8gJ/CflIMgICcgOiAnJykgKyBkLnRpdGxlXFxuICAgICAgICAgICAgaWYgKHNvcnRGbGFnID09IC0xKVxcbiAgICAgICAgICAgICAgICBkLnVybCA9ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKGkpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dE15VmFyKCdzb3J0RmxhZycsIGkudG9TdHJpbmcoKSlcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mAieaLqeimgeenu+WKqOWIsOeahOS9jee9ridcXG4gICAgICAgICAgICAgICAgfSwgaSlcXG4gICAgICAgICAgICBlbHNlXFxuICAgICAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgob2xkSW5kZXgsIG5ld0luZGV4KSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSBKU09OLnBhcnNlKHJlYWRGaWxlKCdjdXN0b21EYXRhJykgfHwgJ1tdJylcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzLnNwbGljZShuZXdJbmRleCwgMCwgcnVsZXMuc3BsaWNlKG9sZEluZGV4LCAxKVswXSlcXG4gICAgICAgICAgICAgICAgICAgIHNhdmVGaWxlKCdjdXN0b21EYXRhJywgSlNPTi5zdHJpbmdpZnkocnVsZXMpKVxcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoJ3NvcnRGbGFnJywgJy0xJylcXG4gICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICB9LCBzb3J0RmxhZywgaSlcXG4gICAgICAgICAgICBicmVha1xcbiAgICAgICAgY2FzZSAn5pu05pS55Zu+5qCHJzpcXG4gICAgICAgICAgICBkLnVybCA9ICQodi5pY29uIHx8ICcnLCAn6L6T5YWl5paw5Zu+5qCH5Zyw5Z2A5oiW6aKc6Imy5Luj56CB77yaJykuaW5wdXQoKGkpID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IHJ1bGVzID0gSlNPTi5wYXJzZShyZWFkRmlsZSgnY3VzdG9tRGF0YScpIHx8ICdbXScpXFxuICAgICAgICAgICAgICAgIGlmIChpbnB1dClcXG4gICAgICAgICAgICAgICAgICAgIHJ1bGVzW2ldLmljb24gPSBpbnB1dFxcbiAgICAgICAgICAgICAgICBlbHNlXFxuICAgICAgICAgICAgICAgICAgICBkZWxldGUgcnVsZXNbaV0uaWNvblxcbiAgICAgICAgICAgICAgICBzYXZlRmlsZSgnY3VzdG9tRGF0YScsIEpTT04uc3RyaW5naWZ5KHJ1bGVzKSlcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpXFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICBjYXNlICflr7zlhaXmtbfpmJQnOlxcbiAgICAgICAgICAgIGQudXJsID0gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoaSk9PntcXG4gICAgICAgICAgICAgICAgbGV0IGRhd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B7XFxuICAgIGlmIChNWV9QQUdFID09IDEpIHtcXG4gICAgICAgIC8vIOWKoOi9vUNsYXNzVGFi57uE5Lu2XFxuICAgICAgICBldmFsKEpTT04ucGFyc2UoZmV0Y2goJ2hpa2VyOi8vcGFnZS9DbGFzc1RhYj9ydWxlPScgKyBRSU5HX1RJVExFKSkucnVsZSlcXG4gICAgICAgIHRhYkhlYWRlci5sb2FkKG15Q29sbGVjdGlvbl9lbClcXG4gICAgICAgIGlmIChSVUxFLnNlYXJjaF91cmwpIG15Q29sbGVjdGlvbl9lbC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuaQnOe0olxcXCIsXFxuICAgICAgICAgICAgZGVzYzogXFxcIuaQnOS9oOaDs+imgeeahC4uLlxcXCIsXFxuICAgICAgICAgICAgdXJsOiAnXFxcImhpa2VyOi8vc2VhcmNoP3M9XFxcIitpbnB1dCcsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgcnVsZXM6ICQudG9TdHJpbmcoKFFJTkdfVElUTEUsIHRpdGxlKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgcnVsZXMgPSAkLnJlcXVpcmUoJ2hpa2VyOi8vcGFnZS9kYXRhTG9hZD9ydWxlPScgKyBRSU5HX1RJVExFKSgpXFxuICAgICAgICAgICAgICAgICAgICBydWxlcyA9IFtydWxlcy5maW5kKCh2KSA9PiB2LnRpdGxlID09IHRpdGxlKV1cXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBKU09OLnN0cmluZ2lmeShydWxlcylcXG4gICAgICAgICAgICAgICAgfSwgUUlOR19USVRMRSwgUlVMRS50aXRsZSksXFxuICAgICAgICAgICAgICAgIGRlZmF1bHRWYWx1ZTogZ2V0TXlWYXIoJ3NlYXJjaEtleScsICcnKSxcXG4gICAgICAgICAgICAgICAgb25DaGFuZ2U6IFxcXCJwdXRNeVZhcignc2VhcmNoS2V5JyxpbnB1dClcXFwiXFxuICAgICAg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J1bGVdID0gTVlfUlVMRS5maW5kX3J1bGUubWF0Y2goL14oW1xcXFxzXFxcXFNdKj8pKD86PT0+KFtcXFxcc1xcXFxTXSopKT8kLylcXG4gICAgZmluZFJ1bGUgPSBmaW5kUnVsZS5zcGxpdCgnOycpXFxuICAgIHBhcnNlRG9tRm9yQXJyYXkoZ2V0UmVzQ29kZSgpLCBmaW5kUnVsZS5zaGlmdCgpKS5mb3JFYWNoKChkYXRhKSA9PiB7XFxuICAgICAgICBsZXQgW3RpdGxlLCBpbWcsIGRlc2MsIHVybF0gPSBmaW5kUnVsZS5tYXAoKHYsIGkpID0+IHtcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgIGlmICh2ID09ICcqJykgcmV0dXJuICcnXFxuICAgICAgICAgICAgICAgICAgICBlbHNlIHYgPSAoaSA9PSAxIHx8IGkgPT0gMykgP1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcnNlRG9tKGRhdGEsIHYpIDpcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJzZURvbUZvckh0bWwoZGF0YSwgdilcXG4gICAgICAgICAgICAgICAgICAgIGlmIChpICE9IDMpIHYgPSBydW5Db2RlKHYpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdlxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7IHJldHVybiAnJyB9XFxuICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgcmVzID0ge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogdGl0bGUsIHVybDogdXJsLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBkZXNjLCBpbWc6IGltZyxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IE1ZX1JVTEUuY29sX3R5cGVcXG4gICAgICAgICAgICB9XFxuICAgICAgICBpZiAocmVzLnVybCkge1xcbiAgICAgICAgICAgIGlmIChyZXMudXJsLmluY2x1ZGVzKCdAbGF6eVJ1bGU9JykpIHtcXG4gICAgICAgICAgICAgICAgbGV0IHJlSW5kZXggPSByZXMudXJsLmluZGV4T2YoJy5qczonKVxcbiAgICAgICAgICAgICAgICBpZiAocmVJbmRleCA+PSAwKSByZXMudXJsID0gcmVzLnVybC5zbGljZSgwLCByZUluZGV4KSArICcuanM6XFxcXG5pZihNWV9SVUxFKU9iamVjdC5hc3NpZ24oTVlfUlVMRSwgJyArIGFzc2lnbkxhenlSdWxlICsgJyk7JyArIHJlcy51cmwuc2xpY2UocmVJbmRleCArIDQpXFxuICAgICAgICAgICAgfSBlbHNlICBpZiAoZGV0YWlsRmluZFJ1bGUpIHtcXG4gICAgICAgICAgICAgICAgcmVzLmV4dHJhID0ge1xcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBnZW5FeFVybCh1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgUlVMRTogT2JqZWN0LmFzc2lnbihnZW5NeVJ1bGUoKSwgeyBkZXRhaWxfZmluZF9ydWxlOiBkZXRhaWxGaW5kUnVsZSB9KSxcXG4gICAgICAgICAgICAgICAgICAgIHBhZ2VUaXRsZTogaXNJbmRleCAmJiB0aXRsZVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJlcy51cmwgPSAnaGlrZXI6Ly9wYWdlL2ZyYW1lTG9hZD9ydWxlPScgKyBRSU5HX1RJVExFXFxuICAgICAgICAgICAgfSBlbHNlIGlmIChNWV9SVUxFLmRldGFpbF9maW5kX3J1bGUpIHtcXG4gICAgICAgICAgICAgICAgcmVzLmV4dHJhID0ge1xcbiAgICAgICAgICAgICAgICAgICAgdXJsOiBnZW5FeFVybCh1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgUlVMRTogZ2VuTXlSdWxlKCksXFxuICAgICAgICAgICAgICAgICAgICBwYWdlVGl0bGU6IGlzSW5kZXggJiYgdGl0bGVcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXMudXJsID0gJ2hpa2VyOi8vcGFnZS9mcmFtZUx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gnaGlrZXI6Ly9maWxlcy9saWJzLycgKyBtZDUodXJsKSArICcuanMnKSxcXG4gICAgICAgICAgICByZW1vdGVEYXRhID0gW11cXG4gICAgICAgIGlmKGludGVydmFsID09IDApIGludGVydmFsID0gLTFcXG4gICAgICAgIHRyeSB7IHJlbW90ZURhdGEgPSBKU09OLnBhcnNlKGZldGNoQ2FjaGUodXJsLCAyNCAqIGludGVydmFsLCB7dGltZW91dDo1MDAwMH0pKSB9IGNhdGNoKGUpIHt9XFxuICAgICAgICBpZighQXJyYXkuaXNBcnJheShyZW1vdGVEYXRhKSkgcmVtb3RlRGF0YSA9IFtdXFxuICAgICAgICBpZiAocmVtb3RlRGF0YS5sZW5ndGggPCAzKSB7XFxuICAgICAgICAgICAgbG9nKCfmnKrojrflj5bliLDmlbDmja4nKVxcbiAgICAgICAgICAgIGlmIChvbGREYXRhKSB3cml0ZUZpbGUoJ2hpa2VyOi8vZmlsZXMvbGlicy8nICsgbWQ1KHVybCkgKyAnLmpzJywgb2xkRGF0YSlcXG4gICAgICAgICAgICBkYXRhID0gSlNPTi5wYXJzZShvbGREYXRhIHx8ICdbXScpXFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGxvZygn5bey6I635Y+W5Yiw5pWw5o2uJylcXG4gICAgICAgICAgICBkYXRhID0gcmVtb3RlRGF0YVxcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIGRhdGEgPSBkYXRhLmZpbHRlcigodikgPT4geyByZXR1cm4gdi50aXRsZSAhPSBnZXRNeVZhcignbXlDb2xsZWN0aW9uJykgJiYgISh2LmF1dGhvciB8fCAnJykuaW5jbHVkZXMoJ+i9u+WQiOmbhueUn+aIkOWZqCcpIH0pXFxuICAgIGlmIChyZWFkRmlsZSgnZGlzYWJsZUN1c3RvbScpKSByZXR1cm4gZGF0YVxcbiAgICBlbHNlIHsgLy8g5YaZ5YWl6Ieq5a6a5LmJ5pWw5o2uXFxuICAgICAgICBsZXQgY3VzdG9tRGF0YSA9IEpTT04ucGFyc2UocmVhZEZpbGUoJ2N1c3RvbURhdGEnKSB8fCAnW10nKSxcXG4gICAgICAgICAgICByZXdyaXRlRGF0YSA9IFtdXFxuICAgICAgICBjdXN0b21EYXRhID0gY3VzdG9tRGF0YS5yZWR1Y2UoKHNlbGYsIHYpID0+IHtcXG4gICAgICAgICAgICBsZXQgaW5kZXggPSBkYXRhLmZpbmRJbmRleCgodnYpID0+IHYudGl0bGUgPT0gdnYudGl0bGUpXFxuICAgICAgICAgICAgaWYgKGluZGV4ID49IDApIHtcXG4gICAgICAgICAgICAgICAgc2VsZi5wdXNoKHYpXFxuICAgICAgICAgICAgICAgIGxldCBydWxlID0gZGF0YS5zcGxpY2UoaW5kZXgsIDEpWzBdXFxuICAgICAgICAgICAgICAgIGlmIChzaG93QWxsIHx8IHYudmlzaWJsZSlcXG4gICAgICAgICAgICAgICAgICAgIHJld3JpdGVEYXRhLnB1c2goT2JqZWN0LmFzc2lnbihydWxlLCB2KSlcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIHNlbGZcXG4gICAgICAgIH0sIFtdKVxcbiAgICAgICAgZGF0YS5mb3JFYWNoKCh2KSA9PiBjdXN0b21EYXRhLnB1c2goeyB0aXRsZTogdi50aXRsZSwgdmlzaWJsZTogdHJ1ZSB9KSlcXG4gICAgICAgIHNhdmVGaWxlKCdjdXN0b21EYXRhJywgSlNPTi5zdHJpbmdpZnkoY3VzdG9tRGF0YSkpXFxuICAgICAgICByZXR1cm4gcmV3cml0ZURhdGEuY29uY2F0KGRhdGEpXFxuICAgIH1cXG59XFxuXCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLlh73mlbDph43lhplcIixcInBhdGhcIjpcInByZUZ1bmNcIixcInJ1bGVcIjpcIi8vIOmYsuatonJlcXVpcmXlpJrmrKHov5DooYxcXG5sZXQgckNhY2hlID0ge31cXG5yZXF1aXJlID0gZnVuY3Rpb24ocGFyYW0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