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C5waHAiLCJpc0xvZyI6ZmFsc2UsInBsdWdpbl9iYXNlIjoiaHR0cHM6XC9cL3NjaHJvZXRlci1sYW5kc2NoYWZ0c2JhdS5kZVwvd3AtY29udGVudFwvcGx1Z2luc1wvZmxvdy1mbG93IiwicGx1Z2luX3ZlciI6IjQuMS4yMyJ9OwoKICAgICAgICAgICAgdmFyIGlzTFMgPSBpc0xvY2FsU3RvcmFnZU5hbWVTdXBwb3J0ZWQoKTsKCiAgICAgICAgICAgIHZhciBGRl9yZXNvdXJjZSA9IHdpbmRvdy5GRl9yZXNvdXJjZSB8fAogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIHNjcmlwdERlZmVycmVkOiAkLkRlZmVycmVkKCksCiAgICAgICAgICAgICAgICAgICAgc3R5bGVEZWZlcnJlZDogICQuRGVmZXJyZWQoKSwKICAgICAgICAgICAgICAgICAgICBzY3JpcHRMb2FkaW5nOiBmYWxzZSwKICAgICAgICAgICAgICAgICAgICBzdHlsZUxvYWRpbmc6IGZhbHNlCiAgICAgICAgICAgICAgICB9OwoKICAgICAgICAgICAgaWYgKCAhd2luZG93LkZGX3Jlc291cmNlICkgd2luZG93LkZGX3Jlc291cmNlID0gRkZfcmVzb3VyY2U7CiAgICAgICAgICAgIGlmICggIXdpbmRvdy5GbG93Rmxvd09wdHMgKSB3aW5kb3cuRmxvd0Zsb3dPcHRzID0gb3B0czsKCiAgICAgICAgICAgIHZhciBkYXRhID0gewogICAgICAgICAgICAgICAgJ2FjdGlvbic6ICdmZXRjaF9wb3N0cycsCiAgICAgICAgICAgICAgICAnc3RyZWFtLWlkJzogJzEnLAogICAgICAgICAgICAgICAgJ2Rpc2FibGUtY2FjaGUnOiAnJywKICAgICAgICAgICAgICAgICdoYXNoJzogaGFzaCwKICAgICAgICAgICAgICAgICdwYWdlJzogJzAnLAogICAgICAgICAgICAgICAgJ3ByZXZpZXcnOiAnMCcKICAgICAgICAgICAgfTsKCiAgICAgICAgICAgIGNvbnNvbGUub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lbCcgbGF5b3V0Ki8KICAgICAgICAgICAgaWYgKCBzdHJlYW1PcHRzLmxheW91dCA9PSAnY2Fyb3VzZWwnICkgewogICAgICAgICAgICAgICAgc3RyZWFtT3B0c1snbGF5b3V0J10gPSAnZ3JpZCc7CiAgICAgICAgICAgICAgICBzdHJlYW1PcHRzWydnLXJhdGlvLWgnXSA9ICIxIjsKICAgICAgICAgICAgICAgIHN0cmVhbU9wdHNbJ2ctcmF0aW8taW1nJ10gPSAiMS8yIjsKICAgICAgICAgICAgICAgIHN0cmVhbU9wdHNbJ2ctcmF0aW8tdyddID0gIjEiOwogICAgICAgICAgICAgICAgc3RyZWFtT3B0c1snZy1vdmVybGF5J10gPSAieWVwIjsKICAgICAgICAgICAgICAgIHN0cmVhbU9wdHNbJ2Mtb3ZlcmxheSddID0gInllcCI7CiAgICAgICAgICAgICAgICBzdHJlYW1PcHRzWydzLWRlc2t0b3AnXSA9ICIwIjsKICAgICAgICAgICAgICAgIHN0cmVhbU9wdHNbJ3MtbGFwdG9wJ10gPSAiMCI7CiAgICAgICAgICAgICAgICBzdHJlYW1PcHRzWydzLXNtYXJ0LWwnXSA9ICIwIjsKICAgICAgICAgICAgICAgIHN0cmVhbU9wdHNbJ3Mtc21hcnQtcCddID0gIjAiOwogICAgICAgICAgICAgICAgc3RyZWFtT3B0c1sncy10YWJsZXQtbCddID0gIjAiOwogICAgICAgICAgICAgICAgc3RyZWFtT3B0c1sncy10YWJsZXQtcCddID0gIjAiOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGVsc2UgaWYgKCBzdHJlYW1PcHRzLmxheW91dCA9PSAnbGlzdCcgKSB7ICAvKnRoZSBzYW1lIHdpdGggbGlzdCwgd2Ugb25seSBuZWVkIG5ld3MgZmVlZCBzdHlsZSovCiAgICAgICAgICAgICAgICBzdHJlYW1PcHRzWydsYXlvdXQnXSA9ICdtYXNvbnJ5JzsKICAgICAgICAgICAgfQoKICAgICAgICAgICAgb3B0cy5zdHJlYW1zWydzdHJlYW0nICsgc3RyZWFtT3B0cy5pZF0gPSBzdHJlYW1PcHRzOwogICAgICAgICAgICB2YXIgJGNvbnQgPSAkKCJbZGF0YS1wbHVnaW49J2Zsb3dfZmxvdyddI2ZmLXN0cmVhbS0iK2RhdGFbJ3N0cmVhbS1pZCddKTsKICAgICAgICAgICAgdmFyIGFqYXhEZWZlcnJlZDsKICAgICAgICAgICAgdmFyIHNjcmlwdCwgc3R5bGU7CiAgICAgICAgICAgIHZhciBsYXlvdXRfcHJlID0gc3RyZWFtT3B0cy5sYXlvdXQuY2hhckF0KDApOwogICAgICAgICAgICB2YXIgaXNPdmVybGF5ID0gbGF5b3V0X3ByZSA9PT0gJ2onIHx8IHN0cmVhbU9wdHNbbGF5b3V0X3ByZSArICctb3ZlcmxheSddID09PSAneWVwJyAmJiBzdHJlYW1PcHRzLnRydWVMYXlvdXQgIT09ICdsaXN0JzsKICAgICAgICAgICAgdmFyIGltZ0luZGV4OwogICAgICAgICAgICBpZiAoaXNPdmVybGF5KSB7CiAgICAgICAgICAgICAgICBpZiAoc3RyZWFtT3B0cy50ZW1wbGF0ZVswXSAhPT0gJ2ltYWdlJykgewogICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwLCBsZW4gPSBzdHJlYW1PcHRzLnRlbXBsYXRlLmxlbmd0aDsgaSA8IGxlbjsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdHJlYW1PcHRzLnRlbXBsYXRlW2ldID09PSAnaW1hZ2UnKSBpbWdJbmRleCA9IGk7CiAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgIHN0cmVhbU9wdHMudGVtcGxhdGUuc3BsaWNlKDAsIDAsIHN0cmVhbU9wdHMudGVtcGxhdGUuc3BsaWNlKGltZ0luZGV4LCAxKVswXSk7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBzdHJlYW1PcHRzLmlzT3ZlcmxheSA9IHRydWU7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGlmIChGRl9yZXNvdXJjZS5zY3JpcHREZWZlcnJlZC5zdGF0ZSgpID09PSAncGVuZGluZycgJiYgIUZGX3Jlc291cmNlLnNjcmlwdExvYWRpbmcpIHsKICAgICAgICAgICAgICAgIHNjcmlwdCA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ3NjcmlwdCcpOwogICAgICAgICAgICAgICAgc2NyaXB0LnNyYyA9ICJodHRwczovL3NjaHJvZXRlci1sYW5kc2NoYWZ0c2JhdS5kZS93cC1jb250ZW50L3BsdWdpbnMvZmxvdy1mbG93L2pzL3B1YmxpYy5qcyI7CiAgICAgICAgICAgICAgICBzY3JpcHQub25sb2FkID0gZnVuY3Rpb24oIHNjcmlwdCwgdGV4dFN0YXR1cyApIHsKICAgICAgICAgICAgICAgICAgICBGRl9yZXNvdXJjZS5zY3JpcHREZWZlcnJlZC5yZXNvbHZlKCk7CiAgICAgICAgICAgICAgICB9OwogICAgICAgICAgICAgICAgZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChzY3JpcHQpOwogICAgICAgICAgICAgICAgRkZfcmVzb3VyY2Uuc2NyaXB0TG9hZGluZyA9IHRydWU7CiAgICAgICAgICAgIH07CiAgICAgICAgICAgIGlmIChGRl9yZXNvdXJjZS5zdHlsZURlZmVycmVkLnN0YXRlKCkgPT09ICdwZW5kaW5nJyAmJiAhRkZfcmVzb3VyY2Uuc3R5bGVMb2FkaW5nKSB7CiAgICAgICAgICAgICAgICBzdHlsZSA9IGRvY3VtZW50LmNyZWF0ZUVsZW1lbnQoJ2xpbmsnKTsKICAgICAgICAgICAgICAgIHN0eWxlLnR5cGUgPSAidGV4dC9jc3MiOwogICAgICAgICAgICAgICAgc3R5bGUuaWQgPSAiZmZfc3R5bGUiOwogICAgICAgICAgICAgICAgc3R5bGUucmVsID0gInN0eWxlc2hlZXQiOwogICAgICAgICAgICAgICAgc3R5bGUuaHJlZiA9ICJodHRwczovL3NjaHJvZXRlci1s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QpOwogICAgICAgICAgICAgICAgICAgICAgICAkZXJyQ29udC5maW5kKCcuZmYtZXJyLWluZm8nKS5odG1sKG9yaWdpbmFsID09ICcnID8gJ0VtcHR5IHJlc3BvbnNlIGZyb20gc2VydmVyJyA6IG9yaWdpbmFsKTsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgcmV0dXJuOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgb3B0cy5zdHJlYW1zWydzdHJlYW0nICsgc3RyZWFtT3B0cy5pZF1bJ2l0ZW1zJ10gPSByZXNwb25zZTsKICAgICAgICAgICAgICAgIGlmICghRmxvd0Zsb3dPcHRzLmRlcGVuZGVuY2llcykgRmxvd0Zsb3dPcHRzLmRlcGVuZGVuY2llcyA9IHt9OwogICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICBGbG93Rmxvdy5leHRlbnNpb25SZXNvdXJjZXNSZXF1ZXN0cyA9IEZsb3dGbG93LmV4dGVuc2lvblJlc291cmNlc1JlcXVlc3RzIHx8IFtdOwogICAgICAgICAgICAgICAgdmFyIHJlcXVlc3QsIGV4dGVuc2lvbiwgc3R5bGU7CgogICAgICAgICAgICAgICAgZm9yICggZXh0ZW5zaW9uIGluIEZsb3dGbG93T3B0cy5kZXBlbmRlbmNpZXMgKSB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCBGbG93Rmxvd09wdHMuZGVwZW5kZW5jaWVzW2V4dGVuc2lvbl0gJiYgRmxvd0Zsb3dPcHRzLmRlcGVuZGVuY2llc1tleHRlbnNpb25dICE9PSAnbG9hZGVkJykgewogICAgICAgICAgICAgICAgICAgICAgICByZXF1ZXN0ID0gJC5nZXRTY3JpcHQoIG9wdHMucGx1Z2luX2Jhc2UgKyAnLScgKyBleHRlbnNpb24gKyAnL2pzL2ZmXycgKyBleHRlbnNpb24gKyAnX3B1YmxpYy5qcycpOwogICAgICAgICAgICAgICAgICAgICAgICBGbG93Rmxvdy5leHRlbnNpb25SZXNvdXJjZXNSZXF1ZXN0cy5wdXNoKHJlcXVlc3QpOwoKICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGUgPSBkb2N1bWVudC5jcmVhdGVFbGVtZW50KCdsaW5rJyk7CiAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlLnR5cGUgPSAidGV4dC9jc3MiOwogICAgICAgICAgICAgICAgICAgICAgICBzdHlsZS5yZWwgPSAic3R5bGVzaGVldCI7CiAgICAgICAgICAgICAgICAgICAgICAgIHN0eWxlLmlkID0gImZmX2FkX3N0eWxlIjsKICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGUuaHJlZiA9IG9wdHMucGx1Z2luX2Jhc2UgKyAnLScgKyBleHRlbnNpb24gKyAnL2Nzcy9mZl8nICsgZXh0ZW5zaW9uICsgJ19wdWJsaWMuY3NzJzsKICAgICAgICAgICAgICAgICAgICAgICAgc3R5bGUubWVkaWEgPSAic2NyZWVuIjsKICAgICAgICAgICAgICAgICAgICAgICAgZG9jdW1lbnQuZ2V0RWxlbWVudHNCeVRhZ05hbWUoImhlYWQiKVswXS5hcHBlbmRDaGlsZChzdHlsZSk7CgogICAgICAgICAgICAgICAgICAgICAgICBGbG93Rmxvd09wdHMuZGVwZW5kZW5jaWVzW2V4dGVuc2lvbl0gPSAnbG9hZGVkJzsKICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICB9CgogICAgICAgICAgICAgICAgdmFyIHJlc291cmNlc0xvYWRlZCA9ICQud2hlbi5hcHBseSgkLCBGbG93Rmxvdy5leHRlbnNpb25SZXNvdXJjZXNSZXF1ZXN0cyk7CgogICAgICAgICAgICAgICAgcmVzb3VyY2VzTG9hZGVkLmRvbmUoZnVuY3Rpb24oKXsKICAgICAgICAgICAgICAgICAgICB2YXIgJHN0cmVhbSwgd2lkdGg7CiAgICAgICAgICAgICAgICAgICAgY29uc29sZS5sb2cocmVzcG9uc2UpOwoKICAgICAgICAgICAgICAgICAgICAkc3RyZWFtID0gRmxvd0Zsb3cuYnVpbGRTdHJlYW1XaXRoKHJlc3BvbnNlLCBzdHJlYW1PcHRzLCBtb2RlcmF0aW9uLCBGbG93Rmxvd09wdHMuZGVwZW5kZW5jaWVzKTsKCiAgICAgICAgICAgICAgICAgICAgaWYgKGlzTFMgJiYgcmVzcG9uc2UuaXRlbXMubGVuZ3RoID4gMCAmJiByZXNwb25zZS5oYXNoLmxlbmd0aCA+IDApIHNlc3Npb25TdG9yYWdlLnNldEl0ZW0oIEpTT04uc3RyaW5naWZ5KCByZXNwb25zZS5oYXNoICksIG9yaWdpbmFsKTsKCiAgICAgICAgICAgICAgICAgICAgdmFyIG51bSA9IHN0cmVhbU9wdHMubGF5b3V0ID09PSAnY29tcGFjdCcgfHwgKHN0cmVhbU9wdHMubW9iaWxlc2xpZGVyID09PSAneWVwJyAmJiBpc01vYmlsZSk/IChzdHJlYW1PcHRzLm1vYmlsZXNsaWRlciA9PT0gJ3llcCcgPyAzIDogc3RyZWFtT3B0c1snY2FyZHMtbnVtJ10pIDogZmFsc2U7CgogICAgICAgICAgICAgICAgICAgICRjb250LmFwcGVuZCggJHN0cmVhbSApOwoKICAgICAgICAgICAgICAgICAgICBpZiAoIHR5cGVvZiAkc3RyZWFtICE9PSAnc3RyaW5nJyApIHsKICAgICAgICAgICAgICAgICAgICAgICAgRmxvd0Zsb3cuc2V0dXBHcmlkKCRjb250LmZpbmQoJy5mZi1zdHJlYW0td3JhcHBlcicpLCBudW0sIHN0cmVhbU9wdHMuc2Nyb2xsdG9wID09PSAneWVwJywgc3RyZWFtT3B0cy5nYWxsZXJ5ID09PSAneWVwJywgc3RyZWFtT3B0cywgJGNvbnQpOwogICAgICAgICAgICAgICAgICAgIH0KCiAgICAgICAgICAgICAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpewogICAgICAgICAgICAgICAgICAgICAgICAkY29udC5maW5kKCcuZmYtaGVhZGVyJykucmVtb3ZlQ2xhc3MoJ2ZmLWxvYWRpbmcnKS5lbmQoKS5maW5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PT0gJ2J1aWxkaW5nJykgewogICAgICAgICAgICAgICAgICAgIHdpbmRvdy5jb25zb2xlICYmIHdpbmRvdy5jb25zb2xlLmxvZyhyZXNwb25zZSk7CiAgICAgICAgICAgICAgICAgICAgJGNvbnQucHJlcGVuZCgkKCc8ZGl2IGlkPSJmZi1hZG1pbi1pbmZvIj5BRE1JTiBJTkZPOiBGZWVkcyBjYWNoZSBpcyBiZWluZyBidWlsdCBpbiBiYWNrZ3JvdW5kLiBQbGVhc2Ugd2FpdCBmb3IgY2hhbmdlcyB0byBhcHBseS4gUGFnZSByZWxvYWQgaXMgcmVxdWlyZWQuPFwvZGl2PicpKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgfSk7CgogICAgICAgICAgICBmdW5jdGlvbiBpc0xvY2FsU3RvcmFnZU5hbWVTdXBwb3J0ZWQoKSB7CiAgICAgICAgICAgICAgICB2YXIgdGVzdEtleSA9ICd0ZXN0Jywgc3RvcmFnZSA9IHdpbmRvdy5zZXNzaW9uU3RvcmFnZTsKICAgICAgICAgICAgICAgIHRyeSB7CiAgICAgICAgICAgICAgICAgICAgc3RvcmFnZS5zZXRJdGVtKHRlc3RLZXksICcxJyk7CiAgICAgICAgICAgICAgICAgICAgc3RvcmFnZS5yZW1vdmVJdGVtKHRlc3RLZXkpOwogICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHsKICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH07CgogICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgfQogICAgfSkoKQoKPC9zY3JpcHQ+CjwhLS0gRmxvdy1GbG93IOKAlCBTb2NpYWwgc3RyZWFtcyBwbHVnaW4gZm9yIFdvcmRwcmVzcyAtLT4=