xiaomianao666

插件名:rt-douban

Sep 24th, 2022
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:网页插件¥js_url¥rt-douban@base64://LyoqCiAqIOS4gOS6m+WFqOWxgOmFjee9ru+8jOivt+enu+atpemihOWkhOeQhuS4rei/m+ihjOmFjee9rgogKi8KbGV0IHNldHRpbmdzID0gewogICAgLyoqCiAgICAgKiDmmK/lkKblvIDlkK/op4bnlYzmkJzvvIzlvIDlkK/lkI7ngrnlh7vnrKzkuIDpobnljbPlj6/kvb/nlKgKICAgICAqCiAgICAgKiDoi6XkuI3lvIDlkK/liJnngrnlh7vkuLrmn6XnnIvljp/mlocKICAgICAqCiAgICAgKiDlvIDlkK8vMSDkuI3lvIDlkK8vMAogICAgICovCiAgICBvcGVuSGlrZXJTZWFyY2g6IDEsCiAgICAvLyBkZXNjIOaPj+i/sOeahOS4ieihjOS4reavj+ihjOeahOacgOWkp+mVv+W6pgogICAgZGVzY0xpbmVNYXhMZW46IDI1LAogICAgLy8g6K+E6K6655So5oi36aKc6ImyCiAgICB1c2VyQ29sb3I6ICIjMjk3OUZGIiwKICAgIC8vIOaooeWdl+eahOmXtOi3nQogICAgbGluZV9tb2RlbDogMSwKICAgIC8vIOaooeWdl+mXtOi3neexu+Wei++8iOmAgumFjeS7peWQjuWPr+iDveS8muacieeahOaXoOi+uei3nee6v++8iQogICAgbGluZV90eXBlX21vZGVsOiAnbGluZV9ibGFuaycsCiAgICAvLyDor4TliIbmmL7npLrnsbvlnovvvIwwIOS4uuaYn+aYn+KYheKYhu+8jDEg5Li65paH5a2XCiAgICAvLyDmmK/lkKbmmL7npLonW+afpeeci+WOn+aWh10nLCAwIOS4uuS4jeaYvuekuu+8jDEg5Li65pi+56S6CiAgICBzaG93U291cmNlOiAxLAogICAgLy8g5piv5ZCm5pi+56S6J1vmn6XnnIvlhajmloddJywgMCDkuLrkuI3mmL7npLrvvIwxIOS4uuaYvuekugogICAgc2hvd0FsbENvbnRlbnQ6IDEsCgogICAgcmF0aW5nVHlwZTogMCwKICAgIC8vIOivhOWIhuWvueW6lOaWh+Wtl+OAgeaYn+aYn+OAgeminOiJsiBbIOS6lOaYn+WKm+iNkO+8jOWbm+aYn+aOqOiNkO+8jOS4ieaYn+i/mOihjO+8jOS6jOaYn+i+g+W3ru+8jOS4gOaYn+W+iOW3rl0KICAgIHJhdGluZ1RleHRzOiBbCiAgICAgICAgIuWKm+iNkCIsCiAgICAgICAgIuaOqOiNkCIsCiAgICAgICAgIui/mOihjCIsCiAgICAgICAgIui+g+W3riIsCiAgICAgICAgIuW+iOW3riIsCiAgICBdLAogICAgcmF0aW5nU3RhcnM6IFsKICAgICAgICAi4piF4piF4piF4piF4piFIiwKICAgICAgICAi4piF4piF4piF4piF4piGIiwKICAgICAgICAi4piF4piF4piF4piG4piGIiwKICAgICAgICAi4piF4piF4piG4piG4piGIiwKICAgICAgICAi4piF4piG4piG4piG4piGIiwKICAgIF0sCiAgICByYXRpbmdDb2xvcnM6IFsKICAgICAgICAiIzAwZDQzNyIsCiAgICAgICAgIiM5Y2RjMDAiLAogICAgICAgICIjZGRjZjAwIiwKICAgICAgICAiI2ZmYTQwMCIsCiAgICAgICAgIiNmZjc4MDAiLAogICAgXSwKICAgIC8vIOixhueTo+ivhOWIhuaWh+acrOaYvuekuuaooeW8j++8jDAv57qv5paH5pysIDEv6L+b5bqm5p2hCiAgICByYXRpbmdUZXh0TW9kZTogMSwKCiAgICAvKioKICAgICAqIOaQnOe0ouaooeW8jwogICAgICoKICAgICAqIDA6ICJoaWtlcjovL3NlYXJjaD9zPea1i+ivle+8jOWwhuS8muaJk+W8gOaQnOe0ouW8ueeql++8jOiHquWKqOWhq+WFheaQnOe0oueahOWFs+mUruivjeKAnOa1i+ivleKAne+8jOeUseeUqOaIt+iHquW3semAieaLqeWIhue7hOWSjOinhOWImeWQjuaQnOe0oiIsCiAgICAgKiAxOiAiaGlrZXI6Ly9zZWFyY2g/cz3mtYvor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ICAgcGljX3VybDogcmV2aWV3QXV0aG9yQXZhdGFyLAogICAgICAgICAgICB1cmw6IHJldmlld0F1dGhvclVybCwKICAgICAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInCiAgICAgICAgfSkKICAgICAgICBsZXQgY29udGVudEh0bWwgPSBwYXJzZURvbUZvckh0bWwocmV2aWV3SHRtbEl0ZW0sICcubWFpbi1iZCYmSHRtbCcpOwogICAgICAgIGxldCByZXZpZXdUaXRsZSA9IHBhcnNlRG9tRm9ySHRtbChjb250ZW50SHRtbCwgJ2gyJiZIdG1sJyk7CiAgICAgICAgbGV0IHJldmlld1VybCA9IHBhcnNlRG9tRm9ySHRtbChyZXZpZXdUaXRsZSwgJ2EmJmhyZWYnKTsKICAgICAgICBsZXQgcmV2aWV3UnVsZVVybCA9ICdiYXNlNjQ6Ly8nICsgYmFzZTY0RW5jb2RlKHJldmlld1VybCArICcjZnlwYWdlI25vSGlzdG9yeSMnICsgcmV2aWV3UnVsZSk7CiAgICAgICAgcmV2aWV3VGl0bGUgPSByZXZpZXdUaXRsZS5yZXBsYWNlKHJldmlld1VybCwgcmV2aWV3UnVsZVVybCk7CiAgICAgICAgbGV0IGNvbnRlbnQgPSBnZXRUaXRsZVRleHQocmV2aWV3VGl0bGUpCiAgICAgICAgICAgICsgJzxicj4nCiAgICAgICAgICAgICsgcGFyc2VEb21Gb3JIdG1sKGNvbnRlbnRIdG1sLCAnLnJldmlldy1zaG9ydCYmLnNob3J0LWNvbnRlbnQmJkh0bWwnKQogICAgICAgICAgICArIChzZXR0aW5ncy5zaG93QWxsQ29udGVudCA9PT0gMSA/ICgnICcgKyBnZXRTbWFsbFRleHQoZ2V0QWRkcmVzc1RhZyhyZXZpZXdSdWxlVXJsLCAnW+afpeeci+WFqOaWh10nKSkpIDogJycpCiAgICAgICAgOwogICAgICAgIGxldCByYXRpbmdUZXh0ID0gJyc7CiAgICAgICAgdHJ5IHsKICAgICAgICAgICAgcmF0aW5nVGV4dCA9IGdldFJhdGluZyhwYXJzZURvbUZvckh0bWwocmV2aWV3SHRtbEl0ZW0sICcubWFpbi1oZCYmLm1haW4tdGl0bGUtcmF0aW5nJiZ0aXRsZScpKQogICAgICAgIH0gY2F0Y2ggKGUpIHsgfQogICAgICAgIGxldCBtZXRhID0gcmF0aW5nVGV4dAogICAgICAgICAgICArIGdldEdyZXlUZXh0KCcg4ouFICcgKyBwYXJzZURvbUZvckh0bWwocmV2aWV3SHRtbEl0ZW0sICcubWFpbi1oZCYmLm1haW4tbWV0YSYmVGV4dCcpKTsKICAgICAgICBsZXQgZmVlZGJhY2sgPSAnJzsKICAgICAgICB0cnl7CiAgICAgICAgICAgIGZlZWRiYWNrID0gJ/CfkY3wn4+7JyArIHBhcnNlRG9tRm9ySHRtbChyZXZpZXdIdG1sSXRlbSwgJy5hY3Rpb24mJi5hY3Rpb24tYnRuLnVwJiZUZXh0JykKICAgICAgICAgICAgICAgICsgJyDii4UgJwogICAgICAgICAgICAgICAgKyAn8J+RjvCfj7snICsgcGFyc2VEb21Gb3JIdG1sKHJldmlld0h0bWxJdGVtLCAnLmFjdGlvbiYmLmFjdGlvbi1idG4uZG93biYmVGV4dCcpCiAgICAgICAgICAgICAgICArICcg4ouFICcKICAgICAgICAgICAgICAgICsgcGFyc2VEb21Gb3JIdG1sKHJldmlld0h0bWxJdGVtLCAnLmFjdGlvbiYmYVtjbGFzc149cmVwbHldJiZUZXh0Jyk7CiAgICAgICAgfSBjYXRjaCAoZSkgeyB9CiAgICAgICAgY29udGVudCA9IGNvbnRlbnQKICAgICAgICAgICAgKyAnPGJyPicKICAgICAgICAgICAgKyAoZmVlZGJhY2sgPT09ICcnID8KICAgICAgICAgICAgICAgICAgICAnJwogICAgICAgICAgICAgICAgICAgIDogKGdldEdyZXlUZXh0KGdldENvbW1lbnRNZXRhKGZlZWRiYWNrKSArICcg4ouFICcpKQogICAgICAgICAgICApCiAgICAgICAgICAgICsgZ2V0Q29tbWVudE1ldGEobWV0YSk7CiAgICAgICAgY29udGVudCA9IGNvbnRlbnQKICAgICAgICAgICAgLnJlcGxhY2UoLzxhIGNsYXNzPSJzb3VyY2UtaWNvbiJbXHNcU10qPzxcL2E+L2csICcnKQogICAgICAgICAgICAucmVwbGFjZSgvXChbXHNcU11bXHJcbl08YSBocmVmPSJqYXZhc2NyaXB0OjsiW1xzXFNdKj90aXRsZT0i5bGV5byAIj7lsZXlvIA8XC9hPlwpL2csICcnKQogICAgICAgICAgICAucmVwbGFjZVdpdGhDYWxsYmFjaygvKDxwIGNsYXNzPSJzcG9pbGVyLXRpcCI+KC4qPyk8XC9wPikvZywKICAgICAgICAgICAgICAgIC8qZ2V0U21hbGxUZXh0KCc8YmxvY2txdW90ZSBjbGFzcz0ic3BvaWxlci10aXAiPnvmnInliafpgI99PC9ibG9ja3F1b3RlPicpKi9nZXRTbWFsbFRleHQoZ2V0R3JleVRleHQoJ++8geaPkOekuu+8mnvmnInliafpgI99PGJyPicpKSwKICAgICAgICAgICAgICAgIGZ1bmN0aW9uIChzb3VyY2UsIHNlYXJjaFZhbHVlLCByZXBsYWNlVmFsdWUpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgcmV0dXJuVmFsdWUgPSBzb3VyY2U7CiAgICAgICAgICAgICAgICAgICAgaWYgKHNlYXJjaFZhbHVlLnRlc3Qoc291cmNlKSA9PT0gdHJ1ZSkgewogICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVwbGFjZVRleHQgPSBSZWdFeHAuJDI7CiAgICAgICAgICAgICAgICAgICAgICAgIHJlcGxhY2VUZXh0ID0gcmVwbGFjZVRleHQgPT09ICcnID8gUmVnRXhwLiQxIDogcmVwbGFjZVZhbHVlLnJlcGxhY2UoJ3vmnInliafpgI99JywgcmVwbGFjZVRleHQpOwogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm5WYWx1ZSA9IHNvdXJjZS5yZXBsYWNlKFJlZ0V4cC4kMSwgcmVwbGFjZVRleHQpCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHJldHVybiByZXR1cm5WYWx1ZTsKICAgICAgICAgICAgICAgIH0pOwoKICAgICAgICBsaXN0LnB1c2goewogICAgICAgICAgICB0aXRsZTogY29udGVudCwKICAgICAgICAgICAgY29sX3R5cGU6IHJldmlld0NvbFR5cGUKICAgICAgICB9KTsKICAgIH0sCiAgICAvKioKICAgICAqIOefreivhOWIl+ihqOWNlemhuSBpdGVtIOeahOWGheWuuQogICAgICogQHBhcmFtIGxpc3Qg6KaB5Yqg5YWl55qE5YiX6KGoCiAgICAgKiBAcGFyYW0gY29tbWVudEh0bWxJdGVtIOe9kemhtea6kOefreivhOWIl+ihqOWNlemhuSBpdGVtIOeahCBIdG1sCiAgICAgKiBAcmV0dXJucyB7c3RyaW5nfQogICAgICovCiAgICBhZGRDb21tZW50SXRlbTogZnVuY3Rpb24gKGxpc3QsIGNvbW1lbnRIdG1sSXRlbSkgewogICAgICAgIGxldCBjb21tZW50Q29sVHlwZSA9ICdyaWNoX3RleHQnOwogICAgICAgIGxldCB3YXRjaFN0YXR1cyA9IHBhcnNlRG9tRm9ySHRtbChjb21tZW50SHRtbEl0ZW0sICcuY29tbWVudC1pbmZvJiZUZXh0Jyk7CiAgICAgICAgaWYgKHdhdGNoU3RhdHVzLmluZGV4T2YoIueci+i/hyIpKSB3YXRjaFN0YXR1cyA9ICfnnIvov4cnOwogICAgICAgIGVsc2UgaWYgKHdhdGNoU3RhdHVzLmluZGV4T2YoIuaDs+eciyIpKSB3YXRjaFN0YXR1cyA9ICfmg7PnnIsnOwogICAgICAgIHdhdGNoU3RhdHVzID0gZ2V0R3JleVRleHQod2F0Y2hTdGF0dXMpOwogICAgICAgIGxldCBhdXRob3IgPSBnZXRBdXRob3JUZXh0KHBhcnNlRG9tRm9ySHRtbChjb21tZW50SHRtbEl0ZW0sICcuY29tbWVudC1pbmZvJiZhJiZUZXh0JykpOwoKICAgICAgICBsZXQgaGFzQXZhdGFyID0gMDsKICAgICAgICB0cnkgewogICAgICAgICAgICBsZXQgYXZhdGFySHRtbCA9IHBhcnNlRG9tRm9ySHRtbChjb21tZW50SHRtbEl0ZW0sICcuYXZhdGFyJiZIdG1sJyk7CiAgICAgICAgICAgIGxldCBhdmF0YXJJbWcgPSBwYXJzZURvbUZvckh0bWwoYXZhdGFySHRtbCwgJ2ltZyYmc3JjJyk7CiAgICAgICAgICAgIGxldCBhdmF0YXJUaXRsZSA9IHBhcnNlRG9tRm9ySHRtbChhdmF0YXJIdG1sLCAnYSYmdGl0bGUnKTsKICAgICAgICAgICAgbGV0IGF2YXRhclVybCA9IHBhcnNlRG9tRm9ySHRtbChhdmF0YXJIdG1sLCAnYSYmaHJlZicpOwogICAgICAgICAgICBsaXN0LnB1c2goewogICAgICAgICAgICAgICAgdGl0bGU6IGF2YXRhclRpdGxlICsgJyDii4UgJyArIHdhdGNoU3RhdHVzLAogICAgICAgICAgICAgICAgcGljX3VybDogYXZhdGFySW1nLAogICAgICAgICAgICAgICAgdXJsOiBhdmF0YXJVcmwsCiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcicKICAgICAgICAgICAgfSkKICAgICAgICAgICAgaGFzQXZhdGFyID0gMTsKICAgICAgICB9IGNhdGNoIChlKSB7CiAgICAgICAgICAgIGhhc0F2YXRhciA9IDA7CiAgICAgICAgfQogICAgICAgIGxldCBjb250ZW50ID0gcGFyc2VEb21Gb3JIdG1sKGNvbW1lbnRIdG1sSXRlbSwgJ3AmJkh0bWwnKTsKICAgICAgICB0cnkgewogICAgICAgICAgICBpZiAoLzxcL3NwYW4+W1xzXFNdKj8oPHNwYW4gY2xhc3M9Iltcc1xTXSo/ZnVsbCI+W1xzXFNdKj88XC9zcGFuPikvLnRlc3QoY29udGVudCkgPT09IHRydWUpIHsKICAgICAgICAgICAgICAgIGNvbnRlbnQgPSBSZWdFeHAuJDE7CiAgICAgICAgICAgIH0KICAgICAgICB9IGNhdGNoIChlKSB7CiAgICAgICAgICAgIGNvbnRlbnQgPSBwYXJzZ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UaXRsZSA9PT0gMSA/IGdldEJpZ1RleHQoJ+ixhueTo+ivhOWIhiAnCiAgICAgICAgICAgICAgICArIChyYXRpbmdUZXh0ID09PSAnJwogICAgICAgICAgICAgICAgICAgID8gZ2V0U21hbGxUZXh0KGdldEdyZXlUZXh0KCfmmoLml6Dor4TliIYnKSkKICAgICAgICAgICAgICAgICAgICA6IChnZXRUaXRsZVRleHQocmF0aW5nVGV4dCkgKyAnIOWIhicpKQogICAgICAgICAgICAgICAgKyAnPGJyPicpIDogJycpOwogICAgICAgICAgICBsZXQgcmF0aW5nX2FycmF5ID0gW107CiAgICAgICAgICAgIGlmICh1cmwuaW5kZXhPZignYm9vaycpID4gLTEpIHsKICAgICAgICAgICAgICAgIHJhdGluZ19hcnJheSA9IHJhdGluZy5tYXRjaCgvPHNwYW4gY2xhc3M9InN0YXJzW1xzXFNdKj8oPz08YnI+KS9nKTsKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIHJhdGluZ19hcnJheSA9IHBhcnNlRG9tRm9yQXJyYXkocmF0aW5nLCAnLnJhdGluZ3Mtb24td2VpZ2h0JiYuaXRlbScpOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcmF0aW5nX2FycmF5Lmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICBsZXQgcmF0aW5nSXRlbSA9IHJhdGluZ19hcnJheVtpXTsKICAgICAgICAgICAgICAgIGlmIChzZXR0aW5ncy5yYXRpbmdUZXh0TW9kZSA9PT0gMCkgewogICAgICAgICAgICAgICAgICAgIGlmIChpID09PSAwKSByYXRpbmdfY29udGVudCArPSAn8J+MnyAnOwogICAgICAgICAgICAgICAgICAgIGlmIChpID09PSAyKSByYXRpbmdfY29udGVudCArPSAnPGJyPuKtkCAnOwogICAgICAgICAgICAgICAgICAgIGlmIChpID09PSAzKSByYXRpbmdfY29udGVudCArPSAnPGJyPuKYhO+4jyAnOwogICAgICAgICAgICAgICAgICAgIHJhdGluZ19jb250ZW50ICs9IGdldENvbG9yVGV4dChwYXJzZURvbUZvckh0bWwocmF0aW5nSXRlbSwgJ1RleHQnKSwgc2V0dGluZ3MucmF0aW5nQ29sb3JzW2ldKSArICdcdFx0JzsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgbGV0IHN0YXJfdGV4dCA9IHBhcnNlRG9tRm9ySHRtbChyYXRpbmdJdGVtLCAnc3BhbltjbGFzc149c3RhcnNdJiZUZXh0Jyk7CiAgICAgICAgICAgICAgICAgICAgbGV0IHJhdGluZ19wZXJfdGV4dCA9IHBhcnNlRG9tRm9ySHRtbChyYXRpbmdJdGVtLCAnLnJhdGluZ19wZXImJlRleHQnKTsKICAgICAgICAgICAgICAgICAgICBsZXQgcmF0aW5nX3BlciA9IHBhcnNlRmxvYXQocmF0aW5nX3Blcl90ZXh0LnJlcGxhY2UoJyUnLCAnJykpOwogICAgICAgICAgICAgICAgICAgIGxldCBwcm9ncmVzc1RleHQgPSBnZXRQcm9ncmVzc1RleHQocmF0aW5nX3BlciwgaSk7CiAgICAgICAgICAgICAgICAgICAgcmF0aW5nX2NvbnRlbnQgKz0gKGdldEdyZXlUZXh0KHN0YXJfdGV4dCArICcgJykgKyBwcm9ncmVzc1RleHQgKyAnICcgKyBnZXRHcmV5VGV4dChyYXRpbmdfcGVyX3RleHQpKTsKICAgICAgICAgICAgICAgICAgICBpZiAoaSA8IHJhdGluZ19hcnJheS5sZW5ndGggLSAxKSByYXRpbmdfY29udGVudCArPSAnPGJyPic7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgbGV0IGRDb250ZW50ID0gcmF0aW5nX3RpdGxlICsgKHJhdGluZ190aXRsZSA9PT0gJycgPyAnJyA6ICc8YnI+JykgKyByYXRpbmdfY29udGVudDsKICAgICAgICBsaXN0LnB1c2goewogICAgICAgICAgICB0aXRsZTogZENvbnRlbnQsCiAgICAg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l0bGVfcGwgKz0gZ2V0Q29kZVRhZyh0cmFpbGVyX3Bob3RvX3RpdGxlX3BsX2xpc3RbaV0pOwogICAgICAgICAgICBpZiAoaSA8IHRyYWlsZXJfcGhvdG9fdGl0bGVfcGxfbGlzdC5sZW5ndGggLSAxKSB7CiAgICAgICAgICAgICAgICB0cmFpbGVyX3Bob3RvX3RpdGxlX3BsICs9ICcgJzsKICAgICAgICAgICAgfQogICAgICAgIH0qLwogICAgICAgIHRyYWlsZXJfcGhvdG9fdGl0bGUgPSBnZXRHcmV5VGV4dCh0cmFpbGVyX3Bob3RvX3RpdGxlKSArICcgJyArIHRyYWlsZXJfcGhvdG9fdGl0bGVfcGw7CiAgICAgICAgbGV0IHRyYWlsZXJfcGhvdG9fbGlzdCA9IHBhcnNlRG9tRm9yQXJyYXkodHJhaWxlcl9waG90b19odG1sLCAndWwmJmxpJyk7CiAgICAgICAgaWYgKHRyYWlsZXJfcGhvdG9fbGlzdC5sZW5ndGggPiAwICYmIHdpdGhUaXRsZSkgewogICAgICAgICAgICBsaXN0LnB1c2goewogICAgICAgICAgICAgICAgdGl0bGU6IHRyYWlsZXJfcGhvdG9fdGl0bGUsCiAgICAgICAgICAgICAgICBjb2xfdHlwZTogdHJhaWxlclBob3RvQ29sVHlwZQogICAgICAgICAgICB9KQogICAgICAgIH0KICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHRyYWlsZXJfcGhvdG9fbGlzdC5sZW5ndGg7IGkrKykgewogICAgICAgICAgICBsZXQgdHJhaWxlcl9waG90b19pdGVtID0gdHJhaWxlcl9waG90b19saXN0W2ldOwogICAgICAgICAgICBpZiAodHJhaWxlcl9waG90b19pdGVtLmluZGV4T2YoJ2xhYmVsLXRyYWlsZXInKSAhPT0gLTEgfHwgdHJhaWxlcl9waG90b19pdGVtLmluZGV4T2YoJ2xhYmVsLXNob3J0LXZpZGVvJykgIT09IC0xKSB7CiAgICAgICAgICAgICAgICBsZXQgdHJhaWxlclRpdGxlID0gcGFyc2VEb21Gb3JIdG1sKHRyYWlsZXJfcGhvdG9faXRlbSwgJ2EmJnRpdGxlJyk7CiAgICAgICAgICAgICAgICBsZXQgdHJhaWxlckxpbmsgPSBwYXJzZURvbUZvckh0bWwodHJhaWxlcl9waG90b19pdGVtLCAnYSYmaHJlZicpOwogICAgICAgICAgICAgICAgbGV0IHRyYWlsZXJQaWMgPSBwYXJzZURvbUZvckh0bWwodHJhaWxlcl9waG90b19pdGVtLCAnYSYmc3R5bGUnKTsKICAgICAgICAgICAgICAgIC8vIC9iYWNrZ3JvdW5kLWltYWdlOnVybFwoKC4qPylcKS8udGVzdCh0cmFpbGVyUGljKTsKICAgICAgICAgICAgICAgIC8vIHRyYWlsZXJQaWMgPSBSZWdFeHAuJDE7CiAgICAgICAgICAgICAgICBsaXN0LnB1c2goewogICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0cmFpbGVyVGl0bGUsCiAgICAgICAgICAgICAgICAgICAgcGljX3VybDogdHJhaWxlclBpYywKICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ21vdmllXzInLAogICAgICAgICAgICAgICAgICAgIHVybDogdHJhaWxlckxpbmsgKyBkb3ViYW4udHJhaWxlckxhenlSdWxlCiAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgbGV0IHBpY1VybCA9IHBhcnNlRG9tRm9ySHRtbCh0cmFpbGVyX3Bob3RvX2l0ZW0sICdpbWcmJnNyYycpLnJlcGxhY2UoL1wvKHNxeHN8bSlcLy9nLCAnL2wvJyk7CiAgICAgICAgICAgICAgICBsaXN0LnB1c2goewogICAgICAgICAgICAgICAgICAgIHBpY191cmw6IHBpY1VybCwKICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3BpY18yJywKICAgICAgICAgICAgICAgICAgICB1cmw6IHBpY1VybAogICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgfQogICAgICAgIH0KICAgIH0sCiAgICAvKioKICAgICAqI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1lbnRzUnVsZSk7CiAgICAgICAgY29tbWVudHNfdGl0bGUgPSBjb21tZW50c190aXRsZS5yZXBsYWNlKGNvbW1lbnRzVXJsLCBjb21tZW50c1J1bGVVcmwpOwogICAgICAgIGlmICh3aXRoVGl0bGUpIHsKICAgICAgICAgICAgbGlzdC5wdXNoKHsKICAgICAgICAgICAgICAgIHRpdGxlOiBjb21tZW50c190aXRsZSwKICAgICAgICAgICAgICAgIGNvbF90eXBlOiBjb21tZW50c0NvbFR5cGUKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIGxldCBjb21tZW50c19jb250ZW50X2h0bWwgPSBwYXJzZURvbUZvckh0bWwoY29tbWVudHNfaHRtbCwgJy50YWItYmR8fCNjb21tZW50LWxpc3Qtd3JhcHBlciYmSHRtbCcpOwogICAgICAgIGxldCBjb21tZW50c19jb250ZW50X2h0bWxfYXJyYXkgPSBwYXJzZURvbUZvckFycmF5KGNvbW1lbnRzX2NvbnRlbnRfaHRtbCwgJyNob3QtY29tbWVudHN8fCNuZXdfc2NvcmUmJi5jb21tZW50LWl0ZW0nKTsKICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNvbW1lbnRzX2NvbnRlbnRfaHRtbF9hcnJheS5sZW5ndGg7IGkrKykgewogICAgICAgICAgICBsZXQgY29tbWVudEh0bWxJdGVtID0gY29tbWVudHNfY29udGVudF9odG1sX2FycmF5W2ldOwogICAgICAgICAgICBkb3ViYW4uYWRkQ29tbWVudEl0ZW0obGlzdCwgY29tbWVudEh0bWxJdGVtKTsKICAgICAgICAgICAgaWYgKGkgPCBjb21tZW50c19jb250ZW50X2h0bWxfYXJyYXkubGVuZ3RoIC0gMSkgewogICAgICAgICAgICAgICAgbGlzdC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnCiAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfSwKICAgIC8qKgogICAgICog5Ymn6K+EL+S5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ICAgICAgcmV2aWV3c190aXRsZSA9IHJldmlld3NfdGl0bGUucmVwbGFjZShyZXZpZXdzVXJsLCByZXZpZXdzUnVsZVVybCk7CiAgICAgICAgaWYgKHdpdGhUaXRsZSkgewogICAgICAgICAgICBsaXN0LnB1c2goewogICAgICAgICAgICAgICAgdGl0bGU6IHJldmlld3NfdGl0bGUsCiAgICAgICAgICAgICAgICBjb2xfdHlwZTogcmV2aWV3c0NvbFR5cGUKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIGxldCByZXZpZXdzX2NvbnRlbnRfaHRtbCA9IHBhcnNlRG9tRm9ySHRtbChyZXZpZXdzX2h0bWwsICdkaXZbY2xhc3NePXJldmlldy1saXN0XSYmSHRtbCcpOwogICAgICAgIHJldmlld3NfY29udGVudF9odG1sID0gJzxkaXY+JyArIHJldmlld3NfY29udGVudF9odG1sICsgJzwvZGl2PicKICAgICAgICBsZXQgcmV2aWV3c19jb250ZW50X2h0bWxfYXJyYXkgPSBwYXJzZURvbUZvckFycmF5KHJldmlld3NfY29udGVudF9odG1sLCAnZGl2JiZkaXZbXmRhdGEtY2lkXScpOwogICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgcmV2aWV3c19jb250ZW50X2h0bWxfYXJyYXkubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgLypmb3IobGV0IGogPSAwOyBqIDwgMTA7IGorKykgewogICAgICAgICAgICAgICAgaWYgKGkgPiAwKSB7CiAgICAgICAgICAgICAgICAgICAgbGlzdC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdibGFua19ibG9jaycKICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9Ki8KCiAgICAgICAgICAgIGxldCByZXZpZXdIdG1sSXRlbSA9IHJldmlld3NfY29udGVudF9odG1sX2FycmF5W2ldOwogICAgICAgICAgICBkb3ViYW4uYWRkUmV2aWV3SXRlbShsaXN0LCByZXZpZXdIdG1sSXRlbSk7CiAgICAgICAgICAgIGlmIChpIDwgcmV2aWV3c19jb250ZW50X2h0bWxfYXJyYXkubGVuZ3RoIC0gMSkgewogICAgICAgICAgICAgICAgbGlzdC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnCiAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgfSwKICAgIC8qKgogICAgICog6LGG55Oj5LqM57qnCiAgICAgKi8KICAgIGRldGFpbFZpZXc6IGZ1bmN0aW9uICgpIHsKICAgICAgICBwdXRWYXIyKCdkYl9yZXZpZXdfc29ydCcsICdob3Rlc3QnKTsKICAgICAgICBwdXRWYXIyKCdkYl9yZXZpZXdfc29ydF9yYXRpbmcnLCAnJyk7CiAgICAgICAgcHV0VmFyMignZGJfY29tbWVudF9zb3J0JywgJ25ld19zY29yZScpOwogICAgICAgIHB1dFZhcjIoJ2RiX2NvbW1lbnRfc29ydF9wZXJjZW50X3R5cGUnLCAnJyk7CiAgICAgICAgaWYgKHNldHRpbmdzLm9wZW5TaW1wbGVEZXRhaWxWaWV3KSB7CiAgICAgICAgICAgIHRoaXMuc2ltcGxlRGV0YWlsVmlldygpCiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgdmFyIHJlcyA9IHt9OwogICAgICAgICAgICB2YXIgZCA9IFtdOwogICAgICAgICAgICB2YXIgY29sVHlwZSA9ICdyaWNoX3RleHQnOwogICAgICAgICAgICB2YXIgaHRtbCA9IGdldFJlc0NvZGUoKTsKICAgICAgICAgICAgdmFyIHVybFNwbGl0cyA9IE1ZX1VSTC5zcGxpdCgnIycpOwogICAgICAgICAgICB2YXIgbVVybCA9IHVybFNwbGl0c1swXTsKCiAgICAgICAgICAgIGxldCBzdWJfdXJsID0gJyc7CiAgICAgICAgICAgIGxldCBzZWFyY2hfdXJsID0gJyc7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiDojrflj5Yg5b2x54mHL+S5puexjSDkv6Hmga8KICAgICAgICAgICAgICogQHR5cGUge3N0cmluZ30KICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICBsZXQgc3ViX2luZm9faHRtbCA9IHBhcnNlRG9tRm9ySHRtbChodG1sLCAiI3dyYXBwZXImJkh0bWwiKQogICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlKC9cbi9nLCAnJyk7CiAgICAgICAgICAgICAgICBsZXQgc3ViX29yaWdpbmFsX3RpdGxlID0gcGFyc2VEb21Gb3JIdG1sKHN1Yl9pbmZvX2h0bWwsICdoMSYmVGV4dCcpOwogICAgICAgICAgICAgICAgbGV0IHN1Yl9jb3ZlciA9IHBhcnNlRG9tRm9ySHRtbChzdWJfaW5mb19odG1sLCAnI21haW5waWMmJmEmJmltZyYmc3JjJyk7CiAgICAgICAgICAgICAgICAvLyBsZXQgc3ViX3RpdGxlID0gcGFyc2VEb21Gb3JIdG1sKHN1Yl9pbmZvLCAnLnN1Yi1kZXRhaWwmJi5zdWItdGl0bGUmJlRleHQnKTsKICAgICAgICAgICAgICAgIGxldCBzdWJfbWV0YV9odG1sID0gcGFyc2VEb21Gb3JIdG1sKHN1Yl9pbmZvX2h0bWwsICcjaW5mbyYmSHRtbCcpOwogICAgICAgICAgICAgICAgbGV0IGFjdG9yID0gJyc7CiAgICAgICAgICAgICAgICBsZXQgdHlwZSA9ICcnOwogICAgICAgICAgICAgICAgbGV0IHNob3dEYXRlID0gJyc7CiAgICAgICAgICAgICAgICBpZiAobVVybC5pbmRleE9mKCdib29rJykgPiAtMSkgewogICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvKDxzcGFuPltcc1xTXSo/PHNwYW4gY2xhc3M9InBsIj4g5L2c6ICFPFwvc3Bhbj5bXHNcU10qPyg/PTxicj4pKS8udGVzdChzdWJfbWV0YV9odG1sKSA9PT0gdHJ1ZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgYWN0b3IgPSAnPGRpdiBjbGFzcz0iYWN0b3IiPicgKyBSZWdFeHAuJDEgKyAnPC9kaXY+JzsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjdG9yID0gcGFyc2VEb21Gb3JIdG1sKGFjdG9yLCAnLmFjdG9yJiZUZXh0JykKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsgfQogICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvKDxzcGFuIGNsYXNzPSJwbCI+5Ye654mI56S+OjxcL3NwYW4+W1xzXFNdKj8oPz08YnI+KSkvLnRlc3Qoc3ViX21ldGFfaHRtbCkgPT09IHRydWUpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGUgPSAnPGRpdiBjbGFzcz0idHlwZSI+JyArIFJlZ0V4cC4kMSArICc8L2Rpdj4nOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA9IHBhcnNlRG9tRm9ySHRtbCh0eXBlLCAnLnR5cGUmJlRleHQnKQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkgeyB9CiAgICAgICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKC8oPHNwYW4gY2xhc3M9InBsIj7lh7rniYjlubQ6PFwvc3Bhbj5bXHNcU10qPyg/PTxicj4pKS8udGVzdChzdWJfbWV0YV9odG1sKSA9PT0gdHJ1ZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0RhdGUgPSAnPGRpdiBjbGFzcz0iZGF0ZSI+JyArIFJlZ0V4cC4kMSArICc8L2Rpdj4nOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0RhdGUgPSBwYXJzZURvbUZvckh0bWwoc2hvd0RhdGUsICcuZGF0ZSYmVGV4dCcpCiAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7IH0KICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAgICAgYWN0b3IgPSBwYXJzZURvbUZvckh0bWwoc3ViX21ldGFfaHRtbCwgJy5hY3RvciYmVGV4dCcpOwogICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsgfQogICAgICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0eXBlUmVnID0gLyg8c3BhbiBjbGFzcz0icGwiPuexu+Weizo8XC9zcGFuPltcc1xTXSo/KD89PGJyPikpLzsKICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVSZWcudGVzdChzdWJfbWV0YV9odG1sKSA9PT0gdHJ1ZSkgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA9IFJlZ0V4cC4kMSA9PT0gJycgPyBzdWJfbWV0YV9odG1sLm1hdGNoKHR5cGVSZWcpWzBdIDogUmVnRXhwLiQxOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA9ICc8ZGl2IGNsYXNzPSJ0eXBlIj4nICsgdHlwZSArICc8L2Rpdj4nOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZSA9IHBhcnNlRG9tRm9ySHRtbCh0eXBlLCAnLnR5cGUmJlRleHQnKQogICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkgeyB9CiAgICAgICAgICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGRhdGVSZWcgPSAvKDxzcGFuIGNsYXNzPSJwbCI+KOS4iuaYoOaXpeacn3zpppbmkq0pOjxcL3NwYW4+W1xzXFNdKj8oPz08YnI+KSkvOwogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGF0ZVJlZy50ZXN0KHN1Yl9tZXRhX2h0bWwpID09PSB0cnVlKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaG93RGF0ZSA9IFJlZ0V4cC4kMSA9PT0gJycgPyBzdWJfbWV0YV9odG1sLm1hdGNoKGRhdGVSZWcpWzBdIDogUmVnRXhwLiQxOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvd0RhdGUgPSAnPGRpdiBjbGFzcz0iZGF0ZSI+JyArIHNob3dEYXRlICsgJzwvZGl2Pic7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaG93RGF0ZSA9IHBhcnNlRG9tRm9ySHRtbChzaG93RGF0ZSwgJy5kYXRlJiZUZXh0JykKICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbGV0IHN1Yl9tZXRhID0gZ2V0QWJicmV2VGV4dChhY3RvcikKICAgICAgICAgICAgICAgICAgICArIChhY3RvciA9PT0gJycgfHwgdHlwZSA9PT0gJycgPyAnJyA6ICdcbicpCiAgICAgICAgICAgICAgICAgICAgKyAodHlwZSA9PT0gJycgPyAnJyA6IGdldEFiYnJldlRleHQodHlwZSkpCiAgICAgICAgICAgICAgICAgICAgKyAoc2hvd0RhdGUgPT09ICcnIHx8IHR5cGUgPT09ICcnID8gJycgOiAnXG4nKQogICAgICAgICAgICAgICAgICAgICsgKHNob3dEYXRlID09PSAnJyA/ICcnIDogZ2V0QWJicmV2VGV4dChzaG93RGF0ZSkpOwogICAgICAgICAgICAgICAgbGV0IGRiX3RpdGxlID0gJyc7CiAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgIGRiX3RpdGxlID0gdXJsU3BsaXRzWzFdOwogICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkgeyB9CiAgICAgICAgICAgICAgICAvLyDmkJzntKLlj4LmlbAKICAgICAgICAgICAgICAgIGxldCBzZWFyY2hWYWx1ZSA9IHNldHRpbmdzLnNlYXJjaFZhbHVlOwogICAgICAgICAgICAgICAgc2VhcmNoX3VybCA9ICdoaWtlcjovL3NlYXJjaD9zPScKICAgICAgICAgICAgICAgICAgICArIChkYl90aXRsZSA9PT0gJycgfHwgZGJfdGl0bGUgPT09IHVuZGVmaW5lZAogICAgICAgICAgICAgICAgICAgICAgICA/IHN1Yl9vcmlnaW5hbF90aXRsZQogICAgICAgICAgICAgICAgICAgICAgICA6IGRiX3RpdGxlKQogICAgICAgICAgICAgICAgICAgICsgc2VhcmNoVmFsdWU7CiAgICAgICAgICAgICAgICBpZiAoc2V0dGluZ3Mub3Blbkhpa2VyU2VhcmNoID09PSAxKSB7CiAgICAgICAgICAgICAgICAgICAgc3ViX3VybCA9IHNlYXJjaF91cmw7CiAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgIHN1Yl91cmwgPSBtVXJsICsgJ0BydWxlPWpzOicKICAgICAgICAgICAgICAgICAgICAgICAgKyBgdmFyIHJlcyA9IHt9O3ZhciBkID0gW107dmFyIGNvbFR5cGUgPSAncmljaF90ZXh0Jzt2YXIgaHRtbCA9IGdldFJlc0NvZGUoKTtsZXQgaW5mb19odG1sID0gJzxiaWc+PHN0cm9uZz7lvbHniYfkv6Hmga88XC9zdHJvbmc+PFwvYmlnPjxicj4nICsgcGFyc2VEb21Gb3JIdG1sKGh0bWwsICIjaW5mbyYmSHRtbCIpLnJlcGxhY2UoLzxhIGhyZWY9IlxcL1tcXHNcXFNdKj8+fDxcXC9hPi9nLCAnJykucmVwbGFjZSgvc3Bhbi9nLCAnZm9udCcpLnJlcGxhY2UoLzxmb250IGNsYXNzPSJwbCI+L2csICc8Zm9udCBjbGFzcz0icGwiIGNvbG9yPSJncmV5Ij4nKS5yZXBsYWNlKC86IC9nLCAnPGZvbnQgY29sb3I9ImdyZXkiPjogPFxcL2ZvbnQ+Jyk7ZC5wdXNoKHt0aXRsZTogaW5mb19odG1sLGNvbF90eXBlOiBjb2xUeXBlfSk7cmVzLmRhdGEgPSBkO3NldEhvbWVSZXN1bHQocmVzKTtgOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICB0aXRsZTogc3ViX29yaWdpbmFsX3RpdGxlLAogICAgICAgICAgICAgICAgICAgIHBpY191cmw6IHN1Yl9jb3ZlciwKICAgICAgICAgICAgICAgICAgICB1cmw6IHN1Yl91cmwsCiAgICAgICAgICAgICAgICAgICAgZGVzYzogc3ViX21ldGEsCiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX3ZlcnRpY2FsX3BpYycKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgLyrlhYnlvbHliaflnLrlv6vmjbfplK4qLwogICAgZC5wdXNoKHsKICAgICAgICB0aXRsZTogJ+eJh+a6kOaQnOe0oicsCiAgICAgICAgdXJsOiAnaGlrZXI6Ly9zZWFyY2g/cz0nICsgZ2V0VXJsKCkuc3BsaXQoJyMnKVsxXSwKICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nCiAgICB9KQogICAgZC5wdXNoKHsKICAgICAgICB0aXRsZTogJ+iBmuWQiOWciCcsCiAgICAgICAgdXJsOidoaWtlcjovL3NlYXJjaD9zPScgKyBnZXRVcmwoKS5zcGxpdCgnIycpWzFdICsgJyZydWxlPeiBmuWQiOWciOKAolInLAogICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicKICAgIH0pCiAgICBkLnB1c2goewogICAgICAgIHRpdGxlOiAnQVBQ5ZyIJywKICAgICAgICB1cmw6J2hpa2VyOi8vc2VhcmNoP3M9JyArIGdldFVybCgpLnNwbGl0KCcjJylbMV0gKyAnJnJ1bGU9QVBQ5b2x6KeGJywKICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nCiAgICB9KQogICAgZC5wdXNoKHsKICAgICAgICB0aXRsZTogJ+W9seinhuWciCcsCiAgICAgICAgdXJsOidoaWtlcjovL3NlYXJjaD9zPScgKyBnZXRVcmwoKS5zcGxpdCgnIycpWzFdICsgJyZydWxlPeW9seinhuWciOKAolInLAogICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicKICAgIH0pCiAgICBkLnB1c2goewogICAgICAgIHRpdGxlOiAn5pCc54uXUScsCiAgICAgICAgdXJsOidoaWtlcjovL3NlYXJjaD9zPScgKyBnZXRVcmwoKS5zcGxpdCgnIycpWzFdICsgJyZydWxlPeaQnOeLl8K3UScsCiAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJwogICAgfSkKICAgIAogICAgICAgICAgICAgICAgCiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsgfQoKICAgICAgICAgICAgbGV0IGFkZFRyYWlsZXJQaG90b01vZHVsZSA9ICcwJzsKICAgICAgICAgICAgbGV0IGFkZENvbW1lbnRzTW9kdWxlID0gJzAnOwogICAgICAgICAgICBsZXQgYWRkUmV2aWV3c01vZHVsZSA9ICcwJzsKICAgICAgICAgICAgaWYgKHNldHRpbmdzLmFkZFRyYWlsZXJQaG90b01vZHVsZSAhPT0gMCkgewogICAgICAgICAgICAgICAgYWRkVHJhaWxlclBob3RvTW9kdWxlID0gJzEnOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChzZXR0aW5ncy5hZGRDb21tZW50c01vZHVsZSAhPT0gMCkgewogICAgICAgICAgICAgICAgYWRkQ29tbWVudHNNb2R1bGUgPSAnMSc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgaWYgKHNldHRpbmdzLmFkZFJldmlld3NNb2R1bGUgIT09IDApIHsKICAgICAgICAgICAgICAgIGFkZFJldmlld3NNb2R1bGUgPSAnMSc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIDAwMCAo6aKE5ZGKK+WJp+eFpykr55+t6K+EK+WJp+ivhDppY29uX3NtYWxsXzQKICAgICAgICAgICAgICogMDAxICjpooTlkYor5Ymn54WnKSvnn63or4Qr5pCc57SiOmljb25fc21hbGxfNAogICAgICAgICAgICAgKiAwMTAgKOmihOWRiivliafnhacpK+WJp+ivhCvmkJzntKI6aWNvbl9zbWFsbF80CiAgICAgICAgICAgICAqIDAxMSAo6aKE5ZGKK+WJp+eFpykr5pCc57SiOmljb25fc21hbGxfMwogICAgICAgICAgICAgKiAxMDAg55+t6K+EK+WJp+ivhCvmkJzntKI6aWNvbl9zbWFsbF8zCiAgICAgICAgICAgICAqIDEwMSDnn63or4Qr5pCc57SiOmljb25fMgogICAgICAgICAgICAgKiAxMTAg5Ymn6K+EK+aQnOe0ojppY29uXzIKICAgICAgICAgICAgICogMTExIG51bGwKICAgICAgICAgICAgICovCiAgICAgICAgICAgIGxldCBtb2R1bGVTdGF0dXMgPSBhZGRUcmFpbGVyUGhvdG9Nb2R1bGUgKyBhZGRDb21tZW50c01vZHVsZSArIGFkZFJldmlld3NNb2R1bGU7CiAgICAgICAgICAgIGxldCB2aWRlb19pZCA9IHRoaXMuaWQobVVybCk7CiAgICAgICAgICAgIGxldCBtb2R1bGVTdGF0dXNJdGVtcyA9IHsKICAgICAgICAgICAgICAgIGdldFRyYWlsZXJzOiBmdW5jdGlvbiAoY29sVHlwZSkgewogICAgICAgICAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn6aKE5ZGKJywKICAgICAgICAgICAgICAgICAgICAgICAgcGljX3VybDogJ2h0dHBzOi8vczEuYXgxeC5jb20vMjAyMC8xMS8wOS9CVDYyVk8ucG5nJywKICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAnaHR0cHM6Ly9tb3ZpZS5kb3ViYW4uY29tL3N1YmplY3QvJyArIHZpZGVvX2lkICsgJy90cmFpbGVyJyArICdAcnVsZT1qczogJyArIGBldmFsKGZldGNoKCdgICsgc2V0dGluZ3MuanNGaWxlICsgYCcsIHt9KSk7ZG91YmFuLnRyYWlsZXJMaXN0VmlldygpO2AsCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBjb2xUeXBlCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgZ2V0UGhvdG9zOiBmdW5jdGlvbiAoY29sVHlwZSkgewogICAgICAgICAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn5Ymn54WnJywKICAgICAgICAgICAgICAgICAgICAgICAgcGljX3VybDogJ2h0dHBzOi8vczEuYXgxeC5jb20vMjAyMC8xMS8wOS9CVDZjcUsucG5nJywKICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAnaHR0cHM6Ly9tb3ZpZS5kb3ViYW4uY29tL3N1YmplY3QvJyArIHZpZGVvX2lkICsgJy9waG90b3M/dHlwZT1TJnN0YXJ0PWZ5cGFnZUAtMUAqMzBAJnNvcnRieT1saWtlJnNpemU9YSZzdWJ0eXBlPWEnICsgJ0BydWxlPWpzOiAnICsgYGV2YWwoZmV0Y2goJ2AgKyBzZXR0aW5ncy5qc0ZpbGUgKyBgJywge30pKTtkb3ViYW4ucGhvdG9MaXN0VmlldygpO2AsCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBjb2xUeXBlCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgZ2V0Q29tbWVudHM6IGZ1bmN0aW9uIChjb2xUeXBlKSB7CiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfnn63or4QnLAogICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiAnaHR0cHM6Ly9zMS5heDF4LmNvbS8yMDIwLzExLzA5L0JUNldJZS5wbmcnLAogICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5IycgKyAnaHR0cHM6Ly9tb3ZpZS5kb3ViYW4uY29tL3N1YmplY3QvJyArIHZpZGVvX2lkICsgJy9jb21tZW50cz9zdGFydD1meXBhZ2VALTFAKjIwQCZsaW1pdD0yMCZzdGF0dXM9UCcgKyAnQHJ1bGU9anM6ICcgKyBgZXZhbChmZXRjaCgnYCArIHNldHRpbmdzLmpzRmlsZSArIGAnLCB7fSkpO2RvdWJhbi5jb21tZW50TGlzdFZpZXcoKTtgLAogICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogY29sVHlwZQogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfSwKICAgICAgICAgICAgICAgIGdldFJldmlld3M6IGZ1bmN0aW9uIChjb2xUeXBlKSB7CiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfliafor4QnLAogICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiAnaHR0cHM6Ly9zMS5heDF4LmNvbS8yMDIwLzExLzA5L0JUNlJhRC5wbmcnLAogICAgICAgICAgICAgICAgICAgICAgICB1cmw6ICdoaWtlcjovL2VtcHR5IycgKyAnaHR0cHM6Ly9tb3ZpZS5kb3ViYW4uY29tL3N1YmplY3QvJyArIHZpZGVvX2lkICsgJy9yZXZpZXdzP3N0YXJ0PWZ5cGFnZUAtMUAqMjBAJmxpbWl0PTIwJyArICdAcnVsZT1qczogJyArIGBldmFsKGZldGNoKCdgICsgc2V0dGluZ3MuanNGaWxlICsgYCcsIHt9KSk7ZG91YmFuLnJldmlld0xpc3RWaWV3KCk7YCwKICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IGNvbFR5cGUKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICBnZXRTZWFyY2g6IGZ1bmN0aW9uIChjb2xUeXBlKSB7CiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICfmkJzntKInLAogICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiAnaHR0cHM6Ly9zMy5heDF4LmNvbS8yMDIwLzExLzIzL0RHVzBkZS5wbmcnLAogICAgICAgICAgICAgICAgICAgICAgICB1cmw6IHNlYXJjaF91cmwsCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBjb2xUeXBlCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgZ2V0V29ya2VyczogZnVuY3Rpb24gKGNvbFR5cGUpIHsKICAgICAgICAgICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+a8lOiBjOWRmCcsCiAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6ICdodHRwczovL3MzLmF4MXguY29tLzIwMjAvMTEvMjMvREd4RkNxLnBuZycsCiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogJ2h0dHBzOi8vbW92aWUuZG91YmFuLmNvbS9zdWJqZWN0LycgKyB2aWRlb19pZCArICcvY2VsZWJyaXRpZXMnICsgJ0BydWxlPWpzOiAnICsgYGV2YWwoZmV0Y2goJ2AgKyBzZXR0aW5ncy5qc0ZpbGUgKyBgJywge30pKTtkb3ViYW4ud29ya2VyVmlldygpO2AsCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBjb2xUeXBlCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGxldCBzdGF0dXNDb2xUeXBlID0gJyc7CiAgICAgICAgICAgIHN3aXRjaCAobW9kdWxlU3RhdHVzKSB7CiAgICAgICAgICAgICAgICBjYXNlICcwMDAnOgogICAgICAgICAgICAgICAgICAgIC8vICjpooTlkYor5Ymn54WnKSvnn63or4Qr5Ymn6K+EOmljb25fc21hbGxfNAogICAgICAgICAgICAgICAgICAgIHN0YXR1c0NvbFR5cGUgPSAnaWNvbl9zbWFsbF80JzsKICAgICAgICAgICAgICAgICAgICBtb2R1bGVTdGF0dXNJdGVtcy5nZXRUcmFpbGVycyhzdGF0dXNDb2xUeXBlKTsKICAgICAgICAgICAgICAgICAgICBtb2R1bGVTdGF0dXNJdGVtcy5nZXRQaG90b3Moc3RhdHVzQ29sVHlwZSk7CiAgICAgICAgICAgICAgICAgICAgbW9kdWxlU3RhdHVzSXRlbXMuZ2V0Q29tbWVudHMoc3RhdHVzQ29sVHlwZSk7CiAgICAgICAgICAgICAgICAgICAgbW9kdWxlU3RhdHVzSXRlbXMuZ2V0UmV2aWV3cyhzdGF0dXNDb2xUeXBlKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgJzAwMSc6CiAgICAgICAgICAgICAgICAgICAgLy8gKOmihOWRiivliafnhacpK+efreivhCvmkJzntKI6aWNvbl9zbWFsbF80CiAgICAgICAgICAgICAgICAgICAgc3RhdHVzQ29sVHlwZSA9ICdpY29uX3NtYWxsXzQnOwogICAgICAgICAgICAgICAgICAgIG1vZHVsZVN0YXR1c0l0ZW1zLmdldFRyYWlsZXJzKHN0YXR1c0NvbFR5cGUpOwogICAgICAgICAgICAgICAgICAgIG1vZHVsZVN0YXR1c0l0ZW1zLmdldFBob3RvcyhzdGF0dXNDb2xUeXBlKTsKICAgICAgICAgICAgICAgICAgICBtb2R1bGVTdGF0dXNJdGVtcy5nZXRDb21tZW50cyhzdGF0dXNDb2xUeXBlKTsKICAgICAgICAgICAgICAgICAgICBtb2R1bGVTdGF0dXNJdGVtcy5nZXRTZWFyY2goc3RhdHVzQ29sVHlwZSk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICcwMTAnOgogICAgICAgICAgICAgICAgICAgIC8vICjpooTlkYor5Ymn54WnKSvliafor4Qr5pCc57SiOmljb25fc21hbGxfNAogICAgICAgICAgICAgICAgICAgIHN0YXR1c0NvbFR5cGUgPSAnaWNvbl9zbWFsbF80JzsKICAgICAgICAgICAgICAgICAgICBtb2R1bGVTdGF0dXNJdGVtcy5nZXRUcmFpbGVycyhzdGF0dXNDb2xUeXBlKTsKICAgICAgICAgICAgICAgICAgICBtb2R1bGVTdGF0dXNJdGVtcy5nZXRQaG90b3Moc3RhdHVzQ29sVHlwZSk7CiAgICAgICAgICAgICAgICAgICAgbW9kdWxlU3RhdHVzSXRlbXMuZ2V0UmV2aWV3cyhzdGF0dXNDb2xUeXBlKTsKICAgICAgICAgICAgICAgICAgICBtb2R1bGVTdGF0dXNJdGVtcy5nZXRTZWFyY2goc3RhdHVzQ29sVHlwZSk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICcwMTEnOgogICAgICAgICAgICAgICAgICAgIC8vIOiBjOWRmOihqCso6aKE5ZGKK+WJp+eFpykr5pCc57SiOmljb25fc21hbGxfNAogICAgICAgICAgICAgICAgICAgIHN0YXR1c0NvbFR5cGUgPSAnaWNvbl9zbWFsbF80JzsKICAgICAgICAgICAgICAgICAgICBtb2R1bGVTdGF0dXNJdGVtcy5nZXRXb3JrZXJzKHN0YXR1c0NvbFR5cGUpOwogICAgICAgICAgICAgICAgICAgIG1vZHVsZVN0YXR1c0l0ZW1zLmdldFRyYWlsZXJzKHN0YXR1c0NvbFR5cGUpOwogICAgICAgICAgICAgICAgICAgIG1vZHVsZVN0YXR1c0l0ZW1zLmdldFBob3RvcyhzdGF0dXNDb2xUeXBlKTsKICAgICAgICAgICAgICAgICAgICBtb2R1bGVTdGF0dXNJdGVtcy5nZXRTZWFyY2goc3RhdHVzQ29sVHlwZSk7CiAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICBjYXNlICcxMDAnOgogICAgICAgICAgICAgICAgICAgIC8vIOiBjOWRmOihqCvnn63or4Qr5Ymn6K+EK+aQnOe0ojppY29uX3NtYWxsXzQKICAgICAgICAgICAgICAgICAgICBzdGF0dXNDb2xUeXBlID0gJ2ljb25fc21hbGxfNCc7CiAgICAgICAgICAgICAgICAgICAgbW9kdWxlU3RhdHVzSXRlbXMuZ2V0V29ya2VycyhzdGF0dXNDb2xUeXBlKTsKICAgICAgICAgICAgICAgICAgICBtb2R1bGVTdGF0dXNJdGVtcy5nZXRDb21tZW50cyhzdGF0dXNDb2xUeXBlKTsKICAgICAgICAgICAgICAgICAgICBtb2R1bGVTdGF0dXNJdGVtcy5nZXRSZXZpZXdzKHN0YXR1c0NvbFR5cGUpOwogICAgICAgICAgICAgICAgICAgIG1vZHVsZVN0YXR1c0l0ZW1zLmdldFNlYXJjaChzdGF0dXNDb2xUeXBlKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgIGNhc2UgJzEwMSc6CiAgICAgICAgICAgICAgICAgICAgLy8g6IGM5ZGY6KGoK+efreivhCvmkJzntKI6aWNvbl9zbWFsbF8zCiAgICAgICAgICAgICAgICAgICAgc3RhdHVzQ29sVHlwZSA9ICdpY29uX3NtYWxsXzMnOwogICAgICAgICAgICAgICAgICAgIG1vZHVsZVN0YXR1c0l0ZW1zLmdldFdvcmtlcnMoc3RhdHVzQ29sVHlwZSk7CiAgICAgICAgICAgICAgICAgICAgbW9kdWxlU3RhdHVzSXRlbXMuZ2V0Q29tbWVudHMoc3RhdHVzQ29sVHlwZSk7CiAgICAgICAgICAgICAgICAgICAgbW9kdWxlU3RhdHVzSXRlbXMuZ2V0U2VhcmNoKHN0YXR1c0NvbFR5cGUpOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgY2FzZSAnMTEwJzoKICAgICAgICAgICAgICAgICAgICAvLyDogYzlkZjooagr5Ymn6K+EK+aQnOe0ojppY29uX3NtYWxsXzMKICAgICAgICAgICAgICAgICAgICBzdGF0dXNDb2xUeXBlID0gJ2ljb25fc21hbGxfMyc7CiAgICAgICAgICAgICAgICAgICAgbW9kdWxlU3RhdHVzSXRlbXMuZ2V0V29ya2VycyhzdGF0dXNDb2xUeXBlKTsKICAgICAgICAgICAgICAgICAgICBtb2R1bGVTdGF0dXNJdGVtcy5nZXRSZXZpZXdzKHN0YXR1c0NvbFR5cGUpOwogICAgICAgICAgICAgICAgICAgIG1vZHVsZVN0YXR1c0l0ZW1zLmdldFNlYXJjaChzdGF0dXNDb2xUeXBlKTsKICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBzZXR0aW5ncy5saW5lX21vZGVsOyBpKyspIHsKICAgICAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IHNldHRpbmdzLmxpbmVfdHlwZV9tb2RlbAogICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgfQoKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIOixhueTo+ivhOWIhgogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIGlmIChzZXR0aW5ncy5hZGRSYXRpbmdNb2R1bGUgIT09IDApIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmFkZFJhdGluZ01vZHVsZShodG1sLCBtVXJsLCAxLCBkKTsKICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHNldHRpbmdzLmxpbmVfbW9kZWw7IGkrKykgewogICAgICAgICAgICAgICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IHNldHRpbmdzLmxpbmVfdHlwZV9tb2RlbAogICAgICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSBjYXRjaCAoZSkgeyB9CgogICAgICAgICAgICAvKioKICAgICAgICAgICAgICog5Ymn5oOF566A5LuLL+S5puexjeWGheWuueS7i+e7jQogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIGlmIChzZXR0aW5ncy5hZGRJbnRyb01vZHVsZSAhPT0gMCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuYWRkSW50cm9Nb2R1bGUoaHRtbCwgMSwgZCk7CiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBzZXR0aW5ncy5saW5lX21vZGVsOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBzZXR0aW5ncy5saW5lX3R5cGVfbW9kZWwKICAgICAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsgfQoKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIOmihOWRiueJh+WSjOWJp+eFpwogICAgICAgICAgICAgKi8KICAgICAgICAgICAgdHJ5IHsKICAgICAgICAgICAgICAgIGlmIChzZXR0aW5ncy5hZGRUcmFpbGVyUGhvdG9Nb2R1bGUgIT09IDApIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmFkZFRyYWlsZXJQaG90b01vZHVsZShodG1sLCAxLCBkKQogICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgc2V0dGluZ3MubGluZV9tb2RlbDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogc2V0dGluZ3MubGluZV90eXBlX21vZGVsCiAgICAgICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9IGNhdGNoIChlKSB7IH0KCiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiDnn63or4QKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICBpZiAoc2V0dGluZ3MuYWRkQ29tbWVudHNNb2R1bGUgIT09IDApIHsKICAgICAgICAgICAgICAgICAgICB0aGlzLmFkZENvbW1lbnRzTW9kdWxlKGh0bWwsIDEsIGQpCiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBzZXR0aW5ncy5saW5lX21vZGVsOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBzZXR0aW5ncy5saW5lX3R5cGVfbW9kZWwKICAgICAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsgfQoKICAgICAgICAgICAgLyoqCiAgICAgICAgICAgICAqIOW9seivhC/kuabor4QKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICBpZiAoc2V0dGluZ3MuYWRkUmV2aWV3c01vZHVsZSAhPT0gMCkgewogICAgICAgICAgICAgICAgICAgIHRoaXMuYWRkUmV2aWV3c01vZHVsZShodG1sLCBtVXJsLCAxLCBkKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSBjYXRjaCAoZSkgeyB9CgogICAgICAgICAgICByZXMuZGF0YSA9IGQ7CiAgICAgICAgICAgIHNldEhvbWVSZXN1bHQocmVzKTsKICAgICAgICB9CiAgICB9LAogICAgLyoqCiAgICAgKiDnroDmtIEv5ryU6IGM5ZGY5qih5Z2XCiAgICAgKi8KICAgIHdvcmtlclZpZXc6IGZ1bmN0aW9uICgpIHsKICAgICAgICB2YXIgcmVzID0ge307dmFyIGQgPSBbXTsKICAgICAgICB2YXIgd29ya2VyID0gJzxib2R5PicgKyBwYXJzZURvbShnZXRSZXNDb2RlKCksICdib2R5JiYjY2VsZWJyaXRpZXMmJkh0bWwnKSArICc8L2JvZHk+JzsKICAgICAgICB2YXIgd29ya2VyX2xpc3QgPSBwYXJzZURvbUZvckFycmF5KHdvcmtlciwgJ2JvZHkmJi5saXN0LXdyYXBwZXInKTsKICAgICAgICBmb3IodmFyIHcgaW4gd29ya2VyX2xpc3QpewogICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgdGl0bGU6cGFyc2VEb21Gb3JIdG1sKHdvcmtlcl9saXN0W3ddLCdoMiYmVGV4dCcpLAogICAgICAgICAgICAgICAgY29sX3R5cGU6J2xvbmdfdGV4dCcKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHZhciBsaXN0PXBhcnNlRG9tRm9yQXJyYXkod29ya2VyX2xpc3Rbd10sICd1bCYmbGknKTsKICAgICAgICAgICAgdHJ5ewogICAgICAgICAgICAgICAgZm9yKHZhciBsIGluIGxpc3QpewogICAgICAgICAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOnBhcnNlRG9tRm9ySHRtbChsaXN0W2xdLCdhLm5hbWUmJlRleHQnKSsnXG4nK3BhcnNlRG9tRm9ySHRtbChsaXN0W2xdLCcucm9sZSYmdGl0bGUnKSwKICAgICAgICAgICAgICAgICAgICAgICAgZGVzYzpwYXJzZURvbUZvckh0bWwobGlzdFtsXSwnLndvcmtzJiZUZXh0JyksCiAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6cGFyc2VEb21Gb3JIdG1sKGxpc3RbbF0sJy5hdmF0YXImJnN0eWxlJyksCiAgICAgICAgICAgICAgICAgICAgICAgIHVybDpwYXJzZURvbUZvckh0bWwobGlzdFtsXSwnYS5uYW1lJiZocmVmJykrJ0BydWxlPWpzOicgKyBgbGV0IGpzRmlsZSA9IGdldFZhcigiZGJfanNfZmlsZSIpO2pzRmlsZSA9IGpzRmlsZSA9PT0gJycgPyAiaGlrZXI6Ly9maWxlcy9ydWxlcy9qcy9ydC1kb3ViYW4uanMiIDoganNGaWxlO2V2YWwoZmV0Y2goanNGaWxlLHt9KSk7ZG91YmFuLm1vdmllcmRlc2NWaWV3KCk7YCwKICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6J21vdmllXzFfdmVydGljYWxfcGljJwogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9Y2F0Y2goZSl7fQogICAgICAgIH0KICAgICAgICByZXMuZGF0YSA9IGQ7CiAgICAgICAgc2V0SG9tZVJlc3VsdChyZXMpOwogICAgfSwKCiAgICAvKioKICAgICAqIOeugOa0gS/lvbHkurrnroDku4vmqKHlnZcKICAgICAqLwogICAgbW92aWVyZGVzY1ZpZXc6IGZ1bmN0aW9uICgpIHsKICAgICAgICB2YXIgcmVzID0ge307dmFyIGQgPSBbXTsKICAgICAgICB2YXIgcGVvcGxlX3BpYyA9IHBhcnNlRG9tKGdldFJlc0NvZGUoKSwgJ2JvZHkmJi5uYmdbdGl0bGVdJiZpbWcmJnNyYycpOwogICAgICAgIHZhciBwZW9wbGVfdGl0bGUgPSBwYXJzZURvbShnZXRSZXNDb2RlKCksICdib2R5JiYubmJnW3RpdGxlXSYmdGl0bGUnKS5yZXBsYWNlKGdldFVybCgpKyIvIiwiIik7CiAgICAgICAgdmFyIHBlb3BsZV9kZXNjID0gcGFyc2VEb20oZ2V0UmVzQ29kZSgpLCAnYm9keSYmdWxbY2xhc3M9IiJdJiZUZXh0JykucmVwbGFjZShnZXRVcmwoKSsiLyIsIiIpOwogICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgIHRpdGxlOnBlb3BsZV90aXRsZSwKICAgICAgICAgICAgZGVzYzpwZW9wbGVfZGVzYywKICAgICAgICAgICAgcGljX3VybDpwZW9wbGVfcGljLAogICAgICAgICAgICB1cmw6Z2V0VXJsKCksCiAgICAgICAgICAgIGNvbF90eXBlOidtb3ZpZV8xX3ZlcnRpY2FsX3BpYycKICAgICAgICB9KTsKICAgICAgICBkLnB1c2goewogICAgICAgICAgICBjb2xfdHlwZTonbGluZV9ibGFuaycKICAgICAgICB9KTsKICAgICAgICB0cnl7CiAgICAgICAgICAgIHZhciBkZXNjID0gcGFyc2VEb20oZ2V0UmVzQ29kZSgpLCAnYm9keSYmI2ludHJvJiYuYWxsJiZUZXh0JykucmVwbGFjZShnZXRVcmwoKSsiLyIsIiIpOwoKICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgIHRpdGxlOiflvbHkurrnroDku4snLAogICAgICAgICAgICAgICAgdXJsOid0b2FzdDovL+i/memHjOaYr+agh+mimCcsCiAgICAgICAgICAgICAgICBjb2xfdHlwZTondGV4dF9jZW50ZXJfMScKICAgICAgICAgICAgfSk7CgogICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgdGl0bGU6ZGVzYywKICAgICAgICAgICAgICAgIGNvbF90eXBlOidsb25nX3RleHQnCiAgICAgICAgICAgIH0pOwogICAgICAgIH1jYXRjaChlKXsKICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgIHRpdGxlOifor6XlvbHkurrmmoLml6DnroDku4snLAogICAgICAgICAgICAgICAgdXJsOid0b2FzdDovL+i/memHjOecn+eahOWPquaYr+agh+mimCcsCiAgICAgICAgICAgICAgICBjb2xfdHlwZTondGV4dF9jZW50ZXJfMScKICAgICAgICAgICAgfSk7CiAgICAgICAgfQogICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgIGNvbF90eXBlOidsaW5lX2JsYW5rJwogICAgICAgIH0pOwogICAgICAgIHRyeXsKICAgICAgICAgICAgdmFyIHJlY2VudF9tb3ZpZXMgPSAnPGJvZHk+JyArIHBhcnNlRG9tKGdldFJlc0NvZGUoKSwgJ2JvZHkmJiNyZWNlbnRfbW92aWVzJiZIdG1sJykgKyAnPC9ib2R5Pic7CiAgICAgICAgICAgIHZhciByZWNlbnRfbW92aWVzX2xpc3QgPSBwYXJzZURvbUZvckFycmF5KHJlY2VudF9tb3ZpZXMsICdib2R5JiZsaVtjbGFzc10nKTsKICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgIHRpdGxlOifmnIDov5HkuIrmmKDnmoTkvZzlk4EnLAogICAgICAgICAgICAgICAgdXJsOid0b2FzdDovL0hlcmUgaXMgdGhlIHRpdGxlISEhJywKICAgICAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0X2NlbnRlcl8xJwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZm9yKHZhciByIGluIHJlY2VudF9tb3ZpZXNfbGlzdCl7CiAgICAgICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgICAgIHRpdGxlOnBhcnNlRG9tRm9ySHRtbChyZWNlbnRfbW92aWVzX2xpc3Rbcl0sJy5pbmZvJiZUZXh0JyksCiAgICAgICAgICAgICAgICAgICAgZGVzYzpwYXJzZURvbUZvckh0bWwocmVjZW50X21vdmllc19saXN0W3JdLCdoMyYmVGV4dCcpLAogICAgICAgICAgICAgICAgICAgIHBpY191cmw6cGFyc2VEb21Gb3JIdG1sKHJlY2VudF9tb3ZpZXNfbGlzdFtyXSwnaW1nW2NsYXNzXSYmc3JjJyksCiAgICAgICAgICAgICAgICAgICAgdXJsOnBhcnNlRG9tRm9ySHRtbChyZWNlbnRfbW92aWVzX2xpc3Rbcl0sJ2EmJmhyZWYnKSsnQHJ1bGU9anM6JyArIGBsZXQganNGaWxlID0gZ2V0VmFyKCJkYl9qc19maWxlIik7anNGaWxlID0ganNGaWxlID09PSAnJyA/ICJoaWtlcjovL2ZpbGVzL3J1bGVzL2pzL3J0LWRvdWJhbi5qcyIgOiBqc0ZpbGU7ZXZhbChmZXRjaChqc0ZpbGUse30pKTtkb3ViYW4uZGV0YWlsVmlldygpO2AsCiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6J21vdmllXzMnCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgY29sX3R5cGU6J2xpbmVfYmxhbmsnCiAgICAgICAgICAgIH0pOwogICAgICAgIH1jYXRjaChlKXt9CiAgICAgICAgdHJ5ewogICAgICAgICAgICB2YXIgYmVzdF9tb3ZpZXMgPSAnPGJvZHk+JyArIHBhcnNlRG9tKGdldFJlc0NvZGUoKSwgJ2JvZHkmJiNiZXN0X21vdmllcyYmSHRtbCcpICsgJzwvYm9keT4nOwogICAgICAgICAgICB2YXIgYmVzdF9tb3ZpZXNfbGlzdCA9IHBhcnNlRG9tRm9yQXJyYXkoYmVzdF9tb3ZpZXMsICdib2R5JiZsaVtjbGFzc10nKTsKICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgIHRpdGxlOifmnIDlj5fmrKLov47nmoTkvZzlk4EnLAogICAgICAgICAgICAgICAgdXJsOid0b2FzdDovL0hlcmUgaXMgdGhlIHRpdGxlISEhJywKICAgICAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0X2NlbnRlcl8xJwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZm9yKHZhciByIGluIGJlc3RfbW92aWVzX2xpc3QpewogICAgICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICB0aXRsZTpwYXJzZURvbUZvckh0bWwoYmVzdF9tb3ZpZXNfbGlzdFtyXSwnLmluZm8mJlRleHQnKS5zcGxpdChwYXJzZURvbUZvckh0bWwoYmVzdF9tb3ZpZXNfbGlzdFtyXSwnLnBsJiZUZXh0JykpWzBdLAogICAgICAgICAgICAgICAgICAgIGRlc2M6cGFyc2VEb21Gb3JIdG1sKGJlc3RfbW92aWVzX2xpc3Rbcl0sJy5wbCYmVGV4dCcpLAogICAgICAgICAgICAgICAgICAgIHBpY191cmw6cGFyc2VEb21Gb3JIdG1sKGJlc3RfbW92aWVzX2xpc3Rbcl0sJ2ltZ1tjbGFzc10mJnNyYycpLAogICAgICAgICAgICAgICAgICAgIHVybDpwYXJzZURvbUZvckh0bWwoYmVzdF9tb3ZpZXNfbGlzdFtyXSwnYSYmaHJlZicpKydAcnVsZT1qczpldmFsKGZldGNoKGdldFZhcigiZGJfanNfZmlsZSIpLHt9KSk7ZG91YmFuLmRldGFpbFZpZXcoKTsnLAogICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOidtb3ZpZV8zJwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgIGNvbF90eXBlOidsaW5lX2JsYW5rJwogICAgICAgICAgICB9KTsKICAgICAgICB9Y2F0Y2goZSl7fQogICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgIHRpdGxlOifmn6XnnIvlhajpg6jkvZzlk4EnLAogICAgICAgICAgICB1cmw6Z2V0VXJsKCkrJ21vdmllcz9zdGFydD1meXBhZ2VALTFAKjEwQCZmb3JtYXQ9cGljJnNvcnRieT12b3RlJicrJ0BydWxlPWpzOicgKyBgbGV0IGpzRmlsZSA9IGdldFZhcigiZGJfanNfZmlsZSIpO2pzRmlsZSA9IGpzRmlsZSA9PT0gJycgPyAiaGlrZXI6Ly9maWxlcy9ydWxlcy9qcy9ydC1kb3ViYW4uanMiIDoganNGaWxlO2V2YWwoZmV0Y2goanNGaWxlLHt9KSk7ZG91YmFuLmFsbG1vdmllVmlldygpO2AsCiAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0X2NlbnRlcl8xJwogICAgICAgIH0pOwogICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgIGNvbF90eXBlOidsaW5lX2JsYW5rJwogICAgICAgIH0pOwogICAgICAgIHRyeXsKICAgICAgICAgICAgdmFyIHBob3RvcyA9ICc8Ym9keT4nICsgcGFyc2VEb20oZ2V0UmVzQ29kZSgpLCAnYm9keSYmI3Bob3RvcyYmSHRtbCcpICsgJzwvYm9keT4nOwogICAgICAgICAgICB2YXIgcGhvdG9zX2xpc3QgPSBwYXJzZURvbUZvckFycmF5KHBob3RvcywgJ2JvZHkmJmxpJyk7CiAgICAgICAgICAgIGlmIChwaG90b3NfbGlzdCAhPSBudWxsKXsKICAgICAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgdGl0bGU6ICflvbHkurrlm77niYfvvIjlhajpg6jvvIknLAogICAgICAgICAgICAgICAgICAgIHVybDogZ2V0VXJsKCkgKyAncGhvdG9zLz90eXBlPUMmc3RhcnQ9ZnlwYWdlQC0xQCozMEAmc29ydGJ5PWxpa2Umc2l6ZT1hJnN1YnR5cGU9YScrYEBydWxlPWpzOnZhciByZXMgPSB7fTt2YXIgZCA9IFtdO3ZhciBwaWNzID0gJzxib2R5PicgKyBwYXJzZURvbShnZXRSZXNDb2RlKCksICdib2R5JiYucG9zdGVyLWNvbDMmJkh0bWwnKSArICc8L2JvZHk+Jzt2YXIgcGljc19saXN0ID0gcGFyc2VEb21Gb3JBcnJheShwaWNzLCAnYm9keSYmbGknKTtmb3IodmFyIGkgaW4gcGljc19saXN0KXtkLnB1c2goe3BpY191cmw6cGFyc2VEb21Gb3JIdG1sKHBpY3NfbGlzdFtpXSwnaW1nJiZzcmMnKSx1cmw6cGFyc2VEb21Gb3JIdG1sKHBpY3NfbGlzdFtpXSwnaW1nJiZzcmMnKS5yZXBsYWNlKCdzcXhzJywgJ2wnKSxjb2xfdHlwZToncGljXzInfSk7fXJlcy5kYXRhID0gZDtzZXRIb21lUmVzdWx0KHJlcyk7YCwKICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIGZvcih2YXIgdCA9IDA7IHQgPCAzOyB0KyspIHsKICAgICAgICAgICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgICAgICAgICBwaWNfdXJsOiBwYXJzZURvbUZvckh0bWwocGhvdG9zX2xpc3RbdF0sJ2ltZyYmc3JjJyksCiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogcGFyc2VEb21Gb3JIdG1sKHBob3Rvc19saXN0W3RdLCdpbWcmJnNyYycpLnJlcGxhY2UoL1wvKHNxeHN8bSlcLy9nLCAnL2wvJyksCiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOidwaWNfMycKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH1jYXRjaChlKXt9CiAgICAgICAgcmVzLmRhdGEgPSBkOwogICAgICAgIHNldEhvbWVSZXN1bHQocmVzKTsKICAgIH0sCiAgICAvKioKICAgICAqIOeugOa0gS/lhajpg6jlvbHniYfmqKHlnZcKICAgICAqLwogICAgYWxsbW92aWVWaWV3OiBmdW5jdGlvbiAoKSB7CiAgICAgICAgdmFyIHJlcyA9IHt9O3ZhciBkID0gW107CiAgICAgICAgdmFyIG1vdmllcyA9ICc8Ym9keT4nICsgcGFyc2VEb20oZ2V0UmVzQ29kZSgpLCAnYm9keSYmI2NvbnRlbnQmJnVsW2NsYXNzPSIiXSYmSHRtbCcpICsgJzwvYm9keT4nOwogICAgICAgIHZhciBtb3ZpZXNfbGlzdCA9IHBhcnNlRG9tRm9yQXJyYXkobW92aWVzLCAnYm9keSYmbGlbY2xhc3M9IiJdJyk7CiAgICAgICAgZm9yKHZhciBtIGluIG1vdmllc19saXN0KXsKICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgIHRpdGxlOnBhcnNlRG9tRm9ySHRtbChtb3ZpZXNfbGlzdFttXSwnaW1nJiZhbHQnKSwKICAgICAgICAgICAgICAgIGRlc2M6cGFyc2VEb21Gb3JIdG1sKG1vdmllc19saXN0W21dLCcuc3RhciYmVGV4dCcpLAogICAgICAgICAgICAgICAgcGljX3VybDpwYXJzZURvbUZvckh0bWwobW92aWVzX2xpc3RbbV0sJ2ltZyYmc3JjJyksCiAgICAgICAgICAgICAgICB1cmw6cGFyc2VEb21Gb3JIdG1sKG1vdmllc19saXN0W21dLCcubmJnJiZocmVmJykrJ0BydWxlPWpzOicgKyBgbGV0IGpzRmlsZSA9IGdldFZhcigiZGJfanNfZmlsZSIpO2pzRmlsZSA9IGpzRmlsZSA9PT0gJycgPyAiaGlrZXI6Ly9maWxlcy9ydWxlcy9qcy9ydC1kb3ViYW4uanMiIDoganNGaWxlO2V2YWwoZmV0Y2goanNGaWxlLHt9KSk7ZG91YmFuLmRldGFpbFZpZXcoKTtgLAogICAgICAgICAgICAgICAgY29sX3R5cGU6J21vdmllXzMnCiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICByZXMuZGF0YSA9IGQ7CiAgICAgICAgc2V0SG9tZVJlc3VsdChyZXMpOwogICAgfSwKICAgIC8qKgogICAgICog566A5rSBL+mVv+ivhOaooeWdlwogICAgICovCiAgICBsb25nVmlldzogZnVuY3Rpb24gKCkgewogICAgICAgIHZhciByZXMgPSB7fTt2YXIgZCA9IFtdOwogICAgICAgIHZhciBjb21tZW50cyA9ICc8Ym9keT4nICsgcGFyc2VEb20oZ2V0UmVzQ29kZSgpLCAnYm9keSYmLnJldmlldy1saXN0JiZIdG1sJykgKyAnPC9ib2R5Pic7CiAgICAgICAgdmFyIGxpc3QgPSBwYXJzZURvbUZvckFycmF5KGNvbW1lbnRzLCAnYm9keSYmZGl2W2RhdGEtY2lkXScpOwogICAgICAgIGZvcih2YXIgaSBpbiBsaXN0KXtpZihsaXN0W2ldLmluZGV4T2YoImFsbHN0YXI1MCIpIT0tMSl7dmFyIGF2YXRhcl90aXRsZT0nICDimIXimIXimIXimIXimIUnO3ZhciBjb21tZW50X3RpdGxlPScgIOWKm+iNkCc7fWVsc2UgaWYobGlzdFtpXS5pbmRleE9mKCJhbGxzdGFyNDAiKSE9LTEpe3ZhciBhdmF0YXJfdGl0bGU9JyAg4piF4piF4piF4piF4piGJzt2YXIgY29tbWVudF90aXRsZT0nICDmjqjojZAnO31lbHNlIGlmKGxpc3RbaV0uaW5kZXhPZigiYWxsc3Rhc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jpwaG90byJdJiZhbHQnKS5yZXBsYWNlKGdldFVybCgpKyIvIiwiIik7CiAgICAgICAgICAgIHZhciBib29rX3Byb2R1Y2VyID0gcGFyc2VEb20oZ2V0UmVzQ29kZSgpLCAnYm9keSYmI2luZm8mJlRleHQnKS5yZXBsYWNlKGdldFVybCgpKyIvIiwiIikucmVwbGFjZSgi5Ye654mI56S+IiwiXG7lh7rniYjnpL4iKS5yZXBsYWNlKCLlia/moIfpopgiLCJcbuWJr+agh+mimCIpOwogICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgdGl0bGU6Ym9va19uYW1lLAogICAgICAgICAgICAgICAgZGVzYzpib29rX3Byb2R1Y2VyLAogICAgICAgICAgICAgICAgcGljX3VybDpib29rX3Bob3RvLAogICAgICAgICAgICAgICAgdXJsOmdldFVybCgpLAogICAgICAgICAgICAgICAgY29sX3R5cGU6J21vdmllXzFfdmVydGljYWxfcGljJwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdmFyIGJvb2tfaWQgPSBnZXRVcmwoKS5zcGxpdCgic3ViamVjdFwvIilbMV0uc3BsaXQoIlwvIilbMF07CiAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICB0aXRsZTon5p+l55yL55+t6K+EJywKICAgICAgICAgICAgICAgIHBpY191cmw6J2h0dHBzOi8vczEuYXgxeC5jb20vMjAyMC8xMS8wNC9CY0RERUQucG5nJywKICAgICAgICAgICAgICAgIHVybDonaHR0cHM6Ly9ib29rLmRvdWJhbi5jb20vc3ViamVjdC8nK2Jvb2tfaWQrJy9jb21tZW50cz9zdGFydD1meXBhZ2VALTFAKjIwQCZsaW1pdD0yMCZzb3J0PW5ld19zY29yZSZzdGF0dXM9UCZwZXJjZW50X3R5cGU9JysnQHJ1bGU9anM6JyArIGBsZXQganNGaWxlID0gZ2V0VmFyKCJkYl9qc19maWxlIik7anNGaWxlID0ganNGaWxlID09PSAnJyA/ICJoaWtlcjovL2ZpbGVzL3J1bGVzL2pzL3J0LWRvdWJhbi5qcyIgOiBqc0ZpbGU7ZXZhbChmZXRjaChqc0ZpbGUse30pKTtkb3ViYW4uc2hvcnRWaWV3KCk7YCwKICAgICAgICAgICAgICAgIGNvbF90eXBlOidpY29uX3NtYWxsXzQnCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgdGl0bGU6J+afpeeci+S5puivhCcsCiAgICAgICAgICAgICAgICBwaWNfdXJsOidodHRwczovL3MxLmF4MXguY29tLzIwMjAvMTEvMDQvQmNEclVlLnBuZycsCiAgICAgICAgICAgICAgICB1cmw6J2h0dHBzOi8vYm9vay5kb3ViYW4uY29tL3N1YmplY3QvJytib29rX2lkKycvcmV2aWV3cz9zdGFydD1meXBhZ2VALTFAKjIwQCZsaW1pdD0yMCcrJ0BydWxlPWpzOicgKyBgbGV0IGpzRmlsZSA9IGdldFZhcigiZGJfanNfZmlsZSIpO2pzRmlsZSA9IGpzRmlsZSA9PT0gJycgPyAiaGlrZXI6Ly9maWxlcy9ydWxlcy9qcy9ydC1kb3ViYW4uanMiIDoganNGaWxlO2V2YWwoZmV0Y2goanNGaWxlLHt9KSk7ZG91YmFuLmxvbmdWaWV3KCk7YCwKICAgICAgICAgICAgICAgIGNvbF90eXBlOidpY29uX3NtYWxsXzQnCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgdGl0bGU6J+WOn+aWh+aRmOW9lScsCiAgICAgICAgICAgICAgICBwaWNfdXJsOidodHRwczovL3MxLmF4MXguY29tLzIwMjAvMTEvMDYvQldnSE1ELnBuZycsCiAgICAgICAgICAgICAgICB1cmw6J2h0dHBzOi8vYm9vay5kb3ViYW4uY29tL3N1YmplY3QvJytib29rX2lkKycvYmxvY2txdW90ZXM/c29ydD1zY29yZSZzdGFydD1meXBhZ2VALTFAKjIwQD8nKydAcnVsZT1qczonICsgYGxldCBqc0ZpbGUgPSBnZXRWYXIoImRiX2pzX2Zp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wi4piF4piF4piF4piF4piFICDkupTmmJ8gIikucmVwbGFjZSgiNOaYnyIsIuKYheKYheKYheKYheKYhiAg5Zub5pifICIpLnJlcGxhY2UoIjPmmJ8iLCLimIXimIXimIXimIbimIYgIOS4ieaYnyAiKS5yZXBsYWNlKCIy5pifIiwi4piF4piF4piG4piG4piGICDkuozmmJ8gIikucmVwbGFjZSgiMeaYnyIsIuKYheKYhuKYhuKYhuKYhiAg5LiA5pifICIpOwogICAgICAgICAgICB2YXIgdmlkZW9fc2NvcmVfbnVtID0gcGFyc2VEb20oZ2V0UmVzQ29kZSgpLCAnYm9keSYmc3Ryb25nW3Byb3BlcnR5PSJ2OmF2ZXJhZ2UiXSYmVGV4dCcpLnJlcGxhY2UoZ2V0VXJsKCkrIi8iLCIiKS5zcGxpdCgiLyIpOwogICAgICAgICAgICBkLnB1c2goe2NvbF90eXBlOidsaW5lX2JsYW5rJ30pOwogICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgdGl0bGU6dmlkZW9fc2NvcmUuc3BsaXQoIuivhOS7tyIpWzBdLnJlcGxhY2UoIiAiLCI6IikrJ+ivhOS7tycsCiAgICAgICAgICAgICAgICB1cmw6J3RvYXN0Oi8v6L+Z6YeM5piv5qCH6aKYJywKICAgICAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0X2NlbnRlcl8xJwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgIHRpdGxlOifimIXimIXimIXimIXimIUnK3ZpZGVvX3Njb3JlLnNwbGl0KCLimIXimIXimIXimIXimIUiKVsxXSwKICAgICAgICAgICAgICAgIGNvbF90eXBlOidsb25nX3RleHQnCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICB2YXIgYm9va19icmllZiA9IHBhcnNlRG9tKGdldFJlc0NvZGUoKSwgJ2JvZHkmJkh0bWwnKS5tYXRjaCgvPGRpdiBjbGFzcz1cImludHJvW1xzXFNdKj88XC9kaXY+L2cpOwogICAgICAgICAgICB2YXIgYm9va19icmllZl9saXN0PVtdOwogICAgICAgICAgICB2YXIgdiA9IDA7CiAgICAgICAgICAgIGZvcih2YXIgaSBpbiBib29rX2JyaWVmKXsKICAgICAgICAgICAgICAgIGlmKGJvb2tfYnJpZWZbaV0uaW5kZXhPZigiXCjlsZXlvIDlhajpg6hcKSIpPT0tMSl7CiAgICAgICAgICAgICAgICAgICAgYm9va19icmllZl9saXN0LnB1c2goYm9va19icmllZltpXSk7CiAgICAgICAgICAgICAgICAgICAgdj12KzE7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZC5wdXNoKHtjb2xfdHlwZTonbGluZV9ibGFuayd9KTsKICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgIHRpdGxlOiflhoXlrrnnroDku4snLAogICAgICAgICAgICAgICAgdXJsOid0b2FzdDovL+i/memHjOaYr+agh+mimCcsCiAgICAgICAgICAgICAgICBjb2xfdHlwZTondGV4dF9jZW50ZXJfMScKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICB0aXRsZTpib29rX2JyaWVmX2xpc3RbMF0sCiAgICAgICAgICAgICAgICBjb2xfdHlwZTonbG9uZ190ZXh0JwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZC5wdXNoKHtjb2xfdHlwZTonbGluZV9ibGFuayd9KTsKICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgIHRpdGxlOifkvZzogIXnroDku4snLAogICAgICAgICAgICAgICAgdXJsOid0b2FzdDovL+i/memHjOaYr+agh+mimCcsCiAgICAgICAgICAgICAgICBjb2xfdHlwZTondGV4dF9jZW50ZXJfMScKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICB0aXRsZTpib29rX2JyaWVmX2xpc3RbMV0sCiAgICAgICAgICAgICAgICBjb2xfdHlwZTonbG9uZ190ZX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AgICAgICAgICAgICAgICB0aXRsZTon5b2x54mH5Ymn6K+EJywKICAgICAgICAgICAgICAgIHBpY191cmw6J2h0dHBzOi8vczEuYXgxeC5jb20vMjAyMC8xMS8wOS9CVDZSYUQucG5nJywKICAgICAgICAgICAgICAgIHVybDonaHR0cHM6Ly9tb3ZpZS5kb3ViYW4uY29tL3N1YmplY3QvJyt2aWRlb19pZCsnL3Jldmlld3M/c3RhcnQ9ZnlwYWdlQC0xQCoyMEAmbGltaXQ9MjAnKydAcnVsZT1qczonICsgYGxldCBqc0ZpbGUgPSBnZXRWYXIoImRiX2pzX2ZpbGUiKTtqc0ZpbGUgPSBqc0ZpbGUgPT09ICcnID8gImhpa2VyOi8vZmlsZXMvcnVsZXMvanMvcnQtZG91YmFuLmpzIiA6IGpzRmlsZTtldmFsKGZldGNoKGpzRmlsZSx7fSkpO2RvdWJhbi5sb25nVmlldygpO2AsCiAgICAgICAgICAgICAgICBjb2xfdHlwZTonaWNvbl9zbWFsbF80JwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgIHRpdGxlOifpooTlkYroirHnta4nLAogICAgICAgICAgICAgICAgcGljX3VybDonaHR0cHM6Ly9zMS5heDF4LmNvbS8yMDIwLzExLzA5L0JUNjJWTy5wbmcnLAogICAgICAgICAgICAgICAgdXJsOidodHRwczovL21vdmllLmRvdWJhbi5jb20vc3ViamVjdC8nK3ZpZGVvX2lkKycvdHJhaWxlcicrYEBydWxlPWpzOnZhciByZXMgPSB7fTt2YXIgZCA9IFtdO3ZhciBjb250ZW50ID0gJzxib2R5PicgKyBwYXJzZURvbShnZXRSZXNDb2RlKCksICdib2R5JiYjY29udGVudCYmSHRtbCcpICsgJzwvYm9keT4nO3ZhciB0aXRsZV9saXN0ID0gcGFyc2VEb21Gb3JBcnJheShjb250ZW50LCAnYm9keSYmaDJbaWRdJyk7dmFyIGxpc3RfbGlzdCA9IHBhcnNlRG9tRm9yQXJyYXkoY29udGV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lID0gJ+mrmOa4hee9kSc7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgbGV0IHNpbXBsZVVzdWFsU2VhcmNoUnVsZVBpY1VybCA9ICcnOwogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgc2ltcGxlVXN1YWxTZWFyY2hSdWxlUGljVXJsID0gc2ltcGxlVXN1YWxTZWFyY2hSdWxlU3BsaXRbMV07CiAgICAgICAgICAgICAgICBzaW1wbGVVc3VhbFNlYXJjaFJ1bGVQaWNVcmwgPSBzaW1wbGVVc3VhbFNlYXJjaFJ1bGVQaWNVcmwgPT09ICcnID8KICAgICAgICAgICAgICAgICAgICAnaHR0cHM6Ly9zMy5heDF4LmNvbS8yMDIwLzExLzIzL0RHeGRJQS5wbmcnIDogc2ltcGxlVXN1YWxTZWFyY2hSdWxlUGljVXJsOwogICAgICAgICAgICB9IGNhdGNoIChlKSB7CiAgICAgICAgICAgICAgICBzaW1wbGVVc3VhbFNlYXJjaFJ1bGVQaWNVcmwgPSAnaHR0cHM6Ly9zMy5heDF4LmNvbS8yMDIwLzExLzIzL0RHeGRJQS5wbmcnOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICB0aXRsZTogc2ltcGxlVXN1YWxTZWFyY2hSdWxlVGl0bGUsCiAgICAgICAgICAgICAgICBwaWNfdXJsOiBzaW1wbGVVc3VhbFNlYXJjaFJ1bGVQaWNVcmwsCiAgICAgICAgICAgICAgICB1cmw6J2hpa2VyOi8vc2VhcmNoP3M9Jyt2aWRlb19uYW1lKycmcnVsZT0nICsgc2ltcGxlVXN1YWxTZWFyY2hSdWxlTmFtZSwKICAgICAgICAgICAgICAgIGNvbF90eXBlOidpY29uX3NtYWxsXzQnCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgdGl0bGU6J+i1hOa6kOe9kScsCiAgICAgICAgICAgICAgICBwaWNfdXJsOidodHRwczovL3MzLmF4MXguY29tLzIwMjAvMTEvMjMvREdqcTZVLnBuZycsCiAgICAgICAgICAgICAgICB1cmw6J2hpa2VyOi8vc2VhcmNoP3M9Jyt2aWRlb19uYW1lKycmcnVsZT3otYTmupDnvZHph4fpm4YueHlxJywKICAgICAgICAgICAgICAgIGNvbF90eXBlOidpY29uX3NtYWxsXzQnCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICAvLyDmkJzntKLlj4LmlbAKICAgICAgICAgICAgbGV0IHNlYXJjaFZhbHVlID0gc2V0dGluZ3Muc2VhcmNoVmFsdWU7CiAgICAgICAgICAgIGxldCBzZWFyY2hVcmwgPSBzZXR0aW5ncy5vcGVuSGlrZXJTZWFyY2ggPT09IDEKICAgICAgICAgICAgICAgID8gKCdoaWtlcjovL3NlYXJjaD9zPScKICAgICAgICAgICAgICAgICAgICArICh2aWRlb19uYW1lID09PSAnJyB8fCB2aWRlb19uYW1lID09PSB1bmRlZmluZWQKICAgICAgICAgICAgICAgICAgICAgICAgPyB2aWRlb19vcmlnaW5hbF9uYW1lCiAgICAgICAgICAgICAgICAgICAgICAgIDogdmlkZW9fbmFtZSkKICAgICAgICAgICAgICAgICAgICArIHNlYXJjaFZhbHVlCiAgICAgICAgICAgICAgICApCiAgICAgICAgICAgICAgICA6ICgnaGlrZXI6Ly9zZWFyY2g/cz0nICsgdmlkZW9fbmFtZSk7CiAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICB0aXRsZTon5YmN5b6A5pCc57SiJywKICAgICAgICAgICAgICAgIHBpY191cmw6J2h0dHBzOi8vczMuYXgxeC5jb20vMjAyMC8xMS8yMy9ER1cwZGUucG5nJywKICAgICAgICAgICAgICAgIHVybDogc2VhcmNoVXJsLAogICAgICAgICAgICAgICAgY29sX3R5cGU6J2ljb25fc21hbGxfNCcKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICBjb2xfdHlwZTonbGluZV9ibGFuaycKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHRyeXsKICAgICAgICAgICAgICAgIHZhciB1cmxzID0gJzxib2R5PicgKyBwYXJzZURvbShnZXRSZXNDb2RlKCksICdib2R5JiYuYnMmJkh0bWwnKSArICc8L2JvZHk+JzsKICAgICAgICAgICAgICAgIHZhciB1cmxzX2xpc3QgPSBwYXJzZURvbUZvckFycmF5KHVybHMsICdib2R5JiZsaScpOwogICAgICAgICAgICAgICAgZC5wdXNoKHt0aXRsZToi5LiK5pig5pe26Ze0OiIrdmlkZW9fdGltZSx1cmw6J3RvYXN0Oi8v6L+Z6YeM5piv5qCH6aKYJyxjb2xfdHlwZTondGV4dF9jZW50ZXJfMSd9KTsKICAgICAgICAgICAgICAgIGZvcih2YXIgdiBpbiB1cmxzX2xpc3QpewogICAgICAgICAgICAgICAgICAgIHZhciB1cmxzX25hbWU9cGFyc2VEb21Gb3JIdG1sKHVybHNfbGlzdFt2XSwnYSYmVGV4dCcpOwogICAgICAgICAgICAgICAgICAgIGlmKHVybHNfbmFtZT09IuiFvuiur+inhumikSIpewogICAgICAgICAgICAgICAgICAgICAgICB2YXIgdXJsX2ljb249J2h0dHBzOi8vczEuYXgxeC5jb20vMjAyMC8xMS8wNi9CaFJLOTEuanBnJzsKICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHVybF9zZWFyY2g9Z2V0VXJsKCkrJztnZXQ7VVRGLTg7e1VzZXItQWdlbnRATW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMO+8m++8myBXT1c2NCl9JytgQHJ1bGU9anM6dmFyIGl0ZW1zPVtdO2ZldGNoKCdoaWtlcjovL2ZpbGVzL251bGkvcXEudHh0Jyx7fSk7dmFyIHppcD1mZXRjaCgnaGlrZXI6Ly9maWxlcy9udWxpL3FxLnR4dCcpLnNwbGl0KCcsJyk7dmFyIHRpdGxlPXBhcnNlRG9tRm9ySHRtbChnZXRSZXNDb2RlKCksJ2gxJiZUZXh0Jyk7dmFyIHRpdGxlYT1wYXJzZURv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lOnVybHNfbmFtZSxwaWNfdXJsOnVybF9pY29uLHVybDp1cmxfc2VhcmNoLGNvbF90eXBlOidpY29uXzQnCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBkLnB1c2goe2NvbF90eXBlOidsaW5lX2JsYW5rJ30pOwogICAgICAgICAgICB9Y2F0Y2goZSl7ZC5wdXNoKHt0aXRsZToi5LiK5pig5pe26Ze0OiIrdmlkZW9fdGltZSx1cmw6J3RvYXN0Oi8v6L+Z6YeM5piv5qCH6aKYJyxjb2xfdHlwZTondGV4dF9jZW50ZXJfMSd9KTsKICAgICAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgdGl0bGU6J+aaguaXoOeJh+a6kO+8jOivt+S9v+eUqOaQnOe0ouWKn+iDveKApicsCiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6J3RleHRfY2VudGVyXzEnCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIGQucHVzaCh7Y29sX3R5cGU6J2xpbmVfYmxhbmsnfSk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgIHRpdGxlOifosYbnk6Por4TliIY6Jyt2aWRlb19zY29yZV9udW1bKHZpZGVvX3Njb3JlX251bS5sZW5ndGgtMSldLnNwbGl0KCJcKCIpWzBdLAogICAgICAgICAgICAgICAgdXJsOid0b2FzdDovL+i/memHjOecn+eahOWPquaYr+agh+mimCcsCiAgICAgICAgICAgICAgICBjb2xfdHlwZTondGV4dF9jZW50ZXJfMScKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIHZhciBzY29yZSA9ICc8Ym9keT4nICsgcGFyc2VEb20oZ2V0UmVzQ29kZSgpLCAnYm9keSYmLnJhdGluZ3Mtb24td2VpZ2h0JiZIdG1sJykgKyAnPC9ib2R5Pic7CiAgICAgICAgICAgIHZhciBzY29yZV9saXN0ID0gcGFyc2VEb21Gb3JBcnJheShzY29yZSwgJ2JvZHkmJi5pdGVtJyk7CiAgICAgICAgICAgIHZhciBzY29yZV9odG1sPScnOwogICAgICAgICAgICBmb3IodmFyIHMgaW4gc2NvcmVfbGlzdCl7CiAgICAgICAgICAgICAgICBpZihzPT0wKXsKICAgICAgICAgICAgICAgICAgICB2YXIgc2NvcmVfc3Rhcj0n4piF4piF4piF4piF4piFJzsKICAgICAgICAgICAgICAgIH1lbHNlIGlmKHM9PTEpewogICAgICAgICAgICAgICAgICAgIHZhciBzY29yZV9zdGFyPSfimIXimIXimIXimIXimIYnOwogICAgICAgICAgICAgICAgfWVsc2UgaWYocz09Mil7CiAgICAgICAgICAgICAgICAgICAgdmFyIHNjb3JlX3N0YXI9J+KYheKYheKYheKYhuKYhic7CiAgICAgICAgICAgICAgICB9ZWxzZSBpZihzPT0zKXsKICAgICAgICAgICAgICAgICAgICB2YXIgc2NvcmVfc3Rhcj0n4piF4piF4piG4piG4piGJzsKICAgICAgICAgICAgICAgIH1lbHNlIGlmKHM9PTQpewogICAgICAgICAgICAgICAgICAgIHZhciBzY29yZV9zdGFyPSfimIXimIbimIbimIbimIYnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdmFyIHNjb3JlX251bT1wYXJzZURvbUZvckh0bWwoc2NvcmVfbGlzdFtzXSwnLnJhdGluZ19wZXImJlRleHQnKS5zcGxpdCgnJScpWzBdOwogICAgICAgICAgICAgICAgdmFyIHNjb3JlX3RleHRfMT0nJzsKICAgICAgICAgICAgICAgIHZhciBzY29yZV90ZXh0XzI9Jyc7CiAgICAgICAgICAgICAgICBmb3IodmFyIG49MDsgbjxNYXRoLmNlaWwoc2NvcmVfbnVtLzEwKTtuKyspewogICAgICAgICAgICAgICAgICAgIHZhciBzY29yZV90ZXh0XzE9c2NvcmVfdGV4dF8xKyfilocnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZm9yKHZhciBuPTA7IG48MTAtKE1hdGguY2VpbChzY29yZV9udW0vMTApKTtuKyspewogICAgICAgICAgICAgICAgICAgIHZhciBzY29yZV90ZXh0XzI9c2NvcmVfdGV4dF8yKyfilocnOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgdmFyIHNjb3JlX2h0bWw9c2NvcmVfaHRtbCsnPGZvbnQgY29sb3I9IiM3YzdhN2IiPicrc2NvcmVfc3RhcisnPC9mb250PiZuYnNwOzxmb250IGNvbG9yPSIjZmZhYzJkIj4nK3Njb3JlX3RleHRfMSsnPC9mb250Pjxmb250IGNvbG9yPSIjZTVlMWU0Ij4nK3Njb3JlX3RleHRfMisnPC9mb250PiZuYnNwOzxmb250IGNvbG9yPSJncmV5Ij4mbmJzcDsnK3Njb3JlX251bSsnJTwvZm9udD48YnIvPic7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgIHRpdGxlOnNjb3JlX2h0bWwuc2xpY2UoMCwoc2NvcmVfaHRtbC5sZW5ndGgtNSkpLAogICAgICAgICAgICAgICAgY29sX3R5cGU6J3JpY2hfdGV4dCcKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGQucHVzaCh7Y29sX3R5cGU6J2xpbmVfYmxhbmsnfSk7CiAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICB0aXRsZTon5Ymn5oOF566A5LuLJywKICAgICAgICAgICAgICAgIHVybDondG9hc3Q6Ly9IZXJlIGlzIHRoZSB0aXRsZSEhIScsCiAgICAgICAgICAgICAgICBjb2xfdHlwZTondGV4dF9jZW50ZXJfMScKICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICB0aXRsZTp2aWRlb19icmllZiwKICAgICAgICAgICAgICAgIGNvbF90eXBlOidsb25nX3RleHQnCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkLnB1c2goe2NvbF90eXBlOidsaW5lX2JsYW5rJ30pOwogICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgdGl0bGU6J+W9seeJh+mihOiniCcsCiAgICAgICAgICAgICAgICB1cmw6J3RvYXN0Oi8v5aW95a625LyZ77yM6L+Y5oiz5qCH6aKYKCAg772l4beE4b2i772l4beFICAp5Zev77yfJywKICAgICAgICAgICAgICAgIGNvbF90eXBlOid0ZXh0X2NlbnRlcl8xJwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZm9yKHZhciBpIGluIHBpY3NfbGlzdCl7CiAgICAgICAgICAgICAgICBpZihwaWNzX2xpc3RbaV0uaW5kZXhPZigibGFiZWwtdHJhaWxlciIpICE9PSAtMSl7CiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6J+mihOWRiueJhycsCiAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6cGFyc2VEb21Gb3JIdG1sKHBpY3NfbGlzdFtpXSwnYSYmc3R5bGUnKSwKICAgICAgICAgICAgICAgICAgICAgICAgdXJsOnBhcnNlRG9tRm9ySHRtbChwaWNzX2xpc3RbaV0sJ2EmJmhyZWYnKStgQGxhenlSdWxlPWJvZHkmJnNvdXJjZSYmc3JjYCwKICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6J3BpY18yJwogICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgfWVsc2UgaWYocGljc19saXN0W2ldLmluZGV4T2YoImxhYmVsLXNob3J0LXZpZGVvIikgIT09IC0xKXsKICAgICAgICAgICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTon6KeG6aKR6K+E6K66JywKICAgICAgICAgICAgICAgICAgICAgICAgcGljX3VybDpwYXJzZURvbUZvckh0bWwocGljc19saXN0W2ldLCdhJiZzdHlsZScpLAogICAgICAgICAgICAgICAgICAgICAgICB1cmw6cGFyc2VEb21Gb3JIdG1sKHBpY3NfbGlzdFtpXSwnYSYmaHJlZicpK2BAbGF6eVJ1bGU9Ym9keSYmc291cmNlJiZzcmNgLAogICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZToncGljXzInCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9ZWxzZXsKICAgICAgICAgICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTon5Ymn54WnJywKICAgICAgICAgICAgICAgICAgICAgICAgcGljX3VybDpwYXJzZURvbUZvckh0bWwocGljc19saXN0W2ldLCdpbWcmJnNyYycpLnJlcGxhY2UoInNxeHMiLCJsIikucmVwbGFjZSgiaW1nMSIsImltZzkiKSwKICAgICAgICAgICAgICAgICAgICAgICAgdXJsOnBhcnNlRG9tRm9ySHRtbChwaWNzX2xpc3RbaV0sJ2ltZyYmc3JjJykucmVwbGFjZSgic3F4cyIsImwiKS5yZXBsYWNlKCJpbWcxIiwiaW1nOSIpLAogICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZToncGljXzInCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgcmVzLmRhdGEgPSBkO3NldEhvbWVSZXN1bHQocmVzKTsKICAgIH0sCiAgICAvKioKICAgICAqIOixhueTo+mAieS5puWOn+aWh+aRmOW9leaooeWdlwogICAgICovCiAgICBleGNlcnB0VmlldzogZnVuY3Rpb24gKCkgewogICAgICAgIHZhciByZXMgPSB7fTt2YXIgZCA9IFtdOwogICAgICAgIHZhciBjb250ZW50ID0gJzxib2R5PicgKyBwYXJzZURvbShnZXRSZXNDb2RlKCksICdib2R5JiYuYmxvY2txdW90ZS1saXN0JiZIdG1sJykgKyAnPC9ib2R5Pic7CiAgICAgICAgdmFyIGNvbnRlbnRfbGlzdCA9IHBhcnNlRG9tRm9yQXJyYXkoY29udGVudCwgJ2JvZHkmJmxpJyk7CiAgICAgICAgZm9yKHZhciBpIGluIGNvbnRlbnRfbGlzdCl7CiAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICB0aXRsZTpwYXJzZURvbUZvckh0bWwoY29udGVudF9saXN0W2ldLCcuYXV0aG9yLW5hbWUmJlRleHQnKSsnICAgJytwYXJzZURvbUZvckh0bWwoY29udGVudF9saXN0W2ldLCdkYXRldGltZSYmVGV4dCcpLAogICAgICAgICAgICAgICAgcGljX3VybDpwYXJzZURvbUZvckh0bWwoY29udGVudF9saXN0W2ldLCdpbWcmJnNyYycpLAogICAgICAgICAgICAgICAgdXJsOnBhcnNlRG9tRm9ySHRtbChjb250ZW50X2xpc3RbaV0sJy5hdXRob3ItYXZhdGFyJiZocmVmJyksCiAgICAgICAgICAgICAgICBjb2xfdHlwZTonYXZhdGFyJwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgIHRpdGxlOnBhcnNlRG9tRm9ySHRtbChjb250ZW50X2xpc3RbaV0sJ2ZpZ3VyZSYmVGV4dCcpLnNwbGl0CiAgICAgICAgICAgICAgICAoIlwoIOafpeeci+WOn+aWh1wpIilbMF0sCiAgICAgICAgICAgICAgICBjb2xfdHlwZTonbG9uZ190ZXh0JwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgIHRpdGxlOnBhcnNlRG9tRm9ySHRtbChjb250ZW50X2xpc3RbaV0sJ2ZpZ2NhcHRpb24mJnRpdGxlJykrJyAgICcrcGFyc2VEb21Gb3JIdG1sKGNvbnRlbnRfbGlzdFtpXSwnc3BhbiYmVGV4dCcpLAogICAgICAgICAgICAgICAgcGljX3VybDonaHR0cHM6Ly9zMS5heDF4LmNvbS8yMDIwLzExLzA2L0JXZ0lHNi5wbmcnLAogICAgICAgICAgICAgICAgdXJsOid0b2FzdDovL+i/memHjOS7gOS5iOmDveayoeaciScsCiAgICAgICAgICAgICAgICBjb2xfdHlwZTonYXZhdGFyJwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgZC5wdXNoKHtjb2xfdHlwZTonbGluZV9ibGFuayd9KTsKICAgICAgICB9CiAgICAgICAgcmVzLmRhdGEgPSBkO3NldEhvbWVSZXN1bHQocmVzKTsKICAgIH0sCiAgICAvKioKICAgICAqIOixhueTo+mAieS5puivu+S5pueslOiusOaooeWdlwogICAgICovCiAgICBub3RlVmlldzogZnVuY3Rpb24gKCkgewogICAgICAgIHZhciByZXMgPSB7fTt2YXIgZCA9IFtdOwogICAgICAgIHZhciBjb21tZW50cyA9ICc8Ym9keT4nICsgcGFyc2VEb20oZ2V0UmVzQ29kZSgpLCAnYm9keSYmLmNvbW1lbnRzJiZIdG1sJykgKyAnPC9ib2R5Pic7CiAgICAgICAgdmFyIGNvbW1lbnRzX2xpc3QgPSBwYXJzZURvbUZvckFycmF5KGNvbW1lbnRzLCAnYm9keSYmbGknKTsKICAgICAgICBmb3IodmFyIGkgaW4gY29tbWVudHNfbGlzdCl7CiAgICAgICAgICAgIGlmKGNvbW1lbnRzX2xpc3RbaV0uaW5kZXhPZigiYWxsc3RhcjUwIikhPS0xKXt2YXIgYXZhdGFyX3RpdGxlPScgIOKYheKYheKYheKYheKYhSc7fWVsc2UgaWYoY29tbWVudHNfbGlzdFtpXS5pbmRleE9mKCJhbGxzdGFyNDAiKSE9LTEpe3ZhciBhdmF0YXJfdGl0bGU9JyAg4piF4piF4piF4piF4piGJ31lbHNlIGlmKGNvbW1lbnRzX2xpc3RbaV0uaW5kZXhPZigiYWxsc3RhcjMwIikhPS0xKXt2YXIgYXZhdGFyX3RpdGxlPScgIOKYheKYheKYheKYhuKYhic7fWVsc2UgaWYoY29tbWVudHNfbGlzdFtpXS5pbmRleE9mKCJhbGxzdGFyMjAiKSE9LTEpe3ZhciBhdmF0YXJfdGl0bGU9JyAg4piF4piF4piG4piG4piGJzt9ZWxzZSBpZihjb21tZW50c19saXN0W2ldLmluZGV4T2YoImFsbHN0YXIxMCIpIT0tMSl7dmFyIGF2YXRhcl90aXRsZT0nICDimIXimIbimIbimIbimIYnO31lbHNle3ZhciBhdmF0YXJfdGl0bGU9JyAg4piG4piG4piG4piG4piGJzt9CiAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICB0aXRsZTpwYXJzZURvbUZvckh0bWwoY29tbWVudHNfbGlzdFtpXSwnaW1nJiZhbHQnKSthdmF0YXJfdGl0bGUrJyAgICDlhbHmnIknK3BhcnNlRG9tRm9ySHRtbChjb21tZW50c19saXN0W2ldLCcuY29sLXRpbWUmJlRleHQnKSwKICAgICAgICAgICAgICAgIHBpY191cmw6cGFyc2VEb21Gb3JIdG1sKGNvbW1lbnRzX2xpc3RbaV0sJ2ltZyYmc3JjJyksCiAgICAgICAgICAgICAgICBjb2xfdHlwZTonYXZhdGFyJwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdmFyIGNvbnRlbnQ9cGFyc2VEb21Gb3JIdG1sKGNvbW1lbnRzX2xpc3RbaV0sJy5hbGwmJkh0bWwnKS5yZXBsYWNlKC88ZGl2IGNsYXNzPVwiY29sLXJlYy1jb25bXHNcU10qP1stMDEyMzQ1Njc4OSA6XXsxN30vZywiICIpOwogICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgdGl0bGU6Y29udGVudCwKICAgICAgICAgICAgICAgIGNvbF90eXBlOidyaWNoX3RleHQnCiAgICAgICAgICAgIH0pOwogICAgICAgICAgICBkLnB1c2goe2NvbF90eXBlOidsaW5lX2JsYW5rJ30pOwogICAgICAgIH0KICAgICAgICByZXMuZGF0YSA9IGQ7CiAgICAgICAgc2V0SG9tZVJlc3VsdChyZXMpOwogICAgfSwKICAgIC8qKgogICAgICog5b2x6K+E6K+m5oOF6KeE5YiZCiAgICAgKi8KICAgIHJldmlld0RldGFpbFZpZXc6IGZ1bmN0aW9uICgpIHsKICAgICAgICB2YXIgcmVzID0ge307CiAgICAgICAgdmFyIGQgPSBbXTsKICAgICAgICB2YXIgY29sVHlwZSA9ICdyaWNoX3RleHQnOwogICAgICAgIHZhciBodG1sID0gZ2V0UmVzQ29kZSgpOwogICAgICAgIHZhciByZXZpZXdJZCA9ICcnOwogICAgICAgIC9yZXZpZXdcLyhcZCspXC8vLnRlc3QoTVlfVVJMKTsKICAgICAgICByZXZpZXdJZCA9IFJlZ0V4cC4kMTsKICAgICAgICBsZXQgcGFnZSA9IE1ZX1VSTC5zcGxpdCgnIycpWzFdOwoKICAgICAgICBpZiAocGFnZSA9PT0gJzEnKSB7CiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiBoZWFkZXLvvIjlpLTpg6jvvIkKICAgICAgICAgICAgICovCiAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICBsZXQgdmlld1NvdXJjZSA9IGdldFNtYWxsVGV4dChnZXRHcmV5VGV4dChnZXRBZGRyZXNzVGFnKE1ZX1VSTCwgJ1vmn6XnnIvljp/mloddJykpKTsKICAgICAgICAgICAgICAgIGxldCBoZWFkZXJIdG1sID0gcGFyc2VEb21Gb3JIdG1sKGh0bWwsICcjY29udGVudCYmLmFydGljbGUmJkh0bWwnKTsKICAgICAgICAgICAgICAgIGxldCBoZWFkZXJUaXRsZSA9IGdldEJpZ1RleHQoZ2V0VGl0bGVUZXh0KHBhcnNlRG9tRm9ySHRtbChoZWFkZXJIdG1sLCAnaDEmJlRleHQnKSkpOwogICAgICAgICAgICAgICAgaGVhZGVySHRtbCA9IHBhcnNlRG9tRm9ySHRtbChoZWFkZXJIdG1sLCAnLm1haW4taGQmJkh0bWwnKTsKICAgICAgICAgICAgICAgIGxldCBtZXRhID0gJyc7CiAgICAgICAgICAgICAgICBsZXQgYXV0aG9yID0gJyc7CiAgICAgICAgICAgICAgICBpZiAoLyg8YSBocmVmPSJodHRwczpcL1wvd3d3LmRvdWJhbi5jb21bXHNcU10qPzxcL2E+KS8udGVzdChoZWFkZXJIdG1sKSA9PT0gdHJ1ZSkgewogICAgICAgICAgICAgICAgICAgIGF1dGhvciA9IGdldEF1dGhvclRleHQocGFyc2VEb21Gb3JIdG1sKFJlZ0V4cC4kMSwgJ1RleHQnKSkKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGxldCBtb3ZpZU5hbWUgPSAnJzsKICAgICAgICAgICAgICAgIGlmICgvKDxhIGhyZWY9Imh0dHBzOlwvXC9tb3ZpZS5kb3ViYW4uY29tW1xzXFNdKj88XC9hPikvLnRlc3QoaGVhZGVySHRtbCkgPT09IHRydWUpIHsKICAgICAgICAgICAgICAgICAgICBtb3ZpZU5hbWUgPSBnZXRDb2xvclRleHQocGFyc2VEb21Gb3JIdG1sKFJlZ0V4cC4kMSwgJ1RleHQnKSwgJyM4OTY1YjQnKQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgbWV0YSA9IChhdXRob3IgIT09ICcnICYmIG1vdmllTmFtZSAhPT0gJycpID8gKGF1dGhvciArICcgJyArIGdldEdyZXlUZXh0KCfor4TorronKSArICcgJyArIG1vdmllTmFtZSkgOiAnJzsKICAgICAgICAgICAgICAgIGxldCByYXRpbmcgPSAnJzsKICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgcmF0aW5nID0gZ2V0UmF0aW5nKHBhcnNlRG9tRm9ySHRtbChoZWFkZXJIdG1sLCAnLm1haW4tdGl0bGUtcmF0aW5nJiZ0aXRsZScpKSArICcgJwogICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkgeyB9CiAgICAgICAgICAgICAgICBsZXQgdGltZSA9IGdldEdyZXlUZXh0KHBhcnNlRG9tRm9ySHRtbChoZWFkZXJIdG1sLCAnLm1haW4tbWV0YSYmVGV4dCcpKTsKICAgICAgICAgICAgICAgIG1ldGEgKz0gJyAnICsgcmF0aW5nICsgdGltZTsKICAgICAgICAgICAgICAgIG1ldGEgPSBnZXRTbWFsbFRleHQobWV0YSk7CiAgICAgICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgICAgIHRpdGxlOiBoZWFkZXJUaXRsZSArIChzZXR0aW5ncy5zaG93U291cmNlID09PSAxID8gKCcgJyArIHZpZXdTb3VyY2UpIDogJycpICsgJzxicj4nICsgbWV0YSwKICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogY29sVHlwZQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZScKICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsgfQogICAgICAgICAgICAvKioKICAgICAgICAgICAgICog5q2j5paHCiAgICAgICAgICAgICAqLwogICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgbGV0IG1haW5Db250ZW50RG9tUnVsZSA9ICcjcmV2aWV3LScgKyByZXZpZXdJZCArICctY29udGVudCYmSHRtbCc7CiAgICAgICAgICAgICAgICBsZXQgbWFpbkNvbnRlbnRIdG1sID0gcGFyc2VEb21Gb3JIdG1sKGh0bWwsIG1haW5Db250ZW50RG9tUnVsZSk7CiAgICAgICAgICAgICAgICBsZXQgdGl0bGVUaXBzID0gJyc7CiAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgIHRpdGxlVGlwcyA9ICc8YmxvY2txdW90ZT4nICsgcGFyc2VEb21Gb3JIdG1sKG1haW5Db250ZW50SHRtbCwgJy5tYWluLXRpdGxlLXRpcCYmSHRtbCcpICsgJzwvYmxvY2txdW90ZT4nCiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7IH0KICAgICAgICAgICAgICAgIGxldCBtYWluQ29udGVudCA9IHBhcnNlRG9tRm9ySHRtbChtYWluQ29udGVudEh0bWwsICcucmV2aWV3LWNvbnRlbnQmJkh0bWwnKQogICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlV2l0aENhbGxiYWNrKC88c3BhbiBzdHlsZT0iLio/Ij4oW1xzXFNdKj8pPFwvc3Bhbj4vZywgJycsIHN0eWxlU3BhblRvU3R5bGVGb250UmVwbGFjZW1lbnQpCiAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2VXaXRoQ2FsbGJhY2soLyg8aW1nIChzcmN8ZGF0YS1zcmMpPSIoLio/KSIoW1xzXFNdKj8pPikvZywgIjxpbWcgZGF0YS12PiIsIGltZ1RhZ1JlcGxhY2VtZW50Mik7CiAgICAgICAgICAgICAgICBsZXQgY29weXJpZ2h0ID0gJyc7CiAgICAgICAgICAgICAgICB0cnkgewogICAgICAgICAgICAgICAgICAgIGNvcHlyaWdodCA9IGdldFNtYWxsVGV4dChnZXRHcmV5VGV4dChwYXJzZURvbUZvckh0bWwobWFpbkNvbnRlbnRIdG1sLCAnLmNvcHlyaWdodCYmSHRtbCcpKSk7CiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7IH0KICAgICAgICAgICAgICAgIGxldCB1c2VmdWxIdG1sID0gcGFyc2VEb21Gb3JIdG1sKG1haW5Db250ZW50SHRtbCwgJy5tYWluLXBhbmVsLXVzZWZ1bCYmSHRtbCcpOwogICAgICAgICAgICAgICAgbGV0IHVzZWZ1bCA9ICc8YnI+JyArIGdldFNtYWxsVGV4dChnZXRDb2xvclRleHQocGFyc2VEb21Gb3JIdG1sKHVzZWZ1bEh0bWwsICcudXNlZnVsX2NvdW50JiZUZXh0JyksIHNldHRpbmdzLnJhdGluZ0NvbG9yc1swXSkpOwogICAgICAgICAgICAgICAgbGV0IHVzZWxlc3MgPSBnZXRTbWFsbFRleHQoZ2V0R3JleVRleHQoJyDii4UgJykgKyBnZXRDb2xvclRleHQocGFyc2VEb21Gb3JIdG1sKHVzZWZ1bEh0bWwsICcudXNlbGVzc19jb3VudCYmVGV4dCcpLCBzZXR0aW5ncy5yYXRpbmdDb2xvcnNbNF0pKTsKICAgICAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlVGlwcyArIG1haW5Db250ZW50ICsgY29weXJpZ2h0ICsgdXNlZnVsICsgdXNlbGVzcywKICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogY29sVHlwZQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHsgfQogICAgICAgIH0KCiAgICAgICAgLyoqCiAgICAgICAgICog5Ymn6K+E6K+E6K66CiAgICAgICAgICovCiAgICAgICAgdHJ5IHsKICAgICAgICAgICAgLyg8ZGl2IGlkPSJjb21tZW50cyIgY2xhc3M9ImNvbW1lbnQtbGlzdCI+W1xzXFNdKj88XC9zY3JpcHQ+KS8udGVzdChodG1sKTsKICAgICAgICAgICAgbGV0IGNvbW1lbnRTY3JpcHRIdG1sID0gcGFyc2VEb21Gb3JIdG1sKFJlZ0V4cC4kMSwgJ3NjcmlwdCYmSHRtbCcpOwogICAgICAgICAgICBldmFsKGNvbW1lbnRTY3JpcHRIdG1sKTsKICAgICAgICAgICAgbGV0IHJldmlld0NvbW1lbnRMaXN0ID0gX0NPTU1FTlRTX0NPTkZJRy5jb21tZW50czsKICAgICAgICAgICAgaWYgKHJldmlld0NvbW1lbnRMaXN0Lmxlbmd0aCA+IDApIHsKICAgICAgICAgICAgICAgIGlmIChwYWdlID09PSAnMScpIHsKICAgICAgICAgICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogc2V0dGluZ3MubGluZV90eXBlX21vZGVsCiAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgICAgLy8gZC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAvLyAgICAgdGl0bGU6ICfigJzigJzigJ3igJ0nICsgZ2V0Q29sb3JUZXh0KCfCtyDCtyDCtyDmn6XnnIvor4TorrogwrcgwrcgwrcnLCAnI2FkOGIyNScpLAogICAgICAgICAgICAgICAgICAgIC8vICAgICB1cmw6IE1ZX1VSTCArICcjY29tbWVudC1saXN0JywKICAgICAgICAgICAgICAgICAgICAvLyAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJwogICAgICAgICAgICAgICAgICAgIC8vIH0pOwogICAgICAgICAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBnZXRCaWdUZXh0KGdldFN0cm9uZ1RleHQoJ+ivhOiuuicpKSArICcgJyArIGdldFNtYWxsVGV4dChnZXRHcmV5VGV4dCgn5LiK5ouJ5Yqg6L296K+E6K66JykpLAogICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogY29sVHlwZQogICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBpZiAocGFnZSA9PT0gJzInKSB7CiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCByZXZpZXdDb21tZW50TGlzdC5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmV2aWV3Q29tbWVudEl0ZW0gPSByZXZpZXdDb21tZW50TGlzdFtpXTsKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGF2YXRhckltZyA9IHJldmlld0NvbW1lbnRJdGVtLmF1dGhvci5hdmF0YXI7CiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhdmF0YXJUaXRsZSA9IHJldmlld0NvbW1lbnRJdGVtLmF1dGhvci5uYW1lOwogICAgICAgICAgICAgICAgICAgICAgICBsZXQgYXZhdGFyVXJsID0gcmV2aWV3Q29tbWVudEl0ZW0uYXV0aG9yLnVybDsKICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBhdmF0YXJUaXRsZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpY191cmw6IGF2YXRhckltZywKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVybDogYXZhdGFyVXJsLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInCiAgICAgICAgICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICAgICAgICAgICAgICBsZXQgY29tbWVudENvbnRlbnQgPSByZXZpZXdDb21tZW50SXRlbS50ZXh0OwogICAgICAgICAgICAgICAgICAgICAgICAvLyBUT0RPIOivhOiuuuWbnuWkjemhtemdogogICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVwbGllc1J1bGUgPSAnQHJ1bGU9anM6ICcgKyBgZXZhbChmZXRjaChnZXRWYXIoJ2hpa2VyLXV0aWxzJykse30pKTtoaWtlclV0aWwubG9hZCgnaG9tZScpO2hpa2VyVXRpbC5kb3ViYW4uZHJhbWFSZXZpZXdSZXBseVZpZXcoYCArIHJldmlld0NvbW1lbnRJdGVtLmlkICsgYCk7YDsKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlcGxpZXNSdWxlVXJsID0gJ2Jhc2U2NDovLycgKyBiYXNlNjRFbmNvZGUoJ2hpa2VyOi8vZW1wdHknICsgJyNub0hpc3RvcnkjJyArIHJlcGxpZXNSdWxlKTsKICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlcGxpZXNIdG1sID0gZ2V0U21hbGxUZXh0KGdldEFkZHJlc3NUYWcocmVwbGllc1J1bGVVcmwsICdb5p+l55yL5Zue5aSNXScpKTsKICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBjb21tZW50Q29udGVudCArIChyZXZpZXdDb21tZW50SXRlbS5yZXBsaWVzLmxlbmd0aCA9PT0gMCA/ICcnIDogKCcgJyArIHJlcGxpZXNIdG1sKSksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogY29sVHlwZQogICAgICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZScKICAgICAgICAgICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgaWYgKHBhZ2UgPT09ICcxJykgewogICAgICAgICAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBzZXR0aW5ncy5saW5lX3R5cGVfbW9kZWwKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgICAgICAvLyBkLnB1c2goewogICAgICAgICAgICAgICAgICAgIC8vICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnScgKyBnZXRDb2xvclRleHQoJ8K3IMK3IMK3IOafpeeci+ivhOiuuiDCtyDCtyDCtycsICcjYWQ4YjI1JyksCiAgICAgICAgICAgICAgICAgICAgLy8gICAgIHVybDogTVlfVVJMICsgJyNjb21tZW50LWxpc3QnLAogICAgICAgICAgICAgICAgICAgIC8vICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnCiAgICAgICAgICAgICAgICAgICAgLy8gfSk7CiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldEJpZ1RleHQoZ2V0U3Ryb25nVGV4dCgn6K+E6K66JykpLAogICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogY29sVHlwZQogICAgICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGdldEdyZXlUZXh0KCfmmoLml6Dor4TorronKSwKICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IGNvbFR5cGUKICAgICAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0gY2F0Y2ggKGUpIHsgfQoKICAgICAgICByZXMuZGF0YSA9IGQ7CiAgICAgICAgc2V0SG9tZVJlc3VsdChyZXMpOwogICAgfSwKICAgIC8qKgogICAgICog55+t6K+E5YiX6KGo6KeE5YiZCiAgICAgKi8KICAgIGNvbW1lbnRMaXN0VmlldzogZnVuY3Rpb24gKCkgewogICAgICAgIHZhciByZXMgPSB7fTsKICAgICAgICB2YXIgZCA9IFtdOwogICAgICAgIHZhciBjb2xUeXBlID0gJ3JpY2hfdGV4dCc7CiAgICAgICAgbGV0IGxpc3RTb3J0ID0gZ2V0VmFyKCdkYl9jb21tZW50X3NvcnQnLCAnbmV3X3Njb3JlJyk7CiAgICAgICAgbGV0IGxpc3RTb3J0UGVyY2VudFR5cGUgPSBnZXRWYXIoJ2RiX2NvbW1lbnRfc29ydF9wZXJjZW50X3R5cGUnKTsKICAgICAgICB2YXIgbVVybCA9IE1ZX1VSTC5zcGxpdCgnIycpWzFdICsgJyZzb3J0PScgKyBsaXN0U29ydCArICcmcGVyY2VudF90eXBlPScgKyBsaXN0U29ydFBlcmNlbnRUeXBlOwogICAgICAgIHZhciBodG1sID0gZmV0Y2gobVVybCwgeyBoZWFkZXJzOiB7J1VzZXItQWdlbnQnOiBQQ19VQX19KTsKICAgICAgICAvc3RhcnQ9KFxkKykvLnRlc3QoTVlfVVJMKTsKICAgICAgICB2YXIgcGFnZSA9IFJlZ0V4cC4kMTsKCiAgICAgICAgdHJ5IHsKICAgICAgICAgICAgaWYgKHBhZ2UgPT09ICcwJykgewogICAgICAgICAgICAgICAgbGV0IGhlYWRlclRleHQgPSBwYXJzZURvbUZvckh0bWwoaHRtbCwgJyNjb250ZW50JiZoMSYmVGV4dCcpOwogICAgICAgICAgICAgICAgbGV0IGNvbW1lbnRzQ291bnRBcnJheSA9IHBhcnNlRG9tRm9yQXJyYXkoaHRtbCwgJy5Db21tZW50VGFicyYmbGknKTsKICAgICAgICAgICAgICAgIGxldCBjb21tZW50c0NvdW50ID0gJyc7CiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGNvbW1lbnRzQ291bnRBcnJheS5sZW5ndGg7IGkrKykgewogICAgICAgICAgICAgICAgICAgIGxldCBjb3VudFRleHQgPSBwYXJzZURvbUZvckh0bWwoY29tbWVudHNDb3VudEFycmF5W2ldLCAnVGV4dCcpOwogICAgICAgICAgICAgICAgICAgIGlmIChpIDwgY29tbWVudHNDb3VudEFycmF5Lmxlbmd0aCAtIDEpIHsKICAgICAgICAgICAgICAgICAgICAgICAgY291bnRUZXh0ID0gY291bnRUZXh0ICsgJyDii4UgJzsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgY29tbWVudHNDb3VudCArPSBjb3VudFRleHQ7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBsZXQgaGVhZGVySHRtbCA9IGdldEJpZ1RleHQoZ2V0U3Ryb25nVGV4dChoZWFkZXJUZXh0KSkKICAgICAgICAgICAgICAgICAgICArICc8YnI+JwogICAgICAgICAgICAgICAgICAgICsgZ2V0U21hbGxUZXh0KGdldEdyZXlUZXh0KGNvbW1lbnRzQ291bnQpKTsKCiAgICAgICAgICAgICAgICBsZXQgdG9wVGFiID0gKGxpc3RTb3J0ID09PSAnbmV3X3Njb3JlJyA/IGdldEF1dGhvclRleHQoJ+eDremXqCcpIDogZ2V0Q29kZVRhZyhnZXRBZGRyZXNzVGFnKCdiYXNlNjQ6Ly8nICsgYmFzZTY0RW5jb2RlKCdoaWtlcjovL2VtcHR5QGxhenlSdWxlPS5qczogcHV0VmFyMihcJ2RiX2NvbW1lbnRfc29ydFwnLCBcJ25ld19zY29yZVwnKTtyZWZyZXNoUGFnZSgpO1wndG9hc3Q6Ly/liIfmjaLliLDng63pl6hcJycpLCAn54Ot6ZeoJykpKQogICAgICAgICAgICAgICAgICAgICsgJyAnCiAgICAgICAgICAgICAgICAgICAgKyAobGlzdFNvcnQgPT09ICd0aW1lJyA/IGdldEF1dGhvclRleHQoJ+acgOaWsCcpIDogZ2V0Q29kZVRhZyhnZXRBZGRyZXNzVGFnKCdiYXNlNjQ6Ly8nICsgYmFzZTY0RW5jb2RlKCdoaWtlcjovL2VtcHR5QGxhenlSdWxlPS5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gICAgICAgICAgICAgaWYgKGkgPCBmaWx0ZXIubGVuZ3RoIC0gMSkgewogICAgICAgICAgICAgICAgICAgICAgICBwZXJjZW50VHlwZVRhYiArPSAnICc7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQoKICAgICAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGhlYWRlckh0bWwgKyAnPGJyPicgKyB0b3BUYWIgKyAocGVyY2VudFR5cGVUYWIgPT09ICcnID8gJycgOiAnPGJyPicgKyBwZXJjZW50VHlwZVRhYiksCiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IGNvbFR5cGUKICAgICAgICAgICAgICAgIH0pOwoKICAgICAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lX2JsYW5rJwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZScKICAgICAgICAgICAgICAgIH0pOwogICAgICAgICAgICB9CgogICAgICAgICAgICBsZXQgY29tbWVudHNIdG1sID0gcGFyc2VEb20oaHRtbCwgJ2JvZHkmJiNjb21tZW50cyYmSHRtbCcpOwogICAgICAgICAgICBjb21tZW50c0h0bWwgPSAnPGRpdj4nICsgY29tbWVudHNIdG1sICsgJzwvZGl2PicKICAgICAgICAgICAgbGV0IGNvbW1lbnRJdGVtTGlzdCA9IHBhcnNlRG9tRm9yQXJyYXkoY29tbWVudHNIdG1sLCAnZGl2JiZkaXZbY2xhc3NePWNvbW1lbnQtaXRlbV0nKTsKICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBjb21tZW50SXRlbUxpc3QubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIC8qZm9yKGxldCBqID0gMDsgaiA8IDc7IGorKykgewogICAgICAgICAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnYmxhbmtfYmxvY2snCiAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgIH0qLwogICAgICAgICAgICAgICAgbGV0IGNvbW1lbnRIdG1sSXRlbSA9IGNvbW1lbnRJdGVtTGlzdFtpXTsKICAgICAgICAgICAgICAgIHRoaXMuYWRkQ29tbWVudEl0ZW0oZCwgY29tbWVudEh0bWxJdGVtKTsKICAgICAgICAgICAgICAgIGlmIChpIDwgY29tbWVudEl0ZW1MaXN0Lmxlbmd0aCAtIDEpIHsKICAgICAgICAgICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnCiAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0gY2F0Y2ggKGUpIHsgfQoKICAgICAgICByZXMuZGF0YSA9IGQ7CiAgICAgICAgc2V0SG9tZVJlc3VsdChyZXMpOwogICAgfSwKICAgIC8qKgogICAgICog5Ymn6K+E5YiX6KGo6KeE5YiZCiAgICAgKi8KICAgIHJldmlld0xpc3RWaWV3OiBmdW5jdGlvbiAoKSB7CiAgICAgICAgdmFyIHJlcyA9IHt9OwogICAgICAgIHZhciBkID0gW107CiAgICAgICAgdmFyIGNvbFR5cGUgPSAncmljaF90ZXh0JzsKICAgICAgICBsZXQgbGlzdFNvcnQgPSBnZXRWYXIoJ2RiX3Jldmlld19zb3J0JywgJ2hvdGVzdCcpOwogICAgICAgIGxldCBsaXN0U29ydFJhdGluZyA9IGdldFZhcignZGJfcmV2aWV3X3NvcnRfcmF0aW5nJyk7CiAgICAgICAgdmFyIG1VcmwgPSBNWV9VUkwuc3BsaXQoJyMnKVsxXSArICcmc29ydD0nICsgbGlzdFNvcnQgKyAnJnJhdGluZz0nICsgbGlzdFNvcnRSYXRpbmc7CiAgICAgICAgdmFyIGh0bWw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2Jhc2U2NDovLycgKyBiYXNlNjRFbmNvZGUoJ2hpa2VyOi8vZW1wdHlAbGF6eVJ1bGU9LmpzOiBwdXRWYXIyKFwnZGJfcmV2aWV3X3NvcnRfcmF0aW5nXCcsIFwnMVwnKTtyZWZyZXNoUGFnZSgpO1wndG9hc3Q6Ly/liIfmjaLliLDnu5nkuIDmmJ/nmoTor4TorrpcJycpLCAn5LiA5pifJykpKTsKCiAgICAgICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgICAgIHRpdGxlOiBoZWFkZXJIdG1sICsgJzxicj4nICsgdG9wVGFiICsgJzxicj4nICsgcmF0aW5nVGFiLAogICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBjb2xUeXBlCiAgICAgICAgICAgICAgICB9KQoKICAgICAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lX2JsYW5rJwogICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdsaW5lJwogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGxldCByZXZpZXdMaXN0SHRtbCA9IHBhcnNlRG9tKGh0bWwsICcjY29udGVudCYmZGl2W2NsYXNzXj1yZXZpZXctbGlzdF0mJkh0bWwnKTsKICAgICAgICAgICAgcmV2aWV3TGlzdEh0bWwgPSAnPGRpdj4nICsgcmV2aWV3TGlzdEh0bWwgKyAnPC9kaXY+JwogICAgICAgICAgICBsZXQgcmV2aWV3SXRlbUxpc3QgPSBwYXJzZURvbUZvckFycmF5KHJldmlld0xpc3RIdG1sLCAnZGl2JiZkaXZbXmRhdGEtY2lkXScpOwogICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHJldmlld0l0ZW1MaXN0Lmxlbmd0aDsgaSsrKSB7CiAgICAgICAgICAgICAgICAvKmZvcihsZXQgaiA9IDA7IGogPCAxMDsgaisrKSB7CiAgICAgICAgICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdibGFua19ibG9jaycKICAgICAgICAgICAgICAgICAgICB9KQogICAgICAgICAgICAgICAgfSovCiAgICAgICAgICAgICAgICBsZXQgcmV2aWV3SHRtbEl0ZW0gPSByZXZpZXdJdGVtTGlzdFtpXTsKICAgICAgICAgICAgICAgIHRoaXMuYWRkUmV2aWV3SXRlbShkLCByZXZpZXdIdG1sSXRlbSk7CiAgICAgICAgICAgICAgICBpZiAoaSA8IHJldmlld0l0ZW1MaXN0Lmxlbmd0aCAtIDEpIHsKICAgICAgICAgICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ2xpbmUnCiAgICAgICAgICAgICAgICAgICAgfSkKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfQogICAgICAgIH0gY2F0Y2ggKGUpIHsgfQoKICAgICAgICByZXMuZGF0YSA9IGQ7CiAgICAgICAgc2V0SG9tZVJlc3VsdChyZXMpOwogICAgfSwKICAgIC8qKgogICAgICog6KeE5YiZ6K6+572u6aG16Z2iCiAgICAgKi8KICAgIHNldHRpbmdzVmlldzogZnVuY3Rpb24gKCkgewogICAgICAgIHZhciByZXMgPSB7fTsKICAgICAgICB2YXIgZCA9IFtdOwoKICAgICAgICBsZXQgc2V0dGluZ3NDYWNoZUZpbGUgPSBKU09OLnBhcnNlKGdldFZhcignZGJfc2V0dGluZ3MnKSkuc2V0dGluZ3NDYWNoZUZpbGU7CiAgICAgICAgbGV0IHNldHRpbmdzID0gSlNPTi5wYXJzZShmZXRjaChzZXR0aW5nc0NhY2hlRmlsZSwge30pKTsKCiAgICAgICAgbGV0IGNvbmZpZ0h0bWwgPSBgPGh0bWw+PGhlYWQ+PG1ldGEgbmFtZT0idmlld3BvcnQiIGNvbnRlbnQ9IndpZHRoPW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aW5nc0NhY2hlRmlsZSx7fSkpO2A7CiAgICAgICAgbGV0IGNvbmZpZ0xhenlFbmQgPSBgd3JpdGVTZXR0aW5nc1RvRmlsZShzZXR0aW5ncyk7cmVmcmVzaFBhZ2UoKTsidG9hc3Q6Ly/liIfmjaLmiJDlip8iYAoKICAgICAgICAvKioKICAgICAgICAgKiBtb2R1bGUgMC/luLjnlKggMS/op4bnlYzmkJznm7jlhbMgMi/osYbnk6Por4TliIbnm7jlhbMgLTEv5YW25LuW5oiW5LiN5bi455SoCiAgICAgICAgICogbW9kZSAtMS/pgJrnlKjmmL7npLogMC/pu5jorqTmqKHlvI8gMS/nroDmtIHmqKHlvI8KICAgICAgICAgKi8KICAgICAgICBsZXQgc2V0dGluZ3NNZXNzYWdlID0gewogICAgICAgICAgICBvcGVuU2ltcGxlRGV0YWlsVmlldzogewogICAgICAgICAgICAgICAgbW9kZTogLTEsCiAgICAgICAgICAgICAgICBtb2R1bGU6IDAsCiAgICAgICAgICAgICAgICB0aXRsZTogJ+eugOa0geaooeW8jycsCiAgICAgICAgICAgICAgICBkZXNjOiAn4oCc4oCc4oCd4oCdJyArIGdldENvbG9yVGV4dCgn5b2T5YmN54q25oCB77yaJyArIChzZXR0aW5ncy5vcGVuU2ltcGxlRGV0YWlsVmlldyA9PT0gMSA/ICflvIDlkK8nIDogJ+S4jeW8gOWQrycpLCAnI2ZmOGEwMCcpCiAgICAgICAgICAgICAgICAgICAgKyAnXG4nCiAgICAgICAgICAgICAgICAgICAgKyAn5Lmf6K645piv6auY57qn5qih5byP77yfJywKICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbmZpZ0xhenlTdGFydAogICAgICAgICAgICAgICAgICAgICAgICArIGBpZihzZXR0aW5ncy5vcGVuU2ltcGxlRGV0YWlsVmlldz09PTEpe3NldHRpbmdzLm9wZW5TaW1wbGVEZXRhaWxWaWV3PTB9ZWxzZXtzZXR0aW5ncy5vcGVuU2ltcGxlRGV0YWlsVmlldz0xfWAKICAgICAgICAgICAgICAgICAgICAgICAgKyBjb25maWdMYXp5RW5kCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIGpzRmlsZTogewogICAgICAgICAgICAgICAgbW9kZTogLTEsCiAgICAgICAgICAgICAgICBtb2R1bGU6IDAsCiAgICAgICAgICAgICAgICB0aXRsZTogJ+iHquWumuS5ieixhueTo+inhOWImeaPkuS7tuWcsOWdgCcsCiAgICAgICAgICAgICAgICBkZXNjOiAn4oCc4oCc4oCd4oCdJyArIGdldENvbG9yVGV4dCgn5b2T5YmN5Y+C5pWw77yaJyArIHNldHRpbmdzLmpzRmlsZSwgJyNmZjhhMDAnKSwKICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgbGV0IHJlcGxhY2VJdGVtID0gewogICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogc2V0dGluZ3NNZXNzYWdlLmpzRmlsZS50aXRsZSwKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5OiAnanNGaWxlJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5TmFtZTogJ2pzRmlsZScsCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wZXJ0eURlZmF1bHRWYWx1ZTogJyJoaWtlcjovL2ZpbGVzL3J1bGVzL2pzL3J0LWRvdWJhbi5qcyInLAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtUHJvcGVydHlWYWx1ZTogJ2pzRmlsZScsCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wZXJ0eVZhbHVlVGV4dDogc2V0dGluZ3MuanNGaWxlCiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVwbGFjZWRDb25maWdIdG1sKHJlcGxhY2VJdGVtKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgb3Blbkhpa2VyU2VhcmNoOiB7CiAgICAgICAgICAgICAgICBtb2RlOiAtMSwKICAgICAgICAgICAgICAgIG1vZHVsZTogMSwKICAgICAgICAgICAgICAgIHRpdGxlOiAn6KeG55WM5pCcJywKICAgICAgICAgICAgICAgIGRlc2M6ICfigJzigJzigJ3igJ0nICsgZ2V0Q29sb3JUZXh0KCflvZPliY3nirbmgIHvvJonICsgKHNldHRpbmdzLm9wZW5IaWtlclNlYXJjaCA9PT0gMSA/ICflvIDlkK8nIDogJ+S4jeW8gOWQrycpLCAnI2ZmOGEwMCcpCiAgICAgICAgICAgICAgICAgICAgKyAnXG4nCiAgICAgICAgICAgICAgICAgICAgKyAn5byA5ZCv5ZCO54K55Ye756ys5LiA6aG55Y2z5Y+v5L2/55So77yM6Iul5LiN5byA5ZCv5YiZ54K55Ye75Li65p+l55yL5b2x54mH5L+h5oGvJywKICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbmZpZ0xhenlTdGFydAogICAgICAgICAgICAgICAgICAgICAgICArIGBpZihzZXR0aW5ncy5vcGVuSGlrZXJTZWFyY2g9PT0xKXtzZXR0aW5ncy5vcGVuSGlrZXJTZWFyY2g9MH1lbHNle3NldHRpbmdzLm9wZW5IaWtlclNlYXJjaD0xfWAKICAgICAgICAgICAgICAgICAgICAgICAgKyBjb25maWdMYXp5RW5kCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIC8qKgogICAgICAgICAgICAgKiDmkJzntKLmqKHlvI8KICAgICAgICAgICAgICoKICAgICAgICAgICAgICogMDogImhpa2VyOi8vc2VhcmNoP3M95rWL6K+V77yM5bCG5Lya5omT5byA5pCc57Si5by556qX77yM6Ieq5Yqo5aGr5YWF5pCc57Si55qE5YWz6ZSu6K+N4oCc5rWL6K+V4oCd77yM55Sx55So5oi36Ieq5bex6YCJ5oup5YiG57uE5ZKM6KeE5YiZ5ZCO5pCc57SiIiwKICAgICAgICAgICAgICogMTogImhpa2VyOi8vc2VhcmNoP3M95rWL6K+VJmdyb3VwPeKRoeW9seaQnO+8jOWwhuS8muaJk+W8gOaQnOe0ouW8ueeql++8jOiHquWKqOWhq+WFheaQnOe0oueahOWFs+mUruivjeKAnOa1i+ivleKAneW5tuS4lOiHquWKqOWIh+aNouWIhue7hOS4uuKAnOKRoeW9seaQnOKAne+8jOeUqOaIt+WPr+WIh+aNouWIhue7hOWSjOinhOWImSIsCiAgICAgICAgICAgICAqIDI6ICJoaWtlcjovL3NlYXJjaD9zPea1i+ivlSZydWxlPea1t+mYlOinhueVjO+8jOWwhuS8muebtOaOpei3s+i9rOaQnOe0oue7k+aenOeVjOmdou+8jOiHquWKqOmAieaLqeagh+mimOS4uuKAnOa1t+mYlOinhueVjOKAneeahOinhOWImei/m+ihjOaQnOe0ou+8jOW5tuS4lOivpeeVjOmdouS4jeWPr+WIh+aNouWIq+eahOinhOWImSIsCiAgICAgICAgICAgICAqIDM6ICJoaWtlcjovL3NlYXJjaD9zPea1i+ivlSZydWxlPea1t+mYlOinhueVjCZzaW1wbGU9ZmFsc2XvvIzlsIbkvJroh6rliqjloavlhYXmkJzntKLnmoTlhbPplK7or43igJzmtYvor5XigJ3vvIzlubbkuJToh6rliqjliIfmjaLliIbnu4TkuLrigJzikaDmjqjojZDigJ3jgIHoh6rliqjpgInkuK3moIfpopjkuLrigJzmtbfpmJTop4bnlYzigJ3nmoTop4TliJnvvIznlKjmiLflj6/liIfmjaLliIbnu4Tlkozop4TliJnvvIzlubboh6rliqjlvIDlp4vmkJzntKIiCiAgICAgICAgICAgICAqLwogICAgICAgICAgICBzZWFyY2hNb2RlOiB7CiAgICAgICAgICAgICAgICBtb2RlOiAtMSwKICAgICAgICAgICAgICAgIG1vZHVsZTogMSwKICAgICAgICAgICAgICAgIHRpdGxlOiAn5pCc57Si5qih5byPJywKICAgICAgICAgICAgICAgIGRlc2M6ICfigJzigJzigJ3igJ0nICsgZ2V0Q29sb3JUZXh0KCflvZPliY3lj4LmlbDvvJonICsgc2V0dGluZ3Muc2VhcmNoTW9kZSwgJyNmZjhhMDAnKQogICAgICAgICAgICAgICAgICAgICsgJ1xuJwogICAgICAgICAgICAgICAgICAgICsgJ+WFseaciSAwLzEvMi8zIOWbm+enjeaooeW8j++8jOivpemFjee9ruaPj+i/sOatpOWkhOaYvuekuuS4jeWFqO+8jOivt+WJjeW+gOmihOWkhOeQhuafpeeciyLmkJzntKLmqKHlvI8i55qE5rOo6YeKJywKICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbmZpZ0xhenlTdGFydAogICAgICAgICAgICAgICAgICAgICAgICArIGBpZihzZXR0aW5ncy5zZWFyY2hNb2RlPT09Myl7c2V0dGluZ3Muc2VhcmNoTW9kZT0wfWVsc2V7c2V0dGluZ3Muc2VhcmNoTW9kZSsrfWAKICAgICAgICAgICAgICAgICAgICAgICAgKyBjb25maWdMYXp5RW5kCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIC8vIOaQnOe0ouWIhue7hAogICAgICAgICAgICBzZWFyY2hHcm91cDogewogICAgICAgICAgICAgICAgbW9kZTogLTEsCiAgICAgICAgICAgICAgICBtb2R1bGU6IDEsCiAgICAgICAgICAgICAgICB0aXRsZTogJ+aQnOe0ouWIhue7hCcsCiAgICAgICAgICAgICAgICBkZXNjOiAn4oCc4oCc4oCd4oCdJyArIGdldENvbG9yVGV4dCgn5b2T5YmN5Y+C5pWw77yaJyArIHNldHRpbmdzLnNlYXJjaEdyb3VwLCAnI2ZmOGEwMCcpLAogICAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgcmVwbGFjZUl0ZW0gPSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBzZXR0aW5nc01lc3NhZ2Uuc2VhcmNoR3JvdXAudGl0bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wZXJ0eTogJ3NlYXJjaEdyb3VwJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5TmFtZTogJ3NlYXJjaEdyb3VwJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5RGVmYXVsdFZhbHVlOiAnIiInLAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtUHJvcGVydHlWYWx1ZTogJ3NlYXJjaEdyb3VwJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5VmFsdWVUZXh0OiBzZXR0aW5ncy5zZWFyY2hHcm91cAogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlcGxhY2VkQ29uZmlnSHRtbChyZXBsYWNlSXRlbSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIC8vIOaQnOe0ouinhOWImQogICAgICAgICAgICBzZWFyY2hSdWxlOiB7CiAgICAgICAgICAgICAgICBtb2RlOiAtMSwKICAgICAgICAgICAgICAgIG1vZHVsZTogMSwKICAgICAgICAgICAgICAgIHRpdGxlOiAn5pCc57Si5byV5pOO55qE6KeE5YiZ5ZCNJywKICAgICAgICAgICAgICAgIGRlc2M6ICfigJzigJzigJ3igJ0nICsgZ2V0Q29sb3JUZXh0KCflvZPliY3lj4LmlbDvvJonICsgc2V0dGluZ3Muc2VhcmNoUnVsZSwgJyNmZjhhMDAnKSwKICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgbGV0IHJlcGxhY2VJdGVtID0gewogICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogc2V0dGluZ3NNZXNzYWdlLnNlYXJjaFJ1bGUudGl0bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wZXJ0eTogJ3NlYXJjaFJ1bGUnLAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtUHJvcGVydHlOYW1lOiAnc2VhcmNoUnVsZScsCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wZXJ0eURlZmF1bHRWYWx1ZTogJyIiJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5VmFsdWU6ICdzZWFyY2hSdWxlJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5VmFsdWVUZXh0OiBzZXR0aW5ncy5zZWFyY2hSdWxlCiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVwbGFjZWRDb25maWdIdG1sKHJlcGxhY2VJdGVtKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgcmF0aW5nVHlwZTogewogICAgICAgICAgICAgICAgbW9kZTogMCwKICAgICAgICAgICAgICAgIG1vZHVsZTogMiwKICAgICAgICAgICAgICAgIHRpdGxlOiAn55+t6K+EL+WJp+ivhOivhOWIhuaYvuekuuexu+WeiycsCiAgICAgICAgICAgICAgICBkZXNjOiAn4oCc4oCc4oCd4oCdJyArIGdldENvbG9yVGV4dCgn5b2T5YmN54q25oCB77yaJyArIChzZXR0aW5ncy5yYXRpbmdUeXBlID09PSAxID8gJ+aWh+WtlycgOiAn5pif5pifJyksICcjZmY4YTAwJykKICAgICAgICAgICAgICAgICAgICArICdcbicKICAgICAgICAgICAgICAgICAgICArICfmmJ/mmJ/imIXimIYv5paH5a2XJywKICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbmZpZ0xhenlTdGFydAogICAgICAgICAgICAgICAgICAgICAgICArIGBpZihzZXR0aW5ncy5yYXRpbmdUeXBlPT09MSl7c2V0dGluZ3MucmF0aW5nVHlwZT0wfWVsc2V7c2V0dGluZ3MucmF0aW5nVHlwZT0xfWAKICAgICAgICAgICAgICAgICAgICAgICAgKyBjb25maWdMYXp5RW5kCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIC8vIOixhueTo+ivhOWIhuaWh+acrOaYvuekuuaooeW8j++8jDAv57qv5paH5pysIDEv6L+b5bqm5p2hCiAgICAgICAgICAgIHJhdGluZ1RleHRNb2RlOiB7CiAgICAgICAgICAgICAgICBtb2RlOiAwLAogICAgICAgICAgICAgICAgbW9kdWxlOiAyLAogICAgICAgICAgICAgICAgdGl0bGU6ICfosYbnk6Por4TliIbmlofmnKzmmL7npLrmqKHlvI8nLAogICAgICAgICAgICAgICAgZGVzYzogJ+KAnOKAnOKAneKAnScgKyBnZXRDb2xvclRleHQoJ+W9k+WJjeeKtuaAge+8micgKyAoc2V0dGluZ3MucmF0aW5nVGV4dE1vZGUgPT09IDAgPyAnMC/nuq/mlofmnKwnIDogJzEv6L+b5bqm5p2hJyksICcjZmY4YTAwJykKICAgICAgICAgICAgICAgICAgICArICdcbicKICAgICAgICAgICAgICAgICAgICArICcwL+e6r+aWh+acrCAxL+i/m+W6puadoScsCiAgICAgICAgICAgICAgICBjbGljazogZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBjb25maWdMYXp5U3RhcnQKICAgICAgICAgICAgICAgICAgICAgICAgKyBgaWYoc2V0dGluZ3MucmF0aW5nVGV4dE1vZGU9PT0wKXtzZXR0aW5ncy5yYXRpbmdUZXh0TW9kZT0xfWVsc2V7c2V0dGluZ3MucmF0aW5nVGV4dE1vZGU9MH1gCiAgICAgICAgICAgICAgICAgICAgICAgICsgY29uZmlnTGF6eUVuZAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9LAogICAgICAgICAgICBibG9ja1N1bTogewogICAgICAgICAgICAgICAgbW9kZTogMCwKICAgICAgICAgICAgICAgIG1vZHVsZTogMiwKICAgICAgICAgICAgICAgIHRpdGxlOiAn6LGG55Oj6K+E5YiG6L+b5bqm5p2h5qC85a2Q5oC75pWwJywKICAgICAgICAgICAgICAgIGRlc2M6ICfigJzigJzigJ3igJ0nICsgZ2V0Q29sb3JUZXh0KCflvZPliY3lj4LmlbDvvJonICsgKHNldHRpbmdzLmJsb2NrU3VtID09PSB1bmRlZmluZWQgPyAxMCA6IHNldHRpbmdzLmJsb2NrU3VtKSwgJyNmZjhhMDAnKSwKICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgbGV0IHJlcGxhY2VJdGVtID0gewogICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogc2V0dGluZ3NNZXNzYWdlLmJsb2NrU3VtLnRpdGxlLAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtUHJvcGVydHk6ICdibG9ja1N1bScsCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wZXJ0eU5hbWU6ICdibG9ja1N1bScsCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wZXJ0eURlZmF1bHRWYWx1ZTogJzEwJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5VmFsdWU6ICdwYXJzZUZsb2F0KGJsb2NrU3VtKScsCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wZXJ0eVZhbHVlVGV4dDogc2V0dGluZ3MuYmxvY2tTdW0gPT09IHVuZGVmaW5lZCA/IDEwIDogc2V0dGluZ3MuYmxvY2tTdW0KICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgIC8vIHNldEVycm9yIChKU09OLnN0cmluZ2lmeShyZXBsYWNlSXRlbSkpCiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlcGxhY2VkQ29uZmlnSHRtbChyZXBsYWNlSXRlbSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHBlcl9ibG9ja19tYXBwaW5nOiB7CiAgICAgICAgICAgICAgICBtb2RlOiAwLAogICAgICAgICAgICAgICAgbW9kdWxlOiAyLAogICAgICAgICAgICAgICAgdGl0bGU6ICfosYbnk6Por4TliIbov5vluqbmnaHmr4/moLzku6PooajnmoTnmb7liIbmr5QnLAogICAgICAgICAgICAgICAgZGVzYzogJ+KAnOKAnOKAneKAnScgKyBnZXRDb2xvclRleHQoJ+W9k+WJjeWPguaVsO+8micgKyAoc2V0dGluZ3MucGVyX2Jsb2NrX21hcHBpbmcgPT09IHVuZGVmaW5lZCA/IDEwIDogc2V0dGluZ3MucGVyX2Jsb2NrX21hcHBpbmcpLCAnI2ZmOGEwMCcpLAogICAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgcmVwbGFjZUl0ZW0gPSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBzZXR0aW5nc01lc3NhZ2UucGVyX2Jsb2NrX21hcHBpbmcudGl0bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wZXJ0eTogJ3Blcl9ibG9ja19tYXBwaW5nJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5TmFtZTogJ3Blcl9ibG9ja19tYXBwaW5nJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5RGVmYXVsdFZhbHVlOiAnMTAnLAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtUHJvcGVydHlWYWx1ZTogJ3BhcnNlRmxvYXQocGVyX2Jsb2NrX21hcHBpbmcpJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5VmFsdWVUZXh0OiBzZXR0aW5ncy5wZXJfYmxvY2tfbWFwcGluZyA9PT0gdW5kZWZpbmVkID8gMTAgOiBzZXR0aW5ncy5wZXJfYmxvY2tfbWFwcGluZwogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlcGxhY2VkQ29uZmlnSHRtbChyZXBsYWNlSXRlbSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHByb2dyZXNzQmxvY2tUZXh0OiB7CiAgICAgICAgICAgICAgICBtb2RlOiAwLAogICAgICAgICAgICAgICAgbW9kdWxlOiAyLAogICAgICAgICAgICAgICAgdGl0bGU6ICfosYbnk6Por4TliIbov5vluqbmnaHov5vluqbmoLzlrZDmlofmnKwnLAogICAgICAgICAgICAgICAgZGVzYzogJ+KAnOKAnOKAneKAnScgKyBnZXRDb2xvclRleHQoJ+W9k+WJjeWPguaVsO+8micgKyAoc2V0dGluZ3MucHJvZ3Jlc3NCbG9ja1RleHQgPT09IHVuZGVmaW5lZCA/ICfilpMnIDogc2V0dGluZ3MucHJvZ3Jlc3NCbG9ja1RleHQpLCAnI2ZmOGEwMCcpLAogICAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgcmVwbGFjZUl0ZW0gPSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBzZXR0aW5nc01lc3NhZ2UucHJvZ3Jlc3NCbG9ja1RleHQudGl0bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wZXJ0eTogJ3Byb2dyZXNzQmxvY2tUZXh0JywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5TmFtZTogJ3Byb2dyZXNzQmxvY2tUZXh0JywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5RGVmYXVsdFZhbHVlOiAnIuKWkyInLAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtUHJvcGVydHlWYWx1ZTogJ3Byb2dyZXNzQmxvY2tUZXh0JywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5VmFsdWVUZXh0OiBzZXR0aW5ncy5wcm9ncmVzc0Jsb2NrVGV4dCA9PT0gdW5kZWZpbmVkID8gJ+KWkycgOiBzZXR0aW5ncy5wcm9ncmVzc0Jsb2NrVGV4dAogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlcGxhY2VkQ29uZmlnSHRtbChyZXBsYWNlSXRlbSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIGJsYW5rQmxvY2tUZXh0OiB7CiAgICAgICAgICAgICAgICBtb2RlOiAwLAogICAgICAgICAgICAgICAgbW9kdWxlOiAyLAogICAgICAgICAgICAgICAgdGl0bGU6ICfosYbnk6Por4TliIbov5vluqbmnaHnqbrnmb3moLzlrZDmlofmnKwnLAogICAgICAgICAgICAgICAgZGVzYzogJ+KAnOKAnOKAneKAnScgKyBnZXRDb2xvclRleHQoJ+W9k+WJjeWPguaVsO+8micgKyAoc2V0dGluZ3MuYmxhbmtCbG9ja1RleHQgPT09IHVuZGVmaW5lZCA/ICfilpEnIDogc2V0dGluZ3MuYmxhbmtCbG9ja1RleHQpLCAnI2ZmOGEwMCcpLAogICAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgcmVwbGFjZUl0ZW0gPSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBzZXR0aW5nc01lc3NhZ2UuYmxhbmtCbG9ja1RleHQudGl0bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wZXJ0eTogJ2JsYW5rQmxvY2tUZXh0JywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5TmFtZTogJ2JsYW5rQmxvY2tUZXh0JywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5RGVmYXVsdFZhbHVlOiAnIuKWkSInLAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtUHJvcGVydHlWYWx1ZTogJ2JsYW5rQmxvY2tUZXh0JywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5VmFsdWVUZXh0OiBzZXR0aW5ncy5ibGFua0Jsb2NrVGV4dCA9PT0gdW5kZWZpbmVkID8gJ+KWkScgOiBzZXR0aW5ncy5ibGFua0Jsb2NrVGV4dAogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlcGxhY2VkQ29uZmlnSHRtbChyZXBsYWNlSXRlbSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIGJsYW5rQmxvY2tUZXh0Q29sb3I6IHsKICAgICAgICAgICAgICAgIG1vZGU6IDAsCiAgICAgICAgICAgICAgICBtb2R1bGU6IDIsCiAgICAgICAgICAgICAgICB0aXRsZTogJ+ixhueTo+ivhOWIhui/m+W6puadoeepuueZveagvOWtkOaWh+acrOminOiJsicsCiAgICAgICAgICAgICAgICBkZXNjOiAn4oCc4oCc4oCd4oCdJyArIGdldENvbG9yVGV4dCgn5b2T5YmN5Y+C5pWw77yaJywgJyNmZjhhMDAnKSArIChzZXR0aW5ncy5ibGFua0Jsb2NrVGV4dENvbG9yID09PSB1bmRlZmluZWQgPyBnZXRDb2xvclRleHQoJ+i3n+maj+i/m+W6puagvOWtkOWKqOaAgeminOiJsu+8jOaXoOazleaYvuekuicsICcjZmY4YTAwJykgOiBnZXRDb2xvclRleHQoc2V0dGluZ3MuYmxhbmtCbG9ja1RleHRDb2xvciwgc2V0dGluZ3MuYmxhbmtCbG9ja1RleHRDb2xvcikpLAogICAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgcmVwbGFjZUl0ZW0gPSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBzZXR0aW5nc01lc3NhZ2UuYmxhbmtCbG9ja1RleHRDb2xvci50aXRsZSwKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5OiAnYmxhbmtCbG9ja1RleHRDb2xvcicsCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wZXJ0eU5hbWU6ICdibGFua0Jsb2NrVGV4dENvbG9yJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5RGVmYXVsdFZhbHVlOiAndW5kZWZpbmVkJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5VmFsdWU6ICdibGFua0Jsb2NrVGV4dENvbG9yJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5VmFsdWVUZXh0OiAoc2V0dGluZ3MuYmxhbmtCbG9ja1RleHRDb2xvciA9PT0gdW5kZWZpbmVkID8gJ+i3n+maj+i/m+W6puagvOWtkOWKqOaAgeminOiJsu+8jOaXoOazleaYvuekuicgOiBzZXR0aW5ncy5ibGFua0Jsb2NrVGV4dENvbG9yKQogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlcGxhY2VkQ29uZmlnSHRtbChyZXBsYWNlSXRlbSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIGFkZEhlYWRlck1vZHVsZTp7CiAgICAgICAgICAgICAgICBtb2RlOiAwLAogICAgICAgICAgICAgICAgbW9kdWxlOiAzLAogICAgICAgICAgICAgICAgdGl0bGU6ICfniYfljZXnroDku4vmqKHlnZfmjIHnu63lvIDlkK8nLAogICAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHlAbGF6eVJ1bGU9LmpzOicgKyBgInRvYXN0Oi8v6K+l5qih5Z2X5LiN5YWB6K645YiH5o2i54q25oCBIjtgCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIGFkZFJhdGluZ01vZHVsZTp7CiAgICAgICAgICAgICAgICBtb2RlOiAwLAogICAgICAgICAgICAgICAgbW9kdWxlOiAzLAogICAgICAgICAgICAgICAgdGl0bGU6ICfosYbnk6Por4TliIbmqKHlnZcnICsgKHNldHRpbmdzLmFkZFJhdGluZ01vZHVsZSA9PT0gMCA/ICflt7LlhbPpl60nIDogJ+W3suW8gOWQrycpLAogICAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gY29uZmlnTGF6eVN0YXJ0CiAgICAgICAgICAgICAgICAgICAgICAgICsgYGlmKHNldHRpbmdzLmFkZFJhdGluZ01vZHVsZT09PTApe3NldHRpbmdzLmFkZFJhdGluZ01vZHVsZT0xfWVsc2V7c2V0dGluZ3MuYWRkUmF0aW5nTW9kdWxlPTB9YAogICAgICAgICAgICAgICAgICAgICAgICArIGNvbmZpZ0xhenlFbmQKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgYWRkSW50cm9Nb2R1bGU6ewogICAgICAgICAgICAgICAgbW9kZTogMCwKICAgICAgICAgICAgICAgIG1vZHVsZTogMywKICAgICAgICAgICAgICAgIHRpdGxlOiAn5Ymn5oOF566A5LuL5qih5Z2XJyArIChzZXR0aW5ncy5hZGRJbnRyb01vZHVsZSA9PT0gMCA/ICflt7LlhbPpl60nIDogJ+W3suW8gOWQrycpLAogICAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gY29uZmlnTGF6eVN0YXJ0CiAgICAgICAgICAgICAgICAgICAgICAgICsgYGlmKHNldHRpbmdzLmFkZEludHJvTW9kdWxlPT09MCl7c2V0dGluZ3MuYWRkSW50cm9Nb2R1bGU9MX1lbHNle3NldHRpbmdzLmFkZEludHJvTW9kdWxlPTB9YAogICAgICAgICAgICAgICAgICAgICAgICArIGNvbmZpZ0xhenlFbmQKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgYWRkVHJhaWxlclBob3RvTW9kdWxlOnsKICAgICAgICAgICAgICAgIG1vZGU6IDAsCiAgICAgICAgICAgICAgICBtb2R1bGU6IDMsCiAgICAgICAgICAgICAgICB0aXRsZTogJ+mihOWRiueJhy/liafnhafmqKHlnZcnICsgKHNldHRpbmdzLmFkZFRyYWlsZXJQaG90b01vZHVsZSA9PT0gMCA/ICflt7LlhbPpl60nIDogJ+W3suW8gOWQrycpLAogICAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gY29uZmlnTGF6eVN0YXJ0CiAgICAgICAgICAgICAgICAgICAgICAgICsgYGlmKHNldHRpbmdzLmFkZFRyYWlsZXJQaG90b01vZHVsZT09PTApe3NldHRpbmdzLmFkZFRyYWlsZXJQaG90b01vZHVsZT0xfWVsc2V7c2V0dGluZ3MuYWRkVHJhaWxlclBob3RvTW9kdWxlPTB9YAogICAgICAgICAgICAgICAgICAgICAgICArIGNvbmZpZ0xhenlFbmQKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgYWRkQ29tbWVudHNNb2R1bGU6ewogICAgICAgICAgICAgICAgbW9kZTogMCwKICAgICAgICAgICAgICAgIG1vZHVsZTogMywKICAgICAgICAgICAgICAgIHRpdGxlOiAn55+t6K+E5qih5Z2XJyArIChzZXR0aW5ncy5hZGRDb21tZW50c01vZHVsZSA9PT0gMCA/ICflt7LlhbPpl60nIDogJ+W3suW8gOWQrycpLAogICAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gY29uZmlnTGF6eVN0YXJ0CiAgICAgICAgICAgICAgICAgICAgICAgICsgYGlmKHNldHRpbmdzLmFkZENvbW1lbnRzTW9kdWxlPT09MCl7c2V0dGluZ3MuYWRkQ29tbWVudHNNb2R1bGU9MX1lbHNle3NldHRpbmdzLmFkZENvbW1lbnRzTW9kdWxlPTB9YAogICAgICAgICAgICAgICAgICAgICAgICArIGNvbmZpZ0xhenlFbmQKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgYWRkUmV2aWV3c01vZHVsZTp7CiAgICAgICAgICAgICAgICBtb2RlOiAwLAogICAgICAgICAgICAgICAgbW9kdWxlOiAzLAogICAgICAgICAgICAgICAgdGl0bGU6ICfliafor4TmqKHlnZcnICsgKHNldHRpbmdzLmFkZFJldmlld3NNb2R1bGUgPT09IDAgPyAn5bey5YWz6ZetJyA6ICflt7LlvIDlkK8nKSwKICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbmZpZ0xhenlTdGFydAogICAgICAgICAgICAgICAgICAgICAgICArIGBpZihzZXR0aW5ncy5hZGRSZXZpZXdzTW9kdWxlPT09MCl7c2V0dGluZ3MuYWRkUmV2aWV3c01vZHVsZT0xfWVsc2V7c2V0dGluZ3MuYWRkUmV2aWV3c01vZHVsZT0wfWAKICAgICAgICAgICAgICAgICAgICAgICAgKyBjb25maWdMYXp5RW5kCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIHNob3dTb3VyY2U6IHsKICAgICAgICAgICAgICAgIG1vZGU6IDAsCiAgICAgICAgICAgICAgICBtb2R1bGU6IC0xLAogICAgICAgICAgICAgICAgdGl0bGU6ICfmmL7npLpcJ1vmn6XnnIvljp/mloddXCcnLAogICAgICAgICAgICAgICAgZGVzYzogJ+KAnOKAnOKAneKAnScgKyBnZXRDb2xvclRleHQoJ+W9k+WJjeeKtuaAge+8micgKyAoc2V0dGluZ3Muc2hvd1NvdXJjZSA9PT0gMSA/ICfmmL7npLonIDogJ+S4jeaYvuekuicpLCAnI2ZmOGEwMCcpLAogICAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gY29uZmlnTGF6eVN0YXJ0CiAgICAgICAgICAgICAgICAgICAgICAgICsgYGlmKHNldHRpbmdzLnNob3dTb3VyY2U9PT0xKXtzZXR0aW5ncy5zaG93U291cmNlPTB9ZWxzZXtzZXR0aW5ncy5zaG93U291cmNlPTF9YAogICAgICAgICAgICAgICAgICAgICAgICArIGNvbmZpZ0xhenlFbmQKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgc2hvd0FsbENvbnRlbnQ6IHsKICAgICAgICAgICAgICAgIG1vZGU6IDAsCiAgICAgICAgICAgICAgICBtb2R1bGU6IC0xLAogICAgICAgICAgICAgICAgdGl0bGU6ICfmmL7npLpcJ1vmn6XnnIvlhajmloddXCcnLAogICAgICAgICAgICAgICAgZGVzYzogJ+KAnOKAnOKAneKAnScgKyBnZXRDb2xvclRleHQoJ+W9k+WJjeeKtuaAge+8micgKyAoc2V0dGluZ3Muc2hvd0FsbENvbnRlbnQgPT09IDEgPyAn5pi+56S6JyA6ICfkuI3mmL7npLonKSwgJyNmZjhhMDAnKSwKICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbmZpZ0xhenlTdGFydAogICAgICAgICAgICAgICAgICAgICAgICArIGBpZihzZXR0aW5ncy5zaG93QWxsQ29udGVudD09PTEpe3NldHRpbmdzLnNob3dBbGxDb250ZW50PTB9ZWxzZXtzZXR0aW5ncy5zaG93QWxsQ29udGVudD0xfWAKICAgICAgICAgICAgICAgICAgICAgICAgKyBjb25maWdMYXp5RW5kCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIGRlc2NMaW5lTWF4TGVuOiB7CiAgICAgICAgICAgICAgICBtb2RlOiAwLAogICAgICAgICAgICAgICAgbW9kdWxlOiAtMSwKICAgICAgICAgICAgICAgIHRpdGxlOiAnSGVhZGVyIOaPj+i/sOeahOS4ieihjOS4reavj+ihjOeahOacgOWkp+mVv+W6picsCiAgICAgICAgICAgICAgICBkZXNjOiAn4oCc4oCc4oCd4oCdJyArIGdldENvbG9yVGV4dCgn5b2T5YmN5Y+C5pWw77yaJyArIHNldHRpbmdzLmRlc2NMaW5lTWF4TGVuLCAnI2ZmOGEwMCcpLAogICAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgcmVwbGFjZUl0ZW0gPSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBzZXR0aW5nc01lc3NhZ2UuZGVzY0xpbmVNYXhMZW4udGl0bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wZXJ0eTogJ2Rlc2NMaW5lTWF4TGVuJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5TmFtZTogJ2Rlc2NMaW5lTWF4TGVuJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5RGVmYXVsdFZhbHVlOiAnMjUnLAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtUHJvcGVydHlWYWx1ZTogJ3BhcnNlSW50KGRlc2NMaW5lTWF4TGVuKScsCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wZXJ0eVZhbHVlVGV4dDogc2V0dGluZ3MuZGVzY0xpbmVNYXhMZW4KICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgIHJldHVybiByZXBsYWNlZENvbmZpZ0h0bWwocmVwbGFjZUl0ZW0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9LAogICAgICAgICAgICB1c2VyQ29sb3I6IHsKICAgICAgICAgICAgICAgIG1vZGU6IDAsCiAgICAgICAgICAgICAgICBtb2R1bGU6IC0xLAogICAgICAgICAgICAgICAgdGl0bGU6ICfor4TorrrnlKjmiLfpopzoibInLAogICAgICAgICAgICAgICAgZGVzYzogJ+KAnOKAnOKAneKAnScgKyBnZXRDb2xvclRleHQoJ+W9k+WJjeWPguaVsO+8micsICcjZmY4YTAwJykgKyBnZXRDb2xvclRleHQoc2V0dGluZ3MudXNlckNvbG9yLCBzZXR0aW5ncy51c2VyQ29sb3IpLAogICAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgcmVwbGFjZUl0ZW0gPSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBzZXR0aW5nc01lc3NhZ2UudXNlckNvbG9yLnRpdGxlLAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtUHJvcGVydHk6ICd1c2VyQ29sb3InLAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtUHJvcGVydHlOYW1lOiAndXNlckNvbG9yJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5RGVmYXVsdFZhbHVlOiAnIiMyOTc5RkYiJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5VmFsdWU6ICd1c2VyQ29sb3InLAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtUHJvcGVydHlWYWx1ZVRleHQ6IHNldHRpbmdzLnVzZXJDb2xvcgogICAgICAgICAgICAgICAgICAgIH07CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlcGxhY2VkQ29uZmlnSHRtbChyZXBsYWNlSXRlbSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCiAgICAgICAgICAgIC8vIOaooeWdl+eahOmXtOi3nQogICAgICAgICAgICBsaW5lX21vZGVsOiB7CiAgICAgICAgICAgICAgICBtb2RlOiAwLAogICAgICAgICAgICAgICAgbW9kdWxlOiAtMSwKICAgICAgICAgICAgICAgIHRpdGxlOiAn5qih5Z2X55qE6Ze06LedJywKICAgICAgICAgICAgICAgIGRlc2M6ICfigJzigJzigJ3igJ0nICsgZ2V0Q29sb3JUZXh0KCflvZPliY3lj4LmlbDvvJonICsgc2V0dGluZ3MubGluZV9tb2RlbCwgJyNmZjhhMDAnKSwKICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgbGV0IHJlcGxhY2VJdGVtID0gewogICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogc2V0dGluZ3NNZXNzYWdlLmxpbmVfbW9kZWwudGl0bGUsCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wZXJ0eTogJ2xpbmVfbW9kZWwnLAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtUHJvcGVydHlOYW1lOiAnbGluZV9tb2RlbCcsCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wZXJ0eURlZmF1bHRWYWx1ZTogJzEnLAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtUHJvcGVydHlWYWx1ZTogJ3BhcnNlSW50KGxpbmVfbW9kZWwpJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5VmFsdWVUZXh0OiBzZXR0aW5ncy5saW5lX21vZGVsCiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVwbGFjZWRDb25maWdIdG1sKHJlcGxhY2VJdGVtKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKICAgICAgICAgICAgLy8g5qih5Z2X6Ze06Led57G75Z6L77yI6YCC6YWN5Lul5ZCO5Y+v6IO95Lya5pyJ55qE5peg6L656Led57q/77yJCiAgICAgICAgICAgIGxpbmVfdHlwZV9tb2RlbDogewogICAgICAgICAgICAgICAgbW9kZTogMCwKICAgICAgICAgICAgICAgIG1vZHVsZTogLTEsCiAgICAgICAgICAgICAgICB0aXRsZTogJ+aooeWdl+mXtOi3neexu+WeiycsCiAgICAgICAgICAgICAgICBkZXNjOiAn4oCc4oCc4oCd4oCdJyArIGdldENvbG9yVGV4dCgn5b2T5YmN5Y+C5pWw77yaJyArIHNldHRpbmdzLmxpbmVfdHlwZV9tb2RlbCwgJyNmZjhhMDAnKSwKICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgbGV0IHJlcGxhY2VJdGVtID0gewogICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogc2V0dGluZ3NNZXNzYWdlLmxpbmVfdHlwZV9tb2RlbC50aXRsZSwKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5OiAnbGluZV90eXBlX21vZGVsJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5TmFtZTogJ2xpbmVfdHlwZV9tb2RlbCcsCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wZXJ0eURlZmF1bHRWYWx1ZTogJyJsaW5lX2JsYW5rIicsCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wZXJ0eVZhbHVlOiAnbGluZV90eXBlX21vZGVsJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5VmFsdWVUZXh0OiBzZXR0aW5ncy5saW5lX3R5cGVfbW9kZWwKICAgICAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgICAgIHJldHVybiByZXBsYWNlZENvbmZpZ0h0bWwocmVwbGFjZUl0ZW0pOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9LAogICAgICAgICAgICBNb3JlX2luZm9ybWF0aW9uOiB7CiAgICAgICAgICAgICAgICBtb2RlOiAwLAogICAgICAgICAgICAgICAgbW9kdWxlOiAtMSwKICAgICAgICAgICAgICAgIHRpdGxlOiAn5Ymn5oOF566A5LuL5bqV5LiL5pi+56S65pu05aSa5Yqf6IO9JywKICAgICAgICAgICAgICAgIGRlc2M6ICfigJzigJzigJ3igJ0nICsgZ2V0Q29sb3JUZXh0KCflvZPliY3nirbmgIHvvJonICsgKHNldHRpbmdzLk1vcmVfaW5mb3JtYXRpb24gPT09IDEgPyAn5pi+56S6JyA6ICfkuI3mmL7npLonKSwgJyNmZjhhMDAnKSwKICAgICAgICAgICAgICAgIGNsaWNrOiBmdW5jdGlvbiAoKSB7CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbmZpZ0xhenlTdGFydAogICAgICAgICAgICAgICAgICAgICAgICArIGBpZihzZXR0aW5ncy5Nb3JlX2luZm9ybWF0aW9uPT09MSl7c2V0dGluZ3MuTW9yZV9pbmZvcm1hdGlvbj0wfWVsc2V7c2V0dGluZ3MuTW9yZV9pbmZvcm1hdGlvbj0xfWAKICAgICAgICAgICAgICAgICAgICAgICAgKyBjb25maWdMYXp5RW5kCiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0sCgogICAgICAgICAgICAvLyDnroDljZXmqKHlvI/nmoTluLjnlKjmkJzntKLop4TliJkKICAgICAgICAgICAgc2ltcGxlVXN1YWxTZWFyY2hSdWxlOiB7CiAgICAgICAgICAgICAgICBtb2RlOiAxLAogICAgICAgICAgICAgICAgbW9kdWxlOiAxLAogICAgICAgICAgICAgICAgdGl0bGU6ICfnroDljZXmqKHlvI/nmoTmkJzntKLluLjnlKjop4TliJknLAogICAgICAgICAgICAgICAgZGVzYzogJ+agvOW8j++8muaYvuekuuWQjUBA5Zu+54mH5Zyw5Z2AKOWPr+epuilAQOinhOWImeWQjVxuJyArICfigJzigJzigJ3igJ0nICsgZ2V0Q29sb3JUZXh0KCflvZPliY3lj4LmlbDvvJonICsgc2V0dGluZ3Muc2ltcGxlVXN1YWxTZWFyY2hSdWxlLCAnI2ZmOGEwMCcpLAogICAgICAgICAgICAgICAgY2xpY2s6IGZ1bmN0aW9uICgpIHsKICAgICAgICAgICAgICAgICAgICBsZXQgcmVwbGFjZUl0ZW0gPSB7CiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBzZXR0aW5nc01lc3NhZ2Uuc2ltcGxlVXN1YWxTZWFyY2hSdWxlLnRpdGxlLAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtUHJvcGVydHk6ICdzaW1wbGVVc3VhbFNlYXJjaFJ1bGUnLAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtUHJvcGVydHlOYW1lOiAnc2ltcGxlVXN1YWxTZWFyY2hSdWxlJywKICAgICAgICAgICAgICAgICAgICAgICAgaXRlbVByb3BlcnR5RGVmYXVsdFZhbHVlOiAnIuWliOiPsuW9seinhkBAaHR0cHM6Ly9zMy5heDF4LmNvbS8yMDIwLzExLzIzL0RHeGRJQS5wbmdAQOWliOiPsuW9seinhiInLAogICAgICAgICAgICAgICAgICAgICAgICBpdGVtUHJvcGVydHlWYWx1ZTogJ3NpbXBsZVVzdWFsU2VhcmNoUnVsZScsCiAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1Qcm9wZXJ0eVZhbHVlVGV4dDogc2V0dGluZ3Muc2ltcGxlVXN1YWxTZWFyY2hSdWxlID09PSB1bmRlZmluZWQgPwogICAgICAgICAgICAgICAgICAgICAgICAgICAgJ+WliOiPsuW9seinhkBAaHR0cHM6Ly9zMy5heDF4LmNvbS8yMDIwLzExLzIzL0RHeGRJQS5wbmdAQOWliOiPsuW9seinhicKICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogc2V0dGluZ3Muc2ltcGxlVXN1YWxTZWFyY2hSdWxlCiAgICAgICAgICAgICAgICAgICAgfTsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVwbGFjZWRDb25maWdIdG1sKHJlcGxhY2VJdGVtKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSwKCiAgICAgICAgICAgIGhpZGVJbWc6IHsKICAgICAgICAgICAgICAgIG1vZGU6IDAsCiAgICAgICAgICAgICAgICBtb2R1bGU6IC0xLAogICAgICAgICAgICAgICAgdGl0bGU6ICfpmpDol4/lm77niYco55yB5rWB5qih5byPKScsCiAgICAgICAgICAgICAgICBkZXNjOiAn4oCc4oCc4oCd4oCdJyArIGdldENvbG9yVGV4dCgn5b2T5YmN54q25oCB77yaJyArIChzZXR0aW5ncy5oaWRlSW1nID09PSAxID8gJ+W8gOWQrycgOiAn5LiN5byA5ZCvJyksICcjZmY4YTAwJyksCiAgICAgICAgICAgICAgICBjbGljazogZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBjb25maWdMYXp5U3RhcnQKICAgICAgICAgICAgICAgICAgICAgICAgKyBgaWYoc2V0dGluZ3MuaGlkZUltZz09PTEpe3NldHRpbmdzLmhpZGVJbWc9MH1lbHNle3NldHRpbmdzLmhpZGVJbWc9MX1gCiAgICAgICAgICAgICAgICAgICAgICAgICsgY29uZmlnTGF6eUVuZAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9LAogICAgICAgICAgICBzaG93RnVsbEltZ1RpcHM6IHsKICAgICAgICAgICAgICAgIG1vZGU6IDAsCiAgICAgICAgICAgICAgICBtb2R1bGU6IC0xLAogICAgICAgICAgICAgICAgdGl0bGU6ICfmmL7npLrnnIvlpKflm77mj5DnpLoo6Ziy5q2i5peg5rOV5Yqg6L295Zu+54mHKScsCiAgICAgICAgICAgICAgICBkZXNjOiAn4oCc4oCc4oCd4oCdJyArIGdldENvbG9yVGV4dCgn5b2T5YmN54q25oCB77yaJyArIChzZXR0aW5ncy5zaG93RnVsbEltZ1RpcHMgPT09IDEgPyAn5pi+56S6JyA6ICfkuI3mmL7npLonKSwgJyNmZjhhMDAnKSArICdcbuazqOaEj++8muivpemAiemhueS7heWcqOecgea1geaooeW8j+S4jeW8gOWQr+aXtueUn+aViCcsCiAgICAgICAgICAgICAgICBjbGljazogZnVuY3Rpb24gKCkgewogICAgICAgICAgICAgICAgICAgIHJldHVybiBjb25maWdMYXp5U3RhcnQKICAgICAgICAgICAgICAgICAgICAgICAgKyBgaWYoc2V0dGluZ3Muc2hvd0Z1bGxJbWdUaXBzPT09MSl7c2V0dGluZ3Muc2hvd0Z1bGxJbWdUaXBzPTB9ZWxzZXtzZXR0aW5ncy5zaG93RnVsbEltZ1RpcHM9MX1gCiAgICAgICAgICAgICAgICAgICAgICAgICsgY29uZmlnTGF6eUVuZAogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9LAogICAgICAgIH0KCiAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgdGl0bGU6IGdldFN0cm9uZ1RleHQoIueCueWHu+S4i+aWuemAiemhueWNs+WPr+mFjee9riIpCiAgICAgICAgICAgICAgICArICI8YnI+IgogICAgICAgICAgICAgICAgKyBnZXRTbWFsbFRleHQoZ2V0R3JleVRleHQoIuWPr+S4gOasoemFjee9ruWkmuS4qu+8jOWIt+aWsOWQjueUn+aViO+8jOi+k+WFpVwi6buY6K6kXCLlj6/mgaLlpI3pu5jorqTorr7nva4iKSksCiAgICAgICAgICAgIGNvbF90eXBlOiAncmljaF90ZXh0JwogICAgICAgIH0pCgogICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgIGNvbF90eXBlOiAnbGluZScKICAgICAgICB9KQoKICAgICAgICBsZXQgc2V0dGluZ01lc3NhZ2VMaXN0ID0gW107CiAgICAgICAgZm9yIChsZXQgc2V0dGluZ3NNZXNzYWdlS2V5IGluIHNldHRpbmdzTWVzc2FnZSkgewogICAgICAgICAgICBzZXR0aW5nTWVzc2FnZUxpc3QucHVzaChzZXR0aW5nc01lc3NhZ2Vbc2V0dGluZ3NNZXNzYWdlS2V5XSk7CiAgICAgICAgfQoKICAgICAgICBmdW5jdGlvbiBzZXRGaWx0ZXJTZXR0aW5nc01lc3NhZ2UobW9kdWxlLCBtZXNzYWdlVHlwZVRpdGxlLCBtZXNzYWdlQ29sVHlwZSkgewogICAgICAgICAgICBsZXQgZmlsdGVyU2V0dGluZ01lc3NhZ2VMaXN0ID0gc2V0dGluZ01lc3NhZ2VMaXN0LmZpbHRlcihpdGVtID0+ICgoaXRlbS5tb2RlID09PSAtMSB8fCBpdGVtLm1vZGUgPT09IHNldHRpbmdzLm9wZW5TaW1wbGVEZXRhaWxWaWV3KSAmJiBpdGVtLm1vZHVsZSA9PT0gbW9kdWxlKSk7CiAgICAgICAgICAgIGlmIChmaWx0ZXJTZXR0aW5nTWVzc2FnZUxpc3QubGVuZ3RoID4gMCAmJiBtZXNzYWdlVHlwZVRpdGxlICE9PSAnJykgewogICAgICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgICAgICB0aXRsZTogZ2V0QmlnVGV4dChnZXRTdHJvbmdUZXh0KG1lc3NhZ2VUeXBlVGl0bGUpKSwKICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3JpY2hfdGV4dCcKICAgICAgICAgICAgICAgIH0pCiAgICAgICAgICAgIH0KICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBmaWx0ZXJTZXR0aW5nTWVzc2FnZUxpc3QubGVuZ3RoOyBpKyspIHsKICAgICAgICAgICAgICAgIGxldCBmaWx0ZXJTZXR0aW5nTWVzc2FnZSA9IGZpbHRlclNldHRpbmdNZXNzYWdlTGlzdFtpXTsKICAgICAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGZpbHRlclNldHRpbmdNZXNzYWdlLnRpdGxlLAogICAgICAgICAgICAgICAgICAgIGRlc2M6IGZpbHRlclNldHRpbmdNZXNzYWdlLmRlc2MsCiAgICAgICAgICAgICAgICAgICAgdXJsOiBmaWx0ZXJTZXR0aW5nTWVzc2FnZS5jbGljaygpLAogICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiBtZXNzYWdlQ29sVHlwZQogICAgICAgICAgICAgICAgfSk7CiAgICAgICAgICAgIH0KICAgICAgICB9CgogICAgICAgIHNldEZpbHRlclNldHRpbmdzTWVzc2FnZSgwLCAn5bi455So6K6+572uJywgJ3RleHRfMScpOwogICAgICAgIHNldEZpbHRlclNldHRpbmdzTWVzc2FnZSgzLCAnJywgJ3RleHRfMicpOwogICAgICAgIHNldEZpbHRlclNldHRpbmdzTWVzc2FnZSgxLCAn6KeG55WM5pCc55u45YWzJywgJ3RleHRfMScpOwogICAgICAgIHNldEZpbHRlclNldHRpbmdzTWVzc2FnZSgyLCAn6LGG55Oj6K+E5YiG55u45YWzJywgJ3RleHRfMScpOwogICAgICAgIHNldEZpbHRlclNldHRpbmdzTWVzc2FnZSgtMSwgJ+WFtuS7luiuvue9ricsICd0ZXh0XzEnKTsKCiAgICAgICAgcmVzLmRhdGEgPSBkOwogICAgICAgIHNldEhvbWVSZXN1bHQocmVzKTsKICAgIH0sCiAgICAvKioKICAgICAqIOmihOWRiueJh+OAgeinhumikeivhOiuuueVjOmdogogICAgICovCiAgICB0cmFpbGVyTGlzdFZpZXc6IGZ1bmN0aW9uICgpewogICAgICAgIHZhciByZXMgPSB7fTsKICAgICAgICB2YXIgZCA9IFtdOwoKICAgICAgICB2YXIgY29udGVudCA9ICc8Ym9keT4nICsgcGFyc2VEb20oZ2V0UmVzQ29kZSgpLCAnYm9keSYmI2NvbnRlbnQmJkh0bWwnKSArICc8L2JvZHk+JzsKICAgICAgICB2YXIgdGl0bGVfbGlzdCA9IHBhcnNlRG9tRm9yQXJyYXkoY29udGVudCwgJ2JvZHkmJmgyW2lkXScpOwogICAgICAgIHZhciBsaXN0X2xpc3QgPSBwYXJzZURvbUZvckFycmF5KGNvbnRlbnQsICdib2R5JiYudmlkZW8tbGlzdCcpOwoKICAgICAgICBmb3IodmFyIGkgaW4gdGl0bGVfbGlzdCl7CiAgICAgICAgICAgIGQucHVzaCh7CiAgICAgICAgICAgICAgICB0aXRsZTpwYXJzZURvbUZvckh0bWwodGl0bGVfbGlzdFtpXSwnaDImJlRleHQnKS5zcGxpdCgiwqDCt8KgwrfCoMK3wqDCt8KgwrfCoMK3IilbMF0sCiAgICAgICAgICAgICAgICB1cmw6JycsCiAgICAgICAgICAgICAgICBjb2xfdHlwZTonbG9uZ190ZXh0JwogICAgICAgICAgICB9KTsKICAgICAgICAgICAgdmFyIHZpZGVvX2xpc3QgPSBwYXJzZURvbUZvckFycmF5KGxpc3RfbGlzdFtpXSwgJ3VsJiZsaScpOwogICAgICAgICAgICBmb3IodmFyIGogaW4gdmlkZW9fbGlzdCl7CiAgICAgICAgICAgICAgICBkLnB1c2goewogICAgICAgICAgICAgICAgICAgIHRpdGxlOnBhcnNlRG9tRm9ySHRtbCh2aWRlb19saXN0W2pdLCdhOm5vdChbY2xhc3NdKSYmVGV4dCcpLAogICAgICAgICAgICAgICAgICAgIGRlc2M6cGFyc2VEb21Gb3JIdG1sKHZpZGVvX2xpc3Rbal0sJ3N0cm9uZyYmVGV4dCcpLAogICAgICAgICAgICAgICAgICAgIHBpY191cmw6cGFyc2VEb21Gb3JIdG1sKHZpZGVvX2xpc3Rbal0sJ2ltZyYmc3JjJyksCiAgICAgICAgICAgICAgICAgICAgdXJsOnBhcnNlRG9tRm9ySHRtbCh2aWRlb19saXN0W2pdLCdhJiZocmVmJykrYEBsYXp5UnVsZT1ib2R5JiZzb3VyY2UmJnNyY2AsCiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6J21vdmllXzInCiAgICAgICAgICAgICAgICB9KTsKICAgICAgICAgICAgfQogICAgICAgIH0KICAgICAgICByZXMuZGF0YSA9IGQ7CiAgICAgICAgc2V0SG9tZVJlc3VsdChyZXMpOwogICAgfSwKICAgIC8qKgogICAgICog5Ymn54Wn5YiX6KGo6aG16Z2iCiAgICAgKi8KICAgIHBob3RvTGlzdFZpZXc6IGZ1bmN0aW9uICgpIHsKICAgICAgICB2YXIgcmVzID0ge307CiAgICAgICAgdmFyIGQgPSBbXTsKCiAgICAgICAgdmFyIHBpY3MgPSAnPGJvZHk+JyArIHBhcnNlRG9tKGdldFJlc0NvZGUoKSwgJ2JvZHkmJi5hcnRpY2xlJiZIdG1sJykgKyAnPC9ib2R5Pic7CiAgICAgICAgdmFyIHBpY3NfbGlzdCA9IHBhcnNlRG9tRm9yQXJyYXkocGljcywgJ2JvZHkmJmxpJyk7CiAgICAgICAgZm9yICh2YXIgaSBpbiBwaWNzX2xpc3QpIHsKICAgICAgICAgICAgZC5wdXNoKHsKICAgICAgICAgICAgICAgIHBpY191cmw6IHBhcnNlRG9tRm9ySHRtbChwaWNzX2xpc3RbaV0sJ2ltZyYmc3JjJyksCiAgICAgICAgICAgICAgICB1cmw6IHBhcnNlRG9tRm9ySHRtbChwaWNzX2xpc3RbaV0sJ2ltZyYmc3JjJykucmVwbGFjZSgvXC8oc3F4c3xtKVwvL2csICcvbC8nKSwKICAgICAgICAgICAgICAgIGNvbF90eXBlOiAncGljXzInCiAgICAgICAgICAgIH0pOwogICAgICAgIH0KICAgICAgICByZXMuZGF0YSA9IGQ7CiAgICAgICAgc2V0SG9tZVJlc3VsdChyZXMpOwogICAgfQp9Ow==
Add Comment
Please, Sign In to add comment