Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@MyField@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoiTXlGaWVsZCIsImF1dGhvciI6IuaWreW/tSIsInVybCI6Imhpa2VyOi8vZW1wdHk/Y2xhc3M9ZnlBbGwiLCJ2ZXJzaW9uIjoxMCwiY29sX3R5cGUiOiJ0ZXh0X2NlbnRlcl8xIiwiY2xhc3NfbmFtZSI6Ik15UGFyc2VTJue8lui+keaWh+S7tiIsInR5cGUiOiJvdGhlciIsImNsYXNzX3VybCI6IiZlZGl0RmlsZSIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxudGhpcy5kID0gW107XG5cbmZ1bmN0aW9uIGp4SXRlbUhlYWQoKSB7XG4gICAgYWRkTGlzdGVuZXIoJ29uUmVmcmVzaCcsICQudG9TdHJpbmcoKCkgPT4ge1xuICAgICAgICBzd2l0Y2ggKGdldFZhcigna3FqeGNzJywgJzAnKSkge1xuICAgICAgICAgICAgY2FzZSAnMCc6XG4gICAgICAgICAgICAgICAgcHV0VmFyKCdrcWp4Y3MnLCAxKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgJzEnOlxuICAgICAgICAgICAgICAgIHB1dFZhcigna3FqeGNzJywgMik7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgIHB1dFZhcigna3FqeGNzJywgMCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9KSk7XG4gICAgaWYgKGdldFZhcigna3FqeGNzJykgPT0gMikge1xuICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgdGl0bGU6ICfigJjigJjigJnigJk8c3BhbiBzdHlsZT1cImNvbG9yOiNGQUNDMkVcIj7op6PmnpDmtYvor5UnLFxuICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKCkgPT4ge1xuICAgICAgICAgICAgICAgIHZhciB2aXBVcmwgPSBnZXRWYXIoJ3BsdWdpbkxpbmsnKTtcbiAgICAgICAgICAgICAgICBpZiAodmlwVXJsLnN1YnN0cigwLCA0KSA9PSAnaHR0cCcpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVxdWlyZSgnaHR0cHM6Ly9naXRlYS5jb20vQUk5NTcvSGlrZXIvcmF3L20vdi9Sb3V0ZS5qcycpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYXl0bVBhcnNlKHZpcFVybCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+i+k+WFpeahhuacquWhq1VybOaIluiAheaXoOaViFVybCc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnLFxuICAgICAgICB9KTtcbiAgICB9XG5cbiAgICB2YXIganhOZXdWID0gZ2V0VmFyKCdqeE5ld1YnLCAnJyksXG4gICAgICAgIGp4T2xkViA9IGdldFZhcignanhPbGRWJyk7XG4gICAgdmFyIHZlcnNpb25UaXBzID0ganhOZXdWID09ICcnID8gJ1ZlcnNpb24gJyArIGp4T2xkViA6ICfigJjigJgnICsganhOZXdWICsgJ1xcbuWFiOabtOaWsOWwj+eoi+W6j+eEtuWQjueCueWHu+abtOaWsOiEmuacrOS+nei1luKAmeKAmSc7XG4gICAgZC5wdXNoKHtcbiAgICAgICAgdGl0bGU6ICfigJjigJjigJnigJk8YmlnPjxiaWc+PHNwYW4gc3R5bGU9XCJjb2xvcjojMEMwMDAwXCI+TXlQYXJzZVMnLFxuICAgICAgICBkZXNj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gICBsaW5rOiBmTGlua3MuY2pjYWNoZVxuICAgIH0sIHtcbiAgICAgICAgdGl0bGU6ICfnvZHpobXohJrmnKzku6PnoIEnLFxuICAgICAgICBsaW5rOiBmTGlua3MueDVjYWNoZVxuICAgIH0sIHtcbiAgICAgICAgdGl0bGU6ICfosIPnlKjot6/nlLHku6PnoIEnLFxuICAgICAgICBsaW5rOiB0b2ZMaW5rKGZMaW5rcy5yb3V0ZVVybClcbiAgICB9LCB7XG4gICAgICAgIHRpdGxlOiAn6Kej5p6Q6aG55Li75Luj56CBJyxcbiAgICAgICAgbGluazogdG9mTGluayhmTGlua3MuanhJdFVybClcbiAgICB9LCB7XG4gICAgICAgIHRpdGxlOiAn57yW6L6R6Kej5p6Q6aG55Luj56CBJyxcbiAgICAgICAgbGluazogdG9mTGluayhmTGlua3MuX2JqVXJsKVxuICAgIH1dO1xuICAgIGZvciAoaSBvZiBMaXN0cykge1xuICAgICAgICBkLnB1c2goe1xuICAgICAgICAgICAgdGl0bGU6IGkudGl0bGUsXG4gICAgICAgICAgICB1cmw6ICdlZGl0RmlsZTovLycgKyBpLmxpbmssXG4gICAgICAgICAgICAvL2NvbF90eXBlOiAndGV4dF8yJ1xuICAgICAgICB9KVxuICAgIH1cbiAgICBpZiAoIWdldFZhcignZWRpdEZpbGVQb3B1cCcpKSB7XG4gICAgICAgIGNvbmZpcm0oe1xuICAgICAgICAgICAgdGl0bGU6ICfmuKnppqjmj5DnpLonLFxuICAgICAgICAgICAgY29udGVudDogJ+atpOmhueWKn+iDveS4jeW7uuiuruWwj+eZveeUqOaIt+S9v+eUqCcsXG4gICAgICAgICAgICBjb25maXJtOiAncHV0VmFyKFwiZWRpdEZpbGVQb3B1cFwiLFwiMVwiKSdcbiAgICAgICAgfSlcbiAgICB9XG59XG5cbnRyeSB7XG4gICAgcmVxdWlyZShcImh0dHBzOi8vZ2l0ZWEuY29tL0FJOTU3L0hpa2VyL3Jhdy9tL3YvUm91dGUuanNcIik7XG4gICAgc3dp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aGVpZ2h0OiBhdXRvO1xcbiAgICAgICAgICAgIG92ZXJmbG93OiBoaWRkZW47XFxuICAgICAgICB9XFxuICAgICAgICBib2R5IHtcXG4gICAgICAgICAgICBtYXJnaW46IDAgNXB4IDAgNXB4O1xcbiAgICAgICAgICAgIHBhZGRpbmc6IDAgMHB4IDAgMHB4O1xcbiAgICAgICAgICAgIC8vYmFja2dyb3VuZDogI0Y5RjBEQTtcXG4gICAgICAgICAgICBmb250LXdlaWdodDogMDtcXG4gICAgICAgICAgICBmb250LWZhbWlseTogXFxcIk1pY3Jvc29mdCBZYUhlaVxcXCIsXFxcIuWui+S9k1xcXCIsXFxcIlNlZ29lIFVJXFxcIiwgXFxcIkx1Y2lkYSBHcmFuZGVcXFwiLCBIZWx2ZXRpY2EsIEFyaWFsLHNhbnMtc2VyaWYsIEZyZWVTYW5zLCBBcmltbztcXG4gICAgICAgIH1cXG4gICAgICAgICNkaXYye1xcbiAgICAgICAgICAgbWFyZ2luLXRvcDozNXB4O1xcbiAgICAgICAgfVxcbiAgICAgICAgLyrovpPlhaXmoYbniLblhYPntKAqL1xcbiAgICAgICAgZGl2LmJveCB7XFxuICAgICAgICAgICAgaGVpZ2h0OiA1M3B4O1xcbiAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiAyMHB4O1xcbiAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcXG4gICAgICAgIH1cXG4gICAgICAgIC8q6L6T5YWl5qGG5bC65a+4Ki9cXG4gICAgICAgIGZvcm0ge1xcbiAgICAgICAgICAgIGJhY2tncm91bmQ6IHRyYW5zcGFyZW50O1xcbiAgICAgICAgICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcXG4gICAgICAgICAgICB3aWR0aDogOTIlO1xcbiAgICAgICAgfVxcbiAgICAgICAgaW5wdXQsIGxhYmVsLCAubGllYiBidXR0b24ge1xcbiAgICAgICAgICAgIGJvcmRlcjogbm9uZTtcXG4gICAgICAgICAgICBvdXRsaW5lOiBub25lO1xcbiAgICAgICAgfVxcbiAgICAgICAgLyrlrZfkvZPkvY3nva4qL1xcbiAgICAgICAgaW5wdXQge1xcbiAgICAgICAgICAgIHdpZHRoOiA3NyU7XFxuICAgICAgICAgICAgaGVpZ2h0OiAzMnB4O1xcbiAgICAgICAgICAgIHBhZGRpbmctbGVmdDogNjZweDtcXG4gICAgICAgICAgICBwYWRkaW5nLXJpZ2h0OiAzMHB4O1xcbiAgICAgICAgfVxcbiAgICAgICAgbGFiZWwge1xcbiAgICAgICAgICAgIHRleHQtYWxpZ246Y2VudGVyO1xcbiAgICAgICAgICAgIGxpbmUtaGVpZ2h0OiA0M3B4O1xcbiAgICAgICAgICAgIGhlaWdodDogNDBweDtcXG4gICAgICAgICAgICB3aWR0aDogNjBweDtcXG4gICAgICAgICAgICBjdXJzb3I6IHBvaW50ZXI7XFxuICAgICAgICAgICAgcG9zaXRpb246IGFic29sdXRlO1xcbiAgICAgICAgfVxcbiAgICAgICAgLyrlsI/moYYqL1xcbiAgICAgICAgLmJhciBsYWJlbCB7XFxuICAgICAgICAgICAgYmFja2dyb3VuZDogI0QwNkI2QztcXG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA1NTUgNTU1cHggNTU1cHggNTU1O1xcbiAgICAgICAgICAgIHdpZHRoOiA2MHB4O1xcbiAgICAgICAgICAgIGZvbnQtc2l6ZTogMTNweDtcXG4gICAgICAgICAgICBjb2xvcjogI0Y5RjBEQTtcXG4gICAgICAgICAgICB0b3A6IDA7XFxuICAgICAgICAgICAgbGVmdDogM3B4O1xcbiAgICAgICAgfVxcbiAgICAgICAgLyrovpPlhaXmoYbmoLflvI8qL1xcbiAgICAgICAgLmJhciBpbnB1dCB7XFxuICAgICAgICAgICAgYmFja2dyb3VuZDogI0Y5RjBEQTtcXG4gICAgICAgICAgICBib3JkZXI6IDNweCBzb2xpZCAjRDA2QjZDO1xcbiAgICAgICAgICAgIGJvcmRlci1yYWRpdXM6IDRweDtcXG4gICAgICAgIH1cXG4gICAgICAgIC8q5YiX6KGoKi9cXG4gICAgICAgIC5saWViIGJ1dHRvbiB7XFxuICAgICAgICAgICAgdGV4dC1hbGlnbjpjZW50ZXI7XFxuICAgICAgICAgICAgbGluZS1oZWlnaHQ6NDBweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQwcHg7XFxuICAgICAgICAgICAgd2lkdGg6IDI3cHg7XFxuICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyO1xcbiAgICAgICAgICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcXG4gICAgICAgIH1cXG4gICAgICAgIC8q5YiX6KGoKi9cXG4gICAgICAgIC5saWViIGJ1dHRvbntcXG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA0cHg7XFxuICAgICAgICAgICAgYmFja2dyb3VuZDogI0QwNkI2QztcXG4gICAgICAgICAgICBmb250LXNpemU6IDEzcHg7XFxuICAgICAgICAgICAgY29sb3I6ICNGOUYwREE7XFxuICAgICAgICAgICAgdG9wOiAwO1xcbiAgICAgICAgICAgIHJpZ2h0OiAwcHg7XFxuICAgICAgICB9XFxuICAgICAgICAvKuWktOWDjyovXFxuICAgICAgICAucm91bmRfaWNvbntcXG4gICAgICAgICAgICB3aWR0aDogNDBweDtcXG4gICAgICAgICAgICBoZWlnaHQ6IDQwcHg7XFxuICAgICAgICAgICAgZGlzcGxheTogZmxleDtcXG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA1MCU7XFxuICAgICAgICAgICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcXG4gICAgICAgICAgICBqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcXG4gICAgICAgICAgICBvdmVyZmxvdzogaGlkZGVuO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgLmp4LXVsLCAuY2otdWwge1xcbiAgICAgICAgICAgIHotaW5kZXg6IDk5OTtcXG4gICAgICAgICAgICBwb3NpdGlvbjogZml4ZWQ7XFxuICAgICAgICAgICAgd2lkdGg6IDc3JTtcXG4gICAgICAgICAgIC8vIGxlZnQ6IDEwJTtcXG4gICAgICAgIH1cXG4gICAgICAgIC5qeC11bCwgLmNqLXVsIHtcXG4gICAgICAgICAgICBkaXNwbGF5OiBub25lO1xcbiAgICAgICAgfVxcbiAgICAgICAgLmp4LXVsIHtcXG4gICAgICAgICAgICB0b3A6IDMlO1xcbiAgICAgICAgfVxcbiAgICAgICAgLmNqLXVsIHtcXG4gICAgICAgICAgICB0b3A6IDMwJTtcXG4gICAgICAgIH1cXG4gICAgICAgIGxpIHtcXG4gICAgICAgICAgICBoZWlnaHQ6IDM1cHg7XFxuICAgICAgICAgICAgYm9yZGVyOiAxcHggc29saWQgIzAxYmZkYTtcXG4gICAgICAgICAgICBib3JkZXItcmFkaXVzOiA2cHg7XFxuICAgICAgICAgICAgYmFja2dyb3VuZDogcmdiYSgwLCAwLCAwLCAwLjgpO1xcbiAgICAgICAgICAgIGNvbG9yOiB3aGl0ZTtcXG4gICAgICAgICAgICBsaW5lLWhlaWdodDogMzVweDtcXG4gICAgICAgICAgICB0ZXh0LWFsaWduOiBjZW50ZXI7XFxuICAgICAgICAgICAgZm9udC1zaXplOiAxNnB4O1xcbiAgICAgICAgICAgIHdoaXRlLXNwYWNlOiBub3dyYXA7XFxuICAgICAgICAgICAgb3ZlcmZsb3c6IGhpZGRlbjtcXG4gICAgICAgICAgICB0ZXh0LW92ZXJmbG93OiBlbGxpcHNpcztcXG4gICAgICAgIH1cXG4gICAgICAgIGxpIHtcXG4gICAgICAgICAgICBsaXN0LXN0eWxlOiBub25lO1xcbiAgICAgICAgfVxcbiAgICAgICAgbGk6aG92ZXIge1xcbiAgICAgICAgICAgIGN1cnNvcjogcG9pbnRlcjtcXG4gICAgICAgICAgICBiYWNrZ3JvdW5kOiByZ2JhKDEzOSwgMTMxLCAxMjAsIDAuOSk7XFxuICAgICAgICB9XFxuICAgICAgICBsaVtjaGVjaz1cXFwidHJ1ZVxcXCJdIHtcXG4gICAgICAgICAgICBiYWNrZ3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50QnlJZChpZCk7XFxuICAgIH1cXG4gICAgXFxuICAgIGlmKG15U2V0ID09ICcnKXtcXG4gICAgICAgIERpZChcXFwiZGl2MlxcXCIpLmluc2VydEFkamFjZW50SFRNTCgnYWZ0ZXJCZWdpbicsJ1xcXFxcXG48aDQ+5o+Q56S677yaPGJyPuKRoOazqOaEj+aPkuS7tumAiemhue+8jOayoeacieaJi+WKqOWvvOWFpeaPkuS7tueahOivneS4jeeUqOWKqOWug+OAguWmguiuvue9ruS4jeW9k+S8muWvvOiHtOinhOWImeaXoOazleS9v+eUqO+8jDxicj7op6PlhrPlip7ms5XvvJrlsI/nqIvluo/pppbpobXngrnlh7vmgaLlpI3pu5jorqTmj5Lku7bvvJs8YnI+4pGh5YWo5bGA6K6+572u5aaC5p6c6YCJ5oup5LqG6Z2e6buY6K6k6YKj5LmI5YWo6YOo55qE6Kej5p6Q5Lya5L2/55So6L+Z5LiA6K6+572u77yM5LiN5oOz6L+Z5qC355qE6K+d6K+35aGr5YWl6buY6K6k77ybPGJyPuKRoue7v+iJsuS/neWtmOaMiemSruS7heS7heS/neWtmOmFjee9ruS4jeS8muWFs+mXreiuvue9rumhtemdou+8jOmFjee9ruWQjuaDs+S/neWtmOW5tuWFs+mXreiuvue9rumhtemdoueahOivneivt+eCueiTneiJsuaMiemSru+8mzxicj7ikaPpmIXor7vlrozmj5DnpLrngrnlhbPpl63liqDovb3lrozmlbTorr7nva7pobXpnaLvvIzlpoLlh7rpl67popjml6Dms5Xoh6rooYzop6PlhrPngrnlm77niYfov5vlhaXorrrlnZvlkJHmiJHlj43ppojjgII8YnI+PC9oND4nKTtcXG4gICAgfVxcbiAgICBcXG4gICAgdmFyIGJveERhdGEgPSBbXFxuICAgICAgICB7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLlpYcg5aWHXFxcIixcXG4gICAgICAgICAgICBpZDogXFxcInF5XFxcIixcXG4gICAgICAgICAgICB2YWx1ZTogc2V0dGluZ3MucXksXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLphbcg6YW3XFxcIixcXG4gICAgICAgICAgICBpZDogXFxcInlrXFxcIixcXG4gICAgICAgICAgICB2YWx1ZTogc2V0dGluZ3MueWssXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLohb4g6IW+XFxcIixcXG4gICAgICAgICAgICBpZDogXFxcInR4XFxcIixcXG4gICAgICAgICAgICB2YWx1ZTogc2V0dGluZ3MudHgsXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLmnpwg5p6cXFxcIixcXG4gICAgICAgICAgICBpZDogXFxcIm1nXFxcIixcXG4gICAgICAgICAgICB2YWx1ZTogc2V0dGluZ3MubWcsXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLlk6kg5ZOpXFxcIixcXG4gICAgICAgICAgICBpZDogXFxcImJsXFxcIixcXG4gICAgICAgICAgICB2YWx1ZTogc2V0dGluZ3MuYmwsXFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgdGl0bGU6IFxcXCLlhbYg5LuWXFxcIixcXG4gICAgICAgICAgICBpZDogXFxcIm90aFxcXCIsXFxuICAgICAgICAgICAgdmFsdWU6IHNldHRpbmdzLm90aCxcXG4gICAgICAgIH0sIHtcXG4gICAgICAgICAgICB0aXRsZTogXFxcIuWFqCDlsYBcXFwiLFxcbiAgICAgICAgICAgIGlkOiBcXFwicWp1XFxcIixcXG4gICAgICAgICAgICB2YWx1ZTogc2V0dGluZ3MucWp1LFxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIHRpdGxlOiBcXFwi5o+SIOS7tlxcXCIsXFxuICAgICAgICAgICAgaWQ6IFxcXCJjalxcXCIsXFxuICAgICAgICAgICAgdmFsdWU6IHNldHRpbmdzLmNqLFxcbiAgICAgICAgfVxcbiAgICBdO1xcblxcbiAgICB2YXIgaW5wdXRCb3ggPSBcXFwiXFxcIjtcXG4g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C5zcGxpdChcXFwiU2VsZWN0XFxcIilbMF07XFxuICAgICAgICAgICAgdmFyIGFyciA9ICQoaW5wdXRpZCkudmFsKCkuc3BsaXQoJywnKTtcXG4gICAgICAgICAgICBhcnIgPSBhcnJbMF0gPT0gJycgPyBbXSA6IGFycjtcXG4gICAgICAgICAgICAkKCcubXlDaG9pY2UnKS50ZXh0KGFycik7XFxuICAgICAgICAgICAgaWYgKGlucHV0aWQgIT09ICcjY2onICYmICQoJy5jai11bCcpLmNzcygnZGlzcGxheScpPT0nbm9uZScpIHtcXG4gICAgICAgICAgICAgICAgJCgnLmp4LXVsJykuc2xpZGVUb2dnbGUoMzAwKTtcXG4gICAgICAgICAgICAgICAgZS5zdG9wUHJvcGFnYXRpb24oKTtcXG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDE7IGkgPCBsZW47IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGp4TGlzdCA9ICQoJy5qeC11bCBsaTpub3QoLm15Q2hvaWNlKScpLmVxKGkpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGFyci5pbmNsdWRlcyhqeExpc3QudGV4dCgpKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGp4TGlzdC5hdHRyKCdjaGVjaycsICd0cnVlJyk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBqeExpc3QudW5iaW5kKCdjbGljaycpLmNsaWNrKGZ1bmN0aW9uKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbigpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkKHRoaXMpLmF0dHIoJ2NoZWNrJykgIT09IFxcXCJ0cnVlXFxcIikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmF0dHIoJ2NoZWNrJywgJ3RydWUnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJyLnVuc2hpZnQoJCh0aGlzKS50ZXh0KCkpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKGlucHV0aWQpLnZhbChhcnIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKCcubXlDaG9pY2UnKS50ZXh0KGFycik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5hdHRyKCdjaGVjaycsICdmYWxzZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBhID0gMDsgYSA8IGFyci5sZW5ndGg7IGErKykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFyclthXSA9PSAkKHRoaXMpLnRleHQoKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyci5zcGxpY2UoYSwgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJChpbnB1dGlkKS52YWwoYXJyKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKCcubXlDaG9pY2UnKS50ZXh0KGFycik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBlbHNlIGlmKCQoJy5qeC11bCcpLmNzcygnZGlzcGxheScpPT0nbm9uZScpe1xcbiAgICAgICAgICAgICAgICAkKCcuY2otdWwnKS5zbGlkZVRvZ2dsZSgyMDApO1xcbiAgICAgICAgICAgICAgICBlLnN0b3BQcm9wYWdhdGlvbigpO1xcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxlbjI7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNqTGlzdCA9ICQoJy5jai11bCBsaScpLmVxKGkpO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKCQoaW5wdXRpZCkudmFsKCkgPT0gY2pMaXN0LnRleHQoKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNqTGlzdC5hdHRyKCdjaGVjaycsICd0cnVlJyk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBjakxpc3QudW5iaW5kKCdjbGljaycpLmNsaWNrKGZ1bmN0aW9uKCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpICE9PSAwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQoaW5wdXRpZCkudmFsKCQodGhpcykudGV4dCgpKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5hdHRyKCdjaGVjaycsICd0cnVlJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykuc2libGluZ3MoKS5hdHRyKCdjaGVjaycsICdmYWxzZScpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgICAgICQoZG9jdW1lbnQpLm5vdCgkKCcueGxMaXN0JykpLmNsaWNrKGZ1bmN0aW9uKGUpIHtcXG4gICAgICAgICAgICAkKCcuangtdWwnKS5zbGlkZVVwKCk7XFxuICAgICAgICAgICAgJCgnLmNqLXVsJykuc2xpZGVVcCgpO1xcbiAgICAgICAgICAgICQoJy5saWViIGJ1dHRvbicpLnRleHQoJ+KYsCcpO1xcbiAgICAgICAgICAgICQoJy5saWViIGJ1dHRvbicpLmNzcygnYmFja2dyb3VuZCcsICcnKTtcXG4gICAgICAgIH0pO1xcbiAgICAgICAgJChmdW5jdGlvbigpe1xcbiAgICAgICAgICAgICQoJ2xhYmVsJykubW91c2V1cChmdW5jdGlvbigpe1xcbiAgICAgICAgICAgICAgICBsZXQgaW5wdXRpZCA9ICcjJyArICQodGhpcykubmV4dCgpLmF0dHIoJ2lkJyk7XFxuICAgICAgICAgICAgICAgIG9uZU9yRGJsKGlucHV0aWQpO1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHZhciBjb3VudCA9IDA7XFxuICAgICAgICAgICAgdmFyIHRpbWVyO1xcbiAgICAgICAgICAgIGZ1bmN0aW9uIG9uZU9yRGJsKGlucHV0aWQpe1xcbiAgICAgICAgICAgICAgICBjb3VudCsrO1xcbiAgICAgICAgICAgICAgICB0aW1lciA9IHdpbmRvdy5zZXRUaW1lb3V0KGZ1bmN0aW9uKCl7XFxuICAgICAgICAgICAgICAgICAgICBpZihjb3VudCA9PSAxKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXJyID0gJChpbnB1dGlkKS52YWwoKS5zcGxpdCgnLCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGFyci5zcGxpY2UoMCwgMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgJChpbnB1dGlkKS52YWwoYXJyKTtcXG4gICAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICAgICQoaW5wdXRpZCkudmFsKCcnKTtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHdpbmRvdy5jbGVhclRpbWVvdXQodGltZXIpO1xcbiAgICAgICAgICAgICAgICAgICAgY291bnQgPSAwO1xcbiAgICAgICAgICAgICAgICB9LDI2MClcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9KTtcXG4gICAgXFxuICAgIGZ1bmN0aW9uIFRvYXN0KG1zZyxkdXJhdGlvbil7ICBcXG4gICAgICAgIGR1cmF0aW9uPWlzTmFOKGR1cmF0aW9uKT8yMDAwOmR1cmF0aW9uOyAgXFxuICAgICAgICB2YXIgbSA9IGRvY3VtZW50LmNyZWF0ZUVsZ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YW1wbGUuaGlrZXJ2aWV3L2ZpbGVzL0RvY3VtZW50cy9jYWNoZS92aWRlb3MubTN1OCMnO1xcbiAgICB9LFxcbiAgICBkZWZhdWx0UGFyc2U6IGZ1bmN0aW9uKHVybCkge1xcbiAgICAgICAgcmV0dXJuIHVybDtcXG4gICAgfSxcXG4gICAgbWFvc3M6IGZ1bmN0aW9uKGp4dXJsLCByZWYsIGtleSkge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICB2YXIgZ2V0VmlkZW9JbmZvID0gZnVuY3Rpb24odGV4dCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdG9vbHMuQUVTKHRleHQsIGtleSwgaXYpO1xcbiAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgaWYgKHJlZikge1xcbiAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IHJlcXVlc3Qoanh1cmwsIHtcXG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAnUmVmZXJlcic6IHJlZlxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IHJlcXVlc3Qoanh1cmwpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAoaHRtbC5pbmRleE9mKCcmYnR3YWY9JykgIT0gLTEpIHtcXG4gICAgICAgICAgICAgICAgaHRtbCA9IHJlcXVlc3Qoanh1cmwgKyAnJmJ0d2FmJyArIGh0bWwubWF0Y2goLyZidHdhZiguKj8pXFxcIi8pWzFdLCB7XFxuICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgJ1JlZmVyZXInOiByZWZcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgdmFyIGl2ID0gaHRtbC5zcGxpdCgnX3Rva2VuID0gXFxcIicpWzFdLnNwbGl0KCdcXFwiJylbMF07XFxuICAgICAgICAgICAgZXZhbChodG1sLm1hdGNoKC92YXIgY29uZmlnID0ge1tcXFxcc1xcXFxTXSo/fS8pWzBdICsgJycpO1xcbiAgICAgICAgICAgIGlmIChjb25maWcudXJsLnNsaWNlKDAsIDQpICE9ICdodHRwJykge1xcbiAgICAgICAgICAgICAgICBjb25maWcudXJsID0gZGVjb2RlVVJJQ29tcG9uZW50KHRvb2xzLkFFUyhjb25maWcudXJsLCBcXFwiZHZ5WVJRbG5QUkNNZFFTZVxcXCIsIGl2KSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiBjb25maWcudXJsO1xcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIHJldHVybiAnJztcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgTExROiBmdW5jdGlvbihqeHVybCkge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICB2YXIgYXBpID0ganh1cmwuc3BsaXQoJz91cmw9JylbMF0gKyBcXFwiYXBpLnBocFxcXCI7XFxuICAgICAgICAgICAgdmFyIGI2NGlkID0gYmFzZTY0RW5jb2RlKGp4dXJsLnNwbGl0KCd1cmw9JylbMV0pO1xcbiAgICAgICAgICAgIHZhciBwYXJzZWlkID0gdG9vbHMuY2Flc2FyQ2lwaGVyKGI2NGlkLCAtMSk7XFxuICAgICAgICAgICAgdmFyIGpzb24gPSBKU09OLnBhcnNlKHJlcXVlc3QoYXBpLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICdSZWZlcmVyJzoganh1cmxcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCcsXFxuICAgICAgICAgICAgICAgIGJvZHk6ICd1cmw9JyArIHBhcnNlaWRc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AgbGV0IOS9nOiAhV/op4bnlYznn6XlkI3lpKfkvaw7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIGV2YWwoZmV0Y2goXFxcImh0dHA6Ly9xMTYuMjJ3ZWIub3JnL2Flcy5qc1xcXCIpKTtcXG4gICAgICAgICAgICB2YXIgdXJsID0gcGRmaChmZXRjaChcXFwiaHR0cDovL3ExNi4yMndlYi5vcmcvYXBpLnBocFxcXCIpLCBcXFwiYm9keSYmc2NyaXB0LDEmJkh0bWxcXFwiKTtcXG4gICAgICAgICAgICBldmFsKHVybC5yZXBsYWNlKFxcXCJkb2N1bWVudC5cXFwiLCBcXFwiXFxcIikucmVwbGFjZShcXFwibG9jYXRpb24uXFxcIiwgXFxcIlxcXCIpKTtcXG4gICAgICAgICAgICB2YXIgcGxheSA9IEpTT04ucGFyc2UoZmV0Y2goXFxcImh0dHA6Ly9xMTYuMjJ3ZWIub3JnL2FwaS5waHBcXFwiLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJDb29raWVcXFwiOiBjb29raWUuc3BsaXQoXFxcIjtcXFwiKVswXVxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBib2R5OiBcXFwidXJsPVxcXCIgKyBpbnB1dCxcXG4gICAgICAgICAgICAgICAgbWV0aG9kOiBcXFwiUE9TVFxcXCJcXG4gICAgICAgICAgICB9KSkudXJsO1xcbiAgICAgICAgICAgIGlmIChwbGF5LnN0YXJ0c1dpdGgoXFxcIi9cXFwiKSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcImh0dHBzOlxcXCIgKyBwbGF5O1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBwbGF5O1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICByZXR1cm4gXFxcIlxcXCI7XFxuICAg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NOYU4ocGFyYW0xLnRpbWVvdXQpKSB7XFxuICAgICAgICAgICAgcGFyYW0xLnRpbWVvdXQgPSAzMDAwO1xcbiAgICAgICAgfVxcbiAgICAgICAgcGFyYW0yID0gTVlfUlVMRTtcXG4gICAgICAgIHZhciByZXRTdHIgPSBtZXRob2RfZmV0Y2guaW52b2tlKGphdmFDb250ZXh0LCBwYXJhbTAsIHBhcmFtMSwgcGFyYW0yKTtcXG4gICAgICAgIHJldHVybiByZXRTdHIgPT0gbnVsbCA/IHJldFN0ciA6IHJldFN0ciArIFxcXCJcXFwiO1xcbiAgICB9O1xcbiAgICB2YXIgaG9zdCA9IHZpcFVybC5tYXRjaCgvXFxcXC4oLio/KVxcXFwvLyk7XFxuICAgIGhvc3QgPSBob3N0ID09IG51bGwgPyBudWxsIDogaG9zdFsxXTtcXG4gICAgdmFyIG5vVXJsID0gXFxcInRvYXN0Oi8v5o6l5pS25Yiw55qE6ZO+5o6l5Li6OiBcXFwiO1xcbiAgICBzd2l0Y2ggKG15U2V0LnFqdSkge1xcbiAgICAgICAgY2FzZSBcXFwi6buY6K6kXFxcIjpcXG4gICAgICAgICAgICBzd2l0Y2ggKGhvc3QpIHtcXG4gICAgICAgICAgICAgICAgY2FzZSBcXFwicXEuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LnR4O1xcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgIGNhc2UgXFxcImlxaXlpLmNvbVxcXCI6XFxuICAgICAgICAgICAgICAgICAgICBzdHIgPSBteVNldC5xeTtcXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICBjYXNlIFxcXCJ5b3VrdS5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQueWs7XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgY2FzZSBcXFwibWd0di5jb21cXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgc3RyID0gbXlTZXQubWc7XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgY2FzZSBcXFwiYmlsaWJpbGkuY29tXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgIHN0ciA9IG15U2V0LmJsO1xcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgICAgICAgICBzdHIgPSBob3N0ID09IG51bGwgPyBub1VybCA6IG15U2V0Lm90aDtcXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBicmVhaztcXG4gICAgICAgIGRlZmF1bHQ6XFxuICAgICAgICAgICAgc3RyID0gaG9zdCA9PSBudWxsID8gbm9VcmwgOiBteVNldC5xanU7XFxuICAgICAgICAgICAgYnJlYWs7XFxuICAgIH1cXG4gICAgaWYgKHBhcnNlTmFtZSkge1xcbiAgICAgICAgc3RyID0gcGFyc2VOYW1lO1xcbiAgICB9XFxuICAgIGxldCBteUNob2ljZSA9IHN0ci5zcGxpdCgnLCcpO1xcbiAgICBsZXQgbGVuID0gbXlDaG9pY2UubGVuZ3RoO1xcbiAgICBmb3IgKGxldCBpID0gMDsgaSA8IGxlbjsgaSsrKSB7XFxuICAgICAgICBsZXQgbmFtZSA9IG15Q2hvaWNlW2ldO1xcbiAgICAgICAgaWYgKHR5cGVvZiBQYXJzZVNbbmFtZV0gPT0gJ2Z1bmN0aW9uJykge1xcbiAgICAgICAgICAgIGxldCB1cmwgPSBQYXJzZVNbbmFtZV0odmlwVXJsKTtcXG4gICAgICAgICAgICBsZXQgUmVnID0gbmV3IFJlZ0V4cChcXFwibTN1OHxtcDR8XFxcIiArIHZpcFVybCArIFxcXCJ8aHR0cFxcXCIpO1xcbiAgICAgICAgICAgIGlmIChpICE9IGxlbiAtIDEgJiYgIVJlZy50ZXN0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