xiaomianao666

插件名:global_老司机传说

Jul 10th, 2024
455
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_老司机传说@base64://Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICDogIHlj7jmnLrkvKDor7QKLy8gQG5hbWVzcGFjZSAgICBodHRwOi8vd3d3Lm9jcm9zb2Z0LmNvbS8/cD0xMDA1Ci8vIEB2ZXJzaW9uICAgICAgMC44OTEKLy8gQGRlc2NyaXB0aW9uICDmlK/mjIHnkInnkoPnpZ7npL7jgIHngbXmoqblvqHmiYDjgIHnuq/niLHorqHliJLjgIHogZbpnIrnpZ7ln5/jgIHnu4Xlo6vkuozmrKHlhYPjgIHlpKnkvb/kuozmrKHlhYPjgIFNeUdhbGdhbWXvvIzlhajoh6rliqjjgILoh6rliqjlsZXlvIDnpZ7npL7pmpDol4/nmoTpk77mjqXjgIHoh6rliqjlvIDlkK/lvqHmiYDogIHlj7jmnLrmqKHlvI/jgIHoh6rliqjovazmjaLnpZ7npL7npZ7np5jku6PnoIHjgIHoh6rliqjloavlhpnlvqHmiYDjgIHnuq/niLHorqHliJLjgIFNeUdhbGdhbWXmiZPlvIDnmoTnmb7luqbnvZHnm5jmj5Dlj5bnoIHjgIHkuLrogZbpnIrnpZ7ln5/mt7vliqDlhY3ph5HluIHlv6vmjbfpgJrpgZPjgIHnu4Xlo6vkuozmrKHlhYPlhY3op6Plr4bjgIFNeUdhbGdhbWXlhY3ot7PovazjgILmlrDnmoTkuIDlubTkuIDotbfpo5novablkKc7KQovLyBAYXV0aG9yICAgICAgIG9jcm9zb2Z0Ci8vIEBtYXRjaCAgICAgICAgKjovL2Jsb2cucmVpbXUubmV0LyoKLy8gQG1hdGNoICAgICAgICBodHRwczovL2Jsb2cucmVpbXUubmV0Lz9wYXNzd29yZC1wcm90ZWN0ZWQ9bG9naW4qCi8vIEBtYXRjaCAgICAgICAgKjovL3Bhb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1cm4gMTsvL+i3s+i/h+mHjeWPo+WRs+WIpOaWrQogICAgdmFyIGlmU2hvdz0xOwogICAgdmFyIHN0cm9uZ3M9ZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ3N0cm9uZycpOwogICAgZm9yKHZhciBzdGk9MDtzdGk8c3Ryb25ncy5sZW5ndGg7c3RpKyspewogICAgICAgIGlmKHN0cm9uZ3Nbc3RpXS5pbm5lclRleHQpewogICAgICAgICAgICB2YXIgaW5uZXJUPXN0cm9uZ3Nbc3RpXS5pbm5lclRleHQ7CiAgICAgICAgICAgIGlmKGlubmVyVC5pbmRleE9mKCLph43lj6MiKSE9LTEpewogICAgICAgICAgICAgICAgYWRkYXR0ZW50aW9uKCk7CiAgICAgICAgICAgICAgICByZXR1cm4gMDsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIHZhciB0YWdzPWRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoJ3RhZ3MtbGlua3MnKVswXTsKICAgIGlmKHRhZ3MpewogICAgICAgIGZvcih2YXIgY2Q9MDtjZDx0YWdzLmNoaWxkTm9kZXMubGVuZ3RoO2NkKyspewogICAgICAgICAgICB2YXIgdGdhPXRhZ3MuY2hpbGROb2Rlc1tjZF07CiAgICAgICAgICAgIGlmKHRnYSYmdGdhLmlubmVyVGV4dCl7CiAgICAgICAgICAgICAgICBpZih0Z2EuaW5uZXJUZXh0LmluZGV4T2YoIumHjeWPoyIpIT0tMXx8dGdhLmlubmVyVGV4dC5pbmRleE9mKCLooYDohaUiKSE9LTF8fHRnYS5pbm5lclRleHQuaW5kZXhPZigi54yO5aWHIikhPS0xKXsKICAgICAgICAgICAgICAgICAgICBpZlNob3c9MDsKICAgICAgICAgICAgICAgICAgICBpZighZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ3ByZScpWzBdKXJldHVybiAwOwogICAgICAgICAgICAgICAgICAgIGFkZGF0dGVudGlvbigpOwogICAg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WNrPWZ1bmN0aW9uICgpewogICAgICAgIHZhciBvRF9oYXNoPW9EX3RleHQudmFsdWUucmVwbGFjZSgvKFxbLipcXSl8W1xXX10vZywiIik7CiAgICAgICAgaWYob0RfaGFzaD09PSIiKXsKICAgICAgICAgICAgYWxlcnQoIuivt+WFiOi+k+WFpWhhc2ghIik7CiAgICAgICAgICAgIG9EX2xpbmsuaHJlZj0iamF2YXNjcmlwdDphbGVydCgn6K+36L6T5YWlaGFzaOW5tueCueWHu+i9rOaNouaMiemSriEnKSI7CiAgICAgICAgICAgIG9EX2xpbmsudGV4dENvbnRlbnQ9Ilxu56OB5Yqb6ZO+5o6lIjsKICAgICAgICAgICAgb0RfbGluazIuaHJlZj0iamF2YXNjcmlwdDphbGVydCgn6K+36L6T5YWlaGFzaOW5tueCueWHu+i9rOaNouaMiemSriEnKSI7CiAgICAgICAgICAgIG9EX2xpbmsyLnRleHRDb250ZW50PSLkuIvovb3np43lrZAiOwogICAgICAgICAgICByZXR1cm47CiAgICAgICAgfQogICAgICAgIGVsc2V7CiAgICAgICAgICAgIG9EX2xpbmsuaHJlZj0ibWFnbmV0Oj94dD11cm46YnRpaDoiK29EX2hhc2g7CiAgICAgICAgICAgIG9EX2xpbmsudGV4dENvbnRlbnQ9Ilxu56OB5Yqb6ZO+5o6lIjsKICAgICAgICAgICAgb0RfbGluazIuaHJlZj0iaHR0cDovL3d3dy50b3JyZW50Lm9yZy5jbi9Ib21lL3RvcnJlbnQvZG93bmxvYWQuaHRtbD9oYXNoPSIrb0RfaGFzaDsKICAgICAgICAgICAgb0RfbGluazIudGV4dENvbnRlbnQ9IuS4i+i9veenjeWtkCI7CiAgICAgICAgICAgIG9EX2xpbmsyLnN0eWxlPSJtYXJnaW4tbGVmdDoyMHB4IjsKICAgICAgICB9CiAgICB9OwogICAgdmFyIG9EX2xpbms9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiYSIpOwogICAgdmFyIG9EX2xpbmsyPWRvY3VtZW50LmNyZWF0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1swXS5pbm5lclRleHQpewogICAgICAgICAgICB2YXIgdGVwPWZvbnRUYWdbaG9saV0uY2hpbGROb2Rlc1swXS5pbm5lclRleHQudHJpbSgpOwogICAgICAgICAgICBpZighKHRlcC5sZW5ndGg+PTEwJiZ0ZXAubGVuZ3RoPD0yNSkpY29udGludWU7CiAgICAgICAgICAgIGlmKCFzdHJFeHAudGVzdCh0ZXApKWNvbnRpbnVlOwogICAgICAgICAgICBjb2RlVXNlZD0wOwogICAgICAgICAgICBmb3IodmFyIHNldGkgaW4gY29kZVNldCl7CiAgICAgICAgICAgICAgICBpZihjb2RlU2V0W3NldGldPT10ZXApe2NvZGVVc2VkPTE7YnJlYWs7fQogICAgICAgICAgICB9CiAgICAgICAgICAgIHNsQ29kZT10ZXA7CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYoZm9udFRhZ1tob2xpXS5jaGlsZE5vZGVzWzBdLmRhdGEpewogICAgICAgICAgICB2YXIgdGVwMj1mb250VGFnW2hvbGldLmNoaWxkTm9kZXNbMF0uZGF0YS50cmltKCk7CiAgICAgICAgICAgIGlmKCEodGVwMi5sZW5ndGg+PTEwJiZ0ZXAyLmxlbmd0aDw9MjUpKWNvbnRpbnVlOwogICAgICAgICAgICBpZighc3RyRXhwLnRlc3QodGVwMikpY29udGludWU7CiAgICAgICAgICAgIGNvZGVVc2VkPTA7CiAgICAgICAgICAgIGZvcih2YXIgc2V0aiBpbiBjb2RlU2V0KXsKICAgICAgICAgICAgICAgIGlmKGNvZGVTZXRbc2V0al09PXRlcDIpe2NvZGVVc2VkPTE7YnJlYWs7fQogICAgICAgICAgICB9CiAgICAgICAgICAgIHNsQ29kZT10ZXAyOwogICAgICAgIH0KICAgICAgICBlbHNlIGNvbnRpbnVlOwogICAgICAgIGlmKGNvZGVVc2VkPT0xKWNvbnRpbnVlOwogICAgICAgIGNvZGVTZXRbY29kZVNldC5sZW5ndGhdPXNsQ29kZTsKICAgICAgICB2YXIgZm9ybSA9IGRvY3VtZW50LmN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IGhvbGk9MDtob2xpPGZvbnRUYWcubGVuZ3RoO2hvbGkrKyl7CiAgICAgICAgdmFyIGNvZGVVc2VkPTA7CiAgICAgICAgdmFyIHN0ckV4cD0vXltBLVphLXowLTldKyQvOwogICAgICAgIHZhciBzbENvZGU9IiI7CiAgICAgICAgaWYoZm9udFRhZ1tob2xpXS5pbm5lclRleHQpewogICAgICAgICAgICB2YXIgdGVwPWZvbnRUYWdbaG9saV0uaW5uZXJUZXh0LnRyaW0oKTsKICAgICAgICAgICAgaWYodGVwLmluZGV4T2YoJ3llZWxlZScpPT0tMSljb250aW51ZTsKICAgICAgICAgICAgY29kZVVzZWQ9MDsKICAgICAgICAgICAgZm9yKHZhciBzZXRpIGluIGNvZGVTZXQpewogICAgICAgICAgICAgICAgaWYoY29kZVNldFtzZXRpXT09dGVwKXtjb2RlVXNlZD0xO2JyZWFrO30KICAgICAgICAgICAgfQogICAgICAgICAgICBzbENvZGU9dGVwLnNwbGl0KCc9JylbMV07CiAgICAgICAgfQogICAgICAgIGVsc2UgaWYoZm9udFRhZ1tob2xpXS5kYXRhKXsKICAgICAgICAgICAgdmFyIHRlcDI9Zm9udFRhZ1tob2xpXS5kYXRhLnRyaW0oKTsKICAgICAgICAgICAgaWYodGVwMi5pbmRleE9mKCd5ZWVsZWUnKT09LTEpY29udGludWU7CiAgICAgICAgICAgIGNvZGVVc2VkPTA7CiAgICAgICAgICAgIGZvcih2YXIgc2V0aiBpbiBjb2RlU2V0KXsKICAgICAgICAgICAgICAgIGlmKGNvZGVTZXRbc2V0al09PXRlcDIpe2NvZGVVc2VkPTE7YnJlYWs7fQogICAgICAgICAgICB9CiAgICAgICAgICAgIHNsQ29kZT10ZXAyLnNwbGl0KCc9JylbMV07CiAgICAgICAgfQogICAgICAgIGVsc2UgY29udGludWU7CiAgICAgICAgaWYoY29kZVVzZWQ9PTEpY29udGludWU7CiAgICAgICAgY29kZVNldFtjb2RlU2V0Lmxlbmd0aF09c2xDb2RlOwogICAgICAgIHZ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ifHxob3N0PT0iaGFjZzUubWUifHxob3N0PT0iaGFjZy5pdCJ8fGhvc3Q9PSJoYWNnLmxhInx8aG9zdD09Imxsc3MudHcifHxob3N0PT0iaGFjZy5zaXRlIil7CiAgICAgICAgYWxlcnQoIuWNs+Wwhui3s+i9rOWIsOeQieeSg+elnuekvu+8jOiLpeS4jeaDs+i3s+i9rO+8jOiuv+mXruivpee9keermeaXtuivt+WFs+mXreiAgeWPuOacuuS8oOivtCIpOwogICAgICAgIGxvY2F0aW9uLmhyZWY9Imh0dHBzOi8vd3d3LmxpdWxpLmFwcC93cCI7CiAgICB9CiAgICB2YXIgb3JpZ2luVGl0aWxlID0gZG9jdW1lbnQudGl0bGU7CiAgICAvL+eBteaipuW+oeaJgAogICAgaWYoaG9zdD09ImJsb2cucmVpbXUubmV0Iil7CiAgICAgICAgaWYgKGxvY2F0aW9uLmhyZWYuaW5kZXhPZignaHR0cHM6Ly9ibG9nLnJlaW11Lm5ldC8/cGFzc3dvcmQtcHJvdGVjdGVkPWxvZ2luJykgIT0gLTEpIHsKICAgICAgICAgICAgJCgnI3Bhc3N3b3JkX3Byb3RlY3RlZF9wYXNzJykudmFsKCfikagnKTsKICAgICAgICAgICAgJCgnI3dwLXN1Ym1pdCcpLmNsaWNrKCk7CiAgICAgICAgfQogICAgICAgIHZhciB0aXRsZVRpbWU7CiAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcigndmlzaWJpbGl0eWNoYW5nZScsIGZ1bmN0aW9uKCkgewogICAgICAgICAgICBpZiAoZG9jdW1lbnQuaGlkZGVuKSB7CiAgICAgICAgICAgICAgICBkb2N1bWVudC50aXRsZSA9ICdcdTY3NjVcdTU1NmFcdTAwMzhcdTU1NjZ+KCrigLI/772AKikgJyArIG9yaWdpblRpdGlsZTsKICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aXRsZVRpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgZG9jdW1lbnQudGl0bGUgPSAnXHU2MjRkXHU0ZTBkXHU3ZWQ5XHU1NTZhKOKVr+KAteKWoeKAsinila/vuLXilLvilIHilLsgJyArIG9yaWdpblRpdGlsZTsKICAgICAgICAgICAgICAgIHRpdGxlVGltZSA9IHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQudGl0bGUgPSBvcmlnaW5UaXRpbGU7CiAgICAgICAgICAgICAgICB9LCAyMDAwKTsKICAgICAgICAgICAgfQogICAgICAgIH0pOy8vaG9vdGhpbueahCLlj6/llaoi5pWI5p6cCiAgICAgICAgaWYoYm94T05bMV0pYWRkQm94KCk7CiAgICAgICAgLy/lvIDlkK/ogIHlj7jmnLrmqKHlvI8KICAgICAgICBpZihpZnNob3coKSl7CiAgICAgICAgICAgIHZhciBwcmUgPSBkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgncHJlJyk7CiAgICAgICAgICAgIGZvcih2YXIgcm1pPTA7cm1pPHByZS5sZW5ndGg7cm1pKyspewogICAgICAgICAgICAgICAgaWYgKHByZVtybWldKSBwcmVbcm1pXS5zdHlsZS5kaXNwbGF5ID0gJ2Jsb2NrJzsKICAgICAgICAgICAgICAgIHZhciB0ZXh0cmVpPXByZVtybWldLmlubmVySFRNTDsKICAgICAgICAgICAgICAgIGlmKHRleHRyZWkpewogICAgICAgICAgICAgICAgICAgIHZhciBjaWxpcmVpPXRleHRyZWkubWF0Y2goL21hZ25ldDo/W15cbiJdKy8pOwogICAgICAgICAgICAgICAgICAgIHByZVtybWldLmlubmVySFRNTD10ZXh0cmVpLnJlcGxhY2UoY2lsaXJlaSwnPGEgaHJlZj0iJytjaWxpcmVpKyciPicrY2lsaXJlaSsnPC9hPicpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8v5L+u5aSNYnVn77yM5p2l6IeqaG9vdGhpbu+8jOWujOWFqOS4jeefpemBk+i/meS4qmJ1Z++8m18oOtC344Kd4oigKV8KICAgICAgICBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIjbWFpbiIpLmFkZEV2ZW50TGlzdGVuZXIoJ0RPTU5vZGVJbnNlcnRlZCcsIGZ1bmN0aW9uKGUpIHsKICAgICAgICAgICAgdmFyIGF1dGhvciA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIi5hdXRob3ItaW5mbyIpOwogICAgICAgICAgICBpZiAoYXV0aG9yICYmICFkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIjYmxvY2tCdG4iKSkgewogICAgICAgICAgICAgICAgY3JlYXRlQmxvY2tCdG4oKTsKICAgICAgICAgICAgICAgIHByb2Nlc3MoKTsKICAgICAgICAgICAgICAgIHZhciAkPXVuc2FmZVdpbmRvdy5qUXVlcnk7CiAgICAgICAgICAgICAgICB2YXIgdG9nZ2xlPSQoIi50b2dnbGUiKVswXTsKICAgICAgICAgICAgICAgIGlmKHRvZ2dsZSl7CiAgICAgICAgICAgICAgICAgICAgdmFyIGV2dHM9JC5fZGF0YSh0b2dnbGUsICJldmVudHMiKTsKICAgICAgICAgICAgICAgICAgICBpZighZXZ0cyB8fCAhZXZ0c1siY2xpY2siXSl7CiAgICAgICAgICAgICAgICAgICAgICAgICQoIi50b2dnbGUtYm94IikuaGlkZSgpOwogICAgICAgICAgICAgICAgICAgICAgICAkKCIudG9nZ2xlIikudG9nZ2xlKGZ1bmN0aW9uKCl7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkKHRoaXMpLmFkZENsYXNzKCJ0b2dnbGUtYWN0aXZlIik7CiAgICAgICAgICAgICAgICAgICAgICAgIH0sIGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICQodGhpcykucmVtb3ZlQ2xhc3MoInRvZ2dsZS1hY3RpdmUiKTsKICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgICAgICAgICQoIi50b2dnbGUiKS5jbGljayhmdW5jdGlvbigpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgJCh0aGlzKS5uZXh0KCIudG9nZ2xlLWJveCIpLnNsaWRlVG9nZ2xlKCk7CiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0pOwogICAgICAgIC8v5re75Yqg55u05o6l6Lez6L2s5Yiw5LiL6L296ZO+5o6l55qE5oyJ6ZKuCiAgICAgICAgdmFyIG9EX2JveD1kb2N1bWVudC5jcmVhdGVFbGVtZW50KCJkaXYiKTsKICAgICAgICBvRF9ib3guc3R5bGUuemluZGV4PSI5OTk5OTkiOwogICAgICAgIG9EX2JveC5pZD0iZ29Ub0Rvd25sb2FkIjsKICAgICAgICBvRF9ib3guc3R5bGU9InBvc2l0aW9uOmZpeGVkO3RvcDo2MHB4O3JpZ2h0OjBweDt3aWR0aDo0MHB4O3RyYW5zaXRpb246IGFsbCAwLjJzIGVhc2U7d2hpdGUtc3BhY2U6bm93cmFwO3otaW5kZXg6OTk5OTgiOwogICAgICAgIHZhciBvRF9idXR0b249ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiYnV0dG9uIik7CiAgICAgICAgb0RfYnV0dG9uLmlkPSJnb1RvRG93bmxvYWRfYnV0dG9uIjsKICAgICAgICBvRF9idXR0b24udHlwZT0iYnV0dG9uIjsKICAgICAgICBvRF9idXR0b24uaW5uZXJIVE1MPSLliY3lvoA8YnIvPuS4i+i9vSI7CiAgICAgICAgb0RfYnV0dG9uLnN0eWxlPSJwYWRkaW5nOiA0cHggMHB4OyBwb3NpdGlvbjogYWJzb2x1dGU7IHRvcDogLTFweDsgcmlnaHQ6IDBweDsgd2lkdGg6IDQwcHg7IGhlaWdodDogYXV0bzsiOwogICAgICAgIG9EX2J1dHRvbi5vbmNsaWNrPWZ1bmN0aW9uICgpewogICAgICAgICAgICBpZihkb2N1bWV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fQogICAgICAgIC8v6LCD5pW056We56eY5Luj56CBCiAgICAgICAgdmFyIHRvb2dsZSA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoJ3RvZ2dsZS1ib3gnKVswXTsKICAgICAgICBpZiAodG9vZ2xlKSB0b29nbGUuc3R5bGUuZGlzcGxheSA9ICdibG9jayc7CiAgICAgICAgdmFyIG9sZERyaXZlciA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoJ2VudHJ5LWNvbnRlbnQnKVswXTsKICAgICAgICBpZihob3N0LmluZGV4T2YoJ3RpYW5zaGl0JykhPS0xKW9sZERyaXZlcj1kb2N1bWVudC5nZXRFbGVtZW50c0J5Q2xhc3NOYW1lKCdhcnRpY2xlLWNvbnRlbnQnKVswXTsKICAgICAgICB2YXIgY2hpbGREcml2ZXIgPSBvbGREcml2ZXIuY2hpbGROb2RlczsKICAgICAgICBmb3IgKHZhciBpID0gY2hpbGREcml2ZXIubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pewogICAgICAgICAgICB2YXIgdGFrZU1lID0gY2hpbGREcml2ZXJbaV0udGV4dENvbnRlbnQubWF0Y2goLyhcd3s0MH0pfCgoW0EtWmEtejAtOV17MiwzOX0pKCA/KVtcdTRlMDAtXHU5ZmE1IF17Mix9KCA/KSsoXHd7MiwzN30pXGIpL2cpOwogICAgICAgICAgICBpZiAodGFrZU1lKXsKICAgICAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCB0YWtlTWUubGVuZ3RoOyArK2opewogICAgICAgICAgICAgICAgICAgIHZhciBoYXMgPSB0YWtlTWVbal0udG9TdHJpbmcoKS5yZXBsYWNlKC8oXHN8W1x1NGUwMC1cdTlmYTVdKSsvZywgJycpLnRyaW0oKTsKICAgICAgICAgICAgICAgICAgICBpZiAoaGFzLmxlbmd0aCA+PSA0MCl7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBmdWVsID0gIjxhIGhyZWY9J21hZ25ldDo/eHQ9dXJuOmJ0aWg6IiArIGhhcyArICInPuiAgeWPuOacuumTvuaOpTwvYT4iKyIoIitoYXMrIikiOwogICAgICAgICAgICAgICAgICAgICAgICBpZihjaGlsZERyaXZlcltpXS5pbm5lckhUTUwpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGlsZERyaXZlcltpXS5pbm5lckhUTUwgPSBjaGlsZERyaXZlcltpXS5pbm5lckhUTUwudG9TdHJpbmcoKS5yZXBsYWNlKHRha2VNZVtqXSwgZnVlbCk7CiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYoY2hpbGREcml2ZXJbaV0ucGFyZW50RWxlbWVudCkKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNoaWxkRHJpdmVyW2ldLnBhcmVudEVsZW1lbnQuaW5uZXJIVE1MKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoaWxkRHJpdmVyW2ldLnBhcmVudEVsZW1lbnQuaW5uZXJIVE1MPWNoaWxkRHJpdmVyW2ldLnBhcmVudEVsZW1lbnQuaW5uZXJIVE1MLnJlcGxhY2UodGFrZU1lW2pdLCBmdWVsKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZWxzZXsKICAgICAgICAgICAgICAgIHRha2VNZT1jaGlsZERyaXZlcltpXS50ZXh0Q29udGVudC5tYXRjaCgvKFx3ezMyfSl8KChbQS1aYS16MC05XXsyLDMxfSkoID8pW1x1NGUwMC1cdTlmYTUgXXsyLH0oID8pKyhcd3syLDI5fSlcYikvZyk7CiAgICAgICAgICAgICAgICBpZih0YWtlTWUpewogICAgICAgICAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCB0YWtlTWUubGVuZ3RoOyArK2opewogICAgICAgICAgICAgICAgICAgICAgICB2YXIgaGFzMiA9IHRha2VNZVtqXS50b1N0cmluZygpLnJlcGxhY2UoLyhcc3xbXHU0ZTAwLVx1OWZhNV0pKy9nLCAnJykudHJpbSgpOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoaGFzMi5sZW5ndGggPj0gMzIpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGZ1ZWwyID0gIjxhIGhyZWY9J21hZ25ldDo/eHQ9dXJuOmJ0aWg6IiArIGhhczIgKyAiJz7ogIHlj7jmnLrpk77mjqU8L2E+IisiKCIraGFzMisiKSI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGlsZERyaXZlcltpXS5pbm5lckhUTUwgPSBjaGlsZERyaXZlcltpXS5pbm5lckhUTUwudG9TdHJpbmcoKS5yZXBsYWNlKHRha2VNZVtqXSwgZnVlbDIpOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIC8v5bCP5YWr6ZO+5o6lCiAgICAgICAgdmFyIGJ1RGFuZz1kb2N1bWVudC5nZXRFbGVtZW50c0J5Q2xhc3NOYW1lKCdjb21tZW50LWNvbnRlbnQnKTsKICAgICAgICBmb3IgKGkgaW4gYnVEYW5nKXsKICAgICAgICAgICAgaWYoYnVEYW5nW2ldLmlubmVySFRNTCl7CiAgICAgICAgICAgICAgICBidURhbmdbaV0uaW5uZXJIVE1MPWJ1RGFuZ1tpXS5pbm5lckhUTUwucmVwbGFjZSgvYj9cLz9zP1wvP1xiKFx3ezh9KVxiL2csIjxhIGhyZWY9J2h0dHA6Ly9wYW4uYmFpZHUuY29tL3MvJDEnPueZvuW6pue9keebmDwvYT4iKTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0KICAgIC8v57qv54ix6K6h5YiSCiAgICBlbHNlIGlmKGhvc3Q9PSJzZXhhY2cuY29tIil7CiAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcigndmlzaWJpbGl0eWNoYW5nZScsIGZ1bmN0aW9uKCkgewogICAgICAgICAgICBpZiAoZG9jdW1lbnQuaGlkZGVuKSB7CiAgICAgICAgICAgICAgICBkb2N1bWVudC50aXRsZSA9ICfnnIvkuI3liLDmiJEuPz9vwrco4oCyP8+JP+KAmCk/b8K3Py4gJyArIG9yaWdpblRpdGlsZTsKICAgICAgICAgICAgICAgIGNsZWFyVGltZW91dCh0aXRsZVRpbWUpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgewogICAgICAgICAgICAgICAgZG9jdW1lbnQudGl0bGUgPSAn6KKr5om+5Yiw5ZWmPCgq77+j4pa977+jKikvJyArIG9yaWdpblRpdGlsZTsKICAgICAgICAgICAgICAgIHRpdGxlVGltZSA9IHNldFRpbWVvdXQoZnVuY3Rpb24oKSB7CiAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQudGl0bGUgPSBvcmlnaW5UaXRpbGU7CiAgICAgICAgICAgICAgICB9LCAyMDAwKTsKICAgICAgICAgICAgfQogICAgICAgIH0pOy8vaG9vdGhpbueahCLlj6/llaoi5pWI5p6cCiAgICAgICAgaWYoYm94T05bMl0pYWRkQm94KCk7CiAgICAgICAgdmFyIGdldHA9ZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ3AnKTsKICAgICAgICBnZXRwW2dldHAubGVuZ3RoXT1kb2N1bWVudC5nZXRFbGVtZW50c0J5Q2xhc3NOYW1lKCdzdS1xdW90ZS1pbm5lcicpWzBdOwogICAgICAgIGZvcih2YXIgYWk9MDthaTw9Z2V0cC5sZW5ndGg7YWkrKyl7CiAgICAgICAgICAgIHZhciBhY2dEcml2ZXI9Z2V0cFthaV07CiAgICAgICAgICAgIGlmKCFhY2dEcml2ZXIpY29udGludWU7CiAgICAgICAgICAgIHZhciBhY2dDaGlsZERyaXZlciA9IGFjZ0RyaXZlci5jaGlsZE5vZGVzOwogICAgICAgICAgICBmb3IgKHZhciBjaSA9IGFjZ0NoaWxkRHJpdmVyLmxlbmd0aCAtIDE7IGNpID49IDA7IGNpLS0pewogICAgICAgICAgICAgICAgdmFyIGJkdGV4dD1hY2dDaGlsZERyaXZlcltjaV0udGV4dENvbnRlbnQ7CiAgICAgICAgICAgICAgICBpZihiZHRleHQpewogICAgICAgICAgICAgICAgICAgIGJkdGV4dD1iZHRleHQudHJpbSgpOwogICAgICAgICAgICAgICAgICAgIGlmKGJkdGV4dC5pbmRleE9mKCcvcycpIT0tMSl7CiAgICAgICAgICAgICAgICAgICAgICAgIGJkdGV4dD1iZHRleHQuc3Vic3RyaW5nKDMpOwogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIHZhciBhID0gZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgiYSIpOwogICAgICAgICAgICAgICAgaWYoYmR0ZXh0JiZiZHRleHQuc3BsaXQoL1xzKy8pWzBdLmxlbmd0aD09OCl7CiAgICAgICAgICAgICAgICAgICAgdmFyIGJkdDI9YmR0ZXh0LnNwbGl0KCgvXHMrLykpWzBdOwogICAgICAgICAgICAgICAgICAgIGlmKGJkdDIubGVuZ3RoIT04KWNvbnRpbnVlOwogICAgICAgICAgICAgICAgICAgIGlmKCFiZHRleHQuc3BsaXQoL1xzKy8pWzBdLm1hdGNoKC9eW2EtekEtWjAtOV17MCw4fSQvKSljb250aW51ZTsKICAgICAgICAgICAgICAgICAgICBhLnNldEF0dHJpYnV0ZSgiaHJlZiIsImh0dHBzOi8vcGFuLmJhaWR1LmNvbS9zLyIrYmR0ZXh0LnNwbGl0KC9ccysvKVswXSk7CiAgICAgICAgICAgICAgICAgICAgaWYoYS5ocmVmPT0iaHR0cHM6Ly9wYW4uYmFpZHUuY29tL3MvIiljb250aW51ZTsKICAgICAgICAgICAgICAgICAgICBpZihhLmhyZWYuaW5kZXhPZigiQ29weXJpZ2h0IikhPS0xKWNvbnRpbnVlOwogICAgICAgICAgICAgICAgICAgIHZhciBiZG5vZGUgPSBkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZSgi5Lyg6YCB6ZeoICAgICIpOwogICAgICAgICAgICAgICAgICAgIGEuYXBwZW5kQ2hpbGQoYmRub2RlKTsKICAgICAgICAgICAgICAgICAgICB2YXIgYiA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoImEiKTsKICAgICAgICAgICAgICAgICAgICBiZG5vZGUgPWRvY3VtZW50LmNyZWF0ZVRleHROb2RlKCLmj5Dlj5bnoIHvvJoiK2JkdGV4dC5zcGxpdCgvXHMrLylbMV0rIlxuIik7CiAgICAgICAgICAgICAgICAgICAgYi5hcHBlbmRDaGlsZChiZG5vZGUpOwogICAgICAgICAgICAgICAgICAgIGFjZ0NoaWxkRHJpdmVyW2NpXS5kYXRhPSIiOwogICAgICAgICAgICAgICAgICAgIGFjZ0RyaXZlci5pbnNlcnRCZWZvcmUoYixhY2dEcml2ZXIuY2hpbGROb2Rlc1tjaV0pOwogICAgICAgICAgICAgICAgICAgIGFjZ0RyaXZlci5pbnNlcnRCZWZvcmUoYSxhY2dEcml2ZXIuY2hpbGROb2Rlc1tjaV0pOwogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdmFyIHRha2VhY2cgPSBhY2dDaGlsZERyaXZlcltjaV0udGV4dENvbnRlbnQubWF0Y2goLyhcd3s0MH0pfCgoW0EtWmEtejAtOV17MiwzOX0pKCA/KVtcdTRlMDAtXHU5ZmE1IF17Mix9KCA/KSsoXHd7MiwzN30pXGIpL2cpOwogICAgICAgICAgICAgICAgaWYgKHRha2VhY2cpewogICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGNqID0gMDsgY2ogPCB0YWtlYWNnLmxlbmd0aDsgKytjail7CiAgICAgICAgICAgICAgICAgICAgICAgIC8vY29uc29sZS5sb2codGFrZWFjZ1tjal0pOwogICAgICAgICAgICAgICAgICAgICAgICB2YXIgYWNoYXMgPSB0YWtlYWNnW2NqXS50b1N0cmluZygpLnJlcGxhY2UoLyhcc3xbXHU0ZTAwLVx1OWZhNV0pKy9nLCAnJykudHJpbSgpOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWNoYXMubGVuZ3RoID49IDQwKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGEuc2V0QXR0cmlidXRlKCJocmVmIiwibWFnbmV0Oj94dD11cm46YnRpaDoiICsgYWNoYXMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5vZGUgPSBkb2N1bWVudC5jcmVhdGVUZXh0Tm9kZSgi6ICB5Y+45py66ZO+5o6lIik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhLmFwcGVuZENoaWxkKG5vZGUpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgYWNnQ2hpbGREcml2ZXJbY2ldLmRhdGE9IigiK2FjZ0NoaWxkRHJpdmVyW2NpXS5kYXRhLnRyaW0oKSsiKSI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhY2dEcml2ZXIuaW5zZXJ0QmVmb3JlKGEsYWNnQ2hpbGREcml2ZXJbY2ldKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vcmV0dXJuOwogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgLy/lnKPngbXnpZ7ln58KICAgIGVsc2UgaWYoaG9zdD09ImJicy5ob2x5by5vcmciKXsKICAgICAgICBob2x5bzEoKTsKICAgICAgICBob2x5bzIoKTsKICAgIH0KICAgIC8v57uF5aOr5LqM5qyh5YWDCiAgICBlbHNlIGlmKGhvc3QuaW5kZXhPZignYWNnJykhPS0xKXsKICAgICAgICBhZGRCYXNlNjRCb3goKTsKICAgICAgICBpZihsb2NhdGlvbi5ocmVmLmluZGV4T2YoJ2h0bWwnKT09LTEpcmV0dXJuOwogICAgICAgIHZhciBhY2dwPWRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCdwJyk7CiAgICAgICAgZm9yKHZhciBhY2k9MDthY2k8YWNncC5sZW5ndGg7YWNpKyspewogICAgICAgICAgICBpZihhY2dwW2FjaV0udGV4dENvbnRlbnQuaW5kZXhPZign5a+G5YyZJykhPS0xKXsKICAgICAgICAgICAgICAgIHZhciBiYXNlNjRtaXc9YWNncFthY2ldLnRleHRDb250ZW50LnNwbGl0KCc6JylbMV07CiAgICAgICAgICAgICAgICBpZighYmFzZTY0bWl3KWJhc2U2NG1pdz1hY2dwW2FjaV0udGV4dENvbnRlbnQuc3BsaXQoJ++8micpWzFdOwogICAgICAgICAgICAgICAgaWYoIWJhc2U2NG1pdyljb250aW51ZTsKICAgICAgICAgICAgICAgIHZhciByZWdDTiA9IC9bXHU0RTAwLVx1OUZBNVx1RjkwMC1cdUZBMkRdLzsKICAgICAgICAgICAgICAgIGlmKHJlZ0NOLnRlc3QoYmFzZTY0bWl3KSljb250aW51ZTsKICAgICAgICAgICAgICAgIHZhciBiYXNlNjRtdz13aW5kb3cuYXRvYihiYXNlNjRtaXcpOwogICAgICAgICAgICAgICAgYWNncFthY2ldLnRleHRDb250ZW50PSflr4bljJk6JytiYXNlNjRtdzsKICAgICAgICAgICAgICAgIHZhciBuc2I9YWNncFthY2ldLm5leHRTaWJsaW5nOwogICAgICAgICAgICAgICAgdmFyIHRtcD1uc2IudGV4dENvbnRlbnQucmVwbGFjZSgvW1xyXG5dL2csICIiKTsKICAgICAgICAgICAgICAgIHRtcD10bXAucmVwbGFjZSgvIC9nLCIiKTsKICAgICAgICAgICAgICAgIHZhciBtdz1DcnlwdG9KUy5BRVMuZGVjcnlwdCh0bXAsYmFzZTY0bXcpLnRvU3RyaW5nKENyeXB0b0pTLmVuYy5VdGY4KTsKICAgICAgICAgICAgICAgIGlmKG13PT09IiIpewogICAgICAgICAgICAgICAgICAgIG5zYj1hY2dwW2FjaV0ubmV4dFNpYmxpbmcubmV4dFNpYmxpbmc7CiAgICAgICAgICAgICAgICAgICAgdG1wPW5zYi50ZXh0Q29udGVudC5yZXBsYWNlKC9bXHJcbl0vZywgIiIpOwogICAgICAgICAgICAgICAgICAgIHRtcD10bXAucmVwbGFjZSgvIC9nLCIiKTsKICAgICAgICAgICAgICAgICAgICBtdz1DcnlwdG9KUy5BRVMuZGVjcnlwdCh0bXAsYmFzZTY0bXcpLnRvU3RyaW5nKENyeXB0b0pTLmVuYy5VdGY4KTsKICAgICAgICAgICAgICAgICAgICBpZihuc2IpbnNiLnRleHRDb250ZW50PW13O30KICAgICAgICAgICAgICAgIHZhciBocmVmYmQ9bXcuc3BsaXQoJ+WvhueggScpWzBdLnNwbGl0KCcvLycpWzFdOwogICAgICAgICAgICAgICAgbnNiLmlubmVySFRNTD0nPGEgdGFyZ2V0PSJfYmxhbmsiIGhyZWY9Imh0dHA6Ly8nK2hyZWZiZCsnIj7kvKDpgIHpl6g8L2E+ICcrJ+WvhueggScrbXcuc3BsaXQoJ+WvhueggScpWzFdOwogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfQogICAgLy/lv6fpg4HnmoTlvJ/lvJ8KICAgIGVsc2UgaWYoaG9zdC5pbmRleE9mKCdteWdhbGdhbWUnKSE9LTEpewogICAgICAgIHZhciBidXR0b25kb3duPWRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoJ2J0bi1kYW5nZXInKVswXTsKICAgICAgICBpZihidXR0b25kb3duLm91dGVySFRNTCl7CiAgICAgICAgICAgIHZhciBwYW5lbF9mb290ZXI9ZG9jdW1lbnQuZ2V0RWxlbWVudHNCeUNsYXNzTmFtZSgncGFuZWwtZm9vdGVyJylbMF07CiAgICAgICAgICAgIGlmKHBhbmVsX2Zvb3Rlcil7CiAgICAgICAgICAgICAgICB2YXIgdHFtbT1wYW5lbF9mb290ZXIuY2hpbGROb2Rlc1sxXS5pbm5lclRleHQ7CiAgICAgICAgICAgICAgICB0cW1tPXRxbW0uc3Vic3RyaW5nKHRxbW0uaW5kZXhPZign77yaJykrMSk7CiAgICAgICAgICAgICAgICB2YXIgbmV3SFRNTD1idXR0b25kb3duLm91dGVySFRNTDsKICAgICAgICAgICAgICAgIG5ld0hUTUw9bmV3SFRNTC5yZXBsYWNlKCdcJykiPicsJyMnK3RxbW0rJ1wnKSI+Jyk7CiAgICAgICAgICAgICAgICBuZXdIVE1MPW5ld0hUTUwucmVwbGFjZSgnaHR0cDovL3d3dy5teWdhbGdhbWUuY29tL2dvLnBocD91cmw9JywnJyk7CiAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhuZXdIVE1MKTsKICAgICAgICAgICAgICAgIGJ1dHRvbmRvd24ub3V0ZXJIVE1MPW5ld0hUTUw7CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgdmFyIHBpbmdsdW49ZG9jdW1lbnQuZ2V0RWxlbWVudHNCeUNsYXNzTmFtZSgnY29tbWVudC1jb250ZW50Jyk7CiAgICAgICAgZm9yICh2YXIgaT0wO2k8cGluZ2x1bi5sZW5ndGg7aSsrKXsKICAgICAgICAgICAgaWYocGluZ2x1bltpXS5pbm5lckhUTUwpewogICAgICAgICAgICAgICAgcGluZ2x1bltpXS5pbm5lckhUTUw9cGluZ2x1bltpXS5pbm5lckhUTUwucmVwbGFjZSgvYj9cLz9zP1wvP1xiKFx3ezh9KVxiL2csIjxhIGhyZWY9J2h0dHA6Ly9wYW4uYmFpZHUuY29tL3MvJDEnPueZvuW6pue9keebmDwvYT4iKTsKICAgICAgICAgICAgICAgIGlmKHBpbmdsdW5baV0uaW5uZXJIVE1MLmluZGV4T2YoJz7nmb7luqbnvZHnm5g8JykhPS0xKXsKICAgICAgICAgICAgICAgICAgICB2YXIgZGFuZ2VyPWRvY3VtZW50LmdldEVsZW1lbnRzQnlDbGFzc05hbWUoJ2FsZXJ0LWRhbmdlcicpWzBdOwogICAgICAgICAgICAgICAgICAgIGlmKGRhbmdlcil7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRhbmdlci5pbm5lckhUTUwpewogICAgICAgICAgICAgICAgICAgICAgICAgICAgZGFuZ2VyLmlubmVySFRNTCs9cGluZ2x1bltpXS5pbm5lckhUTUw7CiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CgogICAgfQogICAgLy/nmb7luqbkupHloavlhpnpqozor4HnoIEKICAgIGVsc2V7CiAgICAgICAgdmFyIHNDb2RlID0gaGFzaC5zbGljZSgxKS50cmltKCk7CiAgICAgICAgaWYoc0NvZGU9PT0nJylyZXR1cm47CiAgICAgICAgc2V0VGltZW91dCAoZnVuY3Rpb24gKCl7CiAgICAgICAgICAgIGNvZGVCb3ggPSAkKCcucGlja3B3JykuZmluZCgnaW5wdXQnKTsKICAgICAgICAgICAgYnRuT2sgPSAkKCcucGlja3B3JykuZmluZCgnLmctYnV0dG9uJyk7CiAgICAgICAgICAgIGlmKGNvZGVCb3gpCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIGNvZGVCb3gudmFsKHNDb2RlKTsKICAgICAgICAgICAgICAgIGJ0bk9rLmNsaWNrKCk7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICB2YXIgY29kZUJveCA9ICQoY29uZi5jb2RlKSxidG5PayA9ICQoY29uZi5idG4pOwogICAgICAgICAgICAgICAgY29kZUJveC52YWwoc0NvZGUpOwogICAgICAgICAgICAgICAgaWYgKGNvbmYucHJlU3VibWl0KQogICAgICAgICAgICAgICAgICAgIGlmIChjb25mLnByZVN1Ym1pdCAoY29kZUJveCwgYnRuT2spKQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gOwogICAgICAgICAgICAgICAgYnRuT2suY2xpY2soKTsKICAgICAgICAgICAgfQogICAgICAgIH0sIDEwKTsKICAgIH0KfSkoKTsKdmFyIGhvc3ROYW1lID0gbG9jYXRpb24uaG9zdC5tYXRjaCgvXHcrXC5cdyskLylbMF0udG9Mb3dlckNhc2UoKTsKdmFyIGNvbmYgPSBzaXRlW2hvc3ROYW1lXTsKdmFyIEhvc3RBcnIgPSBbXTsKZm9yKHZhciBpIGluIHNpdGUpIEhvc3RBcnIucHVzaChpKTsKdmFyIEhvc3RFeHAgPSBuZXcgUmVnRXhwKEhvc3RBcnIuam9pbigifCIpLCdpJyk7CmlmKHNpdGUuSnVtcFVybFtob3N0XSl7CiAgICBzaXRlLkp1bXBVcmxbaG9zdF0uZWFjaChmdW5jdGlvbigpewogICAgICAgICQodGhpcykuYXR0cih7J2hyZWYnOiQodGhpcykudGV4dCgpLCd0YXJnZXQnOidibGFuayd9KTsKICAgIH0pOwp9Ci8v6Lez6L2sKOeCueWHu+mTvuaOpeOAgeWJjei/m+WQjumAgCnml7blvIDlkK/ogIHlj7jmnLrmqKHlvI8KZnVuY3Rpb24gbHNqbW9kZU9OKCl7CiAgICBpZih1cmxzLmluZGV4T2YoImFyY2hpdmVzIikhPS0xKXsKICAgICAgICB2YXIgcHJldCA9IGRvY3VtZW50LmdldEVsZW1lbnRzQnlUYWdOYW1lKCdwcmUnKVswXTsKICAgICAgICBpZihwcmV0KXByZXQuc3R5bGUuZGlzcGxheT0naW5saW5lJzsvL+aWh+eroOmhtei3s+i9rOaWh+eroOmhteeJueauiuWkhOeQhgogICAgfQogICAgaWYodXJscz09bG9jYXRpb24uaHJlZil7CiAgICAgICAgdmFyIHByZXQyID0gZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ3ByZScpWzBdOwogICAgICAgIGlmKHByZXQyKXByZXQyLnN0eWxlLmRpc3BsYXk9J2Jsb2NrJzsvL+aWh+eroOmhtei3s+i9rOaWh+eroOmhteeJueauiuWkhOeQhgogICAgICAgIHJldHVybjsKICAgIH0KICAgICQoIiNhdHRlbnRpb24iKS5yZW1vdmUoKTsKICAgIHVybHM9bG9jYXRpb24uaHJlZjsKICAgIHZhciByZT11cmxzLmluZGV4T2YoImFyY2hpdmVzIik7CiAgICBpZihyZSE9LTEpewogICAgICAgIHZhciBwcmUgPSBkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgncHJlJylbMF07CiAgICAgICAgdmFyIHRyeXRpbWU9MDsKICAgICAgICB2YXIgaXR2YWw9c2V0SW50ZXJ2YWwoZnVuY3Rpb24gKCl7CiAgICAgICAgICAgIHZhciBwcmUgPSBkb2N1bWVudC5nZXRFbGVtZW50c0J5VGFnTmFtZSgncHJlJylbMF07CiAgICAgICAgICAgIHRyeXRpbWUrPTE7CiAgICAgICAgICAgIGlmKHRyeXRpbWU9PTQwKWNsZWFySW50ZXJ2YWwoaXR2YWwpOwogICAgICAgICAgICBpZihwcmUpewogICAgICAgICAgICAgICAgaWYocHJlLnN0eWxlLmRpc3BsYXkhPSdpbmxpbmUnKXsKICAgICAgICAgICAgICAgICAgICBpZihpZnNob3coKSl7CiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwcmV4ID0gZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoJ3ByZScpOwogICAgICAgICAgICAgICAgICAgICAgICBmb3IodmFyIHJtaT0wO3JtaTxwcmV4Lmxlbmd0aDtybWkrKykKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwcmV4W3JtaV0pIHByZXhbcm1pXS5zdHlsZS5kaXNwbGF5ID0gJ2Jsb2NrJzsKICAgICAgICAgICAgICAgICAgICAgICAgLy9wcmUuc3R5bGUuZGlzcGxheT0nYmxvY2snOwogICAgICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKGl0dmFsKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgZWxzZSBjbGVhckludGVydmFsKGl0dmFsKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0sNTAwKTsKICAgIH0KfQovL+ebkeaOp+eCueWHu+S6i+S7tgokKCdib2R5Jykub24oJ2NsaWNrJywgJ2EnLCBmdW5jdGlvbiAoKXsKICAgIGlmKGhvc3Q9PSJibG9nLnJlaW11Lm5ldCIpbHNqbW9kZU9OKCk7CiAgICAvL+aVtOWQiOaPkOWPlueggeWSjOmTvuaOpQogICAgaWYoYWlPTj09PTApcmV0dXJuOwogICAgdmFyIHRhcmdldD10aGlzOwogICAgaWYodGhpcy5oYXNoKSByZXR1cm47CiAgICBpZihIb3N0RXhwLnRlc3QodGhpcy5ocmVmKSYmIS8oPzpleXVufHRpZWJhKVwuYmFpZHVcLmNvbS9pLnRlc3QodGhpcy5ocmVmKSl7CiAgICAgICAgaWYodGFyZ2V0Lm5leHRTaWJsaW5nJiZzaXRlWydjb2RlUnVsZSddLnRlc3QodGFyZ2V0Lm5leHRTaWJsaW5nLnRleHRDb250ZW50LnRyaW0oKSkpewogICAgICAgICAgICBpZighLyMvaS50ZXN0KHRhcmdldC5ocmVmKSkgdGFyZ2V0LmhyZWYrPScjJytleHRDb2RlKHRhcmdldC5uZXh0U2libGluZyk7fQogICAgICAgIGVsc2V7CiAgICAgICAgICAgIHZhciBjYWpoYz10YXJnZXQubmV4dFNpYmxpbmcuZGF0YTsKICAgICAgICAgICAgaWYoIWNhamhjKWNhamhjPXRhcmdldC5uZXh0U2libGluZy50ZXh0OwogICAgICAgICAgICBpZihjYWpoYy5pbmRleE9mKCLvvJoiKSE9LTEpewogICAgICAgICAgICAgICAgdGFyZ2V0LmhyZWYrPScjJytjYWpoYy5zdWJzdHJpbmcoY2FqaGMuaW5kZXhPZigi77yaIikrMSxjYWpoYy5pbmRleE9mKCLvvJoiKSszKTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlIHRhcmdldC5ocmVmKz0nIzjphbEnOwogICAgICAgIH0KICAgIH0KfSk7Ci8v5o+Q5Y+W56CBCmZ1bmN0aW9uIGV4dENvZGUob2JqKXsKICAgIHRleHQ9b2JqLnRleHRDb250ZW50LnRyaW0oKTsKICAgIHZhciBydWxlPW5ldyBSZWdFeHAoJyg/OuaPkOWPlnzorr/pl64pW+eggeeivF0/XHMqWzrvvJogXT9cXHMqKFthLXpcXGRdez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XIgaGFzaCA9IHdpbmRvdy5sb2NhdGlvbi5oYXNoOwogICAgICAgICAgICAgICAgaWYgKGhhc2ggPT09ICcnKSBsc2ptb2RlT04oKTsKICAgICAgICAgICAgfQogICAgICAgIH0pOwogICAgfQp9KTsK
Add Comment
Please, Sign In to add comment