xiaomianao666

插件名:global_觅影

Nov 20th, 2021
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_觅影@base64://Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICDop4XlvbEKLy8gQHZlcnNpb24gICAgICAyMC42LjEzCi8vIEBhdXRob3IgICAgICAgKG/LmOKXocuYbykKLy8gQGRlc2NyaXB0aW9uICDoh6rliqjliqDpgJ/ot7Pov4fop4bpopHlub/lkYrvvJvljp/nvZHpobXop6PmnpAgVklQIOinhumike+8m+aUr+aMgeS4gOmUruWkmue6v+i3r+iHquWKqOino+aekO+8m+makOiXj+inhumikeawtOWNsO+8m+W/q+aNt+aQnOe0oui3s+i9rOWcqOe6v+ingueci++8m+ixhueTo8K36YCJ5b2x6KeGIOWHgOWMlu+8m+iHquWumuS5ieino+aekO+8m+aJi+acuuaJq+eggeeciwovLyBAbm90ZSAgICAgICAgIOacgOi/keabtOaWsO+8muabtOaWsOino+aekO+8jOenu+mZpOS9jui0qOmHj+ino+aekO+8jOaPkOWNh+ino+aekOaViOeOh++8m+WinuWKoOaVsOW8oOWKoOi9veWbvu+8m+S8mOWMluiHquWKqOWIh+aNoue6v+i3r++8m+abtOaWsCBobHMg5bqT77yb5pu05paw5byV55So5paH5Lu255qEIGNkbiDln5/lkI0KLy8gQG5hbWVzcGFjZSAgICAob8uY4pehy5hvKQovLyBAaWNvbiAgICAgICAgIGh0dHBzOi8vcC5wc3RhdHAuY29tL29yaWdpbi9mZTY5MDAwMGM5MTQxOTU1YmJhYwovLyBAbGljZW5zZSAgICAgIEdQTCBMaWNlbnNlCi8vIEBpbmNsdWRlICAgICAgKgovLyBAZ3JhbnQgICAgICAgIEdNX3NldFZhbHVlCi8vIEBncmFudCAgICAgICAgR01fZ2V0VmFsdWUKLy8gQGdyYW50ICAgICAgICBHTV9kZWxldGVWYWx1ZQovLyBAZ3JhbnQgICAgICAgIHVu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ICgieyIgPT09IHQgfHwgIjsiID09PSB0KSAmJiBvKSAmJiAobiA9IG4uc2xpY2UoMCwgcyArIDEpICsgZSArIG4uc2xpY2UocyArIDEpLAogICAgcyArPSByLCBvID0gITEpOwogICAgcmV0dXJuIDAgIT09IG4uaW5kZXhPZihlKSAmJiAwICE9PSBuLmluZGV4T2YoIkAiKSAmJiAobiA9IGUgKyBuKSwgbjsKICB9CiAgZnVuY3Rpb24gZ2V0JCgpIHsKICAgIGZ1bmN0aW9uIG4obiwgZSkgewogICAgICB0cnkgewogICAgICAgIHJldHVybiBuKGUpOwogICAgICB9IGNhdGNoIChuKSB7CiAgICAgICAgcmV0dXJuIGU7CiAgICAgIH0KICAgIH0KICAgIGZ1bmN0aW9uIGUobiwgZSkgewogICAgICByZXR1cm4gbiAmJiAobChlKSB8fCBjKGUpKSA/IHJuLnRlc3QobikgPyBlLmdldEVsZW1lbnRzQnlDbGFzc05hbWUobi5zbGljZSgxKSkgOiBzbi50ZXN0KG4pID8gZS5nZXRFbGVtZW50c0J5VGFnTmFtZShuKSA6IGUucXVlcnlTZWxlY3RvckFsbChuKSA6IFtdOwogICAgfQogICAgZnVuY3Rpb24gdChuKSB7CiAgICAgIHJldHVybiBuLnJlcGxhY2UocG4sIChmdW5jdGlvbihuLCBlKSB7CiAgICAgICAgcmV0dXJuIGUudG9VcHBlckNhc2UoKTsKICAgICAgfSkpOwogICAgfQogICAgZnVuY3Rpb24gaShuLCBlLCB0KSB7CiAgICAgIGlmICh0KSB7CiAgICAgICAgZm9yIChsZXQgdCA9IG4ubGVuZ3RoOyB0LS07ICkgaWYgKCExID09PSBlLmNhbGwoblt0XSwgdCwgblt0XSkpIHJldHVybiBuOwogICAgICB9IGVsc2UgZm9yIChsZXQgdCA9IDAsIGkgPSBuLmxlbmd0aDsgdCA8IGk7IHQrKykgaWYgKCExID09PSBlLmNhbGwoblt0XSwgdCwgblt0XSkpIHJldHVybiBuOwogICAgICByZXR1cm4gbjsKICAgIH0KICAgIG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BmKG4pIHsKICAgICAgcmV0dXJuIHZvaWQgMCA9PT0gbjsKICAgIH0KICAgIGZ1bmN0aW9uIHUobikgewogICAgICByZXR1cm4gbnVsbCA9PT0gbjsKICAgIH0KICAgIGZ1bmN0aW9uIG0obikgewogICAgICByZXR1cm4gIWlzTmFOKHBhcnNlRmxvYXQobikpICYmIGlzRmluaXRlKG4pOwogICAgfQogICAgZnVuY3Rpb24gaChuKSB7CiAgICAgIHJldHVybiBwKG4pID8gZnVuY3Rpb24oZSwgdCkgewogICAgICAgIHJldHVybiBhKHQsIG4pOwogICAgICB9IDogZChuKSA/IG4gOiByKG4pID8gZnVuY3Rpb24oZSwgdCkgewogICAgICAgIHJldHVybiBuLmlzKHQpOwogICAgICB9IDogbiA/IGZ1bmN0aW9uKGUsIHQpIHsKICAgICAgICByZXR1cm4gdCA9PT0gbjsKICAgICAgfSA6IGZ1bmN0aW9uKCkgewogICAgICAgIHJldHVybiAhMTsKICAgICAgfTsKICAgIH0KICAgIGZ1bmN0aW9uIGcobiwgZSkgewogICAgICByZXR1cm4gZSA/IG4uZmlsdGVyKGUpIDogbjsKICAgIH0KICAgIGZ1bmN0aW9uIGIobikgewogICAgICByZXR1cm4gcChuKSAmJiBuLm1hdGNoKGZuKSB8fCBbXTsKICAgIH0KICAgIGZ1bmN0aW9uIHYobiwgZSwgdCwgaSkgewogICAgICBsZXQgbyA9IFtdLCBhID0gZChlKSwgciA9IGkgJiYgaChpKTsKICAgICAgZm9yIChsZXQgcyA9IDAsIGwgPSBuLmxlbmd0aDsgcyA8IGw7IHMrKykgaWYgKGEpIHsKICAgICAgICBsZXQgdCA9IGUobltzXSk7CiAgICAgICAgdC5sZW5ndGggJiYgZW4uYXBwbHkobywgdCk7CiAgICAgIH0gZWxzZSBmb3IgKGxldCBhID0gbltzXVtlXTsgIShudWxsID09IGEgfHwgaSAmJiByKC0xLCBhKSk7ICkgby5wdXNoKGEpLCBhID0gdCA/IGFbZV0gOiBudWxsOwogICAgICByZXR1cm4gbzsKICAgIH0KICAgIGZ1bmN0aW9uIHkobikgewogICAgICByZXR1cm4gMSA8IG4ubGVuZ3RoID8gWi5jYWxsKG4sIChmdW5jdGlvbihuLCBlLCB0KSB7CiAgICAgICAgcmV0dXJuIFkuY2FsbCh0LCBuKSA9PT0gZTsKICAgICAgfSkpIDogbjsKICAgIH0KICAgIGZ1bmN0aW9uIHgobiwgZSwgdCkgewogICAgICBpZiAoYyhuKSkgewogICAgICAgIGxldCBpID0gTC5nZXRDb21wdXRlZFN0eWxlKG4sIG51bGwpOwogICAgICAgIHJldHVybiB0ID8gaS5nZXRQcm9wZXJ0eVZhbHVlKGUpIHx8IHZvaWQgMCA6IGlbZV07CiAgICAgIH0KICAgIH0KICAgIGZ1bmN0aW9uIHcobiwgZSkgewogICAgICByZXR1cm4gcGFyc2VJbnQoeChuLCBlKSwgMTApIHx8IDA7CiAgICB9CiAgICBmdW5jdGlvbiBfKG4pIHsKICAgICAgcmV0dXJuIHVuLnRlc3Qobik7CiAgICB9CiAgICBmdW5jdGlvbiBrKG4sIGUpIHsKICAgICAgaWYgKHZvaWQgMCA9PT0gZSAmJiAoZSA9IF8obikpLCBlKSByZXR1cm4gbjsKICAgICAgaWYgKCFtbltuXSkgewogICAgICAgIGxldCBlID0gdChuKSwgbyA9ICIiICsgZVswXS50b1VwcGVyQ2FzZSgpICsgZS5zbGljZSgxKTsKICAgICAgICBpKChlICsgIiAiICsgZ24uam9pbihvICsgIiAiKSArIG8pLnNwbGl0KCIgIiksIChmdW5jdGlvbihlLCB0KSB7CiAgICAgICAgICBpZiAodCBpbiBobikgcmV0dXJuIG1uW25dID0gdCwgITE7CiAgICAgICAgfSkpOwogICAgICB9CiAgICAgIHJldHVybiBtbltuXTsKICAgIH0KICAgIGZ1bmN0aW9uIFMobiwgZSwgdCkgewogICAgICByZXR1cm4gdm9pZCAwID09PSB0ICYmICh0ID0gXyhuKSksIHQgfHwgYm5bbl0gfHwgIW0oZSkgPyBlIDogZSArICJweCI7C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1bmN0aW9uKG4pIHsKICAgICAgcmV0dXJuIGYobikgPyB0bi5jYWxsKHRoaXMpIDogdGhpc1swID4gKG4gPSArbikgPyBuICsgdGhpcy5sZW5ndGggOiBuXTsKICAgIH0sIGNuLmVxID0gZnVuY3Rpb24obikgewogICAgICByZXR1cm4gZG4odGhpcy5nZXQobikpOwogICAgfSwgY24uZmlyc3QgPSBmdW5jdGlvbigpIHsKICAgICAgcmV0dXJuIHRoaXMuZXEoMCk7CiAgICB9LCBjbi5sYXN0ID0gZnVuY3Rpb24oKSB7CiAgICAgIHJldHVybiB0aGlzLmVxKC0xKTsKICAgIH0sIGNuLmZpbHRlciA9IGZ1bmN0aW9uKG4pIHsKICAgICAgbGV0IGUgPSBoKG4pOwogICAgICByZXR1cm4gZG4oWi5jYWxsKHRoaXMsIChmdW5jdGlvbihuLCB0KSB7CiAgICAgICAgcmV0dXJuIGUuY2FsbChuLCB0LCBuKTsKICAgICAgfSkpKTsKICAgIH07CiAgICBsZXQgZm4gPSAvXFMrL2c7CiAgICBjbi5oYXNDbGFzcyA9IGZ1bmN0aW9uKG4pIHsKICAgICAgcmV0dXJuICEhbiAmJiBvbi5jYWxsKHRoaXMsIChmdW5jdGlvbihlKSB7CiAgICAgICAgcmV0dXJuIGMoZSkgJiYgZS5jbGFzc0xpc3QuY29udGFpbnMobik7CiAgICAgIH0pKTsKICAgIH0sIGNuLnJlbW92ZUF0dHIgPSBmdW5jdGlvbihuKSB7CiAgICAgIGxldCBlID0gYihuKTsKICAgICAgcmV0dXJuIHRoaXMuZWFjaCgoZnVuY3Rpb24obiwgdCkgewogICAgICAgIGModCkgJiYgaShlLCAoZnVuY3Rpb24obiwgZSkgewogICAgICAgICAgdC5yZW1vdmVBdHRyaWJ1dGUoZSk7CiAgICAgICAgfSkpOwogICAgICB9KSk7CiAgICB9LCBjbi5hdHRyID0gZnVuY3Rpb24obiwgZSkgewogICAgICBpZiAobikgewogICAgICAgIGlmIChwKG4pKSB7CiAgICAgICAgICBp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dHIoImNsYXNzIiwgIiIpOwogICAgfSwgZG4udW5pcXVlID0geSwgY24uYWRkID0gZnVuY3Rpb24obiwgZSkgewogICAgICByZXR1cm4gZG4oeSh0aGlzLmdldCgpLmNvbmNhdChkbihuLCBlKS5nZXQoKSkpKTsKICAgIH07CiAgICBsZXQgdW4gPSAvXi0tLywgbW4gPSB7fSwgaG4gPSBPLnN0eWxlLCBnbiA9IFsgIndlYmtpdCIsICJtb3oiLCAibXMiIF0sIGJuID0gewogICAgICBhbmltYXRpb25JdGVyYXRpb25Db3VudDogITAsCiAgICAgIGNvbHVtbkNvdW50OiAhMCwKICAgICAgZmxleEdyb3c6ICEwLAogICAgICBmbGV4U2hyaW5rOiAhMCwKICAgICAgZm9udFdlaWdodDogITAsCiAgICAgIGdyaWRBcmVhOiAhMCwKICAgICAgZ3JpZENvbHVtbjogITAsCiAgICAgIGdyaWRDb2x1bW5FbmQ6ICEwLAogICAgICBncmlkQ29sdW1uU3RhcnQ6ICEwLAogICAgICBncmlkUm93OiAhMCwKICAgICAgZ3JpZFJvd0VuZDogITAsCiAgICAgIGdyaWRSb3dTdGFydDogITAsCiAgICAgIGxpbmVIZWlnaHQ6ICEwLAogICAgICBvcGFjaXR5OiAhMCwKICAgICAgb3JkZXI6ICEwLAogICAgICBvcnBoYW5zOiAhMCwKICAgICAgd2lkb3dzOiAhMCwKICAgICAgekluZGV4OiAhMAogICAgfTsKICAgIGNuLmNzcyA9IGZ1bmN0aW9uKG4sIGUpIHsKICAgICAgaWYgKHAobikpIHsKICAgICAgICBsZXQgdCA9IF8obik7CiAgICAgICAgcmV0dXJuIG4gPSBrKG4sIHQpLCAyID4gYXJndW1lbnRzLmxlbmd0aCA/IHRoaXNbMF0gJiYgeCh0aGlzWzBdLCBuLCB0KSA6IG4gPyAoZSA9IFMobiwgZSwgdCksCiAgICAgICAgdGhpcy5lYWNoKChmdW5jdGlvbihpLCBvKSB7CiAgICAgICAgICBjKG8pICYmICh0ID8gby5zdHlsZS5zZXRQcm9wZXJ0eShuLCBlKSA6IG8uc3R5bGVbbl0gPSBlKTsKICAgICAgICB9KSkpIDogdGhpczsKICAgICAgfQogICAgICBmb3IgKGxldCBlIGluIG4pIHRoaXMuY3NzKGUsIG5bZV0pOwogICAgICByZXR1cm4gdGhpczsKICAgIH07CiAgICBsZXQgdm4gPSAvXlxzK3xccyskLzsKICAgIGNuLmRhdGEgPSBmdW5jdGlvbihuLCBlKSB7CiAgICAgIGlmICghbikgewogICAgICAgIGlmICghdGhpc1swXSkgcmV0dXJuOwogICAgICAgIGxldCBuID0ge307CiAgICAgICAgZm9yIChsZXQgZSBpbiB0aGlzWzBdLmRhdGFzZXQpIG5bZV0gPSBqKHRoaXNbMF0sIGUpOwogICAgICAgIHJldHVybiBuOwogICAgICB9CiAgICAgIGlmIChwKG4pKSByZXR1cm4gMiA+IGFyZ3VtZW50cy5sZW5ndGggPyB0aGlzWzBdICYmIGoodGhpc1swXSwgbikgOiBmKGUpID8gdGhpcyA6IHRoaXMuZWFjaCgoZnVuY3Rpb24odCwgaSkgewogICAgICAgIEkoaSwgbiwgZSk7CiAgICAgIH0pKTsKICAgICAgZm9yIChsZXQgZSBpbiBuKSB0aGlzLmRhdGEoZSwgbltlXSk7CiAgICAgIHJldHVybiB0aGlzOwogICAgfSwgaShbICEwLCAhMSBdLCAoZnVuY3Rpb24obiwgZSkgewogICAgICBpKFsgIldpZHRoIiwgIkhlaWdodCIgXSwgKGZ1bmN0aW9uKG4sIHQpIHsKICAgICAgICBjblsoZSA/ICJvdXRlciIgOiAiaW5uZXIiKSArIHRdID0gZnVuY3Rpb24oaSkgewogICAgICAgICAgcmV0dXJuIHRoaXNbMF0gPyBzKHRoaXNbMF0pID8gZSA/IHRoaXNbMF1bImlubmVyIiArIHRdIDogdGhpc1swXS5kb2N1bWVudC5kb2N1bWVudEVsZW1lbnRbImNsaWVudCIgKyB0XSA6IGwodGhpc1swXSkgPyAkKHRoaXNbMF0sIHQpIDogdGhpc1swXVsoZSA/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rpb24oZSwgdCkgewogICAgICAgIGlmIChjKHQpKSB7CiAgICAgICAgICAoZihuKSA/IEEodCkgOiBuKSA/ICh0LnN0eWxlLmRpc3BsYXkgPSB0Ll9fX2NkIHx8ICIiLCBBKHQpICYmICh0LnN0eWxlLmRpc3BsYXkgPSBmdW5jdGlvbihuKSB7CiAgICAgICAgICAgIGlmICh5bltuXSkgcmV0dXJuIHluW25dOwogICAgICAgICAgICBsZXQgZSA9IEgobik7CiAgICAgICAgICAgIEYuYm9keS5pbnNlcnRCZWZvcmUoZSwgbnVsbCk7CiAgICAgICAgICAgIGxldCB0ID0geChlLCAiZGlzcGxheSIpOwogICAgICAgICAgICByZXR1cm4gRi5ib2R5LnJlbW92ZUNoaWxkKGUpLCB5bltuXSA9ICJub25lIiA9PT0gdCA/ICJibG9jayIgOiB0OwogICAgICAgICAgfSh0LnRhZ05hbWUpKSkgOiAodC5fX19jZCA9IHgodCwgImRpc3BsYXkiKSwgdC5zdHlsZS5kaXNwbGF5ID0gIm5vbmUiKTsKICAgICAgICB9CiAgICAgIH0pKTsKICAgIH0sIGNuLmhpZGUgPSBmdW5jdGlvbigpIHsKICAgICAgcmV0dXJuIHRoaXMudG9nZ2xlKCExKTsKICAgIH0sIGNuLnNob3cgPSBmdW5jdGlvbigpIHsKICAgICAgcmV0dXJuIHRoaXMudG9nZ2xlKCEwKTsKICAgIH07CiAgICBsZXQgeG4gPSAiX19fY2UiLCB3biA9ICIuIiwgX24gPSB7CiAgICAgIGZvY3VzOiAiZm9jdXNpbiIsCiAgICAgIGJsdXI6ICJmb2N1c291dCIKICAgIH0sIGtuID0gewogICAgICBtb3VzZWVudGVyOiAibW91c2VvdmVyIiwKICAgICAgbW91c2VsZWF2ZTogIm1vdXNlb3V0IgogICAgfTsKICAgIGNuLm9mZiA9IGZ1bmN0aW9uKG4sIGUsIHQpIHsKICAgICAgbGV0IG8gPSB0aGlzOwogICAgICBpZiAoZihuKSkgdGhpcy5lYWNoKChmdW5jdGlvbihuLCBlKSB7CiAgICAgICAgKGMoZSkgfHwgbChlKSB8fCBzKGUpKSAmJiBQKGUpOwogICAgICB9KSk7IGVsc2UgaWYgKHAobikpIGQoZSkgJiYgKHQgPSBlLCBlID0gIiIpLCBpKGIobiksIChmdW5jdGlvbihuLCBpKSB7CiAgICAgICAgbGV0IGEgPSBNKGkpLCByID0gYVswXSwgZCA9IGFbMV0sIHAgPSBUKHIpOwogICAgICAgIG8uZWFjaCgoZnVuY3Rpb24obiwgaSkgewogICAgICAgICAgKGMoaSkgfHwgbChpKSB8fCBzKGkpKSAmJiAoUChpLCBwLCBkLCBlLCB0KSwgciAhPT0gcCAmJiBQKGksIHIsIGQsIGUsIHQpKTsKICAgICAgICB9KSk7CiAgICAgIH0pKTsgZWxzZSBmb3IgKGxldCBlIGluIG4pIHRoaXMub2ZmKGUsIG5bZV0pOwogICAgICByZXR1cm4gdGhpczsKICAgIH0sIGNuLm9uID0gZnVuY3Rpb24obiwgZSwgdCwgbywgcikgewogICAgICBsZXQgbSA9IHRoaXM7CiAgICAgIGlmICghcChuKSkgewogICAgICAgIGZvciAobGV0IGkgaW4gbikgdGhpcy5vbihpLCBlLCB0LCBuW2ldLCByKTsKICAgICAgICByZXR1cm4gdGhpczsKICAgICAgfQogICAgICByZXR1cm4gcChlKSB8fCAoZihlKSB8fCB1KGUpID8gZSA9ICIiIDogZih0KSA/ICh0ID0gZSwgZSA9ICIiKSA6IChvID0gdCwgdCA9IGUsCiAgICAgIGUgPSAiIikpLCBkKG8pIHx8IChvID0gdCwgdCA9IHZvaWQgMCksIG8gPyAoaShiKG4pLCAoZnVuY3Rpb24obiwgaSkgewogICAgICAgIGxldCBkID0gTShpKSwgcCA9IGRbMF0sIGYgPSBkWzFdLCB1ID0gVChwKSwgaCA9IHAgIT09IHUsIGcgPSBwIGluIF9uOwogICAgICAgIHUgJiYgbS5lYWNoKChmdW5jdGlvbihuLCBpKSB7CiAgICAgICAgICBpZiAoYyhpKSB8fCBsKGkpIHx8IHMoaSkpIHsKICAgICAgICAgICAgbGV0IG4gPSBmdW5jdGlvbiBuKHMpIHsKICAgICAgICAgICAgICBpZiAoaCAmJiAocy5fX19vdCA/IHMuX19fb3QgIT09IHAgOiBzLnR5cGUgIT09IHAgfHwgcy50YXJnZXRbIl9fX2kiICsgcF0gJiYgKGRlbGV0ZSBzLnRhcmdldFsiX19faSIgKyBwXSwKICAgICAgICAgICAgICBzLnN0b3BJbW1lZGlhdGVQcm9wYWdhdGlvbigpLCAxKSkpIHJldHVybjsKICAgICAgICAgICAgICBpZiAocy5uYW1lc3BhY2UgJiYgIVUoZiwgcy5uYW1lc3BhY2Uuc3BsaXQod24pKSkgcmV0dXJuOwogICAgICAgICAgICAgIGxldCBsID0gaTsKICAgICAgICAgICAgICBpZiAoZSkgewogICAgICAgICAgICAgICAgbGV0IG4gPSBzLnRhcmdldDsKICAgICAgICAgICAgICAgIGZvciAoOyFhKG4sIGUpOyApIHsKICAgICAgICAgICAgICAgICAgaWYgKG4gPT09IGkpIHJldHVybjsKICAgICAgICAgICAgICAgICAgaWYgKG4gPSBuLnBhcmVudE5vZGUsICFuKSByZXR1cm47CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBsID0gbiwgcy5fX19jZCA9ICEwOwogICAgICAgICAgICAgIH0gZWxzZSBpZiAoZyAmJiBzLl9fX290ID09PSBwICYmIGkgIT09IHMudGFyZ2V0ICYmIGkuY29udGFpbnMocy50YXJnZXQpKSByZXR1cm47CiAgICAgICAgICAgICAgcy5fX19jZCAmJiBPYmplY3QuZGVmaW5lUHJvcGVydHkocywgImN1cnJlbnRUYXJnZXQiLCB7CiAgICAgICAgICAgICAgICBjb25maWd1cmFibGU6ICEwLAogICAgICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuIGw7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgfSksIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShzLCAiZGF0YSIsIHsKICAgICAgICAgICAgICAgIGNvbmZpZ3VyYWJsZTogITAsCiAgICAgICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICByZXR1cm4gdDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICBsZXQgYyA9IG8uY2FsbChsLCBzLCBzLl9fX3RkKTsKICAgICAgICAgICAgICByICYmIFAoaSwgdSwgZiwgZSwgbiksICExID09PSBjICYmIChzLnByZXZlbnREZWZhdWx0KCksIHMuc3RvcFByb3BhZ2F0aW9uKCkpOwogICAgICAgICAgICB9OwogICAgICAgICAgICBuLmd1aWQgPSBvLmd1aWQgPSBvLmd1aWQgfHwgZG4uZ3VpZCsrLCB6KGksIHUsIGYsIGUsIG4pLCBoICYmIHooaSwgcCwgZiwgZSwgbik7CiAgICAgICAgICB9CiAgICAgICAgfSkpOwogICAgICB9KSksIHRoaXMpIDogdGhpczsKICAgIH0sIGNuLm9uZSA9IGZ1bmN0aW9uKG4sIGUsIHQsIGkpIHsKICAgICAgcmV0dXJuIHRoaXMub24obiwgZSwgdCwgaSwgITApOwogICAgfSwgY24ucmVhZHkgPSBmdW5jdGlvbihuKSB7CiAgICAgIGxldCBlID0gZnVuY3Rpb24oKSB7CiAgICAgICAgcmV0dXJuIHNldFRpbWVvdXQobiwgMCwgZG4pOwogICAgICB9OwogICAgICByZXR1cm4gImxvYWRpbmciID09PSBGLnJlYWR5U3RhdGUgPyBGLmFkZEV2ZW50TGlzdGVuZXIoIkRPTUNvbnRlbnRMb2FkZWQiLCBlKSA6IGUoKSwKICAgICAgdGhpczsKICAgIH0sIGNuLnRyaWdnZXIgPSBmdW5jdGlvbihuLCBlKSB7CiAgICAgIGlmIChwKG4pKSB7CiAgICAgICAgbGV0IGUgPSBNKG4pLCB0ID0gZVswXSwgaSA9IGVbMV0sIG8gPSBUKHQpOwogICAgICAgIGlmICghbykgcmV0dXJuIHRoaXM7CiAgICAgIC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BdLCAoZnVuY3Rpb24oZSwgaSkgewogICAgICAgICAgICAgICAgbiArPSBmdW5jdGlvbihuLCBlKSB7CiAgICAgICAgICAgICAgICAgIHJldHVybiAiJiIgKyBlbmNvZGVVUklDb21wb25lbnQobikgKyAiPSIgKyBlbmNvZGVVUklDb21wb25lbnQoZS5yZXBsYWNlKGpuLCAiXHJcbiIpKS5yZXBsYWNlKFNuLCAiKyIpOwogICAgICAgICAgICAgICAgfSh0Lm5hbWUsIGkpOwogICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgfQogICAgICAgICAgfQogICAgICAgIH0pKTsKICAgICAgfSkpLCBuLnNsaWNlKDEpOwogICAgfSwgY24udmFsID0gZnVuY3Rpb24obikgewogICAgICByZXR1cm4gYXJndW1lbnRzLmxlbmd0aCA/IHRoaXMuZWFjaCgoZnVuY3Rpb24oZSwgdCkgewogICAgICAgIGxldCBvID0gdC5tdWx0aXBsZSAmJiB0Lm9wdGlvbnM7CiAgICAgICAgaWYgKG8gfHwgSW4udGVzdCh0LnR5cGUpKSB7CiAgICAgICAgICBsZXQgZSA9IEoobikgPyBubi5jYWxsKG4sIFN0cmluZykgOiB1KG4pID8gW10gOiBbIG4gKyAiIiBdOwogICAgICAgICAgbyA/IGkodC5vcHRpb25zLCAoZnVuY3Rpb24obiwgdCkgewogICAgICAgICAgICB0LnNlbGVjdGVkID0gMCA8PSBlLmluZGV4T2YodC52YWx1ZSk7CiAgICAgICAgICB9KSwgITApIDogdC5jaGVja2VkID0gMCA8PSBlLmluZGV4T2YodC52YWx1ZSk7CiAgICAgICAgfSBlbHNlIHQudmFsdWUgPSBmKG4pIHx8IHUobikgPyAiIiA6IG47CiAgICAgIH0pKSA6IHRoaXNbMF0gJiYgRSh0aGlzWzBdKTsKICAgIH0sIGNuLmNsb25lID0gZnVuY3Rpb24oKSB7CiAgICAgIHJldHVybiB0aGlzLm1hcCgoZnVuY3Rpb24obiwgZSkgewogICAgICAgIHJldHVybiBlLmNsb25lTm9kZSgh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bnQgXSA6ICJURU1QTEFURSIgPT09IG4udGFnTmFtZSA/IG4uY29udGVudC5jaGlsZE5vZGVzIDogbi5jaGlsZE5vZGVzOwogICAgICB9KSkpKTsKICAgIH0sIGNuLmZpbmQgPSBmdW5jdGlvbihuKSB7CiAgICAgIHJldHVybiBkbih5KHYodGhpcywgKGZ1bmN0aW9uKHQpIHsKICAgICAgICByZXR1cm4gZShuLCB0KTsKICAgICAgfSkpKSk7CiAgICB9OwogICAgbGV0IFVuID0gL15ccyo8ISg/OlxbQ0RBVEFcW3wtLSl8KD86XF1cXXwtLSk+XHMqJC9nLCBUbiA9IC9eJHxebW9kdWxlJHxcLyhqYXZhfGVjbWEpc2NyaXB0L2ksIHFuID0gWyAidHlwZSIsICJzcmMiLCAibm9uY2UiLCAibm9Nb2R1bGUiIF07CiAgICByZXR1cm4gY24uYWZ0ZXIgPSBmdW5jdGlvbigpIHsKICAgICAgcmV0dXJuIFIoYXJndW1lbnRzLCB0aGlzLCAhMSwgITEsICExLCAhMCwgITApOwogICAgfSwgY24uYXBwZW5kID0gZnVuY3Rpb24oKSB7CiAgICAgIHJldHVybiBSKGFyZ3VtZW50cywgdGhpcywgITEsICExLCAhMCk7CiAgICB9LCBjbi5hcHBlbmRUbyA9IGZ1bmN0aW9uKCkgewogICAgICByZXR1cm4gUihhcmd1bWVudHMsIHRoaXMsICEwLCAhMSwgITApOwogICAgfSwgY24uYmVmb3JlID0gZnVuY3Rpb24oKSB7CiAgICAgIHJldHVybiBSKGFyZ3VtZW50cywgdGhpcywgITEsICEwKTsKICAgIH0sIGNuLmluc2VydEFmdGVyID0gZnVuY3Rpb24oKSB7CiAgICAgIHJldHVybiBSKGFyZ3VtZW50cywgdGhpcywgITAsICExLCAhMSwgITEsICExLCAhMCk7CiAgICB9LCBjbi5pbnNlcnRCZWZvcmUgPSBmdW5jdGlvbigpIHsKICAgICAgcmV0dXJuIFIoYXJndW1lbnRzLCB0aGlzLCAhMCwgITApOwogICAgfSwgY24ucHJlcGVuZCA9IGZ1bmN0aW9uKCkgewogICAgICByZXR1cm4gUihhcmd1bWVudHMsIHRoaXMsICExLCAhMCwgITAsICEwLCAhMCk7CiAgICB9LCBjbi5wcmVwZW5kVG8gPSBmdW5jdGlvbigpIHsKICAgICAgcmV0dXJuIFIoYXJndW1lbnRzLCB0aGlzLCAhMCwgITAsICEwLCAhMSwgITEsICEwKTsKICAgIH0sIGNuLnJlcGxhY2VXaXRoID0gZnVuY3Rpb24obikgewogICAgICByZXR1cm4gdGhpcy5iZWZvcmUobikucmVtb3ZlKCk7CiAgICB9LCBjbi5yZXBsYWNlQWxsID0gZnVuY3Rpb24obikgewogICAgICByZXR1cm4gZG4obikucmVwbGFjZVdpdGgodGhpcyksIHRoaXM7CiAgICB9LCBjbi53cmFwQWxsID0gZnVuY3Rpb24obikgewogICAgICBsZXQgZSA9IGRuKG4pLCB0ID0gZVswXTsKICAgICAgZm9yICg7dC5jaGlsZHJlbi5sZW5ndGg7ICkgdCA9IHQuZmlyc3RFbGVtZW50Q2hpbGQ7CiAgICAgIHJldHVybiB0aGlzLmZpcnN0KCkuYmVmb3JlKGUpLCB0aGlzLmFwcGVuZFRvKHQpOwogICAgfSwgY24ud3JhcCA9IGZ1bmN0aW9uKG4pIHsKICAgICAgcmV0dXJuIHRoaXMuZWFjaCgoZnVuY3Rpb24oZSwgdCkgewogICAgICAgIGxldCBpID0gZG4obilbMF07CiAgICAgICAgZG4odCkud3JhcEFsbChlID8gaS5jbG9uZU5vZGUoITApIDogaSk7CiAgICAgIH0pKTsKICAgIH0sIGNuLndyYXBJbm5lciA9IGZ1bmN0aW9uKG4pIHsKICAgICAgcmV0dXJuIHRoaXMuZWFjaCgoZnVuY3Rpb24oZSwgdCkgewogICAgICAgIGxldCBpID0gZG4odCksIG8gPSBpLmNvbnRlbnRzKCk7CiAgICAgICAgby5sZW5ndGggPyBvLndyYXBBbGwobikgOiBpLmFwcGVuZChuKTsKICAgICAgfSkpOwogICAgfSwgY24uaGFzID0gZnVuY3Rpb24obikgewogICAgICBsZXQgdCA9IHAobikgPyBmdW5jdGlvbih0LCBpKSB7CiAgICAgICAgcmV0dXJuIGUobiwgaSkubGVuZ3RoOwogICAgICB9IDogZnVuY3Rpb24oZSwgdCkgewogICAgICAgIHJldHVybiB0LmNvbnRhaW5zKG4pOwogICAgICB9OwogICAgICByZXR1cm4gdGhpcy5maWx0ZXIodCk7CiAgICB9LCBjbi5pcyA9IGZ1bmN0aW9uKG4pIHsKICAgICAgbGV0IGUgPSBoKG4pOwogICAgICByZXR1cm4gb24uY2FsbCh0aGlzLCAoZnVuY3Rpb24obiwgdCkgewogICAgICAgIHJldHVybiBlLmNhbGwobiwgdCwgbik7CiAgICAgIH0pKTsKICAgIH0sIGNuLm5leHQgPSBmdW5jdGlvbihuLCBlLCB0KSB7CiAgICAgIHJldHVybiBnKGRuKHkodih0aGlzLCAibmV4dEVsZW1lbnRTaWJsaW5nIiwgZSwgdCkpKSwgbik7CiAgICB9LCBjbi5uZXh0QWxsID0gZnVuY3Rpb24obikgewogICAgICByZXR1cm4gdGhpcy5uZXh0KG4sICEwKTsKICAgIH0sIGNuLm5leHRVbnRpbCA9IGZ1bmN0aW9uKG4sIGUpIHsKICAgICAgcmV0dXJuIHRoaXMubmV4dChlLCAhMCwgbik7CiAgICB9LCBjbi5ub3QgPSBmdW5jdGlvbihuKSB7CiAgICAgIGxldCBlID0gaChuKTsKICAgICAgcmV0dXJuIHRoaXMuZmlsdGVyKChmdW5jdGlvbih0LCBpKSB7CiAgICAgICAgcmV0dXJuICghcChuKSB8fCBjKGkpKSAmJiAhZS5jYWxsKGksIHQsIGkpOwogICAgICB9KSk7CiAgICB9LCBjbi5wYXJlbnQgPSBmdW5jdGlvbihuKSB7CiAgICAgIHJldHVybiBnKGRuKHkodih0aGlzLCAicGFyZW50Tm9kZSIpKSksIG4pOwogICAgfSwgY24uaW5kZXggPSBmdW5jdGlvbihuKSB7CiAgICAgIGxldCBlID0gbiA/IGRuKG4pWzBdI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wYWdlSW5mbywKICAgICAgICAgIHVzZWRUaW1lOiB0LAogICAgICAgICAgX2lkOiBNRVNTQUdFX0lELAogICAgICAgICAgYWN0aW9uOiAic25pZmYuYmxvYiIsCiAgICAgICAgICBmcm9tOiBsb2NhdGlvbi5ocmVmLAogICAgICAgICAgb3JpZ2luOiBsb2NhdGlvbi5ocmVmLAogICAgICAgICAgdXJsOiBuLAogICAgICAgICAgcGFyZW50OiAhMAogICAgICAgIH0sICIqIikgOiB3aW5kb3cucGFyZW50LnBvc3RNZXNzYWdlKHsKICAgICAgICAgIHBhZ2VJbmZvOiBwYWdlSW5mbywKICAgICAgICAgIHVzZWRUaW1lOiB0LAogICAgICAgICAgdGV4dDogIk5PVCBNQVRDSCBWSURFTyBVUkwiLAogICAgICAgICAgX2lkOiBNRVNTQUdFX0lELAogICAgICAgICAgYWN0aW9uOiAibG9nIiwKICAgICAgICAgIGZyb206IGxvY2F0aW9uLmhyZWYsCiAgICAgICAgICBvcmlnaW46IGxvY2F0aW9uLmhyZWYsCiAgICAgICAgICB1cmw6IG4sCiAgICAgICAgICBwYXJlbnQ6ICEwCiAgICAgICAgfSwgIioiKSk7CiAgICAgIH0KICAgICAgY29uc3QgaSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoImlmcmFtZVtzcmNdIik7CiAgICAgIGlmIChpKSB7CiAgICAgICAgY29uc3QgbiA9IGkuc2NyLCBlID0gZGVjb2RlVVJJQ29tcG9uZW50KG4pLm1hdGNoKC89KGh0dHBbXiY9XStcLihtM3U4fG1wNCkpLyk7CiAgICAgICAgKC9kcGxheWVyLy50ZXN0KG4pIHx8IGlzVmlkZW9VcmxSZWdleC50ZXN0KG4pKSAmJiB3aW5kb3cucGFyZW50LnBvc3RNZXNzYWdlKHsKICAgICAgICAgIHBhZ2VJbmZvOiBwYWdlSW5mbywKICAgICAgICAgIHVzZWRUaW1lOiB0LAogICAgICAgICAgdGV4dDogImlmcmFtZSBwbGF5ZXIgdXJsIiwKICAgICAgICAgIF9pZDogTUVTU0FHRV9JRCwKICAgICAgICAgIGFjdGlvbjogImxvZyIsCiAgICAgICAgICBmcm9tOiBsb2NhdGlvbi5ocmVmLAogICAgICAgICAgb3JpZ2luOiBsb2NhdGlvbi5ocmVmLAogICAgICAgICAgdXJsOiBlID8gZVsxXSA6IG4sCiAgICAgICAgICBpc01hdGNoOiBlICYmIGlzVmFsaWRWaWRlb1VybChlWzFdKSwKICAgICAgICAgIHBhcmVudDogITAKICAgICAgICB9LCAiKiIpLCBlICYmIGlzVmFsaWRWaWRlb1VybChlWzFdKSAmJiAoJCgiaWZyYW1lIikucmVtb3ZlKCksIHdpbmRvdy5wYXJlbnQucG9zdE1lc3NhZ2UoewogICAgICAgICAgcGFnZUluZm86IHBhZ2VJbmZvLAogICAgICAgICAgdXNlZFRpbWU6IHQsCiAgICAgICAgICBfaWQ6IE1FU1NBR0VfSUQsCiAgICAgICAgICBhY3Rpb246ICJwbGF5LnZpZGVvIiwKICAgICAgICAgIGZyb206IGxvY2F0aW9uLmhyZWYsCiAgICAgICAgICBvcmlnaW46IGxvY2F0aW9uLmhyZWYsCiAgICAgICAgICB1cmw6IGVbMV0udHJpbSgpLAogICAgICAgICAgcGFyZW50OiAhMAogICAgICAgIH0sICIqIikpOwogICAgICB9CiAgICAgIGlmICg0ZTMgPD0gdCAmJiBpKSByZXR1cm4gdm9pZCBjbGVhckludGVydmFsKGUpOwogICAgICBjb25zdCBvID0gMCA8ICQoInZpZGVvIikubGVuZ3RoOwogICAgICAodCA+PSAzZTQgfHwgMmUzIDw9IHQgJiYgbykgJiYgKGNsZWFySW50ZXJ2YWwoZSksIHdpbmRvdy5wYXJlbnQucG9zdE1lc3NhZ2UoewogICAgICAgIHBhZ2VJbmZvOiBwYWdlSW5mbywKICAgICAgICB1c2VkVGltZTogdCwKICAgICAgICBoYXNWaWRlbzogbywKICAgICAgICBoYXNJZnJhbWU6ICEhaSwKICAgICAgICBfaWQ6IE1FU1NBR0VfSUQsCiAgICA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W1zL2FsYnVtL2F2bGlzdGluZm8/cGFnZT0xJnNpemU9OTk5OSYiICsgZVswXSkudGhlbigoZnVuY3Rpb24obikgewogICAgICAgICAgICByZXR1cm4gbi5qc29uKCk7CiAgICAgICAgICB9KSkudGhlbigoZnVuY3Rpb24oZSkgewogICAgICAgICAgICBuID0gZS5kYXRhLmVwc29kZWxpc3Q7CiAgICAgICAgICB9KSk7CiAgICAgICAgICBsZXQgdCA9IDA7CiAgICAgICAgICBzZXRJbnRlcnZhbCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIGxldCBlID0gKygkKCIucXktZXBpc29kZS1udW0gLnNlbGVjdC1pdGVtLnNlbGVjdGVkIC5zZWxlY3QtbGluayIpLnRleHQoKSB8fCAwKTsKICAgICAgICAgICAgaWYgKGUgJiYgZSAhPT0gdCkgewogICAgICAgICAgICAgIHQgPSBlOwogICAgICAgICAgICAgIGxldCBpID0gblt0IC0gMV07CiAgICAgICAgICAgICAgaWYgKGkpIHsKICAgICAgICAgICAgICAgIGxldCBuID0gaS5wbGF5VXJsLnJlcGxhY2UoL2h0dHBzPzovLCBsb2NhdGlvbi5wcm90b2NvbCk7CiAgICAgICAgICAgICAgICBpZiAobiAhPT0gb29QbGF5VXJsKSB7CiAgICAgICAgICAgICAgICAgIGNvbnN0IGUgPSBvb1BsYXlVcmwgfHwgbG9jYXRpb24uaHJlZjsKICAgICAgICAgICAgICAgICAgb29QbGF5VXJsID0gbjsKICAgICAgICAgICAgICAgICAgY29uc3QgdCA9ICgkKCIucXktZXBpc29kZS1udW0gLnNlbGVjdC1pdGVtLnNlbGVjdGVkIC5pY29uLXRyIGltZyIpLmF0dHIoInNyYyIpIHx8ICIiKS5pbmNsdWRlcygiLXByZS0iKTsKICAgICAgICAgICAgICAgICAgRS5lbWl0KCJ1cmwuY2hhbmdlIiwgewogICAgICAgICAgICAgICAgICAgIG9sZFVybDogZSwKICAgICAgICAgICAgICAgICAgICBuZXdVcmw6IG4sCiAgICAgICAgICAgICAgICAgICAgYXV0b1BsYXk6ICF0CiAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgICAgfSksIDIwMCk7CiAgICAgICAgfQogICAgICAgIGlmIChpc01vYmlsZSkgcmV0dXJuOwogICAgICAgIGxldCB0ID0gMDsKICAgICAgICBza2lwQWRWaWRlb1dyYXBwZXIoKGZ1bmN0aW9uKCkgewogICAgICAgICAgaWYgKDAgPT09IHQgJiYgMCA8ICQoIi5jdXBpZC1wdWJsaWMtdGltZSIpLmxlbmd0aCAmJiAibm9uZSIgIT09ICQoIi5jdXBpZC1wdWJsaWMtdGltZSIpLmNzcygiZGlzcGxheSIpKSB7CiAgICAgICAgICAgIGdldEdsb2JhbCgiRGF0ZSIpLm5vdyA9IGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgIHJldHVybiAobmV3IHdpbmRvdy5EYXRlKS5nZXRUaW1lKCkgKyAodCArPSAxZTQpOwogICAgICAgICAgICB9LCBzZXRJbnRlcnZhbCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgdCA9IDA7CiAgICAgICAgICAgIH0pLCA2ZTUpOwogICAgICAgICAgfQogICAgICAgICAgY29uc3QgbiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5pcXAtcGxheWVyIHZpZGVvIik7CiAgICAgICAgICBpZiAobiAmJiAhbi5pc1NraXAgJiYgMSA8IG4ucmVhZHlTdGF0ZSAmJiAwIDwgJCgiLmJvdHRvbS1wdWJsaWMiKS5sZW5ndGggJiYgIm5vbmUiICE9PSAkKCIuYm90dG9tLXB1YmxpYyIpLmNzcygiZGlzcGxheSIpKSB7CiAgICAgICAgICAgIGNvbnN0IG4gPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIuc2tpcHBhYmxlLWFmdGVyIik7CiAgICAgICAgICAgIG4gJiYgIW4uaXNTa2lwQ2xpY2sgJiYgKGlzU2tpcENsaW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ucXVlcnlTZWxlY3RvcigiLmg1cGxheWVyLWRhc2hib2FyZCAuY29udHJvbC1wbGF5LWljb24iKS5jbGljaygpOwogICAgICAgICAgICAgIH0pLCAxMDApKTsKICAgICAgICAgICAgfSkpOwogICAgICAgICAgfSksIDFlMyk7CiAgICAgICAgfSkpLCAkJCgiLnF1YWxpdHktZGFzaGJvYXJkIC55b3VrdV92aXBfcGF5X2J0biwgLnF1YWxpdHktZGFzaGJvYXJkIC5sb2dpbi1jYW51c2UiLCAoZnVuY3Rpb24oKSB7CiAgICAgICAgICAkKCIucXVhbGl0eS1kYXNoYm9hcmQgLnlvdWt1X3ZpcF9wYXlfYnRuLCAucXVhbGl0eS1kYXNoYm9hcmQgLmxvZ2luLWNhbnVzZSIpLnJlbW92ZUNsYXNzKCJ5b3VrdV92aXBfcGF5X2J0biBkaXNhYmxlIGxvZ2luLWNhbnVzZSIpLAogICAgICAgICAgJCgiLnF1YWxpdHktaXRlbSIpLm9uKCJjbGljayIsIChmdW5jdGlvbigpIHsKICAgICAgICAgICAgc2V0VGltZW91dCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgJCgiLmg1cGxheWVyLWRhc2hib2FyZCAuY29udHJvbC1wbGF5LWljb24iKS5oYXNDbGFzcygiY29udHJvbC1wYXVzZS1pY29uIikgfHwgJCgiLmg1LWxheWVyLWNvbmF0aW5lciIpLmdldCgwKS5jbGljaygpLAogICAgICAgICAgICAgIHNldFRpbWVvdXQoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgJCgiLmg1cGxheWVyLWRhc2hib2FyZCAuY29udHJvbC1wbGF5LWljb24iKS5oYXNDbGFzcygiY29udHJvbC1wYXVzZS1pY29uIikgfHwgJCgiLmg1LWxheWVyLWNvbmF0aW5lciIpLmdldCgwKS5jbGljaygpOwogICAgICAgICAgICAgIH0pLCAxNTAwKTsKICAgICAgICAgICAgfSksIDE1MDApOwogICAgICAgICAgfSkpOwogICAgICAgIH0pKSk7CiAgICAgIH0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bWwiIF0sCiAgICAgIGtleXdvcmQoKSB7CiAgICAgICAgY29uc3QgbiA9IGxvY2F0aW9uLmhyZWYubWF0Y2goL3dkPShbXi0mXSspLyk7CiAgICAgICAgcmV0dXJuIG4gPyBuWzFdIDogZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiLm1vcmUgKyAudGl0bGUiKS50ZXh0Q29udGVudDsKICAgICAgfSwKICAgICAgcmVzdWx0OiAiaDMudGl0bGUgYSIKICAgIH0sCiAgICBwbGF5OiB7CiAgICAgIG1hdGNoOiAvXC9wbGF5LywKICAgICAgdGl0bGU6ICJoNCBmb250IiwKICAgICAganVtcDogIi50YWItY29udGVudC5zdHVpLXBhbm5lbF9iZCIKICAgIH0sCiAgICBoaWRlOiAiLmNvbnRhaW5lciB+ICpbaWRdLCBib2R5ID4gLmNvbnRhaW5lciA+IHBbc3R5bGVdIiwKICAgIGNzczogIlxuYm9keSB7cGFkZGluZy1ib3R0b206IDAgIWltcG9ydGFudDt9IgogIH0sIHsKICAgIG5hbWU6ICLlroznvo7nnIvnnIsiLAogICAgbWF0Y2g6ICJ3YW5tZWlray5tZSIsCiAgICBzZWFyY2g6IHsKICAgICAgbWF0Y2g6IC9cL3NvXC8vLAogICAgICBqdW1wOiAiLnN0dWktcGFnZSwgLnN0dWktcGFubmVsIiwKICAgICAganVtcFRvOiBbICIuc3R1aS12b2RsaXN0X19tZWRpYSBhIiwgLy4qcHJvamVjdFwvKFxkKykuKi8sICIvcGxheS8kMS0xLTEuaHRtbCIgXSwKICAgICAgcmVzdWx0OiAiaDMudGl0bGUgYSIKICAgIH0sCiAgICBwbGF5OiB7CiAgICAgIG1hdGNoOiAvXC9wbGF5LywKICAgICAgdGl0bGU6ICJoMSBhIiwKICAgICAganVtcDogIi0ucGxheWxpc3QiCiAgICB9LAogICAgaGlkZTogIi5jb250YWluZXIgfiAqW2lkXSIKICB9LCB7CiAgICBuYW1lOiAi5Zyo57q/5LmL5a62IiwKICAgIG1hdGNoOiAienh6ai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WF0Y2g6ICJiZGU0LmNvbSIsCiAgICBkaXNhYmxlOiAhMCwKICAgIHNlYXJjaDogewogICAgICBtYXRjaDogL1wvc2VhcmNoLywKICAgICAganVtcDogIi5zZWFyY2gtbGlzdCIsCiAgICAgIHJlc3VsdDogImEuaGVhZGVyIgogICAgfSwKICAgIHBsYXk6IHsKICAgICAgbWF0Y2g6IC9cL3BsYXkvLAogICAgICB0aXRsZTogIi5wbGF5ZXItd3JhcHBlciArIC5jb250YWluZXIgYSArIGEiLAogICAgICBqdW1wOiAiLnBsYXllci13cmFwcGVyICsgLmNvbnRhaW5lciIKICAgIH0sCiAgICBoaWRlOiAiYm9keTo6YWZ0ZXIsIGJvZHkgPiAqOm5vdChzY3JpcHQpICsgc2NyaXB0IH4gKltpZF0iCiAgfSwgewogICAgbmFtZTogIuelnumprCIsCiAgICBtYXRjaDogInNoZW5tYTQ0ODAuY29tIiwKICAgIHNlYXJjaDogewogICAgICBtYXRjaDogL1wvc2VhcmNoLywKICAgICAganVtcDogIi5zdHVpLXBhZ2UsIC5zdHVpLXBhbm5lbCIsCiAgICAgIGp1bXBUbzogWyAiLnN0dWktdm9kbGlzdCBhIiwgLy4qZGV0YWlsXC8oXGQrKS4qLywgIi9wbGF5LyQxLTEtMS8iIF0sCiAgICAgIHJlc3VsdDogIi5zdHVpLXZvZGxpc3RfX3RpdGxlIGEiCiAgICB9LAogICAgcGxheTogewogICAgICBtYXRjaDogL1wvcGxheS8sCiAgICAgIHRpdGxlOiAiaDEgYSIsCiAgICAgIGp1bXA6ICItLnN0dWktcGFubmVsIHwgYmVmb3JlIgogICAgfQogIH0sIHsKICAgIG5hbWU6ICJUVkIiLAogICAgbWF0Y2g6ICJoa3R2eWIuY29tIiwKICAgIHNlYXJjaDogewogICAgICBtYXRjaDogL1wvc2VhcmNoLywKICAgICAganVtcDogIi5teXVpLXBhZ2UsIC5teXVpLXBhbm5lbF9iZCB8IGJlZm9yZSwgLm15dWktcGFuZWwgfCBhcHBlbmQiL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RlcigpOwogIGxldCBwYWdlSW5mbyA9IHt9OwogIGNvbnN0IEFyciA9IHsKICAgIHNodWZmbGUobikgewogICAgICBmb3IgKGxldCBlID0gbi5sZW5ndGg7IDAgPCBlOyApIHsKICAgICAgICBjb25zdCB0ID0gX01hdGhmbG9vcihNYXRoLnJhbmRvbSgpICogZSk7CiAgICAgICAgZS0tOwogICAgICAgIGNvbnN0IGkgPSBuW2VdOwogICAgICAgIG5bZV0gPSBuW3RdLCBuW3RdID0gaTsKICAgICAgfQogICAgICByZXR1cm4gbjsKICAgIH0sCiAgICByYW5kb206IG4gPT4gbltfTWF0aGZsb29yKE1hdGgucmFuZG9tKCkgKiBuLmxlbmd0aCldCiAgfTsKICBsZXQgYWxsb3dTY2FsZSA9ICEwOwogIEUub24oImxvZyIsIChmdW5jdGlvbigpIHt9KSksIEUub24oInVybC5jaGFuZ2UiLCAoZnVuY3Rpb24obikgewogICAgbGV0IHtvbGRVcmw6IGUsIG5ld1VybDogdCwgYXV0b1BsYXk6IGl9ID0gbjsKICAgIHRyeSB7CiAgICAgIGFkZG9uR28oKTsKICAgIH0gY2F0Y2ggKG4pIHt9CiAgICBjb25zdCBvID0gQURET05TLmZpbmQoKGZ1bmN0aW9uKG4pIHsKICAgICAgcmV0dXJuIG4ucGxheSAmJiBuLnBsYXkudmlwICYmIElzKG4ucGxheS5tYXRjaCwgZSk7CiAgICB9KSksIGEgPSBBRERPTlMuZmluZCgoZnVuY3Rpb24obikgewogICAgICByZXR1cm4gbi5wbGF5ICYmIG4ucGxheS52aXAgJiYgSXMobi5wbGF5Lm1hdGNoLCB0KTsKICAgIH0pKTsKICAgIG8gJiYgYSAmJiBFLmVtaXQoInBsYXl1cmwuY2hhbmdlIik7CiAgfSkpLCBTRUFSQ0hfVVJMUyAmJiBJc05vdCgvZG91YmFuXC5jb20vKSAmJiAoU0VBUkNIX1VSTFMgPSAi6KeF5b2xICBodHRwczovL21vdmllLmRvdWJhbi5jb20vdGFnL1xuXG4iICsgU0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YXJJbnRlcnZhbCh0KTsKICAgICAgfSksIDUwMCk7CiAgICAgICFmdW5jdGlvbiBuKCkgewogICAgICAgIGNvbnN0IGUgPSAkKCIjc3ViamVjdC1oZWFkZXItY29udGFpbmVyIikuYXR0cigic3R5bGUiKTsKICAgICAgICBpZiAoZSkgewogICAgICAgICAgY29uc3QgbiA9IGUubWF0Y2goLzpccyooW147XSspOz8vKVsxXSwgdCA9IG4ucmVwbGFjZSgiKSIsICIsIDApIik7CiAgICAgICAgICB0cnkgewogICAgICAgICAgICBhZGRDc3MoIi5zdWItY292ZXI6OmJlZm9yZSB7YmFja2dyb3VuZDogLXdlYmtpdC1saW5lYXItZ3JhZGllbnQoYm90dG9tLCAiICsgbiArICIgMCUsICIgKyB0ICsgIiA1JSksIC13ZWJraXQtbGluZWFyLWdyYWRpZW50KHJpZ2h0LCAiICsgbiArICIgMCUsICIgKyB0ICsgIiA1JSksLXdlYmtpdC1saW5lYXItZ3JhZGllbnQodG9wLCAiICsgbiArICIgMCUsICIgKyB0ICsgIiA1JSksIC13ZWJraXQtbGluZWFyLWdyYWRpZW50KGxlZnQsICIgKyBuICsgIiAwJSwgIiArIHQgKyAnIDUlKTtjb250ZW50OiAiIjtib3R0b206IDA7cG9zaXRpb246IGFic29sdXRlO2xlZnQ6IDA7cmlnaHQ6IDA7dG9wOiAwO3dpZHRoOiAxMDJweDtoZWlnaHQ6IDE0MnB4O2JvcmRlci1yYWRpdXM6IDRweDt9Jyk7CiAgICAgICAgICB9IGNhdGNoIChuKSB7fQogICAgICAgIH0gZWxzZSBzZXRUaW1lb3V0KChmdW5jdGlvbigpIHsKICAgICAgICAgIG4oKTsKICAgICAgICB9KSwgMTAwKTsKICAgICAgfSgpOwogICAgfSkpOyBlbHNlIGlmIChJcygvbW92aWVcLmRvdWJhblwuY29tXC90YWdcLy8pKSBhZGRDc3MoIi5hc2lkZSwgLmV4dHJhLC5kYWxlX21vdmllX3RhZ19ib3R0b21fYmFubmVyIHsiICsgUHVyaW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ItdG9wOiAycHggc29saWQgcmdiYSgyMjQsIDIyNCwgMjI0LCAwLjI1KTt9Lm8tLXZpcC1saXN0IH4gLm8tLWp1bXAgLm8tLWNvbGxhcHNlOm5vdCguaXMtY29sbGFwc2UpIHtkaXNwbGF5OiBpbmxpbmUtYmxvY2sgIWltcG9ydGFudDt9Lm8tLWNvbGxhcHNlIHttaW4td2lkdGg6IDJlbTt9IjsKICAgICAgfQogICAgICBhc3luYyBmdW5jdGlvbiBnZXRLZXl3b3JkKG4pIHsKICAgICAgICByZXR1cm4gInN0cmluZyIgPT0gdHlwZW9mIG4gPyBhd2FpdCAkJCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICByZXR1cm4gJChuKS5lcSgwKS50ZXh0KCk7CiAgICAgICAgfSkpIDogImZ1bmN0aW9uIiA9PSB0eXBlb2YgbiA/IG4oJCkgOiBnZXRLZXl3b3JkRnJvbVVybChuKTsKICAgICAgfQogICAgICBhc3luYyBmdW5jdGlvbiBnb0p1bXAobiwgZSkgewogICAgICAgIGlmIChuIGluc3RhbmNlb2YgRnVuY3Rpb24pIG4oZSk7IGVsc2UgewogICAgICAgICAgY29uc3QgdCA9IGF3YWl0IGdldEtleXdvcmQoZSk7CiAgICAgICAgICBpZiAoIXQpIHJldHVybjsKICAgICAgICAgIChBcnJheS5pc0FycmF5KG4pID8gbiA6IG4uc3BsaXQoL1xzKixccyovKSkuZm9yRWFjaCgoZnVuY3Rpb24obikgewogICAgICAgICAgICBuID0gbi5zcGxpdCgvXHMqXHxccyovKSwgaW5zZXJ0U2VhcmNoQWRkb24odCwgblswXSwgblsxXSB8fCAiYWZ0ZXIiKTsKICAgICAgICAgIH0pKTsKICAgICAgICB9CiAgICAgIH0KICAgICAgZnVuY3Rpb24gZXhlY0FkZG9uSnMobikgewogICAgICAgIG4gJiYgbi5qcyBpbnN0YW5jZW9mIEZ1bmN0aW9uICYmIG4uanMoKTsKICAgICAgfQogICAgICBmdW5jdGlvbiBhZGRvbkdvKCkgewogICAgICAgIGNvbnN0IGFkZG9uID0gQURET05TLmZpbmQoKGZ1bmN0aW9uKG4pIHsKICAgICAgICAgIHJldHVybiAhbi5kaXNhYmxlICYmIElzKG4ubWF0Y2gpOwogICAgICAgIH0pKTsKICAgICAgICBpZiAoYWRkb24pIHsKICAgICAgICAgIGlmIChpc0ZpcnN0UnVuQWRkb24pIHsKICAgICAgICAgICAgbGV0IG4gPSBnZXRCYXNlU3R5bGUoKTsKICAgICAgICAgICAgYWRkb24uaGlkZSAmJiAobiArPSAiXG4iICsgYWRkb24uaGlkZSArICIgeyIgKyBQdXJpZnlTdHlsZSArICJ9IiksIGFkZG9uLmNzcyAmJiAobiArPSBhZGRvbi5jc3MpLAogICAgICAgICAgICBhZGRDc3Mobik7CiAgICAgICAgICB9CiAgICAgICAgICBfRCAmJiAkKCJvby1sb2dzIikubGVuZ3RoLCBfRCAmJiAkKCJvby1sb2dzIikubGVuZ3RoLCAkKChmdW5jdGlvbigpIHsKICAgICAgICAgICAgbGV0IF9NYXRobWluID0gTWF0aC5taW47CiAgICAgICAgICAgIGNvbnN0IHBsYXlBZGRvbiA9IGFkZG9uLnBsYXk7CiAgICAgICAgICAgIGlmIChwbGF5QWRkb24gJiYgSXMocGxheUFkZG9uLm1hdGNoKSkgewogICAgICAgICAgICAgIGlmIChwbGF5QWRkb24udmlwICYmICFkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIuby0tdmlwIikpIHsKICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGZvcm1hdFBhc3NlZFRpbWUobikgewogICAgICAgICAgICAgICAgICByZXR1cm4gKChEYXRlLm5vdygpIC0gbikgLyAxZTMpLnRvRml4ZWQoMikgKyAicyI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBhc3luYyBmdW5jdGlvbiB1cGRhdGVRcmNvZGUoKSB7CiAgICAgICAgICAgICAgICAgIGxldCB1cmwgPSAwIDwgYXJndW1lbnRzLmxlbmd0aCAmJiB2b2lkIDAgIT09IGFyZ3VtZW50c1swXSA/IGFyZ3VtZW50c1swXSA6IEhyZWY7CiAgICAgICAgICAgICAgICAgIGlzTW9iaWxlIHx8ICghcXJjb2RlQ29kZSAmJiAocXJjb2RlQ29kZSA9IGF3YWl0IGZldGNoQ2RuVXJsKCIvcXJjb2RlLWdlbmVyYXRvci8xLjQuNC9xcmNvZGUubWluLmpzIikpLAogICAgICAgICAgICAgICAgICBldmFsKHFyY29kZUNvZGUpLCBxcmNvZGUgJiYgKFFSID0gcXJjb2RlKDAsICJMIiksIFFSLmFkZERhdGEodXJsKSwgUVIubWFrZSgpLCAkKCIuby0tcXJjb2RlLWJveCIpLnJlbW92ZUNsYXNzKCJvLS1oaWRlIiksCiAgICAgICAgICAgICAgICAgICQoIi5vLS1xcmNvZGUiKS5odG1sKFFSLmNyZWF0ZUltZ1RhZygpKSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gZml4VXJsKG4pIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuIG4ucmVwbGFjZSgvW1w/I10uKy9nLCAiIik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBmaXhWaXBVcmwobikgewogICAgICAgICAgICAgICAgICBjb25zdCBlID0gQURET05TLmZpbmQoKGZ1bmN0aW9uKGUpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gSXMoZS5tYXRjaCwgbikgJiYgZS5wbGF5ICYmIGUucGxheS5maXhVcmw7CiAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgcmV0dXJuIGUgPyAhMCA9PT0gZS5wbGF5LmZpeFVybCA/IGZpeFVybChuKSA6IGUucGxheS5maXhVcmwobikgOiBuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gZ2V0VmlwVGFyZ2V0VXJsKCkgewogICAgICAgICAgICAgICAgICBpZiAob29QbGF5VXJsKSByZXR1cm4gb29QbGF5VXJsOwogICAgICAgICAgICAgICAgICBsZXQgbiA9IGxvY2F0aW9uLmhyZWYucmVwbGFjZSgvJj9cdys9aHR0cFteJl0rLywgIiIpLnJlcGxhY2UoLy4raHR0cC8sICJodHRwIik7CiAgICAgICAgICAgICAgICAgIHJldHVybiBuID0gZGVjb2RlVVJJKGZpeFZpcFVybChuKSB8fCBuKSwgbjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNhblBsYXlJblBhZ2UobikgewogICAgICAgICAgICAgICAgICByZXR1cm4gIWlzT25seURvd25sb2FkVmlkZW9VcmxSZWdleC50ZXN0KG4pICYmICghL1wvXC92d2VjYW0udGMucXEuY29tLy50ZXN0KG4pIHx8IElzKCJ2LnFxLmNvbSIpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHRvU2hvcnRWaWRlb1VybChuKSB7CiAgICAgICAgICAgICAgICAgIGNvbnN0IGUgPSBuLm1hdGNoKHNob3J0VmlkZW9VcmxSZWdleCkgfHwgbi5tYXRjaChzaG9ydFZpZGVvVXJsTG9zZVJlZ2V4KTsKICAgICAgICAgICAgICAgICAgcmV0dXJuIGUgPyBlWzFdLnNwbGl0KCIuIikuc2xpY2UoLTIpLmpvaW4oIi4iKSArICIgLi4uICIgKyBlW2UubGVuZ3RoIC0gMl0uc2xpY2UoLTEwKSArICI8c3Bhbj4gLiAiICsgZVtlLmxlbmd0aCAtIDFdICsgIjwvc3Bhbj4iIDogbjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGZpeElmcmFtZVVybChuKSB7CiAgICAgICAgICAgICAgICAgIHJldHVybiBuLnJlcGxhY2UoL1wvP1w/LisvLCAiIik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBnZXRJZnJhbWVJZChuKSB7CiAgICAgICAgICAgICAgICAgIHJldHVybiBpZnJhbWVzW2ZpeElmcmFtZVVybChuKV07CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBnZXRJZnJhbWUobikgewogICAgICAgICAgICAgICAgICByZXR1cm4gZnJhbWVzW2dldElmcmFtZUlkKG4pXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHNldElmcmFtZShuLCBlKSB7CiAgICAgICAgICAgICAgICAgIGlmcmFtZXNbZml4SWZyYW1lVXJsKG4pXSA9IGU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBhZGRJZnJhbWUobikgewogICAgICAgICAgICAgICAgICBsZXQgZSA9IDEgPCBhcmd1bWVudHMubGVuZ3RoICYmIHZvaWQgMCAhPT0gYXJndW1lbnRzWzFdID8gYXJndW1lbnRzWzFdIDogIm9vLWlmcmFtZXMiOwogICAgICAgICAgICAgICAgICBjb25zdCB0ID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiaWZyYW1lIik7CiAgICAgICAgICAgICAgICAgIHJldHVybiB0LmlkID0gdXVpZCgpLCB0LmZyYW1lYm9yZGVyID0gIjAiLCB0LnNjcm9sbGluZyA9ICJubyIsIHQuc2VhbWxlc3MgPSAhMCwKICAgICAgICAgICAgICAgICAgdC5zYW5kYm94ID0gImFsbG93LXNjcmlwdHMgYWxsb3ctc2FtZS1vcmlnaW4gYWxsb3ctZm9ybXMiLCBuICYmICh0LnNyYyA9IG4sIHNldElmcmFtZShuLCB0LmlkKSksCiAgICAgICAgICAgICAgICAgICQoZSkuYXBwZW5kKHQpLCB0OwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gcmVtb3ZlSWZyYW1lKCkgewogICAgICAgICAgICAgICAgICBsZXQgbiA9IDAgPCBhcmd1bWVudHMubGVuZ3RoICYmIHZvaWQgMCAhPT0gYXJndW1lbnRzWzBdID8gYXJndW1lbnRzWzBdIDogIm9vLWlmcmFtZXMgPiBpZnJhbWUiOwogICAgICAgICAgICAgICAgICBjb25zdCBlID0gJCgic3RyaW5nIiA9PSB0eXBlb2YgbiA/IG4uc3RhcnRzV2l0aCgib28taWZyYW1lcyIpID8gbiA6ICIjIiArIG4gOiBuLmlkID8gIiMiICsgbi5pZCA6IG4pLmdldCgwKTsKICAgICAgICAgICAgICAgICAgZSAmJiAoZS5zcmMgPSAiYWJvdXQ6YmxhbmsiLCAkKGUpLnJlbW92ZSgpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGVtcHR5SWZyYW1lcygpIHsKICAgICAgICAgICAgICAgICAgJCgib28taWZyYW1lcyA+IGlmcmFtZSIpLmVhY2goKGZ1bmN0aW9uKG4sIGUpIHsKICAgICAgICAgICAgICAgICAgICByZW1vdmVJZnJhbWUoZSk7CiAgICAgICAgICAgICAgICAgIH0pKSwgJCgib28taWZyYW1lcyIpLmVtcHR5KCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBnZXRTbmlmZlRpbWUobikgewogICAgICAgICAgICAgICAgICBjb25zdCBlID0gc25pZmZUaW1lc1tmaXhJZnJhbWVVcmwobildOwogICAgICAgICAgICAgICAgICByZXR1cm4gZSA/IGZvcm1hdFBhc3NlZFRpbWUoZSkgOiAiMHMiOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gc25pZmZTdGFydCgpIHsKICAgICAgICAgICAgICAgICAgaXNTbmlmZmluZyA9ICEwLCBpc0Vuc3VyZVBsYXlpbmdDaGVjayA9ICExLCBzbmlmZlRpbWVzdGFtcCA9IERhdGUubm93KCksIHNuaWZmVXJscyA9IFtdLAogICAgICAgICAgICAgICAgICBzbmlmZlVybHNLZXkgPSBbXSwgJCgiLm8tLXBsYXllciIpLmVtcHR5KCksICQoImh0bWwiKS5hZGRDbGFzcygiby0tc25pZmZpbmciKSwgJCgiLm8tLXZpcCIpLnJlbW92ZUNsYXNzKCJpcy1wbGF5LWluLXBhZ2UiKSwKICAgICAgICAgICAgICAgICAgYmxvYkNvdW50ID0gMCwgJCgiLm8tLXZpcC1pdGVtLmlzLWJsb2IiKS5yZW1vdmUoKSwgcHJvZ3Jlc3NJbnRlcnZhbCA9IHNldEludGVydmFsKChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAkKCIuby0tc25pZmYtcHJvZ3Jlc3MiKS5jc3MoewogICAgICAgICAgICAgICAgICAgICAgd2lkdGg6ICskKCIuby0tc25pZmYtcHJvZ3Jlc3MiKS5jc3MoIndpZHRoIikucmVwbGFjZSgiJSIsICIiKSArIC4xICsgIiUiCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgIH0pLCAyMDApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gc25pZmZEb25lKCkgewogICAgICAgICAgICAgICAgICBmb3JtYXRQYXNzZWRUaW1lKHNuaWZmU3RhcnRUaW1lKSwgaXNTbmlmZmluZyA9ICExLCBlbXB0eUlmcmFtZXMoKSwgJCgiLm8tLXNuaWZmLXByb2dyZXNzIikuY3NzKHsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogIjEwMCUiCiAgICAgICAgICAgICAgICAgIH0pLCBjbGVhckludGVydmFsKHByb2dyZXNzSW50ZXJ2YWwpLCAkKCIuby0tdmlwIikucmVtb3ZlQ2xhc3MoImlzLXNuaWZmaW5nIikuYWRkQ2xhc3MoImlzLXNuaWZmLWRvbmUiKSwKICAgICAgICAgICAgICAgICAgJCgiaHRtbCIpLnJlbW92ZUNsYXNzKCJvLS1zbmlmZmluZyIpLCAwIDwgc25pZmZVcmxzLmxlbmd0aCAmJiAwID09PSAkKCIuby0tc25pZmYtZG9uZSIpLmxlbmd0aCAmJiAkKCIuby0tdmlwLXBsYXkgLm8tLXNvdXJjZXMiKS5sZW5ndGggJiYgJCgiLm8tLXZpcC1wbGF5IC5vLS1zb3VyY2VzIikuYXBwZW5kKCc8c3BhbiBjbGFzcz0iby0tc25pZmYtZG9uZSI+4pyUPC9zcGFuPicpLAogICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAkKCIuby0tc25pZmYtcHJvZ3Jlc3MiKS5jc3MoewogICAgICAgICAgICAgICAgICAgICAgd2lkdGg6ICIwIgogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICB9KSwgMWUzKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHNuaWZmU3VjY2VzcyhuLCBlKSB7CiAgICAgICAgICAgICAgICAgIGNvbnN0IHQgPSAobiA9IGRlY29kZVVSSUNvbXBvbmVudChuLnRyaW0oKSkucmVwbGFjZSgvXihodHRwOik/XC9cLy8sICJodHRwczovLyIpKS5yZXBsYWNlKC9cPy4rLywgIiIpOwogICAgICAgICAgICAgICAgICBpZiAoc25pZmZVcmxzS2V5LmluY2x1ZGVzKHQpKSByZXR1cm47CiAgICAgICAgICAgICAgICAgIHNuaWZmVXJsc0tleS5wdXNoKHQpLCBzbmlmZlVybHMucHVzaChuKTsKICAgICAgICAgICAgICAgICAgY29uc3QgaSA9IHNuaWZmVXJscy5sZW5ndGgsIG8gPSBuLm1hdGNoKHZpZGVvRXh0UmVnZXgpLCBhID0gbyA/IG9bMV0gOiAidW5rbm93IjsKICAgICAgICAgICAgICAgICAgaWYgKCQoIi5vLS12aXAtcGxheSAuby0tc291cmNlcyIpLmFwcGVuZCgnPGEgX2hyZWY9IicgKyAoImJsb2IiID09PSBhID8gZSA6IG4pICsgJyIgY2xhc3M9ImlzLScgKyBhICsgJyI+57q/6LevJyArIGkgKyAiPC9hPiIpLAogICAgICAgICAgICAgICAgICAkKCIuby0tdmlwLXBsYXkgLm8tLXNvdXJjZXMgYSIpLm9mZigiY2xpY2siKS5vbigiY2xpY2siLCAoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgbiA9ICQodGhpcykuYXR0cigiX2hyZWYiKTsKICAgICAgICAgICAgICAgICAgICB1cGRhdGVRcmNvZGUobik7CiAgICAgICAgICAgICAgICAgICAgbGV0IGUgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIuby0tcGxheWVyIHZpZGVvIik7CiAgICAgICAgICAgICAgICAgICAgZSB8fCAoJCgiLm8tLXBsYXllciIpLnByZXBlbmQoJzx2aWRlbyBjbGFzcz0iby0tdmlkZW8iIHBvc3Rlcj0iJyArIFBsYXllclBsYXlpbmdDb3ZlciArICciIGNvbnRyb2xzIHBsYXlzaW5saW5lPjwvdmlkZW8+JyksCiAgICAgICAgICAgICAgICAgICAgZSA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5vLS1wbGF5ZXIgdmlkZW8iKSk7CiAgICAgICAgICAgICAgICAgICAgY29uc3QgdCA9IGdldEdsb2JhbCgiUGx5ciIpLCBpID0gZ2V0R2xvYmFsKCJIbHMiKSB8fCBnZXRHbG9iYWwoImhscyIpOwogICAgICAgICAgICAgICAgICAgIGlmICghcGxheWVyICYmIHQgJiYgKHBsYXllciA9IG5ldyB0KGUsIHsKICAgICAgICAgICAgICAgICAgICAgIGRlYnVnOiBfRCwKICAgICAgICAgICAgICAgICAgICAgIGludmVydFRpbWU6ICExLAogICAgICAgICAgICAgICAgICAgICAgYXV0b3BsYXk6ICEwLAogICAgICAgICAgICAgICAgICAgICAgdm9sdW1lOiAuNzUsCiAgICAgICAgICAgICAgICAgICAgICBzcGVlZDogewogICAgICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZDogMSwKICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uczogWyAuNSwgLjc1LCAxLCAxLjI1LCAxLjUsIDIgXQogICAgICAgICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgICAgICAgIHN0b3JhZ2U6IHsKICAgICAgICAgICAgICAgICAgICAgICAgZW5hYmxlZDogITAsCiAgICAgICAgICAgICAgICAgICAgICAgIGtleTogc3RvcmVQcmVmaXggKyAicGx5ciIKICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9KSwgcGxheWVyLm9uKCJlbnRlcmZ1bGxzY3JlZW4iLCAoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICAkKCJodG1sIikuYWRkQ2xhc3MoIm8tLWZ1bGxzY3JlZW4iKTsKICAgICAgICAgICAgICAgICAgICB9KSksIHBsYXllci5vbigiZXhpdGZ1bGxzY3JlZSIsIChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgICQoImh0bWwiKS5yZW1vdmVDbGFzcygiby0tZnVsbHNjcmVlbiIpOwogICAgICAgICAgICAgICAgICAgIH0pKSksICQoIi5vLS1wbGF5ZXItYmciKS5yZW1vdmUoKSwgL1wubTN1OC8udGVzdChuKSAmJiBpICYmIGkuaXNTdXBwb3J0ZWQoKSkgewogICAgICAgICAgICAgICAgICAgICAgY29uc3QgdCA9IG5ldyBpOwogICAgICAgICAgICAgICAgICAgICAgdC5sb2FkU291cmNlKG4pLCB0LmF0dGFjaE1lZGlhKGUpLCB0Lm9uKGkuRXZlbnRzLk1BTklGRVNUX1BBUlNFRCwgKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgICAgICBlLnBsYXkoKTsKICAgICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgICB9IGVsc2UgZS5zcmMgPSBuLCBlLmFkZEV2ZW50TGlzdGVuZXIoImxvYWRlZG1ldGFkYXRhIiwgKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgICAgZS5wbGF5KCk7CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgICAgICQoIi5vLS1wbGF5LXVybCIpLmh0bWwoJ+adpea6kO+8mjxhIF9ocmVmPSInICsgbiArICciPicgKyB0b1Nob3J0VmlkZW9VcmwobikgKyAiPC9hPiIgKy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iLm8tLXZpcC1wbGF5IC5vLS1zb3VyY2VzIGEiKS5nZXQoMCkuY2xpY2soKSwgJCgiLm8tLXZpcCIpLmFkZENsYXNzKCJpcy1zbmlmZi1zdWNjZXNzIiksCiAgICAgICAgICAgICAgICAgICAgJCgiLm8tLXZpcC1wbGF5IikucmVtb3ZlQ2xhc3MoImlzLWhpZGUiKSwgaXNFbnN1cmVQbGF5aW5nQ2hlY2sgPSAhMCwgc2V0VGltZW91dCgoZnVuY3Rpb24gZSgpIHsKICAgICAgICAgICAgICAgICAgICAgIGlmIChpc0Vuc3VyZVBsYXlpbmdDaGVjaykgcmV0dXJuIHBsYXllciAmJiBwbGF5ZXIucmVhZHkgJiYgMCA8IHBsYXllci5kdXJhdGlvbiA/IHZvaWQgKGlzRW5zdXJlUGxheWluZ0NoZWNrID0gITEpIDogKChuID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiLm8tLXZpcC1wbGF5IC5vLS1zb3VyY2VzIGEuaXMtYWN0aXZlICsgYSIpKSA/IG4uY2xpY2soKSA6IDEgPCBpICYmIChuID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiLm8tLXZpcC1wbGF5IC5vLS1zb3VyY2VzIGEiKSwKICAgICAgICAgICAgICAgICAgICAgIG4gJiYgbi5jbGljaygpKSwgdm9pZCBzZXRUaW1lb3V0KGUsIDQ1MDApKTsKICAgICAgICAgICAgICAgICAgICB9KSwgNGUzKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gc25pZmZGYWlsKCkgewogICAgICAgICAgICAgICAgICBzbmlmZkRvbmUoKSwgJCgiLm8tLXBsYXllci1iZyIpLmFkZENsYXNzKCJpcy1mYWlsIiksICQoIi5vLS12aXAiKS5hZGRDbGFzcygiaXMtc25pZmYtZmFpbCIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gaVNuaWZmKCkge30KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGhpa2VyU25pZmYoc25pZmZUaWNrSWQpIHsKICAgICAgICAgICAgICAgICAgaWYgKHNuaWZmVGlja0lkICE9PSBzbmlmZlRpY2spIHJldHVybjsKICAgICAgICAgICAgICAgICAgbGV0IHJlc291cmNlID0gZXZhbCh3aW5kb3cuZnlfYnJpZGdlX2FwcC5nZXROZXR3b3JrUmVjb3JkcygpKTsKICAgICAgICAgICAgICAgICAgcmVzb3VyY2UgPSByZXNvdXJjZS5maWx0ZXIoKGZ1bmN0aW9uKG4pIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gbi50aW1lc3RhbXAgPiBzbmlmZlRpbWVzdGFtcCAmJiBpc1ZhbGlkVmlkZW9Vcmwobi51cmwpOwogICAgICAgICAgICAgICAgICB9KSksIGlzU25pZmZpbmcgJiYgKHJlc291cmNlLmZvckVhY2goKGZ1bmN0aW9uKG4pIHsKICAgICAgICAgICAgICAgICAgICBzbmlmZlN1Y2Nlc3Mobi51cmwpOwogICAgICAgICAgICAgICAgICB9KSksIHNldFRpbWVvdXQoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgIGhpa2VyU25pZmYoc25pZmZUaWNrSWQpOwogICAgICAgICAgICAgICAgICB9KSwgMTAwKSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBtaXhpYVNuaWZmKG4pIHsKICAgICAgICAgICAgICAgICAgaWYgKG4gIT09IHNuaWZmVGljaykgcmV0dXJuOwogICAgICAgICAgICAgICAgICBsZXQgZSA9IFtdLCB0ID0gd2luZG93Lm14X2Jyb3dzZXJfb2JqLmdldHdlYmxvZ3MoImh0dHAiKTsKICAgICAgICAgICAgICAgICAgImVycm9yIiAhPT0gdCAmJiAoZSA9IHQudHJpbSgpLnNwbGl0KC9ccypcbltcblxzXSovKSwgZSA9IGUuZmlsdGVyKChmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGlzVmFsaWRWaWRlb1VybChuKTsKICAgICAgICAgICAgICAgICAgfSkpKSwgaXNTbmlmZmluZyAmJiAoZS5mb3JFYWNoKChmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgICAgc25pZmZTdWNjZXNzKG4pOwogICAgICAgICAgICAgICAgICB9KSksIHNldFRpbWVvdXQoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgIG1peGlhU25pZmYobik7CiAgICAgICAgICAgICAgICAgIH0pLCAxMDApKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGluc2VydFBsYXllckh0bWwoKSB7CiAgICAgICAgICAgICAgICAgIGxldCBuID0gMCA8IGFyZ3VtZW50cy5sZW5ndGggJiYgdm9pZCAwICE9PSBhcmd1bWVudHNbMF0gPyBhcmd1bWVudHNbMF0gOiAiIjsKICAgICAgICAgICAgICAgICAgY29uc3QgZSA9IGdldFZpcFBsYXllcigpOwogICAgICAgICAgICAgICAgICBpZiAoZSkgewogICAgICAgICAgICAgICAgICAgIGNvbnN0IHQgPSAnPGRpdiBjbGFzcz0iby0tcGxheWVyLWJnIiBzdHlsZT0iYmFja2dyb3VuZC1pbWFnZTogdXJsKCcgKyBnZXRDZG5JbWFnZVVybChQbGF5ZXJMb2FkaW5nQ292ZXJzW3BhcnNlSW50KERhdGUubm93KCkgLyAxZTMpICUgUGxheWVyTG9hZGluZ0NvdmVycy5sZW5ndGhdKSArICcpOyI+PGRpdiBjbGFzcz0iby0tcGxheWVyLW1hc2siPjwvZGl2PjxkaXYgY2xhc3M9Im8tLXNuaWZmLXByb2dyZXNzIj48L2Rpdj48ZGl2IGNsYXNzPSJvLS1zaWduIj4ob8uY4pehy5hvKTxzcGFuIGNsYXNzPSJvLS12ZXJzaW9uIj52ICcgKyBWRVJTSU9OICsgJzwvc3Bhbj48L2Rpdj48ZGl2IGNsYXNzPSJvLS1zbG9nYW4iPjxzdHJvbmc+6KeFPC9zdHJvbmc+PGRpdiBjbGFzcz0iby0tbG9hZGVyIj4nICsgSWNvbi5sb2FkZXIgKyAnPC9kaXY+PHN0cm9uZz7lvbE8L3N0cm9uZz48L2Rpdj48ZGl2IGNsYXNzPSJvLS1lcnJvci10ZXh0Ij7op6PmnpDlpLHotKXvvIzlj6/ku6XlsJ3or5Xkvb/nlKjljZXkuKrop6PmnpDmkq3mlL7vvIzmiJbogIXliLDlhbblroPmraPniYjnvZHnq5nkuIrop6PmnpA8L2Rpdj48L2Rpdj4nOwogICAgICAgICAgICAgICAgICAgICQoZSkuZW1wdHkoKS5hcHBlbmQoJzxkaXYgY2xhc3M9Im8tLXBsYXllciI+JyArIHQgKyBuICsgIjwvZGl2PiIpLCAkKCIuby0tcGxheWVyIikucGFyZW50KCkuYWRkQ2xhc3MoIm8tLXBsYXllci1ib3giKTsKICAgICAgICAgICAgICAgICAgICBjb25zdCBpID0gRGF0ZS5ub3coKSwgbyA9IHNldEludGVydmFsKChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgIERhdGUubm93KCkgLSBpID4gOWU0ICYmIGNsZWFySW50ZXJ2YWwobyksICQoIi5vLS1wbGF5ZXItYm94ID4gKjpub3QoLm8tLXBsYXllcikiKS5yZW1vdmUoKTsKICAgICAgICAgICAgICAgICAgICB9KSwgMWUzKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gc25pZmYobikgewogICAgICAgICAgICAgICAgICBpZiAoaXNTbmlmZmluZyAmJiBzbmlmZkRvbmUoKSwgc25pZmZTdGFydCgpLCBpc0FsbG93SWZyYW1lU25pZmYpIGlTbmlmZigpOyBlbHNlIGlmIChpc0FsbG93SGlrZXJTbmlmZikgaGlrZXJTbmlmZihuKTsgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCFpc0FsbG93TWl4aWFTbmlmZikgcmV0dXJuIHZvaWQgc25pZmZEb25lKCk7CiAgICAgICAgICAgICAgICAgICAgbWl4aWFTbmlmZihuKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICBpbnNlcnRQbGF5ZXJIdG1sKGlzTW9iaWxlID8gIiIgOiAnPGRpdiBjbGFzcz0iby0tdmlwLXBsYXkgaXMtaGlkZSI+PGRpdiBjbGFzcz0iby0tc291cmNlcyI+PC9kaXY+PGRpdiBjbGFzcz0iby0tcGxheS11cmwiPjwvZGl2PjwvZGl2PicpLAogICAgICAgICAgICAgICAgICBpc01vYmlsZSAmJiAoJCgiLm8tLXZpcC1wbGF5IikucmVtb3ZlKCksICQoIi5vLS12aXAtcGFuZWwiKS5hZnRlcignPGRpdiBjbGFzcz0iby0tdmlwLXBsYXkgaXMtaGlkZSI+PGRpdiBjbGFzcz0iby0tc291cmNlcyI+PC9kaXY+PGRpdiBjbGFzcz0iby0tcGxheS11cmwiPjwvZGl2PjwvZGl2PicpKSwKICAgICAgICAgICAgICAgICAgcGF1c2VQbGF5KCksIHNuaWZmVXJscyA9IFtdLCBzbmlmZlRpbWVzID0ge30sIHNuaWZmSW5kZXggPSAtMSwgZ29TbmlmZigpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gZ29TbmlmZigpIHsKICAgICAgICAgICAgICAgICAgaWYgKCFpc1NuaWZmaW5nKSByZXR1cm47CiAgICAgICAgICAgICAgICAgIHNuaWZmSW5kZXggKz0gMTsKICAgICAgICAgICAgICAgICAgY29uc3QgbiA9IFZfVVtzbmlmZkluZGV4XSwgZSA9IChzbmlmZkluZGV4ICsgMSkgLyAoVl9VLmxlbmd0aCArIDEpLCB0ID0gKHNuaWZmVXJscy5sZW5ndGggKyAxKSAvIE1BWF9TTklGRl9QTEFZX0NPVU5ULCBpID0gX01hdGhtaW4oMTAgKiAoMi41ICogZSArIDIuNSAqIHQgKyA1ICogX01hdGhtYXgoZSwgdCkgKyAuNSksIDk5KS50b0ZpeGVkKDQpICsgIiUiOwogICAgICAgICAgICAgICAgICBpZiAoJCgiLm8tLXNuaWZmLXByb2dyZXNzIikuY3NzKHsKICAgICAgICAgICAgICAgICAgICB3aWR0aDogaQogICAgICAgICAgICAgICAgICB9KSwgIW4pIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBuID0gc2V0SW50ZXJ2YWwoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgICAgaWYgKDAgPT09ICQoIm9vLWlmcmFtZXMgPiBpZnJhbWUiKS5sZW5ndGggJiYgKGNsZWFySW50ZXJ2YWwobiksIHNuaWZmRG9uZSgpLCAwID09PSBzbmlmZlVybHMubGVuZ3RoKSkgewogICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcigiLm8tLXZpcC1pdGVtLmlzLWJsb2IiKTsKICAgICAgICAgICAgICAgICAgICAgICAgbiA/IG4uY2xpY2soKSA6IHNuaWZmRmFpbCgpOwogICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0pLCAxZTMpOwogICAgICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICBpZiAoc25pZmZVcmxzLmxlbmd0aCA+PSBNQVhfU05JRkZfUExBWV9DT1VOVCArIChwbGF5ZXIgJiYgcGxheWVyLnJlYWR5ICYmIDAgPCBwbGF5ZXIuZHVyYXRpb24gPyAtMSA6IDIpIHx8IHNuaWZmVXJscy5sZW5ndGggPj0gTUFYX1NOSUZGX1BMQVlfQ09VTlQgLyAyICYmIERhdGUubm93KCkgLSBzbmlmZlRpbWVzdGFtcCA+IDFlMyAqIF9NYXRobWF4KDI1MCAtIDEwICogc25pZmZVcmxzLmxlbmd0aCwgMTUwKSkgcmV0dXJuIHZvaWQgc25pZmZEb25lKCk7CiAgICAgICAgICAgICAgICAgIGNvbnN0IG8gPSBnZXRWaXBUYXJnZXRVcmwoKSwgYSA9IE1fVmlwVXJsKG4pICsgbzsKICAgICAgICAgICAgICAgICAgc25pZmZUaW1lc1tmaXhJZnJhbWVVcmwoYSldID0gRGF0ZS5ub3coKTsKICAgICAgICAgICAgICAgICAgY29uc3QgciA9IGFkZElmcmFtZShhKSwgcyA9IGlzTW9iaWxlID8gNyA6IDU7CiAgICAgICAgICAgICAgICAgIHIub25sb2FkID0gZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICByZW1vdmVJZnJhbWUociwgIlRJTUVPVVQiKTsKICAgICAgICAgICAgICAgICAgICB9KSwgMTJlMyk7CiAgICAgICAgICAgICAgICAgIH0sIHNldFRpbWVvdXQoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgIHJlbW92ZUlmcmFtZShyLCAiTUFYIFRJTUVPVVQiKSwgc2V0VGltZW91dCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICBpc1NuaWZmaW5nICYmIDAgPT09ICQoIm9vLWlmcmFtZXMgPiBpZnJhbWUiKS5sZW5ndGggJiYgc25pZmZJbmRleCA+PSBWX1UubGVuZ3RoIC0gMSAmJiBzbmlmZkRvbmUoKTsKICAgICAgICAgICAgICAgICAgICB9KSwgMTUwMCk7CiAgICAgICAgICAgICAgICAgIH0pLCAxNWUzKSwgZnVuY3Rpb24gbigpIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBlID0gJCgib28taWZyYW1lcyA+IGlmcmFtZSIpLmxlbmd0aDsKICAgICAgICAgICAgICAgICAgICBpZiAoZSA+IHMgLSAxKSBzZXRUaW1lb3V0KChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgIG4oKTsKICAgICAgICAgICAgICAgICAgICB9KSwgMTAwKTsgZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICBjb25zdCBuID0gcGxheWVyICYmIHBsYXllci5yZWFkeSAmJiAwIDwgcGxheWVyLmR1cmF0aW9uLCB0ID0gX01hdGhtaW4oc25pZmZVcmxzLmxlbmd0aCAqIChuID8gMjAwIDogMTUwKSArIDEwMCAqIChzIC0gZSkgKyBfTWF0aG1pbig1MCAqIHNuaWZmSW5kZXgsIDFlMyksIDNlMykgKiAoaXNNb2JpbGUgPyAuNyA6IDEpOwogICAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGdvU25pZmYoKTsKICAgICAgICAgICAgICAgICAgICAgIH0pLCB0KTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIH0oKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGFzeW5jIGZ1bmN0aW9uIGF1dG9TbmlmZlBsYXkoKSB7CiAgICAgICAgICAgICAgICAgIGF3YWl0IHBsYXlCZWZvcmUoKSwgMCA8IHNuaWZmVGljayAmJiBzbmlmZkRvbmUoKSwgc25pZmZTdGFydFRpbWUgPSBEYXRlLm5vdygpLCBzbmlmZigrK3NuaWZmVGljayksCiAgICAgICAgICAgICAgICAgICQoIi5vLS12aXAiKS5yZW1vdmVDbGFzcygiaXMtc25pZmYtc3VjY2VzcyBpcy1zbmlmZi1kb25lIikuYWRkQ2xhc3MoImlzLXNuaWZmaW5nIik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBwYXVzZVBsYXkoKSB7CiAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgJCgidmlkZW86bm90KC5vLS12aWRlbyksIGF1ZGlvIikuZWFjaCgoZnVuY3Rpb24obiwgZSkgewogICAgICAgICAgICAgICAgICAgICAgZS5wYXVzZSgpLCBlLnZvbHVtZSA9IDAsIGUubXV0ZWQgPSAhMCwgJCgidmlkZW86bm90KC5vLS12aWRlbyksIGF1ZGlvIikuZWFjaCgoZnVuY3Rpb24obiwgZSkgewogICAgICAgICAgICAgICAgICAgICAgICAkKGUpLnJlbW92ZSgpOwogICAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgICBjb25zdCBuID0gRGF0ZS5ub3coKSwgZSA9IHNldEludGVydmFsKChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHQgPSBEYXRlLm5vdygpIC0gbiwgaSA9IGdldEdsb2JhbCgicGxheWVyT2JqZWN0IikgfHwgZ2V0R2xvYmFsKCJNR1RWUGxheWVyIikgJiYgZ2V0R2xvYmFsKCJNR1RWUGxheWVyIikucGxheWVyIHx8IGdldEdsb2JhbCgidmlkZW9QbGF5ZXIiKSB8fCBnZXRHbG9iYWwoIlBMQVlFUiIpOwogICAgICAgICAgICAgICAgICAgICAgaSAmJiAoaS5wYXVzZSBpbnN0YW5jZW9mIEZ1bmN0aW9uICYmIGkucGF1c2UoKSwgaS5tdXRlIGluc3RhbmNlb2YgRnVuY3Rpb24gJiYgaS5tdXRlKCkpLAogICAgICAgICAgICAgICAgICAgICAgKCFpIHx8IHQgPiA5ZTQpICYmIGNsZWFySW50ZXJ2YWwoZSk7CiAgICAgICAgICAgICAgICAgICAgfSksIDYwKTsKICAgICAgICAgICAgICAgICAgfSBjYXRjaCAobikge30KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGFzeW5jIGZ1bmN0aW9uIHBsYXlCZWZvcmUoKSB7CiAgICAgICAgICAgICAgICAgICQoIi5vLS12aXAtcGxheSIpLnJlbW92ZUNsYXNzKCJpcy1oaWRlIiksIGlzTG9hZFBsYXllciB8fCAoYWRkQ3NzKCIvcGx5ci8zLjYuMi9wbHlyLmNzcyIpLAogICAgICAgICAgICAgICAgICBhd2FpdCBhZGRKcygiL2hscy5qcy8wLjEzLjIvaGxzLm1pbi5qcyIpLCBhd2FpdCBhZGRKcygiL3BseXIvMy42LjIvcGx5ci5taW4uanMiKSwKICAgICAgICAgICAgICAgICAgaXNMb2FkUGxheWVyID0gITApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gZ2V0VmlwUGxheWVyKCkgewogICAgICAgICAgICAgICAgICByZXR1cm4gJChQbGF5ZXJTZWxlY3RvcikuZ2V0KDApIHx8ICQoIiNwbGF5ZXIsIC5wbGF5ZXIiKS5nZXQoMCk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBwbGF5SW5QYWdlKG4pIHsKICAgICAgICAgICAgICAgICAgJCgiLm8tLXBsYXllciIpLnJlbW92ZUNsYXNzKCJpcy1sb2FkZWQiKTsKICAgICAgICAgICAgICAgICAgZ2V0VmlwUGxheWVyKCkgPyAocGF1c2VQbGF5KCksIGluc2VydFBsYXllckh0bWwoJzxpZnJhbWUgaWQ9Im8tLXBsYXllci1pZnJhbWUiIHN0eWxlPSJ3aWR0aDogMTAwJTsgaGVpZ2h0OiAxMDAlOyBib3JkZXI6IG5vbmU7IG91dGxpbmU6IG5vbmU7IiAgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgYWxsb3dmdWxsc2NyZWVuPSJ0cnVlIiBhbGxvd3RyYW5zcGFyZW5jeT0idHJ1ZSIgZnJhbWVib3JkZXI9IjAiIHNjcm9sbGluZz0ibm8iIHNhbmRib3g9ImFsbG93LXNjcmlwdHMgYWxsb3ctc2FtZS1vcmlnaW4gYWxsb3ctZm9ybXMiIHNyYz0iJyArIG4gKyAnIj48L2lmcmFtZT4nKSkgOiBsb2NhdGlvbi5ocmVmID0gbiwKICAgICAgICAgICAgICAgICAgc2V0VGltZW91dCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgJCgiLm8tLXBsYXllciIpLmFkZENsYXNzKCJpcy1sb2FkZWQiKTsKICAgICAgICAgICAgICAgICAgfSksIDI1MDApOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gcGxheVZpcFVybChuKSB7CiAgICAgICAgICAgICAgICAgIGlmICghbikgcmV0dXJuOwogICAgICAgICAgICAgICAgICBjb25zdCBlID0gbiArIGdldFZpcFRhcmdldFVybCgpOwogICAgICAgICAgICAgICAgICAkKCIuby0tdmlwIikucmVtb3ZlQ2xhc3MoImlzLXNuaWZmLXN1Y2Nlc3MgaXMtc25pZmYtZG9uZSBpcy1zbmlmZmluZyIpLmFkZENsYXNzKCJpcy1wbGF5LWluLXBhZ2UiKSwKICAgICAgICAgICAgICAgICAgdXBkYXRlUXJjb2RlKGUpLCBpc1BsYXlpbmdJblBhZ2UgJiYgIS9odHRwOi8udGVzdChuKSA/IHBsYXlJblBhZ2UoZSkgOiAocGF1c2VQbGF5KCksCiAgICAgICAgICAgICAgICAgICQoIiNvLS1wbGF5ZXItaWZyYW1lIikucmVtb3ZlKCksICQoIi5vLS1wbGF5ZXIiKS5yZW1vdmVDbGFzcygiaXMtbG9hZGVkIiksIHNldFRpbWVvdXQoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgIHdpbmRvdy5vcGVuKGUsICJfYmxhbmsiKTsKICAgICAgICAgICAgICAgICAgfSksIDEwMCkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZnVuY3Rpb24gcGxheVZpcEl0ZW0obikgewogICAgICAgICAgICAgICAgICBjb25zdCBlID0gMCA8ICQobikubGVuZ3RoOwogICAgICAgICAgICAgICAgICBsZXQgdCA9IGUgPyAkKG4pLmhhc0NsYXNzKCJvLS12aXAtc25pZmYiKSA/ICJhdXRvIiA6ICQobikuYXR0cigiX2hyZWYiKSA6IFN0b3JlLmdldCgibGFzdFBsYXlDaG9pY2UiLCAiIik7CiAgICAgICAgICAgICAgICAgICQoIi5vLS12aXAtaXRlbSIpLnJlbW92ZUNsYXNzKCJpcy1hY3RpdmUiKSwgJCgiLm8tLXZpcC1saXN0IH4gLm8tLXRpcCIpLnJlbW92ZUNsYXNzKCJvLS1oaWRlIiksCiAgICAgICAgICAgICAgICAgIGUgPyAkKG4pLmFkZENsYXNzKCJpcy1hY3RpdmUiKSA6IHQuc3RhcnRzV2l0aCgiaHR0cCIpID8gKCQoIi5vLS12aXAtaXRlbTpub3QoLm8tLXZpcC1zbmlmZikiKS5lYWNoKChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmF0dHIoIl9ocmVmIikgPT09IHQgJiYgJCh0aGlzKS5hZGRDbGFzcygiaXMtYWN0aXZlIik7CiAgICAgICAgICAgICAgICAgIH0pKSwgcGxheVZpcFVybCh0KSkgOiAkKCIuby0tdmlwLWl0ZW0uby0tdmlwLXNuaWZmIikuYWRkQ2xhc3MoImlzLWFjdGl2ZSIpLCBpc1NuaWZmaW5nICYmIHNuaWZmRG9uZSgpLAogICAgICAgICAgICAgICAgICB0LnN0YXJ0c1dpdGgoImh0dHAiKSA/IHBsYXlWaXBVcmwodCkgOiBhdXRvU25pZmZQbGF5KCksIFN0b3JlLnNldCgibGFzdFBsYXlDaG9pY2UiLCB0KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIE1fU291cmNlKG4pIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuIG4gPyBuLnJlcGxhY2UoLyhcdyspL2csIChmdW5jdGlvbihuLCBlKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIE1fU3RyaW5nKGUpOwogICAgICAgICAgICAgICAgICB9KSkgOiAiIjsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIE1fVmlwVXJsKG4pIHsKICAgICAgICAgICAgICAgICAgaWYgKCFuKSByZXR1cm4gIiI7CiAgICAgICAgICAgICAgICAgIGNvbnN0IGUgPSBNX1NvdXJjZShuKTsKICAgICAgICAgICAgICAgICAgcmV0dXJuICJodHRwczovLyIgKyBlICsgKGUuaW5jbHVkZXMoIj8iKSA/ICIiIDogKGUuZW5kc1dpdGgoIi4iKSA/ICJwaHAiIDogL1wvJC8udGVzdChlKSA/ICIiIDogIi8iKSArICI/dXJsIikgKyAiPSI7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBmdW5jdGlvbiBpbnNlcnRWaXBTb3VyY2UobikgewogICAgICAgICAgICAgICAgICBmdW5jdGlvbiBlKCkgewogICAgICAgICAgICAgICAgICAgICQoIi5vLS1zZXR0aW5nLWJ1dHRvbiIpLm9mZigiY2xpY2siKS5vbigiY2xpY2siLCAoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICAkKCIuby0tdmlwIikudG9nZ2xlQ2xhc3MoImlzLXNldHRpbmctb24iKTsKICAgICAgICAgICAgICAgICAgICB9KSksICQoIi5vLS10b2dnbGUiKS5vZmYoImNsaWNrIikub24oImNsaWNrIiwgKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS50b2dnbGVDbGFzcygiaXMtbiIpLCAkKHRoaXMpLmhhc0NsYXNzKCJvLS1hY3Rpb24tcGlwIikgPyAoaXNQbGF5aW5nSW5QYWdlID0gIWlzUGxheWluZ0luUGFnZSwKICAgICAgICAgICAgICAgICAgICAgIEdsb2JhbFN0b3JlLnNldCgiaXNQbGF5aW5nSW5QYWdlIiwgaXNQbGF5aW5nSW5QYWdlKSkgOiAkKHRoaXMpLmhhc0NsYXNzKCJvLS1hY3Rpb24tc2tpcC1hZCIpICYmIChpc1NraXBBZFZpZGVvID0gIWlzU2tpcEFkVmlkZW8sCiAgICAgICAgICAgICAgICAgICAgICBTdG9yZS5zZXQoImlzU2tpcEFkVmlkZW8iLCBpc1NraXBBZFZpZGVvKSk7CiAgICAgICAgICAgICAgICAgICAgfSkpLCAkKCIuby0tZWRpdC12aXAtc291cmNlLXBhbmVsIHRleHRhcmVhIikub2ZmKCJpbnB1dCIpLm9uKCJpbnB1dCIsIChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgIEdsb2JhbFN0b3JlLnNldCgiVmlwVXJscyIsICQodGhpcykudmFsKCkpOwogICAgICAgICAgICAgICAgICAgIH0pKSwgJCgiLm8tLXZpcC1pdGVtOm5vdCguby0tbm9ybWFsKSIpLm9mZigiY2xpY2siKS5vbigiY2xpY2siLCAoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgICBwbGF5VmlwSXRlbSh0aGlzKTsKICAgICAgICAgICAgICAgICAgICB9KSksICQoIi5vLS1sb2ctYnV0dG9uIikub2ZmKCJjbGljayIpLm9uKCJjbGljayIsIChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICAgICQoIm9vLWxvZ3MiKS50b2dnbGVDbGFzcygiaXMtYWN0aXZlIik7CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgIGxldCB0ID0gMSA8IGFyZ3VtZW50cy5sZW5ndGggJiYgdm9pZCAwICE9PSBhcmd1bWVudHNbMV0gPyBhcmd1bWVudHNbMV0gOiAiYWZ0ZXIiLCBpID0gMiA8IGFyZ3VtZW50cy5sZW5ndGggJiYgdm9pZCAwICE9PSBhcmd1bWVudHNbMl0gPyBhcmd1bWVudHNbMl0gOiAwOwogICAgICAgICAgICAgICAgICBpZiAoMCA8ICQoIi5vLS12aXAiKS5sZW5ndGggfHwgMjAgPCBpKSByZXR1cm47CiAgICAgICAgICAgICAgICAgIGNvbnN0IG8gPSAkKG4pOwogICAgICAgICAgICAgICAgICBpZiAoMCA9PT0gby5sZW5ndGgpIHJldHVybiB2b2lkIHNldFRpbWVvdXQoKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgIGluc2VydFZpcFNvdXJjZShuLCB0LCBpICsgMSk7CiAgICAgICAgICAgICAgICAgIH0pLCAyNTApOwogICAgICAgICAgICAgICAgICBjb25zdCBhID0gdmlwVXJscy5sZW5ndGggPiBjb2xsYXBzZU51bTsKICAgICAgICAgICAgICAgICAgbGV0IHIgPSAoaXNNb2JpbGUgPyAiIiA6ICc8ZGl2IGNsYXNzPSJvLS1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NzPSJvLS1idWJibGUgby0tYjMiPjwvaT48L3NwYW4+JyArIHZpcFVybHMubWFwKChmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgICAgbGV0IGUgPSAiby0tdmlwLWl0ZW0iOwogICAgICAgICAgICAgICAgICAgIHJldHVybiBuLnVybC5zdGFydHNXaXRoKCJodHRwcyIpICYmIChlICs9ICIgaXMtcGxheS1pbi1wYWdlIiksIG4uaXNSYW5kb20gJiYgKGUgKz0gIiBpcy1yYW5kb20iKSwKICAgICAgICAgICAgICAgICAgICAnPHNwYW4gY2xhc3M9IicgKyBlICsgJyIgX2hyZWY9IicgKyBuLnVybCArICciPicgKyBuLm5hbWUgKyAiPC9zcGFuPiI7CiAgICAgICAgICAgICAgICAgIH0pKS5qb2luKCJcbiIpICsgKGEgPyAnPHNwYW4gY2xhc3M9Im8tLXZpcC1pdGVtIG8tLW5vcm1hbCBvLS1jb2xsYXBzZSI+4p6iPC9zcGFuPicgOiAiIikgKyAiPC9kaXY+IiArIChpc01vYmlsZSA/ICc8ZGl2IGNsYXNzPSJvLS10aXAgby0taGlkZSI+5aSa5pWw6Kej5p6Q5Lya5Zyo56e75Yqo56uv5pi+56S6PHN0cm9uZz7lm77niYflub/lkYo8L3N0cm9uZz7vvIzpnIDmiYvliqjmi6bmiKrjgII8YnI+6YWN5ZCI5rWP6KeI5Zmo55qEPHN0cm9uZz7ll4XmjqLlip/og708L3N0cm9uZz7kvb/nlKjvvIzkvZPpqozmm7TkvbPjgII8L2Rpdj4nIDogIiIpICsgIjwvZGl2PiIpLAogICAgICAgICAgICAgICAgICBhICYmIHNtYXJ0Q29sbGFwc2UoIi5vLS12aXAtaXRlbSIpOwogICAgICAgICAgICAgICAgICBsZXQgcyA9IDAsIGwgPSBzZXRJbnRlcnZhbCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgZSgpLCAxMDAgPCBzKysgJiYgY2xlYXJJbnRlcnZhbChsKTsKICAgICAgICAgICAgICAgICA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KG4pIHsKICAgICAgICAgICAgICAgICAgbi5mcm9tID09PSBTbmlmZkNoZWNrVXJsICYmICQoIm9vLWlmcmFtZXMgPiBpZnJhbWUiKS5lYWNoKChmdW5jdGlvbihuLCBlKSB7CiAgICAgICAgICAgICAgICAgICAgZS5zcmMgPT09IFNuaWZmQ2hlY2tVcmwgJiYgcmVtb3ZlSWZyYW1lKGUpOwogICAgICAgICAgICAgICAgICB9KSksIGlzQWxsb3dJZnJhbWVTbmlmZiB8fCAoaXNBbGxvd0lmcmFtZVNuaWZmID0gITAsIGlzQWxsb3dTbmlmZiA9ICEwLCBHbG9iYWxTdG9yZS5zZXQoImlzQWxsb3dJZnJhbWVTbmlmZiIsICEwKSwKICAgICAgICAgICAgICAgICAgJCgiLm8tLXZpcCIpLmFkZENsYXNzKCJpcy1hbGxvdy1zbmlmZiIpLCAkKCIuby0tdmlwLWl0ZW0uaXMtcmFuZG9tIikucmVtb3ZlKCksIHNtYXJ0Q29sbGFwc2UoIi5vLS12aXAtaXRlbSIpKTsKICAgICAgICAgICAgICAgIH0pKSwgRS5vbigic25pZmYuZmFpbCIsIChmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgIGlmIChpc0FsbG93U25pZmYpIHsKICAgICAgICAgICAgICAgICAgICByZW1vdmVJZnJhbWUoZ2V0SWZyYW1lSWQobi5mcm9tKSk7CiAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0pKSwgRS5vbigicGxheS52aWRlbyIsIChmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgIHJlbW92ZUlmcmFtZShnZXRJZnJhbWVJZChuLmZyb20pKSwgc25pZmZTdWNjZXNzKG4udXJsLCBuLmZyb20pOwogICAgICAgICAgICAgICAgfSkpLCBFLm9uKCJzbmlmZi5ibG9iIiwgKGZ1bmN0aW9uKG4pIHsKICAgICAgICAgICAgICAgICAgcmVtb3ZlSWZyYW1lKGdldElmcmFtZUlkKG4uZnJvbSkpOwogICAgICAgICAgICAgICAgICBjb25zdCBlID0gbi5mcm9tLnJlcGxhY2UoLz1odHRwLisvLCAiPSIpOwogICAgICAgICAgICAgICAgICBsZXQgdCA9ICExOwogICAgICAgICAgICAgICAgICBpZiAoJCgiLm8tLXZpcC1pdGVtLmlzLXBsYXktaW4tcGFnZSIpLmVhY2goKGZ1bmN0aW9uKG4sIGkpIHsKICAgICAgICAgICAgICAgICAgICAkKGkpLmF0dHIoIl9ocmVmIikgPT09IGUgJiYgKHQgPSAhMCk7CiAgICAgICAgICAgICAgICAgIH0pKSwgIXQpIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBuID0gYmxvYk5hbWVzW2Jsb2JDb3VudCsrXSB8fCAi6Kej5p6QIiArIGJsb2JDb3VudDsKICAgICAgICAgICAgICAgICAgICAkKCIuby0tdmlwLWl0ZW0uaXMtcGxheS1pbi1wYWdlOm5vdCguaXMtYmxvYikiKS5lcSgwKS5iZWZvcmUoJzxzcGFuIGNsYXNzPSJvLS12aXAtaXRlbSBpcy1wbGF5LWluLXBhZ2UgaXMtYmxvYiIgX2hyZWY9IicgKyBlICsgJyI+JyArIG4gKyAiPC9zcGFuPiIpLAogICAgICAgICAgICAgICAgICAgICQoIi5vLS12aXAtaXRlbTpub3QoLm8tLW5vcm1hbCkiKS5vZmYoImNsaWNrIikub24oImNsaWNrIiwgKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICAgICAgcGxheVZpcEl0ZW0odGhpcyk7CiAgICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICBjb25zdCBjaGFyVG9OdW0gPSBmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgIHJldHVybiBuLmNoYXJDb2RlQXQoMCkgLSA5NzsKICAgICAgICAgICAgICAgIH0sIG51bVRvQ2hhciA9IGZ1bmN0aW9uKG4pIHsKICAgICAgICAgICAgICAgICAgcmV0dXJuICgwLCBTdHJpbmcuZnJvbUNoYXJDb2RlKSg5NyArIG4pOwogICAgICAgICAgICAgICAgfSwgTV9OdW1iZXIgPSBmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgIHJldHVybiArbiArICgxID09IG4gJSAyID8gLTEgOiAxKTsKICAgICAgICAgICAgICAgIH0sIE1fTGV0dGVyID0gZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgICByZXR1cm4gbnVtVG9DaGFyKE1fTnVtYmVyKGNoYXJUb051bShuKSkpOwogICAgICAgICAgICAgICAgfSwgTV9DaGFyID0gZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgICByZXR1cm4gL1thLXpdL2kudGVzdChuKSA/IE1fTGV0dGVyKG4pIDogL1xkLy50ZXN0KG4pID8gTV9OdW1iZXIobikgOiAiIjsKICAgICAgICAgICAgICAgIH0sIE1fU3RyaW5nID0gZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgICByZXR1cm4gbi5zcGxpdCgiIikucmV2ZXJzZSgpLm1hcCgoZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBNX0NoYXIobik7CiAgICAgICAgICAgICAgICAgIH0pKS5qb2luKCIiKTsKICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICBsZXQgVl9VID0gIndpLjgxMXVzZy5ucGQsb2p1Lmp3ZmppMzQub3BzLGpvYi4xMzh1cy5ucGTCt3dpLGp3ZmppLmhqN25hLm1kLHdpLnh6ejg4Lm5wZCx1LmN6ZDYubnBkwrdvanUsd2lscC5kZCxiYmJyaS5ucGTCt3dpLixqd2ZqaS5sMTkyLm5wZCx3aS51c2p6dnB6Lm5wZCx1LmZqaXBiYW5tLm5wZMK3anFobWpuwrdqcWhtam4uLHh4eC51cG5sZC55enfCt3dpwrdqb2IsbWQubWJndG1iYWlhLm1kwrd3aS4seHh4Lmp0cGJqY3cubnBkwrdvanUsd2kuaWxrcXYubnBkLHh4eC51a2V3bS5ucGQsd2kuYjk4Lmx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GFjZSgvXihcdykvLCAoZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBuLnRvVXBwZXJDYXNlKCk7CiAgICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICAgICAgcmV0dXJuIHsKICAgICAgICAgICAgICAgICAgICB1cmw6IG4sCiAgICAgICAgICAgICAgICAgICAgbmFtZTogdAogICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgfSkpLmZpbHRlcigoZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgICByZXR1cm4gbi51cmwgJiYgKCFpc01vYmlsZSB8fCAhTm9Nb2JpbGVWaXBVcmxSZWdleC50ZXN0KG4udXJsKSk7CiAgICAgICAgICAgICAgICB9KSk7CiAgICAgICAgICAgICAgICBpZiAoVl9VID0gVl9VLnJlcGxhY2UoL8K3L2csICIvIikuc3BsaXQoIiwiKSwgIXN0b3JlVmlwVXJscyB8fCBzdG9yZVZpcFVybHMgPT09ICJodHRwczovL3oxLm0xOTA3LmNuLz9qeD1cbuWMl+aegSBodHRwOi8vYmVpaml4cy5jbi8/dXJsPSIudHJpbSgpKSB7CiAgICAgICAgICAgICAgICAgIGNvbnN0IG4gPSBWX04uc3BsaXQoL1vvvIzjgILvvJtdLykubWFwKChmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG4udHJpbSgpOwogICAgICAgICAgICAgICAgICB9KSkuZmlsdGVyKChmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG47CiAgICAgICAgICAgICAgICAgIH0pKSwgZSA9IG5bcGFyc2VJbnQoRGF0ZS5ub3coKSAvIDFlMyAvIDYwICUgbi5sZW5ndGgpXS5zcGxpdCgiIik7CiAgICAgICAgICAgICAgICAgIFZfVS5zbGljZSgwLCA3KS5tYXAoKGZ1bmN0aW9uKG4sIHQpIHsKICAgICAgICAgICAgICAgICAgICB2aXBVcmxzLnB1c2goewogICAgICAgICAgICAgICAgICAgICAgbmFtZTogZVt0XSwKICAgICAgICAgICAgICAgICAgICAgIHVybDogTV9WaXBVcmwobiksCiAgICAgICAgICAgICAgICAgICAgICBpc1JhbmRvbTogITAKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgfSkpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgaWYgKCFpc0NoZWNrSWZyYW1lU25pZmYpIHsKICAgICAgICAgICAgICAgICAgJCgiaHRtbCIpLmFwcGVuZCgnPG9vLWlmcmFtZXMgc3R5bGU9InZpc2liaWxpdHk6IGhpZGRlbjsgcG9zaXRpb246IGZpeGVkOyBib3R0b206IDA7IHBvaW50ZXItZXZlbnRzOiBub25lOyI+PC9vby1pZnJhbWVzPicpOwogICAgICAgICAgICAgICAgICBjb25zdCBuID0gYWRkSWZyYW1lKFNuaWZmQ2hlY2tVcmwpOwogICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgICAgICByZW1vdmVJZnJhbWUobik7CiAgICAgICAgICAgICAgICAgIH0pLCA1ZTMpLCBpc0NoZWNrSWZyYW1lU25pZmYgPSAhMDsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGNvbnN0IHZpcHMgPSBBcnJheS5pc0FycmF5KHBsYXlBZGRvbi52aXApID8gcGxheUFkZG9uLnZpcCA6IFsgcGxheUFkZG9uLnZpcCBdOwogICAgICAgICAgICAgICAgdmlwcy5mb3JFYWNoKChmdW5jdGlvbihuKSB7CiAgICAgICAgICAgICAgICAgIGluc2VydFZpcFNvdXJjZSgobiA9IG4uc3BsaXQoL1xzKlx8XHMqLykpWzBdLCBuWzFdKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgcGxheUFkZG9uLnRpdGxlICYmICFkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIuby0tanVtcCIpICYmIChwbGF5QWRkb24udmlwICYmICQkKChmdW5jdGlvbigpIHsKICAgICAgICAgICAgICAgIHJldHVybiAkKHBsYXlBZGRvbi50aXRsZSkuZXEoMCkudGV4dCgpOwogICAgICAgICAgICAgIH0pLCAoZnVuY3Rpb24obikgewogICAgICAgICAgICAgICAgcGxheUFkZG9uLmZpeFRpdGxlICYmIChuID0gcGxheUFkZG9uLmZpeFRpdGxlKG4pKSwgaW5zZXJ0U2VhcmNoQWRkb24obiwgIi5vLS12aXAtbGlzdCIsICJhZnRlciIpOwogICAgICAgICAgICAgIH0pKSwgcGxheUFkZG9uLmp1bXAgJiYgZ29KdW1wKHBsYXlBZGRvbi5qdW1wLCBwbGF5QWRkb24udGl0bGUpKSwgZXhlY0FkZG9uSnMocGxheUFkZG9uKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBjb25zdCBzZWFyY2hBZGRvbiA9IGFkZG9uLnNlYXJjaDsKICAgICAgICAgICAgaWYgKHNlYXJjaEFkZG9uICYmIElzKHNlYXJjaEFkZG9uLm1hdGNoKSkgewogICAgICAgICAgICAgIGlmIChzZWFyY2hBZGRvbi5qdW1wICYmIGdvSnVtcChzZWFyY2hBZGRvbi5qdW1wLCBzZWFyY2hBZGRvbi5rZXl3b3JkKSwgc2VhcmNoQWRkb24uanVtcFRvICYmICQkKHNlYXJjaEFkZG9uLmp1bXBUb1swXSwgKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgJChzZWFyY2hBZGRvbi5qdW1wVG9bMF0pLmVhY2goKGZ1bmN0aW9uKCkgewogICAgICAgICAgICAgICAgICBsZXQgbiA9ICQodGhpcykuYXR0cigiaHJlZiIpOwogICAgICAgICAgICAgICAgICAkKHRoaXMpLmF0dHIoImhyZWYiLCBuLnJlcGxhY2Uoc2VhcmNoQWRkb24uanVtcFRvWzFdLCBzZWFyY2hBZGRvbi5qdW1wVG9bMl0pKTsKICAgICAgICAgICAgICAgIH0pKTsKICAgICAgICAgICAgICB9KSksIHNlYXJjaEFkZG9uLnJlc3VsdCkgewogICAgICAgICAgICAgICAgY29uc3QgbiA9ICJzdHJpbmciID09IHR5cGVvZiBzZWFyY2hBZGRvbi5yZXN1bHQgPyB7CiAgICAgICAgICAgICAgICAgIHRpdGxlOiBzZWFyY2hBZGRvbi5yZXN1bHQsCiAgICAgICAgICAgICAgICAgIHVybDogc2VhcmNoQWRkb24ucmVzdWx0CiAgICAgICAgICAgICAgICB9IDogc2VhcmNoQWRkb24ucmVzdWx0OwogICAgICAgICAgICAgICAgaWYgKDEgPT09ICQobi50aXRsZSkubGVuZ3RoKSB7CiAgICAgICAgICAgICAgICAgIGNvbnN0IGUgPSAkKG4udGl0bGUpLnRleHQoKTsKICAgICAgICAgICAgICAgICAgaWYgKCEv56ysLnsxLDN9W+Wto+mbhuivnemDqF0uKiQvLnRlc3QoZSkpIHsKICAgICAgICAgICAgICAgICAgICBjb25zdCBlID0gJChuLnVybCkuZXEoMCkuYXR0cigiaHJlZiIpOwogICAgICAgICAgICAgICAgICAgIGUgJiYgKGxvY2F0aW9uLmhyZWYgPSBlKTsKICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIH0KICAgICAgICAgICAgICBleGVjQWRkb25KcyhzZWFyY2hBZGRvbik7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZXhlY0FkZG9uSnMoYWRkb24pOwogICAgICAgICAgfSkpLCBpc0ZpcnN0UnVuQWRkb24gPSAhMTsKICAgICAgICB9IGVsc2UgaXNGaXJzdFJ1bkFkZG9uICYmICgkKCJodG1sIikucmVtb3ZlQ2xhc3MoIm8tLW1peWluZyBvLS1tIG8tLXBjIG8tLWRlYnVnIiksCiAgICAgICAgc2V0VGltZW91dCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAkaHRtbC5yZW1vdmVBdHRyaWJ1dGUoUExVR0lOX0FUVFIpOwogICAgICAgIH0pLCAxZTMpKTsKICAgICAgfQogICAgICBmdW5jdGlvbiB1cmxEZXRlY3RvcigpIHsKICAgICAgICBzZXRJbnRlcnZhbCgoZnVuY3Rpb24oKSB7CiAgICAgICAgICAhZnVuY3Rpb24oKSB7CiAgICAgICAgICAgIGlmIChIcmVmICE9PSB3aW5kb3cubG9jYXRpb24uaHJlZikgewogICAgICAgICAgICAgIGNvbnN0IG4gPSBIcmVmOwogICAgICAgICAgICAgIEhyZWYgPSB3aW5kb3cubG9jYXRpb24uaHJlZiwgRS5lbWl0KCJ1cmwuY2hhbmdlIiwgewogICAgICAgICAgICAgICAgbmV3VXJsOiBIcmVmLAogICAgICAgICAgICAgICAgb2xkVXJsOiBuCiAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgIH0oKTsKICAgICAgICB9KSwgMjUwKTsKICAgICAgfQogICAgICBsZXQgaXNGaXJzdFJ1bkFkZG9uID0gITAsIGlzQ2hlY2tJZnJhbWVTbmlmZiA9ICExOwogICAgICB0cnkgewogICAgICAgIGFkZG9uR28oKTsKICAgICAgfSBjYXRjaCAobikge30KICAgICAgdXJsRGV0ZWN0b3IoKTsKICAgIH0KICB9Cn0oKTs=
Add Comment
Please, Sign In to add comment