Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@✨𝐒𝐮𝐩𝐣𝐚𝐯✨@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi4pyo8J2QkvCdkK7wnZCp8J2Qo/CdkJrwnZCv4pyoIiwiYXV0aG9yIjoiQXJpZXMiLCJ1cmwiOiJoaWtlcjovL2VtcHR5IyNodHRwczovL3N1cGphdi5jb20vemgvIyNmeXBhZ2UiLCJ2ZXJzaW9uIjoyMDI0MDUxMSwiY29sX3R5cGUiOiJtb3ZpZV8zIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJ2aWRlbyIsImNsYXNzX3VybCI6IiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxuYWRkTGlzdGVuZXIoXCJvbkNsb3NlXCIsICgpID0+IHtcbiAgICBjbGVhck15VmFyKFwibmV4dFBhZ2VcIik7XG59KTtcbi8qXG5hZGRMaXN0ZW5lcihcIm9uUmVmcmVzaFwiLCAoKSA9PiB7XG4gICAgY2xlYXJNeVZhcihcIm5leHRQYWdlXCIpO1xufSk7XG4qL1xudmFyIGQgPSBbXVxudmFyIHJlcyA9IFtdXG5NWV9VUkwgPSBNWV9VUkwuc3BsaXQoXCIjI1wiKVsxXVxubGV0IHRydWVfdXJsID0gZ2V0TXlWYXIoXCJ1cmxcIiwgTVlfVVJMKTtcbmxldCBuZXh0UGFnZSA9IGdldE15VmFyKFwibmV4dFBhZ2VcIiwgXCJcIik7XG5pZiAobmV4dFBhZ2UgJiYgTVlfUEFHRSA+IDEpIHtcbiAgICB0cnVlX3VybCA9IG5leHRQYWdlO1xufVxudmFyIGh0bWwgPSBmZXRjaCh0cnVlX3VybCxKU09OLnBhcnN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IHtcXG4gICAgICAgIHZhciB0aXRsZSA9IHBkZmgodGFic1tpXSwnVGV4dCcpXFxuICAgICAgICByZXMucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IGdldE15VmFyKCd0YWInLCAnMCcpID09IGkgPyBnZXRIZWFkKHRpdGxlLCcjRkY2Njk5JykgOiB0aXRsZSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgIHVybDogcGQodGFic1tpXSwgJ2EmJmhyZWYnKSArICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKCBpKSA9PiB7XFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKCd0YWInLCBpKVxcbiAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwidXJsXFxcIiwgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LCBpKVxcbiAgICAgICAgfSlcXG4gICAgaWYgKGk9PTUpIHtcXG4gICAgICAgICByZXMucHVzaCh7XFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJibGFua19ibG9ja1xcXCJcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfVxcbiAgICB9XFxuICAgICAgICAgcmVzLnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgfSlcXG59XFxuICAgICB2YXIgcGFnaW5hdGlvbiA9IHBkZmEoaHRtbCwgXFxcIi5wYWdpbmF0aW9uJiZsaTpub3QoLnByZXYtcGFnZSk6bm90KC5uZXh0LXBhZ2UpXFxcIik7XFxuICAgIHZhciBjdXJyZW50dSA9IHBkZmgoaHRtbCxcXFwibGlua1tocmVmbGFuZz16aF0mJmhyZWZcXFwiKVxcblxcbiAgICB2YXIgZmlyc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wiICl7XFxuICAgZm9yICh2YXIgaiBpbiB0aXRsZSkge1xcblxcbiAgICB2YXIgdXJsID0gdXJsc1tqXSArICQoXFxcIiNub0xvYWRpbmcjXFxcIikubGF6eVJ1bGUoKGopID0+IHsgICAgXFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJ1cmxcXFwiLCBpbnB1dCk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH0sIGopXFxuXFxuICAgIGlmIChqPT0xKSB7XFxuICAgIHVybCA9ICQoJycsJ+mZpOmmlumhteWSjOWwvumhteS5i+WklueahOmhteeggScpLmlucHV0KChsYXN0dSxsYXN0cCk9PntcXG4gICAgICAgIGlmIChwYXJzZUludChpbnB1dCkgPiAxICYmIHBhcnNlSW50KGlucHV0KSA8IHBhcnNlSW50KGxhc3RwKSAmJiBwYXJzZUludChpbnB1dCkgJSAxID09IDApIHtcXG4gICAgICAgICAgICAgICAgdmFyIGp1bXB1ID0gbGFzdHUucmVwbGFjZSgvXFxcXC9wYWdlXFxcXC9cXFxcZCsvLCBcXFwiL3BhZ2UvXFxcIisgaW5wdXQpXFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJ1cmxcXFwiLCBqdW1wdSk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbn0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/or7fovpPlhaXmraPnoa7nmoTpobXnoIFcXFwifVxcbiAgICAgICAgICAgfSxsYXN0dSxsYXN0cCkgICAgICAgICAgICAgICAgICBcXG4gICAgICB9XFxuXFxuICAgICAgICByZXMucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IHBhZ2kgPT0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eVJ1bGUoKGopID0+IHsgICAgXFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJ5dXJsXFxcIiwgaW5wdXQpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAnaGlrZXI6Ly9lbXB0eSdcXG4gICAgICAgICAgICB9LCBqKVxcblxcbiAgICBpZiAoaj09MSkge1xcbiAgICB1cmwgPSAkKCcnLCfpmaTpppbpobXlkozlsL7pobXkuYvlpJbnmoTpobXnoIEnKS5pbnB1dCgobGFzdHUsbGFzdHApPT57XFxuICAgICAgICBpZiAocGFyc2VJbnQoaW5wdXQpID4gMSAmJiBwYXJzZUludChpbnB1dCkgPCBwYXJzZUludChsYXN0cCkgJiYgcGFyc2VJbnQoaW5wdXQpICUgMSA9PSAwKSB7XFxuICAgICAgICAgICAgICAgIHZhciBqdW1wdSA9IGxhc3R1LnJlcGxhY2UoL1xcXFwvcGFnZVxcXFwvXFxcXGQrLywgXFxcIi9wYWdlL1xcXCIrIGlucHV0KVxcbiAgICAgICAgICAgICAgICBwdXRNeVZhcihcXFwieXVybFxcXCIsIGp1bXB1KTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxufSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+ivt+i+k+WFpeato+ehrueahOmhteeggVxcXCJ9XFxuICAgICAgICAgICB9LGxhc3R1LGxhc3RwKSAgICAgICAgICAgICAgICAgIFxcbiAgICAgIH1cXG5cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IHBhZ2kgPT0gaiA/IGdldEhlYWQodGl0bGVbal0sJyNGRjY2OTknKSA6IHRpdGxlW2pdLCAgICAgICAgICAgXFxuICAgICAgICAgICAgdXJsOiB1cmwsXFxuIC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aXRsZTogJ+eZvuW6pue/u+ivkScsXFxuICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKCh0aXRsZSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ4NTovL2h0dHBzOi8vZmFueWkuYmFpZHUuY29tLyNqcC96aC9cXFwiICsgdGl0bGVcXG4gICAgICAgICAgICAgICAgfSwgdGl0bGUpXFxuICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ0RlZXBs57+76K+RJyxcXG4gICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHRpdGxlKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcIng1Oi8vaHR0cHM6Ly93d3cuZGVlcGwuY29tL3poL3RyYW5zbGF0b3ItbW9iaWxlI2phL3poL1xcXCIgKyB0aXRsZVxcbiAgICAgICAgICAgICAgICB9LCB0aXRsZSlcXG4gICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn6LC35q2M57+76K+RJyxcXG4gICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKHRpdGxlKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcIng1Oi8vaHR0cHM6Ly90cmFuc2xhdGUuZ29vZ2xlLmNvbS8/aGw9emgtQ04mc2w9amEmdGw9emgtQ04mdGV4dD1cXFwiICsgdGl0bGVcXG4gICAgICAgICAgICAgICAgfSwgdGl0bGUpXFxuICAgICAgICAgICAgfV1cXG4gICAgICAgIH1cXG4gICAgfSlcXG59XFxuXFxudmFyIGltZyA9IHBkKGh0bWwsIFxcXCIucG9zdC1tZXRhJiZpbWcmJnNyY1xcXCIpO1xcbmlmIChpbWcgIT09IG51bGwpIHtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIGltZzogaW1nLFxcbiAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCIsXFxuICAgICAgICBjb2xfdHlwZTogJ3BpY18xX2Z1bGwnLFxcbiAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICBsb25nQ2xpY2s6IFt7XFxuICAgICAgICAgICAgICAgIHRpdGxlOiAn5aSN5Yi25Zu+54mHJyxcXG4gICAgICAgICAgICAgICAganM6ICQudG9TdHJpbmcoKGltZykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJjb3B5Oi8vXFxcIiArIGltZ1xcbiAgICAgICAgICAgICAgICB9LCBpbWcpXFxuICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+aJk+W8gOWbvueJhycsXFxuICAgICAgICAgICAgICAgIGpzOiAkLnRvU3RyaW5nKChpbWcpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBpbWdcXG4gICAgICAgICAgICAgICAgfSwgaW1nKVxcbiAgICAgICAgICAgIH0sIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICfkuIvovb3lm77niYcnLFxcbiAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygoaW1nKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImRvd25sb2FkOi8vXFxcIiArIGltZ1xcbiAgICAgICAgICAgICAgICB9LCBpbWcpXFxuICAgICAgICAgICAgfV1cXG4gICAgICAgIH1cXG4gICAgfSk7XFxufVxcblxcbmQucHVzaCh7XFxuICAgIHRpdGxlOiAn4oCc4oCc4oCd4oCdPHNwYW4gc3R5bGU9XFxcImNvbG9yOiBcXFwiPjxzbWFsbD7wnZCS8J2QhPCdkJHwnZCV8J2QhPCdkJEg77ya5bey5bGP6JS9SlBB562J5peg55So57q/6LevPC9zbWFsbD48L3NwYW4+JyxcXG4gICAgdXJsOiDor4bliKvnoIEgKyAkKCcjbm9Mb2FkaW5nIycpXFxuICAgICAgICAubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgcmV0dXJuIFxcXCJoaWtlc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cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ0nICsgXFxcIkNEXFxcIi5ib2xkKClcXG4gICAgICAgICAgICAgICAgLmZvbnRjb2xvcihcXFwiIzhBMkJFMlxcXCIpICsgKGluZGV4ICsgMSlcXG4gICAgICAgICAgICAgICAgLnRvU3RyaW5nKClcXG4gICAgICAgICAgICAgICAgLmJvbGQoKVxcbiAgICAgICAgICAgICAgICAuZm9udGNvbG9yKFxcXCIjOEEyQkUyXFxcIikgKyBcXFwiOlxcXCIuZm9udGNvbG9yKFxcXCIjOEEyQkUyXFxcIiksXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9lbXB0eVxcXCIsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgIH0pO1xcbiAgICB9XFxuICAgIHNlcnZlci5mb3JFYWNoKChsaXN0LCBpbmRleCkgPT4ge1xcbiAgICAgICAgdmFyIHRpdGxlID0gcGRmaChsaXN0LCAnVGV4dCcpO1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogUGxheWxpbmVkLmluZGV4T2YodGl0bGUpID49IDAgPyAnXFxcXHTigJzigJzigJ3igJ0nICsgJy0nLmZvbnRjb2xvcihcXFwiIzI3NzY4NlxcXCIpICsgdGl0bGUuYm9sZCgpXFxuICAgICAgICAgICAgICAgIC5mb250Y29sb3IoXFxcIiMyNzc2ODZcXFwiKSArICctXFxcXHQnLmZvbnRjb2xvcihcXFwiIzI3NzY4NlxcXCIpIDogJ1xcXFx0LeKAnOKAnOKAneKAnScgKyB0aXRsZS5ib2xkKCkgKyAnLVxcXFx0JyxcXG4gICAgICAgICAgICB1cmw6IHBkZmgobGlzdCwgJ2EmJmRhdGEtbGluaycpICsgbGF6eSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgfS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xpdHkubGVuZ3RoKS5maWxsKHtSZWZlcmVyOmxvY2F0aW9ufSlcXG4gICAgICAgIH07XFxuICAgICAgICByZXR1cm4gcGxheWxpc3Q7ICAgICAgICBcXG5cXG4gICAgfSBlbHNlIGlmICgvY2luZHlleWVmaW5hbHxmYzJzdHJlYW18bWljaGFlbGFwcGx5c29tZS8udGVzdChsb2NhdGlvbikpIHtcXG5cXG4gICAgICAgIC8v4pGhRlNU57q/6LevXFxuICAgICAgICB2YXIgaHRtbCA9IGZldGNoKGxvY2F0aW9uLCB7XFxuICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAnUmVmZXJlcic6IHJlZmVyZXJcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KTtcXG4gICAgICAgIHZhciBzY3JpcHQgPSBwZGZoKGh0bWwsXFxcImJvZHk+c2NyaXB0JiZIdG1sXFxcIikucmVwbGFjZShcXFwiZXZhbFxcXCIsXFxcIlxcXCIpXFxuICAgICAgICB2YXIgdWFzID0gZXZhbChzY3JpcHQpXFxuICAgICAgICB2YXIgandwbGF5ZXIgPSB1YXMubWF0Y2goL1xcXCIoaHR0cHM/LiptM3U4Lio/KVxcXCIvKVsxXSAgICBcXG4gICAgICAgLy9sb2coandwbGF5ZXIpICBcXG4gICAgICAgIHJldHVybiBqd3BsYXllciArIFxcXCI7e1JlZmVyZXJAXFxcIiArIGxvY2F0aW9uICsgXFxcIn1cXFwiXFxuXFxuICAgIH0gZWxzZSBpZiAobG9jYXRpb24uaW5jbHVkZXMoXFxcInN0cmVhbXRhcGVcXFwiKSkge1xcblxcbiAgICAgICAgLy/ikaJTVOe6v+i3r1xcbiAgICAgICAgdmFyIGh0bWwgPSBmZXRjaChsb2NhdGlvbiwge1xcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgJ1JlZmVyZXInOiByZWZlcmVyXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSlcXG4gICAgICAgIHZhciBwYXR0ZXJuID0gaHRtbC5tYXRjaCgvXFxcXCgnIyguKiknXFxcXCkvKVsxXVxcbiAgICAgICAgdmFyIHNyYyA9IFxcXCJ2YXIgc3JjbGluayA9IFxcXCIgKyBodG1sLm1hdGNoKG5ldyBSZWdFeHAoXFxcIidcXFwiICsgcGF0dGVybiArIFxcXCIuKj89KFteO10rKVxcXCIpKVsxXVxcbiAgICAgICAgZXZhbChzcmMpXFxuICAgICAgICB2YXIgbGluayA9IFxcXCJodHRwczpcXFwiICsgc3JjbGluayArIFxcXCImc3RyZWFtPTFcXFwiXFxuICAgICAgICB2YXIgdXJsUGxheSA9IEpTT04ucGFyc2UoZmV0Y2gobGluaywge1xcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgXFxcIlJlZmVyZXJcXFwiOiBsb2NhdGlvbixcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIG9ubHlIZWFkZXJzOiB0cnVlXFxuICAgICAgICB9KSkudXJsXFxuICAgICAgICByZXR1cm4gdXJsUGxheSArIFxcXCI7e1JlZmVyZXJAXFxcIiArIGxvY2F0aW9uICsgXFxcIn1cXFwiXFxuXFxuICAgIH0gZWxzZSBpZiAoL2QwMDAwZHxkb29kfGRzMnBsYXkvLnRlc3QobG9jYXRpb24pKSB7XFxuXFxuICAgICAgICAvL+KRo0RT57q/6LevXFxuICAgICAgICB2YXIgaHRtbCA9IGZldGNoKGxvY2F0aW9uLCB7XFxuICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAnUmVmZXJlcic6IHJlZmVyZXJcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICAgICAgdmFyIHBhc3NfbWQ1ID0gZ2V0SG9tZShsb2NhdGlvbikgKyBodG1sLm1hdGNoKC9cXFxcL3Bhc3NfbWQ1W15cXFwiJ10rLylbMF1cXG4gICAgICAgIHZhciB0b2tlbiA9IGh0bWwubWF0Y2goL2Nvb2tpZUluZGV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HZhciBjb2RlID0gJyc7XFxuICAgICAgICAgICAgdmFyIHMgPSB0ZXh0LnJlcGxhY2UoL15ldmFsLywgJycpXFxuICAgICAgICAgICAgICAgIC5yZXBsYWNlKCdyZXR1cm4gcCcsICdjb2RlKz1wJylcXG4gICAgICAgICAgICBldmFsKHMpO1xcbiAgICAgICAgICAgIHJldHVybiBjb2RlO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgY29uc3QgaG9zdFJlZ2V4ID0gKHVybCkgPT4ge1xcbiAgICAgICAgICAgIGNvbnN0IG1hdGNoID0gdXJsLm1hdGNoKC9eKD86aHR0cHM/OlxcXFwvXFxcXC8pPyg/Ond3d1xcXFwuKT8oW2EtekEtWjAtOS1dezEsNjN9XFxcXC4pK1thLXpBLVpdezIsNn0vaSk7XFxuICAgICAgICAgICAgcmV0dXJuIG1hdGNoID8gbWF0Y2hbMF0gOiB1cmw7XFxuICAgICAgICB9O1xcblxcbiAgICAgICAgbGV0IGhvc3QgPSBob3N0UmVnZXgocmVmZXJlcilcXG5cXG4gICAgICAgIHZhciBodG1sID0gZmV0Y2gobG9jYXRpb24sIHtcXG4gICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgIFJlZmVyZXI6IGhvc3QsXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSlcXG4gICAgICAgIHZhciBpZnJhbWUgPSBwZGZhKGh0bWwsIFxcXCJpZnJhbWVcXFwiKTtcXG4gICAgICAgIFxcbiAgICAgICAgaWYgKGlmcmFtZS5sZW5ndGg+MCkge1xcbiAgICAgICAgICAgIGh0bWwgPSBmZXRjaChwZGZoKGlmcmFtZVswXSwgXFxcImlmcmFtZSYmc3JjXFxcIiksIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgUmVmZXJlcjogaG9zdCxcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9XFxuXFxuICAgICAgIC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CIpXFxuICAgICAgICByZXR1cm4gXFxcImNvbmZpcm06Ly/lkrMs5pys57q/6Lev6L+Z5Liq5Zyw5Z2A5bm25rKh5pyJ6Kej5p6Q77yM5pel5b+X5bey5omT5Y2w5Ye677yM5pWs6K+35p+l55yLLmpzOidoaWtlcjovL2VtcHR5JyBcXFwiXFxuICAgIH1cXG59KVwifV0iLCJpY29uIjoiaHR0cHM6Ly9pbWcudmludWEuY24vaW1hZ2VzL3pyd0s0LndlYnAiLCJwcm94eSI6IiJ9
Add Comment
Please, Sign In to add comment