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BXYWkgQ2hhbjwvbmFtZT4KKyAgICAgICAgICAgIDxvcmdhbml6YXRpb24+T3JhY2xlPC9vcmdhbml6YXRpb24+CisgICAgICAgICAgICA8cm9sZXM+CisgICAgICAgICAgICAgICAgPHJvbGU+bGVhZDwvcm9sZT4KKyAgICAgICAgICAgICAgICA8cm9sZT5kZXZlbG9wZXI8L3JvbGU+CisgICAgICAgICAgICA8L3JvbGVzPgorICAgICAgICA8L2RldmVsb3Blcj4KKyAgICA8L2RldmVsb3BlcnM+CisgICAgPGRpc3RyaWJ1dGlvbk1hbmFnZW1lbnQ+CisgICAgICAgIDxzbmFwc2hvdFJlcG9zaXRvcnk+CisgICAgICAgICAgICA8aWQ+anZuZXQtbmV4dXMtc25hcHNob3RzPC9pZD4KKyAgICAgICAgICAgIDxuYW1lPkphdmEubmV0IE5leHVzIFNuYXBzaG90cyBSZXBvc2l0b3J5PC9uYW1lPgorICAgICAgICAgICAgPHVybD5odHRwczovL21hdmVuLmphdmEubmV0L2NvbnRlbnQvcmVwb3NpdG9yaWVzL3NuYXBzaG90cy88L3VybD4KKyAgICAgICAgPC9zbmFwc2hvdFJlcG9zaXRvcnk+CisgICAgICAgIDxyZXBvc2l0b3J5PgorICAgICAgICAgICAgPGlkPmp2bmV0LW5leHVzLXN0YWdpbmc8L2lkPgorICAgICAgICAgICAgPG5hbWU+SmF2YS5uZXQgTmV4dXMgU3RhZ2luZyBSZXBvc2l0b3J5PC9uYW1lPgorICAgICAgICAgICAgPHVybD5odHRwczovL21hdmVuLmphdmEubmV0L3NlcnZpY2UvbG9jYWwvc3RhZ2luZy9kZXBsb3kvbWF2ZW4yLzwvdXJsPgorICAgICAgICA8L3JlcG9zaXRvcnk+CisgICAgPC9kaXN0cmlidXRpb25NYW5hZ2VtZW50PgorCisgICAgPG9yZ2FuaXphdGlvbj4KKyAgICAgICAgPG5hbWU+R2xhc3NGaXNoIENvbW11bml0eTwvbmFtZT4KKyAgICAgICAgPHVybD5odHRwczovL2phdmFlZS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6Z2l0QGdpdGh1Yi5jb206amF2YWVlL3NlcnZsZXQtc3BlYy5naXQ8L2RldmVsb3BlckNvbm5lY3Rpb24+CisgICAgICAgIDx1cmw+aHR0cHM6Ly9naXRodWIuY29tL2phdmFlZS9zZXJ2bGV0LXNwZWM8L3VybD4KKyAgICAgIDx0YWc+NC4wLjE8L3RhZz4KKyAgPC9zY20+CisKKyAgICA8YnVpbGQ+CisgICAgICAgIDxwbHVnaW5zPgorICAgICAgICAgICAgPHBsdWdpbj4KKyAgICAgICAgICAgICAgICA8YXJ0aWZhY3RJZD5tYXZlbi1jb21waWxlci1wbHVnaW48L2FydGlmYWN0SWQ+CisgICAgICAgICAgICAgICAgPHZlcnNpb24+My4xPC92ZXJzaW9uPgorICAgICAgICAgICAgICAgIDxjb25maWd1cmF0aW9uPgorICAgICAgICAgICAgICAgICAgICA8c291cmNlPjEuODwvc291cmNlPgorICAgICAgICAgICAgICAgICAgICA8dGFyZ2V0PjEuODwvdGFyZ2V0PgorICAgICAgICAgICAgICAgICAgICA8Y29tcGlsZXJBcmd1bWVudD4tWGxpbnQ6YWxsPC9jb21waWxlckFyZ3VtZW50PgorICAgICAgICAgICAgICAgIDwvY29uZmlndXJhdGlvbj4KKyAgICAgICAgICAgIDwvcGx1Z2luPgorICAgICAgICAgICAgPHBsdWdpbj4KKyAgICAgICAgICAgICAgICA8Z3JvdXBJZD5vcmcuYXBhY2hlLmZlbGl4PC9ncm91cElkPgorICAgICAgICAgICAgICAgIDxhcnRpZmFjdElkPm1hdmVuLWJ1bmRsZS1wbHVnaW48L2FydGlmYWN0SWQ+CisgICAgICAgICAgICAgICAgPHZlcnNpb24+MS40LjM8L3ZlcnNpb24+CisgICAgICAgICAgICAgICAgPGNvbmZpZ3VyYXRpb24+CisgICAgICAgICAgICAgICAgICAgIDxzdXBwb3J0ZWRQcm9qZWN0VHlwZXM+CisgICAgICAgICAgICAgICAgICAgICAgICA8c3VwcG9ydGVkUHJvamVjdFR5cGU+amFyPC9zdXBwb3J0ZWRQcm9qZWN0VHlwZT4KKyAgICAgICAgICAgICAgICAgICAgPC9zdXBwb3J0ZWRQcm9qZWN0VHlwZXM+CisgICAgICAgICAgICAgICAgICAgIDxpbnN0cnVjdGlvbnM+CisgICAgICAgICAgICAgICAgICAgICAgICA8QnVuZGxlLVN5bWJvbGljTmFtZT4ke2J1bmRsZS5zeW1ib2xpY05hbWV9PC9CdW5kbGUtU3ltYm9saWNOYW1lPgorICAgICAgICAgICAgICAgICAgICAgICAgPEJ1bmRsZS1EZXNjcmlwdGlvbj4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBKYXZhKFRNKSBTZXJ2bGV0ICR7c3BlYy52ZXJzaW9ufSBBUEkgRGVzaWduIFNwZWNpZmljYXRpb24KKyAgICAgICAgICAgICAgICAgICAgICAgIDwvQnVuZGxlLURlc2NyaXB0aW9uPgorICAgICAgICAgICAgICAgICAgICAgICAgPEJ1bmRsZS1WZXJzaW9uPiR7YnVuZGxlLnZlcnNpb259PC9CdW5kbGUtVmVyc2lvbj4KKyAgICAgICAgICAgICAgICAgICAgICAgIDxFeHRlbnNpb24tTmFtZT4ke2V4dGVuc2lvbi5uYW1lfTwvRXh0ZW5zaW9uLU5hbWU+CisgICAgICAgICAgICAgICAgICAgICAgICA8U3BlY2lmaWNhdGlvbi1WZXJzaW9uPiR7c3BlYy52ZXJzaW9ufTwvU3BlY2lmaWNhdGlvbi1WZXJzaW9uPgorICAgICAgICAgICAgICAgICAgICAgICAgPFNwZWNpZmljYXRpb24tVmVuZG9yPiR7dmVuZG9yLm5hbWV9PC9TcGVjaWZpY2F0aW9uLVZlbmRvcj4KKyAgICAgICAgICAgICAgICAgICAgICAgIDxJbXBsZW1lbnRhdGlvbi1WZXJzaW9uPiR7cHJvamVjdC52ZXJzaW9ufTwvSW1wbGVtZW50YXRpb24tVmVyc2lvbj4KKyAgICAgICAgICAgICAgICAgICAgICAgIDxJbXBsZW1lbnRhdGlvbi1WZW5kb3I+JHtwcm9qZWN0Lm9yZ2FuaXphdGlvbi5uYW1lfTwvSW1wbGVtZW50YXRpb24tVmVuZG9yPgorICAgICAgICAgICAgICAgICAgICAgICAgPEltcGxlbWVudGF0aW9uLVZlbmRvci1JZD4ke2ltcGxlbWVudGF0aW9uLnZlbmRvci5pZH08L0ltcGxlbWVudGF0aW9uLVZlbmRvci1JZD4KKyAgICAgICAgICAgICAgICAgICAgPC9pbnN0cnVjdGlvbnM+CisgICAgICAgICAgICAgICAgPC9jb25maWd1cmF0aW9uPgorICAgICAgICAgICAgICAgIDxleGVjdXRpb25zPgorICAgICAgICAgICAgICAgICAgICA8ZXhlY3V0aW9uPgorICAgICAgICAgICAgICAgICAgICAgICAgPGlkPmJ1bmRsZS1tYW5pZmVzdDwvaWQ+CisgICAgICAgICAgICAgICAgICAgICAgICA8cGhhc2U+cHJvY2Vzcy1jbGFzc2VzPC9waGFzZT4KKyAgICAgICAgICAgICAgICAgICAgICAgIDxnb2Fscz4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICA8Z29hbD5tYW5pZmVzdDwvZ29hbD4KKyAgICAgICAgICAgICAgICAgICAgICAgIDwvZ29hbHM+CisgICAgICAgICAgICAgICAgICAgIDwvZXhlY3V0aW9uPgorICAgICAgICAgICAgICAgIDwvZXhlY3V0aW9ucz4KKyAgICAgICAgICAgIDwvcGx1Z2luPgorICAgICAgICAgICAgPHBsdWdpbj4KKyAgICAgICAgICAgICAgICA8Z3JvdXBJZD5vcmcuYXBhY2hlLm1hdmVuLnBsdWdpbnM8L2dyb3VwSWQ+CisgICAgICAgICAgICAgICAgPGFydGlmYWN0SWQ+bWF2ZW4tamFyLXBsdWdpbjwvYXJ0aWZhY3RJZD4KKyAgICAgICAgICAgICAgICA8dmVyc2lvbj4yLjQ8L3ZlcnNpb24+CisgICAgICAgICAgICAgICAgPGNvbmZpZ3VyYXRpb24+CisgICAgICAgICAgICAgICAgICAgIDxhcmNoaXZlPgorICAgICAgICAgICAgICAgICAgICAgICAgPG1hbmlmZXN0RmlsZT4ke3Byb2plY3QuYnVpbGQub3V0cHV0RGlyZWN0b3J5fS9NRVRBLUlORi9NQU5JRkVTVC5NRjwvbWFuaWZlc3RGaWxlPgorICAgICAgICAgICAgICAgICAgICA8L2FyY2hpdmU+CisgICAgICAgICAgICAgICAgICAgIDxleGNsdWRlcz4KKyAgICAgICAgICAgICAgICAgICAgICAgIDxleGNsdWRlPioqLyouamF2YTwvZXhjbHVkZT4KKyAgICAgICAgICAgICAgICAgICAgPC9leGNsdWRlcz4KKyAgICAgICAgICAgICAgICA8L2NvbmZpZ3VyYXRpb24+CisgICAgICAgICAgICA8L3BsdWdpbj4KKyAgICAgICAgICAgIDxwbHVnaW4+CisgICAgICAgICAgICAgICAgPGdyb3VwSWQ+b3JnLmFwYWNoZS5tYXZlbi5wbHVnaW5zPC9ncm91cElkPgorICAgICAgICAgICAgICAgIDxhcnRpZmFjdElkPm1hdmVuLXJlbW90ZS1yZXNvdXJjZXMtcGx1Z2luPC9hcnRpZmFjdElkPgorICAgICAgICAgICAgICAgIDx2ZXJzaW9uPjEuMi4xPC92ZXJzaW9uPgorICAgICAgICAgICAgICAgIDxleGVjdXRpb25zPgorICAgICAgICAgICAgICAgICAgPGV4ZWN1dGlvbj4KKyAgICAgICAgICAgICAgICAgICAgPGdvYWxzPgorICAgICAgICAgICAgICAgICAgICAgIDxnb2FsPnByb2Nlc3M8L2dvYWw+CisgICAgICAgICAgICAgICAgICAgIDwvZ29hbHM+CisgICAgICAgICAgICAgICAgICAgIDxjb25maWd1cmF0aW9uPgorICAgICAgICAgICAgICAgICAgICAgIDxyZXNvdXJjZUJ1bmRsZXM+CisgICAgICAgICAgICAgICAgICAgICAgICA8cmVzb3VyY2VCdW5kbGU+b3JnLmdsYXNzZmlzaDpsZWdhbDoxLjE8L3Jlc291cmNlQnVuZGxlPgorICAgICAgICAgICAgICAgICAgICAgIDwvcmVzb3VyY2VCdW5kbGVzPgorICAgICAgICAgICAgICAgICAgICA8L2NvbmZpZ3VyYXRpb24+CisgICAgICAgICAgICAgICAgICA8L2V4ZWN1dGlvbj4KKyAgICAgICAgICAgICAgICA8L2V4ZWN1dGlvbnM+CisgICAgICAgICAgICA8L3BsdWdpbj4KKyAgICAgICAgICAgIDxwbHVnaW4+CisgICAgICAgICAgICAgICAgPGdyb3VwSWQ+b3JnLmFwYWNoZS5tYXZlbi5wbHVnaW5zPC9ncm91cElkPgorICAgICAgICAgICAgICAgIDxhcnRpZmFjdElkPm1hdmVuLXNvdXJjZS1wbHVnaW48L2FydGlmYWN0SWQ+CisgICAgICAgICAgICAgICAgPHZlcnNpb24+Mi4xPC92ZXJzaW9uPgorICAgICAgICAgICAgICAgIDxjb25maWd1cmF0aW9uPgorICAgICAgICAgICAgICAgICAgICA8aW5jbHVkZVBvbT50cnVlPC9pbmNsdWRlUG9tPgorICAgICAgICAgICAgICAgIDwvY29uZmlndXJhdGlvbj4KKyAgICAgICAgICAgICAgICA8ZXhlY3V0aW9ucz4KKyAgICAgICAgICAgICAgICAgICAgPGV4ZWN1dGlvbj4KKyAgICAgICAgICAgICAgICAgICAgICAgPGlkPmF0dGFjaC1zb3VyY2VzPC9pZD4KKyAgICAgICAgICAgICAgICAgICAgICAgPGdvYWxzPgorICAgICAgICAgICAgICAgICAgICAgICAgICAgPGdvYWw+amFyLW5vLWZvcms8L2dvYWw+IAorICAgICAgICAgICAgICAgICAgICAgICA8L2dvYWxzPgorICAgICAgICAgICAgICAgICAgICA8L2V4ZWN1dGlvbj4KKyAgICAgICAgICAgICAgICA8L2V4ZWN1dGlvbnM+CisgICAgICAgICAgICA8L3BsdWdpbj4KKyAgICAgICAgICAgIDxwbHVnaW4+CisgICAgICAgICAgICAgICAgPGdyb3VwSWQ+b3JnLmFwYWNoZS5tYXZlbi5wbHVnaW5zPC9ncm91cElkPgorICAgICAgICAgICAgICAgIDxhcnRpZmFjdElkPm1hdmVuLWphdmFkb2MtcGx1Z2luPC9hcnRpZmFjdElkPgorICAgICAgICAgICAgICAgIDx2ZXJzaW9uPjIuMTAuNDwvdmVyc2lvbj4KKyAgICAgICAgICAgICAgICA8Y29uZmlndXJhdGlvbj4KKyAgICAgICAgICAgICAgICAgICAgPHNvdXJjZXBhdGg+c3JjPC9zb3VyY2VwYXRoPgorICAgICAgICAgICAgICAgICAgICA8ZG9jdGl0bGU+JHtkb2MudGl0bGV9PC9kb2N0aXRsZT4KKyAgICAgICAgICAgICAgICAgICAgPHdpbmRvd3RpdGxlPiR7d2luZG93LnRpdGxlfTwvd2luZG93dGl0bGU+CisgICAgICAgICAgICAgICAgICAgIDxzdHlsZXNoZWV0ZmlsZT5qYXZheC5zZXJ2bGV0LWFwaS5jc3M8L3N0eWxlc2hlZXRmaWxlPgorICAgICAgICAgICAgICAgICAgICA8ZG9jZmlsZXNzdWJkaXJzPnRydWU8L2RvY2ZpbGVzc3ViZGlycz4KKyAgICAgICAgICAgICAgICAgICAgPGdyb3Vwcz4KKyAgICAgICAgICAgICAgICAgICAgICAgIDxncm91cD4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICA8dGl0bGU+U2VydmxldCBBUEkgRG9jdW1lbnRhdGlvbjwvdGl0bGU+CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHBhY2thZ2VzPmphdmF4LnNlcnZsZXQ8L3BhY2thZ2VzPgorICAgICAgICAgICAgICAgICAgICAgICAgPC9ncm91cD4KKyAgICAgICAgICAgICAgICAgICAgPC9ncm91cHM+CisgICAgICAgICAgICAgICAgICAgIDxib3R0b20+Cis8IVtDREFUQVtDb3B5cmlnaHQgJiMxNjk7IDE5OTktMjAxNywKKyAgICA8YSBocmVmPSJodHRwOi8vd3d3Lm9yYWNsZS5jb20iPk9yYWNsZTwvYT4KKyAgICBhbmQvb3IgaXRzIGFmZmlsaWF0ZXMuIEFsbCBSaWdodHMgUmVzZXJ2ZWQuCisgICAgVXNlIGlzIHN1YmplY3QgdG8KKyAgICA8YSBocmVmPSJ7QGRvY1Jvb3R9L2RvYy1maWxlcy9zcGVjbGljZW5zZS5odG1sIiB0YXJnZXQ9Il90b3AiPmxpY2Vuc2UgdGVybXM8L2E+LgorICAgIFBvcnRpb25zIENvcHlyaWdodCAmIzE2OTsgMTk5OS0yMDAyIFRoZSBBcGFjaGUgU29mdHdhcmUgRm91bmRhdGlvbi4KK11dPgorICAgICAgICAgICAgICAgICAgICA8L2JvdHRvbT4KKyAgICAgICAgICAgICAgICAgICAgPHRhZ3M+CisgICAgICAgICAgICAgICAgICAgICAgICA8dGFnPgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxuYW1lPmltcGxTcGVjPC9uYW1lPgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxwbGFjZW1lbnQ+YTwvcGxhY2VtZW50PgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxoZWFkPkltcGxlbWVudGF0aW9uIFJlcXVpcmVtZW50czo8L2hlYWQ+CisgICAgICAgICAgICAgICAgICAgICAgICA8L3RhZz4KKyAgICAgICAgICAgICAgICAgICAgICAgIDx0YWc+CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG5hbWU+cGFyYW08L25hbWU+CisgICAgICAgICAgICAgICAgICAgICAgICA8L3RhZz4KKyAgICAgICAgICAgICAgICAgICAgICAgIDx0YWc+CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG5hbWU+cmV0dXJuPC9uYW1lPgorICAgICAgICAgICAgICAgICAgICAgICAgPC90YWc+CisgICAgICAgICAgICAgICAgICAgICAgICA8dGFnPgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxuYW1lPnRocm93czwvbmFtZT4KKyAgICAgICAgICAgICAgICAgICAgICAgIDwvdGFnPgorICAgICAgICAgICAgICAgICAgICAgICAgPHRhZz4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bmFtZT5zaW5jZTwvbmFtZT4KKyAgICAgICAgICAgICAgICAgICAgICAgIDwvdGFnPgorICAgICAgICAgICAgICAgICAgICAgICAgPHRhZz4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bmFtZT52ZXJzaW9uPC9uYW1lPgorICAgICAgICAgICAgICAgICAgICAgICAgPC90YWc+CisgICAgICAgICAgICAgICAgICAgICAgICA8dGFnPgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxuYW1lPnNlcmlhbERhdGE8L25hbWU+CisgICAgICAgICAgICAgICAgICAgICAgICA8L3RhZz4KKyAgICAgICAgICAgICAgICAgICAgICAgIDx0YWc+CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG5hbWU+ZmFjdG9yeTwvbmFtZT4KKyAgICAgICAgICAgICAgICAgICAgICAgIDwvdGFnPgorICAgICAgICAgICAgICAgICAgICAgICAgPHRhZz4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bmFtZT5zZWU8L25hbWU+CisgICAgICAgICAgICAgICAgICAgICAgICA8L3RhZz4KKyAgICAgICAgICAgICAgICAgICAgPC90YWdzPgorICAgICAgICAgICAgICAgIDwvY29uZmlndXJhdGlvbj4KKyAgICAgICAgICAgICAgICA8ZXhlY3V0aW9ucz4KKyAgICAgICAgICAgICAgICAgICAgPGV4ZWN1dGlvbj4KKyAgICAgICAgICAgICAgICAgICAgICA8Z29hbHM+CisgICAgICAgICAgICAgICAgICAgICAgICA8Z29hbD5qYXI8L2dvYWw+CisgICAgICAgICAgICAgICAgICAgICAgPC9nb2Fscz4KKyAgICAgICAgICAgICAgICAgICAgPC9leGVjdXRpb24+CisgICAgICAgICAgICAgICAgPC9leGVjdXRpb25zPgorICAgICAgICAgICAgPC9wbHVnaW4+CisgICAgICAgICAgICA8cGx1Z2luPgorICAgICAgICAgICAgICAgIDxncm91cElkPm9yZy5jb2RlaGF1cy5tb2pvPC9ncm91cElkPgorICAgICAgICAgICAgICAgIDxhcnRpZmFjdElkPmZpbmRidWdzLW1hdmVuLXBsdWdpbjwvYXJ0aWZhY3RJZD4KKyAgICAgICAgICAgICAgICA8dmVyc2lvbj4ke2ZpbmRidWdzLnZlcnNpb259PC92ZXJzaW9uPgorICAgICAgICAgICAgICAgIDxjb25maWd1cmF0aW9uPgorICAgICAgICAgICAgICAgICAgICA8dGhyZXNob2xkPiR7ZmluZGJ1Z3MudGhyZXNob2xkfTwvdGhyZXNob2xkPgorICAgICAgICAgICAgICAgICAgICA8ZXhjbHVkZUZpbHRlckZpbGU+JHtmaW5kYnVncy5leGNsdWRlfTwvZXhjbHVkZUZpbHRlckZpbGU+CisgICAgICAgICAgICAgICAgICAgIDxmaW5kYnVnc1htbE91dHB1dD50cnVlPC9maW5kYnVnc1htbE91dHB1dD4KKyAgICAgICAgICAgICAgICAgICAgPGZpbmRidWdzWG1sV2l0aE1lc3NhZ2VzPnRydWU8L2ZpbmRidWdzWG1sV2l0aE1lc3NhZ2VzPgorICAgICAgICAgICAgICAgIDwvY29uZmlndXJhdGlvbj4KKyAgICAgICAgICAgIDwvcGx1Z2luPgorICAgICAgICAgICAgPHBsdWdpbj4KKyAgICAgICAgICAgICAgICA8Z3JvdXBJZD5vcmcuYXBhY2hlLm1hdmVuLnBsdWdpbnM8L2dyb3VwSWQ+CisgICAgICAgICAgICAgICAgPGFydGlmYWN0SWQ+bWF2ZW4tcmVsZWFzZS1wbHVnaW48L2FydGlmYWN0SWQ+CisgICAgICAgICAgICAgICAgPHZlcnNpb24+Mi41LjM8L3ZlcnNpb24+CisgICAgICAgICAgICAgICAgPGNvbmZpZ3VyYXRpb24+CisgICAgICAgICAgICAgICAgICAgIDxtYXZlbkV4ZWN1dG9ySWQ+Zm9ya2VkLXBhdGg8L21hdmVuRXhlY3V0b3JJZD4KKyAgICAgICAgICAgICAgICAgICAgPHVzZVJlbGVhc2VQcm9maWxlPmZhbHNlPC91c2VSZWxlYXNlUHJvZmlsZT4KKyAgICAgICAgICAgICAgICAgICAgPHRhZ05hbWVGb3JtYXQ+QHtwcm9qZWN0LnZlcnNpb259PC90YWdOYW1lRm9ybWF0PgorICAgICAgICAgICAgICAgICAgICA8YXJndW1lbnRzPiR7cmVsZWFzZS5hcmd1bWVudHN9PC9hcmd1bWVudHM+CisgICAgICAgICAgICAgICAgPC9jb25maWd1cmF0aW9uPgorICAgICAgICAgICAgICAgIDxkZXBlbmRlbmNpZXM+CisgICAgICAgICAgICAgICAgICAgIDxkZXBlbmRlbmN5PgorICAgICAgICAgICAgICAgICAgICAgICAgPGdyb3VwSWQ+b3JnLmFwYWNoZS5tYXZlbi5zY208L2dyb3VwSWQ+CisgICAgICAgICAgICAgICAgICAgICAgICA8YXJ0aWZhY3RJZD5tYXZlbi1zY20tcHJvdmlkZXItZ2l0ZXhlPC9hcnRpZmFjdElkPgorICAgICAgICAgICAgICAgICAgICAgICAgPHZlcnNpb24+MS44LjE8L3ZlcnNpb24+CisgICAgICAgICAgICAgICAgICAgIDwvZGVwZW5kZW5jeT4KKyAgICAgICAgICAgICAgICA8L2RlcGVuZGVuY2llcz4KKyAgICAgICAgICAgIDwvcGx1Z2luPgorICAgICAgICAgICAgPHBsdWdpbj4KKyAgICAgICAgICAgICAgICA8Z3JvdXBJZD5vcmcuZ2xhc3NmaXNoLmNvcHlyaWdodDwvZ3JvdXBJZD4KKyAgICAgICAgICAgICAgICA8YXJ0aWZhY3RJZD5nbGFzc2Zpc2gtY29weXJpZ2h0LW1hdmVuLXBsdWdpbjwvYXJ0aWZhY3RJZD4KKyAgICAgICAgICAgICAgICA8dmVyc2lvbj4ke2NvcHlyaWdodC1wbHVnaW4udmVyc2lvbn08L3ZlcnNpb24+CisgICAgICAgICAgICAgICAgPGNvbmZpZ3VyYXRpb24+CisgICAgICAgICAgICAgICAgICAgIDxzY20+Z2l0PC9zY20+CisgICAgICAgICAgICAgICAgICAgIDxzY21Pbmx5PnRydWU8L3NjbU9ubHk+CisgICAgICAgICAgICAgICAgICAgIDxleGNsdWRlRmlsZT4KKyAgICAgICAgICAgICAgICAgICAgICAgICR7YmFzZWRpcn0vY29weXJpZ2h0LWV4Y2x1ZGUKKyAgICAgICAgICAgICAgICAgICAgPC9leGNsdWRlRmlsZT4KKyAgICAgICAgICAgICAgICAgICAgPGlnbm9yZVllYXI+dHJ1ZTwvaWdub3JlWWVhcj4KKyAgICAgICAgICAgICAgICA8L2NvbmZpZ3VyYXRpb24+CisgICAgICAgICAgICAgICAgPGV4ZWN1dGlvbnM+CisgICAgICAgICAgICAgICAgICAgIDxleGVjdXRpb24+CisgICAgICAgICAgICAgICAgICAgICAgICA8aWQ+Y2hlY2stY29weXJpZ2h0PC9pZD4KKyAgICAgICAgICAgICAgICAgICAgICAgIDxwaGFzZT5wcm9jZXNzLXRlc3Qtc291cmNlczwvcGhhc2U+CisgICAgICAgICAgICAgICAgICAgICAgICA8Z29hbHM+CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGdvYWw+Y29weXJpZ2h0PC9nb2FsPgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxnb2FsPmNoZWNrPC9nb2FsPgorICAgICAgICAgICAgICAgICAgICAgICAgPC9nb2Fscz4KKyAgICAgICAgICAgICAgICAgICAgPC9leGVjdXRpb24+CisgICAgICAgICAgICAgICAgPC9leGVjdXRpb25zPgorICAgICAgICAgICAgPC9wbHVnaW4+CisgICAgICAgIDwvcGx1Z2lucz4KKyAgICAgICAgPHJlc291cmNlcz4KKyAgICAgICAgICAgIDxyZXNvdXJjZT4KKyAgICAgICAgICAgICAgICA8ZGlyZWN0b3J5PnNyYy9tYWluL2phdmE8L2RpcmVjdG9yeT4KKyAgICAgICAgICAgICAgICA8aW5jbHVkZXM+CisgICAgICAgICAgICAgICAgICAgIDxpbmNsdWRlPioqLyoucHJvcGVydGllczwvaW5jbHVkZT4KKyAgICAgICAgICAgICAgICAgICAgPGluY2x1ZGU+KiovKi5odG1sPC9pbmNsdWRlPgorICAgICAgICAgICAgICAgIDwvaW5jbHVkZXM+CisgICAgICAgICAgICA8L3Jlc291cmNlPgorICAgICAgICAgICAgPHJlc291cmNlPgorICAgICAgICAgICAgICAgIDxkaXJlY3Rvcnk+c3JjL21haW4vcmVzb3VyY2VzPC9kaXJlY3Rvcnk+CisgICAgICAgICAgICAgICAgPGV4Y2x1ZGVzPgorICAgICAgICAgICAgICAgICAgICA8ZXhjbHVkZT5NRVRBLUlORi9SRUFETUU8L2V4Y2x1ZGU+CisgICAgICAgICAgICAgICAgPC9leGNsdWRlcz4KKyAgICAgICAgICAgIDwvcmVzb3VyY2U+CisgICAgICAgIDwvcmVzb3VyY2VzPgorICAgIDwvYnVpbGQ+CisgICAgPHJlcG9ydGluZz4KKyAgICAgICAgPHBsdWdpbnM+CisgICAgICAgICAgICA8cGx1Z2luPgorICAgICAgICAgICAgICAgIDxncm91cElkPm9yZy5jb2RlaGF1cy5tb2pvPC9ncm91cElkPgorICAgICAgICAgICAgICAgIDxhcnRpZmFjdElkPmZpbmRidWdzLW1hdmVuLXBsdWdpbjwvYXJ0aWZhY3RJZD4KKyAgICAgICAgICAgICAgICA8dmVyc2lvbj4ke2ZpbmRidWdzLnZlcnNpb259PC92ZXJzaW9uPgorICAgICAgICAgICAgICAgIDxjb25maWd1cmF0aW9uPgorICAgICAgICAgICAgICAgICAgICA8dGhyZXNob2xkPiR7ZmluZGJ1Z3MudGhyZXNob2xkfTwvdGhyZXNob2xkPgorICAgICAgICAgICAgICAgICAgICA8ZXhjbHVkZUZpbHRlckZpbGU+JHtmaW5kYnVncy5leGNsdWRlfTwvZXhjbHVkZUZpbHRlckZpbGU+CisgICAgICAgICAgICAgICAgPC9jb25maWd1cmF0aW9uPgorICAgICAgICAgICAgPC9wbHVnaW4+CisgICAgICAgIDwvcGx1Z2lucz4KKyAgICA8L3JlcG9ydGluZz4KKzwvcHJvamVjdD4KZGlmZiAtLWdpdCBhL3RoaXJkX3BhcnR5L3NlcnZsZXQtc3BlYy9yZWxlYXNlLnNoIGIvdGhpcmRfcGFydHkvc2VydmxldC1zcGVjL3JlbGVhc2Uuc2gKbmV3IGZpbGUgbW9kZSAxMDA3NTUKaW5kZXggMDAwMDAwMC4uNjIyOWIyNAotLS0gL2Rldi9udWxsCisrKyBiL3RoaXJkX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gICAgKgorICAgICAqIEBleGNlcHRpb24gSWxsZWdhbFN0YXRlRXhjZXB0aW9uICBpZiB7QGxpbmsgI2NvbXBsZXRlfSBvciBhbnkgb2YgdGhlCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge0BsaW5rICNkaXNwYXRjaH0gbWV0aG9kcyBoYXMgYmVlbgorICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbGxlZCBpbiB0aGUgYXN5bmNocm9ub3VzIGN5Y2xlCisgICAgICovCisgICAgcHVibGljIFNlcnZsZXRSZXNwb25zZSBnZXRSZXNwb25zZSgpOworCisKKyAgICAvKioKKyAgICAgKiBDaGVja3MgaWYgdGhpcyBBc3luY0NvbnRleHQgd2FzIGluaXRpYWxpemVkIHdpdGggdGhlIG9yaWdpbmFsIG9yCisgICAgICogYXBwbGljYXRpb24td3JhcHBlZCByZXF1ZXN0IGFuZCByZXNwb25zZSBvYmplY3RzLgorICAgICAqIAorICAgICAqIDxwPlRoaXMgaW5mb3JtYXRpb24gbWF5IGJlIHVzZWQgYnkgZmlsdGVycyBpbnZva2VkIGluIHRoZQorICAgICAqIDxpPm91dGJvdW5kPC9pPiBkaXJlY3Rpb24sIGFmdGVyIGEgcmVxdWVzdCB3YXMgcHV0IGludG8KKyAgICAgKiBhc3luY2hyb25vdXMgbW9kZSwgdG8gZGV0ZXJtaW5lIHdoZXRoZXIgYW55IHJlcXVlc3QgYW5kL29yIHJlc3BvbnNlCisgICAgICogd3JhcHBlcnMgdGhhdCB0aGV5IGFkZGVkIGR1cmluZyB0aGVpciA8aT5pbmJvdW5kPC9pPiBpbnZvY2F0aW9uIG5lZWQKKyAgICAgKiB0byBiZSBwcmVzZXJ2ZWQgZm9yIHRoZSBkdXJhdGlvbiBvZiB0aGUgYXN5bmNocm9ub3VzIG9wZXJhdGlvbiwgb3IgbWF5CisgICAgICogYmUgcmVsZWFzZWQuCisgICAgICoKKyAgICAgKiBAcmV0dXJuIHRydW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jb250ZXh0LmdldFJlc3BvbnNlKCksIHRocm93YWJsZSk7CisgICAgfQorCisgICAgLyoqCisgICAgICogQ29uc3RydWN0cyBhbiBBc3luY0V2ZW50IGZyb20gdGhlIGdpdmVuIEFzeW5jQ29udGV4dCwgU2VydmxldFJlcXVlc3QsCisgICAgICogU2VydmxldFJlc3BvbnNlLCBhbmQgVGhyb3dhYmxlLgorICAgICAqCisgICAgICogQHBhcmFtIGNvbnRleHQgdGhlIEFzeW5jQ29udGV4IHRvIGJlIGRlbGl2ZXJlZCB3aXRoIHRoaXMgQXN5bmNFdmVudAorICAgICAqIEBwYXJhbSByZXF1ZXN0IHRoZSBTZXJ2bGV0UmVxdWVzdCB0byBiZSBkZWxpdmVyZWQgd2l0aCB0aGlzIEFzeW5jRXZlbnQKKyAgICAgKiBAcGFyYW0gcmVzcG9uc2UgdGhlIFNlcnZsZXRSZXNwb25zZSB0byBiZSBkZWxpdmVyZWQgd2l0aCB0aGlzCisgICAgICogQXN5bmNFdmVudAorICAgICAqIEBwYXJhbSB0aHJvd2FibGUgdGhlIFRocm93YWJsZSB0byBiZSBkZWxpdmVyZWQgd2l0aCB0aGlzIEFzeW5jRXZlbnQKKyAgICAgKi8KKyAgICBwdWJsaWMgQXN5bmNFdmVudChBc3luY0NvbnRleHQgY29udGV4dCwgU2VydmxldFJlcXVlc3QgcmVxdWVzdCwKKyAgICAgICAgICAgIFNlcnZsZXRSZXNwb25zZSByZXNwb25zZSwgVGhyb3dhYmxlIHRocm93YWJsZSkgeworICAgICAgICB0aGlzLmNvbnRleHQgPSBjb250ZXh0OworICAgICAgICB0aGlzLnJlcXVlc3QgPSByZXF1ZXN0OworICAgICAgICB0aGlzLnJlc3BvbnNlID0gcmVzcG9uc2U7CisgICAgICAgIHRoaXMudGhyb3dhYmxlID0gdGhyb3dhYmxlOworICAgIH0KKworICAgIC8qKgorICAgICAqIEdldHMgdGhlIEFzeW5jQ29udGV4dCBmcm9tIHRoaXMgQXN5bmNFdmVudC4KK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yBwZXJtaXNzaW9ucyBhbmQKKyAqIGxpbWl0YXRpb25zIHVuZGVyIHRoZSBMaWNlbnNlLgorICovCisKK3BhY2thZ2UgamF2YXguc2VydmxldDsKKworaW1wb3J0IGphdmEudXRpbC5FbnVtZXJhdGlvbjsKKworLyoqIAorICogQSBmaWx0ZXIgY29uZmlndXJhdGlvbiBvYmplY3QgdXNlZCBieSBhIHNlcnZsZXQgY29udGFpbmVyCisgKiB0byBwYXNzIGluZm9ybWF0aW9uIHRvIGEgZmlsdGVyIGR1cmluZyBpbml0aWFsaXphdGlvbi4KKyAqCisgKiBAc2VlIEZpbHRlciAKKyAqIEBzaW5jZSBTZXJ2bGV0IDIuMworICovCitwdWJsaWMgaW50ZXJmYWNlIEZpbHRlckNvbmZpZyB7CisKKyAgICAvKiogCisgICAgICogUmV0dXJucyB0aGUgZmlsdGVyLW5hbWUgb2YgdGhpcyBmaWx0ZXIgYXMgZGVmaW5lZCBpbiB0aGUgZGVwbG95bWVudAorICAgICAqIGRlc2NyaXB0b3IuIAorICAgICAqCisgICAgICogQHJldHVybiB0aGUgZmlsdGVyIG5hbWUgb2YgdGhpcyBmaWx0ZXIKKyAgICAgKi8KKyAgICBwdWJsaWMgU3RyaW5nIGdldEZpbHRlck5hbWUoKTsKKworCisgICAgLyoqCisgICAgICogUmV0dXJucyBhIHJlZmVyZW5jZSB0byB0aGUge0BsaW5rIFNlcnZsZXRDb250ZXh0fSBpbiB3aGljaCB0aGUgY2FsbGVyCisgICAgICogaXMgZXhlY3V0aW5nLgorICAgICAqCisgICAgICogQHJldHVybiBhIHtAbGluayBTZXJ2bGV0Q29udGV4dH0gb2JqZWN0LCB1c2VkIGJ5IHRoZSBjYWxsZXIgdG8KKyAgICAgKiBpbnRlcmFjdCB3aXRoIGl0cyBzZXJ2bGV0IGNvbnRhaW5lcgorICAgICAqIAorICAgICAqIEBzZWUgU2VydmxldENvbnRleHQKKyAgICAgKi8KKyAgICBwdWJsaWMgU2VydmxldENvbnRleHQg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Z19ub3RfaW5pdGlhbGl6ZWQiKSk7CisgICAgICAgIH0KKworICAgICAgICByZXR1cm4gZmMuZ2V0SW5pdFBhcmFtZXRlck5hbWVzKCk7CisgICAgfSAgIAorICAgICAKKworICAgIC8qKgorICAgICAqIDxwPlJldHVybnMgdGhpcyBzZXJ2bGV0J3Mge0BsaW5rIFNlcnZsZXRDb25maWd9IG9iamVjdC48L3A+CisgICAgICoKKyAgICAgKiBAcmV0dXJuIEZpbHRlckNvbmZpZyAJdGhlIDxjb2RlPkZpbHRlckNvbmZpZzwvY29kZT4gb2JqZWN0CisgICAgICoJCQkJdGhhdCBpbml0aWFsaXplZCB0aGlzIGZpbHRlcgorICAgICAqCisgICAgICogQHNpbmNlIFNlcnZsZXQgNC4wCisgICAgICovICAgIAorICAgIHB1YmxpYyBGaWx0ZXJDb25maWcgZ2V0RmlsdGVyQ29uZmlnKCkgeworCXJldHVybiBjb25maWc7CisgICAgfQorIAorICAgIAorICAgIC8qKgorICAgICAqIDxwPlJldHVybnMgYSByZWZlcmVuY2UgdG8gdGhlIHtAbGluayBTZXJ2bGV0Q29udGV4dH0gaW4gd2hpY2ggdGhpcyBmaWx0ZXIKKyAgICAgKiBpcyBydW5uaW5nLiAgU2VlIHtAbGluayBGaWx0ZXJDb25maWcjZ2V0U2VydmxldENvbnRleHR9LjwvcD4KKyAgICAgKgorICAgICAqIDxwPlRoaXMgbWV0aG9kIGlzIHN1cHBsaWVkIGZvciBjb252ZW5pZW5jZS4gSXQgZ2V0cyB0aGUgCisgICAgICogY29udGV4dCBmcm9tIHRoZSBmaWx0ZXIncyA8Y29kZT5GaWx0ZXJDb25maWc8L2NvZGU+IG9iamVjdC4KKyAgICAgKgorICAgICAqIEByZXR1cm4gU2VydmxldENvbnRleHQgCXRoZSA8Y29kZT5TZXJ2bGV0Q29udGV4dDwvY29kZT4gb2JqZWN0CisgICAgICoJCQkJcGFzc2VkIHRvIHRoaXMgZmlsdGVyIGJ5IHRoZSA8Y29kZT5pbml0PC9jb2RlPgorICAgICAqCQkJCW1ldGhvZAorICAgICAqCisgICAgICogQHNpbmNlIFNlcnZsZXQgNC4wCisgICAgICovCisgICAgQE92ZXJyaWRlCisgICAgcHVibGljIFNlcnZsZXRDb250ZXh0IGdldFNlcnZsZXRDb250ZXh0KCkgeworICAgICAgICBGaWx0ZXJDb25maWcgc2MgPSBnZXRGaWx0ZXJDb25maWcoKTsKKyAgICAgICAgaWYgKHNjID09IG51bGwpIHsKKyAgICAgICAgICAgIHRocm93IG5ldyBJbGxlZ2FsU3RhdGVFeGNlcHRpb24oCisgICAgICAgICAgICAgICAgbFN0cmluZ3MuZ2V0U3RyaW5nKCJlcnIuZmlsdGVyX2NvbmZpZ19ub3RfaW5pdGlhbGl6ZWQiKSk7CisgICAgICAgIH0KKworICAgICAgICByZXR1cm4gc2MuZ2V0U2VydmxldENvbnRleHQoKTsKKyAgICB9CisKKworICAgIC8qKgorICAgICAqIDxwPkNhbGxlZCBieSB0aGUgc2VydmxldCBjb250YWluZXIgdG8gaW5kaWNhdGUgdG8gYSBmaWx0ZXIgdGhhdAorICAgICAqIGl0IGlzIGJlaW5nIHBsYWNlZCBpbnRvIHNlcnZpY2UuICBTZWUge0BsaW5rIEZpbHRlciNpbml0fS48L3A+CisgICAgICogCisgICAgICogPHA+VGhpcyBpbXBsZW1lbnRhdGlvbiBzdG9yZXMgdGhlIHtAbGluayBGaWx0ZXJDb25maWd9CisgICAgICogb2JqZWN0IGl0IHJlY2VpdmVzIGZyb20gdGhlIHNlcnZsZXQgY29udGFpbmVyIGZvciBsYXRlciB1c2UuCisgICAgICogV2hlbiBvdmVycmlkaW5nIHRoaXMgZm9ybSBvZiB0aGUgbWV0aG9kLCBjYWxsIAorICAgICAqIDxjb2RlPnN1cGVyLmluaXQoY29uZmlnKTwvY29kZT4uCisgICAgICogCisgICAgICogQHBhcmFtIGNvbmZpZyAJCQl0aGUgPGNvZGU+RmlsdGVyQ29uZmlnPC9jb2RlPiBvYmplY3QKKyAgIC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2aWEge0BsaW5rCisgICAgICogI2dldEZpbHRlckNvbmZpZ30uIAorICAgICAqIAorICAgICAqIEBleGNlcHRpb24gU2VydmxldEV4Y2VwdGlvbiAJaWYgYW4gZXhjZXB0aW9uIG9jY3VycyB0aGF0CisgICAgICoJCQkJCWludGVycnVwdHMgdGhlIHNlcnZsZXQncworICAgICAqCQkJCQlub3JtYWwgb3BlcmF0aW9uCisgICAgICoKKyAgICAgKiBAc2luY2UgU2VydmxldCA0LjAKKyAgICAgKi8KKyAgICBwdWJsaWMgdm9pZCBpbml0KCkgdGhyb3dzIFNlcnZsZXRFeGNlcHRpb24geworCisgICAgfQorICAgIAorCisgICAgLyoqCisgICAgICogPHA+UmV0dXJucyB0aGUgbmFtZSBvZiB0aGlzIGZpbHRlciBpbnN0YW5jZS4KKyAgICAgKiBTZWUge0BsaW5rIEZpbHRlckNvbmZpZyNnZXRGaWx0ZXJOYW1lfS48L3A+CisgICAgICoKKyAgICAgKiBAcmV0dXJuICAgICAgICAgIHRoZSBuYW1lIG9mIHRoaXMgZmlsdGVyIGluc3RhbmNlCisgICAgICoKKyAgICAgKiBAc2luY2UgU2VydmxldCA0LjAKKyAgICAgKi8KKyAgICBAT3ZlcnJpZGUKKyAgICBwdWJsaWMgU3RyaW5nIGdldEZpbHRlck5hbWUoKSB7CisgICAgICAgIEZpbHRlckNvbmZpZyBzYyA9IGdldEZpbHRlckNvbmZpZygpOworICAgICAgICBpZiAoc2MgPT0gbnVsbCkgeworICAgICAgICAgICAgdGhyb3cgbmV3IElsbGVnYWxTdGF0ZUV4Y2VwdGlvbigKKyAgICAgICAgICAgICAgICBsU3RyaW5ncy5nZXRTdHJpbmcoImVyci5zZXJ2bGV0X2NvbmZpZ19ub3RfaW5pdGlhbGl6ZWQiKSk7CisgICAgICAgIH0KKworICAgICAgICByZXR1cm4gc2MuZ2V0RmlsdGVyTmFtZSgpOworICAgIH0KK30KZGlmZiAtLWdpdCBhL3RoaXJkX3BhcnR5L3NlcnZsZXQt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ICAKKworICAgIC8qKgorICAgICAqCisgICAgICogRG9lcyBub3RoaW5nLiBBbGwgb2YgdGhlIHNlcnZsZXQgaW5pdGlhbGl6YXRpb24KKyAgICAgKiBpcyBkb25lIGJ5IG9uZSBvZiB0aGUgPGNvZGU+aW5pdDwvY29kZT4gbWV0aG9kcy4KKyAgICAgKgorICAgICAqLworICAgIHB1YmxpYyBHZW5lcmljU2VydmxldCgpIHsgfQorICAgIAorICAgIAorICAgIC8qKgorICAgICAqIENhbGxlZCBieSB0aGUgc2VydmxldCBjb250YWluZXIgdG8gaW5kaWNhdGUgdG8gYSBzZXJ2bGV0IHRoYXQgdGhlCisgICAgICogc2VydmxldCBpcyBiZWluZyB0YWtlbiBvdXQgb2Ygc2VydmljZS4gIFNlZSB7QGxpbmsgU2VydmxldCNkZXN0cm95fS4KKyAgICAgKgorICAgICAqIAorICAgICAqLworICAgIHB1YmxpYyB2b2lkIGRlc3Ryb3koKSB7CisgICAgfQorICAgIAorICAgIAorICAgIC8qKgorICAgICAqIFJldHVybnMgYSA8Y29kZT5TdHJpbmc8L2NvZGU+IGNvbnRhaW5pbmcgdGhlIHZhbHVlIG9mIHRoZSBuYW1lZAorICAgICAqIGluaXRpYWxpemF0aW9uIHBhcmFtZXRlciwgb3IgPGNvZGU+bnVsbDwvY29kZT4gaWYgdGhlIHBhcmFtZXRlciBkb2VzCisgICAgICogbm90IGV4aXN0LiAgU2VlIHtAbGluayBTZXJ2bGV0Q29uZmlnI2dldEluaXRQYXJhbWV0ZXJ9LgorICAgICAqCisgICAgICogPHA+VGhpcyBtZXRob2QgaXMgc3VwcGxpZWQgZm9yIGNvbnZlbmllbmNlLiBJdCBnZXRzIHRoZSAKKyAgICAgKiB2YWx1ZSBvZiB0aGUgbmFtZWQgcGFyYW1ldGVyIGZyb20gdGhlIHNlcnZsZXQncyAKKyAgICAgKiA8Y29kZT5TZXJ2bGV0Q29uZmlnPC9jb2RlPiBvYmplY3QuCisgICAgICoKKyAgICAgKiBAcGFy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CQl0aGF0IGluaXRpYWxpemVkIHRoaXMgc2VydmxldAorICAgICAqLyAgICAKKyAgICBwdWJsaWMgU2VydmxldENvbmZpZyBnZXRTZXJ2bGV0Q29uZmlnKCkgeworCXJldHVybiBjb25maWc7CisgICAgfQorIAorICAgIAorICAgIC8qKgorICAgICAqIFJldHVybnMgYSByZWZlcmVuY2UgdG8gdGhlIHtAbGluayBTZXJ2bGV0Q29udGV4dH0gaW4gd2hpY2ggdGhpcyBzZXJ2bGV0CisgICAgICogaXMgcnVubmluZy4gIFNlZSB7QGxpbmsgU2VydmxldENvbmZpZyNnZXRTZXJ2bGV0Q29udGV4dH0uCisgICAgICoKKyAgICAgKiA8cD5UaGlzIG1ldGhvZCBpcyBzdXBwbGllZCBmb3IgY29udmVuaWVuY2UuIEl0IGdldHMgdGhlIAorICAgICAqIGNvbnRleHQgZnJvbSB0aGUgc2VydmxldCdzIDxjb2RlPlNlcnZsZXRDb25maWc8L2NvZGU+IG9iamVjdC4KKyAgICAgKgorICAgICAqCisgICAgICogQHJldHVybiBTZXJ2bGV0Q29udGV4dCAJdGhlIDxjb2RlPlNlcnZsZXRDb250ZXh0PC9jb2RlPiBvYmplY3QKKyAgICAgKgkJCQlwYXNzZWQgdG8gdGhpcyBzZXJ2bGV0IGJ5IHRoZSA8Y29kZT5pbml0PC9jb2RlPgorICAgICAqCQkJCW1ldGhvZAorICAgICAqLworICAgIHB1YmxpYyBTZXJ2bGV0Q29udGV4dCBnZXRTZXJ2bGV0Q29udGV4dCgpIHsKKyAgICAgICAgU2VydmxldENvbmZpZyBzYyA9IGdldFNlcnZsZXRDb25maWcoKTsKKyAgICAgICAgaWYgKHNjID09IG51bGwpIHsKKyAgICAgICAgICAgIHRocm93IG5ldyBJbGxlZ2FsU3RhdGVFeGNlcHRpb24oCisgICAgICAgICAgICAgICAgbFN0cmluZ3MuZ2V0U3RyaW5nKCJlcnIuc2VydmxldF9jb25maWdfbm90X2luaXRpYWxpemVkIikpOworICAgICAgICB9Cis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kZT4gb2JqZWN0CisgICAgICoJCQl0aGF0IGNvbnRhaW5zIHRoZSBjbGllbnQncyByZXF1ZXN0CisgICAgICoKKyAgICAgKiBAcGFyYW0gcmVzIAl0aGUgPGNvZGU+U2VydmxldFJlc3BvbnNlPC9jb2RlPiBvYmplY3QKKyAgICAgKgkJCXRoYXQgd2lsbCBjb250YWluIHRoZSBzZXJ2bGV0J3MgcmVzcG9uc2UKKyAgICAgKgorICAgICAqIEBleGNlcHRpb24gU2VydmxldEV4Y2VwdGlvbiAJaWYgYW4gZXhjZXB0aW9uIG9jY3VycyB0aGF0CisgICAgICoJCQkJCWludGVyZmVyZXMgd2l0aCB0aGUgc2VydmxldCdzCisgICAgICoJCQkJCW5vcm1hbCBvcGVyYXRpb24gb2NjdXJyZWQKKyAgICAgKgorICAgICAqIEBleGNlcHRpb24gSU9FeGNlcHRpb24gCQlpZiBhbiBpbnB1dCBvciBvdXRwdXQKKyAgICAgKgkJCQkJZXhjZXB0aW9uIG9jY3VycworICAgICAqLworCisgICAgcHVibGljIGFic3RyYWN0IHZvaWQgc2VydmljZShTZXJ2bGV0UmVxdWVzdCByZXEsIFNlcnZsZXRSZXNwb25zZSByZXMpCisJdGhyb3dzIFNlcnZsZXRFeGNlcHRpb24sIElPRXhjZXB0aW9uOworICAgIAorCisgICAgLyoqCisgICAgICogUmV0dXJucyB0aGUgbmFtZSBvZiB0aGlzIHNlcnZsZXQgaW5zdGFuY2UuCisgICAgICogU2VlIHtAbGluayBTZXJ2bGV0Q29uZmlnI2dldFNlcnZsZXROYW1lfS4KKyAgICAgKgorICAgICAqIEByZXR1cm4gICAgICAgICAgdGhlIG5hbWUgb2YgdGhpcyBzZXJ2bGV0IGluc3RhbmNlCisgICAgICovCisgICAgcHVibGljIFN0cmluZyBnZXRTZXJ2bGV0TmFtZSgpIHsKKyAgICAgICAgU2VydmxldENvbmZpZyBzYyA9IGdldFNlcnZsZXRDb25maWcoKTsKKyAgICAgICAgaWYgKHNjID09IG51bGwpI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3aXRoIHNwZWNpZmllZCB7QGxpbmsgSHR0cENvbnN0cmFpbnRFbGVtZW50fQorICAgICAqIHZhbHVlLgorICAgICAqCisgICAgICogQHBhcmFtIG1ldGhvZE5hbWUgdGhlIG5hbWUgb2YgYW4gSFRUUCBwcm90b2NvbCBtZXRob2QuIFRoZSBuYW1lIG11c3QKKyAgICAgKiBub3QgYmUgbnVsbCwgb3IgdGhlIGVtcHR5IHN0cmluZywgYW5kIG11c3QgYmUgYSBsZWdpdGltYXRlIEhUVFAKKyAgICAgKiBNZXRob2QgbmFtZSBhcyBkZWZpbmVkIGJ5IFJGQyAyNjE2CisgICAgICoKKyAgICAgKiBAcGFyYW0gY29uc3RyYWludCB0aGUgSFRUUGNvbnN0cmFpbnRFbGVtZW50IHZhbHVlIHRvIGFzc2lnbiB0byB0aGUKKyAgICAgKiBuYW1lZCBIVFRQIG1ldGhvZAorICAgICAqLworICAgIHB1YmxpYyBIdHRwTWV0aG9kQ29uc3RyYWludEVsZW1lbnQoU3RyaW5nIG1ldGhvZE5hbWUsCisgICAgICAgICAgICBIdHRwQ29uc3RyYWludEVsZW1lbnQgY29uc3RyYWludCkgeworICAgICAgICBzdXBlcihjb25zdHJhaW50LmdldEVtcHR5Um9sZVNlbWFudGljKCksCisgICAgICAgICAgICAgICAgY29uc3RyYWludC5nZXRUcmFuc3BvcnRHdWFyYW50ZWUoKSwKKyAgICAgICAgICAgICAgICBjb25zdHJhaW50LmdldFJvbGVzQWxsb3dlZCgpKTsKKyAgICAgICAgaWYgKG1ldGhvZE5hbWUgPT0gbnVsbCB8fCBtZXRob2ROYW1lLmxlbmd0aCgpID09IDApIHsKKyAgICAgICAgICAgIHRocm93IG5ldyBJbGxlZ2FsQXJndW1lbnRFeGNlcHRpb24oImludmFsaWQgSFRUUCBtZXRob2QgbmFtZSIpOworICAgICAgICB9CisgICAgICAgIHRoaXMubWV0aG9kTmFtZSA9IG1ldGhvZE5hbWU7CisgICAgfQorCisgICAgLyoqCisgICAgICogR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jYXNlcywgcHJlbGltaW5hcnkgcmVnaXN0cmF0aW9ucyB3aWxsIGJlIGNvbXBsZXRlZCBieSBhbgorICogYXBwcm9wcmlhdGUsIGNvbnRhaW5lci1wcm92aWRlZCB7QGxpbmsgU2VydmxldENvbnRhaW5lckluaXRpYWxpemVyfS4KKyAqCisgKiBAc2luY2UgU2VydmxldCAzLjAKKyAqLworcHVibGljIGludGVyZmFjZSBSZWdpc3RyYXRpb24geworCisgICAgLyoqCisgICAgICogR2V0cyB0aGUgbmFtZSBvZiB0aGUgU2VydmxldCBvciBGaWx0ZXIgdGhhdCBpcyByZXByZXNlbnRlZCBieSB0aGlzCisgICAgICogUmVnaXN0cmF0aW9uLgorICAgICAqCisgICAgICogQHJldHVybiB0aGUgbmFtZSBvZiB0aGUgU2VydmxldCBvciBGaWx0ZXIgdGhhdCBpcyByZXByZXNlbnRlZCBieSB0aGlzCisgICAgICogUmVnaXN0cmF0aW9uCisgICAgICovCisgICAgcHVibGljIFN0cmluZyBnZXROYW1lKCk7CisKKyAgICAvKioKKyAgICAgKiBHZXRzIHRoZSBmdWxseSBxdWFsaWZpZWQgY2xhc3MgbmFtZSBvZiB0aGUgU2VydmxldCBvciBGaWx0ZXIgdGhhdAorICAgICAqIGlzIHJlcHJlc2VudGVkIGJ5IHRoaXMgUmVnaXN0cmF0aW9uLgorICAgICAqCisgICAgICogQHJldHVybiB0aGUgZnVsbHkgcXVhbGlmaWVkIGNsYXNzIG5hbWUgb2YgdGhlIFNlcnZsZXQgb3IgRmlsdGVyCisgICAgICogdGhhdCBpcyByZXByZXNlbnRlZCBieSB0aGlzIFJlZ2lzdHJhdGlvbiwgb3IgbnVsbCBpZiB0aGlzCisgICAgICogUmVnaXN0cmF0aW9uIGlzIHByZWxpbWluYXJ5CisgICAgICovCisgICAgcHVibGljIFN0cmluZyBnZXRDbGFzc05hbWUoKTsKKworICAgIC8qKgorICAgICAqIFNldHMgdGhlIGluaXRpYWxpemF0aW9uIHBhcmFtZXRlciB3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B2ZXJzaW9uLCBhbmQgY29weXJpZ2h0LgorICoKKyAqIEBhdXRob3IgCVZhcmlvdXMKKyAqCisgKiBAc2VlIAlHZW5lcmljU2VydmxldAorICogQHNlZSAJamF2YXguc2VydmxldC5odHRwLkh0dHBTZXJ2bGV0CisgKgorICovCisKKworcHVibGljIGludGVyZmFjZSBTZXJ2bGV0IHsKKworICAgIC8qKgorICAgICAqIENhbGxlZCBieSB0aGUgc2VydmxldCBjb250YWluZXIgdG8gaW5kaWNhdGUgdG8gYSBzZXJ2bGV0IHRoYXQgdGhlIAorICAgICAqIHNlcnZsZXQgaXMgYmVpbmcgcGxhY2VkIGludG8gc2VydmljZS4KKyAgICAgKgorICAgICAqIDxwPlRoZSBzZXJ2bGV0IGNvbnRhaW5lciBjYWxscyB0aGUgPGNvZGU+aW5pdDwvY29kZT4KKyAgICAgKiBtZXRob2QgZXhhY3RseSBvbmNlIGFmdGVyIGluc3RhbnRpYXRpbmcgdGhlIHNlcnZsZXQuCisgICAgICogVGhlIDxjb2RlPmluaXQ8L2NvZGU+IG1ldGhvZCBtdXN0IGNvbXBsZXRlIHN1Y2Nlc3NmdWxseQorICAgICAqIGJlZm9yZSB0aGUgc2VydmxldCBjYW4gcmVjZWl2ZSBhbnkgcmVxdWVzdHMuCisgICAgICoKKyAgICAgKiA8cD5UaGUgc2VydmxldCBjb250YWluZXIgY2Fubm90IHBsYWNlIHRoZSBzZXJ2bGV0IGludG8gc2VydmljZQorICAgICAqIGlmIHRoZSA8Y29kZT5pbml0PC9jb2RlPiBtZXRob2QKKyAgICAgKiA8b2w+CisgICAgICogPGxpPlRocm93cyBhIDxjb2RlPlNlcnZsZXRFeGNlcHRpb248L2NvZGU+CisgICAgICogPGxpPkRvZXMgbm90IHJldHVybiB3aXRoaW4gYSB0aW1lIHBlcmlvZCBkZWZpbmVkIGJ5IHRoZSBXZWIgc2VydmVyCisgICAgICogPC9vbD4KKyAgICAgKgorICAgICAqCisgICAgICogQHBhcmFtIGNvbmZpZwkJCWEgPGNvZGU+U2VydmxldENvbmZpZzwvY29kZT4gb2JqZWN0IAorICAgICAqCQkJCQljb250YWluaW5nIHRoZSBzZXJ2bGV0J3MKKyAgICAgKiAJCQkJCWNvbmZpZ3VyYXRpb24gYW5kIGluaXRpYWxpemF0aW9uIHBhcmFtZXRlcnMKKyAgICAgKgorICAgICAqIEBleGNlcHRpb24gU2VydmxldEV4Y2VwdGlvbiAJaWYgYW4gZXhjZXB0aW9uIGhhcyBvY2N1cnJlZCB0aGF0CisgICAgICoJCQkJCWludGVyZmVyZXMgd2l0aCB0aGUgc2VydmxldCdzIG5vcm1hbAorICAgICAqCQkJCQlvcGVyYXRpb24KKyAgICAgKgorICAgICAqIEBzZWUgCQkJCVVuYXZhaWxhYmxlRXhjZXB0aW9uCisgICAgICogQHNlZSAJCQkJI2dldFNlcnZsZXRDb25maWcKKyAgICAgKgorICAgICAqLworCisgICAgcHVibGljIHZvaWQgaW5pdChTZXJ2bGV0Q29uZmlnIGNvbmZpZykgdGhyb3dzIFNlcnZsZXRFeGNlcHRpb247CisgICAgCisgICAgCisKKyAgICAvKioKKyAgICAgKgorICAgICAqIFJldHVybnMgYSB7QGxpbmsgU2VydmxldENvbmZpZ30gb2JqZWN0LCB3aGljaCBjb250YWlucworICAgICAqIGluaXRpYWxpemF0aW9uIGFuZCBzdGFydHVwIHBhcmFtZXRlcnMgZm9yIHRoaXMgc2VydmxldC4KKyAgICAgKiBUaGUgPGNvZGU+U2VydmxldENvbmZpZzwvY29kZT4gb2JqZWN0IHJldHVybmVkIGlzIHRoZSBvbmUgCisgICAgICogcGFzc2VkIHRvIHRoZSA8Y29kZT5pbml0PC9jb2RlPiBtZXRob2QuIAorICAgICAqCisgICAgICogPHA+SW1wbGVtZW50YXRpb25zIG9mIHRoaXMgaW50ZXJmYWNlIGFyZSByZXNwb25zaWJsZSBmb3Igc3RvcmluZyB0aGUgCisgICAgICogPGNvZGU+U2VydmxldENvbmZpZzwvY29kZT4gb2JqZWN0I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c2VjdXJpdHkgY29uc2Npb3VzIGVudmlyb25tZW50LCB0aGUgc2VydmxldCBjb250YWluZXIgbWF5CisgICAgICogcmV0dXJuIDxjb2RlPm51bGw8L2NvZGU+IGZvciBhIGdpdmVuIFVSTC4KKyAgICAgKgorICAgICAqIEBwYXJhbSB1cmlwYXRoIAlhIDxjb2RlPlN0cmluZzwvY29kZT4gc3BlY2lmeWluZyB0aGUgY29udGV4dCBwYXRoIG9mCisgICAgICoJCQlhbm90aGVyIHdlYiBhcHBsaWNhdGlvbiBpbiB0aGUgY29udGFpbmVyLgorICAgICAqIEByZXR1cm4JCXRoZSA8Y29kZT5TZXJ2bGV0Q29udGV4dDwvY29kZT4gb2JqZWN0IHRoYXQKKyAgICAgKgkJCWNvcnJlc3BvbmRzIHRvIHRoZSBuYW1lZCBVUkwsIG9yIG51bGwgaWYgZWl0aGVyCisJCQlub25lIGV4aXN0cyBvciB0aGUgY29udGFpbmVyIHdpc2hlcyB0byByZXN0cmljdAorICAgICAqIAkJCXRoaXMgYWNjZXNzLgorICAgICAqCisgICAgICogQHNlZSAJCVJlcXVlc3REaXNwYXRjaGVyCisgICAgICovCisgICAgcHVibGljIFNlcnZsZXRDb250ZXh0IGdldENvbnRleHQoU3RyaW5nIHVyaXBhdGgpOworCisKKyAgICAvKioKKyAgICAgKiBSZXR1cm5zIHRoZSBtYWpvciB2ZXJzaW9uIG9mIHRoZSBTZXJ2bGV0IEFQSSB0aGF0IHRoaXMKKyAgICAgKiBzZXJ2bGV0IGNvbnRhaW5lciBzdXBwb3J0cy4gQWxsIGltcGxlbWVudGF0aW9ucyB0aGF0IGNvbXBseQorICAgICAqIHdpdGggVmVyc2lvbiA0LjAgbXVzdCBoYXZlIHRoaXMgbWV0aG9kIHJldHVybiB0aGUgaW50ZWdlciA0LgorICAgICAqCisgICAgICogQHJldHVybiA0CisgICAgICovCisgICAgcHVibGljIGludCBnZXRNYWpvclZlcnNpb24oKTsKKworCisgICAgLyoqCisgICAgICogUmV0dX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gICAgICoKKyAgICAgKiBAdGhyb3dzIE51bGxQb2ludGVyRXhjZXB0aW9uIGlmIHRoZSBhcmd1bWVudCB7QGNvZGUgbmFtZX0gaXMKKyAgICAgKiB7QGNvZGUgbnVsbH0KKyAgICAgKgorICAgICAqIEBzZWUgU2VydmxldENvbmZpZyNnZXRJbml0UGFyYW1ldGVyCisgICAgICovCisgICAgcHVibGljIFN0cmluZyBnZXRJbml0UGFyYW1ldGVyKFN0cmluZyBuYW1lKTsKKworCisgICAgLyoqCisgICAgICogUmV0dXJucyB0aGUgbmFtZXMgb2YgdGhlIGNvbnRleHQncyBpbml0aWFsaXphdGlvbiBwYXJhbWV0ZXJzIGFzIGFuCisgICAgICogPGNvZGU+RW51bWVyYXRpb248L2NvZGU+IG9mIDxjb2RlPlN0cmluZzwvY29kZT4gb2JqZWN0cywgb3IgYW4KKyAgICAgKiBlbXB0eSA8Y29kZT5FbnVtZXJhdGlvbjwvY29kZT4gaWYgdGhlIGNvbnRleHQgaGFzIG5vIGluaXRpYWxpemF0aW9uCisgICAgICogcGFyYW1ldGVycy4KKyAgICAgKgorICAgICAqIEByZXR1cm4gCQlhbiA8Y29kZT5FbnVtZXJhdGlvbjwvY29kZT4gb2YgPGNvZGU+U3RyaW5nPC9jb2RlPgorICAgICAqICAgICAgICAgICAgICAgICAgb2JqZWN0cyBjb250YWluaW5nIHRoZSBuYW1lcyBvZiB0aGUgY29udGV4dCdzCisgICAgICogICAgICAgICAgICAgICAgICBpbml0aWFsaXphdGlvbiBwYXJhbWV0ZXJzCisgICAgICoKKyAgICAgKiBAc2VlIFNlcnZsZXRDb25maWcjZ2V0SW5pdFBhcmFtZXRlcgorICAgICAqLworICAgIHB1YmxpYyBFbnVtZXJhdGlvbjxTdHJpbmc+IGdldEluaXRQYXJhbWV0ZXJOYW1lcygpOworCisKKyAgICAvKioKKyAgICAgKiBTZXRzIHRoZSBjb250ZXh0IGluaXRpYWxpemF0aW9uIHBhcmFtZXRlciB3aXRoIHRoZSB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IHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZAorICogbGltaXRhdGlvbnMgdW5kZXIgdGhlIExpY2Vuc2UuCisgKi8KKworcGFja2FnZSBqYXZheC5zZXJ2bGV0OworCisvKiogCisgKiBUaGlzIGlzIHRoZSBldmVudCBjbGFzcyBmb3Igbm90aWZpY2F0aW9ucyBhYm91dCBjaGFuZ2VzIHRvCisgKiB0aGUgc2VydmxldCBjb250ZXh0IG9mIGEgd2ViIGFwcGxpY2F0aW9uLgorICogQHNlZSBTZXJ2bGV0Q29udGV4dExpc3RlbmVyCisgKgorICogQHNpbmNlIFNlcnZsZXQgMi4zCisgKi8KKworcHVibGljIGNsYXNzIFNlcnZsZXRDb250ZXh0RXZlbnQgZXh0ZW5kcyBqYXZhLnV0aWwuRXZlbnRPYmplY3QgeyAKKworICAgIHByaXZhdGUgc3RhdGljIGZpbmFsIGxvbmcgc2VyaWFsVmVyc2lvblVJRCA9IC03NTAxNzAxNjM2MTM0MjIyNDIzTDsKKworICAgIC8qKiBDb25zdHJ1Y3QgYSBTZXJ2bGV0Q29udGV4dEV2ZW50IGZyb20gdGhlIGdpdmVuIGNvbnRleHQuCisgICAgICoKKyAgICAgKiBAcGFyYW0gc291cmNlIC0gdGhlIFNlcnZsZXRDb250ZXh0IHRoYXQgaXMgc2VuZGluZyB0aGUgZXZlbnQuCisgICAgICovCisgICAgcHVibGljIFNlcnZsZXRDb250ZXh0RXZlbnQoU2VydmxldENvbnRleHQgc291cmNlKSB7CisgICAgICAgIHN1cGVyKHNvdXJjZSk7CisgICAgfQorICAgIAorICAgIC8qKgorICAgICAqIFJldHVybiB0aGUgU2VydmxldENvbnRleHQgdGhhdCBjaGFuZ2VkLgorICAgICAqCisgICAgICogQHJldHVybiB0aGUgU2VydmxldENvbnRleHQgdGhhdCBzZW50IHRoZSBldmVudC4KKyAgICAgKi8KKyAgICBwdWJsaWM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gorICogPHA+SW1wbGVtZW50YXRpb25zIG9mIHRoaXMgaW50ZXJmYWNlIGFyZSBpbnZva2VkIGF0IHRoZWlyCisgKiB7QGxpbmsgI2NvbnRleHRJbml0aWFsaXplZH0gbWV0aG9kIGluIHRoZSBvcmRlciBpbiB3aGljaCB0aGV5IGhhdmUgYmVlbgorICogZGVjbGFyZWQsIGFuZCBhdCB0aGVpciB7QGxpbmsgI2NvbnRleHREZXN0cm95ZWR9IG1ldGhvZCBpbiByZXZlcnNlCisgKiBvcmRlci4KKyAqCisgKiBAc2VlIFNlcnZsZXRDb250ZXh0RXZlbnQKKyAqCisgKiBAc2luY2UgU2VydmxldCAyLjMKKyAqLworcHVibGljIGludGVyZmFjZSBTZXJ2bGV0Q29udGV4dExpc3RlbmVyIGV4dGVuZHMgRXZlbnRMaXN0ZW5lciB7CisKKyAgICAvKioKKyAgICAgKiBSZWNlaXZlcyBub3RpZmljYXRpb24gdGhhdCB0aGUgd2ViIGFwcGxpY2F0aW9uIGluaXRpYWxpemF0aW9uCisgICAgICogcHJvY2VzcyBpcyBzdGFydGluZy4KKyAgICAgKgorICAgICAqIDxwPkFsbCBTZXJ2bGV0Q29udGV4dExpc3RlbmVycyBhcmUgbm90aWZpZWQgb2YgY29udGV4dAorICAgICAqIGluaXRpYWxpemF0aW9uIGJlZm9yZSBhbnkgZmlsdGVycyBvciBzZXJ2bGV0cyBpbiB0aGUgd2ViCisgICAgICogYXBwbGljYXRpb24gYXJlIGluaXRpYWxpemVkLgorICAgICAqCisgICAgICogQHBhcmFtIHNjZSB0aGUgU2VydmxldENvbnRleHRFdmVudCBjb250YWluaW5nIHRoZSBTZXJ2bGV0Q29udGV4dAorICAgICAqIHRoYXQgaXMgYmVpbmcgaW5pdGlhbGl6ZWQKKyAgICAgKgorICAgICAqIEBpbXBsU3BlYworICAgICAqIFRoZSBkZWZhdWx0IGltcGxlbWVudGF0aW9uIHRha2VzIG5vIGFjdGlvbi4KKyAgICAgKi8KKyAgICBkZWZh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YXguc2VydmxldDsKKworCisvKioKKyAqIERlZmluZXMgYSBnZW5lcmFsIGV4Y2VwdGlvbiBhIHNlcnZsZXQgY2FuIHRocm93IHdoZW4gaXQKKyAqIGVuY291bnRlcnMgZGlmZmljdWx0eS4KKyAqCisgKiBAYXV0aG9yIAlWYXJpb3VzCisgKi8KKworCitwdWJsaWMgY2xhc3MgU2VydmxldEV4Y2VwdGlvbiBleHRlbmRzIEV4Y2VwdGlvbiB7CisKKyAgICBwcml2YXRlIFRocm93YWJsZSByb290Q2F1c2U7CisKKworCisKKworICAgIC8qKgorICAgICAqIENvbnN0cnVjdHMgYSBuZXcgc2VydmxldCBleGNlcHRpb24uCisgICAgICoKKyAgICAgKi8KKworICAgIHB1YmxpYyBTZXJ2bGV0RXhjZXB0aW9uKCkgeworCXN1cGVyKCk7CisgICAgfQorICAgIAorICAgCisKKyAgICAKKworICAgIC8qKgorICAgICAqIENvbnN0cnVjdHMgYSBuZXcgc2VydmxldCBleGNlcHRpb24gd2l0aCB0aGUKKyAgICAgKiBzcGVjaWZpZWQgbWVzc2FnZS4gVGhlIG1lc3NhZ2UgY2FuIGJlIHdyaXR0ZW4gCisgICAgICogdG8gdGhlIHNlcnZlciBsb2cgYW5kL29yIGRpc3BsYXllZCBmb3IgdGhlIHVzZXIuIAorICAgICAqCisgICAgICogQHBhcmFtIG1lc3NhZ2UgCQlhIDxjb2RlPlN0cmluZzwvY29kZT4gCisgICAgICoJCQkJc3BlY2lmeWluZyB0aGUgdGV4dCBvZiAKKyAgICAgKgkJCQl0aGUgZXhjZXB0aW9uIG1lc3NhZ2UKKyAgICAgKgorICAgICAqLworCisgICAgcHVibGljIFNlcnZsZXRFeGNlcHRpb24oU3RyaW5nIG1lc3NhZ2UpIHsKKwlzdXBlcihtZXNzYWdlKTsKKyAgICB9CisgICAgCisgICAKKyAgIAorICAgIAorCisgICAgLyoqCisgICAgICogQ29uc3RydWN0cyBhIG5ldyBzZXJ2bGV0IGV4Y2VwdGlvbiB3aG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B1dCBleGNlcHRpb24gb2NjdXJyZWQKKyAgICAgKgorICAgICAqLworCisgICAgcHVibGljIHZvaWQgcHJpbnQoU3RyaW5nIHMpIHRocm93cyBJT0V4Y2VwdGlvbiB7CisgICAgICAgIGlmIChzPT1udWxsKSBzPSJudWxsIjsKKyAgICAgICAgaW50IGxlbiA9IHMubGVuZ3RoKCk7CisgICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbGVuOyBpKyspIHsKKyAgICAgICAgICAgIGNoYXIgYyA9IHMuY2hhckF0IChpKTsKKworICAgICAgICAgICAgLy8KKyAgICAgICAgICAgIC8vIFhYWCBOT1RFOiAgVGhpcyBpcyBjbGVhcmx5IGluY29ycmVjdCBmb3IgbWFueSBzdHJpbmdzLAorICAgICAgICAgICAgLy8gYnV0IGlzIHRoZSBvbmx5IGNvbnNpc3RlbnQgYXBwcm9hY2ggd2l0aGluIHRoZSBjdXJyZW50CisgICAgICAgICAgICAvLyBzZXJ2bGV0IGZyYW1ld29yay4gIEl0IG11c3Qgc3VmZmljZSB1bnRpbCBzZXJ2bGV0IG91dHB1dAorICAgICAgICAgICAgLy8gc3RyZWFtcyBwcm9wZXJseSBlbmNvZGUgdGhlaXIgb3V0cHV0LgorICAgICAgICAgICAgLy8KKyAgICAgICAgICAgIGlmICgoYyAmIDB4ZmYwMCkgIT0gMCkgeyAgICAgICAgLy8gaGlnaCBvcmRlciBieXRlIG11c3QgYmUgemVybworICAgICAgICAgICAgICAgIFN0cmluZyBlcnJNc2cgPSBsU3RyaW5ncy5nZXRTdHJpbmcoImVyci5ub3RfaXNvODg1OV8xIik7CisgICAgICAgICAgICAgICAgT2JqZWN0W10gZXJyQXJncyA9IG5ldyBPYmplY3RbMV07CisgICAgICAgICAgICAgICAgZXJyQXJnc1swXSA9IENoYXJhY3Rlci52YWx1ZU9mKGMpOworICAgICAgICAgICAgICAgIGVyck1zZyA9IE1lc3NhZ2VGb3JtYXQuZm9ybWF0KGVyck1zZywgZXJyQXJncyk7CisgICAgICAgICAgICAgICAgdGhyb3cgbmV3IENoYXJDb252ZXJzaW9uRXhjZXB0aW9uKGVyck1zZyk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICB3cml0ZSAoYyk7CisgICAgICAgIH0KKyAgICB9CisKKworCisgICAgLyoqCisgICAgICogV3JpdGVzIGEgPGNvZGU+Ym9vbGVhbjwvY29kZT4gdmFsdWUgdG8gdGhlIGNsaWVudCwKKyAgICAgKiB3aXRoIG5vIGNhcnJpYWdlIHJldHVybi1saW5lIGZlZWQgKENSTEYpIAorICAgICAqIGNoYXJhY3RlciBhdCB0aGUgZW5kLgorICAgICAqCisgICAgICogQHBhcmFtIGIgICAgICAgICAgICAgICAgICAgICAgIHRoZSA8Y29kZT5ib29sZWFuPC9jb2RlPiB2YWx1ZSAKKyAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8gc2VuZCB0byB0aGUgY2xpZW50CisgICAgICoKKyAgICAgKiBAZXhjZXB0aW9uIElPRXhjZXB0aW9uICAgICAgICAgaWYgYW4gaW5wdXQgb3Igb3V0cHV0IGV4Y2VwdGlvbiBvY2N1cnJlZAorICAgICAqCisgICAgICovCisKKyAgICBwdWJsaWMgdm9pZCBwcmludChib29sZWFuIGIpIHRocm93cyBJT0V4Y2VwdGlvbiB7CisgICAgICAgIFN0cmluZyBtc2c7CisgICAgICAgIGlmIChiKSB7CisgICAgICAgICAgICBtc2cgPSBsU3RyaW5ncy5nZXRTdHJpbmcoInZhbHVlLnRydWUiKTsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIG1zZyA9IGxTdHJpbmdzLmdldFN0cmluZygidmFsdWUuZmFsc2UiKTsKKyAgICAgICAgfQorICAgICAgICBwcmludChtc2cpOworICAgIH0KKworCisKKyAgICAvKioKKyAgICAgKiBXcml0ZXMgYSBjaGFyYWN0ZXIgdG8gdGhlIGNsaWVudCwKKyAgICAgKiB3aXRoIG5vIGNhcnJpYWdlIHJldHVybi1saW5lIGZlZWQgKENSTEYpIAorICAgICAqIGF0IHRoZSBlbmQuCisgICAgICoKKyAgICAgKiBAcGFyYW0gYyAgICAgICAgICAgICAgICAgICAgICAgdGhlIGNoYXJhY3RlciB0byBzZW5kIHRvIHRoZSBjbGllbnQKKyAgICAgKgorICAgICAqIEBleGNlcHRpb24gSU9FeGNlcHRpb24gICAgICAgICBpZiBhbiBpbnB1dCBvciBvdXRwdXQgZXhjZXB0aW9uIG9jY3VycmVkCisgICAgICoKKyAgICAgKi8KKworICAgIHB1YmxpYyB2b2lkIHByaW50KGNoYXIgYykgdGhyb3dzIElPRXhjZXB0aW9uIHsKKyAgICAgICAgcHJpbnQoU3RyaW5nLnZhbHVlT2YoYykpOworICAgIH0KKworCisKKworICAgIC8qKgorICAgICAqCisgICAgICogV3JpdGVzIGFuIGludCB0byB0aGUgY2xpZW50LAorICAgICAqIHdpdGggbm8gY2FycmlhZ2UgcmV0dXJuLWxpbmUgZmVlZCAoQ1JMRikgCisgICAgICogYXQgdGhlIGVuZC4KKyAgICAgKgorICAgICAqIEBwYXJhbSBpICAgICAgICAgICAgICAgICAgICAgICB0aGUgaW50IHRvIHNlbmQgdG8gdGhlIGNsaWVudAorICAgICAqCisgICAgICogQGV4Y2VwdGlvbiBJT0V4Y2VwdGlvbiAgICAgICAgIGlmIGFuIGlucHV0IG9yIG91dHB1dCBleGNlcHRpb24gb2NjdXJyZWQKKyAgICAgKgorICAgICAqLyAgCisKKyAgICBwdWJsaWMgdm9pZCBwcmludChpbnQgaSkgdGhyb3dzIElPRXhjZXB0aW9uIHsKKyAgICAgICAgcHJpbnQoU3RyaW5nLnZhbHVlT2YoaSkpOworICAgIH0KKworCisKKyAKKyAgICAvKioKKyAgICAgKiAKKyAgICAgKiBXcml0ZXMgYSA8Y29kZT5sb25nPC9jb2RlPiB2YWx1ZSB0byB0aGUgY2xpZW50LAorICAgICAqIHdpdGggbm8gY2FycmlhZ2UgcmV0dXJuLWxpbmUgZmVlZCAoQ1JMRikgYXQgdGhlIGVuZC4KKyAgICAgKgorICAgICAqIEBwYXJhbSBsICAgICAgICAgICAgICAgICAgICAgICB0aGUgPGNvZGU+bG9uZzwvY29kZT4gdmFsdWUgCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvIHNlbmQgdG8gdGhlIGNsaWVudAorICAgICAqCisgICAgICogQGV4Y2VwdGlvbiBJT0V4Y2VwdGlvbiAgICAgICAgIGlmIGFuIGlucHV0IG9yIG91dHB1dCBleGNlcHRpb24gCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9jY3VycmVkCisgICAgICogCisgICAgICovCisKKyAgICBwdWJsaWMgdm9pZCBwcmludChsb25nIGwpIHRocm93cyBJT0V4Y2VwdGlvbiB7CisgICAgICAgIHByaW50KFN0cmluZy52YWx1ZU9mKGwpKTsKKyAgICB9CisKKworCisgICAgLyoqCisgICAgICoKKyAgICAgKiBXcml0ZXMgYSA8Y29kZT5mbG9hdDwvY29kZT4gdmFsdWUgdG8gdGhlIGNsaWVudCwKKyAgICAgKiB3aXRoIG5vIGNhcnJpYWdlIHJldHVybi1saW5lIGZlZWQgKENSTEYpIGF0IHRoZSBlbmQuCisgICAgICoKKyAgICAgKiBAcGFyYW0gZiAgICAgICAgICAgICAgICAgICAgICAgdGhlIDxjb2RlPmZsb2F0PC9jb2RlPiB2YWx1ZQorICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0byBzZW5kIHRvIHRoZSBjbGllbnQKKyAgICAgKgorICAgICAqIEBleGNlcHRpb24gSU9FeGNlcHRpb24gICAgICAgICBpZiBhbiBpbnB1dCBvciBvdXRwdXQgZXhjZXB0aW9uIG9jY3VycmVkCisgICAgICoKKyAgICAgKgorICAgICAqLworCisgICAgcHVibGljIHZvaWQgcHJpbnQoZmxvYXQgZikgdGhyb3dzIElPRXhjZXB0aW9uIHsKKyAgICAgICAgcHJpbnQoU3RyaW5nLnZhbHVlT2YoZikpOworICAgIH0KKworCisKKyAgICAvKioKKyAgICAgKgorICAgICAqIFdyaXRlcyBhIDxjb2RlPmRvdWJsZTwvY29kZT4gdmFsdWUgdG8gdGhlIGNsaWVudCwKKyAgICAgKiB3aXRoIG5vIGNhcnJpYWdlIHJldHVybi1saW5lIGZlZWQgKENSTEYpIGF0IHRoZSBlbmQuCisgICAgICogCisgICAgICogQHBhcmFtIGQgICAgICAgICAgICAgICAgICAgICAgIHRoZSA8Y29kZT5kb3VibGU8L2NvZGU+IHZhbHVlCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvIHNlbmQgdG8gdGhlIGNsaWVudAorICAgICAqCisgICAgICogQGV4Y2VwdGlvbiBJT0V4Y2VwdGlvbiAgICAgICAgIGlmIGFuIGlucHV0IG9yIG91dHB1dCBleGNlcHRpb24gb2NjdXJyZWQKKyAgICAgKgorICAgICAqLworCisgICAgcHVibGljIHZvaWQgcHJpbnQoZG91YmxlIGQpIHRocm93cyBJT0V4Y2VwdGlvbiB7CisgICAgICAgIHByaW50KFN0cmluZy52YWx1ZU9mKGQpKTsKKyAgICB9CisKKworCisgICAgLyoqCisgICAgICogV3JpdGVzIGEgY2FycmlhZ2UgcmV0dXJuLWxpbmUgZmVlZCAoQ1JMRikKKyAgICAgKiB0byB0aGUgY2xpZW50LgorICAgICAqCisgICAgICoKKyAgICAgKgorICAgICAqIEBleGNlcHRpb24gSU9FeGNlcHRpb24gICAgICAgICBpZiBhbiBpbnB1dCBvciBvdXRwdXQgZXhjZXB0aW9uIG9jY3VycmVkCisgICAgICoKKyAgICAgKi8KKworICAgIHB1YmxpYyB2b2lkIHByaW50bG4oKSB0aHJvd3MgSU9FeGNlcHRpb24geworICAgICAgICBwcmludCgiXHJcbiIpOworICAgIH0KKworCisKKyAgICAvKioKKyAgICAgKiBXcml0ZXMgYSA8Y29kZT5TdHJpbmc8L2NvZGU+IHRvIHRoZSBjbGllbnQsIAorICAgICAqIGZvbGxvd2VkIGJ5IGEgY2FycmlhZ2UgcmV0dXJuLWxpbmUgZmVlZCAoQ1JMRikuCisgICAgICoKKyAgICAgKgorICAgICAqIEBwYXJhbSBzICAgICAgICAgICAgICAgICAgICAgICB0aGUgPGNvZGU+U3RyaW5nPC9jb2RlPiB0byB3cml0ZSB0byB0aGUgY2xpZW50CisgICAgICoKKyAgICAgKiBAZXhjZXB0aW9uIElPRXhjZXB0aW9uICAgICAgICAgaWYgYW4gaW5wdXQgb3Igb3V0cHV0IGV4Y2VwdGlvbiBvY2N1cnJlZAorICAgICAqCisgICAgICovCisKKyAgICBwdWJsaWMgdm9pZCBwcmludGxuKFN0cmluZyBzKSB0aHJvd3MgSU9FeGNlcHRpb24geworICAgICAgICBwcmludChzKTsKKyAgICAgICAgcHJpbnRsbigpOworICAgIH0KKworCisKKworICAgIC8qKgorICAgICAqCisgICAgICogV3JpdGVzIGEgPGNvZGU+Ym9vbGVhbjwvY29kZT4gdmFsdWUgdG8gdGhlIGNsaWVudCwgCisgICAgICogZm9sbG93ZWQgYnkgYSAKKyAgICAgKiBjYXJyaWFnZSByZXR1cm4tbGluZSBmZWVkIChDUkxGKS4KKyAgICAgKgorICAgICAqCisgICAgICogQHBhcmFtIGIgICAgICAgICAgICAgICAgICAgICAgIHRoZSA8Y29kZT5ib29sZWFuPC9jb2RlPiB2YWx1ZSAKKyAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8gd3JpdGUgdG8gdGhlIGNsaWVudAorICAgICAqCisgICAgICogQGV4Y2VwdGlvbiBJT0V4Y2VwdGlvbiAgICAgICAgIGlmIGFuIGlucHV0IG9yIG91dHB1dCBleGNlcHRpb24gb2NjdXJyZWQKKyAgICAgKgorICAgICAqLworCisgICAgcHVibGljIHZvaWQgcHJpbnRsbihib29sZWFuIGIpIHRocm93cyBJT0V4Y2VwdGlvbiB7CisgICAgICAgIHByaW50KGIpOworICAgICAgICBwcmludGxuKCk7CisgICAgfQorCisKKworICAgIC8qKgorICAgICAqCisgICAgICogV3JpdGVzIGEgY2hhcmFjdGVyIHRvIHRoZSBjbGllbnQsIGZvbGxvd2VkIGJ5IGEgY2FycmlhZ2UKKyAgICAgKiByZXR1cm4tbGluZSBmZWVkIChDUkxGKS4KKyAgICAgKgorICAgICAqIEBwYXJhbSBjICAgICAgICAgICAgICAgICAgICAgICB0aGUgY2hhcmFjdGVyIHRvIHdyaXRlIHRvIHRoZSBjbGllbnQKKyAgICAgKgorICAgICAqIEBleGNlcHRpb24gSU9FeGNlcHRpb24gICAgICAgICBpZiBhbiBpbnB1dCBvciBvdXRwdXQgZXhjZXB0aW9uIG9jY3VycmVkCisgICAgICoKKyAgICAgKi8KKworICAgIHB1YmxpYyB2b2lkIHByaW50bG4oY2hhciBjKSB0aHJvd3MgSU9FeGNlcHRpb24geworICAgICAgICBwcmludChjKTsKKyAgICAgICAgcHJpbnRsbigpOworICAgIH0KKworCisKKyAgICAvKioKKyAgICAgKgorICAgICAqIFdyaXRlcyBhbiBpbnQgdG8gdGhlIGNsaWVudCwgZm9sbG93ZWQgYnkgYSAKKyAgICAgKiBjYXJyaWFnZSByZXR1cm4tbGluZSBmZWVkIChDUkxGKSBjaGFyYWN0ZXIuCisgICAgICoKKyAgICAgKgorICAgICAqIEBwYXJhbSBpICAgICAgICAgICAgICAgICAgICAgICB0aGUgaW50IHRvIHdyaXRlIHRvIHRoZSBjbGllbnQKKyAgICAgKgorICAgICAqIEBleGNlcHRpb24gSU9FeGNlcHRpb24gICAgICAgICBpZiBhbiBpbnB1dCBvciBvdXRwdXQgZXhjZXB0aW9uIG9jY3VycmVkCisgICAgICoKKyAgICAgKi8KKworICAgIHB1YmxpYyB2b2lkIHByaW50bG4oaW50IGkpIHRocm93cyBJT0V4Y2VwdGlvbiB7CisgICAgICAgIHByaW50KGkpOworICAgICAgICBwcmludGxuKCk7CisgICAgfQorCisKKworICAgIC8qKiAgCisgICAgICoKKyAgICAgKiBXcml0ZXMgYSA8Y29kZT5sb25nPC9jb2RlPiB2YWx1ZSB0byB0aGUgY2xpZW50LCBmb2xsb3dlZCBieSBhIAorICAgICAqIGNhcnJpYWdlIHJldHVybi1saW5lIGZlZWQgKENSTEYpLgorICAgICAqCisgICAgICoKKyAgICAgKiBAcGFyYW0gbCAgICAgICAgICAgICAgICAgICAgICAgdGhlIDxjb2RlPmxvbmc8L2NvZGU+IHZhbHVlIHRvIHdyaXRlIHRvIHRoZSBjbGllbnQKKyAgICAgKgorICAgICAqIEBleGNlcHRpb24gSU9FeGNlcHRpb24gICAgICAgICBpZiBhbiBpbnB1dCBvciBvdXRwdXQgZXhjZXB0aW9uIG9jY3VycmVkCisgICAgICoKKyAgICAgKi8gIAorCisgICAgcHVibGljIHZvaWQgcHJpbnRsbihsb25nIGwpIHRocm93cyBJT0V4Y2VwdGlvbiB7CisgICAgICAgIHByaW50KGwpOworICAgICAgICBwcmludGxuKCk7CisgICAgfQorCisKKworICAgIC8qKgorICAgICAqCisgICAgICogV3JpdGVzIGEgPGNvZGU+ZmxvYXQ8L2NvZGU+IHZhbHVlIHRvIHRoZSBjbGllbnQsIAorICAgICAqIGZvbGxvd2VkIGJ5IGEgY2FycmlhZ2UgcmV0dXJuLWxpbmUgZmVlZCAoQ1JMRikuCisgICAgICoKKyAgICAgKiBAcGFyYW0gZiAgICAgICAgICAgICAgICAgICAgICAgdGhlIDxjb2RlPmZsb2F0PC9jb2RlPiB2YWx1ZSAKKyAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8gd3JpdGUgdG8gdGhlIGNsaWVudAorICAgICAqCisgICAgICoKKyAgICAgKiBAZXhjZXB0aW9uIElPRXhjZXB0aW9uICAgICAgICAgaWYgYW4gaW5wdXQgb3Igb3V0cHV0IGV4Y2VwdGlvbiAKKyAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2NjdXJyZWQKKyAgICAgKgorICAgICAqLworCisgICAgcHVibGljIHZvaWQgcHJpbnRsbihmbG9hdCBmKSB0aHJvd3MgSU9FeGNlcHRpb24geworICAgICAgICBwcmludChmKTsKKyAgICAgICAgcHJpbnRsbigpOworICAgIH0KKworCisKKyAgICAvKioKKyAgICAgKgorICAgICAqIFdyaXRlcyBhIDxjb2RlPmRvdWJsZTwvY29kZT4gdmFsdWUgdG8gdGhlIGNsaWVudCwgCisgICAgICogZm9sbG93ZWQgYnkgYSBjYXJyaWFnZSByZXR1cm4tbGluZSBmZWVkIChDUkxGKS4KKyAgICAgKgorICAgICAqCisgICAgICogQHBhcmFtIGQgICAgICAgICAgICAgICAgICAgICAgIHRoZSA8Y29kZT5kb3VibGU8L2NvZGU+IHZhbHVlCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvIHdyaXRlIHRvIHRoZSBjbGllbnQKKyAgICAgKgorICAgICAqIEBleGNlcHRpb24gSU9FeGNlcHRpb24gICAgICAgICBpZiBhbiBpbnB1dCBvciBvdXRwdXQgZXhjZXB0aW9uIG9jY3VycmVkCisgICAgICoKKyAgICAgKi8KKworICAgIHB1YmxpYyB2b2lkIHByaW50bG4oZG91YmxlIGQpIHRocm93cyBJT0V4Y2VwdGlvbiB7CisgICAgICAgIHByaW50KGQpOworICAgICAgICBwcmludGxuKCk7CisgICAgfQorCisgICAgLyoqCisgICAgICogVGhpcyBtZXRob2QgY2FuIGJlIHVzZWQgdG8gZGV0ZXJtaW5lIGlmIGRhdGEgY2FuIGJlIHdyaXR0ZW4gd2l0aG91dCBibG9ja2luZy4KKyAgICAgKgorICAgICAqIEByZXR1cm4gPGNvZGU+dHJ1ZTwvY29kZT4gaWYgYSB3cml0ZSB0byB0aGlzIDxjb2RlPlNlcnZsZXRPdXRwdXRTdHJlYW08L2NvZGU+CisgICAgICogIHdpbGwgc3VjY2VlZCwgb3RoZXJ3aXNlIHJldHVybnMgPGNvZGU+ZmFsc2U8L2NvZGU+LgorICAgICAqCisgICAgICogIEBzaW5jZSBTZXJ2bGV0IDMuMQorICAgICAqLworICAgIHB1YmxpYyBhYnN0cmFjdCBib29sZWFuIGlzUmVhZ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XRSZWdpc3RyYXRpb248L2NvZGU+CisgICAgICovCisgICAgcHVibGljIENvbGxlY3Rpb248U3RyaW5nPiBnZXRNYXBwaW5ncygpOworCisgICAgLyoqCisgICAgICogR2V0cyB0aGUgbmFtZSBvZiB0aGUgcnVuQXMgcm9sZSBvZiB0aGUgU2VydmxldCByZXByZXNlbnRlZCBieSB0aGlzCisgICAgICogPGNvZGU+U2VydmxldFJlZ2lzdHJhdGlvbjwvY29kZT4uCisgICAgICogCisgICAgICogQHJldHVybiB0aGUgbmFtZSBvZiB0aGUgcnVuQXMgcm9sZSwgb3IgbnVsbCBpZiB0aGUgU2VydmxldCBpcworICAgICAqIGNvbmZpZ3VyZWQgdG8gcnVuIGFzIGl0cyBjYWxsZXIKKyAgICAgKi8KKyAgICBwdWJsaWMgU3RyaW5nIGdldFJ1bkFzUm9sZSgpOworCisgICAgLyoqCisgICAgICogSW50ZXJmYWNlIHRocm91Z2ggd2hpY2ggYSB7QGxpbmsgU2VydmxldH0gcmVnaXN0ZXJlZCB2aWEgb25lIG9mIHRoZQorICAgICAqIDx0dD5hZGRTZXJ2bGV0PC90dD4gbWV0aG9kcyBvbiB7QGxpbmsgU2VydmxldENvbnRleHR9IG1heSBiZSBmdXJ0aGVyCisgICAgICogY29uZmlndXJlZC4KKyAgICAgKi8KKyAgICBpbnRlcmZhY2UgRHluYW1pYyBleHRlbmRzIFNlcnZsZXRSZWdpc3RyYXRpb24sIFJlZ2lzdHJhdGlvbi5EeW5hbWljIHsKKworICAgICAgICAvKioKKyAgICAgICAgICogU2V0cyB0aGUgPGNvZGU+bG9hZE9uU3RhcnR1cDwvY29kZT4gcHJpb3JpdHkgb24gdGhlIFNlcnZsZXQKKyAgICAgICAgICogcmVwcmVzZW50ZWQgYnkgdGhpcyBkeW5hbWljIFNlcnZsZXRSZWdpc3RyYXRpb24uCisgICAgICAgICAqCisgICAgICAgICAqIDxwPkEgPHR0PmxvYWRPblN0YXJ0dXA8L3R0PiB2YWx1ZSBvZiBnc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4KKyAgICAgICAgICoKKyAgICAgICAgICogQHBhcmFtIG11bHRpcGFydENvbmZpZyB0aGUge0BsaW5rIE11bHRpcGFydENvbmZpZ0VsZW1lbnR9IHRvIGJlCisgICAgICAgICAqIGFwcGxpZWQgdG8gdGhlIHBhdHRlcm5zIG1hcHBlZCB0byB0aGUgcmVnaXN0cmF0aW9uCisgICAgICAgICAqCisgICAgICAgICAqIEB0aHJvd3MgSWxsZWdhbEFyZ3VtZW50RXhjZXB0aW9uIGlmIDx0dD5tdWx0aXBhcnRDb25maWc8L3R0PiBpcworICAgICAgICAgKiBudWxsCisgICAgICAgICAqCisgICAgICAgICAqIEB0aHJvd3MgSWxsZWdhbFN0YXRlRXhjZXB0aW9uIGlmIHRoZSB7QGxpbmsgU2VydmxldENvbnRleHR9IGZyb20KKyAgICAgICAgICogd2hpY2ggdGhpcyBTZXJ2bGV0UmVnaXN0cmF0aW9uIHdhcyBvYnRhaW5lZCBoYXMgYWxyZWFkeSBiZWVuCisgICAgICAgICAqIGluaXRpYWxpemVkCisgICAgICAgICAqLworICAgICAgICBwdWJsaWMgdm9pZCBzZXRNdWx0aXBhcnRDb25maWcoCisgICAgICAgICAgICBNdWx0aXBhcnRDb25maWdFbGVtZW50IG11bHRpcGFydENvbmZpZyk7CisKKyAgICAgICAgLyoqCisgICAgICAgICAqIFNldHMgdGhlIG5hbWUgb2YgdGhlIDxjb2RlPnJ1bkFzPC9jb2RlPiByb2xlIGZvciB0aGlzCisgICAgICAgICAqIDxjb2RlPlNlcnZsZXRSZWdpc3RyYXRpb248L2NvZGU+LgorICAgICAgICAgKgorICAgICAgICAgKiBAcGFyYW0gcm9sZU5hbWUgdGhlIG5hbWUgb2YgdGhlIDxjb2RlPnJ1bkFzPC9jb2RlPiByb2xlCisgICAgICAgICAqCisgICAgICAgICAqIEB0aHJvd3MgSWxsZWdhbEFyZ3VtZW50RXhjZXB0aW9uIGlmIDx0dD5yb2xlTmFtZTwvdHQ+IGlzIG51bGwKKyAgICAg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GlucHV0IHN0cmVhbSwgb3IgLTEgaWYgdGhlIGxlbmd0aCBpcyBub3Qga25vd24uIEZvciBIVFRQIHNlcnZsZXRzLAorICAgICAqIHNhbWUgYXMgdGhlIHZhbHVlIG9mIHRoZSBDR0kgdmFyaWFibGUgQ09OVEVOVF9MRU5HVEguCisgICAgICoKKyAgICAgKiBAcmV0dXJuIGEgbG9uZyBjb250YWluaW5nIHRoZSBsZW5ndGggb2YgdGhlIHJlcXVlc3QgYm9keSBvciAtMUwgaWYKKyAgICAgKiB0aGUgbGVuZ3RoIGlzIG5vdCBrbm93bgorICAgICAqCisgICAgICogQHNpbmNlIFNlcnZsZXQgMy4xCisgICAgICovCisgICAgcHVibGljIGxvbmcgZ2V0Q29udGVudExlbmd0aExvbmcoKTsKKyAgICAKKyAgICAvKioKKyAgICAgKiBSZXR1cm5zIHRoZSBNSU1FIHR5cGUgb2YgdGhlIGJvZHkgb2YgdGhlIHJlcXVlc3QsIG9yIAorICAgICAqIDxjb2RlPm51bGw8L2NvZGU+IGlmIHRoZSB0eXBlIGlzIG5vdCBrbm93bi4gRm9yIEhUVFAgc2VydmxldHMsIAorICAgICAqIHNhbWUgYXMgdGhlIHZhbHVlIG9mIHRoZSBDR0kgdmFyaWFibGUgQ09OVEVOVF9UWVBFLgorICAgICAqCisgICAgICogQHJldHVybiBhIDxjb2RlPlN0cmluZzwvY29kZT4gY29udGFpbmluZyB0aGUgbmFtZSBvZiB0aGUgTUlNRSB0eXBlCisgICAgICogb2YgdGhlIHJlcXVlc3QsIG9yIG51bGwgaWYgdGhlIHR5cGUgaXMgbm90IGtub3duCisgICAgICovCisgICAgcHVibGljIFN0cmluZyBnZXRDb250ZW50VHlwZSgpOworICAgIAorICAgIC8qKgorICAgICAqIFJldHJpZXZlcyB0aGUgYm9keSBvZiB0aGUgcmVxdWVzdCBhcyBiaW5hcnkgZGF0YSB1c2luZworICAgICAqIGEge0BsaW5rIFNlcnZsZXRJbnB1dFN0cmVhbX0uICBFaXRoZ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IGJlIHBlcmZvcm1lZC4KKworICAgICAqIEBkZXByZWNhdGVkICBBcyBvZiBWZXJzaW9uIDIuMSBvZiB0aGUgSmF2YSBTZXJ2bGV0IEFQSSwKKyAgICAgKiAgICB1c2Uge0BsaW5rIFNlcnZsZXRDb250ZXh0I2dldFJlYWxQYXRofSBpbnN0ZWFkLgorICAgICAqLworICAgIHB1YmxpYyBTdHJpbmcgZ2V0UmVhbFBhdGgoU3RyaW5nIHBhdGgpOworICAgIAorICAgIC8qKgorICAgICAqIFJldHVybnMgdGhlIEludGVybmV0IFByb3RvY29sIChJUCkgc291cmNlIHBvcnQgb2YgdGhlIGNsaWVudAorICAgICAqIG9yIGxhc3QgcHJveHkgdGhhdCBzZW50IHRoZSByZXF1ZXN0LgorICAgICAqCisgICAgICogQHJldHVybiBhbiBpbnRlZ2VyIHNwZWNpZnlpbmcgdGhlIHBvcnQgbnVtYmVyCisgICAgICoKKyAgICAgKiBAc2luY2UgU2VydmxldCAyLjQKKyAgICAgKi8gICAgCisgICAgcHVibGljIGludCBnZXRSZW1vdGVQb3J0KCk7CisKKyAgICAvKioKKyAgICAgKiBSZXR1cm5zIHRoZSBob3N0IG5hbWUgb2YgdGhlIEludGVybmV0IFByb3RvY29sIChJUCkgaW50ZXJmYWNlIG9uCisgICAgICogd2hpY2ggdGhlIHJlcXVlc3Qgd2FzIHJlY2VpdmVkLgorICAgICAqCisgICAgICogQHJldHVybiBhIDxjb2RlPlN0cmluZzwvY29kZT4gY29udGFpbmluZyB0aGUgaG9zdAorICAgICAqICAgICAgICAgbmFtZSBvZiB0aGUgSVAgb24gd2hpY2ggdGhlIHJlcXVlc3Qgd2FzIHJlY2VpdmVkLgorICAgICAqCisgICAgICogQHNpbmNlIFNlcnZsZXQgMi40CisgICAgICovCisgICAgcHVibGljIFN0cmluZyBnZXRMb2NhbE5hbWUoKTsKKworICAgIC8qKgorICAgICAqIFJldHVybnMgdGhlIEludGVybmV0IFByb3RvY29sIChJUCkgYWRkcmVzcy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kIGlzIHRvIHJldHVybgorICAgICAqIGdldExvY2FsQWRkcigpIG9uIHRoZSB3cmFwcGVkIHJlcXVlc3Qgb2JqZWN0LgorICAgICAqCisgICAgICogQHNpbmNlIFNlcnZsZXQgMi40CisgICAgICovICAgICAgIAorICAgIHB1YmxpYyBTdHJpbmcgZ2V0TG9jYWxBZGRyKCl7CisgICAgICAgIHJldHVybiB0aGlzLnJlcXVlc3QuZ2V0TG9jYWxBZGRyKCk7CisgICAgfQorCisKKyAgICAvKioKKyAgICAgKiBUaGUgZGVmYXVsdCBiZWhhdmlvciBvZiB0aGlzIG1ldGhvZCBpcyB0byByZXR1cm4KKyAgICAgKiBnZXRMb2NhbFBvcnQoKSBvbiB0aGUgd3JhcHBlZCByZXF1ZXN0IG9iamVjdC4KKyAgICAgKgorICAgICAqIEBzaW5jZSBTZXJ2bGV0IDIuNAorICAgICAqLworICAgIHB1YmxpYyBpbnQgZ2V0TG9jYWxQb3J0KCl7CisgICAgICAgIHJldHVybiB0aGlzLnJlcXVlc3QuZ2V0TG9jYWxQb3J0KCk7CisgICAgfQorCisKKyAgICAvKioKKyAgICAgKiBHZXRzIHRoZSBzZXJ2bGV0IGNvbnRleHQgdG8gd2hpY2ggdGhlIHdyYXBwZWQgc2VydmxldCByZXF1ZXN0IHdhcyBsYXN0CisgICAgICogZGlzcGF0Y2hlZC4KKyAgICAgKgorICAgICAqIEByZXR1cm4gdGhlIHNlcnZsZXQgY29udGV4dCB0byB3aGljaCB0aGUgd3JhcHBlZCBzZXJ2bGV0IHJlcXVlc3Qgd2FzCisgICAgICogbGFzdCBkaXNwYXRjaGVkCisgICAgICoKKyAgICAgKiBAc2luY2UgU2VydmxldCAzLjAKKyAgICAgKi8KKyAgICBwdWJsaWMgU2VydmxldENvbnRleHQgZ2V0U2VydmxldENvbnRleHQoKSB7CisgICAgICAgIHJldHVybiByZXF1ZXN0LmdldFNlcnZsZXRDb250ZXh0KCk7CisgICAgfQorCisKKyAgICAvKioKKyAgICAgKi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TZXRzCisgICAgICogKGh0dHA6Ly93d3cuaWFuYS5vcmcvYXNzaWdubWVudHMvY2hhcmFjdGVyLXNldHMpCisgICAgICoKKyAgICAgKiBAc2VlICNzZXRDb250ZW50VHlwZQorICAgICAqIEBzZWUgI3NldExvY2FsZQorICAgICAqCisgICAgICogQHNpbmNlIFNlcnZsZXQgMi40CisgICAgICovCisgICAgcHVibGljIHZvaWQgc2V0Q2hhcmFjdGVyRW5jb2RpbmcoU3RyaW5nIGNoYXJzZXQpOworICAgIAorICAgIC8qKgorICAgICAqIFNldHMgdGhlIGxlbmd0aCBvZiB0aGUgY29udGVudCBib2R5IGluIHRoZSByZXNwb25zZQorICAgICAqIEluIEhUVFAgc2VydmxldHMsIHRoaXMgbWV0aG9kIHNldHMgdGhlIEhUVFAgQ29udGVudC1MZW5ndGggaGVhZGVyLgorICAgICAqCisgICAgICogQHBhcmFtIGxlbiBhbiBpbnRlZ2VyIHNwZWNpZnlpbmcgdGhlIGxlbmd0aCBvZiB0aGUgCisgICAgICogY29udGVudCBiZWluZyByZXR1cm5lZCB0byB0aGUgY2xpZW50OyBzZXRzIHRoZSBDb250ZW50LUxlbmd0aCBoZWFkZXIKKyAgICAgKi8KKyAgICBwdWJsaWMgdm9pZCBzZXRDb250ZW50TGVuZ3RoKGludCBsZW4pOworICAgIAorICAgIC8qKgorICAgICAqIFNldHMgdGhlIGxlbmd0aCBvZiB0aGUgY29udGVudCBib2R5IGluIHRoZSByZXNwb25zZQorICAgICAqIEluIEhUVFAgc2VydmxldHMsIHRoaXMgbWV0aG9kIHNldHMgdGhlIEhUVFAgQ29udGVudC1MZW5ndGggaGVhZGVyLgorICAgICAqCisgICAgICogQHBhcmFtIGxlbiBhIGxvbmcgc3BlY2lmeWluZyB0aGUgbGVuZ3RoIG9mIHRoZSAKKyAgICAgKiBjb250ZW50IGJlaW5nIHJldHVybmVkIHRvIHRoZSBjbGllbnQ7IHNldHMgdGhlIENvbnRlbnQtTGVuZ3RoIGhlYWRlcg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b24gdGhlIHdyYXBwZWQgcmVzcG9uc2Ugb2JqZWN0LgorICAgICAqLworCisgICAgcHVibGljIHZvaWQgc2V0Q29udGVudExlbmd0aChpbnQgbGVuKSB7CisJdGhpcy5yZXNwb25zZS5zZXRDb250ZW50TGVuZ3RoKGxlbik7CisgICAgfQorCisgICAgLyoqCisgICAgICogVGhlIGRlZmF1bHQgYmVoYXZpb3Igb2YgdGhpcyBtZXRob2QgaXMgdG8gY2FsbCBzZXRDb250ZW50TGVuZ3RoTG9uZyhsb25nIGxlbikKKyAgICAgKiBvbiB0aGUgd3JhcHBlZCByZXNwb25zZSBvYmplY3QuCisgICAgICovCisKKyAgICBwdWJsaWMgdm9pZCBzZXRDb250ZW50TGVuZ3RoTG9uZyhsb25nIGxlbikgeworICAgICAgICB0aGlzLnJlc3BvbnNlLnNldENvbnRlbnRMZW5ndGhMb25nKGxlbik7CisgICAgfQorCisgICAgLyoqCisgICAgICogVGhlIGRlZmF1bHQgYmVoYXZpb3Igb2YgdGhpcyBtZXRob2QgaXMgdG8gY2FsbCBzZXRDb250ZW50VHlwZShTdHJpbmcgdHlwZSkKKyAgICAgKiBvbiB0aGUgd3JhcHBlZCByZXNwb25zZSBvYmplY3QuCisgICAgICovCisKKyAgICBwdWJsaWMgdm9pZCBzZXRDb250ZW50VHlwZShTdHJpbmcgdHlwZSkgeworCXRoaXMucmVzcG9uc2Uuc2V0Q29udGVudFR5cGUodHlwZSk7CisgICAgfQorCisgICAgLyoqCisgICAgICogVGhlIGRlZmF1bHQgYmVoYXZpb3Igb2YgdGhpcyBtZXRob2QgaXMgdG8gcmV0dXJuIGdldENvbnRlbnRUeXBlKCkKKyAgICAgKiBvbiB0aGUgd3JhcHBlZCByZXNwb25zZSBvYmplY3QuCisgICAgICoKKyAgICAgKiBAc2luY2UgU2VydmxldCAyLjQKKyAgICAgKi8KKworICAgIHB1YmxpYyBTdHJpbmcgZ2V0Q29udGVudFR5cGUoKSB7CisJcmV0dXJuIHRoaXMucmVzc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BvZiBIVFRQIE1ldGhvZCBzcGVjaWZpYyBjb25zdHJhaW50IGVsZW1lbnRzLgorICAgICAqCisgICAgICogQHBhcmFtIGNvbnN0cmFpbnQgdGhlIEh0dHBDb25zdHJhaW50RWxlbWVudCB0byBiZQorICAgICAqIGFwcGxpZWQgdG8gYWxsIEhUVFAgbWV0aG9kcyBvdGhlciB0aGFuIHRob3NlIHJlcHJlc2VudGVkIGluIHRoZQorICAgICAqIDx0dD5tZXRob2RDb25zdHJhaW50czwvdHQ+CisgICAgICogQHBhcmFtIG1ldGhvZENvbnN0cmFpbnRzIHRoZSBjb2xsZWN0aW9uIG9mIEhUVFAgbWV0aG9kIHNwZWNpZmljCisgICAgICogY29uc3RyYWludCBlbGVtZW50cy4KKyAgICAgKgorICAgICAqIEB0aHJvd3MgSWxsZWdhbEFyZ3VtZW50RXhjZXB0aW9uIGlmIGR1cGxpY2F0ZSBtZXRob2QgbmFtZXMgYXJlCisgICAgICogZGV0ZWN0ZWQKKyAgICAgKi8KKyAgICBwdWJsaWMgU2VydmxldFNlY3VyaXR5RWxlbWVudChIdHRwQ29uc3RyYWludEVsZW1lbnQgY29uc3RyYWludCwKKyAgICAgICAgICAgIENvbGxlY3Rpb248SHR0cE1ldGhvZENvbnN0cmFpbnRFbGVtZW50PiBtZXRob2RDb25zdHJhaW50cykgeworICAgICAgICBzdXBlcihjb25zdHJhaW50LmdldEVtcHR5Um9sZVNlbWFudGljKCksCisgICAgICAgICAgICAgICAgY29uc3RyYWludC5nZXRUcmFuc3BvcnRHdWFyYW50ZWUoKSwKKyAgICAgICAgICAgICAgICBjb25zdHJhaW50LmdldFJvbGVzQWxsb3dlZCgpKTsKKyAgICAgICAgdGhpcy5tZXRob2RDb25zdHJhaW50cyA9IChtZXRob2RDb25zdHJhaW50cyA9PSBudWxsID8KKyAgICAgICAgICAgIG5ldyBIYXNoU2V0PEh0dHBNZXRob2RDb25zdHJhaW50RWxlbWVudD4oKSA6IG1ldGhvZENvbnN0cmFpbnRzKTsKKyAgICAgICAgbWV0aG9kTmFtZXMgPSBjaGVja01ldGhvZE5hbWVzKHRoaXMubWV0aG9kQ29uc3RyYWludHMpOworICAgIH0KKworICAgIC8qKgorICAgICAqIENvbnN0cnVjdHMgYW4gaW5zdGFuY2UgZnJvbSBhIHtAbGluayBTZXJ2bGV0U2VjdXJpdHl9IGFubm90YXRpb24gdmFsdWUuCisgICAgICoKKyAgICAgKiBAcGFyYW0gYW5ub3RhdGlvbiB0aGUgYW5ub3RhdGlvbiB2YWx1ZQorICAgICAqCisgICAgICogQHRocm93cyBJbGxlZ2FsQXJndW1lbnRFeGNlcHRpb24gaWYgZHVwbGljYXRlIG1ldGhvZCBuYW1lcyBhcmUKKyAgICAgKiBkZXRlY3RlZAorICAgICAqLworICAgIHB1YmxpYyBTZXJ2bGV0U2VjdXJpdHlFbGVtZW50KFNlcnZsZXRTZWN1cml0eSBhbm5vdGF0aW9uKSB7CisgICAgICAgIHN1cGVyKGFubm90YXRpb24udmFsdWUoKS52YWx1ZSgpLAorICAgICAgICAgICAgICAgIGFubm90YXRpb24udmFsdWUoKS50cmFuc3BvcnRHdWFyYW50ZWUoKSwKKyAgICAgICAgICAgICAgICBhbm5vdGF0aW9uLnZhbHVlKCkucm9sZXNBbGxvd2VkKCkpOworICAgICAgICB0aGlzLm1ldGhvZENvbnN0cmFpbnRzID0gbmV3IEhhc2hTZXQ8SHR0cE1ldGhvZENvbnN0cmFpbnRFbGVtZW50PigpOworICAgICAgICBmb3IgKEh0dHBNZXRob2RDb25zdHJhaW50IGNvbnN0cmFpbnQgOgorICAgICAgICAgICAgICAgIGFubm90YXRpb24uaHR0cE1ldGhvZENvbnN0cmFpbnRzKCkpIHsKKyAgICAgICAgICAgIHRoaXMubWV0aG9kQ29uc3RyYWludHMuYWRkKAorICAgICAgICAgICAgICAgIG5ldyBIdHRwTWV0aG9kQ29uc3RyYWludEVsZW1lbnQoCisgICAgICAgICAgICAgICAgICAgIGNvbnN0cmFpbnQudmFsdWUoKSwKKyAgICAgICAgICAgICAgICAgICAgbmV3IEh0dHBDb25zdHJhaW50RWxlbWVudChjb25zdHJhaW50LmVtcHR5Um9sZVNlbWFudGljKCksCisgICAgICAgICAgICAgICAgICAgICAgICBjb25zdHJhaW50LnRyYW5zcG9ydEd1YXJhbnRlZSgpLAorICAgICAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludC5yb2xlc0FsbG93ZWQoKSkpKTsKKyAgICAgICAgfQorICAgICAgICBtZXRob2ROYW1lcyA9IGNoZWNrTWV0aG9kTmFtZXModGhpcy5tZXRob2RDb25zdHJhaW50cyk7CisgICAgfQorCisgICAgLyoqCisgICAgICogR2V0cyB0aGUgKHBvc3NpYmx5IGVtcHR5KSBjb2xsZWN0aW9uIG9mIEhUVFAgTWV0aG9kIHNwZWNpZmljCisgICAgICogY29uc3RyYWludCBlbGVtZW50cy4KKyAgICAgKgorICAgICAqIDxwPklmIHBlcm1pdHRlZCwgYW55IGNoYW5nZXMgdG8gdGhlIHJldHVybmVkIDxjb2RlPkNvbGxlY3Rpb248L2NvZGU+IG11c3Qgbm90CisgICAgICogYWZmZWN0IHRoaXMgPGNvZGU+U2VydmxldFNlY3VyaXR5RWxlbWVudDwvY29kZT4uCisgICAgICoKKyAgICAgKgorICAgICAqIEByZXR1cm4gdGhlIChwb3NzaWJseSBlbXB0eSkgY29sbGVjdGlvbiBvZiBIdHRwTWV0aG9kQ29uc3RyYWludEVsZW1lbnQKKyAgICAgKiBvYmplY3RzCisgICAgICovCisgICAgcHVibGljIENvbGxlY3Rpb248SHR0cE1ldGhvZENvbnN0cmFpbnRFbGVtZW50PiBnZXRIdHRwTWV0aG9kQ29uc3RyYWludHMoKSB7CisgICAgICAgIHJldHVybiBDb2xsZWN0aW9ucy51bm1vZGlmaWFibGVDb2xsZWN0aW9uKG1ldGhvZENvbnN0cmFpbnRzKTsKKyAgICB9CisKKyAgICAvKioKKyAgICAgKiBHZXRzIHRoZSBzZXQgb2YgSFRUUCBtZXRob2Q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TZXQ8U3RyaW5nPigpOworICAgICAgICBmb3IgKEh0dHBNZXRob2RDb25zdHJhaW50RWxlbWVudCBtZXRob2RDb25zdHJhaW50IDoKKyAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZENvbnN0cmFpbnRzKSB7CisgICAgICAgICAgICBTdHJpbmcgbWV0aG9kTmFtZSA9IG1ldGhvZENvbnN0cmFpbnQuZ2V0TWV0aG9kTmFtZSgpOworICAgICAgICAgICAgaWYgKCFtZXRob2ROYW1lcy5hZGQobWV0aG9kTmFtZSkpIHsKKyAgICAgICAgICAgICAgICB0aHJvdyBuZXcgSWxsZWdhbEFyZ3VtZW50RXhjZXB0aW9uKAorICAgICAgICAgICAgICAgICAgICAiRHVwbGljYXRlIEhUVFAgbWV0aG9kIG5hbWU6ICIgKyBtZXRob2ROYW1lKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICByZXR1cm4gbWV0aG9kTmFtZXM7CisgICAgfQorfQpkaWZmIC0tZ2l0IGEvdGhpcmRfcGFydHkvc2VydmxldC1zcGVjL3NyYy9tYWluL2phdmEvamF2YXgvc2VydmxldC9TZXNzaW9uQ29va2llQ29uZmlnLmphdmEgYi90aGlyZF9wYXJ0eS9zZXJ2bGV0LXNwZWMvc3JjL21haW4vamF2YS9qYXZheC9zZXJ2bGV0L1Nlc3Npb25Db29raWVDb25maWcuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi4yZGQ4MmYzCi0tLSAvZGV2L251bGwKKysrIGIvdGhpcmRfcGFydHkvc2VydmxldC1zcGVjL3NyYy9tYWluL2phdmEvamF2YXgvc2VydmxldC9TZXNzaW9uQ29va2llQ29uZmlnLmphdmEKQEAgLTAsMCArMSwzMjIgQEAKKy8qCisgKiBETyBOT1QgQUxURVIgT1IgUkVNT1ZFIENPUFlSSUdIVCBOT1RJQ0VTIE9SIFRISVMgSEVBREVSLgorICoKKyAqIENvcHlyaWdodCAoYykgMjAxNy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llI3NldERvbWFpbihTdHJpbmcpCisgICAgICovCisgICAgcHVibGljIHZvaWQgc2V0RG9tYWluKFN0cmluZyBkb21haW4pOworCisKKyAgICAvKioKKyAgICAgKiBHZXRzIHRoZSBkb21haW4gbmFtZSB0aGF0IHdpbGwgYmUgYXNzaWduZWQgdG8gYW55IHNlc3Npb24gdHJhY2tpbmcKKyAgICAgKiBjb29raWVzIGNyZWF0ZWQgb24gYmVoYWxmIG9mIHRoZSBhcHBsaWNhdGlvbiByZXByZXNlbnRlZCBieSB0aGUKKyAgICAgKiA8dHQ+U2VydmxldENvbnRleHQ8L3R0PiBmcm9tIHdoaWNoIHRoaXMgPHR0PlNlc3Npb25Db29raWVDb25maWc8L3R0PgorICAgICAqIHdhcyBhY3F1aXJlZC4KKyAgICAgKgorICAgICAqIEByZXR1cm4gdGhlIGNvb2tpZSBkb21haW4gc2V0IHZpYSB7QGxpbmsgI3NldERvbWFpbn0sIG9yCisgICAgICogPHR0Pm51bGw8L3R0PiBpZiB7QGxpbmsgI3NldERvbWFpbn0gd2FzIG5ldmVyIGNhbGxlZAorICAgICAqCisgICAgICogQHNlZSBqYXZheC5zZXJ2bGV0Lmh0dHAuQ29va2llI2dldERvbWFpbigpCisgICAgICovCisgICAgcHVibGljIFN0cmluZyBnZXREb21haW4oKTsKKworCisgICAgLyoqCisgICAgICogU2V0cyB0aGUgcGF0aCB0aGF0IHdpbGwgYmUgYXNzaWduZWQgdG8gYW55IHNlc3Npb24gdHJhY2tpbmcKKyAgICAgKiBjb29raWVzIGNyZWF0ZWQgb24gYmVoYWxmIG9mIHRoZSBhcHBsaWNhdGlvbiByZXByZXNlbnRlZCBieSB0aGUKKyAgICAgKiA8dHQ+U2VydmxldENvbnRleHQ8L3R0PiBmcm9tIHdoaWNoIHRoaXMgPHR0PlNlc3Npb25Db29raWVDb25maWc8L3R0PgorICAgICAqIHdhcyBhY3F1aXJlZC4KKyAgICAgKgorICAgICAqIEBwYXJhbSBwYXRoIHRoZSBjb29raW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tcHR5Um9sZVNlbWFudGljIHsKKyAgICAgICAgLyoqCisgICAgICAgICAqIGFjY2VzcyBpcyB0byBiZSBwZXJtaXR0ZWQgaW5kZXBlbmRlbnQgb2YgYXV0aGVudGljYXRpb24gc3RhdGUgYW5kCisgICAgICAgICAqIGlkZW50aXR5LgorICAgICAgICAgKi8KKyAgICAgICAgUEVSTUlULAorICAgICAgICAvKioKKyAgICAgICAgICogYWNjZXNzIGlzIHRvIGJlIGRlbmllZCBpbmRlcGVuZGVudCBvZiBhdXRoZW50aWNhdGlvbiBzdGF0ZSBhbmQKKyAgICAgICAgICogaWRlbnRpdHkuCisgICAgICAgICAqLworICAgICAgICBERU5ZCisgICAgfQorCisgICAgLyoqCisgICAgICogRGVmaW5lcyB0aGUgZGF0YSBwcm90ZWN0aW9uIHJlcXVpcmVtZW50cyB0aGF0IG11c3QgYmUgc2F0aXNmaWVkIGJ5CisgICAgICogdGhlIHRyYW5zcG9ydAorICAgICAqLworICAgIGVudW0gVHJhbnNwb3J0R3VhcmFudGVlIHsKKyAgICAgICAgLyoqCisgICAgICAgICAqIG5vIHByb3RlY3Rpb24gb2YgdXNlciBkYXRhIG11c3QgYmUgcGVyZm9ybWVkIGJ5IHRoZSB0cmFuc3BvcnQuCisgICAgICAgICAqLworICAgICAgICBOT05FLAorICAgICAgICAvKioKKyAgICAgICAgICogQWxsIHVzZXIgZGF0YSBtdXN0IGJlIGVuY3J5cHRlZCBieSB0aGUgdHJhbnNwb3J0ICh0eXBpY2FsbHkKKyAgICAgICAgICogdXNpbmcgU1NML1RMUykuCisgICAgICAgICAqLworICAgICAgICBDT05GSURFTlRJQUwKKyAgICB9CisKKyAgICAvKioKKyAgICAgKiBHZXQgdGhlIHtAbGluayBIdHRwQ29uc3RyYWludH0gdGhhdCBkZWZpbmVzIHRoZSBwcm90ZWN0aW9uCisgICAgICogdGhhdCBpcyB0byBiZSBhcHBsaWVkIHRvIGFsbCBIVFRQIG1ldGhvZHMgdGhhdCBhcmUgTk9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nZsZXQuU2VydmxldAorICoKKyAqIEBzaW5jZSBTZXJ2bGV0IDMuMAorICovCitAVGFyZ2V0KHtFbGVtZW50VHlwZS5UWVBFfSkKK0BSZXRlbnRpb24oUmV0ZW50aW9uUG9saWN5LlJVTlRJTUUpCitARG9jdW1lbnRlZAorcHVibGljIEBpbnRlcmZhY2UgV2ViU2VydmxldCB7CisgICAgCisgICAgLyoqCisgICAgICogVGhlIG5hbWUgb2YgdGhlIHNlcnZsZXQKKyAgICAgKgorICAgICAqIEByZXR1cm4gdGhlIG5hbWUgb2YgdGhlIHNlcnZsZXQKKyAgICAgKi8KKyAgICBTdHJpbmcgbmFtZSgpIGRlZmF1bHQgIiI7CisgICAgCisgICAgLyoqCisgICAgICogVGhlIFVSTCBwYXR0ZXJucyBvZiB0aGUgc2VydmxldAorICAgICAqCisgICAgICogQHJldHVybiB0aGUgVVJMIHBhdHRlcm5zIG9mIHRoZSBzZXJ2bGV0CisgICAgICovCisgICAgU3RyaW5nW10gdmFsdWUoKSBkZWZhdWx0IHt9OworCisgICAgLyoqCisgICAgICogVGhlIFVSTCBwYXR0ZXJucyBvZiB0aGUgc2VydmxldAorICAgICAqCisgICAgICogQHJldHVybiB0aGUgVVJMIHBhdHRlcm5zIG9mIHRoZSBzZXJ2bGV0CisgICAgICovCisgICAgU3RyaW5nW10gdXJsUGF0dGVybnMoKSBkZWZhdWx0IHt9OworICAgIAorICAgIC8qKgorICAgICAqIFRoZSBsb2FkLW9uLXN0YXJ0dXAgb3JkZXIgb2YgdGhlIHNlcnZsZXQgCisgICAgICoKKyAgICAgKiBAcmV0dXJuIHRoZSBsb2FkLW9uLXN0YXJ0dXAgb3JkZXIgb2YgdGhlIHNlcnZsZXQKKyAgICAgKi8KKyAgICBpbnQgbG9hZE9uU3RhcnR1cCgpIGRlZmF1bHQgLTE7CisgICAgCisgICAgLyoqCisgICAgICogVGhlIGluaXQgcGFyYW1ldGVycyBvZiB0aGUgc2VydmxldAorICAgICAqCisgICAgICogQH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WFsc0lnbm9yZUNhc2UoIkV4cGlyZXMiKSB8fCAvLyAob2xkIGNvb2tpZXMpCisgICAgICAgICAgICAgICAgbmFtZS5lcXVhbHNJZ25vcmVDYXNlKCJNYXgtQWdlIikgfHwgLy8gcmZjMjAxOQorICAgICAgICAgICAgICAgIG5hbWUuZXF1YWxzSWdub3JlQ2FzZSgiUGF0aCIpIHx8CisgICAgICAgICAgICAgICAgbmFtZS5lcXVhbHNJZ25vcmVDYXNlKCJTZWN1cmUiKSB8fAorICAgICAgICAgICAgICAgIG5hbWUuZXF1YWxzSWdub3JlQ2FzZSgiVmVyc2lvbiIpIHx8CisgICAgICAgICAgICAgICAgbmFtZS5zdGFydHNXaXRoKCIkIikpIHsKKyAgICAgICAgICAgIFN0cmluZyBlcnJNc2cgPSBsU3RyaW5ncy5nZXRTdHJpbmcoImVyci5jb29raWVfbmFtZV9pc190b2tlbiIpOworICAgICAgICAgICAgT2JqZWN0W10gZXJyQXJncyA9IG5ldyBPYmplY3RbMV07CisgICAgICAgICAgICBlcnJBcmdzWzBdID0gbmFtZTsKKyAgICAgICAgICAgIGVyck1zZyA9IE1lc3NhZ2VGb3JtYXQuZm9ybWF0KGVyck1zZywgZXJyQXJncyk7CisgICAgICAgICAgICB0aHJvdyBuZXcgSWxsZWdhbEFyZ3VtZW50RXhjZXB0aW9uKGVyck1zZyk7CisgICAgICAgIH0KKworICAgICAgICB0aGlzLm5hbWUgPSBuYW1lOworICAgICAgICB0aGlzLnZhbHVlID0gdmFsdWU7CisgICAgfQorCisgICAgLyoqCisgICAgICogU3BlY2lmaWVzIGEgY29tbWVudCB0aGF0IGRlc2NyaWJlcyBhIGNvb2tpZSdzIHB1cnBvc2UuCisgICAgICogVGhlIGNvbW1lbnQgaXMgdXNlZnVsIGlmIHRoZSBicm93c2VyIHByZXNlbnRzIHRoZSBjb29raWUgCisgICAgICogdG8gdGhlIHVzZXIuIENvbW1lbnRzCisgICAgICogYXJlIG5vdCBzdXBwb3J0ZWQgYnkgTmV0c2NhcGUgVmVyc2lvbiAwIGNvb2tpZXMuCisgICAgICoKKyAgICAgKiBAcGFyYW0gcHVycG9zZQkJYSA8Y29kZT5TdHJpbmc8L2NvZGU+IHNwZWNpZnlpbmcgdGhlIGNvbW1lbnQgCisgICAgICoJCQkJdG8gZGlzcGxheSB0byB0aGUgdXNlcgorICAgICAqCisgICAgICogQHNlZSAjZ2V0Q29tbWVudAorICAgICAqLworICAgIHB1YmxpYyB2b2lkIHNldENvbW1lbnQoU3RyaW5nIHB1cnBvc2UpIHsKKyAgICAgICAgY29tbWVudCA9IHB1cnBvc2U7CisgICAgfQorCisgICAgLyoqCisgICAgICogUmV0dXJucyB0aGUgY29tbWVudCBkZXNjcmliaW5nIHRoZSBwdXJwb3NlIG9mIHRoaXMgY29va2llLCBvcgorICAgICAqIDxjb2RlPm51bGw8L2NvZGU+IGlmIHRoZSBjb29raWUgaGFzIG5vIGNvbW1lbnQuCisgICAgICoKKyAgICAgKiBAcmV0dXJuIHRoZSBjb21tZW50IG9mIHRoZSBjb29raWUsIG9yIDxjb2RlPm51bGw8L2NvZGU+IGlmIHVuc3BlY2lmaWVkCisgICAgICoKKyAgICAgKiBAc2VlICNzZXRDb21tZW50CisgICAgICovIAorICAgIHB1YmxpYyBTdHJpbmcgZ2V0Q29tbWVudCgpIHsKKyAgICAgICAgcmV0dXJuIGNvbW1lbnQ7CisgICAgfQorICAgIAorICAgIC8qKgorICAgICAqCisgICAgICogU3BlY2lmaWVzIHRoZSBkb21haW4gd2l0aGluIHdoaWNoIHRoaXMgY29va2llIHNob3VsZCBiZSBwcmVzZW50ZWQuCisgICAgICoKKyAgICAgKiA8cD5UaGUgZm9ybSBvZiB0aGUgZG9tYWluIG5hbWUgaXMgc3BlY2lmaWVkIGJ5IFJGQyAyMTA5LiBBIGRvbWFpbgorICAgICAqIG5hbWUgYmVnaW5zIHdpdGggYSBkb3QgKDxjb2RlPi5mb28uY29tPC9jb2RlPikgYW5kIG1lYW5zIHRoYXQKKyAgICAgKiB0aGUgY29va2llIGlzIHZpc2libGUgdG8gc2VydmVycyBpbiBhIHNwZWNpZmllZCBEb21haW4gTmFtZSBTeXN0ZW0KKyAgICAgKiAoRE5TKSB6b25lIChmb3IgZXhhbXBsZSwgPGNvZGU+d3d3LmZvby5jb208L2NvZGU+LCBidXQgbm90IAorICAgICAqIDxjb2RlPmEuYi5mb28uY29tPC9jb2RlPikuIEJ5IGRlZmF1bHQsIGNvb2tpZXMgYXJlIG9ubHkgcmV0dXJuZWQKKyAgICAgKiB0byB0aGUgc2VydmVyIHRoYXQgc2VudCB0aGVtLgorICAgICAqCisgICAgICogQHBhcmFtIGRvbWFpbiB0aGUgZG9tYWluIG5hbWUgd2l0aGluIHdoaWNoIHRoaXMgY29va2llIGlzIHZpc2libGU7CisgICAgICogZm9ybSBpcyBhY2NvcmRpbmcgdG8gUkZDIDIxMDkKKyAgICAgKgorICAgICAqIEBzZWUgI2dldERvbWFpbgorICAgICAqLworICAgIHB1YmxpYyB2b2lkIHNldERvbWFpbihTdHJpbmcgZG9tYWluKSB7CisgICAgICAgIHRoaXMuZG9tYWluID0gZG9tYWluLnRvTG93ZXJDYXNlKExvY2FsZS5FTkdMSVNIKTsgLy8gSUUgYWxsZWdlZGx5IG5lZWRzIHRoaXMKKyAgICB9CisKKyAgICAvKioKKyAgICAgKiBHZXRzIHRoZSBkb21haW4gbmFtZSBvZiB0aGlzIENvb2tpZS4KKyAgICAgKgorICAgICAqIDxwPkRvbWFpbiBuYW1lcyBhcmUgZm9ybWF0dGVkIGFjY29yZGluZyB0byBSRkMgMjEwOS4KKyAgICAgKgorICAgICAqIEByZXR1cm4gdGhlIGRvbWFpbiBuYW1lIG9mIHRoaXMgQ29va2llCisgICAgICoKKyAgICAgKiBAc2VlICNzZXREb21haW4KKyAgICAgKi8gCisgICAgcHVibGljIFN0cmluZyBnZXREb21haW4oKSB7CisgICAgICAgIHJldHVybiBkb21haW47CisgICAgfQorCisgICAgLyoqCisgICAgICogU2V0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0cyB0aGUgbWF4aW11bSBhZ2UgaW4gc2Vjb25kcyBvZiB0aGlzIENvb2tpZS4KKyAgICAgKgorICAgICAqIDxwPkJ5IGRlZmF1bHQsIDxjb2RlPi0xPC9jb2RlPiBpcyByZXR1cm5lZCwgd2hpY2ggaW5kaWNhdGVzIHRoYXQKKyAgICAgKiB0aGUgY29va2llIHdpbGwgcGVyc2lzdCB1bnRpbCBicm93c2VyIHNodXRkb3duLgorICAgICAqCisgICAgICogQHJldHVybgkJCWFuIGludGVnZXIgc3BlY2lmeWluZyB0aGUgbWF4aW11bSBhZ2Ugb2YgdGhlCisgICAgICoJCQkJY29va2llIGluIHNlY29uZHM7IGlmIG5lZ2F0aXZlLCBtZWFucworICAgICAqCQkJCXRoZSBjb29raWUgcGVyc2lzdHMgdW50aWwgYnJvd3NlciBzaHV0ZG93bgorICAgICAqCisgICAgICogQHNlZSAjc2V0TWF4QWdlCisgICAgICovCisgICAgcHVibGljIGludCBnZXRNYXhBZ2UoKSB7CisgICAgICAgIHJldHVybiBtYXhBZ2U7CisgICAgfQorICAgIAorICAgIC8qKgorICAgICAqIFNwZWNpZmllcyBhIHBhdGggZm9yIHRoZSBjb29raWUKKyAgICAgKiB0byB3aGljaCB0aGUgY2xpZW50IHNob3VsZCByZXR1cm4gdGhlIGNvb2tpZS4KKyAgICAgKgorICAgICAqIDxwPlRoZSBjb29raWUgaXMgdmlzaWJsZSB0byBhbGwgdGhlIHBhZ2VzIGluIHRoZSBkaXJlY3RvcnkKKyAgICAgKiB5b3Ugc3BlY2lmeSwgYW5kIGFsbCB0aGUgcGFnZXMgaW4gdGhhdCBkaXJlY3RvcnkncyBzdWJkaXJlY3Rvcmllcy4gCisgICAgICogQSBjb29raWUncyBwYXRoIG11c3QgaW5jbHVkZSB0aGUgc2VydmxldCB0aGF0IHNldCB0aGUgY29va2llLAorICAgICAqIGZvciBleGFtcGxlLCA8aT4vY2F0YWxvZzwvaT4sIHdoaWNoIG1ha2VzIHRoZSBjb29raWU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CisgICAgICAgIHJldHVybiBzZWN1cmU7CisgICAgfQorCisgICAgLyoqCisgICAgICogUmV0dXJucyB0aGUgbmFtZSBvZiB0aGUgY29va2llLiBUaGUgbmFtZSBjYW5ub3QgYmUgY2hhbmdlZCBhZnRlcgorICAgICAqIGNyZWF0aW9uLgorICAgICAqCisgICAgICogQHJldHVybiB0aGUgbmFtZSBvZiB0aGUgY29va2llCisgICAgICovCisgICAgcHVibGljIFN0cmluZyBnZXROYW1lKCkgeworICAgICAgICByZXR1cm4gbmFtZTsKKyAgICB9CisKKyAgICAvKioKKyAgICAgKiBBc3NpZ25zIGEgbmV3IHZhbHVlIHRvIHRoaXMgQ29va2llLgorICAgICAqIAorICAgICAqIDxwPklmIHlvdSB1c2UgYSBiaW5hcnkgdmFsdWUsIHlvdSBtYXkgd2FudCB0byB1c2UgQkFTRTY0IGVuY29kaW5nLgorICAgICAqCisgICAgICogPHA+V2l0aCBWZXJzaW9uIDAgY29va2llcywgdmFsdWVzIHNob3VsZCBub3QgY29udGFpbiB3aGl0ZSAKKyAgICAgKiBzcGFjZSwgYnJhY2tldHMsIHBhcmVudGhlc2VzLCBlcXVhbHMgc2lnbnMsIGNvbW1hcywKKyAgICAgKiBkb3VibGUgcXVvdGVzLCBzbGFzaGVzLCBxdWVzdGlvbiBtYXJrcywgYXQgc2lnbnMsIGNvbG9ucywKKyAgICAgKiBhbmQgc2VtaWNvbG9ucy4gRW1wdHkgdmFsdWVzIG1heSBub3QgYmVoYXZlIHRoZSBzYW1lIHdheQorICAgICAqIG9uIGFsbCBicm93c2Vycy4KKyAgICAgKgorICAgICAqIEBwYXJhbSBuZXdWYWx1ZSB0aGUgbmV3IHZhbHVlIG9mIHRoZSBjb29raWUKKyAgICAgKgorICAgICAqIEBzZWUgI2dldFZhbHVlCisgICAgICovCisgICAgcHVibGljIHZvaWQgc2V0VmFsdWUoU3RyaW5nIG5ld1ZhbHVlKSB7CisgICAgICAgIHZhbHVlID0gbmV3VmFsdWU7CisgICAgfQorCisgICAgLyoqCisgICAgICogR2V0cyB0aGUgY3VycmVudCB2YWx1ZSBvZiB0aGlzIENvb2tpZS4KKyAgICAgKgorICAgICAqIEByZXR1cm4gdGhlIGN1cnJlbnQgdmFsdWUgb2YgdGhpcyBDb29raWUKKyAgICAgKgorICAgICAqIEBzZWUgI3NldFZhbHVlCisgICAgICovCisgICAgcHVibGljIFN0cmluZyBnZXRWYWx1ZSgpIHsKKyAgICAgICAgcmV0dXJuIHZhbHVlOworICAgIH0KKworICAgIC8qKgorICAgICAqIFJldHVybnMgdGhlIHZlcnNpb24gb2YgdGhlIHByb3RvY29sIHRoaXMgY29va2llIGNvbXBsaWVzIAorICAgICAqIHdpdGguIFZlcnNpb24gMSBjb21wbGllcyB3aXRoIFJGQyAyMTA5LCAKKyAgICAgKiBhbmQgdmVyc2lvbiAwIGNvbXBsaWVzIHdpdGggdGhlIG9yaWdpbmFsCisgICAgICogY29va2llIHNwZWNpZmljYXRpb24gZHJhZnRlZCBieSBOZXRzY2FwZS4gQ29va2llcyBwcm92aWRlZAorICAgICAqIGJ5IGEgYnJvd3NlciB1c2UgYW5kIGlkZW50aWZ5IHRoZSBicm93c2VyJ3MgY29va2llIHZlcnNpb24uCisgICAgICogCisgICAgICogQHJldHVybgkJCTAgaWYgdGhlIGNvb2tpZSBjb21wbGllcyB3aXRoIHRoZQorICAgICAqCQkJCW9yaWdpbmFsIE5ldHNjYXBlIHNwZWNpZmljYXRpb247IDEKKyAgICAgKgkJCQlpZiB0aGUgY29va2llIGNvbXBsaWVzIHdpdGggUkZDIDIxMDkKKyAgICAgKgorICAgICAqIEBzZWUgI3NldFZlcnNpb24KKyAgICAgKi8KKyAgICBwdWJsaWMgaW50IGdldFZlcnNpb24oKSB7CisgICAgICAgIHJldHVybiB2ZXJzaW9uOworICAgIH0KKworICAgIC8qKgorICAgICAqIFNldHMgdGhlIHZlcnNpb24gb2YgdGhlIGNvb2tpZSBwcm90b2NvbCB0aGF0IHRoaXMgQ29va2llIG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B0b2tlbjsgPGNvZGU+ZmFsc2U8L2NvZGU+IG90aGVyd2lzZQorICAgICAqLworICAgIHByaXZhdGUgYm9vbGVhbiBpc1Rva2VuKFN0cmluZyB2YWx1ZSkgeworICAgICAgICBpbnQgbGVuID0gdmFsdWUubGVuZ3RoKCk7CisgICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbGVuOyBpKyspIHsKKyAgICAgICAgICAgIGNoYXIgYyA9IHZhbHVlLmNoYXJBdChpKTsKKyAgICAgICAgICAgIGlmIChjIDwgMHgyMCB8fCBjID49IDB4N2YgfHwgVFNQRUNJQUxTLmluZGV4T2YoYykgIT0gLTEpIHsKKyAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAgICByZXR1cm4gdHJ1ZTsKKyAgICB9CisKKyAgICAvKioKKyAgICAgKiBPdmVycmlkZXMgdGhlIHN0YW5kYXJkIDxjb2RlPmphdmEubGFuZy5PYmplY3QuY2xvbmU8L2NvZGU+IAorICAgICAqIG1ldGhvZCB0byByZXR1cm4gYSBjb3B5IG9mIHRoaXMgQ29va2llLgorICAgICAqLworICAgIHB1YmxpYyBPYmplY3QgY2xvbmUoKSB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICByZXR1cm4gc3VwZXIuY2xvbmUoKTsKKyAgICAgICAgfSBjYXRjaCAoQ2xvbmVOb3RTdXBwb3J0ZWRFeGNlcHRpb24gZSkgeworICAgICAgICAgICAgdGhyb3cgbmV3IFJ1bnRpbWVFeGNlcHRpb24oZS5nZXRNZXNzYWdlKCkpOworICAgICAgICB9CisgICAgfQorCisgICAgLyoqCisgICAgICogTWFya3Mgb3IgdW5tYXJrcyB0aGlzIENvb2tpZSBhcyA8aT5IdHRwT25seTwvaT4uCisgICAgICoKKyAgICAgKiA8cD5JZiA8dHQ+aXNIdHRwT25seTwvdHQ+IGlzIHNldCB0byA8dHQ+dHJ1ZTwvdHQ+LCB0aGlzIGNvb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iAgICAgICAgICAgICAgICAgIGNvbnRhaW5zIHRoZSByZXNwb25zZSB0aGUgZmlsdGVyIHNlbmRzCisgICAgICogICAgICAgICAgICAgICAgICB0byB0aGUgY2xpZW50CisgICAgICogCisgICAgICogQHBhcmFtIGNoYWluICAgICB0aGUgPGNvZGU+RmlsdGVyQ2hhaW48L2NvZGU+IGZvciBpbnZva2luZyB0aGUgbmV4dCBmaWx0ZXIgb3IgdGhlIHJlc291cmNlCisgICAgICogCisgICAgICogQHRocm93cyBJT0V4Y2VwdGlvbiAgIGlmIGFuIGlucHV0IG9yIG91dHB1dCBlcnJvciBpcyAKKyAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRldGVjdGVkIHdoZW4gdGhlIGZpbHRlciBoYW5kbGVzCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgcmVxdWVzdAorICAgICAqCisgICAgICogQHRocm93cyBTZXJ2bGV0RXhjZXB0aW9uICBpZiB0aGUgcmVxdWVzdCBmb3IgdGhlIGNvdWxkIG5vdCBiZSBoYW5kbGVkIG9yIAorICAgICAqIGVpdGhlciBwYXJhbWV0ZXIgaXMgbm90IGFuIGluc3RhbmNlIG9mIHRoZSByZXNwZWN0aXZlIHtAbGluayBIdHRwU2VydmxldFJlcXVlc3R9CisgICAgICogb3Ige0BsaW5rIEh0dHBTZXJ2bGV0UmVzcG9uc2V9LgorICAgICAqCisgICAgICogQHNpbmNlIFNlcnZsZXQgNC4wCisgICAgICovCisgICAgQE92ZXJyaWRlCisgICAgcHVibGljIHZvaWQgZG9GaWx0ZXIoU2VydmxldFJlcXVlc3QgcmVxLCBTZXJ2bGV0UmVzcG9uc2UgcmVzLCBGaWx0ZXJDaGFpbiBjaGFpbikgdGhyb3dzIElPRXhjZXB0aW9uLCBTZXJ2bGV0RXhjZXB0aW9uIHsKKyAgICAgICAgaWYgKCEocmVxIGluc3RhbmNlb2YgSHR0cFNlcnZsZXRSZXF1ZXN0ICYmCisgICAgIC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ZXNwICBhbiB7QGxpbmsgSHR0cFNlcnZsZXRSZXNwb25zZX0gb2JqZWN0IHRoYXQKKyAgICAgKiAgICAgICAgICAgICAgICAgIGNvbnRhaW5zIHRoZSByZXNwb25zZSB0aGUgc2VydmxldCBzZW5kcworICAgICAqICAgICAgICAgICAgICAgICAgdG8gdGhlIGNsaWVudAorICAgICAqIAorICAgICAqIEB0aHJvd3MgSU9FeGNlcHRpb24gICBpZiBhbiBpbnB1dCBvciBvdXRwdXQgZXJyb3IgaXMgCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXRlY3RlZCB3aGVuIHRoZSBzZXJ2bGV0IGhhbmRsZXMKKyAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSBHRVQgcmVxdWVzdAorICAgICAqCisgICAgICogQHRocm93cyBTZXJ2bGV0RXhjZXB0aW9uICBpZiB0aGUgcmVxdWVzdCBmb3IgdGhlIEdFVAorICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvdWxkIG5vdCBiZSBoYW5kbGVkCisgICAgICoKKyAgICAgKiBAc2VlIGphdmF4LnNlcnZsZXQuU2VydmxldFJlc3BvbnNlI3NldENvbnRlbnRUeXBlCisgICAgICovCisKKyAgICBwcm90ZWN0ZWQgdm9pZCBkb0dldChIdHRwU2VydmxldFJlcXVlc3QgcmVxLCBIdHRwU2VydmxldFJlc3BvbnNlIHJlc3ApCisgICAgICAgIHRocm93cyBTZXJ2bGV0RXhjZXB0aW9uLCBJT0V4Y2VwdGlvbgorICAgIHsKKyAgICAgICAgU3RyaW5nIHByb3RvY29sID0gcmVxLmdldFByb3RvY29sKCk7CisgICAgICAgIFN0cmluZyBtc2cgPSBsU3RyaW5ncy5nZXRTdHJpbmcoImh0dHAubWV0aG9kX2dldF9ub3Rfc3VwcG9ydGVkIik7CisgICAgICAgIGlmIChwcm90b2NvbC5lbmRzV2l0aCgiMS4xIikpIHsKKyAgICAgICAgICAgIHJlc3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XQKKyAgICAgKgorICAgICAqIEByZXR1cm4gIGEgICA8Y29kZT5sb25nPC9jb2RlPiBpbnRlZ2VyIHNwZWNpZnlpbmcKKyAgICAgKiAgICAgICAgICAgICAgICAgIHRoZSB0aW1lIHRoZSA8Y29kZT5IdHRwU2VydmxldFJlcXVlc3Q8L2NvZGU+CisgICAgICogICAgICAgICAgICAgICAgICBvYmplY3Qgd2FzIGxhc3QgbW9kaWZpZWQsIGluIG1pbGxpc2Vjb25kcworICAgICAqICAgICAgICAgICAgICAgICAgc2luY2UgbWlkbmlnaHQsIEphbnVhcnkgMSwgMTk3MCBHTVQsIG9yCisgICAgICogICAgICAgICAgICAgICAgICAtMSBpZiB0aGUgdGltZSBpcyBub3Qga25vd24KKyAgICAgKi8KKworICAgIHByb3RlY3RlZCBsb25nIGdldExhc3RNb2RpZmllZChIdHRwU2VydmxldFJlcXVlc3QgcmVxKSB7CisgICAgICAgIHJldHVybiAtMTsKKyAgICB9CisKKworICAgIC8qKgorICAgICAqIAorICAgICAqCisgICAgICogPHA+UmVjZWl2ZXMgYW4gSFRUUCBIRUFEIHJlcXVlc3QgZnJvbSB0aGUgcHJvdGVjdGVkCisgICAgICogPGNvZGU+c2VydmljZTwvY29kZT4gbWV0aG9kIGFuZCBoYW5kbGVzIHRoZQorICAgICAqIHJlcXVlc3QuCisgICAgICogVGhlIGNsaWVudCBzZW5kcyBhIEhFQUQgcmVxdWVzdCB3aGVuIGl0IHdhbnRzCisgICAgICogdG8gc2VlIG9ubHkgdGhlIGhlYWRlcnMgb2YgYSByZXNwb25zZSwgc3VjaCBhcworICAgICAqIENvbnRlbnQtVHlwZSBvciBDb250ZW50LUxlbmd0aC4gVGhlIEhUVFAgSEVBRAorICAgICAqIG1ldGhvZCBjb3VudHMgdGhlIG91dHB1dCBieXRlcyBpbiB0aGUgcmVzcG9uc2UKKyAgICAgKiB0byBzZXQgdGhlIENvbnRlbnQtTGVuZ3RoIGhlYWRlciBhY2N1cmF0ZWx5LgorICAgIC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BzZXJ2bGV0CisgICAgICoKKyAgICAgKiBAcGFyYW0gcmVzcCAgYW4ge0BsaW5rIEh0dHBTZXJ2bGV0UmVzcG9uc2V9IG9iamVjdCB0aGF0CisgICAgICogICAgICAgICAgICAgICAgICBjb250YWlucyB0aGUgcmVzcG9uc2UgdGhlIHNlcnZsZXQgc2VuZHMKKyAgICAgKiAgICAgICAgICAgICAgICAgIHRvIHRoZSBjbGllbnQKKyAgICAgKiAKKyAgICAgKiBAdGhyb3dzIElPRXhjZXB0aW9uICAgaWYgYW4gaW5wdXQgb3Igb3V0cHV0IGVycm9yIGlzIAorICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGV0ZWN0ZWQgd2hlbiB0aGUgc2VydmxldCBoYW5kbGVzCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgcmVxdWVzdAorICAgICAqCisgICAgICogQHRocm93cyBTZXJ2bGV0RXhjZXB0aW9uICBpZiB0aGUgcmVxdWVzdCBmb3IgdGhlIFBPU1QKKyAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb3VsZCBub3QgYmUgaGFuZGxlZAorICAgICAqCisgICAgICogQHNlZSBqYXZheC5zZXJ2bGV0LlNlcnZsZXRPdXRwdXRTdHJlYW0KKyAgICAgKiBAc2VlIGphdmF4LnNlcnZsZXQuU2VydmxldFJlc3BvbnNlI3NldENvbnRlbnRUeXBlCisgICAgICovCisgICAgcHJvdGVjdGVkIHZvaWQgZG9Qb3N0KEh0dHBTZXJ2bGV0UmVxdWVzdCByZXEsIEh0dHBTZXJ2bGV0UmVzcG9uc2UgcmVzcCkKKyAgICAgICAgdGhyb3dzIFNlcnZsZXRFeGNlcHRpb24sIElPRXhjZXB0aW9uCisgICAgeworICAgICAgICBTdHJpbmcgcHJvdG9jb2wgPSByZXEuZ2V0UHJvdG9jb2woKTsKKyAgICAgICAgU3RyaW5nIG1zZyA9IGxTdHJpbmdzLmdldFN0cmluZygiaHR0c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GUgcmVxdWVzdCB0aGUgY2xpZW50IG1hZGUgb2YKKyAgICAgKiAgICAgICAgICAgICAgICAgIHRoZSBzZXJ2bGV0CisgICAgICoKKyAgICAgKiBAcGFyYW0gcmVzcCAgdGhlIHtAbGluayBIdHRwU2VydmxldFJlc3BvbnNlfSBvYmplY3QgdGhhdAorICAgICAqICAgICAgICAgICAgICAgICAgY29udGFpbnMgdGhlIHJlc3BvbnNlIHRoZSBzZXJ2bGV0IHJldHVybnMKKyAgICAgKiAgICAgICAgICAgICAgICAgIHRvIHRoZSBjbGllbnQKKyAgICAgKgorICAgICAqIEB0aHJvd3MgSU9FeGNlcHRpb24gICBpZiBhbiBpbnB1dCBvciBvdXRwdXQgZXJyb3Igb2NjdXJzCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSB0aGUgc2VydmxldCBpcyBoYW5kbGluZyB0aGUKKyAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBVVCByZXF1ZXN0CisgICAgICoKKyAgICAgKiBAdGhyb3dzIFNlcnZsZXRFeGNlcHRpb24gIGlmIHRoZSByZXF1ZXN0IGZvciB0aGUgUFVUCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2Fubm90IGJlIGhhbmRsZWQKKyAgICAgKi8KKyAgICBwcm90ZWN0ZWQgdm9pZCBkb1B1dChIdHRwU2VydmxldFJlcXVlc3QgcmVxLCBIdHRwU2VydmxldFJlc3BvbnNlIHJlc3ApCisgICAgICAgIHRocm93cyBTZXJ2bGV0RXhjZXB0aW9uLCBJT0V4Y2VwdGlvbgorICAgIHsKKyAgICAgICAgU3RyaW5nIHByb3RvY29sID0gcmVxLmdldFByb3RvY29sKCk7CisgICAgICAgIFN0cmluZyBtc2cgPSBsU3RyaW5ncy5nZXRTdHJpbmcoImh0dHAubWV0aG9kX3B1dF9ub3Rfc3VwcG9ydGVkIik7CisgICAgICAgIGlmIChwcm90b2NvbC5lbmRzV2l0aCgiM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ICAgICogPGNvZGU+ZG9EZWxldGU8L2NvZGU+IHJldHVybnMgYW4gSFRUUCAiQmFkIFJlcXVlc3QiCisgICAgICogbWVzc2FnZS4KKyAgICAgKgorICAgICAqIEBwYXJhbSByZXEgICB0aGUge0BsaW5rIEh0dHBTZXJ2bGV0UmVxdWVzdH0gb2JqZWN0IHRoYXQKKyAgICAgKiAgICAgICAgICAgICAgICAgIGNvbnRhaW5zIHRoZSByZXF1ZXN0IHRoZSBjbGllbnQgbWFkZSBvZgorICAgICAqICAgICAgICAgICAgICAgICAgdGhlIHNlcnZsZXQKKyAgICAgKgorICAgICAqIEBwYXJhbSByZXNwICB0aGUge0BsaW5rIEh0dHBTZXJ2bGV0UmVzcG9uc2V9IG9iamVjdCB0aGF0CisgICAgICogICAgICAgICAgICAgICAgICBjb250YWlucyB0aGUgcmVzcG9uc2UgdGhlIHNlcnZsZXQgcmV0dXJucworICAgICAqICAgICAgICAgICAgICAgICAgdG8gdGhlIGNsaWVudCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICoKKyAgICAgKiBAdGhyb3dzIElPRXhjZXB0aW9uICAgaWYgYW4gaW5wdXQgb3Igb3V0cHV0IGVycm9yIG9jY3VycworICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgdGhlIHNlcnZsZXQgaXMgaGFuZGxpbmcgdGhlCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBERUxFVEUgcmVxdWVzdAorICAgICAqCisgICAgICogQHRocm93cyBTZXJ2bGV0RXhjZXB0aW9uICBpZiB0aGUgcmVxdWVzdCBmb3IgdGhlCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgREVMRVRFIGNhbm5vdCBiZSBoYW5kbGVkCisgICAgICovCisgICAgcHJvdGVjdGVkIHZvaWQgZG9EZWxldGUoSHR0cFNlcnZsZXRSZXF1ZXN0IHJlcSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBIdHRwU2VydmxldFJlc3BvbnNlIHJlc3ApCisgICAgICAgIHRocm93cyBTZXJ2bGV0RXhjZXB0aW9uLCBJT0V4Y2VwdGlvbgorICAgIHsKKyAgICAgICAgU3RyaW5nIHByb3RvY29sID0gcmVxLmdldFByb3RvY29sKCk7CisgICAgICAgIFN0cmluZyBtc2cgPSBsU3RyaW5ncy5nZXRTdHJpbmcoImh0dHAubWV0aG9kX2RlbGV0ZV9ub3Rfc3VwcG9ydGVkIik7CisgICAgICAgIGlmIChwcm90b2NvbC5lbmRzV2l0aCgiMS4xIikpIHsKKyAgICAgICAgICAgIHJlc3Auc2VuZEVycm9yKEh0dHBTZXJ2bGV0UmVzcG9uc2UuU0NfTUVUSE9EX05PVF9BTExPV0VELCBtc2cpOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgcmVzcC5zZW5kRXJyb3IoSHR0cFNlcnZsZXRSZXNwb25zZS5TQ19CQURfUkVRVUVTVCwgbXNnKTsKKyAgICAgICAgfQorICAgIH0KKyAgICAKKworICAgIHByaXZhdGUgTWV0aG9kW10gZ2V0QWxsRGVjbGFyZWRNZXRob2RzKENsYXNzPD8gZXh0ZW5kcyBIdHRwU2VydmxldD4gYykgeworCisgICAgICAgIENsYXNzPD8+IGNsYXp6ID0gYzsKKyAgICAgICAgTWV0aG9kW10gYWxsTWV0aG9kcyA9IG51bGw7CisKKyAgICAgICAgd2hpbGUgKCFjbGF6ei5lcXVhbHMoSHR0cFNlcnZsZXQuY2xhc3MpKSB7CisgICAgICAgICAgICBNZXRob2RbXSB0aGlzTWV0aG9kcyA9IGNsYXp6LmdldERlY2xhcmVkTWV0aG9kcygpOworICAgICAgICAgICAgaWYgKGFsbE1ldGhvZHMgIT0gbnVsbCAmJiBhbGxNZXRob2RzLmxlbmd0aCA+IDApIHsKKyAgICAgICAgICAgICAgICBNZXRob2RbXSBzdWJDbGFzc01ldGhvZHMgPSBhbGxNZXRob2RzOworICAgICAgICAgICAgICAgIGFsbE1ldGhvZHMgPQorICAgICAgICAgICAgICAgICAgICBuZXcgTWV0aG9kW3RoaXNNZXRob2RzLmxlbmd0aCArIHN1YkNsYXNzTWV0aG9kcy5sZW5ndGhdOworICAgICAgICAgICAgICAgIFN5c3RlbS5hcnJheWNvcHkodGhpc01ldGhvZHMsIDAsIGFsbE1ldGhvZHMsIDAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzTWV0aG9kcy5sZW5ndGgpOworICAgICAgICAgICAgICAgIFN5c3RlbS5hcnJheWNvcHkoc3ViQ2xhc3NNZXRob2RzLCAwLCBhbGxNZXRob2RzLCB0aGlzTWV0aG9kcy5sZW5ndGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWJDbGFzc01ldGhvZHMubGVuZ3RoKTsKKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgYWxsTWV0aG9kcyA9IHRoaXNNZXRob2RzOworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBjbGF6eiA9IGNsYXp6LmdldFN1cGVyY2xhc3MoKTsKKyAgICAgICAgfQorCisgICAgICAgIHJldHVybiAoKGFsbE1ldGhvZHMgIT0gbnVsbCkgPyBhbGxNZXRob2RzIDogbmV3IE1ldGhvZFswXSk7CisgICAgfQorCisKKyAgICAvKioKKyAgICAgKiBDYWxsZWQgYnkgdGhlIHNlcnZlciAodmlhIHRoZSA8Y29kZT5zZXJ2aWNlPC9jb2RlPiBtZXRob2QpCisgICAgICogdG8gYWxsb3cgYSBzZXJ2bGV0IHRvIGhhbmRsZSBhIE9QVElPTlMgcmVxdWVzdC4KKyAgICAgKgorICAgICAqIFRoZSBPUFRJT05TIHJlcXVlc3QgZGV0ZXJtaW5lcyB3aGljaCBIVFRQIG1ldGhvZHMgCisgICAgICogdGhlIHNlcnZlciBzdXBwb3J0cyBhbmQKKyAgICAgKiByZXR1cm5zIGFuIGFwcHJvcHJpYXRlIGhlYWRlci4gRm9yIGV4YW1wbGUsIGlmIGEgc2VydmxldAorICAgICAqIG92ZXJyaWRlcyA8Y29kZT5kb0dldDwvY29kZT4sIHRoaXMgbWV0aG9kIHJldHVybnMgdGhlCisgICAgICogZm9sbG93aW5nIGhlYWRlcjoKKyAgICAgKgorICAgICAqIDxwPjxjb2RlPkFsbG93OiBHRVQsIEhFQUQsIFRSQUNFLCBPUFRJT05TPC9jb2RlPgorICAgICAqCisgICAgICogPHA+VGhlcmUncyBubyBuZWVkIHRvIG92ZXJyaWRlIHRoaXMgbWV0aG9kIHVubGVzcyB0aGUKKyAgICAgKiBzZXJ2bGV0IGltcGxlbWVudHMgbmV3IEhUVFAgbWV0aG9kcywgYmV5b25kIHRob3NlIAorICAgICAqIGltcGxlbWVudGVkIGJ5IEhUVFAgMS4xLgorICAgICAqCisgICAgICogQHBhcmFtIHJlcSAgIHRoZSB7QGxpbmsgSHR0cFNlcnZsZXRSZXF1ZXN0fSBvYmplY3QgdGhhdAorICAgICAqICAgICAgICAgICAgICAgICAgY29udGFpbnMgdGhlIHJlcXVlc3QgdGhlIGNsaWVudCBtYWRlIG9mCisgICAgICogICAgICAgICAgICAgICAgICB0aGUgc2VydmxldAorICAgICAqCisgICAgICogQHBhcmFtIHJlc3AgIHRoZSB7QGxpbmsgSHR0cFNlcnZsZXRSZXNwb25zZX0gb2JqZWN0IHRoYXQKKyAgICAgKiAgICAgICAgICAgICAgICAgIGNvbnRhaW5zIHRoZSByZXNwb25zZSB0aGUgc2VydmxldCByZXR1cm5zCisgICAgICogICAgICAgICAgICAgICAgICB0byB0aGUgY2xpZW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgKgorICAgICAqIEB0aHJvd3MgSU9FeGNlcHRpb24gICBpZiBhbiBpbnB1dCBvciBvdXRwdXQgZXJyb3Igb2NjdXJzCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSB0aGUgc2VydmxldCBpcyBoYW5kbGluZyB0aGUKKyAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE9QVElPTlMgcmVxdWVzdAorICAgICAqCisgICAgICogQHRocm93cyBTZXJ2bGV0RXhjZXB0aW9uICBpZiB0aGUgcmVxdWVzdCBmb3IgdGhlCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgT1BUSU9OUyBjYW5ub3QgYmUgaGFuZGxlZAorICAgICAqLworICAgIHByb3RlY3RlZCB2b2lkIGRvT3B0aW9ucyhIdHRwU2VydmxldFJlcXVlc3QgcmVxLCBIdHRwU2VydmxldFJlc3BvbnNlIHJlc3ApCisgICAgICAgIHRocm93cyBTZXJ2bGV0RXhjZXB0aW9uLCBJT0V4Y2VwdGlvbgorICAgIHsKKyAgICAgICAgTWV0aG9kW10gbWV0aG9kcyA9IGdldEFsbERlY2xhcmVkTWV0aG9kcyh0aGlzLmdldENsYXNzKCkpOworICAgICAgICAKKyAgICAgICAgYm9vbGVhbiBBTExPV19HRVQgPSBmYWxzZTsKKyAgICAgICAgYm9vbGVhbiBBTExPV19IRUFEID0gZmFsc2U7CisgICAgICAgIGJvb2xlYW4gQUxMT1dfUE9TVCA9IGZhbHNlOworICAgICAgICBib29sZWFuIEFMTE9XX1BVVCA9IGZhbHNlOworICAgICAgICBib29sZWFuIEFMTE9XX0RFTEVURSA9IGZhbHNlOworICAgICAgICBib29sZWFuIEFMTE9XX1RSQUNFID0gdHJ1ZTsKKyAgICAgICAgYm9vbGVhbiBBTExPV19PUFRJT05TID0gdHJ1ZTsKKyAgICAgICAgCisgICAgICAgIGZvciAoaW50IGk9MDsgaTxtZXRob2RzLmxlbmd0aDsgaSsrKSB7CisgICAgICAgICAgICBTdHJpbmcgbWV0aG9kTmFtZSA9IG1ldGhvZHNbaV0uZ2V0TmFtZSgpOworICAgICAgICAgICAgCisgICAgICAgICAgICBpZiAobWV0aG9kTmFtZS5lcXVhbHMoImRvR2V0IikpIHsKKyAgICAgICAgICAgICAgICBBTExPV19HRVQgPSB0cnVlOworICAgICAgICAgICAgICAgIEFMTE9XX0hFQUQgPSB0cnVlOworICAgICAgICAgICAgfSBlbHNlIGlmIChtZXRob2ROYW1lLmVxdWFscygiZG9Qb3N0IikpIHsKKyAgICAgICAgICAgICAgICBBTExPV19QT1NUID0gdHJ1ZTsKKyAgICAgICAgICAgIH0gZWxzZSBpZiAobWV0aG9kTmFtZS5lcXVhbHMoImRvUHV0IikpIHsKKyAgICAgICAgICAgICAgICBBTExPV19QVVQgPSB0cnVlOworICAgICAgICAgICAgfSBlbHNlIGlmIChtZXRob2ROYW1lLmVxdWFscygiZG9EZWxldGUiKSkgeworICAgICAgICAgICAgICAgIEFMTE9XX0RFTEVURSA9IHRydWU7CisgICAgICAgICAgICB9CisgICAgICAgICAgICAKKyAgICAgICAgfQorICAgICAgICAKKyAgICAgICAgLy8gd2Uga25vdyAiYWxsb3ciIGlzIG5vdCBudWxsIGFzIEFMTE9XX09QVElPTlMgPSB0cnVlCisgICAgICAgIC8vIHdoZW4gdGhpcyBtZXRob2QgaXMgaW52b2tlZAorICAgICAgICBTdHJpbmdCdWlsZGVyIGFsbG93ID0gbmV3IFN0cmluZ0J1aWxkZXIoKTsKKyAgICAgICAgaWYgKEFMTE9XX0dFVCkgeworICAgICAgICAgICAgYWxsb3cuYXBwZW5kKE1FVEhPRF9HRVQpOworICAgICAgICB9CisgICAgICAgIGlmIChBTExPV19IRUFEKSB7CisgICAgICAgICAgICBpZiAoYWxsb3cubGVuZ3RoKCkgPiAwKSB7CisgICAgICAgICAgICAgICAgYWxsb3cuYXBwZW5kKCIsICIpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgYWxsb3cuYXBwZW5kKE1FVEhPRF9IRUFEKTsKKyAgICAgICAgfQorICAgICAgICBpZiAoQUxMT1dfUE9TVCkgeworICAgICAgICAgICAgaWYgKGFsbG93Lmxlbmd0aCgpID4gMCkgeworICAgICAgICAgICAgICAgIGFsbG93LmFwcGVuZCgiLCAiKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGFsbG93LmFwcGVuZChNRVRIT0RfUE9TVCk7CisgICAgICAgIH0KKyAgICAgICAgaWYgKEFMTE9XX1BVVCkgeworICAgICAgICAgICAgaWYgKGFsbG93Lmxlbmd0aCgpID4gMCkgeworICAgICAgICAgICAgICAgIGFsbG93LmFwcGVuZCgiLCAiKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGFsbG93LmFwcGVuZChNRVRIT0RfUFVUKTsKKyAgICAgICAgfQorICAgICAgICBpZiAoQUxMT1dfREVMRVRFKSB7CisgICAgICAgICAgICBpZiAoYWxsb3cubGVuZ3RoKCkgPiAwKSB7CisgICAgICAgICAgICAgICAgYWxsb3cuYXBwZW5kKCIsICIpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgYWxsb3cuYXBwZW5kKE1FVEhPRF9ERUxFVEUpOworICAgICAgICB9CisgICAgICAgIGlmIChBTExPV19UUkFDRSkgeworICAgICAgICAgICAgaWYgKGFsbG93Lmxlbmd0aCgpID4gMCkgeworICAgICAgICAgICAgICAgIGFsbG93LmFwcGVuZCgiLCAiKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGFsbG93LmFwcGVuZChNRVRIT0RfVFJBQ0UpOworICAgICAgICB9CisgICAgICAgIGlmIChBTExPV19PUFRJT05TKSB7CisgICAgICAgICAgICBpZiAoYWxsb3cubGVuZ3RoKCkgPiAwKSB7CisgICAgICAgICAgICAgICAgYWxsb3cuYXBwZW5kKCIsICIpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgYWxsb3cuYXBwZW5kKE1FVEhPRF9PUFRJT05TKTsKKyAgICAgICAgfQorICAgICAgICAKKyAgICAgICAgcmVzcC5zZXRIZWFkZXIoIkFsbG93IiwgYWxsb3cudG9TdHJpbmcoKSk7CisgICAgfQorICAgIAorICAgIAorICAgIC8qKgorICAgICAqIENhbGxlZCBieSB0aGUgc2VydmVyICh2aWEgdGhlIDxjb2RlPnNlcnZpY2U8L2NvZGU+IG1ldGhvZCkKKyAgICAgKiB0byBhbGxvdyBhIHNlcnZsZXQgdG8gaGFuZGxlIGEgVFJBQ0UgcmVxdWVzdC4KKyAgICAgKgorICAgICAqIEEgVFJBQ0UgcmV0dXJucyB0aGUgaGVhZGVycyBzZW50IHdpdGggdGhlIFRSQUNFCisgICAgICogcmVxdWVzdCB0byB0aGUgY2xpZW50LCBzbyB0aGF0IHRoZXkgY2FuIGJlIHVzZWQgaW4KKyAgICAgKiBkZWJ1Z2dpbmcuIFRoZXJlJ3Mgbm8gbmVlZCB0byBvdmVycmlkZSB0aGlzIG1ldGhvZC4gCisgICAgICoKKyAgICAgKiBAcGFyYW0gcmVxICAgdGhlIHtAbGluayBIdHRwU2VydmxldFJlcXVlc3R9IG9iamVjdCB0aGF0CisgICAgICogICAgICAgICAgICAgICAgICBjb250YWlucyB0aGUgcmVxdWVzdCB0aGUgY2xpZW50IG1hZGUgb2YKKyAgICAgKiAgICAgICAgICAgICAgICAgIHRoZSBzZXJ2bGV0CisgICAgICoKKyAgICAgKgorICAgICAqIEBwYXJhbSByZXNwICB0aGUge0BsaW5rIEh0dHBTZXJ2bGV0UmVzcG9uc2V9IG9iamVjdCB0aGF0CisgICAgICogICAgICAgICAgICAgICAgICBjb250YWlucyB0aGUgcmVzcG9uc2UgdGhlIHNlcnZsZXQgcmV0dXJucworICAgICAqICAgICAgICAgICAgICAgICAgdG8gdGhlIGNsaWVudCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICoKKyAgICAgKiBAdGhyb3dzIElPRXhjZXB0aW9uICAgaWYgYW4gaW5wdXQgb3Igb3V0cHV0IGVycm9yIG9jY3VycworICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgdGhlIHNlcnZsZXQgaXMgaGFuZGxpbmcgdGhlCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUUkFDRSByZXF1ZXN0CisgICAgICoKKyAgICAgKiBAdGhyb3dzIFNlcnZsZXRFeGNlcHRpb24gIGlmIHRoZSByZXF1ZXN0IGZvciB0aGUKKyAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUUkFDRSBjYW5ub3QgYmUgaGFuZGxlZAorICAgICAqLworICAgIHByb3RlY3RlZCB2b2lkIGRvVHJhY2UoSHR0cFNlcnZsZXRSZXF1ZXN0IHJlcSwgSHR0cFNlcnZsZXRSZXNwb25zZSByZXNwKSAKKyAgICAgICAgdGhyb3dzIFNlcnZsZXRFeGNlcHRpb24sIElPRXhjZXB0aW9uCisgICAgeworICAgICAgICAKKyAgICAgICAgaW50IHJlc3BvbnNlTGVuZ3RoOworCisgICAgICAgIFN0cmluZyBDUkxGID0gIlxyXG4iOworICAgICAgICBTdHJpbmdCdWlsZGVyIGJ1ZmZlciA9IG5ldyBTdHJpbmdCdWlsZGVyKCJUUkFDRSAiKS5hcHBlbmQocmVxLmdldFJlcXVlc3RVUkkoKSkKKyAgICAgICAgICAgIC5hcHBlbmQoIiAiKS5hcHBlbmQocmVxLmdldFByb3RvY29sKCkpOworCisgICAgICAgIEVudW1lcmF0aW9uPFN0cmluZz4gcmVxSGVhZGVyRW51bSA9IHJlcS5nZXRIZWFkZXJOYW1lcygpOworCisgICAgICAgIHdoaWxlKCByZXFIZWFkZXJFbnVtLmhhc01vcmVFbGVtZW50cygpICkgeworICAgICAgICAgICAgU3RyaW5nIGhlYWRlck5hbWUgPSByZXFIZWFkZXJFbnVtLm5leHRFbGVtZW50KCk7CisgICAgICAgICAgICBidWZmZXIuYXBwZW5kKENSTEYpLmFwcGVuZChoZWFkZXJOYW1lKS5hcHBlbmQoIjogIikKKyAgICAgICAgICAgICAgICAuYXBwZW5kKHJlcS5nZXRIZWFkZXIoaGVhZGVyTmFtZSkpOworICAgICAgICB9CisKKyAgICAgICAgYnVmZmVyLmFwcGVuZChDUkxGKTsKKworICAgICAgICByZXNwb25zZUxlbmd0aCA9IGJ1ZmZlci5sZW5ndGgoKTsKKworICAgICAgICByZXNwLnNldENvbnRlbnRUeXB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gcmV0dXJucworICAgICAqICAgICAgICAgICAgICAgICAgdG8gdGhlIGNsaWVudCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICoKKyAgICAgKiBAdGhyb3dzIElPRXhjZXB0aW9uICAgaWYgYW4gaW5wdXQgb3Igb3V0cHV0IGVycm9yIG9jY3VycworICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgdGhlIHNlcnZsZXQgaXMgaGFuZGxpbmcgdGhlCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBIVFRQIHJlcXVlc3QKKyAgICAgKgorICAgICAqIEB0aHJvd3MgU2VydmxldEV4Y2VwdGlvbiAgaWYgdGhlIEhUVFAgcmVxdWVzdAorICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbm5vdCBiZSBoYW5kbGVkCisgICAgICogCisgICAgICogQHNlZSBqYXZheC5zZXJ2bGV0LlNlcnZsZXQjc2VydmljZQorICAgICAqLworICAgIHByb3RlY3RlZCB2b2lkIHNlcnZpY2UoSHR0cFNlcnZsZXRSZXF1ZXN0IHJlcSwgSHR0cFNlcnZsZXRSZXNwb25zZSByZXNwKQorICAgICAgICB0aHJvd3MgU2VydmxldEV4Y2VwdGlvbiwgSU9FeGNlcHRpb24KKyAgICB7CisgICAgICAgIFN0cmluZyBtZXRob2QgPSByZXEuZ2V0TWV0aG9kKCk7CisKKyAgICAgICAgaWYgKG1ldGhvZC5lcXVhbHMoTUVUSE9EX0dFVCkpIHsKKyAgICAgICAgICAgIGxvbmcgbGFzdE1vZGlmaWVkID0gZ2V0TGFzdE1vZGlmaWVkKHJlcSk7CisgICAgICAgICAgICBpZiAobGFzdE1vZGlmaWVkID09IC0xKSB7CisgICAgICAgICAgICAgICAgLy8gc2VydmxldCBkb2Vzbid0IHN1cHBvcnQgaWYtbW9kaWZpZWQtc2luY2UsIG5vIHJlYXNvbgorICAgICAgICAgICAgICAgIC8vIHRvIGdvIHRocm91Z2ggZnVydGhlciBleHBlbnNpdmUgbG9naWMKKyAgICAgICAgICAgICAgICBkb0dldChyZXEsIHJlc3ApOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICBsb25nIGlmTW9kaWZpZWRTaW5jZSA9IHJlcS5nZXREYXRlSGVhZGVyKEhFQURFUl9JRk1PRFNJTkNFKTsKKyAgICAgICAgICAgICAgICBpZiAoaWZNb2RpZmllZFNpbmNlIDwgbGFzdE1vZGlmaWVkKSB7CisgICAgICAgICAgICAgICAgICAgIC8vIElmIHRoZSBzZXJ2bGV0IG1vZCB0aW1lIGlzIGxhdGVyLCBjYWxsIGRvR2V0KCkKKyAgICAgICAgICAgICAgICAgICAgLy8gUm91bmQgZG93biB0byB0aGUgbmVhcmVzdCBzZWNvbmQgZm9yIGEgcHJvcGVyIGNvbXBhcmUKKyAgICAgICAgICAgICAgICAgICAgLy8gQSBpZk1vZGlmaWVkU2luY2Ugb2YgLTEgd2lsbCBhbHdheXMgYmUgbGVzcworICAgICAgICAgICAgICAgICAgICBtYXliZVNldExhc3RNb2RpZmllZChyZXNwLCBsYXN0TW9kaWZpZWQpOworICAgICAgICAgICAgICAgICAgICBkb0dldChyZXEsIHJlc3ApOworICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIHJlc3Auc2V0U3RhdHVzKEh0dHBTZXJ2bGV0UmVzcG9uc2UuU0NfTk9UX01PRElGSUVEKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisKKyAgICAgICAgfSBlbHNlIGlmIChtZXRob2QuZXF1YWxzKE1FVEhPRF9IRUFEKSkgeworICAgICAgICAgICAgbG9uZyBsYXN0TW9kaWZpZWQgPSBnZXRMYXN0TW9kaWZpZWQocmVxKTsKKyAgICAgICAgICAgIG1heWJlU2V0TGFzdE1vZGlmaWVkKHJlc3AsIGxhc3RNb2RpZmllZCk7CisgICAgICAgICAgICBkb0hlYWQocmVxLCByZXNwKTsKKworICAgICAgICB9IGVsc2UgaWYgKG1ldGhvZC5lcXVhbHMoTUVUSE9EX1BPU1QpKSB7CisgICAgICAgICAgICBkb1Bvc3QocmVxLCByZXNwKTsKKyAgICAgICAgICAgIAorICAgICAgICB9IGVsc2UgaWYgKG1ldGhvZC5lcXVhbHMoTUVUSE9EX1BVVCkpIHsKKyAgICAgICAgICAgIGRvUHV0KHJlcSwgcmVzcCk7CisgICAgICAgICAgICAKKyAgICAgICAgfSBlbHNlIGlmIChtZXRob2QuZXF1YWxzKE1FVEhPRF9ERUxFVEUpKSB7CisgICAgICAgICAgICBkb0RlbGV0ZShyZXEsIHJlc3ApOworICAgICAgICAgICAgCisgICAgICAgIH0gZWxzZSBpZiAobWV0aG9kLmVxdWFscyhNRVRIT0RfT1BUSU9OUykpIHsKKyAgICAgICAgICAgIGRvT3B0aW9ucyhyZXEscmVzcCk7CisgICAgICAgICAgICAKKyAgICAgICAgfSBlbHNlIGlmIChtZXRob2QuZXF1YWxzKE1FVEhPRF9UUkFDRSkpIHsKKyAgICAgICAgICAgIGRvVHJhY2UocmVxLHJlc3ApOworICAgICAgICAgICAgCisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAvLworICAgICAgICAgICAgLy8gTm90ZSB0aGF0IHRoaXMgbWVhbnMgTk8gc2VydmxldCBzdXBwb3J0cyB3aGF0ZXZlcgorICAgICAgICAgICAgLy8gbWV0aG9kIHdhcyByZXF1ZXN0ZWQsIGFueXdoZXJlIG9uIHRoaXMgc2VydmVyLgorICAgICAgICAgICAgLy8KKworICAgICAgICAgICAgU3RyaW5nIGVyck1zZyA9IGxTdHJpbmdzLmdldFN0cmluZygiaHR0cC5tZXRob2Rfbm90X2ltcGxlbWVudGVkIik7CisgICAgICAgICAgICBPYmplY3RbXSBlcnJBcmdzID0gbmV3IE9iamVjdFsxXTsKKyAgICAgICAgICAgIGVyckFyZ3NbMF0gPSBtZXRob2Q7CisgICAgICAgICAgICBlcnJNc2cgPSBNZXNzYWdlRm9ybWF0LmZvcm1hdChlcnJNc2csIGVyckFyZ3MpOworICAgICAgICAgICAgCisgICAgICAgICAgICByZXNwLnNlbmRFcnJvcihIdHRwU2VydmxldFJlc3BvbnNlLlNDX05PVF9JTVBMRU1FTlRFRCwgZXJyTXNnKTsKKyAgICAgICAgfQorICAgIH0KKyAgICAKKworICAgIC8qCisgICAgICogU2V0cyB0aGUgTGFzdC1Nb2RpZmllZCBlbnRpdHkgaGVhZGVyIGZpZWxkLCBpZiBpdCBoYXMgbm90CisgICAgICogYWxyZWFkeSBiZWVuIHNldCBhbmQgaWYgdGhlIHZhbHVlIGlzIG1lYW5pbmdmdWwuICBDYWxsZWQgYmVmb3JlCisgICAgICogZG9HZXQsIHRvIGVuc3VyZSB0aGF0IGhlYWRlcnMgYXJlIHNldCBiZWZvcmUgcmVzcG9uc2UgZGF0YSBpcworICAgICAqIHdyaXR0ZW4uICBBIHN1YmNsYXNzIG1pZ2h0IGhhdmUgc2V0IHRoaXMgaGVhZGVyIGFscmVhZHksIHNvIHdlCisgICAgICogY2hlY2suCisgICAgICovCisgICAgcHJpdmF0ZSB2b2lkIG1heWJlU2V0TGFzdE1vZGlmaWVkKEh0dHBTZXJ2bGV0UmVzcG9uc2UgcmVzcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9uZyBsYXN0TW9kaWZpZWQpIHsKKyAgICAgICAgaWYgKHJlc3AuY29udGFpbnNIZWFkZXIoSEVBREVSX0xBU1RNT0QpKQorICAgICAgICAgICAgcmV0dXJuOworICAgICAgICBpZiAobGFzdE1vZGlmaWVkID49IDApCisgICAgICAgICAgICByZXNwLnNldERhdGVIZWFkZXIoSEVBREVSX0xBU1RNT0QsIGxhc3RNb2RpZmllZCk7CisgICAgfQorICAgCisgICAgCisgICAgLyoqCisgICAgICogRGlzcGF0Y2hlcyBjbGllbnQgcmVxdWVzdHMgdG8gdGhlIHByb3RlY3RlZAorICAgICAqIDxjb2RlPnNlcnZpY2U8L2NvZGU+IG1ldGhvZC4gVGhlcmUncyBubyBuZWVkIHRvCisgICAgICogb3ZlcnJpZGUgdGhpcyBtZXRob2QuCisgICAgICogCisgICAgICogQHBhcmFtIHJlcSAgIHRoZSB7QGxpbmsgSHR0cFNlcnZsZXRSZXF1ZXN0fSBvYmplY3QgdGhhdAorICAgICAqICAgICAgICAgICAgICAgICAgY29udGFpbnMgdGhlIHJlcXVlc3QgdGhlIGNsaWVudCBtYWRlIG9mCisgICAgICogICAgICAgICAgICAgICAgICB0aGUgc2VydmxldAorICAgICAqCisgICAgICogQHBhcmFtIHJlcyAgIHRoZSB7QGxpbmsgSHR0cFNlcnZsZXRSZXNwb25zZX0gb2JqZWN0IHRoYXQKKyAgICAgKiAgICAgICAgICAgICAgICAgIGNvbnRhaW5zIHRoZSByZXNwb25zZSB0aGUgc2VydmxldCByZXR1cm5zCisgICAgICogICAgICAgICAgICAgICAgICB0byB0aGUgY2xpZW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgKgorICAgICAqIEB0aHJvd3MgSU9FeGNlcHRpb24gICBpZiBhbiBpbnB1dCBvciBvdXRwdXQgZXJyb3Igb2NjdXJzCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSB0aGUgc2VydmxldCBpcyBoYW5kbGluZyB0aGUKKyAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEhUVFAgcmVxdWVzdAorICAgICAqCisgICAgICogQHRocm93cyBTZXJ2bGV0RXhjZXB0aW9uICBpZiB0aGUgSFRUUCByZXF1ZXN0IGNhbm5vdAorICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJlIGhhbmRsZWQgb3IgaWYgZWl0aGVyIHBhcmFtZXRlciBpcyBub3QKKyAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuIGluc3RhbmNlIG9mIGl0cyByZXNwZWN0aXZlIHtAbGluayBIdHRwU2VydmxldFJlcXVlc3R9C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5hbWUsIGludCB2YWx1ZSkgeworICAgICAgICBzdXBlci5hZGRJbnRIZWFkZXIobmFtZSwgdmFsdWUpOworICAgICAgICBjaGVja0hlYWRlcihuYW1lKTsKKyAgICB9CisKKyAgICBwcml2YXRlIHZvaWQgY2hlY2tIZWFkZXIoU3RyaW5nIG5hbWUpIHsKKyAgICAgICAgaWYgKCJjb250ZW50LWxlbmd0aCIuZXF1YWxzSWdub3JlQ2FzZShuYW1lKSkgeworICAgICAgICAgICAgZGlkU2V0Q29udGVudExlbmd0aCA9IHRydWU7CisgICAgICAgIH0KKyAgICB9CisKKyAgICBAT3ZlcnJpZGUKKyAgICBwdWJsaWMgU2VydmxldE91dHB1dFN0cmVhbSBnZXRPdXRwdXRTdHJlYW0oKSB0aHJvd3MgSU9FeGNlcHRpb24geworCisgICAgICAgIGlmICh3cml0ZXIgIT0gbnVsbCkgeworICAgICAgICAgICAgdGhyb3cgbmV3IElsbGVnYWxTdGF0ZUV4Y2VwdGlvbigKKyAgICAgICAgICAgICAgICBsU3RyaW5ncy5nZXRTdHJpbmcoImVyci5pc2UuZ2V0T3V0cHV0U3RyZWFtIikpOworICAgICAgICB9CisgICAgICAgIHVzaW5nT3V0cHV0U3RyZWFtID0gdHJ1ZTsKKworICAgICAgICByZXR1cm4gbm9Cb2R5OworICAgIH0KKworICAgIEBPdmVycmlkZQorICAgIHB1YmxpYyBQcmludFdyaXRlciBnZXRXcml0ZXIoKSB0aHJvd3MgVW5zdXBwb3J0ZWRFbmNvZGluZ0V4Y2VwdGlvbiB7CisKKyAgICAgICAgaWYgKHVzaW5nT3V0cHV0U3RyZWFtKSB7CisgICAgICAgICAgICB0aHJvdyBuZXcgSWxsZWdhbFN0YXRlRXhjZXB0aW9uKAorICAgICAgICAgICAgICAgIGxTdHJpbmdzLmdldFN0cmluZygiZXJyLmlzZS5nZXRXcml0ZXIiKSk7CisgICAgICAgIH0KKworICAgICAgICBpZiAod3JpdGVyID09IG51bGwpIHsKKyAgICAgICAgICAgIE91dHB1dFN0cmVhbVdyaXRlciB3ID0gbmV3IE91dHB1dFN0cmVhbVdyaXRlcigKKyAgICAgICAgICAgICAgICBub0JvZHksIGdldENoYXJhY3RlckVuY29kaW5nKCkpOworICAgICAgICAgICAgd3JpdGVyID0gbmV3IFByaW50V3JpdGVyKHcpOworICAgICAgICB9CisKKyAgICAgICAgcmV0dXJuIHdyaXRlcjsKKyAgICB9Cit9CisKKworLyoKKyAqIFNlcnZsZXQgb3V0cHV0IHN0cmVhbSB0aGF0IGdvYmJsZXMgdXAgYWxsIGl0cyBkYXRhLgorICovCisvLyBmaWxlIHByaXZhdGUKK2NsYXNzIE5vQm9keU91dHB1dFN0cmVhbSBleHRlbmRzIFNlcnZsZXRPdXRwdXRTdHJlYW0geworCisgICAgcHJpdmF0ZSBzdGF0aWMgZmluYWwgU3RyaW5nIExTVFJJTkdfRklMRSA9CisgICAgICAgICJqYXZheC5zZXJ2bGV0Lmh0dHAuTG9jYWxTdHJpbmdzIjsKKyAgICBwcml2YXRlIHN0YXRpYyBSZXNvdXJjZUJ1bmRsZSBsU3RyaW5ncyA9CisgICAgICAgIFJlc291cmNlQnVuZGxlLmdldEJ1bmRsZShMU1RSSU5HX0ZJTEUpOworCisgICAgcHJpdmF0ZSBpbnQgY29udGVudExlbmd0aCA9IDA7CisKKyAgICAvLyBmaWxlIHByaXZhdGUKKyAgICBOb0JvZHlPdXRwdXRTdHJlYW0oKSB7fQorCisgICAgLy8gZmlsZSBwcml2YXRlCisgICAgaW50IGdldENvbnRlbnRMZW5ndGgoKSB7CisgICAgICAgIHJldHVybiBjb250ZW50TGVuZ3RoOworICAgIH0KKworICAgIEBPdmVycmlkZQorICAgIHB1YmxpYyB2b2lkIHdyaXRlKGludCBiKSB7CisgICAgICAgIGNvbnRlbnRMZW5ndGgrKzsKKyAgICB9CisKKyAgICBAT3ZlcnJpZGUKKyAgICBwdWJsaWMgdm9pZCB3cml0ZShieXRlIGJ1ZltdLCBpbnQgb2Zmc2V0LCBpbnQgbGVuKQorICAgICAgICB0aHJvd3MgSU9FeGNlcHRpb24KKyAgICB7CisgICAgICAgIGlmIChidWYgPT0gbnVsbCkgeworICAgICAgICAgICAgdGhyb3cgbmV3IE51bGxQb2ludGVyRXhjZXB0aW9uKAorICAgICAgICAgICAgICAgICAgICBsU3RyaW5ncy5nZXRTdHJpbmcoImVyci5pby5udWxsQXJyYXkiKSk7CisgICAgICAgIH0KKworICAgICAgICBpZiAob2Zmc2V0IDwgMCB8fCBsZW4gPCAwIHx8IG9mZnNldCtsZW4gPiBidWYubGVuZ3RoKSB7CisgICAgICAgICAgICBTdHJpbmcgbXNnID0gbFN0cmluZ3MuZ2V0U3RyaW5nKCJlcnIuaW8uaW5kZXhPdXRPZkJvdW5kcyIpOworICAgICAgICAgICAgT2JqZWN0W10gbXNnQXJncyA9IG5ldyBPYmplY3RbM107CisgICAgICAgICAgICBtc2dBcmdzWzBdID0gSW50ZWdlci52YWx1ZU9mKG9mZnNldCk7CisgICAgICAgICAgICBtc2dBcmdzWzFdID0gSW50ZWdlci52YWx1ZU9mKGxlbik7CisgICAgICAgICAgICBtc2dBcmdzWzJdID0gSW50ZWdlci52YWx1ZU9mKGJ1Zi5sZW5ndGgpOworICAgICAgICAgICAgbXNnID0gTWVzc2FnZUZvcm1hdC5mb3JtYXQobXNnLCBtc2dBcmdzKTsKKyAgICAgICAgICAgIHRocm93IG5ldyBJbmRleE91dE9mQm91bmRzRXhjZXB0aW9uKG1zZyk7CisgICAgICAgIH0KKworICAgICAgICBjb250ZW50TGVuZ3RoICs9IGxlbjsKKyAgICB9CisKKworICAgIHB1YmxpYyBib29sZWFuIGlzUmVhZHkoKSB7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisKKyAgICBwdWJsaWMgdm9pZCBzZXRXcml0ZUxpc3RlbmVyKFdyaXRlTGlzdGVuZXIgd3JpdGVMaXN0ZW5lcikgeworCisgICAgfQorfQpkaWZmIC0tZ2l0IGEvdGhpcmRfcGFydHk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IG9yIEphdmEgY29uZmlndXJhdGlvbi48L3A+CisgICAgICogCisgICAgICogQHJldHVybiB0aGUgU3RyaW5nIHJlcHJlc2VudGF0aW9uIGZvciB0aGUKKyAgICAgKiB7QGNvZGUgdXJsLXBhdHRlcm59IGZvciB0aGlzIG1hcHBpbmcuIAorICAgICAqIAorICAgICAqIEBzaW5jZSA0LjAKKyAgICAgKi8KKyAgICBwdWJsaWMgU3RyaW5nIGdldFBhdHRlcm4oKTsKKyAgICAKKyAgICAvKioKKyAgICAgKiA8cD5SZXR1cm4gdGhlIFN0cmluZyByZXByZXNlbnRhdGlvbiBmb3IgdGhlIHtAY29kZSBzZXJ2bGV0LW5hbWV9CisgICAgICogZm9yIHRoaXMgbWFwcGluZy4gIElmIHRoZSBTZXJ2bGV0IHByb3ZpZGluZyB0aGUgcmVzcG9uc2UgaXMgdGhlCisgICAgICogZGVmYXVsdCBzZXJ2bGV0LCB0aGUgcmV0dXJuIGZyb20gdGhpcyBtZXRob2QgaXMgdGhlIG5hbWUgb2YgdGhlCisgICAgICogZGVmYXV0bCBzZXJ2bGV0LCB3aGljaCBpcyBjb250YWluZXIgc3BlY2lmaWMuPC9wPgorICAgICAqIAorICAgICAqIEByZXR1cm4gdGhlIFN0cmluZyByZXByZXNlbnRhdGlvbiBmb3IgdGhlIHtAY29kZSBzZXJ2bGV0LW5hbWV9CisgICAgICogZm9yIHRoaXMgbWFwcGluZy4KKyAgICAgKiAKKyAgICAgKiBAc2luY2UgNC4wCisgICAgICovCisgICAgcHVibGljIFN0cmluZyBnZXRTZXJ2bGV0TmFtZSgpOworCisgICAgLyoqCisgICAgICogPHA+UmV0dXJuIHRoZSB7QGxpbmsgTWFwcGluZ01hdGNofSBmb3IgdGhpcyAKKyAgICAgKiBpbnN0YW5jZTwvcD4gCisgICAgICogCisgICAgICogQHJldHVybiB0aGUge0Bjb2RlIE1hcHBpbmdNYXRjaH0gZm9yIHRoaXMgaW5zdGFuY2UuCisgICAgICogCisgICAgICogQHNp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waW5nKCkgeworICAgICAgICByZXR1cm4gbmV3IEh0dHBTZXJ2bGV0TWFwcGluZygpIHsKKyAgICAgICAgICAgIEBPdmVycmlkZQorICAgICAgICAgICAgcHVibGljIFN0cmluZyBnZXRNYXRjaFZhbHVlKCkgeworICAgICAgICAgICAgICAgIHJldHVybiAiIjsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgQE92ZXJyaWRlCisgICAgICAgICAgICBwdWJsaWMgU3RyaW5nIGdldFBhdHRlcm4oKSB7CisgICAgICAgICAgICAgICAgcmV0dXJuICIiOworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBAT3ZlcnJpZGUKKyAgICAgICAgICAgIHB1YmxpYyBTdHJpbmcgZ2V0U2VydmxldE5hbWUoKSB7CisgICAgICAgICAgICAgICAgcmV0dXJuICIiOworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBAT3ZlcnJpZGUKKyAgICAgICAgICAgIHB1YmxpYyBNYXBwaW5nTWF0Y2ggZ2V0TWFwcGluZ01hdGNoKCkgeworICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7CisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIEBPdmVycmlkZQorICAgICAgICAgICAgcHVibGljIFN0cmluZyB0b1N0cmluZygpIHsKKyAgICAgICAgICAgICAgICByZXR1cm4gIk1hcHBpbmdJbXBseyIgKyAibWF0Y2hWYWx1ZT0iICsgZ2V0TWF0Y2hWYWx1ZSgpCisgICAgICAgICAgICAgICAgICAgICAgICArICIsIHBhdHRlcm49IiArIGdldFBhdHRlcm4oKSArICIsIHNlcnZsZXROYW1lPSIgCisgICAgICAgICAgICAgICAgICAgICAgICArIGdldFNlcnZsZXROYW1lKCkgKyAiLCBtYXBwaW5nTWF0Y2g9IiArIGdldE1hcHBpbmdNYXRjaCgpIAorICAgICAgICAgICAgICAgICAgICAgICAgKyAifSBIdHRwU2VydmxldFJlcXVlc3QgeyIgKyBIdHRwU2VydmxldFJlcXVlc3QudGhpcy50b1N0cmluZygpCisgICAgICAgICAgICAgICAgICAgICAgICArICd9JzsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIAorICAgICAgICAgICAgCisgICAgICAgICAgICAKKyAgICAgICAgfTsKKyAgICB9CisgICAgCisgICAgLyoqCisgICAgICogUmV0dXJucyB0aGUgbmFtZSBvZiB0aGUgSFRUUCBtZXRob2Qgd2l0aCB3aGljaCB0aGlzCisgICAgICogcmVxdWVzdCB3YXMgbWFkZSwgZm9yIGV4YW1wbGUsIEdFVCwgUE9TVCwgb3IgUFVULgorICAgICAqIFNhbWUgYXMgdGhlIHZhbHVlIG9mIHRoZSBDR0kgdmFyaWFibGUgUkVRVUVTVF9NRVRIT0QuCisgICAgICoKKyAgICAgKiBAcmV0dXJuCQkJYSA8Y29kZT5TdHJpbmc8L2NvZGU+CisgICAgICoJCQkJc3BlY2lmeWluZyB0aGUgbmFtZQorICAgICAqCQkJCW9mIHRoZSBtZXRob2Qgd2l0aCB3aGljaAorICAgICAqCQkJCXRoaXMgcmVxdWVzdCB3YXMgbWFkZQorICAgICAqLworICAgIHB1YmxpYyBTdHJpbmcgZ2V0TWV0aG9kKCk7CisKKyAgICAvKioKKyAgICAgKiBSZXR1cm5zIGFueSBleHRyYSBwYXRoIGluZm9ybWF0aW9uIGFzc29jaWF0ZWQgd2l0aAorICAgICAqIHRoZSBVUkwgdGhlIGNsaWVudCBzZW50IHdoZW4gaXQgbWFkZSB0aGlzIHJlcXVlc3QuCisgICAgICogVGhlIGV4dHJhIHBhdGggaW5mb3JtYXRpb24gZm9sbG93cyB0aGUgc2VydmxldCBwYXRoCisgICAgICogYnV0IHByZWNlZGVzIHRoZSBxdWVyeSBzdHJpbmcgYW5kIHdpbGwgc3RhcnQgd2l0aAorICAgICAqIGEgIi8iIGNoYXJhY3Rlci4KKyAgICAgKgorICAgICAqIDxwPlRoaXMgbWV0aG9kIHJldHVybnMgPGNvZGU+bnVsbDwvY29kZT4gaWYgdGhlcmUKKyAgICAgKiB3YXMgbm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VzIHRoaXMgbWV0aG9kIHdpbGwgcmV0dXJuIHRoZQorICAgICAqIGFjdHVhbCBjb250ZXh0IHBhdGggdXNlZCBieSB0aGUgcmVxdWVzdCBhbmQgaXQgbWF5IGRpZmZlciBmcm9tIHRoZQorICAgICAqIHBhdGggcmV0dXJuZWQgYnkgdGhlCisgICAgICoge0BsaW5rIGphdmF4LnNlcnZsZXQuU2VydmxldENvbnRleHQjZ2V0Q29udGV4dFBhdGgoKX0gbWV0aG9kLgorICAgICAqIFRoZSBjb250ZXh0IHBhdGggcmV0dXJuZWQgYnkKKyAgICAgKiB7QGxpbmsgamF2YXguc2VydmxldC5TZXJ2bGV0Q29udGV4dCNnZXRDb250ZXh0UGF0aCgpfQorICAgICAqIHNob3VsZCBiZSBjb25zaWRlcmVkIGFzIHRoZSBwcmltZSBvciBwcmVmZXJyZWQgY29udGV4dCBwYXRoIG9mIHRoZQorICAgICAqIGFwcGxpY2F0aW9uLgorICAgICAqCisgICAgICogQHJldHVybgkJYSA8Y29kZT5TdHJpbmc8L2NvZGU+IHNwZWNpZnlpbmcgdGhlCisgICAgICoJCQlwb3J0aW9uIG9mIHRoZSByZXF1ZXN0IFVSSSB0aGF0IGluZGljYXRlcyB0aGUgY29udGV4dAorICAgICAqCQkJb2YgdGhlIHJlcXVlc3QKKyAgICAgKgorICAgICAqIEBzZWUgamF2YXguc2VydmxldC5TZXJ2bGV0Q29udGV4dCNnZXRDb250ZXh0UGF0aCgpCisgICAgICovCisgICAgcHVibGljIFN0cmluZyBnZXRDb250ZXh0UGF0aCgpOworCisgICAgLyoqCisgICAgICogUmV0dXJucyB0aGUgcXVlcnkgc3RyaW5nIHRoYXQgaXMgY29udGFpbmVkIGluIHRoZSByZXF1ZXN0CisgICAgICogVVJMIGFmdGVyIHRoZSBwYXRoLiBUaGlzIG1ldGhvZCByZXR1cm5zIDxjb2RlPm51bGw8L2NvZGU+CisgICAgICogaWYgdGhlIFVSTCBkb2VzIG5vdCBoYXZlIGEgcXVlc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bmc8L2NvZGU+IGNvcnJlc3BvbmRpbmcKKyAgICAgKiB0byB0aGUgaWRlbnRpZmllZCB1c2VyLgorICAgICAqCisgICAgICogQGV4Y2VwdGlvbglTZXJ2bGV0RXhjZXB0aW9uICAgIGlmIHRoZSBjb25maWd1cmVkIGxvZ2luIG1lY2hhbmlzbQorICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkb2VzIG5vdCBzdXBwb3J0IHVzZXJuYW1lCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhc3N3b3JkIGF1dGhlbnRpY2F0aW9uLCBvciBpZiBhCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vbi1udWxsIGNhbGxlciBpZGVudGl0eSBoYWQKKyAgICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxyZWFkeSBiZWVuIGVzdGFibGlzaGVkIChwcmlvcgorICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0byB0aGUgY2FsbCB0byBsb2dpbiksIG9yIGlmCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbGlkYXRpb24gb2YgdGhlIHByb3ZpZGVkCisgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzZXJuYW1lIGFuZCBwYXNzd29yZCBmYWlscy4KKyAgICAgKgorICAgICAqIEBzaW5jZSBTZXJ2bGV0IDMuMAorICAgICAqLworICAgIHB1YmxpYyB2b2lkIGxvZ2luKFN0cmluZyB1c2VybmFtZSwgU3RyaW5nIHBhc3N3b3JkKQorCXRocm93cyBTZXJ2bGV0RXhjZXB0aW9uOworCisgICAgLyoqCisgICAgICogRXN0YWJsaXNoIDxjb2RlPm51bGw8L2NvZGU+IGFzIHRoZSB2YWx1ZSByZXR1cm5lZCB3aGVuCisgICAgICogPGNvZGU+Z2V0VXNlclByaW5jaXBh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XNzaW9uQmluZGluZ0V2ZW50CisgKgorICovCisKK3B1YmxpYyBpbnRlcmZhY2UgSHR0cFNlc3Npb25CaW5kaW5nTGlzdGVuZXIgZXh0ZW5kcyBFdmVudExpc3RlbmVyIHsKKworICAgIC8qKgorICAgICAqCisgICAgICogTm90aWZpZXMgdGhlIG9iamVjdCB0aGF0IGl0IGlzIGJlaW5nIGJvdW5kIHRvCisgICAgICogYSBzZXNzaW9uIGFuZCBpZGVudGlmaWVzIHRoZSBzZXNzaW9uLgorICAgICAqCisgICAgICogQGltcGxTcGVjCisgICAgICogVGhlIGRlZmF1bHQgaW1wbGVtZW50YXRpb24gdGFrZXMgbm8gYWN0aW9uLgorICAgICAqIAorICAgICAqIEBwYXJhbSBldmVudAkJdGhlIGV2ZW50IHRoYXQgaWRlbnRpZmllcyB0aGUKKyAgICAgKgkJCQlzZXNzaW9uIAorICAgICAqCisgICAgICogQHNlZSAjdmFsdWVVbmJvdW5kCisgICAgICoKKyAgICAgKi8gCisgICAgZGVmYXVsdCBwdWJsaWMgdm9pZCB2YWx1ZUJvdW5kKEh0dHBTZXNzaW9uQmluZGluZ0V2ZW50IGV2ZW50KSB7fQorCisgICAgLyoqCisgICAgICoKKyAgICAgKiBOb3RpZmllcyB0aGUgb2JqZWN0IHRoYXQgaXQgaXMgYmVpbmcgdW5ib3VuZAorICAgICAqIGZyb20gYSBzZXNzaW9uIGFuZCBpZGVudGlmaWVzIHRoZSBzZXNzaW9uLgorICAgICAqCisgICAgICogQGltcGxTcGVjCisgICAgICogVGhlIGRlZmF1bHQgaW1wbGVtZW50YXRpb24gdGFrZXMgbm8gYWN0aW9uLgorICAgICAqCisgICAgICogQHBhcmFtIGV2ZW50CQl0aGUgZXZlbnQgdGhhdCBpZGVudGlmaWVzCisgICAgICoJCQkJdGhlIHNlc3Npb24gCisgICAgICoJCisgICAgICogQHNlZSAjdmFsdWVCb3VuZAorICAgICAqCisgICAgICovCisgICAgZGVmYXVsdCBwdWJsaWMgdm9pZC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RyaW5nQnVpbGRlcigpOworICAgICAgICBTdHJpbmdUb2tlbml6ZXIgc3QgPSBuZXcgU3RyaW5nVG9rZW5pemVyKHMsICImIik7CisgICAgICAgIHdoaWxlIChzdC5oYXNNb3JlVG9rZW5zKCkpIHsKKyAgICAgICAgU3RyaW5nIHBhaXIgPSBzdC5uZXh0VG9rZW4oKTsKKyAgICAgICAgaW50IHBvcyA9IHBhaXIuaW5kZXhPZignPScpOworICAgICAgICBpZiAocG9zID09IC0xKSB7CisgICAgICAgICAgICAvLyBYWFgKKyAgICAgICAgICAgIC8vIHNob3VsZCBnaXZlIG1vcmUgZGV0YWlsIGFib3V0IHRoZSBpbGxlZ2FsIGFyZ3VtZW50CisgICAgICAgICAgICB0aHJvdyBuZXcgSWxsZWdhbEFyZ3VtZW50RXhjZXB0aW9uKCk7CisgICAgICAgIH0KKyAgICAgICAgU3RyaW5nIGtleSA9IHBhcnNlTmFtZShwYWlyLnN1YnN0cmluZygwLCBwb3MpLCBzYik7CisgICAgICAgIFN0cmluZyB2YWwgPSBwYXJzZU5hbWUocGFpci5zdWJzdHJpbmcocG9zKzEsIHBhaXIubGVuZ3RoKCkpLCBzYik7CisgICAgICAgIGlmIChodC5jb250YWluc0tleShrZXkpKSB7CisgICAgICAgICAgICBTdHJpbmcgb2xkVmFsc1tdID0gaHQuZ2V0KGtleSk7CisgICAgICAgICAgICB2YWxBcnJheSA9IG5ldyBTdHJpbmdbb2xkVmFscy5sZW5ndGggKyAxXTsKKyAgICAgICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgb2xkVmFscy5sZW5ndGg7IGkrKykgeworICAgICAgICAgICAgICAgIHZhbEFycmF5W2ldID0gb2xkVmFsc1tpXTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHZhbEFycmF5W29sZFZhbHMubGVuZ3RoXSA9IHZhbDsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIHZhbEFycmF5ID0gbmV3IFN0cmluZ1sxXTsKKy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AgICAgICAgLy8gdGhhdCB0aGUgYm9keSBzaG91bGQgYWx3YXlzIGJlIHRyZWF0ZWQgYXMgRk9STSBkYXRhLgorICAgICAgICAvLworCisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBTdHJpbmcgcG9zdGVkQm9keSA9IG5ldyBTdHJpbmcocG9zdGVkQnl0ZXMsIDAsIGxlbiwgIjg4NTlfMSIpOworICAgICAgICAgICAgcmV0dXJuIHBhcnNlUXVlcnlTdHJpbmcocG9zdGVkQm9keSk7CisgICAgICAgIH0gY2F0Y2ggKGphdmEuaW8uVW5zdXBwb3J0ZWRFbmNvZGluZ0V4Y2VwdGlvbiBlKSB7CisgICAgICAgICAgICAvLyBYWFggZnVuY3Rpb24gc2hvdWxkIGFjY2VwdCBhbiBlbmNvZGluZyBwYXJhbWV0ZXIgJiB0aHJvdyB0aGlzCisgICAgICAgICAgICAvLyBleGNlcHRpb24uICBPdGhlcndpc2UgdGhyb3cgc29tZXRoaW5nIGV4cGVjdGVkLgorICAgICAgICAgICAgdGhyb3cgbmV3IElsbGVnYWxBcmd1bWVudEV4Y2VwdGlvbihlLmdldE1lc3NhZ2UoKSk7CisgICAgICAgIH0KKyAgICB9CisKKworICAgIC8qCisgICAgICogUGFyc2UgYSBuYW1lIGluIHRoZSBxdWVyeSBzdHJpbmcuCisgICAgICovCisgICAgcHJpdmF0ZSBzdGF0aWMgU3RyaW5nIHBhcnNlTmFtZShTdHJpbmcgcywgU3RyaW5nQnVpbGRlciBzYikgeworICAgICAgICBzYi5zZXRMZW5ndGgoMCk7CisgICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgcy5sZW5ndGgoKTsgaSsrKSB7CisgICAgICAgICAgICBjaGFyIGMgPSBzLmNoYXJBdChpKTsgCisgICAgICAgICAgICBzd2l0Y2ggKGMpIHsKKyAgICAgICAgICAgICAgICBjYXNlICcrJzoKKyAgICAgICAgICAgICAgICAgICAgc2IuYXBwZW5kKCcgJyk7CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgJyUnOgorICAgICAgICAgICAgICAgICAgICB0cnkgeworICAgICAgICAgICAgICAgICAgICAgICAgc2IuYXBwZW5kKChjaGFyKSBJbnRlZ2VyLnBhcnNlSW50KHMuc3Vic3RyaW5nKGkrMSwgaSszKSwgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2KSk7CisgICAgICAgICAgICAgICAgICAgICAgICBpICs9IDI7CisgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKE51bWJlckZvcm1hdEV4Y2VwdGlvbiBlKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAvLyBYWFgKKyAgICAgICAgICAgICAgICAgICAgICAgIC8vIG5lZWQgdG8gYmUgbW9yZSBzcGVjaWZpYyBhYm91dCBpbGxlZ2FsIGFyZworICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IElsbGVnYWxBcmd1bWVudEV4Y2VwdGlvbigpOworICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChTdHJpbmdJbmRleE91dE9mQm91bmRzRXhjZXB0aW9uIGUpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIFN0cmluZyByZXN0ICA9IHMuc3Vic3RyaW5nKGkpOworICAgICAgICAgICAgICAgICAgICAgICAgc2IuYXBwZW5kKHJlc3QpOworICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJlc3QubGVuZ3RoKCk9PTIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSsrOworICAgICAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgICAgICAgICBzYi5hcHBlbmQoYyk7CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQorICAgICAgICB9CisKKyAgICAgICAgcmV0dXJuIHNiLnRvU3RyaW5nKCk7CisgICAgfQorCisKKyAgICAvK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LworICAgIHB1YmxpYyBzdGF0aWMgU3RyaW5nQnVmZmVyIGdldFJlcXVlc3RVUkwgKEh0dHBTZXJ2bGV0UmVxdWVzdCByZXEpIHsKKyAgICAgICAgU3RyaW5nQnVmZmVyIHVybCA9IG5ldyBTdHJpbmdCdWZmZXIoKTsKKyAgICAgICAgU3RyaW5nIHNjaGVtZSA9IHJlcS5nZXRTY2hlbWUgKCk7CisgICAgICAgIGludCBwb3J0ID0gcmVxLmdldFNlcnZlclBvcnQgKCk7CisgICAgICAgIFN0cmluZyB1cmxQYXRoID0gcmVxLmdldFJlcXVlc3RVUkkoKTsKKworICAgICAgICAvL1N0cmluZwkJc2VydmxldFBhdGggPSByZXEuZ2V0U2VydmxldFBhdGggKCk7CisgICAgICAgIC8vU3RyaW5nCQlwYXRoSW5mbyA9IHJlcS5nZXRQYXRoSW5mbyAoKTsKKworICAgICAgICB1cmwuYXBwZW5kIChzY2hlbWUpOwkJLy8gaHR0cCwgaHR0cHMKKyAgICAgICAgdXJsLmFwcGVuZCAoIjovLyIpOworICAgICAgICB1cmwuYXBwZW5kIChyZXEuZ2V0U2VydmVyTmFtZSAoKSk7CisgICAgICAgIGlmICgoc2NoZW1lLmVxdWFscyAoImh0dHAiKSAmJiBwb3J0ICE9IDgwKQorICAgICAgICB8fCAoc2NoZW1lLmVxdWFscyAoImh0dHBzIikgJiYgcG9ydCAhPSA0NDMpKSB7CisgICAgICAgICAgICB1cmwuYXBwZW5kICgnOicpOworICAgICAgICAgICAgdXJsLmFwcGVuZCAocmVxLmdldFNlcnZlclBvcnQgKCkpOworICAgICAgICB9CisgICAgICAgIC8vaWYgKHNlcnZsZXRQYXRoICE9IG51bGwpCisgICAgICAgIC8vICAgIHVybC5hcHBlbmQgKHNlcnZsZXRQYXRoKTsKKyAgICAgICAgLy9pZiAocGF0aEluZm8gIT0gbnVsbCkKKyAgICAgICAgLy8gICAgdXJsLmFwcGVuZCAocGF0aEluZm8pOworICAgICAgICB1cmwuYXBwZW5kKH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vbmU7CisgICAgY29sb3I6IzRBNjc4MjsKK30KK2FbbmFtZV0geworICAgIGNvbG9yOiMzNTM4MzM7Cit9CithW25hbWVdOmhvdmVyIHsKKyAgICB0ZXh0LWRlY29yYXRpb246bm9uZTsKKyAgICBjb2xvcjojMzUzODMzOworfQorcHJlIHsKKyAgICBmb250LWZhbWlseTonRGVqYVZ1IFNhbnMgTW9ubycsIG1vbm9zcGFjZTsKKyAgICBmb250LXNpemU6MTRweDsKK30KK2gxIHsKKyAgICBmb250LXNpemU6MjBweDsKK30KK2gyIHsKKyAgICBmb250LXNpemU6MThweDsKK30KK2gzIHsKKyAgICBmb250LXNpemU6MTZweDsKKyAgICBmb250LXN0eWxlOml0YWxpYzsKK30KK2g0IHsKKyAgICBmb250LXNpemU6MTNweDsKK30KK2g1IHsKKyAgICBmb250LXNpemU6MTJweDsKK30KK2g2IHsKKyAgICBmb250LXNpemU6MTFweDsKK30KK3VsIHsKKyAgICBsaXN0LXN0eWxlLXR5cGU6ZGlzYzsKK30KK2NvZGUsIHR0IHsKKyAgICBmb250LWZhbWlseTonRGVqYVZ1IFNhbnMgTW9ubycsIG1vbm9zcGFjZTsKKyAgICBmb250LXNpemU6MTRweDsKKyAgICBwYWRkaW5nLXRvcDo0cHg7CisgICAgbWFyZ2luLXRvcDo4cHg7CisgICAgbGluZS1oZWlnaHQ6MS40ZW07Cit9CitkdCBjb2RlIHsKKyAgICBmb250LWZhbWlseTonRGVqYVZ1IFNhbnMgTW9ubycsIG1vbm9zcGFjZTsKKyAgICBmb250LXNpemU6MTRweDsKKyAgICBwYWRkaW5nLXRvcDo0cHg7Cit9Cit0YWJsZSB0ciB0ZCBkdCBjb2RlIHsKKyAgICBmb250LWZhbWlseTonRGVqYVZ1IFNhbnMgTW9ubycsIG1vbm9zcGFjZTsKKyAgICBmb250LXNpemU6MTRweDsKKyAgICB2ZXJ0aWNhbC1hbGlnbjp0b3A7CisgICAgcGFkZGluZy10b3A6NHB4OworfQorc3VwIHsKKyA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mxvY2tMaXN0IGgyIHsKKyAgICBwYWRkaW5nOjBweCAwIDIwcHggMDsKK30KKy8qCitQYWdlIGxheW91dCBjb250YWluZXIgc3R5bGVzCisqLworLmNvbnRlbnRDb250YWluZXIsIC5zb3VyY2VDb250YWluZXIsIC5jbGFzc1VzZUNvbnRhaW5lciwgLnNlcmlhbGl6ZWRGb3JtQ29udGFpbmVyLCAuY29uc3RhbnRWYWx1ZXNDb250YWluZXIgeworICAgIGNsZWFyOmJvdGg7CisgICAgcGFkZGluZzoxMHB4IDIwcHg7CisgICAgcG9zaXRpb246cmVsYXRpdmU7Cit9CisuaW5kZXhDb250YWluZXIgeworICAgIG1hcmdpbjoxMHB4OworICAgIHBvc2l0aW9uOnJlbGF0aXZlOworICAgIGZvbnQtc2l6ZToxMnB4OworfQorLmluZGV4Q29udGFpbmVyIGgyIHsKKyAgICBmb250LXNpemU6MTNweDsKKyAgICBwYWRkaW5nOjAgMCAzcHggMDsKK30KKy5pbmRleENvbnRhaW5lciB1bCB7CisgICAgbWFyZ2luOjA7CisgICAgcGFkZGluZzowOworfQorLmluZGV4Q29udGFpbmVyIHVsIGxpIHsKKyAgICBsaXN0LXN0eWxlOm5vbmU7CisgICAgcGFkZGluZy10b3A6MnB4OworfQorLmNvbnRlbnRDb250YWluZXIgLmRlc2NyaXB0aW9uIGRsIGR0LCAuY29udGVudENvbnRhaW5lciAuZGV0YWlscyBkbCBkdCwgLnNlcmlhbGl6ZWRGb3JtQ29udGFpbmVyIGRsIGR0IHsKKyAgICBmb250LXNpemU6MTJweDsKKyAgICBmb250LXdlaWdodDpib2xkOworICAgIG1hcmdpbjoxMHB4IDAgMCAwOworICAgIGNvbG9yOiM0RTRFNEU7Cit9CisuY29udGVudENvbnRhaW5lciAuZGVzY3JpcHRpb24gZGwgZGQsIC5jb250ZW50Q29udGFpbmVyIC5kZXRhaWxzIGRsIGRkLCAuc2VyaWFsaXplZEZvcm1Db250YWluZXIgZGwgZGQgeworICAgIG1hcmdpbjo1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gICAgICAgICAgICAgIGJvcmRlci1sZWZ0LXdpZHRoOnRoaW47IGJvcmRlci1yaWdodDpub25lOworICAgICAgICAgICAgICAgICBib3JkZXItdG9wOm5vbmU7IGJvcmRlci1ib3R0b206bm9uZTsgYm9yZGVyLWNvbG9yOmdyZWVuIH0KKworICAgLmNoYW5nZWRfbW9kaWZpZWRfNF8wIHsgY3Vyc29yOiB1cmwoZG9jLWZpbGVzL2NoYW5nZWRfbW9kaWZpZWRfNF8wX2N1cnNvci5jdXIpLCBhdXRvOworICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kOiB1cmwoZG9jLWZpbGVzL2NoYW5nZWRfbW9kaWZpZWRfNF8wLnBuZyk7IAorICAgICAgICAgICAgICAgICBwYWRkaW5nLWxlZnQ6MC4yZW07IGJvcmRlci1sZWZ0OnNvbGlkOworICAgICAgICAgICAgICAgICBib3JkZXItbGVmdC13aWR0aDp0aGluOyBib3JkZXItcmlnaHQ6bm9uZTsKKyAgICAgICAgICAgICAgICAgYm9yZGVyLXRvcDpub25lOyBib3JkZXItYm90dG9tOm5vbmU7IGJvcmRlci1jb2xvcjpvcmFuZ2UgfQorCisgICAuY2hhbmdlZF9kZWxldGVkXzRfMCB7IGN1cnNvcjogdXJsKGRvYy1maWxlcy9jaGFuZ2VkX2RlbGV0ZWRfNF8wX2N1cnNvci5jdXIpLCBhdXRvOworICAgICAgICAgICAgICAgICBiYWNrZ3JvdW5kOiB1cmwoZG9jLWZpbGVzL2NoYW5nZWRfZGVsZXRlZF80XzAucG5nKTsgCisgICAgICAgICAgICAgICAgIHBhZGRpbmctbGVmdDowLjJlbTsgYm9yZGVyLWxlZnQ6c29saWQ7CisgICAgICAgICAgICAgICAgIGJvcmRlci1sZWZ0LXdpZHRoOnRoaW47IGJvcmRlci1yaWdodDpub25lOworICAgICAgICAgICAgICAgICBib3JkZXItdG9wOm5vbmU7IGJvcmRlci1ib3R0b206bm9uZTsgYm9yZGVyLWNvbG9yOnJlZDsKKyAgICAgIC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