Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:网页插件¥js_url¥global_夸克网盘直链下载(新)@base64://Ly8gPT1Vc2VyU2NyaXB0PT0KLy8gQG5hbWUgICAgICAgICDlpLjlhYvnvZHnm5jnm7Tpk77kuIvovb3vvIjmlrDvvIkKLy8gQHZlcnNpb24gICAgICAxLjEKLy8gQG5hbWVzcGFjZSAgICBodHRwczovL3Bhbi5xdWFyay5jbi9saXN0Ci8vIEBkZXNjcmlwdGlvbiAg6Kej6Zmk5aS45YWL572R55uY5LiL6L296ZmQ5Yi277yM55u05o6l5Zyo5rWP6KeI5Zmo5Lit5LiL6L29Ci8vIEBhdXRob3IgICAgICAgTGluZ28gV2FuZwovLyBAbGljZW5zZSAgICAgIE1JVAogCi8vIEBtYXRjaCAgICAgICAgaHR0cHM6Ly9wYW4ucXVhcmsuY24vbGlzdCoKLy8gQGljb24gICAgICAgICBodHRwczovL3d3dy5nb29nbGUuY29tL3MyL2Zhdmljb25zP3N6PTY0JmRvbWFpbj1xdWFyay5jbgovLyBAZ3JhbnQgICAgICAgIEdNX3htbGh0dHBSZXF1ZXN0Ci8vIEBncmFudCAgICAgICAgR01fbG9nCi8vIEBncmFudCB3aW5kb3cub251cmxjaGFuZ2UKLy8gQGRvd25sb2FkVVJMIGh0dHBzOi8vdXBkYXRlLmdyZWFzeWZvcmsub3JnL3NjcmlwdHMvNDczNjA2LyVFNSVBNCVCOCVFNSU4NSU4QiVFNyVCRCU5MSVFNyU5QiU5OCVFNyU5QiVCNCVFOSU5MyVCRSVFNCVCOCU4QiVFOCVCRCVCRCVFRiVCQyU4OCVFNiU5NiVCMCVFRiVCQyU4OS51c2VyLmpzCi8vIEB1cGRhdGVVUkwgaHR0cHM6Ly91cGRhdGUuZ3JlYXN5Zm9yay5vcmcvc2NyaXB0cy80NzM2MDYvJUU1JUE0JUI4JUU1JTg1JThCJUU3JUJEJTkxJUU3JTlCJTk4JUU3JTlCJUI0JUU5J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CiAgICAgICAgICAgIH0pCiAgICAgICAgfQogCiAgICAgICAgLy8gZmxvdyBkb3dubG9hZCBidG4KICAgICAgICBhZGRGbG93RG93bmxvYWRCdG5MaXN0ZW5lcigpOwogICAgfQogCiAgICBmdW5jdGlvbiBhZGREb3dubG9hZEJ0bkxpc3RlbmVyKCkgewogICAgICAgIGxldCBkb3dubG9hZEJ0biA9IGdldERvd25sb2FkQnRuKCk7CiAgICAgICAgZG93bmxvYWRCdG4ucmVwbGFjZVdpdGgoZG93bmxvYWRCdG4uY2xvbmVOb2RlKHRydWUpKTsgICAvLyByZW1vdmUgYWxsIGV2ZW50IGxpc3RlbmVyCiAgICAgICAgZG93bmxvYWRCdG4gPSBnZXREb3dubG9hZEJ0bigpOwogCiAgICAgICAgZG93bmxvYWRCdG4uYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCAoKSA9PiB7CiAgICAgICAgICAgIGxldCBmaWRzID0gZ2V0U2VsZWN0ZWRGaWRzKCk7CiAgICAgICAgICAgIGRvd25sb2FkKGZpZHMpOwogICAgICAgIH0pCiAgICB9CiAKICAgIGZ1bmN0aW9uIGFkZEZsb3dEb3dubG9hZEJ0bkxpc3RlbmVyKCkgewogICAgICAgIGZvciAoY29uc3QgYnRuIG9mIGdldEZsb3dEb3dubG9hZEJ0bnMoKSkgewogICAgICAgICAgICBidG4ucmVwbGFjZVdpdGgoYnRuLmNsb25lTm9kZSh0cnVlKSk7ICAgLy8gcmVtb3ZlIGFsbCBldmVudCBsaXN0ZW5lcgogICAgICAgIH0KIAogICAgICAgIGZvciAoY29uc3QgYnRuIG9mIGdldEZsb3dEb3dubG9hZEJ0bnMoKSkgewogICAgICAgICAgICBidG4uYWRkRXZlbnRMaXN0ZW5lcignY2xpY2snLCAoKSA9PiB7CiAgICAgICAgICAgICAgICBjb25zdCBmaWQgPSBidG4ucGFyZW50RWxlbWVudC5wYXJlbnRFbGVtZW50LnBhcmVudEVsZW1lbnQucGFyZW50RWxlbWVudC5wYXJlbnRFbGVtZW50LmdldEF0dHJpYnV0ZShmaWRBdHRyTmFtZSk7CiAgICAgICAgICAgICAgICBkb3dubG9hZChbZmlkXSk7CiAgICAgICAgICAgIH0pCiAgICAgICAgfQogICAgfQogCiAgICBmdW5jdGlvbiBkb3dubG9hZChmaWRzKSB7CiAgICAgICAgR01feG1saHR0cFJlcXVlc3QoewogICAgICAgICAgICBtZXRob2Q6ICJQT1NUIiwKICAgICAgICAgICAgdXJsOiAiaHR0cHM6Ly9kcml2ZS5xdWFyay5jbi8xL2Nsb3VkZHJpdmUvZmlsZS9kb3dubG9hZD9wcj11Y3BybyZmcj1wYyZ2ZT0yLjEuNSIsCiAgICAgICAgICAgIGhlYWRlcnM6IHsKICAgICAgICAgICAgICAgICJDb250ZW50LVR5cGUiOiAiYXBwbGljYXRpb24vanNvbjtjaGFyc2V0PXV0Zi04IgogICAgICAgICAgICB9LAogICAgICAgICAgICBkYXRhOiBKU09OLnN0cmluZ2lmeSh7ImZpZHMiOiBmaWRzfSksCiAgICAgICAgICAgIG9ubG9hZDogZnVuY3Rpb24gKHJlcykgewogICAgICAgICAgICAgICAgY29uc29sZS5sb2coJ2dldCByZWFsIGRvd25sb2FkIHVybCwgZmlkczogJW8sIHJlczogJywgZmlkcywgcmVzLnJlc3BvbnNlVGV4dCk7CiAgICAgICAgICAgICAgICBsZXQgcmVzRGF0YSA9IEpTT04ucGFyc2UocmVzLnJlc3BvbnNlVGV4dCkuZGF0YTsKICAgICAgICAgICAgICAgIGlmIChyZXNEYXRhID09PSB1bmRlZmluZWQgfHwgcmVzRGF0YS5sZW5ndGggPT09IDApIHsKICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygnZXJyb3IhLCBkYXRhIGlzIGVtcHR5LiByZXF1ZXN0IGZpZHM6ICcsIGZpZHMpOwogICAgICAgICAgICAgICAgICAgIGFsZXJ0KCfojrflj5bnm7Tpk77lpLHotKUsIOivt+WwneivleWIt+aWsOmhtemdou+8geazqOaEj++8jOaWh+S7tuWkueS4jeaUr+aMgeebtOmTvuS4i+i9ve+8gScpCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZygnZ2V0IHJlYWwgZG93bmxvYWQgdXJsLCBzaXplOiAnLCByZXNEYXRhLmxlbmd0aCkKICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgcmVzRGF0YS5mb3JFYWNoKG8gPT4gd2luZG93Lm9wZW4oby5kb3dubG9hZF91cmwpKTsKICAgICAgICAgICAgfQogICAgICAgIH0pOwogICAgfQogCiAgICBmdW5jdGlvbiBnZXREb3dubG9hZEJ0bigpIHsKICAgICAgICBsZXQgYnRuR3JvdXAgPSBkb2N1bWVudC5nZXRFbGVtZW50c0J5Q2xhc3NOYW1lKCdhbnQtYnRuIGJ0bi1maWxlJyk7CiAgICAgICAgbGV0IGRvd25sb2FkQnRuOwogICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgYnRuR3JvdXAubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgaWYgKCfkuIvovb0nID09PSBidG5Hcm91cFtpXS5maXJzdEVsZW1lbnRDaGlsZC5pbm5lclRleHQpIHsKICAgICAgICAgICAgICAgIGRvd25sb2FkQnRuID0gYnRuR3JvdXBbaV07CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmV0dXJuIGRvd25sb2FkQnRuOwogICAgfQogCiAgICBmdW5jdGlvbiBnZXRGbG93RG93bmxvYWRCdG5zKCkgewogICAgICAgIHJldHVybiBkb2N1bWVudC5nZXRFbGVtZW50c0J5Q2xhc3NOYW1lKCdob3Zlci1vcGVyLWl0ZW0gaG9pdGVtLWRvd24nKTsKICAgIH0KIAogICAgZnVuY3Rpb24gZ2V0U2VsZWN0ZWRGaWRzKCkgewogICAgICAgIGNvbnN0IGNoZWNrYm94ZXMgPSBkb2N1bWVudC5nZXRFbGVtZW50c0J5Q2xhc3NOYW1lKCdhbnQtY2hlY2tib3gtaW5wdXQnKTsKICAgICAgICBsZXQgZmlkcyA9IFtdOwogICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgY2hlY2tib3hlcy5sZW5ndGg7IGkrKykgewogICAgICAgICAgICBpZiAoY2hlY2tib3hlc1tpXS5jaGVja2VkKSB7CiAgICAgICAgICAgICAgICBjb25zdCBmaWQgPSBjaGVja2JveGVzW2ldLnBhcmVudEVsZW1lbnQucGFyZW50RWxlbWVudC5wYXJlbnRFbGVtZW50LnBhcmVudEVsZW1lbnQucGFyZW50RWxlbWVudC5nZXRBdHRyaWJ1dGUoJ2RhdGEtcm93LWtleScpOwogICAgICAgICAgICAgICAgaWYgKGZpZCAhPT0gdW5kZWZpbmVkICYmIGZpZCAhPT0gJycpIHsKICAgICAgICAgICAgICAgICAgICBmaWRzLnB1c2goZmlkKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXR1cm4gZmlkczsKICAgIH0KfSkoKTs=
Add Comment
Please, Sign In to add comment