Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@剪板✈@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi5Ymq5p2/4pyIIiwiYXV0aG9yIjoiQCIsInVybCI6Imhpa2VyOi8vZW1wdHkjI2Z5Y2xhc3MjI2Z5cGFnZSIsInZlcnNpb24iOjEsImNvbF90eXBlIjoibW92aWVfMyIsImNsYXNzX25hbWUiOiLlsI/nqIvluo8m572R6aG1IiwidHlwZSI6Im90aGVyIiwiY2xhc3NfdXJsIjoiYXBwJndlYiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxuLy9sb2coTVlfVVJMKVxudmFyIHg1cGFnZSA9IGdldFZhcihNWV9SVUxFLnRpdGxlICsgXCJjbGlwYm9hcmRcIiwgXCJcIik7XG5pZiAoeDVwYWdlICE9IFwiXCIgJiYgeDVwYWdlICE9IFwiMVwiKSB7XG4gICAgcHV0TXlWYXIoXCJwYWdlXCIsIFN0cmluZyh4NXBhZ2UpKTtcbiAgICBjbGVhclZhcihNWV9SVUxFLnRpdGxlICsgXCJjbGlwYm9hcmRcIik7XG59O1xuTVlfVVJMID0gTVlfVVJMLnNwbGl0KFwiIyNcIilbMV07XG52YXIgZCA9IFtdO1xudmFyIHVybCA9ICdodHRwczovL3Bhc3RlYmluLmNvbS91L3hpYW9taWFuYW82NjYvJyArIGdldE15VmFyKFwicGFnZVwiLCBcIjFcIik7XG5cbmlmIChNWV9VUkwgPT0gXCJ3ZWJcIikge1xuICAgIGQucHVzaCh7XG4gICAgICAgIGRlc2M6ICdmbG9hdCYmdG9wJyxcbiAgICAgICAgdXJsOiB1cmwsXG4gICAgICAgIGNvbF90eXBlOiAneDVfd2Vidmlld19zaW5nbGUnLFxuICAgICAgICBleHRyYToge1xuICAgICAgICAgICAgdXJsSW50ZXJjZXB0b3I6ICQudG9TdHJpbmcoKE1ZX1JVTEUpID0+IHtcbiAgICAgICAgICAgICAgICBpZiAoaW5wdXQuaW5jbHVkZXMoJyNpbXBvcnQnKSkge1xuICAgICAgICAgICAgICAgICAgICBpbnB1dCA9IGlucHV0LnJlcGxhY2UoXCJodHRwczovL3Bhc3RlYmluLmNvbS9cIiwgXCJodHRwczovL3Bhc3RlYmluLmNvbS9yYXcvXCIpLnJlcGxhY2UoXCIjaW1wb3J0XCIsIFwiXCIpO1xuICAgICAgICAgICAgICAgICAgICBsb2coaW5wdXQpO1xuICAgICAgICAgICAgICAgICAgICBsZXQgdXJsID0gaW5wdXQuc3BsaXQoXCImXCIpWzBdO1xuICAgICAgICAgICAgICAgICAgICBsZXQgcGFnZSA9IGlucHV0LnNwbGl0KFwiJlwiKVsxXTtcbiAgICAgICAgICAgICAgICAgICAgbG9nKHBhZ2UpO1xuICAgICAgICAgICAgICAgICAgICBsZXQgaHRtbCA9IHJlcXVlc3QodXJsKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGFyciA9IHBkZmEoaHRtbCwgXCJib2R5XCIpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgdGV4dCA9IGFyci5tYXAoaXQgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBkZmgoaXQsIFwiYm9keSYmVGV4dFwiKTtcbiAgICAgICAgICAgICAgICAgICAgfSkuam9pbihcIiYmXCIpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJC50b1N0cmluZygodGV4dCwgTVlfUlVMRSwgcGFnZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgZmJhLnB1dFZhcihNWV9SVUxFLnRpdGxlICsgXCJjbGlwYm9hcmRcIiwgcGFnZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZnlfYnJpZGdlX2FwcC5pbXBvcnRSdWxlKHRleHQpO1xuICAgICAgICAgICAgICAgICAgICB9LCB0ZXh0LCBNWV9SVUxFLCBwYWdlKVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sIE1ZX1JVTEUpLFxuICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHRpdGxlKSA9PiB7XG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gaW1ncygpIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHVybCA9IGRvY3VtZW50LmxvY2F0aW9uLmhyZWY7XG4gICAgICAgICAgICAgICAgICAgIGxldCBwYWdlID0gMTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKC9cXC9cXGQrJC8udGVzdCh1cmwpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlID0gdXJsLnNwbGl0KFwiL1wiKS5zbGljZSgtMSlbMF07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKHBhZ2UgPiAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmYmEubG9nKHBhZ2UpXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZmJhLnB1dFZhcih0aXRsZSArIFwiY2xpcGJvYXJkXCIsIHBhZ2UpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgYXJyID0gQXJyYXkuZnJvbShkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKFwidGFibGUgYVwiKSk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsaXN0cyA9IGFyci5maWx0ZXIoeCA9PiAheC5ocmVmLmluY2x1ZGVzKCcvYXJjaGl2ZS9qYXZhc2NyaXB0JykpO1xuICAgICAgICAgICAgICAgICAgICBsaXN0cy5mb3JFYWNoKHggPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHguaHJlZi5pbmNsdWRlcyhcIiNpbXBvcnRcIikpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB4LmhyZWYgPSB4LmhyZWYgKyBcIiNpbXBvcnQmXCIgKyBwYWdlO1xuICAgICAgICAgICAgICAgICAgICB9KVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGltZ3MoKTtcbiAgICAgICAgICAgICAgICAvLyDorrDlvZXliY3kuIDkuKrmu5rliqjkvY3nva5cbiAgICAgICAgICAgICAgICBsZXQgYmVmb3JlU2Nyb2xsVG9wID0gMDtcblxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGhhbmRsZVNjcm9sbCgpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8g6Led6aG26YOoXG4gICAgICAgICAgICAgICAgICAgIHZhciBzY3JvbGxUb3AgPVxuICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LnNjcm9sbFRvcCB8fCBkb2N1bWVudC5ib2R5LnNjcm9sbFRvcDtcbiAgICAgICAgICAgICAgICAgICAgLy8g5Y+v6KeG5Yy66auY5bqmXG4gICAgICAgICAgICAgICAgICAgIHZhciBjbGllbnRIZWlnaHQgPVxuICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LmNsaWVudEhlaWdodCB8fCBkb2N1bWVudC5ib2R5LmNsaWVudEhlaWdodDtcbiAgICAgICAgICAgICAgICAgICAgLy8g5rua5Yqo5p2h5oC76auY5bqmXG4gICAgICAgICAgICAgICAgICAgIHZhciBzY3JvbGxIZWlnaHQgPVxuICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZG9jdW1lbnRFbGVtZW50LnNjcm9sbEhlaWdodCB8fCBkb2N1bWVudC5ib2R5LnNjcm9sbEhlaWdodDtcbiAgICAgICAgICAgICAgICAgICAgLy8g56Gu5a6a5rua5Yqo5pa55ZCRXG4gICAgICAgICAgICAgICAgICAgIGlmIChzY3JvbGxUb3AgPj0gYmVmb3JlU2Nyb2xsVG9wKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyDmu5rliqjop6blupVcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzY3JvbGxUb3AgKyBjbGllbnRIZWlnaHQgPj0gc2Nyb2xsSGVpZ2h0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9mYmEubG9nKFwi5rua5Yqo6Kem5bqVXCIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjb3VudGVyID0gMDsgLy8g6K6h5pWw5Zmo77yM55So5LqO6K6w5b2V5bey57uP5omn6KGM55qE5qyh5pWwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGludGVydmFsSWQgPSBzZXRJbnRlcnZhbChmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9mYmEubG9nKCfmiafooYzmk43kvZwnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW1ncygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3VudGVyKys7XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvdW50ZXIgPj0gMTUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vZmJhLmxvZygn5YGc5q2i5omn6KGMJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKGludGVydmFsSWQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgNTAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBiZWZvcmVTY3JvbGxUb3AgPSBzY3JvbGxUb3A7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8g6IqC5rWBXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gdGhyb3R0bGUoZiwgdykge1xuICAgICAgICAgICAgICAgICAgICBsZXQgdCA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgdCA9IHNldFRpbWVvdXQoKCkgPT4ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v5omn6KGM5pON5L2cKOS9v+eUqGFwcGx56YeN5paw57uR5a6adGhpc+eahOaMh+WQkSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmLmFwcGx5KHRoaXMsIGFyZ3VtZW50cyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdCA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgICAgICB9LCB3KTtcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8g55uR5ZCs5rua5YqoXG4gICAgICAgICAgICAgICAgZG9jdW1lbnQub25zY3JvbGwgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3R0bGUoaGFuZGxlU2Nyb2xsKCksIDEwMDAwKTtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSwgTVlfUlVMRS50aXRsZSlcbiAgICAgICAgfVxuICAgIH0pO1xufVxuXG5cbmZ1bmN0aW9uIGZvcm1hdERhdGUoZGF0ZVN0cmluZykge1xuICAgIHZhciBkYXRlUmVnZXggPSAvKFxcd3szfSlcXHMoXFxkezEsMn0pKHN0fG5kfHJkfHRoKSxcXHMoXFxkezR9KS87XG4gICAgdmFyIG1hdGNoID0gZGF0ZVN0cmluZy5tYXRjaChkYXRlUmVnZXgpO1xuXG4gICAgaWYgKG1hdGNoKSB7XG4gICAgICAgIHZhciBtb250aCA9IG1hdGNoWzFdO1xuICAgICAgICB2YXIgZGF5ID0gbWF0Y2hbMl07XG4gICAgICAgIHZhciB5ZWFyID0gbWF0Y2hbNF07XG5cbiAgICAgICAgLy8g5bCG5pyI5Lu96L2s5o2i5Li65pWw5a2X6KGo56S6XG4gICAgICAgIHZhciBtb250aE1hcCA9IHtcbiAgICAgICAgICAgIEphbjogJzAxJyxcbiAgICAgICAgICAgIEZlYjogJzAyJyxcbiAgICAgICAgICAgIE1hcjogJzAzJyxcbiAgICAgICAgICAgIEFwcjogJzA0JyxcbiAgICAgICAgICAgIE1heTogJzA1JyxcbiAgICAgICAgICAgIEp1bjogJzA2JyxcbiAgICAgICAgICAgIEp1bDogJzA3JyxcbiAgICAgICAgICAgIEF1ZzogJzA4JyxcbiAgICAgICAgICAgIFNlcDogJzA5JyxcbiAgICAgICAgICAgIE9jdDogJzEwJyxcbiAgICAgICAgICAgIE5vdjogJzExJyxcbiAgICAgICAgICAgIERlYzogJzEyJ1xuICAgICAgICB9O1xuICAgICAgICBtb250aCA9IG1vbnRoTWFwW21vbnRoXTtcblxuICAgICAgICB2YXIgZm9ybWF0dGVkRGF0ZSA9IHllYXIgKyAnLScgKyBtb250aCArICctJyArIGRheS50b1N0cmluZygpLnBhZFN0YXJ0KDIsICcwJyk7XG4gICAgICAgIHJldHVybiBmb3JtYXR0ZWREYXRlO1xuICAgIH0gZWxzZSB7XG4gICAgICAgIHJldHVybiAn5peg5rOV6Kej5p6Q5pel5pyfJztcbiAgICB9XG59XG5cblxubGV0IHNpbmRleCA9IGdldEl0ZW0oXCJzaVwiLCBcIjBcIik7XG5sZXQgdGl0bGVzID0gW3tcbiAgICB0aXRsZTogXCLlsI/nqIvluo9cIixcbiAgICBsdGl0bGU6IFwi5bCP56iL5bqP77yaXCJcbn0sIHtcbiAgICB0aXRsZTogXCLkuIDotbfnnItcIixcbiAgICBsdGl0bGU6IFwi6YKA5oKo5LiA6LW355yL77yaXCJcbn0sIHtcbiAgICB0aXRsZTogXCLmj5Lku7ZcIixcbiAgICBsdGl0bGU6IFwi5o+S5Lu25ZCN77yaXCJcbn1dXG5cbmlmIChNWV9VUkwuaW5jbHVkZXMoXCJhcHBcIikpIHtcbiAgICBsZXQgcGFnZSA9IGdldE15VmFyKFwicGFnZVwiLCBTdHJpbmcoTVlfUEFHRSkpO1xuICAgIGxvZyhwYWdlKVxuICAgIFxuICAgIE1ZX1VSTCA9IHVybC5yZXBsYWNlKC9cXC8oXFxkKSskL2csIFwiL1wiK3BhZ2UpO1xuICAgIGxvZyhNWV9VUkwpXG4gICAgdmFyIGh0bWwgPSBmZXRjaChNWV9VUkwpO1xuICAgIHJlZnJlc2hYNURlc2MoJzAnKTtcbiAgICByZWZyZXNoWDVXZWJWaWV3KFwiaGlrZXI6Ly9lbXB0eVwiKTtcbiAgICB2YXIgZCA9IFtdO1xuICAgIGlmIChNWV9QQUdFID09IDEpIHtcbiAgICAgICAgbGV0IFNZID0gcGRmYShodG1sLCBcIi5kZXRhaWxzJiYuaW5mby1iYXJcIik7XG4gICAgICAgIGZvciAobGV0IGl0IG9mIFNZKSB7XG4gICAgICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgICAgIHRpdGxlOiAn4oCY4oCY4oCZ4oCZPGI+PGJpZz48Zm9udCBjb2xvcj1cIiMzNDJhMmJcIj4nICsgcGRmaChpdCwgXCJoMSYmVGV4dFwiKSArICc8L2ZvbnQ+PC9iaWc+PC9iPicsXG4gICAgICAgICAgICAgICAgZGVzYzogJ+KAmOKAmOKAmeKAmTxzbWFsbD48Zm9udCBjb2xvcj1cIiNiYmJkYjVcIj52aWV3c++8micgKyBwZGZoKGl0LCBcInNwYW4mJlRleHRcIikgKyAnPC9mb250Pjwvc21hbGw+JyxcbiAgICAgICAgICAgICAgICB1cmw6ICdodHRwczovL3Bhc3RlYmluLmNvbS91L3hpYW9taWFuYW82NjYnLFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcInRleHRfMVwiLFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XG4gICAgICAgICAgICAgICAgICAgIGxpbmVWaXNpYmxlOiBmYWxzZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sIHtcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogXCJsaW5lX2JsYW5rXCJcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIGlmIChnZXRNeVZhcigncGFnZScsICcnKSAhPSAnJykge1xuICAgICAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnTxzbWFsbD4nICsgJ+a4hemZpOe/u+mhteaVsOaNricuZm9udGNvbG9yKFwiZ3JheVwiKSArICc8L3NtYWxsPicsXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcbiAgICAgICAgICAgICAgICB1cmw6ICQoXCIjbm9Mb2FkaW5nI1wiKS5sYXp5UnVsZSgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoJ3BhZ2UnKTtcbiAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+a4hemZpOWujOaIkCc7XG4gICAgICAgICAgICAgICAgfSksXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICAgICAgbGluZVZpc2libGU6IGZhbHNlXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSlcbiAgICAgICAgfVxuICAgICAgICBkLnB1c2goe2NvbF90eXBlOiBcImJpZ19ibGFua19ibG9ja1wifSk7XG4gICAgICAgIGQucHVzaCh7Y29sX3R5cGU6IFwiYmlnX2JsYW5rX2Jsb2NrXCJ9KTtcblxuICAgICAgICB0aXRsZXMuZm9yRWFjaCgoeCwgaSkgPT4ge1xuICAgICAgICAgICAgbGV0IHRpdGxlID0geC50aXRsZTtcbiAgICAgICAgICAgIGlmIChzaW5kZXggPT0gaSkge1xuICAgICAgICAgICAgICAgIHRpdGxlID0gdGl0bGUuZm9udGNvbG9yKFwiIzE3QjU2QVwiKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGQucHVzaCh7XG4gICAgICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ0nICsgdGl0bGUsXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcbiAgICAgICAgICAgICAgICB1cmw6ICQoXCIjbm9Mb2FkaW5nI1wiKS5sYXp5UnVsZSgoaSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKFwic2lcIixTdHJpbmcoaSkpO1xuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXCJoaWtlcjovL2VtcHR5XCI7XG4gICAgICAgICAgICAgICAgfSxpKVxuICAgICAgICAgICAgfSlcbiAgICAgICAgfSlcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIGNvbF90eXBlOidibGFua19ibG9jaycsXG4gICAgICAgIH0pXG4gICAgfVxuICAgIGxldCBpaT0xO1xuICAgIGxldCBhcnIgPSBwZGZhKGh0bWwsIFwidGJvZHkmJnRyXCIpO1xuICAgIGZvciAobGV0IGl0IG9mIGFycikgeyAgICAgICAgXG4gICAgICAgIGlmKCFpdC5pbmNsdWRlcyh0aXRsZXNbc2luZGV4XS5sdGl0bGUpKXtcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICB9XG4gICAgICAgIGxldCBkZSA9IGZvcm1hdERhdGUocGRmaCgnPHRhYmxlPicgKyBpdCArICc8L3RhYmxlPicsIFwiLmhfNjQwJiZUZXh0XCIpKVxuICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgdGl0bGU6ICc8Yj48c21hbGw+PGZvbnQgY29sb3I9XCIjNTM1YzMwXCI+JyArIHBkZmgoaXQsIFwiYSYmVGV4dFwiKS5yZXBsYWNlKHRpdGxlc1tzaW5kZXhdLmx0aXRsZSxcIlwiKSArICc8L2ZvbnQ+PC9zbWFsaz48L2I+JyxcbiAgICAgICAgICAgIGRlc2M6ICc8c21hbGw+JyArIGRlICsgJzwvc21hbGw+JyxcbiAgICAgICAgICAgIHVybDogJChwZChpdCwgXCJhJiZocmVmXCIpLnJlcGxhY2UoXCJodHRwczovL3Bhc3RlYmluLmNvbS9cIiwgXCJodHRwczovL3Bhc3RlYmluLmNvbS9yYXcvXCIpKS5sYXp5UnVsZSgocGFnZSkgPT4ge1xuICAgICAgICAgICAgICAgIGxldCBodG1sID0gcmVxdWVzdChpbnB1dCk7XG4gICAgICAgICAgICAgICAgbGV0IGFyciA9IHBkZmEoaHRtbCwgXCJib2R5XCIpO1xuICAgICAgICAgICAgICAgIHB1dE15VmFyKFwicGFnZVwiLCBwYWdlKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gYXJyLm1hcChpdCA9PiB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBwZGZoKGl0LCBcImJvZHkmJlRleHRcIik7XG4gICAgICAgICAgICAgICAgfSkuam9pbihcIiYmXCIpXG4gICAgICAgICAgICB9LCBwYWdlKSxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcImF2YXRhclwiLFxuICAgICAgICAgICAgZXh0cmE6IHtcbiAgICAgICAgICAgICAgICBsaW5lVmlzaWJsZTogZmFsc2UsXG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICBpaSsrO1xuICAgIH1cbiAgICBwdXRNeVZhcihcImRjbnRcIixTdHJpbmcoaWkpKTtcbiAgICB2YXIgdG90YWxjb3VudCA9IGdldE15VmFyKFwidGNcIiwgXCJcIik7XG4gICAgaWYgKHRvdGFsY291bnQgPT0gXCJcIikge1xuICAgICAgICB0b3RhbGNvdW50ID0gcGRmaChodG1sLCBcImE6bWF0Y2hlcyhPbGRlc3QpJiZocmVmXCIpLnNwbGl0KFwiL1wiKS5zbGljZSgtMSlbMF07XG4gICAgICAgIHB1dE15VmFyKFwidGNcIiwgdG90YWxjb3VudCk7XG4gICAgfVxuXG4gICAgZm9yIChsZXQgaSA9IE51bWJlcihwYWdlKTsgaSA8IE51bWJlcih0b3RhbGNvdW50KSArIDE7IGkrKykge1xuICAgICAgICBsZXQgcCA9IE51bWJlcihwYWdlKTtcbiAgICAgICAgZC5wdXNoKHtcbiAgICAgICAgICAgIHRpdGxlOiAn4oCc4oCc4oCd4oCdJyArIChwID09IGkgPyBpLnRvU3RyaW5nKCkuZm9udGNvbG9yKFwicmVkXCIpIDogaS50b1N0cmluZygpKSxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXG4gICAgICAgICAgICB1cmw6ICQoXCIjbm9Mb2FkaW5nI1wiKS5sYXp5UnVsZSgoaSkgPT4ge1xuICAgICAgICAgICAgICAgIHB1dE15VmFyKFwicGFnZVwiLCBpICsgXCJcIik7XG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gXCJoaWtlcjovL2VtcHR5XCJcbiAgICAgICAgICAgIH0sIGkpXG4gICAgICAgIH0pXG4gICAgfVxuICAgIGQucHVzaCh7XG4gICAgICAgIHRpdGxlOifigJzigJzigJ3igJ08c21hbGw+5b2T5YmN56ysJytwYWdlKyfpobUnKyflhbHvvJonK2dldE15VmFyKFwidGNcIiwgdG90YWxjb3VudCkrJyDlvZPliY3pobXpnaLmnInvvJonK2dldE15VmFyKFwiZGNudFwiLFwiMVwiKSsn6aG5PC9zbWFsbD4nLFxuICAgICAgICBjb2xfdHlwZTondGV4dF9jZW50ZXJfMScsXG4gICAgICAgIHVybDondG9hc3Q6Ly/miJHmmK/mj5DnpLonLFxuICAgICAgICBleHRyYTp7XG4gICAgICAgICAgICBsaW5lVmlzaWJsZTpmYWxzZSxcbiAgICAgICAgfSAgICAgICAgXG4gICAgfSlcbiAgICBkLnB1c2goe1xuICAgICAgICB0aXRsZTogJ+S4iuS4gOmhtScsXG4gICAgICAgIGNvbF90eXBlOiAndGV4dF8zJyxcbiAgICAgICAgdXJsOiAkKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChwYWdlLCB0YykgPT4ge1xuICAgICAgICAgICAgLy9wYWdlID0gZ2V0TXlWYXIoXCJwYWdlXCIsIFN0cmluZyhwYWdlKSk7XG4gICAgICAgICAgICAvL3BhZ2U9cGFyc2VJbnQocGFnZSk7XG4gICAgICAgICAgICBwdXRNeVZhcihcInBhZ2VcIiwgcGFnZSAtIDEgPiAxID8gKHBhZ2UgLSAxKS50b1N0cmluZygpIDogXCIxXCIpO1xuICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcbiAgICAgICAgICAgIHJldHVybiBcImhpa2VyOi8vZW1wdHlcIjtcbiAgICAgICAgfSwgcGFnZSwgTnVtYmVyKHRvdGFsY291bnQpKSxcbiAgICB9LCB7XG4gICAgICAgIHRpdGxlOiAn6Lez6aG1JyxcbiAgICAgICAgY29sX3R5cGU6ICd0ZXh0XzMnLFxuICAgICAgICB1cmw6ICQoXCIxXCIsIFwi6K+36L6T5YWl6aG15pWwLOaAu+mhteaVsDogXCIgKyBnZXRNeVZhcihcInRjXCIsIFwiMVwiKSkuaW5wdXQoKCkgPT4ge1xuICAgICAgICAgICAgdmFyIHAgPSBwYXJzZUludChpbnB1dCk7XG4gICAgICAgICAgICB2YXIgYyA9IGdldE15VmFyKFwidGNcIiwgXCIxXCIpO1xuICAgICAgICAgICAgaWYgKHAgPT0gMCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBcInRvYXN0Oi8v5LiN6IO95Li6MFwiO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHAgPiBwYXJzZUludChjKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBcInRvYXN0Oi8v6LaF5Ye66IyD5Zu0XCI7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBwdXRNeVZhcihcInBhZ2VcIiwgcCk7XG4gICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xuICAgICAgICB9KVxuICAgIH0sIHtcbiAgICAgICAgdGl0bGU6ICfkuIvkuIDpobUnLFxuICAgICAgICBjb2xfdHlwZTogJ3RleHRfMycsXG4gICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgocGFnZSwgdGMpID0+IHtcbiAgICAgICAgICAgIHBhZ2UgPSBnZXRNeVZhcihcInBhZ2VcIiwgU3RyaW5nKHBhZ2UpKTtcbiAgICAgICAgICAgIHBhZ2U9cGFyc2VJbnQocGFnZSk7XG4gICAgICAgICAgICBwdXRNeVZhcihcInBhZ2VcIiwgcGFnZSArIDEgPCB0YyA/IFN0cmluZyhwYWdlICsgMSkgOiB0Yy50b1N0cmluZygpKTtcbiAgICAgICAgICAgIHJlZnJlc2hQYWdlKCk7XG4gICAgICAgICAgICByZXR1cm4gXCJoaWtlcjovL2VtcHR5XCI7XG4gICAgICAgIH0sIHBhZ2UsIE51bWJlcih0b3RhbGNvdW50KSksXG4gICAgfSlcbn1cblxuc2V0UmVzdWx0KGQpIiwic2VhcmNoX3VybCI6IiIsImdyb3VwIjoi4pGg5o6o6I2QIiwic2VhcmNoRmluZCI6IiIsImRldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJkZXRhaWxfZmluZF9ydWxlIjoiIiwic2RldGFpbF9jb2xfdHlwZSI6Im1vdmllXzEiLCJzZGV0YWlsX2ZpbmRfcnVsZSI6IiIsInVhIjoibW9iaWxlIiwicHJlUnVsZSI6IiIsInBhZ2VzIjoiW10iLCJpY29uIjoiIiwicHJveHkiOiIifQ==
Add Comment
Please, Sign In to add comment