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ysgYi9qZW5raW5zLmJ1aWxkLmNvbmZpZy54bWwKQEAgLTAsMCArMSwyNSBAQAorPD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KKzwhLS0jPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gLS0+Cis8IS0tIyBDb3B5cmlnaHQgKGMpIDIwMTYgLSBMb2V0eiBHbWJIJkNvLktHICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLS0+Cis8IS0tIyBBbGwgcmlnaHRzIHJlc2VydmVkLiBUaGlzIHByb2dyYW0gYW5kIHRoZSBhY2NvbXBhbnlpbmcgbWF0ZXJpYWxzIAkJIC0tPgorPCEtLSMgYXJlIG1hZGUgYXZhaWxhYmxlIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgRWNsaXBzZSBQdWJsaWMgTGljZW5zZSB2MS4wICAtLT4KKzwhLS0jIHdoaWNoIGFjY29tcGFuaWVzIHRoaXMgZGlzdHJpYnV0aW9uLCBhbmQgaXMgYXZhaWxhYmxlIGF0ICAgICAgICAgICAgICAgLS0+Cis8IS0tIyBodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2xlZ2FsL2VwbC12MTAuaHRtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0tPgorPCEtLSMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtLT4KKzwhLS0jIENvbnRyaWJ1dG9yczogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLS0+Cis8IS0tIyBDaHJpc3RvcGhlIExvZXR6IChMb2V0eiBHbWJIJkNvLktHKSAtIGluaXRpYWwgQVBJIGFuZCBpbXBsZW1lbnRhdGlvbiAgICAgICAgICAgICAgICAgICAgICAgICAgIC0tPgorPCEtLSM9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAtLT4KKzwhLS0jIE1vZHVsZSBzcGVjaWZpYyBwYXJhbWV0ZXJzIGZvciB0aGUgSmVua2lucyBKb2IgCQkJCQkJIC0tPgorPCEtLSM9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAtLT4KKworPGplbmtpbnM+CisJPCEtLSBETyBOT1QgRURJVCBCRUxPVyBUSElTIExJTkUgLS0+CisgICAgICAgIDxqZW5raW5zLmJ1aWxkLmRlcGVuZGVuY2llcz4KKyAgICAgICAgICAgICAgICA8amVua2lucy5idWlsZC5kZXBlbmRlbmN5Pm9yZy5lY2xpcHNlLm9zYnAuZHNsPC9qZW5raW5zLmJ1aWxkLmRlcGVuZGVuY3k+CisgICAgICAgICAgICAgICAgPGplbmtpbnMuYnVpbGQuZGVwZW5kZW5jeT5vcmcuZWNsaXBzZS5vc2JwLnBlcnNpc3RlbmNlPC9qZW5raW5zLmJ1aWxkLmRlcGVuZGVuY3k+CisgICAgICAgICAgICAgICAgPGplbmtpbnMuYnVpbGQuZGVwZW5kZW5jeT5vcmcuZWNsaXBzZS5vc2JwLnJ1bnRpbWU8L2plbmtpbnMuYnVpbGQuZGVwZW5kZW5jeT4KKyAgICAgICAgICAgICAgICA8amVua2lucy5idWlsZC5kZXBlbmRlbmN5Pm9yZy5lY2xpcHNlLm9zYnAudXRpbHM8L2plbmtpbnMuYnVpbGQuZGVwZW5kZW5jeT4KKyAgICAgICAgICAgICAgICA8amVua2lucy5idWlsZC5kZXBlbmRlbmN5Pm9yZy5lY2xpcHNlLm9zYnAueHRleHQuYWRkb25zPC9qZW5raW5zLmJ1aWxkLmRlcGVuZGVuY3k+CisgICAgICAgICAgICAgICAgPGplbmtpbnMuYnVpbGQuZGVwZW5kZW5jeT5vcmcuZWNsaXBzZS5vc2JwLnh0ZX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yAgICAgICAgCisgICAgPGRlc2NyaXB0aW9uPgorICAgICAgICAlZGVzY3JpcHRpb24KKyAgICA8L2Rlc2NyaXB0aW9uPgorICAgICAgICAKKyAgICA8Y29weXJpZ2h0PgorICAgICAgICAlY29weXJpZ2h0CisgICAgPC9jb3B5cmlnaHQ+CisgICAgICAgIAorICAgIDxsaWNlbnNlIHVybD0iJWxpY2Vuc2VVUkwiPgorICAgICAgICAlbGljZW5zZQorICAgIDwvbGljZW5zZT4KKyAgICAgICAgCisgICAgPHBsdWdpbgorICAgICAgICBpZD0ib3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsIgorICAgICAgICBkb3dubG9hZC1zaXplPSIwIgorICAgICAgICBpbnN0YWxsLXNpemU9IjAiCisgICAgICAgIHZlcnNpb249IjAuMC4wIgorICAgICAgICB1bnBhY2s9ImZhbHNlIi8+CisgICAgICAgIAorICAgIDxwbHVnaW4KKyAgICAgICAgaWQ9Im9yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC50ZXN0cyIKKyAgICAgICAgZG93bmxvYWQtc2l6ZT0iMCIKKyAgICAgICAgaW5zdGFsbC1zaXplPSIwIgorICAgICAgICB2ZXJzaW9uPSIwLjAuMCIKKyAgICAgICAgdW5wYWNrPSJmYWxzZSIvPgorICAgICAgICAKKyAgICA8cGx1Z2luCisgICAgICAgIGlkPSJvcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkiCisgICAgICAgIGRvd25sb2FkLXNpemU9IjAiCisgICAgICAgIGluc3RhbGwtc2l6ZT0iMCIKKyAgICAgICAgdmVyc2lvbj0iMC4wLjAiCisgICAgICAgIHVucGFjaz0iZmFsc2UiLz4KKyAgICAgICAgCis8L2ZlYXR1cmU+CmRpZmYgLS1naXQgYS9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wuZmVhdHVyZS9saWNlbnNlLmh0bWwgYi9vcmcuZWNsaXBzZS5vc2JwLnh0ZX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EsNTYgQEAKKy8qKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29weXJpZ2h0IChjKSAyMDExLCAyMDE2IC0gTG9ldHogR21iSCZDby5LRyAoNjkxMTUgSGVpZGVsYmVyZywgR2VybWFueSkgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBBbGwgcmlnaHRzIHJlc2VydmVkLiBUaGlzIHByb2dyYW0gYW5kIHRoZSBhY2NvbXBhbnlpbmcgbWF0ZXJpYWxzICAgICAgICAgICAKKyAqICBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiAgd2hpY2ggYWNjb21wYW5pZXMgdGhpcyBkaXN0cmlidXRpb24sIGFuZCBpcyBhdmFpbGFibGUgYXQgICAgICAgICAgICAgICAgICAKKyAqICBodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2xlZ2FsL2VwbC12MTAuaHRtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29udHJpYnV0b3JzOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogCSAgIENocmlzdG9waGUgTG9ldHogKExvZXR6IEdtYkgmQ28uS0cpIC0gaW5pdGlhbCBpbXBsZW1lbnRhdGlvbgorICogCisgKi8KKworcGFja2FnZSBvcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2w7CisKK2ltcG9ydCBvcmcuZWNsaXBzZS54dGV4dC5qdW5pdDQuR2xvY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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29weXJpZ2h0IChjKSAyMDExLCAyMDE2IC0gTG9ldHogR21iSCZDby5LRyAoNjkxMTUgSGVpZGVsYmVyZywgR2VybWFueSkgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBBbGwgcmlnaHRzIHJlc2VydmVkLiBUaGlzIHByb2dyYW0gYW5kIHRoZSBhY2NvbXBhbnlpbmcgbWF0ZXJpYWxzICAgICAgICAgICAKKyAqICBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiAgd2hpY2ggYWNjb21wYW5pZXMgdGhpcyBkaXN0cmlidXRpb24sIGFuZCBpcyBhdmFpbGFibGUgYXQgICAgICAgICAgICAgICAgICAKKyAqICBodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2xlZ2FsL2VwbC12MTAuaHRtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29udHJpYnV0b3JzOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogCSAgIENocmlzdG9waGUgTG9ldHogKExvZXR6IEdtYkgmQ28uS0cpIC0gaW5pdGlhbCBpbXBsZW1lbnRhdGlvbgorICogCisgKi8KKworcGFja2FnZSBvcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2w7CisKK2ltcG9ydCBvcmcuZWNsaXBzZS54dGV4dC5qdW5pdDQuSUluamVjdG9yUHJvdmlkZXI7CisKK2ltcG9ydCBjb20uZ29vZ2xlLmlu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GllcwpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi4xZGFiOWI1Ci0tLSAvZGV2L251bGwKKysrIGIvb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL2J1aWxkLnByb3BlcnRpZXMKQEAgLTAsMCArMSwxOSBAQAorc291cmNlLi4gPSBzcmMvLFwKKyAgICAgICAgICAgc3JjLWdlbi8sXAorICAgICAgICAgICB4dGVuZC1nZW4vCitiaW4uaW5jbHVkZXMgPSBhYm91dC5wcm9wZXJ0aWVzLCAgYWJvdXQubWFwcGluZ3MsICBhYm91dC5pbmksICBhYm91dC5odG1sLCAgTUVUQS1JTkYvLFwKKyAgICAgICAgICAgICAgIC4sXAorICAgICAgICAgICAgICAgcGx1Z2luLnhtbCxcCisgICAgICAgICAgICAgICAuY2xhc3NwYXRoLFwKKyAgICAgICAgICAgICAgIC5wcm9qZWN0LFwKKyAgICAgICAgICAgICAgIC5zZXR0aW5ncy8sXAorICAgICAgICAgICAgICAgdGVtcGxhdGVzLyxcCisgICAgICAgICAgICAgICBpMThuLyxcCisgICAgICAgICAgICAgICBsaWNlbnNlLmh0bWwsXAorICAgICAgICAgICAgICAgTElDRU5TRS50eHQsXAorICAgICAgICAgICAgICAgZXBsLXYxMC5odG1sLFwKKyAgICAgICAgICAgICAgIGljb25zLworc3JjLmluY2x1ZGVzID0gYWJvdXQucHJvcGVydGllcywgIGFib3V0Lm1hcHBpbmdzLCAgYWJvdXQuaW5pLCAgYWJvdXQuaHRtbCwgIGxpY2Vuc2UuaHRtbCxcCisgICAgICAgICAgICAgICBMSUNFTlNFLnR4dCxcCisgICAgICAgICAgICAgICBlcGwtdjEwLmh0bWwsXAorICAgICAgICAgICAgICAgaWNvbnMvCmRpZmYgLS1naXQgYS9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvZXBsLXYxMC5odG1sIGIvb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZ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uIHBvaW50PSJvcmcuZWNsaXBzZS51aS5tZW51cyI+CisgICAgICAgIDxtZW51Q29udHJpYnV0aW9uCisgICAgICAgICAgICBsb2NhdGlvblVSST0icG9wdXA6I1RleHRFZGl0b3JDb250ZXh0P2FmdGVyPWdyb3VwLmVkaXQiPgorICAgICAgICAgICAgIDxjb21tYW5kCisgICAgICAgICAgICAgICAgIGNvbW1hbmRJZD0ib3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLkN1YmVEU0wudmFsaWRhdGUiCisgICAgICAgICAgICAgICAgIHN0eWxlPSJwdXNoIgorICAgICAgICAgICAgICAgICB0b29sdGlwPSJUcmlnZ2VyIGV4cGVuc2l2ZSB2YWxpZGF0aW9uIj4KKyAgICAgICAgICAgIDx2aXNpYmxlV2hlbiBjaGVja0VuYWJsZWQ9ImZhbHNlIj4KKyAgICAgICAgICAgICAgICA8cmVmZXJlbmNlCisgICAgICAgICAgICAgICAgICAgIGRlZmluaXRpb25JZD0ib3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLkN1YmVEU0wuRWRpdG9yLm9wZW5lZCI+CisgICAgICAgICAgICAgICAgPC9yZWZlcmVuY2U+CisgICAgICAgICAgICA8L3Zpc2libGVXaGVuPgorICAgICAgICAgPC9jb21tYW5kPiAgCisgICAgICAgICA8L21lbnVDb250cmlidXRpb24+CisgICAgPC9leHRlbnNpb24+CisgICAgPGV4dGVuc2lvbiBwb2ludD0ib3JnLmVjbGlwc2UudWkubWVudXMiPgorCQk8bWVudUNvbnRyaWJ1dGlvbiBsb2NhdGlvblVSST0icG9wdXA6I1RleHRFZGl0b3JDb250ZXh0P2VuZG9mPWdyb3VwLmZpbmQiPgorCQkJPGNvbW1hbmQgY29tbWFuZElkPSJvcmcuZWNsaXBzZS54dGV4dC51aS5lZGl0b3IuRmluZFJlZmVyZW5jZXMiPgorCQkJCTx2aXNpYmxlV2hlbiBjaGVja0VuYWJsZWQ9ImZhbHNlIj4KKyAgICAgIC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gICAgICA8Y29tbWFuZAorICAgICAgICAgICAgICAgICBjb21tYW5kSWQ9Im9yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC5DdWJlRFNMLnZhbGlkYXRlIgorICAgICAgICAgICAgICAgICBzdHlsZT0icHVzaCIKKyAgICAgICAgICAgICAgICAgdG9vbHRpcD0iVHJpZ2dlciBleHBlbnNpdmUgdmFsaWRhdGlvbiI+CisgICAgICAgICAgICA8dmlzaWJsZVdoZW4gY2hlY2tFbmFibGVkPSJmYWxzZSI+CisgICAgICAgICAgICAgICAgPHJlZmVyZW5jZQorICAgICAgICAgICAgICAgICAgICBkZWZpbml0aW9uSWQ9Im9yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC5DdWJlRFNMLkVkaXRvci5vcGVuZWQiPgorICAgICAgICAgICAgICAgIDwvcmVmZXJlbmNlPgorICAgICAgICAgICAgPC92aXNpYmxlV2hlbj4KKyAgICAgICAgIDwvY29tbWFuZD4gIAorICAgICAgICAgPC9tZW51Q29udHJpYnV0aW9uPgorICAgICAgICAgPCEtLSBjb3B5IHF1YWxpZmllZCBuYW1lIC0tPgorICAgICAgICAgPG1lbnVDb250cmlidXRpb24gbG9jYXRpb25VUkk9InBvcHVwOiNUZXh0RWRpdG9yQ29udGV4dD9hZnRlcj1jb3B5Ij4KKyAgICAgICAgIAk8Y29tbWFuZCBjb21tYW5kSWQ9Im9yZy5lY2xpcHNlLnh0ZXh0LnVpLmVkaXRvci5jb3B5cXVhbGlmaWVkbmFtZS5FZGl0b3JDb3B5UXVhbGlmaWVkTmFtZSIgCisgICAgICAgICAJCXN0eWxlPSJwdXNoIiB0b29sdGlwPSJDb3B5IFF1YWxpZmllZCBOYW1lIj4KKyAgICAgICAgICAgIAk8dmlzaWJsZVdoZW4gY2hlY2tFbmFibGVkPSJmYWxzZSI+CisgICAgICAgICAgICAgICAgCTxyZWZlcmVuY2UgZGVmaW5pdGlvbklkPSJvcmcuZWNsaXBzZS5vc2JwLn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ljIExpY2Vuc2UgdjEuMCAgICAgICAKKyAqICB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgIAorICogIGh0dHA6Ly93d3cuZWNsaXBzZS5vcmcvbGVnYWwvZXBsLXYxMC5odG1sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBDb250cmlidXRvcnM6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAJICAgQ2hyaXN0b3BoZSBMb2V0eiAoTG9ldHogR21iSCZDby5LRykgLSBpbml0aWFsIGltcGxlbWVudGF0aW9uCisgKiAKKyAqLworCitwYWNrYWdlIG9yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aTsKKworaW1wb3J0IG9yZy5lY2xpcHNlLnh0ZXh0LnVpLkRlZmF1bHRVaU1vZHVsZTsKK2ltcG9ydCBvcmcuZWNsaXBzZS51aS5wbHVnaW4uQWJzdHJhY3RVSVBsdWdpbjsKKworLyoqCisgKiBNYW51YWwgbW9kaWZpY2F0aW9ucyBnbyB0byB7b3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpLkN1YmVEU0xVaU1vZHVsZX0KKyAqLworQFN1cHByZXNzV2FybmluZ3MoImFsbCIpCitwdWJsaWMgYWJzdHJhY3QgY2xhc3MgQWJzdHJhY3RDdWJlRFNMVWlNb2R1bGUgZXh0ZW5kcyBEZWZhdWx0VWlNb2R1bGUgeworCQorCXB1YmxpYyBBYnN0cmFjdEN1YmVEU0xVaU1vZHVsZShBYnN0cmFjdFVJUGx1Z2luIHBsdWdpbikgeworCQlzdXBlcihwbHVnaW4pOworCX0KKwkKKwkKKwkvLyBjb250cml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AgICAgIAorICogIGFyZSBtYWRlIGF2YWlsYWJsZSB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEVjbGlwc2UgUHVibGljIExpY2Vuc2UgdjEuMCAgICAgICAKKyAqICB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgIAorICogIGh0dHA6Ly93d3cuZWNsaXBzZS5vcmcvbGVnYWwvZXBsLXYxMC5odG1sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBDb250cmlidXRvcnM6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAJICAgQ2hyaXN0b3BoZSBMb2V0eiAoTG9ldHogR21iSCZDby5LRykgLSBpbml0aWFsIGltcGxlbWVudGF0aW9uCisgKiAKKyAqLworCitwYWNrYWdlIG9yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aTsKKworaW1wb3J0IG9yZy5lY2xpcHNlLnh0ZXh0LnVpLmd1aWNlLkFic3RyYWN0R3VpY2VBd2FyZUV4ZWN1dGFibGVFeHRlbnNpb25GYWN0b3J5OworaW1wb3J0IG9yZy5vc2dpLmZyYW1ld29yay5CdW5kbGU7CisKK2ltcG9ydCBjb20uZ29vZ2xlLmluamVjdC5JbmplY3RvcjsKKworaW1wb3J0IG9yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS5pbnRlcm5hbC5DdWJlRFNMQWN0aXZhdG9yOworCisvKioKKyAqIFRoaXMgY2xhc3Mgd2FzIGdlbmVyYXRlZC4gQ3VzdG9taXphdGlvbnMgc2hvdWxkIG9ubHkgaGFwcGVuIGluIGEgbmV3bHkKKyAqIGludHJvZHVjZWQgc3ViY2x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jb250ZW50YXNzaXN0L0Fic3RyYWN0Q3ViZURTTFByb3Bvc2FsUHJvdmlkZXIuamF2YQpAQCAtMCwwICsxLDI0NyBAQAorLyoqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBDb3B5cmlnaHQgKGMpIDIwMTEsIDIwMTYgLSBMb2V0eiBHbWJIJkNvLktHICg2OTExNSBIZWlkZWxiZXJnLCBHZXJtYW55KSAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIEFsbCByaWdodHMgcmVzZXJ2ZWQuIFRoaXMgcHJvZ3JhbSBhbmQgdGhlIGFjY29tcGFueWluZyBtYXRlcmlhbHMgICAgICAgICAgIAorICogIGFyZSBtYWRlIGF2YWlsYWJsZSB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEVjbGlwc2UgUHVibGljIExpY2Vuc2UgdjEuMCAgICAgICAKKyAqICB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgIAorICogIGh0dHA6Ly93d3cuZWNsaXBzZS5vcmcvbGVnYWwvZXBsLXYxMC5odG1sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBDb250cmlidXRvcnM6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAJICAgQ2hyaXN0b3BoZSBMb2V0eiAoTG9ldHogR21iSCZDby5LRykgLSBpbml0aWFsIGltcGxlbWVudGF0aW9uCisgKiAKKyAqLworCitwYWNrYWdlIG9yZy5lY2xpcH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EU0xQYXJzZXIuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5hYjVlMWVlCi0tLSAvZGV2L251bGwKKysrIGIvb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvQ3ViZURTTFBhcnNlci5qYXZhCkBAIC0wLDAgKzEsNTU2IEBACisvKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIENvcHlyaWdodCAoYykgMjAxMSwgMjAxNiAtIExvZXR6IEdtYkgmQ28uS0cgKDY5MTE1IEhlaWRlbGJlcmcsIEdlcm1hbnkpIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gVGhpcyBwcm9ncmFtIGFuZCB0aGUgYWNjb21wYW55aW5nIG1hdGVyaWFscyAgICAgICAgICAgCisgKiAgYXJlIG1hZGUgYXZhaWxhYmxlIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgRWNsaXBzZSBQdWJsaWMgTGljZW5zZSB2MS4wICAgICAgIAorICogIHdoaWNoIGFjY29tcGFuaWVzIHRoaXMgZGlzdHJpYnV0aW9uLCBhbmQgaXMgYXZhaWxhYmxlIGF0ICAgICAgICAgICAgICAgICAgCisgKiAgaHR0cDovL3d3dy5lY2xpcHNlLm9yZy9sZWdhbC9lcGwtdjEwLmh0bWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIENvbnRyaW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2Nlc3MgPSBncmFtbWFyQWNjZXNzOworCX0KK30KZGlmZiAtLWdpdCBhL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL1BhcnRpYWxDdWJlRFNMQ29udGVudEFzc2lzdFBhcnNlci5qYXZhIGIvb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvUGFydGlhbEN1YmVEU0xDb250ZW50QXNzaXN0UGFyc2VyLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uYmFhOWNlMQotLS0gL2Rldi9udWxsCisrKyBiL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL1BhcnRpYWxDdWJlRFNMQ29udGVudEFzc2lzdFBhcnNlci5qYXZhCkBAIC0wLDAgKzEsNDkgQEAKKy8qKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29weXJpZ2h0IChjKSAyMDExLCAyMDE2IC0gTG9ldHogR21iSCZDby5LRyAoNjkxMTUgSGVpZGVsYmVyZywgR2VybWFueSkgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBBbGwgcmlnaHRzIHJlc2VydmVkLiBUaGlzIHByb2dyYW0gYW5kIHRoZSBhY2NvbXBhbnlpbmcgbWF0ZXJpYWxzICAgICAgICAgICAKKyAqICBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiAgd2hpY2ggYWNjb21wYW5pZXMgdGhpcyBkaXN0cmlidXRpb24sIGFuZCBpcyBhdmFpbGFibGUgYXQgICAgICAgICAgICAgICAgICAKKyAqICBodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2xlZ2FsL2VwbC12MTAuaHRtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29udHJpYnV0b3JzOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogCSAgIENocmlzdG9waGUgTG9ldHogKExvZXR6IEdtYkgmQ28uS0cpIC0gaW5pdGlhbCBpbXBsZW1lbnRhdGlvbgorICogCisgKi8KKworcGFja2FnZSBvcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkuY29udGVudGFzc2lzdC5hbnRscjsKKworaW1wb3J0IGphdmEudXRpbC5Db2xsZWN0aW9uOworaW1wb3J0IGphdmEudXRpbC5Db2xsZWN0aW9uczsKKworaW1wb3J0IG9yZy5lY2xpcHNlLnh0ZXh0LkFic3RyYWN0UnVsZTsKK2ltcG9ydCBvcmcuZWNsaXBzZS54dGV4dC51aS5jb2RldGVtcGxhdGVzLnVpLnBhcnRpYWxFZGl0aW5nLklQYXJ0aWFsQ29udGVudEFzc2lzdFBhcnNlcjsKK2ltcG9ydCBvcmcuZWNsaXBzZS54dGV4dC51aS5lZGl0b3IuY29udGVudGFzc2lzdC5hbnRsci5Gb2xsb3dFbGVtZW50OworaW1wb3J0IG9yZy5lY2xpcHNlLnh0ZXh0LnVpLmVkaXRvci5jb250ZW50YXNzaXN0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vbGxlY3Rpb25zLnNpbmdsZXRvbkxpc3QocGFyc2VyKSk7CisJCWRpc3BhdGNoZXIuaW52b2tlKCk7CisJCXJldHVybiBwYXJzZXIuZ2V0Rm9sbG93RWxlbWVudHMoKTsKKwl9CisKK30KZGlmZiAtLWdpdCBhL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nIGIvb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmcKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uMDQxMGViMAotLS0gL2Rldi9udWxsCisrKyBiL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nCkBAIC0wLDAgKzEsMTAwMTUgQEAKKy8qKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29weXJpZ2h0IChjKSAyMDExLCAyMDE2IC0gTG9ldHogR21iSCZDby5LRyAoNjkxMTUgSGVpZGVsYmVyZywgR2VybWFueSkgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBBbGwgcmlnaHRzIHJlc2VydmVkLiBUaGlzIHByb2dyYW0gYW5kIHRoZSBhY2NvbXBhbnlpbmcgbWF0ZXJpYWxzICAgICAgICAgICAKKyAqICBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiAgd2hpY2ggYWNjb21wYW5pZXMgdGhpcyBkaXN0cmlidXRpb24sIGFuZCBpcyBhdmFpbGFibGUgYXQgICAgICAgICAgICAgICAgICAKKyAqICBodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2xlZ2FsL2VwbC12MTAuaHRtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29udHJpYnV0b3JzOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogCSAgIENocmlzdG9waGUgTG9ldHogKExvZXR6IEdtYkgmQ28uS0cpIC0gaW5pdGlhbCBpbXBsZW1lbnRhdGlvbgorICogCisgKi8KKworZ3JhbW1hciBJbnRlcm5hbEN1YmVEU0w7CisKK29wdGlvbnMgeworCXN1cGVyQ2xhc3M9QWJzdHJhY3RJbnRlcm5hbENvbnRlbnRBc3Npc3RQYXJzZXI7CisJYmFja3RyYWNrPXRydWU7CisJCit9CisKK0BsZXhlcjo6aGVhZGVyIHsKK3BhY2thZ2Ugb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpLmNvbnRlbnRhc3Npc3QuYW50bHIuaW50ZXJuYWw7CisKKy8vIEhhY2s6IFVzZSBvdXIgb3duIExleGVyIHN1cGVyY2xhc3MgYnkgbWVhbnMgb2YgaW1wb3J0LiAKKy8vIEN1cnJlbnRseSB0aGVyZSBpcyBubyBvdGhlciB3YXkgdG8gc3BlY2lmeSB0aGUgc3VwZXJjbGFzcy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F8zKCkpOyB9CispCisKKzsKK2ZpbmFsbHkgeworCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKK30KKworCitydWxlX19DdWJlVHlwZUVudGl0eV9fR3JvdXBfXzQKKyAgICBAaW5pdCB7CisJCWludCBzdGFja1NpemUgPSBrZWVwU3RhY2tTaXplKCk7CisgICAgfQorOgorCXJ1bGVfX0N1YmVUeXBlRW50aXR5X19Hcm91cF9fNF9fSW1wbAorOworZmluYWxseSB7CisJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworfQorCitydWxlX19DdWJlVHlwZUVudGl0eV9fR3JvdXBfXzRfX0ltcGwKKyAgICBAaW5pdCB7CisJCWludCBzdGFja1NpemUgPSBrZWVwU3RhY2tTaXplKCk7CisgICAgfQorOgorKAoreyBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlVHlwZUVudGl0eUFjY2VzcygpLmdldFJpZ2h0Q3VybHlCcmFja2V0S2V5d29yZF80KCkpOyB9CisKKwknfScgCisKK3sgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlVHlwZUVudGl0eUFjY2VzcygpLmdldFJpZ2h0Q3VybHlCcmFja2V0S2V5d29yZF80KCkpOyB9CispCisKKzsKK2ZpbmFsbHkgeworCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKK30KKworCisKKworCisKKworCisKKworCisKK3J1bGVfX0N1YmVEaW1lbnNpb25FbnRpdHlfX0dyb3VwX18wCisgICAgQGluaXQgeworCQlpbnQgc3RhY2tTaXplID0ga2VlcFN0YWNrU2l6ZSgpOworICAgIH0KKzoKKwlydWxlX19DdWJlRGltZW5zaW9uRW50aXR5X19Hcm91cF9fMF9fSW1wbAorCXJ1bGVfX0N1YmVEaW1lbnNpb25FbnRpdHlfX0dyb3VwX18xCis7CitmaW5hbGx5IHsKKwlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7Cit9CisKK3J1bGVfX0N1YmVEa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aW1lbnNpb25FbnRpdHlFbnRpdHlBY2Nlc3MoKS5nZXREaW1FbnRpdHlBc3NpZ25tZW50XzcoKSk7IH0KKykKKworOworZmluYWxseSB7CisJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworfQorCisKK3J1bGVfX0N1YmVEaW1lbnNpb25FbnRpdHlFbnRpdHlfX0dyb3VwX184CisgICAgQGluaXQgeworCQlpbnQgc3RhY2tTaXplID0ga2VlcFN0YWNrU2l6ZSgpOworICAgIH0KKzoKKwlydWxlX19DdWJlRGltZW5zaW9uRW50aXR5RW50aXR5X19Hcm91cF9fOF9fSW1wbAorOworZmluYWxseSB7CisJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworfQorCitydWxlX19DdWJlRGltZW5zaW9uRW50aXR5RW50aXR5X19Hcm91cF9fOF9fSW1wbAorICAgIEBpbml0IHsKKwkJaW50IHN0YWNrU2l6ZSA9IGtlZXBTdGFja1NpemUoKTsKKyAgICB9Cis6CisoCit7IGJlZm9yZShncmFtbWFyQWNjZXNzLmdldEN1YmVEaW1lbnNpb25FbnRpdHlFbnRpdHlBY2Nlc3MoKS5nZXRSaWdodEN1cmx5QnJhY2tldEtleXdvcmRfOCgpKTsgfQorCisJJ30nIAorCit7IGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZURpbWVuc2lvbkVudGl0eUVudGl0eUFjY2VzcygpLmdldFJpZ2h0Q3VybHlCcmFja2V0S2V5d29yZF84KCkpOyB9CispCisKKzsKK2ZpbmFsbHkgeworCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKK30KKworCisKKworCisKKworCisKKworCisKKworCisKKworCisKKworCitydWxlX19DdWJlTGV2ZWxfX0dyb3VwX18wCisgICAgQGluaXQgeworCQlpbnQgc3RhY2tTaXplID0ga2VlcFN0YWNrU2l6ZSgpOworICAgIH0KKzoKKwlydWxlX19DdWJlTGV2ZWxfX0dyb3VwX18wX19JbXBsCisJcnVsZV9fQ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VN0YWNrU2l6ZShzdGFja1NpemUpOworfQorCisKK3J1bGVfX1hBc3NpZ25tZW50X19Hcm91cF8wX18zCisgICAgQGluaXQgeworCQlpbnQgc3RhY2tTaXplID0ga2VlcFN0YWNrU2l6ZSgpOworICAgIH0KKzoKKwlydWxlX19YQXNzaWdubWVudF9fR3JvdXBfMF9fM19fSW1wbAorOworZmluYWxseSB7CisJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworfQorCitydWxlX19YQXNzaWdubWVudF9fR3JvdXBfMF9fM19fSW1wbAorICAgIEBpbml0IHsKKwkJaW50IHN0YWNrU2l6ZSA9IGtlZXBTdGFja1NpemUoKTsKKyAgICB9Cis6CisoCit7IGJlZm9yZShncmFtbWFyQWNjZXNzLmdldFhBc3NpZ25tZW50QWNjZXNzKCkuZ2V0VmFsdWVBc3NpZ25tZW50XzBfMygpKTsgfQorKHJ1bGVfX1hBc3NpZ25tZW50X19WYWx1ZUFzc2lnbm1lbnRfMF8zKQoreyBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhBc3NpZ25tZW50QWNjZXNzKCkuZ2V0VmFsdWVBc3NpZ25tZW50XzBfMygpKTsgfQorKQorCis7CitmaW5hbGx5IHsKKwlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7Cit9CisKKworCisKKworCisKKworCisKK3J1bGVfX1hBc3NpZ25tZW50X19Hcm91cF8xX18wCisgICAgQGluaXQgeworCQlpbnQgc3RhY2tTaXplID0ga2VlcFN0YWNrU2l6ZSgpOworICAgIH0KKzoKKwlydWxlX19YQXNzaWdubWVudF9fR3JvdXBfMV9fMF9fSW1wbAorCXJ1bGVfX1hBc3NpZ25tZW50X19Hcm91cF8xX18xCis7CitmaW5hbGx5IHsKKwlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7Cit9CisKK3J1bGVfX1hBc3NpZ25tZW50X19Hcm91cF8xX18wX19JbXBsCisgICAgQGluaXQgeworCQlpbnQgc3RhY2tTaX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D0zMAorVF9fMzE9MzEKK1RfXzMyPTMyCitUX18zMz0zMworVF9fMzQ9MzQKK1RfXzM1PTM1CitUX18zNj0zNgorVF9fMzc9MzcKK1RfXzM4PTM4CitUX18zOT0zOQorVF9fNDA9NDAKK1RfXzQxPTQxCitUX180Mj00MgorVF9fNDM9NDMKK1RfXzQ0PTQ0CitUX180NT00NQorVF9fNDY9NDYKK1RfXzQ3PTQ3CitUX180OD00OAorVF9fNDk9NDkKK1RfXzUwPTUwCitUX181MT01MQorVF9fNTI9NTIKK1RfXzUzPTUzCitUX181ND01NAorVF9fNTU9NTUKK1RfXzU2PTU2CitUX181Nz01NworVF9fNTg9NTgKK1RfXzU5PTU5CitUX182MD02MAorVF9fNjE9NjEKK1RfXzYyPTYyCitUX182Mz02MworVF9fNjQ9NjQKK1RfXzY1PTY1CitUX182Nj02NgorVF9fNjc9NjcKK1RfXzY4PTY4CitUX182OT02OQorVF9fNzA9NzAKK1RfXzcxPTcxCitUX183Mj03MgorVF9fNzM9NzMKK1RfXzc0PTc0CitUX183NT03NQorVF9fNzY9NzYKK1RfXzc3PTc3CitUX183OD03OAorVF9fNzk9NzkKK1RfXzgwPTgwCitUX184MT04MQorVF9fODI9ODIKK1RfXzgzPTgzCitUX184ND04NAorVF9fODU9ODUKK1RfXzg2PTg2CitUX184Nz04NworVF9fODg9ODgKK1RfXzg5PTg5CitUX185MD05MAorVF9fOTE9OTEKK1RfXzkyPTkyCitUX185Mz05MworVF9fOTQ9OTQKK1RfXzk1PTk1CitUX185Nj05NgorVF9fOTc9OTcKK1RfXzk4PTk4CitUX185OT05OQpkaWZmIC0tZ2l0IGEvb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMTGV4ZXIuamF2YSBiL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTExleGVyLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uZDEwNzc3ZgotLS0gL2Rldi9udWxsCisrKyBiL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTExleGVyLmphdmEKQEAgLTAsMCArMSw1MDY4IEBACisvKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIENvcHlyaWdodCAoYykgMjAxMSwgMjAxNiAtIExvZXR6IEdtYkgmQ28uS0cgKDY5MTE1IEhlaWRlbGJlcmcsIEdlcm1hbnkpIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gVGhpcyBwcm9ncmFtIGFuZCB0aGUgYWNjb21wYW55aW5nIG1hdGVyaWFscyAgICAgICAgICAgCisgKiAgYXJlIG1hZGUgYXZhaWxhYmxlIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgRWNsaXBzZSBQdWJsaWMgTGljZW5zZSB2MS4wICAgICAgIAorICogIHdoaWNoIGFjY29tcGFuaWVzIHRoaXMgZGlzdHJpYnV0aW9uLCBhbmQgaXMgYXZhaWxhYmxlIGF0ICAgICAgICAgICAgICAgICAgCisgKiAgaHR0cDovL3d3dy5lY2xpcHNlLm9yZy9sZWdhbC9lcGwtdjEwLmh0bWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIENvbnRyaWJ1dG9yczogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqIAkgICBDaHJpc3RvcGhlIExvZXR6IChMb2V0eiBHbWJIJkNvLktHKSAtIGluaXRpYWwgaW1wbGVtZW50YXRpb24KKyAqIAorICovCisKK3BhY2thZ2Ugb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpLmNvbnRlbnRhc3Npc3QuYW50bHIuaW50ZXJuYWw7CisKKy8vIEhhY2s6IFVzZSBvdXIgb3duIExleGVyIHN1cGVyY2xhc3MgYnkgbWVhbnMgb2YgaW1wb3J0LiAKKy8vIEN1cnJlbnRseSB0aGVyZSBpcyBubyBvdGhlciB3YXkgdG8gc3BlY2lmeSB0aGUgc3VwZXJjbGFzcyBmb3IgdGhlIGxleGVyLgoraW1wb3J0IG9yZy5lY2xpcHNlLnh0ZXh0LnVpLmVkaXRvci5jb250ZW50YXNzaXN0LmFudGxyLmludGVybmFsLkxleGVyOworCisKK2ltcG9ydCBvcmcuYW50bHIucnVudGltZS4qOworaW1wb3J0IGphdmEudXRpbC5TdGFjazsKK2ltcG9ydCBqYXZhLnV0aWwuTGlzdDsKK2ltcG9ydCBqYXZhLnV0aWwuQXJyYXlMaXN0OworCitAU3VwcHJlc3NXYXJuaW5ncygiYWxsIikKK3B1YmxpYyBjbGFzcyBJbnRlcm5hbEN1YmVEU0xMZXhlciBleHRlbmRzIExleGVyIHsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBSVUxFX0hFWD02OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzUwPTUwOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzU5PTU5OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzU1PTU1OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzU2PTU2OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzU3PTU3OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzU4PTU4OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzUxPTUxOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzUyPTUyOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzUzPTUzOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzU0PTU0OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzYwPTYwOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzYxPTYxOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFJVTEVfSUQ9NDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMzA9MTMwOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFJVTEVfSU5UPTc7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNjY9NjY7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgUlVMRV9NTF9DT01NRU5UPTk7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNjc9Njc7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTI5PTEyOTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX182OD02ODsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX182OT02OTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX182Mj02MjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMjY9MTI2OworICA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WMgZmluYWwgaW50IFRfXzQ3PTQ3OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzQwPTQwOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzQxPTQxOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzQyPTQyOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzQzPTQzOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzkxPTkxOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzEwMD0xMDA7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fOTI9OTI7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fOTM9OTM7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTAyPTEwMjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX185ND05NDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMDE9MTAxOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzkwPTkwOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzE5PTE5OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzE1PTE1OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzE2PTE2OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzE3PTE3OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzE4PTE4OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzk5PTk5OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzEzPTEzOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzE0PTE0OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzk1PTk1OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzk2PTk2OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzk3PTk3OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzk4PTk4OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFJVTEVfREVDSU1BTD04OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzI2PTI2OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzI3PTI3OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzI4PTI4OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzI5PTI5OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzIyPTIyOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzIzPTIzOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzI0PTI0OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzI1PTI1OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzIwPTIwOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzIxPTIxOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzEyMj0xMjI7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNzA9NzA7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTIxPTEyMTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX183MT03MTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMjQ9MTI0OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzcyPTcyOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzEyMz0xMjM7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTIwPTEyMDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBSVUxFX1NUUklORz01OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFJVTEVfU0xfQ09NTUVOVD0xMDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX183Nz03NzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMTk9MTE5OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzc4PTc4OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzExOD0xMTg7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNzk9Nzk7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNzM9NzM7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTE1PTExNTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBFT0Y9LTE7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNzQ9NzQ7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTE0PTExNDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX183NT03NTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMTc9MTE3OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzc2PTc2OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzExNj0xMTY7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fODA9ODA7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTExPTExMTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX184MT04MTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMTA9MTEwOworICAgIHB1YmxpYyBz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leHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjExOjk6ICc9JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goJz0nKTsgCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzEzIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xNCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMTQoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTQ7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMjo3OiAoICd8fCcgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTI6OTogJ3x8JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goInx8Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzE0IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xNSIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMTUoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTU7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMzo3OiAoICcmJicgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTM6OTogJyYmJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIiYmIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzE1IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xNiIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMTYoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTY7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNDo3OiAoICc7JyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNDo5OiAnOycKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCc7Jyk7IAorCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18xNiIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTciCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzE3KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzE3OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQ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HIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTY6NzogKCAnLT0nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE2Ojk6ICctPScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCItPSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18xOCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTkiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzE5KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzE5OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTc6NzogKCAnKj0nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE3Ojk6ICcqPScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCIqPSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18xOSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMjAiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzIwKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzIwOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTg6NzogKCAnLz0nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE4Ojk6ICcvPScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCIvPSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18yMCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMjEiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzIxKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzIxOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTk6NzogKCAnJT0nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE5Ojk6ICclPScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCIlPSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18yMSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMjIiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzIyKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzIyOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjA6NzogKCAnPT0nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIwOjk6ICc9PScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCI9PSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18yMiIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMjMiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzIzKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzIzOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjE6NzogKCAnIT0nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIxOjk6ICchPScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCIhPSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18yMyIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMjQiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzI0KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzI0OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2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ZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMzo5OiAnIT09JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIiE9PSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18yNSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMjYiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzI2KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzI2OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjQ6NzogKCAnPj0nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI0Ojk6ICc+PScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCI+PSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18yNiIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMjciCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzI3KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzI3OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjU6NzogKCAnPicgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjU6OTogJz4nCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgnPicpOyAKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMjciCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzI4IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18yOCgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18yODsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI2Ojc6ICggJzwnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI2Ojk6ICc8JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goJzwnKTsgCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzI4IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18yOSIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMjkoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMjk7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNzo3OiAoICctPicgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Mjc6OTogJy0+JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIi0+Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzI5IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18zMCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMzAoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMzA7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyODo3OiAoICcuLjwnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI4Ojk6ICcuLjwnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiLi48Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzMwIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18zMSIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMzEoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMzE7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyOTo3OiAoICcuLicgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Mjk6OTogJy4uJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIi4uIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzMxIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18zMiIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMzIoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMzI7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDo3OiAoICc9PicgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzA6OTogJz0+JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIj0+Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzMyIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18zMyIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMzMoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMzM7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMTo3OiAoICc8PicgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzE6OTogJzw+JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIjw+Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzMzIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18zNCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMzQoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMzQ7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMjo3OiAoICc/OicgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzI6OTogJz86JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIj86Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzM0IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18zNSIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMzUoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMzU7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0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YWwvSW50ZXJuYWxDdWJlRFNMLmc6MzQ6NzogKCAnLScgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzQ6OTogJy0nCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgnLScpOyAKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMzYiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzM3IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18zNygpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18zNzsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjM1Ojc6ICggJyonICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjM1Ojk6ICcqJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goJyonKTsgCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzM3IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18zOCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMzgoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMzg7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozNjo3OiAoICcqKicgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzY6OTogJyoqJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIioqIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzM4IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18zOSIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMzkoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMzk7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozNzo3OiAoICcvJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozNzo5OiAnLycKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCcvJyk7IAorCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18zOSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNDAiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzQwKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzQwOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Mzg6NzogKCAnJScgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Mzg6OTogJyUnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgnJScpOyAKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fNDAiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzQxIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX180MSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX180MTsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjM5Ojc6ICggJyEnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjM5Ojk6ICchJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goJyEnKTsgCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzQxIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX180MiIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNDIoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNDI7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo0MDo3OiAoICcrKycgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NDA6OTogJysrJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIisrIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzQyIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX180MyIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNDMoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNDM7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo0MTo3OiAoICctLScgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NDE6OTogJy0tJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIi0tIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzQzIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX180NCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNDQoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNDQ7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo0Mjo3OiAoICcuJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo0Mjo5OiAnLicKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCcuJyk7IAorCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX180NCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNDUiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzQ1KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzQ1OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NDM6NzogKCAndmFsJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo0Mzo5OiAndmFsJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goInZhbCIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX180NSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNDYiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzQ2KCkgdGhyb3dzI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cvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo0Nzo5OiAnZXh0ZW5zaW9uJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goImV4dGVuc2lvbiIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX180OSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNTAiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzUwKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzUwOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NDg6NzogKCAnc3VwZXInICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjQ4Ojk6ICdzdXBlcicKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJzdXBlciIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX181MCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNTEiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzUxKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzUxOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NDk6NzogKCAnZmFsc2UnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjQ5Ojk6ICdmYWxzZScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJmYWxzZSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX181MSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNTIiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzUyKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzUyOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTA6NzogKCAnc3VtJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo1MDo5OiAnc3VtJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goInN1bSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX181MiIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNTMiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzUzKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzUzOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTE6NzogKCAnY291bnQnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjUxOjk6ICdjb3VudCcKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJjb3VudCIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX181MyIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNTQiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzU0KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzU0OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLm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9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo1NDo5OiAnYXZnJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goImF2ZyIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX181NiIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNTciCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzU3KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzU3OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTU6NzogKCAnZGlzdGluY3QtY291bnQnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjU1Ojk6ICdkaXN0aW5jdC1jb3VudCcKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJkaXN0aW5jdC1jb3VudCIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX181NyIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNTgiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzU4KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzU4OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTY6NzogKCAnU3RyaW5nJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo1Njo5OiAnU3RyaW5nJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIlN0cmluZyIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX181OCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNTkiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzU5KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzU5OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTc6NzogKCAnTnVtZXJpYycgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTc6OTogJ051bWVyaWMnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiTnVtZXJpYyIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX181OSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNjAiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzYwKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzYwOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTg6NzogKCAnSW50ZWdlcicgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTg6OTogJ0ludGVnZXInCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiSW50ZWdlciIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX182MCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNjEiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzYxKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzYxOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3Nic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c3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NjE6OTogJ1RpbWUnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiVGltZSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX182MyIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNjQiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzY0KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzY0OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NjI6NzogKCAnVGltZXN0YW1wJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo2Mjo5OiAnVGltZXN0YW1wJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIlRpbWVzdGFtcCIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX182NCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNjUiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzY1KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzY1OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NjM6NzogKCAnVGltZVllYXJzJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo2Mzo5OiAnVGltZVllYXJzJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIlRpbWVZZWFycyIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0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29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzY3OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NjU6NzogKCAnVGltZVF1YXJ0ZXJzJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo2NTo5OiAnVGltZVF1YXJ0ZXJzJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIlRpbWVRdWFydGVycyIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX182NyIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNjgiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzY4KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzY4OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0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hvdXJzJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIlRpbWVIb3VycyIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX183MSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNzIiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzcyKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzcyOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NzA6NzogKCAnVGltZU1pbnV0ZXMnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjcwOjk6ICdUaW1lTWludXRlcycKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJUaW1lTWludXRlcyIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX183MiIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNzMiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzczKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzczOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NzE6NzogKCAnVGltZVNlY29uZHMnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjcxOjk6ICdUaW1lU2Vjb25kcycKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJUaW1lU2Vjb25kcyIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX183MyIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNzQiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzc0KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzc0OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NzI6NzogKCAncGFja2FnZScgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NzI6OTogJ3BhY2thZ2UnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgicGFja2FnZSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX183NCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNzUiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzc1KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzc1OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NzM6NzogKCAneycgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NzM6OTogJ3snCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgneycpOyAKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fNzUiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzc2IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX183NigpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX183NjsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjc0Ojc6ICggJ30nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjc0Ojk6ICd9JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goJ30nKTsgCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzc2IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX183NyIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNzcoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNzc7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo3NTo3OiAoICdjdWJlJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo3NTo5OiAnY3ViZScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJjdWJlIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzc3IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX183OCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNzgoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNzg7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo3Njo3OiAoICdkaW1lbnNpb25Vc2FnZScgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NzY6OTogJ2RpbWVuc2lvblVzYWdlJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goImRpbWVuc2lvblVzYWdlIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzc4IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX183OSIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNzkoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNzk7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo3Nzo3OiAoICdvdmVyJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo3Nzo5OiAnb3ZlcicKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJvdmVyIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzc5IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX184MCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fODAoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fODA7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo3ODo3OiAoICdkaW1lbnNpb24nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjc4Ojk6ICdkaW1lbnNpb24nCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiZGltZW5zaW9uIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzgwIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX184MSIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fODEoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fODE7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo3OTo3OiAoICdoaWVyYXJjaHknICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjc5Ojk6ICdoaWVyYXJjaHknCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiaGllcmFyY2h5Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzgxIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX184MiIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fODIoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fODI7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDo3OiAoICdlbnRpdHknICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwOjk6ICdlbnRpdHknCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiZW50aXR5Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzgyIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX184MyIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fODMoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fODM7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MTo3OiAoICdsZXZlbCcgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODE6OTogJ2xldmVsJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goImxldmVsIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzgzIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX184NCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fODQoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fODQ7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4Mjo3OiAoICdjb2x1bW49JyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4Mjo5OiAnY29sdW1uPScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJjb2x1bW49Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzg0IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX184NSIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fODUoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fODU7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4Mzo3OiAoICdwcm9wZXJ0eScgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODM6OTogJ3Byb3BlcnR5JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goInByb3BlcnR5Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzg1IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX184NiIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fODYoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fODY7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4NDo3OiAoICdtZWFzdXJlJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4NDo5OiAnbWVhc3VyZScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJtZWFzdXJlIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzg2IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX184NyIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fODcoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fODc7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4NTo3OiAoICdAJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4NTo5OiAnQCcKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCdAJyk7IAorCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX184NyIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fODgiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzg4KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzg4OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODY6NzogKCAnKCcgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODY6OTogJygnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgnKCcpOyAKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fODgiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzg5IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX184OSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX184OTsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjg3Ojc6ICggJyknICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjg3Ojk6ICcpJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goJyknKTsgCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzg5IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX185MCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fOTAoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fOTA7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4ODo3OiAoICcsJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4ODo5OiAnLCcKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCcsJyk7IAorCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX185MCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fOTEiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzkxKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzkxOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODk6NzogKCAnXScgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODk6OTogJ10nCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgnXScpOyAKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fOTEiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzkyIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX185MigpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX185MjsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjkwOjc6ICggJyMnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjkwOjk6ICcjJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goJyMnKTsgCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzkyIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX185MyIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fOTMoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fOTM7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo5MTo3OiAoICdbJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo5MTo5OiAnWycKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCdbJyk7IAorCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX185MyIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fOTQiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzk0KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzk0OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3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WJlRFNMLmc6OTM6NzogKCAnYXMnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjkzOjk6ICdhcycKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJhcyIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX185NSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fOTYiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzk2KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzk2OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6OTQ6NzogKCAnaWYnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjk0Ojk6ICdpZicKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJpZiIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX185NiIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fOTciCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzk3KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzk3OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6OTU6NzogKCAnZWxzZScgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6OTU6OTogJ2Vsc2UnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiZWxzZSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX185NyIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fOTgiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzk4KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzk4OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6OTY6NzogKCAnc3dpdGNoJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo5Njo5OiAnc3dpdGNoJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goInN3aXRjaCIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX185OCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fOTkiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzk5KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzk5OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6OTc6NzogKCAnOicgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6OTc6OTogJzonCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgnOicpOyAKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fOTkiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzEwMCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMTAwKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzEwMDsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjk4Ojg6ICggJ2RlZmF1bHQnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjk4OjEwOiAnZGVmYXVsdCcKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJkZWZhdWx0Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzEwMCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTAxIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMDEoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTAxOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJl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wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDA6MTA6ICdmb3InCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiZm9yIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzEwMiIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTAzIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMDMoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTAzOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTAxOjg6ICggJ3doaWxlJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDE6MTA6ICd3aGlsZScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJ3aGlsZSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18xMDMiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzEwNCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMTA0KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzEwNDsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEwMjo4OiAoICdkbycgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTAyOjEwOiAnZG8nCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiZG8iKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTA0IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xMDUiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzEwNSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xMDU7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDM6ODogKCAnbmV3JyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDM6MTA6ICduZXcnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgibmV3Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzEwNSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTA2IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMDYoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTA2OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTA0Ojg6ICggJ251bGwnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEwNDoxMDogJ251bGwnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgibnVsbCIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18xMDYiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzEwNyIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMTA3KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzEwNzsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEwNTo4OiAoICd0eXBlb2YnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEwNToxMDogJ3R5cGVvZicKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJ0eXBlb2YiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTA3IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xMDgiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzEwOCgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xMDg7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDY6ODogKCAndGhyb3cnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEwNjoxMDogJ3Rocm93JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goInRocm93Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzEwOCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTA5IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMDkoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTA5OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTA3Ojg6ICggJ3JldHVybicgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTA3OjEwOiAncmV0dXJuJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goInJldHVybiIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18xMDkiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzExMCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMTEwKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzExMDsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEwODo4OiAoICd0cnknICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEwODoxMDogJ3RyeScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJ0cnkiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTEwIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xMTEiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzExMSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xMTE7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDk6ODogKCAnZmluYWxseScgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTA5OjEwOiAnZmluYWxseScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJmaW5hbGx5Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzExMSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTEyIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMTIoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTEyOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTEwOjg6ICggJ3N5bmNocm9uaXplZCcgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTEwOjEwOiAnc3luY2hyb25pemVkJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goInN5bmNocm9uaXplZCIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18xMTIiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzExMyIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMTEzKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzExMzsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjExMTo4OiAoICdjYXRjaCcgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTExOjEwOiAnY2F0Y2gnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiY2F0Y2giKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTEzIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xMTQiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzExNCgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xMTQ7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZ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OjExMzo4OiAoICcmJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMTM6MTA6ICcmJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goJyYnKTsgCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzExNSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTE2IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMTYoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTE2OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTE0Ojg6ICggJ2RlZmF1bHRNZWFzdXJlJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbn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UiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTE3IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xMTgiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzExOCgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xMTg7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMTY6ODogKCAnaGFzQWxsJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMTY6MTA6ICdoYXNBbGwnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiaGFzQWxsIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzExOCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTE5IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMTkoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTE5OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTE3Ojg6ICggJ2FsbE1lbWJlck5hbWU9JyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMTc6MTA6ICdhbGxNZW1iZXJOYW1lPScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJhbGxNZW1iZXJOYW1lPSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18xMTkiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzEyMCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMTIwKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzEyMDsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjExODo4OiAoICdkZWZhdWx0TWVtYmVyPScgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTE4OjEwOiAnZGVmYXVsdE1lbWJlcj0nCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiZGVmYXVsdE1lbWJlcj0iKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTIwIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xMjEiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzEyMSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xMjE7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMTk6ODogKCAna2V5PScgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTE5OjEwOiAna2V5PScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJrZXk9Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzEyMSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTIyIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMjIoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTIyOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2U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U9JyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMjE6MTA6ICdsZXZlbFR5cGU9JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goImxldmVsVHlwZT0iKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTIzIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xMjQiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzEyNCgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xMjQ7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMjI6ODogKCAndHlwZT0nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyMjoxMDogJ3R5cGU9JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goInR5cGU9Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzEyNCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTI1IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMjUoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTI1OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTIzOjg6ICggJ25vdFZpc2libGUnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyMzoxMDogJ25vdFZpc2libGUnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgibm90VmlzaWJsZSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18xMjUiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzEyNiIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMTI2KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzEyNjsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyNDo4OiAoICc6OicgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTI0OjEwOiAnOjonCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiOjoiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTI2IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xMjciCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzEyNygpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xMjc7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMjU6ODogKCAnPy4nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyNToxMDogJz8uJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIj8uIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzEyNyIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTI4IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMjgoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTI4OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTI2Ojg6ICggJ3wnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyNjoxMDogJ3wnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgnfCcpOyAKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTI4IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xMjkiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzEyOSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xMjk7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMjc6ODogKCAndmFyJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMjc6MTA6ICd2YXInCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgidmFyIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzEyOSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTMwIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMzAoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTMwOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTI4Ojg6ICggJ3RydWUnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpc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saXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTk0NToxMjogKCAnMHgnIHwgJzBYJyApICggJzAnIC4uICc5JyB8ICdhJyAuLiAnZicgfCAnQScgLi4gJ0YnIHwgJ18nICkrICggJyMnICggKCAnYicgfCAnQicgKSAoICdpJyB8ICdJJyApIHwgKCAnbCcgfCAnTCcgKSApICk/CisgICAgICAgICAgICB7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTk0NToxMjogKCAnMHgnIHwgJzBYJyApCisgICAgICAgICAgICBpbnQgYWx0MT0yOworICAgICAgICAgICAgaW50IExBMV8wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgIGlmICggKExBMV8wPT0nMCcpICkgeworICAgICAgICAgICAgICAgIGludCBMQTFfMSA9IGlucHV0LkxBKDIpOworCisgICAgICAgICAgICAgICAgaWYgKCAoTEExXzE9PSd4JykgKSB7CisgICAgICAgICAgICAgICAgICAgIGFsdDE9MTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTFfMT09J1gnKSApIHsKKyAgICAgICAgICAgICAgICAgICAgYWx0MT0yOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgTm9WaWFibGVBbHRFeGNlcHRpb24gbnZhZSA9CisgICAgICAgICAgICAgICAgICAgICAgICBuZXcgTm9WaWFibGVBbHRFeGNlcHRpb24oIiIsIDEsIDEsIGlucHV0KTsKKworICAgICAgICAgICAgICAgICAgICB0aHJvdyBudmFlOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgIE5vVmlhYmxlQWx0RXhjZXB0aW9uIG52YWUgPQorICAgICAgICAgICAgICAgICAgICBuZXcgTm9WaWFibGVBbHRFeGNlcHRpb24oIiIsIDEsIDAsIGlucHV0KTsKKworICAgICAgICAgICAgICAgIHRocm93IG52YWU7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBzd2l0Y2ggKGFsdDEpIHsKKyAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTk0NToxMzogJzB4JworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIG1hdGNoKCIweCIpOyAKKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSAyIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjU5NDU6MTg6ICcwWCcKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBtYXRjaCgiMFgiKTsgCisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1OTQ1OjI0OiAoICcwJyAuLiAnOScgfCAnYScgLi4gJ2YnIHwgJ0EnIC4uICdGJyB8ICdfJyApKworICAgICAgICAgICAgaW50IGNudDI9MDsKKyAgICAgICAgICAgIGxvb3AyOgorICAgICAgICAgICAgZG8geworICAgICAgICAgICAgICAgIGludCBhbHQyPTI7CisgICAgICAgICAgICAgICAgaW50IExBMl8wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgICAgICBpZiAoICgoTEEyXzA+PScwJyAmJiBMQTJfMDw9JzknKXx8KExBMl8wPj0nQScgJiYgTEEyXzA8PSdGJyl8fExBMl8wPT0nXyd8fChMQTJfMD49J2EnICYmIExBMl8wPD0nZicpKSApIHsKKyAgICAgICAgICAgICAgICAgICAgYWx0Mj0xOworICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQyKSB7CisgICAgICAgICAgICAJY2FzZSAxIDoKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6CisgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgIAkgICAgaWYgKCAoaW5wdXQuTEEoMSk+PScwJyAmJiBpbnB1dC5MQSgxKTw9JzknKXx8KGlucHV0LkxBKDEpPj0nQScgJiYgaW5wdXQuTEEoMSk8PSdGJyl8fGlucHV0LkxBKDEpPT0nXyd8fChpbnB1dC5MQSgxKT49J2EnICYmIGlucHV0LkxBKDEpPD0nZicpICkgeworICAgICAgICAgICAgCSAgICAgICAgaW5wdXQuY29uc3VtZSgpOworCisgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgIAkgICAgZWxzZSB7CisgICAgICAgICAgICAJICAgICAgICBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uIG1zZSA9IG5ldyBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uKG51bGwsaW5wdXQpOworICAgICAgICAgICAgCSAgICAgICAgcmVjb3Zlcihtc2UpOworICAgICAgICAgICAgCSAgICAgICAgdGhyb3cgbXNlO30KKworCisgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgIAkgICAgYnJlYWs7CisKKyAgICAgICAgICAgIAlkZWZhdWx0IDoKKyAgICAgICAgICAgIAkgICAgaWYgKCBjbnQyID49IDEgKSBicmVhayBsb29wMjsKKyAgICAgICAgICAgICAgICAgICAgICAgIEVhcmx5RXhpdEV4Y2VwdGlvbiBlZWUgPQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ldyBFYXJseUV4aXRFeGNlcHRpb24oMiwgaW5wdXQpOworICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgZWVlOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBjbnQyKys7CisgICAgICAgICAgICB9IHdoaWxlICh0cnVlKTsKKworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjU5NDU6NTg6ICggJyMnICggKCAnYicgfCAnQicgKSAoICdpJyB8ICdJJyApIHwgKCAnbCcgfCAnTCcgKSApICk/CisgICAgICAgICAgICBpbnQgYWx0ND0yOworICAgICAgICAgICAgaW50IExBNF8wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgIGlmICggKExBNF8wPT0nIycpICkgeworICAgICAgICAgICAgICAgIGFsdDQ9MTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHN3aXRjaCAoYWx0NCkgeworICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1OTQ1OjU5OiAnIycgKCAoICdiJyB8ICdCJyApICggJ2knIHwgJ0knICkgfCAoICdsJyB8ICdMJyApICkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBtYXRjaCgnIycpOyAKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjU5NDU6NjM6ICggKCAnYicgfCAnQicgKSAoICdpJyB8ICdJJyApIHwgKCAnbCcgfCAnTCcgKSApCisgICAgICAgICAgICAgICAgICAgIGludCBhbHQzPTI7CisgICAgICAgICAgICAgICAgICAgIGludCBMQTNfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgICAgIGlmICggKExBM18wPT0nQid8fExBM18wPT0nYicpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgYWx0Mz0xOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEzXzA9PSdMJ3x8TEEzXzA9PSdsJykgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBhbHQzPTI7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICBOb1ZpYWJsZUFsdEV4Y2VwdGlvbiBudmFlID0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXcgTm9WaWFibGVBbHRFeGNlcHRpb24oIiIsIDMsIDAsIGlucHV0KTsKKworICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbnZhZTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGFsdDMpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjU5NDU6NjQ6ICggJ2InIHwgJ0InICkgKCAnaScgfCAnSScgKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIGlucHV0LkxBKDEpPT0nQid8fGlucHV0LkxBKDEpPT0nYicgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0LmNvbnN1bWUoKTsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbiBtc2UgPSBuZXcgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbihudWxsLGlucHV0KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVjb3Zlcihtc2UpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBtc2U7fQorCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCBpbnB1dC5MQSgxKT09J0knfHxpbnB1dC5MQSgxKT09J2knICkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnB1dC5jb25zdW1lKCk7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1pc21hdGNoZWRTZXRFeGNlcHRpb24gbXNlID0gbmV3IE1pc21hdGNoZWRTZXRFeGNlcHRpb24obnVsbCxpbnB1dCk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlY292ZXIobXNlKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbXNlO30KKworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAyIDoKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTk0NTo4NDogKCAnbCcgfCAnTCcgKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIGlucHV0LkxBKDEpPT0nTCd8fGlucHV0LkxBKDEpPT0nbCcgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0LmNvbnN1bWUoKTsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbiBtc2UgPSBuZXcgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbihudWxsLGlucHV0KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVjb3Zlcihtc2UpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBtc2U7fQorCisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlJVTEVfSEVYIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJSVUxFX0lOVCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtUlVMRV9JTlQoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gUlVMRV9JTlQ7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTk0NzoxMDogKCAnMCcgLi4gJzknICggJzAnIC4uICc5JyB8ICdfJyApKiApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTk0NzoxMjogJzAnIC4uICc5JyAoICcwJyAuLiAnOScgfCAnXycgKSoKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoUmFuZ2UoJzAnLCc5Jyk7IAorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjU5NDc6MjE6ICggJzAnIC4uICc5JyB8ICdfJyApKgorICAgICAgICAgICAgbG9vcDU6CisgICAgICAgICAgICBkbyB7CisgICAgICAgICAgICAgICAgaW50IGFsdDU9MjsKKyAgICAgICAgICAgICAgICBpbnQgTEE1XzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgICAgIGlmICggKChMQTVfMD49JzAnICYmIExBNV8wPD0nOScpfHxMQTVfMD09J18nKSApIHsKKyAgICAgICAgICAgICAgICAgICAgYWx0NT0xOworICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQ1KSB7CisgICAgICAgICAgICAJY2FzZSAxIDoKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6CisgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgIAkgICAgaWYgKCAoaW5wdXQuTEEoMSk+PScwJyAmJiBpbnB1dC5MQSgxKTw9JzknKXx8aW5wdXQuTEEoMSk9PSdfJyApIHsKKyAgICAgICAgICAgIAkgICAgICAgIGlucHV0LmNvbnN1bWUoKTsKKworICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGVsc2UgeworICAgICAgICAgICAgCSAgICAgICAgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbiBtc2UgPSBuZXcgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbihudWxsLGlucHV0KTsKKyAgICAgICAgICAgIAkgICAgICAgIHJlY292ZXIobXNlKTsKKyAgICAgICAgICAgIAkgICAgICAgIHRocm93IG1zZTt9CisKKworICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGJyZWFrOworCisgICAgICAgICAgICAJZGVmYXVsdCA6CisgICAgICAgICAgICAJICAgIGJyZWFrIGxvb3A1OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0gd2hpbGUgKHRydWUpOworCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlJVTEVfSU5UIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJSVUxFX0RFQ0lNQUwiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVJVTEVfREVDSU1BTCgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBSV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EN1YmVEU0wuZzoyNTk0OToyNTogKCAoICdlJyB8ICdFJyApICggJysnIHwgJy0nICk/IFJVTEVfSU5UICk/CisgICAgICAgICAgICBpbnQgYWx0Nz0yOworICAgICAgICAgICAgaW50IExBN18wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgIGlmICggKExBN18wPT0nRSd8fExBN18wPT0nZScpICkgeworICAgICAgICAgICAgICAgIGFsdDc9MTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHN3aXRjaCAoYWx0NykgeworICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1OTQ5OjI2OiAoICdlJyB8ICdFJyApICggJysnIHwgJy0nICk/IFJVTEVfSU5UCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBpbnB1dC5MQSgxKT09J0UnfHxpbnB1dC5MQSgxKT09J2UnICkgeworICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXQuY29uc3VtZSgpOworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uIG1zZSA9IG5ldyBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uKG51bGwsaW5wdXQpOworICAgICAgICAgICAgICAgICAgICAgICAgcmVjb3Zlcihtc2UpOworICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbXNlO30KKworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTk0OTozNjogKCAnKycgfCAnLScgKT8KKyAgICAgICAgICAgICAgICAgICAgaW50IGFsdDY9MjsKKyAgICAgICAgICAgICAgICAgICAgaW50IExBNl8wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCAoTEE2XzA9PScrJ3x8TEE2XzA9PSctJykgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBhbHQ2PTE7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQ2KSB7CisgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIGlucHV0LkxBKDEpPT0nKyd8fGlucHV0LkxBKDEpPT0nLScgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0LmNvbnN1bWUoKTsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbiBtc2UgPSBuZXcgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbihudWxsLGlucHV0KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVjb3Zlcihtc2UpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBtc2U7fQorCisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIG1SVUxFX0lOVCgpOyAKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1OTQ5OjU4OiAoICggJ2InIHwgJ0InICkgKCAnaScgfCAnSScgfCAnZCcgfCAnRCcgKSB8ICggJ2wnIHwgJ0wnIHwgJ2QnIHwgJ0QnIHwgJ2YnIHwgJ0YnICkgKT8KKyAgICAgICAgICAgIGludCBhbHQ4PTM7CisgICAgICAgICAgICBpbnQgTEE4XzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgaWYgKCAoTEE4XzA9PSdCJ3x8TEE4XzA9PSdiJykgKSB7CisgICAgICAgICAgICAgICAgYWx0OD0xOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSBpZiAoIChMQThfMD09J0QnfHxMQThfMD09J0YnfHxMQThfMD09J0wnfHxMQThfMD09J2QnfHxMQThfMD09J2YnfHxMQThfMD09J2wnKSApIHsKKyAgICAgICAgICAgICAgICBhbHQ4PTI7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBzd2l0Y2ggKGFsdDgpIHsKKyAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTk0OTo1OTogKCAnYicgfCAnQicgKSAoICdpJyB8ICdJJyB8ICdkJyB8ICdEJyApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBpbnB1dC5MQSgxKT09J0InfHxpbnB1dC5MQSgxKT09J2InICkgeworICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXQuY29uc3VtZSgpOworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uIG1zZSA9IG5ldyBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uKG51bGwsaW5wdXQpOworICAgICAgICAgICAgICAgICAgICAgICAgcmVjb3Zlcihtc2UpOworICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbXNlO30KKworICAgICAgICAgICAgICAgICAgICBpZiAoIGlucHV0LkxBKDEpPT0nRCd8fGlucHV0LkxBKDEpPT0nSSd8fGlucHV0LkxBKDEpPT0nZCd8fGlucHV0LkxBKDEpPT0naScgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBpbnB1dC5jb25zdW1lKCk7CisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIE1pc21hdGNoZWRTZXRFeGNlcHRpb24gbXNlID0gbmV3IE1pc21hdGNoZWRTZXRFeGNlcHRpb24obnVsbCxpbnB1dCk7CisgICAgICAgICAgICAgICAgICAgICAgICByZWNvdmVyKG1zZSk7CisgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBtc2U7fQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIDIgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTk0OTo4NzogKCAnbCcgfCAnTCcgfCAnZCcgfCAnRCcgfCAnZicgfCAnRicgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggaW5wdXQuTEEoMSk9PSdEJ3x8aW5wdXQuTEEoMSk9PSdGJ3x8aW5wdXQuTEEoMSk9PSdMJ3x8aW5wdXQuTEEoMSk9PSdkJ3x8aW5wdXQuTEEoMSk9PSdmJ3x8aW5wdXQuTEEoMSk9PSdsJyApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0LmNvbnN1bWUoKTsKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgICAgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbiBtc2UgPSBuZXcgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbihudWxsLGlucHV0KTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHJlY292ZXIobXNlKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG1zZTt9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZm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0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTk1MToxMTogKCAnXicgKT8KKyAgICAgICAgICAgIGludCBhbHQ5PTI7CisgICAgICAgICAgICBpbnQgTEE5XzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgaWYgKCAoTEE5XzA9PSdeJykgKSB7CisgICAgICAgICAgICAgICAgYWx0OT0xOworICAgICAgICAgICAgfQorICAgICAgICAgICAgc3dpdGNoIChhbHQ5KSB7CisgICAgICAgICAgICAgICAgY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjU5NTE6MTE6ICdeJworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIG1hdGNoKCdeJyk7IAorCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBpbnB1dC5MQSgxKT09JyQnfHwoaW5wdXQuTEEoMSk+PSdBJyAmJiBpbnB1dC5MQSgxKTw9J1onKXx8aW5wdXQuTEEoMSk9PSdfJ3x8KGlucHV0LkxBKDEpPj0nYScgJiYgaW5wdXQuTEEoMSk8PSd6JykgKSB7CisgICAgICAgICAgICAgICAgaW5wdXQuY29uc3VtZSgpOworCisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uIG1zZSA9IG5ldyBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uKG51bGwsaW5wdXQpOworICAgICAgICAgICAgICAgIHJlY292ZXIobXNlKTsKKyAgICAgICAgICAgICAgICB0aHJvdyBtc2U7fQorCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTk1MTo0NDogKCAnYScgLi4gJ3onIHwgJ0EnIC4uICdaJyB8ICckJyB8ICdfJyB8ICcwJyAuLiAnOScgKSoKKyAgICAgICAgICAgIGxvb3AxMDoKKyAgICAgICAgICAgIGRvIHsKKyAgICAgICAgICAgICAgICBpbnQgYWx0MTA9MjsKKyAgICAgICAgICAgICAgICBpbnQgTEExMF8wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgICAgICBpZiAoIChMQTEwXzA9PSckJ3x8KExBMTBfMD49JzAnICYmIExBMTBfMDw9JzknKXx8KExBMTBfMD49J0EnICYmIExBMTBfMDw9J1onKXx8TEExMF8wPT0nXyd8fChMQTEwXzA+PSdhJyAmJiBMQTEwXzA8PSd6JykpICkgeworICAgICAgICAgICAgICAgICAgICBhbHQxMD0xOworICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQxMCkgeworICAgICAgICAgICAgCWNhc2UgMSA6CisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOgorICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIGlmICggaW5wdXQuTEEoMSk9PSckJ3x8KGlucHV0LkxBKDEpPj0nMCcgJiYgaW5wdXQuTEEoMSk8PSc5Jyl8fChpbnB1dC5MQSgxKT49J0EnICYmIGlucHV0LkxBKDEpPD0nWicpfHxpbnB1dC5MQSgxKT09J18nfHwoaW5wdXQuTEEoMSk+PSdhJyAmJiBpbnB1dC5MQSgxKTw9J3onKSApIHsKKyAgICAgICAgICAgIAkgICAgICAgIGlucHV0LmNvbnN1bWUoKTsKKworICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGVsc2UgeworICAgICAgICAgICAgCSAgICAgICAgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbiBtc2UgPSBuZXcgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbihudWxsLGlucHV0KTsKKyAgICAgICAgICAgIAkgICAgICAgIHJlY292ZXIobXNlKTsKKyAgICAgICAgICAgIAkgICAgICAgIHRocm93IG1zZTt9CisKKworICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGJyZWFrOworCisgICAgICAgICAgICAJZGVmYXVsdCA6CisgICAgICAgICAgICAJICAgIGJyZWFrIGxvb3AxMDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9IHdoaWxlICh0cnVlKTsKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJSVUxFX0lEIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJSVUxFX1NUUklORyIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtUlVMRV9TVFJJTkcoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXB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icgKT8gfCAnXFwnJyAoICdcXFxcJyAuIHwgfiAoICggJ1xcXFwnIHwgJ1xcJycgKSApICkqICggJ1xcJycgKT8gKQorICAgICAgICAgICAgaW50IGFsdDE1PTI7CisgICAgICAgICAgICBpbnQgTEExNV8wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgIGlmICggKExBMTVfMD09J1wiJykgKSB7CisgICAgICAgICAgICAgICAgYWx0MTU9MTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgaWYgKCAoTEExNV8wPT0nXCcnKSApIHsKKyAgICAgICAgICAgICAgICBhbHQxNT0yOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgTm9WaWFibGVBbHRFeGNlcHRpb24gbnZhZSA9CisgICAgICAgICAgICAgICAgICAgIG5ldyBOb1ZpYWJsZUFsdEV4Y2VwdGlvbigiIiwgMTUsIDAsIGlucHV0KTsKKworICAgICAgICAgICAgICAgIHRocm93IG52YWU7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBzd2l0Y2ggKGFsdDE1KSB7CisgICAgICAgICAgICAgICAgY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjU5NTM6MTY6ICdcIicgKCAnXFxcXCcgLiB8IH4gKCAoICdcXFxcJyB8ICdcIicgKSApICkqICggJ1wiJyApPworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIG1hdGNoKCdcIicpOyAKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjU5NTM6MjA6ICggJ1xcXFwnIC4gfCB+ICggKCAnXFxcXCcgfCAnXCInICkgKSApKgorICAgICAgICAgICAgICAgICAgICBsb29wMTE6CisgICAgICAgICAgICAgICAgICAgIGRvIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGludCBhbHQxMT0zOworICAgICAgICAgICAgICAgICAgICAgICAgaW50IExBMTFfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIChMQTExXzA9PSdcXCcpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsdDExPTE7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICggKChMQTExXzA+PSdcdTAwMDAnICYmIExBMTFfMDw9JyEnKXx8KExBMTFfMD49JyMnICYmIExBMTFfMDw9J1snKXx8KExBMTFfMD49J10nICYmIExBMTFfMDw9J1x1RkZGRicpKSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbHQxMT0yOworICAgICAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoYWx0MTEpIHsKKyAgICAgICAgICAgICAgICAgICAgCWNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjU5NTM6MjE6ICdcXFxcJyAuCisgICAgICAgICAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgICAgICAgICAJICAgIG1hdGNoKCdcXCcpOyAKKyAgICAgICAgICAgICAgICAgICAgCSAgICBtYXRjaEFueSgpOyAKKworICAgICAgICAgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgICAgICAgICAgCSAgICBicmVhazsKKyAgICAgICAgICAgICAgICAgICAgCWNhc2UgMiA6CisgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjU5NTM6Mjg6IH4gKCAoICdcXFxcJyB8ICdcIicgKSApCisgICAgICAgICAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgICAgICAgICAJICAgIGlmICggKGlucHV0LkxBKDEpPj0nXHUwMDAwJyAmJiBpbnB1dC5MQSgxKTw9JyEnKXx8KGlucHV0LkxBKDEpPj0nIycgJiYgaW5wdXQuTEEoMSk8PSdbJyl8fChpbnB1dC5MQSgxKT49J10nICYmIGlucHV0LkxBKDEpPD0nXHVGRkZGJykgKSB7CisgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGlucHV0LmNvbnN1bWUoKTsKKworICAgICAgICAgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgICAgICAgICAgCSAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbiBtc2UgPSBuZXcgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbihudWxsLGlucHV0KTsKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgcmVjb3Zlcihtc2UpOworICAgICAgICAgICAgICAgICAgICAJICAgICAgICB0aHJvdyBtc2U7fQorCisKKyAgICAgICAgICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAgICAgICAgIAkgICAgYnJlYWs7CisKKyAgICAgICAgICAgICAgICAgICAgCWRlZmF1bHQgOgorICAgICAgICAgICAgICAgICAgICAJICAgIGJyZWFrIGxvb3AxMTsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAodHJ1ZSk7CisKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjU5NTM6NDQ6ICggJ1wiJyApPworICAgICAgICAgICAgICAgICAgICBpbnQgYWx0MTI9MjsKKyAgICAgICAgICAgICAgICAgICAgaW50IExBMTJfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgICAgIGlmICggKExBMTJfMD09J1wiJykgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBhbHQxMj0xOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoYWx0MTIpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjU5NTM6NDQ6ICdcIicKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2goJ1wiJyk7IAorCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSAyIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjU5NTM6NDk6ICdcXCcnICggJ1xcXFwnIC4gfCB+ICggKCAnXFxcXCcgfCAnXFwnJyApICkgKSogKCAnXFwnJyApPworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIG1hdGNoKCdcJycpOyAKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjU5NTM6NTQ6ICggJ1xcXFwnIC4gfCB+ICggKCAnXFxcXCcgfCAnXFwnJyApICkgKSoKKyAgICAgICAgICAgICAgICAgICAgbG9vcDEzOgorICAgICAgICAgICAgICAgICAgICBkbyB7CisgICAgICAgICAgICAgICAgICAgICAgICBpbnQgYWx0MTM9MzsKKyAgICAgICAgICAgICAgICAgICAgICAgIGludCBMQTEzXzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCAoTEExM18wPT0nXFwnKSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbHQxMz0xOworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoICgoTEExM18wPj0nXHUwMDAwJyAmJiBMQTEzXzA8PScmJyl8fChMQTEzXzA+PScoJyAmJiBMQTEzXzA8PSdbJyl8fChMQTEzXzA+PSddJyAmJiBMQTEzXzA8PSdcdUZGRkYnKSkgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWx0MTM9MjsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGFsdDEzKSB7CisgICAgICAgICAgICAgICAgICAgIAljYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1OTUzOjU1OiAnXFxcXCcgLgorICAgICAgICAgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgICAgICAgICAgCSAgICBtYXRjaCgnXFwnKTsgCisgICAgICAgICAgICAgICAgICAgIAkgICAgbWF0Y2hBbnkoKTsgCisKKyAgICAgICAgICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAgICAgICAgIAkgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgICAgIAljYXNlIDIgOgorICAgICAgICAgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1OTUzOjYyOiB+ICggKCAnXFxcXCcgfCAnXFwnJyApICkKKyAgICAgICAgICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAgICAgICAgIAkgICAgaWYgKCAoaW5wdXQuTEEoMSk+PSdcdTAwMDAnICYmIGlucHV0LkxBKDEpPD0nJicpfHwoaW5wdXQuTEEoMSk+PScoJyAmJiBpbnB1dC5MQSgxKTw9J1snKXx8KGlucHV0LkxBKDEpPj0nXScgJiYgaW5wdXQuTEEoMSk8PSdcdUZGRkYnKSApIHsKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgaW5wdXQuY29uc3VtZSgpOworCisgICAgICAgICAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgICAgICAgICAJICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICAJICAgICAgICBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uIG1zZSA9IG5ldyBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uKG51bGwsaW5wdXQpOworICAgICAgICAgICAgICAgICAgICAJICAgICAgICByZWNvdmVyKG1zZSk7CisgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIHRocm93IG1zZTt9CisKKworICAgICAgICAgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgICAgICAgICAgCSAgICBicmVhazsKKworICAgICAgICAgICAgICAgICAgICAJZGVmYXVsdCA6CisgICAgICAgICAgICAgICAgICAgIAkgICAgYnJlYWsgbG9vcDEzOworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICh0cnVlKTsKKworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTk1Mzo3OTogKCAnXFwnJyApPworICAgICAgICAgICAgICAgICAgICBpbnQgYWx0MTQ9MjsKKyAgICAgICAgICAgICAgICAgICAgaW50IExBMTRfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgICAgIGlmICggKExBMTRfMD09J1wnJykgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBhbHQxND0xOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoYWx0MTQpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjU5NTM6Nzk6ICdcXCcnCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoKCdcJycpOyAKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiUlVMRV9TVFJJTkciCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlJVTEVfTUxfQ09NTUVOVCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtUlVMRV9NTF9DT01NRU5UKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9I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ApIHsKKyAgICAgICAgICAgICAgICAgICAgaW50IExBMTZfMSA9IGlucHV0LkxBKDIpOworCisgICAgICAgICAgICAgICAgICAgIGlmICggKExBMTZfMT09Jy8nKSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGFsdDE2PTI7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoICgoTEExNl8xPj0nXHUwMDAwJyAmJiBMQTE2XzE8PScuJyl8fChMQTE2XzE+PScwJyAmJiBMQTE2XzE8PSdcdUZGRkYnKSkgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBhbHQxNj0xOworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlIGlmICggKChMQTE2XzA+PSdcdTAwMDAnICYmIExBMTZfMDw9JyknKXx8KExBMTZfMD49JysnICYmIExBMTZfMDw9J1x1RkZGRicpKSApIHsKKyAgICAgICAgICAgICAgICAgICAgYWx0MTY9MTsKKyAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgIHN3aXRjaCAoYWx0MTYpIHsKKyAgICAgICAgICAgIAljYXNlIDEgOgorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTk1NTo1MjogLgorICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIG1hdGNoQW55KCk7IAorCisgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgIAkgICAgYnJlYWs7CisKKyAgICAgICAgICAgIAlkZWZhdWx0IDoKKyAgICAgICAgICAgIAkgICAgYnJlYWsgbG9vcDE2OworICAgICAgICAgICAgICAgIH0KKyAgICA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icgKSApICkqICggKCAnXFxyJyApPyAnXFxuJyApPworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIi8vIik7IAorCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTk1NzoyNDogKH4gKCAoICdcXG4nIHwgJ1xccicgKSApICkqCisgICAgICAgICAgICBsb29wMTc6CisgICAgICAgICAgICBkbyB7CisgICAgICAgICAgICAgICAgaW50IGFsdDE3PTI7CisgICAgICAgICAgICAgICAgaW50IExBMTdfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgaWYgKCAoKExBMTdfMD49J1x1MDAwMCcgJiYgTEExN18wPD0nXHQnKXx8KExBMTdfMD49J1x1MDAwQicgJiYgTEExN18wPD0nXGYnKXx8KExBMTdfMD49J1x1MDAwRScgJiYgTEExN18wPD0nXHVGRkZGJykpICkgeworICAgICAgICAgICAgICAgICAgICBhbHQxNz0xOworICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQxNykgeworICAgICAgICAgICAgCWNhc2UgMSA6CisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1OTU3OjI0OiB+ICggKCAnXFxuJyB8ICdcXHInICkgKQorICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIGlmICggKGlucHV0LkxBKDEpPj0nXHUwMDAwJyAmJiBpbnB1dC5MQSgxKTw9J1x0Jyl8fChpbnB1dC5MQSgxKT49J1x1MDAwQicgJiYgaW5wdXQuTEEoMSk8PSdcZicpfHwoaW5wdXQuTEEoMSk+PSdcdTAwMEUnICYmIGlucHV0LkxBKDEpPD0nXHVGRkZGJykgKSB7CisgICAgICAgICAgICAJICAgICAgICBpbnB1dC5jb25zdW1lKCk7CisKKyAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgCSAgICBlbHNlIHsKKyAgICAgICAgICAgIAkgICAgICAgIE1pc21hdGNoZWRTZXRFeGNlcHRpb24gbXNlID0gbmV3IE1pc21hdGNoZWRTZXRFeGNlcHRpb24obnVsbCxpbnB1dCk7CisgICAgICAgICAgICAJICAgICAgICByZWNvdmVyKG1zZSk7CisgICAgICAgICAgICAJICAgICAgICB0aHJvdyBtc2U7fQorCisKKyAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgCSAgICBicmVhazsKKworICAgICAgICAgICAgCWRlZmF1bHQgOgorICAgICAgICAgICAgCSAgICBicmVhayBsb29wMTc7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfSB3aGlsZSAodHJ1ZSk7CisKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1OTU3OjQwOiAoICggJ1xccicgKT8gJ1xcbicgKT8KKyAgICAgICAgICAgIGludCBhbHQxOT0yOworICAgICAgICAgICAgaW50IExBMTlfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICBpZiAoIChMQTE5XzA9PSdcbid8fExBMTlfMD09J1xyJykgKSB7CisgICAgICAgICAgICAgICAgYWx0MTk9MTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHN3aXRjaCAoYWx0MTkpIHsKKyAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTk1Nzo0MTogKCAnXFxyJyApPyAnXFxuJworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1OTU3OjQxOiAoICdcXHInICk/CisgICAgICAgICAgICAgICAgICAgIGludCBhbHQxOD0yOworICAgICAgICAgICAgICAgICAgICBpbnQgTEExOF8wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCAoTEExOF8wPT0nXHInKSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGFsdDE4PTE7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQxOCkgeworICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTk1Nzo0MTogJ1xccicKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2goJ1xyJyk7IAorCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICBtYXRjaCgnXG4nKTsgCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlJVTEVfU0xfQ09NTUVOVCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiUlVMRV9XUyIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtUlVMRV9XUygpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBSVUxFX1dTOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjU5NTk6OTogKCAoICcgJyB8ICdcXHQnIHwgJ1xccicgfCAnXFxuJyApKyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTk1OToxMTogKCAnICcgfCAnXFx0JyB8ICdcXHInIHwgJ1xcbicgKSsKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1OTU5OjExOiAoICcgJyB8ICdcXHQnIHwgJ1xccicgfCAnXFxuJyApKworICAgICAgICAgICAgaW50IGNudDIwPTA7CisgICAgICAgICAgICBsb29wMjA6CisgICAgICAgICAgICBkbyB7CisgICAgICAgICAgICAgICAgaW50IGFsdDIwPTI7CisgICAgICAgICAgICAgICAgaW50IExBMjBfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgaWYgKCAoKExBMjBfMD49J1x0JyAmJiBMQTIwXzA8PSdcbicpfHxMQTIwXzA9PSdccid8fExBMjBfMD09JyAnKSApIHsKKyAgICAgICAgICAgICAgICAgICAgYWx0MjA9MTsKKyAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgIHN3aXRjaCAoYWx0MjApIHsKKyAgICAgICAgICAgIAljYXNlIDEgOgorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoKKyAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgCSAgICBpZiAoIChpbnB1dC5MQSgxKT49J1x0JyAmJiBpbnB1dC5MQSgxKTw9J1xuJyl8fGlucHV0LkxBKDEpPT0nXHInfHxpbnB1dC5MQSgxKT09JyAnICkgeworICAgICAgICAgICAgCSAgICAgICAgaW5wdXQuY29uc3VtZSgpOworCisgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgIAkgICAgZWxzZSB7CisgICAgICAgICAgICAJICAgICAgICBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uIG1zZSA9IG5ldyBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uKG51bGwsaW5wdXQpOworICAgICAgICAgICAgCSAgICAgICAgcmVjb3Zlcihtc2UpOworICAgICAgICAgICAgCSAgICAgICAgdGhyb3cgbXNlO30KKworCisgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgIAkgICAgYnJlYWs7CisKKyAgICAgICAgICAgIAlkZWZhdWx0IDoKKyAgICAgICAgICAgIAkgICAgaWYgKCBjbnQyMCA+PSAxICkgYnJlYWsgbG9vcDIwOworICAgICAgICAgICAgICAgICAgICAgICAgRWFybHlFeGl0RXhjZXB0aW9uIGVlZSA9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3IEVhcmx5RXhpdEV4Y2VwdGlvbigyMCwgaW5wdXQpOworICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgZWVlOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBjbnQyMCsrOworICAgICAgICAgICAgfSB3aGlsZSAodHJ1ZSk7CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiUlVMRV9XUyIKKworICAgIC8vICRBTlRMUiBzdGFydCAiUlVMRV9BTllfT1RIRVIiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVJVTEVfQU5ZX09USEVSKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFJVTEVfQU5ZX09USEVSOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjU5NjE6MTY6ICggLiApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTk2MToxODogLgorICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2hBbnkoKTsgCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlJVTEVfQU5ZX09USEVSIgorCisgICAgcHVibGljIHZvaWQgbVRva2VucygpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6ODogKCBUX18xM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X18xMTQgfCBUX18xMTUgfCBUX18xMTYgfCBUX18xMTcgfCBUX18xMTggfCBUX18xMTkgfCBUX18xMjAgfCBUX18xMjEgfCBUX18xMjIgfCBUX18xMjMgfCBUX18xMjQgfCBUX18xMjUgfCBUX18xMjYgfCBUX18xMjcgfCBUX18xMjggfCBUX18xMjkgfCBUX18xMzAgfCBSVUxFX0hFWCB8IFJVTEVfSU5UIHwgUlVMRV9ERUNJTUFMIHwgUlVMRV9JRCB8IFJVTEVfU1RSSU5HIHwgUlVMRV9NTF9DT01NRU5UIHwgUlVMRV9TTF9DT01NRU5UIHwgUlVMRV9XUyB8IFJVTEVfQU5ZX09USEVSICkKKyAgICAgICAgaW50IGFsdDIxPTEyNzsKKyAgICAgICAgYWx0MjEgPSBkZmEyMS5wcmVkaWN0KGlucHV0KTsKKyAgICAgICAgc3dpdGNoIChhbHQyMSkgeworICAgICAgICAgICAgY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjEwOiBUX18xMworICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTMoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDIgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6MTY6IFRfXzE0CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18xNCgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MToyMjogVF9fMTUKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzE1KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA0IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjI4OiBUX18xNgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTYoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDUgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6MzQ6IFRfXzE3CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18xNygpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo0MDogVF9fMTgKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzE4KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA3IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQ2OiBUX18xOQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTkoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDggOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NTI6IFRfXzIwCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18yMCgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgOSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo1ODogVF9fMjEKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzIxKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2NDogVF9fMjIKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzIyKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo3MDogVF9fMjMKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzIzKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo3NjogVF9fMjQKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzI0KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo4MjogVF9fMjUKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzI1KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxNCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo4ODogVF9fMjYKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzI2KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxNSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo5NDogVF9fMjcKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzI3KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxNiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MToxMDA6IFRfXzI4CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18yOCgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMTcgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6MTA2OiBUX18yOQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMjkoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDE4IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjExMjogVF9fMzAKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzMwKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxOSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MToxMTg6IFRfXzMxCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18zMSgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMjAgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6MTI0OiBUX18zMgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMzIoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDIxIDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjEzMDogVF9fMzMKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzMzKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyMiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MToxMzY6IFRfXzM0CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18zNCgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMjMgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6MTQyOiBUX18zNQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMzUoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDI0IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjE0ODogVF9fMzYKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzM2KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyNSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MToxNTQ6IFRfXzM3CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18zNygpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMjYgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6MTYwOiBUX18zOAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMzgoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDI3IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjE2NjogVF9fMzkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzM5KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyOCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MToxNzI6IFRfXzQwCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX180MCgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMjkgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6MTc4OiBUX180MQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fNDEoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDMwIDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjE4NDogVF9fNDIKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzQyKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAzMSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MToxOTA6IFRfXzQzCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX180MygpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMzIgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6MTk2OiBUX180NAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fNDQoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDMzIDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjIwMjogVF9fNDUKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzQ1KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAzNCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MToyMDg6IFRfXzQ2CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX180NigpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMzUgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6MjE0OiBUX180NworICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fNDcoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDM2IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjIyMDogVF9fNDgKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzQ4KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAzNyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MToyMjY6IFRfXzQ5CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX180OSgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMzggOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6MjMyOiBUX181MAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fNTAoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDM5IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjIzODogVF9fNTEKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzUxKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA0MCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MToyNDQ6IFRfXzUyCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX181MigpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNDEgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6MjUwOiBUX181MworICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fNTMoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDQyIDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjI1NjogVF9fNTQKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzU0KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA0MyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MToyNjI6IFRfXzU1CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX181NSgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNDQgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6MjY4OiBUX181NgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fNTYoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDQ1IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjI3NDogVF9fNTcKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzU3KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA0NiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MToyODA6IFRfXzU4CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX181OCgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNDcgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6Mjg2OiBUX181OQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fNTkoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDQ4IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjI5MjogVF9fNjAKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzYwKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA0OSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MToyOTg6IFRfXzYxCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX182MSgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNTAgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6MzA0OiBUX182MgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fNjIoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDUxIDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjMxMDogVF9fNjMKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzYzKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA1MiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTozMTY6IFRfXzY0CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX182NCgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNTMgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6MzIyOiBUX182NQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fNjUoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDU0IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjMyODogVF9fNjYKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzY2KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA1NSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTozMzQ6IFRfXzY3CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX182NygpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNTYgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6MzQwOiBUX182OAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fNjgoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDU3IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjM0NjogVF9fNjkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzY5KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA1OCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTozNTI6IFRfXzcwCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX183MCgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNTkgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6MzU4OiBUX183MQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fNzEoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDYwIDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjM2NDogVF9fNzIKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzcyKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA2MSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTozNzA6IFRfXzczCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX183MygpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNjIgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6Mzc2OiBUX183NAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fNzQoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDYzIDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjM4MjogVF9fNzUKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzc1KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA2NCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTozODg6IFRfXzc2CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX183NigpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNjUgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6Mzk0OiBUX183NworICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fNzcoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDY2IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQwMDogVF9fNzgKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzc4KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA2NyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo0MDY6IFRfXzc5CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX183OSgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNjggOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NDEyOiBUX184MAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fODAoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDY5IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQxODogVF9fODEKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzgxKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA3MCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo0MjQ6IFRfXzgyCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX184MigpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNzEgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NDMwOiBUX184MworICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fODMoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDcyIDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQzNjogVF9fODQKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzg0KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA3MyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo0NDI6IFRfXzg1CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX184NSgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNzQgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NDQ4OiBUX184NgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fODYoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDc1IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQ1NDogVF9fODcKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzg3KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA3NiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo0NjA6IFRfXzg4CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX184OCgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNzcgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NDY2OiBUX184OQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fODkoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDc4IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQ3MjogVF9fOTAKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzkwKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA3OSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo0Nzg6IFRfXzkxCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX185MSgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgODAgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NDg0OiBUX185MgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fOTIoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDgxIDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQ5MDogVF9fOTMKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzkzKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA4MiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo0OTY6IFRfXzk0CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX185NCgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgODMgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NTAyOiBUX185NQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fOTUoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDg0IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjUwODogVF9fOTYKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzk2KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA4NSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo1MTQ6IFRfXzk3CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX185NygpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgODYgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NTIwOiBUX185OAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fOTgoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDg3IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjUyNjogVF9fOTkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzk5KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA4OCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo1MzI6IFRfXzEwMAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTAwKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA4OSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo1Mzk6IFRfXzEwMQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTAxKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA5MCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo1NDY6IFRfXzEwMgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTAyKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA5MSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo1NTM6IFRfXzEwMworICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTAzKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA5MiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo1NjA6IFRfXzEwNAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTA0KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA5MyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo1Njc6IFRfXzEwNQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTA1KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA5NCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo1NzQ6IFRfXzEwNgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTA2KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA5NSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo1ODE6IFRfXzEwNworICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTA3KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA5NiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo1ODg6IFRfXzEwOAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTA4KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA5NyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo1OTU6IFRfXzEwOQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTA5KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA5OCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2MDI6IFRfXzExMAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTEwKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA5OSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2MDk6IFRfXzExMQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTExKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMDAgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NjE2OiBUX18xMTIKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzExMigpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMTAxIDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjYyMzogVF9fMTEzCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18xMTMoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDEwMiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2MzA6IFRfXzExNAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTE0KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMDMgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NjM3OiBUX18xMTUKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzExNSgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMTA0IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjY0NDogVF9fMTE2CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18xMTYoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDEwNSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2NTE6IFRfXzExNworICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTE3KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMDYgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NjU4OiBUX18xMTgKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzExOCgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMTA3IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjY2NTogVF9fMTE5CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18xMTkoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDEwOCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2NzI6IFRfXzEyMAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTIwKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMDkgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6Njc5OiBUX18xMjEKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzEyMSgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMTEwIDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjY4NjogVF9fMTIyCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18xMjIoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDExMSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2OTM6IFRfXzEyMworICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTIzKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMTIgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NzAwOiBUX18xMjQKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzEyNCgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMTEzIDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjcwNzogVF9fMTI1CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18xMjUoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDExNCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo3MTQ6IFRfXzEyNgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTI2KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMTUgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NzIxOiBUX18xMjcKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzEyNygpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMTE2IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjcyODogVF9fMTI4CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18xMjgoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDExNyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo3MzU6IFRfXzEyOQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTI5KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMTggOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NzQyOiBUX18xMzAKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzEzMCgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMTE5IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjc0OTogUlVMRV9IRVgKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVJVTEVfSEVYKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMjAgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NzU4OiBSVUxFX0lOVAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtUlVMRV9JTlQoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDEyMSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo3Njc6IFJVTEVfREVDSU1BTAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtUlVMRV9ERUNJTUFMKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMjIgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NzgwOiBSVUxFX0lECisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1SVUxFX0lEKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMjMgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6Nzg4OiBSVUxFX1NUUklORworICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtUlVMRV9TVFJJTkcoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDEyNCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo4MDA6IFJVTEVfTUxfQ09NTUVOVAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtUlVMRV9NTF9DT01NRU5UKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMjUgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6ODE2OiBSVUxFX1NMX0NPTU1FTlQKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVJVTEVfU0xfQ09NTUVOVCgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMTI2IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS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ZmZmXDFcMTQ1IiwKKyAgICAgICAgICAgICJcMVwxNTBcNlx1ZmZmZlwxXDE0NlwxXDE0NyIsCisgICAgICAgICAgICAiXDFcMTUxXDdcdWZmZmZcMVwxNTNcNVx1ZmZmZlwxXDE1MiIsCisgICAgICAgICAgICAiXDFcMTU2XDE1XHVmZmZmXDFcMTU0XDVcdWZmZmZcMVwxNTUiLAorICAgICAgICAgICAgIlwxXDE2MFwzXHVmZmZmXDFcMTYxXDNcdWZmZmZcMVwxNTciLAorICAgICAgICAgICAgIlwxXDE2NFw2XHVmZmZmXDFcMTYzXDJcdWZmZmZcMVwxNjIiLAorICAgICAgICAgICAgIlwxXDE2NlwzXHVmZmZmXDFcMTY1XDVcdWZmZmZcMVwxNjciLAorICAgICAgICAgICAgIlwxXDE3MCIsCisgICAgICAgICAgICAiXDFcMTcxIiwKKyAgICAgICAgICAgICJcMVwxNzIiLAorICAgICAgICAgICAgIlwxXDE3MyIsCisgICAgICAgICAgICAiXDFcMTc0IiwKKyAgICAgICAgICAgICJcMVwxNzUiLAorICAgICAgICAgICAgIlwxXDE3NlwyMFx1ZmZmZlwxXDE3NyIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMDgyIiwKKyAgICAgICAgICAgICJcMVx1MDA4NFw3XHVmZmZmXDFcdTAwODMiLAorICAgICAgICAgICAgIlwxXHUwMDg1IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMDhkIiwKKyAgICAgICAgICAgICJcMVx1MDA4ZiIsCisgICAgICAgICAgICAiXDFcdTAwOTBcMTFcdWZmZmZcMVx1MDA5Mlw1XHVmZmZmXDFcdTAwOTEiLAorICAgICAgICAgICAgIlwxXHUwMDk0XDExXHVmZmZmXDFcdTAwOTVcNlx1ZmZmZlwxXHUwMDkzIiwKKyAgICAgICAgICAgICJcMVx1MDA5NiIsCisgICAgICAgICAgICAiXDFcdTAwOTciLAorICAgICAgICAgICAgIlwxXHUwMDk4IiwKKyAgICAgICAgICAgICJcMTJcdTAwOWFcMTBcdWZmZmZcMVx1MDA5Y1wxXHVmZmZmXDNcdTAwOWNcNVx1ZmZmZlwxXHUwMDljXDEzXHVmZmZmXDFcdTAwOTlcNlx1ZmZmZlwxXHUwMDlhXDJcdWZmZmZcMVx1MDA5Y1wxXHVmZmZmXDNcdTAwOWNcNVx1ZmZmZlwxXHUwMDljXDEzXHVmZmZmXDFcdTAwOTkiLAorICAgICAgICAgICAgIlwxMlx1MDA5YVwxMFx1ZmZmZlwxXHUwMDljXDFcdWZmZmZcM1x1MDA5Y1w1XHVmZmZmXDFcdTAwOWNcMjJcdWZmZmZcMVx1MDA5YVwyXHVmZmZmXDFcdTAwOWNcMVx1ZmZmZlwzXHUwMDljXDVcdWZmZmZcMVx1MDA5YyIsCisgICAgICAgICAgICAiXDFcMTM2XDM0XHVmZmZmXDMyXDEzNlw0XHVmZmZmXDFcMTM2XDFcdWZmZmZcMzJcMTM2IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAwOWYiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDBhMSIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMGEzIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMGE1XDVcdWZmZmZcMVx1MDBhNiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDBhNyIsCisgICAgICAgICAgICAiXDFcdTAwYTgiLAorICAgICAgICAgICAgIlwxXHUwMGE5IiwKKyAgICAgICAgICAgICJcMVx1MDBhYSIsCisgICAgICAgICAgICAiXDFcdTAwYWNcMlx1ZmZmZlwxXHUwMGFiIiwKKyAgICAgICAgICAgICJcMVx1MDBhZCIsCisgICAgICAgICAgICAiXDFcdTAwYWUiLAorICAgICAgICAgICAgIlwxXHUwMGFmIiwKKyAgICAgICAgICAgICJcMVx1MDBiMCIsCisgICAgICAgICAgICAiXDFcMTM2XDEzXHVmZmZmXDEyXDEzNlw3XHVmZmZmXDMyXDEzNlw0XHVmZmZmXDFcMTM2XDFcdWZmZmZcMzJcMTM2IiwKKyAgICAgICAgICAgICJcMVx1MDBiMiIsCisgICAgICAgICAgICAiXDFcdTAwYjMiLAorICAgICAgICAgICAgIlwxXHUwMGI0IiwKKyAgICAgICAgICAgICJcMVx1MDBiNlwxMFx1ZmZmZlwxXHUwMGI1IiwKKyAgICAgICAgICAgICJcMVx1MDBiNyIsCisgICAgICAgICAgICAiXDFcdTAwYjhcMVx1MDBiOSIsCisgICAgICAgICAgICAiXDFcdTAwYmEiLAorICAgICAgICAgICAgIlwxXHUwMGJiIiwKKyAgICAgICAgICAgICJcMVx1MDBiYyIsCisgICAgICAgICAgICAiXDFcdTAwYmQiLAorICAgICAgICAgICAgIlwxXDEzNlwxM1x1ZmZmZlwxMlwxMzZcN1x1ZmZmZlwzMlwxMzZcNFx1ZmZmZlwxXDEzNlwxXHVmZmZmXDMyXDEzNiIsCisgICAgICAgICAgICAiXDFcdTAwYmYiLAorICAgICAgICAgICAgIlwxXHUwMGMxXDVcdWZmZmZcMVx1MDBjMCIsCisgICAgICAgICAgICAiXDFcdTAwYzIiLAorICAgICAgICAgICAgIlwxXDEzNlwxM1x1ZmZmZlwxMlwxMzZcN1x1ZmZmZlwzMlwxMzZcNFx1ZmZmZlwxXDEzNlwxXHVmZmZmXDMyXDEzNiIsCisgICAgICAgICAgICAiXDFcdTAwYzQiLAorICAgICAgICAgICAgIlwxXHUwMGM1IiwKKyAgICAgICAgICAgICJcMVx1MDBjNiIsCisgICAgICAgICAgICAiXDFcdTAwYzciLAorICAgICAgICAgICAgIlwxXHUwMGM4IiwKKyAgICAgICAgICAgICJcMVx1MDBjOSIsCisgICAgICAgICAgICAiXDFcdTAwY2EiLAorICAgICAgICAgICAgIlwxXHUwMGNiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAwY2MiLAorICAgICAgICAgICAgIlwxXHUwMGNkIiwKKyAgICAgICAgICAgICJcMVx1MDBjZSIsCisgICAgICAgICAgICAiXDFcdTAwY2YiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMGQwIiwKKyAgICAgICAgICAgICJcMVx1MDBkMSIsCisgICAgICAgICAgICAiXDFcdTAwZDIiLAorICAgICAgICAgICAgIlwxXHUwMGQzIiwKKyAgICAgICAgICAgICJcMVx1MDBkNCIsCisgICAgICAgICAgICAiXDFcdTAwZDUiLAorICAgICAgICAgICAgIlwxXHUwMGQ3XDNcdWZmZmZcMVx1MDBkNiIsCisgICAgICAgICAgICAiXDFcdTAwZDgiLAorICAgICAgICAgICAgIlwxXHUwMGQ5IiwKKyAgICAgICAgICAgICJcMVx1MDBkYSIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMTJcdTAwOWFcMTBcdWZmZmZcMVx1MDA5Y1wxXHVmZmZmXDNcdTAwOWNcNVx1ZmZmZlwxXHUwMDljXDIyXHVmZmZmXDFcdTAwOWFcMlx1ZmZmZlwxXHUwMDljXDFcdWZmZmZcM1x1MDA5Y1w1XHVmZmZmXDFcdTAwOWMiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcMTM2XDEzXHVmZmZmXDEyXDEzNlw3XHVmZmZmXDMyXDEzNlw0XHVmZmZmXDFcMTM2XDFcdWZmZmZcMzJcMTM2IiwKKyAgICAgICAgICAgICJcMVwxMzZcMTNcdWZmZmZcMTJcMTM2XDdcdWZmZmZcMzJcMTM2XDRcdWZmZmZcMVwxMzZcMVx1ZmZmZlwzMlwxMzYiLAorICAgICAgICAgICAgIlwxXHUwMGRkIiwKKyAgICAgICAgICAgICJcMVx1MDBkZSIsCisgICAgICAgICAgICAiXDFcdTAwZGYiLAorICAgICAgICAgICAgIlwxXHUwMGUwIiwKKyAgICAgICAgICAgICJcMVx1MDBlMSIsCisgICAgICAgICAgICAiXDFcMTM2XDEzXHVmZmZmXDEyXDEzNlw3XHVmZmZmXDMyXDEzNlw0XHVmZmZmXDFcMTM2XDFcdWZmZmZcMzJcMTM2IiwKKyAgICAgICAgICAgICJcMVx1MDBlMyIsCisgICAgICAgICAgICAiXDFcdTAwZTQiLAorICAgICAgICAgICAgIlwxXHUwMGU1IiwKKyAgICAgICAgICAgICJcMVx1MDBlNiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDBlNyIsCisgICAgICAgICAgICAiXDFcMTM2XDEzXHVmZmZmXDEyXDEzNlw3XHVmZmZmXDMyXDEzNlw0XHVmZmZmXDFcMTM2XDFcdWZmZmZcMzJcMTM2IiwKKyAgICAgICAgICAgICJcMVx1MDBlOSIsCisgICAgICAgICAgICAiXDFcdTAwZWEiLAorICAgICAgICAgICAgIlwxXHUwMGViIiwKKyAgICAgICAgICAgICJcMVx1MDBlYyIsCisgICAgICAgICAgICAiXDFcdTAwZWQiLAorICAgICAgICAgICAgIlwxXHUwMGVlIiwKKyAgICAgICAgICAgICJcMVwxMzZcMTNcdWZmZmZcMTJcMTM2XDdcdWZmZmZcMzJcMTM2XDRcdWZmZmZcMVwxMzZcMVx1ZmZmZlwzMlwxMzYiLAorICAgICAgICAgICAgIlwxXDEzNlwxM1x1ZmZmZlwxMlwxMzZcN1x1ZmZmZlwzMlwxMzZcNFx1ZmZmZlwxXDEzNlwxXHVmZmZmXDMyXDEzNiIsCisgICAgICAgICAgICAiXDFcdTAwZjEiLAorICAgICAgICAgICAgIlwxXDEzNlwxM1x1ZmZmZlwxMlwxMzZcN1x1ZmZmZlwzMlwxMzZcNFx1ZmZmZlwxXDEzNlwxXHVmZmZmXDMyXDEzNiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDBmMyIsCisgICAgICAgICAgICAiXDFcdTAwZjQiLAorICAgICAgICAgICAgIlwxXHUwMGY1IiwKKyAgICAgICAgICAgICJcMVx1MDBmNiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDBmNyIsCisgICAgICAgICAgICAiXDFcdTAwZjgiLAorICAgICAgICAgICAgIlwxXHUwMGY5IiwKKyAgICAgICAgICAgICJcMVx1MDBmYSIsCisgICAgICAgICAgICAiXDFcdTAwZmIiLAorICAgICAgICAgICAgIlwxXHUwMGZjIiwKKyAgICAgICAgICAgICJcMVx1MDBmZCIsCisgICAgICAgICAgICAiXDFcdTAwZmUiLAorICAgICAgICAgICAgIlwxXHUwMGZmIiwKKyAgICAgICAgICAgICJcMVx1MDEwMCIsCisgICAgICAgICAgICAiXDFcdTAxMDEiLAorICAgICAgICAgICAgIlwxXHUwMTAyIiwKKyAgICAgICAgICAgICJcMVx1MDEwMyIsCisgICAgICAgICAgICAiXDFcMTM2XDEzXHVmZmZmXDEyXDEzNlw3XHVmZmZmXDMyXDEzNlw0XHVmZmZmXDFcMTM2XDFcdWZmZmZcMzJcMTM2IiwKKyAgICAgICAgICAgICJcMVx1MDEwNSIsCisgICAgICAgICAgICAiXDFcdTAxMDYiLAorICAgICAgICAgICAgIlwxXHUwMTA3IiwKKyAgICAgICAgICAgICJcMVx1MDEwOCIsCisgICAgICAgICAgICAiXDFcMTM2XDEzXHVmZmZmXDEyXDEzNlw3XHVmZmZmXDMyXDEzNlw0XHVmZmZmXDFcMTM2XDFcdWZmZmZcMzJcMTM2IiwKKyAgICAgICAgICAgICJcMVx1MDEwYSIsCisgICAgICAgICAgICAiXDFcdTAxMGIiLAorICAgICAgICAgICAgIlwxXHUwMTBjIiwKKyAgICAgICAgICAgICJcMVx1MDEwZCIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTBlIiwKKyAgICAgICAgICAgICJcMVx1MDEwZiIsCisgICAgICAgICAgICAiXDFcMTM2XDEzXHVmZmZmXDEyXDEzNlw3XHVmZmZmXDMyXDEzNlw0XHVmZmZmXDFcMTM2XDFcdWZmZmZcMzJcMTM2IiwKKyAgICAgICAgICAgICJcMVx1MDExMSIsCisgICAgICAgICAgICAiXDFcdTAxMTIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAxMTMiLAorICAgICAgICAgICAgIlwxXHUwMTE0IiwKKyAgICAgICAgICAgICJcMVx1MDExNSIsCisgICAgICAgICAgICAiXDFcdTAxMTYiLAorICAgICAgICAgICAgIlwxXHUwMTE3IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTE4IiwKKyAgICAgICAgICAgICJcMVx1MDExOSIsCisgICAgICAgICAgICAiXDFcdTAxMWEiLAorICAgICAgICAgICAgIlwxXDEzNlwxM1x1ZmZmZlwxMlwxMzZcN1x1ZmZmZlwzMlwxMzZcNFx1ZmZmZlwxXDEzNlwxXHVmZmZmXDMyXDEzNiIsCisgICAgICAgICAgICAiXDFcMTM2XDEzXHVmZmZmXDEyXDEzNlw3XHVmZmZmXDMyXDEzNlw0XHVmZmZmXDFcMTM2XDFcdWZmZmZcMzJcMTM2IiwKKyAgICAgICAgICAgICJcMVx1MDExZCIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTFlIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTFmIiwKKyAgICAgICAgICAgICJcMVx1MDEyMCIsCisgICAgICAgICAgICAiXDFcdTAxMjEiLAorICAgICAgICAgICAgIlwxXHUwMTIyIiwKKyAgICAgICAgICAgICJcMVx1MDEyMyIsCisgICAgICAgICAgICAiXDFcdTAxMjQiLAorICAgICAgICAgICAgIlwxXHUwMTI1IiwKKyAgICAgICAgICAgICJcMVx1MDEyNiIsCisgICAgICAgICAgICAiXDFcMTM2XDEzXHVmZmZmXDEyXDEzNlw3XHVmZmZmXDMyXDEzNlw0XHVmZmZmXDFcMTM2XDFcdWZmZmZcMzJcMTM2IiwKKyAgICAgICAgICAgICJcMVwxMzZcMTNcdWZmZmZcMTJcMTM2XDdcdWZmZmZcM1wx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gICIiLAorICAgICAgICAgICAgIlwxXHUwMTQ0IiwKKyAgICAgICAgICAgICJcMVwxMzZcMTNcdWZmZmZcMTJcMTM2XDdcdWZmZmZcMzJcMTM2XDRcdWZmZmZcMVwxMzZcMVx1ZmZmZlwzMlwxMzYiLAorICAgICAgICAgICAgIlwxXHUwMTQ2IiwKKyAgICAgICAgICAgICJcMVx1MDE0NyIsCisgICAgICAgICAgICAiXDFcdTAxNDgiLAorICAgICAgICAgICAgIlwxXHUwMTQ5IiwKKyAgICAgICAgICAgICJcMVwxMzZcMTNcdWZmZmZcMTJcMTM2XDdcdWZmZmZcMzJcMTM2XDRcdWZmZmZcMVwxMzZcMVx1ZmZmZlwzMlwxMzYiLAorICAgICAgICAgICAgIlwxXHUwMTRiIiwKKyAgICAgICAgICAgICJcMVwxMzZcMTNcdWZmZmZcMTJcMTM2XDdcdWZmZmZcMzJcMTM2XDRcdWZmZmZcMVwxMzZcMVx1ZmZmZlwzMlwxMzYiLAorICAgICAgICAgICAgIlwxXHUwMTRkIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcMTM2XDEzXHVmZmZmXDEyXDEzNlw3XHVmZmZmXDMyXDEzNlw0XHVmZmZmXDFcMTM2XDFcdWZmZmZcMzJcMTM2IiwKKyAgICAgICAgICAgICJcMVx1MDE0ZiIsCisgICAgICAgICAgICAiXDFcdTAxNTAiLAorICAgICAgICAgICAgIlwxXHUwMTUxIiwKKyAgICAgICAgICAgICJcMVx1MDE1MiIsCisgICAgICAgICAgICAiXDFcdTAxNTMiLAorICAgICAgICAgICAgIlwxXHUwMTU0IiwKKyAgICAgICAgICAgICJcMVx1MDE1NSIsCisgICAgICAgICAgICAiXDFcdTAxNTYiLAorICAgICAgICAgICAgIlwxXHUwMTU3IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTU4IiwKKyAgICAgICAgICAgICJcMVx1MDE1OSIsCisgICAgICAgICAgICAiXDFcdTAxNWFcMTVcdWZmZmZcMVx1MDE1YiIsCisgICAgICAgICAgICAiXDFcdTAxNWMiLAorICAgICAgICAgICAgIlwxXHUwMTVlXDVcdWZmZmZcMVx1MDE1ZCIsCisgICAgICAgICAgICAiXDFcdTAxNWYiLAorICAgICAgICAgICAgIlwxXHUwMTYwIiwKKyAgICAgICAgICAgICJcMVx1MDE2MSIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDE2MiIsCisgICAgICAgICAgICAiXDFcdTAxNjMiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAxNjQiLAorICAgICAgICAgICAgIlwxXHUwMTY1IiwKKyAgICAgICAgICAgICJcMVwxMzZcMTNcdWZmZmZcMTJcMTM2XDdcdWZmZmZcMjNcMTM2XDFcdTAxNjZcNlwxMzZcNFx1ZmZmZlwxXDEzNlwxXHVmZmZmXDMyXDEzNiIsCisgICAgICAgICAgICAiXDFcMTM2XDEzXHVmZmZmXDEyXDEzNlw3XHVmZmZmXDMyXDEzNlw0XHVmZmZmXDFcMTM2XDFcdWZmZmZcMzJcMTM2IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTY5IiwKKyAgICAgICAgICAgICJcMVx1MDE2YSIsCisgICAgICAgICAgICAiXDFcdTAxNmIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcMTM2XDEzXHVmZmZmXDEyXDEzNlw3XHVmZmZmXDMyXDEzNlw0XHVmZmZmXDFcMTM2XDFcdWZmZmZcMzJcMTM2IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTZkIiwKKyAgICAgICAgICAgICJcMVx1MDE2ZSIsCisgICAgICAgICAgICAiXDFcdTAxNmYiLAorICAgICAgICAgICAgIlwxXHUwMTcwIiwKKyAgICAgICAgICAgICJcMVwxMzZcMTNcdWZmZmZcMTJcMTM2XDdcdWZmZmZcMzJcMTM2XDRcdWZmZmZcMVwxMzZcMVx1ZmZmZlwzMlwxMzYiLAorICAgICAgICAgICAgIlwxXDEzNlwxM1x1ZmZmZlwxMlwxMzZcN1x1ZmZmZlwzMlwxMzZcNFx1ZmZmZlwxXDEzNlwxXHVmZmZmXDMyXDEzNiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVwxMzZcMTNcdWZmZmZcMTJcMTM2XDdcdWZmZmZcMzJcMTM2XDRcdWZmZmZcMVwxMzZcMVx1ZmZmZlwzMlwxMzYiLAorICAgICAgICAgICAgIlwxXHUwMTc0IiwKKyAgICAgICAgICAgICJcMVwxMzZcMTNcdWZmZmZcMTJcMTM2XDdcdWZmZmZcMzJcMTM2XDRcdWZmZmZcMVwxMzZcMVx1ZmZmZlwzMlwxMzYiLAorICAgICAgICAgICAgIlwxXHUwMTc2IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTc3IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTc4IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTc5IiwKKyAgICAgICAgICAgICJcMVx1MDE3YSIsCisgICAgICAgICAgICAiXDFcdTAxN2IiLAorICAgICAgICAgICAgIlwxXHUwMTdjIiwKKyAgICAgICAgICAgICJcMVx1MDE3ZCIsCisgICAgICAgICAgICAiXDFcMTM2XDEzXHVmZmZmXDEyXDEzNlw3XHVmZmZmXDMyXDEzNlw0XHVmZmZmXDFcMTM2XDFcdWZmZmZcMzJcMTM2IiwKKyAgICAgICAgICAgICJcMVx1MDE3ZiIsCisgICAgICAgICAgICAiXDFcdTAxODAiLAorICAgICAgICAgICAgIlwxXHUwMTgxIiwKKyAgICAgICAgICAgICJcMVx1MDE4MiIsCisgICAgICAgICAgICAiXDFcdTAxODMiLAorICAgICAgICAgICAgIlwxXHUwMTg0IiwKKyAgICAgICAgICAgICJcMVx1MDE4NSIsCisgICAgICAgICAgICAiXDFcdTAxODYiLAorICAgICAgICAgICAgIlwxXHUwMTg3IiwKKyAgICAgICAgICAgICJcMVx1MDE4OCIsCisgICAgICAgICAgICAiXDFcdTAxODkiLAorICAgICAgICAgICAgIlwxXHUwMThhIiwKKyAgICAgICAgICAgICJcMVx1MDE4YiIsCisgICAgICAgICAgICAiXDFcdTAxOGMiLAorICAgICAgICAgICAgIlwxXHUwMThkIiwKKyAgICAgICAgICAgICJcMVx1MDE4ZSIsCisgICAgICAgICAgICAiXDFcMTM2XDEzXHVmZmZmXDEyXDEzNlw3XHVmZmZmXDMyXDEzNlw0XHVmZmZmXDFcMTM2XDFcdWZmZmZcMzJcMTM2IiwKKyAgICAgICAgICAgICJcMVx1MDE5MCIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTkxIiwKKyAgICAgICAgICAgICJcMVwxMzZcMTNcdWZmZmZcMTJcMTM2XDdcdWZmZmZcMzJcMTM2XDRcdWZmZmZcMVwxMzZcMVx1ZmZmZlwzMlwxMzYiLAorICAgICAgICAgICAgIlwxXHUwMTkzIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXDEzNlwxM1x1ZmZmZlwxMlwxMzZcN1x1ZmZmZlwzMlwxMzZcNFx1ZmZmZlwxXDEzNlwxXHVmZmZmXDMyXDEzNiIsCisgICAgICAgICAgICAiXDFcdTAxOTUiLAorICAgICAgICAgICAgIlwxXDEzNlwxM1x1ZmZmZlwxMlwxMzZcN1x1ZmZmZlwzMlwxMzZcNFx1ZmZmZlwxXDEzNlwxXHVmZmZmXDMyXDEzNiIsCisgICAgICAgICAgICAiXDFcdTAxOTciLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTk4IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTk5IiwKKyAgICAgICAgICAgICJcMVwxMzZcMTNcdWZmZmZcMTJcMTM2XD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AgICAgICAgICAgIlwxXDEzNlwxM1x1ZmZmZlwxMlwxMzZcN1x1ZmZmZlwzMlwxMzZcNFx1ZmZmZlwxXDEzNlwxXHVmZmZmXDMyXDEzNiIsCisgICAgICAgICAgICAiXDFcdTAxYWYiLAorICAgICAgICAgICAgIlwxXHUwMWIwIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMWIxIiwKKyAgICAgICAgICAgICJcMVx1MDFiMiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDFiMyIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDFiNCIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDFiNSIsCisgICAgICAgICAgICAiXDFcdTAxYjYiLAorICAgICAgICAgICAgIlwxXHUwMWI3IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAxYjgiLAorICAgICAgICAgICAgIlwxXHUwMWI5IiwKKyAgICAgICAgICAgICJcMVx1MDFiYSIsCisgICAgICAgICAgICAiXDFcdTAxYmIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAxYmMiLAorICAgICAgICAgICAgIlwxXHUwMWJkIiwKKyAgICAgICAgICAgICJcMVx1MDFiZSIsCisgICAgICAgICAgICAiXDFcdTAxYmYiLAorICAgICAgICAgICAgIlwxXHUwMWMwIiwKKyAgICAgICAgICAgICJcMVx1MDFjMSIsCisgICAgICAgICAgICAiXDFcdTAxYzIiLAorICAgICAgICAgICAgIlwxXHUwMWMzIiwKKyAgICAgICAgICAgICJcMVwxMzZcMTNcdWZmZmZcMTJcMTM2XDdcdWZmZmZcMzJcMTM2XDRcdWZmZmZcMVwxMzZcMVx1ZmZmZlwzMlwxMzYiLAorICAgICAgICAgICAgIlwxXHUwMWM1Iiw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MzZcN1x1ZmZmZlwzMlwxMzZcNFx1ZmZmZlwxXDEzNlwxXHVmZmZmXDMyXDEzNiIsCisgICAgICAgICAgICAiXDFcdTAxZDgiLAorICAgICAgICAgICAgIlwxXHUwMWQ5IiwKKyAgICAgICAgICAgICJcMVx1MDFkYSIsCisgICAgICAgICAgICAiXDFcMTM2XDEzXHVmZmZmXDEyXDEzNlw3XHVmZmZmXDMyXDEzNlw0XHVmZmZmXDFcMTM2XDFcdWZmZmZcMzJcMTM2IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMWRjIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXDEzNlwxM1x1ZmZmZlwxMlwxMzZcN1x1ZmZmZlwzMlwxMzZcNFx1ZmZmZlwxXDEzNlwxXHVmZmZmXDMyXDEzNiIsCisgICAgICAgICAgICAiXDFcdTAxZGUiLAorICAgICAgICAgICAgIlwxXHUwMWRmIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMWUwIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMWUxIiwKKyAgICAgICAgICAgICJcMVwxMzZcMTNcdWZmZmZcMTJcMTM2XDdcdWZmZmZcMzJcMTM2XDRcdWZmZmZcMVwxMzZcMVx1ZmZmZlwzMlwxMzYiLAorICAgICAgICAgICAgIlwxXHUwMWUzIiwKKyAgICAgICAgICAgICJcMVx1MDFlNCIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDFlNSIsCisgICAgICAgICAgICAiXDFcdTAxZTYiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDFlNyIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDFlOCIsCisgICAgICAgICAgICAiXDFcMTM2XDEzXHVmZmZmXDEyXDEzNlw3XHVmZmZmXDMyXDEzNlw0XHVmZmZmXDFcMTM2XDFcdWZmZmZcMzJcMTM2IiwKKyAgICAgICAgICAgICJcMVx1MDFlYSIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDFlYiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXDEzNlwxM1x1ZmZmZlwxMlwxMzZcN1x1ZmZmZlwzMlwxMzZcNFx1ZmZmZlwxXDEzNlwxXHVmZmZmXDMyXDEzNiIsCisgICAgICAgICAgICAiXDFcdTAxZWQiLAorICAgICAgICAgICAgIlwxXHUwMWVlIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMWVmIiwKKyAgICAgICAgICAgICJcMVx1MDFmMCIsCisgICAgICAgICAgICAiXDFcdTAxZjEiLAorICAgICAgICAgICAgIlwxXHUwMWYyIiwKKyAgICAgICAgICAgICJcMVx1MDFmMyIsCisgICAgICAgICAgICAiXDFcdTAxZjQiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcMTM2XDEzXHVmZmZmXDEyXDEzNlw3XHVmZmZmXDMyXDEzNlw0XHVmZmZmXDFcMTM2XDFcdWZmZmZcMzJcMTM2IiwKKyAgICAgICAgICAgICJcMVwxMzZcMTNcdWZmZmZcMTJcMTM2XDdcdWZmZmZcMzJcMTM2XDRcdWZmZmZcMVwxMzZcMVx1ZmZmZlwzMlwxMzYiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAxZjciLAorICAgICAgICAgICAgIlwxXDEzNlwxM1x1ZmZmZlwxMlwxMzZcN1x1ZmZmZlwzMlwxMzZcNFx1ZmZmZlwxXDEzNlwxXHVmZmZmXDMyXDEzNiIsCisgICAgICAgICAgICAiXDFcdTAxZjkiLAorICAgICAgICAgICAgIlwxXHUwMWZhIiwKKyAgICAgICAgICAgICJcMVx1MDFmYiIsCisgICAgICAgICAgICAiXDFcdTAxZmMiLAorICAgICAgICAgICAgIlwxXHUwMWZkIiwKKyAgICAgICA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U3RyaW5nKERGQTIxX2VvZlMpOworICAgIHN0YXRpYyBmaW5hbCBjaGFyW10gREZBMjFfbWluID0gREZBLnVucGFja0VuY29kZWRTdHJpbmdUb1Vuc2lnbmVkQ2hhcnMoREZBMjFfbWluUyk7CisgICAgc3RhdGljIGZpbmFsIGNoYXJbXSBERkEyMV9tYXggPSBERkEudW5wYWNrRW5jb2RlZFN0cmluZ1RvVW5zaWduZWRDaGFycyhERkEyMV9tYXhTKTsKKyAgICBzdGF0aWMgZmluYWwgc2hvcnRbXSBERkEyMV9hY2NlcHQgPSBERkEudW5wYWNrRW5jb2RlZFN0cmluZyhERkEyMV9hY2NlcHRTKTsKKyAgICBzdGF0aWMgZmluYWwgc2hvcnRbXSBERkEyMV9zcGVjaWFsID0gREZBLnVucGFja0VuY29kZWRTdHJpbmcoREZBMjFfc3BlY2lhbFMpOworICAgIHN0YXRpYyBmaW5hbCBzaG9ydFtdW10gREZBMjFfdHJhbnNpdGlvbjsKKworICAgIHN0YXRpYyB7CisgICAgICAgIGludCBudW1TdGF0ZXMgPSBERkEyMV90cmFuc2l0aW9uUy5sZW5ndGg7CisgICAgICAgIERGQTIxX3RyYW5zaXRpb24gPSBuZXcgc2hvcnRbbnVtU3RhdGVzXVtdOworICAgICAgICBmb3IgKGludCBpPTA7IGk8bnVtU3RhdGVzOyBpKyspIHsKKyAgICAgICAgICAgIERGQTIxX3RyYW5zaXRpb25baV0gPSBERkEudW5wYWNrRW5jb2RlZFN0cmluZyhERkEyMV90cmFuc2l0aW9uU1tpXSk7CisgICAgICAgIH0KKyAgICB9CisKKyAgICBjbGFzcyBERkEyMSBleHRlbmRzIERGQSB7CisKKyAgICAgICAgcHVibGljIERGQTIxKEJhc2VSZWNvZ25pemVyIHJlY29nbml6ZXIpIHsKKyAgICAgICAgICAgIHRoaXMucmVjb2duaXplciA9IHJlY29nbml6ZXI7CisgICAgICAgICAgICB0aGlzLmRlY2lzaW9uTnVtYmVyID0gMjE7CisgICAgICAgICAgICB0a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gICAgICAgICAgICAgICAgICBjYXNlIDAgOiAKKyAgICAgICAgICAgICAgICAgICAgICAgIGludCBMQTIxXzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgICAgICAgICAgICAgcyA9IC0xOworICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCAoTEEyMV8wPT0nPScpICkge3MgPSAxO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSd8JykgKSB7cyA9IDI7fQorCisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICggKExBMjFfMD09JyYnKSApIHtzID0gMzt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nOycpICkge3MgPSA0O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PScrJykgKSB7cyA9IDU7fQorCisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICggKExBMjFfMD09Jy0nKSApIHtzID0gNjt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nKicpICkge3MgPSA3O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PScvJykgKSB7cyA9IDg7fQorCisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICggKExBMjFfMD09JyUnKSApIHtzID0gOTt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nIScpICkge3MgPSAxMDt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nPicpICkge3MgPSAxMTt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nPCcpICkge3MgPSAxMjt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nLicpICkge3MgPSAxMzt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nPycpICkge3MgPSAxNDt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0ndicpICkge3MgPSAxNTt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nZScpICkge3MgPSAxNjt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0ncycpICkge3MgPSAxNzt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0naScpICkge3MgPSAxODt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nZicpICkge3MgPSAxOTt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nYycpICkge3MgPSAyMDt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nbScpICkge3MgPSAyMTt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nYScpICkge3MgPSAyMjt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nZCcpICkge3MgPSAyMzt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nUycpICkge3MgPSAyNDt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nTicpICkge3MgPSAyNTt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nSScpICkge3MgPSAyNjt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nQicpICkge3MgPSAyNzt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nRCcpICkge3MgPSAyODt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nVCcpICkge3MgPSAyOTt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0ncCcpICkge3MgPSAzMDt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0neycpICkge3MgPSAzMTt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nfScpICkge3MgPSAzMjt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nbycpICkge3MgPSAzMzt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0naCcpICkge3MgPSAzNDt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nbCcpICkge3MgPSAzNTt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nQCcpICkge3MgPSAzNjt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nKCcpICkge3MgPSAzNzt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nKScpICkge3MgPSAzODt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nLCcpICkge3MgPSAzOTt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nXScpICkge3MgPSA0MDt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nIycpICkge3MgPSA0MTt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nWycpICkge3MgPSA0Mjt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nOicpICkge3MgPSA0Mzt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0ndycpICkge3MgPSA0NDt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nbicpICkge3MgPSA0NTt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0ndCcpICkge3MgPSA0Njt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0ncicpICkge3MgPSA0Nzt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0naycpICkge3MgPSA0ODt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0ndScpICkge3MgPSA0OTt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nMCcpICkge3MgPSA1MDt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoKExBMjFfMD49JzEnICYmIExBMjFfMDw9JzknKSkgKSB7cyA9IDUxO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdeJykgKSB7cyA9IDUyO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSckJ3x8TEEyMV8wPT0nQSd8fExBMjFfMD09J0MnfHwoTEEyMV8wPj0nRScgJiYgTEEyMV8wPD0nSCcpfHwoTEEyMV8wPj0nSicgJiYgTEEyMV8wPD0nTScpfHwoTEEyMV8wPj0nTycgJiYgTEEyMV8wPD0nUicpfHwoTEEyMV8wPj0nVScgJiYgTEEyMV8wPD0nWicpfHxMQTIxXzA9PSdfJ3x8TEEyMV8wPT0nYid8fExBMjFfMD09J2cnfHxMQTIxXzA9PSdqJ3x8TEEyMV8wPT0ncSd8fChMQTIxXzA+PSd4JyAmJiBMQTIxXzA8PSd6JykpICkge3MgPSA1Mzt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nXCInKSApIHtzID0gNTQ7fQorCisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICggKExBMjFfMD09J1wnJykgKSB7cyA9IDU1O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoICgoTEEyMV8wPj0nXHQnICYmIExBMjFfMDw9J1xuJyl8fExBMjFfMD09J1xyJ3x8TEEyMV8wPT0nICcpICkge3MgPSA1Njt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoKExBMjFfMD49J1x1MDAwMCcgJiYgTEEyMV8wPD0nXGInKXx8KExBMjFfMD49J1x1MDAwQicgJiYgTEEyMV8wPD0nXGYnKXx8KExBMjFfMD49J1x1MDAwRScgJiYgTEEyMV8wPD0nXHUwMDFGJyl8fExBMjFfMD09J1xcJ3x8TEEyMV8wPT0nYCd8fChMQTIxXzA+PSd+JyAmJiBMQTIxXzA8PSdcdUZGRkYnKSkgKSB7cyA9IDU3O30KKworICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCBzPj0wICkgcmV0dXJuIHM7CisgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIE5vVmlhYmxlQWx0RXhjZXB0aW9uIG52YWUgPQorICAgICAgICAgICAgICAgIG5ldyBOb1ZpYWJsZUFsdEV4Y2VwdGlvbihnZXREZXNjcmlwdGlvbigpLCAyMSwgX3MsIGlucHV0KTsKKyAgICAgICAgICAgIGVycm9yKG52YWUpOworICAgICAgICA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FueWluZyBtYXRlcmlhbHMgICAgICAgICAgIAorICogIGFyZSBtYWRlIGF2YWlsYWJsZSB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEVjbGlwc2UgUHVibGljIExpY2Vuc2UgdjEuMCAgICAgICAKKyAqICB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgIAorICogIGh0dHA6Ly93d3cuZWNsaXBzZS5vcmcvbGVnYWwvZXBsLXYxMC5odG1sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBDb250cmlidXRvcnM6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAJICAgQ2hyaXN0b3BoZSBMb2V0eiAoTG9ldHogR21iSCZDby5LRykgLSBpbml0aWFsIGltcGxlbWVudGF0aW9uCisgKiAKKyAqLworCitwYWNrYWdlIG9yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS5jb250ZW50YXNzaXN0LmFudGxyLmludGVybmFsOyAKKworaW1wb3J0IGphdmEuaW8uSW5wdXRTdHJlYW07CitpbXBvcnQgb3JnLmVjbGlwc2UueHRleHQuKjsKK2ltcG9ydCBvcmcuZWNsaXBzZS54dGV4dC5wYXJzZXIuKjsKK2ltcG9ydCBvcmcuZWNsaXBzZS54dGV4dC5wYXJzZXIuaW1wbC4qOworaW1wb3J0IG9yZy5lY2xpcHNlLmVtZi5lY29yZS51dGlsLkVjb3JlVXRpbDsKK2ltcG9ydCBvcmcuZWNsaXBzZS5lbWYuZWNvcmUuRU9iamVjdDsKK2ltcG9ydCBvcmcuZWNsaXBzZS54dGV4dC5wYXJzZXIuYW50bHIuWHRleHRUb2tlblN0cmVhbTsKK2lt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llfT1RIRVIiLCAiJz0nIiwgIid8fCciLCAiJyYmJyIsICInOyciLCAiJys9JyIsICInLT0nIiwgIicqPSciLCAiJy89JyIsICInJT0nIiwgIic9PSciLCAiJyE9JyIsICInPT09JyIsICInIT09JyIsICInPj0nIiwgIic+JyIsICInPCciLCAiJy0+JyIsICInLi48JyIsICInLi4nIiwgIic9PiciLCAiJzw+JyIsICInPzonIiwgIicrJyIsICInLSciLCAiJyonIiwgIicqKiciLCAiJy8nIiwgIiclJyIsICInISciLCAiJysrJyIsICInLS0nIiwgIicuJyIsICIndmFsJyIsICInZXh0ZW5kcyciLCAiJ3N0YXRpYyciLCAiJ2ltcG9ydCciLCAiJ2V4dGVuc2lvbiciLCAiJ3N1cGVyJyIsICInZmFsc2UnIiwgIidzdW0nIiwgIidjb3VudCciLCAiJ21pbiciLCAiJ21heCciLCAiJ2F2ZyciLCAiJ2Rpc3RpbmN0LWNvdW50JyIsICInU3RyaW5nJyIsICInTnVtZXJpYyciLCAiJ0ludGVnZXInIiwgIidCb29sZWFuJyIsICInRGF0ZSciLCAiJ1RpbWUnIiwgIidUaW1lc3RhbXAnIiwgIidUaW1lWWVhcnMnIiwgIidUaW1lSGFsZlllYXJzJyIsICInVGltZVF1YXJ0ZXJzJyIsICInVGltZU1vbnRocyciLCAiJ1RpbWVXZWVrcyciLCAiJ1RpbWVEYXlzJyIsICInVGltZUhvdXJzJyIsICInVGltZU1pbnV0ZXMnIiwgIidUaW1lU2Vjb25kcyciLCAiJ3BhY2thZ2UnIiwgIid7JyIsICInfSciLCAiJ2N1YmUnIiwgIidkaW1lbnNpb25Vc2FnZSciLCAiJ292ZXInIiwgIidkaW1lbnNpb24nIiwgIidoaWVyYXJjaHknIiwgIidlbnRpdHknIiwgIidsZXZlbCciLCAiJ2NvbHVtbj0nIiwgIidwcm9wZXJ0eSciLCAiJ21lYXN1cmUnIiwgIidAJyIsICInKCciLCAiJyknIiwgIicsJyIsICInXSciLCAiJyMnIiwgIidbJyIsICInaW5zdGFuY2VvZiciLCAiJ2FzJyIsICInaWYnIiwgIidlbHNlJyIsICInc3dpdGNoJyIsICInOiciLCAiJ2RlZmF1bHQnIiwgIidjYXNlJyIsICInZm9yJyIsICInd2hpbGUnIiwgIidkbyciLCAiJ25ldyciLCAiJ251bGwnIiwgIid0eXBlb2YnIiwgIid0aHJvdyciLCAiJ3JldHVybiciLCAiJ3RyeSciLCAiJ2ZpbmFsbHknIiwgIidzeW5jaHJvbml6ZWQnIiwgIidjYXRjaCciLCAiJz8nIiwgIicmJyIsICInZGVmYXVsdE1lYXN1cmUnIiwgIid0eXBlVGltZSciLCAiJ2hhc0FsbCciLCAiJ2FsbE1lbWJlck5hbWU9JyIsICInZGVmYXVsdE1lbWJlcj0nIiwgIidrZXk9JyIsICIndW5pcXVlTWVtYmVycyciLCAiJ2xldmVsVHlwZT0nIiwgIid0eXBlPSciLCAiJ25vdFZpc2libGUnIiwgIic6OiciLCAiJz8uJyIsICInfCciLCAiJ3ZhciciLCAiJ3RydWUnIgorICAgIH07CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgUlVMRV9IRVg9NjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX181MD01MDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX181OT01OTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX181NT01NTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX181Nj01NjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX181Nz01NzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX181OD01ODsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX181MT01MTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX181Mj01MjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX181Mz01MzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX181ND01NDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX182MD02MDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX182MT02MTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBSVUxFX0lEPTQ7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTMwPTEzMDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBSVUxFX0lOVD03OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzY2PTY2OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFJVTEVfTUxfQ09NTUVOVD05OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzY3PTY3OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzEyOT0xMjk7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNjg9Njg7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNjk9Njk7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNjI9NjI7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTI2PTEyNjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX182Mz02MzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMjU9MTI1OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzY0PTY0OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzEyOD0xMjg7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNjU9NjU7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTI3PTEyNzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zNz0zNzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zOD0zODsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zOT0zOTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zMz0zMzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zND0zNDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zNT0zNTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zNj0zNjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zMD0zMDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zMT0zMTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zMj0zMjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180OD00ODsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180OT00OTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180ND00NDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180NT00NTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180Nj00NjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180Nz00NzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180MD00MDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180MT00MTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180Mj00MjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180Mz00MzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX185MT05MTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMDA9MTAwOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzkyPTkyOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzkzPTkzOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzEwMj0xMDI7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fOTQ9OTQ7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTAxPTEwMTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX185MD05MDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xOT0xOTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xNT0xNTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xNj0xNjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xNz0xNzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xOD0xODsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX185OT05OTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMz0xMzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xND0xNDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX185NT05NTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX185Nj05NjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX185Nz05NzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX185OD05ODsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBSVUxFX0RFQ0lNQUw9ODsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yNj0yNjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yNz0yNzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yOD0yODsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yOT0yOTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yMj0yMjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yMz0yMzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yND0yNDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yNT0yNTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yMD0yMDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yMT0yMTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMjI9MTIyOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzcwPTcwOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzEyMT0xMjE7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNzE9NzE7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTI0PTEyNDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX183Mj03MjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMjM9MTIzOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzEyMD0xMjA7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgUlVMRV9TVFJJTkc9NTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBSVUxFX1NMX0NPTU1FTlQ9MTA7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNzc9Nzc7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTE5PTExOTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX183OD03ODsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMTg9MTE4OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzc5PTc5OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzczPTczOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzExNT0xMTU7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgRU9GPS0xOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzc0PTc0OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzExND0xMTQ7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNzU9NzU7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTE3PTExNzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX183Nj03NjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMTY9MTE2OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzgwPTgwOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzExMT0xMTE7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fODE9ODE7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTEwPTExMDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX184Mj04MjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMTM9MTEzOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzgzPTgzOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzExMj0xMTI7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgUlVMRV9XUz0xMTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBSVUxFX0FOWV9PVEhFUj0xMjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX184OD04ODsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMDg9MTA4OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzg5PTg5OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzEwNz0xMDc7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTA5PTEwOTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX184ND04NDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMDQ9MTA0OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzg1PTg1OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzEwMz0xMDM7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fODY9ODY7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTA2PTEwNjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX184Nz04NzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMDU9MTA1OworCisgICAgLy8gZGVsZWdhdGVzCisgICAgLy8gZGVsZWdhdG9ycworCisKKyAgICAgICAgcHVibGljIEludGVybmFsQ3ViZURTTFBhcnNlcihUb2tlblN0cmVhbSBpbnB1dCkgeworICAgICAgICAgICAgdGhpcyhpbnB1dCwgbmV3IFJlY29nbml6ZXJTaGFyZWRTdGF0ZSgpKTsKKyAgICAgICAgfQorICAgICAgICBwdWJsaWMgSW50ZXJuYWxDdWJlRFNMUGFyc2VyKFRva2VuU3RyZWFtIGlucHV0LCBSZWNvZ25pemVyU2hhcmVkU3RhdGUgc3RhdGUpIHsKKyAgICAgICAgICAgIHN1cGVyKGlucHV0LCBzdGF0ZSk7CisgICAgICAgICAgICAgCisgICAgICAgIH0KKyAgICAgICAgCisKKyAgICBwdWJsaWMgU3RyaW5nW10gZ2V0VG9rZW5OYW1lcygpIHsgcmV0dXJuIEludGVybmFsQ3ViZURTTFBhcnNlci50b2tlbk5hbWVzOyB9CisgICAgcHVibGljIFN0cmluZyBnZXRHcmFt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eworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlUGFja2FnZVJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZUN1YmVQYWNrYWdlX2luX2VudHJ5UnVsZUN1YmVQYWNrYWdlMTI3KTsKKyAgICAgICAgICAgIHJ1bGVDdWJlUGFja2FnZSgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldEN1YmVQYWNrYWdlUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVDdWJlUGFja2FnZTEzNCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlQ3ViZVBhY2thZ2UiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZUN1YmVQYWNrYWdlIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9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3ViZVBhY2thZ2VfX0dyb3VwX18wKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldEN1YmVQYWNrYWdlQWNjZXNzKCkuZ2V0R3JvdXAoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVDdWJlUGFja2FnZSIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVDdWJlVHlwZSIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMTc6MTogZW50cnlSdWxlQ3ViZVR5cGUgOiBydWxlQ3ViZVR5cGUgRU9GIDsKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBlbnRyeVJ1bGVDdWJlVHlwZSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7Cisg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ICggcnVsZV9fQ3ViZVR5cGVfX0dyb3VwX18wICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEzMzoyOiBydWxlX19DdWJlVHlwZV9fR3JvdXBfXzAKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX0N1YmVUeXBlX19Hcm91cF9fMF9pbl9ydWxlQ3ViZVR5cGUyMjApOworICAgICAgICAgICAgcnVsZV9fQ3ViZVR5cGVfX0dyb3VwX18wKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldEN1YmVUeXBlQWNjZXNzKCkuZ2V0R3JvdXAoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVDdWJlVHlwZSIKKworCisgICAgLy8gJEF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Vc2FnZVJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZUN1YmVEaW1lbnNpb25Vc2FnZV9pbl9lbnRyeVJ1bGVDdWJlRGltZW5zaW9uVXNhZ2UyNDcpOworICAgICAgICAgICAgcnVsZUN1YmVEaW1lbnNpb25Vc2FnZSgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldEN1YmVEaW1lbnNpb25Vc2FnZVJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlQ3ViZURpbWVuc2lvblVzYWdlMjU0KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVDdWJlRGltZW5zaW9uVXNhZ2UiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZUN1YmVEaW1lbnNpb25Vc2FnZSIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29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Npb25Vc2FnZV9fR3JvdXBfXzBfaW5fcnVsZUN1YmVEaW1lbnNpb25Vc2FnZTI4MCk7CisgICAgICAgICAgICBydWxlX19DdWJlRGltZW5zaW9uVXNhZ2VfX0dyb3VwX18wKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldEN1YmVEaW1lbnNpb25Vc2FnZUFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlQ3ViZURpbWVuc2lvblVzYWdlIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZUN1YmVEaW1lbnNpb24iCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTczOjE6IGVudHJ5UnVsZUN1YmVEaW1lbnNpb24gOiBydWxlQ3ViZURpbWVuc2lvbiBFT0YgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIGVudHJ5UnVsZUN1YmVEaW1lbnNpb24oKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTc0OjE6ICggcnVsZUN1YmVEaW1lbnNpb24gRU9GICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE3NToxOiBydWxlQ3ViZURpbWVuc2lvbiBFT0YKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZURpbWVuc2lvblJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZUN1YmVEaW1lbnNpb25faW5fZW50cnlSdWxlQ3ViZURpbWVuc2lvbjMwNyk7CisgICAgICAgICAgICBydWxlQ3ViZURpbWVuc2lvbigpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldEN1YmVEaW1lbnNpb25SdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZUN1YmVEaW1lbnNpb24zMTQpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZUN1YmVEaW1lbnNpb24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZUN1YmVEaW1lbnNpb24iCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTgyOjE6IHJ1bGVDdWJlRGltZW5zaW9uIDogKCAoIHJ1bGVfX0N1YmVEaW1lbnNpb25fX0dyb3VwX18wICkgKSA7CisgICAgcHVibGljIGZpbmFsIHZvaWQgcnVsZUN1YmVEaW1lbnNpb24oKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworCisgICAgICAgIAkJaW50IHN0YWNrU2l6ZSA9IGtlZXBTdGFja1NpemUoKTsKKyAgICAgICAgICAgIAorICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1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LmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE4OToxOiAoIHJ1bGVfX0N1YmVEaW1lbnNpb25fX0dyb3VwX18wICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE4OToyOiBydWxlX19DdWJlRGltZW5zaW9uX19Hcm91cF9fMAorICAgICAgICAgICAgeworICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fQ3ViZURpbWVuc2lvbl9fR3JvdXBfXzBfaW5fcnVsZUN1YmVEaW1lbnNpb24zNDApOworICAgICAgICAgICAgcnVsZV9fQ3ViZURpbWVuc2lvbl9fR3JvdXBfXzAoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZURpbWVuc2lvbkFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgIC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5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMDM6MTogcnVsZUN1YmVIaWVyYXJjaHkgRU9GCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldEN1YmVIaWVyYXJjaHlSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVDdWJlSGllcmFyY2h5X2luX2VudHJ5UnVsZUN1YmVIaWVyYXJjaHkzNjcpOworICAgICAgICAgICAgcnVsZUN1YmVIaWVyYXJjaHkoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlSGllcmFyY2h5UnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVDdWJlSGllcmFyY2h5Mzc0KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVDdWJlSGllcmFyY2h5IgorCisKKyAgICAvLyAkQU5UTFIgc3Rhc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ICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX0N1YmVIaWVyYXJjaHlfX0dyb3VwX18wX2luX3J1bGVDdWJlSGllcmFyY2h5NDAwKTsKKyAgICAgICAgICAgIHJ1bGVfX0N1YmVIaWVyYXJjaHlfX0dyb3VwX18wKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldEN1YmVIaWVyYXJjaHlBY2Nlc3MoKS5nZXRHcm91cCgpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZUN1YmVIaWVyYXJjaHkiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlQ3ViZUVudGl0eSIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMjk6MTogZW50cnlSdWxlQ3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oKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjQ1OjE6ICggcnVsZV9fQ3ViZUVudGl0eV9fR3JvdXBfXzAgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjQ1OjI6IHJ1bGVfX0N1YmVFbnRpdHlfX0dyb3VwX18wCisgICAgICAgICAgICB7CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19DdWJlRW50aXR5X19Hcm91cF9fMF9pbl9ydWxlQ3ViZUVudGl0eTQ2MCk7CisgICAgICAgICAgICBydWxlX19DdWJlRW50aXR5X19Hcm91cF9fMCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlRW50aXR5QWNjZXNzKCkuZ2V0R3JvdXAoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvc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Lmc6MjU5OjE6IHJ1bGVDdWJlVHlwZUVudGl0eSBFT0YKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZVR5cGVFbnRpdHlSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVDdWJlVHlwZUVudGl0eV9pbl9lbnRyeVJ1bGVDdWJlVHlwZUVudGl0eTQ4Nyk7CisgICAgICAgICAgICBydWxlQ3ViZVR5cGVFbnRpdHkoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlVHlwZUVudGl0eVJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlQ3ViZVR5cGVFbnRpdHk0OTQpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZUN1YmVUeXBlRW50aXR5IgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGV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W50aXR5X19Hcm91cF9fMAorICAgICAgICAgICAgeworICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fQ3ViZVR5cGVFbnRpdHlfX0dyb3VwX18wX2luX3J1bGVDdWJlVHlwZUVudGl0eTUyMCk7CisgICAgICAgICAgICBydWxlX19DdWJlVHlwZUVudGl0eV9fR3JvdXBfXzAoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZVR5cGVFbnRpdHlBY2Nlc3MoKS5nZXRHcm91cCgpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZUN1YmVUeXBlRW50aXR5IgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZUN1YmVEaW1lbnNpb25FbnRpdHkiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50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gICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldEN1YmVEaW1lbnNpb25FbnRpdHlSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZUN1YmVEaW1lbnNpb25FbnRpdHk1NTQpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZUN1YmVEaW1lbnNpb25FbnRpdHkiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZUN1YmVEaW1lbnNpb25FbnRpdHkiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Mjk0OjE6IHJ1bGVDdWJlRGltZW5zaW9uRW50aXR5IDogKCAoIHJ1bGVfX0N1YmVEaW1lbnNpb25FbnRpdHlfX0dyb3VwX18wICkgKSA7CisgICAgcHVibGljIGZpbmFsIHZvaWQgcnVsZUN1YmVEaW1lbnNpb25Fbn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GVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMwMDoxOiAoIHJ1bGVfX0N1YmVEaW1lbnNpb25FbnRpdHlfX0dyb3VwX18wICkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZURpbWVuc2lvbkVudGl0eUFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMwMToxOiAoIHJ1bGVfX0N1YmVEaW1lbnNpb25FbnRpdHlfX0dyb3VwX18wICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMwMToyOiBydWxlX19DdWJlRGltZW5zaW9uRW50aXR5X19Hcm91cF9fMAorICAgICAgICAgICAgeworICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fQ3ViZURpbWVuc2lvbkVudGl0eV9fR3JvdXBfXzBfaW5fcnVsZUN1YmVEaW1lbnNpb25FbnRpdHk1ODApOworICAgICAgICAgICAgcnVsZV9fQ3ViZURpbWVuc2lvbkVudGl0eV9fR3JvdXBfXzAoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZURpbWVuc2lvbkVudGl0eUFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlQ3ViZURpbWVuc2lvbkVudGl0eSIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5IgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMxMzoxOiBlbnRyeVJ1bGVDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5IDogcnVsZUN1YmVEaW1lbnNpb25FbnRpdHlFbnRpdHkgRU9GIDsKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBlbnRyeVJ1bGVDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vI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isgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5NjE0KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5IgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5IgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMyMjoxOiBydWxlQ3ViZURpbWVuc2lvbkVudGl0eUVudGl0eSA6ICggKCBydWxlX19DdWJlRGltZW5zaW9uRW50aXR5RW50aXR5X19Hcm91cF9fMCApICkgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIHJ1bGVDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKworICAgICAgICAJCWludCBzdGFja1NpemUgPSBrZWVwU3RhY2tTaXplKCk7CisgICAgICAgICAgICAKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnA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zLmdldEN1YmVEaW1lbnNpb25FbnRpdHlFbnRpdHlBY2Nlc3MoKS5nZXRHcm91cCgpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZUN1YmVEaW1lbnNpb25FbnRpdHlFbnRpdHkiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlQ3ViZUxldmVsIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjM0MToxOiBlbnRyeVJ1bGVDdWJlTGV2ZWwgOiBydWxlQ3ViZUxldmVsIEVPRiA7CisgICAgcHVibGljIGZpbmFsIHZvaWQgZW50cnlSdWxlQ3ViZUxldmVsKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjM0MjoxOiAoIHJ1bGVDdWJlTGV2ZWwgRU9GICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjM0MzoxOiBydWxlQ3ViZUxldmVsIEVPRgorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTGV2ZWxSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVDdWJlTGV2ZWxfaW5fZW50cnlSdWxlQ3ViZUxldmVsNjY3KTsKKyAgICAgICAgICAgIHJ1bGVDdWJlTGV2ZWwoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTGV2ZWxSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZUN1YmVMZXZlbDY3NCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH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GVybmFsL0ludGVybmFsQ3ViZURTTC5nOjM1NzoyOiBydWxlX19DdWJlTGV2ZWxfX0dyb3VwX18wCisgICAgICAgICAgICB7CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19DdWJlTGV2ZWxfX0dyb3VwX18wX2luX3J1bGVDdWJlTGV2ZWw3MDApOworICAgICAgICAgICAgcnVsZV9fQ3ViZUxldmVsX19Hcm91cF9fMCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTGV2ZWxBY2Nlc3MoKS5nZXRHcm91cCgpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZUN1YmVMZXZlbCIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVDdWJlTGV2ZWxQcm9wIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2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gcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTGV2ZWxQcm9wUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVDdWJlTGV2ZWxQcm9wNzM0KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVDdWJlTGV2ZWxQcm9wIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVDdWJlTGV2ZWxQcm9wIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjM3ODoxOiBydWxlQ3ViZUxldmVsUHJvcCA6ICggKCBydWxlX19DdWJlTGV2ZWxQcm9wX19Hcm91cF9fMCApICkgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIHJ1bGVDdWJlTGV2ZWxQcm9wKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKworICAgICAgICAJCWludCBzdGFja1NpemUgPSBrZWVwU3RhY2tTaXplKCk7CisgICAgICA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0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozOTk6MTogcnVsZUN1YmVNZWFzdXJlIEVPRgorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTWVhc3VyZVJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZUN1YmVNZWFzdXJlX2luX2VudHJ5UnVsZUN1YmVNZWFzdXJlNzg3KTsKKyAgICAgICAgICAgIHJ1bGVDdWJlTWVhc3VyZSgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldEN1YmVNZWFzdXJlUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVDdWJlTWVhc3VyZTc5NCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlQ3ViZU1lYXN1cmUiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZUN1YmVNZWFzdXJlIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjQwNjoxOiBydWxlQ3ViZU1lYXN1cmUgOiAoICggcnVsZV9fQ3ViZU1lYXN1cmVfX0dyb3VwX18wICkgKSA7CisgICAgcHVibGljIGZpbmFsIHZvaWQgcnVsZUN1YmVNZWFzdXJlKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKworICAgICAgICAJCWludCBzdGFja1NpemUgPSBrZWVwU3RhY2tTaXplKCk7CisgICAgICAgICAgICAKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjQxMDoyOiAoICggKCBydWxlX19DdWJlTWVhc3VyZV9fR3JvdXBfXzAgKSApICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjQxMToxOiAoICggcnVsZV9fQ3ViZU1lYXN1cmVfX0dyb3VwX18wICkgKQorICAgICAgICAgICAgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGl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sZV9fQ3ViZU1lYXN1cmVfX0dyb3VwX18wCisgICAgICAgICAgICB7CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19DdWJlTWVhc3VyZV9fR3JvdXBfXzBfaW5fcnVsZUN1YmVNZWFzdXJlODIwKTsKKyAgICAgICAgICAgIHJ1bGVfX0N1YmVNZWFzdXJlX19Hcm91cF9fMCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTWVhc3VyZUFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlQ3ViZU1lYXN1cmUiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlSW1wb3J0IgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjQy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ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo0NDE6MTogKCBydWxlX19JbXBvcnRfX0dyb3VwX18wICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjQ0MToyOiBydWxlX19JbXBvcnRfX0dyb3VwX18wCisgICAgICAgICAgICB7CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19JbXBvcnRfX0dyb3VwX18wX2luX3J1bGVJbXBvcnQ4ODApOworICAgICAgICAgICAgcnVsZV9fSW1wb3J0X19Hcm91cF9fMCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRJbXBvcnRBY2Nlc3MoKS5nZXRHcm91cCgpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9Cis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isgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldEN1YmVRdWFsaWZpZWROYW1lV2l0aFdpbGRDYXJkUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlQ3ViZVF1YWxpZmllZE5hbWVXaXRoV2lsZENhcmRfaW5fZW50cnlSdWxlQ3ViZVF1YWxpZmllZE5hbWVXaXRoV2lsZENhcmQ5MDcpOworICAgICAgICAgICAgcnVsZUN1YmVRdWFsaWZpZWROYW1lV2l0aFdpbGRDYXJkKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZVF1YWxpZmllZE5hbWVXaXRoV2lsZENhcmRSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZUN1YmVRdWFsaWZpZWROYW1lV2l0aFdpbGRDYXJkOTE0KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlb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5OjE6ICggcnVsZV9fQ3ViZVF1YWxpZmllZE5hbWVXaXRoV2lsZENhcmRfX0dyb3VwX18wICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjQ2OToyOiBydWxlX19DdWJlUXVhbGlmaWVkTmFtZVdpdGhXaWxkQ2FyZF9fR3JvdXBfXzAKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX0N1YmVRdWFsaWZpZWROYW1lV2l0aFdpbGRDYXJkX19Hcm91cF9fMF9pbl9ydWxlQ3ViZVF1YWxpZmllZE5hbWVXaXRoV2lsZENhcmQ5NDApOworICAgICAgICAgICAgcnVsZV9fQ3ViZVF1YWxpZmllZE5hbWVXaXRoV2lsZENhcmRfX0dyb3VwX18wKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldEN1YmVRdWFsaWZpZWROYW1lV2l0aFdpbGRDYXJkQWNjZXNzKCkuZ2V0R3JvdXAoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorIC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gRU9GCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldFF1YWxpZmllZE5hbWVSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVRdWFsaWZpZWROYW1lX2luX2VudHJ5UnVsZVF1YWxpZmllZE5hbWU5NjcpOworICAgICAgICAgICAgcnVsZVF1YWxpZmllZE5hbWUoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRRdWFsaWZpZWROYW1lUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVRdWFsaWZpZWROYW1lOTc0KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVRdWFsaWZpZWROYW1lIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVRdWFsaWZpZWROYW1lIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjQ5MDoxOiBydWxlUXVhbGlmaWVkTmFtZSA6ICggKCBydWxlX19RdWFsaWZpZWROYW1lX19Hcm91cF9fMCApICkgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIHJ1bGVRdWFsaWZpZWROYW1lKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKworICAgICAgICAJCWludCBzdGFja1NpemUgPSBrZWVwU3RhY2tTaXplKCk7CisgICAgICAgICAgICAKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjQ5NDoyOiAoICggKCBydWxlX19RdWFsaWZpZWROYW1lX19Hcm91cF9fMCApICkgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NDk1OjE6ICggKCBydWxlX19RdWFsaWZpZWROYW1lX19Hcm91cF9fMCApICkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ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2luX3J1bGVRdWFsaWZpZWROYW1lMTAwMCk7CisgICAgICAgICAgICBydWxlX19RdWFsaWZpZWROYW1lX19Hcm91cF9fMCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRRdWFsaWZpZWROYW1lQWNjZXNzKCkuZ2V0R3JvdXAoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVRdWFsaWZpZWROYW1lIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZVZhbGlkSUQiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTA5OjE6IGVudHJ5UnVsZVZhbGlkSUQgOiBydWxlVmFsaWRJRCBFT0YgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIGVudHJ5UnVsZVZhbGlkSUQoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTEwOjE6ICggcnVsZVZhbGlkSUQgRU9GICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjUxMToxOiBydWxlVmFsaWRJRCBFT0YKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0VmFsaWRJRFJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVZhbGlkSURfaW5fZW50cnlSdWxlVmFsaWRJRDEwMjcpOworICAgICAgICAgICAgcnVsZVZhbGlkSUQoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRWYWxpZElEUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVWYWxpZ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fQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVWYWxpZElEIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZUxGUU4iCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTM3OjE6IGVudHJ5UnVsZUxGUU4gOiBydWxlTEZRTiBFT0YgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIGVudHJ5UnVsZUxGUU4oKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTM4OjE6ICggcnVsZUxGUU4gRU9GICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjUzOToxOiBydWxlTEZRTiBFT0YKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0TEZRTlJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZUxGUU5faW5fZW50cnlSdWxlTEZRTjEwODYpOworICAgICAgICAgICAgcnVsZUxGUU4oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRMRlFOUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVMRlFOMTA5Myk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlTEZRTiIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlTEZRTiIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLn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2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0TEZRTkFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlTEZRTiIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVUUkFOU0xBVEFCTEVJRCIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo1NjU6MTogZW50cnlSdWxlVFJBTlNMQVRBQkxFSUQgOiBydWxlVFJBTlNMQVRBQkxFSUQgRU9GIDsKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBlbnRyeVJ1bGVUUkFOU0xBVEFCTEVJRCgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICAvLyAuLi9vcmc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bC9JbnRlcm5hbEN1YmVEU0wuZzo1OTQ6MTogKCBydWxlVFJBTlNMQVRBQkxFU1RSSU5HIEVPRiApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo1OTU6MTogcnVsZVRSQU5TTEFUQUJMRVNUUklORyBFT0YKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0VFJBTlNMQVRBQkxFU1RSSU5HUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlVFJBTlNMQVRBQkxFU1RSSU5HX2luX2VudHJ5UnVsZVRSQU5TTEFUQUJMRVNUUklORzEyMDUpOworICAgICAgICAgICAgcnVsZVRSQU5TTEFUQUJMRVNUUklORygpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFRSQU5TTEFUQUJMRVNUUklOR1J1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlVFJBTlNMQVRBQkxFU1RSSU5HMTIxMik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoI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24gRU9GICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjYyMzoxOiBydWxlWEFubm90YXRpb24gRU9GCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWEFubm90YXRpb25faW5fZW50cnlSdWxlWEFubm90YXRpb24xMjY0KTsKKyAgICAgICAgICAgIHJ1bGVYQW5ub3RhdGlvbigpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVYQW5ub3RhdGlvbjEyNzEpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgIC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vYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NjM3OjI6IHJ1bGVfX1hBbm5vdGF0aW9uX19Hcm91cF9fMAorICAgICAgICAgICAgeworICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fWEFubm90YXRpb25fX0dyb3VwX18wX2luX3J1bGVYQW5ub3RhdGlvbjEyOTcpOworICAgICAgICAgICAgcnVsZV9fWEFubm90YXRpb25fX0dyb3VwX18wKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uQWNjZXNzKCkuZ2V0R3JvdXAoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVYQW5ub3RhdGlvbiIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZVBhaXIiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2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1dfcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlUGFpcl9pbl9lbnRyeVJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZVBhaXIxMzI0KTsKKyAgICAgICAgICAgIHJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZVBhaXIoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZVBhaXJSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlUGFpcjEzMzEpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlUGFpciIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRz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90YXRpb25FbGVtZW50VmFsdWVQYWlyX19Hcm91cF9fMAorICAgICAgICAgICAgeworICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyX19Hcm91cF9fMF9pbl9ydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyMTM1Nyk7CisgICAgICAgICAgICBydWxlX19YQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZVBhaXJfX0dyb3VwX18wKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uRWxlbWVudFZhbHVlUGFpckFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3QiCisgICAgLy8gLi4vb3JnLmVj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ZW50VmFsdWVPckNvbW1hTGlzdFJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3RfaW5fZW50cnlSdWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVPckNvbW1hTGlzdDEzODQpOworICAgICAgICAgICAgcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3QoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0UnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0MTM5MSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVPckNvbW1hTGlzdCIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlWEFubm90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fWEFubm90YXRpb25FbGVtZW50VmFsdWVPckNvbW1hTGlzdF9fQWx0ZXJuYXRpdmVzICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjY5MzoyOiBydWxlX19YQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0X19BbHRlcm5hdGl2ZXMKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX1hBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3RfX0FsdGVybmF0aXZlc19pbl9ydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVPckNvbW1hTGlzdDE0MTcpOworICAgICAgICAgICAgcnVsZV9fWEFubm90YXRpb25FbGVtZW50VmFsdWVPckNvbW1hTGlzdF9fQWx0ZXJuYXRpdmVzKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3RBY2Nlc3MoKS5nZXRBbHRlcm5hdGl2ZXMoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgIC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2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo3MzU6MTogcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uIEVPRgorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbk9yRXhwcmVzc2lvblJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uX2luX2VudHJ5UnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uMTUwNCk7CisgICAgICAgICAgICBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbk9yRXhwcmVzc2lvblJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlWEFubm90YXRpb25PckV4cHJlc3Npb24xNTExKTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsK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YWxDdWJlRFNMLmc6NzQ5OjE6ICggcnVsZV9fWEFubm90YXRpb25PckV4cHJlc3Npb25fX0FsdGVybmF0aXZlcyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo3NDk6MjogcnVsZV9fWEFubm90YXRpb25PckV4cHJlc3Npb25fX0FsdGVybmF0aXZlcworICAgICAgICAgICAgeworICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fWEFubm90YXRpb25PckV4cHJlc3Npb25fX0FsdGVybmF0aXZlc19pbl9ydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24xNTM3KTsKKyAgICAgICAgICAgIHJ1bGVfX1hBbm5vdGF0aW9uT3JFeHByZXNzaW9uX19BbHRlcm5hdGl2ZXMoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WEFubm90YXRpb25PckV4cHJlc3Npb25BY2Nlc3MoKS5nZXRBbHRlcm5hdGl2ZXMoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW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ICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldFhFeHByZXNzaW9uUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWEV4cHJlc3Npb25faW5fZW50cnlSdWxlWEV4cHJlc3Npb24xNTY0KTsKKyAgICAgICAgICAgIHJ1bGVYRXhwcmVzc2lvbigpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhFeHByZXNzaW9uUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVYRXhwcmVzc2lvbjE1NzEpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZVhFeHByZXNzaW9uIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVYRXhwcmVzc2lvbiIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0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JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo3NzY6MTogcnVsZVhBc3NpZ25tZW50CisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldFhFeHByZXNzaW9uQWNjZXNzKCkuZ2V0WEFzc2lnbm1lbnRQYXJzZXJSdWxlQ2FsbCgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWEFzc2lnbm1lbnRfaW5fcnVsZVhFeHByZXNzaW9uMTU5Nyk7CisgICAgICAgICAgICBydWxlWEFzc2lnbm1lbnQoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYRXhwcmVzc2lvbkFjY2VzcygpLmdldFhBc3NpZ25tZW50UGFyc2VyUnVsZUNhbGwoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQ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isgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWEFzc2lnbm1lbnRfaW5fZW50cnlSdWxlWEFzc2lnbm1lbnQxNjIzKTsKKyAgICAgICAgICAgIHJ1bGVYQXNzaWdubWVudCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhBc3NpZ25tZW50UnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVYQXNzaWdubWVudDE2MzApOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZVhBc3NpZ25tZW50IgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVYQXNzaWdubWVudCIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo3OTg6MTogcnVsZVhBc3NpZ25tZW50IDogKCAoIHJ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pcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNDoxOiAoIHJ1bGVfX1hBc3NpZ25tZW50X19BbHRlcm5hdGl2ZXMgKQorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRYQXNzaWdubWVudEFjY2VzcygpLmdldEFsdGVybmF0aXZlcygpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDU6MTogKCBydWxlX19YQXNzaWdubWVudF9fQWx0ZXJuYXRpdmVzICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNToyOiBydWxlX19YQXNzaWdubWVudF9fQWx0ZXJuYXRpdmVzCisgICAgICAgICAgICB7CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19YQXNzaWdubWVudF9fQWx0ZXJuYXRpdmVzX2luX3J1bGVYQXNzaWdubWVudDE2NTYpOworICAgICAgICAgICAgcnVsZV9fWEFzc2lnbm1lbnRfX0FsdGVybmF0aXZlcygpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYQXNzaWdubWVudEFjY2VzcygpLmdldEFsdGVybmF0aXZlcygpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZVhBc3NpZ25tZW50IgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZU9wU2luZ2xlQXNzaWduIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgxNzoxOiBlbnRyeVJ1bGVPcFNpbmdsZUFzc2lnbiA6IHJ1bGVPcFNpbmdsZUFzc2lnbiBFT0YgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIGVudHJ5UnVsZU9wU2luZ2xlQXNzaWduKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmM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WQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlT3BTaW5nbGVBc3NpZ24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZU9wU2luZ2xlQXNzaWduIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgyNjoxOiBydWxlT3BTaW5nbGVBc3NpZ24gOiAoICc9JyApIDsKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBydWxlT3BTaW5nbGVBc3NpZ24oKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworCisgICAgICAgIAkJaW50IHN0YWNrU2l6ZSA9IGtlZXBTdGFja1NpemUoKTsKKyAgICAgICAgICAgIAorICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODMwOjI6ICggKCAnPScgKSApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZ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3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjg0OToxOiBydWxlT3BNdWx0aUFzc2lnbiBFT0YKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0T3BNdWx0aUFzc2lnblJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZU9wTXVsdGlBc3NpZ25faW5fZW50cnlSdWxlT3BNdWx0aUFzc2lnbjE3NDUpOworICAgICAgICAgICAgcnVsZU9wTXVsdGlBc3NpZ24oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRPcE11bHRpQXNzaWduUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVPcE11bHRpQXNzaWduMTc1Mik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuID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L29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjg2MzoyOiBydWxlX19PcE11bHRpQXNzaWduX19BbHRlcm5hdGl2ZXMKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX09wTXVsdGlBc3NpZ25fX0FsdGVybmF0aXZlc19pbl9ydWxlT3BNdWx0aUFzc2lnbjE3NzgpOworICAgICAgICAgICAgcnVsZV9fT3BNdWx0aUFzc2lnbl9fQWx0ZXJuYXRpdmVzKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldE9wTXVsdGlBc3NpZ25BY2Nlc3MoKS5nZXRBbHRlcm5hdGl2ZXMoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVPcE11bHRpQXNzaWduIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZVhPckV4cHJlc3Npb24iCisgICAgLy8gLi4vb3JnLm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ICAgICAgICAgICAgcnVsZVhPckV4cHJlc3Npb24oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYT3JFeHByZXNzaW9uUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVYT3JFeHByZXNzaW9uMTgxMik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlWE9yRXhwcmVzc2lvbiIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlWE9yRXhwcmVzc2lvbiIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4ODQ6MTogcnVsZVhPckV4cHJlc3Npb24gOiAoICggcnVsZV9fWE9yRXhwcmVzc2lvbl9fR3JvdXBfXzAgKSApIDsKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBydWxlWE9yRXhw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ja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WE9yRXhwcmVzc2lvbkFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlWE9yRXhwcmVzc2lvbiIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVPcE9yIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjkwMzoxOiBlbnRyeVJ1bGVPcE9yIDogcnVsZU9wT3IgRU9GIDsKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBlbnRyeVJ1bGVPcE9yKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjkwNDoxOiAoIHJ1bGVPcE9yIEVPRiApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo5MDU6MTogcnVsZU9wT3IgRU9GCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldE9wT3JSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVPcE9yX2luX2VudHJ5UnVsZU9wT3IxODY1KTsKKyAgICAgICAgICAgIHJ1bGVPcE9yKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0T3BPclJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlT3BPcjE4NzIpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIH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ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6OTE3OjE6ICggJ3x8JyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo5MTg6MTogJ3x8JworICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRPcE9yQWNjZXNzKCkuZ2V0VmVydGljYWxMaW5lVmVydGljYWxMaW5lS2V5d29yZCgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCwxNCxGT0xMT1dfMTRfaW5fcnVsZU9wT3IxODk5KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRPcE9yQWNjZXNzKCkuZ2V0VmVydGljYWxMaW5lVmVydGljYWxMaW5lS2V5d29yZCgpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDs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5kRXhwcmVzc2lvblJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVhBbmRFeHByZXNzaW9uX2luX2VudHJ5UnVsZVhBbmRFeHByZXNzaW9uMTkyNyk7CisgICAgICAgICAgICBydWxlWEFuZEV4cHJlc3Npb24oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYQW5kRXhwcmVzc2lvblJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlWEFuZEV4cHJlc3Npb24xOTM0KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVYQW5kRXhwcmVzc2lvbiIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlWEFuZEV4cHJlc3Npb24iCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYW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W9uX19Hcm91cF9fMCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYQW5kRXhwcmVzc2lvbkFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlWEFuZEV4cHJlc3Npb24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlT3BBbmQiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6OTYxOjE6IGVudHJ5UnVsZU9wQW5kIDogcnVsZU9wQW5kIEVPRiA7CisgICAgcHVibGljIGZpbmFsIHZvaWQgZW50cnlSdWxlT3BBbmQoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb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50ZXJuYWxDdWJlRFNMLmc6OTc1OjE6ICggJyYmJyApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo5NzU6MTogKCAnJiYnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjk3NjoxOiAnJiYnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldE9wQW5kQWNjZXNzKCkuZ2V0QW1wZXJzYW5kQW1wZXJzYW5kS2V5d29yZCgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCwxNSxGT0xMT1dfMTVfaW5fcnVsZU9wQW5kMjAyMSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0T3BBbmRBY2Nlc3MoKS5nZXRBbXBlcnNhbmRBbXBlcnNhbmRLZXl3b3JkKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICA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jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6OTkzOjE6IHJ1bGVYRXF1YWxpdHlFeHByZXNzaW9uIEVPRgorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRYRXF1YWxpdHlFeHByZXNzaW9uUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWEVxdWFsaXR5RXhwcmVzc2lvbl9pbl9lbnRyeVJ1bGVYRXF1YWxpdHlFeHByZXNzaW9uMjA0OSk7CisgICAgICAgICAgICBydWxlWEVxdWFsaXR5RXhwcmVzc2lvbigpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhFcXVhbGl0eUV4cHJlc3Npb25SdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZVhFcXVhbGl0eUV4cHJlc3Npb24yMDU2KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAg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wLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDA3OjI6IHJ1bGVfX1hFcXVhbGl0eUV4cHJlc3Npb25fX0dyb3VwX18wCisgICAgICAgICAgICB7CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19YRXF1YWxpdHlFeHByZXNzaW9uX19Hcm91cF9fMF9pbl9ydWxlWEVxdWFsaXR5RXhwcmVzc2lvbjIwODIpOworICAgICAgICAgICAgcnVsZV9fWEVxdWFsaXR5RXhwcmVzc2lvbl9fR3JvdXBfXzAoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WEVxdWFsaXR5RXhwcmVzc2lvbkFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlWEVxdWFsaXR5RXhwcmVzc2lvbi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GVPcEVxdWFsaXR5X2luX2VudHJ5UnVsZU9wRXF1YWxpdHkyMTA5KTsKKyAgICAgICAgICAgIHJ1bGVPcEVxdWFsaXR5KCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0T3BFcXVhbGl0eVJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlT3BFcXVhbGl0eTIxMTYpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZU9wRXF1YWxpdHkiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZU9wRXF1YWxpdHkiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTAyODoxOiBydWxlT3BFcXVhbGl0eSA6ICggKCBydWxlX19PcEVxdWFsaXR5X19BbHRlcm5hdGl2ZXMgKSApIDsKKyAgICBwdW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IDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0T3BFcXVhbGl0eUFjY2VzcygpLmdldEFsdGVybmF0aXZlcygpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZU9wRXF1YWxpdHkiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlWFJlbGF0aW9uYWxFeHByZXNzaW9uIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEwNDc6MTogZW50cnlSdWxlWFJlbGF0aW9uYWxFeHByZXNzaW9uIDogcnVsZVhSZWxhdGlvbmFsRXhwcmVzc2lvbiBFT0YgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIGVudHJ5UnVsZVhSZWxhdGlvbmFsRXhwcmVzc2lvbigpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2Jw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AgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVYUmVsYXRpb25hbEV4cHJlc3Npb24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlT3BDb21wYXJlIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEwNzU6MTogZW50cnlSdWxlT3BDb21wYXJlIDogcnVsZU9wQ29tcGFyZSBFT0YgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIGVudHJ5UnVsZU9wQ29tcGFyZSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDc2OjE6ICggcnVsZU9wQ29tcGFyZSBFT0YgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTA3NzoxOiBydWxlT3BDb21wYXJlIEVPRgorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRPcENvbXBhcmVSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVPcENvbXBhcmVfaW5fZW50cnlSdWxlT3BDb21wYXJlMjIyOSk7CisgICAgICAgICAgICBydWxlT3BDb21wYXJlKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0T3BDb21wYXJlUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVPcENvbXBhcmUyMjM2KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZ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TE6MjogcnVsZV9fT3BDb21wYXJlX19BbHRlcm5hdGl2ZXMKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX09wQ29tcGFyZV9fQWx0ZXJuYXRpdmVzX2luX3J1bGVPcENvbXBhcmUyMjYyKTsKKyAgICAgICAgICAgIHJ1bGVfX09wQ29tcGFyZV9fQWx0ZXJuYXRpdmVzKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldE9wQ29tcGFyZUFjY2VzcygpLmdldEFsdGVybmF0aXZlcygpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZU9wQ29tcGFyZSIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVYT3RoZXJPcGVyYXRvckV4cHJlc3Npb24iCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2N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VyYXRvckV4cHJlc3Npb24yMjg5KTsKKyAgICAgICAgICAgIHJ1bGVYT3RoZXJPcGVyYXRvckV4cHJlc3Npb24oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYT3RoZXJPcGVyYXRvckV4cHJlc3Npb25SdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZVhPdGhlck9wZXJhdG9yRXhwcmVzc2lvbjIyOTYpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZVhPdGhlck9wZXJhdG9yRXhwcmVzc2lvbiIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlWE90aGVyT3BlcmF0b3JFeHByZXNzaW9uIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjExMTI6MTogcnVsZVhPdGhlck9wZXJhdG9yRXhwcmVzc2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wcmVzc2lvbl9fR3JvdXBfXzBfaW5fcnVsZVhPdGhlck9wZXJhdG9yRXhwcmVzc2lvbjIzMjIpOworICAgICAgICAgICAgcnVsZV9fWE90aGVyT3BlcmF0b3JFeHByZXNzaW9uX19Hcm91cF9fMCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYT3RoZXJPcGVyYXRvckV4cHJlc3Npb25BY2Nlc3MoKS5nZXRHcm91cCgpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZVhPdGhlck9wZXJhdG9yRXhwcmVzc2lvbiIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVPcE90aGVyIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjExMzE6MTogZW50cnlSdWxlT3BPdGhlciA6IH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orICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlT3BPdGhlcjIzNTYpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZU9wT3RoZXIiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZU9wT3RoZXIiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTE0MDoxOiBydWxlT3BPdGhlciA6ICggKCBydWxlX19PcE90aGVyX19BbHRlcm5hdGl2ZXMgKSApIDsKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBydWxlT3BPdGhlcigpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisKKyAgICAgICAgCQlpbnQgc3RhY2tTaXplID0ga2VlcFN0YWNrU2l6ZSgpOworICAgICAgICAgICAgCisgICAgICAgIHRyeSB7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnR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5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTE0NzoxOiAoIHJ1bGVfX09wT3RoZXJfX0FsdGVybmF0aXZlcyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMTQ3OjI6IHJ1bGVfX09wT3RoZXJfX0FsdGVybmF0aXZlcworICAgICAgICAgICAgeworICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fT3BPdGhlcl9fQWx0ZXJuYXRpdmVzX2luX3J1bGVPcE90aGVyMjM4Mik7CisgICAgICAgICAgICBydWxlX19PcE90aGVyX19BbHRlcm5hdGl2ZXMoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0T3BPdGhlckFjY2VzcygpLmdldEFsdGVybmF0aXZlcygpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICA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OjE6IHJ1bGVYQWRkaXRpdmVFeHByZXNzaW9uIEVPRgorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRYQWRkaXRpdmVFeHByZXNzaW9uUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWEFkZGl0aXZlRXhwcmVzc2lvbl9pbl9lbnRyeVJ1bGVYQWRkaXRpdmVFeHByZXNzaW9uMjQwOSk7CisgICAgICAgICAgICBydWxlWEFkZGl0aXZlRXhwcmVzc2lvbigpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhBZGRpdGl2ZUV4cHJlc3Npb25SdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZVhBZGRpdGl2ZUV4cHJlc3Npb24yNDE2KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVYQWRkaXRpdmVFeHByZXNza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dWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMTc1OjI6IHJ1bGVfX1hBZGRpdGl2ZUV4cHJlc3Npb25fX0dyb3VwX18wCisgICAgICAgICAgICB7CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19YQWRkaXRpdmVFeHByZXNzaW9uX19Hcm91cF9fMF9pbl9ydWxlWEFkZGl0aXZlRXhwcmVzc2lvbjI0NDIpOworICAgICAgICAgICAgcnVsZV9fWEFkZGl0aXZlRXhwcmVzc2lvbl9fR3JvdXBfXzAoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WEFkZGl0aXZlRXhwcmVzc2lvbkFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlWEFkZGl0aXZlRXhwcmVzc2lvbiIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVPcEFkZCIKKyAgICAvLyAuLi9vcmcuZW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gICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldE9wQWRkUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVPcEFkZDI0NzYpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZU9wQWRkIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVPcEFkZCIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMTk2OjE6IHJ1bGVPcEFkZCA6ICggKCBydWxlX19PcEFkZF9fQWx0ZXJuYXRpdmVzICkgKSA7CisgICAgcHVibGljIGZpbmFsIHZvaWQgcnVsZU9wQWRkKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKworICAgICAgICAJCWludCBzdGFja1NpemUgPSBrZWVwU3RhY2tTaXplKCk7CisgICAgICAgICAgICAKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICA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mdldE9wQWRkQWNjZXNzKCkuZ2V0QWx0ZXJuYXRpdmVzKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyMDM6MTogKCBydWxlX19PcEFkZF9fQWx0ZXJuYXRpdmVzICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyMDM6MjogcnVsZV9fT3BBZGRfX0FsdGVybmF0aXZlcworICAgICAgICAgICAgeworICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fT3BBZGRfX0FsdGVybmF0aXZlc19pbl9ydWxlT3BBZGQyNTAyKTsKKyAgICAgICAgICAgIHJ1bGVfX09wQWRkX19BbHRlcm5hdGl2ZXMoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0T3BBZGRBY2Nlc3MoKS5nZXRBbHRlcm5hdGl2ZXMoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlK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yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyMTc6MTogcnVsZVhNdWx0aXBsaWNhdGl2ZUV4cHJlc3Npb24gRU9GCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldFhNdWx0aXBsaWNhdGl2ZUV4cHJlc3Npb25SdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVYTXVsdGlwbGljYXRpdmVFeHByZXNzaW9uX2luX2VudHJ5UnVsZVhNdWx0aXBsaWNhdGl2ZUV4cHJlc3Npb24yNTI5KTsKKyAgICAgICAgICAgIHJ1bGVYTXVsdGlwbGljYXRpdmVFeHByZXNzaW9uKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WE11bHRpcGxpY2F0aXZlRXhwcmVzc2lvblJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlWE11bHRpcGxpY2F0aXZlRXhwcmVzc2lvbjI1MzYpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZVhNdWx0aXBsaWNhdGl2ZUV4cHJlc3Npb24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZVhNdWx0aXBsaWNhdGl2ZUV4cHJlc3Npb24iCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTIyNDoxOiBydWxlWE11bHRpcGxpY2F0aXZlRXhwcmVzc2lvbiA6ICggKCBydWxlX19YTXVsdGlwbGljYXRpdmVFeHByZXNzaW9uX19Hcm91cF9fMCApICkgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIHJ1bGVYTXVsdGlwbGljYXRpdmVFeHByZXNzaW9uKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKworICAgICAgICAJCWludCBzdGFja1NpemUgPSBrZWVwU3RhY2tTaXplKCk7CisgICAgICAgICAgICAKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyMjg6MjogKCAoICggcnVsZV9fWE11bHRpcGxpY2F0aXZlRXhwcmVzc2lvbl9fR3JvdXBfXzAgKSApICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9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hc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTIzMToxOiAoIHJ1bGVfX1hNdWx0aXBsaWNhdGl2ZUV4cHJlc3Npb25fX0dyb3VwX18wICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyMzE6MjogcnVsZV9fWE11bHRpcGxpY2F0aXZlRXhwcmVzc2lvbl9fR3JvdXBfXzAKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX1hNdWx0aXBsaWNhdGl2ZUV4cHJlc3Npb25fX0dyb3VwX18wX2luX3J1bGVYTXVsdGlwbGljYXRpdmVFeHByZXNzaW9uMjU2Mik7CisgICAgICAgICAgICBydWxlX19YTXVsdGlwbGljYXRpdmVFeHByZXNzaW9uX19Hcm91cF9fMCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYTXVsdGlwbGljYXRpdmVFeHByZXNzaW9uQWNjZXNzKCkuZ2V0R3JvdXAoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJl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yAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0T3BNdWx0aVJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZU9wTXVsdGlfaW5fZW50cnlSdWxlT3BNdWx0aTI1ODkpOworICAgICAgICAgICAgcnVsZU9wTXVsdGkoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRPcE11bHRpUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVPcE11bHRpMjU5Nik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlT3BNdWx0aSIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlT3BNdWx0aSIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWk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CisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRPcE11bHRpQWNjZXNzKCkuZ2V0QWx0ZXJuYXRpdmVzKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlT3BNdWx0aSIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVYVW5hcnlPcGVyYXRpb24iCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTI3MToxOiBlbnRyeVJ1bGVYVW5hcnlPcGVyYXRpb24gOiBydWxlWFVuYXJ5T3BlcmF0aW9uIEVPRiA7CisgICAgcHVibGljIGZpbmFsIHZvaWQgZW50cnlSdWxlWFVuYXJ5T3BlcmF0aW9uKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsK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GlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZVhVbmFyeU9wZXJhdGlvbjI2NTYpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZVhVbmFyeU9wZXJhdGlvbiIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlWFVuYXJ5T3BlcmF0aW9uIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyODA6MTogcnVsZVhVbmFyeU9wZXJhdGlvbiA6ICggKCBydWxlX19YVW5hcnlPcGVyYXRpb25fX0FsdGVybmF0aXZlcyApICkgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIHJ1bGVYVW5hcnlPcGVyYXRpb24oKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworCisgICAgICAgIAkJaW50IHN0YWNrU2l6ZSA9IGtlZXBTdGFja1NpemUoKTsKKyAgICAgICAgICAgIAorICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50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vYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTMwMToxOiBydWxlT3BVbmFyeSBFT0YKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0T3BVbmFyeVJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZU9wVW5hcnlfaW5fZW50cnlSdWxlT3BVbmFyeTI3MDkpOworICAgICAgICAgICAgcnVsZU9wVW5hcnkoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRPcFVuYXJ5UnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVPcFVuYXJ5MjcxNik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlT3BVbmFyeSIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlT3BVbmFyeSIKKyAgICAvLyAuLi9vcmcuZ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TogKCBydWxlWFBvc3RmaXhPcGVyYXRpb24gRU9GICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEzNTc6MTogcnVsZVhQb3N0Zml4T3BlcmF0aW9uIEVPRgorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRYUG9zdGZpeE9wZXJhdGlvblJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVhQb3N0Zml4T3BlcmF0aW9uX2luX2VudHJ5UnVsZVhQb3N0Zml4T3BlcmF0aW9uMjgyOSk7CisgICAgICAgICAgICBydWxlWFBvc3RmaXhPcGVyYXRpb24oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYUG9zdGZpeE9wZXJhdGlvblJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlWFBvc3RmaXhPcGVyYXRpb24yODM2KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7Cisg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uZzoxMzcxOjE6ICggcnVsZV9fWFBvc3RmaXhPcGVyYXRpb25fX0dyb3VwX18wICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEzNzE6MjogcnVsZV9fWFBvc3RmaXhPcGVyYXRpb25fX0dyb3VwX18wCisgICAgICAgICAgICB7CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19YUG9zdGZpeE9wZXJhdGlvbl9fR3JvdXBfXzBfaW5fcnVsZVhQb3N0Zml4T3BlcmF0aW9uMjg2Mik7CisgICAgICAgICAgICBydWxlX19YUG9zdGZpeE9wZXJhdGlvbl9fR3JvdXBfXzAoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WFBvc3RmaXhPcGVyYXRpb25BY2Nlc3MoKS5nZXRHcm91cCgpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgIC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b3N0Zml4UnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlT3BQb3N0Zml4X2luX2VudHJ5UnVsZU9wUG9zdGZpeDI4ODkpOworICAgICAgICAgICAgcnVsZU9wUG9zdGZpeCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldE9wUG9zdGZpeFJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlT3BQb3N0Zml4Mjg5Nik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlT3BQb3N0Zml4IgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVPcFBvc3RmaXgiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTM5MjoxOiBydWxlT3BQb3N0Zml4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AgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRPcFBvc3RmaXhBY2Nlc3MoKS5nZXRBbHRlcm5hdGl2ZXMoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVPcFBvc3RmaXgiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlWE1lbWJlckZlYXR1cmVDYWxsIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE0MTE6MTogZW50cnlSdWxlWE1lbWJlckZlYXR1cmVDYWxsIDogcnVsZVhNZW1iZXJGZWF0dXJlQ2FsbCBFT0YgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIGVudHJ5UnVsZVhNZW1iZXJGZWF0dXJlQ2FsbCgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICAvLyAuLi9vcm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hQcmltYXJ5RXhwcmVzc2lvbl9fQWx0ZXJuYXRpdmVzICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE0NTU6MjogcnVsZV9fWFByaW1hcnlFeHByZXNzaW9uX19BbHRlcm5hdGl2ZXMKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX1hQcmltYXJ5RXhwcmVzc2lvbl9fQWx0ZXJuYXRpdmVzX2luX3J1bGVYUHJpbWFyeUV4cHJlc3Npb24zMDQyKTsKKyAgICAgICAgICAgIHJ1bGVfX1hQcmltYXJ5RXhwcmVzc2lvbl9fQWx0ZXJuYXRpdmVzKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhQcmltYXJ5RXhwcmVzc2lvbkFjY2VzcygpLmdldEFsdGVybmF0aXZlcygpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1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ShncmFtbWFyQWNjZXNzLmdldFhMaXRlcmFsUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWExpdGVyYWxfaW5fZW50cnlSdWxlWExpdGVyYWwzMDY5KTsKKyAgICAgICAgICAgIHJ1bGVYTGl0ZXJhbCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhMaXRlcmFsUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVYTGl0ZXJhbDMwNzYpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZVhMaXRlcmFsIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVYTGl0ZXJhbCIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNDc2OjE6IH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V0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WExpdGVyYWxBY2Nlc3MoKS5nZXRBbHRlcm5hdGl2ZXMoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVYTGl0ZXJhbCIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVYQ29sbGVjdGlvbkxpdGVyYWwiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTQ5NToxOiBlbnRyeVJ1bGVYQ29sbGVjdGlvbkxpdGVyYWwgOiBydWxlWENvbGxlY3Rpb25MaXRlcmFsIEVPRiA7CisgICAgcHVibGljIGZpbmFsIHZvaWQgZW50cnlSdWxlWENvbGxlY3Rpb25MaXRlcmFsKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm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GX2luX2VudHJ5UnVsZVhDb2xsZWN0aW9uTGl0ZXJhbDMxMzYpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZVhDb2xsZWN0aW9uTGl0ZXJhbCIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlWENvbGxlY3Rpb25MaXRlcmFsIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE1MDQ6MTogcnVsZVhDb2xsZWN0aW9uTGl0ZXJhbCA6ICggKCBydWxlX19YQ29sbGVjdGlvbkxpdGVyYWxfX0FsdGVybmF0aXZlcyApICkgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIHJ1bGVYQ29sbGVjdGlvbkxpdGVyYWwoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworCisgICAgICAgIAkJaW50IHN0YWNrU2l6ZSA9IGtlZXBTdGFja1NpemUoKTsKKyAgICAgICAgICAgIAorICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHI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bi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNTI1OjE6IHJ1bGVYU2V0TGl0ZXJhbCBFT0YKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0WFNldExpdGVyYWxSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVYU2V0TGl0ZXJhbF9pbl9lbnRyeVJ1bGVYU2V0TGl0ZXJhbDMxODkpOworICAgICAgICAgICAgcnVsZVhTZXRMaXRlcmFsKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WFNldExpdGVyYWxSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZVhTZXRMaXRlcmFsMzE5Nik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAg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mVEU0wuZzoxNTM5OjI6IHJ1bGVfX1hTZXRMaXRlcmFsX19Hcm91cF9fMAorICAgICAgICAgICAgeworICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fWFNldExpdGVyYWxfX0dyb3VwX18wX2luX3J1bGVYU2V0TGl0ZXJhbDMyMjIpOworICAgICAgICAgICAgcnVsZV9fWFNldExpdGVyYWxfX0dyb3VwX18wKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhTZXRMaXRlcmFsQWNjZXNzKCkuZ2V0R3JvdXAoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVYU2V0TGl0ZXJhbCIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVYTGlzdExpdGVyYWwiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50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gcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYTGlzdExpdGVyYWxSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZVhMaXN0TGl0ZXJhbDMyNTYpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZVhMaXN0TGl0ZXJhbCIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlWExpc3RMaXRlcmFsIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE1NjA6MTogcnVsZVhMaXN0TGl0ZXJhbCA6ICggKCBydWxlX19YTGlzdExpdGVyYWxfX0dyb3VwX18wICkgKSA7CisgICAgcHVibGljIGZpbmFsIHZvaWQgcnVsZVhMaXN0TGl0ZXJhbCgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisKKyAgICAgICAgCQlpbnQgc3RhY2tTaXplID0ga2VlcFN0YWNrU2l6ZSgpOworICAgICAgICAgICAgCisgICAgICAg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ZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTU4MToxOiBydWxlWENsb3N1cmUgRU9GCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldFhDbG9zdXJlUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWENsb3N1cmVfaW5fZW50cnlSdWxlWENsb3N1cmUzMzA5KTsKKyAgICAgICAgICAgIHJ1bGVYQ2xvc3VyZSgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhDbG9zdXJlUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVYQ2xvc3VyZTMzMTYpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZVhDbG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hGb2xsb3coRk9MTE9XX3J1bGVfX1hDbG9zdXJlX19Hcm91cF9fMF9pbl9ydWxlWENsb3N1cmUzMzQyKTsKKyAgICAgICAgICAgIHJ1bGVfX1hDbG9zdXJlX19Hcm91cF9fMCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYQ2xvc3VyZUFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlWENsb3N1cmUiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlWEV4cHJlc3Npb25JbkNsb3N1cmUiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTYwNzoxOiBlbnRyeVJ1bGVYRXhwcmVzc2lvbkluQ2xvc3VyZSA6IHJ1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ggcnVsZV9fWEV4cHJlc3Npb25JbkNsb3N1cmVfX0dyb3VwX18wICkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0WEV4cHJlc3Npb25JbkNsb3N1cmVBY2Nlc3MoKS5nZXRHcm91cCgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNjIzOjE6ICggcnVsZV9fWEV4cHJlc3Npb25JbkNsb3N1cmVfX0dyb3VwX18wICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE2MjM6MjogcnVsZV9fWEV4cHJlc3Npb25JbkNsb3N1cmVfX0dyb3VwX18wCisgICAgICAgICAgICB7CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19YRXhwcmVzc2lvbkluQ2xvc3VyZV9fR3JvdXBfXzBfaW5fcnVsZVhFeHByZXNzaW9uSW5DbG9zdXJlMzQwMik7CisgICAgICAgICAgICBydWxlX19YRXhwcmVzc2lvbkluQ2xvc3VyZV9fR3JvdXBfXzAoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICB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5hbEN1YmVEU0wuZzoxNjUxOjE6ICggcnVsZV9fWFNob3J0Q2xvc3VyZV9fR3JvdXBfXzAgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTY1MToyOiBydWxlX19YU2hvcnRDbG9zdXJlX19Hcm91cF9fMAorICAgICAgICAgICAgeworICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fWFNob3J0Q2xvc3VyZV9fR3JvdXBfXzBfaW5fcnVsZVhTaG9ydENsb3N1cmUzNDYyKTsKKyAgICAgICAgICAgIHJ1bGVfX1hTaG9ydENsb3N1cmVfX0dyb3VwX18wKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhTaG9ydENsb3N1cmVBY2Nlc3MoKS5nZXRHcm91cCgpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICA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gICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRYUGFyZW50aGVzaXplZEV4cHJlc3Npb25SdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVYUGFyZW50aGVzaXplZEV4cHJlc3Npb25faW5fZW50cnlSdWxlWFBhcmVudGhlc2l6ZWRFeHByZXNzaW9uMzQ4OSk7CisgICAgICAgICAgICBydWxlWFBhcmVudGhlc2l6ZWRFeHByZXNzaW9uKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WFBhcmVudGhlc2l6ZWRFeHByZXNzaW9uUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVYUGFyZW50aGVzaXplZEV4cHJlc3Npb24zNDk2KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVYUGFyZW50aGVzaXplZEV4cHJlc3Npb24iCisKKworICAgIC8v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vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTY3OToyOiBydWxlX19YUGFyZW50aGVzaXplZEV4cHJlc3Npb25fX0dyb3VwX18wCisgICAgICAgICAgICB7CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19YUGFyZW50aGVzaXplZEV4cHJlc3Npb25fX0dyb3VwX18wX2luX3J1bGVYUGFyZW50aGVzaXplZEV4cHJlc3Npb24zNTIyKTsKKyAgICAgICAgICAgIHJ1bGVfX1hQYXJlbnRoZXNpemVkRXhwcmVzc2lvbl9fR3JvdXBfXzAoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WFBhcmVudGhlc2l6ZWRFeHByZXNzaW9uQWNjZXNzKCkuZ2V0R3JvdXAoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVYUGFyZW50aGVzaXplZEV4cHJlc3Npb24iCisKKworICAgIC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AgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWElmRXhwcmVzc2lvbl9pbl9lbnRyeVJ1bGVYSWZFeHByZXNzaW9uMzU0OSk7CisgICAgICAgICAgICBydWxlWElmRXhwcmVzc2lvbigpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhJZkV4cHJlc3Npb25SdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZVhJZkV4cHJlc3Npb24zNTU2KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVYSWZFeHByZXNzaW9uIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVYSWZFeHByZXNzaW9uIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE3MDA6MTogcnVsZVhJZkV4cHJlc3Npb24gOiAoICggcnVsZV9fWElm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cmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WElmRXhwcmVzc2lvbkFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlWElmRXhwcmVzc2lvbiIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVYU3dpdGNoRXhwcmVzc2lvbiIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNzE5OjE6IGVudHJ5UnVsZVhTd2l0Y2hFeHByZXNzaW9uIDogcnVsZVhTd2l0Y2hFeHByZXNzaW9uIEVPRiA7CisgICAgcHVibGljIGZpbmFsIHZvaWQgZW50cnlSdWxlWFN3aXRjaEV4cHJlc3Npb24oKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3Nic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9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE3MzU6MTogKCBydWxlX19YU3dpdGNoRXhwcmVzc2lvbl9fR3JvdXBfXzAgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTczNToyOiBydWxlX19YU3dpdGNoRXhwcmVzc2lvbl9fR3JvdXBfXzAKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX1hTd2l0Y2hFeHByZXNzaW9uX19Hcm91cF9fMF9pbl9ydWxlWFN3aXRjaEV4cHJlc3Npb24zNjQyKTsKKyAgICAgICAgICAgIHJ1bGVfX1hTd2l0Y2hFeHByZXNzaW9uX19Hcm91cF9fMCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYU3dpdGNoRXhwcmVzc2lvbkFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpO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ENhc2VQYXJ0IEVPRgorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRYQ2FzZVBhcnRSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVYQ2FzZVBhcnRfaW5fZW50cnlSdWxlWENhc2VQYXJ0MzY2OSk7CisgICAgICAgICAgICBydWxlWENhc2VQYXJ0KCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WENhc2VQYXJ0UnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVYQ2FzZVBhcnQzNjc2KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVYQ2FzZVBhcnQiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZVhDYXNlUGFydCIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1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KKyAgICAgICAgICAgIHJ1bGVfX1hDYXNlUGFydF9fR3JvdXBfXzAoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WENhc2VQYXJ0QWNjZXNzKCkuZ2V0R3JvdXAoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVYQ2FzZVBhcnQiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlWEZvckxvb3BFeHByZXNzaW9uIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE3NzU6MTogZW50cnlSdWxlWEZvckxvb3BFeHByZXNzaW9uIDogcnVsZVhGb3JMb29wRXhwcmVzc2lvbiBFT0YgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIGVudHJ5UnVsZVhGb3JMb29wRXhwcmVzc2lvbig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EZvckxvb3BFeHByZXNzaW9uUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVYRm9yTG9vcEV4cHJlc3Npb24zNzM2KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVYRm9yTG9vcEV4cHJlc3Npb24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZVhGb3JMb29wRXhwcmVzc2lvbiIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNzg0OjE6IHJ1bGVYRm9yTG9vcEV4cHJlc3Npb24gOiAoICggcnVsZV9fWEZvckxvb3BFeHByZXNzaW9uX19Hcm91cF9fMCApICkgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIHJ1bGVYRm9yTG9vcEV4cHJlc3Npb24oKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworCisgICAgICAgIAkJaW50IHN0YWNrU2l6ZSA9IGtlZXBTdGFja1NpemUoKTsKKyAgICAgICAgICAgIAorICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC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gICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVYRm9yTG9vcEV4cHJlc3Npb24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlWEJhc2ljRm9yTG9vcEV4cHJlc3Npb24iCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTgwMzoxOiBlbnRyeVJ1bGVYQmFzaWNGb3JMb29wRXhwcmVzc2lvbiA6IHJ1bGVYQmFzaWNGb3JMb29wRXhwcmVzc2lvbiBFT0YgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIGVudHJ5UnVsZVhCYXNpY0Zvckxvb3BFeHByZXNzaW9uKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE4MDQ6MTogKCBydWxlWEJhc2ljRm9yTG9vcEV4cHJlc3Npb24gRU9GICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE4MDU6MTogcnVsZVhCYXNpY0Zvckxvb3BFeHByZXNzaW9uIEVPRgorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRYQmFzaWNGb3JMb29wRXhwcmVzc2lvblJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVhCYXNpY0Zvckxvb3BFeHByZXNzaW9uX2luX2VudHJ5UnVsZVhCYXNpY0Zvckxvb3BFeHByZXNzaW9uMzc4OSk7CisgICAgICAgICAgICBydWxlWEJhc2ljRm9yTG9vcEV4cHJlc3Npb24oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYQmFzaWNGb3JMb29wRXhwcmVzc2lvblJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlWEJhc2ljRm9yTG9vcEV4cHJlc3Npb24zNzk2KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICA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YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxODE5OjE6ICggcnVsZV9fWEJhc2ljRm9yTG9vcEV4cHJlc3Npb25fX0dyb3VwX18wICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE4MTk6MjogcnVsZV9fWEJhc2ljRm9yTG9vcEV4cHJlc3Npb25fX0dyb3VwX18wCisgICAgICAgICAgICB7CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19YQmFzaWNGb3JMb29wRXhwcmVzc2lvbl9fR3JvdXBfXzBfaW5fcnVsZVhCYXNpY0Zvckxvb3BFeHByZXNzaW9uMzgyMik7CisgICAgICAgICAgICBydWxlX19YQmFzaWNGb3JMb29wRXhwcmVzc2lvbl9fR3JvdXBfXzAoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WEJhc2ljRm9yTG9vcEV4cHJlc3Npb25BY2Nlc3MoKS5nZXRHcm91cCgpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgIC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3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTgzMzoxOiBydWxlWFdoaWxlRXhwcmVzc2lvbiBFT0YKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0WFdoaWxlRXhwcmVzc2lvblJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVhXaGlsZUV4cHJlc3Npb25faW5fZW50cnlSdWxlWFdoaWxlRXhwcmVzc2lvbjM4NDkpOworICAgICAgICAgICAgcnVsZVhXaGlsZUV4cHJlc3Npb24oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYV2hpbGVFeHByZXNzaW9uUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVYV2hpbGVFeHByZXNzaW9uMzg1Nik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOV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VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTg0NzoyOiBydWxlX19YV2hpbGVFeHByZXNzaW9uX19Hcm91cF9fMAorICAgICAgICAgICAgeworICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fWFdoaWxlRXhwcmVzc2lvbl9fR3JvdXBfXzBfaW5fcnVsZVhXaGlsZUV4cHJlc3Npb24zODgyKTsKKyAgICAgICAgICAgIHJ1bGVfX1hXaGlsZUV4cHJlc3Npb25fX0dyb3VwX18wKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhXaGlsZUV4cHJlc3Npb25BY2Nlc3MoKS5nZXRHcm91cCgpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZVhXaGlsZUV4cHJlc3Npb24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlWERvV2hpbGVFeHByZXNzaW9uIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zY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25faW5fZW50cnlSdWxlWERvV2hpbGVFeHByZXNzaW9uMzkwOSk7CisgICAgICAgICAgICBydWxlWERvV2hpbGVFeHByZXNzaW9uKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WERvV2hpbGVFeHByZXNzaW9uUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVYRG9XaGlsZUV4cHJlc3Npb24zOTE2KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVYRG9XaGlsZUV4cHJlc3Npb24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZVhEb1doaWxlRXhwcmVzc2lvbiIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxODY4OjE6IHJ1bGVYRG9XaGlsZUV4cHJlc3Npb24gOiAoIC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vdXBfXzAoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WERvV2hpbGVFeHByZXNzaW9uQWNjZXNzKCkuZ2V0R3JvdXAoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVYRG9XaGlsZUV4cHJlc3Npb24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlWEJsb2NrRXhwcmVzc2lvbiIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxODg3OjE6IGVudHJ5UnVsZVhCbG9ja0V4cHJlc3Npb24gOiBydWxlWEJsb2NrRXhwcmVzc2lvbiBFT0YgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIGVudHJ5UnVsZVhCbG9ja0V4cHJlc3Npb24oKSB0aHJvd3MgU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gICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZVhCbG9ja0V4cHJlc3Npb24zOTc2KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVYQmxvY2tFeHByZXNzaW9uIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVYQmxvY2tFeHByZXNzaW9uIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE4OTY6MTogcnVsZVhCbG9ja0V4cHJlc3Npb24gOiAoICggcnVsZV9fWEJsb2NrRXhwcmVzc2lvbl9fR3JvdXBfXzAgKSApIDsKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBydWxlWEJsb2NrRXhwcmVzc2lvbigpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisKKyAgICAgICAgCQlpbnQgc3RhY2tTaXplID0ga2VlcFN0YWNrU2l6ZSgpOworICAgICAgICAgICAgCisgICAgICAgIHRyeSB7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3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LmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE5MDM6MTogKCBydWxlX19YQmxvY2tFeHByZXNzaW9uX19Hcm91cF9fMCApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOTAzOjI6IHJ1bGVfX1hCbG9ja0V4cHJlc3Npb25fX0dyb3VwX18wCisgICAgICAgICAgICB7CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19YQmxvY2tFeHByZXNzaW9uX19Hcm91cF9fMF9pbl9ydWxlWEJsb2NrRXhwcmVzc2lvbjQwMDIpOworICAgICAgICAgICAgcnVsZV9fWEJsb2NrRXhwcmVzc2lvbl9fR3JvdXBfXzAoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WEJsb2NrRXhwcmVzc2lvbkFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ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jaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZVhFeHByZXNzaW9uT3JWYXJEZWNsYXJhdGlvbiIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlWEV4cHJlc3Npb25PclZhckRlY2xhcmF0aW9uIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE5MjQ6MTogcnVsZVhFeHByZXNzaW9uT3JWYXJEZWNsYXJhdGlvbiA6ICggKCBydWxlX19YRXhwcmVzc2lvbk9yVmFyRGVjbGFyYXRpb25fX0FsdGVybmF0aXZlcyApICkgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIHJ1bGVYRXhwcmVzc2lvbk9yVmFyRGVjbGFyYXRpb24oKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworCisgICAgICAgIAkJaW50IHN0YWNrU2l6ZSA9IGtlZXBTdGFja1NpemUoKTsKKyAgICAgICAgICAgIAorICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTkyODoyOiAoICggKCBydWxlX19YRXhwcmVzc2lvbk9yV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gICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlWEV4cHJlc3Npb25PclZhckRlY2xhcmF0aW9uIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZVhWYXJpYWJsZURlY2xhcmF0aW9uIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE5NDM6MTogZW50cnlSdWxlWFZhcmlhYmxlRGVjbGFyYXRpb24gOiBydWxlWFZhcmlhYmxlRGVjbGFyYXRpb24gRU9GIDsKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBlbnRyeVJ1bGVYVmFyaWFibGVEZWNsYXJhdGlvbigpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOTQ0OjE6ICggcnVsZVh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Rlcm5hbEN1YmVEU0wuZzoxOTczOjE6IHJ1bGVKdm1Gb3JtYWxQYXJhbWV0ZXIgRU9GCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldEp2bUZvcm1hbFBhcmFtZXRlclJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZUp2bUZvcm1hbFBhcmFtZXRlcl9pbl9lbnRyeVJ1bGVKdm1Gb3JtYWxQYXJhbWV0ZXI0MTQ5KTsKKyAgICAgICAgICAgIHJ1bGVKdm1Gb3JtYWxQYXJhbWV0ZXIoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRKdm1Gb3JtYWxQYXJhbWV0ZXJSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZUp2bUZvcm1hbFBhcmFtZXRlcjQxNTYpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5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ZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOTg3OjI6IHJ1bGVfX0p2bUZvcm1hbFBhcmFtZXRlcl9fR3JvdXBfXzAKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX0p2bUZvcm1hbFBhcmFtZXRlcl9fR3JvdXBfXzBfaW5fcnVsZUp2bUZvcm1hbFBhcmFtZXRlcjQxODIpOworICAgICAgICAgICAgcnVsZV9fSnZtRm9ybWFsUGFyYW1ldGVyX19Hcm91cF9fMCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRKdm1Gb3JtYWxQYXJhbWV0ZXJBY2Nlc3MoKS5nZXRHcm91cCgpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZUp2bUZvcm1hbFBhcmFtZXRlciIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1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m1hbFBhcmFtZXRlcl9fR3JvdXBfXzAKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX0Z1bGxKdm1Gb3JtYWxQYXJhbWV0ZXJfX0dyb3VwX18wX2luX3J1bGVGdWxsSnZtRm9ybWFsUGFyYW1ldGVyNDI0Mik7CisgICAgICAgICAgICBydWxlX19GdWxsSnZtRm9ybWFsUGFyYW1ldGVyX19Hcm91cF9fMCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRGdWxsSnZtRm9ybWFsUGFyYW1ldGVyQWNjZXNzKCkuZ2V0R3JvdXAoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVGdWxsSnZtRm9ybWFsUGFyYW1ldGVyIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZVhGZWF0dXJlQ2FsbCIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBz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gICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldFhGZWF0dXJlQ2FsbEFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIwNDM6MTogKCBydWxlX19YRmVhdHVyZUNhbGxfX0dyb3VwX18wICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIwNDM6MjogcnVsZV9fWEZlYXR1cmVDYWxsX19Hcm91cF9fMAorICAgICAgICAgICAgeworICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fWEZlYXR1cmVDYWxsX19Hcm91cF9fMF9pbl9ydWxlWEZlYXR1cmVDYWxsNDMwMik7CisgICAgICAgICAgICBydWxlX19YRmVhdHVyZUNhbGxfX0dyb3VwX18wKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhGZWF0dXJlQ2FsbEFjY2VzcygpLmdldEdyb3V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AgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjA1NzoxOiBydWxlRmVhdHVyZUNhbGxJRCBFT0YKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0RmVhdHVyZUNhbGxJRFJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZUZlYXR1cmVDYWxsSURfaW5fZW50cnlSdWxlRmVhdHVyZUNhbGxJRDQzMjkpOworICAgICAgICAgICAgcnVsZUZlYXR1cmVDYWxsSUQoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRGZWF0dXJlQ2FsbElEUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVGZWF0dXJlQ2FsbElENDMzNik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICA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gIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIwNzE6MjogcnVsZV9fRmVhdHVyZUNhbGxJRF9fQWx0ZXJuYXRpdmVzCisgICAgICAgICAgICB7CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19GZWF0dXJlQ2FsbElEX19BbHRlcm5hdGl2ZXNfaW5fcnVsZUZlYXR1cmVDYWxsSUQ0MzYyKTsKKyAgICAgICAgICAgIHJ1bGVfX0ZlYXR1cmVDYWxsSURfX0FsdGVybmF0aXZlcygpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRGZWF0dXJlQ2FsbElEQWNjZXNzKCkuZ2V0QWx0ZXJuYXRpdmVzKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlRmVhdHVyZUNhbGx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sZUlkT3JTdXBlcl9pbl9lbnRyeVJ1bGVJZE9yU3VwZXI0Mzg5KTsKKyAgICAgICAgICAgIHJ1bGVJZE9yU3VwZXIoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRJZE9yU3VwZXJSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZUlkT3JTdXBlcjQzOTYpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZUlkT3JTdXBlciIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlSWRPclN1cGVyIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIwOTI6MTogcnVsZUlkT3JTdXBlciA6ICggKCBydWxlX19JZE9yU3VwZXJfX0FsdGVybmF0aXZlcyApICkgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIHJ1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mFsQ3ViZURTTC5nOjIwOTg6MTogKCBydWxlX19JZE9yU3VwZXJfX0FsdGVybmF0aXZlcyApCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldElkT3JTdXBlckFjY2VzcygpLmdldEFsdGVybmF0aXZlcygpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMDk5OjE6ICggcnVsZV9fSWRPclN1cGVyX19BbHRlcm5hdGl2ZXMgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjA5OToyOiBydWxlX19JZE9yU3VwZXJfX0FsdGVybmF0aXZlcworICAgICAgICAgICAgeworICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fSWRPclN1cGVyX19BbHRlcm5hdGl2ZXNfaW5fcnVsZUlkT3JTdXBlcjQ0MjIpOworICAgICAgICAgICAgcnVsZV9fSWRPclN1cGVyX19BbHRlcm5hdGl2ZXMoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHs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Fzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMTI3OjE6ICggcnVsZV9fWENvbnN0cnVjdG9yQ2FsbF9fR3JvdXBfXzAgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjEyNzoyOiBydWxlX19YQ29uc3RydWN0b3JDYWxsX19Hcm91cF9fMAorICAgICAgICAgICAgeworICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fWENvbnN0cnVjdG9yQ2FsbF9fR3JvdXBfXzBfaW5fcnVsZVhDb25zdHJ1Y3RvckNhbGw0NDgyKTsKKyAgICAgICAgICAgIHJ1bGVfX1hDb25zdHJ1Y3RvckNhbGxfX0dyb3VwX18wKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhDb25zdHJ1Y3RvckNhbGxBY2Nlc3MoKS5nZXRHcm91cCgpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICA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ICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRYQm9vbGVhbkxpdGVyYWxSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVYQm9vbGVhbkxpdGVyYWxfaW5fZW50cnlSdWxlWEJvb2xlYW5MaXRlcmFsNDUwOSk7CisgICAgICAgICAgICBydWxlWEJvb2xlYW5MaXRlcmFsKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WEJvb2xlYW5MaXRlcmFsUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVYQm9vbGVhbkxpdGVyYWw0NTE2KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVYQm9vbGVhbkxpdGVyYWwiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZVhCb29sZWFuTGl0ZXJhbCIKKyAgICAvLyAuLi9vcmcuZWN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gICB7CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19YQm9vbGVhbkxpdGVyYWxfX0dyb3VwX18wX2luX3J1bGVYQm9vbGVhbkxpdGVyYWw0NTQyKTsKKyAgICAgICAgICAgIHJ1bGVfX1hCb29sZWFuTGl0ZXJhbF9fR3JvdXBfXzAoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WEJvb2xlYW5MaXRlcmFsQWNjZXNzKCkuZ2V0R3JvdXAoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVYQm9vbGVhbkxpdGVyYWwiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlWE51bGxMaXRlcmFsIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIxNjc6MTogZW50c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hY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WE51bGxMaXRlcmFsUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVYTnVsbExpdGVyYWw0NTc2KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVYTnVsbExpdGVyYWwiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZVhOdWxsTGl0ZXJhbCIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMTc2OjE6IHJ1bGVYTnVsbExpdGVyYWwgOiAoICggcnVsZV9fWE51bGxMaXRlcmFsX19Hcm91cF9fMCApICkgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIHJ1bGVYTnVsbExpdGVyYWwoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworCisgICAgICAgIAkJaW50IHN0YWNrU2l6ZSA9IGtlZXBTdGFja1NpemUoKTsKKyAgICAgICAgICAgIAorICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb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29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIxOTc6MTogcnVsZVhOdW1iZXJMaXRlcmFsIEVPRgorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRYTnVtYmVyTGl0ZXJhbFJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVhOdW1iZXJMaXRlcmFsX2luX2VudHJ5UnVsZVhOdW1iZXJMaXRlcmFsNDYyOSk7CisgICAgICAgICAgICBydWxlWE51bWJlckxpdGVyYWwoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYTnVtYmVyTGl0ZXJhbFJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlWE51bWJlckxpdGVyYWw0NjM2KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5U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GVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIyMTE6MjogcnVsZV9fWE51bWJlckxpdGVyYWxfX0dyb3VwX18wCisgICAgICAgICAgICB7CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19YTnVtYmVyTGl0ZXJhbF9fR3JvdXBfXzBfaW5fcnVsZVhOdW1iZXJMaXRlcmFsNDY2Mik7CisgICAgICAgICAgICBydWxlX19YTnVtYmVyTGl0ZXJhbF9fR3JvdXBfXzAoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WE51bWJlckxpdGVyYWxBY2Nlc3MoKS5nZXRHcm91cCgpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZVhOdW1iZXJMaXRlcmFsIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZVhTdHJpbmdMaXRlcmFsIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveH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MaXRlcmFsKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WFN0cmluZ0xpdGVyYWxSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZVhTdHJpbmdMaXRlcmFsNDY5Nik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlWFN0cmluZ0xpdGVyYWwiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZVhTdHJpbmdMaXRlcmFsIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIyMzI6MTogcnVsZVhTdHJpbmdMaXRlcmFsIDogKCAoIHJ1bGVfX1hTdHJpbmdMaXRlcmFsX19Hcm91cF9fMCApICkgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIHJ1bGVYU3RyaW5nTGl0ZXJhbCgpIHRocm93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zdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhTdHJpbmdMaXRlcmFsQWNjZXNzKCkuZ2V0R3JvdXAoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVYU3RyaW5nTGl0ZXJhbCIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVYVHlwZUxpdGVyYWwiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjI1MToxOiBlbnRyeVJ1bGVYVHlwZUxpdGVyYWwgOiBydWxlWFR5cGVMaXRlcmFsIEVPRiA7CisgICAgcHVibGljIGZpbmFsIHZvaWQgZW50cnlSdWxlWFR5cGVMaXRlcmFsKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC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V9fWFR5cGVMaXRlcmFsX19Hcm91cF9fMCApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMjY3OjI6IHJ1bGVfX1hUeXBlTGl0ZXJhbF9fR3JvdXBfXzAKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX1hUeXBlTGl0ZXJhbF9fR3JvdXBfXzBfaW5fcnVsZVhUeXBlTGl0ZXJhbDQ3ODIpOworICAgICAgICAgICAgcnVsZV9fWFR5cGVMaXRlcmFsX19Hcm91cF9fMCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYVHlwZUxpdGVyYWxBY2Nlc3MoKS5nZXRHcm91cCgpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExS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Npb25SdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVYVGhyb3dFeHByZXNzaW9uX2luX2VudHJ5UnVsZVhUaHJvd0V4cHJlc3Npb240ODA5KTsKKyAgICAgICAgICAgIHJ1bGVYVGhyb3dFeHByZXNzaW9uKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WFRocm93RXhwcmVzc2lvblJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlWFRocm93RXhwcmVzc2lvbjQ4MTYpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZVhUaHJvd0V4cHJlc3Npb24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZVhUaHJvd0V4cHJlc3Npb24iCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZX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AgICBydWxlX19YVGhyb3dFeHByZXNzaW9uX19Hcm91cF9fMCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYVGhyb3dFeHByZXNzaW9uQWNjZXNzKCkuZ2V0R3JvdXAoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVYVGhyb3dFeHByZXNzaW9uIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZVhSZXR1cm5FeHByZXNzaW9uIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIzMDc6MTogZW50cnlSdWxlWFJldHVybkV4cHJlc3Npb24gOiBydWxlWFJldHVybkV4cHJlc3Npb24gRU9GIDsKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBlbnRyeVJ1bGVYUmV0dXJuRXhwcmVzc2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2V0WFJldHVybkV4cHJlc3Npb25SdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZVhSZXR1cm5FeHByZXNzaW9uNDg3Nik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlWFJldHVybkV4cHJlc3Npb24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZVhSZXR1cm5FeHByZXNzaW9uIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIzMTY6MTogcnVsZVhSZXR1cm5FeHByZXNzaW9uIDogKCAoIHJ1bGVfX1hSZXR1cm5FeHByZXNzaW9uX19Hcm91cF9fMCApICkgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIHJ1bGVYUmV0dXJuRXhwcmVzc2lvbigpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisKKyAgICAgICAgCQlpbnQgc3RhY2tTaXplID0ga2VlcFN0YWNrU2l6ZSgpOworICAgICAgICAgICAgCisgICAgICAgIHRyeSB7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1Y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pOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlWFRyeUNhdGNoRmluYWxseUV4cHJlc3Npb24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlWFN5bmNocm9uaXplZEV4cHJlc3Npb24iCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjM2MzoxOiBlbnRyeVJ1bGVYU3luY2hyb25pemVkRXhwcmVzc2lvbiA6IHJ1bGVYU3luY2hyb25pemVkRXhwcmVzc2lvbiBFT0YgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIGVudHJ5UnVsZVhTeW5jaHJvbml6ZWRFeHByZXNzaW9uKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIzNjQ6MTogKCBydWxlWFN5bmNocm9uaXplZEV4cHJlc3Npb24gRU9GICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIzNjU6MTogcnVsZVhTeW5jaHJvbml6ZWRFeHByZXNzaW9uIEVPRgorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRYU3luY2hyb25pemVkRXhwcmVzc2lvblJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVhTeW5jaHJvbml6ZWRFeHByZXNzaW9uX2luX2VudHJ5UnVsZVhTeW5jaHJvbml6ZWRFeHByZXNzaW9uNDk4OSk7CisgICAgICAgICAgICBydWxlWFN5bmNocm9uaXplZEV4cHJlc3Npb24oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYU3luY2hyb25pemVkRXhwcmVzc2lvblJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlWFN5bmNocm9uaXplZEV4cHJlc3Npb240OTk2KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVYU3luY2hyb25pemVkRXhwcmVzc2lvbiIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlWFN5bmNocm9uaXplZEV4cHJlc3Npb24iCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjM3MjoxOiBydWxlWFN5bmNocm9uaXplZEV4cHJlc3Npb24gOiAoICggcnVsZV9fWFN5bmNocm9uaXplZEV4cHJlc3Npb25fX0dyb3VwX18wICkgKSA7CisgICAgcHVibGljIGZpbmFsIHZvaWQgcnVsZVhTeW5jaHJvbml6ZWRFeHByZXNzaW9uKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKworICAgICAgICAJCWludCBzdGFja1NpemUgPSBrZWVwU3RhY2tTaXplKCk7CisgICAgICAgICAgICAKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIzNzY6MjogKCAoICggcnVsZV9fWFN5bmNocm9uaXplZEV4cHJlc3Npb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Vkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMzc5OjE6ICggcnVsZV9fWFN5bmNocm9uaXplZEV4cHJlc3Npb25fX0dyb3VwX18wICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIzNzk6MjogcnVsZV9fWFN5bmNocm9uaXplZEV4cHJlc3Npb25fX0dyb3VwX18wCisgICAgICAgICAgICB7CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19YU3luY2hyb25pemVkRXhwcmVzc2lvbl9fR3JvdXBfXzBfaW5fcnVsZVhTeW5jaHJvbml6ZWRFeHByZXNzaW9uNTAyMik7CisgICAgICAgICAgICBydWxlX19YU3luY2hyb25pemVkRXhwcmVzc2lvbl9fR3JvdXBfXzAoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WFN5bmNocm9uaXplZEV4cHJlc3Npb25BY2Nlc3MoKS5nZXRHcm91cCgpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9yd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xyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIzOTM6MTogcnVsZVhDYXRjaENsYXVzZSBFT0YKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0WENhdGNoQ2xhdXNlUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWENhdGNoQ2xhdXNlX2luX2VudHJ5UnVsZVhDYXRjaENsYXVzZTUwNDkpOworICAgICAgICAgICAgcnVsZVhDYXRjaENsYXVzZSgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhDYXRjaENsYXVzZVJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlWENhdGNoQ2xhdXNlNTA1Nik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlWENhdGNoQ2xhdXNlIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1b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HNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI0MDU6MTogKCAoIHJ1bGVfX1hDYXRjaENsYXVzZV9fR3JvdXBfXzAgKSApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNDA2OjE6ICggcnVsZV9fWENhdGNoQ2xhdXNlX19Hcm91cF9fMCApCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldFhDYXRjaENsYXVzZUFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI0MDc6MTogKCBydWxlX19YQ2F0Y2hDbGF1c2VfX0dyb3VwX18wICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI0MDc6MjogcnVsZV9fWENhdGNoQ2xhdXNlX19Hcm91cF9fMAorICAgICAgICAgICAgeworICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fWENhdGNoQ2xhdXNlX19Hcm91cF9fMF9pbl9ydWxlWENhdGNoQ2xhdXNlNTA4Mik7CisgICAgICAgICAgICBydWxlX19YQ2F0Y2hDbGF1c2VfX0dyb3VwX18wKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhDYXRjaENsYXVzZUFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlWENhdGNoQ2xhdXNlIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZU51bWJlciIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNDE5OjE6IGVudHJ5UnVsZU51bWJlciA6IHJ1bGVOdW1iZXIgRU9GIDsKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBlbnRyeVJ1bGVOdW1iZXIoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworCisgICAgICAgIAlIaWRkZW5Ub2tlbnMgbXlIaWRkZW5Ub2tlblN0YXRlID0gKChYdGV4dFRva2VuU3RyZWFtKWlucHV0KS5zZXRIaWRkZW5Ub2tlbnMoKTsKKworICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjQyMzoxOiAoIHJ1bGVOdW1iZXIgRU9GICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI0MjQ6MTogcnVsZU51bWJlciBFT0YKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0TnVtYmVyUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlTnVtYmVyX2luX2VudHJ5UnVsZU51bWJlcjUxMTQpOworICAgICAgICAgICAgcnVsZU51bWJlcigpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY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ZXJuYXRpdmVzICkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0TnVtYmVyQWNjZXNzKCkuZ2V0QWx0ZXJuYXRpdmVzKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI0NDI6MTogKCBydWxlX19OdW1iZXJfX0FsdGVybmF0aXZlcyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNDQyOjI6IHJ1bGVfX051bWJlcl9fQWx0ZXJuYXRpdmVzCisgICAgICAgICAgICB7CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19OdW1iZXJfX0FsdGVybmF0aXZlc19pbl9ydWxlTnVtYmVyNTE1MSk7CisgICAgICAgICAgICBydWxlX19OdW1iZXJfX0FsdGVybmF0aXZlcygpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXROdW1iZXJBY2Nlc3MoKS5nZXRBbHRlcm5hdGl2ZXMoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKyAgICAgICAgICAgIAlteUhpZGRlblRva2VuU3RhdGUucmVzdG9yZSgpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZU51bWJlciIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVKdm1UeXBlUmVmZXJlbmNlIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI0NTc6MTogZW50cnlSdWxlSnZtVHlwZVJlZmVyZW5jZSA6IHJ1bGVKdm1UeXBlUmVmZXJlbmNlIEVPRiA7CisgICAgcHVibGljIGZpbmFsIHZvaWQgZW50cnlSdWxlSnZtVHlwZVJlZmVyZW5jZSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbE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zIEVPRgorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRBcnJheUJyYWNrZXRzUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlQXJyYXlCcmFja2V0c19pbl9lbnRyeVJ1bGVBcnJheUJyYWNrZXRzNTI0MCk7CisgICAgICAgICAgICBydWxlQXJyYXlCcmFja2V0cygpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldEFycmF5QnJhY2tldHNSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZUFycmF5QnJhY2tldHM1MjQ3KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVBcnJheUJyYWNrZXRzIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVBcnJheUJyYWNrZXRzIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueH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19Hcm91cF9fMF9pbl9ydWxlQXJyYXlCcmFja2V0czUyNzMpOworICAgICAgICAgICAgcnVsZV9fQXJyYXlCcmFja2V0c19fR3JvdXBfXzAoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0QXJyYXlCcmFja2V0c0FjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlQXJyYXlCcmFja2V0cyIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVYRnVuY3Rpb25UeXBlUmVmIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1MTM6MTogZW50cnlSdWxlWEZ1bmN0aW9uVHlwZVJlZiA6IHJ1bGVYRnVuY3Rpb25UeXBlUmVmIEVPRiA7Cis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ICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WEZ1bmN0aW9uVHlwZVJlZlJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlWEZ1bmN0aW9uVHlwZVJlZjUzMDcpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZVhGdW5jdGlvblR5cGVSZWYiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZVhGdW5jdGlvblR5cGVSZWYiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjUyMjoxOiBydWxlWEZ1bmN0aW9uVHlwZVJlZiA6ICggKCBydWxlX19YRnVuY3Rpb25UeXBlUmVmX19Hcm91cF9fMCApICkgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIHJ1bGVYRnVuY3Rpb25UeXBlUmVmKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKworICAgICAgICAJCWludCBzdGFja1NpemUgPSBrZWVwU3RhY2tTaXplKCk7CisgICAgICAgICAgICAKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29y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AgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVYRnVuY3Rpb25UeXBlUmVmIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZUp2bVBhcmFtZXRlcml6ZWRUeXBlUmVmZXJlbmNlIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1NDE6MTogZW50cnlSdWxlSnZtUGFyYW1ldGVyaXplZFR5cGVSZWZlcmVuY2UgOiBydWxlSnZtUGFyYW1ldGVyaXplZFR5cGVSZWZlcmVuY2UgRU9GIDsKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBlbnRyeVJ1bGVKdm1QYXJhbWV0ZXJpemVkVHlwZVJlZmVyZW5jZSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1Y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lcmVuY2VSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZUp2bUFyZ3VtZW50VHlwZVJlZmVyZW5jZTU0MjcpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZUp2bUFyZ3VtZW50VHlwZVJlZmVyZW5jZSIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlSnZtQXJndW1lbnRUeXBlUmVmZXJlbmNlIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1Nzg6MTogcnVsZUp2bUFyZ3VtZW50VHlwZVJlZmVyZW5jZSA6ICggKCBydWxlX19Kdm1Bcmd1bWVudFR5cGVSZWZlcmVuY2VfX0FsdGVybmF0aXZlcyApICkgOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIHJ1bGVKdm1Bcmd1bWVudFR5cGVSZWZlcmVuY2UoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworCisgICAgICAgIAkJaW50IHN0YWNrU2l6ZSA9IGtlZXBTdGFja1NpemUoKTsKKyAgICAgICAgICAgIAorICAgICAgICB0cnkgeworICAgICAgICAgICAgL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cF9fMCApCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldEp2bVdpbGRjYXJkVHlwZVJlZmVyZW5jZUFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI2MTM6MTogKCBydWxlX19Kdm1XaWxkY2FyZFR5cGVSZWZlcmVuY2VfX0dyb3VwX18wICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI2MTM6MjogcnVsZV9fSnZtV2lsZGNhcmRUeXBlUmVmZXJlbmNlX19Hcm91cF9fMAorICAgICAgICAgICAgeworICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fSnZtV2lsZGNhcmRUeXBlUmVmZXJlbmNlX19Hcm91cF9fMF9pbl9ydWxlSnZtV2lsZGNhcmRUeXBlUmVmZXJlbmNlNTUxMyk7CisgICAgICAgICAgICBydWxlX19Kdm1XaWxkY2FyZFR5cGVSZWZlcmVuY2VfX0dyb3VwX18wKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS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U0wuZzoyNjQxOjE6ICggcnVsZV9fSnZtVXBwZXJCb3VuZF9fR3JvdXBfXzAgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjY0MToyOiBydWxlX19Kdm1VcHBlckJvdW5kX19Hcm91cF9fMAorICAgICAgICAgICAgeworICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fSnZtVXBwZXJCb3VuZF9fR3JvdXBfXzBfaW5fcnVsZUp2bVVwcGVyQm91bmQ1NTczKTsKKyAgICAgICAgICAgIHJ1bGVfX0p2bVVwcGVyQm91bmRfX0dyb3VwX18wKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldEp2bVVwcGVyQm91bmRBY2Nlc3MoKS5nZXRHcm91cCgpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuI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AgICAgICAgICB7CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19Kdm1VcHBlckJvdW5kQW5kZWRfX0dyb3VwX18wX2luX3J1bGVKdm1VcHBlckJvdW5kQW5kZWQ1NjMzKTsKKyAgICAgICAgICAgIHJ1bGVfX0p2bVVwcGVyQm91bmRBbmRlZF9fR3JvdXBfXzAoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0SnZtVXBwZXJCb3VuZEFuZGVkQWNjZXNzKCkuZ2V0R3JvdXAoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVKdm1VcHBlckJvdW5kQW5kZWQiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlSnZtTG93ZXJCb3VuZCIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5h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GVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldEp2bUxvd2VyQm91bmRSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZUp2bUxvd2VyQm91bmQ1NjY3KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVKdm1Mb3dlckJvdW5kIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVKdm1Mb3dlckJvdW5kIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI2OTA6MTogcnVsZUp2bUxvd2VyQm91bmQgOiAoICggcnVsZV9fSnZtTG93ZXJCb3VuZF9fR3JvdXBfXzAgKSApIDsKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBydWxlSnZtTG93ZXJCb3VuZCgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisKKyAgICAgICAgCQlpbnQgc3RhY2tTaXplID0ga2VlcFN0YWNrU2l6ZSgpOworIC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cm5hbEN1YmVEU0wuZzoyNzI1OjE6ICggcnVsZV9fSnZtTG93ZXJCb3VuZEFuZGVkX19Hcm91cF9fMCApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNzI1OjI6IHJ1bGVfX0p2bUxvd2VyQm91bmRBbmRlZF9fR3JvdXBfXzAKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX0p2bUxvd2VyQm91bmRBbmRlZF9fR3JvdXBfXzBfaW5fcnVsZUp2bUxvd2VyQm91bmRBbmRlZDU3NTMpOworICAgICAgICAgICAgcnVsZV9fSnZtTG93ZXJCb3VuZEFuZGVkX19Hcm91cF9fMCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRKdm1Mb3dlckJvdW5kQW5kZWRBY2Nlc3MoKS5nZXRHcm91cCgpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2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xpZmllZE5hbWVXaXRoV2lsZGNhcmQgRU9GCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldFF1YWxpZmllZE5hbWVXaXRoV2lsZGNhcmRSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVRdWFsaWZpZWROYW1lV2l0aFdpbGRjYXJkX2luX2VudHJ5UnVsZVF1YWxpZmllZE5hbWVXaXRoV2lsZGNhcmQ1NzgyKTsKKyAgICAgICAgICAgIHJ1bGVRdWFsaWZpZWROYW1lV2l0aFdpbGRjYXJkKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0UXVhbGlmaWVkTmFtZVdpdGhXaWxkY2FyZFJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlUXVhbGlmaWVkTmFtZVdpdGhXaWxkY2FyZDU3ODkpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUi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mRfX0dyb3VwX18wICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI3NTU6MjogcnVsZV9fUXVhbGlmaWVkTmFtZVdpdGhXaWxkY2FyZF9fR3JvdXBfXzAKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX1F1YWxpZmllZE5hbWVXaXRoV2lsZGNhcmRfX0dyb3VwX18wX2luX3J1bGVRdWFsaWZpZWROYW1lV2l0aFdpbGRjYXJkNTgxNSk7CisgICAgICAgICAgICBydWxlX19RdWFsaWZpZWROYW1lV2l0aFdpbGRjYXJkX19Hcm91cF9fMCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRRdWFsaWZpZWROYW1lV2l0aFdpbGRjYXJkQWNjZXNzKCkuZ2V0R3JvdXAoKSk7IAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9Cis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c3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0WEltcG9ydERlY2xhcmF0aW9uUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWEltcG9ydERlY2xhcmF0aW9uX2luX2VudHJ5UnVsZVhJbXBvcnREZWNsYXJhdGlvbjU4NDQpOworICAgICAgICAgICAgcnVsZVhJbXBvcnREZWNsYXJhdGlvbigpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhJbXBvcnREZWNsYXJhdGlvblJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlWEltcG9ydERlY2xhcmF0aW9uNTg1MSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlWEltcG9ydERlY2xhcmF0aW9uIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVYSW1wb3J0RGVjbGFyYXRpb24iCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54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zbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI3ODM6MTogKCAoIHJ1bGVfX1hJbXBvcnREZWNsYXJhdGlvbl9fR3JvdXBfXzAgKSApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNzg0OjE6ICggcnVsZV9fWEltcG9ydERlY2xhcmF0aW9uX19Hcm91cF9fMCApCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldFhJbXBvcnREZWNsYXJhdGlvbkFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI3ODU6MTogKCBydWxlX19YSW1wb3J0RGVjbGFyYXRpb25fX0dyb3VwX18wICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI3ODU6MjogcnVsZV9fWEltcG9ydERlY2xhcmF0aW9uX19Hcm91cF9fMAorICAgICAgICAgICAgeworICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fWEltcG9ydERlY2xhcmF0aW9uX19Hcm91cF9fMF9pbl9ydWxlWEltcG9ydERlY2xhcmF0aW9uNTg3Nyk7CisgICAgICAgICAgICBydWxlX19YSW1wb3J0RGVjbGFyYXRpb25fX0dyb3VwX18wKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhJbXBvcnREZWNsYXJhdGlvbkFjY2VzcygpLmdldEdyb3VwKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlWEltcG9ydERlY2xhcmF0aW9uIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZVF1YWxpZmllZE5hbWVJblN0YXRpY0ltcG9ydCIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC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N0YXRpY0ltcG9ydDU5MDQpOworICAgICAgICAgICAgcnVsZVF1YWxpZmllZE5hbWVJblN0YXRpY0ltcG9ydCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFF1YWxpZmllZE5hbWVJblN0YXRpY0ltcG9ydFJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlUXVhbGlmaWVkTmFtZUluU3RhdGljSW1wb3J0NTkxMSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlUXVhbGlmaWVkTmFtZUluU3RhdGljSW1wb3J0IgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVRdWFsaWZpZWROYW1lSW5TdGF0aWNJbXBvcnQiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjgwNjoxOiBydWxlUX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AgICAgICAgICB9CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyODE5OjE6ICggcnVsZV9fUXVhbGlmaWVkTmFtZUluU3RhdGljSW1wb3J0X19Hcm91cF9fMCApKgorICAgICAgICAgICAgbG9vcDE6CisgICAgICAgICAgICBkbyB7CisgICAgICAgICAgICAgICAgaW50IGFsdDE9MjsKKyAgICAgICAgICAgICAgICBpbnQgTEExXzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgICAgIGlmICggKExBMV8wPT1SVUxFX0lEKSApIHsKKyAgICAgICAgICAgICAgICAgICAgaW50IExBMV8yID0gaW5wdXQuTEEoMik7CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCAoTEExXzI9PTQ0KSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGFsdDE9MTsKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgIHN3aXRjaCAoYWx0MSkgeworICAgICAgICAgICAgCWNhc2UgMSA6CisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI4MTk6MjogcnVsZV9fUXVhbGlmaWVkTmFtZUluU3RhdGljSW1wb3J0X19Hcm91cF9fMAorICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX1F1YWxpZmllZE5hbWVJblN0YXRpY0ltcG9ydF9fR3JvdXBfXzBfaW5fcnVsZVF1YWxpZmllZE5hbWVJblN0YXRpY0ltcG9ydDU5NTEpOworICAgICAgICAgICAgCSAgICBydWxlX19RdWFsaWZpZWROYW1lSW5TdGF0aWNJbXBvcnRfX0dyb3VwX18wKCk7CisKKyAgICAgICAgICAgIAkgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgCSAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgIAkgICAgYnJlYWs7CisKKyAgICAgICAgICAgIAlkZWZhdWx0IDoKKyAgICAgICAgICAgIAkgICAgYnJlYWsgbG9vcDE7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfSB3aGlsZSAodHJ1ZSk7CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRRdWFsaWZpZWROYW1lSW5TdGF0aWNJbXBvcnRBY2Nlc3MoKS5nZXRHcm91cCgpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVRdWFsaWZpZWROYW1lSW5TdGF0aWNJbXBvcnQiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZUN1YmVBZ2d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RzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI4NDA6MjogcnVsZV9fQ3ViZUFnZ3JlZ2F0b3JFbnVtX19BbHRlcm5hdGl2ZXMKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX0N1YmVBZ2dyZWdhdG9yRW51bV9fQWx0ZXJuYXRpdmVzX2luX3J1bGVDdWJlQWdncmVnYXRvckVudW01OTkxKTsKKyAgICAgICAgICAgIHJ1bGVfX0N1YmVBZ2dyZWdhdG9yRW51bV9fQWx0ZXJuYXRpdmVzKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldEN1YmVBZ2dyZWdhdG9yRW51bUFjY2VzcygpLmdldEFsdGVybmF0aXZlcygpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZUN1YmVBZ2dyZWdhdG9yRW51bSIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlQ3ViZUxldmVs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udGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyODU5OjI6IHJ1bGVfX0N1YmVMZXZlbFByb3BUeXBlX19BbHRlcm5hdGl2ZXMKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX0N1YmVMZXZlbFByb3BUeXBlX19BbHRlcm5hdGl2ZXNfaW5fcnVsZUN1YmVMZXZlbFByb3BUeXBlNjAyNyk7CisgICAgICAgICAgICBydWxlX19DdWJlTGV2ZWxQcm9wVHlwZV9fQWx0ZXJuYXRpdmVzKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldEN1YmVMZXZlbFByb3BUeXBlQWNjZXNzKCkuZ2V0QWx0ZXJuYXRpdmVzKCkpOyAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlQ3ViZUxldmVsUHJvcFR5cGUiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZUN1YmVMZXZlbExldmVsVHlwZSIKKyAg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udGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI4Nzg6MjogcnVsZV9fQ3ViZUxldmVsTGV2ZWxUeXBlX19BbHRlcm5hdGl2ZXMKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX0N1YmVMZXZlbExldmVsVHlwZV9fQWx0ZXJuYXRpdmVzX2luX3J1bGVDdWJlTGV2ZWxMZXZlbFR5cGU2MDYzKTsKKyAgICAgICAgICAgIHJ1bGVfX0N1YmVMZXZlbExldmVsVHlwZV9fQWx0ZXJuYXRpdmVzKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldEN1YmVMZXZlbExldmVsVHlwZUFjY2VzcygpLmdldEFsdGVybmF0aXZlcygpKTsgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZUN1YmVMZXZlbExldmVsVHlwZSIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlX19DdWJlTGV2ZWxfX0FsdGVybmF0aXZlc182IgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI4ODk6MTogcnVsZV9fQ3ViZUxldmVsX19BbHRlcm5hdGl2ZXNfNiA6ICggKCAnOycgKSB8ICggKCBydWxlX19DdWJlTGV2ZWxfX0dyb3VwXzZfMV9fMCApICkgKTsKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBydWxlX19DdWJlTGV2ZWxfX0FsdGVybmF0aXZlc182KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKworICAgICAgICAJCWludCBzdGFja1NpemUgPSBrZWVwU3RhY2tTaXplKCk7CisgICAgICAgICAgICAKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI4OTM6MTogKCAoICc7JyApIHwgKCAoIHJ1bGVfX0N1YmVMZXZlbF9fR3JvdXBfNl8xX18wICkgKSApCisgICAgICAgICAgICBpbnQgYWx0Mj0yOworICAgICAgICAgICAgaW50IExBMl8wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgIGlmICggKExBMl8wPT0xNikgKSB7CisgICAgICAgICAgICAgICAgYWx0Mj0xOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSBpZiAoIChMQTJfMD09NzUpICkgeworICAgICAgICAgICAgICAgIGFsdDI9MjsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5iYWNrdHJhY2tpbmc+MCkge3N0YXRlLmZhaWxlZD10cnVlOyByZXR1cm4gO30KKyAgICAgICAgICAgICAgICBOb1ZpYWJsZUFsdEV4Y2VwdGlvbiBudmFlID0KKyAgICAgICAgICAgICAgICAgICAgbmV3IE5vVmlhYmxlQWx0RXhjZXB0aW9uKCIiLCAyLCAwLCBpbnB1dCk7CisKKyAgICAgICAgICAgICAgICB0aHJvdyBudmFlOworICAgICAgICAgICAgfQorICAgICAgICAgICAgc3dpdGNoIChhbHQyKSB7CisgICAgICAgICAgICAgICAgY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Mjg5NDoxOiAoICc7JyApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Mjg5NDoxOiAoICc7JyApCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI4OTU6MTogJzsnCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldEN1YmVMZXZlbEFjY2VzcygpLmdldFNlbWljb2xvbktleXdvcmRfNl8wKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBtYXRjaChpbnB1dCwxNixGT0xMT1dfMTZfaW5fcnVsZV9fQ3ViZUxldmVsX19BbHRlcm5hdGl2ZXNfNjYwOTkpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTGV2ZWxBY2Nlc3MoKS5nZXRTZW1pY29sb25LZXl3b3JkXzZfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgMiA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5MDI6NjogKCAoIHJ1bGVfX0N1YmVMZXZlbF9fR3JvdXBfNl8xX18wICkgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5MDI6NjogKCAoIHJ1bGVfX0N1YmVMZXZlbF9fR3JvdXBfNl8xX18wICkgKQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyOTAzOjE6ICggcnVsZV9fQ3ViZUxldmVsX19Hcm91cF82XzFfXzAgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTGV2ZWxBY2Nlc3MoKS5nZXRHcm91cF82XzEoKSk7IAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5MDQ6MTogKCBydWxlX19DdWJlTGV2ZWxfX0dyb3VwXzZfMV9fMCApCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5MDQ6MjogcnVsZV9fQ3ViZUxldmVsX19Hcm91cF82XzFfXzAKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19DdWJlTGV2ZWxfX0dyb3VwXzZfMV9fMF9pbl9ydWxlX19DdWJlTGV2ZWxfX0FsdGVybmF0aXZlc182NjExOCk7CisgICAgICAgICAgICAgICAgICAgIHJ1bGVfX0N1YmVMZXZlbF9fR3JvdXBfNl8xX18wKCk7CisKKyAgICAgICAgICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTGV2ZWxBY2Nlc3MoKS5nZXRHcm91cF82XzEoKSk7IAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlX19DdWJlTGV2ZWxfX0FsdGVybmF0aXZlc182IgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVfX1hBbm5vdGF0aW9uX19BbHRlcm5hdGl2ZXNfM18xIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5MTM6MTogcnVsZV9fWEFubm90YXRpb25fX0FsdGVybmF0aXZlc18zXzEgOiAoICggKCBydWxlX19YQW5ub3RhdGlvbl9fR3JvdXBfM18xXzBfXzAgKSApIHwgKCAoIHJ1bGVfX1hBbm5vdGF0aW9uX19WYWx1ZUFzc2lnbm1lbnRfM18xXzEgKSApICk7CisgICAgcHVibGljIGZpbmFsIHZvaWQgcnVsZV9fWEFubm90YXRpb25fX0FsdGVybmF0aXZlc18zXzEoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworCisgICAgICAgIAkJaW50IHN0YWNrU2l6ZSA9IGtlZXBTdGFja1NpemUoKTsKKyAgICAgICAgICAgIAorICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjkxNzoxOiAoICggKCBydWxlX19YQW5ub3RhdGlvbl9fR3JvdXBfM18xXzBfXzAgKSApIHwgKCAoIHJ1bGVfX1hBbm5vdGF0aW9uX19WYWx1ZUFzc2lnbm1lbnRfM18xXzEgKSApICkKKyAgICAgICAgICAgIGludCBhbHQzPTI7CisgICAgICAgICAgICBhbHQzID0gZGZhMy5wcmVkaWN0KGlucHV0KTsKKyAgICAgICAgICAgIHN3aXRjaCAoYWx0MykgeworICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5MTg6MTogKCAoIHJ1bGVfX1hBbm5vdGF0aW9uX19Hcm91cF8zXzFfMF9fMCApICkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyOTE4OjE6ICggKCBydWxlX19YQW5ub3RhdGlvbl9fR3JvdXBfM18xXzBfXzAgKSApCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5MTk6MTogKCBydWxlX19YQW5ub3RhdGlvbl9fR3JvdXBfM18xXzBfXzAgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkFjY2VzcygpLmdldEdyb3VwXzNfMV8wKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyOTIwOjE6ICggcnVsZV9fWEFubm90YXRpb25fX0dyb3VwXzNfMV8wX18wICkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjkyMDoyOiBydWxlX19YQW5ub3RhdGlvbl9fR3JvdXBfM18xXzBfXzAKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19YQW5ub3RhdGlvbl9fR3JvdXBfM18xXzBfXzBfaW5fcnVsZV9fWEFubm90YXRpb25fX0FsdGVybmF0aXZlc18zXzE2MTUxKTsKKyAgICAgICAgICAgICAgICAgICAgcnVsZV9fWEFubm90YXRpb25fX0dyb3VwXzNfMV8wX18wKCk7CisKKyAgICAgICAgICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkFjY2VzcygpLmdldEdyb3VwXzNfMV8wKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSAyIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlw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XBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyOTI2OjE6ICggcnVsZV9fWEFubm90YXRpb25fX1ZhbHVlQXNzaWdubWVudF8zXzFfMSApCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5MjY6MjogcnVsZV9fWEFubm90YXRpb25fX1ZhbHVlQXNzaWdubWVudF8zXzFfMQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX1hBbm5vdGF0aW9uX19WYWx1ZUFzc2lnbm1lbnRfM18xXzFfaW5fcnVsZV9fWEFubm90YXRpb25fX0FsdGVybmF0aXZlc18zXzE2MTY5KTsKKyAgICAgICAgICAgICAgICAgICAgcnVsZV9fWEFubm90YXRpb25fX1ZhbHVlQXNzaWdubWVudF8zXzFfMSgpOworCisgICAgICAgICAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WEFubm90YXRpb25BY2Nlc3MoKS5nZXRWYWx1ZUFzc2lnbm1lbnRfM18xXzEoKSk7IAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeworICAgICAgICAgICAgcmVwb3J0RXJyb3IocmUpOworICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisKKyAgICAgICAgICAgIAlyZXN0b3JlU3RhY2tTaXplKHN0YWNrU2l6ZSk7CisKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gOworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlX19YQW5ub3RhdGlvbl9fQWx0ZXJuYXRpdmVzXzNfMSIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlX19YQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0X19BbHRlcm5hdGl2ZXMiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjkzNToxOiBydWxlX19YQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0X19BbHRlcm5hdGl2ZXMgOiAoICggKCBydWxlX19YQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0X19Hcm91cF8wX18wICkgKSB8ICggKCBydWxlX19YQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0X19Hcm91cF8xX18wICkgKSApOworICAgIHB1YmxpYyBmaW5hbCB2b2lkIHJ1bGVfX1hBbm5vdGF0aW9uRWx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vLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyOTQyOjI6IHJ1bGVfX1hBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3RfX0dyb3VwXzBfXzAKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19YQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0X19Hcm91cF8wX18wX2luX3J1bGVfX1hBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3RfX0FsdGVybmF0aXZlczYyMDIpOworICAgICAgICAgICAgICAgICAgICBydWxlX19YQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0X19Hcm91cF8wX18wKCk7CisKKyAgICAgICAgICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0QWNjZXNzKCkuZ2V0R3JvdXBfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgMiA6CisgICAgICAgICAgICAgICAgICA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ICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0QWNjZXNzKCkuZ2V0R3JvdXBfMSgpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVfX1hBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3RfX0FsdGVybmF0aXZlcyIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlX19YQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZV9fQWx0ZXJuYXRpdmVzIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5NTc6MTogcnVsZV9fWEFubm90YXRpb25FbGVtZW50VmFsdWVfX0FsdGVybmF0aXZlcyA6ICggKCAoIHJ1bGVfX1hBbm5vdGF0aW9uRWxlbWVudFZhbHVlX19Hcm91cF8wX18wICkgKSB8ICggcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uICkgKTsKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBydWxlX19YQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZV9fQWx0ZXJuYXRpdmVzKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKworICAgICAgICAJCWludCBzdGFja1NpemUgPSBrZWVwU3RhY2tTaXplKCk7CisgICAgICAgICAgICAKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5NjE6MTogKCAoICggcnVsZV9fWEFubm90YXRpb25FbGVtZW50VmFsdWVfX0dyb3VwXzBfXzAgKSApIHwgKCBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gKSApCisgICAgICAgICAgICBpbnQgYWx0NT0yOworICAgICAgICAgICAgYWx0NSA9IGRmYTUucHJlZGljdChpbnB1dCk7CisgICAgICAgICAgICBzd2l0Y2ggKGFsdDUpIHsKKyAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyOTYyOjE6ICggKCBydWxlX19YQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZV9fR3JvdXBfMF9fMCApICkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaX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N1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyOTY0OjI6IHJ1bGVfX1hBbm5vdGF0aW9uRWxlbWVudFZhbHVlX19Hcm91cF8wX18wCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fWEFubm90YXRpb25FbGVtZW50VmFsdWVfX0dyb3VwXzBfXzBfaW5fcnVsZV9fWEFubm90YXRpb25FbGVtZW50VmFsdWVfX0FsdGVybmF0aXZlczYyNTMpOworICAgICAgICAgICAgICAgICAgICBydWxlX19YQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZV9fR3JvdXBfMF9fMCgpOworCisgICAgICAgICAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WEFubm90YXRpb25FbGVtZW50VmFsdWVBY2Nlc3MoKS5nZXRHcm91cF8wKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSAyIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL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AgICAgICAgICAgICBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24oKTsKKworICAgICAgICAgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uRWxlbWVudFZhbHVlQWNjZXNzKCkuZ2V0WEFubm90YXRpb25PckV4cHJlc3Npb25QYXJzZXJSdWxlQ2FsbF8xKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZV9fWEFubm90YXRpb25FbGVtZW50VmFsdWVfX0FsdGVybmF0aXZlcyIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlX19YQW5ub3RhdGlvbk9yRXhwcmVzc2lvbl9fQWx0ZXJuYXRpdmVzIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5Nzk6MTogcnVsZV9fWEFubm90YXRpb25PckV4cHJlc3Npb25fX0FsdGVybmF0aXZlcyA6ICggKCBydWxlWEFubm90YXRpb24gKSB8ICggcnVsZVhFeHByZXNzaW9uICkgKTsKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBydWxlX19YQW5ub3RhdGlvbk9yRXhwcmVzc2lvbl9fQWx0ZXJuYXRpdmVzKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKworICAgICAgICAJCWludCBzdGFja1NpemUgPSBrZWVwU3RhY2tTaXplKCk7CisgICAgICAgICAgICAKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5ODM6MTogKCAoIHJ1bGVYQW5ub3RhdGlvbiApIHwgKCBydWxlWEV4cHJlc3Npb24gKSApCisgICAgICAgICAgICBpbnQgYWx0Nj0yOworICAgICAgICAgICAgaW50IExBNl8wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgIGlmICggKExBNl8wPT04NykgKSB7CisgICAgICAgICAgICAgICAgYWx0Nj0xOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSBpZiAoICgoTEE2XzA+PVJVTEVfSUQgJiYgTEE2XzA8PVJVTEVfREVDSU1BTCl8fExBNl8wPT0yOHx8KExBNl8wPj0zNSAmJiBMQTZfMDw9MzYpfHxMQTZfMD09NDF8fChMQTZfMD49NDYgJiYgTEE2XzA8PTUxKXx8TEE2XzA9PTc1fHxMQTZfMD09ODh8fChMQTZfMD49OTIgJiYgTEE2XzA8PTkzKXx8TEE2XzA9PTk2fHxMQTZfMD09OTh8fChMQTZfMD49MTAyICYmIExBNl8wPD0xMTApfHxMQTZfMD09MTEyfHxMQTZfMD09MTMwKSApIHsKKyAgICAgICAgICAgICAgICBhbHQ2PTI7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICBpZiAoc3RhdGUuYmFja3RyYWNraW5nPjApIHtzdGF0ZS5mYWlsZWQ9dHJ1ZTsgcmV0dXJuIDt9CisgICAgICAgICAgICAgICAgTm9WaWFibGVBbHRFeGNlcHRpb24gbnZhZSA9CisgICAgICAgICAgICAgICAgICAgIG5ldyBOb1ZpYWJsZUFsdEV4Y2VwdGlvbigiIiwgNiwgMCwgaW5wdXQpOworCisgICAgICAgICAgICAgICAgdGhyb3cgbnZhZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHN3aXRjaCAoYWx0NikgeworICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5ODQ6MTogKCBydWxlWEFubm90YXRpb24gKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5ODQ6MTogKCBydWxlWEFubm90YXRpb24gKQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyOTg1OjE6IHJ1bGVYQW5ub3RhdGlvbgorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbkFjY2VzcygpLmdldFhBbm5vdGF0aW9uUGFyc2VyUnVsZUNhbGxfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVhBbm5vdGF0aW9uX2luX3J1bGVfX1hBbm5vdGF0aW9uT3JFeHByZXNzaW9uX19BbHRlcm5hdGl2ZXM2MzAzKTsKKyAgICAgICAgICAgICAgICAgICAgcnVsZVhBbm5vdGF0aW9uKCk7CisKKyAgICAgICAgICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbkFjY2VzcygpLmdldFhBbm5vdGF0aW9uUGFyc2VyUnVsZUNhbGxfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgMiA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5OTA6NjogKCBydWxlWEV4cHJlc3Npb24gKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5OTA6NjogKCBydWxlWEV4cHJlc3Npb24gKQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyOTkxOjE6IHJ1bGVYRXhwcmVzc2lvbgorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbkFjY2VzcygpLmdldFhFeHByZXNzaW9uUGFyc2VyUnVsZUNhbGxfMSgpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVhFeHByZXNzaW9uX2luX3J1bGVfX1hBbm5vdGF0aW9uT3JFeHByZXNzaW9uX19BbHRlcm5hdGl2ZXM2MzIwKTsKKyAgICAgICAgICAgICAgICAgICAgcnVsZVhFeHByZXNzaW9uKCk7CisKKyAgICAgICAgICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbkFjY2VzcygpLmdldFhFeHByZXNzaW9uUGFyc2VyUnVsZUNhbGxfMSgpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVfX1hBbm5vdGF0aW9uT3JFeHByZXNzaW9uX19BbHRlcm5hdGl2ZXMiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZV9fWEFzc2lnbm1lbnRfX0FsdGVybmF0aXZlcyIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDAxOjE6IHJ1bGVfX1hBc3NpZ25tZW50X19BbHRlcm5hdGl2ZXMgOiAoICggKCBydWxlX19YQXNzaWdubWVudF9fR3JvdXBfMF9fMCApICkgfCAoICggcnVsZV9fWEFzc2lnbm1lbnRfX0dyb3VwXzFfXzAgKSApICk7CisgICAgcHVibGljIGZpbmFsIHZvaWQgcnVsZV9fWEFzc2lnbm1lbnRfX0FsdGVybmF0aXZlcygpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisKKyAgICAgICAgCQlpbnQgc3RhY2tTaXplID0ga2VlcFN0YWNrU2l6ZSgpOworICAgICAgICAgICAgCisgICAgICAgIHRyeSB7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDA1OjE6ICggKCAoIHJ1bGVfX1hBc3NpZ25tZW50X19Hcm91cF8wX18wICkgKSB8ICggKCBydWxlX19YQXNzaWdubWVudF9fR3JvdXBfMV9fMCApICkgKQorICAgICAgICAgICAgaW50IGFsdDc9MjsKKyAgICAgICAgICAgIHN3aXRjaCAoIGlucHV0LkxBKDEpICkgeworICAgICAgICAgICAgY2FzZSBSVUxFX0lEOgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBpbnQgTEE3XzEgPSBpbnB1dC5MQSgyKTsKKworICAgICAgICAgICAgICAgIGlmICggKExBN18xPT1FT0Z8fChMQTdfMT49UlVMRV9JRCAmJiBMQTdfMTw9UlVMRV9ERUNJTUFMKXx8KExBN18xPj0xNCAmJiBMQTdfMTw9NTEpfHwoTEE3XzE+PTc1ICYmIExBN18xPD03Nil8fChMQTdfMT49ODggJiYgTEE3XzE8PTExMyl8fChMQTdfMT49MTI2ICYmIExBN18xPD0xMjcpfHwoTEE3XzE+PTEyOSAmJiBMQTdfMTw9MTMwKSkgKSB7CisgICAgICAgICAgICAgICAgICAgIGFsdDc9MjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTdfMT09MTMpICkgeworICAgICAgICAgICAgICAgICAgICBhbHQ3PTE7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuYmFja3RyYWNraW5nPjApIHtzdGF0ZS5mYWlsZWQ9dHJ1ZTsgcmV0dXJuIDt9CisgICAgICAgICAgICAgICAgICAgIE5vVmlhYmxlQWx0RXhjZXB0aW9uIG52YWUgPQorICAgICAgICAgICAgICAgICAgICAgICAgbmV3IE5vVmlhYmxlQWx0RXhjZXB0aW9uKCIiLCA3LCAxLCBpbnB1dCk7CisKKyAgICAgICAgICAgICAgICAgICAgdGhyb3cgbnZhZTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA0NjoKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgaW50IExBN18yID0gaW5wdXQuTEEoMik7CisKKyAgICAgICAgICAgICAgICBpZiAoIChMQTdfMj09RU9GfHwoTEE3XzI+PVJVTEVfSUQgJiYgTEE3XzI8PVJVTEVfREVDSU1BTCl8fChMQTdfMj49MTQgJiYgTEE3XzI8PTUxKXx8KExBN18yPj03NSAmJiBMQTdfMjw9NzYpfHwoTEE3XzI+PTg4ICYmIExBN18yPD0xMTMpfHwoTEE3XzI+PTEyNiAmJiBMQTdfMjw9MTI3KXx8KExBN18yPj0xMjkgJiYgTEE3XzI8PTEzMCkpICkgeworICAgICAgICAgICAgICAgICAgICBhbHQ3PTI7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEE3XzI9PTEzKSApIHsKKyAgICAgICAgICAgICAgICAgICAgYWx0Nz0xOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmJhY2t0cmFja2luZz4wKSB7c3RhdGUuZmFpbGVkPXRydWU7IHJldHVybiA7fQorICAgICAgICAgICAgICAgICAgICBOb1ZpYWJsZUFsdEV4Y2VwdGlvbiBudmFlID0KKyAgICAgICAgICAgICAgICAgICAgICAgIG5ldyBOb1ZpYWJsZUFsdEV4Y2VwdGlvbigiIiwgNywgMiwgaW5wdXQpOworCisgICAgICAgICAgICAgICAgICAgIHRocm93IG52YWU7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNDc6CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGludCBMQTdfMyA9IGlucHV0LkxBKDIpOworCisgICAgICAgICAgICAgICAgaWYgKCAoTEE3XzM9PUVPRnx8KExBN18zPj1SVUxFX0lEICYmIExBN18zPD1SVUxFX0RFQ0lNQUwpfHwoTEE3XzM+PTE0ICYmIExBN18zPD01MSl8fChMQTdfMz49NzUgJiYgTEE3XzM8PTc2KXx8KExBN18zPj04OCAmJiBMQTdfMzw9MTEzKXx8KExBN18zPj0xMjYgJiYgTEE3XzM8PTEyNyl8fChMQTdfMz49MTI5ICYmIExBN18zPD0xMzApKSApIHsKKyAgICAgICAgICAgICAgICAgICAgYWx0Nz0yOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlIGlmICggKExBN18zPT0xMykgKSB7CisgICAgICAgICAgICAgICAgICAgIGFsdDc9MTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5iYWNrdHJhY2tpbmc+MCkge3N0YXRlLmZhaWxlZD10cnVlOyByZXR1cm4gO30KKyAgICAgICAgICAgICAgICAgICAgTm9WaWFibGVBbHRFeGNlcHRpb24gbnZhZSA9CisgICAgICAgICAgICAgICAgICAgICAgICBuZXcgTm9WaWFibGVBbHRFeGNlcHRpb24oIiIsIDcsIDMsIGlucHV0KTsKKworICAgICAgICAgICAgICAgICAgICB0aHJvdyBudmFlOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDQ4OgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBpbnQgTEE3XzQgPSBpbnB1dC5MQSgyKTsKKworICAgICAgICAgICAgICAgIGlmICggKExBN180PT1FT0Z8fChMQTdfND49UlVMRV9JRCAmJiBMQTdfNDw9UlVMRV9ERUNJTUFMKXx8KExBN180Pj0xNCAmJiBMQTdfNDw9NTEpfHwoTEE3XzQ+PTc1ICYmIExBN180PD03Nil8fChMQTdfND49ODggJiYgTEE3XzQ8PTExMyl8fChMQTdfND49MTI2ICYmIExBN180PD0xMjcpfHwoTEE3XzQ+PTEyOSAmJiBMQTdfNDw9MTMwKSkgKSB7CisgICAgICAgICAgICAgICAgICAgIGFsdDc9MjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTdfND09MTMpICkgeworICAgICAgICAgICAgICAgICAgICBhbHQ3PTE7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuYmFja3RyYWNraW5nPjApIHtzdGF0ZS5mYWlsZWQ9dHJ1ZTsgcmV0dXJuIDt9CisgICAgICAgICAgICAgICAgICAgIE5vVmlhYmxlQWx0RXhjZXB0aW9uIG52YWUgPQorICAgICAgICAgICAgICAgICAgICAgICAgbmV3IE5vVmlhYmxlQWx0RXhjZXB0aW9uKCIiLCA3LCA0LCBpbnB1dCk7CisKKyAgICAgICAgICAgICAgICAgICAgdGhyb3cgbnZhZTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA0OToKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgaW50IExBN181ID0gaW5wdXQuTEEoMik7CisKKyAgICAgICAgICAgICAgICBpZiAoIChMQTdfNT09RU9GfHwoTEE3XzU+PVJVTEVfSUQgJiYgTEE3XzU8PVJVTEVfREVDSU1BTCl8fChMQTdfNT49MTQgJiYgTEE3XzU8PTUxKXx8KExBN181Pj03NSAmJiBMQTdfNTw9NzYpfHwoTEE3XzU+PTg4ICYmIExBN181PD0xMTMpfHwoTEE3XzU+PTEyNiAmJiBMQTdfNTw9MTI3KXx8KExBN181Pj0xMjkgJiYgTEE3XzU8PTEzMCkpICkgeworICAgICAgICAgICAgICAgICAgICBhbHQ3PTI7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEE3XzU9PTEzKSApIHsKKyAgICAgICAgICAgICAgICAgICAgYWx0Nz0xOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmJhY2t0cmFja2luZz4wKSB7c3RhdGUuZmFpbGVkPXRydWU7IHJldHVybiA7fQorICAgICAgICAgICAgICAgICAgICBOb1ZpYWJsZUFsdEV4Y2VwdGlvbiBudmFlID0KKyAgICAgICAgICAgICAgICAgICAgICAgIG5ldyBOb1ZpYWJsZUFsdEV4Y2VwdGlvbigiIiwgNywgNSwgaW5wdXQpOworCisgICAgICAgICAgICAgICAgICAgIHRocm93IG52YWU7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgUlVMRV9TVFJJTkc6CisgICAgICAgICAgICBjYXNlIFJVTEVfSEVYOgorICAgICAgICAgICAgY2FzZSBSVUxFX0lOVDoKKyAgICAgICAgICAgIGNhc2UgUlVMRV9ERUNJTUFMOgorICAgICAgICAgICAgY2FzZSAyODoKKyAgICAgICAgICAgIGNhc2UgMzU6CisgICAgICAgICAgICBjYXNlIDM2OgorICAgICAgICAgICAgY2FzZSA0MToKKyAgICAgICAgICAgIGNhc2UgNTA6CisgICAgICAgICAgICBjYXNlIDUxOgorICAgICAgICAgICAgY2FzZSA3NToKKyAgICAgICAgICAgIGNhc2UgODg6CisgICAgICAgICAgICBjYXNlIDkyOgorICAgICAgICAgICAgY2FzZSA5MzoKKyAgICAgICAgICAgIGNhc2UgOTY6CisgICAgICAgICAgICBjYXNlIDk4OgorICAgICAgICAgICAgY2FzZSAxMDI6CisgICAgICAgICAgICBjYXNlIDEwMzoKKyAgICAgICAgICAgIGNhc2UgMTA0OgorICAgICAgICAgICAgY2FzZSAxMDU6CisgICAgICAgICAgICBjYXNlIDEwNjoKKyAgICAgICAgICAgIGNhc2UgMTA3OgorICAgICAgICAgICAgY2FzZSAxMDg6CisgICAgICAgICAgICBjYXNlIDEwOToKKyAgICAgICAgICAgIGNhc2UgMTEwOgorICAgICAgICAgICAgY2FzZSAxMTI6CisgICAgICAgICAgICBjYXNlIDEzMDoKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgYWx0Nz0yOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmJhY2t0cmFja2luZz4wKSB7c3RhdGUuZmFpbGVkPXRydWU7IHJldHVybiA7fQorICAgICAgICAgICAgICAgIE5vVmlhYmxlQWx0RXhjZXB0aW9uIG52YWUgPQorICAgICAgICAgICAgICAgICAgICBuZXcgTm9WaWFibGVBbHRFeGNlcHRpb24oIiIsIDcsIDAsIGlucHV0KTsKKworICAgICAgICAgICAgICAgIHRocm93IG52YWU7CisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN3aXRjaCAoYWx0NykgeworICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMwMDY6MTogKCAoIHJ1bGVfX1hBc3NpZ25tZW50X19Hcm91cF8wX18wICkgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMwMDY6MTogKCAoIHJ1bGVfX1hBc3NpZ25tZW50X19Hcm91cF8wX18wICkgKQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDA3OjE6ICggcnVsZV9fWEFzc2lnbm1lbnRfX0dyb3VwXzBfXzAgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRYQXNzaWdubWVudEFjY2VzcygpLmdldEdyb3VwXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMwMDg6MTogKCBydWxlX19YQXNzaWdubWVudF9fR3JvdXBfMF9fMCApCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMwMDg6MjogcnVsZV9fWEFzc2lnbm1lbnRfX0dyb3VwXzBfXzAKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19YQXNzaWdubWVudF9fR3JvdXBfMF9fMF9pbl9ydWxlX19YQXNzaWdubWVudF9fQWx0ZXJuYXRpdmVzNjM1Mik7CisgICAgICAgICAgICAgICAgICAgIHJ1bGVfX1hBc3NpZ25tZW50X19Hcm91cF8wX18wKCk7CisKKyAgICAgICAgICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRYQXNzaWdubWVudEFjY2VzcygpLmdldEdyb3VwXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIDIgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDEyOjY6ICggKCBydWxlX19YQXNzaWdubWVudF9fR3JvdXBfMV9fMCApICkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDEyOjY6ICggKCBydWxlX19YQXNzaWdubWVudF9fR3JvdXBfMV9fMCApICkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzAxMzoxOiAoIHJ1bGVfX1hBc3NpZ25tZW50X19Hcm91cF8xX18wICkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0WEFzc2lnbm1lbnRBY2Nlc3MoKS5nZXRHcm91cF8xKCkpOyAKKy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AgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZV9fWEFzc2lnbm1lbnRfX0FsdGVybmF0aXZlcyIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlX19PcE11bHRpQXNzaWduX19BbHRlcm5hdGl2ZXMiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzAyMzoxOiBydWxlX19PcE11bHRpQXNzaWduX19BbHRlcm5hdGl2ZXMgOiAoICggJys9JyApIHwgKCAnLT0nICkgfCAoICcqPScgKSB8ICggJy89JyApIHwgKCAnJT0nICkgfCAoICggcnVsZV9fT3BNdWx0aUFzc2lnbl9fR3JvdXBfNV9fMCApICkgfCAoICggcnVsZV9fT3BNdWx0aUFzc2lnbl9fR3JvdXBfNl9fMCApICkgKTsKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBydWxlX19PcE11bHRpQXNzaWduX19BbHRlcm5hdGl2ZXMoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworCisgICAgICAgIAkJaW50IHN0YWNrU2l6ZSA9IGtlZXBTdGFja1NpemUoKTsKKyAgICAgICAgICAgIAorICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzAyNzoxOiAoICggJys9JyApIHwgKCAnLT0nICkgfCAoICcqPScgKSB8ICggJy89JyApIHwgKCAnJT0nICkgfCAoICggcnVsZV9fT3BNdWx0aUFzc2lnbl9fR3JvdXBfNV9fMCApICkgfCAoICggcnVsZV9fT3BNdWx0aUFzc2lnbl9fR3JvdXBfNl9fMCApICkgKQorICAgICAgICAgICAgaW50IGFsdDg9NzsKKyAgICAgICAgICAgIHN3aXRjaCAoIGlucHV0LkxBKDEpICkgeworICAgICAgICAgICAgY2FzZSAxNzoKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgYWx0OD0xOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMTg6CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGFsdDg9MjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDE5OgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBhbHQ4PTM7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyMDoKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgYWx0OD00OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMjE6CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGFsdDg9NTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDI4OgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBhbHQ4PTY7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyNzoKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgYWx0OD03OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmJhY2t0cmFja2luZz4wKSB7c3RhdGUuZmFpbGVkPXRydWU7IHJldHVybiA7fQorICAgICAgICAgICAgICAgIE5vVmlhYmxlQWx0RXhjZXB0aW9uIG52YWUgPQorICAgICAgICAgICAgICAgICAgICBuZXcgTm9WaWFibGVBbHRFeGNlcHRpb24oIiIsIDgsIDAsIGlucHV0KTsKKworICAgICAgICAgICAgICAgIHRocm93IG52YWU7CisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN3aXRjaCAoYWx0OCkgeworICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMwMjg6MTogKCAnKz0nICkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDI4OjE6ICggJys9JyApCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMwMjk6MTogJys9JworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRPcE11bHRpQXNzaWduQWNjZXNzKCkuZ2V0UGx1c1NpZ25FcXVhbHNTaWduS2V5d29yZF8wKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBtYXRjaChpbnB1dCwxNyxGT0xMT1dfMTdfaW5fcnVsZV9fT3BNdWx0aUFzc2lnbl9fQWx0ZXJuYXRpdmVzNjQwNCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldE9wTXVsdGlBc3NpZ25BY2Nlc3MoKS5nZXRQbHVzU2lnbkVxdWFsc1NpZ25LZXl3b3JkXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIDIgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1Ym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gICAgICAgICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRPcE11bHRpQXNzaWduQWNjZXNzKCkuZ2V0SHlwaGVuTWludXNFcXVhbHNTaWduS2V5d29yZF8xKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSAzIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzA0NDo2OiAoICcqPScgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMwNDQ6NjogKCAnKj0nICkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzA0NToxOiAnKj0nCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldE9wTXVsdGlBc3NpZ25BY2Nlc3MoKS5nZXRBc3Rlcmlza0VxdWFsc1NpZ25LZXl3b3JkXzIoKSk7IAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIG1hdGNoKGlucHV0LDE5LEZPTExPV18xOV9pbl9ydWxlX19PcE11bHRpQXNzaWduX19BbHRlcm5hdGl2ZXM2NDQ0KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0T3BNdWx0aUFzc2lnbkFjY2VzcygpLmdldEFzdGVyaXNrRXF1YWxzU2lnbktleXdvcmRfMigpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgNCA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMwNTI6NjogKCAnLz0nICkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDUyOjY6ICggJy89JyApCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMwNTM6MTogJy89JworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRPcE11bHRpQXNzaWduQWNjZXNzKCkuZ2V0U29saWR1c0VxdWFsc1NpZ25LZXl3b3JkXzMoKSk7IAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIG1hdGNoKGlucHV0LDIwLEZPTExPV18yMF9pbl9ydWxlX19PcE11bHRpQXNzaWduX19BbHRlcm5hdGl2ZXM2NDY0KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0T3BNdWx0aUFzc2lnbkFjY2VzcygpLmdldFNvbGlkdXNFcXVhbHNTaWduS2V5d29yZF8zKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSA1IDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2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aUFzc2lnbkFjY2VzcygpLmdldFBlcmNlbnRTaWduRXF1YWxzU2lnbktleXdvcmRfNCgpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgNiA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMwNjg6NjogKCAoIHJ1bGVfX09wTXVsdGlBc3NpZ25fX0dyb3VwXzVfXzAgKSApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzA2ODo2OiAoICggcnVsZV9fT3BNdWx0aUFzc2lnbl9fR3JvdXBfNV9fMCApICkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzA2OToxOiAoIHJ1bGVfX09wTXVsdGlBc3NpZ25fX0dyb3VwXzVfXzAgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRPcE11bHRpQXNzaWduQWNjZXNzKCkuZ2V0R3JvdXBfNSgpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzA3MDoxOiAoIHJ1bGVfX09wTXVsdGlBc3NpZ25fX0dyb3VwXzVfXzAgKQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDcwOjI6IHJ1bGVfX09wTXVsdGlBc3NpZ25fX0dyb3VwXzVfXzAKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19PcE11bHRpQXNzaWduX19Hcm91cF81X18wX2luX3J1bGVfX09wTXVsdGlBc3NpZ25fX0FsdGVybmF0aXZlczY1MDMpOworICAgICAgICAgICAgICAgICAgICBydWxlX19PcE11bHRpQXNzaWduX19Hcm91cF81X18wKCk7CisKKyAgICAgICAgICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRPcE11bHRpQXNzaWduQWNjZXNzKCkuZ2V0R3JvdXBfNSgpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgNyA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMwNzQ6NjogKCAoIHJ1bGVfX09wTXVsdGlBc3NpZ25fX0dyb3VwXzZfXzAgKSApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzA3NDo2OiAoICggcnVsZV9fT3BNdWx0aUFzc2lnbl9fR3JvdXBfNl9fMCApICkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzA3NToxOiAoIHJ1bGVfX09wTXVsdGlBc3NpZ25fX0dyb3VwXzZfXzAgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRPcE11bHRpQXNzaWduQWNjZXNzKCkuZ2V0R3JvdXBfNigpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzA3NjoxOiAoIHJ1bGVfX09wTXVsdGlBc3NpZ25fX0dyb3VwXzZfXzAgKQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDc2OjI6IHJ1bGVfX09wTXVsdGlBc3NpZ25fX0dyb3VwXzZfXzAKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlX19PcE11bHRpQXNzaWduX19Hcm91cF82X18wX2luX3J1bGVfX09wTXVsdGlBc3NpZ25fX0FsdGVybmF0aXZlczY1MjEpOworICAgICAgICAgICAgICAgICAgICBydWxlX19PcE11bHRpQXNzaWduX19Hcm91cF82X18wKCk7CisKKyAgICAgICAgICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRPcE11bHRpQXNzaWduQWNjZXNzKCkuZ2V0R3JvdXBfNigpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja1NpemUoc3RhY2tTaXplKTsKKworICAgICAgICB9CisgICAgICAgIHJldHVybiA7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVfX09wTXVsdGlBc3NpZ25fX0FsdGVybmF0aXZlcyIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlX19PcEVxdWFsaXR5X19BbHRlcm5hdGl2ZXMiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzA4NToxOiBydWxlX19PcEVxdWFsaXR5X19BbHRlcm5hdGl2ZXMgOiAoICggJz09JyApIHwgKCAnIT0nICkgfCAoICc9PT0nICkgfCAoICchPT0nICkgKTsKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBydWxlX19PcEVxdWFsaXR5X19BbHRlcm5hdGl2ZXMoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworCisgICAgICAgIAkJaW50IHN0YWNrU2l6ZSA9IGtlZXBTdGFja1NpemUoKTsKKyAgICAgICAgICAgIAorICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzA4OToxOiAoICggJz09JyApIHwgKCAnIT0nICkgfCAoICc9PT0nICkgfCAoICchPT0nICkgKQorICAgICAgICAgICAgaW50IGFsdDk9NDsKKyAgICAgICAgICAgIHN3aXRjaCAoIGlucHV0LkxBKDEpICkgeworICAgICAgICAgICAgY2FzZSAyMjoKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgYWx0OT0xOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMjM6CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGFsdDk9MjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDI0OgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBhbHQ5PTM7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyNToKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgYWx0OT00OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmJhY2t0cmFja2luZz4wKSB7c3RhdGUuZmFpbGVkPXRydWU7IHJldHVybiA7fQorICAgICAgICAgICAgICAgIE5vVmlhYmxlQWx0RXhjZXB0aW9uIG52YWUgPQorICAgICAgICAgICAgICAgICAgICBuZXcgTm9WaWFibGVBbHRFeGNlcHRpb24oIiIsIDksIDAsIGlucHV0KTsKKworICAgICAgICAgICAgICAgIHRocm93IG52YWU7CisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN3aXRjaCAoYWx0OSkgeworICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMwOTA6MTogKCAnPT0nICkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDkwOjE6ICggJz09JyApCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMwOTE6MTogJz09JworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRPcEVxdWFsaXR5QWNjZXNzKCkuZ2V0RXF1YWxzU2lnbkVxdWFsc1NpZ25LZXl3b3JkXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIG1hdGNoKGlucHV0LDIyLEZPTExPV18yMl9pbl9ydWxlX19PcEVxdWFsaXR5X19BbHRlcm5hdGl2ZXM2NTU1KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0T3BFcXVhbGl0eUFjY2VzcygpLmdldEVxdWFsc1NpZ25FcXVhbHNTaWduS2V5d29yZF8wKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSAyIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzA5ODo2OiAoICchPScgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMwOTg6NjogKCAnIT0nICkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzA5OToxOiAnIT0nCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIGJlZm9yZShncmFtbWFyQWNjZXNzLmdldE9wRXF1YWxpdHlBY2Nlc3MoKS5nZXRFeGNsYW1hdGlvbk1hcmtFcXVhbHNTaWduS2V5d29yZF8xKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBtYXRjaChpbnB1dCwyMyxGT0xMT1dfMjNfaW5fcnVsZV9fT3BFcXVhbGl0eV9fQWx0ZXJuYXRpdmVzNjU3NSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldE9wRXF1YWxpdHlBY2Nlc3MoKS5nZXRFeGNsYW1hdGlvbk1hcmtFcXVhbHNTaWduS2V5d29yZF8xKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSAzIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJu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ygpLmdldEVxdWFsc1NpZ25FcXVhbHNTaWduRXF1YWxzU2lnbktleXdvcmRfMigpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgNCA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMxMTQ6NjogKCAnIT09JyApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzExNDo2OiAoICchPT0nICkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzExNToxOiAnIT09JworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRPcEVxdWFsaXR5QWNjZXNzKCkuZ2V0RXhjbGFtYXRpb25NYXJrRXF1YWxzU2lnbkVxdWFsc1NpZ25LZXl3b3JkXzMoKSk7IAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIG1hdGNoKGlucHV0LDI1LEZPTExPV18yNV9pbl9ydWxlX19PcEVxdWFsaXR5X19BbHRlcm5hdGl2ZXM2NjE1KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0T3BFcXVhbGl0eUFjY2VzcygpLmdldEV4Y2xhbWF0aW9uTWFya0VxdWFsc1NpZ25FcXVhbHNTaWduS2V5d29yZF8zKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZV9fT3BFcXVhbGl0eV9fQWx0ZXJuYXRpdmVzIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVfX1hSZWxhdGlvbmFsRXhwcmVzc2lvbl9fQWx0ZXJuYXRpdmVzXzEiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy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goTEExMF8wPj0yNiAmJiBMQTEwXzA8PTI4KSkgKSB7CisgICAgICAgICAgICAgICAgYWx0MTA9MjsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5iYWNrdHJhY2tpbmc+MCkge3N0YXRlLmZhaWxlZD10cnVlOyByZXR1cm4gO30KKyAgICAgICAgICAgICAgICBOb1ZpYWJsZUFsdEV4Y2VwdGlvbiBudmFlID0KKyAgICAgICAgICAgICAgICAgICAgbmV3IE5vVmlhYmxlQWx0RXhjZXB0aW9uKCIiLCAxMCwgMCwgaW5wdXQpOworCisgICAgICAgICAgICAgICAgdGhyb3cgbnZhZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHN3aXRjaCAoYWx0MTApIHsKKyAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMTMyOjE6ICggKCBydWxlX19YUmVsYXRpb25hbEV4cHJlc3Npb25fX0dyb3VwXzFfMF9fMCApICkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMTMyOjE6ICggKCBydWxlX19YUmVsYXRpb25hbEV4cHJlc3Npb25fX0dyb3VwXzFfMF9fMCApICkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3Jn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vdyhGT0xMT1dfcnVsZV9fWFJlbGF0aW9uYWxFeHByZXNzaW9uX19Hcm91cF8xXzBfXzBfaW5fcnVsZV9fWFJlbGF0aW9uYWxFeHByZXNzaW9uX19BbHRlcm5hdGl2ZXNfMTY2NDkpOworICAgICAgICAgICAgICAgICAgICBydWxlX19YUmVsYXRpb25hbEV4cHJlc3Npb25fX0dyb3VwXzFfMF9fMCgpOworCisgICAgICAgICAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0WFJlbGF0aW9uYWxFeHByZXNzaW9uQWNjZXNzKCkuZ2V0R3JvdXBfMV8wKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSAyIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzEzODo2OiAoICggcnVsZV9fWFJlbGF0aW9uYWxFeHByZXNzaW9uX19Hcm91cF8xXzFfXzAgKSApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZ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C9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzE0MDoyOiBydWxlX19YUmVsYXRpb25hbEV4cHJlc3Npb25fX0dyb3VwXzFfMV9fMAorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVfX1hSZWxhdGlvbmFsRXhwcmVzc2lvbl9fR3JvdXBfMV8xX18wX2luX3J1bGVfX1hSZWxhdGlvbmFsRXhwcmVzc2lvbl9fQWx0ZXJuYXRpdmVzXzE2NjY3KTsKKyAgICAgICAgICAgICAgICAgICAgcnVsZV9fWFJlbGF0aW9uYWxFeHByZXNzaW9uX19Hcm91cF8xXzFfXzAoKTsKKworICAgICAgICAgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldFhSZWxhdGlvbmFsRXhwcmVzc2lvbkFjY2VzcygpLmdldEdyb3VwXzFfMSgpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7CisgICAgICAgICAgICByZXBvcnRFcnJvcihyZSk7CisgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKworICAgICAgICAgICAgCXJlc3RvcmVTdGFja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gIHN3aXRjaCAoIGlucHV0LkxBKDEpICkgeworICAgICAgICAgICAgY2FzZSAyNjoKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgYWx0MTE9MTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDI4OgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBpbnQgTEExMV8yID0gaW5wdXQuTEEoMik7CisKKyAgICAgICAgICAgICAgICBpZiAoIChMQTExXzI9PTEzKSApIHsKKyAgICAgICAgICAgICAgICAgICAgYWx0MTE9MjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTExXzI9PUVPRnx8KExBMTFfMj49UlVMRV9JRCAmJiBMQTExXzI8PVJVTEVfREVDSU1BTCl8fExBMTFfMj09Mjh8fChMQTExXzI+PTM1ICYmIExBMTFfMjw9MzYpfHxMQTExXzI9PTQxfHwoTEExMV8yPj00NiAmJiBMQTExXzI8PTUxKXx8TEExMV8yPT03NXx8TEExMV8yPT04OHx8KExBMTFfMj49OTIgJiYgTEExMV8yPD05Myl8fExBMTFfMj09OTZ8fExBMTFfMj09OTh8fChMQTExXzI+PTEwMiAmJiBMQTExXzI8PTExMCl8fExBMTFfMj09MTEyfHxMQTExXzI9PTEzMCkgKSB7CisgICAgICAgICAgICAgICAgICAgIGFsdDExPTQ7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuYmFja3RyYWNraW5nPjApIHtzdGF0ZS5mYWlsZWQ9dHJ1ZTsgcmV0dXJuIDt9CisgICAgICAgICAgICAgICAgICAgIE5vVmlhYmxlQWx0RXhjZXB0aW9uIG52YWUgPQorICAgICAgICAgICAgICAgICAgICAgICAgbmV3IE5vVmlhYmxlQWx0RXhjZXB0aW9uKCIiLCAxMSwgMiwgaW5wdXQpOworCisgICAgICAgICAgICAgICAgICAgIHRocm93IG52YWU7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMjc6CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGFsdDExPTM7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgZGVmYXVsdDoKKyAgICAgICAgICAgICAgICBpZiAoc3RhdGUuYmFja3RyYWNraW5nPjApIHtzdGF0ZS5mYWlsZWQ9dHJ1ZTsgcmV0dXJuIDt9CisgICAgICAgICAgICAgICAgTm9WaWFibGVBbHRFeGNlcHRpb24gbnZhZSA9CisgICAgICAgICAgICAgICAgICAgIG5ldyBOb1ZpYWJsZUFsdEV4Y2VwdGlvbigiIiwgMTEsIDAsIGlucHV0KTsKKworICAgICAgICAgICAgICAgIHRocm93IG52YWU7CisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN3aXRjaCAoYWx0MTEpIHsKKyAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMTU0OjE6ICggJz49JyApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzE1NDoxOiAoICc+PScgKQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMTU1OjE6ICc+PScKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0T3BDb21wYXJlQWNjZXNzKCkuZ2V0R3JlYXRlclRoYW5TaWduRXF1YWxzU2lnbktleXdvcmRfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgbWF0Y2goaW5wdXQsMjYsRk9MTE9XXzI2X2luX3J1bGVfX09wQ29tcGFyZV9fQWx0ZXJuYXRpdmVzNjcwMSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldE9wQ29tcGFyZUFjY2VzcygpLmdldEdyZWF0ZXJUaGFuU2lnbkVxdWFsc1NpZ25LZXl3b3JkXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIDIgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc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2NDoxOiAoIHJ1bGVfX09wQ29tcGFyZV9fR3JvdXBfMV9fMCApCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMxNjQ6MjogcnVsZV9fT3BDb21wYXJlX19Hcm91cF8xX18wCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZV9fT3BDb21wYXJlX19Hcm91cF8xX18wX2luX3J1bGVfX09wQ29tcGFyZV9fQWx0ZXJuYXRpdmVzNjcyMCk7CisgICAgICAgICAgICAgICAgICAgIHJ1bGVfX09wQ29tcGFyZV9fR3JvdXBfMV9fMCgpOworCisgICAgICAgICAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKworICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0T3BDb21wYXJlQWNjZXNzKCkuZ2V0R3JvdXBfMSgpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgMyA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMxNjg6NjogKCAnPicgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMxNjg6NjogKCAnPicgKQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMTY5OjE6ICc+JworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRPcENvbXBhcmVBY2Nlc3MoKS5nZXRHcmVhdGVyVGhhblNpZ25LZXl3b3JkXzIoKSk7IAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIG1hdGNoKGlucHV0LDI3LEZPTExPV18yN19pbl9ydWxlX19PcENvbXBhcmVfX0FsdGVybmF0aXZlczY3MzkpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRPcENvbXBhcmVBY2Nlc3MoKS5nZXRHcmVhdGVyVGhhblNpZ25LZXl3b3JkXzIoKSk7IAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIDQgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMTc2OjY6ICggJzwnICkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMTc2OjY6ICggJzwnICkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzE3NzoxOiAnPCcKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0T3BDb21wYXJlQWNjZXNzKCkuZ2V0TGVzc1RoYW5TaWduS2V5d29yZF8zKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBtYXRjaChpbnB1dCwyOCxGT0xMT1dfMjhfaW5fcnVsZV9fT3BDb21wYXJlX19BbHRlcm5hdGl2ZXM2NzU5KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIGFmdGVyKGdyYW1tYXJBY2Nlc3MuZ2V0T3BDb21wYXJlQWNjZXNzKCkuZ2V0TGVzc1RoYW5TaWduS2V5d29yZF8zKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsKKyAgICAgICAgICAgIHJlcG9ydEVycm9yKHJlKTsKKyAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworCisgICAgICAgICAgICAJcmVzdG9yZVN0YWNrU2l6ZShzdGFja1NpemUpOworCisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZV9fT3BDb21wYXJlX19BbHRlcm5hdGl2ZXMiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZV9fT3BPdGhlcl9fQWx0ZXJuYXRpdmVzIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMxODk6MTogcnVsZV9fT3BPdGhlcl9fQWx0ZXJuYXRpdmVzIDogKCAoICctPicgKSB8ICggJy4uPCcgKSB8ICggKCBydWxlX19PcE90aGVyX19Hcm91cF8yX18wICkgKSB8ICggJy4uJyApIHwgKCAnPT4nICkgfCAoICggcnVsZV9fT3BPdGhlcl9fR3JvdXBfNV9fMCApICkgfCAoICggcnVsZV9fT3BPdGhlcl9fR3JvdXBfNl9fMCApICkgfCAoICc8PicgKSB8ICggJz86JyApICk7CisgICAgcHVibGljIGZpbmFsIHZvaWQgcnVsZV9fT3BPdGhlcl9fQWx0ZXJuYXRpdmVzKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKworICAgICAgICAJCWludCBzdGFja1NpemUgPSBrZWVwU3RhY2tTaXplKCk7CisgICAgICAgICAgICAKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMxOTM6MTogKCAoICctPicgKSB8ICggJy4uPCcgKSB8ICggKCBydWxlX19PcE90aGVyX19Hcm91cF8yX18wICkgKSB8ICggJy4uJyApIHwgKCAnPT4nICkgfCAoICggcnVsZV9fT3BPdGhlcl9fR3JvdXBfNV9fMCApICkgfCAoICggcnVsZV9fT3BPdGhlcl9fR3JvdXBfNl9fMCApICkgfCAoICc8PicgKSB8ICggJz86JyApICkKKyAgICAgICAgICAgIGludCBhbHQxMj05OworICAgICAgICAgICAgYWx0MTIgPSBkZmExMi5wcmVkaWN0KGlucHV0KTsKKyAgICAgICAgICAgIHN3aXRjaCAoYWx0MTIpIHsKKyAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMTk0OjE6ICggJy0+JyApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzE5NDoxOiAoICctPicgKQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvY29udGVudGFzc2lzdC9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMTk1OjE6ICctPicKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgYmVmb3JlKGdyYW1tYXJBY2Nlc3MuZ2V0T3BPdGhlckFjY2VzcygpLmdldEh5cGhlbk1pbnVzR3JlYXRlclRoYW5TaWduS2V5d29yZF8wKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBtYXRjaChpbnB1dCwyOSxGT0xMT1dfMjlfaW5fcnVsZV9fT3BPdGhlcl9fQWx0ZXJuYXRpdmVzNjc5NCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiA7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICBhZnRlcihncmFtbWFyQWNjZXNzLmdldE9wT3RoZXJBY2Nlc3MoKS5nZXRIeXBoZW5NaW51c0dyZWF0ZXJUaGFuU2lnbktleXdvcmRfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgMiA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMyMDI6NjogKCAnLi48JyApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzIwMjo2OiAoICcuLjwnICkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzIwMzoxOiAnLi48JworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICBiZWZvcmUoZ3JhbW1hckFjY2Vzcy5nZXRPcE90aGVyQWNjZXNzKCkuZ2V0RnVsbFN0b3BGdWxsU3RvcExlc3NUaGFuU2lnbktleXdvcmRfMSgpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgbWF0Y2goaW5wdXQsMzAsRk9MTE9XXzMwX2luX3J1bGVfX09wT3RoZXJfX0FsdGVybmF0aXZlczY4MTQpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRPcE90aGVyQWNjZXNzKCkuZ2V0RnVsbFN0b3BGdWxsU3RvcExlc3NUaGFuU2lnbktleXdvcmRfMSgpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgMyA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9jb250ZW50YXNzaXN0L2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMyMTA6NjogKCAoIHJ1bGVfX09wT3RoZXJfX0dyb3VwXzJfXzAgKSApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzI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ExPV19ydWxlX19PcE90aGVyX19Hcm91cF8yX18wX2luX3J1bGVfX09wT3RoZXJfX0FsdGVybmF0aXZlczY4MzMpOworICAgICAgICAgICAgICAgICAgICBydWxlX19PcE90aGVyX19Hcm91cF8yX18wKCk7CisKKyAgICAgICAgICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gOworCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgYWZ0ZXIoZ3JhbW1hckFjY2Vzcy5nZXRPcE90aGVyQWNjZXNzKCkuZ2V0R3JvdXBfMigpKTsgCisgICAgICAgICAgICAgICAgICAgIH0KKwpkaWZmIC0tZ2l0IGEvb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2ludGVybmFsL0N1YmVEU0xBY3RpdmF0b3IuamF2YSBiL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9pbnRlcm5hbC9DdWJlRFNMQWN0aXZhdG9yLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uNDExYjBiMAotLS0gL2Rldi9udWxsCisrKyBiL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9pbnRlcm5hbC9DdWJlRFNMQWN0aXZhdG9yLmphdmEKQEAgLTAsMCArMSwxMDYgQEAKKy8qKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29weXJpZ2h0IChjKSAyMDExLCAyMDE2IC0gTG9ldHogR21iSCZDby5LRyAoNjkxMTUgSGVpZGVsYmVyZywgR2VybWFueSkgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBBbGwgcmlnaHRzIHJlc2VydmVkLiBUaGlzIHByb2dyYW0gYW5kIHRoZSBhY2NvbXBhbnlpbmcgbWF0ZXJpYWxzICAgICAgICAgICAKKyAqICBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiAgd2hpY2ggYWNjb21wYW5pZXMgdGhpcyBkaXN0cmlidXRpb24sIGFuZCBpcyBhdmFpbGFibGUgYXQgICAgICAgICAgICAgICAgICAKKyAqICBodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2xlZ2FsL2VwbC12MTAuaHRtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29udHJpYnV0b3JzOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogCSAgIENocmlzdG9waGUgTG9ldHogKExvZXR6IEdtYkgmQ28uS0cpIC0gaW5pdGlhbCBpbXBsZW1lbnRhdGlvbgorICogCisgKi8KKworcGFja2FnZSBvcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wudWkuaW50ZXJuYWw7CisKK2ltcG9ydCBqYXZhLnV0aWwuQ29sbGVjdGlvbnM7CitpbXBvcnQgamF2YS51dGlsLk1hcDsKKworaW1wb3J0IG9yZy5hcGFjaGUubG9nN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YmVyZywgR2VybWFueSkKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogQWxsIHJpZ2h0cyByZXNlcnZlZC4gVGhpcyBwcm9ncmFtIGFuZCB0aGUgYWNjb21wYW55aW5nIG1hdGVyaWFscyAgICAgICAgICAgCisgKiBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgIAorICogaHR0cDovL3d3dy5lY2xpcHNlLm9yZy9sZWdhbC9lcGwtdjEwLmh0bWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogQ29udHJpYnV0b3JzOiAgIAorICogQ2hyaXN0b3BoZSBMb2V0eiAoTG9ldHogR21iSCZDby5LRykgLSBpbml0aWFsIGltcGxlbWVudGF0aW9uIAorICovCitwYWNrYWdlIG9yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aTsKKworaW1wb3J0IGphdmEudXRpbC5SZXNvdXJjZUJ1bmRsZTsKKworaW1wb3J0IG9yZy5lY2xpcHNlLm9zYnAudXRpbHMuY29uc3RhbnRzLkdlbmVyYXRvckNvbnN0YW50czsKK2ltcG9ydCBvcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmJhc2ljLnVpLkJhc2ljRFNMRG9jdW1lbnRhdGlvblRyYW5zbGF0b3I7CisKK3B1YmxpYyBjbGFzcyBDdWJlRFNMRG9jdW1lbnRhdGlvblRyYW5zbGF0b3IgZXh0ZW5kcyB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pL0N1YmVEU0xFT2JqZWN0SG92ZXIuamF2YQpAQCAtMCwwICsxLDI1IEBACisvKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogQ29weXJpZ2h0IChjKSAyMDExLCAyMDE2IC0gTG9ldHogR21iSCZDby5LRyAoNjkxMTUgSGVpZGVsYmVyZywgR2VybWFueSkKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogQWxsIHJpZ2h0cyByZXNlcnZlZC4gVGhpcyBwcm9ncmFtIGFuZCB0aGUgYWNjb21wYW55aW5nIG1hdGVyaWFscyAgICAgICAgICAgCisgKiBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgIAorICogaHR0cDovL3d3dy5lY2xpcHNlLm9yZy9sZWdhbC9lcGwtdjEwLmh0bWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogQ29udHJpYnV0b3JzOiAgIAorICogQ2hyaXN0b3BoZSBMb2V0eiAoTG9ldHogR21iSCZDby5LRykgLSBpbml0aWFsIGltcGxlbWVudGF0aW9uIAorICovCitwYWNrYWdlIG9yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aTsKKworaW1wb3J0IG9yZy5lY2xpcHNlLnh0ZXh0LnVpLmVkaXRvci5ob3Zlci5JRU9iamVjdEhvdmVyUHJv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E2IC0gTG9ldHogR21iSCZDby5LRyAoNjkxMTUgSGVpZGVsYmVyZywgR2VybWFueSkKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogQWxsIHJpZ2h0cyByZXNlcnZlZC4gVGhpcyBwcm9ncmFtIGFuZCB0aGUgYWNjb21wYW55aW5nIG1hdGVyaWFscyAgICAgICAgICAgCisgKiBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgIAorICogaHR0cDovL3d3dy5lY2xpcHNlLm9yZy9sZWdhbC9lcGwtdjEwLmh0bWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogQ29udHJpYnV0b3JzOiAgIAorICogQ2hyaXN0b3BoZSBMb2V0eiAoTG9ldHogR21iSCZDby5LRykgLSBpbml0aWFsIGltcGxlbWVudGF0aW9uIAorICovCitwYWNrYWdlIG9yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aTsKKworaW1wb3J0IG9yZy5lY2xpcHNlLm9zYnAueHRleHQuYmFzaWMudWkuQmFzaWNEU0xEb2N1bWVudGF0aW9uVHJhbnNsYXRvcjsKK2ltcG9ydCBvcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmJhc2ljLnVpLkJhc2ljRFNMRU9iamVjdEhvdmVyRG9jdW1lbnRhdGlvblByb3ZpZGVyOworCitwdWJsaWMgY2xhc3MgQ3ViZURTTEVPYmplY3RIb3ZlckRv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0ZXh0LmN1YmVkc2wudWkvc3JjL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC91aS9DdWJlRFNMRU9iamVjdEhvdmVyUHJvdmlkZXIuamF2YQpAQCAtMCwwICsxLDM2IEBACisvKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogQ29weXJpZ2h0IChjKSAyMDExLCAyMDE2IC0gTG9ldHogR21iSCZDby5LRyAoNjkxMTUgSGVpZGVsYmVyZywgR2VybWFueSkKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogQWxsIHJpZ2h0cyByZXNlcnZlZC4gVGhpcyBwcm9ncmFtIGFuZCB0aGUgYWNjb21wYW55aW5nIG1hdGVyaWFscyAgICAgICAgICAgCisgKiBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgIAorICogaHR0cDovL3d3dy5lY2xpcHNlLm9yZy9sZWdhbC9lcGwtdjEwLmh0bWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogQ29udHJpYnV0b3JzOiAgIAorICogQ2hyaXN0b3BoZSBMb2V0eiAoTG9ldHogR21iSCZDby5LRykgLSBpbml0aWFsIGltcGxlbWVudGF0aW9uIAorICovCitwYWNrYWdlIG9yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aTsKKwora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ZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdWkvQ3ViZURTTFVpTW9kdWxlLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uODM0NzYyNgotLS0gL2Rldi9udWxsCisrKyBiL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMvb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL0N1YmVEU0xVaU1vZHVsZS5qYXZhCkBAIC0wLDAgKzEsNTEgQEAKKy8qKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29weXJpZ2h0IChjKSAyMDExLCAyMDE2IC0gTG9ldHogR21iSCZDby5LRyAoNjkxMTUgSGVpZGVsYmVyZywgR2VybWFueSkgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBBbGwgcmlnaHRzIHJlc2VydmVkLiBUaGlzIHByb2dyYW0gYW5kIHRoZSBhY2NvbXBhbnlpbmcgbWF0ZXJpYWxzICAgICAgICAgICAKKyAqICBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiAgd2hpY2ggYWNjb21wYW5pZXMgdGhpcyBkaXN0cmlidXRpb24sIGFuZCBpcyBhdmFpbGFibGUgYXQgICAgICAgICAgICAgICAgICAKKyAqICBodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2xlZ2FsL2VwbC12MTAuaHRtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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HNsL3VpL2NvbnRlbnRhc3Npc3QvQ3ViZURTTFByb3Bvc2FsUHJvdmlkZXIueHRlbmQKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uOTRkY2UxNAotLS0gL2Rldi9udWxsCisrKyBiL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS9zcmMvb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2NvbnRlbnRhc3Npc3QvQ3ViZURTTFByb3Bvc2FsUHJvdmlkZXIueHRlbmQKQEAgLTAsMCArMSwxMDMgQEAKKy8qKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29weXJpZ2h0IChjKSAyMDExLCAyMDE2IC0gTG9ldHogR21iSCZDby5LRyAoNjkxMTUgSGVpZGVsYmVyZywgR2VybWFueSkgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBBbGwgcmlnaHRzIHJlc2VydmVkLiBUaGlzIHByb2dyYW0gYW5kIHRoZSBhY2NvbXBhbnlpbmcgbWF0ZXJpYWxzICAgICAgICAgICAKKyAqICBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiAgd2hpY2ggYWNjb21wYW5pZXMgdGhpcyBkaXN0cmlidXRpb24sIGFuZCBpcyBhdmFpbGFibGUgYXQgICAgICAgICAgICAgICAgICAKKyAqICBodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2xlZ2FsL2VwbC12MTAuaHRtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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uY3ViZWRzbC51aS9zcmMvb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3VpL2xhYmVsaW5nL0N1YmVEU0xEZXNjcmlwdGlvbkxhYmVsUHJvdmlkZXIueHRlbmQKQEAgLTAsMCArMSwzOCBAQAorLyoqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBDb3B5cmlnaHQgKGMpIDIwMTEsIDIwMTYgLSBMb2V0eiBHbWJIJkNvLktHICg2OTExNSBIZWlkZWxiZXJnLCBHZXJtYW55KSAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIEFsbCByaWdodHMgcmVzZXJ2ZWQuIFRoaXMgcHJvZ3JhbSBhbmQgdGhlIGFjY29tcGFueWluZyBtYXRlcmlhbHMgICAgICAgICAgIAorICogIGFyZSBtYWRlIGF2YWlsYWJsZSB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEVjbGlwc2UgUHVibGljIExpY2Vuc2UgdjEuMCAgICAgICAKKyAqICB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgIAorICogIGh0dHA6Ly93d3cuZWNsaXBzZS5vcmcvbGVnYWwvZXBsLXYxMC5odG1sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBDb250cmlidXRvcnM6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAJICAgQ2hyaXN0b3BoZSBMb2V0eiAoTG9ldHogR21iSCZDby5LRykgLSBpbml0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jKSAyMDExLCAyMDE2IC0gTG9ldHogR21iSCZDby5LRyAoNjkxMTUgSGVpZGVsYmVyZywgR2VybWFueSkgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBBbGwgcmlnaHRzIHJlc2VydmVkLiBUaGlzIHByb2dyYW0gYW5kIHRoZSBhY2NvbXBhbnlpbmcgbWF0ZXJpYWxzICAgICAgICAgICAKKyAqICBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiAgd2hpY2ggYWNjb21wYW5pZXMgdGhpcyBkaXN0cmlidXRpb24sIGFuZCBpcyBhdmFpbGFibGUgYXQgICAgICAgICAgICAgICAgICAKKyAqICBodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2xlZ2FsL2VwbC12MTAuaHRtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29udHJpYnV0b3JzOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogCSAgIENocmlzdG9waGUgTG9ldHogKExvZXR6IEdtYkgmQ28uS0cpIC0gaW5pdGlhbCBpbXBsZW1lbnRhdGlvbgorICogCisgKiAKKyAqICBUaGlzIGNvcHlyaWdodCBub3RpY2Ugc2hvd3MgdXAgaW4gdGhlIGdlbmVyYXRlZCBKYXZhIGNvZGUKKyAqCisgKi8KKyAKK3BhY2thZ2Ugb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnVpLm91dGxpbmUKKworLyoqCisgKiBDdXN0b21pemF0aW9uIG9mIHRoZSBkZWZhdWx0IG91dGxpbmU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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gVGhpcyBwcm9ncmFtIGFuZCB0aGUgYWNjb21wYW55aW5nIG1hdGVyaWFscyAgICAgICAgICAgCisgKiAgYXJlIG1hZGUgYXZhaWxhYmxlIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgRWNsaXBzZSBQdWJsaWMgTGljZW5zZSB2MS4wICAgICAgIAorICogIHdoaWNoIGFjY29tcGFuaWVzIHRoaXMgZGlzdHJpYnV0aW9uLCBhbmQgaXMgYXZhaWxhYmxlIGF0ICAgICAgICAgICAgICAgICAgCisgKiAgaHR0cDovL3d3dy5lY2xpcHNlLm9yZy9sZWdhbC9lcGwtdjEwLmh0bWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIENvbnRyaWJ1dG9yczogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqIAkgICBDaHJpc3RvcGhlIExvZXR6IChMb2V0eiBHbWJIJkNvLktHKSAtIGluaXRpYWwgaW1wbGVtZW50YXRpb24KKyAqIAorICogCisgKiAgVGhpcyBjb3B5cmlnaHQgbm90aWNlIHNob3dzIHVwIGluIHRoZSBnZW5lcmF0ZWQgSmF2YSBjb2RlCisgKgorICovCisgCitwYWNrYWdlIG9yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC51aS5xdWlja2ZpeAorCisvL2ltcG9ydCBvcmcuZWNsaXBzZS54dGV4dC51aS5lZGl0b3IucXVpY2tmaXguRml4CisvL2ltcG9ydCBvcmcuZWNsaXBzZS54dGV4dC51aS5lZGl0b3IucXVpY2tmaXguSXNzdWVSZXNvbHV0aW9uQWNjZXB0b3IKKy8vaW1wb3J0IG9yZy5lY2xp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AgLTAsMCArMSwzNDggQEAKKy8qKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29weXJpZ2h0IChjKSAyMDExLCAyMDE2IC0gTG9ldHogR21iSCZDby5LRyAoNjkxMTUgSGVpZGVsYmVyZywgR2VybWFueSkgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBBbGwgcmlnaHRzIHJlc2VydmVkLiBUaGlzIHByb2dyYW0gYW5kIHRoZSBhY2NvbXBhbnlpbmcgbWF0ZXJpYWxzICAgICAgICAgICAKKyAqICBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiAgd2hpY2ggYWNjb21wYW5pZXMgdGhpcyBkaXN0cmlidXRpb24sIGFuZCBpcyBhdmFpbGFibGUgYXQgICAgICAgICAgICAgICAgICAKKyAqICBodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2xlZ2FsL2VwbC12MTAuaHRtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29udHJpYnV0b3JzOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogCSAgIENocmlzdG9waGUgTG9ldHogKExvZXR6IEdtYkgmQ28uS0cpIC0gaW5pdGlhbCBpbXBsZW1lbnRhdGlvbgorICogCisgKi8KKworcGFja2FnZSBvcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2w7CisKK2ltcG9ydCBqYXZhLnV0aWwuUHJvcGVydGllczsKK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mVEU0xTdGFuZGFsb25lU2V0dXBHZW5lcmF0ZWQuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5mZmVhYzMwCi0tLSAvZGV2L251bGwKKysrIGIvb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL0N1YmVEU0xTdGFuZGFsb25lU2V0dXBHZW5lcmF0ZWQuamF2YQpAQCAtMCwwICsxLDUzIEBACisvKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIENvcHlyaWdodCAoYykgMjAxMSwgMjAxNiAtIExvZXR6IEdtYkgmQ28uS0cgKDY5MTE1IEhlaWRlbGJlcmcsIEdlcm1hbnkpIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gVGhpcyBwcm9ncmFtIGFuZCB0aGUgYWNjb21wYW55aW5nIG1hdGVyaWFscyAgICAgICAgICAgCisgKiAgYXJlIG1hZGUgYXZhaWxhYmxlIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgRWNsaXBzZSBQdWJsaWMgTGljZW5zZSB2MS4wICAgICAgIAorICogIHdoaWNoIGFjY29tcGFuaWVzIHRoaXMgZGlzdHJpYnV0aW9uLCBhbmQgaXMgYXZhaWxhYmxlIGF0ICAgICAgICAgICAgICAgICAgCisgKiAgaHR0cDovL3d3dy5lY2xpcHNlLm9yZy9sZWdhbC9lcGwtdjEwLmh0bWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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gICAgICAgICAgICAgICAgICAgICAgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBDb250cmlidXRvcnM6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAJICAgQ2hyaXN0b3BoZSBMb2V0eiAoTG9ldHogR21iSCZDby5LRykgLSBpbml0aWFsIGltcGxlbWVudGF0aW9uCisgKiAKKyAqLworCitwYWNrYWdlIG9yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC5wYXJzZXIuYW50bHI7CisKK2ltcG9ydCBqYXZhLmlvLklucHV0U3RyZWFtOworaW1wb3J0IG9yZy5lY2xpcHNlLnh0ZXh0LnBhcnNlci5hbnRsci5JQW50bHJUb2tlbkZpbGVQcm92aWRlcjsKKworcHVibGljIGNsYXNzIEN1YmVEU0xBbnRsclRva2VuRmlsZVByb3ZpZGVyIGltcGxlbWVudHMgSUFudGxyVG9rZW5GaWxlUHJvdmlkZXIgeworCQorCXB1YmxpYyBJbnB1dFN0cmVhbSBnZXRBbnRsclRva2VuRmlsZSgpIHsKKwkJQ2xhc3NMb2FkZXIgY2xhc3NMb2FkZXIgPSBnZXRDbGFzcygpLmdldENsYXNzTG9hZGVyKCk7CisgICAgCXJldHVybiBjbGFzc0xvYWRlci5nZXRSZXNvdXJjZUFzU3RyZWFtKCJvcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC50b2tlbnMiKTsKKwl9Cit9CmRpZmYgLS1naXQgYS9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL0N1YmVEU0xQYXJzZXIuamF2YSBiL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvQ3ViZURTTFBhcnNlci5qYXZhCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjc3N2ViYTEKLS0tIC9kZXYvbnVsbAorKysgYi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL0N1YmVEU0xQYXJzZXIuamF2YQpAQCAtMCwwICsxLDUwIEBACisvKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIENvcHlyaWdodCAoYykgMjAxMSwgMjAxNiAtIExvZXR6IEdtYkgmQ28uS0cgKDY5MTE1IEhlaWRlbGJlcmcsIEdlcm1hbnkpIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gVGhpcyBwcm9ncmFtIGFuZCB0aGUgYWNjb21wYW55aW5nIG1hdGVyaWFscyAgICAgICAgICAgCisgKiAgYXJlIG1hZGUgYXZhaWxhYmxlIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgRWNsaXBzZSBQdWJsaWMgTGljZW5zZSB2MS4wICAgICAgIAorICogIHdoaWNoIGFjY29tcGFuaWVzIHRoaXMgZGlzdHJpYnV0aW9uLCBhbmQgaXMgYXZhaWxhYmxlIGF0ICAgICAgICAgICAgICAgICAgCisgKiAgaHR0cDovL3d3dy5lY2xpcHNlLm9yZy9sZWdhbC9lcGwtdjEwLmh0bWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKK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9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmcKQEAgLTAsMCArMSw4MDg0IEBACisvKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIENvcHlyaWdodCAoYykgMjAxMSwgMjAxNiAtIExvZXR6IEdtYkgmQ28uS0cgKDY5MTE1IEhlaWRlbGJlcmcsIEdlcm1hbnkpIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gVGhpcyBwcm9ncmFtIGFuZCB0aGUgYWNjb21wYW55aW5nIG1hdGVyaWFscyAgICAgICAgICAgCisgKiAgYXJlIG1hZGUgYXZhaWxhYmxlIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgRWNsaXBzZSBQdWJsaWMgTGljZW5zZSB2MS4wICAgICAgIAorICogIHdoaWNoIGFjY29tcGFuaWVzIHRoaXMgZGlzdHJpYnV0aW9uLCBhbmQgaXMgYXZhaWxhYmxlIGF0ICAgICAgICAgICAgICAgICAgCisgKiAgaHR0cDovL3d3dy5lY2xpcHNlLm9yZy9sZWdhbC9lcGwtdjEwLmh0bWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIENvbnRyaWJ1dG9yczogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqIAkgICBDaHJpc3RvcGhlIExvZXR6IChMb2V0eiBHbWJIJkNvLktHKSAtIGlua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FbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0WEFzc2lnbm1lbnRSdWxlKCkpOworCSAgICAgICAgfQorICAgICAgIAkJc2V0KAorICAgICAgIAkJCSRjdXJyZW50LCAKKyAgICAgICAJCQkidmFsdWUiLAorICAgICAgICAJCWx2X3ZhbHVlXzNfMCwgCisgICAgICAgIAkJIlhBc3NpZ25tZW50Iik7CisJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisJICAgIH0KKworKQorKSkKKyAgICB8KAorICAgIHsgCisgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRYQXNzaWdubWVudEFjY2VzcygpLmdldFhPckV4cHJlc3Npb25QYXJzZXJSdWxlQ2FsbF8xXzAoKSk7IAorICAgIH0KKyAgICB0aGlzX1hPckV4cHJlc3Npb25fND1ydWxlWE9yRXhwcmVzc2lvbgorICAgIHsgCisgICAgICAgICRjdXJyZW50ID0gJHRoaXNfWE9yRXhwcmVzc2lvbl80LmN1cnJlbnQ7IAorICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgfQorKCgoKCgKKykoCisoCisJCXJ1bGVPcE11bHRpQXNzaWduCispCispKSk9PigoCisgICAgeworICAgICAgICAkY3VycmVudCA9IGZvcmNlQ3JlYXRlTW9kZWxFbGVtZW50QW5kU2V0KAorICAgICAgICAgICAgZ3JhbW1hckFjY2Vzcy5nZXRYQXNzaWdubWVudEFjY2VzcygpLmdldFhCaW5hcnlPcGVyYXRpb25MZWZ0T3BlcmFuZEFjdGlvbl8xXzFfMF8wXzAoKSwKKyAgICAgICAgICAgICRjdXJyZW50KTsKKyAgICB9CispKAorKAorCQl7CisJCQlpZiAoJGN1cnJlbnQ9PW51bGwpIHsKKwkgICAgICAgICAgICAkY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudChncmFtbWFyQWNjZXNzLmdldFhBc3NpZ25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ICAgfQorKSkoCisoCisJCXsgCisJICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0WE1lbWJlckZlYXR1cmVDYWxsQWNjZXNzKCkuZ2V0VmFsdWVYQXNzaWdubWVudFBhcnNlclJ1bGVDYWxsXzFfMF8xXzAoKSk7IAorCSAgICB9CisJCWx2X3ZhbHVlXzZfMD1ydWxlWEFzc2lnbm1lbnQJCXsKKwkgICAgICAgIGlmICgkY3VycmVudD09bnVsbCkgeworCSAgICAgICAgICAgICRjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0WE1lbWJlckZlYXR1cmVDYWxsUnVsZSgpKTsKKwkgICAgICAgIH0KKyAgICAgICAJCXNldCgKKyAgICAgICAJCQkkY3VycmVudCwgCisgICAgICAgCQkJInZhbHVlIiwKKyAgICAgICAgCQlsdl92YWx1ZV82XzAsIAorICAgICAgICAJCSJYQXNzaWdubWVudCIpOworCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworCSAgICB9CisKKykKKykpCisgICAgfCgoKCgoCispKAknLicgCisKKyAgICB8KAorKAorCSc/LicgCisgCisKKykKKykKKyAgICB8KAorKAorCSc6OicgCisgCisKKykKKykpKSk9PigoCisgICAgeworICAgICAgICAkY3VycmVudCA9IGZvcmNlQ3JlYXRlTW9kZWxFbGVtZW50QW5kU2V0KAorICAgICAgICAgICAgZ3JhbW1hckFjY2Vzcy5nZXRYTWVtYmVyRmVhdHVyZUNhbGxBY2Nlc3MoKS5nZXRYTWVtYmVyRmVhdHVyZUNhbGxNZW1iZXJDYWxsVGFyZ2V0QWN0aW9uXzFfMV8wXzBfMCgpLAorICAgICAgICAgICAgJGN1cnJlbnQpOworICAgIH0KKykoCW90aGVybHZfOD0nLicgCisgICAgeworICAgIAluZXdMZWFmTm9kZShvdGhlcmx2XzgsIGdyYW1tYXJBY2Nlc3Mu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Nb2RlbEVsZW1lbnRGb3JQYXJlbnQoZ3JhbW1hckFjY2Vzcy5nZXRYTGlzdExpdGVyYWxSdWxlKCkpOworCSAgICAgICAgfQorICAgICAgIAkJYWRkKAorICAgICAgIAkJCSRjdXJyZW50LCAKKyAgICAgICAJCQkiZWxlbWVudHMiLAorICAgICAgICAJCWx2X2VsZW1lbnRzXzNfMCwgCisgICAgICAgIAkJIlhFeHByZXNzaW9uIik7CisJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisJICAgIH0KKworKQorKSgJb3RoZXJsdl80PScsJyAKKyAgICB7CisgICAgCW5ld0xlYWZOb2RlKG90aGVybHZfNCwgZ3JhbW1hckFjY2Vzcy5nZXRYTGlzdExpdGVyYWxBY2Nlc3MoKS5nZXRDb21tYUtleXdvcmRfM18xXzAoKSk7CisgICAgfQorKAorKAorCQl7IAorCSAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldFhMaXN0TGl0ZXJhbEFjY2VzcygpLmdldEVsZW1lbnRzWEV4cHJlc3Npb25QYXJzZXJSdWxlQ2FsbF8zXzFfMV8wKCkpOyAKKwkgICAgfQorCQlsdl9lbGVtZW50c181XzA9cnVsZVhFeHByZXNzaW9uCQl7CisJICAgICAgICBpZiAoJGN1cnJlbnQ9PW51bGwpIHsKKwkgICAgICAgICAgICAkY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudEZvclBhcmVudChncmFtbWFyQWNjZXNzLmdldFhMaXN0TGl0ZXJhbFJ1bGUoKSk7CisJICAgICAgICB9CisgICAgICAgCQlhZGQoCisgICAgICAgCQkJJGN1cnJlbnQsIAorICAgICAgIAkJCSJlbGVtZW50cyIsCisgICAgICAgIAkJbHZfZWxlbWVudHNfNV8wLCAKKyAgICAgICAgCQkiWEV4cHJlc3Npb24iKTsKKwkgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKwkgICAgfQorCispCispKS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1RfXzQ5PTQ5CitUX181MD01MAorVF9fNTE9NTEKK1RfXzUyPTUyCitUX181Mz01MworVF9fNTQ9NTQKK1RfXzU1PTU1CitUX181Nj01NgorVF9fNTc9NTcKK1RfXzU4PTU4CitUX181OT01OQorVF9fNjA9NjAKK1RfXzYxPTYxCitUX182Mj02MgorVF9fNjM9NjMKK1RfXzY0PTY0CitUX182NT02NQorVF9fNjY9NjYKK1RfXzY3PTY3CitUX182OD02OAorVF9fNjk9NjkKK1RfXzcwPTcwCitUX183MT03MQorVF9fNzI9NzIKK1RfXzczPTczCitUX183ND03NAorVF9fNzU9NzUKK1RfXzc2PTc2CitUX183Nz03NworVF9fNzg9NzgKK1RfXzc5PTc5CitUX184MD04MAorVF9fODE9ODEKK1RfXzgyPTgyCitUX184Mz04MworVF9fODQ9ODQKK1RfXzg1PTg1CitUX184Nj04NgorVF9fODc9ODcKK1RfXzg4PTg4CitUX184OT04OQorVF9fOTA9OTAKK1RfXzkxPTkxCitUX185Mj05MgorVF9fOTM9OTMKK1RfXzk0PTk0CitUX185NT05NQorVF9fOTY9OTYKK1RfXzk3PTk3CitUX185OD05OAorVF9fOTk9OTkKZGlmZiAtLWdpdCBhL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMTGV4ZXIuamF2YSBiL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMTGV4ZXIuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi44N2JmYTI2Ci0tLSAvZGV2L251bGwKKysrIGIvb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0xMZXhlci5qYXZhCkBAIC0wLDAgKzEsNTA2OCBAQAorLyoqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBDb3B5cmlnaHQgKGMpIDIwMTEsIDIwMTYgLSBMb2V0eiBHbWJIJkNvLktHICg2OTExNSBIZWlkZWxiZXJnLCBHZXJtYW55KSAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIEFsbCByaWdodHMgcmVzZXJ2ZWQuIFRoaXMgcHJvZ3JhbSBhbmQgdGhlIGFjY29tcGFueWluZyBtYXRlcmlhbHMgICAgICAgICAgIAorICogIGFyZSBtYWRlIGF2YWlsYWJsZSB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEVjbGlwc2UgUHVibGljIExpY2Vuc2UgdjEuMCAgICAgICAKKyAqICB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgIAorICogIGh0dHA6Ly93d3cuZWNsaXBzZS5vcmcvbGVnYWwvZXBsLXYxMC5odG1sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBDb250cmlidXRvcnM6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAJICAgQ2hyaXN0b3BoZSBMb2V0eiAoTG9ldHogR21iSCZDby5LRykgLSBp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c3RhdGljIGZpbmFsIGludCBUX181Mz01MzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX181ND01NDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX182MD02MDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX182MT02MTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBSVUxFX0lEPTQ7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTMwPTEzMDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBSVUxFX0lOVD03OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzY2PTY2OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFJVTEVfTUxfQ09NTUVOVD05OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzY3PTY3OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzEyOT0xMjk7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNjg9Njg7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNjk9Njk7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNjI9NjI7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTI2PTEyNjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX182Mz02MzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMjU9MTI1OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzY0PTY0OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzEyOD0xMjg7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNjU9NjU7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTI3PTEyNzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zNz0zNzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zOD0zODsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zOT0zOTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zMz0zMzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zND0zNDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zNT0zNTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zNj0zNjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zMD0zMDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zMT0zMTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18zMj0zMjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180OD00ODsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180OT00OTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180ND00NDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180NT00NTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180Nj00NjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180Nz00NzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180MD00MDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180MT00MTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180Mj00MjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX180Mz00MzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX185MT05MTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMDA9MTAwOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzkyPTkyOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzkzPTkzOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzEwMj0xMDI7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fOTQ9OTQ7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTAxPTEwMTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX185MD05MDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xOT0xOTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xNT0xNTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xNj0xNjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xNz0xNzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xOD0xODsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX185OT05OTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMz0xMzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xND0xNDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX185NT05NTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX185Nj05NjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX185Nz05NzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX185OD05ODsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBSVUxFX0RFQ0lNQUw9ODsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yNj0yNjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yNz0yNzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yOD0yODsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yOT0yOTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yMj0yMjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yMz0yMzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yND0yNDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yNT0yNTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yMD0yMDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18yMT0yMTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMjI9MTIyOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzcwPTcwOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzEyMT0xMjE7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNzE9NzE7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTI0PTEyNDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX183Mj03MjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMjM9MTIzOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzEyMD0xMjA7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgUlVMRV9TVFJJTkc9NTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBSVUxFX1NMX0NPTU1FTlQ9MTA7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNzc9Nzc7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTE5PTExOTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX183OD03ODsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMTg9MTE4OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzc5PTc5OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzczPTczOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzExNT0xMTU7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgRU9GPS0xOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzc0PTc0OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzExND0xMTQ7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNzU9NzU7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTE3PTExNzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX183Nj03NjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMTY9MTE2OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzgwPTgwOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzExMT0xMTE7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fODE9ODE7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTEwPTExMDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX184Mj04MjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMTM9MTEzOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzgzPTgzOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzExMj0xMTI7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgUlVMRV9XUz0xMTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBSVUxFX0FOWV9PVEhFUj0xMjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX184OD04ODsKKyAgICBwdWJsaWMgc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lLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmciOyB9CisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzEzIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMygpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xMzsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTE6NzogKCAncGFja2FnZScgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMTo5OiAncGFja2FnZScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJwYWNrYWdlIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzEzIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xNCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMTQoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTQ7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyOjc6ICggJ3snICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTI6OTogJ3snCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgneycpOyAKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTQiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzE1IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xNSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xNTsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2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ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE0Ojk6ICdjdWJlJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goImN1YmUiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTYiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzE3IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xNygpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xNzsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTU6NzogKCAnZGVmYXVsdE1lYXN1cmUnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTU6OTogJ2RlZmF1bHRNZWFzdXJlJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goImRlZmF1bHRNZWFzdXJlIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzE3IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xOCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMTgoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTg7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE2Ojc6ICggJ2RpbWVuc2lvblVzYWdlJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE2Ojk6ICdkaW1lbnNpb25Vc2FnZScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJkaW1lbnNpb25Vc2FnZSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18xOCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTkiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzE5KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzE5OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNzo3OiAoICdvdmVyJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE3Ojk6ICdvdmVyJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIm92ZXIiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTkiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzIwIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18yMCgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICA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29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjA6OTogJ3R5cGVUaW1lJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goInR5cGVUaW1lIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzIyIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18yMyIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMjMoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMjM7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIxOjc6ICggJ2hpZXJhcmNoeScgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMTo5OiAnaGllcmFyY2h5JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goImhpZXJhcmNoeSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18yMyIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMjQiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzI0KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzI0OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMjo3OiAoICdoYXNBbGwnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjI6OTogJ2hhc0FsbCcKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJoYXNBbGwiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMjQiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzI1IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18yNSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18yNTsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjM6NzogKCAnYWxsTWVtYmVyTmFtZT0nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjM6OTogJ2FsbE1lbWJlck5hbWU9JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goImFsbE1lbWJlck5hbWU9Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzI1IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18yNiIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMjYoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMjY7CisgICA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c2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNjo5OiAna2V5PScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJrZXk9Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzI4IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18yOSIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMjkoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMjk7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI3Ojc6ICggJ2xldmVsJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI3Ojk6ICdsZXZlbCcKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJsZXZlbCIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18yOSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMzAiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzMwKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzMwOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyODo3OiAoICdjb2x1bW49JyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI4Ojk6ICdjb2x1bW49JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goImNvbHVtbj0iKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMzAiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzMxIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18zMSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18zMTsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Mjk6NzogKCAndW5pcXVlTWVtYmVycycgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyOTo5OiAndW5pcXVlTWVtYmVycycKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJ1bmlxdWVNZW1iZXJzIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzMxIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18zMiIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMzIoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMzI7CisgICAgICAgICAgICBpbnQgX2NoYW5u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nRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMTo3OiAoICdwcm9wZXJ0eScgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMTo5OiAncHJvcGVydHknCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgicHJvcGVydHkiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMzMiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzM0IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18zNCgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18zNDsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzI6NzogKCAndHlwZT0nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzI6OTogJ3R5cGU9JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goInR5cGU9Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzM0IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18zNSIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMzUoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMzU7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMzOjc6ICggJ21lYXN1cmUnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzM6OTogJ21lYXN1cmUnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgibWVhc3VyZSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18zNSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMzYiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzM2KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzM2OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozNDo3OiAoICdub3RWaXNpYmxlJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjM0Ojk6ICdub3RWaXNpYmxlJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIm5vdFZpc2libGUiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMzYiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzM3IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18zNygpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18zNzsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzU6NzogKCAnaW1wb3J0JyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjM1Ojk6ICdpbXBvcnQnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiaW1wb3J0Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzM3IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18zOCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMzgoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMzg7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmc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dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozNzo5OiAnKicKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCcqJyk7IAorCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18zOSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNDAiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzQwKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzQwOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozODo3OiAoICdAJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjM4Ojk6ICdAJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goJ0AnKTsgCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzQwIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX180MSIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNDEoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNDE7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjM5Ojc6ICggJygnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Mzk6OTogJygnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgnKCcpOyAKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fNDEiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzQyIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX180MigpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX180MjsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NDA6NzogKCAnLCcgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo0MDo5OiAnLCcKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCcsJyk7IAorCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX180MiIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNDMiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzQzKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzQzOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo0MTo3OiAoICcpJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjQxOjk6ICcpJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goJyknKTsgCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzQzIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX180NCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNDQoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNDQ7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjQyOjc6ICggJz0nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NDI6OTogJz0nCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgnPScpOyAKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fNDQiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzQ1IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX180NSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX180NTsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NDM6NzogKCAnIycgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo0Mzo5OiAnIycKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCcjJyk7IAorCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX180NSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNDYiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzQ2KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzQ2OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo0NDo3OiAoICdbJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjQ0Ojk6ICdbJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goJ1snKTsgCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzQ2IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX180NyIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNDcoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNDc7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjQ1Ojc6ICggJ10nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NDU6OTogJ10nCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgnXScpOyAKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fNDciCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzQ4IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX180OCgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX180ODsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NDY6NzogKCAnKz0nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NDY6OTogJys9JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIis9Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzQ4IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX180OSIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNDkoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNDk7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjQ3Ojc6ICggJy09JyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjQ3Ojk6ICctPScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCItPSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX180OSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNTAiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzUwKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzUwOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo0ODo3OiAoICcqPScgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo0ODo5OiAnKj0nCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiKj0iKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fNTAiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzUxIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX181MSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX181MTsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NDk6NzogKCAnLz0nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NDk6OTogJy89JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIi89Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzUxIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX181MiIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNTIoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNTI7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjUwOjc6ICggJyU9JyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjUwOjk6ICclPScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCIlPSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX181MiIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNTMiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzUzKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzUzOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo1MTo3OiAoICc8JyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjUxOjk6ICc8JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goJzwnKTsgCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzUzIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX181NCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNTQoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNTQ7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjUyOjc6ICggJz4nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTI6OTogJz4nCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgnPicpOyAKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fNTQiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzU1IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX181NSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX181NTsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTM6NzogKCAnPj0nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTM6OTogJz49JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIj49Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzU1IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX181NiIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNTYoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNTY7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjU0Ojc6ICggJ3x8JyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjU0Ojk6ICd8fCcKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJ8fCIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX181NiIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNTciCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzU3KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzU3OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo1NTo3OiAoICcmJicgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo1NTo5OiAnJiYnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiJiYiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fNTciCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzU4IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX181OCgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX181ODsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTY6NzogKCAnPT0nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTY6OTogJz09JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIj09Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzU4IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX181OSIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNTkoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNTk7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjU3Ojc6ICggJyE9JyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjU3Ojk6ICchPScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCIhPSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX181OSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNjAiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzYwKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzYwOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo1ODo3OiAoICc9PT0nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTg6OTogJz09PScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCI9PT0iKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fNjAiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzYxIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX182MSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX182MTsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTk6NzogKCAnIT09JyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjU5Ojk6ICchPT0nCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiIT09Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzYxIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX182MiIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNjIoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNjI7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjYwOjc6ICggJ2luc3RhbmNlb2YnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NjA6OTogJ2luc3RhbmNlb2YnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiaW5zdGFuY2VvZiIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX182MiIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNjMiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzYzKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzYzOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQV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JyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjYyOjk6ICcuLjwnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiLi48Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzY0IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX182NSIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNjUoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNjU7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjYzOjc6ICggJy4uJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjYzOjk6ICcuLicKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCIuLiIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX182NSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNjYiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzY2KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzY2OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo2NDo3OiAoICc9PicgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo2NDo5OiAnPT4nCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiPT4iKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fNjYiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzY3IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX182NygpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX182NzsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NjU6NzogKCAnPD4nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NjU6OTogJzw+JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIjw+Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzY3IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX182OCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNjgoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNjg7CisgICAgICAgICAgICBpbnQgX2NoYW5uZW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0wuZzo2Nzo3OiAoICcrJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjY3Ojk6ICcrJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goJysnKTsgCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzY5IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX183MCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNzAoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNzA7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjY4Ojc6ICggJy0nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Njg6OTogJy0nCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgnLScpOyAKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fNzAiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzcxIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX183MSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX183MTsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Njk6NzogKCAnKionICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Njk6OTogJyoqJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIioqIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzcxIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX183MiIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNzIoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNzI7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjcwOjc6ICggJy8nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NzA6OTogJy8nCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgnLycpOyAKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fNzIiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzczIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX183MygpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX183MzsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTF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gICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjcyOjk6ICchJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goJyEnKTsgCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzc0IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX183NSIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNzUoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNzU7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjczOjc6ICggJ2FzJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjczOjk6ICdhcycKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJhcyIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX183NSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fNzYiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzc2KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzc2OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo3NDo3OiAoICcrKycgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo3NDo5OiAnKysnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiKysiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fNzYiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzc3IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX183NygpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX183NzsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NzU6NzogKCAnLS0nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NzU6OTogJy0tJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIi0tIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzc3IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX183OCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fNzgoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fNzg7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS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HsKKyAgICAgICAgICAgIG1hdGNoKCd8Jyk7IAorCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX184MCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fODEiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzgxKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzgxOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo3OTo3OiAoICdpZicgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo3OTo5OiAnaWYnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiaWYiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fODEiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzgyIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX184MigpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX184MjsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODA6NzogKCAnZWxzZScgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDo5OiAnZWxzZScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJlbHNlIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzgyIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX184MyIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fODMoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fODM7CisgICAgICAgICAg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cm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4Mjo3OiAoICc6JyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgyOjk6ICc6JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goJzonKTsgCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzg0IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX184NSIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fODUoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fODU7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgzOjc6ICggJ2RlZmF1bHQnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODM6OTogJ2RlZmF1bHQnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiZGVmYXVsdCIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX184NSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fODYiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzg2KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzg2OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4NDo3OiAoICdjYXNlJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjg0Ojk6ICdjYXNlJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goImNhc2UiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fODYiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzg3IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX184NygpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX184NzsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODU6NzogKCAnZm9yJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjg1Ojk6ICdmb3InCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiZm9yIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzg3IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX184OCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fODgoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgewor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ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjg4Ojk6ICd2YXInCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgidmFyIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzkwIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX185MSIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fOTEoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fOTE7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjg5Ojc6ICggJ3ZhbCcgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4OTo5OiAndmFsJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goInZhbCIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX185MSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fOTIiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzkyKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzkyOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo5MDo3OiAoICdleHRlbmRzJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjkwOjk6ICdleHRlbmRzJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goImV4dGVuZHMiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fOTIiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzkzIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX185MygpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX185MzsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6OTE6NzogKCAnc3RhdGljJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjkxOjk6ICdzdGF0aWMnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgic3RhdGljIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzkzIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX185NCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fOTQoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fOTQ7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5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RjaCgibmV3Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzk2IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX185NyIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fOTcoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fOTc7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjk1Ojc6ICggJ2ZhbHNlJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjk1Ojk6ICdmYWxzZScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJmYWxzZSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX185NyIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fOTgiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzk4KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzk4OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo5Njo3OiAoICd0cnVlJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjk2Ojk6ICd0cnVlJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goInRydWUiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fOTgiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzk5IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX185OSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX185OTsKKyAgIC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wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjk5OjEwOiAndGhyb3cnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgidGhyb3ciKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTAxIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xMDIiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzEwMigpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xMDI7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEwMDo4OiAoICdyZXR1cm4nICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTAwOjEwOiAncmV0dXJuJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goInJldHVybiIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18xMDIiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzEwMyIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMTAzKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzEwMzsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTAxOjg6ICggJ3RyeScgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDE6MTA6ICd0cnknCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgidHJ5Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzEwMyIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTA0IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMDQoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTA0OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDI6ODogKCAnZmluYWxseScgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDI6MTA6ICdmaW5hbGx5JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goImZpbmFsbHkiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTA0IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xMDUiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzEwNSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xMDU7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgIC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YWxDdWJlRFNMLmc6MTA0Ojg6ICggJ2NhdGNoJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEwNDoxMDogJ2NhdGNoJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goImNhdGNoIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzEwNiIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTA3IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMDcoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTA3OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDU6ODogKCAnPycgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDU6MTA6ICc/JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goJz8nKTsgCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzEwNyIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTA4IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMDgoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTA4OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDY6ODogKCAnJicgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDY6MTA6ICcmJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goJyYnKTsgCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzEwOCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTA5IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMDkoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTA5OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDc6ODogKCAnc3VtJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEwNzoxMDogJ3N1bScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJzdW0iKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTA5IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xMTAiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzExMCgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xM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Y3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTA5Ojg6ICggJ21pbicgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDk6MTA6ICdtaW4nCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgibWluIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzExMSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTEyIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMTIoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTEyOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMTA6ODogKCAnbWF4JyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjExMDoxMDogJ21heCcKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJtYXgiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTEyIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xMTMiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzExMygpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xMTM7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjExMTo4OiAoICdhdmcnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTExOjEwOiAnYXZnJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goImF2ZyIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18xMTMiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzExNCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMTE0KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzExNDsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTEyOjg6ICggJ2Rpc3RpbmN0LWNvdW50JyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjExMjoxMDogJ2Rpc3RpbmN0LWNvdW50JworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goImRpc3RpbmN0LWNvdW50Iik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzExNCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTE1IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMTUoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTE1OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMTM6ODogKCAnU3RyaW5nJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjExMzoxMDogJ1N0cmluZycKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJTdHJpbmciKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTE1IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xMTYiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzExNigpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xMTY7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0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uYWxDdWJlRFNMLmc6MTE1Ojg6ICggJ0ludGVnZXInICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTE1OjEwOiAnSW50ZWdlcicKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJJbnRlZ2VyIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzExNyIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTE4IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMTgoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTE4OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMTY6ODogKCAnQm9vbGVhbicgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMTY6MTA6ICdCb29sZWFuJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIkJvb2xlYW4iKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTE4IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xMTkiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzExOSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xMTk7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjExNzo4OiAoICdEYXRlJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjExNzoxMDogJ0RhdGUnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiRGF0ZSIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJUX18xMTkiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlRfXzEyMCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtVF9fMTIwKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIGludCBfdHlwZSA9IFRfXzEyMDsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTE4Ojg6ICggJ1RpbWUnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTE4OjEwOiAnVGltZScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJUaW1lIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzEyMCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTIxIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMjEoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTIxOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMTk6ODogKCAnVGltZXN0YW1wJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjExOToxMDogJ1RpbWVzdGFtcCcKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJUaW1lc3RhbXAiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTIxIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xMjIiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzEyMigpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xMjI7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAg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c6MTIxOjg6ICggJ1RpbWVIYWxmWWVhcnMnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTIxOjEwOiAnVGltZUhhbGZZZWFycycKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJUaW1lSGFsZlllYXJzIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzEyMyIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTI0IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMjQoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTI0OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMjI6ODogKCAnVGltZVF1YXJ0ZXJzJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyMjoxMDogJ1RpbWVRdWFydGVycycKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIG1hdGNoKCJUaW1lUXVhcnRlcnMiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTI0IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xMjUiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzEyNSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xMjU7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyMzo4OiAoICdUaW1lTW9udGhzJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyMzoxMDogJ1RpbWVNb250aHMnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiVGltZU1vbnRocyIpOyAKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgI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yNiIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTI3IgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMjcoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTI3OworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMjU6ODogKCAnVGltZURheXMnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTI1OjEwOiAnVGltZURheXMnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiVGltZURheXMiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTI3IgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJUX18xMjgiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVRfXzEyOCgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBUX18xMjg7CisgICAgICAgICAgIC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ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTI3Ojg6ICggJ1RpbWVNaW51dGVzJyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyNzoxMDogJ1RpbWVNaW51dGVzJworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIlRpbWVNaW51dGVzIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlRfXzEyOSIKKworICAgIC8vICRBTlRMUiBzdGFydCAiVF9fMTMwIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1UX18xMzAoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gVF9fMTMwOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMjg6ODogKCAnVGltZVNlY29uZHMnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTI4OjEwOiAnVGltZVNlY29uZHMnCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaCgiVGltZVNlY29uZHMiKTsgCisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiVF9fMTMwIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJSVUxFX0hFWCIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtUlVMRV9IRVgoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gUlVMRV9IRVg7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNTU6MTA6ICggKCAnMHgnIHwgJzBYJyApICggJzAnIC4uICc5JyB8ICdhJyAuLiAnZicgfCAnQScgLi4gJ0YnIHwgJ18nICkrICggJyMnICggKCAnYicgfCAnQicgKSAoICdpJyB8ICdJJyApIHwgKCAnbCcgfCAnTCcgKSApICk/ICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODA1NToxMjogKCAnMHgnIHwgJzBYJyApICggJzAnIC4uICc5JyB8ICdhJyAuLiAnZicgfCAnQScgLi4gJ0YnIHwgJ18nICkrICggJyMnICggKCAnYicgfCAnQicgKSAoICdpJyB8ICdJJyApIHwgKCAnbCcgfCAnTCcgKSApICk/CisgICAgICAgICAgICB7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNTU6MTI6ICggJzB4JyB8ICcwWCcgKQorICAgICAgICAgICAgaW50IGFsdDE9MjsKKyAgICAgICAgICAgIGludCBMQTFfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICBpZiAoIChMQTFfMD09JzAnKSApIHsKKyAgICAgICAgICAgICAgICBpbnQgTEExXzEgPSBpbnB1dC5MQSgyKTsKKworICAgICAgICAgICAgICAgIGlmICggKExBMV8xPT0neCcpICkgeworICAgICAgICAgICAgICAgICAgICBhbHQxPTE7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEExXzE9PSdYJykgKSB7CisgICAgICAgICAgICAgICAgICAgIGFsdDE9MjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIE5vVmlhYmxlQWx0RXhjZXB0aW9uIG52YWUgPQorICAgICAgICAgICAgICAgICAgICAgICAgbmV3IE5vVmlhYmxlQWx0RXhjZXB0aW9uKCIiLCAxLCAxLCBpbnB1dCk7CisKKyAgICAgICAgICAgICAgICAgICAgdGhyb3cgbnZhZTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICBOb1ZpYWJsZUFsdEV4Y2VwdGlvbiBudmFlID0KKyAgICAgICAgICAgICAgICAgICAgbmV3IE5vVmlhYmxlQWx0RXhjZXB0aW9uKCIiLCAxLCAwLCBpbnB1dCk7CisKKyAgICAgICAgICAgICAgICB0aHJvdyBudmFlOworICAgICAgICAgICAgfQorICAgICAgICAgICAgc3dpdGNoIChhbHQxKSB7CisgICAgICAgICAgICAgICAgY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDU1OjEzOiAnMHgnCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgbWF0Y2goIjB4Iik7IAorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIDIgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNTU6MTg6ICcwWCcKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBtYXRjaCgiMFgiKTsgCisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODA1NToyNDogKCAnMCcgLi4gJzknIHwgJ2EnIC4uICdmJyB8ICdBJyAuLiAnRicgfCAnXycgKSsKKyAgICAgICAgICAgIGludCBjbnQyPTA7CisgICAgICAgICAgICBsb29wMjoKKyAgICAgICAgICAgIGRvIHsKKyAgICAgICAgICAgICAgICBpbnQgYWx0Mj0yOworICAgICAgICAgICAgICAgIGludCBMQTJfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgaWYgKCAoKExBMl8wPj0nMCcgJiYgTEEyXzA8PSc5Jyl8fChMQTJfMD49J0EnICYmIExBMl8wPD0nRicpfHxMQTJfMD09J18nfHwoTEEyXzA+PSdhJyAmJiBMQTJfMDw9J2YnKSkgKSB7CisgICAgICAgICAgICAgICAgICAgIGFsdDI9MTsKKyAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgIHN3aXRjaCAoYWx0MikgeworICAgICAgICAgICAgCWNhc2UgMSA6CisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6CisgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgIAkgICAgaWYgKCAoaW5wdXQuTEEoMSk+PScwJyAmJiBpbnB1dC5MQSgxKTw9JzknKXx8KGlucHV0LkxBKDEpPj0nQScgJiYgaW5wdXQuTEEoMSk8PSdGJyl8fGlucHV0LkxBKDEpPT0nXyd8fChpbnB1dC5MQSgxKT49J2EnICYmIGlucHV0LkxBKDEpPD0nZicpICkgeworICAgICAgICAgICAgCSAgICAgICAgaW5wdXQuY29uc3VtZSgpOworCisgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgIAkgICAgZWxzZSB7CisgICAgICAgICAgICAJICAgICAgICBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uIG1zZSA9IG5ldyBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uKG51bGwsaW5wdXQpOworICAgICAgICAgICAgCSAgICAgICAgcmVjb3Zlcihtc2UpOworICAgICAgICAgICAgCSAgICAgICAgdGhyb3cgbXNlO30KKworCisgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgIAkgICAgYnJlYWs7CisKKyAgICAgICAgICAgIAlkZWZhdWx0IDoKKyAgICAgICAgICAgIAkgICAgaWYgKCBjbnQyID49IDEgKSBicmVhayBsb29wMjsKKyAgICAgICAgICAgICAgICAgICAgICAgIEVhcmx5RXhpdEV4Y2VwdGlvbiBlZWUgPQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ldyBFYXJseUV4aXRFeGNlcHRpb24oMiwgaW5wdXQpOworICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgZWVlOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBjbnQyKys7CisgICAgICAgICAgICB9IHdoaWxlICh0cnVlKTsKKworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDU1OjU4OiAoICcjJyAoICggJ2InIHwgJ0InICkgKCAnaScgfCAnSScgKSB8ICggJ2wnIHwgJ0wnICkgKSApPworICAgICAgICAgICAgaW50IGFsdDQ9MjsKKyAgICAgICAgICAgIGludCBMQTRfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICBpZiAoIChMQTRfMD09JyMnKSApIHsKKyAgICAgICAgICAgICAgICBhbHQ0PTE7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBzd2l0Y2ggKGFsdDQpIHsKKyAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNTU6NTk6ICcjJyAoICggJ2InIHwgJ0InICkgKCAnaScgfCAnSScgKSB8ICggJ2wnIHwgJ0wnICkgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIG1hdGNoKCcjJyk7IAorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNTU6NjM6ICggKCAnYicgfCAnQicgKSAoICdpJyB8ICdJJyApIHwgKCAnbCcgfCAnTCcgKSApCisgICAgICAgICAgICAgICAgICAgIGludCBhbHQzPTI7CisgICAgICAgICAgICAgICAgICAgIGludCBMQTNfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgICAgIGlmICggKExBM18wPT0nQid8fExBM18wPT0nYicpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgYWx0Mz0xOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEzXzA9PSdMJ3x8TEEzXzA9PSdsJykgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBhbHQzPTI7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICBOb1ZpYWJsZUFsdEV4Y2VwdGlvbiBudmFlID0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXcgTm9WaWFibGVBbHRFeGNlcHRpb24oIiIsIDMsIDAsIGlucHV0KTsKKworICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbnZhZTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGFsdDMpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDU1OjY0OiAoICdiJyB8ICdCJyApICggJ2knIHwgJ0knICkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCBpbnB1dC5MQSgxKT09J0InfHxpbnB1dC5MQSgxKT09J2InICkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnB1dC5jb25zdW1lKCk7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1pc21hdGNoZWRTZXRFeGNlcHRpb24gbXNlID0gbmV3IE1pc21hdGNoZWRTZXRFeGNlcHRpb24obnVsbCxpbnB1dCk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlY292ZXIobXNlKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbXNlO30KKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggaW5wdXQuTEEoMSk9PSdJJ3x8aW5wdXQuTEEoMSk9PSdpJyApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXQuY29uc3VtZSgpOworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uIG1zZSA9IG5ldyBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uKG51bGwsaW5wdXQpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWNvdmVyKG1zZSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG1zZTt9CisKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMiA6CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDU1Ojg0OiAoICdsJyB8ICdMJyApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggaW5wdXQuTEEoMSk9PSdMJ3x8aW5wdXQuTEEoMSk9PSdsJyApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXQuY29uc3VtZSgpOworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uIG1zZSA9IG5ldyBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uKG51bGwsaW5wdXQpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWNvdmVyKG1zZSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG1zZTt9CisKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiUlVMRV9IRVgiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlJVTEVfSU5UIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1SVUxFX0lOVCgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBSVUxFX0lOVDsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODA1NzoxMDogKCAnMCcgLi4gJzknICggJzAnIC4uICc5JyB8ICdfJyApKiApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNTc6MTI6ICcwJyAuLiAnOScgKCAnMCcgLi4gJzknIHwgJ18nICkqCisgICAgICAgICAgICB7CisgICAgICAgICAgICBtYXRjaFJhbmdlKCcwJywnOScpOyAKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODA1NzoyMTogKCAnMCcgLi4gJzknIHwgJ18nICkqCisgICAgICAgICAgICBsb29wNToKKyAgICAgICAgICAgIGRvIHsKKyAgICAgICAgICAgICAgICBpbnQgYWx0NT0yOworICAgICAgICAgICAgICAgIGludCBMQTVfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgaWYgKCAoKExBNV8wPj0nMCcgJiYgTEE1XzA8PSc5Jyl8fExBNV8wPT0nXycpICkgeworICAgICAgICAgICAgICAgICAgICBhbHQ1PTE7CisgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICBzd2l0Y2ggKGFsdDUpIHsKKyAgICAgICAgICAgIAljYXNlIDEgOgorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOgorICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIGlmICggKGlucHV0LkxBKDEpPj0nMCcgJiYgaW5wdXQuTEEoMSk8PSc5Jyl8fGlucHV0LkxBKDEpPT0nXycgKSB7CisgICAgICAgICAgICAJICAgICAgICBpbnB1dC5jb25zdW1lKCk7CisKKyAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgCSAgICBlbHNlIHsKKyAgICAgICAgICAgIAkgICAgICAgIE1pc21hdGNoZWRTZXRFeGNlcHRpb24gbXNlID0gbmV3IE1pc21hdGNoZWRTZXRFeGNlcHRpb24obnVsbCxpbnB1dCk7CisgICAgICAgICAgICAJICAgICAgICByZWNvdmVyKG1zZSk7CisgICAgICAgICAgICAJICAgICAgICB0aHJvdyBtc2U7fQorCisKKyAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgCSAgICBicmVhazsKKworICAgICAgICAgICAgCWRlZmF1bHQgOgorICAgICAgICAgICAgCSAgICBicmVhayBsb29wNTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9IHdoaWxlICh0cnVlKTsKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJSVUxFX0lOVCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiUlVMRV9ERUNJTUFMIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1SVUxFX0RFQ0lNQUwoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gUlVMRV9ERUNJTUFMOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDU5OjE0OiAoIFJVTEVfSU5UICggKCAnZScgfCAnRScgKSAoICc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i9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNTk6MjY6ICggJ2UnIHwgJ0UnICkgKCAnKycgfCAnLScgKT8gUlVMRV9JTlQKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpZiAoIGlucHV0LkxBKDEpPT0nRSd8fGlucHV0LkxBKDEpPT0nZScgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBpbnB1dC5jb25zdW1lKCk7CisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIE1pc21hdGNoZWRTZXRFeGNlcHRpb24gbXNlID0gbmV3IE1pc21hdGNoZWRTZXRFeGNlcHRpb24obnVsbCxpbnB1dCk7CisgICAgICAgICAgICAgICAgICAgICAgICByZWNvdmVyKG1zZSk7CisgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBtc2U7fQorCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODA1OTozNjogKCAnKycgfCAnLScgKT8KKyAgICAgICAgICAgICAgICAgICAgaW50IGFsdDY9MjsKKyAgICAgICAgICAgICAgICAgICAgaW50IExBNl8wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCAoTEE2XzA9PScrJ3x8TEE2XzA9PSctJykgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBhbHQ2PTE7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQ2KSB7CisgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggaW5wdXQuTEEoMSk9PScrJ3x8aW5wdXQuTEEoMSk9PSctJyApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXQuY29uc3VtZSgpOworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uIG1zZSA9IG5ldyBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uKG51bGwsaW5wdXQpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWNvdmVyKG1zZSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG1zZTt9CisKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgbVJVTEVfSU5UKCk7IAorCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDU5OjU4OiAoICggJ2InIHwgJ0InICkgKCAnaScgfCAnSScgfCAnZCcgfCAnRCcgKSB8ICggJ2wnIHwgJ0wnIHwgJ2QnIHwgJ0QnIHwgJ2YnIHwgJ0YnICkgKT8KKyAgICAgICAgICAgIGludCBhbHQ4PTM7CisgICAgICAgICAgICBpbnQgTEE4XzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgaWYgKCAoTEE4XzA9PSdCJ3x8TEE4XzA9PSdiJykgKSB7CisgICAgICAgICAgICAgICAgYWx0OD0xOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSBpZiAoIChMQThfMD09J0QnfHxMQThfMD09J0YnfHxMQThfMD09J0wnfHxMQThfMD09J2QnfHxMQThfMD09J2YnfHxMQThfMD09J2wnKSApIHsKKyAgICAgICAgICAgICAgICBhbHQ4PTI7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBzd2l0Y2ggKGFsdDgpIHsKKyAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNTk6NTk6ICggJ2InIHwgJ0InICkgKCAnaScgfCAnSScgfCAnZCcgfCAnRCcgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggaW5wdXQuTEEoMSk9PSdCJ3x8aW5wdXQuTEEoMSk9PSdiJyApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0LmNvbnN1bWUoKTsKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgICAgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbiBtc2UgPSBuZXcgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbihudWxsLGlucHV0KTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHJlY292ZXIobXNlKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG1zZTt9CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBpbnB1dC5MQSgxKT09J0QnfHxpbnB1dC5MQSgxKT09J0knfHxpbnB1dC5MQSgxKT09J2QnfHxpbnB1dC5MQSgxKT09J2knICkgeworICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXQuY29uc3VtZSgpOworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uIG1zZSA9IG5ldyBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uKG51bGwsaW5wdXQpOworICAgICAgICAgICAgICAgICAgICAgICAgcmVjb3Zlcihtc2UpOworICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbXNlO30KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSAyIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDU5Ojg3OiAoICdsJyB8ICdMJyB8ICdkJyB8ICdEJyB8ICdmJyB8ICdGJyApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBpbnB1dC5MQSgxKT09J0QnfHxpbnB1dC5MQSgxKT09J0YnfHxpbnB1dC5MQSgxKT09J0wnfHxpbnB1dC5MQSgxKT09J2QnfHxpbnB1dC5MQSgxKT09J2YnfHxpbnB1dC5MQSgxKT09J2wnICkgeworICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXQuY29uc3VtZSgpOworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uIG1zZSA9IG5ldyBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uKG51bGwsaW5wdXQpOworICAgICAgICAgICAgICAgICAgICAgICAgcmVjb3Zlcihtc2UpOworICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbXNlO30KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJSVUxFX0RFQ0lNQUwiCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgIlJVTEVfSUQiCisgICAgcHVibGljIGZpbmFsIHZvaWQgbVJVTEVfSUQoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gUlVMRV9JRDsKKyAgICAgICAgICAgIGludCBfY2hhbm5lbCA9IERFRkFVTFRfVE9LRU5fQ0hBTk5FTDsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRz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L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNjE6MTE6ICdeJworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIG1hdGNoKCdeJyk7IAorCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBpbnB1dC5MQSgxKT09JyQnfHwoaW5wdXQuTEEoMSk+PSdBJyAmJiBpbnB1dC5MQSgxKTw9J1onKXx8aW5wdXQuTEEoMSk9PSdfJ3x8KGlucHV0LkxBKDEpPj0nYScgJiYgaW5wdXQuTEEoMSk8PSd6JykgKSB7CisgICAgICAgICAgICAgICAgaW5wdXQuY29uc3VtZSgpOworCisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uIG1zZSA9IG5ldyBNaXNtYXRjaGVkU2V0RXhjZXB0aW9uKG51bGwsaW5wdXQpOworICAgICAgICAgICAgICAgIHJlY292ZXIobXNlKTsKKyAgICAgICAgICAgICAgICB0aHJvdyBtc2U7fQorCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNjE6NDQ6ICggJ2EnIC4uICd6JyB8ICdBJyAuLiAnWicgfCAnJCcgfCAnXycgfCAnMCcgLi4gJzknICkqCisgICAgICAgICAgICBsb29wMTA6CisgICAgICAgICAgICBkbyB7CisgICAgICAgICAgICAgICAgaW50IGFsdDEwPTI7CisgICAgICAgICAgICAgICAgaW50IExBMTBfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgaWYgKCAoTEExMF8wPT0nJCd8fChMQTEwXzA+PScwJyAmJiBMQTEwXzA8PSc5Jyl8fChMQTEwXzA+PSdBJyAmJiBMQTEwXzA8PSdaJyl8fExBMTBfMD09J18nfHwoTEExMF8wPj0nYScgJiYgTEExMF8wPD0neicpKSApIHsKKyAgICAgICAgICAgICAgICAgICAgYWx0MTA9MTsKKyAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgIHN3aXRjaCAoYWx0MTApIHsKKyAgICAgICAgICAgIAljYXNlIDEgOgorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOgorICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIGlmICggaW5wdXQuTEEoMSk9PSckJ3x8KGlucHV0LkxBKDEpPj0nMCcgJiYgaW5wdXQuTEEoMSk8PSc5Jyl8fChpbnB1dC5MQSgxKT49J0EnICYmIGlucHV0LkxBKDEpPD0nWicpfHxpbnB1dC5MQSgxKT09J18nfHwoaW5wdXQuTEEoMSk+PSdhJyAmJiBpbnB1dC5MQSgxKTw9J3onKSApIHsKKyAgICAgICAgICAgIAkgICAgICAgIGlucHV0LmNvbnN1bWUoKTsKKworICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGVsc2UgeworICAgICAgICAgICAgCSAgICAgICAgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbiBtc2UgPSBuZXcgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbihudWxsLGlucHV0KTsKKyAgICAgICAgICAgIAkgICAgICAgIHJlY292ZXIobXNlKTsKKyAgICAgICAgICAgIAkgICAgICAgIHRocm93IG1zZTt9CisKKworICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGJyZWFrOworCisgICAgICAgICAgICAJZGVmYXVsdCA6CisgICAgICAgICAgICAJICAgIGJyZWFrIGxvb3AxMDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9IHdoaWxlICh0cnVlKTsKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJSVUxFX0lEIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJSVUxFX1NUUklORyIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtUlVMRV9TVFJJTkcoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gUlVMRV9TVFJJTkc7CisgICAgICAgICAgICBpbnQgX2NoYW5uZWwgPSBERUZBVUxUX1RPS0VOX0NIQU5ORUw7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNjM6MTM6ICggKCAnXCInICggJ1xcXFwnIC4gfCB+ICggKCAnXFxcXCcgfCAnXCInICkgKSApKiAoICdcIicgKT8gfCAnXFwnJyAoICdcXFxcJyAuIHwgfiAoICggJ1xcXFwnIHwgJ1xcJycgKSApICkqICggJ1xcJycgKT8gKSApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNjM6MTU6ICggJ1wiJyAoICdcXFxcJyAuIHwgfiAoICggJ1xcXFwnIHwgJ1wiJyApICkgKSogKCAnXCInICk/IHwgJ1xcJycgKCAnXFxcXCcgLiB8IH4gKCAoICdcXFxcJyB8ICdcXCcnICkgKSApKiAoICdcXCcnICk/ICkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODA2MzoxNTogKCAnXCInICggJ1xcXFwnIC4gfCB+ICggKCAnXFxcXCcgfCAnXCInICkgKSApKiAoICdcIicgKT8gfCAnXFwnJyAoICdcXFxcJyAuIHwgfiAoICggJ1xcXFwnIHwgJ1xcJycgKSApICkqICggJ1xcJycgKT8gKQorICAgICAgICAgICAgaW50IGFsdDE1PTI7CisgICAgICAgICAgICBpbnQgTEExNV8wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgIGlmICggKExBMTVfMD09J1wiJykgKSB7CisgICAgICAgICAgICAgICAgYWx0MTU9MTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgaWYgKCAoTEExNV8wPT0nXCcnKSApIHsKKyAgICAgICAgICAgICAgICBhbHQxNT0yOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgTm9WaWFibGVBbHRFeGNlcHRpb24gbnZhZSA9CisgICAgICAgICAgICAgICAgICAgIG5ldyBOb1ZpYWJsZUFsdEV4Y2VwdGlvbigiIiwgMTUsIDAsIGlucHV0KTsKKworICAgICAgICAgICAgICAgIHRocm93IG52YWU7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBzd2l0Y2ggKGFsdDE1KSB7CisgICAgICAgICAgICAgICAgY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDYzOjE2OiAnXCInICggJ1xcXFwnIC4gfCB+ICggKCAnXFxcXCcgfCAnXCInICkgKSApKiAoICdcIicgKT8KKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBtYXRjaCgnXCInKTsgCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODA2MzoyMDogKCAnXFxcXCcgLiB8IH4gKCAoICdcXFxcJyB8ICdcIicgKSApICkqCisgICAgICAgICAgICAgICAgICAgIGxvb3AxMToKKyAgICAgICAgICAgICAgICAgICAgZG8geworICAgICAgICAgICAgICAgICAgICAgICAgaW50IGFsdDExPTM7CisgICAgICAgICAgICAgICAgICAgICAgICBpbnQgTEExMV8wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmICggKExBMTFfMD09J1xcJykgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWx0MTE9MTsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoKExBMTFfMD49J1x1MDAwMCcgJiYgTEExMV8wPD0nIScpfHwoTEExMV8wPj0nIycgJiYgTEExMV8wPD0nWycpfHwoTEExMV8wPj0nXScgJiYgTEExMV8wPD0nXHVGRkZGJykpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsdDExPTI7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQxMSkgeworICAgICAgICAgICAgICAgICAgICAJY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNjM6MjE6ICdcXFxcJyAuCisgICAgICAgICAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgICAgICAgICAJICAgIG1hdGNoKCdcXCcpOyAKKyAgICAgICAgICAgICAgICAgICAgCSAgICBtYXRjaEFueSgpOyAKKworICAgICAgICAgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgICAgICAgICAgCSAgICBicmVhazsKKyAgICAgICAgICAgICAgICAgICAgCWNhc2UgMiA6CisgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDYzOjI4OiB+ICggKCAnXFxcXCcgfCAnXCInICkgKQorICAgICAgICAgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgICAgICAgICAgCSAgICBpZiAoIChpbnB1dC5MQSgxKT49J1x1MDAwMCcgJiYgaW5wdXQuTEEoMSk8PSchJyl8fChpbnB1dC5MQSgxKT49JyMnICYmIGlucHV0LkxBKDEpPD0nWycpfHwoaW5wdXQuTEEoMSk+PSddJyAmJiBpbnB1dC5MQSgxKTw9J1x1RkZGRicpICkgeworICAgICAgICAgICAgICAgICAgICAJICAgICAgICBpbnB1dC5jb25zdW1lKCk7CisKKyAgICAgICAgICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAgICAgICAgIAkgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIE1pc21hdGNoZWRTZXRFeGNlcHRpb24gbXNlID0gbmV3IE1pc21hdGNoZWRTZXRFeGNlcHRpb24obnVsbCxpbnB1dCk7CisgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIHJlY292ZXIobXNlKTsKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgdGhyb3cgbXNlO30KKworCisgICAgICAgICAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgICAgICAgICAJICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgICAgIAlkZWZhdWx0IDoKKyAgICAgICAgICAgICAgICAgICAgCSAgICBicmVhayBsb29wMTE7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKHRydWUpOworCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODA2Mzo0NDogKCAnXCInICk/CisgICAgICAgICAgICAgICAgICAgIGludCBhbHQxMj0yOworICAgICAgICAgICAgICAgICAgICBpbnQgTEExMl8wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCAoTEExMl8wPT0nXCInKSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGFsdDEyPTE7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQxMikgeworICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNjM6NDQ6ICdcIicKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2goJ1wiJyk7IAorCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSAyIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDYzOjQ5OiAnXFwnJyAoICdcXFxcJyAuIHwgfiAoICggJ1xcXFwnIHwgJ1xcJycgKSApICkqICggJ1xcJycgKT8KKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBtYXRjaCgnXCcnKTsgCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODA2Mzo1NDogKCAnXFxcXCcgLiB8IH4gKCAoICdcXFxcJyB8ICdcXCcnICkgKSApKgorICAgICAgICAgICAgICAgICAgICBsb29wMTM6CisgICAgICAgICAgICAgICAgICAgIGRvIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGludCBhbHQxMz0zOworICAgICAgICAgICAgICAgICAgICAgICAgaW50IExBMTNfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIChMQTEzXzA9PSdcXCcpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsdDEzPTE7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICggKChMQTEzXzA+PSdcdTAwMDAnICYmIExBMTNfMDw9JyYnKXx8KExBMTNfMD49JygnICYmIExBMTNfMDw9J1snKXx8KExBMTNfMD49J10nICYmIExBMTNfMDw9J1x1RkZGRicpKSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbHQxMz0yOworICAgICAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoYWx0MTMpIHsKKyAgICAgICAgICAgICAgICAgICAgCWNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDYzOjU1OiAnXFxcXCcgLgorICAgICAgICAgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgICAgICAgICAgCSAgICBtYXRjaCgnXFwnKTsgCisgICAgICAgICAgICAgICAgICAgIAkgICAgbWF0Y2hBbnkoKTsgCisKKyAgICAgICAgICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAgICAgICAgIAkgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgICAgIAljYXNlIDIgOgorICAgICAgICAgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODA2Mzo2MjogfiAoICggJ1xcXFwnIHwgJ1xcJycgKSApCisgICAgICAgICAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgICAgICAgICAJICAgIGlmICggKGlucHV0LkxBKDEpPj0nXHUwMDAwJyAmJiBpbnB1dC5MQSgxKTw9JyYnKXx8KGlucHV0LkxBKDEpPj0nKCcgJiYgaW5wdXQuTEEoMSk8PSdbJyl8fChpbnB1dC5MQSgxKT49J10nICYmIGlucHV0LkxBKDEpPD0nXHVGRkZGJykgKSB7CisgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGlucHV0LmNvbnN1bWUoKTsKKworICAgICAgICAgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgICAgICAgICAgCSAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbiBtc2UgPSBuZXcgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbihudWxsLGlucHV0KTsKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgcmVjb3Zlcihtc2UpOworICAgICAgICAgICAgICAgICAgICAJICAgICAgICB0aHJvdyBtc2U7fQorCisKKyAgICAgICAgICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAgICAgICAgIAkgICAgYnJlYWs7CisKKyAgICAgICAgICAgICAgICAgICAgCWRlZmF1bHQgOgorICAgICAgICAgICAgICAgICAgICAJICAgIGJyZWFrIGxvb3AxMzsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAodHJ1ZSk7CisKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDYzOjc5OiAoICdcXCcnICk/CisgICAgICAgICAgICAgICAgICAgIGludCBhbHQxND0yOworICAgICAgICAgICAgICAgICAgICBpbnQgTEExNF8wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCAoTEExNF8wPT0nXCcnKSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGFsdDE0PTE7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQxNCkgeworICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNjM6Nzk6ICdcXCcnCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hdGNoKCdcJycpOyAKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGF0ZS50eXBlID0gX3R5cGU7CisgICAgICAgICAgICBzdGF0ZS5jaGFubmVsID0gX2NoYW5uZWw7CisgICAgICAgIH0KKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICB9CisgICA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OyB9IDogLiApKgorICAgICAgICAgICAgbG9vcDE2OgorICAgICAgICAgICAgZG8geworICAgICAgICAgICAgICAgIGludCBhbHQxNj0yOworICAgICAgICAgICAgICAgIGludCBMQTE2XzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgICAgIGlmICggKExBMTZfMD09JyonKSApIHsKKyAgICAgICAgICAgICAgICAgICAgaW50IExBMTZfMSA9IGlucHV0LkxBKDIpOworCisgICAgICAgICAgICAgICAgICAgIGlmICggKExBMTZfMT09Jy8nKSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGFsdDE2PTI7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoICgoTEExNl8xPj0nXHUwMDAwJyAmJiBMQTE2XzE8PScuJyl8fChMQTE2XzE+PScwJyAmJiBMQTE2XzE8PSdcdUZGRkYnKSkgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBhbHQxNj0xOworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlIGlmICggKChMQTE2XzA+PSdcdTAwMDAnICYmIExBMTZfMDw9JyknKXx8KExBMTZfMD49JysnICYmIExBMTZfMDw9J1x1RkZGRicpKSApIHsKKyAgICAgICAgICAgICAgICAgICAgYWx0MTY9MTsKKyAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgIHN3aXRjaCAoYWx0MTYpIHsKKyAgICAgICAgICAgIAljYXNlIDEgOgorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNjU6NTI6IC4KKyAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgCSAgICBtYXRjaEFueSgpOyAKKworICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGJyZWFrOworCisgICAgICAgICAgICAJZGVmYXVsdCA6CisgICAgICAgICAgICAJICAgIGJyZWFrIGxvb3AxNjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9IHdoaWxlICh0cnVlKTsKKworICAgICAgICAgICAgbWF0Y2goIiovIik7IAorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlJVTEVfTUxfQ09NTUVOVCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiUlVMRV9TTF9DT01NRU5UIgorICAgIHB1YmxpYyBmaW5hbCB2b2lkIG1SVUxFX1NMX0NPTU1FTlQoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eXBlID0gUlVMRV9TTF9DT01NRU5UOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDY3OjE3OiAoICcvLycgKH4gKCAoICdcXG4nIHwgJ1xccicgKSApICkqICggKCAnXFxyJyApPyAnXFxuJyApPyApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNjc6MTk6ICcvLycgKH4gKCAoICdcXG4nIHwgJ1xccicgKSApICkqICggKCAnXFxyJyApPyAnXFxuJyApPworICAgICAgICAgICAgeworICAgICAgICAgICAgbWF0Y2goIi8vIik7IAorCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNjc6MjQ6ICh+ICggKCAnXFxuJyB8ICdcXHInICkgKSApKgorICAgICAgICAgICAgbG9vcDE3OgorICAgICAgICAgICAgZG8geworICAgICAgICAgICAgICAgIGludCBhbHQxNz0yOworICAgICAgICAgICAgICAgIGludCBMQTE3XzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgICAgIGlmICggKChMQTE3XzA+PSdcdTAwMDAnICYmIExBMTdfMDw9J1x0Jyl8fChMQTE3XzA+PSdcdTAwMEInICYmIExBMTdfMDw9J1xmJyl8fChMQTE3XzA+PSdcdTAwMEUnICYmIExBMTdfMDw9J1x1RkZGRicpKSApIHsKKyAgICAgICAgICAgICAgICAgICAgYWx0MTc9MTsKKyAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgIHN3aXRjaCAoYWx0MTcpIHsKKyAgICAgICAgICAgIAljYXNlIDEgOgorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNjc6MjQ6IH4gKCAoICdcXG4nIHwgJ1xccicgKSApCisgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgIAkgICAgaWYgKCAoaW5wdXQuTEEoMSk+PSdcdTAwMDAnICYmIGlucHV0LkxBKDEpPD0nXHQnKXx8KGlucHV0LkxBKDEpPj0nXHUwMDBCJyAmJiBpbnB1dC5MQSgxKTw9J1xmJyl8fChpbnB1dC5MQSgxKT49J1x1MDAwRScgJiYgaW5wdXQuTEEoMSk8PSdcdUZGRkYnKSApIHsKKyAgICAgICAgICAgIAkgICAgICAgIGlucHV0LmNvbnN1bWUoKTsKKworICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGVsc2UgeworICAgICAgICAgICAgCSAgICAgICAgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbiBtc2UgPSBuZXcgTWlzbWF0Y2hlZFNldEV4Y2VwdGlvbihudWxsLGlucHV0KTsKKyAgICAgICAgICAgIAkgICAgICAgIHJlY292ZXIobXNlKTsKKyAgICAgICAgICAgIAkgICAgICAgIHRocm93IG1zZTt9CisKKworICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGJyZWFrOworCisgICAgICAgICAgICAJZGVmYXVsdCA6CisgICAgICAgICAgICAJICAgIGJyZWFrIGxvb3AxNzsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9IHdoaWxlICh0cnVlKTsKKworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDY3OjQwOiAoICggJ1xccicgKT8gJ1xcbicgKT8KKyAgICAgICAgICAgIGludCBhbHQxOT0yOworICAgICAgICAgICAgaW50IExBMTlfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICBpZiAoIChMQTE5XzA9PSdcbid8fExBMTlfMD09J1xyJykgKSB7CisgICAgICAgICAgICAgICAgYWx0MTk9MTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHN3aXRjaCAoYWx0MTkpIHsKKyAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNjc6NDE6ICggJ1xccicgKT8gJ1xcbicKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgwNjc6NDE6ICggJ1xccicgKT8KKyAgICAgICAgICAgICAgICAgICAgaW50IGFsdDE4PTI7CisgICAgICAgICAgICAgICAgICAgIGludCBMQTE4XzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgICAgICAgICBpZiAoIChMQTE4XzA9PSdccicpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgYWx0MTg9MTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGFsdDE4KSB7CisgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODA2Nzo0MTogJ1xccicKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF0Y2goJ1xyJyk7IAorCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICBtYXRjaCgnXG4nKTsgCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RhdGUudHlwZSA9IF90eXBlOworICAgICAgICAgICAgc3RhdGUuY2hhbm5lbCA9IF9jaGFubmVsOworICAgICAgICB9CisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgIlJVTEVfU0xfQ09NTUVOVCIKKworICAgIC8vICRBTlRMUiBzdGFydCAiUlVMRV9XUyIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtUlVMRV9XUygpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBpbnQgX3R5cGUgPSBSVUxFX1dTOworICAgICAgICAgICAgaW50IF9jaGFubmVsID0gREVGQVVMVF9UT0tFTl9DSEFOTkVMOworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDY5Ojk6ICggKCAnICcgfCAnXFx0JyB8ICdcXHInIHwgJ1xcbicgKSsgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDY5OjExOiAoICcgJyB8ICdcXHQnIHwgJ1xccicgfCAnXFxuJyApKworICAgICAgICAgICAgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo4MDY5OjExOiAoICcgJyB8ICdcXHQnIHwgJ1xccicgfCAnXFxuJyApKworICAgICAgICAgICAgaW50IGNudDIwPTA7CisgICAgICAgICAgICBsb29wMjA6CisgICAgICAgICAgICBkbyB7CisgICAgICAgICAgICAgICAgaW50IGFsdDIwPTI7CisgICAgICAgICAgICAgICAgaW50IExBMjBfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgaWYgKCAoKExBMjBfMD49J1x0JyAmJiBMQTIwXzA8PSdcbicpfHxMQTIwXzA9PSdccid8fExBMjBfMD09JyAnKSApIHsKKyAgICAgICAgICAgICAgICAgICAgYWx0MjA9MTsKKyAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgIHN3aXRjaCAoYWx0MjApIHsKKyAgICAgICAgICAgIAljYXNlIDEgOgorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOgorICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIGlmICggKGlucHV0LkxBKDEpPj0nXHQnICYmIGlucHV0LkxBKDEpPD0nXG4nKXx8aW5wdXQuTEEoMSk9PSdccid8fGlucHV0LkxBKDEpPT0nICcgKSB7CisgICAgICAgICAgICAJICAgICAgICBpbnB1dC5jb25zdW1lKCk7CisKKyAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgCSAgICBlbHNlIHsKKyAgICAgICAgICAgIAkgICAgICAgIE1pc21hdGNoZWRTZXRFeGNlcHRpb24gbXNlID0gbmV3IE1pc21hdGNoZWRTZXRFeGNlcHRpb24obnVsbCxpbnB1dCk7CisgICAgICAgICAgICAJICAgICAgICByZWNvdmVyKG1zZSk7CisgICAgICAgICAgICAJICAgICAgICB0aHJvdyBtc2U7fQorCisKKyAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgCSAgICBicmVhazsKKworICAgICAgICAgICAgCWRlZmF1bHQgOgorICAgICAgICAgICAgCSAgICBpZiAoIGNudDIwID49IDEgKSBicmVhayBsb29wMjA7CisgICAgICAgICAgICAgICAgICAgICAgICBFYXJseUV4aXRFeGNlcHRpb24gZWVlID0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXcgRWFybHlFeGl0RXhjZXB0aW9uKDIwLCBpbnB1dCk7CisgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBlZWU7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGNudDIwKys7CisgICAgICAgICAgICB9IHdoaWxlICh0cnVlKTsKKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLnR5cGUgPSBfdHlwZTsKKyAgICAgICAgICAgIHN0YXRlLmNoYW5uZWwgPSBfY2hhbm5lbDsKKyAgICAgICAgfQorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJSVUxFX1dTIgorCisgICAgLy8gJEFOVExSIHN0YXJ0ICJSVUxFX0FOWV9PVEhFUiIKKyAgICBwdWJsaWMgZmluYWwgdm9pZCBtUlVMRV9BTllfT1RIRVIoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICB0cnkgeworICAgICAgICAgICAgaW50IF90eX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UX18xMjEgfCBUX18xMjIgfCBUX18xMjMgfCBUX18xMjQgfCBUX18xMjUgfCBUX18xMjYgfCBUX18xMjcgfCBUX18xMjggfCBUX18xMjkgfCBUX18xMzAgfCBSVUxFX0hFWCB8IFJVTEVfSU5UIHwgUlVMRV9ERUNJTUFMIHwgUlVMRV9JRCB8IFJVTEVfU1RSSU5HIHwgUlVMRV9NTF9DT01NRU5UIHwgUlVMRV9TTF9DT01NRU5UIHwgUlVMRV9XUyB8IFJVTEVfQU5ZX09USEVSICkKKyAgICAgICAgaW50IGFsdDIxPTEyNzsKKyAgICAgICAgYWx0MjEgPSBkZmEyMS5wcmVkaWN0KGlucHV0KTsKKyAgICAgICAgc3dpdGNoIChhbHQyMSkgeworICAgICAgICAgICAgY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6MTA6IFRfXzEzCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18xMygpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjE2OiBUX18xNAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTQoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDMgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MToyMjogVF9fMTUKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzE1KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA0IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6Mjg6IFRfXzE2CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18xNigpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjM0OiBUX18xNworICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTcoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDYgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo0MDogVF9fMTgKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzE4KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA3IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NDY6IFRfXzE5CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18xOSgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgOCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjUyOiBUX18yMAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMjAoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDkgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo1ODogVF9fMjEKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzIxKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjY0OiBUX18yMgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMjIoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDExIDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NzA6IFRfXzIzCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18yMygpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMTIgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo3NjogVF9fMjQKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzI0KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjgyOiBUX18yNQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMjUoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDE0IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6ODg6IFRfXzI2CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18yNigpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMTUgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo5NDogVF9fMjcKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzI3KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxNiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjEwMDogVF9fMjgKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzI4KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxNyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjEwNjogVF9fMjkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzI5KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxOCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjExMjogVF9fMzAKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzMwKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxOSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjExODogVF9fMzEKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzMxKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyMCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjEyNDogVF9fMzIKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzMyKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyMSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjEzMDogVF9fMzMKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzMzKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyMiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjEzNjogVF9fMzQKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzM0KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyMyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjE0MjogVF9fMzUKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzM1KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyNCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjE0ODogVF9fMzYKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzM2KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyNSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjE1NDogVF9fMzcKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzM3KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyNiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjE2MDogVF9fMzgKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzM4KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyNyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjE2NjogVF9fMzkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzM5KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyOCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjE3MjogVF9fNDAKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzQwKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyOSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjE3ODogVF9fNDEKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzQxKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAzMCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjE4NDogVF9fNDIKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzQyKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAzMSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjE5MDogVF9fNDMKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzQzKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAzMiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjE5NjogVF9fNDQKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzQ0KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAzMyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjIwMjogVF9fNDUKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzQ1KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAzNCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjIwODogVF9fNDYKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzQ2KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAzNSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjIxNDogVF9fNDcKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzQ3KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAzNiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjIyMDogVF9fNDgKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzQ4KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAzNyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjIyNjogVF9fNDkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzQ5KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAzOCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjIzMjogVF9fNTAKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzUwKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAzOSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjIzODogVF9fNTEKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzUxKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA0MCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjI0NDogVF9fNTIKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzUyKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA0MSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjI1MDogVF9fNTMKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzUzKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA0MiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjI1NjogVF9fNTQKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzU0KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA0MyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjI2MjogVF9fNTUKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzU1KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA0NCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjI2ODogVF9fNTYKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzU2KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA0NSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjI3NDogVF9fNTcKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzU3KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA0NiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjI4MDogVF9fNTgKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzU4KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA0NyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjI4NjogVF9fNTkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzU5KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA0OCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjI5MjogVF9fNjAKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzYwKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA0OSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjI5ODogVF9fNjEKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzYxKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA1MCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjMwNDogVF9fNjIKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzYyKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA1MSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjMxMDogVF9fNjMKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzYzKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA1MiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjMxNjogVF9fNjQKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzY0KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA1MyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjMyMjogVF9fNjUKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzY1KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA1NCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjMyODogVF9fNjYKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzY2KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA1NSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjMzNDogVF9fNjcKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzY3KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA1NiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjM0MDogVF9fNjgKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzY4KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA1NyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjM0NjogVF9fNjkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzY5KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA1OCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjM1MjogVF9fNzAKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzcwKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA1OSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjM1ODogVF9fNzEKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzcxKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA2MCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjM2NDogVF9fNzIKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzcyKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA2MSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjM3MDogVF9fNzMKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzczKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA2MiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjM3NjogVF9fNzQKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzc0KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA2MyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjM4MjogVF9fNzUKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzc1KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA2NCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjM4ODogVF9fNzYKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzc2KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA2NSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjM5NDogVF9fNzcKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzc3KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA2NiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQwMDogVF9fNzgKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzc4KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA2NyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQwNjogVF9fNzkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzc5KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA2OCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQxMjogVF9fODAKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzgwKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA2OSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQxODogVF9fODEKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzgxKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA3MCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQyNDogVF9fODIKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzgyKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA3MSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQzMDogVF9fODMKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzgzKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA3MiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQzNjogVF9fODQKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzg0KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA3MyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQ0MjogVF9fODUKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzg1KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA3NCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQ0ODogVF9fODYKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzg2KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA3NSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQ1NDogVF9fODcKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzg3KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA3NiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQ2MDogVF9fODgKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzg4KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA3NyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQ2NjogVF9fODkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzg5KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA3OCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQ3MjogVF9fOTAKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzkwKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA3OSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQ3ODogVF9fOTEKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzkxKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA4MCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQ4NDogVF9fOTIKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzkyKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA4MSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQ5MDogVF9fOTMKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzkzKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA4MiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjQ5NjogVF9fOTQKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzk0KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA4MyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjUwMjogVF9fOTUKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzk1KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA4NCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjUwODogVF9fOTYKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzk2KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA4NSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjUxNDogVF9fOTcKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzk3KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA4NiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjUyMDogVF9fOTgKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzk4KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA4NyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjUyNjogVF9fOTkKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzk5KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA4OCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjUzMjogVF9fMTAwCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18xMDAoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDg5IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NTM5OiBUX18xMDEKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzEwMSgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgOTAgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo1NDY6IFRfXzEwMgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTAyKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA5MSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjU1MzogVF9fMTAzCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18xMDMoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDkyIDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NTYwOiBUX18xMDQKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzEwNCgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgOTMgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo1Njc6IFRfXzEwNQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTA1KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA5NCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjU3NDogVF9fMTA2CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18xMDYoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDk1IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NTgxOiBUX18xMDcKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzEwNygpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgOTYgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo1ODg6IFRfXzEwOAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTA4KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA5NyA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjU5NTogVF9fMTA5CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1UX18xMDkoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDk4IDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NjAyOiBUX18xMTAKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgbVRfXzExMCgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgOTkgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2MDk6IFRfXzExMQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTExKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMDAgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2MTY6IFRfXzExMgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTEyKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMDEgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2MjM6IFRfXzExMworICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTEzKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMDIgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2MzA6IFRfXzExNAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTE0KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMDMgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2Mzc6IFRfXzExNQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTE1KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMDQgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2NDQ6IFRfXzExNgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTE2KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMDUgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2NTE6IFRfXzExNworICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTE3KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMDYgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2NTg6IFRfXzExOAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTE4KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMDcgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2NjU6IFRfXzExOQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTE5KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMDggOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2NzI6IFRfXzEyMAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTIwKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMDkgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2Nzk6IFRfXzEyMQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTIxKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMTAgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2ODY6IFRfXzEyMgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTIyKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMTEgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo2OTM6IFRfXzEyMworICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTIzKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMTIgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo3MDA6IFRfXzEyNAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTI0KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMTMgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo3MDc6IFRfXzEyNQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTI1KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMTQgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo3MTQ6IFRfXzEyNgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTI2KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMTUgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo3MjE6IFRfXzEyNworICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTI3KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMTYgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo3Mjg6IFRfXzEyOAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTI4KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMTcgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo3MzU6IFRfXzEyOQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTI5KCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMTggOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo3NDI6IFRfXzEzMAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtVF9fMTMwKCk7IAorCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAxMTkgOgorICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTo3NDk6IFJVTEVfSEVYCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1SVUxFX0hFWCgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMTIwIDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6NzU4OiBSVUxFX0lOVAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtUlVMRV9JTlQoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDEyMSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjc2NzogUlVMRV9ERUNJTUFMCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1SVUxFX0RFQ0lNQUwoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDEyMiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjc4MDogUlVMRV9JRAorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtUlVMRV9JRCgpOyAKKworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMTIzIDoKKyAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE6Nzg4OiBSVUxFX1NUUklORworICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBtUlVMRV9TVFJJTkcoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDEyNCA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjgwMDogUlVMRV9NTF9DT01NRU5UCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1SVUxFX01MX0NPTU1FTlQoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDEyNSA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOjgxNjogUlVMRV9TTF9DT01NRU5UCisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG1SVUxFX1NMX0NPTU1FTlQoKTsgCisKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDEyNiA6CisgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3Ny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IsCisgICAgICAgICAgICAiXDFcMTM1XDZcdWZmZmZcMVwxMzNcMVwxMzQiLAorICAgICAgICAgICAgIlwxXDEzNiIsCisgICAgICAgICAgICAiXDFcMTQxXDIyXHVmZmZmXDFcMTQwIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXDE0N1wxXDE1MCIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcMTU2XDIxXHVmZmZmXDFcMTU1IiwKKyAgICAgICAgICAgICJcMVwxNjJcMTdcdWZmZmZcMVwxNjBcMVwxNjEiLAorICAgICAgICAgICAgIlwxXDE2NVw0XHVmZmZmXDFcMTY2XDE1XHVmZmZmXDFcMTY0IiwKKyAgICAgICAgICAgICJcMVwxNzAiLAorICAgICAgICAgICAgIlwxXDE3MiIsCisgICAgICAgICAgICAiXDFcMTc0IiwKKyAgICAgICAgICAgICJcMVwxNzYiLAorICAgICAgICAgICAgIlwxXHUwMDgwIiwKKyAgICAgICAgICAgICJcMVx1MDA4MiIsCisgICAgICAgICAgICAiXDFcdTAwODVcMTNcdWZmZmZcMVx1MDA4NCIsCisgICAgICAgICAgICAiXDFcdTAwODciLAorICAgICAgICAgICAgIlwxXHUwMDhhXDFcdTAwOGJcMVx1ZmZmZlwxXHUwMDg5XDFcdWZmZmZcMVx1MDA4YyIsCisgICAgICAgICAgICAiXDFcdTAwOGVcN1x1ZmZmZlwxXHUwMDhmXDVcdWZmZmZcMVx1MDA4ZCIsCisgICAgICAgICAgICAiXDFcdTAwOTAiLAorICAgICAgICAgICAgIlwxXHUwMDkxIiwKKyAgICAgICAgICAgICJcMVx1MDA5MiIsCisgICAgICAgICAgICAiXDFcdTAwOTMiLAorICAgICAgICAgICAgIlwxXHUwMDk0IiwKKyAgICAgICAgICAgICJcMVx1MDA5NSIsCisgICAgIC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ZlwzMlw3NFw0XHVmZmZmXDFcNzRcMVx1ZmZmZlwzMlw3NCIsCisgICAgICAgICAgICAiXDFcdTAwYWEiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAwYWIiLAorICAgICAgICAgICAgIlwxXHUwMGFjXDNcdWZmZmZcMVx1MDBhZCIsCisgICAgICAgICAgICAiXDFcdTAwYWUiLAorICAgICAgICAgICAgIlwxXHUwMGFmIiwKKyAgICAgICAgICAgICJcMVx1MDBiMCIsCisgICAgICAgICAgICAiXDFcdTAwYjEiLAorICAgICAgICAgICAgIlwxXDc0XDEzXHVmZmZmXDEyXDc0XDdcdWZmZmZcMzJcNzRcNFx1ZmZmZlwxXDc0XDFcdWZmZmZcMzJcNzQiLAorICAgICAgICAgICAgIlwxXHUwMGIzIiwKKyAgICAgICAgICAgICJcMVx1MDBiNCIsCisgICAgICAgICAgICAiXDFcdTAwYjUiLAorICAgICAgICAgICAgIlwxXHUwMGI2IiwKKyAgICAgICAgICAgICJcMVx1MDBiNyIsCisgICAgICAgICAgICAiXDFcdTAwYjgiLAorICAgICAgICAgICAgIlwxXHUwMGI5IiwKKyAgICAgICAgICAgICJcMVx1MDBiYSIsCisgICAgICAgICAgICAiXDFcdTAwYmIiLAorICAgICAgICAgICAgIlwxXHUwMGJjIiwKKyAgICAgICAgICAgICJcMVx1MDBiZCIsCisgICAgICAgICAgICAiXDFcdTAwYmUiLAorICAgICAgICAgICAgIlwxXHUwMGJmIiwKKyAgICAgICAgICAgICJcMVx1MDBjMCIsCisgICAgICAgICAgICAiXDFcdTAwYzEiLAorICAgICAgICAgICAgIlwxXDc0XDEzXHVmZmZmXDEyXDc0XDdcdWZmZmZcMzJcNzRcNFx1ZmZmZlwxXDc0XDFcdWZmZmZcMzJcNzQiLAorICAgICAgICAgICAgIlwxXHUwMGMzIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAwYzUiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDBjNyIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAwYzkiLAorICAgICAgICAgICAgIlwxXHUwMGNhIiwKKyAgICAgICAgICAgICJcMVx1MDBjY1wyXHVmZmZmXDFcdTAwY2IiLAorICAgICAgICAgICAgIlwxXHUwMGNkIiwKKyAgICAgICAgICAgICJcMVx1MDBjZSIsCisgICAgICAgICAgICAiXDFcdTAwY2YiLAorICAgICAgICAgICAgIlwxXHUwMGQwIiwKKyAgICAgICAgICAgICJcMVx1MDBkMSIsCisgICAgICAgICAgICAiXDFcdTAwZDNcNVx1ZmZmZlwxXHUwMGQyIiwKKyAgICAgICAgICAgICJcMVx1MDBkNCIsCisgICAgICAgICAgICAiXDFcdTAwZDUiLAorICAgICAgICAgICAgIlwxXHUwMGQ2IiwKKyAgICAgICAgICAgICJcMVx1MDBkNyIsCisgICAgICAgICAgICAiXDFcdTAwZDgiLAorICAgICAgICAgICAgIlwxXHUwMGQ5IiwKKyAgICAgICAgICAgICJcMVx1MDBkYSIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMTJcdTAwOWFcMTBcdWZmZmZcMVx1MDA5Y1wxXHVmZmZmXDNcdTAwOWNcNVx1ZmZmZlwxXHUwMDljXDIyXHVmZmZmXDFcdTAwOWFcMlx1ZmZmZlwxXHUwMDljXDFcdWZmZmZcM1x1MDA5Y1w1XHVmZmZmXDFcdTAwOWMiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAwZGIiLAorICAgICAgICAgICAgIlwxXHUwMGRjIiwKKyAgICAgICAgICAgICJcMVx1MDBkZCIsCisgICAgICAgICAgICAiXDFcdTAwZGUiLAorICAgICAgICAgICAgIlwxXHUwMGRmIiwKKyAgICAgICAgICAgICJcMVx1MDBlMCIsCisgICAgICAgICAgICAiXDFcdTAwZTEiLAorICAgICAgICAgICAgIlwxXHUwMGUyIiwKKyAgICAgICAgICAgICJcMVx1MDBlMyIsCisgICAgICAgICAgICAiXDFcdTAwZTQiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAwZTUiLAorICAgICAgICAgICAgIlwxXHUwMGU2IiwKKyAgICAgICAgICAgICJcMVx1MDBlNyIsCisgICAgICAgICAgICAiXDFcNzRcMTNcdWZmZmZcMTJcNzRcN1x1ZmZmZlwzMlw3NFw0XHVmZmZmXDFcNzRcMVx1ZmZmZlwzMlw3NCIsCisgICAgICAgICAgICAiXDFcdTAwZTkiLAorICAgICAgICAgICAgIlwxXHUwMGVhIiwKKyAgICAgICAgICAgICJcMVx1MDBlYiIsCisgICAgICAgICAgICAiXDFcdTAwZWMiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcNzRcMTNcdWZmZmZcMTJcNzRcN1x1ZmZmZlwzMlw3NFw0XHVmZmZmXDFcNzRcMVx1ZmZmZlwzMlw3NCIsCisgICAgICAgICAgICAiXDFcdTAwZWUiLAorICAgICAgICAgICAgIlwxXHUwMGVmIiwKKyAgICAgICAgICAgICJcMVx1MDBmMCIsCisgICAgICAgICAgICAiXDFcdTAwZjEiLAorICAgICAgICAgICAgIlwxXHUwMGYyIiwKKyAgICAgICAgICAgICJcMVx1MDBmMyIsCisgICAgICAgICAgICAiXDFcdTAwZjQiLAorICAgICAgICAgICAgIlwxXDc0XDEzXHVmZmZmXDEyXDc0XDdcdWZmZmZcMzJcNzRcNFx1ZmZmZlwxXDc0XDFcdWZmZmZcMzJcNzQiLAorICAgICAgICAgICAgIlwxXDc0XDEzXHVmZmZmXDEyXDc0XDdcdWZmZmZcMzJcNzRcNFx1ZmZmZlwxXDc0XDFcdWZmZmZcMzJcNzQiLAorICAgICAgICAgICAgIlwxXHUwMGY3IiwKKyAgICAgICAgICAgICJcMVw3NFwxM1x1ZmZmZlwxMlw3NFw3XHVmZmZmXDMyXDc0XDRcdWZmZmZcMVw3NFwxXHVmZmZmXDMyXDc0IiwKKyAgICAgICAgICAgICJcMVx1MDBmOSIsCisgICAgICAgICAgICAiXDFcdTAwZmEiLAorICAgICAgICAgICAgIlwxXHUwMGZiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMGZjIiwKKyAgICAgICAgICAgICJcMVx1MDBmZCIsCisgICAgICAgICAgICAiXDFcdTAwZmUiLAorICAgICAgICAgICAgIlwxXDc0XDEzXHVmZmZmXDEyXDc0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gICAgICAgICAgICJcMVx1MDExNSIsCisgICAgICAgICAgICAiXDFcdTAxMTYiLAorICAgICAgICAgICAgIlwxXHUwMTE3IiwKKyAgICAgICAgICAgICJcMVw3NFwxM1x1ZmZmZlwxMlw3NFw3XHVmZmZmXDMyXDc0XDRcdWZmZmZcMVw3NFwxXHVmZmZmXDMyXDc0IiwKKyAgICAgICAgICAgICJcMVx1MDExYVwyNlx1ZmZmZlwxXHUwMTE5XDMyXHVmZmZmXDFcdTAxMWIiLAorICAgICAgICAgICAgIlwxXDc0XDEzXHVmZmZmXDEyXDc0XDdcdWZmZmZcMzJcNzRcNFx1ZmZmZlwxXDc0XDFcdWZmZmZcMzJcNzQiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAxMWQiLAorICAgICAgICAgICAgIlwxXHUwMTFlIiwKKyAgICAgICAgICAgICJcMVx1MDExZiIsCisgICAgICAgICAgICAiXDFcdTAxMjAiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAxMjEiLAorICAgICAgICAgICAgIlwxXDc0XDEzXHVmZmZmXDEyXDc0XDdcdWZmZmZcMzJcNzRcNFx1ZmZmZlwxXDc0XDFcdWZmZmZcMzJcNzQiLAorICAgICAgICAgICAgIlwxXHUwMTIzIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTI0IiwKKyAgICAgICAgICAgICJcMVx1MDEyNSIsCisgICAgICAgICAgICAiXDFcdTAxMjYiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDEyNyIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVw3NFwxM1x1ZmZmZlwxMlw3NFw3XHVmZmZmXDMyXDc0XDRcdWZmZmZcMVw3NFwxXHVmZmZmXDMyXDc0IiwKKyAgICAgICAgICAgICJcMVx1MDEyOSIsCisgICAgICAgICAgICAiXDFcdTAxMmEiLAorICAgICAgICAgICAgIlwxXHUwMTJiIiwKKyAgICAgICAgICAgICJcMVx1MDEyYyIsCisgICAgICAgICAgICAiXDFcdTAxMmQiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAxMmUiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAxMmYiLAorICAgICAgICAgICAgIlwxXHUwMTMwIiwKKyAgICAgICAgICAgICJcMVx1MDEzMSIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTMyIiwKKyAgICAgICAgICAgICJcMVx1MDEzMyIsCisgICAgICAgICAgICAiXDFcdTAxMzQiLAorICAgICAgICAgICAgIlwxXHUwMTM1IiwKKyAgICAgICAgICAgICJcMVx1MDEzNiIsCisgICAgICAgICAgICAiXDFcNzRcMTNcdWZmZmZcMTJcNzRcN1x1ZmZmZlwzMlw3NFw0XHVmZmZmXDFcNzRcMVx1ZmZmZlwzMlw3NCIsCisgICAgICAgICAgICAiXDFcNzRcMTNcdWZmZmZcMTJcNzRcN1x1ZmZmZlwzXDc0XDFcdTAxM2VcM1w3NFwxXHUwMTNhXDRcNzRcMVx1MDEzY1wzXDc0XDFcdTAxM2JcMVw3NFwxXHUwMTNmXDNcNzRcMVx1MDEzZFwxXDc0XDFcdTAxMzlcMVw3NFw0XHVmZmZmXDFcNzRcMVx1ZmZmZlwyMlw3NFwxXHUwMTM4XDdcNzQiLAorICAgICAgICAgICAgIlwxXHUwMTQxIiwKKyAgICAgICAgICAgICJcMVx1MDE0MiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDE0MyIsCisgICAgICAgICAgICAiXDFcNzRcMTNcdWZmZmZcMTJcNzRcN1x1ZmZmZlwzMlw3NFw0XHVmZmZmXDFcNzRcMVx1ZmZmZlwzMlw3NCIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVw3NFwxM1x1ZmZmZlwxMlw3NFw3XHVmZmZmXDMyXDc0XDRcdWZmZmZcMVw3NFwxXHVmZmZmXDMyXDc0IiwKKyAgICAgICAgICAgICJcMVx1MDE0NiIsCisgICAgICAgICAgICAiXDFcdTAxNDciLAorICAgICAgICAgICAgIlwxXHUwMTQ4IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTQ5IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTRhIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXDc0XDEzXHVmZmZmXDEyXDc0XDdcdWZmZmZcMzJcNzRcNFx1ZmZmZlwxXDc0XDFcdWZmZmZcMzJcNzQiLAorICAgICAgICAgICAgIlwxXHUwMTRjIiwKKyAgICAgICAgICAgICJcMVx1MDE0ZCIsCisgICAgICAgICAgICAiXDFcdTAxNGUiLAorICAgICAgICAgICAgIlwxXHUwMTRmIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTUwXDE2XHVmZmZmXDFcdTAxNTEiLAorICAgICAgICAgICAgIlwxXDc0XDEzXHVmZmZmXDEyXDc0XDdcdWZmZmZcMjNcNzRcMVx1MDE1Mlw2XDc0XDRcdWZmZmZcMVw3NFwxXHVmZmZmXDMyXDc0IiwKKyAgICAgICAgICAgICJcMVx1MDE1NCIsCisgICAgICAgICAgICAiXDFcdTAxNTUiLAorICAgICAgICAgICAgIlwxXHUwMTU2IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTU3IiwKKyAgICAgICAgICAgICJcMVx1MDE1OCIsCisgICAgICAgICAgICAiXDFcdTAxNTkiLAorICAgICAgICAgICAgIlwxXHUwMTVhIiwKKyAgICAgICAgICAgICJcMVw3NFwxM1x1ZmZmZlwxMlw3NFw3XHVmZmZmXDMyXDc0XDRcdWZmZmZcMVw3NFwxXHVmZmZmXDMyXDc0IiwKKyAgICAgICAgICAgICJcMVx1MDE1YyIsCisgICAgICAgICAgICAiXDFcNzRcMTNcdWZmZmZcMTJcNzRcN1x1ZmZmZlwzMlw3NFw0XHVmZmZmXDFcNzRcMVx1ZmZmZlwzMlw3NCIsCisgICAgICAgICAgICAiXDFcdTAxNWUiLAorICAgICAgICAgICAgIlwxXDc0XDEzXHVmZmZmXDEyXDc0XDdcdWZmZmZcMzJcNzRcNFx1ZmZmZlwxXDc0XDFcdWZmZmZcMzJcNzQiLAorICAgICAgICAgICAgIlwxXHUwMTYwIiwKKyAgICAgICAgICAgICJcMVx1MDE2MSIsCisgICAgICAgICAgICAiXDFcdTAxNjIiLAorICAgICAgICAgICAgIlwxXHUwMTYzIiwKKyAgICAgICAgICAgICJcMVx1MDE2NCIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDE2NSIsCisgICAgICAgICAgICAiXDFcdTAxNjYiLAorICAgICAgICAgICAgIlwxXHUwMTY3XDE1XHVmZmZmXDFcdTAxNjgiLAorICAgICAgICAgICAgIlwxXHUwMTY5IiwKKyAgICAgICAgICAgICJcMVx1MDE2Ylw1XHVmZmZmXDFcdTAxNmEiLAorICAgICAgICAgICAgIlwxXHUwMTZjIiwKKyAgICAgICAgICAgICJcMVx1MDE2ZCIsCisgICAgICAgICAgICAiXDFcdTAxNmUiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAxNmYiLAorICAgICAgICAgICAgIlwxXHUwMTcwIiwKKyAgICAgICAgICAgICJcMVx1MDE3MSIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTcyIiwKKyAgICAgICAgICAgICJcMVx1MDE3MyIsCisgICAgICAgICAgICAiXDFcdTAxNzQiLAorICAgICAgICAgICAgIlwxXHUwMTc1IiwKKyAgICAgICAgICAgICJcMVw3NFwxM1x1ZmZmZlwxMlw3NFw3XHVmZmZmXDMyXDc0XDRcdWZmZmZcMVw3NFwxXHVmZmZmXDMyXDc0IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwx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3XHVmZmZmXDMyXDc0XDRcdWZmZmZcMVw3NFwxXHVmZmZmXDMyXDc0IiwKKyAgICAgICAgICAgICJcMVx1MDE4OSIsCisgICAgICAgICAgICAiXDFcdTAxOGEiLAorICAgICAgICAgICAgIlwxXHUwMThiIiwKKyAgICAgICAgICAgICJcMVx1MDE4YyIsCisgICAgICAgICAgICAiXDFcdTAxOGQiLAorICAgICAgICAgICAgIlwxXHUwMThlIiwKKyAgICAgICAgICAgICJcMVx1MDE4ZiIsCisgICAgICAgICAgICAiXDFcdTAxOTAiLAorICAgICAgICAgICAgIlwxXHUwMTkxIiwKKyAgICAgICAgICAgICJcMVx1MDE5MiIsCisgICAgICAgICAgICAiXDFcdTAxOTMiLAorICAgICAgICAgICAgIlwxXHUwMTk0IiwKKyAgICAgICAgICAgICJcMVx1MDE5NSIsCisgICAgICAgICAgICAiXDFcNzRcMTNcdWZmZmZcMTJcNzRcN1x1ZmZmZlwzMlw3NFw0XHVmZmZmXDFcNzRcMVx1ZmZmZlwzMlw3NCIsCisgICAgICAgICAgICAiXDFcdTAxOTciLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcNzRcMTNcdWZmZmZcMTJcNzRcN1x1ZmZmZlwxNFw3NFwxXHUwMTk4XDE1XDc0XDRcdWZmZmZcMVw3NFwxXHVmZmZmXDMyXDc0IiwKKyAgICAgICAgICAgICJcMVx1MDE5YSIsCisgICAgICAgICAgICAiXDFcdTAxOWIiLAorICAgICAgICAgICAgIlwxXHUwMTljIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTlkIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMTllIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXDc0XDEzXHVmZmZmXDEyXDc0XDdcdWZmZmZcMzJcNzRcNFx1ZmZmZlwxXDc0XDFcdWZmZmZcMzJcNzQiLAorICAgICAgICAgICAgIlwxXHUwMWEwIiwKKyAgICAgICAgICAgICJcMVx1MDFhMSIsCisgICAgICAgICAgICAiXDFcdTAxYTIiLAorICAgICAgICAgICAgIlwxXDc0XDEzXHVmZmZmXDEyXDc0XDdcdWZmZmZcMzJcNzRcNFx1ZmZmZlwxXDc0XDFcdWZmZmZcMzJcNzQiLAorICAgICAgICAgICAgIlwxXHUwMWE0IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMWE1IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAxYTYiLAorICAgICAgICAgICAgIlwxXDc0XDEzXHVmZmZmXDEyXDc0XDdcdWZmZmZcMzJcNzRcNFx1ZmZmZlwxXDc0XDFcdWZmZmZcMzJcNzQiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVw3NFwxM1x1ZmZmZlwxMlw3NFw3XHVmZmZmXDMyXDc0XDRcdWZmZmZcMVw3NFwxXHVmZmZmXDMyXDc0IiwKKyAgICAgICAgICAgICJcMVw3NFwxM1x1ZmZmZlwxMlw3NFw3XHVmZmZmXDMyXDc0XDRcdWZmZmZcMVw3NFwxXHVmZmZmXDMyXDc0IiwKKyAgICAgICAgICAgICJcMVw3NFwxM1x1ZmZmZlwxMlw3NFw3XHVmZmZmXDMyXDc0XDRcdWZmZmZcMVw3NFwxXHVmZmZmXDMyXDc0IiwKKyAgICAgICAgICAgICJcMVx1MDFhYiIsCisgICAgICAgICAgICAiXDFcdTAxYWMiLAorICAgICAgICAgICAgIlwxXHUwMWFkIiwKKyAgICAgICAgICAgICJcMVx1MDFhZSIsCisgICAgICAgICAgICAiXDFcdTAxYWYiLAorICAgICAgICAgICAgIlwxXHUwMWIwIiwKKyAgICAgICAgICAgICJcMVx1MDFiMSIsCisgICAgICAgICAgICAiXDFcdTAxYjIiLAorICAgICAgICAgICAgIlwxXHUwMWIzIiwKKyAgICAgICAgICAgICJcMVx1MDFiNCIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVw3NFwxM1x1ZmZmZlwxMlw3NFw3XHVmZmZmXDMyXDc0XDRcdWZmZmZcMVw3NFwxXHVmZmZmXDMyXDc0IiwKKyAgICAgICAgICAgICJcMVx1MDFiNiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDFiNyIsCisgICAgICAgICAgICAiXDFcdTAxYjgiLAorICAgICAgICAgICAgIlwxXDc0XDEzXHVmZmZmXDEyXDc0XDdcdWZmZmZcMzJcNzRcNFx1ZmZmZlwxXDc0XDFcdWZmZmZcMzJcNzQiLAorICAgICAgICAgICAgIlwxXHUwMWJhIiwKKyAgICAgICAgICAgICJcMVx1MDFiYiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDFiYyIsCisgICAgICAgICAgICAiXDFcdTAxYmQiLAorICAgICAgICAgICAgIlwxXHUwMWJlIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMWJmIiwKKyAgICAgICAgICAgICJcMVx1MDFjMCIsCisgICAgICAgICAgICAiXDFcdTAxYzEiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAxYzIiLAorICAgICAgICAgICAgIlwxXHUwMWMzIiwKKyAgICAgICAgICAgICJcMVx1MDFjNCIsCisgICAgICAgICAgICAiXDFcdTAxYzUiLAorICAgICAgICAgICAgIlwxXHUwMWM2IiwKKyAgICAgICAgICAgICJcMVx1MDFjNyIsCisgICAgICAgICAgICAiXDFcdTAxYzgiLAorICAgICAgICAgICAgIlwxXHUwMWM5IiwKKyAgICAgICAgICAgICJcMVw3NFwxM1x1ZmZmZlwxMlw3NFw3XHVmZmZmXDMyXDc0XDRcdWZmZmZcMVw3NFwxXHVmZmZmXDMyXDc0IiwKKyAgICAgICAgICAgICJcMVx1MDFjYiIsCisgICAgICAgICA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3NFwxM1x1ZmZmZlwxMlw3NFw3XHVmZmZmXDMyXDc0XDRcdWZmZmZcMVw3NFwxXHVmZmZmXDMyXDc0IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMWUwIiwKKyAgICAgICAgICAgICJcMVx1MDFlMSIsCisgICAgICAgICAgICAiXDFcdTAxZTIiLAorICAgICAgICAgICAgIlwxXHUwMWUzIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAxZTQiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDFlNSIsCisgICAgICAgICAgICAiXDFcNzRcMTNcdWZmZmZcMTJcNzRcN1x1ZmZmZlwzMlw3NFw0XHVmZmZmXDFcNzRcMVx1ZmZmZlwzMlw3NCIsCisgICAgICAgICAgICAiXDFcNzRcMTNcdWZmZmZcMTJcNzRcN1x1ZmZmZlwzMlw3NFw0XHVmZmZmXDFcNzRcMVx1ZmZmZlwzMlw3NCIsCisgICAgICAgICAgICAiXDFcdTAxZTgiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDFlOSIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVx1MDFlYSIsCisgICAgICAgICAgICAiXDFcNzRcMTNcdWZmZmZcMTJcNzRcN1x1ZmZmZlwzMlw3NFw0XHVmZmZmXDFcNzRcMVx1ZmZmZlwzMlw3NCIsCisgICAgICAgICAgICAiXDFcdTAxZWMiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcdTAxZWQiLAorICAgICAgICAgICAgIlwxXHUwMWVlIiwKKyAgICAgICAgICAgICJcMVx1MDFlZiIsCisgICAgICAgICAgICAiXDFcdTAxZjAiLAorICAgICAgICAgICAgIlwxXHUwMWYxIiwKKyAgICAgICAgICAgICJcMVx1MDFmMiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMWYzIiwKKyAgICAgICAgICAgICJcMVx1MDFmNCIsCisgICAgICAgICAgICAiXDFcdTAxZjUiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcNzRcMTNcdWZmZmZcMTJcNzRcN1x1ZmZmZlwzMlw3NFw0XHVmZmZmXDFcNzRcMVx1ZmZmZlwzMlw3NCIsCisgICAgICAgICAgICAiXDFcNzRcMTNcdWZmZmZcMTJcNzRcN1x1ZmZmZlwzMlw3NFw0XHVmZmZmXDFcNzRcMVx1ZmZmZlwzMlw3NCIsCisgICAgICAgICAgICAiXDFcdTAxZjgiLAorICAgICAgICAgICAgIlwxXHUwMWY5IiwKKyAgICAgICAgICAgICJcMVx1MDFmYSIsCisgICAgICAgICAgICAiXDFcdTAxZmIiLAorICAgICAgICAgICAgIlwxXHUwMWZjIiwKKyAgICAgICAgICAgICJcMVw3NFwxM1x1ZmZmZlwxMlw3NFw3XHVmZmZmXDMyXDc0XDRcdWZmZmZcMVw3NFwxXHVmZmZmXDMyXDc0IiwKKyAgICAgICAgICAgICJcMVx1MDFmZSIsCisgICAgICAgICAgICAiXDFcNzRcMTNcdWZmZmZcMTJcNzRcN1x1ZmZmZlwzMlw3NFw0XHVmZmZmXDFcNzRcMVx1ZmZmZlwzMlw3NCIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXHUwMjAwIiwKKyAgICAgICAgICAgICJcMVx1MDIwMSIsCisgICAgICAgICAgICAiXDFcdTAyMDIiLAorICAgICAgICAgICAgIlwxXHUwMjAzIiwKKyAgICAgICAgICAgICJcMVw3NFwxM1x1ZmZmZlwxMlw3NFw3XHVmZmZmXDMyXDc0XDRcdWZmZmZcMVw3NFwxXHVmZmZmXDMyXDc0IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIlwxXDc0XDEzXHVmZmZmXDEyXDc0XDdcdWZmZmZcMzJcNzRcNFx1ZmZmZlwxXDc0XDFcdWZmZmZcMzJcNzQiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiXDFcNzRcMTNcdWZmZmZcMTJcNzRcN1x1ZmZmZlwzMlw3NFw0XHVmZmZmXDFcNzRcMVx1ZmZmZlwzMlw3NCIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICJcMVw3NFwxM1x1ZmZmZlwxMlw3NFw3XHVmZmZmXDMyXDc0XDRcdWZmZmZcMVw3NFwxXHVmZmZmXDMyXDc0IiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIsCisgICAgICAgICAgICAiIiwKKyAgICAgICAgICAgICIiLAorICAgICAgICAgICAgIiIKKyAgICB9OworCisgICAgc3RhdGljIGZpbmFsIHNob3J0W10gREZBMjFfZW90ID0gREZBLnVucGFja0VuY29kZWRTdHJpbmcoREZBMjFfZW90Uyk7CisgICAgc3RhdGljIGZpbmFsIHNob3J0W10gREZBMjFfZW9mID0gREZBLnVucGFja0VuY29kZWRTdHJpbmcoREZBMjFfZW9mUyk7CisgICAgc3RhdGljIGZpbmFsIGNoYXJbXSBERkEyMV9taW4gPSBERkEudW5wYWNrRW5jb2RlZFN0cmluZ1RvVW5zaWduZWRDaGFycyhERkEyMV9taW5TKTsKKyAgICBzdGF0aWMgZmluYWwgY2hhcltdIERGQTIxX21heCA9IERGQS51bnBhY2tFbmNvZGVkU3RyaW5nVG9VbnNpZ25lZENoYXJzKERGQTIxX21heFMpOworICAgIHN0YXRpYyBmaW5hbCBzaG9ydFtdIERGQTIxX2FjY2VwdCA9IERGQS51bnBhY2tFbmNvZGVkU3RyaW5nKERGQTIxX2FjY2VwdFMpOworICAgIHN0YXRpYyBmaW5hbCBzaG9ydFtdIERGQTIxX3NwZWNpYWwgPSBERkEudW5wYWNrRW5jb2RlZFN0cmluZyhERkEyMV9zcGVjaWFsUyk7CisgICAgc3RhdGljIGZpbmFsIHNob3J0W11bXSBERkEyMV90cmFuc2l0aW9uOworCisgICAgc3RhdGljIHsKKyAgICAgICAgaW50IG51bVN0YXRlcyA9IERGQTIxX3RyYW5zaXRpb25TLmxlbmd0aDsKKyAgICAgICAgREZBMjFfdHJhbnNpdGlvbiA9IG5ldyBzaG9ydFtudW1TdGF0ZXNdW107CisgICAgICAgIGZvciAoaW50IGk9MDsgaTxudW1TdGF0ZXM7IGkrKykgeworICAgICAgICAgICAgREZBMjFfdHJhbnNpdGlvbltpXSA9IERGQS51bnBhY2tFbmNvZGVkU3RyaW5nKERGQTIxX3RyYW5zaXRpb25TW2ldKTsKKyAgICAgICAgfQorICAgIH0KKworICAgIGNsYXNzIERGQTIxIGV4dGVuZHMgREZBIHsKKworICAgICAgICBwdWJsaWMgREZBMjEoQmFzZVJlY29nbml6ZXIgcmVjb2duaXplcikgeworICAgICAgICAgICAgdGhpcy5yZWNvZ25pemVyID0gcmVjb2duaXplcjsKKyAgICAgICAgICAgIHRoaXMuZGVjaXNpb25OdW1iZXIgPSAyMTsKKyAgICAgICAgICAgIHRoaXMuZW90ID0gREZBMjFfZW90OworICAgICAgICAgICAgdGhpcy5lb2YgPSBERkEyMV9lb2Y7CisgICAgICAgICAgICB0aGlzLm1pbiA9IERGQTIxX21pbjsKKyAgICAgICAgICAgIHRoaXMubWF4ID0gREZBMjFfbWF4OworICAgICAgICAgICAgdGhpcy5hY2NlcHQgPSBERkEyMV9hY2NlcHQ7CisgICAgICAgICAgICB0aGlzLnNwZWNpYWwgPSBERkEyMV9zcGVjaWFsOworICAgICAgICAgICAgdGhpcy50cmFuc2l0aW9uID0gREZBMjFfdHJhbnNpdGlvbjsKKyAgICAgICAgfQorICAgICAgICBwdWJsaWMgU3RyaW5nIGdldERlc2NyaXB0aW9uKCkgeworICAgICAgICAgICAgcmV0dXJuICIxOjE6IFRva2VucyA6ICggVF9fMTMgfCBUX18xNCB8IFRfXzE1IHwgVF9fMTYgfCBUX18xNyB8IFRfXzE4IHwgVF9fMTkgfCBUX18yMCB8IFRfXzIxIHw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9fMTIwIHwgVF9fMTIxIHwgVF9fMTIyIHwgVF9fMTIzIHwgVF9fMTI0IHwgVF9fMTI1IHwgVF9fMTI2IHwgVF9fMTI3IHwgVF9fMTI4IHwgVF9fMTI5IHwgVF9fMTMwIHwgUlVMRV9IRVggfCBSVUxFX0lOVCB8IFJVTEVfREVDSU1BTCB8IFJVTEVfSUQgfCBSVUxFX1NUUklORyB8IFJVTEVfTUxfQ09NTUVOVCB8IFJVTEVfU0xfQ09NTUVOVCB8IFJVTEVfV1MgfCBSVUxFX0FOWV9PVEhFUiApOyI7CisgICAgICAgIH0KKyAgICAgICAgcHVibGljIGludCBzcGVjaWFsU3RhdGVUcmFuc2l0aW9uKGludCBzLCBJbnRTdHJlYW0gX2lucHV0KSB0aHJvd3MgTm9WaWFibGVBbHRFeGNlcHRpb24geworICAgICAgICAgICAgSW50U3RyZWFtIGlucHV0ID0gX2lucHV0OworICAgICAgICAJaW50IF9zID0gczsKKyAgICAgICAgICAgIHN3aXRjaCAoIHMgKSB7CisgICAgICAgICAgICAgICAgICAgIGNhc2UgMCA6IAorICAgICAgICAgICAgICAgICAgICAgICAgaW50IExBMjFfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgICAgICAgICBzID0gLTE7CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIChMQTIxXzA9PSdwJykgKSB7cyA9IDE7fQorCisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICggKExBMjFfMD09J3snKSApIHtzID0gMjt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nfScpICkge3MgPSAzO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdjJykgKSB7cyA9IDQ7fQorCisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICggKExBMjFfMD09J2QnKSApIHtzID0gNTt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nbycpICkge3MgPSA2O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSc7JykgKSB7cyA9IDc7fQorCisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICggKExBMjFfMD09J3QnKSApIHtzID0gODt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0naCcpICkge3MgPSA5O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdhJykgKSB7cyA9IDEwO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdlJykgKSB7cyA9IDExO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdrJykgKSB7cyA9IDEyO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdsJykgKSB7cyA9IDEzO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSd1JykgKSB7cyA9IDE0O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdtJykgKSB7cyA9IDE1O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSduJykgKSB7cyA9IDE2O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdpJykgKSB7cyA9IDE3O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PScuJykgKSB7cyA9IDE4O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PScqJykgKSB7cyA9IDE5O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdAJykgKSB7cyA9IDIwO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PScoJykgKSB7cyA9IDIxO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PScsJykgKSB7cyA9IDIyO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PScpJykgKSB7cyA9IDIzO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSc9JykgKSB7cyA9IDI0O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PScjJykgKSB7cyA9IDI1O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdbJykgKSB7cyA9IDI2O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSddJykgKSB7cyA9IDI3O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PScrJykgKSB7cyA9IDI4O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSctJykgKSB7cyA9IDI5O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PScvJykgKSB7cyA9IDMwO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSclJykgKSB7cyA9IDMxO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSc8JykgKSB7cyA9IDMyO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSc+JykgKSB7cyA9IDMzO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSd8JykgKSB7cyA9IDM0O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PScmJykgKSB7cyA9IDM1O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSchJykgKSB7cyA9IDM2O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSc/JykgKSB7cyA9IDM3O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSc6JykgKSB7cyA9IDM4O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdzJykgKSB7cyA9IDM5O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdmJykgKSB7cyA9IDQwO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSd3JykgKSB7cyA9IDQxO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSd2JykgKSB7cyA9IDQyO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdyJykgKSB7cyA9IDQzO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdTJykgKSB7cyA9IDQ0O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdOJykgKSB7cyA9IDQ1O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdJJykgKSB7cyA9IDQ2O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdCJykgKSB7cyA9IDQ3O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdEJykgKSB7cyA9IDQ4O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdUJykgKSB7cyA9IDQ5O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PScwJykgKSB7cyA9IDUwO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoICgoTEEyMV8wPj0nMScgJiYgTEEyMV8wPD0nOScpKSApIHtzID0gNTE7fQorCisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICggKExBMjFfMD09J14nKSApIHtzID0gNTI7fQorCisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICggKExBMjFfMD09JyQnfHxMQTIxXzA9PSdBJ3x8TEEyMV8wPT0nQyd8fChMQTIxXzA+PSdFJyAmJiBMQTIxXzA8PSdIJyl8fChMQTIxXzA+PSdKJyAmJiBMQTIxXzA8PSdNJyl8fChMQTIxXzA+PSdPJyAmJiBMQTIxXzA8PSdSJyl8fChMQTIxXzA+PSdVJyAmJiBMQTIxXzA8PSdaJyl8fExBMjFfMD09J18nfHxMQTIxXzA9PSdiJ3x8TEEyMV8wPT0nZyd8fExBMjFfMD09J2onfHxMQTIxXzA9PSdxJ3x8KExBMjFfMD49J3gnICYmIExBMjFfMDw9J3onKSkgKSB7cyA9IDUzO30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIxXzA9PSdcIicpICkge3MgPSA1NDt9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEEyMV8wPT0nXCcnKSApIHtzID0gNTU7fQorCisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICggKChMQTIxXzA+PSdcdCcgJiYgTEEyMV8wPD0nXG4nKXx8TEEyMV8wPT0nXHInfHxMQTIxXzA9PScgJykgKSB7cyA9IDU2O30KKworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoICgoTEEyMV8wPj0nXHUwMDAwJyAmJiBMQTIxXzA8PSdcYicpfHwoTEEyMV8wPj0nXHUwMDBCJyAmJiBMQTIxXzA8PSdcZicpfHwoTEEyMV8wP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wICsxLDEwMDE1IEBACisvKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIENvcHlyaWdodCAoYykgMjAxMSwgMjAxNiAtIExvZXR6IEdtYkgmQ28uS0cgKDY5MTE1IEhlaWRlbGJlcmcsIEdlcm1hbnkpIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gVGhpcyBwcm9ncmFtIGFuZCB0aGUgYWNjb21wYW55aW5nIG1hdGVyaWFscyAgICAgICAgICAgCisgKiAgYXJlIG1hZGUgYXZhaWxhYmxlIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgRWNsaXBzZSBQdWJsaWMgTGljZW5zZSB2MS4wICAgICAgIAorICogIHdoaWNoIGFjY29tcGFuaWVzIHRoaXMgZGlzdHJpYnV0aW9uLCBhbmQgaXMgYXZhaWxhYmxlIGF0ICAgICAgICAgICAgICAgICAgCisgKiAgaHR0cDovL3d3dy5lY2xpcHNlLm9yZy9sZWdhbC9lcGwtdjEwLmh0bWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIENvbnRyaWJ1dG9yczogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqIAkgICBDaHJpc3RvcGhlIExvZXR6IChMb2V0eiBHbWJIJkNvLktHKSAtIGluaXRpYWwgaW1wbGVtZW50YXRpb24KKyAqIAorICovCisKK3BhY2thZ2Ugb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnBhcnNlci5hbnRsci5pbnRlcm5hbDsgCisKK2ltcG9ydC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ZXIgeworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgU3RyaW5nW10gdG9rZW5OYW1lcyA9IG5ldyBTdHJpbmdbXSB7CisgICAgICAgICI8aW52YWxpZD4iLCAiPEVPUj4iLCAiPERPV04+IiwgIjxVUD4iLCAiUlVMRV9JRCIsICJSVUxFX1NUUklORyIsICJSVUxFX0hFWCIsICJSVUxFX0lOVCIsICJSVUxFX0RFQ0lNQUwiLCAiUlVMRV9NTF9DT01NRU5UIiwgIlJVTEVfU0xfQ09NTUVOVCIsICJSVUxFX1dTIiwgIlJVTEVfQU5ZX09USEVSIiwgIidwYWNrYWdlJyIsICIneyciLCAiJ30nIiwgIidjdWJlJyIsICInZGVmYXVsdE1lYXN1cmUnIiwgIidkaW1lbnNpb25Vc2FnZSciLCAiJ292ZXInIiwgIic7JyIsICInZGltZW5zaW9uJyIsICIndHlwZVRpbWUnIiwgIidoaWVyYXJjaHknIiwgIidoYXNBbGwnIiwgIidhbGxNZW1iZXJOYW1lPSciLCAiJ2RlZmF1bHRNZW1iZXI9JyIsICInZW50aXR5JyIsICIna2V5PSciLCAiJ2xldmVsJyIsICInY29sdW1uPSciLCAiJ3VuaXF1ZU1lbWJlcnMnIiwgIidsZXZlbFR5cGU9JyIsICIncHJvcGVydHknIiwgIid0eXBlPSciLCAiJ21lYXN1cmUnIiwgIidub3RWaXNpYmxlJyIsICInaW1wb3J0JyIsICInLiciLCAiJyonIiwgIidAJyIsICInKCciLCAiJywnIiwgIicpJyIsICInPSciLCAiJyMnIiwgIidbJyIsICInXSciLCAiJys9JyIsICInLT0nIiwgIicqPSciLCAiJy89JyIsICInJT0nIiwgIic8JyIsICInPiciLCAiJz49JyIsICInfHwnIiwgIicmJiciLCAiJz09JyIsICInIT0nIiwgIic9PT0nIiwgIichPT0nIiwgIidpbnN0YW5jZW9mJyIsICInLT4nIiwgIicuLjwnIiwgIicuLiciLCAiJz0+JyIsICInPD4nIiwgIic/OiciLCAiJysnIiwgIictJyIsICInKionIiwgIicvJyIsICInJSciLCAiJyEnIiwgIidhcyciLCAiJysrJyIsICInLS0nIiwgIic6OiciLCAiJz8uJyIsICInfCciLCAiJ2lmJyIsICInZWxzZSciLCAiJ3N3aXRjaCciLCAiJzonIiwgIidkZWZhdWx0JyIsICInY2FzZSciLCAiJ2ZvciciLCAiJ3doaWxlJyIsICInZG8nIiwgIid2YXInIiwgIid2YWwnIiwgIidleHRlbmRzJyIsICInc3RhdGljJyIsICInZXh0ZW5zaW9uJyIsICInc3VwZXInIiwgIiduZXcnIiwgIidmYWxzZSciLCAiJ3RydWUnIiwgIidudWxsJyIsICIndHlwZW9mJyIsICIndGhyb3cnIiwgIidyZXR1cm4nIiwgIid0cnknIiwgIidmaW5hbGx5JyIsICInc3luY2hyb25pemVkJyIsICInY2F0Y2gnIiwgIic/JyIsICInJiciLCAiJ3N1bSciLCAiJ2NvdW50JyIsICInbWluJyIsICInbWF4JyIsICInYXZnJyIsICInZGlzdGluY3QtY291bnQnIiwgIidTdHJpbmcnIiwgIidOdW1lcmljJyIsICInSW50ZWdlciciLCAiJ0Jvb2xlYW4nIiwgIidEYXRlJyIsICInVGltZSciLCAiJ1RpbWVzdGFtcCciLCAiJ1RpbWVZZWFycyciLCAiJ1RpbWVIYWxmWWVhcnMnIiwgIidUaW1lUXVhcnRlcnMnIiwgIidUaW1lTW9udGhzJyIsICInVGltZVdlZWtzJyIsICInVGltZURheXMnIiwgIidUaW1lSG91cnMnIiwgIidUaW1lTWludXRlcyciLCAiJ1RpbWVTZWNvbmRzJyIKKyAgICB9OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFJVTEVfSEVYPTY7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNTA9NTA7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNTk9NTk7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNTU9NTU7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbn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gIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFJVTEVfU1RSSU5HPTU7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgUlVMRV9TTF9DT01NRU5UPTEwOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzc3PTc3OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzExOT0xMTk7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNzg9Nzg7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTE4PTExODsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX183OT03OTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX183Mz03MzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMTU9MTE1OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IEVPRj0tMTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX183ND03NDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMTQ9MTE0OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzc1PTc1OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzExNz0xMTc7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fNzY9NzY7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTE2PTExNjsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX184MD04MDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMTE9MTExOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzgxPTgxOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzExMD0xMTA7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fODI9ODI7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTEzPTExMzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX184Mz04MzsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMTI9MTEyOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFJVTEVfV1M9MTE7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgUlVMRV9BTllfT1RIRVI9MTI7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fODg9ODg7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTA4PTEwODsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX184OT04OTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMDc9MTA3OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzEwOT0xMDk7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fODQ9ODQ7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTA0PTEwNDsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX184NT04NTsKKyAgICBwdWJsaWMgc3RhdGljIGZpbmFsIGludCBUX18xMDM9MTAzOworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzg2PTg2OworICAgIHB1YmxpYyBzdGF0aWMgZmluYWwgaW50IFRfXzEwNj0xMDY7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fODc9ODc7CisgICAgcHVibGljIHN0YXRpYyBmaW5hbCBpbnQgVF9fMTA1PTEwNTsKKworICAgIC8vIGRlbGVnYXRlcworICAgIC8vIGRlbGVnYXRvcnMKKworCisgICAgICAgIHB1YmxpYyBJbnRlcm5hbEN1YmVEU0xQYXJzZXIoVG9rZW5TdHJlYW0gaW5wdXQpIHsKKyAgICAgICAgICAgIHRoaXMoaW5wdXQsIG5ldyBSZWNvZ25pemVyU2hhcmVkU3RhdGUoKSk7CisgICAgICAgIH0KKyAgICAgICAgcHVibGljIEludGVybmFsQ3ViZURTTFBhcnNlcihUb2tlblN0cmVhbSBpbnB1dCwgUmVjb2duaXplclNoYXJlZFN0YXRlIHN0YXRlKSB7CisgICAgICAgICAgICBzdXBlcihpbnB1dCwgc3RhdGUpOworICAgICAgICAgICAgIAorICAgICAgICB9CisgICAgICAgIAorCisgICAgcHVibGljIFN0cmluZ1tdIGdldFRva2VuTmFtZXMoKSB7IHJldHVybiBJbnRlcm5hbEN1YmVEU0xQYXJzZXIudG9rZW5OYW1lczsgfQorICAgIHB1YmxpYyBTdHJpbmcgZ2V0R3JhbW1hckZpbGVOYW1lKCkgeyByZXR1cm4gIi4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmciOyB9CisKKworCisgICAgIAlwcml2YXRlIEN1YmVEU0xHcmFtbWFyQWNjZXNzIGdyYW1tYXJBY2Nlc3M7CisgICAgIAkKKyAgICAgICAgcHVibGljIEludGVybmFsQ3ViZURTTFBhcnNlcihUb2tlblN0cmVhbSBpbnB1dCwgQ3ViZURTTEdyYW1tYXJBY2Nlc3MgZ3JhbW1hckFjY2VzcykgeworICAgICAgICAgICAgdGhpcyhpbnB1dCk7CisgICAgICAgICAgICB0aGlzLmdyYW1tYXJBY2Nlc3MgPSBncmFtbWFyQWNjZXNzOworICAgICAgICAgICAgcmVnaXN0ZXJSdWxlcyhncmFtbWFyQWNjZXNzLmdldEdyYW1tYXIoKSk7CisgICAgICAgIH0KKyAgICAgICAgCisgICAgICAgIEBPdmVycmlkZQorICAgICAgICBwcm90ZWN0ZWQgU3RyaW5nIGdldEZpcnN0UnVsZU5hbWUoKSB7CisgICAgICAgIAlyZXR1c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vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo3MDoyOiBpdl9ydWxlQ3ViZU1vZGVsPSBydWxlQ3ViZU1vZGVsIEVPRgorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZU1vZGVsUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlQ3ViZU1vZGVsX2luX2VudHJ5UnVsZUN1YmVNb2RlbDc1KTsKKyAgICAgICAgICAgIGl2X3J1bGVDdWJlTW9kZWw9cnVsZUN1YmVNb2RlbCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgY3VycmVudCA9aXZfcnVsZUN1YmVNb2RlbDsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVDdWJlTW9kZWw4NSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAg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lRFNMLmc6ODk6MzogbHZfcGNrZ18xXzA9IHJ1bGVDdWJlUGFja2FnZQorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgCSAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldEN1YmVNb2RlbEFjY2VzcygpLmdldFBja2dDdWJlUGFja2FnZVBhcnNlclJ1bGVDYWxsXzFfMCgpKTsgCisgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlQ3ViZVBhY2thZ2VfaW5fcnVsZUN1YmVNb2RlbDE0MCk7CisgICAgICAgICAgICBsdl9wY2tnXzFfMD1ydWxlQ3ViZVBhY2thZ2UoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudEZvclBhcmVudChncmFtbWFyQWNjZXNzLmdldEN1YmVNb2RlbFJ1bGUoKSk7CisgICAgICAgICAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgIAkJc2V0KAorICAgICAgICAgICAgICAgICAgICAgCQkJY3VycmVudCwgCisgICAgICAgICAgICAgICAgICAgICAJCQkicGNrZyIsCisgICAgICAgICAgICAgICAgICAgICAgCQlsdl9wY2tnXzFfMCwgCisgICAgICAgICAgICAgICAgICAgICAgCQkiQ3ViZVBhY2thZ2UiKTsKKyAgICAgICAgICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgbGVhdmVSdWxlKCk7IAorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeyAKKyAgICAgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsgCisgICAgICAgICAgICAgICAgYXBwZW5kU2tpcHBlZFRva2VucygpOworICAgICAgICAgICAgfSAKKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIGN1cnJlbnQ7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVDdWJlTW9kZWwiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlQ3ViZVBhY2thZ2UiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMTM6MTogZW50cnlSdWxlQ3ViZVBhY2thZ2UgcmV0dXJucyBbRU9iamVjdCBjdXJyZW50PW51bGxdIDogaXZfcnVsZUN1YmVQYWNrYWdlPSBydWxlQ3ViZVBhY2thZ2UgRU9GIDsKKyAgICBwdWJsaWMgZmluYWwgRU9iamVjdCBlbnRyeVJ1bGVDdWJlUGFja2FnZSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIEVPYmplY3QgY3VycmVudCA9IG51bGw7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N1cnJlbnQgPWl2X3J1bGVDdWJlUGFja2FnZTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVDdWJlUGFja2FnZTE4Nik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVDdWJlUGFja2FnZSIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlQ3ViZVBhY2thZ2UiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMjI6MTogcnVsZUN1YmVQYWNrYWdlIHJldHVybnMgW0VPYmplY3QgY3VycmVudD1udWxsXSA6IChvdGhlcmx2XzA9ICdwYWNrYWdlJyAoIChsdl9uYW1lXzFfMD0gcnVsZVF1YWxpZmllZE5hbWUgKSApIChvdGhlcmx2XzI9ICd7JyAoIChsdl9pbXBvcnRzXzNfMD0gcnVsZUltcG9ydCApICkqICggKGx2X2RpbWVuc2lvbnNfNF8wPSBydWxlQ3ViZURpbWVuc2lvbiApICkqICggKGx2X2N1YmVzXzVfMD0gcnVsZUN1YmVUeXBlICkgKSogb3RoZXJsdl82PSAnfScgKT8gKSA7CisgICAgcHVibGljIGZpbmFsIEVPYmplY3QgcnVsZUN1YmVQYWNrYWdlKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgRU9iamVjdCBjdXJyZW50ID0gbnVsbDsKKworICAgICAgICBUb2tlbiBvdGhlcmx2XzA9bnVsbDsKKyAgICAgICAgVG9rZW4gb3RoZXJsdl8yPW51bGw7CisgICAgICAgIFRva2VuIG90aGVybHZfNj1udWxsOworICAgICAgICBBbnRsckRhdGF0eXBlUnVsZVRva2VuIGx2X25hbWVfMV8wID0gbnVsbDsKKworICAgICAgICBFT2JqZWN0IGx2X2ltcG9ydHNfM18wID0gbnVsbDsKKworICAgICAgICBFT2JqZWN0IGx2X2RpbWVuc2lvbnNfNF8wID0gbnVsbDsKKworICAgICAgICBFT2JqZWN0IGx2X2N1YmVzXzVfMCA9IG51bGw7CisKKworICAgICAgICAgZW50ZXJSdWxlKCk7IAorICAgICAgICAgICAgCisgICAgICAgIHRyeSB7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyNToyODogKCAob3RoZXJsdl8wPSAncGFja2FnZScgKCAobHZfbmFtZV8xXzA9IHJ1bGVRdWFsaWZpZWROYW1lICkgKSAob3RoZXJsdl8yPSAneycgKCAobHZfaW1wb3J0c18zXzA9IHJ1bGVJbXBvcnQgKSApKiAoIChsdl9kaW1lbnNpb25zXzRfMD0gcnVsZUN1YmVEaW1lbnNpb24gKSApKiAoIChsdl9jdWJlc181XzA9IHJ1bGVDdWJlVHlwZSApICkqIG90aGVybHZfNj0gJ30nICk/ICkgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5j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bWUgKQorICAgICAgICAgICAgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMzE6MTogKGx2X25hbWVfMV8wPSBydWxlUXVhbGlmaWVkTmFtZSApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEzMjozOiBsdl9uYW1lXzFfMD0gcnVsZVF1YWxpZmllZE5hbWUKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgIAkgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlUGFja2FnZUFjY2VzcygpLmdldE5hbWVRdWFsaWZpZWROYW1lUGFyc2VyUnVsZUNhbGxfMV8wKCkpOyAKKyAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVRdWFsaWZpZWROYW1lX2luX3J1bGVDdWJlUGFja2FnZTI0NCk7CisgICAgICAgICAgICBsdl9uYW1lXzFfMD1ydWxlUXVhbGlmaWVkTmFtZSgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZVBhY2thZ2VSdWxlKCkpOworICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAJCXNldCgKKyAgICAgICAgICAgICAgICAgICAgIAkJCWN1cnJlbnQsIAorICAgICAgICAgICAgICAgICAgICAgCQkJIm5hbWUiLAorICAgICAgICAgICAgICAgICAgICAgIAkJbHZfbmFtZV8xXzAsIAorICAgICAgICAgICAgICAgICAgICAgIAkJIlF1YWxpZmllZE5hbWUiKTsKKyAgICAgICAgICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE0ODoyOiAob3RoZXJsdl8yPSAneycgKCAobHZfaW1wb3J0c18zXzA9IHJ1bGVJbXBvcnQgKSApKiAoIChsdl9kaW1lbnNpb25zXzRfMD0gcnVsZUN1YmVEaW1lbnNpb24gKSApKiAoIChsdl9jdWJlc181XzA9IHJ1bGVDdWJlVHlwZSApICkqIG90aGVybHZfNj0gJ30nICk/CisgICAgICAgICAgICBpbnQgYWx0ND0yOworICAgICAgICAgICAgaW50IExBNF8wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgIGlmICggKExBNF8wPT0xNCkgKSB7CisgICAgICAgICAgICAgICAgYWx0ND0xOworICAgICAgICAgICAgfQorICAgICAgICAgICAgc3dpdGNoIChhbHQ0KSB7CisgICAgICAgICAgICAgICAgY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNDg6NDogb3RoZXJsdl8yPSAneycgKCAobHZfaW1wb3J0c18zXzA9IHJ1bGVJbXBvcnQgKSApKiAoIChsdl9kaW1lbnNpb25zXzRfMD0gcnVsZUN1YmVEaW1lbnNpb24gKSApKiAoIChsdl9jdWJlc181XzA9IHJ1bGVDdWJlVHlwZSApICkqIG90aGVybHZfNj0gJ30nCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgb3RoZXJsdl8yPShUb2tlbiltYXRjaChpbnB1dCwxNCxGT0xMT1dfMTRfaW5fcnVsZUN1YmVQYWNrYWdlMjU3KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgIAluZXdMZWFmTm9kZShvdGhlcmx2XzIsIGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZVBhY2thZ2VBY2Nlc3MoKS5nZXRMZWZ0Q3VybHlCcmFja2V0S2V5d29yZF8yXzAoKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTUyOjE6ICggKGx2X2ltcG9ydHNfM18wPSBydWxlSW1wb3J0ICkgKSoKKyAgICAgICAgICAgICAgICAgICAgbG9vcDE6CisgICAgICAgICAgICAgICAgICAgIGRvIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGludCBhbHQxPTI7CisgICAgICAgICAgICAgICAgICAgICAgICBpbnQgTEExXzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCAoTEExXzA9PTM3KSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbHQxPTE7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQxKSB7CisgICAgICAgICAgICAgICAgICAgIAljYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTUzOjE6IChsdl9pbXBvcnRzXzNfMD0gcnVsZUltcG9ydCApCisgICAgICAgICAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTUzOjE6IChsdl9pbXBvcnRzXzNfMD0gcnVsZUltcG9ydCApCisgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNTQ6MzogbHZfaW1wb3J0c18zXzA9IHJ1bGVJbXBvcnQKKyAgICAgICAgICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgIAkgICAgICAgCisgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZVBhY2thZ2VBY2Nlc3MoKS5nZXRJbXBvcnRzSW1wb3J0UGFyc2VyUnVsZUNhbGxfMl8xXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAJICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAgICAgICAgIAkgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZUltcG9ydF9pbl9ydWxlQ3ViZVBhY2thZ2UyNzgpOworICAgICAgICAgICAgICAgICAgICAJICAgIGx2X2ltcG9ydHNfM18wPXJ1bGVJbXBvcnQoKTsKKworICAgICAgICAgICAgICAgICAgICAJICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgICAgICAgICAgCSAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAJICAgICAgCSAgICAgICAgaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZVBhY2thZ2VSdWxlKCkpOworICAgICAgICAgICAgICAgICAgICAJICAgICAgCSAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgIAkJYWRkKAorICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgIAkJCWN1cnJlbnQsIAorICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgIAkJCSJpbXBvcnRzIiwKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgICAgCQlsdl9pbXBvcnRzXzNfMCwgCisgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICAgIAkJIkltcG9ydCIpOworICAgICAgICAgICAgICAgICAgICAJICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAgICAgICAJICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgCSAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgICAgICAgICAgCSAgICBicmVhazsKKworICAgICAgICAgICAgICAgICAgICAJZGVmYXVsdCA6CisgICAgICAgICAgICAgICAgICAgIAkgICAgYnJlYWsgbG9vcDE7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKHRydWUpOworCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTcwOjM6ICggKGx2X2RpbWVuc2lvbnNfNF8wPSBydWxlQ3ViZURpbWVuc2lvbiApICkqCisgICAgICAgICAgICAgICAgICAgIGxvb3AyOgorICAgICAgICAgICAgICAgICAgICBkbyB7CisgICAgICAgICAgICAgICAgICAgICAgICBpbnQgYWx0Mj0yOworICAgICAgICAgICAgICAgICAgICAgICAgaW50IExBMl8wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmICggKExBMl8wPT0yMSkgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWx0Mj0xOworICAgICAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoYWx0MikgeworICAgICAgICAgICAgICAgICAgICAJY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE3MToxOiAobHZfZGltZW5zaW9uc180XzA9IHJ1bGVDdWJlRGltZW5zaW9uICkKKyAgICAgICAgICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNzE6MTogKGx2X2RpbWVuc2lvbnNfNF8wPSBydWxlQ3ViZURpbWVuc2lvbiApCisgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNzI6MzogbHZfZGltZW5zaW9uc180XzA9IHJ1bGVDdWJlRGltZW5zaW9uCisgICAgICAgICAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAJICAgICAgIAorICAgICAgICAgICAgICAgICAgICAJICAgICAgCSAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldEN1YmVQYWNrYWdlQWNjZXNzKCkuZ2V0RGltZW5zaW9uc0N1YmVEaW1lbnNpb25QYXJzZXJSdWxlQ2FsbF8yXzJfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgICAgICAgICAgCSAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlQ3ViZURpbWVuc2lvbl9pbl9ydWxlQ3ViZVBhY2thZ2UzMDApOworICAgICAgICAgICAgICAgICAgICAJICAgIGx2X2RpbWVuc2lvbnNfNF8wPXJ1bGVDdWJlRGltZW5zaW9uKCk7CisKKyAgICAgICAgICAgICAgICAgICAgCSAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAgICAgICAgIAkgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudEZvclBhcmVudChncmFtbWFyQWNjZXNzLmdldEN1YmVQYWNrYWdlUnVsZSgpKTsKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgICAJCWFkZCgKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgICAJCQljdXJyZW50LCAKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgICAJCQkiZGltZW5zaW9ucyIsCisgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICAgIAkJbHZfZGltZW5zaW9uc180XzAsIAorICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgICAJCSJDdWJlRGltZW5zaW9uIik7CisgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICAJICAgIH0KKworICAgICAgICAgICAgICAgICAgICAJICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgICAgICAgICAJICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgICAgIAlkZWZhdWx0IDoKKyAgICAgICAgICAgICAgICAgICAgCSAgICBicmVhayBsb29wMjsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAodHJ1ZSk7CisKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxODg6MzogKCAobHZfY3ViZXNfNV8wPSBydWxlQ3ViZVR5cGUgKSApKgorICAgICAgICAgICAgICAgICAgICBsb29wMzoKKyAgICAgICAgICAgICAgICAgICAgZG8geworICAgICAgICAgICAgICAgICAgICAgICAgaW50IGFsdDM9MjsKKyAgICAgICAgICAgICAgICAgICAgICAgIGludCBMQTNfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIChMQTNfMD09MTYpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsdDM9MTsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGFsdDMpIHsKKyAgICAgICAgICAgICAgICAgICAgCWNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxODk6MTogKGx2X2N1YmVzXzVfMD0gcnVsZUN1YmVUeXBlICkKKyAgICAgICAgICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxODk6MTogKGx2X2N1YmVzXzVfMD0gcnVsZUN1YmVUeXBlICkKKyAgICAgICAgICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE5MDozOiBsdl9jdWJlc181XzA9IHJ1bGVDdWJlVHlwZQorICAgICAgICAgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlUGFja2FnZUFjY2VzcygpLmdldEN1YmVzQ3ViZVR5cGVQYXJzZXJSdWxlQ2FsbF8yXzNfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgICAgICAgICAgCSAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlQ3ViZVR5cGVfaW5fcnVsZUN1YmVQYWNrYWdlMzIyKTsKKyAgICAgICAgICAgICAgICAgICAgCSAgICBsdl9jdWJlc181XzA9cnVsZUN1YmVUeXBlKCk7CisKKyAgICAgICAgICAgICAgICAgICAgCSAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAgICAgICAgIAkgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudEZvclBhcmVudChncmFtbWFyQWNjZXNzLmdldEN1YmVQYWNrYWdlUnVsZSgpKTsKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgICAJCWFkZCgKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgICAJCQljdXJyZW50LCAKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgICAJCQkiY3ViZXMiLAorICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgICAJCWx2X2N1YmVzXzVfMCwgCisgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICAgIAkJIkN1YmVUeXBlIik7CisgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICAJICAgIH0KKworICAgICAgICAgICAgICAgICAgICAJICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgICAgICAgICAJICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgICAgIAlkZWZhdWx0IDoKKyAgICAgICAgICAgICAgICAgICAgCSAgICBicmVhayBsb29wMzsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAodHJ1ZSk7CisKKyAgICAgICAgICAgICAgICAgICAgb3RoZXJsdl82PShUb2tlbiltYXRjaChpbnB1dCwxNSxGT0xMT1dfMTVfaW5fcnVsZUN1YmVQYWNrYWdlMzM1KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgIAluZXdMZWFmTm9kZShvdGhlcmx2XzYsIGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZVBhY2thZ2VBY2Nlc3MoKS5nZXRSaWdodEN1cmx5QnJhY2tldEtleXdvcmRfMl80KCkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGxlYXZlUnVsZSgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgf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1bGVDdWJlVHlwZSBFT0YgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMjA6MjogaXZfcnVsZUN1YmVUeXBlPSBydWxlQ3ViZVR5cGUgRU9GCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlVHlwZVJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZUN1YmVUeXBlX2luX2VudHJ5UnVsZUN1YmVUeXBlMzczKTsKKyAgICAgICAgICAgIGl2X3J1bGVDdWJlVHlwZT1ydWxlQ3ViZVR5cGUoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGN1cnJlbnQgPWl2X3J1bGVDdWJlVHlwZTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVDdWJlVHlwZTM4Myk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZS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cmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIzNzozOiBsdl9uYW1lXzFfMD0gUlVMRV9JRAorICAgICAgICAgICAgeworICAgICAgICAgICAgbHZfbmFtZV8xXzA9KFRva2VuKW1hdGNoKGlucHV0LFJVTEVfSUQsRk9MTE9XX1JVTEVfSURfaW5fcnVsZUN1YmVUeXBlNDM3KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAJCQluZXdMZWFmTm9kZShsdl9uYW1lXzFfMCwgZ3JhbW1hckFjY2Vzcy5nZXRDdWJlVHlwZUFjY2VzcygpLmdldE5hbWVJRFRlcm1pbmFsUnVsZUNhbGxfMV8wKCkpOyAKKyAgICAgICAgICAgICAgCQkKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZVR5cGVSdWxlKCkpOworICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAJCXNldFdpdGhMYXN0Q29uc3VtZWQoCisgICAgICAgICAgICAgICAgICAgICAJCQljdXJyZW50LCAKKyAgICAgICAgICAgICAgICAgICAgIAkJCSJuYW1lIiwKKyAgICAgICAgICAgICAgICAgICAgICAJCWx2X25hbWVfMV8wLCAKKyAgICAgICAgICAgICAgICAgICAgICAJCSJJRCIpOworICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1MzoyOiAoICggKGx2X2RlZmF1bHRNZWFzdXJlXzJfMD0gJ2RlZmF1bHRNZWFzdXJlJyApICkgKCAobHZfZGVmYXVsdE1lYXN1cmVWYWx1ZV8zXzA9IFJVTEVfU1RSSU5HICkgKSApPworICAgICAgICAgICAgaW50IGFsdDU9MjsKKyAgICAgICAgICAgIGludCBMQTVfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICBpZiAoIChMQTVfMD09MTcpICkgeworICAgICAgICAgICAgICAgIGFsdDU9MTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHN3aXRjaCAoYWx0NSkgeworICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjUzOjM6ICggKGx2X2RlZmF1bHRNZWFzdXJlXzJfMD0gJ2RlZmF1bHRNZWFzdXJlJyApICkgKCAobHZfZGVmYXVsdE1lYXN1cmVWYWx1ZV8zXzA9IFJVTEVfU1RSSU5HICkgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC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ldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3TGVhZk5vZGUobHZfZGVmYXVsdE1lYXN1cmVfMl8wLCBncmFtbWFyQWNjZXNzLmdldEN1YmVUeXBlQWNjZXNzKCkuZ2V0RGVmYXVsdE1lYXN1cmVEZWZhdWx0TWVhc3VyZUtleXdvcmRfMl8wXzAoKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudChncmFtbWFyQWNjZXNzLmdldEN1YmVUeXBlUnVsZSgpKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJc2V0V2l0aExhc3RDb25zdW1lZChjdXJyZW50LCAiZGVmYXVsdE1lYXN1cmUiLCB0cnVlLCAiZGVmYXVsdE1lYXN1cmUiKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjY4OjI6ICggKGx2X2RlZmF1bHRNZWFzdXJlVmFsdW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AgICAgICAgICAgICAgCQkJbmV3TGVhZk5vZGUobHZfZGVmYXVsdE1lYXN1cmVWYWx1ZV8zXzAsIGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZVR5cGVBY2Nlc3MoKS5nZXREZWZhdWx0TWVhc3VyZVZhbHVlU1RSSU5HVGVybWluYWxSdWxlQ2FsbF8yXzFfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgICAgCQkKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnQoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlVHlwZVJ1bGUoKSk7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCXNldFdpdGhMYXN0Q29uc3VtZWQoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJCWN1cnJlbnQsIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCQkiZGVmYXVsdE1lYXN1cmVWYWx1ZSIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCWx2X2RlZmF1bHRNZWFzdXJlVmFsdWVfM18wLCAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJIlNUUklORyIpOworICAgICAgICAgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIG90aGVybHZfND0oVG9rZW4pbWF0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AkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgIAkJc2V0KAorICAgICAgICAgICAgICAgICAgICAgCQkJY3VycmVudCwgCisgICAgICAgICAgICAgICAgICAgICAJCQkiY3ViZVR5cGVFbnRpdHkiLAorICAgICAgICAgICAgICAgICAgICAgIAkJbHZfY3ViZVR5cGVFbnRpdHlfNV8wLCAKKyAgICAgICAgICAgICAgICAgICAgICAJCSJDdWJlVHlwZUVudGl0eSIpOworICAgICAgICAgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIG90aGVybHZfNj0oVG9rZW4pbWF0Y2goaW5wdXQsMTUsRk9MTE9XXzE1X2luX3J1bGVDdWJlVHlwZTU0Myk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgIAluZXdMZWFmTm9kZShvdGhlcmx2XzYsIGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZVR5cGVBY2Nlc3MoKS5nZXRSaWdodEN1cmx5QnJhY2tldEtleXdvcmRfNSgpKTsKKyAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGxlYXZlUnVsZSgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgI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dGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeyAKKyAgICAgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsgCisgICAgICAgICAgICAgICAgYXBwZW5kU2tpcHBlZFRva2VucygpOworICAgICAgICAgICAgfSAKKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIGN1cnJlbnQ7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZUN1YmVEaW1lbnNpb25Vc2FnZSIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlQ3ViZURpbWVuc2lvblVzYWdlIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzI5OjE6IHJ1bGVDdWJlRGltZW5zaW9uVXNhZ2UgcmV0dXJucyBbRU9iamVjdCBjdXJyZW50PW51bGxdIDogKG90aGVybHZfMD0gJ2RpbWVuc2lvblVzYWdlJyAoIChvdGhlcmx2XzE9IFJVTEVfSUQgKSApIG90aGVybHZfMj0gJ292ZXInICggKCBydWxlTEZRTiApICkgb3RoZXJsdl80PSAnOycgKSA7CisgICAgcHVibGljIGZpbmFsIEVPYmplY3QgcnVsZUN1YmVEaW1lbnNpb25Vc2FnZSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIEVPYmplY3QgY3VycmVudCA9IG51bGw7CisKKyAgICAgICAgVG9rZW4gb3RoZXJsdl8wPW51bGw7CisgICAgICAgIFRva2VuIG90aGVybHZfMT1udWxsOworICAgICAgICBUb2tlbiBvdGhlcmx2XzI9bnVsbDsKKyAgICAgICAgVG9rZW4gb3RoZXJsdl80PW51bGw7CisKKyAgICAgICAgIGVudGVyUnVsZSgpOyAKKyA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Zy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzU1OjE6ICggcnVsZUxGUU4gKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozNTY6MzogcnVsZUxGUU4KKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgIAkJCWlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZURpbWVuc2lvblVzYWdlUnVsZSgpKTsKKyAgICAgICAgICAgICAgCSAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgCSAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldEN1YmVEaW1lbnNpb25Vc2FnZUFjY2VzcygpLmdldE92ZXJWYWx1ZUxFbnRpdHlGZWF0dXJlQ3Jvc3NSZWZlcmVuY2VfM18wKCkpOyAKKyAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVMRlFOX2luX3J1bGVDdWJlRGltZW5zaW9uVXNhZ2U2ODEpOworICAgICAgICAgICAgcnVsZUxGUU4oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIG90aGVybHZfND0oVG9rZW4pbWF0Y2goaW5wdXQsMjAsRk9MTE9XXzIwX2luX3J1bGVDdWJlRGltZW5zaW9uVXNhZ2U2OTMpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl80LCBncmFtbWFyQWNjZXNzLmdldEN1YmVEaW1lbnNpb25Vc2FnZUFjY2VzcygpLmdldFNlbWljb2xvbktleXdvcmRfNCgpKTsKKyAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGxlYXZlUnVsZSgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZ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FsQ3ViZURTTC5nOjM4MzoyOiBpdl9ydWxlQ3ViZURpbWVuc2lvbj0gcnVsZUN1YmVEaW1lbnNpb24gRU9GCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlRGltZW5zaW9uUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlQ3ViZURpbWVuc2lvbl9pbl9lbnRyeVJ1bGVDdWJlRGltZW5zaW9uNzI5KTsKKyAgICAgICAgICAgIGl2X3J1bGVDdWJlRGltZW5zaW9uPXJ1bGVDdWJlRGltZW5zaW9uKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBjdXJyZW50ID1pdl9ydWxlQ3ViZURpbWVuc2lvbjsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVDdWJlRGltZW5zaW9uNzM5KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeyAKKyAgICAgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsgCisgICAgICAgICAgICAgICAgYXBwZW5kU2tpcHBlZFRva2VucygpOworICAgICAgICAgICAgfSAKKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgc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0xBVEFCTEVJRFBhcnNlclJ1bGVDYWxsXzFfMCgpKTsgCisgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlVFJBTlNMQVRBQkxFSURfaW5fcnVsZUN1YmVEaW1lbnNpb243OTcpOworICAgICAgICAgICAgbHZfbmFtZV8xXzA9cnVsZVRSQU5TTEFUQUJMRUlEKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgCSAgICAgICAgaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnRGb3JQYXJlbnQoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlRGltZW5zaW9uUnVsZSgpKTsKKyAgICAgICAgICAgICAgCSAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgCQlzZXQoCisgICAgICAgICAgICAgICAgICAgICAJCQljdXJyZW50LCAKKyAgICAgICAgICAgICAgICAgICAgIAkJCSJuYW1lIiwKKyAgICAgICAgICAgICAgICAgICAgICAJCWx2X25hbWVfMV8wLCAKKyAgICAgICAgICAgICAgICAgICAgICAJCSJUUkFOU0xBVEFCTEVJRCIpOworICAgICAgICAgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQ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AgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGx2X3R5cGVUaW1lXzJfMD0oVG9rZW4pbWF0Y2goaW5wdXQsMjIsRk9MTE9XXzIyX2luX3J1bGVDdWJlRGltZW5zaW9uODE1KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShsdl90eXBlVGltZV8yXzAsIGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZURpbWVuc2lvbkFjY2VzcygpLmdldFR5cGVUaW1lVHlwZVRpbWVLZXl3b3JkXzJfMCgpKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZURpbWVuc2lvblJ1bGUoKSk7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCXNldFdpdGhMYXN0Q29uc3VtZWQoY3VycmVudCwgInR5cGVUaW1lIiwgdHJ1ZSwgInR5cGVUaW1lIik7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgb3RoZXJsdl8zPShUb2tlbiltYXRjaChpbnB1dCwxNCxGT0xMT1dfMTRfaW5fcnVsZUN1YmVEaW1lbnNpb244NDEpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl8zLCBncmFtbWFyQWNjZXNzLmdldEN1YmVEaW1lbnNpb25BY2Nlc3MoKS5nZXRMZWZ0Q3VybHlCcmFja2V0S2V5d29yZF8zKCkpOworICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjQzNToxOiAoIChsdl9oaWVyYXJjaGllc180XzA9IHJ1bGVDdWJlSGllcmFyY2h5ICkgKSoKKyAgICAgICAgICAgIGxvb3A3OgorICAgICAgICAgICAgZG8geworICAgICAgICAgICAgICAgIGludCBhbHQ3PTI7CisgICAgICAgICAgICAgICAgaW50IExBN18wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgICAgICBpZiAoIChMQTdfMD09MjMpICkgeworICAgICAgICAgICAgICAgICAgICBhbHQ3PTE7CisgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICBzd2l0Y2ggKGFsdDcpIHsKKyAgICAgICAgICAgIAljYXNlIDEgOgorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZUR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JlSGllcmFyY2h5KCk7CisKKyAgICAgICAgICAgIAkgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgCSAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZURpbWVuc2lvblJ1bGUoKSk7CisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgfQorICAgICAgICAgICAgCSAgICAgICAgICAgICAJCWFkZCgKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgCQkJY3VycmVudCwgCisgICAgICAgICAgICAJICAgICAgICAgICAgIAkJCSJoaWVyYXJjaGllcyIsCisgICAgICAgICAgICAJICAgICAgICAgICAgICAJCWx2X2hpZXJhcmNoaWVzXzRfMCwgCisgICAgICAgICAgICAJICAgICAgICAgICAgICAJCSJDdWJlSGllcmFyY2h5Iik7CisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgCSAgICAgIAkgICAgCisgICAgICAgICAgICAJICAgIH0KKworICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGJyZWFrOworCisgICAgICAgICAgICAJZGVmYXVsdCA6CisgICAgICAgICAgICAJICAgIGJyZWFrIGxvb3A3OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0gd2hpbGUgKHRydWUpOworCisgICAgICAgICAgICBvdGhlcmx2XzU9KFRva2VuKW1hdGNoKGlucHV0LDE1LEZPTExPV18xNV9pbl9ydWxlQ3ViZURpbWVuc2lvbjg3NSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgIAluZXdMZWFmTm9kZShvdGhlcmx2XzUsIGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZURpbWVuc2lvbkFjY2VzcygpLmdldFJpZ2h0Q3VybHlCcmFja2V0S2V5d29yZF81KCkpOworICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgbGVhdmVSdWxlKCk7IAorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeyAKKyAgICAgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsgCisgICAgICAgICAgICAgICAgYXBwZW5kU2tpcHBlZFRva2VucygpOworICAgICAgICAgICAgfSAKKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIGN1cnJlbnQ7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVDdWJlRGltZW5zaW9uIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZUN1YmVIaWVyYXJjaHkiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo0NjU6MTogZW50cnlSdWxlQ3ViZUhpZXJhcmNoeSByZXR1cm5zIFtFT2JqZWN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1bGVDdWJlSGllcmFyY2h5OTExKTsKKyAgICAgICAgICAgIGl2X3J1bGVDdWJlSGllcmFyY2h5PXJ1bGVDdWJlSGllcmFyY2h5KCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBjdXJyZW50ID1pdl9ydWxlQ3ViZUhpZXJhcmNoeTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVDdWJlSGllcmFyY2h5OTIxKTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeyAKKyAgICAgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsgCisgICAgICAgICAgICAgICAgYXBwZW5kU2tpcHBlZFRva2VucygpOworICAgICAgICAgICAgfSAKKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIGN1cnJlbnQ7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZUN1YmVIaWVyYXJjaHkiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZUN1YmVIaWVyYXJjaHkiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo0NzQ6MTogcnVsZUN1YmVIaWVyYXJjaHkgcmV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NlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NDc4OjI6ICgpCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjQ3OTo1OiAKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgY3VycmVudCA9IGZvcmNlQ3JlYXRlTW9kZWxFbGVtZW50KAorICAgICAgICAgICAgICAgICAgICAgICAgICBncmFtbWFyQWNjZXNzLmdldEN1YmVIaWVyYXJjaHlBY2Nlc3MoKS5nZXRDdWJlSGllcmFyY2h5QWN0aW9uXzAoKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudCk7CisgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBvdGhlcmx2XzE9KFRva2VuKW1hdGNoKGlucHV0LDIzLEZPTExPV18yM19pbl9ydWxlQ3ViZUhpZXJhcmNoeTk2Nyk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgIAluZXdMZWFmTm9kZShvdGhlcmx2XzEsIGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZUhpZXJhcmNoeUFjY2VzcygpLmdldEhpZXJhcmNoeUtleXdvcmRfMSgpKTsKKyAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgfQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54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ybmFsL0ludGVybmFsQ3ViZURTTC5nOjQ5MDozOiBsdl9uYW1lXzJfMD0gcnVsZVRSQU5TTEFUQUJMRUlECisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlSGllcmFyY2h5QWNjZXNzKCkuZ2V0TmFtZVRSQU5TTEFUQUJMRUlEUGFyc2VyUnVsZUNhbGxfMl8wKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVUUkFOU0xBVEFCTEVJRF9pbl9ydWxlQ3ViZUhpZXJhcmNoeTk4OCk7CisgICAgICAgICAgICAgICAgICAgIGx2X25hbWVfMl8wPXJ1bGVUUkFOU0xBVEFCTEVJRCgpOworCisgICAgICAgICAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudEZvclBhcmVudChncmFtbWFyQWNjZXNzLmdldEN1YmVIaWVyYXJjaHlSdWxlKCkpOworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQlzZXQoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJCWN1cnJlbnQsIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCQkibmFtZSIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCWx2X25hbWVfMl8wLCAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJIlRSQU5TTEFUQUJMRUlEIik7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTA2OjM6ICggKGx2X2hhc0FsbF8zXzA9ICdoYXNBbGwnICkgKT8KKyAgICAgICAgICAgIGludCBhbHQ5PTI7CisgICAgICAgICAgICBpbnQgTEE5XzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgaWYgKCAoTEE5XzA9PTI0KSApIHsKKyAgICAgICAgICAgICAgICBhbHQ5PTE7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBzd2l0Y2ggKGFsdDkpIHsKKyAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjUwNzoxOiAobHZfaGFzQWxsXzNfMD0gJ2hhc0FsbCcgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTA3OjE6IChsdl9oYXNBbGxfM18wPSAnaGFzQWxsJyApCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTA4OjM6IGx2X2hhc0FsbF8zXzA9ICdoYXNBbGwnCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgbHZfaGFzQWxsXzNfMD0oVG9rZW4pbWF0Y2goaW5wdXQsMjQsRk9MTE9XXzI0X2luX3J1bGVDdWJlSGllcmFyY2h5MTAwNyk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3TGVhZk5vZGUobHZfaGFzQWxsXzNfMCwgZ3JhbW1hckFjY2Vzcy5nZXRDdWJlSGllcmFyY2h5QWNjZXNzKCkuZ2V0SGFzQWxsSGFzQWxsS2V5d29yZF8zXzAoKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudChncmFtbWFyQWNjZXNzLmdldEN1YmVIaWVyYXJjaHlSdWxlKCkpOworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQlzZXRXaXRoTGFzdENvbnN1bWVkKGN1cnJlbnQsICJoYXNBbGwiLCB0cnVlLCAiaGFzQWxsIik7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo1MjE6MzogKCAoIChsdl9hbGxNZW1iZXJOYW1lXzRfMD0gJ2FsbE1lbWJlck5hbWU9JyApICkgKCAobHZfYWxsTWVtYmVyTmFtZVZhbHVlXzVfMD0gcnVsZVRSQU5TTEFUQUJMRVNUUklORyApICkgKT8KKyAgICAgICAgICAgIGludCBhbHQxMD0yOworICAgICAgICAgICAgaW50IExBMTBfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICBpZiAoIChMQTEwXzA9PTI1KSApIHsKKyAgICAgICAgICAgICAgICBhbHQxMD0xOworICAgICAgICAgICAgfQorICAgICAgICAgICAgc3dpdGNoIChhbHQxMCkgeworICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcH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AgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTIzOjM6IGx2X2FsbE1lbWJlck5hbWVfNF8wPSAnYWxsTWVtYmVyTmFtZT0nCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgbHZfYWxsTWVtYmVyTmFtZV80XzA9KFRva2VuKW1hdGNoKGlucHV0LDI1LEZPTExPV18yNV9pbl9ydWxlQ3ViZUhpZXJhcmNoeTEwNDApOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGx2X2FsbE1lbWJlck5hbWVfNF8wLCBncmFtbWFyQWNjZXNzLmdldEN1YmVIaWVyYXJjaHlBY2Nlc3MoKS5nZXRBbGxNZW1iZXJOYW1lQWxsTWVtYmVyTmFtZUtleXdvcmRfNF8wXzAoKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudChncmFtbWFyQWNjZXNzLmdldEN1YmVIaWVyYXJjaHlSdWxlKCkpOworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgIC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ZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjUzODozOiBsdl9hbGxNZW1iZXJOYW1lVmFsdWVfNV8wPSBydWxlVFJBTlNMQVRBQkxFU1RSSU5HCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlSGllcmFyY2h5QWNjZXNzKCkuZ2V0QWxsTWVtYmVyTmFtZVZhbHVlVFJBTlNMQVRBQkxFU1RSSU5HUGFyc2VyUnVsZUNhbGxfNF8xXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVRSQU5TTEFUQUJMRVNUUklOR19pbl9ydWxlQ3ViZUhpZXJhcmNoeTEwNzQpOworICAgICAgICAgICAgICAgICAgICBsdl9hbGxNZW1iZXJOYW1lVmFsdWVfNV8wPXJ1bGVUUkFOU0xBVEFCTEVTVFJJTkcoKTsKKworICAgICAgICAgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnRGb3JQYXJlbnQoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlSGllcmFyY2h5UnVsZSgpKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJc2V0KAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCQljdXJyZW50LCAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQkJImFsbE1lbWJlck5hbWVWYWx1ZSIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCWx2X2FsbE1lbWJlck5hbWVWYWx1ZV81XzAsIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQkiVFJBTlNMQVRBQkxFU1RSSU5HIik7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTU0OjQ6ICggKCAobHZfZGVmYXVsdE1lbWJlcl82XzA9ICdkZWZhdWx0TWVtYmVyPScgKSApICggKGx2X2RlZmF1bHRNZW1iZXJWYWx1ZV83XzA9IHJ1bGVUUkFOU0xBVEFCTEVTVFJJTkcgKSApICk/CisgICAgICAgICAgICBpbnQgYWx0MTE9MjsKKyAgICAgICAgICAgIGludCBMQT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ICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjU1NToxOiAobHZfZGVmYXVsdE1lbWJlcl82XzA9ICdkZWZhdWx0TWVtYmVyPScgKQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjU1NjozOiBsdl9kZWZhdWx0TWVtYmVyXzZfMD0gJ2RlZmF1bHRNZW1iZXI9JworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGx2X2RlZmF1bHRNZW1iZXJfNl8wPShUb2tlbiltYXRjaChpbnB1dCwyNixGT0xMT1dfMjZfaW5fcnVsZUN1YmVIaWVyYXJjaHkxMDk1KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShsdl9kZWZhdWx0TWVtYmVyXzZfMCwgZ3JhbW1hckFjY2Vzcy5nZXRDdWJlSGllcmFyY2h5QWNjZXNzKCkuZ2V0RGVmYXVsdE1lbWJlckRlZmF1bHRNZW1iZXJLZXl3b3JkXzVfMF8wKCkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnQoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlSGllcmFyY2h5UnVsZSgpKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJc2V0V2l0aExhc3RDb25zdW1lZChjdXJyZW50LCAiZGVmYXVsdE1lbWJlciIsIHRydWUsICJkZWZhdWx0TWVtYmVyPSIpOworICAgICAgICAgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo1Njk6MjogKCAobHZfZGVmYXVsdE1lbWJlclZhbHVlXzdfMD0gcnVsZVRSQU5TTEFUQUJMRVNUUklORyApICkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo1NzA6MTogKGx2X2RlZmF1bHRNZW1iZXJWYWx1ZV83XzA9IHJ1bGVUUkFOU0xBVEFCTEVTVFJJTkcgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NTcwOjE6IChsdl9kZWZhdWx0TWVtYmVyVmFsdWVfN18wPSBydWxlVFJBTlNMQVRBQkxFU1RSSU5HICkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo1NzE6MzogbHZfZGVmYXVsdE1lbWJlclZhbHVlXzdfMD0gcnVsZVRSQU5TTEFUQUJMRVNUUklORworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZUhpZXJhcmNoeUFjY2VzcygpLmdldERlZmF1bHRNZW1iZXJWYWx1ZVRSQU5TTEFUQUJMRVNUUklOR1BhcnNlclJ1bGVDYWxsXzVfMV8wKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVUUkFOU0xBVEFCTEVTVFJJTkdfaW5fcnVsZUN1YmVIaWVyYXJjaHkxMTI5KTsKKyAgICAgICAgICAgICAgICAgICAgbHZfZGVmYXVsdE1lbWJlclZhbHVlXzdfMD1ydWxlVFJBTlNMQVRBQkxFU1RSSU5HKCk7CisKKyAgICAgICAgICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZUhpZXJhcmNoeVJ1bGUoKSk7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCXNldCgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQkJY3VycmVudCwgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJCSJkZWZhdWx0TWVtYmVyVmFsdWUiLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQlsdl9kZWZhdWx0TWVtYmVyVmFsdWVfN18wLCAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJIlRSQU5TTEFUQUJMRVNUUklORyIpOworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBvdGhlcmx2Xzg9KFRva2VuKW1hdGNoKGlucHV0LDE0LEZPTExPV18xNF9pbl9ydWxlQ3ViZUhpZXJhcmNoeTExNDMpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAg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2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo1OTM6MzogbHZfY3ViZURpbUVudGl0eV85XzA9IHJ1bGVDdWJlRGltZW5zaW9uRW50aXR5CisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAJICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZUhpZXJhcmNoeUFjY2VzcygpLmdldEN1YmVEaW1FbnRpdHlDdWJlRGltZW5zaW9uRW50aXR5UGFyc2VyUnVsZUNhbGxfN18wKCkpOyAKKyAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVDdWJlRGltZW5zaW9uRW50aXR5X2luX3J1bGVDdWJlSGllcmFyY2h5MTE2NCk7CisgICAgICAgICAgICBsdl9jdWJlRGltRW50aXR5XzlfMD1ydWxlQ3ViZURpbWVuc2lvbkVudGl0eSgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZUhpZXJhcmNoeVJ1bGUoKSk7CisgICAgICAgICAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgIAkJc2V0KAorICAgICAgICAgICAgICAgICAgICAgCQkJY3VycmVudCwgCisgICAgICAgICAgICAgICAgICAgICAJCQkiY3ViZURpbUVudGl0eSIsCisgICAgICAgICAgICAgICAgICAgICAgCQlsdl9jdWJlRGltRW50aXR5XzlfMCwgCisgICAgICAgICAgICAgICAgICAgICAgCQkiQ3ViZURpbWVuc2lvbkVudGl0eSIpOworICAgICAgICAgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIG90aGVybHZfMTA9KFRva2VuKW1hdGNoKGlucHV0LDE1LEZPTExPV18xNV9pbl9ydWxlQ3ViZUhpZXJhcmNoeTExNzYpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl8xMCwgZ3JhbW1hckFjY2Vzcy5nZXRDdWJlSGllcmFyY2h5QWNjZXNzKCkuZ2V0UmlnaHRDdXJseUJyYWNrZXRLZXl3b3JkXzgoKSk7CisgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBsZWF2ZVJ1bGUoKTsgCisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW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xDdWJlRFNMLmc6NjIzOjI6IGl2X3J1bGVDdWJlRW50aXR5PSBydWxlQ3ViZUVudGl0eSBFT0YKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldEN1YmVFbnRpdHlSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVDdWJlRW50aXR5X2luX2VudHJ5UnVsZUN1YmVFbnRpdHkxMjEyKTsKKyAgICAgICAgICAgIGl2X3J1bGVDdWJlRW50aXR5PXJ1bGVDdWJlRW50aXR5KCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBjdXJyZW50ID1pdl9ydWxlQ3ViZUVudGl0eTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVDdWJlRW50aXR5MTIyMik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVDdWJlRW50aXR5IgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVDdWJlRW50aXR5IgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NjMwOjE6IHJ1bGVDdWJlRW50aXR5IHJldHVybnMgW0VPYmplY3QgY3VycmVudD1udWxsXSA6IChvdGhlcmx2XzA9ICdlbnRpdHknICggKCBydWxlTEZRTiApICkgKCAoIChsdl9rZXlfMl8wPSAna2V5PScgKSApICggKCBydWxlTEZRTiApICkgKT8gKSA7CisgICAgcHVibGljIGZpbmFsIEVPYmplY3QgcnVsZUN1YmVFbnRpdHkoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICBFT2JqZWN0IGN1cnJlbnQgPSBudWxsOworCisgICAgICAgIFRva2VuIG90aGVybHZfMD1udWxsOworICAgICAgICBUb2tlbiBsdl9rZXlfMl8wPW51bGw7CisKKyAgICAgICAgIGVudGVyUnVsZSgpOyAKKyAgICAgICAgICAgIAorICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo2MzM6Mjg6ICggKG90aGVybHZfMD0gJ2VudGl0eScgKCAoIHJ1bGVMRlFOICkgKSAoICggKGx2X2tleV8yXzA9ICdrZXk9JyApICkgKCAoIHJ1bGVMRlFOICkgKSApPyApICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2V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Y3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudChncmFtbWFyQWNjZXNzLmdldEN1YmVFbnRpdHlSdWxlKCkpOworICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAJICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZUVudGl0eUFjY2VzcygpLmdldEVudGl0eVZhbHVlTEVudGl0eUNyb3NzUmVmZXJlbmNlXzFfMCgpKTsgCisgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlTEZRTl9pbl9ydWxlQ3ViZUVudGl0eTEyODIpOworICAgICAgICAgICAgcnVsZUxGUU4oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NjUzOjI6ICggKCAobHZfa2V5XzJfMD0gJ2tleT0nICkgKSAoICggcnVsZUxGUU4gKSApICk/CisgICAgICAgICAgICBpbnQgYWx0MTI9MjsKKyAgICAgICAgICAgIGludCBMQTEyXzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgaWYgKCAoTEExMl8wPT0yOCkgKSB7CisgICAgICAgICAgICAgICAgYWx0MTI9MTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHN3aXRjaCAoYWx0MTIpIHsKKyAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjY1MzozOiAoIChsdl9rZXlfMl8wPSAna2V5PScgKSApICggKCBydWxlTEZRTiApICkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjY1MzozOiAoIChsdl9rZXlfMl8wPSAna2V5PScgKSApCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NjU0OjE6IChsdl9rZXlfMl8wPSAna2V5PScgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NjU0OjE6IChsdl9rZXlfMl8wPSAna2V5PScgKQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjY1NTozOiBsdl9rZXlfMl8wPSAna2V5PScKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBsdl9rZXlfMl8wPShUb2tlbiltYXRjaChpbnB1dCwyOCxGT0xMT1dfMjhfaW5fcnVsZUN1YmVFbnRpdHkxMzAxKTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShsdl9rZXlfMl8wLCBncmFtbWFyQWNjZXNzLmdldEN1YmVFbnRpdHlBY2Nlc3MoKS5nZXRLZXlLZXlLZXl3b3JkXzJfMF8wKCkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnQoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlRW50aXR5UnVsZSgpKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJc2V0V2l0aExhc3RDb25zdW1lZChjdXJyZW50LCAia2V5IiwgdHJ1ZSwgImtleT0iKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NjY4OjI6ICggKCBydWxlTEZRTiApICkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo2Njk6MTogKCBydWxlTEZRTiApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo2Njk6MTogKCBydWxlTEZRTiApCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NjcwOjM6IHJ1bGVMRlFOCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAJCQlpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZUVudGl0eVJ1bGUoKSk7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlRW50aXR5QWNjZXNzKCkuZ2V0S2V5VmFsdWVMRW50aXR5RmVhdHVyZUNyb3NzUmVmZXJlbmNlXzJfMV8wKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVMRlFOX2luX3J1bGVDdWJlRW50aXR5MTMzNyk7CisgICAgICAgICAgICAgICAgICAgIHJ1bGVMRlFOKCk7CisKKyAgICAgICAgICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgbGVhdmVSdWxlKCk7IAorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeyAKKyAgICAgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsgCisgICAgICAgICAgICAgICAgYXBwZW5kU2tpcHBlZFRva2VucygpOworICAgICAgICAgICAgfSAKKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIGN1cnJlbnQ7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVDdWJlRW50aXR5IgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZUN1YmVUeXBlRW50aXR5IgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NjkxOjE6IGVudHJ5UnVsZUN1YmVUeXBlRW50aXR5IHJldHVybnMgW0VPYmplY3QgY3VycmVudD1udWxsXSA6IGl2X3J1bGVDdWJlVHlwZUVudGl0eT0gcnVsZUN1YmVUeXBlRW50aXR5IEVPRiA7CisgICAgcHVibGljIGZpbmFsIEVPYmplY3QgZW50cnlSdWx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nNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgY3VycmVudCA9aXZfcnVsZUN1YmVUeXBlRW50aXR5OyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZUN1YmVUeXBlRW50aXR5MTM4NSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVDdWJlVHlwZUVudGl0eSIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlQ3ViZVR5cGVFbnRpdHkiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo3MDA6MTogcnVsZUN1YmVUeXBlRW50aXR5IHJldHVybnMgW0VPYmplY3QgY3VycmVudD1udWxsXSA6ICggKCAobHZfZW50aXR5UmVmXzBfMD0gcnVsZUN1YmVFbnRpdHkgKSApIG90aGVybHZfMT0gJ3snICggKGx2X2RpbWVuc2lvblVzYWdlc18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PTAgKSB7CisgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgCSAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldEN1YmVUeXBlRW50aXR5QWNjZXNzKCkuZ2V0RW50aXR5UmVmQ3ViZUVudGl0eVBhcnNlclJ1bGVDYWxsXzBfMCgpKTsgCisgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlQ3ViZUVudGl0eV9pbl9ydWxlQ3ViZVR5cGVFbnRpdHkxNDMxKTsKKyAgICAgICAgICAgIGx2X2VudGl0eVJlZl8wXzA9cnVsZUN1YmVFbnRpdHkoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudEZvclBhcmVudChncmFtbWFyQWNjZXNzLmdldEN1YmVUeXBlRW50aXR5UnVsZSgpKTsKKyAgICAgICAgICAgICAgCSAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgCQlzZXQoCisgICAgICAgICAgICAgICAgICAgICAJCQljdXJyZW50LCAKKyAgICAgICAgICAgICAgICAgICAgIAkJCSJlbnRpdHlSZWYiLAorICAgICAgICAgICAgICAgICAgICAgIAkJbHZfZW50aXR5UmVmXzBfMCwgCisgICAgICAgICAgICAgICAgICAgICAgCQkiQ3ViZUVudGl0eSIpOworICAgICAgICAgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIG90aGVybHZfMT0oVG9rZW4pbWF0Y2goaW5wdXQsMTQsRk9MTE9XXzE0X2luX3J1bGVDdWJlVHlwZUVudGl0eTE0NDMpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl8xLCBncmFtbWFyQWNjZXNzLmdldEN1YmVUeXBlRW50aXR5QWNjZXNzKCkuZ2V0TGVmdEN1cmx5QnJhY2tldEtleXdvcmRfMSgpKTsKKyAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgfQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo3MjY6MTogKCAobHZfZGltZW5zaW9uVXNhZ2VzXzJfMD0gcnVsZUN1YmVEaW1lbnNpb25Vc2FnZSApICkqCisgICAgICAgICAgICBsb29wMTM6CisgICAgICAgICAgICBkbyB7CisgICAgICAgICAgICAgICAgaW50IGFsdDEzPTI7CisgICAgICAgICAgICAgICAgaW50IExBMTNfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgaWYgKCAoTEExM18wPT0xOCkgKSB7CisgICAgICAgICAgICAgICAgICAgIGFsdDEzPTE7CisgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICBzd2l0Y2ggKGFsdDEzKSB7CisgICAgICAgICAgICAJY2FzZSAxIDoKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2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GxvdyhGT0xMT1dfcnVsZUN1YmVEaW1lbnNpb25Vc2FnZV9pbl9ydWxlQ3ViZVR5cGVFbnRpdHkxNDY0KTsKKyAgICAgICAgICAgIAkgICAgbHZfZGltZW5zaW9uVXNhZ2VzXzJfMD1ydWxlQ3ViZURpbWVuc2lvblVzYWdlKCk7CisKKyAgICAgICAgICAgIAkgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgCSAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZVR5cGVFbnRpdHlSdWxlKCkpOworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgIAkgICAgICAgICAgICAgCQlhZGQoCisgICAgICAgICAgICAJICAgICAgICAgICAgIAkJCWN1cnJlbnQsIAorICAgICAgICAgICAgCSAgICAgICAgICAgICAJCQkiZGltZW5zaW9uVXNhZ2VzIiwKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIAkJbHZfZGltZW5zaW9uVXNhZ2VzXzJfMCwgCisgICAgICAgICAgICAJICAgICAgICAgICAgICAJCSJDdWJlRGltZW5zaW9uVXNhZ2UiKTsKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAJICAgICAgCSAgICAKKyAgICAgICAgICAgIAkgICAgfQorCisgICAgICAgICAgICAJICAgIH0KKworCisgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgIAkgICAgYnJlYWs7CisKKyAgICAgICAgICAgIAlkZWZhdWx0IDoKKyAgICAgICAgICAgIAkgICAgYnJlYWsgbG9vcDEzOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0gd2hpbGUgKHRydWUpOworCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjc0NDozOiAoIChsdl9tZWFzdXJlc18zXzA9IHJ1bGVDdWJlTWVhc3VyZSApICkqCisgICAgICAgICAgICBsb29wMTQ6CisgICAgICAgICAgICBkbyB7CisgICAgICAgICAgICAgICAgaW50IGFsdDE0PTI7CisgICAgICAgICAgICAgICAgaW50IExBMTRfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgaWYgKCAoTEExNF8wPT0zNSkgKSB7CisgICAgICAgICAgICAgICAgICAgIGFsdDE0PTE7CisgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICBzd2l0Y2ggKGFsdDE0KSB7CisgICAgICAgICAgICAJY2FzZSAxIDoKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo3NDU6MTogKGx2X21lYXN1cmVzXzNfMD0gcnVsZUN1YmVNZWFzdXJlICkKKyAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjc0NToxOiAobHZfbWVhc3VyZXNfM18wPSBydWxlQ3ViZU1lYXN1cmUgKQorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjc0NjozOiBsdl9tZWFzdXJlc18zXzA9IHJ1bGVDdWJlTWVhc3VyZQorICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgCSAgICAgICAKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZVR5cGVFbnRpdHlBY2Nlc3MoKS5nZXRNZWFzdXJlc0N1YmVNZWFzdXJlUGFyc2VyUnVsZUNhbGxfM18wKCkpOyAKKyAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVDdWJlTWVhc3VyZV9pbl9ydWxlQ3ViZVR5cGVFbnRpdHkxNDg2KTsKKyAgICAgICAgICAgIAkgICAgbHZfbWVhc3VyZXNfM18wPXJ1bGVDdWJlTWVhc3VyZSgpOworCisgICAgICAgICAgICAJICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIAkgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudEZvclBhcmVudChncmFtbWFyQWNjZXNzLmdldEN1YmVUeXBlRW50aXR5UnVsZSgpKTsKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAJICAgICAgICAgICAgIAkJYWRkKAorICAgICAgICAgICAgCSAgICAgICAgICAgICAJCQljdXJyZW50LCAKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgCQkJIm1lYXN1cmVzIiwKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIAkJbHZfbWVhc3VyZXNfM18wLCAKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIAkJIkN1YmVNZWFzdXJlIik7CisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgCSAgICAgIAkgICAgCisgICAgICAgICAgICAJICAgIH0KKworICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGJyZWFrOworCisgICAgICAgICAgICAJZGVmYXVsdCA6CisgICAgICAgICAgICAJICAgIGJyZWFrIGxvb3AxNDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9IHdoaWxlICh0cnVlKTsKKworICAgICAgICAgICAgb3RoZXJsdl80PShUb2tlbiltYXRjaChpbnB1dCwxNSxGT0xMT1dfMTVfaW5fcnVsZUN1YmVUeXBlRW50aXR5MTQ5OSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgIAluZXdMZWFmTm9kZShvdGhlcmx2XzQsIGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZVR5cGVFbnRpdHlBY2Nlc3MoKS5nZXRSaWdodEN1cmx5QnJhY2tldEtleXdvcmRfNCgpKTsKKyAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGxlYXZlUnVsZSgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlQ3ViZVR5cGVFbnRpdHkiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlQ3ViZURpbWVuc2lvbkVudGl0eSIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjc3NDoxOiBlbnRyeVJ1bGVDdWJlRGltZW5zaW9uRW50aXR5IHJldHVybnMgW0VPYmplY3QgY3VycmVudD1udWxsXSA6IGl2X3J1bGVDdWJlRGltZW5zaW9uRW50aXR5PSBydWxlQ3ViZURpbWVuc2lvbkVudGl0eSBFT0YgOworICAgIHB1YmxpYyBmaW5hbCBFT2JqZWN0IGVudHJ5UnVsZUN1YmVEaW1lbnNpb25FbnRpdHkoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICBFT2JqZWN0IGN1cnJlbnQgPSBudWxsOworCisgICA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ldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBjdXJyZW50ID1pdl9ydWxlQ3ViZURpbWVuc2lvbkVudGl0eTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVDdWJlRGltZW5zaW9uRW50aXR5MTU0NSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVDdWJlRGltZW5zaW9uRW50aXR5IgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVDdWJlRGltZW5zaW9uRW50aXR5IgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6NzgzOjE6IHJ1bGVDdWJlRGltZW5zaW9uRW50aXR5IHJldHVybnMgW0VPYmplY3QgY3VycmVudD1udWxsXSA6ICggKCkgKCAobHZfZW50aXR5UmVmXzFfMD0gcnVsZUN1YmVFbnRpdHkgKSApIG90aGVybHZfMj0gJ3snICggKGx2X2hpZXJhcmNoTGV2ZWxzXzNfMD0g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bCApICkqICggKGx2X2RpbUVudGl0eV80XzA9IHJ1bGVDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5ICkgKT8gb3RoZXJsdl81PSAnfScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Nzg3OjI6ICgpCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjc4ODo1OiAKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgY3VycmVudCA9IGZvcmNlQ3JlYXRlTW9kZWxFbGVtZW50KAorICAgICAgICAgICAgICAgICAgICAgICAgICBncmFtbWFyQWNjZXNzLmdldEN1YmVEaW1lbnNpb25FbnRpdHlBY2Nlc3MoKS5nZXRDdWJlRGltZW5zaW9uRW50aXR5QWN0aW9uXzAoKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudCk7CisgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjc5MzoyOiAoIChsdl9lbnRpdHlSZWZfMV8wPSBydWxl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V9pbl9ydWxlQ3ViZURpbWVuc2lvbkVudGl0eTE2MDApOworICAgICAgICAgICAgbHZfZW50aXR5UmVmXzFfMD1ydWxlQ3ViZUVudGl0eSgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZURpbWVuc2lvbkVudGl0eVJ1bGUoKSk7CisgICAgICAgICAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgIAkJc2V0KAorICAgICAgICAgICAgICAgICAgICAgCQkJY3VycmVudCwgCisgICAgICAgICAgICAgICAgICAgICAJCQkiZW50aXR5UmVmIiwKKyAgICAgICAgICAgICAgICAgICAgICAJCWx2X2VudGl0eVJlZl8xXzAsIAorICAgICAgICAgICAgICAgICAgICAgIAkJIkN1YmVFbnRpdHkiKTsKKyAgICAgICAgICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBvdGhlcmx2XzI9KFRva2VuKW1hdGNoKGlucHV0LDE0LEZPTExPV18xNF9pbl9ydWxlQ3ViZURpbWVuc2lvbkVudGl0eTE2MTIpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl8yLCBncmFtbWFyQWNjZXNzLmdldEN1YmVEaW1lbnNpb25FbnRpdHlBY2Nlc3MoKS5nZXRMZWZ0Q3VybHlCcmFja2V0S2V5d29yZF8yKCkpOworICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgxNToxOiAoIChsdl9oaWVyYXJjaExldmVsc18zXzA9IHJ1bGVDdWJlTGV2ZWwgKSApKgorICAgICAgICAgICAgbG9vcDE1OgorICAgICAgICAgICAgZG8geworICAgICAgICAgICAgICAgIGludCBhbHQxNT0yOworICAgICAgICAgICAgICAgIGludCBMQTE1XzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgICAgIGlmICggKExBMTVfMD09MjkpICkgeworICAgICAgICAgICAgICAgICAgICBhbHQxNT0xOworICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQxNSkgeworICAgICAgICAgICAgCWNhc2UgMSA6CisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODE2OjE6IChsdl9oaWVyYXJjaExldmVsc18zXzA9IHJ1bGVDdWJlTGV2ZWwgKQorICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZW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AJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZURpbWVuc2lvbkVudGl0eVJ1bGUoKSk7CisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgfQorICAgICAgICAgICAgCSAgICAgICAgICAgICAJCWFkZCgKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgCQkJY3VycmVudCwgCisgICAgICAgICAgICAJICAgICAgICAgICAgIAkJCSJoaWVyYXJjaExldmVscyIsCisgICAgICAgICAgICAJICAgICAgICAgICAgICAJCWx2X2hpZXJhcmNoTGV2ZWxzXzNfMCwgCisgICAgICAgICAgICAJICAgICAgICAgICAgICAJCSJDdWJlTGV2ZWwiKTsKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAJICAgICAgCSAgICAKKyAgICAgICAgICAgIAkgICAgfQorCisgICAgICAgICAgICAJICAgIH0KKworCisgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgIAkgICAgYnJlYWs7CisKKyAgICAgICAgICAgIAlkZWZhdWx0IDoKKyAgICAgICAgICAgIAkgICAgYnJlYWsgbG9vcDE1OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0gd2hpbGUgKHRydWUpOworCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjgzMzozOiAoIChsdl9kaW1FbnRpdHlfNF8wPSBydWxlQ3ViZURpbWVuc2lvbkVudGl0eUVudGl0eSApICk/CisgICAgICAgICAgIC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ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlRGltZW5zaW9uRW50aXR5QWNjZXNzKCkuZ2V0RGltRW50aXR5Q3ViZURpbWVuc2lvbkVudGl0eUVudGl0eVBhcnNlclJ1bGVDYWxsXzRfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlQ3ViZURpbWVuc2lvbkVudGl0eUVudGl0eV9pbl9ydWxlQ3ViZURpbWVuc2lvbkVudGl0eTE2NTUpOworICAgICAgICAgICAgICAgICAgICBsdl9kaW1FbnRpdHlfNF8wPXJ1bGVDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5KCk7CisKKyAgICAgICAgICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZURpbWVuc2lvbkVudGl0eVJ1bGUoKSk7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCXNldCgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQkJY3VycmVudCwgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJCSJkaW1FbnRpdHkiLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQlsdl9kaW1FbnRpdHlfNF8wLCAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJIkN1YmVEaW1lbnNpb25FbnRpdHlFbnRpdHkiKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgb3RoZXJsdl81PShUb2tlbiltYXRjaChpbnB1dCwxNSxGT0xMT1dfMTVfaW5fcnVsZUN1YmVEaW1lbnNpb25FbnRpdHkxNjY4KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgCW5ld0xlYWZOb2RlKG90aGVybHZfNSwgZ3JhbW1hckFjY2Vzcy5nZXRDdWJlRGltZW5zaW9uRW50aXR5QWNjZXNzKCkuZ2V0UmlnaHRDdXJseUJyYWNrZXRLZXl3b3JkXzUoKSk7CisgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBsZWF2ZVJ1bGUoKTsgCisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICA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BtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5MTcxNCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5IgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5IgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6ODcyOjE6IHJ1bGVDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5IHJldHVybnMgW0VPYmplY3QgY3VycmVudD1udWxsXSA6ICggKCkgKCAobHZfZW50aXR5UmVmXzFfMD0gcnVsZUN1YmVFbnRpdHkgKSApIG90aGVybHZfMj0gJ3snIG90aGVybHZfMz0gJ292ZXInICggKCBydWxlTEZRTiApICkgb3RoZXJsdl81PSAnOycgKCAobHZfaGllcmFyY2hMZXZlbHNfNl8wPSBydWxlQ3ViZUxldmVsICkgKSogKCAobHZfZGltRW50aXR5XzdfMD0gcnVsZUN1YmVEaW1lbnNpb25FbnRpdHlFbnRpdHkgKSApPyBvdGhlcmx2Xzg9ICd9JyApIDsKKyAgICBwdWJsaWMgZmluYWwgRU9iamVjdCBydWxlQ3ViZURpbWVuc2lvbkVudGl0eUVudGl0eSgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIEVPYmplY3QgY3VycmVudCA9IG51bGw7CisKKyAgICAgICAgVG9rZW4gb3RoZXJsdl8yPW51bGw7CisgICAgICAgIFRva2VuIG90aGVybHZfMz1udWxsOworICAgICAgICBUb2tlbiBvdGhlcmx2XzU9bnVsbDsKKyAgICAgICAgVG9rZW4gb3RoZXJsdl84PW51bGw7CisgICAgICAgIEVPYmplY3QgbHZfZW50aXR5UmVmXzFfMCA9IG51bGw7CisKKyAgICAgICAgRU9iamVjdCBsdl9oaWVyYXJjaExldmVsc182XzAgPSBudWxsOworCisgICAgICAgIEVPYmplY3QgbHZfZGltRW50aXR5XzdfMCA9IG51bGw7CisKKworICAgICAgICAgZW50ZXJSdWxlKCk7IAorICAgICAgICAgICAgCisgICAgICAgIHRyeSB7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjg3NToyODogKCAoICgpICggKGx2X2VudGl0eVJlZl8xXzA9IHJ1bGVDdWJlRW50aXR5ICkgKSBvdGhlcmx2XzI9ICd7JyBvdGhlcmx2XzM9ICdvdmVyJyAoICggcnVsZUxGUU4gKSApIG90aGVybHZfNT0gJzsnICggKGx2X2hpZXJhcmNoTGV2ZWxzXzZfMD0gcnVsZUN1YmVMZXZlbCApICkqICggKGx2X2RpbUVudGl0eV83XzA9IHJ1bGVDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5ICkgKT8gb3RoZXJsdl84PSAnfScgKSApCisgICAgICAgICAg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gICAgCisgICAgICAgICAgICAgIAkgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5QWNjZXNzKCkuZ2V0RW50aXR5UmVmQ3ViZUVudGl0eVBhcnNlclJ1bGVDYWxsXzFfMCgpKTsgCisgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlQ3ViZUVudGl0eV9pbl9ydWxlQ3ViZURpbWVuc2lvbkVudGl0eUVudGl0eTE3NjkpOworICAgICAgICAgICAgbHZfZW50aXR5UmVmXzFfMD1ydWxlQ3ViZUVudGl0eSgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZURpbWVuc2lvbkVudGl0eUVudGl0eVJ1bGUoKSk7CisgICAgICAgICAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgIAkJc2V0KAorICAgICAgICAgICAgICAgICAgICAgCQkJY3VycmVudCwgCisgICAgICAgICAgICAgICAgICAgICAJCQkiZW50aXR5UmVmIiwKKyAgICAgICAgICAgICAgICAgICAgICAJCWx2X2VudGl0eVJlZl8xXzAsIAorICAgICAgICAgICAgICAgICAgICAgIAkJIkN1YmVFbnRpdHkiKTsKKyAgICAgICAgICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBvdGhlcmx2XzI9KFRva2VuKW1hdGNoKGlucHV0LDE0LEZPTExPV18xNF9pbl9ydWxlQ3ViZURpbWVuc2lvbkVudGl0eUVudGl0eTE3ODEpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl8yLCBncmFtbWFyQWNjZXNzLmdldEN1YmVEaW1lbnNpb25FbnRpdHlFbnRpdHlBY2Nlc3MoKS5nZXRMZWZ0Q3VybHlCcmFja2V0S2V5d29yZF8yKCkpOworICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBvdGhlcmx2XzM9KFRva2VuKW1hdGNoKGlucHV0LDE5LEZPTExPV18xOV9pbl9ydWxlQ3ViZURpbWVuc2lvbkVudGl0eUVudGl0eTE3OTMpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl8zLCBncmFtbWFyQWNjZXNzLmdldEN1YmVEaW1lbnNpb25FbnRpdHlFbnRpdHlBY2Nlc3MoKS5nZXRPdmVyS2V5d29yZF8zKCkpOworICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjkwODoxOiAoICggcnVsZUxGUU4gKSApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjkwOToxOiAoIHJ1bGVMRlFOICkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6OTA5OjE6ICggcnVsZUxGUU4gKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo5MTA6MzogcnVsZUxGUU4KKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgIAkJCWlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZURpbWVuc2lvbkVudGl0eUVudGl0eVJ1bGUoKSk7CisgICAgICAgICAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgIAkgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5QWNjZXNzKCkuZ2V0T3ZlclZhbHVlTEVudGl0eUZlYXR1cmVDcm9zc1JlZmVyZW5jZV80XzAoKSk7IAorICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZUxGUU5faW5fcnVsZUN1YmVEaW1lbnNpb25FbnRpdHlFbnRpdHkxODE2KTsKKyAgICAgICAgICAgIHJ1bGVMRlFOKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBvdGhlcmx2XzU9KFRva2VuKW1hdGNoKGlucHV0LDIwLEZPTExPV18yMF9pbl9ydWxlQ3ViZURpbWVuc2lvbkVudGl0eUVudGl0eTE4MjgpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl81LCBncmFtbWFyQWNjZXNzLmdldEN1YmVEaW1lbnNpb25FbnRpdHlFbnRpdHlBY2Nlc3MoKS5nZXRTZW1pY29sb25LZXl3b3JkXzUoKSk7CisgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zY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zbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6OTI5OjM6IGx2X2hpZXJhcmNoTGV2ZWxzXzZfMD0gcnVsZUN1YmVMZXZlbAorICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgCSAgICAgICAKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZURpbWVuc2lvbkVudGl0eUVudGl0eUFjY2VzcygpLmdldEhpZXJhcmNoTGV2ZWxzQ3ViZUxldmVsUGFyc2VyUnVsZUNhbGxfNl8wKCkpOyAKKyAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVDdWJlTGV2ZWxfaW5fcnVsZUN1YmVEaW1lbnNpb25FbnRpdHlFbnRpdHkxODQ5KTsKKyAgICAgICAgICAgIAkgICAgbHZfaGllcmFyY2hMZXZlbHNfNl8wPXJ1bGVDdWJlTGV2ZWwoKTsKKworICAgICAgICAgICAgCSAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAJICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnRGb3JQYXJlbnQoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5UnVsZSgpKTsKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAJICAgICAgICAgICAgIAkJYWRkKAorICAgICAgICAgICAgCSAgICAgICAgICAgICAJCQljdXJyZW50LCAKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgCQkJImhpZXJhcmNoTGV2ZWxzIiwKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIAkJbHZfaGllcmFyY2hMZXZlbHNfNl8wLCAKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIAkJIkN1YmVMZXZlbCIpOworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgCSAgICB9CisKKyAgICAgICAgICAgIAkgICAgfQorCisKKyAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgCSAgICBicmVhazsKKworICAgICAgICAgICAgCWRlZmF1bHQgOgorICAgICAgICAgICAgCSAgICBicmVhayBsb29wMTc7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfSB3aGlsZSAodHJ1ZSk7CisKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6OTQ1OjM6ICggKGx2X2RpbUVudGl0eV83XzA9IHJ1bGVDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5ICkgKT8KKyAgICAgICAgICAgIGludCBhbHQxOD0yOworICAgICAgICAgICAgaW50IExBMThfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICBpZiAoIChMQTE4XzA9PTI3KSApIHsKKyAgICAgICAgICAgICAgICBhbHQxOD0xOworICAgICAgICAgICAgfQorICAgICAgICAgICAgc3dpdGNoIChhbHQxOCkgeworICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6OTQ2OjE6IChsdl9kaW1FbnRpdHlfN18wPSBydWxlQ3ViZURpbWVuc2lvbkVudGl0eUVudGl0eSApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo5NDY6MTogKGx2X2RpbUVudGl0eV83XzA9IHJ1bGVDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5ICkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzo5NDc6MzogbHZfZGltRW50aXR5XzdfMD0gcnVsZUN1YmVEaW1lbnNpb25FbnRpdHlFbnRpdHkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldEN1YmVEaW1lbnNpb25FbnRpdHlFbnRpdHlBY2Nlc3MoKS5nZXREaW1FbnRpdHlDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5UGFyc2VyUnVsZUNhbGxfN18wKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5X2luX3J1bGVDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5MTg3MSk7CisgICAgICAgICAgICAgICAgICAgIGx2X2RpbUVudGl0eV83XzA9cnVsZUN1YmVEaW1lbnNpb25FbnRpdHlFbnRpdHkoKTsKKworICAgICAgICAgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnRGb3JQYXJlbnQoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5UnVsZSgpKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJc2V0KAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCQljdXJyZW50LCAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQkJImRpbUVudGl0eSIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCWx2X2RpbUVudGl0eV83XzAsIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQkiQ3ViZURpbWVuc2lvbkVudGl0eUVudGl0eSIpOworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBvdGhlcmx2Xzg9KFRva2VuKW1hdGNoKGlucHV0LDE1LEZPTExPV18xNV9pbl9ydWxlQ3ViZURpbWVuc2lvbkVudGl0eUVudGl0eTE4ODQpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl84LCBncmFtbWFyQWNjZXNzLmdldEN1YmVEaW1lbnNpb25FbnRpdHlFbnRpdHlBY2Nlc3MoKS5nZXRSaWdodEN1cmx5QnJhY2tldEtleXdvcmRfOCgpKTsKKyAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGxlYXZlUnVsZSgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5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lTGV2ZWwgRU9GCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTGV2ZWxSdWxlKCkpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVDdWJlTGV2ZWxfaW5fZW50cnlSdWxlQ3ViZUxldmVsMTkyMCk7CisgICAgICAgICAgICBpdl9ydWxlQ3ViZUxldmVsPXJ1bGVDdWJlTGV2ZWwoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGN1cnJlbnQgPWl2X3J1bGVDdWJlTGV2ZWw7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlQ3ViZUxldmVsMTkzMCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVDdWJlTGV2ZWwiCisKKworICAgIC8vICRBTlRMUiBz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VzXzlfMD0gcnVsZUN1YmVMZXZlbFByb3AgKSApKiBvdGhlcmx2XzEwPSAnfScgKSApICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6OTg4OjM6IG90aGVybHZfMD0gJ2xldmVsJyAoIChsdl9uYW1lXzFfMD0gcnVsZVRSQU5TTEFUQUJMRUlEICkgKSBvdGhlcmx2XzI9ICdjb2x1bW49JyAoICggcnVsZUxGUU4gKSApICggKGx2X3VuaXF1ZU1lbWJlcnNfNF8wPSAndW5pcXVlTWVtYmVycycgKSApPyAoICggKGx2X2xldmVsVHlwZV81XzA9ICdsZXZlbFR5cGU9JyApICkgKCAobHZfbGV2ZWxUeXBlVmFsdWVfNl8wPSBydWxlQ3ViZUxldmVsTGV2ZWxUeXBlICkgKSApPyAob3RoZXJsdl83PSAnOycgfCAob3RoZXJsdl84PSAneycgKCAobHZfcHJvcGVydGllc185XzA9IHJ1bGVDdWJlTGV2ZWxQcm9wICkgKSogb3RoZXJsdl8xMD0gJ30nICkgKQorICAgICAgICAgICAgeworICAgICAgICAgICAgb3RoZXJsdl8wPShUb2tlbiltYXRjaChpbnB1dCwyOSxGT0xMT1dfMjlfaW5fcnVsZUN1YmVMZXZlbDE5NjcpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl8wLCBncmFtbWFyQWNjZXNzLmdldEN1YmVMZXZlbEFjY2VzcygpLmdldExldmVsS2V5d29yZF8wKCkpOworICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICAvLyA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VMZXZlbEFjY2VzcygpLmdldE5hbWVUUkFOU0xBVEFCTEVJRFBhcnNlclJ1bGVDYWxsXzFfMCgpKTsgCisgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlVFJBTlNMQVRBQkxFSURfaW5fcnVsZUN1YmVMZXZlbDE5ODgpOworICAgICAgICAgICAgbHZfbmFtZV8xXzA9cnVsZVRSQU5TTEFUQUJMRUlEKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgCSAgICAgICAgaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnRGb3JQYXJlbnQoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTGV2ZWxSdWxlKCkpOworICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAJCXNldCgKKyAgICAgICAgICAgICAgICAgICAgIAkJCWN1cnJlbnQsIAorICAgICAgICAgICAgICAgICAgICAgCQkJIm5hbWUiLAorICAgICAgICAgICAgICAgICAgICAgIAkJbHZfbmFtZV8xXzAsIAorICAgICAgICAgICAgICAgICAgICAgIAkJIlRSQU5TTEFUQUJMRUlEIik7CisgICAgICAgICAgICAgIAkgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgb3RoZXJsdl8yPShUb2tlbiltYXRjaChpbnB1dCwzMCxGT0xMT1dfMzBfaW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6MTAxNjozOiBydWxlTEZRTgorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgCQkJaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnQoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTGV2ZWxSdWxlKCkpOworICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAJICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZUxldmVsQWNjZXNzKCkuZ2V0TGV2ZWxDb2xWYWx1ZUxFbnRpdHlGZWF0dXJlQ3Jvc3NSZWZlcmVuY2VfM18wKCkpOyAKKyAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVMRlFOX2luX3J1bGVDdWJlTGV2ZWwyMDIzKTsKKyAgICAgICAgICAgIHJ1bGVMRlFOKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICAvL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NlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTAzMTozOiBsdl91bmlxdWVNZW1iZXJzXzRfMD0gJ3VuaXF1ZU1lbWJlcnMnCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgbHZfdW5pcXVlTWVtYmVyc180XzA9KFRva2VuKW1hdGNoKGlucHV0LDMxLEZPTExPV18zMV9pbl9ydWxlQ3ViZUxldmVsMjA0MSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3TGVhZk5vZGUobHZfdW5pcXVlTWVtYmVyc180XzAsIGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZUxldmVsQWNjZXNzKCkuZ2V0VW5pcXVlTWVtYmVyc1VuaXF1ZU1lbWJlcnNLZXl3b3JkXzRfMCgpKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZUxldmVsUnVsZSgpKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJc2V0V2l0aExhc3RDb25zdW1lZChjdXJyZW50LCAidW5pcXVlTWVtYmVycyIsIHRydWUsICJ1bmlxdWVNZW1iZXJzIik7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDQ0OjM6ICggKCAobHZfbGV2ZWxUeXBlXzVfMD0gJ2xldmVsVHlwZT0nICkgKSAoIChsdl9sZXZlbFR5cGVWYWx1ZV82XzA9IHJ1bGVDdWJlTGV2ZWxMZXZlbFR5cGUgKSApICk/CisgICAgICAgICAgICBpbnQgYWx0MjA9MjsKKyAgICAgICAgICAgIGludCBMQTIwXzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgaWYgKCAoTEEyMF8wPT0zMikgKSB7CisgICAgICAgICAgICAgICAgYWx0MjA9MTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHN3aXRjaCAoYWx0MjApIHsKKyAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEwNDQ6NDogKCAobHZfbGV2ZWxUeXBlXzVfMD0gJ2xldmVsVHlwZT0nICkgKSAoIChsdl9sZXZlbFR5cGVWYWx1ZV82XzA9IHJ1bGVDdWJlTGV2ZWxMZXZlbFR5cGUgKSApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgIC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xldmVsMjA3NCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3TGVhZk5vZGUobHZfbGV2ZWxUeXBlXzVfMCwgZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTGV2ZWxBY2Nlc3MoKS5nZXRMZXZlbFR5cGVMZXZlbFR5cGVLZXl3b3JkXzVfMF8wKCkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnQoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTGV2ZWxSdWxlKCkpOworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQlzZXRXaXRoTGFzdENvbnN1bWVkKGN1cnJlbnQsICJsZXZlbFR5cGUiLCB0cnVlLCAibGV2ZWxUeXBlPSIpOworICAgICAgICAgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDU5OjI6ICggKGx2X2x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GV2ZWxUeXBlVmFsdWVDdWJlTGV2ZWxMZXZlbFR5cGVFbnVtUnVsZUNhbGxfNV8xXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZUN1YmVMZXZlbExldmVsVHlwZV9pbl9ydWxlQ3ViZUxldmVsMjEwOCk7CisgICAgICAgICAgICAgICAgICAgIGx2X2xldmVsVHlwZVZhbHVlXzZfMD1ydWxlQ3ViZUxldmVsTGV2ZWxUeXBlKCk7CisKKyAgICAgICAgICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZUxldmVsUnVsZSgpKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJc2V0KAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCQljdXJyZW50LCAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQkJImxldmVsVHlwZVZhbHVlIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJbHZfbGV2ZWxUeXBlVmFsdWVfNl8wLCAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJIkN1YmVMZXZlbExldmVsVHlwZSIpOworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEwNzc6NDogKG90aGVybHZfNz0gJzsnIHwgKG90aGVybHZfOD0gJ3snICggKGx2X3Byb3BlcnRpZXNfOV8wPSBydWxlQ3ViZUxldmVsUHJvcCApICkqIG90aGVybHZfMTA9ICd9JyApICkKKyAgICAgICAgICAgIGludCBhbHQyMj0yOworICAgICAgICAgICAgaW50IExBMjJfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICBpZiAoIChMQTIyXzA9PTIwKSApIHsKKyAgICAgICAgICAgICAgICBhbHQyMj0xOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSBpZiAoIChMQTIyXzA9PTE0KSApIHsKKyAgICAgICAgICAgICAgICBhbHQyMj0yOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmJhY2t0cmFja2luZz4wKSB7c3RhdGUuZmFpbGVkPXRydWU7IHJldHVybiBjdXJyZW50O30KKyAgICAgICAgICAgICAgICBOb1ZpYWJsZUFsdEV4Y2VwdGlvbiBudmFlID0KKyAgICAgICAgICAgICAgICAgICAgbmV3IE5vVmlhYmxlQWx0RXhjZXB0aW9uKCIiLCAyMiwgMCwgaW5wdXQpOworCisgICAgICAgICAgICAgICAgdGhyb3cgbnZhZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHN3aXRjaCAoYWx0MjIpIHsKKyAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEwNzc6Njogb3RoZXJsdl83PSAnOycKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBvdGhlcmx2Xzc9KFRva2VuKW1hdGNoKGlucHV0LDIwLEZPTExPV18yMF9pbl9ydWxlQ3ViZUxldmVsMjEyMyk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl83LCBncmFtbWFyQWNjZXNzLmdldEN1YmVMZXZlbEFjY2VzcygpLmdldFNlbWljb2xvbktleXdvcmRfNl8wKCkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSAyIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDgyOjY6IChvdGhlcmx2Xzg9ICd7JyAoIChsdl9wcm9wZXJ0aWVzXzlf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gICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTA4NjoxOiAoIChsdl9wcm9wZXJ0aWVzXzlfMD0gcnVsZUN1YmVMZXZlbFByb3AgKSApKgorICAgICAgICAgICAgICAgICAgICBsb29wMjE6CisgICAgICAgICAgICAgICAgICAgIGRvIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGludCBhbHQyMT0yOworICAgICAgICAgICAgICAgICAgICAgICAgaW50IExBMjFfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIChMQTIxXzA9PTMzKSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbHQyMT0xOworICAgICAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoYWx0MjEpIHsKKyAgICAgICAgICAgICAgICAgICAgCWNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDg3OjE6IChsdl9wcm9wZXJ0aWVzXzlfMD0gcnVsZUN1YmVMZXZlbFByb3AgKQorICAgICAgICAgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEwODc6MTogKGx2X3Byb3BlcnRpZXNfOV8wPSBydWxlQ3ViZUxldmVsUHJvcCApCisgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMDg4OjM6IGx2X3Byb3BlcnRpZXNfOV8wPSBydWxlQ3ViZUxldmVsUHJvcAorICAgICAgICAgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTGV2ZWxBY2Nlc3MoKS5nZXRQcm9wZXJ0aWVzQ3ViZUxldmVsUHJvcFBhcnNlclJ1bGVDYWxsXzZfMV8xXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAJICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAgICAgICAgIAkgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZUN1YmVMZXZlbFByb3BfaW5fcnVsZUN1YmVMZXZlbDIxNjMpOworICAgICAgICAgICAgICAgICAgICAJICAgIGx2X3Byb3BlcnRpZXNfOV8wPXJ1bGVDdWJlTGV2ZWxQcm9wKCk7CisKKyAgICAgICAgICAgICAgICAgICAgCSAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAgICAgICAgIAkgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudEZvclBhcmVudChncmFtbWFyQWNjZXNzLmdldEN1YmVMZXZlbFJ1bGUoKSk7CisgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICAgCQlhZGQoCisgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICAgCQkJY3VycmVudCwgCisgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICAgCQkJInByb3BlcnRpZXMiLAorICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgICAJCWx2X3Byb3BlcnRpZXNfOV8wLCAKKyAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgICAgCQkiQ3ViZUxldmVsUHJvcCIpOworICAgICAgICAgICAgICAgICAgICAJICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAgICAgICAJICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgCSAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgICAgICAgICAgCSAgICBicmVhazsKKworICAgICAgICAgICAgICAgICAgICAJZGVmYXVsdCA6CisgICAgICAgICAgICAgICAgICAgIAkgICAgYnJlYWsgbG9vcDIxOworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICh0cnVlKTsKKworICAgICAgICAgICAgICAgICAgICBvdGhlcmx2XzEwPShUb2tlbiltYXRjaChpbnB1dCwxNSxGT0xMT1dfMTVfaW5fcnVsZUN1YmVMZXZlbDIxNzYpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCW5ld0xlYWZOb2RlKG90aGVybHZfMTAsIGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZUxldmVsQWNjZXNzKCkuZ2V0UmlnaHRDdXJseUJyYWNrZXRLZXl3b3JkXzZfMV8yKCkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGxlYXZlUnVsZSgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlQ3ViZUxldmVsIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZUN1YmVMZXZlbFByb3AiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub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G5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTGV2ZWxQcm9wUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlQ3ViZUxldmVsUHJvcF9pbl9lbnRyeVJ1bGVDdWJlTGV2ZWxQcm9wMjIxNCk7CisgICAgICAgICAgICBpdl9ydWxlQ3ViZUxldmVsUHJvcD1ydWxlQ3ViZUxldmVsUHJvcCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgY3VycmVudCA9aXZfcnVsZUN1YmVMZXZlbFByb3A7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlQ3ViZUxldmVsUHJvcDIyMjQpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gY3VycmVudDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlQ3ViZUxldmVsUHJvcCIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlQ3ViZUxldmVsUHJvcCIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLn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gICAgICAgICAgIAkgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlVFJBTlNMQVRBQkxFSURfaW5fcnVsZUN1YmVMZXZlbFByb3AyMjgyKTsKKyAgICAgICAgICAgIGx2X25hbWVfMV8wPXJ1bGVUUkFOU0xBVEFCTEVJRCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZUxldmVsUHJvcFJ1bGUoKSk7CisgICAgICAgICAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgIAkJc2V0KAorICAgICAgICAgICAgICAgICAgICAgCQkJY3VycmVudCwgCisgICAgICAgICAgICAgICAgICAgICAJCQkibmFtZSIsCisgICAgICAgICAgICAgICAgICAgICAgCQlsdl9uYW1lXzFfMCwgCisgICAgICAgICAgICAgICAgICAgICAgCQkiVFJBTlNMQVRBQkxFSUQiKTsKKyAgICAgICAgICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBvdGhlcmx2XzI9KFRva2VuKW1hdGNoKGlucHV0LDMwLEZPTExPV18zMF9pbl9ydWxlQ3ViZUxldmVsUHJvcDIyOTQpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICA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YWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgIAkJCWlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZUxldmVsUHJvcFJ1bGUoKSk7CisgICAgICAgICAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgIAkgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTGV2ZWxQcm9wQWNjZXNzKCkuZ2V0TGV2ZWxQcm9wQ29sVmFsdWVMRW50aXR5RmVhdHVyZUNyb3NzUmVmZXJlbmNlXzNfMCgpKTsgCisgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlTEZRTl9pbl9ydWxlQ3ViZUxldmVsUHJvcDIzMTcpOworICAgICAgICAgICAgcnVsZUxGUU4oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHN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YnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTE3MToxOiAobHZfdHlwZV80XzA9ICd0eXBlPScgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTE3MToxOiAobHZfdHlwZV80XzA9ICd0eXBlPScgKQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjExNzI6MzogbHZfdHlwZV80XzA9ICd0eXBlPScKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBsdl90eXBlXzRfMD0oVG9rZW4pbWF0Y2goaW5wdXQsMzQsRk9MTE9XXzM0X2luX3J1bGVDdWJlTGV2ZWxQcm9wMjMzNik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3TGVhZk5vZGUobHZfdHlwZV80XzAsIGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZUxldmVsUHJvcEFjY2VzcygpLmdldFR5cGVUeXBlS2V5d29yZF80XzBfMCgpKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZUxldmVsUHJvcFJ1bGUoKSk7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCXNldFdpdGhMYXN0Q29uc3VtZWQoY3VycmVudCwgInR5cGUiLCB0cnVlLCAidHlwZT0iKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTE4NToyOiAoIChsdl90eXBlVmFsdWVfNV8wPSBydWxlQ3ViZUxldmVsUHJvcFR5cGUgKSApCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTE4NjoxOiAobHZfdHlwZVZhbHVlXzVfMD0gcnVsZUN1YmVMZXZlbFByb3BUeXBlICkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjExODY6MTogKGx2X3R5cGVWYWx1ZV81XzA9IHJ1bGVDdWJlTGV2ZWxQcm9wVHlwZSApCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTE4NzozOiBsdl90eXBlVmFsdWVfNV8wPSBydWxlQ3ViZUxldmVsUHJvcFR5cGUKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldEN1YmVMZXZlbFByb3BBY2Nlc3MoKS5nZXRUeXBlVmFsdWVDdWJlTGV2ZWxQcm9wVHlwZUVudW1SdWxlQ2FsbF80XzFfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlQ3ViZUxldmVsUHJvcFR5cGVfaW5fcnVsZUN1YmVMZXZlbFByb3AyMzcwKTsKKyAgICAgICAgICAgICAgICAgICAgbHZfdHlwZVZhbHVlXzVfMD1ydWxlQ3ViZUxldmVsUHJvcFR5cGUoKTsKKworICAgICAgICAgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnRGb3JQYXJlbnQoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTGV2ZWxQcm9wUnVsZSgpKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJc2V0KAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCQljdXJyZW50LCAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQkJInR5cGVWYWx1ZSIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCWx2X3R5cGVWYWx1ZV81XzAsIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQkiQ3ViZUxldmVsUHJvcFR5cGUiKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgb3RoZXJsdl82PShUb2tlbiltYXRjaChpbnB1dCwyMCxGT0xMT1dfMjBfaW5fcnVsZUN1YmVMZXZlbFByb3AyMzg0KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgCW5ld0xlYWZOb2RlKG90aGVybHZfNiwgZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTGV2ZWxQcm9wQWNjZXNzKCkuZ2V0U2VtaWNvbG9uS2V5d29yZF81KCkpOworICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgbGVhdmVSdWxlKCk7IAorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeyAKKyAgICAgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsgCisgICAgICAgICAgICAgICAgYXBwZW5kU2tpcHBlZFRva2VucygpOworICAgICAgICAgICAgfSAKKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIGN1cnJlbnQ7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVDdWJlTGV2ZWxQcm9wIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZUN1YmVNZWFzdXJlIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTIxNToxOiBlbnRyeVJ1bGVDdWJlTWVhc3VyZSByZXR1cm5zIFtFT2JqZWN0IGN1cnJlbnQ9bnVsbF0gOiBpdl9ydWxlQ3ViZU1lYXN1cmU9IHJ1bGVDdWJlTWVhc3VyZSBFT0YgOworICAgIHB1YmxpYyBmaW5hbCBFT2JqZWN0IGVudHJ5UnVsZUN1YmVNZWFzdXJlKCkgdGhyb3dzIFJlY29nbml0aW9uRXh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mICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgY3VycmVudCA9aXZfcnVsZUN1YmVNZWFzdXJlOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZUN1YmVNZWFzdXJlMjQzMCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVDdWJlTWVhc3VyZSIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlQ3ViZU1lYXN1cmUiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMjI0OjE6IHJ1bGVDdWJlTWVhc3VyZSByZXR1cm5zIFtFT2JqZWN0IGN1cnJlbnQ9bnVsbF0gOiAob3RoZXJsdl8wPSAnbWVhc3VyZScgKCAobHZfbmFtZV8xXzA9IHJ1bGVUUkFOU0xBVEFCTEVJRCApICkgKCAobHZfYWdncmVnYXRvcl8yXzA9IHJ1bGVDdWJlQWdncmVnYXRvckVudW0gKSApIG90aGVybHZfMz0gJ2NvbHVtbj0nICggKCBydWxlTEZRTiApIC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gKSB7CisKKyAgICAgICAgICAgICAgCSAgICAgICAgaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnRGb3JQYXJlbnQoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTWVhc3VyZVJ1bGUoKSk7CisgICAgICAgICAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgIAkJc2V0KAorICAgICAgICAgICAgICAgICAgICAgCQkJY3VycmVudCwgCisgICAgICAgICAgICAgICAgICAgICAJCQkibmFtZSIsCisgICAgICAgICAgICAgICAgICAgICAgCQlsdl9uYW1lXzFfMCwgCisgICAgICAgICAgICAgICAgICAgICAgCQkiVFJBTlNMQVRBQkxFSUQiKTsKKyAgICAgICAgICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyNTA6MjogKCAobHZfYWdncmVnYXRvcl8yXzA9IHJ1bGVDdWJlQWdncmVnYXRvckVudW0gKSApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyNTE6MTogKGx2X2FnZ3JlZ2F0b3JfMl8wPSBydWxlQ3ViZUFnZ3JlZ2F0b3JFbn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mVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZU1lYXN1cmVSdWxlKCkpOworICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAJCXNldCgKKyAgICAgICAgICAgICAgICAgICAgIAkJCWN1cnJlbnQsIAorICAgICAgICAgICAgICAgICAgICAgCQkJImFnZ3JlZ2F0b3IiLAorICAgICAgICAgICAgICAgICAgICAgIAkJbHZfYWdncmVnYXRvcl8yXzAsIAorICAgICAgICAgICAgICAgICAgICAgIAkJIkN1YmVBZ2dyZWdhdG9yRW51bSIpOworICAgICAgICAgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIG90aGVybHZfMz0oVG9rZW4pbWF0Y2goaW5wdXQsMzAsRk9MTE9XXzMwX2luX3J1bGVDdWJlTWVhc3VyZTI1MjEpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl8zLCBncmFtbWFyQWNjZXNzLmdldEN1YmVNZWFzdXJlQWNjZXNzKCkuZ2V0Q29sdW1uS2V5d29yZF8zKCkpOworICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEyNzI6MTogKCAoIHJ1bGVMRlFOICkgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMjczOjE6ICggcnVsZUxGUU4gKQorICAgICAgICAgICAgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMjczOjE6ICggcnVsZUxGUU4gKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMjc0OjM6IHJ1bGVMRlFOCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAJCQlpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudChncmFtbWFyQWNjZXNzLmdldEN1YmVNZWFzdXJlUnVsZSgpKTsKKyAgICAgICAgICAgICAgCSAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgCSAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldEN1YmVNZWFzdXJlQWNjZXNzKCkuZ2V0TWVhc3VyZUNvbExFbnRpdHlGZWF0dXJlQ3Jvc3NSZWZlcmVuY2VfNF8wKCkpOyAKKyAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVMRlFOX2luX3J1bGVDdWJlTWVhc3VyZTI1NDQpOworICAgICAgICAgICAgcnVsZUxGUU4oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTI4NzoyOiAoIChsdl9ub3RWaXNpYmxlXzVfMD0gJ25vdFZpc2libGUnICkgKT8KKyAgICAgICAgICAgIGludCBhbHQyND0yOworICAgICAgICAgICAgaW50IExBMjRfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICBpZiAoIChMQTI0XzA9PTM2KSApIHsKKyAgICAgICAgICAgICAgICBhbHQyND0x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AgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGx2X25vdFZpc2libGVfNV8wLCBncmFtbWFyQWNjZXNzLmdldEN1YmVNZWFzdXJlQWNjZXNzKCkuZ2V0Tm90VmlzaWJsZU5vdFZpc2libGVLZXl3b3JkXzVfMCgpKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50KGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZU1lYXN1cmVSdWxlKCkpOworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQlzZXRXaXRoTGFzdENvbnN1bWVkKGN1cnJlbnQsICJub3RWaXNpYmxlIiwgdHJ1ZSwgIm5vdFZpc2libGUiKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBvdGhlcmx2XzY9KFRva2VuKW1hdGNoKGlucHV0LDIwLEZPTExPV18yMF9pbl9ydWxlQ3ViZU1lYXN1cmUyNTg4KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgCW5ld0xlYWZOb2RlKG90aGVybHZfNiwgZ3JhbW1hckFjY2Vzcy5nZXRDdWJlTWVhc3VyZUFjY2VzcygpLmdldFNlbWljb2xvbktleXdvcmRfNigpKTsKKyAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGxlYXZlUnVsZSgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlQ3ViZU1lYXN1cmUiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlSW1wb3J0IgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTMxNDoxOiBlbnRyeVJ1bGVJbXBvcnQgcmV0dXJucyBbRU9iamVjdCBjdXJyZW50PW51bGxdIDogaXZfcnVsZUltcG9ydD0gcnVsZUltcG9ydCBFT0YgOworICAgIHB1YmxpYyBmaW5hbCBFT2JqZWN0IGVudHJ5UnVsZUltcG9ydCgpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIEVPYmplY3QgY3VycmVudCA9IG51bGw7CisKKyAgICAgICAgRU9iamVjdCBpdl9ydWxlSW1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udHJ5UnVsZUltcG9ydDI2MzQpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gY3VycmVudDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlSW1wb3J0IgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVJbXBvcnQiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMzIzOjE6IHJ1bGVJbXBvcnQgcmV0dXJucyBbRU9iamVjdCBjdXJyZW50PW51bGxdIDogKG90aGVybHZfMD0gJ2ltcG9ydCcgKCAobHZfaW1wb3J0ZWROYW1lc3BhY2VfMV8wPSBydWxlQ3ViZVF1YWxpZmllZE5hbWVXaXRoV2lsZENhcmQgKSApIG90aGVybHZfMj0gJzsnICkgOworICAgIHB1YmxpYyBmaW5hbCBFT2JqZWN0IHJ1bGVJbXBvcnQoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICBFT2JqZWN0IGN1cnJlbnQgPSBudWxsOworCisgICAgICAgIFRva2VuIG90aGVybHZfMD1udWxsOworICAgICAgICBUb2tlbiBvdGhlcmx2XzI9bnVsbDsKKyAgICAgICAgQW50bHJEYXRhdHlwZVJ1bGVUb2t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AgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVDdWJlUXVhbGlmaWVkTmFtZVdpdGhXaWxkQ2FyZF9pbl9ydWxlSW1wb3J0MjY5Mik7CisgICAgICAgICAgICBsdl9pbXBvcnRlZE5hbWVzcGFjZV8xXzA9cnVsZUN1YmVRdWFsaWZpZWROYW1lV2l0aFdpbGRDYXJkKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgCSAgICAgICAgaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnRGb3JQYXJlbnQoZ3JhbW1hckFjY2Vzcy5nZXRJbXBvcnRSdWxlKCkpOworICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAJCXNldCgKKyAgICAgICAgICAgICAgICAgICAgIAkJCWN1cnJlbnQsIAorICAgICAgICAgICAgICAgICAgICAgCQkJImltcG9ydGVkTmFtZXNwYWNlIiwKKyAgICAgICAgICAgICAgICAgICAgICAJCWx2X2ltcG9ydGVkTmFtZXNwYWNlXzFfMCwgCisgICAgICAgICAgICAgICAgICAgICAgCQkiQ3ViZVF1YWxpZmllZE5hbWVXaXRoV2lsZENhcmQiKTsKKyAgICAgICAgICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBvdGhlcmx2XzI9KFRva2VuKW1hdGNoKGlucHV0LDIwLEZPTExPV18yMF9pbl9ydWxlSW1wb3J0MjcwNCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgIAluZXdMZWFmTm9kZShvdGhlcmx2XzIsIGdyYW1tYXJBY2Nlc3MuZ2V0SW1wb3J0QWNjZXNzKCkuZ2V0U2VtaWNvbG9uS2V5d29yZF8yKCkpOworICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgbGVhdmVSdWxlKCk7IAorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeyAKKyAgICAgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsgCisgICAgICAgICAgICAgICAgYXBwZW5kU2tpcHBlZFRva2VucygpOworICAgICAgICAgICAgfSAKKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIGN1cnJlbnQ7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVJbXBvcnQiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlQ3ViZVF1YWxpZmllZE5hbWVXaXRoV2lsZENhcmQiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMzYxOjE6IGVudHJ5UnVsZUN1YmVRdWFsaWZpZWROYW1lV2l0aFdpbGRDYXJkIHJldHVybnMgW1N0cmlu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ja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRDdWJlUXVhbGlmaWVkTmFtZVdpdGhXaWxkQ2FyZEFjY2VzcygpLmdldFF1YWxpZmllZE5hbWVQYXJzZXJSdWxlQ2FsbF8wKCkpOyAKKyAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVF1YWxpZmllZE5hbWVfaW5fcnVsZUN1YmVRdWFsaWZpZWROYW1lV2l0aFdpbGRDYXJkMjc5OSk7CisgICAgICAgICAgICB0aGlzX1F1YWxpZmllZE5hbWVfMD1ydWxlUXVhbGlmaWVkTmFtZSgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgIAkJY3VycmVudC5tZXJnZSh0aGlzX1F1YWxpZmllZE5hbWVfMCk7CisgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjEzODU6MTogKGt3PSAnLicga3c9ICcqJyApPworICAgICAgICAgICAgaW50IGFsdDI1PTI7CisgICAgICAgICAgICBpbnQgTEEyNV8wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgIGlmICggKExBMjVfMD09MzgpICkgeworICAgICAgICAgICAgICAgIGFsdDI1PTE7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBzd2l0Y2ggKGFsdDI1KSB7CisgICAgICAgICAgICAgICAgY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxMzg2OjI6IGt3PSAnLicga3c9ICcqJworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGt3PShUb2tlbiltYXRjaChpbnB1dCwzOCxGT0xMT1dfMzhfaW5fcnVsZUN1YmVRdWFsaWZpZWROYW1lV2l0aFdpbGRDYXJkMjgxOCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudC5tZXJnZShrdyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRDdWJlUXVhbGlmaWVkTmFtZVdpdGhXaWxkQ2FyZEFjY2VzcygpLmdldEZ1bGxTdG9wS2V5d29yZF8xXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsMzksRk9MTE9XXzM5X2luX3J1bGVDdWJlUXVhbGlmaWVkTmFtZVdpdGhXaWxkQ2FyZDI4MzEpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQubWVyZ2Uoa3cpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3TGVhZk5vZGUoa3csIGdyYW1tYXJBY2Nlc3MuZ2V0Q3ViZVF1YWxpZmllZE5hbWVXaXRoV2lsZENhcmRBY2Nlc3MoKS5nZXRBc3Rlcmlza0tleXdvcmRfMV8xKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBsZWF2ZVJ1bGUoKTsgCisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gY3VycmVudDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZUN1YmVRdWFsaWZpZWROYW1lV2l0aFdpbGRDYXJkIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZVF1YWxpZmllZE5hbWUiCisgICAgLy8gLi4vb3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2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRRdWFsaWZpZWROYW1lUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlUXVhbGlmaWVkTmFtZV9pbl9lbnRyeVJ1bGVRdWFsaWZpZWROYW1lMjg3NCk7CisgICAgICAgICAgICBpdl9ydWxlUXVhbGlmaWVkTmFtZT1ydWxlUXVhbGlmaWVkTmFtZSgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgY3VycmVudCA9aXZfcnVsZVF1YWxpZmllZE5hbWUuZ2V0VGV4dCgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZVF1YWxpZmllZE5hbWUyODg1KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeyAKKyAgICAgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsgCisgICAgICAgICAgICAgICAgYXBwZW5kU2tpcHBlZFRva2VucygpOworICAgICAgICAgICAgfSAKKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIGN1cnJlbnQ7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZVF1YWxpZmllZE5hbWUiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZVF1YWxpZ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AgICAgICAgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRRdWFsaWZpZWROYW1lQWNjZXNzKCkuZ2V0VmFsaWRJRFBhcnNlclJ1bGVDYWxsXzAoKSk7IAorICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlVmFsaWRJRF9pbl9ydWxlUXVhbGlmaWVkTmFtZTI5MzIpOworICAgICAgICAgICAgdGhpc19WYWxpZElEXzA9cnVsZVZhbGlkSUQoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAJCWN1cnJlbnQubWVyZ2UodGhpc19WYWxpZElEXzApOworICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgfQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNDI5OjE6ICggKCAoICcuJyApPT5rdz0gJy4nICkgdGhpc19WYWxpZElEXzI9IHJ1bGVWYWxpZElEICkqCisgICAgICAgICAgICBsb29wMjY6CisgICAgICAgICAgICBkbyB7CisgICAgICAgICAgICAgICAgaW50IGFsdDI2PTI7CisgICAgICAgICAgICAgICAgaW50IExBMjZfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgaWYgKCAoTEEyNl8wPT0zOCkgKSB7CisgICAgICAgICAgICAgICAgICAgIGludCBMQTI2XzIgPSBpbnB1dC5MQSgyKTsKKworICAgICAgICAgICAgICAgICAgICBpZiAoIChMQTI2XzI9PVJVTEVfSUQpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgaW50IExBMjZfMyA9IGlucHV0LkxBKDMpOworCisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIChzeW5wcmVkMV9JbnRlcm5hbEN1YmVEU0woKSkgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWx0MjY9MTsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICBzd2l0Y2ggKGFsdDI2KSB7CisgICAgICAgICAgICAJY2FzZSAxIDoKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNDI5OjI6ICggKCAnLicgKT0+a3c9ICcuJyApIHRoaXNfVmFsaWRJRF8yPSBydWxlVmFsaWRJRAorICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTQyOToyOiAoICggJy4nICk9Pmt3PSAnLicgKQorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE0Mjk6MzogKCAnLicgKT0+a3c9ICcuJworICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIGt3PShUb2tlbiltYXRjaChpbnB1dCwzOCxGT0xMT1dfMzhfaW5fcnVsZVF1YWxpZmllZE5hbWUyOTYwKTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAJICAgICAgICAgICAgICBjdXJyZW50Lm1lcmdlKGt3KTsKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGt3LCBncmFtbWFyQWNjZXNzLmdldFF1YWxpZmllZE5hbWVBY2Nlc3MoKS5nZXRGdWxsU3RvcEtleXdvcmRfMV8wKCkpOyAKKyAgICAgICAgICAgIAkgICAgICAgICAgCisgICAgICAgICAgICAJICAgIH0KKworICAgICAgICAgICAgCSAgICB9CisKKyAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAJICAgICAgIAorICAgICAgICAgICAgCSAgICAgICAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldFF1YWxpZmllZE5hbWVBY2Nlc3MoKS5nZXRWYWxpZElEUGFyc2VyUnVsZUNhbGxfMV8xKCkpOyAKKyAgICAgICAgICAgIAkgICAgICAgICAgCisgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgIAkgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVZhbGlkSURfaW5fcnVsZVF1YWxpZmllZE5hbWUyOTgzKTsKKyAgICAgICAgICAgIAkgICAgdGhpc19WYWxpZElEXzI9cnVsZVZhbGlkSUQoKTsKKworICAgICAgICAgICAgCSAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAJICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgCSAgICAgIAkJY3VycmVudC5tZXJnZSh0aGlzX1ZhbGlkSURfMik7CisgICAgICAgICAgICAJICAgICAgICAgIAorICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgCSAgICAgICAKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgIAkgICAgICAgICAgCisgICAgICAgICAgICAJICAgIH0KKworICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGJyZWFrOworCisgICAgICAgICAgICAJZGVmYXVsdCA6CisgICAgICAgICAgICAJICAgIGJyZWFrIGxvb3AyNjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9IHdoaWxlICh0cnVlKTsKKworCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGxlYXZlUnVsZSgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAg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VsZVZhbGlkSUQ9IHJ1bGVWYWxpZElEIEVPRgorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0VmFsaWRJRFJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVZhbGlkSURfaW5fZW50cnlSdWxlVmFsaWRJRDMwMzEpOworICAgICAgICAgICAgaXZfcnVsZVZhbGlkSUQ9cnVsZVZhbGlkSUQoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGN1cnJlbnQgPWl2X3J1bGVWYWxpZElELmdldFRleHQoKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVWYWxpZElEMzA0Mik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVWYWxpZElEIgorCisKKyAgICAvLyAkQU5UT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9JRAorICAgICAgICAgICAgeworICAgICAgICAgICAgdGhpc19JRF8wPShUb2tlbiltYXRjaChpbnB1dCxSVUxFX0lELEZPTExPV19SVUxFX0lEX2luX3J1bGVWYWxpZElEMzA4MSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgCQljdXJyZW50Lm1lcmdlKHRoaXNfSURfMCk7CisgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZSh0aGlzX0lEXzAsIGdyYW1tYXJBY2Nlc3MuZ2V0VmFsaWRJREFjY2VzcygpLmdldElEVGVybWluYWxSdWxlQ2FsbCgpKTsgCisgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGxlYXZlUnVsZSgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlVmFsaWRJRCIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVMRlFOIgorICAgIC8vIC4uL29yZy5lY2xpc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ICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZUxGUU5faW5fZW50cnlSdWxlTEZRTjMxMjYpOworICAgICAgICAgICAgaXZfcnVsZUxGUU49cnVsZUxGUU4oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGN1cnJlbnQgPWl2X3J1bGVMRlFOLmdldFRleHQoKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVMRlFOMzEzNyk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVMRlFOIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVMRlFOIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTQ5MzoxOiBydWxlTEZRTiByZXR1cm5zIFtBbnRsckRhdGF0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3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTUwNDoxOiAoa3c9ICcuJyB0aGlzX0lEXzI9IFJVTEVfSUQgKSoKKyAgICAgICAgICAgIGxvb3AyNzoKKyAgICAgICAgICAgIGRvIHsKKyAgICAgICAgICAgICAgICBpbnQgYWx0Mjc9MjsKKyAgICAgICAgICAgICAgICBpbnQgTEEyN18wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgICAgICBpZiAoIChMQTI3XzA9PTM4KSApIHsKKyAgICAgICAgICAgICAgICAgICAgYWx0Mjc9MTsKKyAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgIHN3aXRjaCAoYWx0MjcpIHsKKyAgICAgICAgICAgIAljYXNlIDEgOgorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE1MDU6Mjoga3c9ICcuJyB0aGlzX0lEXzI9IFJVTEVfSUQKKyAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgCSAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsMzgsRk9MTE9XXzM4X2luX3J1bGVMRlFOMzE5Nik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgCSAgICAgICAgICAgICAgY3VycmVudC5tZXJnZShrdyk7CisgICAgICAgICAgICAJICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRMRlFOQWNjZXNzKCkuZ2V0RnVsbFN0b3BLZXl3b3JkXzFfMCgpKTsgCisgICAgICAgICAgICAJICAgICAgICAgIAorICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIHRoaXNfSURfMj0oVG9rZW4pbWF0Y2goaW5wdXQsUlVMRV9JRCxGT0xMT1dfUlVMRV9JRF9pbl9ydWxlTEZRTjMyMTEpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgIAkgICAgICAJCWN1cnJlbnQubWVyZ2UodGhpc19JRF8yKTsKKyAgICAgICAgICAgIAkgICAgICAgICAgCisgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAJICAgICAgIAorICAgICAgICAgICAgCSAgICAgICAgICBuZXdMZWFmTm9kZSh0aGlzX0lEXzIsIGdyYW1tYXJBY2Nlc3MuZ2V0TEZRTkFjY2VzcygpLmdldElEVGVybWluYWxSdWxlQ2FsbF8xXzEoKSk7IAorICAgICAgICAgICAgCSAgICAgICAgICAKKyAgICAgICAgICAgIAkgICAgfQorCisgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgIAkgICAgYnJlYWs7CisKKyAgICAgICAgICAgIAlkZWZhdWx0IDoKKyAgICAgICAgICAgIAkgICAgYnJlYWsgbG9vcDI3OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0gd2hpbGUgKHRydWUpOworCisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgbGVhdmVSdWxlKCk7IAorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAg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AgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gY3VycmVudDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlVFJBTlNMQVRBQkxFSUQiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZVRSQU5TTEFUQUJMRUlEIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTUzNDoxOiBydWxlVFJBTlNMQVRBQkxFSUQgcmV0dXJucyBbQW50bHJEYXRhdHlwZVJ1bGVUb2tlbiBjdXJyZW50PW5ldyBBbnRsckRhdGF0eXBlUnVsZVRva2VuKCldIDogdGhpc19JRF8wPSBSVUxFX0lEIDsKKyAgICBwdWJsaWMgZmluYWwgQW50bHJEYXRhdHlwZVJ1bGVUb2tlbiBydWxlVFJBTlNMQVRBQkxFSUQoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICBBbnRsckRhdGF0eXBlUnVsZVRva2VuIGN1cnJlbnQgPSBuZXcgQW50bHJEYXRhdHlwZVJ1bGVUb2tlbigpOworCisgICAgICAgIFRva2VuIHRoaXNfSURfMD1udWxsOworCisgICAgICAgICBlbnRlclJ1bGUoKTsgCisgICAgICAgICAgICAKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTUzNzoyODogKHRoaXNfSURfMD0gUlVMRV9JRCApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE1Mzg6NTogdGhpc19JRF8wPSBSVUxFX0lECisgICAgICAgICAgICB7CisgICAgICAgICAgICB0aGlzX0lEXzA9KFRva2VuKW1hdGNoKGlucHV0LFJVTEVfSUQsRk9MTE9XX1JVTEVfSURfaW5fcnVsZVRSQU5TTEFUQUJMRUlEMzMwOSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgCQljdXJyZW50Lm1lcmdlKHRoaXNfSURfMCk7CisgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZSh0aGlzX0lEXzAsIGdyYW1tYXJBY2Nlc3MuZ2V0VFJBTlNMQVRBQkxFSURBY2Nlc3MoKS5nZXRJRFRlcm1pbmFsUnVsZUNhbGwoKSk7IAorICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBsZWF2ZVJ1bGUoKTsgCisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gY3VycmVudDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZVRSQU5TTEFUQUJMRUlEIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZVRSQU5TTEFUQUJMRVNUUklORyIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE1NTM6MTogZW50cnlSdWxlVFJBTlNMQVRBQkxFU1RSSU5HIHJldHVybnMgW1N0cmluZyBjdXJyZW50PW51bGxdIDogaXZfcnVsZVRSQU5TTEFUQUJMRVNUUklORz0gcnVsZVRSQU5TTEFUQUJMRVNUUklORyBFT0YgOworICAgIHB1YmxpYyBmaW5hbCBTdHJpbmcgZW50cnlSdWxlVFJBTlNMQVRBQkxFU1RSSU5HKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgU3RyaW5nIGN1cnJlbnQgPSBudWxsOworCisgICAgICAgIEFudGxyRGF0YXR5cGVSdWxlVG9rZW4gaXZfcnVsZVRSQU5TTEFUQUJMRVNUUklORyA9IG51bGw7CisKKworICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2V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lUnVsZVRva2VuKCk7CisKKyAgICAgICAgVG9rZW4gdGhpc19TVFJJTkdfMD1udWxsOworCisgICAgICAgICBlbnRlclJ1bGUoKTsgCisgICAgICAgICAgICAKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTU2NToyODogKHRoaXNfU1RSSU5HXzA9IFJVTEVfU1RSSU5HICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTU2Njo1OiB0aGlzX1NUUklOR18wPSBSVUxFX1NUUklORworICAgICAgICAgICAgeworICAgICAgICAgICAgdGhpc19TVFJJTkdfMD0oVG9rZW4pbWF0Y2goaW5wdXQsUlVMRV9TVFJJTkcsRk9MTE9XX1JVTEVfU1RSSU5HX2luX3J1bGVUUkFOU0xBVEFCTEVTVFJJTkczNDA0KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAJCWN1cnJlbnQubWVyZ2UodGhpc19TVFJJTkdfMCk7CisgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZSh0aGlzX1NUUklOR18wLCBncmFtbWFyQWNjZXNzLmdldFRSQU5TTEFUQUJMRVNUUklOR0FjY2VzcygpLmdldFNUUklOR1Rlcm1pbmFsUnVsZUNhbGwoKSk7IAorICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBsZWF2ZVJ1bGUoKTsgCisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gY3VycmVudDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZVRSQU5TTEFUQUJMRVNUUklORyIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVYQW5ub3RhdGlvbiIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE1ODE6MTogZW50cnlSdWxlWEFubm90YXRpb24gcmV0dXJucyBbRU9iamVjdCBjdXJyZW50PW51bGxdIDogaXZfcnVsZVhBbm5vdGF0aW9uPSBydWxlWEFubm90YXRpb24gRU9GIDsKKyAgICBwdWJsaWMgZmluYWwgRU9iamVjdCBlbnRyeVJ1bGVYQW5ub3RhdGlvbigpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIEVPYmplY3QgY3VycmVudCA9IG51bGw7CisKKyAgICAgICAgRU9iamVjdCBpdl9ydWxlWEFubm90YXRpb24gPSBudWxsOworCisKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTU4MjoyOiAoaXZfcnVsZVhBbm5vdGF0aW9uPSBydWxlWEFubm90YXRpb24gRU9GICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTU4MzoyOiBpdl9ydWxlWEFubm90YXRpb249IHJ1bGVYQW5ub3RhdGlvbiBFT0YKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWEFubm90YXRpb25faW5fZW50cnlSdWxlWEFubm90YXRpb24zNDQ4KTsKKyAgICAgICAgICAgIGl2X3J1bGVYQW5ub3RhdGlvbj1ydWxlWEFubm90YXRpb24oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGN1cnJlbnQgPWl2X3J1bGVYQW5ub3RhdGlvbjsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVYQW5ub3RhdGlvbjM0NTgpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gY3VycmVudDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlWEFubm90YXRpb24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZVhBbm5vdGF0aW9uIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTU5MDoxOiBydWxlWEFubm90YXRpb24gcmV0dXJucyBbRU9iamVjdCBjdXJyZW50PW51bGxdIDogKCAoKSBvdGhlcmx2XzE9ICdAJyAoICggcnVsZVF1YWxpZmllZE5hbWUgKSApICggKCAoICcoJyApPT5vdGhlcmx2XzM9ICcoJyApICggKCAoICggKCAoICggcnVsZVZhbGlkSUQgKSApICc9JyApICk9PiAobHZfZWxlbWVudFZhbHVlUGFpcnNfNF8wPSBydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyICkgKSAob3RoZXJsdl81PSAnLCcgKCAoICggKCAoIHJ1bGVWYWxpZElEICkgKSAnPScgKSApPT4gKG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ywnICggKCAoICggKCBydWxlVmFsaWRJRCApICkgJz0nICkgKT0+IChsdl9lbGVtZW50VmFsdWVQYWlyc182XzA9IHJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZVBhaXIgKSApICkqICkgfCAoIChsdl92YWx1ZV83XzA9IHJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0ICkgKSApPyBvdGhlcmx2Xzg9ICcpJyApPworICAgICAgICAgICAgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNTk0OjI6ICgpCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE1OTU6NTogCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgPSBmb3JjZUNyZWF0ZU1vZGVsRWxlbWVudCgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkFjY2VzcygpLmdldFhBbm5vdGF0aW9uQWN0aW9uXzAoKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudCk7CisgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBvdGhlcmx2XzE9KFRva2VuKW1hdGNoKGlucHV0LDQwLEZPTExPV180MF9pbl9ydWxlWEFubm90Y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bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTYwNjozOiBydWxlUXVhbGlmaWVkTmFtZQorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgCQkJaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnQoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvblJ1bGUoKSk7CisgICAgICAgICAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgIAkgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkFjY2VzcygpLmdldEFubm90YXRpb25UeXBlSnZtQW5ub3RhdGlvblR5cGVDcm9zc1JlZmVyZW5jZV8yXzAoKSk7IAorICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVF1YWxpZmllZE5hbWVfaW5fcnVsZVhBbm5vdGF0aW9uMzUyNyk7CisgICAgICAgICAgICBydWxlUXVhbGlmaWVkTmFtZSgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgIAkgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNjE5OjI6ICggKCAoICcoJyApPT5vdGhlcmx2XzM9ICcoJyApICggKCAoICggKCAoICggcnVsZVZhbGlkSUQgKSApICc9JyApICk9PiAobHZfZWxlbWVudFZhbHVlUGFpcnNfNF8wPSBydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyICkgKSAob3RoZXJsdl81PSAnLCcgKCAoICggKCAoIHJ1bGVWYWxpZElEICkgKSAnPScgKSApPT4gKGx2X2VsZW1lbnRWYWx1ZVBhaXJzXzZfMD0gcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlUGFpciApICkgKSogKSB8ICggKGx2X3ZhbHVlXzdfMD0gcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3QgKSApICk/IG90aGVybHZfOD0gJyknICk/CisgICAgICAgICAgICBpbnQgYWx0MzA9MjsKKyAgICAgICAgICAgIGludCBMQTMwXzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgaWYgKCAoTEEzMF8wPT00MSkgJiYgKHN5bnByZWQyX0ludGVybmFsQ3ViZURTTCgpKSkgeworICAgICAgICAgICAgICAgIGFsdDMwPTE7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBzd2l0Y2ggKGFsdDMwKSB7CisgICAgICAgICAgICAgICAgY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3Bhc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bm5vdGF0aW9uMzU0OCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl8zLCBncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uQWNjZXNzKCkuZ2V0TGVmdFBhcmVudGhlc2lzS2V5d29yZF8zXzAoKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTYyNDoyOiAoICggKCAoICggKCAoIHJ1bGVWYWxpZElEICkgKSAnPScgKSApPT4gKGx2X2VsZW1lbnRWYWx1ZVBhaXJzXzRfMD0gcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlUGFpciApICkgKG90aGVybHZfNT0gJywnICggKCAoICggKCBydWxlVmFsaWRJRCApICkgJz0nICkgKT0+IChsdl9lbGVtZW50VmFsdWVQYWlyc182XzA9IHJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZVBhaXIgKSApICkqICkgfCAoIChsdl92YWx1ZV83XzA9IHJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0ICkgKSApPworICAgICAgICAgICAgICAgICAgICBpbnQgYWx0Mjk9MzsKKyAgICAgICAgICAgICAgICAgICAgYWx0MjkgPSBkZmEyOS5wcmVkaWN0KGlucHV0KTsKKyAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQyOSkgeworICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE2MjQ6MzogKCAoICggKCAoICggcnVsZVZhbGlkSUQgKSApICc9JyApICk9PiAobHZfZWxlbWVudFZhbHVlUGFpcnNfNF8wPSBydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyICkgKSAob3RoZXJsdl81PSAnLCcgKCAoICggKCAoIHJ1bGVWYWxpZElEICkgKSAnPScgKSApPT4gKGx2X2VsZW1lbnRWYWx1ZVBhaXJzXzZfMD0gcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlUGFpciApICkgKSogKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE2MjQ6MzogKCAoICggKCAoICggcnVsZVZhbGlkSUQgKSApICc9JyApICk9PiAobHZfZWxlbWVudFZhbHVlUGFpcnNfNF8wPSBydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyICkgKSAob3RoZXJsdl81PSAnLCcgKCAoICggKCAoIHJ1bGVWYWxpZElEICkgKSAnPScgKSApPT4gKGx2X2VsZW1lbnRWYWx1ZVBhaXJzXzZfMD0gcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlUGFpciApICkgKSogKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4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xlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyICkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNjMwOjE6IChsdl9lbGVtZW50VmFsdWVQYWlyc180XzA9IHJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZVBhaXIgKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTYzMTozOiBsdl9lbGVtZW50VmFsdWVQYWlyc180XzA9IHJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZVBhaXIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0WEFubm90YXRpb25BY2Nlc3MoKS5nZXRFbGVtZW50VmFsdWVQYWlyc1hBbm5vdGF0aW9uRWxlbWVudFZhbHVlUGFpclBhcnNlclJ1bGVDYWxsXzNfMV8wXzBfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyX2luX3J1bGVYQW5ub3RhdGlvbjM1OTIpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGx2X2VsZW1lbnRWYWx1ZVBhaXJzXzRfMD1ydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyKCk7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudEZvclBhcmVudChncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uUnVsZSgpKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCWFkZCgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCQljdXJyZW50LCAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCQkiZWxlbWVudFZhbHVlUGFpcnMiLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCWx2X2VsZW1lbnRWYWx1ZVBhaXJzXzRfMCwgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJIlhBbm5vdGF0aW9uRWxlbWVudFZhbHVlUGFpciIpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTY0NzoyOiAob3RoZXJsdl81PSAnLCcgKCAoICggKCAoIHJ1bGVWYWxpZElEICkgKSAnPScgKSApPT4gKGx2X2VsZW1lbnRWYWx1ZVBhaXJzXzZfMD0gcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlUGFpciApICkgKSoKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb29wMjg6CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8geworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgYWx0Mjg9MjsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IExBMjhfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggKExBMjhfMD09NDIpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWx0Mjg9MTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQyOCkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAljYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNjQ3OjQ6IG90aGVybHZfNT0gJywnICggKCAoICggKCBydWxlVmFsaWRJRCApICkgJz0nICkgKT0+IChsdl9lbGVtZW50VmFsdWVQYWlyc182XzA9IHJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZVBhaXIgKSApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICBvdGhlcmx2XzU9KFRva2VuKW1hdGNoKGlucHV0LDQyLEZPTExPV180Ml9pbl9ydWxlWEFubm90YXRpb24zNjA1KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgCW5ld0xlYWZOb2RlKG90aGVybHZfNSwgZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkFjY2VzcygpLmdldENvbW1hS2V5d29yZF8zXzFfMF8xXzAoKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTY1MToxOiAoICggKCAoICggcnVsZVZhbGlkSUQgKSApICc9JyApICk9PiAobHZfZWxlbWVudFZhbHVlUGFpcnNfNl8wPSBydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyICkgKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNjUxOjI6ICggKCAoICggcnVsZVZhbGlkSUQgKSApICc9JyApICk9PiAobHZfZWxlbWVudFZhbHVlUGFpcnNfNl8wPSBydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyICkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTY1NzoxOiAobHZfZWxlbWVudFZhbHVlUGFpcnNfNl8wPSBydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyICkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTY1ODozOiBsdl9lbGVtZW50VmFsdWVQYWlyc182XzA9IHJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZVBhaXIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkFjY2VzcygpLmdldEVsZW1lbnRWYWx1ZVBhaXJzWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyUGFyc2VyUnVsZUNhbGxfM18xXzBfMV8xXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlUGFpcl9pbl9ydWxlWEFubm90YXRpb24zNjQ2KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIGx2X2VsZW1lbnRWYWx1ZVBhaXJzXzZfMD1ydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyKCk7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgCSAgICAgICAgaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnRGb3JQYXJlbnQoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvblJ1bGUoKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgIAkJYWRkKAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICAgCQkJY3VycmVudCwgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgICAJCQkiZWxlbWVudFZhbHVlUGFpcnMiLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICAgIAkJbHZfZWxlbWVudFZhbHVlUGFpcnNfNl8wLCAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgICAJCSJYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZVBhaXIiKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgfQorCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCWRlZmF1bHQgOgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgYnJlYWsgbG9vcDI4OworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAodHJ1ZSk7CisKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICA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icC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNjc2OjE6IChsdl92YWx1ZV83XzA9IHJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0ICkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE2Nzc6MzogbHZfdmFsdWVfN18wPSBydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVPckNvbW1hTGlzdAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkFjY2VzcygpLmdldFZhbHVlWEFubm90YXRpb25FbGVtZW50VmFsdWVPckNvbW1hTGlzdFBhcnNlclJ1bGVDYWxsXzNfMV8xXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3RfaW5fcnVsZVhBbm5vdGF0aW9uMzY3Nik7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgbHZfdmFsdWVfN18wPXJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0KCk7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudEZvclBhcmVudChncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uUnVsZSgpKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCXNldCgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCQljdXJyZW50LCAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCQkidmFsdWUiLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCWx2X3ZhbHVlXzdfMCwgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJIlhBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3QiKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgb3RoZXJsdl84PShUb2tlbiltYXRjaChpbnB1dCw0MyxGT0xMT1dfNDNfaW5fcnVsZVhBbm5vdGF0aW9uMzY5MCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl84LCBncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uQWNjZXNzKCkuZ2V0UmlnaHRQYXJlbnRoZXNpc0tleXdvcmRfM18yKCkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGxlYXZlUnVsZSgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlWEFubm90YXRpb24iCisKKworICAgIC8vICRBTlRMUiBzd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QvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTcwNzoyOiBpdl9ydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyPSBydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyIEVPRgorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0WEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyX2luX2VudHJ5UnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlUGFpcjM3MjgpOworICAgICAgICAgICAgaXZfcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlUGFpcj1ydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBjdXJyZW50ID1pdl9ydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlUGFpcjM3MzgpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY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b3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNzI1OjM6IHJ1bGVWYWxpZElECisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAJCQlpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudChncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uRWxlbWVudFZhbHVlUGFpclJ1bGUoKSk7CisgICAgICAgICAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgIAkgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZVBhaXJBY2Nlc3MoKS5nZXRFbGVtZW50SnZtT3BlcmF0aW9uQ3Jvc3NSZWZlcmVuY2VfMF8wXzBfMCgpKTsgCisgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlVmFsaWRJRF9pbl9ydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVQYWlyMzgwOCk7CisgICAgICAgICAgICBydWxlVmFsaWRJRCgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgIAkgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgb3RoZXJsdl8xPShUb2tlbiltYXRjaChpbnB1dCw0NCxGT0xMT1dfNDRfaW5fcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlUGFpcjM4MjApOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl8xLCBncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uRWxlbWVudFZhbHVlUGFpckFjY2VzcygpLmdldEVxdWFsc1NpZ25LZXl3b3JkXzBfMF8xKCkpOworICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTc0MjozOiAoIChsdl92YWx1ZV8yXzA9IHJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZSApICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTc0MzoxOiAobHZfdmFsdWVfMl8wPSBydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWUgKQorICAgICAgICAgICAgeworICAg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zdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgCSAgICAgICAgaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnRGb3JQYXJlbnQoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZVBhaXJSdWxlKCkpOworICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAJCXNldCgKKyAgICAgICAgICAgICAgICAgICAgIAkJCWN1cnJlbnQsIAorICAgICAgICAgICAgICAgICAgICAgCQkJInZhbHVlIiwKKyAgICAgICAgICAgICAgICAgICAgICAJCWx2X3ZhbHVlXzJfMCwgCisgICAgICAgICAgICAgICAgICAgICAgCQkiWEFubm90YXRpb25FbGVtZW50VmFsdWUiKTsKKyAgICAgICAgICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgbGVhdmVSdWxlKCk7IAorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeyAKKyAgICAgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsgCisgICAgICAgICAgICAgICAgYXBwZW5kU2tpcHBlZFRva2VucygpOworICAgICAgICAgICAgfSAKKyAgICAgICAgZmluYWxseSB7CisgICAgICA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7CisgICAgICAgICAgICAgICBjdXJyZW50ID1pdl9ydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVPckNvbW1hTGlzdDsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0Mzg4OSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0IgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0IgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTc3NzoxOiBydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVPckNvbW1hTGlzdCByZXR1cm5zIFtFT2JqZWN0IGN1cnJlbnQ9bnVsbF0gOiAoICggKCAoICggKCkgJyMnICdbJyApICk9PiAoICgpIG90aGVybHZfMT0gJyMnIG90aGVybHZfMj0gJ1snICkgKSAoICggKGx2X2VsZW1lbnRzXzNfMD0gcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uICkgKSAob3RoZXJsdl80PSAnLCcgKCAobHZfZWxlbWVudHNfNV8wPSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gKSApICkqICk/IG90aGVybHZfNj0gJ10nICkgfCAodGhpc19YQW5ub3RhdGlvbk9yRXhwcmVzc2lvbl83PSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gKCAoKSAob3RoZXJsdl85PSAnLCcgKCAobHZfZWxlbWVudHNfMTBfMD0gcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uICkgKSApKyApPyApICkgOworICAgIHB1YmxpYyBmaW5hbCBFT2JqZWN0IHJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0KCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgRU9iamVjdCBjdXJyZW50ID0gbnVsbDsKKworICAgICAgICBUb2tlbiBvdGhlcmx2XzE9bnVsbDsKKyAgICAgICAgVG9rZW4gb3RoZXJsdl8yPW51bGw7CisgICAgICAgIFRva2VuIG90aGVybHZfND1udWxsOworICAgICAgICBUb2tlbiBvdGhlcmx2XzY9bnVsbDsKKyAgICAgICAgVG9rZW4gb3RoZXJsdl85PW51bGw7CisgICAgICAgIEVPYmplY3QgbHZfZWxlbWVudHNfM18wID0gbnVsbDsKKworICAgICAgICBFT2JqZWN0IGx2X2VsZW1lbnRzXzVfMCA9IG51bGw7CisKKyAgICAgICAgRU9iamVjdCB0aGlzX1hBbm5vdGF0aW9uT3JFeHByZXNzaW9uXzcgPSBudWxsOworCisgICAgICAgIEVPYmplY3QgbHZfZWxlbWVudHNfMTBfMCA9IG51bGw7CisKKworICAgICAgICAgZW50ZXJSdWxlKCk7IAorICAgICAgICAgICAgCisgICAgICAgIHRyeSB7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNs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3RhdGlvbk9yRXhwcmVzc2lvbl83PSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gKCAoKSAob3RoZXJsdl85PSAnLCcgKCAobHZfZWxlbWVudHNfMTBfMD0gcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uICkgKSApKyApPyApICkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTc4MToxOiAoICggKCAoICggKCkgJyMnICdbJyApICk9PiAoICgpIG90aGVybHZfMT0gJyMnIG90aGVybHZfMj0gJ1snICkgKSAoICggKGx2X2VsZW1lbnRzXzNfMD0gcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uICkgKSAob3RoZXJsdl80PSAnLCcgKCAobHZfZWxlbWVudHNfNV8wPSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gKSApICkqICk/IG90aGVybHZfNj0gJ10nICkgfCAodGhpc19YQW5ub3RhdGlvbk9yRXhwcmVzc2lvbl83PSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gKCAoKSAob3RoZXJsdl85PSAnLCcgKCAobHZfZWxlbWVudHNfMTBfMD0gcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uICkgKSApKyApPyApICkKKyAgICAgICAgICAgIGludCBhbHQzNT0yOworICAgICAgICAgICAgYWx0MzUgPSBkZmEzNS5wcmVkaWN0KGlucHV0KTsKKyAgICAgICAgICAgIHN3aXRjaCAoYWx0MzUpIHsKKyAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2J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Xh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE3ODQ6NjogKCkgb3RoZXJsdl8xPSAnIycgb3RoZXJsdl8yPSAnWycKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE3ODQ6NjogKCkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNzg1OjU6IAorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50ID0gZm9yY2VDcmVhdGVNb2RlbEVsZW1lbnQoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0QWNjZXNzKCkuZ2V0WExpc3RMaXRlcmFsQWN0aW9uXzBfMF8wXzAoKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgb3RoZXJsdl8xPShUb2tlbiltYXRjaChpbnB1dCw0NSxGT0xMT1dfNDVfaW5fcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3QzOTU0KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgIAluZXdMZWFmTm9kZShvdGhlcmx2XzEsIGdyYW1tYXJBY2Nlc3MuZ2V0WEFubm90YXRpb25FbGVtZW50VmFsdWVPckNvbW1hTGlzdEFjY2VzcygpLmdldE51bWJlclNpZ25LZXl3b3JkXzBfMF8wXzEoKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIG90aGVybHZfMj0oVG9rZW4pbWF0Y2goaW5wdXQsNDYsRk9MTE9XXzQ2X2luX3J1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0Mzk2Nik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl8yLCBncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3RBY2Nlc3MoKS5nZXRMZWZ0U3F1YXJlQnJhY2tldEtleXdvcmRfMF8wXzBfMigpKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNzk4OjM6ICggKCAobHZfZWxlbWVudHNfM18wPSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gKSApIChvdGhlcmx2XzQ9ICcsJyAoIChsdl9lbGVtZW50c181XzA9IHJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbiApICkgKSogKT8KKyAgICAgICAgICAgICAgICAgICAgaW50IGFsdDMyPTI7CisgICAgICAgICAgICAgICAgICAgIGludCBMQTMyXzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgICAgICAgICBpZiAoICgoTEEzMl8wPj1SVUxFX0lEICYmIExBMzJfMDw9UlVMRV9ERUNJTUFMKXx8TEEzMl8wPT0xNHx8TEEzMl8wPT0zN3x8KExBMzJfMD49NDAgJiYgTEEzMl8wPD00MSl8fChMQTMyXzA+PTQ1ICYmIExBMzJfMDw9NDYpfHxMQTMyXzA9PTUzfHwoTEEzMl8wPj02OSAmJiBMQTMyXzA8PTcwKXx8TEEzMl8wPT03NHx8TEEzMl8wPT04MXx8TEEzMl8wPT04M3x8KExBMzJfMD49ODcgJiYgTEEzMl8wPD04OSl8fChMQTMyXzA+PTkyICYmIExBMzJfMDw9MTAzKXx8TEEzMl8wPT0xMDUpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgYWx0MzI9MTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGFsdDMyKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTc5ODo0OiAoIChsdl9lbGVtZW50c18zXzA9IHJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbiApICkgKG90aGVybHZfND0gJywnICggKGx2X2VsZW1lbnRzXzVfMD0gcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uICkgKSApKgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE3OTg6NDogKCAobHZfZWxlbWVudHNfM18wPSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gKSApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxNzk5OjE6IChsdl9lbGVtZW50c18zXzA9IHJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbiApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTc5OToxOiAobHZfZWxlbWVudHNfM18wPSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTgwMDozOiBsdl9lbGVtZW50c18zXzA9IHJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0QWNjZXNzKCkuZ2V0RWxlbWVudHNYQW5ub3RhdGlvbk9yRXhwcmVzc2lvblBhcnNlclJ1bGVDYWxsXzBfMV8wXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uX2luX3J1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0Mzk5MCk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgbHZfZWxlbWVudHNfM18wPXJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbigpOworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnRGb3JQYXJlbnQoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0UnVsZSgpKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCWFkZCgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCQljdXJyZW50LCAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCQkiZWxlbWVudHMiLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCWx2X2VsZW1lbnRzXzNfMCwgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJIlhBbm5vdGF0aW9uT3JFeHByZXNzaW9uIik7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxODE2OjI6IChvdGhlcmx2XzQ9ICcsJyAoIChsdl9lbGVtZW50c181XzA9IHJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbiApICkgKSoKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb29wMzE6CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8geworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgYWx0MzE9MjsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IExBMzFfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggKExBMzFfMD09NDIpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWx0MzE9MTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQzMSkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAljYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxODE2OjQ6IG90aGVybHZfND0gJywnICggKGx2X2VsZW1lbnRzXzVfMD0gcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uICkgKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgb3RoZXJsdl80PShUb2tlbiltYXRjaChpbnB1dCw0MixGT0xMT1dfNDJfaW5fcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3Q0MDAzKTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgCW5ld0xlYWZOb2RlKG90aGVybHZfNCwgZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0QWNjZXNzKCkuZ2V0Q29tbWFLZXl3b3JkXzBfMV8xXzAoKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTgyMDoxOiAoIChsdl9lbGVtZW50c181XzA9IHJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbiApICkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTgyMToxOiAobHZfZWxlbWVudHNfNV8wPSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxODIxOjE6IChsdl9lbGVtZW50c181XzA9IHJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbiApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE4MjI6MzogbHZfZWxlbWVudHNfNV8wPSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0QWNjZXNzKCkuZ2V0RWxlbWVudHNYQW5ub3RhdGlvbk9yRXhwcmVzc2lvblBhcnNlclJ1bGVDYWxsXzBfMV8xXzFfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgIAkgICAgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWEFubm90YXRpb25PckV4cHJlc3Npb25faW5fcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3Q0MDI0KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIGx2X2VsZW1lbnRzXzVfMD1ydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24oKTsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudEZvclBhcmVudChncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3RSdWxlKCkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgICAJCWFkZCgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgIAkJCWN1cnJlbnQsIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICAgCQkJImVsZW1lbnRzIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgICAJCWx2X2VsZW1lbnRzXzVfMCwgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgICAgCQkiWEFubm90YXRpb25PckV4cHJlc3Npb24iKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgfQorCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCWRlZmF1bHQgOgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgYnJlYWsgbG9vcDMxOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAodHJ1ZSk7CisKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgb3RoZXJsdl82PShUb2tlbiltYXRjaChpbnB1dCw0NyxGT0xMT1dfNDdfaW5fcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3Q0MDQwKTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgIAluZXdMZWFmTm9kZShvdGhlcmx2XzYsIGdyYW1tYXJBY2Nlc3MuZ2V0WEFubm90YXRpb25FbGVtZW50VmFsdWVPckNvbW1hTGlzdEFjY2VzcygpLmdldFJpZ2h0U3F1YXJlQnJhY2tldEtleXdvcmRfMF8yKCkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKy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xlWEFubm90YXRpb25PckV4cHJlc3Npb24gKCAoKSAob3RoZXJsdl85PSAnLCcgKCAobHZfZWxlbWVudHNfMTBfMD0gcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uICkgKSApKyApPworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0QWNjZXNzKCkuZ2V0WEFubm90YXRpb25PckV4cHJlc3Npb25QYXJzZXJSdWxlQ2FsbF8xXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWEFubm90YXRpb25PckV4cHJlc3Npb25faW5fcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3Q0MDcwKTsKKyAgICAgICAgICAgICAgICAgICAgdGhpc19YQW5ub3RhdGlvbk9yRXhwcmVzc2lvbl83PXJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbigpOworCisgICAgICAgICAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgPSB0aGlzX1hBbm5vdGF0aW9uT3JFeHByZXNzaW9uXzc7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE4NTI6MTogKCAoKSAob3RoZXJsdl85PSAnLCcgKCAobHZfZWxlbWVudHNfMTBfMD0gcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uICkgKSApKyApPworICAgICAgICAgICAgICAgICAgICBpbnQgYWx0MzQ9MjsKKyAgICAgICAgICAgICAgICAgICAgaW50IExBMzRfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgICAgIGlmICggKExBMzRfMD09NDIpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgYWx0MzQ9MTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGFsdDM0KSB7CisgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTg1MjoyOiAoKSAob3RoZXJsdl85PSAnLCcgKCAobHZfZWxlbWVudHNfMTBfMD0gcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uICkgKSApKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE4NTI6MjogKCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE4NTM6NTogCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgPSBmb3JjZUNyZWF0ZU1vZGVsRWxlbWVudEFuZEFkZCgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdyYW1tYXJBY2Nlc3MuZ2V0WEFubm90YXRpb25FbGVtZW50VmFsdWVPckNvbW1hTGlzdEFjY2VzcygpLmdldFhMaXN0TGl0ZXJhbEVsZW1lbnRzQWN0aW9uXzFfMV8wKCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE4NTg6MjogKG90aGVybHZfOT0gJywnICggKGx2X2VsZW1lbnRzXzEwXzA9IHJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbiApICkgKSsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgY250MzM9MDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb29wMzM6CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8geworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgYWx0MzM9MjsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IExBMzNfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggKExBMzNfMD09NDIpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWx0MzM9MTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQzMykgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAljYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxODU4OjQ6IG90aGVybHZfOT0gJywnICggKGx2X2VsZW1lbnRzXzEwXzA9IHJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbiApICkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIG90aGVybHZfOT0oVG9rZW4pbWF0Y2goaW5wdXQsNDIsRk9MTE9XXzQyX2luX3J1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZU9yQ29tbWFMaXN0NDA5Mik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgIAluZXdMZWFmTm9kZShvdGhlcmx2XzksIGdyYW1tYXJBY2Nlc3MuZ2V0WEFubm90YXRpb25FbGVtZW50VmFsdWVPckNvbW1hTGlzdEFjY2VzcygpLmdldENvbW1hS2V5d29yZF8xXzFfMV8wKCkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE4NjI6MTogKCAobHZfZWxlbWVudHNfMTBfMD0gcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uICkgKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxODYzOjE6IChsdl9lbGVtZW50c18xMF8wPSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxODYzOjE6IChsdl9lbGVtZW50c18xMF8wPSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxODY0OjM6IGx2X2VsZW1lbnRzXzEwXzA9IHJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgCSAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3RBY2Nlc3MoKS5nZXRFbGVtZW50c1hBbm5vdGF0aW9uT3JFeHByZXNzaW9uUGFyc2VyUnVsZUNhbGxfMV8xXzFfMV8wKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbl9pbl9ydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWVPckNvbW1hTGlzdDQxMTMpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgbHZfZWxlbWVudHNfMTBfMD1ydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24oKTsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudEZvclBhcmVudChncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uRWxlbWVudFZhbHVlT3JDb21tYUxpc3RSdWxlKCkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgICAJCWFkZCgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgIAkJCWN1cnJlbnQsIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICAgCQkJImVsZW1lbnRzIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgICAJCWx2X2VsZW1lbnRzXzEwXzAsIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICAgIAkJIlhBbm5vdGF0aW9uT3JFeHByZXNzaW9uIik7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIH0KKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICBicmVhazsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAlkZWZhdWx0IDoKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIGlmICggY250MzMgPj0gMSApIGJyZWFrIGxvb3AzMzsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIGlmIChzdGF0ZS5iYWNrdHJhY2tpbmc+MCkge3N0YXRlLmZhaWxlZD10cnVlOyByZXR1cm4gY3VycmVudDt9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRWFybHlFeGl0RXhjZXB0aW9uIGVlZSA9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ldyBFYXJseUV4aXRFeGNlcHRpb24oMzMsIGlucHV0KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBlZWU7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY250MzMrKzsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICh0cnVlKTsKKworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICA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pOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgY3VycmVudCA9aXZfcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlNDE2NCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZSIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWUiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxODk3OjE6IHJ1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZSByZXR1cm5zIFtFT2JqZWN0IGN1cnJlbnQ9bnVsbF0gOiAoICggKCAoICggKCkgJyMnICdbJyApICk9PiAoICgpIG90aGVybHZfMT0gJyMnIG90aGVybHZfMj0gJ1snICkgKSAoICggKGx2X2VsZW1lbnRzXzNfMD0gcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uICkgKSAob3RoZXJsdl80PSAnLCcgKCAobHZfZWxlbWVudHNfNV8wPSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gKSApICkqICk/IG90aGVybHZfNj0gJ10nICkgfCB0aGlzX1hBbm5vdGF0aW9uT3JFeHByZXNzaW9uXzc9IHJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbiApIDsKKyAgICBwdWJsaWMgZmluYWwgRU9iamVjdCBydWxlWEFubm90YXRpb25FbGVtZW50VmFsdWUoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICBFT2JqZWN0IGN1cnJlbnQgPSBudWxsOworCisgICAgICAgIFRva2VuIG90aGVybHZfMT1udWxsOworICAgICAgICBUb2tlbiBvdGhlcmx2XzI9bnVsbDsKKyAgICAgICAgVG9rZW4gb3RoZXJsdl80PW51bGw7CisgICAgICAgIFRva2VuIG90aGVybHZfNj1udWxsOworICAgICAgICBFT2JqZWN0IGx2X2VsZW1lbnRzXzNfMCA9IG51bGw7CisKKyAgICAgICAgRU9iamVjdCBsdl9lbGVtZW50c181XzAgPSBudWxsOworCisgICAgICAgIEVPYmplY3QgdGhpc19YQW5ub3RhdGlvbk9yRXhwcmVzc2lvbl83ID0gbnVsbDsKKworCisgICAgICAgICBlbnRlclJ1bGUoKTsgCisgICAgICAgICAgICAKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTkwMDoyODogKC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6MTogKCAoICggKCAoICgpICcjJyAnWycgKSApPT4gKCAoKSBvdGhlcmx2XzE9ICcjJyBvdGhlcmx2XzI9ICdbJyApICkgKCAoIChsdl9lbGVtZW50c18zXzA9IHJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbiApICkgKG90aGVybHZfND0gJywnICggKGx2X2VsZW1lbnRzXzVfMD0gcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uICkgKSApKiApPyBvdGhlcmx2XzY9ICddJyApIHwgdGhpc19YQW5ub3RhdGlvbk9yRXhwcmVzc2lvbl83PSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gKQorICAgICAgICAgICAgaW50IGFsdDM4PTI7CisgICAgICAgICAgICBhbHQzOCA9IGRmYTM4LnByZWRpY3QoaW5wdXQpOworICAgICAgICAgICAgc3dpdGNoIChhbHQzOCkgeworICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTkwMToyOiAoICggKCAoICgpICcjJyAnWycgKSApPT4gKCAoKSBvdGhlcmx2XzE9ICcjJyBvdGhlcmx2XzI9ICdbJyApICkgKCAoIChsdl9lbGVtZW50c18zXzA9IHJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbiApICkgKG90aGVybHZfND0gJywnICggKGx2X2VsZW1lbnRzXzVfMD0gcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uICkgKSApKiApPyBvdGhlcmx2XzY9ICddJyApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2Vj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c3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE5MDU6NTogCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgPSBmb3JjZUNyZWF0ZU1vZGVsRWxlbWVudCgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uRWxlbWVudFZhbHVlQWNjZXNzKCkuZ2V0WExpc3RMaXRlcmFsQWN0aW9uXzBfMF8wXzAoKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgb3RoZXJsdl8xPShUb2tlbiltYXRjaChpbnB1dCw0NSxGT0xMT1dfNDVfaW5fcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlNDIyOSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl8xLCBncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uRWxlbWVudFZhbHVlQWNjZXNzKCkuZ2V0TnVtYmVyU2lnbktleXdvcmRfMF8wXzBfMSgpKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgb3RoZXJsdl8yPShUb2tlbiltYXRjaChpbnB1dCw0NixGT0xMT1dfNDZfaW5fcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlNDI0MSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl8yLCBncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uRWxlbWVudFZhbHVlQWNjZXNzKCkuZ2V0TGVmdFNxdWFyZUJyYWNrZXRLZXl3b3JkXzBfMF8wXzIoKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTkxODozOiAoICggKGx2X2VsZW1lbnRzXzNfMD0gcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uICkgKSAob3RoZXJsdl80PSAnLCcgKCAobHZfZWxlbWVudHNfNV8wPSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gKSApICkqICk/CisgICAgICAgICAgICAgICAgICAgIGludCBhbHQzNz0yOworICAgICAgICAgICAgICAgICAgICBpbnQgTEEzN18wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCAoKExBMzdfMD49UlVMRV9JRCAmJiBMQTM3XzA8PVJVTEVfREVDSU1BTCl8fExBMzdfMD09MTR8fExBMzdfMD09Mzd8fChMQTM3XzA+PTQwICYmIExBMzdfMDw9NDEpfHwoTEEzN18wPj00NSAmJiBMQTM3XzA8PTQ2KXx8TEEzN18wPT01M3x8KExBMzdfMD49NjkgJiYgTEEzN18wPD03MCl8fExBMzdfMD09NzR8fExBMzdfMD09ODF8fExBMzdfMD09ODN8fChMQTM3XzA+PTg3ICYmIExBMzdfMDw9ODkpfHwoTEEzN18wPj05MiAmJiBMQTM3XzA8PTEwMyl8fExBMzdfMD09MTA1KSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGFsdDM3PTE7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQzNykgeworICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE5MTg6NDogKCAobHZfZWxlbWVudHNfM18wPSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gKSApIChvdGhlcmx2XzQ9ICcsJyAoIChsdl9lbGVtZW50c181XzA9IHJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbiApICkgKSoKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOTE4OjQ6ICggKGx2X2VsZW1lbnRzXzNfMD0gcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uICkgKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTkxOToxOiAobHZfZWxlbWVudHNfM18wPSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE5MTk6MTogKGx2X2VsZW1lbnRzXzNfMD0gcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uICkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE5MjA6MzogbHZfZWxlbWVudHNfM18wPSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0WEFubm90YXRpb25FbGVtZW50VmFsdWVBY2Nlc3MoKS5nZXRFbGVtZW50c1hBbm5vdGF0aW9uT3JFeHByZXNzaW9uUGFyc2VyUnVsZUNhbGxfMF8xXzBfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWEFubm90YXRpb25PckV4cHJlc3Npb25faW5fcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlNDI2NSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgbHZfZWxlbWVudHNfM18wPXJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbigpOworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnRGb3JQYXJlbnQoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZVJ1bGUoKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQlhZGQoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQkJY3VycmVudCwgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQkJImVsZW1lbnRzIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQlsdl9lbGVtZW50c18zXzAsIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCSJYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbiIpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTkzNjoyOiAob3RoZXJsdl80PSAnLCcgKCAobHZfZWxlbWVudHNfNV8wPSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gKSApICkqCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9vcDM2OgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGFsdDM2PTI7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBMQTM2XzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIChMQTM2XzA9PTQyKSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsdDM2PTE7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoYWx0MzYpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTkzNjo0OiBvdGhlcmx2XzQ9ICcsJyAoIChsdl9lbGVtZW50c181XzA9IHJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbiApICkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIG90aGVybHZfND0oVG9rZW4pbWF0Y2goaW5wdXQsNDIsRk9MTE9XXzQyX2luX3J1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZTQyNzgpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl80LCBncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uRWxlbWVudFZhbHVlQWNjZXNzKCkuZ2V0Q29tbWFLZXl3b3JkXzBfMV8xXzAoKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTk0MDoxOiAoIChsdl9lbGVtZW50c181XzA9IHJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbiApICkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MTk0MToxOiAobHZfZWxlbWVudHNfNV8wPSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoxOTQxOjE6IChsdl9lbGVtZW50c181XzA9IHJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbiApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE5NDI6MzogbHZfZWxlbWVudHNfNV8wPSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZUFjY2VzcygpLmdldEVsZW1lbnRzWEFubm90YXRpb25PckV4cHJlc3Npb25QYXJzZXJSdWxlQ2FsbF8wXzFfMV8xXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uX2luX3J1bGVYQW5ub3RhdGlvbkVsZW1lbnRWYWx1ZTQyOTkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgbHZfZWxlbWVudHNfNV8wPXJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbigpOworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0WEFubm90YXRpb25FbGVtZW50VmFsdWVSdWxlKCkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgICAJCWFkZCgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgIAkJCWN1cnJlbnQsIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICAgCQkJImVsZW1lbnRzIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgICAJCWx2X2VsZW1lbnRzXzVfMCwgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgICAgCQkiWEFubm90YXRpb25PckV4cHJlc3Npb24iKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgfQorCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgCWRlZmF1bHQgOgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgYnJlYWsgbG9vcDM2OworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAodHJ1ZSk7CisKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgb3RoZXJsdl82PShUb2tlbiltYXRjaChpbnB1dCw0NyxGT0xMT1dfNDdfaW5fcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlNDMxNSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAJbmV3TGVhZk5vZGUob3RoZXJsdl82LCBncmFtbWFyQWNjZXNzLmdldFhBbm5vdGF0aW9uRWxlbWVudFZhbHVlQWNjZXNzKCkuZ2V0UmlnaHRTcXVhcmVCcmFja2V0S2V5d29yZF8wXzIoKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIDIgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE5NjQ6NTogdGhpc19YQW5ub3RhdGlvbk9yRXhwcmVzc2lvbl83PSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24KKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0WEFubm90YXRpb25FbGVtZW50VmFsdWVBY2Nlc3MoKS5nZXRYQW5ub3RhdGlvbk9yRXhwcmVzc2lvblBhcnNlclJ1bGVDYWxsXzEoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWEFubm90YXRpb25PckV4cHJlc3Npb25faW5fcnVsZVhBbm5vdGF0aW9uRWxlbWVudFZhbHVlNDM0NCk7CisgICAgICAgICAgICAgICAgICAgIHRoaXNfWEFubm90YXRpb25PckV4cHJlc3Npb25fNz1ydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24oKTsKKworICAgICAgICAgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50ID0gdGhpc19YQW5ub3RhdGlvbk9yRXhwcmVzc2lvbl83OyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGxlYXZlUnVsZSgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50O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vc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE5ODI6MjogaXZfcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uPSBydWxlWEFubm90YXRpb25PckV4cHJlc3Npb24gRU9GCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbk9yRXhwcmVzc2lvblJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uX2luX2VudHJ5UnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uNDM3OSk7CisgICAgICAgICAgICBpdl9ydWxlWEFubm90YXRpb25PckV4cHJlc3Npb249cnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBjdXJyZW50ID1pdl9ydWxlWEFubm90YXRpb25PckV4cHJlc3Npb247IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlWEFubm90YXRpb25PckV4cHJlc3Npb240Mzg5KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNo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YgTEEzOV8wPD1SVUxFX0RFQ0lNQUwpfHxMQTM5XzA9PTE0fHxMQTM5XzA9PTM3fHxMQTM5XzA9PTQxfHwoTEEzOV8wPj00NSAmJiBMQTM5XzA8PTQ2KXx8TEEzOV8wPT01M3x8KExBMzlfMD49NjkgJiYgTEEzOV8wPD03MCl8fExBMzlfMD09NzR8fExBMzlfMD09ODF8fExBMzlfMD09ODN8fChMQTM5XzA+PTg3ICYmIExBMzlfMDw9ODkpfHwoTEEzOV8wPj05MiAmJiBMQTM5XzA8PTEwMyl8fExBMzlfMD09MTA1KSApIHsKKyAgICAgICAgICAgICAgICBhbHQzOT0yOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmJhY2t0cmFja2luZz4wKSB7c3RhdGUuZmFpbGVkPXRydWU7IHJldHVybiBjdXJyZW50O30KKyAgICAgICAgICAgICAgICBOb1ZpYWJsZUFsdEV4Y2VwdGlvbiBudmFlID0KKyAgICAgICAgICAgICAgICAgICAgbmV3IE5vVmlhYmxlQWx0RXhjZXB0aW9uKCIiLCAzOSwgMCwgaW5wdXQpOworCisgICAgICAgICAgICAgICAgdGhyb3cgbnZhZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHN3aXRjaCAoYWx0MzkpIHsKKyAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjE5OTQ6NTogdGhpc19YQW5ub3RhdGlvbl8wPSBydWxlWEFubm90YXRpb24KKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0WEFubm90YXRpb25PckV4cHJlc3Npb25BY2Nlc3MoKS5nZXRYQW5ub3RhdGlvblBhcnNlclJ1bGVDYWxsXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWEFubm90YXRpb25faW5fcnVsZVhBbm5vdGF0aW9uT3JFeHByZXNzaW9uNDQzNik7CisgICAgICAgICAgICAgICAgICAgIHRoaXNfWEFubm90YXRpb25fMD1ydWxlWEFubm90YXRpb24oKTsKKworICAgICAgICAgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50ID0gdGhpc19YQW5ub3RhdGlvbl8wOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgMiA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjAwNDo1OiB0aGlzX1hFeHByZXNzaW9uXzE9IHJ1bGVYRXhwcmVzc2lvbgorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbkFjY2VzcygpLmdldFhFeHByZXNzaW9uUGFyc2VyUnVsZUNhbGxfMSgpKTsgCisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVYRXhwcmVzc2lvbl9pbl9ydWxlWEFubm90YXRpb25PckV4cHJlc3Npb240NDYzKTsKKyAgICAgICAgICAgICAgICAgICAgdGhpc19YRXhwcmVzc2lvbl8xPXJ1bGVYRXhwcmVzc2lvbigpOworCisgICAgICAgICAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgPSB0aGlzX1hFeHByZXNzaW9uXzE7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgbGVhdmVSdWxlKCk7IAorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeyAKKyAgICAgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsgCisgICAgICAgICAgICAgICAgYXBwZW5kU2tpcHBlZFRva2VucygpOworICAgICAgICAgICAgfSAKKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIGN1cnJlbnQ7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVYQW5ub3RhdGlvbk9yRXhwcmVzc2lvbiIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVYRXhwcmVzc2lvbiIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIwMjA6MTogZW50cnlSdWxlWEV4cHJlc3Npb24gcmV0dXJucyBbRU9iamVjdCBjdXJyZW50PW51bGxdIDogaXZfcnVsZVhFeHByZXNzaW9uPSBydWxlWEV4cHJlc3Npb24gRU9GIDsKKyAgICBwdWJsaWMgZmluYWwgRU9iamVjdCBlbnRyeVJ1bGVYRXhwcmVzc2lvbigpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIEVPYmplY3QgY3VycmVudCA9IG51bGw7CisKKyAgICAgICAgRU9iamVjdCBpdl9ydWxlWEV4cHJlc3Npb24gPSBudWxsOworCisKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC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yeVJ1bGVYRXhwcmVzc2lvbjQ1MDgpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gY3VycmVudDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlWEV4cHJlc3Npb24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZVhFeHByZXNzaW9uIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjAyOToxOiBydWxlWEV4cHJlc3Npb24gcmV0dXJucyBbRU9iamVjdCBjdXJyZW50PW51bGxdIDogdGhpc19YQXNzaWdubWVudF8wPSBydWxlWEFzc2lnbm1lbnQgOworICAgIHB1YmxpYyBmaW5hbCBFT2JqZWN0IHJ1bGVYRXhwcmVzc2lvbigpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIEVPYmplY3QgY3VycmVudCA9IG51bGw7CisKKyAgICAgICAgRU9iamVjdCB0aGlzX1hBc3NpZ25tZW50XzAgPSBudWxsOworCisKKyAgICAgICAgIGVudGVyUnVsZSgpOyAKKyAgICAgICAgICAgIAorICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMDMyOjI4OiAodGhpc19YQXNzaWdubWVudF8wPSBydWxlWEFzc2lnbm1lbnQgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMDM0OjU6IHRoaXNfWEFzc2lnbm1lbnRfMD0gcnVsZVhBc3NpZ25tZW50CisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRYRXhwcmVzc2lvbkFjY2VzcygpLmdldFhBc3NpZ25tZW50UGFyc2VyUnVsZUNhbGwoKSk7IAorICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWEFzc2lnbm1lbnRfaW5fcnVsZVhFeHByZXNzaW9uNDU1NCk7CisgICAgICAgICAgICB0aGlzX1hBc3NpZ25tZW50XzA9cnVsZVhBc3NpZ25tZW50KCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50ID0gdGhpc19YQXNzaWdubWVudF8wOyAKKyAgICAgICAgICAgICAgICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGxlYXZlUnVsZSgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlWEV4cHJlc3Npb24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlWEFzc2lnbm1lbnQiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMDUwOjE6IGVudHJ5UnVsZVhBc3NpZ25tZW50IHJldHVybnMgW0VPYmplY3QgY3VycmVudD1udWxsXSA6IGl2X3J1bGVYQXNzaWdubWVudD0gcnVsZVhBc3NpZ25tZW50IEVPRiA7CisgICAgcHVibGljIGZpbmFsIEVPYmplY3QgZW50cnlSdWxlWEFzc2lnbm1lbnQoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICBFT2JqZWN0IGN1cnJlbnQgPSBudWxsOworCisgICAgICAgIEVPYmplY3QgaXZfcnVsZVhBc3NpZ25tZW50ID0g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2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIwNjM6MTogKCAoICgpICggKCBydWxlRmVhdHVyZUNhbGxJRCApICkgcnVsZU9wU2luZ2xlQXNzaWduICggKGx2X3ZhbHVlXzNfMD0gcnVsZVhBc3NpZ25tZW50ICkgKSApIHwgKHRoaXNfWE9yRXhwcmVzc2lvbl80PSBydWxlWE9yRXhwcmVzc2lvbiAoICggKCAoICgpICggKCBydWxlT3BNdWx0aUFzc2lnbiApICkgKSApPT4gKCAoKSAoICggcnVsZU9wTXVsdGlBc3NpZ24gKSApICkgKSAoIChsdl9yaWdodE9wZXJhbmRfN18wPSBydWxlWEFzc2lnbm1lbnQgKSApICk/ICkgKQorICAgICAgICAgICAgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMDYzOjE6ICggKCAoKSAoICggcnVsZUZlYXR1cmVDYWxsSUQgKSApIHJ1bGVPcFNpbmdsZUFzc2lnbiAoIChsdl92YWx1ZV8zXzA9IHJ1bGVYQXNzaWdubWVudCApICkgKSB8ICh0aGlzX1hPckV4cHJlc3Npb25fND0gcnVsZVhPckV4cHJlc3Npb24gKCAoICggKCAoKSAoICggcnVsZU9wTXVsdGlBc3NpZ24gKSApICkgKT0+ICggKCkgKCAoIHJ1bGVPcE11bHRpQXNzaWduICkgKSApICkgKCAobHZfcmlnaHRPcGVyYW5kXzdfMD0gcnVsZVhBc3NpZ25tZW50ICkgKSApPyApICkKKyAgICAgICAgICAgIGludCBhbHQ0MT0yOworICAgICAgICAgICAgc3dpdGNoICggaW5wdXQuTEEoMSkgKSB7CisgICAgICAgICAgICBjYXNlIFJVTEVfSUQ6CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGludCBMQTQxXzEgPSBpbnB1dC5MQSgyKTsKKworICAgICAgICAgICAgICAgIGlmICggKExBNDFfMT09RU9GfHwoTEE0MV8xPj1SVUxFX0lEICYmIExBNDFfMTw9UlVMRV9ERUNJTUFMKXx8KExBNDFfMT49MTQgJiYgTEE0MV8xPD0xNSl8fExBNDFfMT09MjB8fChMQTQxXzE+PTM3ICYmIExBNDFfMTw9MzkpfHwoTEE0MV8xPj00MSAmJiBMQTQxXzE8PTQzKXx8KExBNDFfMT49NDUgJiYgTEE0MV8xPD03OSl8fChMQTQxXzE+PTgxICYmIExBNDFfMTw9MTA2KSkgKSB7CisgICAgICAgICAgICAgICAgICAgIGFsdDQxPTI7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEE0MV8xPT00NCkgKSB7CisgICAgICAgICAgICAgICAgICAgIGFsdDQxPTE7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuYmFja3RyYWNraW5nPjApIHtzdGF0ZS5mYWlsZWQ9dHJ1ZTsgcmV0dXJuIGN1cnJlbnQ7fQorICAgICAgICAgICAgICAgICAgICBOb1ZpYWJsZUFsdEV4Y2VwdGlvbiBudmFlID0KKyAgICAgICAgICAgICAgICAgICAgICAgIG5ldyBOb1ZpYWJsZUFsdEV4Y2VwdGlvbigiIiwgNDEsIDEsIGlucHV0KTsKKworICAgICAgICAgICAgICAgICAgICB0aHJvdyBudmFlOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDkyOgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBpbnQgTEE0MV8yID0gaW5wdXQuTEEoMik7CisKKyAgICAgICAgICAgICAgICBpZiAoIChMQTQxXzI9PUVPRnx8KExBNDFfMj49UlVMRV9JRCAmJiBMQTQxXzI8PVJVTEVfREVDSU1BTCl8fChMQTQxXzI+PTE0ICYmIExBNDFfMjw9MTUpfHxMQTQxXzI9PTIwfHwoTEE0MV8yPj0zNyAmJiBMQTQxXzI8PTM5KXx8KExBNDFfMj49NDEgJiYgTEE0MV8yPD00Myl8fChMQTQxXzI+PTQ1ICYmIExBNDFfMjw9NzkpfHwoTEE0MV8yPj04MSAmJiBMQTQxXzI8PTEwNikpICkgeworICAgICAgICAgICAgICAgICAgICBhbHQ0MT0yOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlIGlmICggKExBNDFfMj09NDQpICkgeworICAgICAgICAgICAgICAgICAgICBhbHQ0MT0xOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmJhY2t0cmFja2luZz4wKSB7c3RhdGUuZmFpbGVkPXRydWU7IHJldHVybiBjdXJyZW50O30KKyAgICAgICAgICAgICAgICAgICAgTm9WaWFibGVBbHRFeGNlcHRpb24gbnZhZSA9CisgICAgICAgICAgICAgICAgICAgICAgICBuZXcgTm9WaWFibGVBbHRFeGNlcHRpb24oIiIsIDQxLCAyLCBpbnB1dCk7CisKKyAgICAgICAgICAgICAgICAgICAgdGhyb3cgbnZhZTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA5MzoKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgaW50IExBNDFfMyA9IGlucHV0LkxBKDIpOworCisgICAgICAgICAgICAgICAgaWYgKCAoTEE0MV8zPT1FT0Z8fChMQTQxXzM+PVJVTEVfSUQgJiYgTEE0MV8zPD1SVUxFX0RFQ0lNQUwpfHwoTEE0MV8zPj0xNCAmJiBMQTQxXzM8PTE1KXx8TEE0MV8zPT0yMHx8KExBNDFfMz49MzcgJiYgTEE0MV8zPD0zOSl8fChMQTQxXzM+PTQxICYmIExBNDFfMzw9NDMpfHwoTEE0MV8zPj00NSAmJiBMQTQxXzM8PTc5KXx8KExBNDFfMz49ODEgJiYgTEE0MV8zPD0xMDYpKSApIHsKKyAgICAgICAgICAgICAgICAgICAgYWx0NDE9MjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTQxXzM9PTQ0KSApIHsKKyAgICAgICAgICAgICAgICAgICAgYWx0NDE9MTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5iYWNrdHJhY2tpbmc+MCkge3N0YXRlLmZhaWxlZD10cnVlOyByZXR1cm4gY3VycmVudDt9CisgICAgICAgICAgICAgICAgICAgIE5vVmlhYmxlQWx0RXhjZXB0aW9uIG52YWUgPQorICAgICAgICAgICAgICAgICAgICAgICAgbmV3IE5vVmlhYmxlQWx0RXhjZXB0aW9uKCIiLCA0MSwgMywgaW5wdXQpOworCisgICAgICAgICAgICAgICAgICAgIHRocm93IG52YWU7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMzc6CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGludCBMQTQxXzQgPSBpbnB1dC5MQSgyKTsKKworICAgICAgICAgICAgICAgIGlmICggKExBNDFfND09RU9GfHwoTEE0MV80Pj1SVUxFX0lEICYmIExBNDFfNDw9UlVMRV9ERUNJTUFMKXx8KExBNDFfND49MTQgJiYgTEE0MV80PD0xNSl8fExBNDFfND09MjB8fChMQTQxXzQ+PTM3ICYmIExBNDFfNDw9MzkpfHwoTEE0MV80Pj00MSAmJiBMQTQxXzQ8PTQzKXx8KExBNDFfND49NDUgJiYgTEE0MV80PD03OSl8fChMQTQxXzQ+PTgxICYmIExBNDFfNDw9MTA2KSkgKSB7CisgICAgICAgICAgICAgICAgICAgIGFsdDQxPTI7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEE0MV80PT00NCkgKSB7CisgICAgICAgICAgICAgICAgICAgIGFsdDQxPTE7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuYmFja3RyYWNraW5nPjApIHtzdGF0ZS5mYWlsZWQ9dHJ1ZTsgcmV0dXJuIGN1cnJlbnQ7fQorICAgICAgICAgICAgICAgICAgICBOb1ZpYWJsZUFsdEV4Y2VwdGlvbiBudmFlID0KKyAgICAgICAgICAgICAgICAgICAgICAgIG5ldyBOb1ZpYWJsZUFsdEV4Y2VwdGlvbigiIiwgNDEsIDQsIGlucHV0KTsKKworICAgICAgICAgICAgICAgICAgICB0aHJvdyBudmFlOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDk0OgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBpbnQgTEE0MV81ID0gaW5wdXQuTEEoMik7CisKKyAgICAgICAgICAgICAgICBpZiAoIChMQTQxXzU9PUVPRnx8KExBNDFfNT49UlVMRV9JRCAmJiBMQTQxXzU8PVJVTEVfREVDSU1BTCl8fChMQTQxXzU+PTE0ICYmIExBNDFfNTw9MTUpfHxMQTQxXzU9PTIwfHwoTEE0MV81Pj0zNyAmJiBMQTQxXzU8PTM5KXx8KExBNDFfNT49NDEgJiYgTEE0MV81PD00Myl8fChMQTQxXzU+PTQ1ICYmIExBNDFfNTw9NzkpfHwoTEE0MV81Pj04MSAmJiBMQTQxXzU8PTEwNikpICkgeworICAgICAgICAgICAgICAgICAgICBhbHQ0MT0yOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlIGlmICggKExBNDFfNT09NDQpICkgeworICAgICAgICAgICAgICAgICAgICBhbHQ0MT0xOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmJhY2t0cmFja2luZz4wKSB7c3RhdGUuZmFpbGVkPXRydWU7IHJldHVybiBjdXJyZW50O30KKyAgICAgICAgICAgICAgICAgICAgTm9WaWFibGVBbHRFeGNlcHRpb24gbnZhZSA9CisgICAgICAgICAgICAgICAgICAgICAgICBuZXcgTm9WaWFibGVBbHRFeGNlcHRpb24oIiIsIDQxLCA1LCBpbnB1dCk7CisKKyAgICAgICAgICAgICAgICAgICAgdGhyb3cgbnZhZTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSBSVUxFX1NUUklORzoKKyAgICAgICAgICAgIGNhc2UgUlVMRV9IRVg6CisgICAgICAgICAgICBjYXNlIFJVTEVfSU5UOgorICAgICAgICAgICAgY2FzZSBSVUxFX0RFQ0lNQUw6CisgICAgICAgICAgICBjYXNlIDE0OgorICAgICAgICAgICAgY2FzZSA0MToKKyAgICAgICAgICAgIGNhc2UgNDU6CisgICAgICAgICAgICBjYXNlIDQ2OgorICAgICAgICAgICAgY2FzZSA1MzoKKyAgICAgICAgICAgIGNhc2UgNjk6CisgICAgICAgICAgICBjYXNlIDcwOgorICAgICAgICAgICAgY2FzZSA3NDoKKyAgICAgICAgICAgIGNhc2UgODE6CisgICAgICAgICAgICBjYXNlIDgzOgorICAgICAgICAgICAgY2FzZSA4NzoKKyAgICAgICAgICAgIGNhc2UgODg6CisgICAgICAgICAgICBjYXNlIDg5OgorICAgICAgICAgICAgY2FzZSA5NToKKyAgICAgICAgICAgIGNhc2UgOTY6CisgICAgICAgICAgICBjYXNlIDk3OgorICAgICAgICAgICAgY2FzZSA5ODoKKyAgICAgICAgICAgIGNhc2UgOTk6CisgICAgICAgICAgICBjYXNlIDEwMDoKKyAgICAgICAgICAgIGNhc2UgMTAxOgorICAgICAgICAgICAgY2FzZSAxMDI6CisgICAgICAgICAgICBjYXNlIDEwMzoKKyAgICAgICAgICAgIGNhc2UgMTA1OgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBhbHQ0MT0yOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmJhY2t0cmFja2luZz4wKSB7c3RhdGUuZmFpbGVkPXRydWU7IHJldHVybiBjdXJyZW50O30KKyAgICAgICAgICAgICAgICBOb1ZpYWJsZUFsdEV4Y2VwdGlvbiBudmFlID0KKyAgICAgICAgICAgICAgICAgICAgbmV3IE5vVmlhYmxlQWx0RXhjZXB0aW9uKCIiLCA0MSwgMCwgaW5wdXQpOworCisgICAgICAgICAgICAgICAgdGhyb3cgbnZhZTsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3dpdGNoIChhbHQ0MSkgeworICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjA2MzoyOiAoICgpICggKCBydWxlRmVhdHVyZUNhbGxJRCApICkgcnVsZU9wU2luZ2xlQXNzaWduICggKGx2X3ZhbHVlXzNfMD0gcnVsZVhBc3NpZ25tZW50ICkgKSApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5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WFyQWNjZXNzLmdldFhBc3NpZ25tZW50QWNjZXNzKCkuZ2V0WEFzc2lnbm1lbnRBY3Rpb25fMF8wKCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudCk7CisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjA2OToyOiAoICggcnVsZUZlYXR1cmVDYWxsSUQgKSApCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjA3MDoxOiAoIHJ1bGVGZWF0dXJlQ2FsbElEICkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIwNzA6MTogKCBydWxlRmVhdHVyZUNhbGxJRCApCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjA3MTozOiBydWxlRmVhdHVyZUNhbGxJRAorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgCQkJaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudChncmFtbWFyQWNjZXNzLmdldFhBc3NpZ25tZW50UnVsZSgpKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldFhBc3NpZ25tZW50QWNjZXNzKCkuZ2V0RmVhdHVyZUp2bUlkZW50aWZpYWJsZUVsZW1lbnRDcm9zc1JlZmVyZW5jZV8wXzFfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlRmVhdHVyZUNhbGxJRF9pbl9ydWxlWEFzc2lnbm1lbnQ0NjU2KTsKKyAgICAgICAgICAgICAgICAgICAgcnVsZUZlYXR1cmVDYWxsSUQoKTsKKworICAgICAgICAgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldFhBc3NpZ25tZW50QWNjZXNzKCkuZ2V0T3BTaW5nbGVBc3NpZ25QYXJzZXJSdWxlQ2FsbF8wXzIoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlT3BTaW5nbGVBc3NpZ25faW5fcnVsZVhBc3NpZ25tZW50NDY3Mik7CisgICAgICAgICAgICAgICAgICAgIHJ1bGVPcFNpbmdsZUFzc2lnbigpOworCisgICAgICAgICAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3Jn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jY2Vzcy5nZXRYQXNzaWdubWVudEFjY2VzcygpLmdldFZhbHVlWEFzc2lnbm1lbnRQYXJzZXJSdWxlQ2FsbF8wXzNfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWEFzc2lnbm1lbnRfaW5fcnVsZVhBc3NpZ25tZW50NDY5Mik7CisgICAgICAgICAgICAgICAgICAgIGx2X3ZhbHVlXzNfMD1ydWxlWEFzc2lnbm1lbnQoKTsKKworICAgICAgICAgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnRGb3JQYXJlbnQoZ3JhbW1hckFjY2Vzcy5nZXRYQXNzaWdubWVudFJ1bGUoKSk7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCXNldCgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQkJY3VycmVudCwgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJCSJ2YWx1ZSIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCWx2X3ZhbHVlXzNfMCwgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCSJYQXNzaWdubWVudCIpOworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIDIgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIxMTE6NjogKHRoaXNfWE9yRXhwcmVzc2lvbl80PSBydWxlWE9yRXhwcmVzc2lvbiAoICggKCAoICgpICggKCBydWxlT3BNdWx0aUFzc2lnbiApICkgKSApPT4gKCAoKSAoICggcnVsZU9wTXVsdGlBc3NpZ24gKSApICkgKSAoIChsdl9yaWdodE9wZXJhbmRfN18wPSBydWxlWEFzc2lnbm1lbnQgKSApICk/ICkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIxMTE6NjogKHRoaXNfWE9yRXhwcmVzc2lvbl80PSBydWxlWE9yRXhwcmVzc2lvbiAoICggKCAoICgpICggKCBydWxlT3BNdWx0aUFzc2lnbiApICkgKSApPT4gKCAoKSAoICggcnVsZU9wTXVsdGlBc3NpZ24gKSApICkgKSAoIChsdl9yaWdodE9wZXJhbmRfN18wPSBydWxlWEFzc2lnbm1lbnQgKSApICk/ICkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMTEyOjU6IHRoaXNfWE9yRXhwcmVzc2lvbl80PSBydWxlWE9yRXhwcmVzc2lvbiAoICggKCAoICgpICggKCBydWxlT3BNdWx0aUFzc2lnbiApICkgKSApPT4gKCAoKSAoICggcnVsZU9wTXVsdGlBc3NpZ24gKSApICkgKSAoIChsdl9yaWdodE9wZXJhbmRfN18wPSBydWxlWEFzc2lnbm1lbnQgKSApICk/CisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldFhBc3NpZ25tZW50QWNjZXNzKCkuZ2V0WE9yRXhwcmVzc2lvblBhcnNlclJ1bGVDYWxsXzFfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVYT3JFeHByZXNzaW9uX2luX3J1bGVYQXNzaWdubWVudDQ3MjIpOworICAgICAgICAgICAgICAgICAgICB0aGlzX1hPckV4cHJlc3Npb25fND1ydWxlWE9yRXhwcmVzc2lvbigpOworCisgICAgICAgICAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgPSB0aGlzX1hPckV4cHJlc3Npb25fNDsgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjEyMDoxOiAoICggKCAoICgpICggKCBydWxlT3BNdWx0aUFzc2lnbiApICkgKSApPT4gKCAoKSAoICggcnVsZU9wTXVsdGlBc3NpZ24gKSApICkgKSAoIChsdl9yaWdodE9wZXJhbmRfN18wPSBydWxlWEFzc2lnbm1lbnQgKSApICk/CisgICAgICAgICAgICAgICAgICAgIGludCBhbHQ0MD0yOworICAgICAgICAgICAgICAgICAgICBhbHQ0MCA9IGRmYTQwLnByZWRpY3QoaW5wdXQpOworICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGFsdDQwKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjEyMDoyOiAoICggKCAoKSAoICggcnVsZU9wTXVsdGlBc3NpZ24gKSApICkgKT0+ICggKCkgKCAoIHJ1bGVPcE11bHRpQXNzaWduICkgKSApICkgKCAobHZfcmlnaHRPcGVyYW5kXzdfMD0gcnVsZVhBc3NpZ25tZW50ICkgKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIxMjA6MjogKCAoICggKCkgKCAoIHJ1bGVPcE11bHRpQXNzaWduICkgKSApICk9PiAoICgpICggKCBydWxlT3BNdWx0aUFzc2lnbiApICkgKSApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMTIwOjM6ICggKCAoKSAoICggcnVsZU9wTXVsdGlBc3NpZ24gKSApICkgKT0+ICggKCkgKCAoIHJ1bGVPcE11bHRpQXNzaWduICkgKSApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjEyNTo2OiAoICgpICggKCBydWxlT3BNdWx0aUFzc2lnbiApICkgKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjEyNTo3OiAoKSAoICggcnVsZU9wTXVsdGlBc3NpZ24gKSApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjEyNTo3OiAoKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjEyNjo1OiAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudCA9IGZvcmNlQ3JlYXRlTW9kZWxFbGVtZW50QW5kU2V0KAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ3JhbW1hckFjY2Vzcy5nZXRYQXNzaWdubWVudEFjY2VzcygpLmdldFhCaW5hcnlPcGVyYXRpb25MZWZ0T3BlcmFuZEFjdGlvbl8xXzFfMF8wXzAoKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjEzMToyOiAoICggcnVsZU9wTXVsdGlBc3NpZ24gKSApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMTMyOjE6ICggcnVsZU9wTXVsdGlBc3NpZ24gKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIxMzI6MTogKCBydWxlT3BNdWx0aUFzc2lnbiApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMTMzOjM6IHJ1bGVPcE11bHRpQXNzaWduCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCQlpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnQoZ3JhbW1hckFjY2Vzcy5nZXRYQXNzaWdubWVudFJ1bGUoKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRYQXNzaWdubWVudEFjY2VzcygpLmdldEZlYXR1cmVKdm1JZGVudGlmaWFibGVFbGVtZW50Q3Jvc3NSZWZlcmVuY2VfMV8xXzBfMF8xXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZU9wTXVsdGlBc3NpZ25faW5fcnVsZVhBc3NpZ25tZW50NDc3NSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcnVsZU9wTXVsdGlBc3NpZ24oKTsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMTQ2OjQ6ICggKGx2X3JpZ2h0T3BlcmFuZF83XzA9IHJ1bGVYQXNzaWdubWVudCApICkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIxNDc6MTogKGx2X3JpZ2h0T3BlcmFuZF83XzA9IHJ1bGVYQXNzaWdubWVudCApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjE0NzoxOiAobHZfcmlnaHRPcGVyYW5kXzdfMD0gcnVsZVhBc3NpZ25tZW50ICkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIxNDg6MzogbHZfcmlnaHRPcGVyYW5kXzdfMD0gcnVsZVhBc3NpZ25tZW50CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldFhBc3NpZ25tZW50QWNjZXNzKCkuZ2V0UmlnaHRPcGVyYW5kWEFzc2lnbm1lbnRQYXJzZXJSdWxlQ2FsbF8xXzFfMV8wKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVYQXNzaWdubWVudF9pbl9ydWxlWEFzc2lnbm1lbnQ0Nzk4KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBsdl9yaWdodE9wZXJhbmRfN18wPXJ1bGVYQXNzaWdubWVudCgpOworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnRGb3JQYXJlbnQoZ3JhbW1hckFjY2Vzcy5nZXRYQXNzaWdubWVudFJ1bGUoKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQlzZXQoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQkJY3VycmVudCwgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQkJInJpZ2h0T3BlcmFuZCIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJbHZfcmlnaHRPcGVyYW5kXzdfMCwgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJIlhBc3NpZ25tZW50Iik7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBsZWF2ZVJ1bGUoKTsgCisgICAgICAgICAgIC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dGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gY3VycmVudDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlT3BTaW5nbGVBc3NpZ24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZU9wU2luZ2xlQXNzaWduIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjE4MToxOiBydWxlT3BTaW5nbGVBc3NpZ24gcmV0dXJucyBbQW50bHJEYXRhdHlwZVJ1bGVUb2tlbiBjdXJyZW50PW5ldyBBbnRsckRhdGF0eXBlUnVsZVRva2VuKCldIDoga3c9ICc9JyA7CisgICAgcHVibGljIGZpbmFsIEFudGxyRGF0YXR5cGVSdWxlVG9rZW4gcnVsZU9wU2luZ2xlQXNzaWduKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgQW50bHJEYXRhdHlwZVJ1bGVUb2tlbiBjdXJyZW50ID0gbmV3IEFudGxyRGF0YXR5cGVSdWxlVG9rZW4oKTsKKworICAgICAgICBUb2tlbiBrdz1udWxsOworCisgICAgICAgICBlbnRlclJ1bGUoKTsgCisgICAgICAgICAgICAKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjE4NDoyODogKGt3PSAnPScgKQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMTg2OjI6IGt3PSAnPScKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGt3PShUb2tlbiltYXRjaChpbnB1dCw0NCxGT0xMT1dfNDRfaW5fcnVsZU9wU2luZ2xlQXNzaWduNDg4Nik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Lm1lcmdlKGt3KTsKKyAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcFNpbmdsZUFzc2lnbkFjY2VzcygpLmdldEVxdWFsc1NpZ25LZXl3b3JkKCkpOyAKKyAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgfQorCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgbGVhdmVSdWxlKCk7IAorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeyAKKyAgICAgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsgCisgICAgICAgICAg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ZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIyMDE6MjogaXZfcnVsZU9wTXVsdGlBc3NpZ249IHJ1bGVPcE11bHRpQXNzaWduIEVPRgorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0T3BNdWx0aUFzc2lnblJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZU9wTXVsdGlBc3NpZ25faW5fZW50cnlSdWxlT3BNdWx0aUFzc2lnbjQ5MjYpOworICAgICAgICAgICAgaXZfcnVsZU9wTXVsdGlBc3NpZ249cnVsZU9wTXVsdGlBc3NpZ24oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGN1cnJlbnQgPWl2X3J1bGVPcE11bHRpQXNzaWduLmdldFRleHQoKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVPcE11bHRpQXNzaWduNDkzNyk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3Zlcihpb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BjYXNlIDQ4OgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBhbHQ0Mz0xOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNDk6CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGFsdDQzPTI7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA1MDoKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgYWx0NDM9MzsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDUxOgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBhbHQ0Mz00OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNTI6CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGFsdDQzPTU7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA1MzoKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgYWx0NDM9NjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDU0OgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBhbHQ0Mz03OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmJhY2t0cmFja2luZz4wKSB7c3RhdGUuZmFpbGVkPXRydWU7IHJldHVybiBjdXJyZW50O30KKyAgICAgICAgICAgICAgICBOb1ZpYWJsZUFsdEV4Y2VwdGlvbiBudmFlID0KKyAgICAgICAgICAgICAgICAgICAgbmV3IE5vVmlhYmxlQWx0RXhjZXB0aW9uKCIiLCA0MywgMCwgaW5wdXQpOworCisgICAgICAgICAgICAgICAgdGhyb3cgbnZhZTsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3dpdGNoIChhbHQ0MykgeworICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjIxMzoyOiBrdz0gJys9JworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGt3PShUb2tlbiltYXRjaChpbnB1dCw0OCxGT0xMT1dfNDhfaW5fcnVsZU9wTXVsdGlBc3NpZ240OTc1KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Lm1lcmdlKGt3KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGt3LCBncmFtbWFyQWNjZXNzLmdldE9wTXVsdGlBc3NpZ25BY2Nlc3MoKS5nZXRQbHVzU2lnbkVxdWFsc1NpZ25LZXl3b3JkXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSAyIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMjIwOjI6IGt3PSAnLT0nCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAga3c9KFRva2VuKW1hdGNoKGlucHV0LDQ5LEZPTExPV180OV9pbl9ydWxlT3BNdWx0aUFzc2lnbjQ5OTQpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQubWVyZ2Uoa3cpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3TGVhZk5vZGUoa3csIGdyYW1tYXJBY2Nlc3MuZ2V0T3BNdWx0aUFzc2lnbkFjY2VzcygpLmdldEh5cGhlbk1pbnVzRXF1YWxzU2lnbktleXdvcmRfMSgpKTsgCisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIDMgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIyMjc6Mjoga3c9ICcqPScKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNTAsRk9MTE9XXzUwX2luX3J1bGVPcE11bHRpQXNzaWduNTAxMyk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudC5tZXJnZShrdyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcE11bHRpQXNzaWduQWNjZXNzKCkuZ2V0QXN0ZXJpc2tFcXVhbHNTaWduS2V5d29yZF8yKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgNCA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjIzNDoyOiBrdz0gJy89JworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGt3PShUb2tlbiltYXRjaChpbnB1dCw1MSxGT0xMT1dfNTFfaW5fcnVsZU9wTXVsdGlBc3NpZ241MDMyKTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Lm1lcmdlKGt3KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGt3LCBncmFtbWFyQWNjZXNzLmdldE9wTXVsdGlBc3NpZ25BY2Nlc3MoKS5nZXRTb2xpZHVzRXF1YWxzU2lnbktleXdvcmRfMygpKTsgCisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIDUgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIyNDE6Mjoga3c9ICclPScKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNTIsRk9MTE9XXzUyX2luX3J1bGVPcE11bHRpQXNzaWduNTA1MSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudC5tZXJnZShrdyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcE11bHRpQXNzaWduQWNjZXNzKCkuZ2V0UGVyY2VudFNpZ25FcXVhbHNTaWduS2V5d29yZF80KCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgNiA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjI0Nzo2OiAoa3c9ICc8JyBrdz0gJzwnIGt3PSAnPScgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjI0Nzo2OiAoa3c9ICc8JyBrdz0gJzwnIGt3PSAnPScgKQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIyNDg6Mjoga3c9ICc8JyBrdz0gJzwnIGt3PSAnPScKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNTMsRk9MTE9XXzUzX2luX3J1bGVPcE11bHRpQXNzaWduNTA3MSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudC5tZXJnZShrdyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcE11bHRpQXNzaWduQWNjZXNzKCkuZ2V0TGVzc1RoYW5TaWduS2V5d29yZF81XzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNTMsRk9MTE9XXzUzX2luX3J1bGVPcE11bHRpQXNzaWduNTA4NCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudC5tZXJnZShrdyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcE11bHRpQXNzaWduQWNjZXNzKCkuZ2V0TGVzc1RoYW5TaWduS2V5d29yZF81XzEoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNDQsRk9MTE9XXzQ0X2luX3J1bGVPcE11bHRpQXNzaWduNTA5Nyk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudC5tZXJnZShrdyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcE11bHRpQXNzaWduQWNjZXNzKCkuZ2V0RXF1YWxzU2lnbktleXdvcmRfNV8yKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgNyA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjI2Njo2OiAoa3c9ICc+JyAoa3c9ICc+JyApPyBrdz0gJz49JyApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMjY2OjY6IChrdz0gJz4nIChrdz0gJz4nICk/IGt3PSAnPj0nICkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMjY3OjI6IGt3PSAnPicgKGt3PSAnPicgKT8ga3c9ICc+PScKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNTQsRk9MTE9XXzU0X2luX3J1bGVPcE11bHRpQXNzaWduNTExOCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudC5tZXJnZShrdyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcE11bHRpQXNzaWduQWNjZXNzKCkuZ2V0R3JlYXRlclRoYW5TaWduS2V5d29yZF82XzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIyNzI6MTogKGt3PSAnPicgKT8KKyAgICAgICAgICAgICAgICAgICAgaW50IGFsdDQyPTI7CisgICAgICAgICAgICAgICAgICAgIGludCBMQTQyXzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgICAgICAgICBpZiAoIChMQTQyXzA9PTU0KSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGFsdDQyPTE7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQ0MikgeworICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIyNzM6Mjoga3c9ICc+JworICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNTQsRk9MTE9XXzU0X2luX3J1bGVPcE11bHRpQXNzaWduNTEzMik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQubWVyZ2Uoa3cpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcE11bHRpQXNzaWduQWNjZXNzKCkuZ2V0R3JlYXRlclRoYW5TaWduS2V5d29yZF82XzEoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAga3c9KFRva2VuKW1hdGNoKGlucHV0LDU1LEZPTExPV181NV9pbl9ydWxlT3BNdWx0aUFzc2lnbjUxNDcpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQubWVyZ2Uoa3cpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3TGVhZk5vZGUoa3csIGdyYW1tYXJBY2Nlc3MuZ2V0T3BNdWx0aUFzc2lnbkFjY2VzcygpLmdldEdyZWF0ZXJUaGFuU2lnbkVxdWFsc1NpZ25LZXl3b3JkXzZfMigpKTsgCisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICA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ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVYT3JFeHByZXNzaW9uIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVYT3JFeHByZXNzaW9uIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjMwMToxOiBydWxlWE9yRXhwcmVzc2lvbiByZXR1cm5zIFtFT2JqZWN0IGN1cnJlbnQ9bnVsbF0gOiAodGhpc19YQW5kRXhwcmVzc2lvbl8wPSBydWxlWEFuZEV4cHJlc3Npb24gKCAoICggKCAoKSAoICggcnVsZU9wT3IgKSApICkgKT0+ICggKCkgKCAoIHJ1bGVPcE9yICkgKSApICkgKCAobHZfcmlnaHRPcGVyYW5kXzNfMD0gcnVsZVhBbmRFeHByZXNzaW9uICkgKSApKiApIDsKKyAgICBwdWJsaWMgZmluYWwgRU9iamVjdCBydWxlWE9yRXhwcmVzc2lvbigpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIEVPYmplY3QgY3VycmVudCA9IG51bGw7CisKKyAgICAgICAgRU9iamVjdCB0aGlzX1hBbmRFeHByZXNzaW9uXzAgPSBudWx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uZzoyMzA1OjE6ICh0aGlzX1hBbmRFeHByZXNzaW9uXzA9IHJ1bGVYQW5kRXhwcmVzc2lvbiAoICggKCAoICgpICggKCBydWxlT3BPciApICkgKSApPT4gKCAoKSAoICggcnVsZU9wT3IgKSApICkgKSAoIChsdl9yaWdodE9wZXJhbmRfM18wPSBydWxlWEFuZEV4cHJlc3Npb24gKSApICkqICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjMwNjo1OiB0aGlzX1hBbmRFeHByZXNzaW9uXzA9IHJ1bGVYQW5kRXhwcmVzc2lvbiAoICggKCAoICgpICggKCBydWxlT3BPciApICkgKSApPT4gKCAoKSAoICggcnVsZU9wT3IgKSApICkgKSAoIChsdl9yaWdodE9wZXJhbmRfM18wPSBydWxlWEFuZEV4cHJlc3Npb24gKSApICkqCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRYT3JFeHByZXNzaW9uQWNjZXNzKCkuZ2V0WEFuZEV4cHJlc3Npb25QYXJzZXJSdWxlQ2FsbF8wKCkpOyAKKyAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVhBbmRFeHByZXNzaW9uX2luX3J1bGVYT3JFeHByZXNzaW9uNTI0NSk7CisgICAgICAgICAgICB0aGlzX1hBbmRFeHByZXNzaW9uXzA9cnVsZVhBbmRFeHByZXNzaW9uKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50ID0gdGhpc19YQW5kRXhwcmVzc2lvbl8wOyAKKyAgICAgICAgICAgICAgICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjMxNDoxOiAoICggKCAoICgpICggKCBydWxlT3BPciApICkgKSApPT4gKCAoKSAoICggcnVsZU9wT3IgKSApICkgKSAoIChsdl9yaWdodE9wZXJhbmRfM18wPSBydWxlWEFuZEV4cHJlc3Npb24gKSApICkqCisgICAgICAgICAgICBsb29wNDQ6CisgICAgICAgICAgICBkbyB7CisgICAgICAgICAgICAgICAgaW50IGFsdDQ0PTI7CisgICAgICAgICAgICAgICAgaW50IExBNDRfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgaWYgKCAoTEE0NF8wPT01NikgKSB7CisgICAgICAgICAgICAgICAgICAgIGludCBMQTQ0XzIgPSBpbnB1dC5MQSgyKTsKKworICAgICAgICAgICAgICAgICAgICBpZiAoIChzeW5wcmVkOV9JbnRlcm5hbEN1YmVEU0woKSkgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBhbHQ0ND0xOworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQ0NCkgeworICAgICAgICAgICAgCWNhc2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ggKCkgKCAoIHJ1bGVPcE9yICkgKSApCisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjMxOTo3OiAoKSAoICggcnVsZU9wT3IgKSApCisgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMzE5Ojc6ICgpCisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjMyMDo1OiAKKyAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgCSAgICAgICAgICAgICAgY3VycmVudCA9IGZvcmNlQ3JlYXRlTW9kZWxFbGVtZW50QW5kU2V0KAorICAgICAgICAgICAgCSAgICAgICAgICAgICAgICAgIGdyYW1tYXJBY2Nlc3MuZ2V0WE9yRXhwcmVzc2lvbkFjY2VzcygpLmdldFhCaW5hcnlPcGVyYXRpb25MZWZ0T3BlcmFuZEFjdGlvbl8xXzBfMF8wKCksCisgICAgICAgICAgICAJICAgICAgICAgICAgICAgICAgY3VycmVudCk7CisgICAgICAgICAgICAJICAgICAgICAgIAorICAgICAgICAgICAgCSAgICB9CisKKyAgICAgICAgICAgIAkgICAgfQorCisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjMyNToyOiAoICggcnVsZU9wT3IgKSApCisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjMyNjoxOiAoIHJ1bGVPcE9yICkKKyAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIzMjY6MTogKCBydWxlT3BPciApCisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjMyNzozOiBydWxlT3BPcgorICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAJICAgICAgCQkJaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudChncmFtbWFyQWNjZXNzLmdldFhPckV4cHJlc3Npb25SdWxlKCkpOworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIAorICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgCSAgICAgICAKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0WE9yRXhwcmVzc2lvbkFjY2VzcygpLmdldEZlYXR1cmVKdm1JZGVudGlmaWFibGVFbGVtZW50Q3Jvc3NSZWZlcmVuY2VfMV8wXzBfMV8wKCkpOyAKKyAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVPcE9yX2luX3J1bGVYT3JFeHByZXNzaW9uNTI5OCk7CisgICAgICAgICAgICAJICAgIHJ1bGVPcE9yKCk7CisKKyAgICAgICAgICAgIAkgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgCSAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAJICAgICAgIAorICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgCSAgICB9CisKKyAgICAgICAgICAgIAkgICAgfQorCisKKyAgICAgICAgICAgIAkgICAgfQorCisKKyAgICAgICAgICAgIAkgICAgfQorCisKKyAgICAgICAgICAgIAkgICAgfQorCisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2Vu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ShncmFtbWFyQWNjZXNzLmdldFhPckV4cHJlc3Npb25BY2Nlc3MoKS5nZXRSaWdodE9wZXJhbmRYQW5kRXhwcmVzc2lvblBhcnNlclJ1bGVDYWxsXzFfMV8wKCkpOyAKKyAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVYQW5kRXhwcmVzc2lvbl9pbl9ydWxlWE9yRXhwcmVzc2lvbjUzMjEpOworICAgICAgICAgICAgCSAgICBsdl9yaWdodE9wZXJhbmRfM18wPXJ1bGVYQW5kRXhwcmVzc2lvbigpOworCisgICAgICAgICAgICAJICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIAkgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudEZvclBhcmVudChncmFtbWFyQWNjZXNzLmdldFhPckV4cHJlc3Npb25SdWxlKCkpOworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgIAkgICAgICAgICAgICAgCQlzZXQoCisgICAgICAgICAgICAJICAgICAgICAgICAgIAkJCWN1cnJlbnQsIAorICAgICAgICAgICAgCSAgICAgICAgICAgICAJCQkicmlnaHRPcGVyYW5kIiwKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIAkJbHZfcmlnaHRPcGVyYW5kXzNfMCwgCisgICAgICAgICAgICAJICAgICAgICAgICAgICAJCSJYQW5kRXhwcmVzc2lvbiIpOworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgCSAgICB9CisKKyAgICAgICAgICAgIAkgICAgfQorCisKKyAgICAgICAgICAgIAkgICAgfQorCisKKyAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgCSAgICBicmVhazsKKworICAgICAgICAgICAgCWRlZmF1bHQgOgorICAgICAgICAgICAgCSAgICBicmVhayBsb29wNDQ7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfSB3aGlsZSAodHJ1ZSk7CisKKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBsZWF2ZVJ1bGUoKTsgCisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gY3VycmVudDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZVhPckV4cHJlc3Npb24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlT3BPciIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIzNjY6MTogZW50cnlSdWxlT3BPciByZXR1cm5zIFtTdHJpbmcgY3VycmVudD1udWxsXSA6IGl2X3J1bGVPcE9yPSBydWx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ICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBjdXJyZW50ID1pdl9ydWxlT3BPci5nZXRUZXh0KCk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlT3BPcjUzNzEpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gY3VycmVudDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlT3BPciIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlT3BPciIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjIzNzU6MTogcnVsZU9wT3IgcmV0dXJucyBbQW50bHJEYXRhdHlwZVJ1bGVUb2tlbiBjdXJyZW50PW5ldyBBbnRsckRhdGF0eXBlUnVsZVRva2VuKCldIDoga3c9ICd8fCcgOworICAgIHB1YmxpYyBmaW5hbCBBbnRsckRhdGF0eXBlUnVsZVRva2VuIHJ1bGVPcE9yKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgQW50bHJEYXRhdHlwZVJ1bGVUb2tlbiBjdXJyZW50ID0gbmV3IEFudGxyRGF0YXR5cGVSdWxlVG9rZW4oKTsKKworICAgICAgICBUb2tlbiBrdz1udWxsOworCisgICAgICAgICBlbnRlclJ1bGUoKTsgCisgICAgICAgICAgICAKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjM3ODoyODogKGt3PSAnfHwnICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjM4MDoyOiBrdz0gJ3x8JworICAgICAgICAgICAgeworICAgICAgICAgICAga3c9KFRva2VuKW1hdGNoKGlucHV0LDU2LEZPTExPV181Nl9pbl9ydWxlT3BPcjU0MDgpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgY3VycmVudC5tZXJnZShrdyk7CisgICAgICAgICAgICAgICAgICAgICAgbmV3TGVhZk5vZGUoa3csIGdyYW1tYXJBY2Nlc3MuZ2V0T3BPckFjY2VzcygpLmdldFZlcnRpY2FsTGluZVZlcnRpY2FsTGluZUtleXdvcmQoKSk7IAorICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBsZWF2ZVJ1bGUoKTsgCisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gY3VycmVudDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZU9wT3IiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlWEFuZEV4cHJlc3Npb24iCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyMzkzOjE6IGVudHJ5UnVsZVhBbmRFeHByZXNzaW9uIHJldHVybnMgW0VPYmplY3QgY3VycmVudD1udWxsXSA6IGl2X3J1bGVYQW5kRXhwcmVzc2lvbj0gcnVsZVhBbmRFeHByZXNzaW9uIEVPRiA7CisgICAgcHVibGljIGZpbmFsIEVPYmplY3QgZW50cnlSdWxlWEFuZEV4cHJlc3Npb24oKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICBFT2JqZWN0IGN1cnJlbnQgPSBudWxsOworCisgICAgICAgIEVPYmplY3QgaXZfcnVsZVhBbmRFeHByZXNzaW9uID0gbnVsbDsKKworCisgICAgICAgIHRyeSB7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0lud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CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeyAKKyAgICAgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsgCisgICAgICAgICAgICAgICAgYXBwZW5kU2tpcHBlZFRva2VucygpOworICAgICAgICAgICAgfSAKKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIGN1cnJlbnQ7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZVhBbmRFeHByZXNzaW9uIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVYQW5kRXhwcmVzc2lvbiIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI0MDI6MTogcnVsZVhBbmRFeHByZXNzaW9uIHJldHVybnMgW0VPYmplY3QgY3VycmVudD1udWxsXSA6ICh0aGlzX1hFcXVhbGl0eUV4cHJlc3Npb25fMD0gcnVsZVhFcXVhbGl0eUV4cHJlc3Npb24gKCAoICggKCAoKSAoICggcnVsZU9wQW5kICkgKSApICk9PiAoICgpICggKCBydWxlT3BBbmQgKSApICkgKSAoIChsdl9yaWdodE9wZXJhbmRfM18wPSBydWxlWEVxdWFsaXR5RXhwcmVzc2lvbiApICkgKSogKSA7CisgICAgcHVibGljIGZpbmFsIEVPYmplY3QgcnVsZVhBbmRFeHByZXNzaW9uKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgRU9iamVjdCBjdXJyZW50ID0gbnVsbDsKKworICAgICAgICBFT2JqZWN0IHRoaXNfWEVxdWFsaXR5RXhwcmVzc2lvbl8wID0gb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zaW9uNTUwNCk7CisgICAgICAgICAgICB0aGlzX1hFcXVhbGl0eUV4cHJlc3Npb25fMD1ydWxlWEVxdWFsaXR5RXhwcmVzc2lvbigpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgY3VycmVudCA9IHRoaXNfWEVxdWFsaXR5RXhwcmVzc2lvbl8wOyAKKyAgICAgICAgICAgICAgICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjQxNToxOiAoICggKCAoICgpICggKCBydWxlT3BBbmQgKSApICkgKT0+ICggKCkgKCAoIHJ1bGVPcEFuZCApICkgKSApICggKGx2X3JpZ2h0T3BlcmFuZF8zXzA9IHJ1bGVYRXF1YWxpdHlFeHByZXNzaW9uICkgKSApKgorICAgICAgICAgICAgbG9vcDQ1OgorICAgICAgICAgICAgZG8geworICAgICAgICAgICAgICAgIGludCBhbHQ0NT0yOworICAgICAgICAgICAgICAgIGludCBMQTQ1XzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgICAgIGlmICggKExBNDVfMD09NTcpICkgeworICAgICAgICAgICAgICAgICAgICBpbnQgTEE0NV8yID0gaW5wdXQuTEEoMik7CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCAoc3lucHJlZDEwX0ludGVybmFsQ3ViZURTTCgpKSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGFsdDQ1PTE7CisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICBzd2l0Y2ggKGFsdDQ1KSB7CisgICAgICAgICAgICAJY2FzZSAxIDoKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNDE1OjI6ICggKCAoICgpICggKCBydWxlT3BBbmQgKSApICkgKT0+ICggKCkgKCAoIHJ1bGVPcEFuZCApICkgKSApICggKGx2X3JpZ2h0T3BlcmFuZF8zXzA9IHJ1bGVYRXF1YWxpdHlFeHByZXNzaW9uICkgKQorICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjQxNToyOiAoICggKCAoKSAoICggcnVsZU9wQW5kICkgKSApICk9PiAoICgpICggKCBydWxlT3BBbmQgKSApICkgKQorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI0MTU6MzogKCAoICgpICggKCBydWxlT3BBbmQgKSApICkgKT0+ICggKCkgKCAoIHJ1bGVPcEFuZCApICkgKQorICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIC8vI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ICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgIAkgICAgICAJCQlpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50KGdyYW1tYXJBY2Nlc3MuZ2V0WEFuZEV4cHJlc3Npb25SdWxlKCkpOworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIAorICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgCSAgICAgICAKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0WEFuZEV4cHJlc3Npb25BY2Nlc3MoKS5nZXRGZWF0dXJlSnZtSWRlbnRpZmlhYmxlRWxlbWVudENyb3NzUmVmZXJlbmNlXzFfMF8wXzFfMCgpKTsgCisgICAgICAgICAgICAJICAgICAgCSAgICAKKyAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgCSAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlT3BBbmRfaW5fcnVsZVhBbmRFeHByZXNzaW9uNTU1Nyk7CisgICAgICAgICAgICAJICAgIHJ1bGVPcEFuZCgpOworCisgICAgICAgICAgICAJICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIAkgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgCSAgICAgICAKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAJICAgICAgCSAgICAKKyAgIC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C5nOjI0NDM6MzogbHZfcmlnaHRPcGVyYW5kXzNfMD0gcnVsZVhFcXVhbGl0eUV4cHJlc3Npb24KKyAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgIAkgICAgICAgCisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldFhBbmRFeHByZXNzaW9uQWNjZXNzKCkuZ2V0UmlnaHRPcGVyYW5kWEVxdWFsaXR5RXhwcmVzc2lvblBhcnNlclJ1bGVDYWxsXzFfMV8wKCkpOyAKKyAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVYRXF1YWxpdHlFeHByZXNzaW9uX2luX3J1bGVYQW5kRXhwcmVzc2lvbjU1ODApOworICAgICAgICAgICAgCSAgICBsdl9yaWdodE9wZXJhbmRfM18wPXJ1bGVYRXF1YWxpdHlFeHByZXNzaW9uKCk7CisKKyAgICAgICAgICAgIAkgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgCSAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0WEFuZEV4cHJlc3Npb25SdWxlKCkpOworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgIAkgICAgICAgICAgICAgCQlzZXQoCisgICAgICAgICAgICAJICAgICAgICAgICAgIAkJCWN1cnJlbnQsIAorICAgICAgICAgICAgCSAgICAgICAgICAgICAJCQkicmlnaHRPcGVyYW5kIiwKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIAkJbHZfcmlnaHRPcGVyYW5kXzNfMCwgCisgICAgICAgICAgICAJICAgICAgICAgICAgICAJCSJYRXF1YWxpdHlFeHByZXNzaW9uIik7CisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgCSAgICAgIAkgICAgCisgICAgICAgICAgICAJICAgIH0KKworICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGJyZWFrOworCisgICAgICAgICAgICAJZGVmYXVsdCA6CisgICAgICAgICAgICAJICAgIGJyZWFrIGxvb3A0NTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9IHdoaWxlICh0cnVlKTsKKworCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGxlYXZlUnVsZSgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlWEFuZEV4cHJlc3Npb24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdW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hbW1hckFjY2Vzcy5nZXRPcEFuZFJ1bGUoKSk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZU9wQW5kX2luX2VudHJ5UnVsZU9wQW5kNTYxOSk7CisgICAgICAgICAgICBpdl9ydWxlT3BBbmQ9cnVsZU9wQW5kKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBjdXJyZW50ID1pdl9ydWxlT3BBbmQuZ2V0VGV4dCgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZU9wQW5kNTYzMCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVPcEFuZCIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlT3BBbmQiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9Jbn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1cnJlbnQubWVyZ2Uoa3cpOworICAgICAgICAgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGt3LCBncmFtbWFyQWNjZXNzLmdldE9wQW5kQWNjZXNzKCkuZ2V0QW1wZXJzYW5kQW1wZXJzYW5kS2V5d29yZCgpKTsgCisgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGxlYXZlUnVsZSgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlT3BBbmQiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlWEVxdWFsaXR5RXhwcmVzc2lvbiIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI0OTQ6MTogZW50cnlSdWxlWEVxdWFsaXR5RXhwcmVzc2lvbiByZXR1cm5zIFtFT2JqZWN0IGN1cnJlbnQ9bnVsbF0gOiBpdl9ydWxlWEVxdWFsaXR5RXhwcmVzc2lvbj0gcnVsZVhFcXVhbGl0eUV4cHJlc3Npb24gRU9GIDsKKyAgICBwdWJsaWMgZmluYWwgRU9iamVj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XF1YWxpdHlFeHByZXNzaW9uPXJ1bGVYRXF1YWxpdHlFeHByZXNzaW9uKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBjdXJyZW50ID1pdl9ydWxlWEVxdWFsaXR5RXhwcmVzc2lvbjsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVYRXF1YWxpdHlFeHByZXNzaW9uNTcxNik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVYRXF1YWxpdHlFeHByZXNzaW9uIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVYRXF1YWxpdHlFeHByZXNzaW9uIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjUwMzoxOiBydWxlWEVxdWFsaXR5RXhwcmVzc2lvbiByZXR1cm5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GlvbmFsRXhwcmVzc2lvbiAoICggKCAoICgpICggKCBydWxlT3BFcXVhbGl0eSApICkgKSApPT4gKCAoKSAoICggcnVsZU9wRXF1YWxpdHkgKSApICkgKSAoIChsdl9yaWdodE9wZXJhbmRfM18wPSBydWxlWFJlbGF0aW9uYWxFeHByZXNzaW9uICkgKSApKgorICAgICAgICAgICAgeworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0WEVxdWFsaXR5RXhwcmVzc2lvbkFjY2VzcygpLmdldFhSZWxhdGlvbmFsRXhwcmVzc2lvblBhcnNlclJ1bGVDYWxsXzAoKSk7IAorICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWFJlbGF0aW9uYWxFeHByZXNzaW9uX2luX3J1bGVYRXF1YWxpdHlFeHByZXNzaW9uNTc2Myk7CisgICAgICAgICAgICB0aGlzX1hSZWxhdGlvbmFsRXhwcmVzc2lvbl8wPXJ1bGVYUmVsYXRpb25hbEV4cHJlc3Npb24oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgPSB0aGlzX1hSZWxhdGlvbmFsRXhwcmVzc2lvbl8wOyAKKyAgICAgICAgICAgICAgICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjUxNjoxOiAoICggKCAoICgpICggKCBydWxlT3BFcXVhbGl0eSApICkgKSApPT4gKCAoKSAoICggcnVsZU9wRXF1YWxpdHkgKSApICkgKSAoIChsdl9yaWdodE9wZXJhbmRfM18wPSBydWxlWFJlbGF0aW9uYWxFeHByZXNzaW9uICkgKSApKgorICAgICAgICAgICAgbG9vcDQ2OgorICAgICAgICAgICAgZG8geworICAgICAgICAgICAgICAgIGludCBhbHQ0Nj0yOworICAgICAgICAgICAgICAgIHN3aXRjaCAoIGlucHV0LkxBKDEpICkgeworICAgICAgICAgICAgICAgIGNhc2UgNTg6CisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaW50IExBNDZfMiA9IGlucHV0LkxBKDIpOworCisgICAgICAgICAgICAgICAgICAgIGlmICggKHN5bnByZWQxMV9JbnRlcm5hbEN1YmVEU0woKSkgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBhbHQ0Nj0xOworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgNTk6CisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaW50IExBNDZfMyA9IGlucHV0LkxBKDIpOworCisgICAgICAgICAgICAgICAgICAgIGlmICggKHN5bnByZWQxMV9JbnRlcm5hbEN1YmVEU0woKSkgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBhbHQ0Nj0xOworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgNjA6CisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaW50IExBNDZfNCA9IGlucHV0LkxBKDIpOworCisgICAgICAgICAgICAgICAgICAgIGlmICggKHN5bnByZWQxMV9JbnRlcm5hbEN1YmVEU0woKSkgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBhbHQ0Nj0xOworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgNjE6CisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaW50IExBNDZfNSA9IGlucHV0LkxBKDIpOworCisgICAgICAgICAgICAgICAgICAgIGlmICggKHN5bnByZWQxMV9JbnRlcm5hbEN1YmVEU0woKSkgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBhbHQ0Nj0xOworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQ0NikgeworICAgICAgICAgICAgCWNhc2UgMSA6CisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjUxNjoyOiAoICggKCAoKSAoICggcnVsZU9wRXF1YWxpdHkgKSApICkgKT0+ICggKCkgKCAoIHJ1bGVPcEVxdWFsaXR5ICkgKSApICkgKCAobHZfcmlnaHRPcGVyYW5kXzNfMD0gcnVsZVhSZWxhdGlvbmFsRXhwcmVzc2lvbiApICkKKyAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZW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vZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1Mjg6MTogKCBydWxlT3BFcXVhbGl0eSApCisgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTI4OjE6ICggcnVsZU9wRXF1YWxpdHkgKQorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1Mjk6MzogcnVsZU9wRXF1YWxpdHkKKyAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgCSAgICAgIAkJCWlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnQoZ3JhbW1hckFjY2Vzcy5nZXRYRXF1YWxpdHlFeHByZXNzaW9uUnVsZSgpKTsKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAJICAgICAgICAgICAgICAKKyAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgIAkgICAgICAgCisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldFhFcXVhbGl0eUV4cHJlc3Npb25BY2Nlc3MoKS5nZXRGZWF0dXJlSnZtSWRlbnRpZmlhYmxlRWxlbWVudENyb3NzUmVmZXJlbmNlXzFfMF8wXzFfMCgpKTsgCisgICAgICAgICAgICAJICAgICAgCSAgICAKKyAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgCSAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlT3BFcXVhbGl0eV9pbl9ydWxlWEVxdWFsaXR5RXhwcmVzc2lvbjU4MTYpOworICAgICAgICAgICAgCSAgICBydWxlT3BFcXVhbGl0eSgpOworCisgICAgICAgICAgICAJICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIAkgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgCSAgICAgICAKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAJICAgICAgCSAgICAKKyAgICAgICAgICAgIAkgICAgfQorCisgICAgICAgICAgICAJICAgIH0KKworCisgICAgICAgICAgICAJICAgIH0KKworCisgICAgICAgICAgICAJICAgIH0KKworCisgICAgICAgICAgICAJICAgIH0KKworICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1NDI6NDogKCAobHZfcmlnaHRPcGVyYW5kXzNfMD0gcnVsZVhSZWxhdGlvbmFsRXhwcmVzc2lvbiApICkKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4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ICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVYUmVsYXRpb25hbEV4cHJlc3Npb25faW5fcnVsZVhFcXVhbGl0eUV4cHJlc3Npb241ODM5KTsKKyAgICAgICAgICAgIAkgICAgbHZfcmlnaHRPcGVyYW5kXzNfMD1ydWxlWFJlbGF0aW9uYWxFeHByZXNzaW9uKCk7CisKKyAgICAgICAgICAgIAkgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgCSAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0WEVxdWFsaXR5RXhwcmVzc2lvblJ1bGUoKSk7CisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgfQorICAgICAgICAgICAgCSAgICAgICAgICAgICAJCXNldCgKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgCQkJY3VycmVudCwgCisgICAgICAgICAgICAJICAgICAgICAgICAgIAkJCSJyaWdodE9wZXJhbmQiLAorICAgICAgICAgICAgCSAgICAgICAgICAgICAgCQlsdl9yaWdodE9wZXJhbmRfM18wLCAKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIAkJIlhSZWxhdGlvbmFsRXhwcmVzc2lvbiIpOworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgCSAgICB9CisKKyAgICAgICAgICAgIAkgICAgfQorCisKKyAgICAgICAgICAgIAkgICAgfQorCisKKyAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgCSAgICBicmVhazsKKworICAgICAgICAgICAgCWRlZmF1bHQgOgorICAgICAgICAgICAgCSAgICBicmVhayBsb29wNDY7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfSB3aGlsZSAodHJ1ZSk7CisKKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBsZWF2ZVJ1bGUoKTsgCisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gY3VycmVudDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZVhFcXVhbGl0eUV4cHJlc3Npb24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlT3BFcXVhbGl0eSIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1Njg6MTogZW50cnlSdWxlT3BFcXVhbGl0eSByZXR1cm5zIFtTdHJpbmcgY3VycmVudD1udWxsXSA6IGl2X3J1bGVPcEVxdWFsaXR5PSBydWxlT3BFcXVhbGl0eSBFT0YgOworICAgIHB1YmxpYyBmaW5hbCBTdHJpbmcgZW50cnlSdWxlT3BFcXV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ZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBjdXJyZW50ID1pdl9ydWxlT3BFcXVhbGl0eS5nZXRUZXh0KCk7IAorICAgICAgICAgICAgfQorICAgICAgICAgICAgbWF0Y2goaW5wdXQsRU9GLEZPTExPV19FT0ZfaW5fZW50cnlSdWxlT3BFcXVhbGl0eTU4ODkpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gY3VycmVudDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlT3BFcXVhbGl0eSIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlT3BFcXVhbGl0eSIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1Nzc6MTogcnVsZU9wRXF1YWxpdHkgcmV0dXJucyBbQW50bHJEYXRhdHlwZVJ1bGVUb2tlbiBjdXJyZW50PW5ldyBBbnRsckRhdGF0eXBlUnVsZVRva2VuKCldIDogKGt3PSAnPT0nIHwga3c9ICchPScgfCBrdz0gJz09PScgfCBrdz0gJyE9PScgKSA7CisgICAgcHVibGljIGZpbmFsIEFudG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jaCAoIGlucHV0LkxBKDEpICkgeworICAgICAgICAgICAgY2FzZSA1ODoKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgYWx0NDc9MTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDU5OgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBhbHQ0Nz0yOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNjA6CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGFsdDQ3PTM7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA2MToKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgYWx0NDc9NDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5iYWNrdHJhY2tpbmc+MCkge3N0YXRlLmZhaWxlZD10cnVlOyByZXR1cm4gY3VycmVudDt9CisgICAgICAgICAgICAgICAgTm9WaWFibGVBbHRFeGNlcHRpb24gbnZhZSA9CisgICAgICAgICAgICAgICAgICAgIG5ldyBOb1ZpYWJsZUFsdEV4Y2VwdGlvbigiIiwgNDcsIDAsIGlucHV0KTsKKworICAgICAgICAgICAgICAgIHRocm93IG52YWU7CisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN3aXRjaCAoYWx0NDcpIHsKKyAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI1ODI6Mjoga3c9ICc9PScKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNTgsRk9MTE9XXzU4X2luX3J1bGVPcEVxdWFsaXR5NTkyNyk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudC5tZXJnZShrdyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcEVxdWFsaXR5QWNjZXNzKCkuZ2V0RXF1YWxzU2lnbkVxdWFsc1NpZ25LZXl3b3JkXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSAyIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTg5OjI6IGt3PSAnIT0nCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAga3c9KFRva2VuKW1hdGNoKGlucHV0LDU5LEZPTExPV181OV9pbl9ydWxlT3BFcXVhbGl0eTU5NDYpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQubWVyZ2Uoa3cpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3TGVhZk5vZGUoa3csIGdyYW1tYXJBY2Nlc3MuZ2V0T3BFcXVhbGl0eUFjY2VzcygpLmdldEV4Y2xhbWF0aW9uTWFya0VxdWFsc1NpZ25LZXl3b3JkXzEoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSAzIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNTk2OjI6IGt3PSAnPT09JworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGt3PShUb2tlbiltYXRjaChpbnB1dCw2MCxGT0xMT1dfNjBfaW5fcnVsZU9wRXF1YWxpdHk1OTY1KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Lm1lcmdlKGt3KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGt3LCBncmFtbWFyQWNjZXNzLmdldE9wRXF1YWxpdHlBY2Nlc3MoKS5nZXRFcXVhbHNTaWduRXF1YWxzU2lnbkVxdWFsc1NpZ25LZXl3b3JkXzIoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSA0IDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNjAzOjI6IGt3PSAnIT09JworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGt3PShUb2tlbiltYXRjaChpbnB1dCw2MSxGT0xMT1dfNjFfaW5fcnVsZU9wRXF1YWxpdHk1OTg0KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Lm1lcmdlKGt3KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGt3LCBncmFtbWFyQWNjZXNzLmdldE9wRXF1YWxpdHlBY2Nlc3MoKS5nZXRFeGNsYW1hdGlvbk1hcmtFcXVhbHNTaWduRXF1YWxzU2lnbktleXdvcmRfMygpKTsgCisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBsZWF2ZVJ1bGUoKTsgCisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2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EVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZVhSZWxhdGlvbmFsRXhwcmVzc2lvbjYwMzQpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKworICAgICAgICAgICAgfQorCisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gY3VycmVudDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAiZW50cnlSdWxlWFJlbGF0aW9uYWxFeHByZXNzaW9uIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVYUmVsYXRpb25hbEV4cHJlc3Npb24iCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNjI1OjE6IHJ1bGVYUmVsYXRpb25hbEV4cHJlc3Npb24gcmV0dXJucyBbRU9iamVjdCBjdXJyZW50PW51bGxdIDogKHRoaXNfWE90aGVyT3BlcmF0b3JFeHByZXNzaW9uXzA9IHJ1bGVYT3RoZXJPcGVyYXRvckV4cHJlc3Npb24gKCAoICggKCAoICgpICdpbnN0YW5jZW9mJyApICk9PiAoICgpIG90aGVybHZfMj0gJ2luc3RhbmNlb2YnICkgKSAoIChsdl90eXBlXzNfMD0gcnVsZUp2bVR5cGVSZWZlcmVuY2UgKSApICkgfCAoICggKCAoICgpICggKCBydWxlT3BDb21wYXJlICkgKSApICk9PiAoICgpICggKCBydW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21wYXJlICkgKSApICk9PiAoICgpICggKCBydWxlT3BDb21wYXJlICkgKSApICkgKCAobHZfcmlnaHRPcGVyYW5kXzZfMD0gcnVsZVhPdGhlck9wZXJhdG9yRXhwcmVzc2lvbiApICkgKSApKiApCisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI2MzA6NTogdGhpc19YT3RoZXJPcGVyYXRvckV4cHJlc3Npb25fMD0gcnVsZVhPdGhlck9wZXJhdG9yRXhwcmVzc2lvbiAoICggKCAoICggKCkgJ2luc3RhbmNlb2YnICkgKT0+ICggKCkgb3RoZXJsdl8yPSAnaW5zdGFuY2VvZicgKSApICggKGx2X3R5cGVfM18wPSBydWxlSnZtVHlwZVJlZmVyZW5jZSApICkgKSB8ICggKCAoICggKCkgKCAoIHJ1bGVPcENvbXBhcmUgKSApICkgKT0+ICggKCkgKCAoIHJ1bGVPcENvbXBhcmUgKSApICkgKSAoIChsdl9yaWdodE9wZXJhbmRfNl8wPSBydWxlWE90aGVyT3BlcmF0b3JFeHByZXNzaW9uICkgKSApICkqCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRYUmVsYXRpb25hbEV4cHJlc3Npb25BY2Nlc3MoKS5nZXRYT3RoZXJPcGVyYXRvckV4cHJlc3Npb25QYXJzZXJSdWxlQ2FsbF8wKCkpOyAKKyAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVhPdGhlck9wZXJhdG9yRXhwcmVzc2lvbl9pbl9ydWxlWFJlbGF0aW9uYWxFeHByZXNzaW9uNjA4MSk7CisgICAgICAgICAgICB0aGlzX1hPdGhlck9wZXJhdG9yRXhwcmVzc2lvbl8wPXJ1bGVYT3RoZXJPcGVyYXRvckV4cHJlc3Npb24oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgPSB0aGlzX1hPdGhlck9wZXJhdG9yRXhwcmVzc2lvbl8wOyAKKyAgICAgICAgICAgICAgICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjYzODoxOiAoICggKCAoICggKCkgJ2luc3RhbmNlb2YnICkgKT0+ICggKCkgb3RoZXJsdl8yPSAnaW5zdGFuY2VvZicgKSApICggKGx2X3R5cGVfM18wPSBydWxlSnZtVHlwZVJlZmVyZW5jZSApICkgKSB8ICggKCAoICggKCkgKCAoIHJ1bGVPcENvbXBhcmUgKSApICkgKT0+ICggKCkgKCAoIHJ1bGVPcENvbXBhcmUgKSApICkgKSAoIChsdl9yaWdodE9wZXJhbmRfNl8wPSBydWxlWE90aGVyT3BlcmF0b3JFeHByZXNzaW9uICkgKSApICkqCisgICAgICAgICAgICBsb29wNDg6CisgICAgICAgICAgICBkbyB7CisgICAgICAgICAgICAgICAgaW50IGFsdDQ4PTM7CisgICAgICAgICAgICAgICAgc3dpdGNoICggaW5wdXQuTEEoMSkgKSB7CisgICAgICAgICAgICAgICAgY2FzZSA1MzoKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpbnQgTEE0OF8yID0gaW5wdXQuTEEoMik7CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCAoc3lucHJlZDEzX0ludGVybmFsQ3ViZURTTCgpKSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGFsdDQ4PTI7CisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSA1NDoKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpbnQgTEE0OF8zID0gaW5wdXQuTEEoMik7CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCAoc3lucHJlZDEzX0ludGVybmFsQ3ViZURTTCgpKSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGFsdDQ4PTI7CisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSA2MjoKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpbnQgTEE0OF80ID0gaW5wdXQuTEEoMik7CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCAoc3lucHJlZDEyX0ludGVybmFsQ3ViZURTTCgpKSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGFsdDQ4PTE7CisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSA1NToKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBpbnQgTEE0OF81ID0gaW5wdXQuTEEoMik7CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCAoc3lucHJlZDEzX0ludGVybmFsQ3ViZURTTCgpKSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGFsdDQ4PTI7CisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICBzd2l0Y2ggKGFsdDQ4KSB7CisgICAgICAgICAgICAJY2FzZSAxIDoKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNjM4OjI6ICggKCAoICggKCkgJ2luc3RhbmNlb2YnICkgKT0+ICggKCkgb3RoZXJsdl8yPSAnaW5zdGFuY2VvZicgKSApICggKGx2X3R5cGVfM18wPSBydWxlSnZtVHlwZVJlZmVyZW5jZSApICkgKQorICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjYzODoyOiAoICggKCAoICgpICdpbnN0YW5jZW9mJyApICk9PiAoICgpIG90aGVybHZfMj0gJ2luc3RhbmNlb2YnICkgKSAoIChsdl90eXBlXzNfMD0gcnVsZUp2bVR5cGVSZWZlcmVuY2UgKSApICkKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1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5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjY0MDo2OiAoKSBvdGhlcmx2XzI9ICdpbnN0YW5jZW9mJworICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjY0MDo2OiAoKQorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI2NDE6NTogCisgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIGN1cnJlbnQgPSBmb3JjZUNyZWF0ZU1vZGVsRWxlbWVudEFuZFNldCgKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgICAgICBncmFtbWFyQWNjZXNzLmdldFhSZWxhdGlvbmFsRXhwcmVzc2lvbkFjY2VzcygpLmdldFhJbnN0YW5jZU9mRXhwcmVzc2lvbkV4cHJlc3Npb25BY3Rpb25fMV8wXzBfMF8wKCksCisgICAgICAgICAgICAJICAgICAgICAgICAgICAgICAgY3VycmVudCk7CisgICAgICAgICAgICAJICAgICAgICAgIAorICAgICAgICAgICAgCSAgICB9CisKKyAgICAgICAgICAgIAkgICAgfQorCisgICAgICAgICAgICAJIC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mFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudEZvclBhcmVudChncmFtbWFyQWNjZXNzLmdldFhSZWxhdGlvbmFsRXhwcmVzc2lvblJ1bGUoKSk7CisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgfQorICAgICAgICAgICAgCSAgICAgICAgICAgICAJCXNldCgKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgCQkJY3VycmVudCwgCisgICAgICAgICAgICAJICAgICAgICAgICAgIAkJCSJ0eXBlIiwKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIAkJbHZfdHlwZV8zXzAsIAorICAgICAgICAgICAgCSAgICAgICAgICAgICAgCQkiSnZtVHlwZVJlZmVyZW5jZSIpOworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgCSAgICB9CisKKyAgICAgICAgICAgIAkgICAgfQorCisKKyAgICAgICAgICAgIAkgICAgfQorCisKKyAgICAgICAgICAgIAkgICAgfQorCisKKyAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgCSAgICBicmVhazsKKyAgICAgICAgICAgIAljYXNlIDIgOgorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI2Njk6NjogKCAoICggKCAoKSAoICggcnVsZU9wQ29tcGFyZSApICkgKSApPT4gKCAoKSAoICggcnVsZU9wQ29tcGFyZSApICkgKSApICggKGx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YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI2NzU6NTogCisgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIGN1cnJlbnQgPSBmb3JjZUNyZWF0ZU1vZGVsRWxlbWVudEFuZFNldCgKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgICAgICBncmFtbWFyQWNjZXNzLmdldFhSZWxhdGlvbmFsRXhwcmVzc2lvbkFjY2VzcygpLmdldFhCaW5hcnlPcGVyYXRpb25MZWZ0T3BlcmFuZEFjdGlvbl8xXzFfMF8wXzAoKSwKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgICAgICBjdXJyZW50KTsKKyAgICAgICAgICAgIAkgICAgICAgICAgCisgICAgICAgICAgICAJICAgIH0KKworICAgICAgICAgICAgCSAgICB9CisKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNjgwOjI6ICggKCBydWxlT3BDb21wYXJlICkgKQorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI2ODE6MTogKCBydWxlT3BDb21wYXJlICkKKyAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI2ODE6MTogKCBydWxlT3BDb21wYXJlICkKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNjgyOjM6IHJ1bGVPcENvbXBhcmUKKyAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgCSAgICAgIAkJCWlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnQoZ3JhbW1hckFjY2Vzcy5nZXRYUmVsYXRpb25hbEV4cHJlc3Npb25SdWxlKCkpOworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIAorICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgCSAgICAgICAKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0WFJlbGF0aW9uYWxFeHByZXNzaW9uQWNjZXNzKCkuZ2V0RmVhdHVyZUp2bUlkZW50aWZpYWJsZUVsZW1lbnRDcm9zc1JlZmVyZW5jZV8xXzFfMF8wXzFfMCgpKTsgCisgICAgICAgICAgICAJICAgICAgCSAgICAKKyAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgCSAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlT3BDb21wYXJlX2luX3J1bGVYUmVsYXRpb25hbEV4cHJlc3Npb242MjAxKTsKKyAgICAgICAgICAgIAkgICAgcnVsZU9wQ29tcGFyZSgpOworCisgICAgICAgICAgICAJICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIAkgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgCSAgICAgICAKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAJICAgICAgCSAgICAKKyAgICAgICAgICAgIAkgICAgfQorCisgICAgICAgICAgICAJICAgIH0KKworCisgICAgICAgICAgICAJICAgIH0KKworCisgICAgICAgICAgICAJICAgIH0KKworCisgICAgICAgICAgICAJICAgIH0KKworICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI2OTU6NDogKCAobHZfcmlnaHRPcGVyYW5kXzZfMD0gcnVsZVhPdGhlck9wZXJhdG9yRXhwcmVzc2lvbiApICkKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNjk2OjE6IChsdl9yaWdodE9wZXJhbmRfNl8wPSBydWxlWE90aGVyT3BlcmF0b3JFeHByZXNzaW9uICkKKyAgICAgICAgICAgIAkgICAgeworICAgICAg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3JFeHByZXNzaW9uKCk7CisKKyAgICAgICAgICAgIAkgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgCSAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0WFJlbGF0aW9uYWxFeHByZXNzaW9uUnVsZSgpKTsKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAJICAgICAgICAgICAgIAkJc2V0KAorICAgICAgICAgICAgCSAgICAgICAgICAgICAJCQljdXJyZW50LCAKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgCQkJInJpZ2h0T3BlcmFuZCIsCisgICAgICAgICAgICAJICAgICAgICAgICAgICAJCWx2X3JpZ2h0T3BlcmFuZF82XzAsIAorICAgICAgICAgICAgCSAgICAgICAgICAgICAgCQkiWE90aGVyT3BlcmF0b3JFeHByZXNzaW9uIik7CisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgCSAgICAgIAkgICAgCisgICAgICAgICAgICAJICAgIH0KKworICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGJyZWFrOworCisgICAgICAgICAgICAJZGVmYXVsdCA6CisgICAgICAgICAgICAJICAgIGJyZWFrIGxvb3A0ODsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9IHdoaWxlICh0cnVlKTsKKworCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGxlYXZlUnVsZSgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlWFJlbGF0aW9uYWxFeHByZXNzaW9uIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZU9wQ29tcGFyZSIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI3MjE6MTogZW50cnlSdWxlT3BDb21wYXJlIHJldHVybnMgW1N0cmluZyBjdXJyZW50PW51bGxdIDogaXZfcnVsZU9wQ29tcGFyZT0gcnVsZU9wQ29tcGFyZSBFT0YgOworICAgIHB1YmxpYyBmaW5hbCBTdHJpbmcgZW50cnlSdWxlT3BDb21wYXJlKCkgdGhyb3dzIFJlY29nbml0aW9uRXhjZXB0aW9uIHsKKyAgICAgICAgU3RyaW5nIGN1cnJlbnQgPSBudWxsOworCisgICAgICAgIEFudGxyRGF0YXR5cGVSdWxlVG9rZW4gaXZfcnVsZU9wQ29tcGFyZSA9IG51bGw7CisKKworICAgICAgICB0cnkgeworICAg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AgICAgICB7CisgICAgICAgICAgICAgICAgaW50IExBNDlfMiA9IGlucHV0LkxBKDIpOworCisgICAgICAgICAgICAgICAgaWYgKCAoTEE0OV8yPT1FT0Z8fChMQTQ5XzI+PVJVTEVfSUQgJiYgTEE0OV8yPD1SVUxFX0RFQ0lNQUwpfHxMQTQ5XzI9PTE0fHxMQTQ5XzI9PTM3fHxMQTQ5XzI9PTQxfHwoTEE0OV8yPj00NSAmJiBMQTQ5XzI8PTQ2KXx8TEE0OV8yPT01M3x8KExBNDlfMj49NjkgJiYgTEE0OV8yPD03MCl8fExBNDlfMj09NzR8fExBNDlfMj09ODF8fExBNDlfMj09ODN8fChMQTQ5XzI+PTg3ICYmIExBNDlfMjw9ODkpfHwoTEE0OV8yPj05MiAmJiBMQTQ5XzI8PTEwMyl8fExBNDlfMj09MTA1KSApIHsKKyAgICAgICAgICAgICAgICAgICAgYWx0NDk9NDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoIChMQTQ5XzI9PTQ0KSApIHsKKyAgICAgICAgICAgICAgICAgICAgYWx0NDk9MjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5iYWNrdHJhY2tpbmc+MCkge3N0YXRlLmZhaWxlZD10cnVlOyByZXR1cm4gY3VycmVudDt9CisgICAgICAgICAgICAgICAgICAgIE5vVmlhYmxlQWx0RXhjZXB0aW9uIG52YWUgPQorICAgICAgICAgICAgICAgICAgICAgICAgbmV3IE5vVmlhYmxlQWx0RXhjZXB0aW9uKCIiLCA0OSwgMiwgaW5wdXQpOworCisgICAgICAgICAgICAgICAgICAgIHRocm93IG52YWU7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNTQ6CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGFsdDQ5PTM7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgZGVmYXVsdDoKKyAgICAgICAgICAgICAgICBpZiAoc3RhdGUuYmFja3RyYWNraW5nPjApIHtzdGF0ZS5mYWlsZWQ9dHJ1ZTsgcmV0dXJuIGN1cnJlbnQ7fQorICAgICAgICAgICAgICAgIE5vVmlhYmxlQWx0RXhjZXB0aW9uIG52YWUgPQorICAgICAgICAgICAgICAgICAgICBuZXcgTm9WaWFibGVBbHRFeGNlcHRpb24oIiIsIDQ5LCAwLCBpbnB1dCk7CisKKyAgICAgICAgICAgICAgICB0aHJvdyBudmFlOworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzd2l0Y2ggKGFsdDQ5KSB7CisgICAgICAgICAgICAgICAgY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNzM1OjI6IGt3PSAnPj0nCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAga3c9KFRva2VuKW1hdGNoKGlucHV0LDU1LEZPTExPV181NV9pbl9ydWxlT3BDb21wYXJlNjMxMyk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudC5tZXJnZShrdyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcENvbXBhcmVBY2Nlc3MoKS5nZXRHcmVhdGVyVGhhblNpZ25FcXVhbHNTaWduS2V5d29yZF8wKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgMiA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Mjc0MTo2OiAoa3c9ICc8JyBrdz0gJz0nICkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI3NDE6NjogKGt3PSAnPCcga3c9ICc9JyApCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Mjc0MjoyOiBrdz0gJzwnIGt3PSAnPScKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNTMsRk9MTE9XXzUzX2luX3J1bGVPcENvbXBhcmU2MzMzKTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Lm1lcmdlKGt3KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGt3LCBncmFtbWFyQWNjZXNzLmdldE9wQ29tcGFyZUFjY2VzcygpLmdldExlc3NUaGFuU2lnbktleXdvcmRfMV8wKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAga3c9KFRva2VuKW1hdGNoKGlucHV0LDQ0LEZPTExPV180NF9pbl9ydWxlT3BDb21wYXJlNjM0Nik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudC5tZXJnZShrdyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcENvbXBhcmVBY2Nlc3MoKS5nZXRFcXVhbHNTaWduS2V5d29yZF8xXzEoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSAzIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNzU1OjI6IGt3PSAnPicKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNTQsRk9MTE9XXzU0X2luX3J1bGVPcENvbXBhcmU2MzY2KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Lm1lcmdlKGt3KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGt3LCBncmFtbWFyQWNjZXNzLmdldE9wQ29tcGFyZUFjY2VzcygpLmdldEdyZWF0ZXJUaGFuU2lnbktleXdvcmRfMigpKTsgCisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIDQgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI3NjI6Mjoga3c9ICc8JworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGt3PShUb2tlbiltYXRjaChpbnB1dCw1MyxGT0xMT1dfNTNfaW5fcnVsZU9wQ29tcGFyZTYzODUpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQubWVyZ2Uoa3cpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3TGVhZk5vZGUoa3csIGdyYW1tYXJBY2Nlc3MuZ2V0T3BDb21wYXJlQWNjZXNzKCkuZ2V0TGVzc1RoYW5TaWduS2V5d29yZF8zKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGxlYXZlUnVsZSgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlT3BDb21wYXJlIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZVhPdGhlck9wZXJhdG9yRXhwcmVzc2lvbiIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI3NzU6MTogZW50cnlSdWxlWE90aGVyT3BlcmF0b3JFeHByZXNzaW9uIHJldHVybnMgW0VPYmplY3QgY3VycmVudD1udWxsXSA6IGl2X3J1bGVYT3RoZXJPcGVyYXRvckV4cHJlc3Npb249IHJ1bGVYT3RoZXJPcGVyYXRvckV4cH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cmVzc2lvbl9pbl9lbnRyeVJ1bGVYT3RoZXJPcGVyYXRvckV4cHJlc3Npb242NDI1KTsKKyAgICAgICAgICAgIGl2X3J1bGVYT3RoZXJPcGVyYXRvckV4cHJlc3Npb249cnVsZVhPdGhlck9wZXJhdG9yRXhwcmVzc2lvbigpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgY3VycmVudCA9aXZfcnVsZVhPdGhlck9wZXJhdG9yRXhwcmVzc2lvbjsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVYT3RoZXJPcGVyYXRvckV4cHJlc3Npb242NDM1KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeyAKKyAgICAgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsgCisgICAgICAgICAgICAgICAgYXBwZW5kU2tpcHBlZFRva2VucygpOworICAgICAgICAgICAgfSAKKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIGN1cnJlbnQ7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZVhPdGhlck9wZXJhdG9yRXhwcmVzc2lvbiIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlWE90aGVyT3BlcmF0b3JFeHByZXNzaW9uIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYn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KyAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgfQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyNzk3OjE6ICggKCAoICggKCkgKCAoIHJ1bGVPcE90aGVyICkgKSApICk9PiAoICgpICggKCBydWxlT3BPdGhlciApICkgKSApICggKGx2X3JpZ2h0T3BlcmFuZF8zXzA9IHJ1bGVYQWRkaXRpdmVFeHByZXNzaW9uICkgKSApKgorICAgICAgICAgICAgbG9vcDUwOgorICAgICAgICAgICAgZG8geworICAgICAgICAgICAgICAgIGludCBhbHQ1MD0yOworICAgICAgICAgICAgICAgIGFsdDUwID0gZGZhNTAucHJlZGljdChpbnB1dCk7CisgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQ1MCkgeworICAgICAgICAgICAgCWNhc2UgMSA6CisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Mjc5NzoyOiAoICggKCAoKSAoICggcnVsZU9wT3RoZXIgKSApICkgKT0+ICggKCkgKCAoIHJ1bGVPcE90aGVyICkgKSApICkgKCAobHZfcmlnaHRPcGVyYW5kXzNfMD0gcnVsZVhBZGRpdGl2ZUV4cHJlc3Npb24gKSApCisgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm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gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyODAzOjU6IAorICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAJICAgICAgICAgICAgICBjdXJyZW50ID0gZm9yY2VDcmVhdGVNb2RlbEVsZW1lbnRBbmRTZXQoCisgICAgICAgICAgICAJICAgICAgICAgICAgICAgICAgZ3JhbW1hckFjY2Vzcy5nZXRYT3RoZXJPcGVyYXRvckV4cHJlc3Npb25BY2Nlc3MoKS5nZXRYQmluYXJ5T3BlcmF0aW9uTGVmdE9wZXJhbmRBY3Rpb25fMV8wXzBfMCgpLAorICAgICAgICAgICAgCSAgICAgICAgICAgICAgICAgIGN1cnJlbnQpOworICAgICAgICAgICAgCSAgICAgICAgICAKKyAgICAgICAgICAgIAkgICAgfQorCisgICAgICAgICAgICAJICAgIH0KKworICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI4MDg6MjogKCAoIHJ1bGVPcE90aGVyICkgKQorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI4MDk6MTogKCBydWxlT3BPdGhlciApCisgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyODA5OjE6ICggcnVsZU9wT3RoZXIgKQorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI4MTA6MzogcnVsZU9wT3RoZXIKKyAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgCSAgICAgIAkJCWlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnQoZ3JhbW1hckFjY2Vzcy5nZXRYT3RoZXJPcGVyYXRvckV4cHJlc3Npb25SdWxlKCkpOworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIAorICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgCSAgICAgICAKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0WE90aGVyT3BlcmF0b3JFeHByZXNzaW9uQWNjZXNzKCkuZ2V0RmVhdHVyZUp2bUlkZW50aWZpYWJsZUVsZW1lbnRDcm9zc1JlZmVyZW5jZV8xXzBfMF8xXzAoKSk7IAorICAgICAgICAgICAgCSAgICAgIAkgICAgCisgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgIAkgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZU9wT3RoZXJfaW5fcnVsZVhPdGhlck9wZXJhdG9yRXhwcmVzc2lvbjY1MzUpOworICAgICAgICAgICAgCSAgICBydWxlT3BPdGhlcigpOworCisgICAgICAgICAgICAJICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIAkgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgCSAgICAgICAKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAJICAgICAgCSAgICAKKyAgICAgICAgICAgIAkgICAgfQorCisgICAgICAgICAgICAJICAgIH0KKworCisgICAgICAgICAgICAJICAgIH0KKworCisgICAgICAgICAgICAJICAgIH0KKworCisgICAgICAgICAgICAJICAgIH0KKworICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI4MjM6NDogKCAobHZfcmlnaHRPcGVyYW5kXzNfMD0gcnVsZVhBZGRpdGl2ZUV4cHJlc3Npb24gKSApCisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjgyNDoxOiAobHZfcmlnaHRPcGVyYW5kXzN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2X3JpZ2h0T3BlcmFuZF8zXzA9cnVsZVhBZGRpdGl2ZUV4cHJlc3Npb24oKTsKKworICAgICAgICAgICAgCSAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAJICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnRGb3JQYXJlbnQoZ3JhbW1hckFjY2Vzcy5nZXRYT3RoZXJPcGVyYXRvckV4cHJlc3Npb25SdWxlKCkpOworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgIAkgICAgICAgICAgICAgCQlzZXQoCisgICAgICAgICAgICAJICAgICAgICAgICAgIAkJCWN1cnJlbnQsIAorICAgICAgICAgICAgCSAgICAgICAgICAgICAJCQkicmlnaHRPcGVyYW5kIiwKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIAkJbHZfcmlnaHRPcGVyYW5kXzNfMCwgCisgICAgICAgICAgICAJICAgICAgICAgICAgICAJCSJYQWRkaXRpdmVFeHByZXNzaW9uIik7CisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgCSAgICAgIAkgICAgCisgICAgICAgICAgICAJICAgIH0KKworICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGJyZWFrOworCisgICAgICAgICAgICAJZGVmYXVsdCA6CisgICAgICAgICAgICAJICAgIGJyZWFrIGxvb3A1MDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9IHdoaWxlICh0cnVlKTsKKworCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGxlYXZlUnVsZSgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlWE90aGVyT3BlcmF0b3JFeHByZXNzaW9uIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZU9wT3RoZXIiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyODQ5OjE6IGVudHJ5UnVsZU9wT3RoZXIgcmV0dXJucyBbU3RyaW5nIGN1cnJlbnQ9bnVsbF0gOiBpdl9ydWxlT3BPdGhlcj0gcnVsZU9wT3RoZXIgRU9GIDsKKyAgICBwdWJsaWMgZmluYWwgU3RyaW5nIGVudHJ5UnVsZU9wT3RoZXIoKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICBTdHJpbmcgY3VycmVudCA9IG51bGw7CisKKyAgICAgICAgQW50bHJEYXRhdHlwZVJ1bGVUb2tlbiBpdl9ydWxlT3BPdGhlciA9IG51bGw7CisKKworICAgICAgICB0cnkgeworICA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4KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeyAKKyAgICAgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsgCisgICAgICAgICAgICAgICAgYXBwZW5kU2tpcHBlZFRva2VucygpOworICAgICAgICAgICAgfSAKKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIGN1cnJlbnQ7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZU9wT3RoZXIiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAicnVsZU9wT3RoZXIiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyODU4OjE6IHJ1bGVPcE90aGVyIHJldHVybnMgW0FudGxyRGF0YXR5cGVSdWxlVG9rZW4gY3VycmVudD1uZXcgQW50bHJEYXRhdHlwZVJ1bGVUb2tlbigpXSA6IChrdz0gJy0+JyB8IGt3PSAnLi48JyB8IChrdz0gJz4nIGt3PSAnLi4nICkgfCBrdz0gJy4uJyB8IGt3PSAnPT4nIHwgKGt3PSAnPicgKCAoICggKCAnPicgJz4nICkgKT0+IChrdz0gJz4nIGt3PSAnPicgKSApIHwga3c9ICc+JyApICkgfCAoa3c9ICc8JyAoICggKCAoICc8JyAnPCcgKSApPT4gKGt3PSAnPCcga3c9ICc8JyApICkgfCBrdz0gJzwnIHwga3c9ICc9PicgKSApIHwga3c9ICc8PicgfCBrdz0gJz86JyApIDsKKyAgICBwdWJsaWMgZmluYWwgQW50bHJEYXRhdHlwZVJ1bGV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PicgKSApIHwga3c9ICc+JyApICkgfCAoa3c9ICc8JyAoICggKCAoICc8JyAnPCcgKSApPT4gKGt3PSAnPCcga3c9ICc8JyApICkgfCBrdz0gJzwnIHwga3c9ICc9PicgKSApIHwga3c9ICc8PicgfCBrdz0gJz86JyApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI4NjI6MTogKGt3PSAnLT4nIHwga3c9ICcuLjwnIHwgKGt3PSAnPicga3c9ICcuLicgKSB8IGt3PSAnLi4nIHwga3c9ICc9PicgfCAoa3c9ICc+JyAoICggKCAoICc+JyAnPicgKSApPT4gKGt3PSAnPicga3c9ICc+JyApICkgfCBrdz0gJz4nICkgKSB8IChrdz0gJzwnICggKCAoICggJzwnICc8JyApICk9PiAoa3c9ICc8JyBrdz0gJzwnICkgKSB8IGt3PSAnPCcgfCBrdz0gJz0+JyApICkgfCBrdz0gJzw+JyB8IGt3PSAnPzonICkKKyAgICAgICAgICAgIGludCBhbHQ1Mz05OworICAgICAgICAgICAgYWx0NTMgPSBkZmE1My5wcmVkaWN0KGlucHV0KTsKKyAgICAgICAgICAgIHN3aXRjaCAoYWx0NTMpIHsKKyAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI4NjM6Mjoga3c9ICctPicKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNjMsRk9MTE9XXzYzX2luX3J1bGVPcE90aGVyNjY0Nik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudC5tZXJnZShrdyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcE90aGVyQWNjZXNzKCkuZ2V0SHlwaGVuTWludXNHcmVhdGVyVGhhblNpZ25LZXl3b3JkXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSAyIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyODcwOjI6IGt3PSAnLi48JworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGt3PShUb2tlbiltYXRjaChpbnB1dCw2NCxGT0xMT1dfNjRfaW5fcnVsZU9wT3RoZXI2NjY1KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Lm1lcmdlKGt3KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGt3LCBncmFtbWFyQWNjZXNzLmdldE9wT3RoZXJBY2Nlc3MoKS5nZXRGdWxsU3RvcEZ1bGxTdG9wTGVzc1RoYW5TaWduS2V5d29yZF8xKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgMyA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Mjg3Njo2OiAoa3c9ICc+JyBrdz0gJy4uJyApCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyODc2OjY6IChrdz0gJz4nIGt3PSAnLi4nICkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyODc3OjI6IGt3PSAnPicga3c9ICcuLicKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNTQsRk9MTE9XXzU0X2luX3J1bGVPcE90aGVyNjY4NSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudC5tZXJnZShrdyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcE90aGVyQWNjZXNzKCkuZ2V0R3JlYXRlclRoYW5TaWduS2V5d29yZF8yXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNjUsRk9MTE9XXzY1X2luX3J1bGVPcE90aGVyNjY5OCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudC5tZXJnZShrdyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcE90aGVyQWNjZXNzKCkuZ2V0RnVsbFN0b3BGdWxsU3RvcEtleXdvcmRfMl8xKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgNCA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Mjg5MDoyOiBrdz0gJy4uJworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGt3PShUb2tlbiltYXRjaChpbnB1dCw2NSxGT0xMT1dfNjVfaW5fcnVsZU9wT3RoZXI2NzE4KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Lm1lcmdlKGt3KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGt3LCBncmFtbWFyQWNjZXNzLmdldE9wT3RoZXJBY2Nlc3MoKS5nZXRGdWxsU3RvcEZ1bGxTdG9wS2V5d29yZF8zKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgNSA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Mjg5NzoyOiBrdz0gJz0+JworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGt3PShUb2tlbiltYXRjaChpbnB1dCw2NixGT0xMT1dfNjZfaW5fcnVsZU9wT3RoZXI2NzM3KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Lm1lcmdlKGt3KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGt3LCBncmFtbWFyQWNjZXNzLmdldE9wT3RoZXJBY2Nlc3MoKS5nZXRFcXVhbHNTaWduR3JlYXRlclRoYW5TaWduS2V5d29yZF80KCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgNiA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjkwMzo2OiAoa3c9ICc+JyAoICggKCAoICc+JyAnPicgKSApPT4gKGt3PSAnPicga3c9ICc+JyApICkgfCBrdz0gJz4nICkgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjkwMzo2OiAoa3c9ICc+JyAoICggKCAoICc+JyAnPicgKSApPT4gKGt3PSAnPicga3c9ICc+JyApICkgfCBrdz0gJz4nICkgKQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5MDQ6Mjoga3c9ICc+JyAoICggKCAoICc+JyAnPicgKSApPT4gKGt3PSAnPicga3c9ICc+JyApICkgfCBrdz0gJz4nICkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNTQsRk9MTE9XXzU0X2luX3J1bGVPcE90aGVyNjc1Nyk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudC5tZXJnZShrdyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcE90aGVyQWNjZXNzKCkuZ2V0R3JlYXRlclRoYW5TaWduS2V5d29yZF81XzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5MDk6MTogKCAoICggKCAnPicgJz4nICkgKT0+IChrdz0gJz4nIGt3PSAnPicgKSApIHwga3c9ICc+JyApCisgICAgICAgICAgICAgICAgICAgIGludCBhbHQ1MT0yOworICAgICAgICAgICAgICAgICAgICBpbnQgTEE1MV8wID0gaW5wdXQuTEEoMSk7CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCAoTEE1MV8wPT01NCkgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBpbnQgTEE1MV8xID0gaW5wdXQuTEEoMik7CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmICggKExBNTFfMT09NTQpICYmIChzeW5wcmVkMTVfSW50ZXJuYWxDdWJlRFNMKCkpKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWx0NTE9MTsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEE1MV8xPT1FT0Z8fChMQTUxXzE+PVJVTEVfSUQgJiYgTEE1MV8xPD1SVUxFX0RFQ0lNQUwpfHxMQTUxXzE9PTE0fHxMQTUxXzE9PTM3fHxMQTUxXzE9PTQxfHwoTEE1MV8xPj00NSAmJiBMQTUxXzE8PTQ2KXx8TEE1MV8xPT01M3x8KExBNTFfMT49NjkgJiYgTEE1MV8xPD03MCl8fExBNTFfMT09NzR8fExBNTFfMT09ODF8fExBNTFfMT09ODN8fChMQTUxXzE+PTg3ICYmIExBNTFfMTw9ODkpfHwoTEE1MV8xPj05MiAmJiBMQTUxXzE8PTEwMyl8fExBNTFfMT09MTA1KSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbHQ1MT0yOworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmJhY2t0cmFja2luZz4wKSB7c3RhdGUuZmFpbGVkPXRydWU7IHJldHVybiBjdXJyZW50O30KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBOb1ZpYWJsZUFsdEV4Y2VwdGlvbiBudmFlID0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3IE5vVmlhYmxlQWx0RXhjZXB0aW9uKCIiLCA1MSwgMSwgaW5wdXQpOworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbnZhZTsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdGF0ZS5iYWNrdHJhY2tpbmc+MCkge3N0YXRlLmZhaWxlZD10cnVlOyByZXR1cm4gY3VycmVudDt9CisgICAgICAgICAgICAgICAgICAgICAgICBOb1ZpYWJsZUFsdEV4Y2VwdGlvbiBudmFlID0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXcgTm9WaWFibGVBbHRFeGNlcHRpb24oIiIsIDUxLCAwLCBpbnB1dCk7CisKKyAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG52YWU7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChhbHQ1MSkgeworICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxIDoKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5MDk6MjogKCAoICggJz4nICc+JyApICk9PiAoa3c9ICc+JyBrdz0gJz4nICkgKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5MDk6MjogKCAoICggJz4nICc+JyApICk9PiAoa3c9ICc+JyBrdz0gJz4nICkgKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjkwOTozOiAoICggJz4nICc+JyApICk9PiAoa3c9ICc+JyBrdz0gJz4nICkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyOTEzOjU6IChrdz0gJz4nIGt3PSAnPicgKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjkxNDoyOiBrdz0gJz4nIGt3PSAnPicKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAga3c9KFRva2VuKW1hdGNoKGlucHV0LDU0LEZPTExPV181NF9pbl9ydWxlT3BPdGhlcjY3ODgpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Lm1lcmdlKGt3KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3TGVhZk5vZGUoa3csIGdyYW1tYXJBY2Nlc3MuZ2V0T3BPdGhlckFjY2VzcygpLmdldEdyZWF0ZXJUaGFuU2lnbktleXdvcmRfNV8xXzBfMF8wKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAga3c9KFRva2VuKW1hdGNoKGlucHV0LDU0LEZPTExPV181NF9pbl9ydWxlT3BPdGhlcjY4MDEpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Lm1lcmdlKGt3KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3TGVhZk5vZGUoa3csIGdyYW1tYXJBY2Nlc3MuZ2V0T3BPdGhlckFjY2VzcygpLmdldEdyZWF0ZXJUaGFuU2lnbktleXdvcmRfNV8xXzBfMF8xKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAyIDoKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5Mjc6Mjoga3c9ICc+JworICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNTQsRk9MTE9XXzU0X2luX3J1bGVPcE90aGVyNjgyMik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQubWVyZ2Uoa3cpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcE90aGVyQWNjZXNzKCkuZ2V0R3JlYXRlclRoYW5TaWduS2V5d29yZF81XzFfMSgpKTsgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSA3IDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyOTMzOjY6IChrdz0gJzwnICggKCAoICggJzwnICc8JyApICk9PiAoa3c9ICc8JyBrdz0gJzwnICkgKSB8IGt3PSAnPCcgfCBrdz0gJz0+JyApICkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5MzM6NjogKGt3PSAnPCcgKCAoICggKCAnPCcgJzwnICkgKT0+IChrdz0gJzwnIGt3PSAnPCcgKSApIHwga3c9ICc8JyB8IGt3PSAnPT4nICkgKQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5MzQ6Mjoga3c9ICc8JyAoICggKCAoICc8JyAnPCcgKSApPT4gKGt3PSAnPCcga3c9ICc8JyApICkgfCBrdz0gJzwnIHwga3c9ICc9PicgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGt3PShUb2tlbiltYXRjaChpbnB1dCw1MyxGT0xMT1dfNTNfaW5fcnVsZU9wT3RoZXI2ODQ0KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Lm1lcmdlKGt3KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGt3LCBncmFtbWFyQWNjZXNzLmdldE9wT3RoZXJBY2Nlc3MoKS5nZXRMZXNzVGhhblNpZ25LZXl3b3JkXzZfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjkzOToxOiAoICggKCAoICc8JyAnPCcgKSApPT4gKGt3PSAnPCcga3c9ICc8JyApICkgfCBrdz0gJzwnIHwga3c9ICc9PicgKQorICAgICAgICAgICAgICAgICAgICBpbnQgYWx0NTI9MzsKKyAgICAgICAgICAgICAgICAgICAgaW50IExBNTJfMCA9IGlucHV0LkxBKDEpOworCisgICAgICAgICAgICAgICAgICAgIGlmICggKExBNTJfMD09NTMpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgaW50IExBNTJfMSA9IGlucHV0LkxBKDIpOworCisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIChzeW5wcmVkMTZfSW50ZXJuYWxDdWJlRFNMKCkpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsdDUyPTE7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICggKHRydWUpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsdDUyPTI7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuYmFja3RyYWNraW5nPjApIHtzdGF0ZS5mYWlsZWQ9dHJ1ZTsgcmV0dXJuIGN1cnJlbnQ7fQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5vVmlhYmxlQWx0RXhjZXB0aW9uIG52YWUgPQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXcgTm9WaWFibGVBbHRFeGNlcHRpb24oIiIsIDUyLCAxLCBpbnB1dCk7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBudmFlOworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEE1Ml8wPT02NikgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBhbHQ1Mj0zOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmJhY2t0cmFja2luZz4wKSB7c3RhdGUuZmFpbGVkPXRydWU7IHJldHVybiBjdXJyZW50O30KKyAgICAgICAgICAgICAgICAgICAgICAgIE5vVmlhYmxlQWx0RXhjZXB0aW9uIG52YWUgPQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ldyBOb1ZpYWJsZUFsdEV4Y2VwdGlvbigiIiwgNTIsIDAsIGlucHV0KTsKKworICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbnZhZTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGFsdDUyKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDEgOgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjkzOToyOiAoICggKCAnPCcgJzwnICkgKT0+IChrdz0gJzwnIGt3PSAnPCcgKSApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MjkzOToyOiAoICggKCAnPCcgJzwnICkgKT0+IChrdz0gJzwnIGt3PSAnPCcgKSApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyOTM5OjM6ICggKCAnPCcgJzwnICkgKT0+IChrdz0gJzwnIGt3PSAnPCcgKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjI5NDM6NTogKGt3PSAnPCcga3c9ICc8JyApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyOTQ0OjI6IGt3PSAnPCcga3c9ICc8JworICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNTMsRk9MTE9XXzUzX2luX3J1bGVPcE90aGVyNjg3NSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQubWVyZ2Uoa3cpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcE90aGVyQWNjZXNzKCkuZ2V0TGVzc1RoYW5TaWduS2V5d29yZF82XzFfMF8wXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNTMsRk9MTE9XXzUzX2luX3J1bGVPcE90aGVyNjg4OCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQubWVyZ2Uoa3cpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcE90aGVyQWNjZXNzKCkuZ2V0TGVzc1RoYW5TaWduS2V5d29yZF82XzFfMF8wXzEoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDIgOgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Mjk1NzoyOiBrdz0gJzwnCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGt3PShUb2tlbiltYXRjaChpbnB1dCw1MyxGT0xMT1dfNTNfaW5fcnVsZU9wT3RoZXI2OTA5KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudC5tZXJnZShrdyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGt3LCBncmFtbWFyQWNjZXNzLmdldE9wT3RoZXJBY2Nlc3MoKS5nZXRMZXNzVGhhblNpZ25LZXl3b3JkXzZfMV8xKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDMgOgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Mjk2NDoyOiBrdz0gJz0+JworICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNjYsRk9MTE9XXzY2X2luX3J1bGVPcE90aGVyNjkyOCk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQubWVyZ2Uoa3cpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcE90aGVyQWNjZXNzKCkuZ2V0RXF1YWxzU2lnbkdyZWF0ZXJUaGFuU2lnbktleXdvcmRfNl8xXzIoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgOCA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Mjk3MToyOiBrdz0gJzw+JworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGt3PShUb2tlbiltYXRjaChpbnB1dCw2NyxGT0xMT1dfNjdfaW5fcnVsZU9wT3RoZXI2OTQ5KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Lm1lcmdlKGt3KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGt3LCBncmFtbWFyQWNjZXNzLmdldE9wT3RoZXJBY2Nlc3MoKS5nZXRMZXNzVGhhblNpZ25HcmVhdGVyVGhhblNpZ25LZXl3b3JkXzcoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSA5IDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzoyOTc4OjI6IGt3PSAnPzonCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAga3c9KFRva2VuKW1hdGNoKGlucHV0LDY4LEZPTExPV182OF9pbl9ydWxlT3BPdGhlcjY5NjgpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQubWVyZ2Uoa3cpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3TGVhZk5vZGUoa3csIGdyYW1tYXJBY2Nlc3MuZ2V0T3BPdGhlckFjY2VzcygpLmdldFF1ZXN0aW9uTWFya0NvbG9uS2V5d29yZF84KCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGxlYXZlUnVsZSgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJydWxlT3BPdGhlciIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVYQWRkaXRpdmVFeHByZXNzaW9uIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6Mjk5MToxOiBlbnRyeVJ1bGVYQWRkaXRpdmVFeHByZXNzaW9uIHJldHVybnMgW0VPYmplY3QgY3VycmVudD1udWxsXSA6IGl2X3J1bGVYQWRkaXRpdmVFeHByZXNzaW9uPSBydWxlWEFkZGl0aXZlRXhwcmVzc2lvbiBFT0YgOworICAgIHB1YmxpYyBmaW5hbCBFT2JqZWN0IGVudHJ5UnVsZVhBZGRpdGl2ZUV4cHJlc3Npb24oKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICBFT2JqZWN0IGN1cnJlbnQgPSBudWxsOworCisgICAgICAgIEVPYmplY3QgaXZfcnVsZVhBZGRpdGl2ZUV4cHJlc3Npb24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aXZlRXhwcmVzc2lvbiApICkgKSoKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldFhBZGRpdGl2ZUV4cHJlc3Npb25BY2Nlc3MoKS5nZXRYTXVsdGlwbGljYXRpdmVFeHByZXNzaW9uUGFyc2VyUnVsZUNhbGxfMCgpKTsgCisgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVYTXVsdGlwbGljYXRpdmVFeHByZXNzaW9uX2luX3J1bGVYQWRkaXRpdmVFeHByZXNzaW9uNzA2NSk7CisgICAgICAgICAgICB0aGlzX1hNdWx0aXBsaWNhdGl2ZUV4cHJlc3Npb25fMD1ydWxlWE11bHRpcGxpY2F0aXZlRXhwcmVzc2lvbigpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgY3VycmVudCA9IHRoaXNfWE11bHRpcGxpY2F0aXZlRXhwcmVzc2lvbl8wOyAKKyAgICAgICAgICAgICAgICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzAxMzoxOiAoICggKCAoICgpICggKCBydWxlT3BBZGQgKSApICkgKT0+ICggKCkgKCAoIHJ1bGVPcEFkZCApICkgKSApICggKGx2X3JpZ2h0T3BlcmFuZF8zXzA9IHJ1bGVYTXVsdGlwbGljYXRpdmVFeHByZXNzaW9uICkgKSApKgorICAgICAgICAgICAgbG9vcDU0OgorICAgICAgICAgICAgZG8geworICAgICAgICAgICAgICAgIGludCBhbHQ1ND0yOworICAgICAgICAgICAgICAgIGludCBMQTU0XzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgICAgIGlmICggKExBNTRfMD09NjkpICkgeworICAgICAgICAgICAgICAgICAgICBpbnQgTEE1NF8yID0gaW5wdXQuTEEoMik7CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCAoc3lucHJlZDE3X0ludGVybmFsQ3ViZURTTCgpKSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGFsdDU0PTE7CisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgaWYgKCAoTEE1NF8wPT03MCkgKSB7CisgICAgICAgICAgICAgICAgICAgIGludCBMQTU0XzMgPSBpbnB1dC5MQSgyKTsKKworICAgICAgICAgICAgICAgICAgICBpZiAoIChzeW5wcmVkMTdfSW50ZXJuYWxDdWJlRFNMKCkpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgYWx0NTQ9MTsKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgIHN3aXRjaCAoYWx0NTQpIHsKKyAgICAgICAgICAgIAljYXNlIDEgOgorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURT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wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMwMTg6NzogKCkgKCAoIHJ1bGVPcEFkZCApICkKKyAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMwMTg6NzogKCkKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDE5OjU6IAorICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAJICAgICAgICAgICAgICBjdXJyZW50ID0gZm9yY2VDcmVhdGVNb2RlbEVsZW1lbnRBbmRTZXQoCisgICAgICAgICAgICAJICAgICAgICAgICAgICAgICAgZ3JhbW1hckFjY2Vzcy5nZXRYQWRkaXRpdmVFeHByZXNzaW9uQWNjZXNzKCkuZ2V0WEJpbmFyeU9wZXJhdGlvbkxlZnRPcGVyYW5kQWN0aW9uXzFfMF8wXzAoKSwKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgICAgICBjdXJyZW50KTsKKyAgICAgICAgICAgIAkgICAgICAgICAgCisgICAgICAgICAgICAJICAgIH0KKworICAgICAgICAgICAgCSAgICB9CisKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDI0OjI6ICggKCBydWxlT3BBZGQgKSApCisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzAyNToxOiAoIHJ1bGVPcEFkZCApCisgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDI1OjE6ICggcnVsZU9wQWRkICkKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDI2OjM6IHJ1bGVPcEFkZAorICAgICAgICAgICAgCSAgICB7CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAJICAgICAgCQkJaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudChncmFtbWFyQWNjZXNzLmdldFhBZGRpdGl2ZUV4cHJlc3Npb25SdWxlKCkpOworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIAorICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgCSAgICAgICAKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBuZXdDb21wb3NpdGVOb2RlKGdyYW1tYXJBY2Nlc3MuZ2V0WEFkZGl0aXZlRXhwcmVzc2lvbkFjY2VzcygpLmdldEZlYXR1cmVKdm1JZGVudGlmaWFibGVFbGVtZW50Q3Jvc3NSZWZlcmVuY2VfMV8wXzBfMV8wKCkpOyAKKyAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVPcEFkZF9pbl9ydWxlWEFkZGl0aXZlRXhwcmVzc2lvbjcxMTgpOworICAgICAgICAgICAgCSAgICBydWxlT3BBZGQoKTsKKworICAgICAgICAgICAgCSAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAJICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgIAkgICAgICAgCisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgCSAgICAgIAkgICAgCisgICAgICAgICAgICAJICAgIH0KKworICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgCSAgICB9CisKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDM5OjQ6ICgg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ZXRYQWRkaXRpdmVFeHByZXNzaW9uQWNjZXNzKCkuZ2V0UmlnaHRPcGVyYW5kWE11bHRpcGxpY2F0aXZlRXhwcmVzc2lvblBhcnNlclJ1bGVDYWxsXzFfMV8wKCkpOyAKKyAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgCSAgICB9CisgICAgICAgICAgICAJICAgIHB1c2hGb2xsb3coRk9MTE9XX3J1bGVYTXVsdGlwbGljYXRpdmVFeHByZXNzaW9uX2luX3J1bGVYQWRkaXRpdmVFeHByZXNzaW9uNzE0MSk7CisgICAgICAgICAgICAJICAgIGx2X3JpZ2h0T3BlcmFuZF8zXzA9cnVsZVhNdWx0aXBsaWNhdGl2ZUV4cHJlc3Npb24oKTsKKworICAgICAgICAgICAgCSAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAJICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIGlmIChjdXJyZW50PT1udWxsKSB7CisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgICAgIGN1cnJlbnQgPSBjcmVhdGVNb2RlbEVsZW1lbnRGb3JQYXJlbnQoZ3JhbW1hckFjY2Vzcy5nZXRYQWRkaXRpdmVFeHByZXNzaW9uUnVsZSgpKTsKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAJICAgICAgICAgICAgIAkJc2V0KAorICAgICAgICAgICAgCSAgICAgICAgICAgICAJCQljdXJyZW50LCAKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgCQkJInJpZ2h0T3BlcmFuZCIsCisgICAgICAgICAgICAJICAgICAgICAgICAgICAJCWx2X3JpZ2h0T3BlcmFuZF8zXzAsIAorICAgICAgICAgICAgCSAgICAgICAgICAgICAgCQkiWE11bHRpcGxpY2F0aXZlRXhwcmVzc2lvbiIpOworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgIAkgICAgICAJICAgIAorICAgICAgICAgICAgCSAgICB9CisKKyAgICAgICAgICAgIAkgICAgfQorCisKKyAgICAgICAgICAgIAkgICAgfQorCisKKyAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgCSAgICBicmVhazsKKworICAgICAgICAgICAgCWRlZmF1bHQgOgorICAgICAgICAgICAgCSAgICBicmVhayBsb29wNTQ7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfSB3aGlsZSAodHJ1ZSk7CisKKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBsZWF2ZVJ1bGUoKTsgCisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gY3VycmVudDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZVhBZGRpdGl2ZUV4cHJlc3Npb24iCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlT3BBZGQiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDY1OjE6IGV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kKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBjdXJyZW50ID1pdl9ydWxlT3BBZGQuZ2V0VGV4dCgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZU9wQWRkNzE5MSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVPcEFkZCIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlT3BBZGQiCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDc0OjE6IHJ1bGVPcEFkZCByZXR1cm5zIFtBbnRsckRhdGF0eXBlUnVsZVRva2VuIGN1cnJlbnQ9bmV3IEFudGxyRGF0YXR5cGVSdWxlVG9rZW4oKV0gOiAoa3c9ICcrJyB8IGt3PSAnLScgKSA7CisgICAgcHVibGlj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IGFsdDU1PTE7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIGlmICggKExBNTVfMD09NzApICkgeworICAgICAgICAgICAgICAgIGFsdDU1PTI7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICBpZiAoc3RhdGUuYmFja3RyYWNraW5nPjApIHtzdGF0ZS5mYWlsZWQ9dHJ1ZTsgcmV0dXJuIGN1cnJlbnQ7fQorICAgICAgICAgICAgICAgIE5vVmlhYmxlQWx0RXhjZXB0aW9uIG52YWUgPQorICAgICAgICAgICAgICAgICAgICBuZXcgTm9WaWFibGVBbHRFeGNlcHRpb24oIiIsIDU1LCAwLCBpbnB1dCk7CisKKyAgICAgICAgICAgICAgICB0aHJvdyBudmFlOworICAgICAgICAgICAgfQorICAgICAgICAgICAgc3dpdGNoIChhbHQ1NSkgeworICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzA3OToyOiBrdz0gJysnCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAga3c9KFRva2VuKW1hdGNoKGlucHV0LDY5LEZPTExPV182OV9pbl9ydWxlT3BBZGQ3MjI5KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Lm1lcmdlKGt3KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGt3LCBncmFtbWFyQWNjZXNzLmdldE9wQWRkQWNjZXNzKCkuZ2V0UGx1c1NpZ25LZXl3b3JkXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSAyIDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDg2OjI6IGt3PSAnLScKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNzAsRk9MTE9XXzcwX2luX3J1bGVPcEFkZDcyNDgpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQubWVyZ2Uoa3cpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3TGVhZk5vZGUoa3csIGdyYW1tYXJBY2Nlc3MuZ2V0T3BBZGRBY2Nlc3MoKS5nZXRIeXBoZW5NaW51c0tleXdvcmRfMSgpKTsgCisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBsZWF2ZVJ1bGUoKTsgCisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gY3VycmVudDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZU9wQWRkIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZVhNdWx0aXBsaWNhdGl2ZUV4cHJlc3Npb24iCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMDk5OjE6IGVudHJ5UnVsZVhNdWx0aXBsaWNhdGl2ZUV4cHJlc3Npb24gcmV0dXJucyBbRU9iamVjdCBjdXJyZW50PW51bGxdIDogaXZfcnVsZVhNdWx0aXBsaWNhdGl2ZUV4cHJlc3Npb249IHJ1bGVYTXVsdGlwbGljYXRpdmVFeHByZXNzaW9uIEVPRiA7CisgICAgcHVibGljIGZpbmFsIEVPYmplY3QgZW50cnlSdWxlWE11bHRpcGxpY2F0aXZlRXhwcmVzc2lvbigpIHRocm93cyBSZWNvZ25pdGlvbkV4Y2VwdGlvbiB7CisgICAgICAgIEVPYmplY3QgY3VycmVudCA9IG51bGw7CisKKyAgICAgICAgRU9iamVjdCBpdl9ydWxlWE11bHRpcGxpY2F0aXZlRXhwcmVzc2lvbiA9IG51bGw7CisKKworICAgICAgICB0cnkgeworICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZ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KSApICkgKCAobHZfcmlnaHRPcGVyYW5kXzNfMD0gcnVsZVhVbmFyeU9wZXJhdGlvbiApICkgKSogKSA7CisgICAgcHVibGljIGZpbmFsIEVPYmplY3QgcnVsZVhNdWx0aXBsaWNhdGl2ZUV4cHJlc3Npb24oKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICBFT2JqZWN0IGN1cnJlbnQgPSBudWxsOworCisgICAgICAgIEVPYmplY3QgdGhpc19YVW5hcnlPcGVyYXRpb25fMCA9IG51bGw7CisKKyAgICAgICAgRU9iamVjdCBsdl9yaWdodE9wZXJhbmRfM18wID0gbnVsbDsKKworCisgICAgICAgICBlbnRlclJ1bGUoKTsgCisgICAgICAgICAgICAKKyAgICAgICAgdHJ5IHsKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzExMToyODogKCAodGhpc19YVW5hcnlPcGVyYXRpb25fMD0gcnVsZVhVbmFyeU9wZXJhdGlvbiAoICggKCAoICgpICggKCBydWxlT3BNdWx0aSApICkgKSApPT4gKCAoKSAoICggcnVsZU9wTXVsdGkgKSApICkgKSAoIChsdl9yaWdodE9wZXJhbmRfM18wPSBydWxlWFVuYXJ5T3BlcmF0aW9uICkgKSApKiApICkKKyAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzExMjoxOiAodGhpc19YVW5hcnlPcGVyYXRpb25fMD0gcnVsZVhVbmFyeU9wZXJhdGlvbiAoICggKCAoICgpICggKCBydWxlT3BNdW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XNzLmdldFhNdWx0aXBsaWNhdGl2ZUV4cHJlc3Npb25BY2Nlc3MoKS5nZXRYVW5hcnlPcGVyYXRpb25QYXJzZXJSdWxlQ2FsbF8wKCkpOyAKKyAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgfQorICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZVhVbmFyeU9wZXJhdGlvbl9pbl9ydWxlWE11bHRpcGxpY2F0aXZlRXhwcmVzc2lvbjczNDUpOworICAgICAgICAgICAgdGhpc19YVW5hcnlPcGVyYXRpb25fMD1ydWxlWFVuYXJ5T3BlcmF0aW9uKCk7CisKKyAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50ID0gdGhpc19YVW5hcnlPcGVyYXRpb25fMDsgCisgICAgICAgICAgICAgICAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICB9CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMxMjE6MTogKCAoICggKCAoKSAoICggcnVsZU9wTXVsdGkgKSApICkgKT0+ICggKCkgKCAoIHJ1bGVPcE11bHRpICkgKSApICkgKCAobHZfcmlnaHRPcGVyYW5kXzNfMD0gcnVsZVhVbmFyeU9wZXJhdGlvbiApICkgKSoKKyAgICAgICAgICAgIGxvb3A1NjoKKyAgICAgICAgICAgIGRvIHsKKyAgICAgICAgICAgICAgICBpbnQgYWx0NTY9MjsKKyAgICAgICAgICAgICAgICBzd2l0Y2ggKCBpbnB1dC5MQSgxKSApIHsKKyAgICAgICAgICAgICAgICBjYXNlIDM5OgorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGludCBMQTU2XzIgPSBpbnB1dC5MQSgyKTsKKworICAgICAgICAgICAgICAgICAgICBpZiAoIChzeW5wcmVkMThfSW50ZXJuYWxDdWJlRFNMKCkpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgYWx0NTY9MTsKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIDcxOgorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGludCBMQTU2XzMgPSBpbnB1dC5MQSgyKTsKKworICAgICAgICAgICAgICAgICAgICBpZiAoIChzeW5wcmVkMThfSW50ZXJuYWxDdWJlRFNMKCkpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgYWx0NTY9MTsKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIDcyOgorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGludCBMQTU2XzQgPSBpbnB1dC5MQSgyKTsKKworICAgICAgICAgICAgICAgICAgICBpZiAoIChzeW5wcmVkMThfSW50ZXJuYWxDdWJlRFNMKCkpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgYWx0NTY9MTsKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIDczOgorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGludCBMQTU2XzUgPSBpbnB1dC5MQSgyKTsKKworICAgICAgICAgICAgICAgICAgICBpZiAoIChzeW5wcmVkMThfSW50ZXJuYWxDdWJlRFNMKCkpICkgeworICAgICAgICAgICAgICAgICAgICAgICAgYWx0NTY9MTsKKyAgICAgICAgICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgIHN3aXRjaCAoYWx0NTYpIHsKKyAgICAgICAgICAgIAljYXNlIDEgOgorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMxMjE6MjogKCAoICggKCkgKCAoIHJ1bGVPcE11bHRpICkgKSApICk9PiAoICgpICggKCBydWxlT3BNdWx0aSApICkgKSApICggKGx2X3JpZ2h0T3BlcmFuZF8zXzA9IHJ1bGVYVW5hcnlPcGVyYXRpb24gKSApCisgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMTIxOjI6ICggKCAoICgpICggKCBydWxlT3BNdWx0aSApICkgKSApPT4gKCAoKSAoICggcnVsZU9wTXVsdGkgKSApICkgKQorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc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ub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMTM0OjM6IHJ1bGVPcE11bHRpCisgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgIAkgICAgICAJCQlpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50KGdyYW1tYXJBY2Nlc3MuZ2V0WE11bHRpcGxpY2F0aXZlRXhwcmVzc2lvblJ1bGUoKSk7CisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgfQorICAgICAgICAgICAgCSAgICAgICAgICAgICAgCisgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgIAkgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAJICAgICAgIAorICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRYTXVsdGlwbGljYXRpdmVFeHByZXNzaW9uQWNjZXNzKCkuZ2V0RmVhdHVyZUp2bUlkZW50aWZpYWJsZUVsZW1lbnRDcm9zc1JlZmVyZW5jZV8xXzBfMF8xXzAoKSk7IAorICAgICAgICAgICAgCSAgICAgIAkgICAgCisgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgIAkgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZU9wTXVsdGlfaW5fcnVsZVhNdWx0aXBsaWNhdGl2ZUV4cHJlc3Npb243Mzk4KTsKKyAgICAgICAgICAgIAkgICAgcnVsZU9wTXVsdGkoKTsKKworICAgICAgICAgICAgCSAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICAJICAgIGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgIAkgICAgICAgCisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgCSAgICAgIAkgICAgCisgICAgICAgICAgICAJICAgIH0KKworICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgCSAgICB9CisKKworICAgICAgICAgICAgCSAgICB9CisKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMTQ3OjQ6ICggKGx2X3JpZ2h0T3BlcmFuZF8zXzA9IHJ1bGVYVW5hcnlPcGVyYXRpb24gKSApCisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzE0ODoxOiAobHZfcmlnaHRPcGVyYW5kXzNfMD0gcnVsZVhVbmFyeU9wZXJhdGlvbiApCisgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMTQ4OjE6IChsdl9yaWdodE9wZXJhbmRfM18wPSBydWxlWFVuYXJ5T3BlcmF0aW9uICkKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMTQ5OjM6IGx2X3JpZ2h0T3BlcmFuZF8zXzA9IHJ1bGVYVW5hcnlPcGVyYXRpb24KKyAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgIAkgICAgICAgCisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldFhNdWx0aXBsaWNhdGl2ZUV4cHJlc3Npb25BY2Nlc3MoKS5nZXRSaWdodE9wZXJhbmRYVW5hcnlPcGVyYXRpb25QYXJzZXJSdWxlQ2FsbF8xXzFfMCgpKTsgCisgICAgICAgICAgICAJICAgICAgCSAgICAKKyAgICAgICAgICAgIAkgICAgfQorICAgICAgICAgICAgCSAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWFVuYXJ5T3BlcmF0aW9uX2luX3J1bGVYTXVsdGlwbGljYXRpdmVFeHByZXNzaW9uNzQyMSk7CisgICAgICAgICAgICAJICAgIGx2X3JpZ2h0T3BlcmFuZF8zXzA9cnVsZVhVbmFyeU9wZXJhdGlvbigpOworCisgICAgICAgICAgICAJICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgIAkgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAJICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAJICAgICAgCSAgICAgICAgaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudEZvclBhcmVudChncmFtbWFyQWNjZXNzLmdldFhNdWx0aXBsaWNhdGl2ZUV4cHJlc3Npb25SdWxlKCkpOworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgIAkgICAgICAgICAgICAgCQlzZXQoCisgICAgICAgICAgICAJICAgICAgICAgICAgIAkJCWN1cnJlbnQsIAorICAgICAgICAgICAgCSAgICAgICAgICAgICAJCQkicmlnaHRPcGVyYW5kIiwKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIAkJbHZfcmlnaHRPcGVyYW5kXzNfMCwgCisgICAgICAgICAgICAJICAgICAgICAgICAgICAJCSJYVW5hcnlPcGVyYXRpb24iKTsKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAJICAgICAgCSAgICAKKyAgICAgICAgICAgIAkgICAgfQorCisgICAgICAgICAgICAJICAgIH0KKworCisgICAgICAgICAgICAJICAgIH0KKworCisgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgIAkgICAgYnJlYWs7CisKKyAgICAgICAgICAgIAlkZWZhdWx0IDoKKyAgICAgICAgICAgIAkgICAgYnJlYWsgbG9vcDU2OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0gd2hpbGUgKHRydWUpOworCisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgbGVhdmVSdWxlKCk7IAorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeyAKK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y5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzE3NToyOiBpdl9ydWxlT3BNdWx0aT0gcnVsZU9wTXVsdGkgRU9GCisgICAgICAgICAgICB7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRPcE11bHRpUnVsZSgpKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlT3BNdWx0aV9pbl9lbnRyeVJ1bGVPcE11bHRpNzQ2MCk7CisgICAgICAgICAgICBpdl9ydWxlT3BNdWx0aT1ydWxlT3BNdWx0aSgpOworCisgICAgICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgY3VycmVudCA9aXZfcnVsZU9wTXVsdGkuZ2V0VGV4dCgpOyAKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG1hdGNoKGlucHV0LEVPRixGT0xMT1dfRU9GX2luX2VudHJ5UnVsZU9wTXVsdGk3NDcxKTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeyAKKyAgICAgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsgCisgICAgICAgICAgICAgICAgYXBwZW5kU2tpcHBlZFRva2VucygpOwor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orICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMTg2OjE6IChrdz0gJyonIHwga3c9ICcqKicgfCBrdz0gJy8nIHwga3c9ICclJyApCisgICAgICAgICAgICB7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMxODY6MTogKGt3PSAnKicgfCBrdz0gJyoqJyB8IGt3PSAnLycgfCBrdz0gJyUnICkKKyAgICAgICAgICAgIGludCBhbHQ1Nz00OworICAgICAgICAgICAgc3dpdGNoICggaW5wdXQuTEEoMSkgKSB7CisgICAgICAgICAgICBjYXNlIDM5OgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBhbHQ1Nz0xOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNzE6CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGFsdDU3PTI7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA3MjoKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgYWx0NTc9MzsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDczOgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBhbHQ1Nz00OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmJhY2t0cmFja2luZz4wKSB7c3RhdGUuZmFpbGVkPXRydWU7IHJldHVybiBjdXJyZW50O30KKyAgICAgICAgICAgICAgICBOb1ZpYWJsZUFsdEV4Y2VwdGlvbiBudmFlID0KKyAgICAgICAgICAgICAgICAgICAgbmV3IE5vVmlhYmxlQWx0RXhjZXB0aW9uKCIiLCA1NywgMCwgaW5wdXQpOworCisgICAgICAgICAgICAgICAgdGhyb3cgbnZhZTsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3dpdGNoIChhbHQ1NykgeworICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzE4NzoyOiBrdz0gJyonCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAga3c9KFRva2VuKW1hdGNoKGlucHV0LDM5LEZPTExPV18zOV9pbl9ydWxlT3BNdWx0aTc1MDkpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQubWVyZ2Uoa3cpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3TGVhZk5vZGUoa3csIGdyYW1tYXJBY2Nlc3MuZ2V0T3BNdWx0aUFjY2VzcygpLmdldEFzdGVyaXNrS2V5d29yZF8wKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgMiA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzE5NDoyOiBrdz0gJyoqJworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGt3PShUb2tlbiltYXRjaChpbnB1dCw3MSxGT0xMT1dfNzFfaW5fcnVsZU9wTXVsdGk3NTI4KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Lm1lcmdlKGt3KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGt3LCBncmFtbWFyQWNjZXNzLmdldE9wTXVsdGlBY2Nlc3MoKS5nZXRBc3Rlcmlza0FzdGVyaXNrS2V5d29yZF8xKCkpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgMyA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzIwMToyOiBrdz0gJy8nCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAga3c9KFRva2VuKW1hdGNoKGlucHV0LDcyLEZPTExPV183Ml9pbl9ydWxlT3BNdWx0aTc1NDcpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQubWVyZ2Uoa3cpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3TGVhZk5vZGUoa3csIGdyYW1tYXJBY2Nlc3MuZ2V0T3BNdWx0aUFjY2VzcygpLmdldFNvbGlkdXNLZXl3b3JkXzIoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSA0IDoKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMjA4OjI6IGt3PSAnJScKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICBrdz0oVG9rZW4pbWF0Y2goaW5wdXQsNzMsRk9MTE9XXzczX2luX3J1bGVPcE11bHRpNzU2Nik7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudC5tZXJnZShrdyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdMZWFmTm9kZShrdywgZ3JhbW1hckFjY2Vzcy5nZXRPcE11bHRpQWNjZXNzKCkuZ2V0UGVyY2VudFNpZ25LZXl3b3JkXzMoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgbGVhdmVSdWxlKCk7IAorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeyAKKyAgICAgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsgCisgICAgICAgICAgICAgICAgYXBwZW5kU2tpcHBlZFRva2VucygpOworICAgICAgICAgICAgfSAKKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIGN1cnJlbnQ7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgInJ1bGVPcE11bHRpIgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgImVudHJ5UnVsZVhVbmFyeU9wZXJhdGlvbiIKKyAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMyMjE6MTogZW50cnlSdWxlWFVuYXJ5T3BlcmF0aW9uIHJldHVybnMgW0VPYmplY3QgY3VycmVudD1udWxsXSA6IGl2X3J1bGVYVW5hcnlPcGVyYXRpb249IHJ1bGVYVW5hcnlPcGVyYXRpb24gRU9GIDsKKyAgICBwdWJsaWMgZmluYWwgRU9iamVj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gICAgICAgICBzdGF0ZS5fZnNwLS07CisgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgY3VycmVudCA9aXZfcnVsZVhVbmFyeU9wZXJhdGlvbjsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVYVW5hcnlPcGVyYXRpb243NjE2KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisKKyAgICAgICAgICAgIH0KKworICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNoIChSZWNvZ25pdGlvbkV4Y2VwdGlvbiByZSkgeyAKKyAgICAgICAgICAgICAgICByZWNvdmVyKGlucHV0LHJlKTsgCisgICAgICAgICAgICAgICAgYXBwZW5kU2tpcHBlZFRva2VucygpOworICAgICAgICAgICAgfSAKKyAgICAgICAgZmluYWxseSB7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIGN1cnJlbnQ7CisgICAgfQorICAgIC8vICRBTlRMUiBlbmQgImVudHJ5UnVsZVhVbmFyeU9wZXJhdGlvbiIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJydWxlWFVuYXJ5T3BlcmF0aW9uIgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzIzMDoxOiBydWxlWFVuYXJ5T3BlcmF0aW9uIHJldHVybnMgW0VPYmplY3QgY3VycmVudD1udWxsXSA6ICggKCAoKSAoICggcnVsZU9wVW5hcnkgKSApICggKGx2X29wZXJhbmRfMl8wPSBydWxlWF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1ZTsgcmV0dXJuIGN1cnJlbnQ7fQorICAgICAgICAgICAgICAgIE5vVmlhYmxlQWx0RXhjZXB0aW9uIG52YWUgPQorICAgICAgICAgICAgICAgICAgICBuZXcgTm9WaWFibGVBbHRFeGNlcHRpb24oIiIsIDU4LCAwLCBpbnB1dCk7CisKKyAgICAgICAgICAgICAgICB0aHJvdyBudmFlOworICAgICAgICAgICAgfQorICAgICAgICAgICAgc3dpdGNoIChhbHQ1OCkgeworICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzIzNDoyOiAoICgpICggKCBydWxlT3BVbmFyeSApICkgKCAobHZfb3BlcmFuZF8yXzA9IHJ1bGVYVW5hcnlPcGVyYXRpb24gKSApICkKKyAgICAgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMyMzQ6MjogKCAoKSAoICggcnVsZU9wVW5hcnkgKSApICggKGx2X29wZXJhbmRfMl8wPSBydWxlWFVuYXJ5T3BlcmF0aW9uICkgKSApCisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzIzNDozOiAoKSAoICggcnVsZU9wVW5hcnkgKSApICggKGx2X29wZXJhbmRfMl8wPSBydWxlWFVuYXJ5T3BlcmF0aW9uICkgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzIzNDozOiAoKQorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMyMzU6NTogCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgPSBmb3JjZUNyZWF0ZU1vZGVsRWxlbWVudCgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBncmFtbWFyQWNjZXNzLmdldFhVbmFyeU9wZXJhdGlvbkFjY2VzcygpLmdldFhVbmFyeU9wZXJhdGlvbkFjdGlvbl8wXzAoKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMjQwOjI6ICggKCBydWxlT3BVbmFyeSApICkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMjQxOjE6ICggcnVsZU9wVW5hcnkgKQorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzI0MToxOiAoIHJ1bGVPcFVuYXJ5ICkKKyAgICAgICAgICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMjQyOjM6IHJ1bGVPcFVuYXJ5CisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAJCQlpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgICAgICAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50KGdyYW1tYXJBY2Nlc3MuZ2V0WFVuYXJ5T3BlcmF0aW9uUnVsZSgpKTsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgbmV3Q29tcG9zaXRlTm9kZShncmFtbWFyQWNjZXNzLmdldFhVbmFyeU9wZXJhdGlvbkFjY2VzcygpLmdldEZlYXR1cmVKdm1JZGVudGlmaWFibGVFbGVtZW50Q3Jvc3NSZWZlcmVuY2VfMF8xXzAoKSk7IAorICAgICAgICAgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgcHVzaEZvbGxvdyhGT0xMT1dfcnVsZU9wVW5hcnlfaW5fcnVsZVhVbmFyeU9wZXJhdGlvbjc2NzQpOworICAgICAgICAgICAgICAgICAgICBydWxlT3BVbmFyeSgpOworCisgICAgICAgICAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMyNTU6MjogK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lQ2FsbF8wXzJfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgICAgCSAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWFVuYXJ5T3BlcmF0aW9uX2luX3J1bGVYVW5hcnlPcGVyYXRpb243Njk1KTsKKyAgICAgICAgICAgICAgICAgICAgbHZfb3BlcmFuZF8yXzA9cnVsZVhVbmFyeU9wZXJhdGlvbigpOworCisgICAgICAgICAgICAgICAgICAgIHN0YXRlLl9mc3AtLTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgaWYgKGN1cnJlbnQ9PW51bGwpIHsKKyAgICAgICAgICAgICAgICAgICAgICAJICAgICAgICAgICAgY3VycmVudCA9IGNyZWF0ZU1vZGVsRWxlbWVudEZvclBhcmVudChncmFtbWFyQWNjZXNzLmdldFhVbmFyeU9wZXJhdGlvblJ1bGUoKSk7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJCXNldCgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQkJY3VycmVudCwgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJCSJvcGVyYW5kIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkJbHZfb3BlcmFuZF8yXzAsIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCQkiWFVuYXJ5T3BlcmF0aW9uIik7CisgICAgICAgICAgICAgICAgICAgICAgCSAgICAgICAgYWZ0ZXJQYXJzZXJPckVudW1SdWxlQ2FsbCgpOworICAgICAgICAgICAgICAgICAgICAgIAkgICAgCisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisKKworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgMiA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzI3NTo1OiB0aGlzX1hDYXN0ZWRFeHByZXNzaW9uXzM9IHJ1bGVYQ2FzdGVkRXhwcmVzc2lvbgorICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0NvbXBvc2l0ZU5vZGUoZ3JhbW1hckFjY2Vzcy5nZXRYVW5hcnlPcGVyYXRpb25BY2Nlc3MoKS5nZXRYQ2FzdGVkRXhwcmVzc2lvblBhcnNlclJ1bGVDYWxsXzEoKSk7IAorICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBwdXNoRm9sbG93KEZPTExPV19ydWxlWENhc3RlZEV4cHJlc3Npb25faW5fcnVsZVhVbmFyeU9wZXJhdGlvbjc3MjQpOworICAgICAgICAgICAgICAgICAgICB0aGlzX1hDYXN0ZWRFeHByZXNzaW9uXzM9cnVsZVhDYXN0ZWRFeHByZXNzaW9uKCk7CisKKyAgICAgICAgICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgICAgICAgICBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudCA9IHRoaXNfWENhc3RlZEV4cHJlc3Npb25fMzsgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBsZWF2ZVJ1bGUoKTsgCisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gY3VycmVudDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZVhVbmFyeU9wZXJhdGlvbiIKKworCisgICAgLy8gJEFOVExSIHN0YXJ0ICJlbnRyeVJ1bGVPcFVuYXJ5IgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzI5MToxOiBlbnRyeVJ1bGV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XZfcnVsZU9wVW5hcnk9cnVsZU9wVW5hcnkoKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIGN1cnJlbnQgPWl2X3J1bGVPcFVuYXJ5LmdldFRleHQoKTsgCisgICAgICAgICAgICB9CisgICAgICAgICAgICBtYXRjaChpbnB1dCxFT0YsRk9MTE9XX0VPRl9pbl9lbnRyeVJ1bGVPcFVuYXJ5Nzc3MSk7IGlmIChzdGF0ZS5mYWlsZWQpIHJldHVybiBjdXJyZW50OworCisgICAgICAgICAgICB9CisKKyAgICAgICAgfQorICAgICAgICAgCisgICAgICAgICAgICBjYXRjaCAoUmVjb2duaXRpb25FeGNlcHRpb24gcmUpIHsgCisgICAgICAgICAgICAgICAgcmVjb3ZlcihpbnB1dCxyZSk7IAorICAgICAgICAgICAgICAgIGFwcGVuZFNraXBwZWRUb2tlbnMoKTsKKyAgICAgICAgICAgIH0gCisgICAgICAgIGZpbmFsbHkgeworICAgICAgICB9CisgICAgICAgIHJldHVybiBjdXJyZW50OworICAgIH0KKyAgICAvLyAkQU5UTFIgZW5kICJlbnRyeVJ1bGVPcFVuYXJ5IgorCisKKyAgICAvLyAkQU5UTFIgc3RhcnQgInJ1bGVPcFVuYXJ5IgorICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzMwMDoxOiBydWxlT3BVbmFyeSByZXR1cm5zIFtBbnRsckRhdGF0eXBlUnVsZVRva2VuIGN1cnJlbnQ9bmV3IEFudGxyRGF0YXR5cGVSdWxlVG9rZW4oKV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d2l0Y2ggKCBpbnB1dC5MQSgxKSApIHsKKyAgICAgICAgICAgIGNhc2UgNzQ6CisgICAgICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIGFsdDU5PTE7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA3MDoKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgYWx0NTk9MjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDY5OgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBhbHQ1OT0zOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICAgICAgaWYgKHN0YXRlLmJhY2t0cmFja2luZz4wKSB7c3RhdGUuZmFpbGVkPXRydWU7IHJldHVybiBjdXJyZW50O30KKyAgICAgICAgICAgICAgICBOb1ZpYWJsZUFsdEV4Y2VwdGlvbiBudmFlID0KKyAgICAgICAgICAgICAgICAgICAgbmV3IE5vVmlhYmxlQWx0RXhjZXB0aW9uKCIiLCA1OSwgMCwgaW5wdXQpOworCisgICAgICAgICAgICAgICAgdGhyb3cgbnZhZTsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3dpdGNoIChhbHQ1OSkgeworICAgICAgICAgICAgICAgIGNhc2UgMSA6CisgICAgICAgICAgICAgICAgICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzMwNToyOiBrdz0gJyEnCisgICAgICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAga3c9KFRva2VuKW1hdGNoKGlucHV0LDc0LEZPTExPV183NF9pbl9ydWxlT3BVbmFyeTc4MDkpOyBpZiAoc3RhdGUuZmFpbGVkKSByZXR1cm4gY3VycmVudDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQubWVyZ2Uoa3cpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3TGVhZk5vZGUoa3csIGdyYW1tYXJBY2Nlc3MuZ2V0T3BVbmFyeUFjY2VzcygpLmdldEV4Y2xhbWF0aW9uTWFya0tleXdvcmRfMCgpKTsgCisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIDIgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMzMTI6Mjoga3c9ICctJworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGt3PShUb2tlbiltYXRjaChpbnB1dCw3MCxGT0xMT1dfNzBfaW5fcnVsZU9wVW5hcnk3ODI4KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Lm1lcmdlKGt3KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGt3LCBncmFtbWFyQWNjZXNzLmdldE9wVW5hcnlBY2Nlc3MoKS5nZXRIeXBoZW5NaW51c0tleXdvcmRfMSgpKTsgCisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIDMgOgorICAgICAgICAgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMzMTk6Mjoga3c9ICcrJworICAgICAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGt3PShUb2tlbiltYXRjaChpbnB1dCw2OSxGT0xMT1dfNjlfaW5fcnVsZU9wVW5hcnk3ODQ3KTsgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50Lm1lcmdlKGt3KTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld0xlYWZOb2RlKGt3LCBncmFtbWFyQWNjZXNzLmdldE9wVW5hcnlBY2Nlc3MoKS5nZXRQbHVzU2lnbktleXdvcmRfMigpKTsgCisgICAgICAgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisgICAgICAgICAgICAgICBsZWF2ZVJ1bGUoKTsgCisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgIAorICAgICAgICAgICAgY2F0Y2ggKFJlY29nbml0aW9uRXhjZXB0aW9uIHJlKSB7IAorICAgICAgICAgICAgICAgIHJlY292ZXIoaW5wdXQscmUpOyAKKyAgICAgICAgICAgICAgICBhcHBlbmRTa2lwcGVkVG9rZW5zKCk7CisgICAgICAgICAgICB9IAorICAgICAgICBmaW5hbGx5IHsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gY3VycmVudDsKKyAgICB9CisgICAgLy8gJEFOVExSIGVuZCAicnVsZU9wVW5hcnkiCisKKworICAgIC8vICRBTlRMUiBzdGFydCAiZW50cnlSdWxlWENhc3RlZEV4cHJlc3Npb24iCisgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMzMyOjE6IGVudHJ5UnVsZVhDYXN0ZWRFeHByZXNzaW9uIHJldHVybnMgW0VPYmplY3QgY3VycmVudD1udWxsXSA6IGl2X3J1bGVYQ2FzdGVkRXhwcmVzc2lvbj0gcnVsZVhDYXN0ZWRFeHByZXNzaW9uIEVPRiA7CisgICAgcHVibGljIGZpbmFsIEVPYmplY3QgZW50cnlSdWxlWENhc3RlZEV4cHJlc3Npb24oKSB0aHJvd3MgUmVjb2duaXRpb25FeGNlcHRpb24geworICAgICAgICBFT2JqZWN0IGN1cnJlbnQgPSBudWxsOworCisgICAgICAgIEVPYmplY3QgaXZfcnVsZVhDYXN0ZWRFeHByZXNzaW9uID0gbnVsbDsKKworCisgICAgICAgIHRyeSB7CisgICAgICAgICAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2V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25fMD1ydWxlWFBvc3RmaXhPcGVyYXRpb24oKTsKKworICAgICAgICAgICAgc3RhdGUuX2ZzcC0tOworICAgICAgICAgICAgaWYgKHN0YXRlLmZhaWxlZCkgcmV0dXJuIGN1cnJlbnQ7CisgICAgICAgICAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKyAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgPSB0aGlzX1hQb3N0Zml4T3BlcmF0aW9uXzA7IAorICAgICAgICAgICAgICAgICAgICAgIGFmdGVyUGFyc2VyT3JFbnVtUnVsZUNhbGwoKTsKKyAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgfQorICAgICAgICAgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMzU0OjE6ICggKCAoICggKCkgJ2FzJyApICk9PiAoICgpIG90aGVybHZfMj0gJ2FzJyApICkgKCAobHZfdHlwZV8zXzA9IHJ1bGVKdm1UeXBlUmVmZXJlbmNlICkgKSApKgorICAgICAgICAgICAgbG9vcDYwOgorICAgICAgICAgICAgZG8geworICAgICAgICAgICAgICAgIGludCBhbHQ2MD0yOworICAgICAgICAgICAgICAgIGludCBMQTYwXzAgPSBpbnB1dC5MQSgxKTsKKworICAgICAgICAgICAgICAgIGlmICggKExBNjBfMD09NzUpICkgeworICAgICAgICAgICAgICAgICAgICBpbnQgTEE2MF8yID0gaW5wdXQuTEEoMik7CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKCAoc3lucHJlZDE5X0ludGVybmFsQ3ViZURTTCgpKSApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGFsdDYwPTE7CisgICAgICAgICAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICAgICAgfQorCis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OjMzNTY6NTogKCAoKSBvdGhlcmx2XzI9ICdhcycgKQorICAgICAgICAgICAgCSAgICAvLyAuLi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjLWdlbi9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvcGFyc2VyL2FudGxyL2ludGVybmFsL0ludGVybmFsQ3ViZURTTC5nOjMzNTY6NjogKCkgb3RoZXJsdl8yPSAnYXMnCisgICAgICAgICAgICAJICAgIHsKKyAgICAgICAgICAgIAkgICAgLy8gLi4vb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3BhcnNlci9hbnRsci9pbnRlcm5hbC9JbnRlcm5hbEN1YmVEU0wuZzozMzU2OjY6ICgpCisgICAgICAgICAgICAJICAgIC8vIC4uL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9wYXJzZXIvYW50bHIvaW50ZXJuYWwvSW50ZXJuYWxDdWJlRFNMLmc6MzM1Nzo1OiAKKyAgICAgICAgICAgIAkgICAgeworICAgICAgICAgICAgCSAgICBpZiAoIHN0YXRlLmJhY2t0cmFja2luZz09MCApIHsKKworICAgICAgICAgICAgCSAgICAgICAgICAgICAgY3VycmVudCA9IGZvcmNlQ3JlYXRlTW9kZWxFbGVtZW50QW5kU2V0KAorICAgICAgICAgICAgCSAgICAgICAgICAgICAgICAgIGdyYW1tYXJBY2Nlc3MuZ2V0WENhc3RlZEV4cHJlc3Npb25BY2Nlc3MoKS5nZXRYQ2FzdGVkRXhwcmVzc2lvblRhcmdldEFjdGlvbl8xXzBfMF8wKCksCisgICAgICAgICAgICAJICAgICAgICAgICAgICAgICAgY3VycmVudCk7CisgICAgICAgICAgICAJICAgICAgICAgIAorICAgICAgICAgICAgCSAgICB9C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WYgKCBzdGF0ZS5iYWNrdHJhY2tpbmc9PTAgKSB7CisKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBpZiAoY3VycmVudD09bnVsbCkgeworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgICAgICBjdXJyZW50ID0gY3JlYXRlTW9kZWxFbGVtZW50Rm9yUGFyZW50KGdyYW1tYXJBY2Nlc3MuZ2V0WENhc3RlZEV4cHJlc3Npb25SdWxlKCkpOworICAgICAgICAgICAgCSAgICAgIAkgICAgICAgIH0KKyAgICAgICAgICAgIAkgICAgICAgICAgICAgCQlzZXQoCisgICAgICAgICAgICAJICAgICAgICAgICAgIAkJCWN1cnJlbnQsIAorICAgICAgICAgICAgCSAgICAgICAgICAgICAJCQkidHlwZSIsCisgICAgICAgICAgICAJICAgICAgICAgICAgICAJCWx2X3R5cGVfM18wLCAKKyAgICAgICAgICAgIAkgICAgICAgICAgICAgIAkJIkp2bVR5cGVSZWZlcmVuY2UiKTsKKyAgICAgICAgICAgIAkgICAgICAJICAgICAgICBhZnRlclBhcnNlck9yRW51bVJ1bGVDYWxsKCk7CisgICAgICAgICAgICAJICAgICAgCSAgICAKKyAgICAgICAgICAgIAkgICAgfQorCisgICAgICAgICAgICAJICAgIH0KKworCisgICAgICAgICAgICAJICAgIH0KKworCisgICAgICAgICAgICAJICAgIH0KKyAgICAgICAgICAgIAkgICAgYnJlYWs7CisKKyAgICAgICAgICAgIAlkZWZhdWx0IDoKKyAgICAgICAgICAgIAkgICAgYnJlYWsgbG9vcDYwOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0gd2hpbGUgKHRydWUpOworCisKKyAgICAgICAgICAgIH0KKworCisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmICggc3RhdGUuYmFja3RyYWNraW5nPT0wICkgeworICAgICAgICAgICAgICAgbGVhdmVSdWxlKCk7IAorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgICAKKyAgICAgICAgICAgIGNhdGNoIChS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KyBiL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9zZXJpYWxpemVyL0N1YmVEU0xTZW1hbnRpY1NlcXVlbmNlci5qYXZhCkBAIC0wLDAgKzEsMTU5NyBAQAorLyoqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBDb3B5cmlnaHQgKGMpIDIwMTEsIDIwMTYgLSBMb2V0eiBHbWJIJkNvLktHICg2OTExNSBIZWlkZWxiZXJnLCBHZXJtYW55KSAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIEFsbCByaWdodHMgcmVzZXJ2ZWQuIFRoaXMgcHJvZ3JhbSBhbmQgdGhlIGFjY29tcGFueWluZyBtYXRlcmlhbHMgICAgICAgICAgIAorICogIGFyZSBtYWRlIGF2YWlsYWJsZSB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEVjbGlwc2UgUHVibGljIExpY2Vuc2UgdjEuMCAgICAgICAKKyAqICB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgIAorICogIGh0dHA6Ly93d3cuZWNsaXBzZS5vcmcvbGVnYWwvZXBsLXYxMC5odG1sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBDb250cmlidXRvcnM6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAJICAgQ2hyaXN0b3BoZSBMb2V0eiAoTG9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zYnAveHRleHQvY3ViZWRzbC9zZXJpYWxpemVyL0N1YmVEU0xTeW50YWN0aWNTZXF1ZW5jZXIuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5jMzhlYjViCi0tLSAvZGV2L251bGwKKysrIGIvb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3NlcmlhbGl6ZXIvQ3ViZURTTFN5bnRhY3RpY1NlcXVlbmNlci5qYXZhCkBAIC0wLDAgKzEsMTkxIEBACisvKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIENvcHlyaWdodCAoYykgMjAxMSwgMjAxNiAtIExvZXR6IEdtYkgmQ28uS0cgKDY5MTE1IEhlaWRlbGJlcmcsIEdlcm1hbnkpIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gVGhpcyBwcm9ncmFtIGFuZCB0aGUgYWNjb21wYW55aW5nIG1hdGVyaWFscyAgICAgICAgICAgCisgKiAgYXJlIG1hZGUgYXZhaWxhYmxlIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgRWNsaXBzZSBQdWJsaWMgTGljZW5zZSB2MS4wICAgICAgIAorICogIHdoaWNoIGFjY29tcGFuaWVzIHRoaXMgZGlzdHJpYnV0aW9uLCBhbmQgaXMgYXZhaWxhYmxlIGF0ICAgICAgICAgICAgICAgICAgCisgKiAgaHR0cDovL3d3dy5lY2xpcHNlLm9yZy9sZWdhbC9lcGwtdjEwLmh0bWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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XR6IEdtYkgmQ28uS0cgKDY5MTE1IEhlaWRlbGJlcmcsIEdlcm1hbnkpIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gVGhpcyBwcm9ncmFtIGFuZCB0aGUgYWNjb21wYW55aW5nIG1hdGVyaWFscyAgICAgICAgICAgCisgKiAgYXJlIG1hZGUgYXZhaWxhYmxlIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgRWNsaXBzZSBQdWJsaWMgTGljZW5zZSB2MS4wICAgICAgIAorICogIHdoaWNoIGFjY29tcGFuaWVzIHRoaXMgZGlzdHJpYnV0aW9uLCBhbmQgaXMgYXZhaWxhYmxlIGF0ICAgICAgICAgICAgICAgICAgCisgKiAgaHR0cDovL3d3dy5lY2xpcHNlLm9yZy9sZWdhbC9lcGwtdjEwLmh0bWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIENvbnRyaWJ1dG9yczogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqIAkgICBDaHJpc3RvcGhlIExvZXR6IChMb2V0eiBHbWJIJkNvLktHKSAtIGluaXRpYWwgaW1wbGVtZW50YXRpb24KKyAqIAorICovCisKK3BhY2thZ2Ugb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnNlcnZpY2VzOworCitpbXBvcnQgY29tLmdvb2dsZS5pbmplY3QuU2luZ2xldG9uOworaW1wb3J0IGNvbS5nb29nbGUuaW5qZWN0LkluamVjdDsKKworaW1wb3J0IGphdmEudXRpbC5MaXN0OworCitpbXBvcnQgb3JnLmVjbGlwc2UueHRleHQuKjsKK2ltcG9ydCBvcmcuZ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ZhIGIvb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3ZhbGlkYXRpb24vQWJzdHJhY3RDdWJlRFNMVmFsaWRhdG9yLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uMzZkZThiOAotLS0gL2Rldi9udWxsCisrKyBiL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMtZ2VuL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC92YWxpZGF0aW9uL0Fic3RyYWN0Q3ViZURTTFZhbGlkYXRvci5qYXZhCkBAIC0wLDAgKzEsMzQgQEAKKy8qKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29weXJpZ2h0IChjKSAyMDExLCAyMDE2IC0gTG9ldHogR21iSCZDby5LRyAoNjkxMTUgSGVpZGVsYmVyZywgR2VybWFueSkgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBBbGwgcmlnaHRzIHJlc2VydmVkLiBUaGlzIHByb2dyYW0gYW5kIHRoZSBhY2NvbXBhbnlpbmcgbWF0ZXJpYWxzICAgICAgICAgICAKKyAqICBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiAgd2hpY2ggYWNjb21wYW5pZXMgdGhpcyBkaXN0cmlidXRpb24sIGFuZCBpcyBhdmFpbGFibGUgYXQgICAgICAgICAgICAgICAgICAKKyAqICBodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2xlZ2FsL2VwbC12MTAuaHRtbCAgICAgICA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jdGl2YXRvci5qYXZhCkBAIC0wLDAgKzEsNDcgQEAKKy8qKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29weXJpZ2h0IChjKSAyMDExLCAyMDE2IC0gTG9ldHogR21iSCZDby5LRyAoNjkxMTUgSGVpZGVsYmVyZywgR2VybWFueSkgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBBbGwgcmlnaHRzIHJlc2VydmVkLiBUaGlzIHByb2dyYW0gYW5kIHRoZSBhY2NvbXBhbnlpbmcgbWF0ZXJpYWxzICAgICAgICAgICAKKyAqICBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiAgd2hpY2ggYWNjb21wYW5pZXMgdGhpcyBkaXN0cmlidXRpb24sIGFuZCBpcyBhdmFpbGFibGUgYXQgICAgICAgICAgICAgICAgICAKKyAqICBodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2xlZ2FsL2VwbC12MTAuaHRtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29udHJpYnV0b3JzOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogCSAgIENocmlzdG9waGUgTG9ldHogKExvZXR6IEdtYkgmQ28uS0cpIC0gaW5pdGlhbCBpbXBsZW1lbnRhdGlvbgorICogCisgKi8KKyBwYWNrYWdlIG9yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbDsKKworCitpbXBvcnQgb3JnLmVj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ICAgICAKKyAqICBodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2xlZ2FsL2VwbC12MTAuaHRtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29udHJpYnV0b3JzOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogCSAgIENocmlzdG9waGUgTG9ldHogKExvZXR6IEdtYkgmQ28uS0cpIC0gaW5pdGlhbCBpbXBsZW1lbnRhdGlvbgorICogCisgKi8KKworZ3JhbW1hciBvcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wuQ3ViZURTTCB3aXRoIG9yZy5lY2xpcHNlLnh0ZXh0LnhiYXNlLmFubm90YXRpb25zLlhiYXNlV2l0aEFubm90YXRpb25zCisKK2ltcG9ydCAiaHR0cDovL29zYnAuZWNsaXBzZS5vcmcveHRleHQvY3ViZWRzbC9DdWJlRFNMIgorCitpbXBvcnQgImh0dHA6Ly9vc2JwLmVjbGlwc2Uub3JnL2RzbC9jb21tb24vdHlwZXMvdjEiCitpbXBvcnQgImh0dHA6Ly9vc2JwLmVjbGlwc2Uub3JnL2RzbC9lbnRpdHkvdjEiIGFzIGVudGl0eQoraW1wb3J0ICJodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2VtZi8yMDAyL0Vjb3JlIiBhcyBlY29yZQorCitDdWJlTW9kZWw6CisJe0N1YmVNb2RlbH0gcGNrZz1DdWJlUGFja2FnZTsKKworQ3ViZVBhY2thZ2U6CisJJ3BhY2thZ2UnIG5hbWU9UXVhbGlmaWVkTmFtZSAoJ3snIChpbXBvcnRzKz1JbXBvcnQpKiAoZGltZW5zaW9ucys9Q3ViZURpbWVuc2lvbikqIChjdWJlcys9Q3ViZVR5cGUpKiAnfScpPzsKKwkKK0N1YmVUeXBlOgor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ICAgICAgICAgICAgICAKKyAqICBDb3B5cmlnaHQgKGMpIDIwMTEsIDIwMTYgLSBMb2V0eiBHbWJIJkNvLktHICg2OTExNSBIZWlkZWxiZXJnLCBHZXJtYW55KSAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIEFsbCByaWdodHMgcmVzZXJ2ZWQuIFRoaXMgcHJvZ3JhbSBhbmQgdGhlIGFjY29tcGFueWluZyBtYXRlcmlhbHMgICAgICAgICAgIAorICogIGFyZSBtYWRlIGF2YWlsYWJsZSB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEVjbGlwc2UgUHVibGljIExpY2Vuc2UgdjEuMCAgICAgICAKKyAqICB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgIAorICogIGh0dHA6Ly93d3cuZWNsaXBzZS5vcmcvbGVnYWwvZXBsLXYxMC5odG1sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBDb250cmlidXRvcnM6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAJICAgQ2hyaXN0b3BoZSBMb2V0eiAoTG9ldHogR21iSCZDby5LRykgLSBpbml0aWFsIGltcGxlbWVudGF0aW9uCisgKiAKKyAqLworIHBhY2thZ2Ugb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsOworCitpbXBvcnQgb3JnLmVjbGlwc2Uub3NicC5kc2wueHRleHQudHlwZXMuYnVuZGxlcy5CdW5kbGVTcGFjZVR5cGVQcm92aWRlckZhY3Rvcnk7CitpbXBvcnQgb3JnLmVjbGlwc2Uub3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MQnVuZGxlU3BhY2VTdGFuZGFsb25lU2V0dXAuamF2YQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5jYWI5OTJjCi0tLSAvZGV2L251bGwKKysrIGIvb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsL3NyYy9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvQ3ViZURTTEJ1bmRsZVNwYWNlU3RhbmRhbG9uZVNldHVwLmphdmEKQEAgLTAsMCArMSw1NCBAQAorLyoqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBDb3B5cmlnaHQgKGMpIDIwMTEsIDIwMTYgLSBMb2V0eiBHbWJIJkNvLktHICg2OTExNSBIZWlkZWxiZXJnLCBHZXJtYW55KSAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIEFsbCByaWdodHMgcmVzZXJ2ZWQuIFRoaXMgcHJvZ3JhbSBhbmQgdGhlIGFjY29tcGFueWluZyBtYXRlcmlhbHMgICAgICAgICAgIAorICogIGFyZSBtYWRlIGF2YWlsYWJsZSB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEVjbGlwc2UgUHVibGljIExpY2Vuc2UgdjEuMCAgICAgICAKKyAqICB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgIAorICogIGh0dHA6Ly93d3cuZWNsaXBzZS5vcmcvbGVnYWwvZXBsLXYxMC5odG1sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyA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LmY5OWNkY2QKLS0tIC9kZXYvbnVsbAorKysgYi9vcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wvc3JjL29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9DdWJlRFNMUnVudGltZU1vZHVsZS5qYXZhCkBAIC0wLDAgKzEsODggQEAKKy8qKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiBDb3B5cmlnaHQgKGMpIDIwMTEsIDIwMTYgLSBMb2V0eiBHbWJIJkNvLktHICg2OTExNSBIZWlkZWxiZXJnLCBHZXJtYW55KQorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiBBbGwgcmlnaHRzIHJlc2VydmVkLiBUaGlzIHByb2dyYW0gYW5kIHRoZSBhY2NvbXBhbnlpbmcgbWF0ZXJpYWxzICAgICAgICAgICAKKyAqIGFyZSBtYWRlIGF2YWlsYWJsZSB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEVjbGlwc2UgUHVibGljIExpY2Vuc2UgdjEuMCAgICAgICAKKyAqIHdoaWNoIGFjY29tcGFuaWVzIHRoaXMgZGlzdHJpYnV0aW9uLCBhbmQgaXMgYXZhaWxhYmxlIGF0ICAgICAgICAgICAgICAgICAgCisgKiBodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2xlZ2FsL2VwbC12MTAuaHRtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiBDb250cmlidXRvcnM6ICAgCisgKiBDaHJpc3RvcGhlIExvZXR6IChMb2V0eiBHbWJIJkNvLktHKSAtIGluaXRpYWwgaW1wbGVtZW50YXRpb24gCisgKi8KK3Bh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g2OTExNSBIZWlkZWxiZXJnLCBHZXJtYW55KQorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiBBbGwgcmlnaHRzIHJlc2VydmVkLiBUaGlzIHByb2dyYW0gYW5kIHRoZSBhY2NvbXBhbnlpbmcgbWF0ZXJpYWxzICAgICAgICAgICAKKyAqIGFyZSBtYWRlIGF2YWlsYWJsZSB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEVjbGlwc2UgUHVibGljIExpY2Vuc2UgdjEuMCAgICAgICAKKyAqIHdoaWNoIGFjY29tcGFuaWVzIHRoaXMgZGlzdHJpYnV0aW9uLCBhbmQgaXMgYXZhaWxhYmxlIGF0ICAgICAgICAgICAgICAgICAgCisgKiBodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2xlZ2FsL2VwbC12MTAuaHRtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiBDb250cmlidXRvcnM6ICAgCisgKiBDaHJpc3RvcGhlIExvZXR6IChMb2V0eiBHbWJIJkNvLktHKSAtIGluaXRpYWwgaW1wbGVtZW50YXRpb24gCisgKi8KK3BhY2thZ2Ugb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsOworCisvKioKKyAqIEluaXRpYWxpemF0aW9uIHN1cHBvcnQgZm9yIHJ1bm5pbmcgWHRleHQgbGFuZ3VhZ2VzIHdpdGhvdXQgZXF1aW5veCBleHRlbnNpb24KKyAqIHJlZ2lzdHJ5CisgKi8KK3B1YmxpYyBjbGFzcyBDdWJlRFNMU3RhbmRhbG9uZVNldHVwIGV4dGVuZHMgQ3ViZURTTFN0YW5kYWxvbmVTZXR1cEdlbmVyYXRlZCB7CisKKwlwdWJsaWMgc3RhdGljIHZvaWQgZG9T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bnNlIHYxLjAgICAgICAgCisgKiAgd2hpY2ggYWNjb21wYW5pZXMgdGhpcyBkaXN0cmlidXRpb24sIGFuZCBpcyBhdmFpbGFibGUgYXQgICAgICAgICAgICAgICAgICAKKyAqICBodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2xlZ2FsL2VwbC12MTAuaHRtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29udHJpYnV0b3JzOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogCSAgIENocmlzdG9waGUgTG9ldHogKExvZXR6IEdtYkgmQ28uS0cpIC0gaW5pdGlhbCBpbXBsZW1lbnRhdGlvbgorICogCisgKi8KKworbW9kdWxlIG9yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC5HZW5lcmF0ZUN1YmVEU0wKKworaW1wb3J0IG9yZy5lY2xpcHNlLmVtZi5td2UudXRpbHMuKgoraW1wb3J0IG9yZy5lY2xpcHNlLnh0ZXh0LmdlbmVyYXRvci4qCitpbXBvcnQgb3JnLmVjbGlwc2UueHRleHQudWkuZ2VuZXJhdG9yLiogCitpbXBvcnQgb3JnLmVjbGlwc2Uub3NicC5kc2wubXdlLioKKworLy92YXIgZ3JhbW1hclVSSSA9ICJjbGFzc3BhdGg6L29yZy9lY2xpcHNlL29zYnAveHRleHQvY3ViZWRzbC9DdWJlRFNMLnh0ZXh0IgorCit2YXIgcHJvamVjdE5hbWUgPSAib3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsIgordmFyIGdyYW1tYXJVUkkgPSAicGxhdGZvcm06L3Jlc291cmNlLyR7cHJvamVjdE5hbWV9L3NyYy9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvQ3ViZURTTC54dGV4dCIKK3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uNzE0OGEzNQotLS0gL2Rldi9udWxsCisrKyBiL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMvb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL1hjb3JlUmVzb3VyY2VGYWN0b3J5LmphdmEKQEAgLTAsMCArMSwyNyBAQAorLyoqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqIENvcHlyaWdodCAoYykgMjAxMSwgMjAxNiAtIExvZXR6IEdtYkgmQ28uS0cgKDY5MTE1IEhlaWRlbGJlcmcsIEdlcm1hbnkpCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqIEFsbCByaWdodHMgcmVzZXJ2ZWQuIFRoaXMgcHJvZ3JhbSBhbmQgdGhlIGFjY29tcGFueWluZyBtYXRlcmlhbHMgICAgICAgICAgIAorICogYXJlIG1hZGUgYXZhaWxhYmxlIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgRWNsaXBzZSBQdWJsaWMgTGljZW5zZSB2MS4wICAgICAgIAorICogd2hpY2ggYWNjb21wYW5pZXMgdGhpcyBkaXN0cmlidXRpb24sIGFuZCBpcyBhdmFpbGFibGUgYXQgICAgICAgICAgICAgICAgICAKKyAqIGh0dHA6Ly93d3cuZWNsaXBzZS5vcmcvbGVnYWwvZXBsLXYxMC5odG1sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqIENvbnRyaWJ1dG9yczogICAKKyAqIENocmlzdG9waGUgTG9ldHogKExvZXR6IEdtYkgmQ28uS0cpIC0gaW5pdGlhbCBpbXBsZW1lbnRhdGlvbiAKKyAqLwor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xLDc2IEBACisvKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogQ29weXJpZ2h0IChjKSAyMDExLCAyMDE2IC0gTG9ldHogR21iSCZDby5LRyAoNjkxMTUgSGVpZGVsYmVyZywgR2VybWFueSkKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogQWxsIHJpZ2h0cyByZXNlcnZlZC4gVGhpcyBwcm9ncmFtIGFuZCB0aGUgYWNjb21wYW55aW5nIG1hdGVyaWFscyAgICAgICAgICAgCisgKiBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgIAorICogaHR0cDovL3d3dy5lY2xpcHNlLm9yZy9sZWdhbC9lcGwtdjEwLmh0bWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogQ29udHJpYnV0b3JzOiAgIAorICogQ2hyaXN0b3BoZSBMb2V0eiAoTG9ldHogR21iSCZDby5LRykgLSBpbml0aWFsIGltcGxlbWVudGF0aW9uIAorICogCisgKiAKKyAqICBUaGlzIGNvcHlyaWdodCBub3RpY2Ugc2hvd3MgdXAgaW4gdGhlIGdlbmVyYXRlZCBKYXZhIGNvZGUKKyAqCisgKi8KKyAKK3BhY2thZ2Ugb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLmZvcm1hdHRpbmcKKworaW1wb3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gR2VybWFueSkgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBBbGwgcmlnaHRzIHJlc2VydmVkLiBUaGlzIHByb2dyYW0gYW5kIHRoZSBhY2NvbXBhbnlpbmcgbWF0ZXJpYWxzICAgICAgICAgICAKKyAqICBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiAgd2hpY2ggYWNjb21wYW5pZXMgdGhpcyBkaXN0cmlidXRpb24sIGFuZCBpcyBhdmFpbGFibGUgYXQgICAgICAgICAgICAgICAgICAKKyAqICBodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2xlZ2FsL2VwbC12MTAuaHRtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29udHJpYnV0b3JzOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogCSAgIENocmlzdG9waGUgTG9ldHogKExvZXR6IEdtYkgmQ28uS0cpIC0gaW5pdGlhbCBpbXBsZW1lbnRhdGlvbgorICogCisgKi8KKyBwYWNrYWdlIG9yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC5nZW5lcmF0b3I7CisKK2ltcG9ydCBvcmcuZWNsaXBzZS5lbWYuY29tbW9uLnV0aWwuVVJJOworaW1wb3J0IG9yZy5lY2xpcHNlLnh0ZXh0LnJlc291cmNlLklSZXNvdXJjZVNlcnZpY2VQcm92aWRlcjsKKworLyoqCisgKiBSZXR1cm5zIHRoZSBhY3RpdmUge0BsaW5rIElDdWJlUnVudGltZUdlbmVyYXRvcn0gb3IgPGNvZGU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AKKyAqICBDb3B5cmlnaHQgKGMpIDIwMTEsIDIwMTYgLSBMb2V0eiBHbWJIJkNvLktHICg2OTExNSBIZWlkZWxiZXJnLCBHZXJtYW55KSAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIEFsbCByaWdodHMgcmVzZXJ2ZWQuIFRoaXMgcHJvZ3JhbSBhbmQgdGhlIGFjY29tcGFueWluZyBtYXRlcmlhbHMgICAgICAgICAgIAorICogIGFyZSBtYWRlIGF2YWlsYWJsZSB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEVjbGlwc2UgUHVibGljIExpY2Vuc2UgdjEuMCAgICAgICAKKyAqICB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgIAorICogIGh0dHA6Ly93d3cuZWNsaXBzZS5vcmcvbGVnYWwvZXBsLXYxMC5odG1sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBDb250cmlidXRvcnM6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAJICAgQ2hyaXN0b3BoZSBMb2V0eiAoTG9ldHogR21iSCZDby5LRykgLSBpbml0aWFsIGltcGxlbWVudGF0aW9uCisgKiAKKyAqIAorICogIFRoaXMgY29weXJpZ2h0IG5vdGljZSBzaG93cyB1cCBpbiB0aGUgZ2VuZXJhdGVkIEphdmEgY29kZQorICoKKyAqLworIAorcGFja2FnZSBvcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wuanZtbW9kZWwKKworaW1wb3J0IG9yZy5lY2xpcHNlLmVtZi5lY29yZS5yZXN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gTG9ldHogR21iSCZDby5LRyAoNjkxMTUgSGVpZGVsYmVyZywgR2VybWFueSkgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBBbGwgcmlnaHRzIHJlc2VydmVkLiBUaGlzIHByb2dyYW0gYW5kIHRoZSBhY2NvbXBhbnlpbmcgbWF0ZXJpYWxzICAgICAgICAgICAKKyAqICBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiAgd2hpY2ggYWNjb21wYW5pZXMgdGhpcyBkaXN0cmlidXRpb24sIGFuZCBpcyBhdmFpbGFibGUgYXQgICAgICAgICAgICAgICAgICAKKyAqICBodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2xlZ2FsL2VwbC12MTAuaHRtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQ29udHJpYnV0b3JzOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogCSAgIENocmlzdG9waGUgTG9ldHogKExvZXR6IEdtYkgmQ28uS0cpIC0gaW5pdGlhbCBpbXBsZW1lbnRhdGlvbgorICogCisgKiAKKyAqICBUaGlzIGNvcHlyaWdodCBub3RpY2Ugc2hvd3MgdXAgaW4gdGhlIGdlbmVyYXRlZCBKYXZhIGNvZGUKKyAqCisgKi8KKyAKK3BhY2thZ2Ugb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLmp2bW1vZGVsCisKK2ltcG9ydCBvcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wuQ3ViZVBhY2thZ2UKK2ltcG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IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uNjBjN2M2YwotLS0gL2Rldi9udWxsCisrKyBiL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMvb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3Njb3BpbmcvQ3ViZURTTFNjb3BlUHJvdmlkZXIueHRlbmQKQEAgLTAsMCArMSwyODMgQEAKKy8qKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiBDb3B5cmlnaHQgKGMpIDIwMTEsIDIwMTYgLSBMb2V0eiBHbWJIJkNvLktHICg2OTExNSBIZWlkZWxiZXJnLCBHZXJtYW55KQorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiBBbGwgcmlnaHRzIHJlc2VydmVkLiBUaGlzIHByb2dyYW0gYW5kIHRoZSBhY2NvbXBhbnlpbmcgbWF0ZXJpYWxzICAgICAgICAgICAKKyAqIGFyZSBtYWRlIGF2YWlsYWJsZSB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEVjbGlwc2UgUHVibGljIExpY2Vuc2UgdjEuMCAgICAgICAKKyAqIHdoaWNoIGFjY29tcGFuaWVzIHRoaXMgZGlzdHJpYnV0aW9uLCBhbmQgaXMgYXZhaWxhYmxlIGF0ICAgICAgICAgICAgICAgICAgCisgKiBodHRwOi8vd3d3LmVjbGlwc2Uub3JnL2xlZ2FsL2VwbC12MTAuaHRtbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiBDb250cmlidXRvcnM6ICAgCisgKiBDaHJpc3RvcGhlIExvZXR6IChMb2V0eiBHb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VsYmVyZywgR2VybWFueSkKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogQWxsIHJpZ2h0cyByZXNlcnZlZC4gVGhpcyBwcm9ncmFtIGFuZCB0aGUgYWNjb21wYW55aW5nIG1hdGVyaWFscyAgICAgICAgICAgCisgKiBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgIAorICogaHR0cDovL3d3dy5lY2xpcHNlLm9yZy9sZWdhbC9lcGwtdjEwLmh0bWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogQ29udHJpYnV0b3JzOiAgIAorICogQ2hyaXN0b3BoZSBMb2V0eiAoTG9ldHogR21iSCZDby5LRykgLSBpbml0aWFsIGltcGxlbWVudGF0aW9uIAorICogCisgKiAKKyAqICBUaGlzIGNvcHlyaWdodCBub3RpY2Ugc2hvd3MgdXAgaW4gdGhlIGdlbmVyYXRlZCBKYXZhIGNvZGUKKyAqCisgKi8KKyAKK3BhY2thZ2Ugb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLnZhbGlkYXRpb24KKworaW1wb3J0IG9yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC5DdWJlRGltZW5zaW9uCitpbXBvcnQgb3JnLmVjbGlwc2Uub3NicC54dGV4dC5jdWJlZHNsLkN1YmVIaWVyYXJjaHkKK2ltcG9ydCBvcmcuZWNsaXBzZS5vc2JwLnh0ZXh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QvY3ViZWRzbC92YWx1ZWNvbnZlcnRlci9DdWJlVmFsdWVDb252ZXJ0ZXJTZXJ2aWNlLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uZDRjMGYyNwotLS0gL2Rldi9udWxsCisrKyBiL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC9zcmMvb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3ZhbHVlY29udmVydGVyL0N1YmVWYWx1ZUNvbnZlcnRlclNlcnZpY2UuamF2YQpAQCAtMCwwICsxLDQ0IEBACisvKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogQ29weXJpZ2h0IChjKSAyMDExLCAyMDE2IC0gTG9ldHogR21iSCZDby5LRyAoNjkxMTUgSGVpZGVsYmVyZywgR2VybWFueSkKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogQWxsIHJpZ2h0cyByZXNlcnZlZC4gVGhpcyBwcm9ncmFtIGFuZCB0aGUgYWNjb21wYW55aW5nIG1hdGVyaWFscyAgICAgICAgICAgCisgKiBhcmUgbWFkZSBhdmFpbGFibGUgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBFY2xpcHNlIFB1YmxpYyBMaWNlbnNlIHYxLjAgICAgICAgCisgKiB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgIAorICogaHR0cDovL3d3dy5lY2xpcHNlLm9yZy9sZWdhbC9lcGwtdjEwLmh0bWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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lnaHQgKGMpIDIwMTEsIDIwMTYgLSBMb2V0eiBHbWJIJkNvLktHICg2OTExNSBIZWlkZWxiZXJnLCBHZXJtYW55KSAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIEFsbCByaWdodHMgcmVzZXJ2ZWQuIFRoaXMgcHJvZ3JhbSBhbmQgdGhlIGFjY29tcGFueWluZyBtYXRlcmlhbHMgICAgICAgICAgIAorICogIGFyZSBtYWRlIGF2YWlsYWJsZSB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEVjbGlwc2UgUHVibGljIExpY2Vuc2UgdjEuMCAgICAgICAKKyAqICB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgIAorICogIGh0dHA6Ly93d3cuZWNsaXBzZS5vcmcvbGVnYWwvZXBsLXYxMC5odG1sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBDb250cmlidXRvcnM6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAJICAgQ2hyaXN0b3BoZSBMb2V0eiAoTG9ldHogR21iSCZDby5LRykgLSBpbml0aWFsIGltcGxlbWVudGF0aW9uCisgKiAKKyAqLworcGFja2FnZSBvcmcuZWNsaXBzZS5vc2JwLnh0ZXh0LmN1YmVkc2wuZm9ybWF0dGluZzsKKworaW1wb3J0IGNvbS5nb29nbGUuaW5qZWN0LkluamVjdDsKK2ltcG9ydCBvcmcuZWNsaXBzZS5vc2JwLnV0aWxzLnh0ZXh0LkdlbmVyaWNGb3JtYXR0ZXI7CitpbXBvcnQgb3JnLmVjbGlwc2UueH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C1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3Njb3BpbmcvQ3ViZURTTFNjb3BlUHJvdmlkZXIuamF2YQpAQCAtMCwwICsxLDUzNiBAQAorLyoqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBDb3B5cmlnaHQgKGMpIDIwMTEsIDIwMTYgLSBMb2V0eiBHbWJIJkNvLktHICg2OTExNSBIZWlkZWxiZXJnLCBHZXJtYW55KSAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIEFsbCByaWdodHMgcmVzZXJ2ZWQuIFRoaXMgcHJvZ3JhbSBhbmQgdGhlIGFjY29tcGFueWluZyBtYXRlcmlhbHMgICAgICAgICAgIAorICogIGFyZSBtYWRlIGF2YWlsYWJsZSB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEVjbGlwc2UgUHVibGljIExpY2Vuc2UgdjEuMCAgICAgICAKKyAqICB3aGljaCBhY2NvbXBhbmllcyB0aGlzIGRpc3RyaWJ1dGlvbiwgYW5kIGlzIGF2YWlsYWJsZSBhdCAgICAgICAgICAgICAgICAgIAorICogIGh0dHA6Ly93d3cuZWNsaXBzZS5vcmcvbGVnYWwvZXBsLXYxMC5odG1sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICBDb250cmlidXRvcnM6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAJICAgQ2hyaXN0b3BoZSBMb2V0eiAoTG9ldHogR21iSCZDby5LRykgLSBpbml0aWFsIGltcGxlbWVudGF0aW9uCisgKiAKKyAq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pIHsKKyAgICAgICAgICAgIHJlc3VsdC5hZGQoZW50aXR5QXR0cik7CisgICAgICAgICAgfQorICAgICAgICB9CisgICAgICB9CisgICAgfQorICAgIGJvb2xlYW4gX25vdEVxdWFsc18xID0gKCFPYmplY3RzLmVxdWFsKGN1YmVFbnQsIG51bGwpKTsKKyAgICBpZiAoX25vdEVxdWFsc18xKSB7CisgICAgICBTdHJpbmcgX25hbWUgPSBjdWJlRW50LmdldE5hbWUoKTsKKyAgICAgIGJvb2xlYW4gX2NvbnRhaW5zID0gZGltRW50aXRpZXMuY29udGFpbnMoX25hbWUpOworICAgICAgaWYgKF9jb250YWlucykgeworICAgICAgICBMaXN0PExFbnRpdHlBdHRyaWJ1dGU+IF9hbGxBdHRyaWJ1dGVzXzEgPSBjdWJlRW50LmdldEFsbEF0dHJpYnV0ZXMoKTsKKyAgICAgICAgZm9yIChmaW5hbCBMRW50aXR5QXR0cmlidXRlIGVudGl0eUF0dHJfMSA6IF9hbGxBdHRyaWJ1dGVzXzEpIHsKKyAgICAgICAgICByZXN1bHQuYWRkKGVudGl0eUF0dHJfMSk7CisgICAgICAgIH0KKyAgICAgIH0gZWxzZSB7CisgICAgICAgIExpc3Q8TEVudGl0eVJlZmVyZW5jZT4gX2FsbFJlZmVyZW5jZXMgPSBjdWJlRW50LmdldEFsbFJlZmVyZW5jZXMoKTsKKyAgICAgICAgZm9yIChmaW5hbCBMRW50aXR5UmVmZXJlbmNlIGVudGl0eVJlZiA6IF9hbGxSZWZlcmVuY2VzKSB7CisgICAgICAgICAgU3RyaW5nIF90eXBlTmFtZSA9IHRoaXMuZ2V0VHlwZU5hbWUoZW50aXR5UmVmKTsKKyAgICAgICAgICBib29sZWFuIF9jb250YWluc18xID0gZGltRW50aXRpZXMuY29udGFpbnMoX3R5cGVOYW1lKTsKKyAgICAgICAgICBpZiAoX2NvbnRhaW5zXzEpIHsKKyAgICAgICAgICAgIHJlc3VsdC5hZGQoZW50aXR5UmVmKTsKKyAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIH0KKyAgICB9CisgICAgcmV0dXJuIFNjb3Blcy5zY29wZUZvcihyZXN1bHQpOworICB9CisgIAorICBwdWJsaWMgQXJyYXlMaXN0PEVPYmplY3Q+IGdldFJlZlJlc3VsdExpc3QoZmluYWwgTEVudGl0eSBjdWJlRW50LCBmaW5hbCBBcnJheUxpc3Q8RU9iamVjdD4gcmVzdWx0KSB7CisgICAgTGlzdDxMRW50aXR5UmVmZXJlbmNlPiBfYWxsUmVmZXJlbmNlcyA9IGN1YmVFbnQuZ2V0QWxsUmVmZXJlbmNlcygpOworICAgIGZvciAoZmluYWwgTEVudGl0eVJlZmVyZW5jZSBlbnRpdHlSZWYgOiBfYWxsUmVmZXJlbmNlcykgeworICAgICAgU3RyaW5nIF9uYW1lID0gZW50aXR5UmVmLmdldE5hbWUoKTsKKyAgICAgIGJvb2xlYW4gX25vdEVxdWFscyA9ICghT2JqZWN0cy5lcXVhbChfbmFtZSwgbnVsbCkpOworICAgICAgaWYgKF9ub3RFcXVhbHMpIHsKKyAgICAgICAgcmVzdWx0LmFkZChlbnRpdHlSZWYpOworICAgICAgfQorICAgIH0KKyAgICByZXR1cm4gcmVzdWx0OworICB9CisgIAorICBwdWJsaWMgTEVudGl0eSBnZXRDdWJlRW50aXR5KGZpbmFsIEVPYmplY3QgY2hpbGRFT2JqKSB7CisgICAgTEVudGl0eSBjdWJlRW50ID0gbnVsbDsKKyAgICBFT2JqZWN0IGVPYmogPSBjaGlsZEVPYmouZUNvbnRhaW5lcigpOworICAgIHdoaWxlICgoIShlT2JqIGluc3RhbmNlb2YgQ3ViZVR5cGVFbnRpdHkpKSkgeworICAgICAgYm9vbGVhbiBfbm90RXF1YWxzID0gKCFPYmplY3RzLmVxdWFsKGVPYmosIG51bGwpKTsKKyAgICAgIGlmIChfbm90RXF1YWxzKSB7CisgICAgICAgIEVPYmplY3QgX2VDb250YWluZXIgPSBlT2JqLmVDb250YWluZXIoKTsKKyAgICAgICAgZU9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WFuIF9hbmRfMiA9IGZhbHNlOworICAgICAgICAgIGJvb2xlYW4gX2FuZF8zID0gZmFsc2U7CisgICAgICAgICAgTFNjYWxhclR5cGUgX3R5cGUgPSBlbnRpdHlBdHRyLmdldFR5cGUoKTsKKyAgICAgICAgICBib29sZWFuIF9ub3RFcXVhbHNfMiA9ICghT2JqZWN0cy5lcXVhbChfdHlwZSwgbnVsbCkpOworICAgICAgICAgIGlmICghX25vdEVxdWFsc18yKSB7CisgICAgICAgICAgICBfYW5kXzMgPSBmYWxzZTsKKyAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgTFNjYWxhclR5cGUgX3R5cGVfMSA9IGVudGl0eUF0dHIuZ2V0VHlwZSgpOworICAgICAgICAgICAgX2FuZF8zID0gKF90eXBlXzEgaW5zdGFuY2VvZiBMRGF0YVR5cGUpOworICAgICAgICAgIH0KKyAgICAgICAgICBpZiAoIV9hbmRfMykgeworICAgICAgICAgICAgX2FuZF8yID0gZmFsc2U7CisgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIExTY2FsYXJUeXBlIF90eXBlXzIgPSBlbnRpdHlBdHRyLmdldFR5cGUoKTsKKyAgICAgICAgICAgIGJvb2xlYW4gX2lzQXNQcmltaXRpdmUgPSAoKExEYXRhVHlwZSkgX3R5cGVfMikuaXNBc1ByaW1pdGl2ZSgpOworICAgICAgICAgICAgX2FuZF8yID0gX2lzQXNQcmltaXRpdmU7CisgICAgICAgICAgfQorICAgICAgICAgIGlmICghX2FuZF8yKSB7CisgICAgICAgICAgICBfYW5kXzEgPSBmYWxzZTsKKyAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgTFNjYWxhclR5cGUgX3R5cGVfMyA9IGVudGl0eUF0dHIuZ2V0VHlwZSgpOworICAgICAgICAgICAgU3RyaW5nIF9uYW1lID0gKChMRGF0YVR5cGUpIF90eXBlXzMpLmdldE5hbWUoKTsKKyAgICAgICAgICAgIGJvb2xlYW4gX2VxdWFsc18yID0gIlN0cmluZyIuZXF1YWxzKF9uYW1lKTsKKyAgICAgICAgICAgIGJvb2xlYW4gX25vdCA9ICghX2VxdWFsc18yKTsKKyAgICAgICAgICAgIF9hbmRfMSA9IF9ub3Q7CisgICAgICAgICAgfQorICAgICAgICAgIGlmIChfYW5kXzEpIHsKKyAgICAgICAgICAgIHJlc3VsdC5hZGQoZW50aXR5QXR0cik7CisgICAgICAgICAgfQorICAgICAgICB9CisgICAgICB9CisgICAgfQorICAgIHJldHVybiBTY29wZXMuc2NvcGVGb3IocmVzdWx0KTsKKyAgfQorICAKKyAgcHVibGljIElTY29wZSBnZXRTY29wZV9DdWJlRW50aXR5Q29sUmVmKGZpbmFsIEVPYmplY3QgY29udGV4dCkgeworICAgIEFycmF5TGlzdDxFT2JqZWN0PiByZXN1bHQgPSBDb2xsZWN0aW9uTGl0ZXJhbHMuPEVPYmplY3Q+bmV3QXJyYXlMaXN0KCk7CisgICAgRU9iamVjdCBlT2JqID0gY29udGV4dDsKKyAgICB3aGlsZSAoKCEoKChlT2JqIGluc3RhbmNlb2YgQ3ViZURpbWVuc2lvbkVudGl0eSkgfHwgKGVPYmogaW5zdGFuY2VvZiBDdWJlRGltZW5zaW9uRW50aXR5RW50aXR5KSkgfHwgKGVPYmogaW5zdGFuY2VvZiBDdWJlVHlwZUVudGl0eSkpKSkgeworICAgICAgYm9vbGVhbiBfbm90RXF1YWxzID0gKCFPYmplY3RzLmVxdWFsKGVPYmosIG51bGwpKTsKKyAgICAgIGlmIChfbm90RXF1YWxzKSB7CisgICAgICAgIEVPYmplY3QgX2VDb250YWluZXIgPSBlT2JqLmVDb250YWluZXIoKTsKKyAgICAgICAgZU9iaiA9IF9lQ29udGFpbmVyOworICAgICAgfQorICAgIH0KKyAgICBib29sZWFuIF9ub3RFcXVhbHMgPSAoIU9iamVjdHMuZXF1YWwoZU9iaiwgbnVsbCkpOworICAgIGlmIChfbm90RXF1YWxzKSB7CisgICAgICBMRW50aXR5IGN1YmVFbnQgPSBudWxsO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FscyhfbmFtZV8zKTsKKyAgICAgICAgICBfYW5kXzMgPSBfZXF1YWxzOworICAgICAgICB9CisgICAgICAgIGlmIChfYW5kXzMpIHsKKyAgICAgICAgICByZXN1bHQuYWRkKGxFbnRSZWYpOworICAgICAgICB9CisgICAgICB9CisgICAgfQorICAgIHJldHVybiByZXN1bHQ7CisgIH0KKyAgCisgIHB1YmxpYyBBcnJheUxpc3Q8RU9iamVjdD4gZ2V0QXR0clJlc3VsdExpc3QoZmluYWwgTEVudGl0eSBjdWJlRW50LCBmaW5hbCBBcnJheUxpc3Q8RU9iamVjdD4gcmVzdWx0KSB7CisgICAgYm9vbGVhbiBfbm90RXF1YWxzID0gKCFPYmplY3RzLmVxdWFsKGN1YmVFbnQsIG51bGwpKTsKKyAgICBpZiAoX25vdEVxdWFscykgeworICAgICAgTGlzdDxMRW50aXR5QXR0cmlidXRlPiBfYWxsQXR0cmlidXRlcyA9IGN1YmVFbnQuZ2V0QWxsQXR0cmlidXRlcygpOworICAgICAgZm9yIChmaW5hbCBMRW50aXR5QXR0cmlidXRlIGVudGl0eUF0dHIgOiBfYWxsQXR0cmlidXRlcykgeworICAgICAgICBTdHJpbmcgX25hbWUgPSBlbnRpdHlBdHRyLmdldE5hbWUoKTsKKyAgICAgICAgYm9vbGVhbiBfbm90RXF1YWxzXzEgPSAoIU9iamVjdHMuZXF1YWwoX25hbWUsIG51bGwpKTsKKyAgICAgICAgaWYgKF9ub3RFcXVhbHNfMSkgeworICAgICAgICAgIHJlc3VsdC5hZGQoZW50aXR5QXR0cik7CisgICAgICAgIH0KKyAgICAgIH0KKyAgICB9CisgICAgcmV0dXJuIHJlc3VsdDsKKyAgfQorICAKKyAgcHVibGljIEFycmF5TGlzdDxFT2JqZWN0PiBnZXRBbGxGZWF0dXJlc1Jlc3VsdExpc3QoZmluYWwgTEVudGl0eSBjdWJlRW50LCBmaW5hbCBBcnJheUxpc3Q8RU9iamVjdD4gcmVzdWx0KSB7CisgICAgYm9vbGVhbiBfbm90RXF1YWxzID0gKCFPYmplY3RzLmVxdWFsKGN1YmVFbnQsIG51bGwpKTsKKyAgICBpZiAoX25vdEVxdWFscykgeworICAgICAgTGlzdDxMRW50aXR5RmVhdHVyZT4gX2FsbEZlYXR1cmVzID0gY3ViZUVudC5nZXRBbGxGZWF0dXJlcygpOworICAgICAgZm9yIChmaW5hbCBMRW50aXR5RmVhdHVyZSBlbnRpdHlGZWF0dXJlIDogX2FsbEZlYXR1cmVzKSB7CisgICAgICAgIFN0cmluZyBfbmFtZSA9IGVudGl0eUZlYXR1cmUuZ2V0TmFtZSgpOworICAgICAgICBib29sZWFuIF9ub3RFcXVhbHNfMSA9ICghT2JqZWN0cy5lcXVhbChfbmFtZSwgbnVsbCkpOworICAgICAgICBpZiAoX25vdEVxdWFsc18xKSB7CisgICAgICAgICAgcmVzdWx0LmFkZChlbnRpdHlGZWF0dXJlKTsKKyAgICAgICAgfQorICAgICAgfQorICAgIH0KKyAgICByZXR1cm4gcmVzdWx0OworICB9CisgIAorICBwdWJsaWMgU3RyaW5nIGdldERpbUVudGl0eU5hbWUoZmluYWwgQ3ViZUhpZXJhcmNoeSBjdWJlSGllcmFyY2h5KSB7CisgICAgYm9vbGVhbiBfYW5kID0gZmFsc2U7CisgICAgYm9vbGVhbiBfYW5kXzEgPSBmYWxzZTsKKyAgICBib29sZWFuIF9hbmRfMiA9IGZhbHNlOworICAgIGJvb2xlYW4gX25vdEVxdWFscyA9ICghT2JqZWN0cy5lcXVhbChjdWJlSGllcmFyY2h5LCBudWxsKSk7CisgICAgaWYgKCFfbm90RXF1YWxzKSB7CisgICAgICBfYW5kXzIgPSBmYWxzZTsKKyAgICB9IGVsc2UgeworICAgICAgQ3ViZURpbWVuc2lvbkVudGl0eSBfY3ViZURpbUVudGl0eSA9IGN1YmVIaWVyYXJjaHkuZ2V0Q3ViZURpbUVudGl0eSgpOworICAgICAgYm9vbGVhbiBfbm90RXF1YWxzXzEgPSAoIU9iamVjdHMuZXF1YWwoX2N1Y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9vcmcvZWNsaXBzZS9vc2JwL3h0ZXh0L2N1YmVkc2wvdmFsaWRhdGlvbi9DdWJlRFNMVmFsaWRhdG9yLmphdmEKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uNjBhYTI5NQotLS0gL2Rldi9udWxsCisrKyBiL29yZy5lY2xpcHNlLm9zYnAueHRleHQuY3ViZWRzbC94dGVuZC1nZW4vb3JnL2VjbGlwc2Uvb3NicC94dGV4dC9jdWJlZHNsL3ZhbGlkYXRpb24vQ3ViZURTTFZhbGlkYXRvci5qYXZhCkBAIC0wLDAgKzEsMTMyIEBACisvKioKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorICogIENvcHlyaWdodCAoYykgMjAxMSwgMjAxNiAtIExvZXR6IEdtYkgmQ28uS0cgKDY5MTE1IEhlaWRlbGJlcmcsIEdlcm1hbnkpIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gVGhpcyBwcm9ncmFtIGFuZCB0aGUgYWNjb21wYW55aW5nIG1hdGVyaWFscyAgICAgICAgICAgCisgKiAgYXJlIG1hZGUgYXZhaWxhYmxlIHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgRWNsaXBzZSBQdWJsaWMgTGljZW5zZSB2MS4wICAgICAgIAorICogIHdoaWNoIGFjY29tcGFuaWVzIHRoaXMgZGlzdHJpYnV0aW9uLCBhbmQgaXMgYXZhaWxhYmxlIGF0ICAgICAgICAgICAgICAgICAgCisgKiAgaHR0cDovL3d3dy5lY2xpcHNlLm9yZy9sZWdhbC9lcGwtdjEwLmh0bWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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