Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@咕咕番@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6Ii5hbnRob2xvZ3ktbGlzdC1wbGF5JiZhLC0xJiZUZXh0LmpzOifmm7TmlrDoh7PvvJonK2lucHV0IiwidGl0bGUiOiLlkpXlkpXnlaoiLCJhdXRob3IiOiLok53ojpPmnpzphbFVWCYxNTMm54uX5rWp5ZWKJnpldGFscGhhJlIm5LiA5aCG5aSn5L2sIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjaHR0cHM6Ly93d3cuZ3VndWZhbi5jb20vIiwidmVyc2lvbiI6MCwiY29sX3R5cGUiOiJtb3ZpZV8zIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJ2aWRlbyIsImNsYXNzX3VybCI6IiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxudmFyIGQgPSBbXTtcblxuTVlfVVJMID0gTVlfVVJMLnJlcGxhY2UoJ2hpa2VyOi8vZW1wdHkjIycsICcnKTtcbnZhciBodG1sID0gZmV0Y2goTVlfVVJMKTtcblxuLy/moIfpopgs5o+P6L+wLOWbvueJhyzpk77mjqVcbnZhciDmoIfpopggPSAnYSYmdGl0bGUnO1xudmFyIOaPj+i/sCA9ICcucHVibGljLXBydCYmVGV4dCc7XG52YXIg5Zu+54mHID0gJ2ltZ3x8LmxhenkmJmRhdGEtc3JjfHxkYXRhLW9yaWdpbmFsJztcbnZhciDpk77mjqUgPSAnYSYmaHJlZic7XG5cbi8v6L2u5pKtXG52YXIg6L2u5pKt5YiX6KGoID0gJ2JvZHkmJi5zbGlkZS10aW1lLWJqJztcbnZhciDova7mkq3moIfpopggPSAnLnNsaWRlLWluZm8tdGl0bGUm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FzdGdpdC5vcmcvbHMxMjU3ODEwMDMvbG10dWJpYW8vbWFpbi9tb3JlLyc7XFxuXFxuZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+i/lOWbnicsXFxuICAgICAgICAgICAgdXJsOiAkKCkubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpOyAgICAgXFxuICAgICAgICAgICAgICAgIGJhY2soZmFsc2UpXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6L+U5Zue6KeE5YiZ6aaW6aG1XFxcIiAgXFxuICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgcGljX3VybDogSWNvbl9wcmVmaXggKyAnNDcucG5nJysgXFxcIkBSZWZlcmVyPVxcXCIsXFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJpY29uX3NtYWxsXzNcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxuICAgICAgICB9KTtcXG5cXG5cXG5kLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOiAn562b6YCJJyxcXG4gICAgICAgICAgICB1cmw6ICdoaWtlcjovL3BhZ2Uvc2hhaT9wYWdlPWZ5cGFnZSNub0hpc3RvcnkjJyxcXG4gICAgICAgICAgICBwaWNfdXJsOiBJY29uX3ByZWZpeCArICcyMTMucG5nJyArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiaWNvbl9zbWFsbF8zXFxcIlxcbiAgICAgICAgfSk7XFxuXFxuZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+WOhuWPsicsXFxuICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9oaXN0b3J5JyxcXG4gICAgICAgICAgICBwaWNfdXJsOiBJY29uX3ByZWZpeCArICcxOTIucG5nJyArIFxcXCJAUmVmZXJlcj1cXFwiLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFw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Jhbm5lcmknLCAnMCcpKTtcXG4gICAgICAgIGlmIChydW0gIT0gJycpIHtcXG4gICAgICAgICAgICBpID0gTnVtYmVyKHJ1bSkgKyAxXFxuICAgICAgICAgICAgY2xlYXJNeVZhcigncm51bScpXFxuICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgIGkgPSBpICsgMTtcXG4gICAgICAgIH1cXG4gICAgICAgIC8vbG9nKGkpXFxuICAgICAgICAvL2xvZyhkYXRhLmxlbmd0aClcXG5cXG4gICAgICAgIGlmIChpID4gZGF0YS5sZW5ndGggLSAxKSB7XFxuICAgICAgICAgICAgaSA9IDBcXG4gICAgICAgIH1cXG4gICAgICAgIHZhciBpdGVtID0gZGF0YVtpXTtcXG4gICAgICAgIC8vbG9nKGl0ZW0pXFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIHVwZGF0ZUl0ZW0oaWQrJ2JhcicsIHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IGl0ZW0udGl0bGUsXFxuICAgICAgICAgICAgICAgIGltZzogaXRlbS5pbWcsXFxuICAgICAgICAgICAgICAgIHVybDogaXRlbS51cmwsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICAvL25hbWU6IGl0ZW0udGl0bGUucmVwbGFjZSgvPFtePl0rPi9nLCAnJyksXFxuICAgICAgICAgICAgICAgICAgICAvL3NuYW1lOiBpdGVtLmV4dHJhLnNuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgLy9zdHlwZTogaXRlbS5leHRyYS5zdHlwZSxcXG4gICAgICAgICAgICAgICAgICAgIC8vc3VybDogaXRlbS51cmwsXFxuICAgICAgICAgICAgICAgICAgICAvL2ltZzppdGVtLmltZyxcXG4gICAgICAgICAgICAgICAgICAgIC8vcGFnZVRpdGxlOiBpdGVtLnRpdGxlLnJlcGxhY2UoLzxbXj5dKz4vZywgJycpLFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSlcX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gICAgICAgICAgICAgIHB1dE15VmFyKFxcXCJ3ZWVrXFxcIiwgaXQpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgfSwgaXQpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBcXFwic2Nyb2xsX2J1dHRvblxcXCJcXG4gICAgICAgIH0pO1xcbiAgICB9KVxcblxcbmxldCBjaG9zZV93ZWVrID0gZ2V0TXlWYXIoJ3dlZWsnLCBub3dfV2Vlayk7XFxudmFyIHdrVG9udW0gPSBmdW5jdGlvbih3aykge1xcbiAgICAgICAgaWYgKC/lkah85pif5pyfLy50ZXN0KHdrKSkge1xcbiAgICAgICAgICAgIHdrID0gd2sucmVwbGFjZSgv5ZGofOaYn+acny8sIFxcXCJcXFwiKVxcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIG1hcCA9IHtcXG4gICAgICAgICAgICBcXFwi5pelXFxcIjogNyxcXG4gICAgICAgICAgICBcXFwi5LiAXFxcIjogMSxcXG4gICAgICAgICAgICBcXFwi5LqMXFxcIjogMixcXG4gICAgICAgICAgICBcXFwi5LiJXFxcIjogMyxcXG4gICAgICAgICAgICBcXFwi5ZubXFxcIjogNCxcXG4gICAgICAgICAgICBcXFwi5LqUXFxcIjogNSxcXG4gICAgICAgICAgICBcXFwi5YWtXFxcIjogNlxcbiAgICAgICAgfTtcXG4gICAgICAgIHJldHVybiBtYXBbd2tdXFxuICAgIH1cXG4gICAgbGV0IHdrX251bSA9IHdrVG9udW0oY2hvc2Vfd2Vlayk7XFxuLy9sb2cod2tfbnVtKVxcbmZvciAodmFyIGsgPSAxOyBrIDw9IDc7IGsrKykge1xcbiAgICBldmFsKCd2YXIgd2snICsgayArICc9cGRmYShodG1sLCBcXFwiI3dlZWstbW9kdWxlLScgKyAoaz09MD8wOmspICsgJyYmLnB1YmxpYy1saXN0LWJveCwwOjEyXFxcIik7Jyk7Ly/mmJ/mnJ/liJfooahcXG4gICAgaWYgKHdrX251bSA9PSBrKSB7XFxuICAgICAgICBldmFsKCd3aycraykuZm9yRWFjaChpdGVtID0+IHtcXG4gICAgICAgICAgICB2YXIgdXJsbCA9IE1ZX0hPTUUgKyBwZGZoKGl0ZW0sICdhJiZocmVmJykgKyAnI2ltbWVyc2l2ZVRoZW1lIyc7XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6IHBkZmgoaXRlbSwg5qCH6aKYKSxcXG4gICAgICAgICAgICAgICAgZGVzYzogcGRmaChpdGVtLCDmj4/ov7ApLFxcbiAgICAgICAgICAgICAgICBpbWc6IHBkKGl0ZW0sIOWbvueJhykgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgdXJsOiAnaGlrZXI6Ly9wYWdlL2VqI25vSGlzdG9yeSMjaW1tZXJzaXZlVGhlbWUjJyxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIHVybDogdXJsbCxcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBwZGZoKGl0ZW0sIOagh+mimCksXFxuICAgICAgICAgICAgICAgICAgICBpbWc6IHBkKGl0ZW0sIOWbvueJhykgKyBcXFwiQFJlZmVyZXI9XFxcIixcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8zJyxcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0pXFxuICAgIH0gICAgXFxufVxcbmQucHVzaCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuXCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLikaPkuIDnuqfmjqjojZBcIixcInBhdG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Sk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmICgvbTN1OHxtcDQvLnRlc3QodXJsKSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdXJsXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ2aWRlbzovL1xcXCIgKyBpbnB1dFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICByZXR1cm4gXFxcInZpZGVvOi8vXFxcIiArIGlucHV0XFxuICAgICAgICB9XFxuICAgIH0pLFxcbiAgICB1cGRhdGE6IGZ1bmN0aW9uKHJ1bGUpIHtcXG4gICAgICAgIHNldExhc3RDaGFwdGVyUnVsZSgnanM6JyArICQudG9TdHJpbmcoKHVybCxydWxlKSA9PiB7XFxuICAgICAgICAgICAgdmFyIGh0bWw9ZmV0Y2godXJsKTtcXG4gICAgICAgICAgICBzZXRSZXN1bHQoZXZhbChydWxlKSlcXG4gICAgICAgIH0sTVlfVVJMLCBydWxlKSlcXG4gICAgfSxcXG4gICAgY2xvc2U6IGZ1bmN0aW9uKGxpc3QsIHNvcnRzKSB7XFxuICAgICAgICBhZGRMaXN0ZW5lcignb25DbG9zZScsICQudG9TdHJpbmcoKGxpc3QsIHNvcnRzKSA9PiB7XFxuICAgICAgICAgICAgbGlzdC5tYXAoeCA9PiB7XFxuICAgICAgICAgICAgICAgIGNsZWFyTXlWYXIoJ2VyXycgKyB4ICsgJ2ZvbGQnKTtcXG4gICAgICAgICAgICAgICAgY2xlYXJNeVZhcignZXJfJyt4KTtcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgc29ydHM7IGkrKykge1xcbiAgICAgICAgICAgICAgICBjbGVhck15VmFyKCdwbGF5bGlzdF8nICsgaSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGNsZWFyTXlWYXIoJ2VyX3BsY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gICAgICBzdG9yYWdlMC5wdXRNeVZhcignZXJfaW5mbycsaW5mbyk7XFxuICAgICAgICB9XFxuICAgICAgICBcXG4gICAgICAgIGNvbnN0IG1hcmsgPSAnZGVzYyc7XFxuICAgICAgICBudW0gPSB0eXBlb2YobnVtKSA9PSAndW5kZWZpbmVkJyA/IDkwIDogbnVtXFxuICAgICAgICBkZXNjID0gZGVzYy5zdGFydHNXaXRoKCfjgIDjgIAnKSA/IGRlc2MgOiAn44CA44CAJyArIGRlc2M7XFxuICAgICAgICBkZXNjID0gZGVzYy5yZXBsYWNlKC8nL2csIFxcXCImIzM5O1xcXCIpXFxuXFxuICAgICAgICBmdW5jdGlvbiBzdWJzdHIoc3RyLCBtYXhMZW5ndGgpIHtcXG4gICAgICAgICAgICBsZXQgbGVuID0gMDtcXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHN0ci5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgICAgICBpZiAoc3RyLmNoYXJDb2RlQXQoaSkgPiAyNTUpIHtcXG4gICAgICAgICAgICAgICAgICAgIGxlbiArPSAyO1xcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgbGVuKys7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYgKGxlbiA+IG1heExlbmd0aCkge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHN0ci5zbGljZSgwLCBpKSArICcuLi4nO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHJldHVybiBzdHI7XFxuICAgICAgICB9XFxuICAgICAgICBsZXQgc2Rlc2MgPSBzdWJzdHIoZGVzYywgbnVtKTtcXG4gICAgICAgIHZhciBsYXp5ID0gJChgI25vTG9hZGluZyNgKS5sYXp5UnVsZSgoZGMsIHNkYywgbSkgPT4ge1xcbiAgICAgICAgICAgIHZhciBzaG93ID0gc3RvcmFnZTAuZ2V0SXRlbShtLCAnMCcpO1xcbiAgICAgICAgICAgIHZhciB0aXRsZSA9IGZpbmRJdGVtKCdkZXNjJykudGl0bGU7XFxuICAgICAgICAgICAgdmFyIHJlID0gLyg8XFxcXC9zbWFsbD48YnI+Lio/PikuKy9nO1xcbiAgICAgICAgICAgIHZhciBleHAgPSAn5bGV5byAOic7XFxuICAgICAgICAgICAgdmFyIHJldCA9ICfmlLbotbc6JztcXG4gICAgICAgICAgICBpZiAoc2hvdyA9PSAnMScpIHtcXG4gICAgICAgICAgICAgICAgdXBkYXRlSXRlbSgnZGVzYycsIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlKHJldCwgZXhwKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC5yZXBsYWNlKHJlLCAnJDEnICsgc2RjICsgJzwvc21hbGw+JylcXG4gICAgICAgICAgICAgICAgICAgICAgICAucmVwbGFjZSgvKDxcXFxcL3NtYWxsPjxicj48Zm9udCBjb2xvcj1cXFwiKS4qPyhcXFwiPikvLCAnJDEjOEEyQkUyJDInKS8v5pS26LW36aKc6ImyXFxuXFxuICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIHN0b3JhZ2UwLnNldEl0ZW0obSwgJzAnKTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKCdkZXNjJywge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlXFxuICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoZXhwLCByZXQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UocmUsICckMScgKyBkYyArICc8L3NtYWxsPicpXFxuICAgICAgICAgICAgICAgICAgICAgICAgLnJlcGxhY2UoLyg8XFxcXC9zbWFsbD48YnI+PGZvbnQgY29sb3I9XFxcIikuKj8oXFxcIj4pLywgJyQx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iqVcXG4gICAgc3RyQ29udmVydDogZnVuY3Rpb24oYXJyKSB7XFxuICAgICAgICByZXR1cm4gYXJyLm1hcCh4ID0+IHtcXG4gICAgICAgICAgICBzdHIgPSB4O1xcbiAgICAgICAgICAgIGlmICgvKOWvvOa8lHzkuLvmvJR857G75Z6LKe+8mi8udGVzdChzdHIpKSB7XFxuICAgICAgICAgICAgICAgIHN0ciA9IHN0ci5zcGxpdCgnLycpLm1hcCgodmFsLCBpbmRleCkgPT4gKGluZGV4ID09PSAwID8gJycgOiAnJykgKyB2YWwpLnNsaWNlKDAsIDUpLmpvaW4oJyAnKS5yZXBsYWNlKC8gJC8sICcnKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuIHN0clxcbiAgICAgICAgfSlcXG4gICAgfSxcXG4gICAgc2V0Q29udGVudDogZnVuY3Rpb24ob2JqKSB7XFxuICAgICAgICB2YXIgY29udGVudHMgPSBvYmoubWFpbjtcXG4gICAgICAgIHZhciBzb3J0T3JkZXIgPSBvYmouc29ydDtcXG4gICAgICAgIHZhciBpbWcgPSBvYmouaW1nO1xcbiAgICAgICAgdmFyIHRleHRzID0gY29udGVudHMubWFwKHggPT4gcGRmaCh4LCAnVGV4dCcpKTtcXG4gICAgICAgIHZhciBhcnJheSA9IHRleHRzLnNvcnQoKGEsIGIpID0+IHtcXG4gICAgICAgICAgICBjb25zdCBpbmRleEEgPSBzb3J0T3JkZXIuaW5kZXhPZihhLnN1YnN0cigwLCAyKSk7XFxuICAgICAgICAgICAgY29uc3QgaW5kZXhCID0gc29ydE9yZGVyLmluZGV4T2YoYi5zdWJzdHIoMCwgMikpO1xcbiAgICAgICAgICAgIHJldHVybiBpbmRleEEgLSBpbmRleEI7XFxuICAgICAgICB9KVxcbiAgICAgICAgdmFyIHJlZ2V4ID0gbmV3IFJlZ0V4cCgnKCcgKyBzb3J0T3JkZXIuam9pbignfCcpICsgJyknKTtcXG4gICAgICAgIGFycmF5ID0gYXJyYXkuZmlsdGVyKGZ1bmN0aW9uKGl0ZW0pIHtcXG4gICAgICAgICAgICByZXR1cm4gcmVnZXgudGVzdChpdGVtKTtcXG4gICAgICAgIH0pO1xcbiAgICAgICAgYXJyYXkgPSB0aGlzLnN0ckNvbnZlcnQoYXJyYXkpXFxuICAgICAgICB2YXIgdGl0bGVzID0gW107XFxuICAgICAgICB2YXIgZGVzY3MgPSBbXTtcXG4gICAgICAgIHN3aXRjaCAoYXJyYXkubGVuZ3RoKSB7XFxuICAgICAgICAgICAgY2FzZSA0OlxcbiAgICAgICAgICAgIGNhc2UgNTpcXG4gICAgICAgICAgICAgICAgdGl0bGVzID0gYXJyYXkuc2xpY2UoMCwgMik7XFxuICAgICAgICAgICAgICAgIGRlc2NzID0gYXJyYXkuc2xpY2UoMik7XFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgIGNhc2UgNjpcXG4gICAgICAgICAgICAgICAgdGl0bGVzID0gYXJyYXkuc2xpY2UoMCwgMyk7XFxuICAgICAgICAgICAgICAgIGRlc2NzID0gYXJyYXkuc2xpY2UoMyk7XFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgfVxcbiAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoJ2VyX2luZm8nLHtcXG4gICAgICAgICAgZGVzYzpkZXNjcy5qb2luKCdcXFxcbicpLFxcbiAgICAgICAgICBpbWc6aW1nLFxcbiAgICAgICAgfSlcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgLy90aXRsZTogdGl0bGVzWzBdICsgJ1xcXFxuJyArIHRoaXMuc21hbGwodGl0bGVzLnNsaWNlKDEsIDMpLmpvaW4oJ1xcXFxuJykpLFxcbiAgICAgdGl0bGU6ICB0aGlzLnNtYWxsKHRpdGxlc1swXSArICdcXFxcbicgKyB0aXRsZXMuc2xpY2UoMSwgMykuam9pbignXFxcXG4nKSwncmVkJyksXFxuICAgICAgICAgICBkZXNjOiB0aGlzLnNtYWxsKGRlc2NzLmpvaW4oJ1xcXFxuJyksJyNGRjdGMDAnKSxcXG4gICAgIC8vZGVzYzogdGhpcy5zbWFsbChwZGZoKGh0bWwsICcuY29udGV4dCYmLndpZGdldCYmVGV4dCcpLCcjRkY3RjAwJyksXFxuICAgICAgICAgICAgcGljX3VybDogaW1nICsgJ0BSZWZlcmVyPScsXFxuICAgICAgICAgICAgdXJsOiBNWV9VUkwsXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdtb3ZpZV8xX3ZlcnRpY2FsX3BpY19ibHVyJyxcXG4gICAgICAgIH0pXFxuICAgICAgICBpZiAob2JqLmRlc2MgIT0gdW5kZWZpbmVkKSB7XFxuICAgICAgICAgICAgdGhpcy5zZXREZXNjKG9iai5kZXNjKTtcXG4gICAgICAgIH1cXG4gICAgfSxcXG4gICAgc2V0Q3VzdG9tOiBmdW5jdGlvbihvYmosIGltZykge1xcbiAgICAgICAgdmFyIGFycmF5ID0gW107XFxuICAgICAgICBpZiAob2JqLmNvbnN0cnVjdG9yID09IEFycmF5KSB7XFxuICAgICAgICAgICAgYXJyYXkgPSBvYmo7XFxuICAgICAgICB9XFxuICAgICAgICBhcnJheSA9IHRoaXMuc3RyQ29udmVydChhcnJheSk7XFxuICAgICAgICB2YXIgdGl0bGVzID0gW107XFxuICAgICAgICB2YXIgZGVzY3MgPSBbXTtcXG4gICAgICAgIHN3aXRjaCAoYXJyYXkubGVuZ3RoKSB7XFxuICAgICAgICAgICAgY2FzZSA0OlxcbiAgICAgICAgICAgIGNhc2UgNTpcXG4gICAgICAgICAgICAgICAgdGl0bGVzID0gYXJyYXkuc2xpY2UoMCwgMik7XFxuICAgICAgICAgICAgICAgIGRlc2NzID0gYXJyYXkuc2xpY2UoMik7XFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgIGNhc2UgNjpcXG4gICAgICAgICAgICAgICAgdGl0bGVzID0gYXJyYXkuc2xpY2UoMCwgMyk7XFxuICAgICAgICAgICAgICAgIGRlc2NzID0gYXJyYXkuc2xpY2UoMyk7XFxuICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgfVxcbiAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoJ2VyX2luZm8nLHtcXG4gICAgICAgICAgZGVzYzpkZXNjcy5qb2luKCdcXFxcbicpLFxcbiAgICAgICAgICBpbWc6aW1nLFxcbiAgICAgICAgfSlcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IHRpdGxlc1swXSArICdcXFxcbicgKyB0aGlzLnNtYWxsKHRpdGxlcy5zbGljZSgxLCAzKS5qb2luKCdcXFxcbicpKSxcXG4gICAgICAgICAgICBkZXNjOiB0aGlzLnNtYWxsKGRlc2NzLmpvaW4oJ1xcXFxuJykpLFxcbiAgICAgICAgICAgIHBpY191cmw6IGltZyArICdAUmVmZXJlcj0nLFxcbiAgICAgICAgICAgIHVybDogTVlfVVJMLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnbW92aWVfMV92ZXJ0aWNhbF9waWNfYmx1cicsXFxuICAgICAgICB9KVxcbiAgICB9LFxcblxcblxcbi8v57q/6LevXFxuICAgIGlzQ29sb3I6ZnVuY3Rpb24odGV4dCkge1xcbiAgICAgY29uc3QgcmVnZXggPSAvXiMoWzAtOUEtRmEtZl17M318WzAtOUEtRmEtZl17Nn0pJHxeKFthLXpdKykkL2k7XFxuICAgICByZXR1cm4gcmVnZXgudGVzdCh0ZXh0KTtcXG4gICAgfSxcXG4gICAgZ2V0UHJlc2V0OmZ1bmN0aW9uKGN1c3RvbSl7XFxuICAgICAgaWYodHlwZW9mIGN1c3RvbWRhdGE9PSdvYmplY3QnJiYhY3VzdG9tKXtcXG4gICAgICAgIGN1c3RvbT1jdXN0b21kYXRhO1xcbiAgICAgIH1lbHNle1xcbiAgICAgICAgY3VzdG9tPWN1c3RvbT9jdXN0b206e31cXG4gICAgICB9XFxuICAgICAgY3VzdG9tLuato+W6j+minOiJsj0oY3VzdG9tLuato+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AgdmFyIGZvbGRzPVsnPGZvbnQgY29sb3I9XFxcIiNEM0QzRDNcXFwiPuKYtycsJzxmb250IGNvbG9yPVxcXCIjRkZBNTAwXFxcIj7imLAnXTtcXG4gICAgICAgICAgICAgICAgICB2YXIgcGxpc3QgPSBzdG9yYWdlMC5nZXRNeVZhcignZXJfcGxheWxpc3RzJywgJ3t9Jyk7XFxuICAgICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgICAgdmFyIGNvbCA9IHBsaXN0W3Noc29ydF0uY29sX3R5cGU7XFxuICAgICAgICAgICAgICAgICAgdmFyIGNscyA9IHBsaXN0W3Noc29ydF0uY2xzO1xcbiAgICAgICAgICAgICAgICAgIHZhciBwaWM9cGxpc3Rbc2hzb3J0XS5waWM7XFxuICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbShidG4uZXh0cmEuaWQsIHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBidG4udGl0bGUucmVwbGFjZShmb2xkc1swXSwgZm9sZHNbMV0pLFxcbiAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgICAgcHV0TXlWYXIodmFyaSsnZm9sZCcsJzEnKTtcXG4gICAgICAgICAgICAgIC8vcmV0dXJuICd0b2FzdDovL+WxleW8gOaJjeiDveaTjeS9nCc7XFxuICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBwbGlzdCA9IHN0b3JhZ2UwLmdldE15VmFyKCdlcl9wbGF5bGlzdHMnLCAne30nKTtcXG4gICAgICAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGNvbCA9IHBsaXN0W3Noc29ydF0uY29sX3R5cGU7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgY2xzID0gcGxpc3Rbc2hzb3J0XS5jbHM7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgcGljPXBsaXN0W3Noc29ydF0ucGljO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHB1dE15VmFyKHZhcmksIGkpO1xcblxcbiAgICAgICAgICAgICAgICB2YXIgeGxpc3Q9bGlzdHNbaV07XFxuICAgICAgICAgICAgICAgIGlmKCQuZnVuYyE9dW5kZWZpbmVkJiYkLmZ1bmMuY29uc3RydWN0b3I9PUZ1bmN0aW9uKXtcXG4gICAgICAgICAgICAgICAgICAgIHhsaXN0PSQuZnVuYyhpKTtcXG4gICAgICAgICAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoc2hzb3J0ICsgJ19saXN0JywgeGxpc3QpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHZhciBwbGF5cyA9IHhsaXN0Lm1hcCh4ID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHgudGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiB4LnVybCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogY29sLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBpYzpwaWMsXFxuICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWQ6IHgudXJsLnJlcGxhY2UoL0BsYXp5UnVsZVtcXFxcc1xcXFxTXSsvZywgJycpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbHM6IGNscyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgIGlmIChnZXRNeVZhcihzaHNvcnQgKyAnX3NvcnQnKSA9PSAnMScpIHtcXG4gICAgICAgICAgICAgICAgICAgIHBsYXlzLnJldmVyc2UoKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB2YXIgcGNmZz1zdG9yYWdlMC5nZXRNeVZhcihzaHNvcnQrJ19wdXNoY2ZnJywne30nKTtcXG4gICAgICAgICAgICAgICAgaWYocGNmZ1sn5Y2V5o6oJ10pe1xcbiAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oc2hzb3J0KydfcHVzaCcse1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6cGNmZ1snb2JqJ11bJ+WNleaOqCddWzBdXFxuICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICBwY2ZnWyfljZXmjqgnXT1mYWxzZTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZihwY2ZnWyfpgInmjqgnXSl7XFxuICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbShzaHNvcnQrJ19wdXNocycse1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6cGNmZ1snb2JqJ11bJ+mAieaOqCddWzBdXFxuICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICBwY2ZnWyfpgInmjqgnXT1mYWxzZTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcihzaHNvcnQrJ19wdXNoY2ZnJyxwY2ZnKTtcXG4gICAgICAgICAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKHNoc29ydCk7XFxuICAgICAgICAgICAgICAgIGFkZEl0ZW1BZnRlcihzaHNvcnQgKyAnX2xpbmUnLCBwbGF5cyk7XFxuXFxuICAgICAgICAgICAgICAgIHZhciB0YWJ4ID0gZmluZEl0ZW1zQnlDbHMoc2hzb3J0ICsgJ190YWInKTtcXG4gICAgICAgICAgICAgICAgdGFieC5mb3JFYWNoKCh4LCBpaSkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHRpdGxlID0geC50aXRsZTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChpID09IGlpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh4LmV4dHJhLmlkLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZS5yZXBsYWNlKC8jKFxcXFx3Kyk/L2csIGxpbmVjKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHguZXh0cmEuaWQsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IHRpdGxlLnJlcGxhY2UoLyMoXFxcXHcrKT8vZywgJyMnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5YiH5o2i5oiQ5Yqf77yBJztcXG4gICAgICAgICAgICB9LCB2YXJpLCBzaHNvcnQsIGksY3VzdG9tLue6v+i3r+mAieS4rSlcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnScgKyAoZ2V0TXlWYXIodmFyaSwgJzAnKSA9PSBpID8gdGFic1tpXS5mb250Y29sb3IoY3VzdG9tLue6v+i3r+mAieS4rSkgOiB0YWJzW2ldLmZvbnRjb2xvcignIycpKSxcXG4gICAgICAgICAgICAgICAgdXJsOiB1cmwsXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBjbHM6IHNoc29ydCArICdfdGFiJyxcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBzaHNvcnQgKyAnX3RhYl8nICsgaSxcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICB9XFxuICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgIGNvbF90eXBlOidibGFua19ibG9jaycsIC8vJ2JsYW5rX2Jsb2NrJyxcXG4gICAgICAgICAgICBleHRyYToge1xcbiAgICAgICAgICAgICAgICBpZDogc2hzb3J0ICsgJ19saW5lJyxcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICB9LFxcbiAgICBwdXNoVGFiOmZ1bmN0aW9uKHZhcmksc2hzb3J0KXtcXG4gICAgICBhZGRMaXN0ZW5lcignb25SZWZyZXNoJywgJC50b1N0cmluZygoc2hzb3J0KSA9PiB7XFxuICAgICAgICBjbGVhck15VmFyKHNoc29ydCsnX3B1c2hjZmcnKTtcXG4gICAgICAgIGNsZWFyTXlWYXIoc2hzb3J0KydfZHVvc2VsZWN0Jyk7XFxuICAgICAgICB9LCBzaHNvcnQpKVxcbiAgICAgICB2YXIgcG9iaj17XFxuICAgICAgICfljZXmjqgnOlsn4qa/5Y2V5o6oJywnPGI+4qa/5Y2V5o6oPC9iPicuZm9udGNvbG9yKCcjMDBGQTlBJyldLFxcbiAgICAgICAn6YCJ5o6oJzpbJ+KYkemAieaOqCcsJzxiPuKYkemAieaOqDwvYj4nLmZvbnRjb2xvcignIzQ2ODJCNCcpXSxcXG4gICAgICB9XFxuICAgICAgXFxuICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgdGl0bGU6J+KMmCcsXFxuICAgICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgdXJsOidoaWtlcjovL2VtcHR5JyxcXG4gICAgICAgICAgZXh0cmE6e1xcbiAgICAgICAgICAgIGNsczpzaHNvcnQrJ19wdXNodGFiJyxcXG4gICAgICAgICAgfVxcbiAgICAgICAgfSx7XFxuICAgICAgICAgIHRpdGxlOnBvYmpbJ+WNleaOqCddWzBdLFxcbiAgICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgIHVybDokKCcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChzaHNvcnQscG9iaix2YXJpKT0+e1xcbiAgICAgICAgICBpZihnZXRNeVZhcih2YXJpKydmb2xkJywnMScpPT0nMCcpe1xcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lsZXlvIDmiY3og73mk43kvZwnO1xcbiAgICAgICAgICB9XFxuICAgICAgICAgICAgXFxuICAgICAgICAgIHZhciB0aXRsZXM9cG9ialsn5Y2V5o6oJ107XFxuICAgICAgICAgIHZhciBwY2ZnPXN0b3JhZ2UwLmdldE15VmFyKHNoc29ydCsnX3B1c2hjZmcnLCd7fScpO1xcbiAgICAgICAgICBwY2ZnWydvYmonXT1wb2JqO1xcbiAgICAgICAgICB2YXIg5Y2V5o6oPXBjZmdbJ+WNleaOqCddP3BjZmdbJ+WNleaOqCddOmZhbHNlO1xcbiAgICAgICAgICBcXG4gICAgICAgICAgaWYo5Y2V5o6oKXtcXG4gICAgICAgICAgICB1cGRhdGVJdGVtKHNoc29ydCsnX3B1c2gnLHtcXG4gICAgICAgICAgICAgIHRpdGxlOnRpdGxlc1swXSxcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIHBjZmdbJ+WNleaOqCddPWZhbHNlO1xcbiAgICAgICAgICAgIHBjZmdbJ3BsYXlsaXN0J10ubWFwKCh4KT0+e1xcbiAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oeC5leHRyYS5pZCx7XFxuICAgICAgICAgICAgICAgICB1cmw6eC51cmwsXFxuICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICB1cGRhdGVJdGVtKHNoc29ydCsnX3B1c2gnLHtcXG4gICAgICAgICAgICAgIHRpdGxlOifigJzigJzigJ3igJ0nK3RpdGxlc1sxXSxcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIHVwZGF0ZUl0ZW0oc2hzb3J0KydfcHVzaHMnLHtcXG4gICAgICAgICAgICAgIHRpdGxlOnBvYmpbJ+mAieaOqCddWzBdLFxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgcGNmZ1sn5Y2V5o6oJ109dHJ1ZTtcXG4gICAgICAgICAgICBwY2ZnWyfpgInmjqgnXT1mYWxzZTtcXG4gICAgICAgICAgICB2YXIgcGxheWxpc3Q9ZmluZEl0ZW1zQnlDbHMoc2hzb3J0KTtcXG4gICAgICAgICAgICBwY2ZnWydwbGF5bGlzdCddPXBsYXlsaXN0O1xcbiAgICAgICAgICAgIGZpbmRJdGVtc0J5Q2xzKHNoc29ydCkubWFwKHg9PntcXG4gICAgICAgICAgICAgIHZhciBkcHVzaD17XFxuICAgICAgICAgICAgICAgIG5hbWU6Z2V0UGFnZVRpdGxlKCksXFxuICAgICAgICAgICAgICAgIHVybDp4LnRpdGxlKyckJyt4LmV4dHJhLmlkXFxuICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICB1cGRhdGVJdGVtKHguZXh0cmEuaWQse1xcbiAgICAgICAgICAgICAgICB1cmw6JCgnJykubGF6eVJ1bGUoKGRwdXNoKT0+e1xcbiAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3BhZ2UvcHVzaD9ydWxlPVhZUeaOqOmAgSZwdXNodXJsPScgKyBlbmNvZGVVUklDb21wb25lbnQoSlNPTi5zdHJpbmdpZnkoZHB1c2gpKTtcXG4gICAgICAgICAgICAgICAgfSxkcHVzaClcXG4gICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgfVxcbiAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcihzaHNvcnQrJ19wdXNoY2ZnJyxwY2ZnKTtcXG4gICAgICAgICAgcmV0dXJuICd0b2FzdDovLycrKOWNleaOqD8n5Y2V5o6o5byA5ZCvJzon5Y2V5o6o5YWz6ZetJyk7XFxuICAgICAgICAgIH0sc2hzb3J0LHBvYmosdmFyaSksXFxuICAgICAgICAgIGV4dHJhOntcXG4gICAgICAgICAgICBpZDpzaHNvcnQrJ19wdXNoJyxcXG4gICAgICAgICAgICBjbHM6c2hzb3J0KydfcHVzaHRhYicsXFxuICAgICAgICAgIH1cXG4gICAgICAgIH0se1xcbiAgICAgICAgICB0aXRsZTpwb2JqWyfpgInmjqgnXVswXSxcXG4gICAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICB1cmw6JCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoc2hzb3J0LHBvYmosdmFyaSk9PntcXG4gICAgICAgICAgaWYoZ2V0TXlWYXIodmFyaSsnZm9sZCcsJzEnKT09JzAnKXtcXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5bGV5byA5omN6IO95pON5L2cJztcXG4gICAgICAgICAgfVxcbiAgICAgICAgICB2YXIgdGl0bGVzPXBvYmpbJ+mAieaOqCddO1xcbiAgICAgICAgICB2YXIgcGNmZz1zdG9yYWdlMC5nZXRNeVZhcihzaHNvcnQrJ19wdXNoY2ZnJywne30nKTtcXG4gICAgICAgICAgcGNmZ1snb2JqJ109cG9iajtcXG4gICAgICAgICAgdmFyIOmAieaOqD1wY2ZnWyfpgInmjqgnXT9wY2ZnWyfpgInmjqgnXTpmYWxzZTtcXG4gICAgICAgICAgaWYo6YCJ5o6oKXtcXG4gICAgICAgICAgICB1cGRhdGVJdGVtKHNoc29ydCsnX3B1c2hzJyx7XFxuICAgICAgICAgICAgICB0aXRsZTp0aXRsZXNbMF0sXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBwY2ZnWyfpgInmjqgnXT1mYWxzZTtcXG4gICAgICAgICAgICBwY2ZnWydwbGF5bGlzdCddLm1hcCgoeCk9PntcXG4gICAgICAgICAgICAgICB1cGRhdGVJdGVtKHguZXh0cmEuaWQse1xcbiAgICAgICAgICAgICAgICAgdGl0bGU6eC50aXRsZSxcXG4gICAgICAgICAgICAgICAgIHVybDp4LnVybCxcXG4gICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgdXBkYXRlSXRlbShzaHNvcnQrJ19wdXNodG8nLCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogJ+aOqOmAgeacrOmhtT0+VFZCb3gnLFxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGNsZWFyTXlWYXIoc2hzb3J0KydfZHVvc2VsZWN0Jyk7XFxuICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICB1cGRhdGVJdGVtKHNoc29ydCsnX3B1c2hzJyx7XFxuICAgICAgICAgICAgICB0aXRsZTon4oCc4oCc4oCd4oCdJyt0aXRsZXNbMV0sXFxuICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICBwY2ZnWyfpgInmjqgnXT10cnVlO1xcbiAgICAgICAgICAgIHBjZmdbJ+WNleaOqCddPWZhbHNlO1xcbiAgICAgICAgICAgIHZhciBwbGF5bGlzdD1maW5kSXRlbXNCeUNscyhzaHNvcnQpO1xcbiAgICAgICAgICAgIHBjZmdbJ3BsYXlsaXN0J109cGxheWxpc3Q7XFxuICAgICAgICAgICAgbGV0IElkcz1wbGF5bGlzdC5tYXAoaXQgPT4gaXQuZXh0cmEuaWQpO1xcbiAgICAgICAgICAgICAgICBJZHMuZm9yRWFjaCh4ID0+IHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciB0aXRsZSA9IGZpbmRJdGVtKHgpLnRpdGxlO1xcbiAgICAgICAgICAgICAgICAgICAgdXBkYXRlSXRlbSh4LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsOiAkLm1zbSh0aXRsZSwgeCxzaHNvcnQpLFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHVwZGF0ZUl0ZW0oc2hzb3J0KydfcHVzaCcse1xcbiAgICAgICAgICAgICAgdGl0bGU6cG9ialsn5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0KydfdGFicycsJ1tdJyk7XFxuICAgICAgICAgIHRyeXtcXG4gICAgICAgICAgdmFyIHBscz1zdG9yYWdlMC5nZXRNeVZhcihzaHNvcnQrJ19saXN0JywnW10nKS5tYXAobGkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgIHJldHVybiBsaS5tYXAoaXRlbSA9PiBpdGVtLnRpdGxlICsgJyQnICsgaXRlbS51cmwpLmpvaW4oJyMnKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9KS5qb2luKCckJCQnKTtcXG4gICAgICAgICAgfWNhdGNoe1xcbiAgICAgICAgICB2YXIgcGxzPXN0b3JhZ2UwLmdldE15VmFyKHNoc29ydCtcXFwiX2xpc3RcXFwiLCdbXScpLm1hcCh4ID0+IHgudGl0bGUgKyBcXFwiJFxcXCIgKyB4LnVybCkuam9pbihcXFwiI1xcXCIpO1xcbiAgICAgICAgICB2YXIgdGFicz1bdGFic1tnZXRNeVZhcih2YXJpLCcwJyldXTtcXG4gICAgICAgICAgfVxcbiAgICAgICAgICAvKmxvZyhwbHMpXFxuICAgICAgICAgIGxvZyh0YWJzKSovXFxuICAgICAgICAgIH1cXG4gICAgICAgICAgaWYo6YCJ5o6oKXtcXG4gICAgICAgICAgdmFyIHBscz1zdG9yYWdlMC5nZXRNeVZhcihzaHNvcnQrXFxcIl9kdW9zZWxlY3RcXFwiLCdbXScpLm1hcCh4ID0+IHgudGl0bGUgKyBcXFwiJFxcXCIgKyB4LnVybCkuam9pbihcXFwiI1xcXCIpO1xcbiAgICAgICAgICBpZihwbHMubGVuZ3RoPT0wKXtcXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6YCJ5oup5Li656m6JztcXG4gICAgICAgICAgfVxcbiAgICAgICAgICB2YXIgdGFicz1bJ+aSreaUvuWIl+ihqCddO1xcbiAgICAgICAgICB9XFxuICAgICAgICAgIFxcbiAgICAgICAgICB2YXIgaW5mbz1zdG9yYWdlMC5nZXRNeVZhcignZXJfaW5mbycsJ3t9Jyk7XFxuICAgICAgICAgIHZhciBkZXNjID1pbmZvWydkZXNjJ107XFxuICAgICAgICAgIHZhciDmjqjpgIEgPSB7XFxuICAgICAgICAgICAgICAgICBcXFwibmFtZVxcXCI6IGdldFBhZ2VUaXRsZSgpLFxcbiAgICAgICAgICAgICAgICAgXFxcImNvbnRlbnRcXFwiOiBkZXNjfHwnJyxcXG4gICAgICAgICAgICAgICAgIFxcXCJwaWNcXFwiOiBpbmZvWydpbWcnXSB8fCAnJyxcXG4gICAgICAgICAgICAgICAgIFxcXCJmcm9tXFxcIjogdGFicy5qb2luKCckJCQnKSxcXG4gICAgICAgICAgICAgICAgIFxcXCJ1cmxcXFwiOiBwbHMsXFxuICAgICAgICAgICB9XFxuICAgICAgICAgIC8vbG9nKOaOqOmAgSlcXG4gICAgICAgICAgIHJldHVybiBcXFwiaGlrZXI6Ly9wYWdlL3B1c2g/cnVsZT1YWVHmjqjpgIEmcHVzaHVybD1cXFwiICsgZW5jb2RlVVJJQ29tcG9uZW50KEpTT04uc3RyaW5naWZ5KOaOqOmAgSkpXFxuICAgICAgICAgIH0sc2hzb3J0LHZhcmkpLFxcbiAgICAgICAgICBleHRyYTp7XFxuICAgICAgICAgICAgaWQ6c2hzb3J0KydfcHVzaHRvJyxcXG4gICAgICAgICAgICBjbHM6c2hzb3J0KydfcHVzaHRhYidcXG4gICAgICAgICAgfVxcbiAgICAgICAgfSx7XFxuICAgICAgICAgIGNvbF90eXBlOidibGFua19ibG9jaycsXFxuICAgICAgICAgIGV4dHJhOntcXG4gICAgICAgICAgICBjbHM6c2hzb3J0KydfcHVzaHRhYicsXFxuICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgIH0sXFxuICAgIHNldExvbmdjbGljazpmdW5jdGlvbihzaHNvcnQsY3VzdG9tKXtcXG4gICAgICByZXR1cm4gW3t0aXRsZTon5qC35byP8J+OqCcsanM6ICQudG9TdHJpbmcoKHNoc29ydCk9PntcXG4gICAgICAgICAgICAgICAgICAgIGxldCBhbGxfY29scyA9IFsnJ10uY29uY2F0KGdldENvbFR5cGVzKCkpO1xcbiAgICAgICAgICAgICAgICAgICAgYWxsX2NvbHM9YWxsX2NvbHMuZmlsdGVyKHg9PlxcbiAgICAgICAgICAgICAgICAgICAgICAvKHRleHRffGZsZXgpLiovLnRlc3QoeCkmJnghPSd0ZXh0X2ljb24nKTtcXG4gICAgICAgICAgICAgICAgICAgICAgLy9sb2coYWxsX2NvbHMpXFxuICAgICAgICAgICAgICAgICAgICBsZXQgY2xzID0gc3RvcmFnZTAuZ2V0TXlWYXIoJ2VyX3BsYXlsaXN0cycsJ3t9JylcXG4gICAgICAgICAgICAgICAgICAgIHx8ICcnO1xcbiAgICAgICAgICAgICAgICAgICAgaWYoY2xzW3Noc29ydF0hPScnKXtcXG4gICAgICAgICAgICAgICAgICAgICAgY29sPWNsc1tzaHNvcnRdLmNvbF90eXBlO1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgbGV0IOaMiemSruagt+W8jyA9IGFsbF9jb2xzLm1hcCgoaXQpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXQgPT09IGNvbCA/ICfwn5GJJyArIGl0OiBpdDtcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IHRpcHMgPSAn6K+36YCJ5oup6YCJ6ZuG5oyJ6ZKu5qC35byPJztcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAkKOaMiemSruagt+W8jywgMiwgdGlwcykuc2VsZWN0KChzaHNvcnQsY2xzKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgIGlucHV0ID0gaW5wdXQucmVwbGFjZSgv8J+RiS9nLCAnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgLypzdG9yYWdlMC5zZXRJdGVtKCfmjInpkq7moLflvI8nLCBpbnB1dCk7Ki9cXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgb2xkSWRzID0gKGZpbmRJdGVtc0J5Q2xzKHNoc29ydCkgfHwgW10pLm1hcChpdD0+aXQuZXh0cmEuaWQpOyAvL+iAgeWFg+e0oGlkc1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG9sZElkcy5mb3JFYWNoKHg9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oeCwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6IGlucHV0XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/lt7LliIfmjaLpgInpm4bmjInpkq7moLflvI/kuLo6JyArIGlucHV0O1xcbiAgICAgICAgICAgICAgICAgICAgfSxzaHNvcnQsY2xzKTtcXG4gICAgICAgICAgICAgICAgfSxzaHNvcnQsY3VzdG9tKX1dXFxuICAgIH0sXFxuICAgIHNldFRhYnM6IGZ1bmN0aW9uKHRhYnMsIHZhcmksIHNoc29ydCxwYXJzZSkge1xcbiAgICAgICAgbGV0IGN1c3RvbT1wYXJzZS7oh6rlrprkuYk7XFxuICAgICAgICBjdXN0b20gPXRoaXMuZ2V0UHJlc2V0KGN1c3RvbSk7XFxuICAgICAgICBzaHNvcnQgPSBzaHNvcnQgPyBzaHNvcnQgOiAnc2hzb3J0JztcXG4gICAgICAgIHZhciB0aXRsZSA9IChnZXRNeVZhcihzaHNvcnQgKyAnX3NvcnQnLCAnMCcpID09ICcxJykgPyAnPGI+PHNwYW4gc3R5bGU9XFxcImNvbG9yOiAnK2N1c3RvbS7pgIbluo/popzoibIrJ1xcXCI+6YCG5bqPPC9zcGFuPjwvYj4nIDogJzxiPjxzcGFuIHN0eWxlPVxcXCJjb2xvcjogJytjdXN0b20u5q2j5bqP6aKc6ImyKydcXFwiPuato+W6jzwvc3Bhbj48L2I+J1xcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogdmFyaSArICc6JyArIHRpdGxlLFxcbiAgICAgICAgICAgIGRlc2M6ICflhbEnICsgU3RyaW5nKHRhYnMubGVuZ3RoKS5mb250Y29sb3IoJyM0NjgyQjQnKSArICfmnaHnur/ot68nLFxcbiAgICAgICAgICAgIHVybDogJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoc2hzb3J0LHZhcmksY3VzdG9tKSA9PiB7XFxuICAgICAgICAgICAgICBsZXQgY29uZiA9IGdldE15VmFyKHNoc29ydCArICdfc29ydCcsICcwJyk7XFxuICAgICAgICAgICAgICBpZihnZXRNeVZhcignZXJfJyt2YXJpKydmb2xkJywnMScpPT0nMCcpe1xcbiAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WxleW8gOaJjeiDveaTjeS9nCc7XFxuICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHZhciBjbHNsaXN0cyA9IGZpbmRJdGVtc0J5Q2xzKHNoc29ydCk7XFxuICAgICAgICAgICAgICAgIHZhciBuZXdjbHNsaXN0ID0gJC5kYXRhQ29udmVydChjbHNsaXN0cyk7XFxuICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgdmFyIHRpdGxlcz1bYCR7Y3VzdG9tLuato+W6j+minOiJsn1cXFwiPuato+W6j2AsYCR7Y3VzdG9tLumAhuW6j+minOiJsn1cXFwiPumAhuW6j2BdO1xcbiAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoc2hzb3J0KTtcXG4gICAgICAgICAgICAgICAgbmV3Y2xzbGlzdC5yZXZlcnNlKCk7XFxuICAgICAgICAgICAgICAgIGFkZEl0ZW1BZnRlcihzaHNvcnQgKyAnX2xpbmUnLCBuZXdjbHNsaXN0KTtcXG5cXG4gICAgICAgICAgICAgICAgdmFyIG9iaiA9IGZpbmRJdGVtKHNoc29ydCArICdfYXZhdGFyJylcXG5cXG4gICAgICAgICAgICAgICAgaWYgKGNvbmYgPT0gJzEnKSB7XFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHNoc29ydCArICdfYXZhdGFyJywge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBvYmoudGl0bGUucmVwbGFjZSh0aXRsZXNbMV0sIHRpdGxlc1swXSksXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoc2hzb3J0ICsgJ19zb3J0JywgJzAnKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oc2hzb3J0ICsgJ19hdmF0YXInLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IG9iai50aXRsZS5yZXBsYWNlKHRpdGxlc1swXSwgdGl0bGVzWzFdKSxcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihzaHNvcnQgKyAnX3NvcnQnLCAnMScpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/liIfmjaLmjpLluo/miJDlip8nO1xcbiAgICAgICAgICAgIH0sIHNoc29ydCx2YXJpLGN1c3RvbSksXFxuICAgICAgICAgICAgY29sX3R5cGU6ICdhdmF0YXInLFxcbiAgICAgICAgICAgIGltZzogY3VzdG9tLuWbvuaghyAsXFxuICAgICAgICAgICAgZXh0cmE6e1xcbiAgICAgICAgICAgICAgaWQ6c2hzb3J0KydfYXZhdGFyJyxcXG4gICAgICAgICAgICAgIGxvbmdDbGljazp0aGlzLnNldExvbmdjbGljayhzaHNvcnQpLFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgICAgICB2YXIg5oqY5Y+gID0gJ+KAnOKAnOKAneKAnTxiPicgKyAn4pi3Jy5mb250Y29sb3IoX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LCAgJzEnKTtcXG4gICAgICAgICAgICAgICAgdmFyIGNzID0gc3RvcmFnZTAuZ2V0TXlWYXIoc2hzb3J0ICsgJ19jbHMnKTtcXG4gICAgICAgICAgICAgICAgYWRkSXRlbUFmdGVyKG9iai5leHRyYS5pZCwgY3MpO1xcbiAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKGJ0bi5leHRyYS5pZCwge1xcbiAgICAgICAgICAgICAgICAgICAgdGl0bGU6IGJ0bi50aXRsZS5yZXBsYWNlKGZvbGRzWzBdLCBmb2xkc1sxXSksXFxuICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZihmb2xkPT0nMScpe1xcbiAgICAgICAgICAgICAgICAgIHB1dE15VmFyKGZvbGRuYW1lLCAgJzAnKTtcXG4gICAgICAgICAgICAgICAgdmFyIHBjbHMgPSBmaW5kSXRlbXNCeUNscyhzaHNvcnQpO1xcbiAgICAgICAgICAgICAgICB2YXIgY3ggPSAkLmRhdGFDb252ZXJ0KHBjbHMpO1xcbiAgICAgICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcihzaHNvcnQgKyAnX2NscycsIGN4KTtcXG4gICAgICAgICAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKHNoc29ydCk7XFxuICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oYnRuLmV4dHJhLmlkLCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogYnRuLnRpdGxlLnJlcGxhY2UoZm9sZHNbMV0sIGZvbGRzWzBdKSxcXG4gICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICBcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovLycgKyAoZm9sZCA9PT0gJzEnID8gJ+aUtui1tycgOiAn5bGV5byAJyk7XFxuICAgICAgICAgICAgfSwgZm9sZG5hbWUsc2hzb3J0KSxcXG4gICAgICAgICAgIC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nVsZSgoZm9sZG5hbWUsIHNoc29ydCxwdXNoKSA9PiB7XFxuICAgICAgICAgICAgdmFyIHBsID0gc3RvcmFnZTAuZ2V0TXlWYXIoJ2VyX3BsYXlsaXN0cycsICd7fScpO1xcbiAgICAgICAgICAgIGlmIChPYmplY3Qua2V5cyhwbCkubGVuZ3RoID09IDEpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICB2YXIgZm9sZCA9IGdldE15VmFyKGZvbGRuYW1lLCAnMScpO1xcbiAgICAgICAgICAgIHZhciBvYmogPSBmaW5kSXRlbShzaHNvcnQgKyAnX2F2YXRhcicpXFxuICAgICAgICAgICAgaWYgKGZvbGQgPT0gJzEnKSB7XFxuICAgICAgICAgICAgICAgIHZhciBiY2xzID0gZmluZEl0ZW0oc2hzb3J0ICsgJ19idXR0b24nKTtcXG4gICAgICAgICAgICAgICAgdmFyIHRjbHMgPSBmaW5kSXRlbXNCeUNscyhzaHNvcnQgKyAnX3RhYicpO1xcbiAgICAgICAgICAgICAgICB2YXIgbGNscyA9IGZpbmRJdGVtKHNoc29ydCArICdfbGluZScpO1xcbiAgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICAgICAgdmFyIHBjbHMgPSBmaW5kSXRlbXNCeUNscyhzaHNvcnQpO1xcbiAgICAgICAgICAgICAgICB2YXIgY3MgPSBbYmNsc10uY29uY2F0KHRjbHMsIFtsY2xzXSwgcGNscyk7XFxuICAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICBpZihwdXNoKXtcXG4gICAgICAgICAgICAgICAgICB2YXIgcGNscz1maW5kSXRlbXNCeUNscyhzaHNvcnQrJ19wdXNodGFiJyk7XFxuICAgICAgICAgICAgICAgICAgY3M9cGNscy5jb25jYXQoY3MpO1xcbiAgICAgICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgICAgIHZhciBjeCA9ICQuZGF0YUNvbnZlcnQoY3MpO1xcbiAgICAgICAgICAgICAgICBzdG9yYWdlMC5wdXRNeVZhcihzaHNvcnQgKyAnX2NscycsIGN4KTtcXG4gICAgICAgICAgICAgICAgaWYocHVzaCl7XFxuICAgICAgICAgICAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKHNoc29ydCsnX3B1c2h0YWInKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBkZWxldGVJdGVtKGJjbHMuZXh0cmEuaWQpO1xcbiAgICAgICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoc2hzb3J0ICsgJ190YWInKTtcXG4gICAgICAgICAgICAgICAgZGVsZXRlSXRlbShzaHNvcnQgKyAnX2xpbmUnKTtcXG4gICAgICAgICAgICAgICAgZGVsZXRlSXRlbUJ5Q2xzKHNoc29ydCk7XFxuXFxuICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0ob2JqLmV4dHJhLmlkLCB7XFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBvYmouZGVzYy5yZXBsYWNlKCflsZXlvIA8Zm9udCBjb2xvcj1cXFwiI0ZGQTUwMFxcXCI+4piwJywgJ+aKmOWPoDxmb250IGNvbG9yPVxcXCIjRDNEM0QzXFxcIj7imLcnKSxcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKGZvbGQgPT0gJzAnKSB7XFxuICAgICAgICAgICAgICAgIHZhciBjcyA9IHN0b3JhZ2UwLmdldE15VmFyKHNoc29ydCArICdfY2xzJyk7XFxuICAgICAgICAgICAgICAgIGFkZEl0ZW1BZnRlcihzaHNvcnQgKyAnX2F2YXRhcicsIGNzKTtcXG4gICAgICAgICAgICAgICAgdXBkYXRlSXRlbShvYmouZXh0cmEuaWQsIHtcXG4gICAgICAgICAgICAgICAgICAgIGRlc2M6IG9iai5kZXNjLnJlcGxhY2UoJ+aKmOWPoDxmb250IGNvbG9yPVxcXCIjRDNEM0QzXFxcIj7imLcnLCAn5bGV5byAPGZvbnQgY29sb3I9XFxcIiNGRkE1MDBcXFwiPuKYsCcpLFxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBwdXRNeVZhcihmb2xkbmFtZSwgZm9sZCA9PT0gJzEnID8gJzAnIDogJzEnKTtcXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8vJyArIChmb2xkID09PSAnMScgPyAn5pS26LW3JyA6ICflsZXlvIAnKTtcXG4gICAgICAgIH0sIGZvbGRuYW1lLCBzaHNvcnQsKHBhcnNlWyfmjqjpgIEnXT90cnVlOmZhbHNlKSk7XFxuICAgICAgICB2YXIgZGVzYyA9IChmb2xkID09PSAnMCcgPyDmipjlj6AgOiDlsZXlvIApICsgJ1xcXFx0JztcXG5cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6IHZhcmkgKyAnOlxcXFx0XFxcXHQnICsgJ+WFsScgKyBTdHJpbmcodGFicy5sZW5ndGgpLmZvbnRjb2xvcignIzQ2ODJCNCcpICsgJ+adoee6v+i3rycsXFxuICAgICAgICAgICAgZGVzYzogZGVzYyxcXG4gICAgICAgICAgICBjb2xfdHlwZTogJ2F2YXRhcicsXFxuICAgICAgICAgICAgaW1nOiBjdXN0b20u5Zu+5qCHLFxcbiAgICAgICAgICAgIHVybDogdXJsLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIGlkOiBzaHNvcnQgKyAnX2F2YXRhcicsXFxuICAgICAgICAgICAgICAgIGxvbmdDbGljazp0aGlzLnNldExvbmdjbGljayhzaHNvcnQpLFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgICAgICBpZih0eXBlb2YocGFyc2VbJ+aOqOmAgSddKSE9J3VuZGVmaW5lZCcmJnBhcnNlWyfmjqjpgIEnXSlcXG4gICAgICAgIHRoaXMucHVzaFRhYignZXJfJyt2YXJpLHNoc29ydCk7XFxuICAgICAgICBcXG4gICAgICAgIGlmIChmb2xkID09ICcwJykge1xcbiAgICAgICAgICAgIHJldHVyblxcbiAgICAgICAgfVxcblxcbiAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogJ+KAnOKAnOKAneKAnScgKyB0aXRsZSxcXG4gICAgICAgICAgICB1cmw6ICQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHZhcmksIHNoc29ydCxjdXN0b20pID0+IHtcXG4gICAgICAgICAgICAgICAgbGV0IGNvbmYgPSBnZXRNeVZhcihzaHNvcnQgKyAnX3NvcnQnLCAnMCcpO1xcbiAgICAgICAgICAgICAgICB2YXIgY2xzbGlzdHMgPSBmaW5kSXRlbXNCeUNscyhzaHNvcnQpO1xcbiAgICAgICAgICAgICAgICB2YXIgbmV3Y2xzbGlzdCA9ICQuZGF0YUNvbnZlcnQoY2xzbGlzdHMpO1xcbiAgICAgICAgICAgICAgICBkZWxldGVJdGVtQnlDbHMoc2hzb3J0KTtcXG4gICAgICAgICAgICAgICAgbmV3Y2xzbGlzdC5yZXZlcnNlKCk7XFxuICAgICAgICAgICAgICAgIGFkZEl0ZW1BZnRlcihzaHNvcnQgKyAnX2xpbmUnLCBuZXdjbHNsaXN0KTtcXG5cXG4gICAgICAgICAgICAgICAgdmFyIG9iaiA9IGZpbmRJdGVtKHNoc29ydCArICdfYnV0dG9uJylcXG4gICAgICAgICAgICAgICAgdmFyIHRpdGxlcz1bYCR7Y3VzdG9tLuato+W6j+minOiJsn1cXFwiPuato+W6j2AsYCR7Y3VzdG9tLumAhuW6j+minOiJsn1cXFwiPumAhuW6j2BdO1xcbiAgICAgICAgICAgICAgICBcXG4gICAgICAgICAgICAgICAgaWYgKGNvbmYgPT0gJzEnKSB7XFxuICAgICAgICAgICAgICAgICAgICB1cGRhdGVJdGVtKHNoc29ydCArICdfYnV0dG9uJywge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRpdGxlOiBvYmoudGl0bGUucmVwbGFjZSh0aXRsZXNbMV0sIHRpdGxlc1swXSksXFxuICAgICAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgICAgICAgICAgcHV0TXlWYXIoc2hzb3J0ICsgJ19zb3J0JywgJzAnKTtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHVwZGF0ZUl0ZW0oc2hzb3J0ICsgJ19idXR0b24nLCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdGl0bGU6IG9iai50aXRsZS5yZXBsYWNlKHRpdGxlc1swXSwgdGl0bGVzWzFdKSxcXG4gICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcihzaHNvcnQgKyAnX3NvcnQnLCAnMScpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIC8vcmVmcmVzaFBhZ2UoKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5YiH5o2i5o6S5bqP5oiQ5YqfJ1xcbiAgICAgICAgICAgIH0sIHZhcmksIHNoc29ydCxjdXN0b20pLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiAnc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgaWQ6IHNoc29ydCArICdfYnV0dG9uJyxcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KVxcbiAgICAgICAgdGhpcy5jcmVhdGVQTGlzdCh0YWJzLHZhcmksc2hzb3J0LGN1c3RvbSk7XFxuICAgIH0sXFxuICAgIHNldExpc3RzOiBmdW5jdGlvbihsaXN0cywgaW5kZXgsIHNoc29ydCxwYXJzZSkge1xcblxcbiAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoc2hzb3J0ICsgJ19saXN0JywgbGlzdHMpO1xcbiAgICAgICAgXFxuICAgICAgICBwYXJzZT1wYXJzZT9wYXJzZTp7fTtcXG4gICAgICAgIHZhciDmoLflvI89cGFyc2Uu5qC35byPP3BhcnNlLuagt+W8jzonJztcXG4gICAgICAgIHZhciDlm77moIc9cGFyc2Uu5Zu+5qCHP3BhcnNlLuWbvuaghzonaHR0cHM6Ly9oaWtlcmZhbnMuY29tL3R1Ymlhby9tb3ZpZS8xMy5zdmcnO1xcbiAgICAgICAgdmFyIGFqYXg9cGFyc2UuQWpheD9wYXJzZS5BamF4OmZhbHNlO1xcblxcbiAgICAgICAgc2hzb3J0ID0gc2hzb3J0ID8gc2hzb3J0IDogJ3Noc29ydCc7XFxuXFxuICAgICAgICBpZihhamF4KXtcXG4gICAgICAgICAgICB2YXIgbGlzdCA9IGxpc3RzO1xcbiAgICAgICAgICAgIGlmIChnZXRNeVZhcihzaHNvcnQgKyAnX3NvcnQnKSA9PSAnMScgJiYgbGlzdHMubGVuZ3RoID4gMCkge1xcbiAgICAgICAgICAgICAgICBsaXN0ID0gbGlzdHMucmV2ZXJzZSgpO1xcbiAgICAgICAgICAgfVxcbiAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgdmFyIGxpc3QgPSBsaXN0c1tpbmRleF07XFxuICAgICAgICAgICAgaWYgKGdldE15VmFyKHNoc29ydCArICdfc29ydCcpID09ICcxJyAmJiBsaXN0cy5sZW5ndGggPiAwKSB7XFxuICAgICAgICAgICAgICAgIGxpc3QgPSBsaXN0c1tpbmRleF0ucmV2ZXJzZSgpO1xcbiAgICAgICAgICAgfVxcbiAgICAgICAgfVxcbiAgICAgICAgXFxuICAgICAgICBpZijmoLflvI89PScnKXtcXG4gICAgICAgICAg5qC35byPPWxpc3QubGVuZ3RoID4gMyA/ICd0ZXh0XzQnIDogJ3RleHRfMidcXG4gICAgICAgIH1cXG4gICAgICAgIFxcbiAgICAgICAgaWYobGlzdC5sZW5ndGggPiAwKXtcXG4gICAgICAgIHZhciBwbGlzdCA9IHN0b3JhZ2UwLmdldE15VmFyKCdlcl9wbGF5bGlzdHMnLCAne30nKTtcXG4gICAgICAgIGlmKCFwbGlzdC5oYXNPd25Qcm9wZXJ0eShzaHNvcnQpKXtcXG4gICAgICAgICAgICAgcGxpc3Rbc2hzb3J0XT17fTtcXG4gICAgICAgIH1cXG4gICAgICAgIHBsaXN0W3Noc29ydF1bJ2NscyddPXNoc29ydDtcXG4gICAgICAgIHBsaXN0W3Noc29ydF1bJ2NvbF90eXBlJ1095qC35byPO1xcbiAgICAgICAgcGxpc3Rbc2hzb3J0XVsncGljJ1095Zu+5qCHO1xcbiAgICAgICAgc3RvcmFnZTAucHV0TXlWYXIoJ2VyX3BsYXlsaXN0cycsIHBsaXN0KTtcXG4gICAgICAgIH0gICBcXG4gICAgICAgIFxcbiAgICAgICAgXFxuICAgICAgICBmb3IgKHZhciBqIGluIGxpc3QpIHtcXG4gICAgICAgICAgICBkLnB1c2goe1xcbiAgICAgICAgICAgICAgICB0aXRsZTogbGlzdFtqXS50aXRsZSxcXG4gICAgICAgICAgICAgICAgdXJsOiBsaXN0W2pdLnVybCxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IOagt+W8jyxcXG4gICAgICAgICAgICAgICAgcGljOuWbvuaghyxcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIGlkOiBsaXN0W2pdLnVybC5yZXBsYWNlKC9AbGF6eVJ1bGVbXFxcXHNcXFxcU10rL2csICcnKSxcXG4gICAgICAgICAgICAgICAgICAgIGNsczogc2hzb3J0LFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9XFxuICAgIH0sXFxuICAgIGdldFRhYnM6IGZ1bmN0aW9uKHBhcnNlKSB7XFxuICAgICAgICB2YXIgdGFicyA9IFtdO1xcbiAgICAgICAgdmFyIGFydHMgPSBwZGZhKGh0bWwsIHBhcnNlLue6v+i3ryk7XFxuICAgICAgICB2YXIg57q/6Lev5ZCNID0gcGFyc2Uu57q/6Lev5ZCN56ewO1xcbiAgICAgICAgdmFyIOabv+aNouWH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ino+aekCA/IHBhcnNlLuino+aekCA6ICcnO1xcbiAgICAgICAgdmFyIHRlbXAgPSBbXTtcXG4gICAgICAgIGZvciAodmFyIGkgaW4gY29udHMpIHtcXG4gICAgICAgICAgICBpZiAocGFyc2Uu6YCJ6ZuG5YiX6KGoICE9IHVuZGVmaW5lZCkge1xcbiAgICAgICAgICAgICAgICBsaXN0cy5wdXNoKHBkZmEoY29udHNbaV0sIHBhcnNlLumAiembhuWIl+ihqCkubWFwKHggPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0aXRsZTogcGRmaCh4LCDpgInpm4blkI3np7ApXFxuLnJlcGxhY2UoXFxcIuesrFxcXCIsXFxcIlxcXCIpXFxuLnJlcGxhY2UoXFxcIumbhlxcXCIsXFxcIlxcXCIpXFxuLnJlcGxhY2UoXFxcIuacn1xcXCIsXFxcIlxcXCIpXFxuLnJlcGxhY2UoXFxcIuivnVxcXCIsXFxcIlxcXCIpXFxuLnJlcGxhY2UoXFxcIuacgOaWsFxcXCIsXFxcIlxcXCIpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybDogcGQoeCwg6YCJ6ZuG6ZO+5o6lKSArIOino+aekCxcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSkpXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgdmFyIHVybCA9IHBkKGNvbnRzW2ldLCDpgInpm4bpk77mjqUpO1xcbiAgICAgICAgICAgICAgICBpZiAoIemAiembhumTvuaOpS5pbmNsdWRlcygnaHJlZicpKSB7XFxuICAgICAgICAgICAgICAgICAgICB1cmwgPSBwZGZoKGNvbnRzW2ldLCDpgInpm4bpk77mjqUpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHRlbXAucHVzaCh7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogcGRmaChjb250c1tpXSwg6Y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hcCh4ID0+IHgu57G75Z6LKSwgcGFyc2UubGVuZ3RoKTtcXG4gICAgICAgIG1vZGUgPSBtb2RlID8gbW9kZSA6IDE7XFxuICAgICAgICBwYXJzZS5mb3JFYWNoKChpdGVtLCBpKSA9PiB7XFxuICAgICAgICAgICAgdmFyIHRhYnMgPSBbJ+S4u+e6vyddO1xcbiAgICAgICAgICAgIGlmIChpdGVtLue6v+i3ryAhPSB1bmRlZmluZWQpIHtcXG4gICAgICAgICAgICAgICAgdGFicyA9IHRoaXMuZ2V0VGFicyhpdGVtKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcHV0TXlWYXIocGxheStpKydfdGFicycsdGFicyk7XFxuICAgICAgICAgICAgaWYoaXRlbS5BamF4KXtcXG4gICAgICAgICAgICAgICAgaWYgKG1vZGUgPT0gMSkge1xcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRUYWJzKHRhYnMsIGl0ZW0u57G75Z6LLCBwbGF5ICsgaSxpdGVtKTtcXG4gICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICB0aGlzLnNldFRhYnMyKHRhYnMsIGl0ZW0u57G75Z6LLCBwbGF5ICsgaSxpdGVtKTtcXG4gICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgIHB1dE15VmFyKCdlcl9odG1sJyxodG1sKTtcXG4gICAgICAgICAgICAgICAgIHB1dE15VmFyKCdlcl91cmwnLE1ZX1VSTCk7XFxuXFxuICAgICAgICAgICAgICAgIHZhciBsaXN0cz1mdW5jKGdldE15VmFyKCdlcl8nK2l0ZW0u57G75Z6LLCcwJyksTVlfVVJMKTtcXG4gICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICB2YXIgbGlzdHMgPSB0aGlzLmdldExpc3RzKGl0ZW0sIHBsYXkraSk7XFxuICAgICAgICAgICAgLy9sb2cobGlzdHMpXFxuICAgICAgICAgICAgaWYgKGxpc3RzLnNvbWUoeCA9PiB4Lmxlbmd0aCA+IDApKSB7XFxuICAgICAgICAgICAgICAgIGlmIChtb2RlID09IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2V0VGFicyh0YWJzLCBpdGVtLuexu+WeiywgcGxheSArIGksaXRlbSk7XFxuICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5zZXRUYWJzMih0YWJzLCBpdGVtLuexu+WeiywgcGxheSArIGksaXRlbSk7XFxuICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgaWYgKGdldE15VmFyKCdlcl8nICsgaXRlbS7nsbvlnosgKyAnZm9sZCcsICcxJykgPT0gJzEnKSB7XFxuICAgICAgICAgICAgICAgIHRoaXMuc2V0TGlzdHMobGlzdHMsIGdldE15VmFyKCdlcl8nK2l0ZW0u57G75Z6LLCAnMCcpLCBwbGF5ICsgaSxpdGVtKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdibGFua19ibG9jaydcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgfSlcXG4gICAgfVxcbn1cXG5cXG5cXG5sZXQgTWV0aG9kcz17XFxuICAgIC8v5aSa6YCJ5qih5Z2XXFxuICAgIE11bHRpU2VsZWN0TW9kZTpmdW5jdGlvbihuYW1lLGlkLHNoc29ydCl7XFxuICAgICAgICByZXR1cm4gJCgnI25vTG9hZGluZyMnKS5sYXp5UnVsZSgoZGF0YXRpdGxlLCBkYXRhdXJsLHNoc29ydCkgPT4ge1xcbiAgICAgICAgICAgIGZ1bmN0aW9uIHVuaXF1ZShhcnIpIHtcXG4gICAgICAgICAgICBjb25zdCByZXMgPSBuZXcgTWFwKClcXG4gICAgICAgICAgICByZXR1cm4gYXJyLmZpbHRlcigoYSkgPT4gIXJlcy5oYXMoYS51cmwpICYmIHJlcy5zZXQoYS51cmwsIDEpKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBsZXQgZHVvc2VsZWN0ID0gc3RvcmFnZTAuZ2V0TXlWYXIoc2hzb3J0K1xcXCJfZHVvc2VsZWN0XFxcIikgPyBzdG9yYWdlMC5nZXRNeVZhcihzaHNvcnQrXFxcIl9kdW9zZWxlY3RcXFwiKSA6IFtdO1xcbiAgICAgICAgICAgIGlmIChkdW9zZWxlY3QuZmluZEluZGV4KHggPT4geC51cmwgPT09IGRhdGF1cmwpID09IC0xKSB7XFxuICAgICAgICAgICAgICAgIGR1b3NlbGVjdC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBkYXRhdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6IGRhdGF1cmxcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgZHVvc2VsZWN0ID0gdW5pcXVlKGR1b3NlbGVjdClcXG4gICAgICAgICAgICAgICAgdXBkYXRlSXRlbShkYXRhdXJsLCB7XFxuICAgICAgICAgICAgICAgICAgICB0aXRsZTogYOKAnOKAnOKAneKAnTxzcGFuIHN0eWxlPVxcXCJjb2xvcjojRkY1NzMzXFxcIj5gICsgZGF0YXRpdGxlLFxcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiByZW1vdmVCeVZhbHVlKGFyciwgdmFsKSB7XFxuICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGFyci5sZW5ndGg7IGkrKykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhcnJbaV1bJ3VybCddID09IHZhbCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcnIuc3BsaWNlKGksIDEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFx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ycsICcnKSlcXG5pZiAoaHRtbC5pbmNsdWRlcygn57O757uf5o+Q56S6JykpIHtcXG4gICAgZC5wdXNoKHtcXG4gICAgICAgIHRpdGxlOiAn6K+l5YiG57G76ZyA6KaB55m75b2V6aqM6K+BJyxcXG4gICAgICAgIGRlc2M6ICfpqozor4HmiJDlip/lkI7ljbPlj6/mn6XnnIvliIbnsbsnLFxcbiAgICAgICAgdXJsOiAkKCdoaWtlcjovL2VtcHR5JykucnVsZSgoKSA9PiB7XFxuICAgICAgICAgICAgdmFyIGl0ZW1zID0gW107XFxuICAgICAgICAgICAgdmFyIGltZ2xpbiA9ICdodHRwczovL3d3dy5ndWd1ZmFuLmNvbS92ZXJpZnkvaW5kZXguaHRtbD9yPScgKyBNYXRoLnJhbmRvbSgpO1xcbiAgICAgICAgICAgIC8v5Y+W5Zu+54mHY29va2llXFxuICAgICAgICAgICAgdmFyIGNvayA9IEpTT04ucGFyc2UoZmV0Y2hDb29raWUoaW1nbGluLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICdVc2VyLUFnZW50JzogTU9CSUxFX1VBXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIG1ldGhvZDogJ0dFVCcsXFxuICAgICAgICAgICAgICAgIHdpdGhIZWFkZXJzOiB0cnVlXFxuICAgICAgICAgICAgfSkpLmpvaW4oJzsnKTtcXG5cXG4gICAgICAgICAgICAvL+aYvuekuumqjOivgeeggVxcbiAgICAgICAgICAgIGl0ZW1zLnB1c2goe1xcbiAgICAgICAgICAgICAgICBwaWNfdXJsOiBpbWdsaW4gKyAnQFVzZXItQWdlbnQ9JyArIE1PQklMRV9VQSArICdAQ29va2llPScgKyBjb2ssXFxuICAgICAgICAgICAgICAgIHVybDogJCgnJykubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3BpY18xX2Z1bGwnXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgLy/ovpPlhaXmoYZcXG4gICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICcnLFxcbiAgICAgICAgICAgICAgICB1cmw6IFxcXCIndG9hc3Q6Ly/kvaDovpPlhaXnmoTmmK8nICsgaW5wdXRcXFwiLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBcXFwi6LSm5Y+3XFxcIixcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcXFwicHV0TXlWYXIoJ+i0puWPtycsaW5wdXQpXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2VcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCdcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICcnLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBcXFwi5a+G56CBXFxcIixcXG4gICAgICAgICAgICAgICAgdXJsOiBcXFwiJ3RvYXN0Oi8v5L2g6L6T5YWl55qE5pivJyArIGlucHV0XFxcIixcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcXFwicHV0TXlWYXIoJ+WvhueggScsaW5wdXQpXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2VcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCdcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICcnLFxcbiAgICAgICAgICAgICAgICB1cmw6IFxcXCIndG9hc3Q6Ly/kvaDovpPlhaXnmoTmmK8nICsgaW5wdXRcXFwiLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBcXFwi6aqM6K+B56CBXFxcIixcXG4gICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgIG9uQ2hhbmdlOiBcXFwicHV0TXlWYXIoJ+WSleWSlemqjOivgeeggScsaW5wdXQpXFxcIixcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlVmlzaWJsZTogZmFsc2VcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6ICdpbnB1dCdcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBpdGVtcy5wdXNoKHtcXG4gICAgICAgICAgICAgICAgdGl0bGU6ICflj5HpgIEnLFxcbiAgICAgICAgICAgICAgICB1cmw6ICQoTVlfVVJMKS5sYXp5UnVsZSgoY29rKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgY29kID0gZ2V0TXlWYXIoJ+WSleWSlemqjOivgeeggScpO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHVzZXJuYW1lID0gZ2V0TXlWYXIoJ+i0puWPtycpO1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIHBhc3N3ZCA9IGdldE15VmFyKCflr4bnoIEnKTtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBodG1sID0gSlNPTi5wYXJzZShmZXRjaCgnaHR0cHM6Ly93d3cuZ3VndWZhbi5jb20vdXNlci9sb2dpbi5odG1sJywge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ1gtUmVxdWVzdGVkLVdpdGgnOiAnWE1MSHR0cFJlcXVlc3QnLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAnVXNlci1BZ2VudCc6IE1PQklMRV9VQSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ0Nvb2tpZSc6IGNva1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICAgICAgYm9keToge1xcbiAgICAgICAgICAgICAgICAgICAgdXNlcl9uYW1lOiB1c2VybmFtZSxcXG4gICAgICAgICAgICAgICAgICAgIHVzZXJfcHdkOiBwYXNzd2QsXFxuICAgICAgICAgICAgICAgICAgICB2ZXJpZnk6IGNvZFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnXFxuICAgICAgICAgICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoaHRtbC5jb2RlID09IDEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRJdGVtKCdmbGNvb2snLCBjb2spO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGJhY2sodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+mqjOivgeaIkOWKn+OAglxcXCJcXG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaHRtbC5jb2RlID09IDEwMDMpICB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+mqjOivgeWksei0pSzor7fovpPlhaXmraPnoa7otKblj7flr4bnoIFcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZiAoaHRtbC5jb2RlID09IDEwMDIpICB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+mqjOivgeWksei0pSzpqozor4HnoIHovpPlhaXmnInor69cXFwiXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sIGNvayksXFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOi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ZmEoaHRtbCx4LuS4gOe6p+WumuS9jSkubWFwKHM9PntcXG4gICAgICAgICAgdmFyIOWumuS9jT1wZGZhKHMseC7lsI/nsbspLm1hcChxPT57XFxuICAgICAgICAgICAgICB2YXIgdGl0bGU9cGRmaChxLHgu5qCH6aKYKTtcXG4gICAgICAgICAgICAgIHZhciB1cmw9J2EnXFxuICAgICAgICAgICAgICBpZih4LumTvuaOpS5pbmNsdWRlcygnQEAnKSl7ICAgICAgICAgICAgICAgICAgXFxuICAgICAgICAgICAgICAgICAgc3RhdGU9eC7pk77mjqUuc3BsaXQoJ0BAJylbMF1cXG4gICAgICAgICAgICAgICAgICB2YWx1ZT1wZGZoKHEseC7pk77mjqUuc3BsaXQoJ0BAJylbMV0pO1xcbiAgICAgICAgICAgICAgICAgIGlmKHgu6L2s5o2iPT10cnVlKXtcXG4gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGA8bGkgZGF0YS10eXBlPVxcXCIke3N0YXRlfVxcXCIgZGF0YS12YWw9XFxcIiR7dmFsdWV9XFxcIj48YSBocmVmPVxcXCJcXFwiPiR7dGl0bGV9PC9hPjwvbGk+YFxcbiAgICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYDxhIHR5cGU9XFxcIkBleHRyYVxcXCIgc3RhdGU9XFxcIiR7c3RhdGV9XFxcIiB2YWx1ZT1cXFwiJHt2YWx1ZX1cXFwiPiR7dGl0bGV9PC9hPmA7XFxuICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgaHJlZj1wZChxLHgu6ZO+5o6lKTtcXG4gICAgICAgICAgICAgICAgICByZXR1cm4gYDxhIGhyZWY9XFxcIiR7aHJlZn1cXFwiPiR7dGl0bGV9PC9hPmA7XFxuICAgICAgICAgICAgICB9XFxuICAgICAgICAgIH0pO1xcbiAgICAgICAgICByZXR1cm4g5a6a5L2NO1xcbiAgICAg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gICAgICAgIGFsbC5mb3JFYWNoKChpdGVtKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKGl0ZW0pXFxuICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICBjbC5mb3JFYWNoKChpdGVtKT0+e1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbGVhck15VmFyKGl0ZW0pXFxuICAgICAgICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICB9LOeKtuaAgSzlhajmuIUs5riF6ZmkKVxcbiAgICAgICAgICAgIH1dXFxuICAgICAgICB9XFxyXFxuwqDCoMKgIMKgfSlcXG4gICAgfVxcclxcbiAgICBsZXQgc2V0VGl0bGU9KGssaSx0KT0+eyAgICAgICAgICAgICBcXG4gICAgICByZXR1cm4gaz09aT9cXFwi4oCc4oCc4oCd4oCdXFxcIsKgK3QuZm9udGNvbG9yKOWIhuexu+minOiJsik6dFxcclxcbiAgICB9XFxyXFxuwqDCoMKgwqBjYXRlZ29yaWVzLmZvckVhY2goKGNhdGVnb3J5LMKgaW5kZXgpwqA9PsKge1xcbiAgICAgICAgbGV0wqBzdWJfY2F0ZWdvcmllcz1bXTtcXG4gICAgICAgIGlmKOWwj+exu+WumuS9jS5pbmNsdWRlcygnOycpKXtcXG4gICAgICAgICAgICBzdWJfY2F0ZWdvcmllc8KgPcKgcGRmYShjYXRlZ29yeSzCoOWwj+exu+WumuS9jS5zcGxpdCgnOycpWzBdKTtcXG4gICAgICAgICAgICBpZihzdWJfY2F0ZWdvcmllcy5sZW5ndGg9PTApe1xcbiAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzwqA9wqBwZGZhKGNhdGVnb3J5LMKg5bCP57G75a6a5L2NLnNwbGl0KCc7JylbMV0pO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1lbHNle1xcclxcbsKgwqDC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MKgwqDCoMKgwqDCoMKgwqB9XFxuICAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICB2YXIganNvbj0nJztcXG4gICAgICAgICAgICAgICAgc3dpdGNoICh0cnVlKXtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2Ug5YiG57G76ZO+5o6lLmluY2x1ZGVzKCdAQEAnKTpcXG4gICAgICAgICAgICAgICAgICAgIGpzb249e1xcbiAgICAgICAgICAgICAgICAgICAgdHlwZTpwZGZoKGl0ZW0s5YiG57G76ZO+5o6lLnNwbGl0KCdAQEAnKVswXSksXFxuICAgICAgICAgICAgICAgICAgICB2YWx1ZTpwZGZoKGl0ZW0s5YiG57G76ZO+5o6lLnNwbGl0KCdAQEAnKVsxXSksXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIGNhc2Ug5YiG57G76ZO+5o6lLmluY2x1ZGVzKCdAQCcpOlxcbiAgICAgICAgICAgICAgICAgICAganNvbj17XFxuICAgICAgICAgICAgICAgICAgICB0eXBlOuWIhuexu+mTvuaOpS5zcGxpdCgnQEAnKVswXSxcXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlOnBkZmgoaXRlbSzliIbnsbvpk77mjqUuc3BsaXQoJ0BAJylbMV0pLFxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAganNvbj1wZChpdGVtLOWIhuexu+mTvuaOpSk7XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgIC8qdmFyIGpzb2495YiG57G76ZO+5o6lLmluY2x1ZGVzKCdAQEAnKT97XFxuICAgICAgICAgICAgICAgICAgICB0eXBlOnBkZmgoaXRlbSzliIbnsbvpk77mjqUuc3BsaXQoJ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