From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Jackson Hamilton Newsgroups: gmane.emacs.devel Subject: Requesting review before pushing patch to ELPA Date: Sun, 1 Feb 2015 23:49:48 -0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=047d7b472912d4afd6050e163250 X-Trace: ger.gmane.org 1422886214 9190 80.91.229.3 (2 Feb 2015 14:10:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Feb 2015 14:10:14 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 02 15:07:13 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YIHee-0005Zu-J7 for ged-emacs-devel@m.gmane.org; Mon, 02 Feb 2015 15:07:12 +0100 Original-Received: from localhost ([::1]:54845 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIHeY-0003WJ-PK for ged-emacs-devel@m.gmane.org; Mon, 02 Feb 2015 09:07:03 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIBlY-00040Z-4Q for emacs-devel@gnu.org; Mon, 02 Feb 2015 02:51:33 -0500 Original-Received: from mail-oi0-x22e.google.com ([2607:f8b0:4003:c06::22e]:45500) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YIBlV-0005Oj-IJ for emacs-devel@gnu.org; Mon, 02 Feb 2015 02:49:52 -0500 Original-Received: by mail-oi0-f46.google.com with SMTP id a141so43194992oig.5 for ; Sun, 01 Feb 2015 23:49:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=rBoH698JX834gtkt9qa/XZ40LIBD09LOoaUFMiI4MiE=; b=tFTn+tA3KZ9Tn9kuZIoD1H1RA2rDnMELWHLfy5g4KS4YGtHVp9D62JxpubJZnTKn+t DUCrOeJ3n3d4kFsGzhDWZ2F4jfzL6Qcj6BJCLsN8c8uJOyiCBEosrrH1CdqfJAbMxsnk 8XYK+G88QDtJwJ2QUsNTshUDLQHTL6jPMP8lA3/sx6v8LQ9B6WuefSqKVB06e8Q1Da6O FScVcUOHhhcV4DIP/DJVG/UBBuxL5Y5CmBrGvRHZ+Eithm64rDvI/O10g0vgCMQGqY6a QcNQEL1I4DR7reSC5jCIy3ufZ7fqzAIEFdwISkOvf27fZjRcTp2S5aInvdrv6O8+4Byw 5x7Q== X-Received: by 10.60.133.141 with SMTP id pc13mr11275366oeb.68.1422863388355; Sun, 01 Feb 2015 23:49:48 -0800 (PST) Original-Received: by 10.76.24.106 with HTTP; Sun, 1 Feb 2015 23:49:48 -0800 (PST) X-Google-Sender-Auth: A5m8HfovGNfy09LaovNVZ8mwMsc X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Mon, 02 Feb 2015 09:06:42 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:182253 Archived-At: --047d7b472912d4afd6050e163250 Content-Type: multipart/alternative; boundary=047d7b472912d4afcf050e16324e --047d7b472912d4afcf050e16324e Content-Type: text/plain; charset=ISO-8859-1 Hi guys. I'm about to push my package "context-coloring" to ELPA, but thought it would be a good idea to run my changes by a few other eyes before doing so. First, to add my package I ran the following git commands: git remote add context-coloring https://github.com/jacksonrayhamilton/context-coloring.git git subtree add --prefix=packages/context-coloring/ context-coloring master This resulted in my entire project history being added to the repository, which included 247 commits. I am not sure if these should be squashed, but based on the commit log it seems like this subtree approach is how other people are managing their externally-maintained packages, so I assume it is okay to add the whole history. On top of that, I added 2 patches so that I could test ELPA locally. I was able to install my package via a "local-elpa" as described in the README. The patches for that are attached in this email. There is also one big superpatch for the addition of the context-coloring package. I squashed the 247 commits into one patch file, but note that the patch file for the addition of the context-coloring patches represents those 247 commits. It contains all the external elisp and js files needed for testing and benchmarking, so don't pay those much mind, unless you don't want them in the repo, in which case let me know. Thanks, Jackson --047d7b472912d4afcf050e16324e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi guys. I'm about to push my package "context-co= loring" to ELPA, but thought it would be a good idea to run my changes= by a few other eyes before doing so.

First, to add my p= ackage I ran the following git commands:

git subtree add --prefix=3Dpackages/context-coloring/ = context-coloring master

This resulted in my en= tire project history being added to the repository, which included 247 comm= its. I am not sure if these should be squashed, but based on the commit log= it seems like this subtree approach is how other people are managing their= externally-maintained packages, so I assume it is okay to add the whole hi= story.

On top of that, I added 2 patches so that I= could test ELPA locally. I was able to install my package via a "loca= l-elpa" as described in the README. The patches for that are attached = in this email.

There is also one big superpatch fo= r the addition of the context-coloring package. I squashed the 247 commits = into one patch file, but note that the patch file for the addition of the c= ontext-coloring patches represents those 247 commits. It contains all the e= xternal elisp and js files needed for testing and benchmarking, so don'= t pay those much mind, unless you don't want them in the repo, in which= case let me know.

Thanks,
Jackson
=
--047d7b472912d4afcf050e16324e-- --047d7b472912d4afd6050e163250 Content-Type: text/x-patch; charset=US-ASCII; name="0001-Squashed-commits.patch" Content-Disposition: attachment; filename="0001-Squashed-commits.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i5njzwn30 RnJvbSBkM2M5YmU1OGU0ZTk3ZmJmNTkzODRhY2RhYmIwNGEzM2Q2YTdlOTk2IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBKYWNrc29uIFJheSBIYW1pbHRvbiA8amFja3NvbkBqYWNrc29u cmF5aGFtaWx0b24uY29tPgpEYXRlOiBTdW4sIDEgRmViIDIwMTUgMjM6NDI6MDEgLTA4MDAKU3Vi amVjdDogW1BBVENIXSBTcXVhc2hlZCBjb21taXRzCgotLS0KIHBhY2thZ2VzL2NvbnRleHQtY29s b3JpbmcvLmVscGFpZ25vcmUgICAgICAgICAgICAgIHwgICAgMTMgKwogcGFja2FnZXMvY29udGV4 dC1jb2xvcmluZy8uZ2l0aWdub3JlICAgICAgICAgICAgICAgfCAgICAgMiArCiBwYWNrYWdlcy9j b250ZXh0LWNvbG9yaW5nLy50cmF2aXMueW1sICAgICAgICAgICAgICB8ICAgIDE3ICsKIHBhY2th Z2VzL2NvbnRleHQtY29sb3JpbmcvTWFrZWZpbGUgICAgICAgICAgICAgICAgIHwgICAgMzEgKwog cGFja2FnZXMvY29udGV4dC1jb2xvcmluZy9SRUFETUUubWQgICAgICAgICAgICAgICAgfCAgIDE2 MSArCiAuLi4vYmVuY2htYXJrL2NvbnRleHQtY29sb3JpbmctYmVuY2htYXJrLmVsICAgICAgICB8 ICAgMTYwICsKIC4uLi9iZW5jaG1hcmsvZml4dHVyZXMvLmRpci1sb2NhbHMuZWwgICAgICAgICAg ICAgIHwgICAgIDEgKwogLi4uL2JlbmNobWFyay9maXh0dXJlcy9hc3luYy0wLjkuMC5qcyAgICAg ICAgICAgICAgfCAgMTEyMyArKwogLi4uL2JlbmNobWFyay9maXh0dXJlcy9qcXVlcnktMi4xLjEu anMgICAgICAgICAgICAgfCAgOTE5MCArKysrKysrKysrKysrKwogLi4uL2JlbmNobWFyay9maXh0 dXJlcy9sb2Rhc2gtMi40LjEuanMgICAgICAgICAgICAgfCAgNjc4NSArKysrKysrKysrCiAuLi4v YmVuY2htYXJrL2ZpeHR1cmVzL21rZGlycC0wLjUuMC5qcyAgICAgICAgICAgICB8ICAgIDk3ICsK IC4uLi9jb250ZXh0L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YmFzaAorY2QgY29udGV4dC1jb2xvcmlu Zy8KK21ha2UgY29tcGlsZQorYGBgCisKKy0gQWRkIHRoZSBmb2xsb3dpbmcgdG8geW91ciBgfi8u ZW1hY3NgIGZpbGU6CisKK2BgYGxpc3AKKyhhZGQtdG8tbGlzdCAnbG9hZC1wYXRoICJ+Ly5lbWFj cy5kL2NvbnRleHQtY29sb3JpbmciKQorKHJlcXVpcmUgJ2NvbnRleHQtY29sb3JpbmcpCisoYWRk LWhvb2sgJ2pzLW1vZGUtaG9vayAnY29udGV4dC1jb2xvcmluZy1tb2RlKQorYGBgCisKKyMjIEN1 c3RvbWl6aW5nCisKK0J1aWx0LWluIHRoZW1lcyBhcmUgYWNjZXNzaWJsZSB2aWEgYGNvbnRleHQt Y29sb3JpbmctbG9hZC10aGVtZWAuICBBdmFpbGFibGUKK3RoZW1lcyBhcmU6IGBtb25va2FpYCwg YHNvbGFyaXplZGAsIGB0YW5nb2AgYW5kIGB6ZW5idXJuYC4KKworYGBgbGlzcAorKHJlcXVpcmUg J2NvbnRleHQtY29sb3JpbmcpCisoY29udGV4dC1jb2xvcmluZy1sb2FkLXRoZW1lICd6ZW5idXJu KQorYGBgCisKK1lvdSBjYW4gZGVmaW5lIHlvdXIgb3duIHRoZW1lcywgdG9vOgorCitgYGBsaXNw CisoY29udGV4dC1jb2xvcmluZy1kZWZpbmUtdGhlbWUKKyAnemVuYnVybgorIDpjb2xvcnMgJygi I0RDRENDQyIKKyAgICAgICAgICAgIiM5M0UwRTMiCisgICAgICAgICAgICIjQkZFQkJGIgorICAg ICAgICAgICAiI0YwREZBRiIKKyAgICAgICAgICAgIiNERkFGOEYiCisgICAgICAgICAgICIjQ0M5 MzkzIgorICAgICAgICAgICAiI0RDOENDMyIKKyAgICAgICAgICAgIiM5NEJGRjMiCisgICAgICAg ICAgICIjOUZDNTlGIgorICAgICAgICAgICAiI0QwQkY4RiIKKyAgICAgICAgICAgIiNEQ0EzQTMi KSkKK2BgYAorCisjIyBFeH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XRoCisgICAgICAgICAgICAg ICAgICAgICAgKGZvcm1hdCAiLi9sb2dzL3Jlc3VsdHMtJXMtJXMubG9nIgorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgdGl0bGUgKGZvcm1hdC10aW1lLXN0cmluZyAiJXMiKSkpKSkKKyAg ICAoY29udGV4dC1jb2xvcmluZy1iZW5jaG1hcmstbmV4dAorICAgICBmaXh0dXJlcworICAgICAo bGFtYmRhIChwYXRoIG5leHQpCisgICAgICAgKGxldCAoKGZpeHR1cmUgKGNvbnRleHQtY29sb3Jp bmctYmVuY2htYXJrLXJlc29sdmUtcGF0aCBwYXRoKSkKKyAgICAgICAgICAgICBhZHZpY2UpCisg ICAgICAgICAoc2V0cQorICAgICAgICAgIGFkdmljZQorICAgICAgICAgIChsZXQgKChjb3VudCAw KSkKKyAgICAgICAgICAgIChsYW1iZGEgKG9yaWdpbmFsLWZ1bmN0aW9uKQorICAgICAgICAgICAg ICAoZnVuY2FsbAorICAgICAgICAgICAgICAgb3JpZ2luYWwtZnVuY3Rpb24KKyAgICAgICAgICAg ICAgIChsYW1iZGEgKCkKKyAgICAgICAgICAgICAgICAgKHNldHEgY291bnQgKCsgY291bnQgMSkp CisgICAgICAgICAgICAgICAgIDs7IFRlc3QgNSB0aW1lcy4KKyAgICAgICAgICAgICAgICAgKGlm ICg9IGNvdW50IDUpCisgICAgICAgICAgICAgICAgICAgICAocHJvZ24KKyAgICAgICAgICAgICAg ICAgICAgICAgKGFkdmljZS1yZW1vdmUgJ2NvbnRleHQtY29sb3JpbmctY29sb3JpemUgYWR2aWNl KQorICAgICAgICAgICAgICAgICAgICAgICAoa2lsbC1idWZmZXIpCisgICAgICAgICAgICAgICAg ICAgICAgIChjb250ZXh0LWNvbG9yaW5nLWJlbmNobWFyay1sb2ctcmVzdWx0cworICAgICAgICAg ICAgICAgICAgICAgICAgcmVzdWx0LWZpbGUKKyAgICAgICAgICAgICAgICAgICAgICAgIGZpeHR1 cmUpCisgICAgICAgICAgICAgICAgICAgICAgIChmdW5jYWxsIG5leHQpKQorICAgICAgICAgICAg ICAgICAgIChmdW5jYWxsICdjb250ZXh0LWNvbG9yaW5nLWNvbG9yaXplKSkpKSkpKQorICAgICAg ICAgKGFkdmljZS1hZGQgJ2NvbnRleHQtY29sb3JpbmctY29sb3JpemUgOmFyb3VuZCBhZHZpY2Up CisgICAgICAgICAoZmluZC1maWxlIGZpeHR1cmUpKSkKKyAgICAgKGxhbWJkYSAoKQorICAgICAg IChmdW5jYWxsIHRlYXJkb3duKQorICAgICAgIChpZiBjYWxsYmFjayAoZnVuY2FsbCBjYWxsYmFj aykpKSkpKQorCisoZGVmY29uc3QgY29udGV4dC1jb2xvcmluZy1iZW5jaG1hcmstanMtZml4dHVy ZXMKKyAgJygiLi9maXh0dXJlcy9qcXVlcnktMi4xLjEuanMiCisgICAgIi4vZml4dHVyZXMvbG9k YXNoLTIuNC4xLmpzIgorICAgICIuL2ZpeHR1cmVzL2FzeW5jLTAuOS4wLmpzIgorICAgICIuL2Zp eHR1cmVzL21rZGlycC0wLjUuMC5qcyIpCisgICJBcmJpdHJhcnkgSmF2YVNjcmlwdCBmaWxlcyBm b3IgcGVyZm9ybWFuY2Ugc2NydXRpbnkuIikKKworKGRlZnVuIGNvbnRleHQtY29sb3JpbmctYmVu Y2htYXJrLWpzLW1vZGUtc2V0dXAgKCkKKyAgIlByZXBhcmF0aW9uIGxvZ2ljIGZvciBganMtbW9k ZScuIgorICAoYWRkLWhvb2sgJ2pzLW1vZGUtaG9vayAnY29udGV4dC1jb2xvcmluZy1tb2RlKQor ICAoZWxwLWluc3RydW1lbnQtcGFja2FnZSAiY29udGV4dC1jb2xvcmluZy0iKSkKKworKGRlZnVu IGNvbnRleHQtY29sb3JpbmctYmVuY2htYXJrLWpzLW1vZGUtdGVhcmRvd24gKCkKKyAgIkNsZWFu dXAgbG9naWMgZm9yIGBqcy1tb2RlJy4iCisgIChyZW1vdmUtaG9vayAnanMtbW9kZS1ob29rICdj b250ZXh0LWNvbG9yaW5nLW1vZGUpKQorCisoZGVmdW4gY29udGV4dC1jb2xvcmluZy1iZW5jaG1h cmstanMtbW9kZS1ydW4gKGNhbGxiYWNrKQorICAiQmVuY2htYXJrIGBqcy1tb2RlJywgdGhlbiBj YWxsIENBTExCQUNLLiIKKyAgKGNvbnRleHQtY29sb3JpbmctYmVuY2htYXJrLWFzeW5jCisgICAi anMtbW9kZSIKKyAgICdjb250ZXh0LWNvbG9yaW5nLWJlbmNobWFyay1qcy1tb2RlLXNldHVwCisg ICAnY29udGV4dC1jb2xvcmluZy1iZW5jaG1hcmstanMtbW9kZS10ZWFyZG93bgorICAgY29udGV4 dC1jb2xvcmluZy1iZW5jaG1hcmstanMtZml4dHVyZXMKKyAgIGNhbGxiYWNrKSkKKworKGRlZnVu IGNvbnRleHQtY29sb3JpbmctYmVuY2htYXJrLWpzMi1tb2RlLXNldHVwICgpCisgICJQcmVwYXJh dGlvbiBsb2dpYyBmb3IgYGpzMi1tb2RlJy4iCisgIChyZXF1aXJlICdqczItbW9kZSkKKyAgKHNl dHEganMyLW1vZGUtc2hvdy1wYXJzZS1lcnJvcnMgbmlsKQorICAoc2V0cSBqczItbW9kZS1zaG93 LXN0cmljdC13YXJuaW5ncyBuaWwpCisgIChhZGQtdG8tbGlzdCAnYXV0by1tb2RlLWFsaXN0ICco IlxcLmpzXFwnIiAuIGpzMi1tb2RlKSkKKyAgKGFkZC1ob29rICdqczItbW9kZS1ob29rICdjb250 ZXh0LWNvbG9yaW5nLW1vZGUpCisgIChlbHAtaW5zdHJ1bWVudC1wYWNrYWdlICJjb250ZXh0LWNv bG9yaW5nLSIpKQorCisoZGVmdW4gY29udGV4dC1jb2xvcmluZy1iZW5jaG1hcmstanMyLW1vZGUt dGVhcmRvd24gKCkKKyAgIkNsZWFudXAgbG9naWMgZm9yIGBqczItbW9kZScuIgorICAocmVtb3Zl LWhvb2sgJ2pzMi1tb2RlLWhvb2sgJ2NvbnRleHQtY29sb3JpbmctbW9kZSkKKyAgKHNldHEgYXV0 by1tb2RlLWFsaXN0IChkZWxldGUgJygiXFwuanNcXCciIC4ganMyLW1vZGUpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGF1dG8tbW9kZS1hbGlzdCkpCisgIChzZXRxIGpzMi1tb2Rl LXNob3ctc3RyaWN0LXdhcm5pbmdzIHQpCisgIChzZXRxIGpzMi1tb2RlLXNob3ctcGFyc2UtZXJy b3JzIHQpKQorCisoZGVmdW4gY29udGV4dC1jb2xvcmluZy1iZW5jaG1hcmstanMyLW1vZGUtcnVu IChjYWxsYmFjaykKKyAgIkJlbmNobWFyayBganMyLW1vZGUnLCB0aGVuIGNhbGwgQ0FMTEJBQ0su IgorICAoY29udGV4dC1jb2xvcmluZy1iZW5jaG1hcmstYXN5bmMKKyAgICJqczItbW9kZSIKKyAg ICdjb250ZXh0LWNvbG9yaW5nLWJlbmNobWFyay1qczItbW9kZS1zZXR1cAorICAgJ2NvbnRleHQt Y29sb3JpbmctYmVuY2htYXJrLWpzMi1tb2RlLXRlYXJkb3duCisgICBjb250ZXh0LWNvbG9yaW5n LWJlbmNobWFyay1qcy1maXh0dXJlcworICAgY2FsbGJhY2spKQorCisoZGVmdW4gY29udGV4dC1j b2xvcmluZy1iZW5jaG1hcmstcnVuICgpCisgICJCZW5jaG1hcmsgYWxsIG1vZGVzLCB0aGVuIGV4 aXQuIgorICAoY29udGV4dC1jb2xvcmluZy1iZW5jaG1hcmstbmV4dAorICAgJyhjb250ZXh0LWNv bG9yaW5nLWJlbmNobWFyay1qcy1tb2RlLXJ1bgorICAgICBjb250ZXh0LWNvbG9yaW5nLWJlbmNo bWFyay1qczItbW9kZS1ydW4pCisgICAobGFtYmRhIChmdW5jdGlvbiBuZXh0KQorICAgICAoZnVu Y2FsbCBmdW5jdGlvbiBuZXh0KSkKKyAgIChsYW1iZGEgKCkKKyAgICAgKGtpbGwtZW1hY3MpKSkp CisKKyhwcm92aWRlICdjb250ZXh0LWNvbG9yaW5nL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mdsb2Jh bCBzZXRJbW1lZGlhdGU6IGZhbHNlLCBzZXRUaW1lb3V0OiBmYWxzZSwgY29uc29sZTogZmFsc2Ug Ki8KKyhmdW5jdGlvbiAoKSB7CisKKyAgICB2YXIgYXN5bmMgPSB7fTsKKworICAgIC8vIGdsb2Jh bCBvbiB0aGUgc2VydmVyLCB3aW5kb3cgaW4gdGhlIGJyb3dzZXIKKyAgICB2YXIgcm9vdCwgcHJl dmlvdXNfYXN5bmM7CisKKyAgICByb290ID0gdGhpczsKKyAgICBpZiAocm9vdCAhPSBudWxsKSB7 CisgICAgICBwcmV2aW91c19hc3luYyA9IHJvb3QuYXN5bmM7CisgICAgfQorCisgICAgYXN5bmMu bm9Db25mbGljdCA9IGZ1bmN0aW9uICgpIHsKKyAgICAgICAgcm9vdC5hc3luYyA9IHByZXZpb3Vz X2FzeW5jOworICAgICAgICByZXR1cm4gYXN5bmM7CisgICAgfTsKKworICAgIGZ1bmN0aW9uIG9u bHlfb25jZShmbikgeworICAgICAgICB2YXIgY2FsbGVkID0gZmFsc2U7CisgICAgICAgIHJldHVy biBmdW5jdGlvbigpIHsKKyAgICAgICAgICAgIGlmIChjYWxsZWQpIHRocm93IG5ldyBFcnJvcigi Q2FsbGJhY2sgd2FzIGFscmVhZHkgY2FsbGVkLiIpOworICAgICAgICAgICAgY2FsbGVkID0gdHJ1 ZTsKKyAgICAgICAgICAgIGZuLmFwcGx5KHJvb3QsIGFyZ3VtZW50cyk7CisgICAgICAgIH0KKyAg ICB9CisKKyAgICAvLy8vIGNyb3NzLWJyb3dzZXIgY29tcGF0aWJsaXR5IGZ1bmN0aW9ucyAvLy8v CisKKyAgICB2YXIgX3RvU3RyaW5nID0gT2JqZWN0LnByb3RvdHlwZS50b1N0cmluZzsKKworICAg IHZhciBfaXNBcnJheSA9IEFycmF5LmlzQXJyYXkgfHwgZnVuY3Rpb24gKG9iaikgeworICAgICAg ICByZXR1cm4gX3RvU3RyaW5nLmNhbGwob2JqKSA9PT0gJ1tvYmplY3QgQXJyYXldJzsKKyAgICB9 OworCisgICAgdmFyIF9lYWNoID0gZnVuY3Rpb24gKGFyciwgaXRlcmF0b3IpIHsKKyAgICAgICAg aWYgKGFyci5mb3JFYWNoKSB7CisgICAgICAgICAgICByZXR1cm4gYXJyLmZvckVhY2goaXRlcmF0 b3IpOworICAgICAgICB9CisgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgYXJyLmxlbmd0aDsg aSArPSAxKSB7CisgICAgICAgICAgICBpdGVyYXRvcihhcnJbaV0sIGksIGFycik7CisgICAgICAg IH0KKyAgICB9OworCisgICAgdmFyIF9tYXAgPSBmdW5jdGlvbiAoYXJyLCBpdGVyYXRvcikgewor ICAgICAgICBpZiAoYXJyLm1hcCkgeworICAgICAgICAgICAgcmV0dXJuIGFyci5tYXAoaXRlcmF0 b3IpOworICAgICAgICB9CisgICAgICAgIHZhciByZXN1bHRzID0gW107CisgICAgICAgIF9lYWNo KGFyciwgZnVuY3Rpb24gKHgsIGksIGEpIHsKKyAgICAgICAgICAgIHJlc3VsdHMucHVzaChpdGVy YXRvcih4LCBpLCBhKSk7CisgICAgICAgIH0pOworICAgICAgICByZXR1cm4gcmVzdWx0czsKKyAg ICB9OworCisgICAgdmFyIF9yZWR1Y2UgPSBmdW5jdGlvbiAoYXJyLCBpdGVyYXRvciwgbWVtbykg eworICAgICAgICBpZiAoYXJyLnJlZHVjZSkgeworICAgICAgICAgICAgcmV0dXJuIGFyci5yZWR1 Y2UoaXRlcmF0b3IsIG1lbW8pOworICAgICAgICB9CisgICAgICAgIF9lYWNoKGFyciwgZnVuY3Rp b24gKHgsIGksIGEpIHsKKyAgICAgICAgICAgIG1lbW8gPSBpdGVyYXRvcihtZW1vLCB4LCBpLCBh KTsKKyAgICAgICAgfSk7CisgICAgICAgIHJldHVybiBtZW1vOworICAgIH07CisKKyAgICB2YXIg X2tleXMgPSBmdW5jdGlvbiAob2JqKSB7CisgICAgICAgIGlmIChPYmplY3Qua2V5cykgeworICAg ICAgICAgICAgcmV0dXJuIE9iamVjdC5rZXlzKG9iaik7CisgICAgICAgIH0KKyAgICAgICAgdmFy IGtleXMgPSBbXTsKKyAgICAgICAgZm9yICh2YXIgayBpbiBvYmopIHsKKyAgICAgICAgICAgIGlm IChvYmouaGFzT3duUHJvcGVydHkoaykpIHsKKyAgICAgICAgICAgICAgICBrZXlzLnB1c2goayk7 CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIGtleXM7CisgICAgfTsK KworICAgIC8vLy8gZXhwb3J0ZWQgYXN5bmMgbW9kdWxlIGZ1bmN0aW9ucyAvLy8vCisKKyAgICAv Ly8vIG5leHRUaWNrIGltcGxlbWVudGF0aW9uIHdpdGggYnJvd3Nlci1jb21wYXRpYmxlIGZhbGxi YWNrIC8vLy8KKyAgICBpZiAodHlwZW9mIHByb2Nlc3MgPT09ICd1bmRlZmluZWQnIHx8ICEocHJv Y2Vzcy5uZXh0VGljaykpIHsKKyAgICAgICAgaWYgKHR5cGVvZiBzZXRJbW1lZGlhdGUgPT09ICdm dW5jdGlvbicpIHsKKyAgICAgICAgICAgIGFzeW5jLm5leHRUaWNrID0gZnVuY3Rpb24gKGZuKSB7 CisgICAgICAgICAgICAgICAgLy8gbm90IGEgZGlyZWN0IGFsaWFzIGZvciBJRTEwIGNvbXBhdGli aWxpdHkKKyAgICAgICAgICAgICAgICBzZXRJbW1lZGlhdGUoZm4pOworICAgICAgICAgICAgfTsK KyAgICAgICAgICAgIGFzeW5jLnNldEltbWVkaWF0ZSA9IGFzeW5jLm5leHRUaWNrOworICAgICAg ICB9CisgICAgICAgIGVsc2UgeworICAgICAgICAgICAgYXN5bmMubmV4dFRpY2sgPSBmdW5jdGlv biAoZm4pIHsKKyAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZuLCAwKTsKKyAgICAgICAgICAg IH07CisgICAgICAgICAgICBhc3luYy5zZXRJbW1lZGlhdGUgPSBhc3luYy5uZXh0VGljazsKKyAg ICAgICAgfQorICAgIH0KKyAgICBlbHNlIHsKKyAgICAgICAgYXN5bmMubmV4dFRpY2sgPSBwcm9j ZXNzLm5leHRUaWNrOworICAgICAgICBpZiAodHlwZW9mIHNldEltbWVkaWF0ZSAhPT0gJ3VuZGVm aW5lZCcpIHsKKyAgICAgICAgICAgIGFzeW5jLnNldEltbWVkaWF0ZSA9IGZ1bmN0aW9uIChmbikg eworICAgICAgICAgICAgICAvLyBub3QgYSBkaXJlY3QgYWxpYXMgZm9yIElFMTAgY29tcGF0aWJp bGl0eQorICAgICAgICAgICAgICBzZXRJbW1lZGlhdGUoZm4pOworICAgICAgICAgICAgfTsKKyAg ICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIGFzeW5jLnNldEltbWVkaWF0ZSA9 IGFzeW5jLm5leHRUaWNrOworICAgICAgICB9CisgICAgfQorCisgICAgYXN5bmMuZWFjaCA9IGZ1 bmN0aW9uIChhcnIsIGl0ZXJhdG9yLCBjYWxsYmFjaykgeworICAgICAgICBjYWxsYmFjayA9IGNh bGxiYWNrIHx8IGZ1bmN0aW9uICgpIHt9OworICAgICAgICBpZiAoIWFyci5sZW5ndGgpIHsKKyAg ICAgICAgICAgIHJldHVybiBjYWxsYmFjaygpOworICAgICAgICB9CisgICAgICAgIHZhciBjb21w bGV0ZWQgPSAwOworICAgICAgICBfZWFjaChhcnIsIGZ1bmN0aW9uICh4KSB7CisgICAgICAgICAg ICBpdGVyYXRvcih4LCBvbmx5X29uY2UoZG9uZSkgKTsKKyAgICAgICAgfSk7CisgICAgICAgIGZ1 bmN0aW9uIGRvbmUoZXJyKSB7CisgICAgICAgICAgaWYgKGVycikgeworICAgICAgICAgICAgICBj YWxsYmFjayhlcnIpOworICAgICAgICAgICAgICBjYWxsYmFjayA9IGZ1bmN0aW9uICgpIHt9Owor ICAgICAgICAgIH0KKyAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgY29tcGxldGVkICs9 IDE7CisgICAgICAgICAgICAgIGlmIChjb21wbGV0ZWQgPj0gYXJyLmxlbmd0aCkgeworICAgICAg ICAgICAgICAgICAgY2FsbGJhY2soKTsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgIH0KKyAg ICAgICAgfQorICAgIH07CisgICAgYXN5bmMuZm9yRWFjaCA9IGFzeW5jLmVhY2g7CisKKyAgICBh c3luYy5lYWNoU2VyaWVzID0gZnVuY3Rpb24gKGFyciwgaXRlcmF0b3IsIGNhbGxiYWNrKSB7Cisg ICAgICAgIGNhbGxiYWNrID0gY2FsbGJhY2sgfHwgZnVuY3Rpb24gKCkge307CisgICAgICAgIGlm ICghYXJyLmxlbmd0aCkgeworICAgICAgICAgICAgcmV0dXJuIGNhbGxiYWNrKCk7CisgICAgICAg IH0KKyAgICAgICAgdmFyIGNvbXBsZXRlZCA9IDA7CisgICAgICAgIHZhciBpdGVyYXRlID0gZnVu Y3Rpb24gKCkgeworICAgICAgICAgICAgaXRlcmF0b3IoYXJyW2NvbXBsZXRlZF0sIGZ1bmN0aW9u IChlcnIpIHsKKyAgICAgICAgICAgICAgICBpZiAoZXJyKSB7CisgICAgICAgICAgICAgICAgICAg IGNhbGxiYWNrKGVycik7CisgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrID0gZnVuY3Rpb24g KCkge307CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UgeworICAgICAg ICAgICAgICAgICAgICBjb21wbGV0ZWQgKz0gMTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGNv bXBsZXRlZCA+PSBhcnIubGVuZ3RoKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFj aygpOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGVsc2Ugewor ICAgICAgICAgICAgICAgICAgICAgICAgaXRlcmF0ZSgpOworICAgICAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfSk7CisgICAgICAgIH07CisgICAgICAg IGl0ZXJhdGUoKTsKKyAgICB9OworICAgIGFzeW5jLmZvckVhY2hTZXJpZXMgPSBhc3luYy5lYWNo U2VyaWVzOworCisgICAgYXN5bmMuZWFjaExpbWl0ID0gZnVuY3Rpb24gKGFyciwgbGltaXQsIGl0 ZXJhdG9yLCBjYWxsYmFjaykgeworICAgICAgICB2YXIgZm4gPSBfZWFjaExpbWl0KGxpbWl0KTsK KyAgICAgICAgZm4uYXBwbHkobnVsbCwgW2FyciwgaXRlcmF0b3IsIGNhbGxiYWNrXSk7CisgICAg fTsKKyAgICBhc3luYy5mb3JFYWNoTGltaXQgPSBhc3luYy5lYWNoTGltaXQ7CisKKyAgICB2YXIg X2VhY2hMaW1pdCA9IGZ1bmN0aW9uIChsaW1pdCkgeworCisgICAgICAgIHJldHVybiBmdW5jdGlv biAoYXJyLCBpdGVyYXRvciwgY2FsbGJhY2spIHsKKyAgICAgICAgICAgIGNhbGxiYWNrID0gY2Fs bGJhY2sgfHwgZnVuY3Rpb24gKCkge307CisgICAgICAgICAgICBpZiAoIWFyci5sZW5ndGggfHwg bGltaXQgPD0gMCkgeworICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjaygpOworICAgICAg ICAgICAgfQorICAgICAgICAgICAgdmFyIGNvbXBsZXRlZCA9IDA7CisgICAgICAgICAgICB2YXIg c3RhcnRlZCA9IDA7CisgICAgICAgICAgICB2YXIgcnVubmluZyA9IDA7CisKKyAgICAgICAgICAg IChmdW5jdGlvbiByZXBsZW5pc2ggKCkgeworICAgICAgICAgICAgICAgIGlmIChjb21wbGV0ZWQg Pj0gYXJyLmxlbmd0aCkgeworICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2FsbGJhY2soKTsK KyAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICB3aGlsZSAocnVubmluZyA8IGxp bWl0ICYmIHN0YXJ0ZWQgPCBhcnIubGVuZ3RoKSB7CisgICAgICAgICAgICAgICAgICAgIHN0YXJ0 ZWQgKz0gMTsKKyAgICAgICAgICAgICAgICAgICAgcnVubmluZyArPSAxOworICAgICAgICAgICAg ICAgICAgICBpdGVyYXRvcihhcnJbc3RhcnRlZCAtIDFdLCBmdW5jdGlvbiAoZXJyKSB7CisgICAg ICAgICAgICAgICAgICAgICAgICBpZiAoZXJyKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgY2FsbGJhY2soZXJyKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFjayA9 IGZ1bmN0aW9uICgpIHt9OworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAg ICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcGxldGVk ICs9IDE7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcnVubmluZyAtPSAxOworICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGlmIChjb21wbGV0ZWQgPj0gYXJyLmxlbmd0aCkgeworICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYWxsYmFjaygpOworICAgICAgICAgICAgICAg ICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVwbGVuaXNoKCk7CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAg ICAgICB9KTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9KSgpOworICAgICAgICB9 OworICAgIH07CisKKworICAgIHZhciBkb1BhcmFsbGVsID0gZnVuY3Rpb24gKGZuKSB7CisgICAg ICAgIHJldHVybiBmdW5jdGlvbiAoKSB7CisgICAgICAgICAgICB2YXIgYXJncyA9IEFycmF5LnBy b3RvdHlwZS5zbGljZS5jYWxsKGFyZ3VtZW50cyk7CisgICAgICAgICAgICByZXR1cm4gZm4uYXBw bHkobnVsbCwgW2FzeW5jLmVhY2hdLmNvbmNhdChhcmdzKSk7CisgICAgICAgIH07CisgICAgfTsK KyAgICB2YXIgZG9QYXJhbGxlbExpbWl0ID0gZnVuY3Rpb24obGltaXQsIGZuKSB7CisgICAgICAg IHJldHVybiBmdW5jdGlvbiAoKSB7CisgICAgICAgICAgICB2YXIgYXJncyA9IEFycmF5LnByb3Rv dHlwZS5zbGljZS5jYWxsKGFyZ3VtZW50cyk7CisgICAgICAgICAgICByZXR1cm4gZm4uYXBwbHko bnVsbCwgW19lYWNoTGltaXQobGltaXQpXS5jb25jYXQoYXJncykpOworICAgICAgICB9OworICAg IH07CisgICAgdmFyIGRvU2VyaWVzID0gZnVuY3Rpb24gKGZuKSB7CisgICAgICAgIHJldHVybiBm dW5jdGlvbiAoKSB7CisgICAgICAgICAgICB2YXIgYXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGlj ZS5jYWxsKGFyZ3VtZW50cyk7CisgICAgICAgICAgICByZXR1cm4gZm4uYXBwbHkobnVsbCwgW2Fz eW5jLmVhY2hTZXJpZXNdLmNvbmNhdChhcmdzKSk7CisgICAgICAgIH07CisgICAgfTsKKworCisg ICAgdmFyIF9hc3luY01hcCA9IGZ1bmN0aW9uIChlYWNoZm4sIGFyciwgaXRlcmF0b3IsIGNhbGxi YWNrKSB7CisgICAgICAgIGFyciA9IF9tYXAoYXJyLCBmdW5jdGlvbiAoeCwgaSkgeworICAgICAg ICAgICAgcmV0dXJuIHtpbmRleDogaSwgdmFsdWU6IHh9OworICAgICAgICB9KTsKKyAgICAgICAg aWYgKCFjYWxsYmFjaykgeworICAgICAgICAgICAgZWFjaGZuKGFyciwgZnVuY3Rpb24gKHgsIGNh bGxiYWNrKSB7CisgICAgICAgICAgICAgICAgaXRlcmF0b3IoeC52YWx1ZSwgZnVuY3Rpb24gKGVy cikgeworICAgICAgICAgICAgICAgICAgICBjYWxsYmFjayhlcnIpOworICAgICAgICAgICAgICAg IH0pOworICAgICAgICAgICAgfSk7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICB2YXIg cmVzdWx0cyA9IFtdOworICAgICAgICAgICAgZWFjaGZuKGFyciwgZnVuY3Rpb24gKHgsIGNhbGxi YWNrKSB7CisgICAgICAgICAgICAgICAgaXRlcmF0b3IoeC52YWx1ZSwgZnVuY3Rpb24gKGVyciwg dikgeworICAgICAgICAgICAgICAgICAgICByZXN1bHRzW3guaW5kZXhdID0gdjsKKyAgICAgICAg ICAgICAgICAgICAgY2FsbGJhY2soZXJyKTsKKyAgICAgICAgICAgICAgICB9KTsKKyAgICAgICAg ICAgIH0sIGZ1bmN0aW9uIChlcnIpIHsKKyAgICAgICAgICAgICAgICBjYWxsYmFjayhlcnIsIHJl c3VsdHMpOworICAgICAgICAgICAgfSk7CisgICAgICAgIH0KKyAgICB9OworICAgIGFzeW5jLm1h cCA9IGRvUGFyYWxsZWwoX2FzeW5jTWFwKTsKKyAgICBhc3luYy5tYXBTZXJpZXMgPSBkb1Nlcmll cyhfYXN5bmNNYXApOworICAgIGFzeW5jLm1hcExpbWl0ID0gZnVuY3Rpb24gKGFyciwgbGltaXQs IGl0ZXJhdG9yLCBjYWxsYmFjaykgeworICAgICAgICByZXR1cm4gX21hcExpbWl0KGxpbWl0KShh cnIsIGl0ZXJhdG9yLCBjYWxsYmFjayk7CisgICAgfTsKKworICAgIHZhciBfbWFwTGltaXQgPSBm dW5jdGlvbihsaW1pdCkgeworICAgICAgICByZXR1cm4gZG9QYXJhbGxlbExpbWl0KGxpbWl0LCBf YXN5bmNNYXApOworICAgIH07CisKKyAgICAvLyByZWR1Y2Ugb25seSBoYXMgYSBzZXJpZXMgdmVy c2lvbiwgYXMgZG9pbmcgcmVkdWNlIGluIHBhcmFsbGVsIHdvbid0CisgICAgLy8gd29yayBpbiBt YW55IHNpdHVhdGlvbnMuCisgICAgYXN5bmMucmVkdWNlID0gZnVuY3Rpb24gKGFyciwgbWVtbywg aXRlcmF0b3IsIGNhbGxiYWNrKSB7CisgICAgICAgIGFzeW5jLmVhY2hTZXJpZXMoYXJyLCBmdW5j dGlvbiAoeCwgY2FsbGJhY2spIHsKKyAgICAgICAgICAgIGl0ZXJhdG9yKG1lbW8sIHgsIGZ1bmN0 aW9uIChlcnIsIHYpIHsKKyAgICAgICAgICAgICAgICBtZW1vID0gdjsKKyAgICAgICAgICAgICAg ICBjYWxsYmFjayhlcnIpOworICAgICAgICAgICAgfSk7CisgICAgICAgIH0sIGZ1bmN0aW9uIChl cnIpIHsKKyAgICAgICAgICAgIGNhbGxiYWNrKGVyciwgbWVtbyk7CisgICAgICAgIH0pOworICAg IH07CisgICAgLy8gaW5qZWN0IGFsaWFzCisgICAgYXN5bmMuaW5qZWN0ID0gYXN5bmMucmVkdWNl OworICAgIC8vIGZvbGRsIGFsaWFzCisgICAgYXN5bmMuZm9sZGwgPSBhc3luYy5yZWR1Y2U7CisK KyAgICBhc3luYy5yZWR1Y2VSaWdodCA9IGZ1bmN0aW9uIChhcnIsIG1lbW8sIGl0ZXJhdG9yLCBj YWxsYmFjaykgeworICAgICAgICB2YXIgcmV2ZXJzZWQgPSBfbWFwKGFyciwgZnVuY3Rpb24gKHgp IHsKKyAgICAgICAgICAgIHJldHVybiB4OworICAgICAgICB9KS5yZXZlcnNlKCk7CisgICAgICAg IGFzeW5jLnJlZHVjZShyZXZlcnNlZCwgbWVtbywgaXRlcmF0b3IsIGNhbGxiYWNrKTsKKyAgICB9 OworICAgIC8vIGZvbGRyIGFsaWFzCisgICAgYXN5bmMuZm9sZHIgPSBhc3luYy5yZWR1Y2VSaWdo dDsKKworICAgIHZhciBfZmlsdGVyID0gZnVuY3Rpb24gKGVhY2hmbiwgYXJyLCBpdGVyYXRvciwg Y2FsbGJhY2spIHsKKyAgICAgICAgdmFyIHJlc3VsdHMgPSBbXTsKKyAgICAgICAgYXJyID0gX21h cChhcnIsIGZ1bmN0aW9uICh4LCBpKSB7CisgICAgICAgICAgICByZXR1cm4ge2luZGV4OiBpLCB2 YWx1ZTogeH07CisgICAgICAgIH0pOworICAgICAgICBlYWNoZm4oYXJyLCBmdW5jdGlvbiAoeCwg Y2FsbGJhY2spIHsKKyAgICAgICAgICAgIGl0ZXJhdG9yKHgudmFsdWUsIGZ1bmN0aW9uICh2KSB7 CisgICAgICAgICAgICAgICAgaWYgKHYpIHsKKyAgICAgICAgICAgICAgICAgICAgcmVzdWx0cy5w dXNoKHgpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBjYWxsYmFjaygpOwor ICAgICAgICAgICAgfSk7CisgICAgICAgIH0sIGZ1bmN0aW9uIChlcnIpIHsKKyAgICAgICAgICAg IGNhbGxiYWNrKF9tYXAocmVzdWx0cy5zb3J0KGZ1bmN0aW9uIChhLCBiKSB7CisgICAgICAgICAg ICAgICAgcmV0dXJuIGEuaW5kZXggLSBiLmluZGV4OworICAgICAgICAgICAgfSksIGZ1bmN0aW9u ICh4KSB7CisgICAgICAgICAgICAgICAgcmV0dXJuIHgudmFsdWU7CisgICAgICAgICAgICB9KSk7 CisgICAgICAgIH0pOworICAgIH07CisgICAgYXN5bmMuZmlsdGVyID0gZG9QYXJhbGxlbChfZmls dGVyKTsKKyAgICBhc3luYy5maWx0ZXJTZXJpZXMgPSBkb1NlcmllcyhfZmlsdGVyKTsKKyAgICAv LyBzZWxlY3QgYWxpYXMKKyAgICBhc3luYy5zZWxlY3QgPSBhc3luYy5maWx0ZXI7CisgICAgYXN5 bmMuc2VsZWN0U2VyaWVzID0gYXN5bmMuZmlsdGVyU2VyaWVzOworCisgICAgdmFyIF9yZWplY3Qg PSBmdW5jdGlvbiAoZWFjaGZuLCBhcnIsIGl0ZXJhdG9yLCBjYWxsYmFjaykgeworICAgICAgICB2 YXIgcmVzdWx0cyA9IFtdOworICAgICAgICBhcnIgPSBfbWFwKGFyciwgZnVuY3Rpb24gKHgsIGkp IHsKKyAgICAgICAgICAgIHJldHVybiB7aW5kZXg6IGksIHZhbHVlOiB4fTsKKyAgICAgICAgfSk7 CisgICAgICAgIGVhY2hmbihhcnIsIGZ1bmN0aW9uICh4LCBjYWxsYmFjaykgeworICAgICAgICAg ICAgaXRlcmF0b3IoeC52YWx1ZSwgZnVuY3Rpb24gKHYpIHsKKyAgICAgICAgICAgICAgICBpZiAo IXYpIHsKKyAgICAgICAgICAgICAgICAgICAgcmVzdWx0cy5wdXNoKHgpOworICAgICAgICAgICAg ICAgIH0KKyAgICAgICAgICAgICAgICBjYWxsYmFjaygpOworICAgICAgICAgICAgfSk7CisgICAg ICAgIH0sIGZ1bmN0aW9uIChlcnIpIHsKKyAgICAgICAgICAgIGNhbGxiYWNrKF9tYXAocmVzdWx0 cy5zb3J0KGZ1bmN0aW9uIChhLCBiKSB7CisgICAgICAgICAgICAgICAgcmV0dXJuIGEuaW5kZXgg LSBiLmluZGV4OworICAgICAgICAgICAgfSksIGZ1bmN0aW9uICh4KSB7CisgICAgICAgICAgICAg ICAgcmV0dXJuIHgudmFsdWU7CisgICAgICAgICAgICB9KSk7CisgICAgICAgIH0pOworICAgIH07 CisgICAgYXN5bmMucmVqZWN0ID0gZG9QYXJhbGxlbChfcmVqZWN0KTsKKyAgICBhc3luYy5yZWpl Y3RTZXJpZXMgPSBkb1NlcmllcyhfcmVqZWN0KTsKKworICAgIHZhciBfZGV0ZWN0ID0gZnVuY3Rp b24gKGVhY2hmbiwgYXJyLCBpdGVyYXRvciwgbWFpbl9jYWxsYmFjaykgeworICAgICAgICBlYWNo Zm4oYXJyLCBmdW5jdGlvbiAoeCwgY2FsbGJhY2spIHsKKyAgICAgICAgICAgIGl0ZXJhdG9yKHgs IGZ1bmN0aW9uIChyZXN1bHQpIHsKKyAgICAgICAgICAgICAgICBpZiAocmVzdWx0KSB7CisgICAg ICAgICAgICAgICAgICAgIG1haW5fY2FsbGJhY2soeCk7CisgICAgICAgICAgICAgICAgICAgIG1h aW5fY2FsbGJhY2sgPSBmdW5jdGlvbiAoKSB7fTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAg ICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKCk7CisgICAgICAg ICAgICAgICAgfQorICAgICAgICAgICAgfSk7CisgICAgICAgIH0sIGZ1bmN0aW9uIChlcnIpIHsK KyAgICAgICAgICAgIG1haW5fY2FsbGJhY2soKTsKKyAgICAgICAgfSk7CisgICAgfTsKKyAgICBh c3luYy5kZXRlY3QgPSBkb1BhcmFsbGVsKF9kZXRlY3QpOworICAgIGFzeW5jLmRldGVjdFNlcmll cyA9IGRvU2VyaWVzKF9kZXRlY3QpOworCisgICAgYXN5bmMuc29tZSA9IGZ1bmN0aW9uIChhcnIs IGl0ZXJhdG9yLCBtYWluX2NhbGxiYWNrKSB7CisgICAgICAgIGFzeW5jLmVhY2goYXJyLCBmdW5j dGlvbiAoeCwgY2FsbGJhY2spIHsKKyAgICAgICAgICAgIGl0ZXJhdG9yKHgsIGZ1bmN0aW9uICh2 KSB7CisgICAgICAgICAgICAgICAgaWYgKHYpIHsKKyAgICAgICAgICAgICAgICAgICAgbWFpbl9j YWxsYmFjayh0cnVlKTsKKyAgICAgICAgICAgICAgICAgICAgbWFpbl9jYWxsYmFjayA9IGZ1bmN0 aW9uICgpIHt9OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBjYWxsYmFjaygp OworICAgICAgICAgICAgfSk7CisgICAgICAgIH0sIGZ1bmN0aW9uIChlcnIpIHsKKyAgICAgICAg ICAgIG1haW5fY2FsbGJhY2soZmFsc2UpOworICAgICAgICB9KTsKKyAgICB9OworICAgIC8vIGFu eSBhbGlhcworICAgIGFzeW5jLmFueSA9IGFzeW5jLnNvbWU7CisKKyAgICBhc3luYy5ldmVyeSA9 IGZ1bmN0aW9uIChhcnIsIGl0ZXJhdG9yLCBtYWluX2NhbGxiYWNrKSB7CisgICAgICAgIGFzeW5j LmVhY2goYXJyLCBmdW5jdGlvbiAoeCwgY2FsbGJhY2spIHsKKyAgICAgICAgICAgIGl0ZXJhdG9y KHgsIGZ1bmN0aW9uICh2KSB7CisgICAgICAgICAgICAgICAgaWYgKCF2KSB7CisgICAgICAgICAg ICAgICAgICAgIG1haW5fY2FsbGJhY2soZmFsc2UpOworICAgICAgICAgICAgICAgICAgICBtYWlu X2NhbGxiYWNrID0gZnVuY3Rpb24gKCkge307CisgICAgICAgICAgICAgICAgfQorICAgICAgICAg ICAgICAgIGNhbGxiYWNrKCk7CisgICAgICAgICAgICB9KTsKKyAgICAgICAgfSwgZnVuY3Rpb24g KGVycikgeworICAgICAgICAgICAgbWFpbl9jYWxsYmFjayh0cnVlKTsKKyAgICAgICAgfSk7Cisg ICAgfTsKKyAgICAvLyBhbGwgYWxpYXMKKyAgICBhc3luYy5hbGwgPSBhc3luYy5ldmVyeTsKKwor ICAgIGFzeW5jLnNvcnRCeSA9IGZ1bmN0aW9uIChhcnIsIGl0ZXJhdG9yLCBjYWxsYmFjaykgewor ICAgICAgICBhc3luYy5tYXAoYXJyLCBmdW5jdGlvbiAoeCwgY2FsbGJhY2spIHsKKyAgICAgICAg ICAgIGl0ZXJhdG9yKHgsIGZ1bmN0aW9uIChlcnIsIGNyaXRlcmlhKSB7CisgICAgICAgICAgICAg ICAgaWYgKGVycikgeworICAgICAgICAgICAgICAgICAgICBjYWxsYmFjayhlcnIpOworICAgICAg ICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAg Y2FsbGJhY2sobnVsbCwge3ZhbHVlOiB4LCBjcml0ZXJpYTogY3JpdGVyaWF9KTsKKyAgICAgICAg ICAgICAgICB9CisgICAgICAgICAgICB9KTsKKyAgICAgICAgfSwgZnVuY3Rpb24gKGVyciwgcmVz dWx0cykgeworICAgICAgICAgICAgaWYgKGVycikgeworICAgICAgICAgICAgICAgIHJldHVybiBj YWxsYmFjayhlcnIpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZSB7CisgICAgICAg ICAgICAgICAgdmFyIGZuID0gZnVuY3Rpb24gKGxlZnQsIHJpZ2h0KSB7CisgICAgICAgICAgICAg ICAgICAgIHZhciBhID0gbGVmdC5jcml0ZXJpYSwgYiA9IHJpZ2h0LmNyaXRlcmlhOworICAgICAg ICAgICAgICAgICAgICByZXR1cm4gYSA8IGIgPyAtMSA6IGEgPiBiID8gMSA6IDA7CisgICAgICAg ICAgICAgICAgfTsKKyAgICAgICAgICAgICAgICBjYWxsYmFjayhudWxsLCBfbWFwKHJlc3VsdHMu c29ydChmbiksIGZ1bmN0aW9uICh4KSB7CisgICAgICAgICAgICAgICAgICAgIHJldHVybiB4LnZh bHVlOworICAgICAgICAgICAgICAgIH0pKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfSk7Cisg ICAgfTsKKworICAgIGFzeW5jLmF1dG8gPSBmdW5jdGlvbiAodGFza3MsIGNhbGxiYWNrKSB7Cisg ICAgICAgIGNhbGxiYWNrID0gY2FsbGJhY2sgfHwgZnVuY3Rpb24gKCkge307CisgICAgICAgIHZh ciBrZXlzID0gX2tleXModGFza3MpOworICAgICAgICB2YXIgcmVtYWluaW5nVGFza3MgPSBrZXlz Lmxlbmd0aAorICAgICAgICBpZiAoIXJlbWFpbmluZ1Rhc2tzKSB7CisgICAgICAgICAgICByZXR1 cm4gY2FsbGJhY2soKTsKKyAgICAgICAgfQorCisgICAgICAgIHZhciByZXN1bHRzID0ge307CisK KyAgICAgICAgdmFyIGxpc3RlbmVycyA9IFtdOworICAgICAgICB2YXIgYWRkTGlzdGVuZXIgPSBm dW5jdGlvbiAoZm4pIHsKKyAgICAgICAgICAgIGxpc3RlbmVycy51bnNoaWZ0KGZuKTsKKyAgICAg ICAgfTsKKyAgICAgICAgdmFyIHJlbW92ZUxpc3RlbmVyID0gZnVuY3Rpb24gKGZuKSB7CisgICAg ICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxpc3RlbmVycy5sZW5ndGg7IGkgKz0gMSkgewor ICAgICAgICAgICAgICAgIGlmIChsaXN0ZW5lcnNbaV0gPT09IGZuKSB7CisgICAgICAgICAgICAg ICAgICAgIGxpc3RlbmVycy5zcGxpY2UoaSwgMSk7CisgICAgICAgICAgICAgICAgICAgIHJldHVy bjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgIH07CisgICAgICAg IHZhciB0YXNrQ29tcGxldGUgPSBmdW5jdGlvbiAoKSB7CisgICAgICAgICAgICByZW1haW5pbmdU YXNrcy0tCisgICAgICAgICAgICBfZWFjaChsaXN0ZW5lcnMuc2xpY2UoMCksIGZ1bmN0aW9uIChm bikgeworICAgICAgICAgICAgICAgIGZuKCk7CisgICAgICAgICAgICB9KTsKKyAgICAgICAgfTsK KworICAgICAgICBhZGRMaXN0ZW5lcihmdW5jdGlvbiAoKSB7CisgICAgICAgICAgICBpZiAoIXJl bWFpbmluZ1Rhc2tzKSB7CisgICAgICAgICAgICAgICAgdmFyIHRoZUNhbGxiYWNrID0gY2FsbGJh Y2s7CisgICAgICAgICAgICAgICAgLy8gcHJldmVudCBmaW5hbCBjYWxsYmFjayBmcm9tIGNhbGxp bmcgaXRzZWxmIGlmIGl0IGVycm9ycworICAgICAgICAgICAgICAgIGNhbGxiYWNrID0gZnVuY3Rp b24gKCkge307CisKKyAgICAgICAgICAgICAgICB0aGVDYWxsYmFjayhudWxsLCByZXN1bHRzKTsK KyAgICAgICAgICAgIH0KKyAgICAgICAgfSk7CisKKyAgICAgICAgX2VhY2goa2V5cywgZnVuY3Rp b24gKGspIHsKKyAgICAgICAgICAgIHZhciB0YXNrID0gX2lzQXJyYXkodGFza3Nba10pID8gdGFz a3Nba106IFt0YXNrc1trXV07CisgICAgICAgICAgICB2YXIgdGFza0NhbGxiYWNrID0gZnVuY3Rp b24gKGVycikgeworICAgICAgICAgICAgICAgIHZhciBhcmdzID0gQXJyYXkucHJvdG90eXBlLnNs aWNlLmNhbGwoYXJndW1lbnRzLCAxKTsKKyAgICAgICAgICAgICAgICBpZiAoYXJncy5sZW5ndGgg PD0gMSkgeworICAgICAgICAgICAgICAgICAgICBhcmdzID0gYXJnc1swXTsKKyAgICAgICAgICAg ICAgICB9CisgICAgICAgICAgICAgICAgaWYgKGVycikgeworICAgICAgICAgICAgICAgICAgICB2 YXIgc2FmZVJlc3VsdHMgPSB7fTsKKyAgICAgICAgICAgICAgICAgICAgX2VhY2goX2tleXMocmVz dWx0cyksIGZ1bmN0aW9uKHJrZXkpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHNhZmVSZXN1 bHRzW3JrZXldID0gcmVzdWx0c1tya2V5XTsKKyAgICAgICAgICAgICAgICAgICAgfSk7CisgICAg ICAgICAgICAgICAgICAgIHNhZmVSZXN1bHRzW2tdID0gYXJnczsKKyAgICAgICAgICAgICAgICAg ICAgY2FsbGJhY2soZXJyLCBzYWZlUmVzdWx0cyk7CisgICAgICAgICAgICAgICAgICAgIC8vIHN0 b3Agc3Vic2VxdWVudCBlcnJvcnMgaGl0dGluZyBjYWxsYmFjayBtdWx0aXBsZSB0aW1lcworICAg ICAgICAgICAgICAgICAgICBjYWxsYmFjayA9IGZ1bmN0aW9uICgpIHt9OworICAgICAgICAgICAg ICAgIH0KKyAgICAgICAgICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgcmVzdWx0 c1trXSA9IGFyZ3M7CisgICAgICAgICAgICAgICAgICAgIGFzeW5jLnNldEltbWVkaWF0ZSh0YXNr Q29tcGxldGUpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH07CisgICAgICAgICAg ICB2YXIgcmVxdWlyZXMgPSB0YXNrLnNsaWNlKDAsIE1hdGguYWJzKHRhc2subGVuZ3RoIC0gMSkp IHx8IFtdOworICAgICAgICAgICAgdmFyIHJlYWR5ID0gZnVuY3Rpb24gKCkgeworICAgICAgICAg ICAgICAgIHJldHVybiBfcmVkdWNlKHJlcXVpcmVzLCBmdW5jdGlvbiAoYSwgeCkgeworICAgICAg ICAgICAgICAgICAgICByZXR1cm4gKGEgJiYgcmVzdWx0cy5oYXNPd25Qcm9wZXJ0eSh4KSk7Cisg ICAgICAgICAgICAgICAgfSwgdHJ1ZSkgJiYgIXJlc3VsdHMuaGFzT3duUHJvcGVydHkoayk7Cisg ICAgICAgICAgICB9OworICAgICAgICAgICAgaWYgKHJlYWR5KCkpIHsKKyAgICAgICAgICAgICAg ICB0YXNrW3Rhc2subGVuZ3RoIC0gMV0odGFza0NhbGxiYWNrLCByZXN1bHRzKTsKKyAgICAgICAg ICAgIH0KKyAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgIHZhciBsaXN0ZW5lciA9 IGZ1bmN0aW9uICgpIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHJlYWR5KCkpIHsKKyAgICAg ICAgICAgICAgICAgICAgICAgIHJlbW92ZUxpc3RlbmVyKGxpc3RlbmVyKTsKKyAgICAgICAgICAg ICAgICAgICAgICAgIHRhc2tbdGFzay5sZW5ndGggLSAxXSh0YXNrQ2FsbGJhY2ssIHJlc3VsdHMp OworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfTsKKyAgICAgICAgICAg ICAgICBhZGRMaXN0ZW5lcihsaXN0ZW5lcik7CisgICAgICAgICAgICB9CisgICAgICAgIH0pOwor ICAgIH07CisKKyAgICBhc3luYy5yZXRyeSA9IGZ1bmN0aW9uKHRpbWVzLCB0YXNrLCBjYWxsYmFj aykgeworICAgICAgICB2YXIgREVGQVVMVF9USU1FUyA9IDU7CisgICAgICAgIHZhciBhdHRlbXB0 cyA9IFtdOworICAgICAgICAvLyBVc2UgZGVmYXVsdHMgaWYgdGltZXMgbm90IHBhc3NlZAorICAg ICAgICBpZiAodHlwZW9mIHRpbWVzID09PSAnZnVuY3Rpb24nKSB7CisgICAgICAgICAgICBjYWxs YmFjayA9IHRhc2s7CisgICAgICAgICAgICB0YXNrID0gdGltZXM7CisgICAgICAgICAgICB0aW1l cyA9IERFRkFVTFRfVElNRVM7CisgICAgICAgIH0KKyAgICAgICAgLy8gTWFrZSBzdXJlIHRpbWVz IGlzIGEgbnVtYmVyCisgICAgICAgIHRpbWVzID0gcGFyc2VJbnQodGltZXMsIDEwKSB8fCBERUZB VUxUX1RJTUVTOworICAgICAgICB2YXIgd3JhcHBlZFRhc2sgPSBmdW5jdGlvbih3cmFwcGVkQ2Fs bGJhY2ssIHdyYXBwZWRSZXN1bHRzKSB7CisgICAgICAgICAgICB2YXIgcmV0cnlBdHRlbXB0ID0g ZnVuY3Rpb24odGFzaywgZmluYWxBdHRlbXB0KSB7CisgICAgICAgICAgICAgICAgcmV0dXJuIGZ1 bmN0aW9uKHNlcmllc0NhbGxiYWNrKSB7CisgICAgICAgICAgICAgICAgICAgIHRhc2soZnVuY3Rp b24oZXJyLCByZXN1bHQpeworICAgICAgICAgICAgICAgICAgICAgICAgc2VyaWVzQ2FsbGJhY2so IWVyciB8fCBmaW5hbEF0dGVtcHQsIHtlcnI6IGVyciwgcmVzdWx0OiByZXN1bHR9KTsKKyAgICAg ICAgICAgICAgICAgICAgfSwgd3JhcHBlZFJlc3VsdHMpOworICAgICAgICAgICAgICAgIH07Cisg ICAgICAgICAgICB9OworICAgICAgICAgICAgd2hpbGUgKHRpbWVzKSB7CisgICAgICAgICAgICAg ICAgYXR0ZW1wdHMucHVzaChyZXRyeUF0dGVtcHQodGFzaywgISh0aW1lcy09MSkpKTsKKyAgICAg ICAgICAgIH0KKyAgICAgICAgICAgIGFzeW5jLnNlcmllcyhhdHRlbXB0cywgZnVuY3Rpb24oZG9u ZSwgZGF0YSl7CisgICAgICAgICAgICAgICAgZGF0YSA9IGRhdGFbZGF0YS5sZW5ndGggLSAxXTsK KyAgICAgICAgICAgICAgICAod3JhcHBlZENhbGxiYWNrIHx8IGNhbGxiYWNrKShkYXRhLmVyciwg ZGF0YS5yZXN1bHQpOworICAgICAgICAgICAgfSk7CisgICAgICAgIH0KKyAgICAgICAgLy8gSWYg YSBjYWxsYmFjayBpcyBwYXNzZWQsIHJ1biB0aGlzIGFzIGEgY29udHJvbGwgZmxvdworICAgICAg ICByZXR1cm4gY2FsbGJhY2sgPyB3cmFwcGVkVGFzaygpIDogd3JhcHBlZFRhc2sKKyAgICB9Owor CisgICAgYXN5bmMud2F0ZXJmYWxsID0gZnVuY3Rpb24gKHRhc2tzLCBjYWxsYmFjaykgeworICAg ICAgICBjYWxsYmFjayA9IGNhbGxiYWNrIHx8IGZ1bmN0aW9uICgpIHt9OworICAgICAgICBpZiAo IV9pc0FycmF5KHRhc2tzKSkgeworICAgICAgICAgIHZhciBlcnIgPSBuZXcgRXJyb3IoJ0ZpcnN0 IGFyZ3VtZW50IHRvIHdhdGVyZmFsbCBtdXN0IGJlIGFuIGFycmF5IG9mIGZ1bmN0aW9ucycpOwor ICAgICAgICAgIHJldHVybiBjYWxsYmFjayhlcnIpOworICAgICAgICB9CisgICAgICAgIGlmICgh dGFza3MubGVuZ3RoKSB7CisgICAgICAgICAgICByZXR1cm4gY2FsbGJhY2soKTsKKyAgICAgICAg fQorICAgICAgICB2YXIgd3JhcEl0ZXJhdG9yID0gZnVuY3Rpb24gKGl0ZXJhdG9yKSB7CisgICAg ICAgICAgICByZXR1cm4gZnVuY3Rpb24gKGVycikgeworICAgICAgICAgICAgICAgIGlmIChlcnIp IHsKKyAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2suYXBwbHkobnVsbCwgYXJndW1lbnRzKTsK KyAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2sgPSBmdW5jdGlvbiAoKSB7fTsKKyAgICAgICAg ICAgICAgICB9CisgICAgICAgICAgICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIHZh ciBhcmdzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJndW1lbnRzLCAxKTsKKyAgICAg ICAgICAgICAgICAgICAgdmFyIG5leHQgPSBpdGVyYXRvci5uZXh0KCk7CisgICAgICAgICAgICAg ICAgICAgIGlmIChuZXh0KSB7CisgICAgICAgICAgICAgICAgICAgICAgICBhcmdzLnB1c2god3Jh cEl0ZXJhdG9yKG5leHQpKTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAg ICAgICBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGFyZ3MucHVzaChjYWxsYmFjayk7 CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYXN5bmMuc2V0SW1t ZWRpYXRlKGZ1bmN0aW9uICgpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGl0ZXJhdG9yLmFw cGx5KG51bGwsIGFyZ3MpOworICAgICAgICAgICAgICAgICAgICB9KTsKKyAgICAgICAgICAgICAg ICB9CisgICAgICAgICAgICB9OworICAgICAgICB9OworICAgICAgICB3cmFwSXRlcmF0b3IoYXN5 bmMuaXRlcmF0b3IodGFza3MpKSgpOworICAgIH07CisKKyAgICB2YXIgX3BhcmFsbGVsID0gZnVu Y3Rpb24oZWFjaGZuLCB0YXNrcywgY2FsbGJhY2spIHsKKyAgICAgICAgY2FsbGJhY2sgPSBjYWxs YmFjayB8fCBmdW5jdGlvbiAoKSB7fTsKKyAgICAgICAgaWYgKF9pc0FycmF5KHRhc2tzKSkgewor ICAgICAgICAgICAgZWFjaGZuLm1hcCh0YXNrcywgZnVuY3Rpb24gKGZuLCBjYWxsYmFjaykgewor ICAgICAgICAgICAgICAgIGlmIChmbikgeworICAgICAgICAgICAgICAgICAgICBmbihmdW5jdGlv biAoZXJyKSB7CisgICAgICAgICAgICAgICAgICAgICAgICB2YXIgYXJncyA9IEFycmF5LnByb3Rv dHlwZS5zbGljZS5jYWxsKGFyZ3VtZW50cywgMSk7CisgICAgICAgICAgICAgICAgICAgICAgICBp ZiAoYXJncy5sZW5ndGggPD0gMSkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ3Mg PSBhcmdzWzBdOworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAg ICAgICAgY2FsbGJhY2suY2FsbChudWxsLCBlcnIsIGFyZ3MpOworICAgICAgICAgICAgICAgICAg ICB9KTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9LCBjYWxsYmFjayk7CisgICAg ICAgIH0KKyAgICAgICAgZWxzZSB7CisgICAgICAgICAgICB2YXIgcmVzdWx0cyA9IHt9OworICAg ICAgICAgICAgZWFjaGZuLmVhY2goX2tleXModGFza3MpLCBmdW5jdGlvbiAoaywgY2FsbGJhY2sp IHsKKyAgICAgICAgICAgICAgICB0YXNrc1trXShmdW5jdGlvbiAoZXJyKSB7CisgICAgICAgICAg ICAgICAgICAgIHZhciBhcmdzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJndW1lbnRz LCAxKTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGFyZ3MubGVuZ3RoIDw9IDEpIHsKKyAgICAg ICAgICAgICAgICAgICAgICAgIGFyZ3MgPSBhcmdzWzBdOworICAgICAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgICAgICAgIHJlc3VsdHNba10gPSBhcmdzOworICAgICAgICAgICAgICAg ICAgICBjYWxsYmFjayhlcnIpOworICAgICAgICAgICAgICAgIH0pOworICAgICAgICAgICAgfSwg ZnVuY3Rpb24gKGVycikgeworICAgICAgICAgICAgICAgIGNhbGxiYWNrKGVyciwgcmVzdWx0cyk7 CisgICAgICAgICAgICB9KTsKKyAgICAgICAgfQorICAgIH07CisKKyAgICBhc3luYy5wYXJhbGxl bCA9IGZ1bmN0aW9uICh0YXNrcywgY2FsbGJhY2spIHsKKyAgICAgICAgX3BhcmFsbGVsKHsgbWFw OiBhc3luYy5tYXAsIGVhY2g6IGFzeW5jLmVhY2ggfSwgdGFza3MsIGNhbGxiYWNrKTsKKyAgICB9 OworCisgICAgYXN5bmMucGFyYWxsZWxMaW1pdCA9IGZ1bmN0aW9uKHRhc2tzLCBsaW1pdCwgY2Fs bGJhY2spIHsKKyAgICAgICAgX3BhcmFsbGVsKHsgbWFwOiBfbWFwTGltaXQobGltaXQpLCBlYWNo OiBfZWFjaExpbWl0KGxpbWl0KSB9LCB0YXNrcywgY2FsbGJhY2spOworICAgIH07CisKKyAgICBh c3luYy5zZXJpZXMgPSBmdW5jdGlvbiAodGFza3MsIGNhbGxiYWNrKSB7CisgICAgICAgIGNhbGxi YWNrID0gY2FsbGJhY2sgfHwgZnVuY3Rpb24gKCkge307CisgICAgICAgIGlmIChfaXNBcnJheSh0 YXNrcykpIHsKKyAgICAgICAgICAgIGFzeW5jLm1hcFNlcmllcyh0YXNrcywgZnVuY3Rpb24gKGZu LCBjYWxsYmFjaykgeworICAgICAgICAgICAgICAgIGlmIChmbikgeworICAgICAgICAgICAgICAg ICAgICBmbihmdW5jdGlvbiAoZXJyKSB7CisgICAgICAgICAgICAgICAgICAgICAgICB2YXIgYXJn cyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3VtZW50cywgMSk7CisgICAgICAgICAg ICAgICAgICAgICAgICBpZiAoYXJncy5sZW5ndGggPD0gMSkgeworICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGFyZ3MgPSBhcmdzWzBdOworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAg ICAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2suY2FsbChudWxsLCBlcnIsIGFyZ3MpOworICAg ICAgICAgICAgICAgICAgICB9KTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9LCBj YWxsYmFjayk7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSB7CisgICAgICAgICAgICB2YXIgcmVz dWx0cyA9IHt9OworICAgICAgICAgICAgYXN5bmMuZWFjaFNlcmllcyhfa2V5cyh0YXNrcyksIGZ1 bmN0aW9uIChrLCBjYWxsYmFjaykgeworICAgICAgICAgICAgICAgIHRhc2tzW2tdKGZ1bmN0aW9u IChlcnIpIHsKKyAgICAgICAgICAgICAgICAgICAgdmFyIGFyZ3MgPSBBcnJheS5wcm90b3R5cGUu c2xpY2UuY2FsbChhcmd1bWVudHMsIDEpOworICAgICAgICAgICAgICAgICAgICBpZiAoYXJncy5s ZW5ndGggPD0gMSkgeworICAgICAgICAgICAgICAgICAgICAgICAgYXJncyA9IGFyZ3NbMF07Cisg ICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgcmVzdWx0c1trXSA9IGFy Z3M7CisgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrKGVycik7CisgICAgICAgICAgICAgICAg fSk7CisgICAgICAgICAgICB9LCBmdW5jdGlvbiAoZXJyKSB7CisgICAgICAgICAgICAgICAgY2Fs bGJhY2soZXJyLCByZXN1bHRzKTsKKyAgICAgICAgICAgIH0pOworICAgICAgICB9CisgICAgfTsK KworICAgIGFzeW5jLml0ZXJhdG9yID0gZnVuY3Rpb24gKHRhc2tzKSB7CisgICAgICAgIHZhciBt YWtlQ2FsbGJhY2sgPSBmdW5jdGlvbiAoaW5kZXgpIHsKKyAgICAgICAgICAgIHZhciBmbiA9IGZ1 bmN0aW9uICgpIHsKKyAgICAgICAgICAgICAgICBpZiAodGFza3MubGVuZ3RoKSB7CisgICAgICAg ICAgICAgICAgICAgIHRhc2tzW2luZGV4XS5hcHBseShudWxsLCBhcmd1bWVudHMpOworICAgICAg ICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICByZXR1cm4gZm4ubmV4dCgpOworICAgICAgICAg ICAgfTsKKyAgICAgICAgICAgIGZuLm5leHQgPSBmdW5jdGlvbiAoKSB7CisgICAgICAgICAgICAg ICAgcmV0dXJuIChpbmRleCA8IHRhc2tzLmxlbmd0aCAtIDEpID8gbWFrZUNhbGxiYWNrKGluZGV4 ICsgMSk6IG51bGw7CisgICAgICAgICAgICB9OworICAgICAgICAgICAgcmV0dXJuIGZuOworICAg ICAgICB9OworICAgICAgICByZXR1cm4gbWFrZUNhbGxiYWNrKDApOworICAgIH07CisKKyAgICBh c3luYy5hcHBseSA9IGZ1bmN0aW9uIChmbikgeworICAgICAgICB2YXIgYXJncyA9IEFycmF5LnBy b3RvdHlwZS5zbGljZS5jYWxsKGFyZ3VtZW50cywgMSk7CisgICAgICAgIHJldHVybiBmdW5jdGlv biAoKSB7CisgICAgICAgICAgICByZXR1cm4gZm4uYXBwbHkoCisgICAgICAgICAgICAgICAgbnVs bCwgYXJncy5jb25jYXQoQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJndW1lbnRzKSkKKyAg ICAgICAgICAgICk7CisgICAgICAgIH07CisgICAgfTsKKworICAgIHZhciBfY29uY2F0ID0gZnVu Y3Rpb24gKGVhY2hmbiwgYXJyLCBmbiwgY2FsbGJhY2spIHsKKyAgICAgICAgdmFyIHIgPSBbXTsK KyAgICAgICAgZWFjaGZuKGFyciwgZnVuY3Rpb24gKHgsIGNiKSB7CisgICAgICAgICAgICBmbih4 LCBmdW5jdGlvbiAoZXJyLCB5KSB7CisgICAgICAgICAgICAgICAgciA9IHIuY29uY2F0KHkgfHwg W10pOworICAgICAgICAgICAgICAgIGNiKGVycik7CisgICAgICAgICAgICB9KTsKKyAgICAgICAg fSwgZnVuY3Rpb24gKGVycikgeworICAgICAgICAgICAgY2FsbGJhY2soZXJyLCByKTsKKyAgICAg ICAgfSk7CisgICAgfTsKKyAgICBhc3luYy5jb25jYXQgPSBkb1BhcmFsbGVsKF9jb25jYXQpOwor ICAgIGFzeW5jLmNvbmNhdFNlcmllcyA9IGRvU2VyaWVzKF9jb25jYXQpOworCisgICAgYXN5bmMu d2hpbHN0ID0gZnVuY3Rpb24gKHRlc3QsIGl0ZXJhdG9yLCBjYWxsYmFjaykgeworICAgICAgICBp ZiAodGVzdCgpKSB7CisgICAgICAgICAgICBpdGVyYXRvcihmdW5jdGlvbiAoZXJyKSB7CisgICAg ICAgICAgICAgICAgaWYgKGVycikgeworICAgICAgICAgICAgICAgICAgICByZXR1cm4gY2FsbGJh Y2soZXJyKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgYXN5bmMud2hpbHN0 KHRlc3QsIGl0ZXJhdG9yLCBjYWxsYmFjayk7CisgICAgICAgICAgICB9KTsKKyAgICAgICAgfQor ICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIGNhbGxiYWNrKCk7CisgICAgICAgIH0KKyAgICB9 OworCisgICAgYXN5bmMuZG9XaGlsc3QgPSBmdW5jdGlvbiAoaXRlcmF0b3IsIHRlc3QsIGNhbGxi YWNrKSB7CisgICAgICAgIGl0ZXJhdG9yKGZ1bmN0aW9uIChlcnIpIHsKKyAgICAgICAgICAgIGlm IChlcnIpIHsKKyAgICAgICAgICAgICAgICByZXR1cm4gY2FsbGJhY2soZXJyKTsKKyAgICAgICAg ICAgIH0KKyAgICAgICAgICAgIHZhciBhcmdzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwo YXJndW1lbnRzLCAxKTsKKyAgICAgICAgICAgIGlmICh0ZXN0LmFwcGx5KG51bGwsIGFyZ3MpKSB7 CisgICAgICAgICAgICAgICAgYXN5bmMuZG9XaGlsc3QoaXRlcmF0b3IsIHRlc3QsIGNhbGxiYWNr KTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgIGNh bGxiYWNrKCk7CisgICAgICAgICAgICB9CisgICAgICAgIH0pOworICAgIH07CisKKyAgICBhc3lu Yy51bnRpbCA9IGZ1bmN0aW9uICh0ZXN0LCBpdGVyYXRvciwgY2FsbGJhY2spIHsKKyAgICAgICAg aWYgKCF0ZXN0KCkpIHsKKyAgICAgICAgICAgIGl0ZXJhdG9yKGZ1bmN0aW9uIChlcnIpIHsKKyAg ICAgICAgICAgICAgICBpZiAoZXJyKSB7CisgICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWxs YmFjayhlcnIpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBhc3luYy51bnRp bCh0ZXN0LCBpdGVyYXRvciwgY2FsbGJhY2spOworICAgICAgICAgICAgfSk7CisgICAgICAgIH0K KyAgICAgICAgZWxzZSB7CisgICAgICAgICAgICBjYWxsYmFjaygpOworICAgICAgICB9CisgICAg fTsKKworICAgIGFzeW5jLmRvVW50aWwgPSBmdW5jdGlvbiAoaXRlcmF0b3IsIHRlc3QsIGNhbGxi YWNrKSB7CisgICAgICAgIGl0ZXJhdG9yKGZ1bmN0aW9uIChlcnIpIHsKKyAgICAgICAgICAgIGlm IChlcnIpIHsKKyAgICAgICAgICAgICAgICByZXR1cm4gY2FsbGJhY2soZXJyKTsKKyAgICAgICAg ICAgIH0KKyAgICAgICAgICAgIHZhciBhcmdzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwo YXJndW1lbnRzLCAxKTsKKyAgICAgICAgICAgIGlmICghdGVzdC5hcHBseShudWxsLCBhcmdzKSkg eworICAgICAgICAgICAgICAgIGFzeW5jLmRvVW50aWwoaXRlcmF0b3IsIHRlc3QsIGNhbGxiYWNr KTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgIGNh bGxiYWNrKCk7CisgICAgICAgICAgICB9CisgICAgICAgIH0pOworICAgIH07CisKKyAgICBhc3lu Yy5xdWV1ZSA9IGZ1bmN0aW9uICh3b3JrZXIsIGNvbmN1cnJlbmN5KSB7CisgICAgICAgIGlmIChj b25jdXJyZW5jeSA9PT0gdW5kZWZpbmVkKSB7CisgICAgICAgICAgICBjb25jdXJyZW5jeSA9IDE7 CisgICAgICAgIH0KKyAgICAgICAgZnVuY3Rpb24gX2luc2VydChxLCBkYXRhLCBwb3MsIGNhbGxi YWNrKSB7CisgICAgICAgICAgaWYgKCFxLnN0YXJ0ZWQpeworICAgICAgICAgICAgcS5zdGFydGVk ID0gdHJ1ZTsKKyAgICAgICAgICB9CisgICAgICAgICAgaWYgKCFfaXNBcnJheShkYXRhKSkgewor ICAgICAgICAgICAgICBkYXRhID0gW2RhdGFdOworICAgICAgICAgIH0KKyAgICAgICAgICBpZihk YXRhLmxlbmd0aCA9PSAwKSB7CisgICAgICAgICAgICAgLy8gY2FsbCBkcmFpbiBpbW1lZGlhdGVs eSBpZiB0aGVyZSBhcmUgbm8gdGFza3MKKyAgICAgICAgICAgICByZXR1cm4gYXN5bmMuc2V0SW1t ZWRpYXRlKGZ1bmN0aW9uKCkgeworICAgICAgICAgICAgICAgICBpZiAocS5kcmFpbikgeworICAg ICAgICAgICAgICAgICAgICAgcS5kcmFpbigpOworICAgICAgICAgICAgICAgICB9CisgICAgICAg ICAgICAgfSk7CisgICAgICAgICAgfQorICAgICAgICAgIF9lYWNoKGRhdGEsIGZ1bmN0aW9uKHRh c2spIHsKKyAgICAgICAgICAgICAgdmFyIGl0ZW0gPSB7CisgICAgICAgICAgICAgICAgICBkYXRh OiB0YXNrLAorICAgICAgICAgICAgICAgICAgY2FsbGJhY2s6IHR5cGVvZiBjYWxsYmFjayA9PT0g J2Z1bmN0aW9uJyA/IGNhbGxiYWNrIDogbnVsbAorICAgICAgICAgICAgICB9OworCisgICAgICAg ICAgICAgIGlmIChwb3MpIHsKKyAgICAgICAgICAgICAgICBxLnRhc2tzLnVuc2hpZnQoaXRlbSk7 CisgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgcS50YXNrcy5wdXNoKGl0 ZW0pOworICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgaWYgKHEuc2F0dXJhdGVkICYm IHEudGFza3MubGVuZ3RoID09PSBxLmNvbmN1cnJlbmN5KSB7CisgICAgICAgICAgICAgICAgICBx LnNhdHVyYXRlZCgpOworICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgIGFzeW5jLnNldElt bWVkaWF0ZShxLnByb2Nlc3MpOworICAgICAgICAgIH0pOworICAgICAgICB9CisKKyAgICAgICAg dmFyIHdvcmtlcnMgPSAwOworICAgICAgICB2YXIgcSA9IHsKKyAgICAgICAgICAgIHRhc2tzOiBb XSwKKyAgICAgICAgICAgIGNvbmN1cnJlbmN5OiBjb25jdXJyZW5jeSwKKyAgICAgICAgICAgIHNh dHVyYXRlZDogbnVsbCwKKyAgICAgICAgICAgIGVtcHR5OiBudWxsLAorICAgICAgICAgICAgZHJh aW46IG51bGwsCisgICAgICAgICAgICBzdGFydGVkOiBmYWxzZSwKKyAgICAgICAgICAgIHBhdXNl ZDogZmFsc2UsCisgICAgICAgICAgICBwdXNoOiBmdW5jdGlvbiAoZGF0YSwgY2FsbGJhY2spIHsK KyAgICAgICAgICAgICAgX2luc2VydChxLCBkYXRhLCBmYWxzZSwgY2FsbGJhY2spOworICAgICAg ICAgICAgfSwKKyAgICAgICAgICAgIGtpbGw6IGZ1bmN0aW9uICgpIHsKKyAgICAgICAgICAgICAg cS5kcmFpbiA9IG51bGw7CisgICAgICAgICAgICAgIHEudGFza3MgPSBbXTsKKyAgICAgICAgICAg IH0sCisgICAgICAgICAgICB1bnNoaWZ0OiBmdW5jdGlvbiAoZGF0YSwgY2FsbGJhY2spIHsKKyAg ICAgICAgICAgICAgX2luc2VydChxLCBkYXRhLCB0cnVlLCBjYWxsYmFjayk7CisgICAgICAgICAg ICB9LAorICAgICAgICAgICAgcHJvY2VzczogZnVuY3Rpb24gKCkgeworICAgICAgICAgICAgICAg IGlmICghcS5wYXVzZWQgJiYgd29ya2VycyA8IHEuY29uY3VycmVuY3kgJiYgcS50YXNrcy5sZW5n dGgpIHsKKyAgICAgICAgICAgICAgICAgICAgdmFyIHRhc2sgPSBxLnRhc2tzLnNoaWZ0KCk7Cisg ICAgICAgICAgICAgICAgICAgIGlmIChxLmVtcHR5ICYmIHEudGFza3MubGVuZ3RoID09PSAwKSB7 CisgICAgICAgICAgICAgICAgICAgICAgICBxLmVtcHR5KCk7CisgICAgICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgICAgICAgICAgd29ya2VycyArPSAxOworICAgICAgICAgICAgICAgICAg ICB2YXIgbmV4dCA9IGZ1bmN0aW9uICgpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHdvcmtl cnMgLT0gMTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0YXNrLmNhbGxiYWNrKSB7Cisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgdGFzay5jYWxsYmFjay5hcHBseSh0YXNrLCBhcmd1 bWVudHMpOworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAg ICAgaWYgKHEuZHJhaW4gJiYgcS50YXNrcy5sZW5ndGggKyB3b3JrZXJzID09PSAwKSB7CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgcS5kcmFpbigpOworICAgICAgICAgICAgICAgICAgICAg ICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgcS5wcm9jZXNzKCk7CisgICAgICAgICAgICAg ICAgICAgIH07CisgICAgICAgICAgICAgICAgICAgIHZhciBjYiA9IG9ubHlfb25jZShuZXh0KTsK KyAgICAgICAgICAgICAgICAgICAgd29ya2VyKHRhc2suZGF0YSwgY2IpOworICAgICAgICAgICAg ICAgIH0KKyAgICAgICAgICAgIH0sCisgICAgICAgICAgICBsZW5ndGg6IGZ1bmN0aW9uICgpIHsK KyAgICAgICAgICAgICAgICByZXR1cm4gcS50YXNrcy5sZW5ndGg7CisgICAgICAgICAgICB9LAor ICAgICAgICAgICAgcnVubmluZzogZnVuY3Rpb24gKCkgeworICAgICAgICAgICAgICAgIHJldHVy biB3b3JrZXJzOworICAgICAgICAgICAgfSwKKyAgICAgICAgICAgIGlkbGU6IGZ1bmN0aW9uKCkg eworICAgICAgICAgICAgICAgIHJldHVybiBxLnRhc2tzLmxlbmd0aCArIHdvcmtlcnMgPT09IDA7 CisgICAgICAgICAgICB9LAorICAgICAgICAgICAgcGF1c2U6IGZ1bmN0aW9uICgpIHsKKyAgICAg ICAgICAgICAgICBpZiAocS5wYXVzZWQgPT09IHRydWUpIHsgcmV0dXJuOyB9CisgICAgICAgICAg ICAgICAgcS5wYXVzZWQgPSB0cnVlOworICAgICAgICAgICAgICAgIHEucHJvY2VzcygpOworICAg ICAgICAgICAgfSwKKyAgICAgICAgICAgIHJlc3VtZTogZnVuY3Rpb24gKCkgeworICAgICAgICAg ICAgICAgIGlmIChxLnBhdXNlZCA9PT0gZmFsc2UpIHsgcmV0dXJuOyB9CisgICAgICAgICAgICAg ICAgcS5wYXVzZWQgPSBmYWxzZTsKKyAgICAgICAgICAgICAgICBxLnByb2Nlc3MoKTsKKyAgICAg ICAgICAgIH0KKyAgICAgICAgfTsKKyAgICAgICAgcmV0dXJuIHE7CisgICAgfTsKKyAgICAKKyAg ICBhc3luYy5wcmlvcml0eVF1ZXVlID0gZnVuY3Rpb24gKHdvcmtlciwgY29uY3VycmVuY3kpIHsK KyAgICAgICAgCisgICAgICAgIGZ1bmN0aW9uIF9jb21wYXJlVGFza3MoYSwgYil7CisgICAgICAg ICAgcmV0dXJuIGEucHJpb3JpdHkgLSBiLnByaW9yaXR5OworICAgICAgICB9OworICAgICAgICAK KyAgICAgICAgZnVuY3Rpb24gX2JpbmFyeVNlYXJjaChzZXF1ZW5jZSwgaXRlbSwgY29tcGFyZSkg eworICAgICAgICAgIHZhciBiZWcgPSAtMSwKKyAgICAgICAgICAgICAgZW5kID0gc2VxdWVuY2Uu bGVuZ3RoIC0gMTsKKyAgICAgICAgICB3aGlsZSAoYmVnIDwgZW5kKSB7CisgICAgICAgICAgICB2 YXIgbWlkID0gYmVnICsgKChlbmQgLSBiZWcgKyAxKSA+Pj4gMSk7CisgICAgICAgICAgICBpZiAo Y29tcGFyZShpdGVtLCBzZXF1ZW5jZVttaWRdKSA+PSAwKSB7CisgICAgICAgICAgICAgIGJlZyA9 IG1pZDsKKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgIGVuZCA9IG1pZCAtIDE7 CisgICAgICAgICAgICB9CisgICAgICAgICAgfQorICAgICAgICAgIHJldHVybiBiZWc7CisgICAg ICAgIH0KKyAgICAgICAgCisgICAgICAgIGZ1bmN0aW9uIF9pbnNlcnQocSwgZGF0YSwgcHJpb3Jp dHksIGNhbGxiYWNrKSB7CisgICAgICAgICAgaWYgKCFxLnN0YXJ0ZWQpeworICAgICAgICAgICAg cS5zdGFydGVkID0gdHJ1ZTsKKyAgICAgICAgICB9CisgICAgICAgICAgaWYgKCFfaXNBcnJheShk YXRhKSkgeworICAgICAgICAgICAgICBkYXRhID0gW2RhdGFdOworICAgICAgICAgIH0KKyAgICAg ICAgICBpZihkYXRhLmxlbmd0aCA9PSAwKSB7CisgICAgICAgICAgICAgLy8gY2FsbCBkcmFpbiBp bW1lZGlhdGVseSBpZiB0aGVyZSBhcmUgbm8gdGFza3MKKyAgICAgICAgICAgICByZXR1cm4gYXN5 bmMuc2V0SW1tZWRpYXRlKGZ1bmN0aW9uKCkgeworICAgICAgICAgICAgICAgICBpZiAocS5kcmFp bikgeworICAgICAgICAgICAgICAgICAgICAgcS5kcmFpbigpOworICAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgfSk7CisgICAgICAgICAgfQorICAgICAgICAgIF9lYWNoKGRhdGEsIGZ1 bmN0aW9uKHRhc2spIHsKKyAgICAgICAgICAgICAgdmFyIGl0ZW0gPSB7CisgICAgICAgICAgICAg ICAgICBkYXRhOiB0YXNrLAorICAgICAgICAgICAgICAgICAgcHJpb3JpdHk6IHByaW9yaXR5LAor ICAgICAgICAgICAgICAgICAgY2FsbGJhY2s6IHR5cGVvZiBjYWxsYmFjayA9PT0gJ2Z1bmN0aW9u JyA/IGNhbGxiYWNrIDogbnVsbAorICAgICAgICAgICAgICB9OworICAgICAgICAgICAgICAKKyAg ICAgICAgICAgICAgcS50YXNrcy5zcGxpY2UoX2JpbmFyeVNlYXJjaChxLnRhc2tzLCBpdGVtLCBf Y29tcGFyZVRhc2tzKSArIDEsIDAsIGl0ZW0pOworCisgICAgICAgICAgICAgIGlmIChxLnNhdHVy YXRlZCAmJiBxLnRhc2tzLmxlbmd0aCA9PT0gcS5jb25jdXJyZW5jeSkgeworICAgICAgICAgICAg ICAgICAgcS5zYXR1cmF0ZWQoKTsKKyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICBhc3lu Yy5zZXRJbW1lZGlhdGUocS5wcm9jZXNzKTsKKyAgICAgICAgICB9KTsKKyAgICAgICAgfQorICAg ICAgICAKKyAgICAgICAgLy8gU3RhcnQgd2l0aCBhIG5vcm1hbCBxdWV1ZQorICAgICAgICB2YXIg cSA9IGFzeW5jLnF1ZXVlKHdvcmtlciwgY29uY3VycmVuY3kpOworICAgICAgICAKKyAgICAgICAg Ly8gT3ZlcnJpZGUgcHVzaCB0byBhY2NlcHQgc2Vjb25kIHBhcmFtZXRlciByZXByZXNlbnRpbmcg cHJpb3JpdHkKKyAgICAgICAgcS5wdXNoID0gZnVuY3Rpb24gKGRhdGEsIHByaW9yaXR5LCBjYWxs YmFjaykgeworICAgICAgICAgIF9pbnNlcnQocSwgZGF0YSwgcHJpb3JpdHksIGNhbGxiYWNrKTsK KyAgICAgICAgfTsKKyAgICAgICAgCisgICAgICAgIC8vIFJlbW92ZSB1bnNoaWZ0IGZ1bmN0aW9u CisgICAgICAgIGRlbGV0ZSBxLnVuc2hpZnQ7CisKKyAgICAgICAgcmV0dXJuIHE7CisgICAgfTsK KworICAgIGFzeW5jLmNhcmdvID0gZnVuY3Rpb24gKHdvcmtlciwgcGF5bG9hZCkgeworICAgICAg ICB2YXIgd29ya2luZyAgICAgPSBmYWxzZSwKKyAgICAgICAgICAgIHRhc2tzICAgICAgID0gW107 CisKKyAgICAgICAgdmFyIGNhcmdvID0geworICAgICAgICAgICAgdGFza3M6IHRhc2tzLAorICAg ICAgICAgICAgcGF5bG9hZDogcGF5bG9hZCwKKyAgICAgICAgICAgIHNhdHVyYXRlZDogbnVsbCwK KyAgICAgICAgICAgIGVtcHR5OiBudWxsLAorICAgICAgICAgICAgZHJhaW46IG51bGwsCisgICAg ICAgICAgICBkcmFpbmVkOiB0cnVlLAorICAgICAgICAgICAgcHVzaDogZnVuY3Rpb24gKGRhdGEs IGNhbGxiYWNrKSB7CisgICAgICAgICAgICAgICAgaWYgKCFfaXNBcnJheShkYXRhKSkgeworICAg ICAgICAgICAgICAgICAgICBkYXRhID0gW2RhdGFdOworICAgICAgICAgICAgICAgIH0KKyAgICAg ICAgICAgICAgICBfZWFjaChkYXRhLCBmdW5jdGlvbih0YXNrKSB7CisgICAgICAgICAgICAgICAg ICAgIHRhc2tzLnB1c2goeworICAgICAgICAgICAgICAgICAgICAgICAgZGF0YTogdGFzaywKKyAg ICAgICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrOiB0eXBlb2YgY2FsbGJhY2sgPT09ICdmdW5j dGlvbicgPyBjYWxsYmFjayA6IG51bGwKKyAgICAgICAgICAgICAgICAgICAgfSk7CisgICAgICAg ICAgICAgICAgICAgIGNhcmdvLmRyYWluZWQgPSBmYWxzZTsKKyAgICAgICAgICAgICAgICAgICAg aWYgKGNhcmdvLnNhdHVyYXRlZCAmJiB0YXNrcy5sZW5ndGggPT09IHBheWxvYWQpIHsKKyAgICAg ICAgICAgICAgICAgICAgICAgIGNhcmdvLnNhdHVyYXRlZCgpOworICAgICAgICAgICAgICAgICAg ICB9CisgICAgICAgICAgICAgICAgfSk7CisgICAgICAgICAgICAgICAgYXN5bmMuc2V0SW1tZWRp YXRlKGNhcmdvLnByb2Nlc3MpOworICAgICAgICAgICAgfSwKKyAgICAgICAgICAgIHByb2Nlc3M6 IGZ1bmN0aW9uIHByb2Nlc3MoKSB7CisgICAgICAgICAgICAgICAgaWYgKHdvcmtpbmcpIHJldHVy bjsKKyAgICAgICAgICAgICAgICBpZiAodGFza3MubGVuZ3RoID09PSAwKSB7CisgICAgICAgICAg ICAgICAgICAgIGlmKGNhcmdvLmRyYWluICYmICFjYXJnby5kcmFpbmVkKSBjYXJnby5kcmFpbigp OworICAgICAgICAgICAgICAgICAgICBjYXJnby5kcmFpbmVkID0gdHJ1ZTsKKyAgICAgICAgICAg ICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgIHZh ciB0cyA9IHR5cGVvZiBwYXlsb2FkID09PSAnbnVtYmVyJworICAgICAgICAgICAgICAgICAgICAg ICAgICAgID8gdGFza3Muc3BsaWNlKDAsIHBheWxvYWQpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOiB0YXNrcy5zcGxpY2UoMCwgdGFza3MubGVuZ3RoKTsKKworICAgICAgICAgICAgICAg IHZhciBkcyA9IF9tYXAodHMsIGZ1bmN0aW9uICh0YXNrKSB7CisgICAgICAgICAgICAgICAgICAg IHJldHVybiB0YXNrLmRhdGE7CisgICAgICAgICAgICAgICAgfSk7CisKKyAgICAgICAgICAgICAg ICBpZihjYXJnby5lbXB0eSkgY2FyZ28uZW1wdHkoKTsKKyAgICAgICAgICAgICAgICB3b3JraW5n ID0gdHJ1ZTsKKyAgICAgICAgICAgICAgICB3b3JrZXIoZHMsIGZ1bmN0aW9uICgpIHsKKyAgICAg ICAgICAgICAgICAgICAgd29ya2luZyA9IGZhbHNlOworCisgICAgICAgICAgICAgICAgICAgIHZh ciBhcmdzID0gYXJndW1lbnRzOworICAgICAgICAgICAgICAgICAgICBfZWFjaCh0cywgZnVuY3Rp b24gKGRhdGEpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkYXRhLmNhbGxiYWNrKSB7 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5jYWxsYmFjay5hcHBseShudWxsLCBh cmdzKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgfSk7 CisKKyAgICAgICAgICAgICAgICAgICAgcHJvY2VzcygpOworICAgICAgICAgICAgICAgIH0pOwor ICAgICAgICAgICAgfSwKKyAgICAgICAgICAgIGxlbmd0aDogZnVuY3Rpb24gKCkgeworICAgICAg ICAgICAgICAgIHJldHVybiB0YXNrcy5sZW5ndGg7CisgICAgICAgICAgICB9LAorICAgICAgICAg ICAgcnVubmluZzogZnVuY3Rpb24gKCkgeworICAgICAgICAgICAgICAgIHJldHVybiB3b3JraW5n OworICAgICAgICAgICAgfQorICAgICAgICB9OworICAgICAgICByZXR1cm4gY2FyZ287CisgICAg fTsKKworICAgIHZhciBfY29uc29sZV9mbiA9IGZ1bmN0aW9uIChuYW1lKSB7CisgICAgICAgIHJl dHVybiBmdW5jdGlvbiAoZm4pIHsKKyAgICAgICAgICAgIHZhciBhcmdzID0gQXJyYXkucHJvdG90 eXBlLnNsaWNlLmNhbGwoYXJndW1lbnRzLCAxKTsKKyAgICAgICAgICAgIGZuLmFwcGx5KG51bGws IGFyZ3MuY29uY2F0KFtmdW5jdGlvbiAoZXJyKSB7CisgICAgICAgICAgICAgICAgdmFyIGFyZ3Mg PSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMsIDEpOworICAgICAgICAgICAg ICAgIGlmICh0eXBlb2YgY29uc29sZSAhPT0gJ3VuZGVmaW5lZCcpIHsKKyAgICAgICAgICAgICAg ICAgICAgaWYgKGVycikgeworICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnNvbGUuZXJy b3IpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmVycm9yKGVycik7Cisg ICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAg ICAgICAgICAgICAgZWxzZSBpZiAoY29uc29sZVtuYW1lXSkgeworICAgICAgICAgICAgICAgICAg ICAgICAgX2VhY2goYXJncywgZnVuY3Rpb24gKHgpIHsKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICBjb25zb2xlW25hbWVdKHgpOworICAgICAgICAgICAgICAgICAgICAgICAgfSk7CisgICAg ICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9XSkpOwor ICAgICAgICB9OworICAgIH07CisgICAgYXN5bmMubG9nID0gX2NvbnNvbGVfZm4oJ2xvZycpOwor ICAgIGFzeW5jLmRpciA9IF9jb25zb2xlX2ZuKCdkaXInKTsKKyAgICAvKmFzeW5jLmluZm8gPSBf Y29uc29sZV9mbignaW5mbycpOworICAgIGFzeW5jLndhcm4gPSBfY29uc29sZV9mbignd2Fybicp OworICAgIGFzeW5jLmVycm9yID0gX2NvbnNvbGVfZm4oJ2Vycm9yJyk7Ki8KKworICAgIGFzeW5j Lm1lbW9pemUgPSBmdW5jdGlvbiAoZm4sIGhhc2hlcikgeworICAgICAgICB2YXIgbWVtbyA9IHt9 OworICAgICAgICB2YXIgcXVldWVzID0ge307CisgICAgICAgIGhhc2hlciA9IGhhc2hlciB8fCBm dW5jdGlvbiAoeCkgeworICAgICAgICAgICAgcmV0dXJuIHg7CisgICAgICAgIH07CisgICAgICAg IHZhciBtZW1vaXplZCA9IGZ1bmN0aW9uICgpIHsKKyAgICAgICAgICAgIHZhciBhcmdzID0gQXJy YXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJndW1lbnRzKTsKKyAgICAgICAgICAgIHZhciBjYWxs YmFjayA9IGFyZ3MucG9wKCk7CisgICAgICAgICAgICB2YXIga2V5ID0gaGFzaGVyLmFwcGx5KG51 bGwsIGFyZ3MpOworICAgICAgICAgICAgaWYgKGtleSBpbiBtZW1vKSB7CisgICAgICAgICAgICAg ICAgYXN5bmMubmV4dFRpY2soZnVuY3Rpb24gKCkgeworICAgICAgICAgICAgICAgICAgICBjYWxs YmFjay5hcHBseShudWxsLCBtZW1vW2tleV0pOworICAgICAgICAgICAgICAgIH0pOworICAgICAg ICAgICAgfQorICAgICAgICAgICAgZWxzZSBpZiAoa2V5IGluIHF1ZXVlcykgeworICAgICAgICAg ICAgICAgIHF1ZXVlc1trZXldLnB1c2goY2FsbGJhY2spOworICAgICAgICAgICAgfQorICAgICAg ICAgICAgZWxzZSB7CisgICAgICAgICAgICAgICAgcXVldWVzW2tleV0gPSBbY2FsbGJhY2tdOwor ICAgICAgICAgICAgICAgIGZuLmFwcGx5KG51bGwsIGFyZ3MuY29uY2F0KFtmdW5jdGlvbiAoKSB7 CisgICAgICAgICAgICAgICAgICAgIG1lbW9ba2V5XSA9IGFyZ3VtZW50czsKKyAgICAgICAgICAg ICAgICAgICAgdmFyIHEgPSBxdWV1ZXNba2V5XTsKKyAgICAgICAgICAgICAgICAgICAgZGVsZXRl IHF1ZXVlc1trZXldOworICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMCwgbCA9IHEu bGVuZ3RoOyBpIDwgbDsgaSsrKSB7CisgICAgICAgICAgICAgICAgICAgICAgcVtpXS5hcHBseShu dWxsLCBhcmd1bWVudHMpOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAg fV0pKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfTsKKyAgICAgICAgbWVtb2l6ZWQubWVtbyA9 IG1lbW87CisgICAgICAgIG1lbW9pemVkLnVubWVtb2l6ZWQgPSBmbjsKKyAgICAgICAgcmV0dXJu IG1lbW9pemVkOworICAgIH07CisKKyAgICBhc3luYy51bm1lbW9pemUgPSBmdW5jdGlvbiAoZm4p IHsKKyAgICAgIHJldHVybiBmdW5jdGlvbiAoKSB7CisgICAgICAgIHJldHVybiAoZm4udW5tZW1v aXplZCB8fCBmbikuYXBwbHkobnVsbCwgYXJndW1lbnRzKTsKKyAgICAgIH07CisgICAgfTsKKwor ICAgIGFzeW5jLnRpbWVzID0gZnVuY3Rpb24gKGNvdW50LCBpdGVyYXRvciwgY2FsbGJhY2spIHsK KyAgICAgICAgdmFyIGNvdW50ZXIgPSBbXTsKKyAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBj b3VudDsgaSsrKSB7CisgICAgICAgICAgICBjb3VudGVyLnB1c2goaSk7CisgICAgICAgIH0KKyAg ICAgICAgcmV0dXJuIGFzeW5jLm1hcChjb3VudGVyLCBpdGVyYXRvciwgY2FsbGJhY2spOworICAg IH07CisKKyAgICBhc3luYy50aW1lc1NlcmllcyA9IGZ1bmN0aW9uIChjb3VudCwgaXRlcmF0b3Is IGNhbGxiYWNrKSB7CisgICAgICAgIHZhciBjb3VudGVyID0gW107CisgICAgICAgIGZvciAodmFy IGkgPSAwOyBpIDwgY291bnQ7IGkrKykgeworICAgICAgICAgICAgY291bnRlci5wdXNoKGkpOwor ICAgICAgICB9CisgICAgICAgIHJldHVybiBhc3luYy5tYXBTZXJpZXMoY291bnRlciwgaXRlcmF0 b3IsIGNhbGxiYWNrKTsKKyAgICB9OworCisgICAgYXN5bmMuc2VxID0gZnVuY3Rpb24gKC8qIGZ1 bmN0aW9ucy4uLiAqLykgeworICAgICAgICB2YXIgZm5zID0gYXJndW1lbnRzOworICAgICAgICBy ZXR1cm4gZnVuY3Rpb24gKCkgeworICAgICAgICAgICAgdmFyIHRoYXQgPSB0aGlzOworICAgICAg ICAgICAgdmFyIGFyZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMpOwor ICAgICAgICAgICAgdmFyIGNhbGxiYWNrID0gYXJncy5wb3AoKTsKKyAgICAgICAgICAgIGFzeW5j LnJlZHVjZShmbnMsIGFyZ3MsIGZ1bmN0aW9uIChuZXdhcmdzLCBmbiwgY2IpIHsKKyAgICAgICAg ICAgICAgICBmbi5hcHBseSh0aGF0LCBuZXdhcmdzLmNvbmNhdChbZnVuY3Rpb24gKCkgeworICAg ICAgICAgICAgICAgICAgICB2YXIgZXJyID0gYXJndW1lbnRzWzBdOworICAgICAgICAgICAgICAg ICAgICB2YXIgbmV4dGFyZ3MgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMs IDEpOworICAgICAgICAgICAgICAgICAgICBjYihlcnIsIG5leHRhcmdzKTsKKyAgICAgICAgICAg ICAgICB9XSkpCisgICAgICAgICAgICB9LAorICAgICAgICAgICAgZnVuY3Rpb24gKGVyciwgcmVz dWx0cykgeworICAgICAgICAgICAgICAgIGNhbGxiYWNrLmFwcGx5KHRoYXQsIFtlcnJdLmNvbmNh dChyZXN1bHRzKSk7CisgICAgICAgICAgICB9KTsKKyAgICAgICAgfTsKKyAgICB9OworCisgICAg YXN5bmMuY29tcG9zZSA9IGZ1bmN0aW9uICgvKiBmdW5jdGlvbnMuLi4gKi8pIHsKKyAgICAgIHJl dHVybiBhc3luYy5zZXEuYXBwbHkobnVsbCwgQXJyYXkucHJvdG90eXBlLnJldmVyc2UuY2FsbChh cmd1bWVudHMpKTsKKyAgICB9OworCisgICAgdmFyIF9hcHBseUVhY2ggPSBmdW5jdGlvbiAoZWFj aGZuLCBmbnMgLyphcmdzLi4uKi8pIHsKKyAgICAgICAgdmFyIGdvID0gZnVuY3Rpb24gKCkgewor ICAgICAgICAgICAgdmFyIHRoYXQgPSB0aGlzOworICAgICAgICAgICAgdmFyIGFyZ3MgPSBBcnJh eS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMpOworICAgICAgICAgICAgdmFyIGNhbGxi YWNrID0gYXJncy5wb3AoKTsKKyAgICAgICAgICAgIHJldHVybiBlYWNoZm4oZm5zLCBmdW5jdGlv biAoZm4sIGNiKSB7CisgICAgICAgICAgICAgICAgZm4uYXBwbHkodGhhdCwgYXJncy5jb25jYXQo W2NiXSkpOworICAgICAgICAgICAgfSwKKyAgICAgICAgICAgIGNhbGxiYWNrKTsKKyAgICAgICAg fTsKKyAgICAgICAgaWYgKGFyZ3VtZW50cy5sZW5ndGggPiAyKSB7CisgICAgICAgICAgICB2YXIg YXJncyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3VtZW50cywgMik7CisgICAgICAg ICAgICByZXR1cm4gZ28uYXBwbHkodGhpcywgYXJncyk7CisgICAgICAgIH0KKyAgICAgICAgZWxz ZSB7CisgICAgICAgICAgICByZXR1cm4gZ287CisgICAgICAgIH0KKyAgICB9OworICAgIGFzeW5j LmFwcGx5RWFjaCA9IGRvUGFyYWxsZWwoX2FwcGx5RWFjaCk7CisgICAgYXN5bmMuYXBwbHlFYWNo U2VyaWVzID0gZG9TZXJpZXMoX2FwcGx5RWFjaCk7CisKKyAgICBhc3luYy5mb3JldmVyID0gZnVu Y3Rpb24gKGZuLCBjYWxsYmFjaykgeworICAgICAgICBmdW5jdGlvbiBuZXh0KGVycikgeworICAg ICAgICAgICAgaWYgKGVycikgeworICAgICAgICAgICAgICAgIGlmIChjYWxsYmFjaykgeworICAg ICAgICAgICAgICAgICAgICByZXR1cm4gY2FsbGJhY2soZXJyKTsKKyAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgICAgdGhyb3cgZXJyOworICAgICAgICAgICAgfQorICAgICAgICAgICAg Zm4obmV4dCk7CisgICAgICAgIH0KKyAgICAgICAgbmV4dCgpOworICAgIH07CisKKyAgICAvLyBO b2RlLmpzCisgICAgaWYgKHR5cGVvZiBtb2R1bGUgIT09ICd1bmRlZmluZWQnICYmIG1vZHVsZS5l eHBvcnRzKSB7CisgICAgICAgIG1vZHVsZS5leHBvcnRzID0gYXN5bmM7CisgICAgfQorICAgIC8v IEFNRCAvIFJlcXVpcmVKUworICAgIGVsc2UgaWYgKHR5cGVvZiBkZWZpbmUgIT09ICd1bmRlZmlu ZWQnICYmIGRlZmluZS5hbWQpIHsKKyAgICAgICAgZGVmaW5lKFtdLCBmdW5jdGlvbiAoKSB7Cisg ICAgICAgICAgICByZXR1cm4gYXN5bmM7CisgICAgICAgIH0pOworICAgIH0KKyAgICAvLyBpbmNs dWRlZCBkaXJlY3RseSB2aWEgPHNjcmlwdD4gdGFnCisgICAgZWxzZSB7CisgICAgICAgIHJvb3Qu YXN5bmMgPSBhc3luYzsKKyAgICB9CisKK30oKSk7CmRpZmYgLS1naXQgYS9wYWNrYWdlcy9jb250 ZXh0LWNvbG9yaW5nL2JlbmNobWFyay9maXh0dXJlcy9qcXVlcnktMi4xLjEuanMgYi9wYWNrYWdl cy9jb250ZXh0LWNvbG9yaW5nL2JlbmNobWFyay9maXh0dXJlcy9qcXVlcnktMi4xLjEuanMKbmV3 IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uOWY3YjNkMwotLS0gL2Rldi9udWxsCisr KyBiL3BhY2thZ2VzL2NvbnRleHQtY29sb3JpbmcvYmVuY2htYXJrL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ZXJ5Lm9yZy9saWNlbnNlCisgKgorICogRGF0ZTogMjAxNC0wNC0xOAorICov CisoZnVuY3Rpb24oIHdpbmRvdyApIHsKKwordmFyIGksCisJc3VwcG9ydCwKKwlFeHByLAorCWdl dFRleHQsCisJaXNYTUwsCisJdG9rZW5pemUsCisJY29tcGlsZSwKKwlzZWxlY3QsCisJb3V0ZXJt b3N0Q29udGV4dCwKKwlzb3J0SW5wdXQsCisJaGFzRHVwbGljYXRlLAorCisJLy8gTG9jYWwgZG9j dW1lbnQgdmFycworCXNldERvY3VtZW50LAorCWRvY3VtZW50LAorCWRvY0VsZW0sCisJZG9jdW1l bnRJc0hUTUwsCisJcmJ1Z2d5UVNBLAorCXJidWdneU1hdGNoZXMsCisJbWF0Y2hlcywKKwljb250 YWlucywKKworCS8vIEluc3RhbmNlLXNwZWNpZmljIGRhdGEKKwlleHBhbmRvID0gInNpenpsZSIg KyAtKG5ldyBEYXRlKCkpLAorCXByZWZlcnJlZERvYyA9IHdpbmRvdy5kb2N1bWVudCwKKwlkaXJy dW5zID0gMCwKKwlkb25lID0gMCwKKwljbGFzc0NhY2hlID0gY3JlYXRlQ2FjaGUoKSwKKwl0b2tl bkNhY2hlID0gY3JlYXRlQ2FjaGUoKSwKKwljb21waWxlckNhY2hlID0gY3JlYXRlQ2FjaGUoKSwK Kwlzb3J0T3JkZXIgPSBmdW5jdGlvbiggYSwgYiApIHsKKwkJaWYgKCBhID09PSBiICkgeworCQkJ aGFzRHVwbGljYXRlID0gdHJ1ZTsKKwkJfQorCQlyZXR1cm4gMDsKKwl9LAorCisJLy8gR2VuZXJh bC1wdXJwb3NlIGNvbnN0YW50cworCXN0cnVuZGVmaW5lZCA9IHR5cGVvZiB1bmRlZmluZWQsCisJ TUFYX05FR0FUSVZFID0gMSA8PCAzMSwKKworCS8vIEluc3RhbmNlIG1ldGhvZHMKKwloYXNPd24g PSAoe30pLmhhc093blByb3BlcnR5LAorCWFyciA9IFtdLAorCXBvcCA9IGFyci5wb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X0KKwl9KTsKK30KKworcmV0dXJuIFNpenpsZTsKKworfSkoIHdpbmRvdyApOwor CisKKworalF1ZXJ5LmZpbmQgPSBTaXp6bGU7CitqUXVlcnkuZXhwciA9IFNpenpsZS5zZWxlY3Rv cnM7CitqUXVlcnkuZXhwclsiOiJdID0galF1ZXJ5LmV4cHIucHNldWRvczsKK2pRdWVyeS51bmlx dWUgPSBTaXp6bGUudW5pcXVlU29ydDsKK2pRdWVyeS50ZXh0ID0gU2l6emxlLmdldFRleHQ7Citq UXVlcnkuaXNYTUxEb2MgPSBTaXp6bGUuaXNYTUw7CitqUXVlcnkuY29udGFpbnMgPSBTaXp6bGUu Y29udGFpbnM7CisKKworCit2YXIgcm5lZWRzQ29udGV4dCA9IGpRdWVyeS5leHByLm1hdGNoLm5l ZWRzQ29udGV4dDsKKwordmFyIHJzaW5nbGVUYWcgPSAoL148KFx3KylccypcLz8+KD86PFwvXDE+ fCkkLyk7CisKKworCit2YXIgcmlzU2ltcGxlID0gL14uW146I1xbXC4sXSokLzsKKworLy8gSW1w bGVtZW50IHRoZSBpZGVudGljYWwgZnVuY3Rpb25hbGl0eSBmb3IgZmlsdGVyIGFuZCBub3QKK2Z1 bmN0aW9uIHdpbm5vdyggZWxlbWVudHMsIHF1YWxpZmllciwgbm90ICkgeworCWlmICggalF1ZXJ5 LmlzRnVuY3Rpb24oIHF1YWxpZmllciApICkgeworCQlyZXR1cm4galF1ZXJ5LmdyZXAoIGVsZW1l bnRzLCBmdW5jdGlvbiggZWxlbSwgaSApIHsKKwkJCS8qIGpzaGludCAtVzAxOCAqLworCQkJcmV0 dXJuICEhcXVhbGlmaWVyLmNhbGwoIGVsZW0sIGksIGVsZW0gKSAhPT0gbm90OworCQl9KTsKKwor CX0KKworCWlmICggcXVhbGlmaWVyLm5vZGVUeXBlICkgeworCQlyZXR1cm4galF1ZXJ5LmdyZXAo IGVsZW1lbnRzLCBmdW5jdGlvbiggZWxlbSApIHsKKwkJCXJldHVybiAoIGVsZW0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HVudGlsICE9PSB1bmRlZmluZWQ7CisKKwkJd2hpbGUgKCAoZWxlbSA9IGVsZW1b IGRpciBdKSAmJiBlbGVtLm5vZGVUeXBlICE9PSA5ICkgeworCQkJaWYgKCBlbGVtLm5vZGVUeXBl ID09PSAxICkgeworCQkJCWlmICggdHJ1bmNhdGUgJiYgalF1ZXJ5KCBlbGVtICkuaXMoIHVudGls ICkgKSB7CisJCQkJCWJyZWFrOworCQkJCX0KKwkJCQltYXRjaGVkLnB1c2goIGVsZW0gKTsKKwkJ CX0KKwkJfQorCQlyZXR1cm4gbWF0Y2hlZDsKKwl9LAorCisJc2libGluZzogZnVuY3Rpb24oIG4s IGVsZW0gKSB7CisJCXZhciBtYXRjaGVkID0gW107CisKKwkJZm9yICggOyBuOyBuID0gbi5uZXh0 U2libGluZyApIHsKKwkJCWlmICggbi5ub2RlVHlwZSA9PT0gMSAmJiBuICE9PSBlbGVtICkgewor CQkJCW1hdGNoZWQucHVzaCggbiApOworCQkJfQorCQl9CisKKwkJcmV0dXJuIG1hdGNoZWQ7CisJ fQorfSk7CisKK2pRdWVyeS5mbi5leHRlbmQoeworCWhhczogZnVuY3Rpb24oIHRhcmdldCApIHsK KwkJdmFyIHRhcmdldHMgPSBqUXVlcnkoIHRhcmdldCwgdGhpcyApLAorCQkJbCA9IHRhcmdldHMu bGVuZ3RoOworCisJCXJldHVybiB0aGlzLmZpbHRlcihmdW5jdGlvbigpIHsKKwkJCXZhciBpID0g MDsKKwkJCWZvciAoIDsgaSA8IGw7IGkrKyApIHsKKwkJCQlpZiAoIGpRdWVyeS5jb250YWlucygg dGhpcywgdGFyZ2V0c1tpXSApICkgeworCQkJCQlyZXR1cm4gdHJ1ZTsKKwkJCQl9CisJCQl9CisJ CX0pOworCX0sCisKKwljbG9zZXN0OiBmdW5jdGlvbiggc2VsZWN0b3JzLCBjb250ZXh0ICkgewor CQl2YXIgY3VyLAorCQkJaSA9IDAsCisJCQlsID0gdGhpcy5sZW5ndGgsCisJCQltY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HRoaXMubGVuZ3RoLAorCQkJcmVzb2x2ZSA9IGZ1 bmN0aW9uKCkgeworCQkJCWlmICggISggLS1jb3VudCApICkgeworCQkJCQlkZWZlci5yZXNvbHZl V2l0aCggZWxlbWVudHMsIFsgZWxlbWVudHMgXSApOworCQkJCX0KKwkJCX07CisKKwkJaWYgKCB0 eXBlb2YgdHlwZSAhPT0gInN0cmluZyIgKSB7CisJCQlvYmogPSB0eXBlOworCQkJdHlwZSA9IHVu ZGVmaW5lZDsKKwkJfQorCQl0eXBlID0gdHlwZSB8fCAiZngiOworCisJCXdoaWxlICggaS0tICkg eworCQkJdG1wID0gZGF0YV9wcml2LmdldCggZWxlbWVudHNbIGkgXSwgdHlwZSArICJxdWV1ZUhv b2tzIiApOworCQkJaWYgKCB0bXAgJiYgdG1wLmVtcHR5ICkgeworCQkJCWNvdW50Kys7CisJCQkJ dG1wLmVtcHR5LmFkZCggcmVzb2x2ZSApOworCQkJfQorCQl9CisJCXJlc29sdmUoKTsKKwkJcmV0 dXJuIGRlZmVyLnByb21pc2UoIG9iaiApOworCX0KK30pOwordmFyIHBudW0gPSAoL1srLV0/KD86 XGQqXC58KVxkKyg/OltlRV1bKy1dP1xkK3wpLykuc291cmNlOworCit2YXIgY3NzRXhwYW5kID0g WyAiVG9wIiwgIlJpZ2h0IiwgIkJvdHRvbSIsICJMZWZ0IiBdOworCit2YXIgaXNIaWRkZW4gPSBm dW5jdGlvbiggZWxlbSwgZWwgKSB7CisJCS8vIGlzSGlkZGVuIG1pZ2h0IGJlIGNhbGxlZCBmcm9t IGpRdWVyeSNmaWx0ZXIgZnVuY3Rpb247CisJCS8vIGluIHRoYXQgY2FzZSwgZWxlbWVudCB3aWxs IGJlIHNlY29uZCBhcmd1bWVudAorCQllbGVtID0gZWwgfHwgZWxlbTsKKwkJcmV0dXJuIGpRdWVy eS5jc3MoIGVsZW0sICJkaXNwbGF5IiApID09PSAibm9uZSIgfHwgIWpRdWVyeS5jb250YWlucygg ZWxlbS5vd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worCQlyZXR1cm4gdGhpczsKKwl9LAorCisJ d3JhcElubmVyOiBmdW5jdGlvbiggaHRtbCApIHsKKwkJaWYgKCBqUXVlcnkuaXNGdW5jdGlvbigg aHRtbCApICkgeworCQkJcmV0dXJuIHRoaXMuZWFjaChmdW5jdGlvbiggaSApIHsKKwkJCQlqUXVl cnkoIHRoaXMgKS53cmFwSW5uZXIoIGh0bWwuY2FsbCh0aGlzLCBpKSApOworCQkJfSk7CisJCX0K KworCQlyZXR1cm4gdGhpcy5lYWNoKGZ1bmN0aW9uKCkgeworCQkJdmFyIHNlbGYgPSBqUXVlcnko IHRoaXMgKSwKKwkJCQljb250ZW50cyA9IHNlbGYuY29udGVudHMoKTsKKworCQkJaWYgKCBjb250 ZW50cy5sZW5ndGggKSB7CisJCQkJY29udGVudHMud3JhcEFsbCggaHRtbCApOworCisJCQl9IGVs c2UgeworCQkJCXNlbGYuYXBwZW5kKCBodG1sICk7CisJCQl9CisJCX0pOworCX0sCisKKwl3cmFw OiBmdW5jdGlvbiggaHRtbCApIHsKKwkJdmFyIGlzRnVuY3Rpb24gPSBqUXVlcnkuaXNGdW5jdGlv biggaHRtbCApOworCisJCXJldHVybiB0aGlzLmVhY2goZnVuY3Rpb24oIGkgKSB7CisJCQlqUXVl cnkoIHRoaXMgKS53cmFwQWxsKCBpc0Z1bmN0aW9uID8gaHRtbC5jYWxsKHRoaXMsIGkpIDogaHRt bCApOworCQl9KTsKKwl9LAorCisJdW53cmFwOiBmdW5jdGlvbigpIHsKKwkJcmV0dXJuIHRoaXMu cGFyZW50KCkuZWFjaChmdW5jdGlvbigpIHsKKwkJCWlmICggIWpRdWVyeS5ub2RlTmFtZSggdGhp cywgImJvZHkiICkgKSB7CisJCQkJalF1ZXJ5KCB0aGlzICkucmVwbGFjZVdpdGgoIHRoaXMuY2hp bGROb2RlcyApOworCQkJfQorCQl9KS5lbmQoKTsKKwl9Cit9KTsKKworCitqUXVlcnkuZXhwci5m aWx0ZXJzLmhpZGRlbiA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WlmICggY2FsbGJhY2sgKSB7CisJCQkJCWNh bGxiYWNrKCk7CisJCQkJfQorCQkJfQorCQl9OworCX0KK30pOworCisKKworCit2YXIgb2xkQ2Fs bGJhY2tzID0gW10sCisJcmpzb25wID0gLyg9KVw/KD89JnwkKXxcP1w/LzsKKworLy8gRGVmYXVs dCBqc29ucCBzZXR0aW5ncworalF1ZXJ5LmFqYXhTZXR1cCh7CisJanNvbnA6ICJjYWxsYmFjayIs CisJanNvbnBDYWxsYmFjazogZnVuY3Rpb24oKSB7CisJCXZhciBjYWxsYmFjayA9IG9sZENhbGxi YWNrcy5wb3AoKSB8fCAoIGpRdWVyeS5leHBhbmRvICsgIl8iICsgKCBub25jZSsrICkgKTsKKwkJ dGhpc1sgY2FsbGJhY2sgXSA9IHRydWU7CisJCXJldHVybiBjYWxsYmFjazsKKwl9Cit9KTsKKwor Ly8gRGV0ZWN0LCBub3JtYWxpemUgb3B0aW9ucyBhbmQgaW5zdGFsbCBjYWxsYmFja3MgZm9yIGpz b25wIHJlcXVlc3RzCitqUXVlcnkuYWpheFByZWZpbHRlciggImpzb24ganNvbnAiLCBmdW5jdGlv biggcywgb3JpZ2luYWxTZXR0aW5ncywganFYSFIgKSB7CisKKwl2YXIgY2FsbGJhY2tOYW1lLCBv dmVyd3JpdHRlbiwgcmVzcG9uc2VDb250YWluZXIsCisJCWpzb25Qcm9wID0gcy5qc29ucCAhPT0g ZmFsc2UgJiYgKCByanNvbnAudGVzdCggcy51cmwgKSA/CisJCQkidXJsIiA6CisJCQl0eXBlb2Yg cy5kYXRhID09PSAic3RyaW5nIiAmJiAhKCBzLmNvbnRlbnRUeXBlIHx8ICIiICkuaW5kZXhPZigi YXBwbGljYXRpb24veC13d3ctZm9ybS11cmxlbmNvZGVkIikgJiYgcmpzb25wLnRlc3QoIHMuZGF0 YSApICYmICJkYXRhIgorCQkpOworCisJLy8gSGFuZGxlIGlmZiB0aGUgZXhwZWN0ZWQgZGF0YSB0 eXBlIGlzICJqc29uc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y4KKyAgICoKKyAgICogQHByaXZh dGUKKyAgICogQHBhcmFtIHtBcnJheX0gW2FycmF5PVtdXSBUaGUgYXJyYXkgdG8gc2VhcmNoLgor ICAgKiBAcmV0dXJucyB7bnVsbHxPYmplY3R9IFJldHVybnMgdGhlIGNhY2hlIG9iamVjdCBvciBg bnVsbGAgaWYgY2FjaGluZyBzaG91bGQgbm90IGJlIHVzZWQuCisgICAqLworICBmdW5jdGlvbiBj cmVhdGVDYWNoZShhcnJheSkgeworICAgIHZhciBpbmRleCA9IC0xLAorICAgICAgICBsZW5ndGgg PSBhcnJheS5sZW5ndGgsCisgICAgICAgIGZpcnN0ID0gYXJyYXlbMF0sCisgICAgICAgIG1pZCA9 IGFycmF5WyhsZW5ndGggLyAyKSB8IDBdLAorICAgICAgICBsYXN0ID0gYXJyYXlbbGVuZ3RoIC0g MV07CisKKyAgICBpZiAoZmlyc3QgJiYgdHlwZW9mIGZpcnN0ID09ICdvYmplY3QnICYmCisgICAg ICAgIG1pZCAmJiB0eXBlb2YgbWlkID09ICdvYmplY3QnICYmIGxhc3QgJiYgdHlwZW9mIGxhc3Qg PT0gJ29iamVjdCcpIHsKKyAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisgICAgdmFyIGNhY2hl ID0gZ2V0T2JqZWN0KCk7CisgICAgY2FjaGVbJ2ZhbHNlJ10gPSBjYWNoZVsnbnVsbCddID0gY2Fj aGVbJ3RydWUnXSA9IGNhY2hlWyd1bmRlZmluZWQnXSA9IGZhbHNlOworCisgICAgdmFyIHJlc3Vs dCA9IGdldE9iamVjdCgpOworICAgIHJlc3VsdC5hcnJheSA9IGFycmF5OworICAgIHJlc3VsdC5j YWNoZSA9IGNhY2hlOworICAgIHJlc3VsdC5wdXNoID0gY2FjaGVQdXNoOworCisgICAgd2hpbGUg KCsraW5kZXggPCBsZW5ndGgpIHsKKyAgICAgIHJlc3VsdC5wdXNoKGFycmF5W2luZGV4XSk7Cisg ICAgfQorICAgIHJldHVybiByZXN1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Ag ICdjYWNoZSc6IG51bGwsCisgICAgICAnY3JpdGVyaWEnOiBudWxsLAorICAgICAgJ2ZhbHNlJzog ZmFsc2UsCisgICAgICAnaW5kZXgnOiAwLAorICAgICAgJ251bGwnOiBmYWxzZSwKKyAgICAgICdu dW1iZXInOiBudWxsLAorICAgICAgJ29iamVjdCc6IG51bGwsCisgICAgICAncHVzaCc6IG51bGws CisgICAgICAnc3RyaW5nJzogbnVsbCwKKyAgICAgICd0cnVlJzogZmFsc2UsCisgICAgICAndW5k ZWZpbmVkJzogZmFsc2UsCisgICAgICAndmFsdWUnOiBudWxsCisgICAgfTsKKyAgfQorCisgIC8q KgorICAgKiBSZWxlYXNlcyB0aGUgZ2l2ZW4gYXJyYXkgYmFjayB0byB0aGUgYXJyYXkgcG9vbC4K KyAgICoKKyAgICogQHByaXZhdGUKKyAgICogQHBhcmFtIHtBcnJheX0gW2FycmF5XSBUaGUgYXJy YXkgdG8gcmVsZWFzZS4KKyAgICovCisgIGZ1bmN0aW9uIHJlbGVhc2VBcnJheShhcnJheSkgewor ICAgIGFycmF5Lmxlbmd0aCA9IDA7CisgICAgaWYgKGFycmF5UG9vbC5sZW5ndGggPCBtYXhQb29s U2l6ZSkgeworICAgICAgYXJyYXlQb29sLnB1c2goYXJyYXkpOworICAgIH0KKyAgfQorCisgIC8q KgorICAgKiBSZWxlYXNlcyB0aGUgZ2l2ZW4gb2JqZWN0IGJhY2sgdG8gdGhlIG9iamVjdCBwb29s LgorICAgKgorICAgKiBAcHJpdmF0ZQorICAgKiBAcGFyYW0ge09iamVjdH0gW29iamVjdF0gVGhl IG9iamVjdCB0byByZWxlYXNlLgorICAgKi8KKyAgZnVuY3Rpb24gcmVsZWFzZU9iamVjdChvYmpl Y3QpIHsKKyAgICB2YXIgY2FjaGUgPSBvYmplY3QuY2FjaGU7CisgICAgaWYgKGNhY2hlKSB7Cisg ICAgICByZWxlYXNlT2JqZWN0KGNhY2hlKTsKKyAgICB9CisgICAgb2JqZWN0LmFyc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GxpdGVyYWxzIG11c3QgdXNlIGJ1aWx0 LWluIGNvbnN0cnVjdG9ycy4KKyAgICAvLyBTZWUgaHR0cDovL2VzNS5naXRodWIuaW8vI3gxMS4x LjUuCisgICAgY29udGV4dCA9IGNvbnRleHQgPyBfLmRlZmF1bHRzKHJvb3QuT2JqZWN0KCksIGNv bnRleHQsIF8ucGljayhyb290LCBjb250ZXh0UHJvcHMpKSA6IHJvb3Q7CisKKyAgICAvKiogTmF0 aXZlIGNvbnN0cnVjdG9yIHJlZmVyZW5jZXMgKi8KKyAgICB2YXIgQXJyYXkgPSBjb250ZXh0LkFy cmF5LAorICAgICAgICBCb29sZWFuID0gY29udGV4dC5Cb29sZWFuLAorICAgICAgICBEYXRlID0g Y29udGV4dC5EYXRlLAorICAgICAgICBGdW5jdGlvbiA9IGNvbnRleHQuRnVuY3Rpb24sCisgICAg ICAgIE1hdGggPSBjb250ZXh0Lk1hdGgsCisgICAgICAgIE51bWJlciA9IGNvbnRleHQuTnVtYmVy LAorICAgICAgICBPYmplY3QgPSBjb250ZXh0Lk9iamVjdCwKKyAgICAgICAgUmVnRXhwID0gY29u dGV4dC5SZWdFeHAsCisgICAgICAgIFN0cmluZyA9IGNvbnRleHQuU3RyaW5nLAorICAgICAgICBU eXBlRXJyb3IgPSBjb250ZXh0LlR5cGVFcnJvcjsKKworICAgIC8qKgorICAgICAqIFVzZWQgZm9y IGBBcnJheWAgbWV0aG9kIHJlZmVyZW5jZXMuCisgICAgICoKKyAgICAgKiBOb3JtYWxseSBgQXJy YXkucHJvdG90eXBlYCB3b3VsZCBzdWZmaWNlLCBob3dldmVyLCB1c2luZyBhbiBhcnJheSBsaXRl cmFsCisgICAgICogYXZvaWRzIGlzc3VlcyBpbiBOYXJ3aGFsLgorICAgICAqLworICAgIHZhciBh cnJheVJlZiA9IFtdOworCisgICAgLyoqIFVzZWQgZm9yIG5hdGl2ZSBtZXRob2QgcmVmZXJlbmNl cyAqLworICAgIHZhciBvYmplY3RQcm90byA9IE9iamVjdC5wcm90b3R5cGU7CisKKyAgICAvKiog VXNlZCB0byByZXN0b3JlIHRoZSBvcmlnaW5hbCBgX2AgcmVmZXJlbmNlIGluIGBub0NvbmZsaWN0 YCAqLworICAgIHZhciBvbGREYXNoID0gY29udGV4dC5fOworCisgICAgLyoqIFVzZWQgdG8gcmVz b2x2ZSB0aGUgaW50ZXJuYWwgW1tDbGFzc11dIG9mIHZhbHVlcyAqLworICAgIHZhciB0b1N0cmlu ZyA9IG9iamVjdFByb3RvLnRvU3RyaW5nOworCisgICAgLyoqIFVzZWQgdG8gZGV0ZWN0IGlmIGEg bWV0aG9kIGlzIG5hdGl2ZSAqLworICAgIHZhciByZU5hdGl2ZSA9IFJlZ0V4cCgnXicgKworICAg ICAgU3RyaW5nKHRvU3RyaW5nKQorICAgICAgICAucmVwbGFjZSgvWy4qKz9eJHt9KCl8W1xdXFxd L2csICdcXCQmJykKKyAgICAgICAgLnJlcGxhY2UoL3RvU3RyaW5nfCBmb3IgW15cXV0rL2csICcu Kj8nKSArICckJworICAgICk7CisKKyAgICAvKiogTmF0aXZlIG1ldGhvZCBzaG9ydGN1dHMgKi8K KyAgICB2YXIgY2VpbCA9IE1hdGguY2VpbCwKKyAgICAgICAgY2xlYXJUaW1lb3V0ID0gY29udGV4 dC5jbGVhclRpbWVvdXQsCisgICAgICAgIGZsb29yID0gTWF0aC5mbG9vciwKKyAgICAgICAgZm5U b1N0cmluZyA9IEZ1bmN0aW9uLnByb3RvdHlwZS50b1N0cmluZywKKyAgICAgICAgZ2V0UHJvdG90 eXBlT2YgPSBpc05hdGl2ZShnZXRQcm90b3R5cGVPZiA9IE9iamVjdC5nZXRQcm90b3R5cGVPZikg JiYgZ2V0UHJvdG90eXBlT2YsCisgICAgICAgIGhhc093blByb3BlcnR5ID0gb2JqZWN0UHJvdG8u aGFzT3duUHJvcGVydHksCisgICAgICAgIHB1c2ggPSBhcnJheVJlZi5wdXNoLAorICAgICAgICBz ZXRUaW1lb3V0ID0gY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MudGVzdChydW5JbkNvbnRl eHQpOworCisgICAgLyoqCisgICAgICogRGV0ZWN0IGlmIGBGdW5jdGlvbiNuYW1lYCBpcyBzdXBw b3J0ZWQgKGFsbCBidXQgSUUpLgorICAgICAqCisgICAgICogQG1lbWJlck9mIF8uc3VwcG9ydAor ICAgICAqIEB0eXBlIGJvb2xlYW4KKyAgICAgKi8KKyAgICBzdXBwb3J0LmZ1bmNOYW1lcyA9IHR5 cGVvZiBGdW5jdGlvbi5uYW1lID09ICdzdHJpbmcnOworCisgICAgLyoqCisgICAgICogQnkgZGVm YXVsdCwgdGhlIHRlbXBsYXRlIGRlbGltaXRlcnMgdXNlZCBieSBMby1EYXNoIGFyZSBzaW1pbGFy IHRvIHRob3NlIGluCisgICAgICogZW1iZWRkZWQgUnVieSAoRVJCKS4gQ2hhbmdlIHRoZSBmb2xs b3dpbmcgdGVtcGxhdGUgc2V0dGluZ3MgdG8gdXNlIGFsdGVybmF0aXZlCisgICAgICogZGVsaW1p dGVycy4KKyAgICAgKgorICAgICAqIEBzdGF0aWMKKyAgICAgKiBAbWVtYmVyT2YgXworICAgICAq IEB0eXBlIE9iamVjdAorICAgICAqLworICAgIGxvZGFzaC50ZW1wbGF0ZVNldHRpbmdzID0gewor CisgICAgICAvKioKKyAgICAgICAqIFVzZWQgdG8gZGV0ZWN0IGBkYXRhYCBwcm9wZXJ0eSB2YWx1 ZXMgdG8gYmUgSFRNTC1lc2NhcGVkLgorICAgICAgICoKKyAgICAgICAqIEBtZW1iZXJPZiBfLnRl bXBsYXRlU2V0dGluZ3MKKyAgICAgICAqIEB0eXBlIFJlZ0V4cAorICAgICAgICovCisgICAgICAn ZXNjYXBlJzogLzwlLShbXHNcU10rPyklPi9nLAorCisgICAgICAvKioKKyAgICAgICAqIFVzZWQg dG8gZGV0ZWN0IGNvZGUgdG8gYmUgZXZhbHVhdGVkLgorICAgICAgICoKKyAgICAgICAqIEBtZW1i ZXJPZiBfLnRlbXBsYXRlU2V0dGluZ3MKKyAgICAgICAqIEB0eXBlIFJlZ0V4cAorICAgICAgICov CisgICAgICAnZXZhbHVhdGUnOiAvPCUoW1xzXFNdKz8pJT4vZywKKworICAgICAgLyoqCisgICAg ICAgKiBVc2VkIHRvIGRldGVjdCBgZGF0YWAgcHJvcGVydHkgdmFsdWVzIHRvIGluamVjdC4KKyAg ICAgICAqCisgICAgICAgKiBAbWVtYmVyT2YgXy50ZW1wbGF0ZVNldHRpbmdzCisgICAgICAgKiBA dHlwZSBSZWdFeHAKKyAgICAgICAqLworICAgICAgJ2ludGVycG9sYXRlJzogcmVJbnRlcnBvbGF0 ZSwKKworICAgICAgLyoqCisgICAgICAgKiBVc2VkIHRvIHJlZmVyZW5jZSB0aGUgZGF0YSBvYmpl Y3QgaW4gdGhlIHRlbXBsYXRlIHRleHQuCisgICAgICAgKgorICAgICAgICogQG1lbWJlck9mIF8u dGVtcGxhdGVTZXR0aW5ncworICAgICAgICogQHR5cGUgc3RyaW5nCisgICAgICAgKi8KKyAgICAg ICd2YXJpYWJsZSc6ICcnLAorCisgICAgICAvKioKKyAgICAgICAqIFVzZWQgdG8gaW1wb3J0IHZh cmlhYmxlcyBpbnRvIHRoZSBjb21waWxlZCB0ZW1wbGF0ZS4KKyAgICAgICAqCisgICAgICAgKiBA bWVtYmVyT2YgXy50ZW1wbGF0ZVNldHRpbmdzCisgICAgICAgKiBAdHlwZSBPYmplY3QKKyAgICAg ICAqLworICAgICAgJ2ltcG9ydHMnOiB7CisKKyAgICAgICAgLyoqCisgICAgICAgICAqIEEgcmVm ZXJlbmNlIHRvIHRoZSBgbG9kYXNoYCBmdW5jdGlvbi4KKyAgICAgICAgICoKKyAgICAgICAgICog QG1lbWJlck9mIF8udGVtcGxhdGVTZXR0aW5ncy5pbXBvcnRzCisgICAgICAgICAqIEB0eXBlIEZ1 bmN0aW9uCisgICAgICAgICAqLworICAgICAgICAnXyc6IGxvZGFzaAorICAgICAgfQorICAgIH07 CisKKyAgICAvKi0tLS0tLS0tLS0tL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PSBz bGljZShwYXJ0aWFsQXJncyk7CisgICAgICAgICAgcHVzaC5hcHBseShhcmdzLCBhcmd1bWVudHMp OworICAgICAgICB9CisgICAgICAgIC8vIG1pbWljIHRoZSBjb25zdHJ1Y3RvcidzIGByZXR1cm5g IGJlaGF2aW9yCisgICAgICAgIC8vIGh0dHA6Ly9lczUuZ2l0aHViLmlvLyN4MTMuMi4yCisgICAg ICAgIGlmICh0aGlzIGluc3RhbmNlb2YgYm91bmQpIHsKKyAgICAgICAgICAvLyBlbnN1cmUgYG5l dyBib3VuZGAgaXMgYW4gaW5zdGFuY2Ugb2YgYGZ1bmNgCisgICAgICAgICAgdmFyIHRoaXNCaW5k aW5nID0gYmFzZUNyZWF0ZShmdW5jLnByb3RvdHlwZSksCisgICAgICAgICAgICAgIHJlc3VsdCA9 IGZ1bmMuYXBwbHkodGhpc0JpbmRpbmcsIGFyZ3MgfHwgYXJndW1lbnRzKTsKKyAgICAgICAgICBy ZXR1cm4gaXNPYmplY3QocmVzdWx0KSA/IHJlc3VsdCA6IHRoaXNCaW5kaW5nOworICAgICAgICB9 CisgICAgICAgIHJldHVybiBmdW5jLmFwcGx5KHRoaXNBcmcsIGFyZ3MgfHwgYXJndW1lbnRzKTsK KyAgICAgIH0KKyAgICAgIHNldEJpbmREYXRhKGJvdW5kLCBiaW5kRGF0YSk7CisgICAgICByZXR1 cm4gYm91bmQ7CisgICAgfQorCisgICAgLyoqCisgICAgICogVGhlIGJhc2UgaW1wbGVtZW50YXRp b24gb2YgYF8uY2xvbmVgIHdpdGhvdXQgYXJndW1lbnQganVnZ2xpbmcgb3Igc3VwcG9ydAorICAg ICAqIGZvciBgdGhpc0FyZ2AgYmluZGluZy4KKyAgICAgKgorICAgICAqIEBwcml2YXRlCisgICAg ICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFsdWUgdG8gY2xvbmUuCisgICAgICogQHBhcmFtIHti b29sZWFufSBbaXNEZWVwPWZhbHNlXSBTcGVjaWZ5IGEgZG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orICAgICAgICAgIGNhc2UgZGF0ZUNsYXNzOgorICAgICAgICAgICAgcmV0dXJuIG5ldyBj dG9yKCt2YWx1ZSk7CisKKyAgICAgICAgICBjYXNlIG51bWJlckNsYXNzOgorICAgICAgICAgIGNh c2Ugc3RyaW5nQ2xhc3M6CisgICAgICAgICAgICByZXR1cm4gbmV3IGN0b3IodmFsdWUpOworCisg ICAgICAgICAgY2FzZSByZWdleHBDbGFzczoKKyAgICAgICAgICAgIHJlc3VsdCA9IGN0b3IodmFs dWUuc291cmNlLCByZUZsYWdzLmV4ZWModmFsdWUpKTsKKyAgICAgICAgICAgIHJlc3VsdC5sYXN0 SW5kZXggPSB2YWx1ZS5sYXN0SW5kZXg7CisgICAgICAgICAgICByZXR1cm4gcmVzdWx0OworICAg ICAgICB9CisgICAgICB9IGVsc2UgeworICAgICAgICByZXR1cm4gdmFsdWU7CisgICAgICB9Cisg ICAgICB2YXIgaXNBcnIgPSBpc0FycmF5KHZhbHVlKTsKKyAgICAgIGlmIChpc0RlZXApIHsKKyAg ICAgICAgLy8gY2hlY2sgZm9yIGNpcmN1bGFyIHJlZmVyZW5jZXMgYW5kIHJldHVybiBjb3JyZXNw b25kaW5nIGNsb25lCisgICAgICAgIHZhciBpbml0ZWRTdGFjayA9ICFzdGFja0E7CisgICAgICAg IHN0YWNrQSB8fCAoc3RhY2tBID0gZ2V0QXJyYXkoKSk7CisgICAgICAgIHN0YWNrQiB8fCAoc3Rh Y2tCID0gZ2V0QXJyYXkoKSk7CisKKyAgICAgICAgdmFyIGxlbmd0aCA9IHN0YWNrQS5sZW5ndGg7 CisgICAgICAgIHdoaWxlIChsZW5ndGgtLSkgeworICAgICAgICAgIGlmIChzdGFja0FbbGVuZ3Ro XSA9PSB2YWx1ZSkgeworICAgICAgICAgICAgcmV0dXJuIHN0YWNrQltsZW5ndGhdOworICAgICAg ICAgIH0KKyAgICAgICAgfQorICAgICAgICByZXN1bHQgPSBpc0FyciA/IGN0b3IodmFsdWUubGVu Z3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IGNhbGxiYWNrLCBzdGFja0EsIHN0 YWNrQik7CisgICAgICB9KTsKKworICAgICAgaWYgKGluaXRlZFN0YWNrKSB7CisgICAgICAgIHJl bGVhc2VBcnJheShzdGFja0EpOworICAgICAgICByZWxlYXNlQXJyYXkoc3RhY2tCKTsKKyAgICAg IH0KKyAgICAgIHJldHVybiByZXN1bHQ7CisgICAgfQorCisgICAgLyoqCisgICAgICogVGhlIGJh c2UgaW1wbGVtZW50YXRpb24gb2YgYF8uY3JlYXRlYCB3aXRob3V0IHN1cHBvcnQgZm9yIGFzc2ln bmluZworICAgICAqIHByb3BlcnRpZXMgdG8gdGhlIGNyZWF0ZWQgb2JqZWN0LgorICAgICAqCisg ICAgICogQHByaXZhdGUKKyAgICAgKiBAcGFyYW0ge09iamVjdH0gcHJvdG90eXBlIFRoZSBvYmpl Y3QgdG8gaW5oZXJpdCBmcm9tLgorICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgdGhl IG5ldyBvYmplY3QuCisgICAgICovCisgICAgZnVuY3Rpb24gYmFzZUNyZWF0ZShwcm90b3R5cGUs IHByb3BlcnRpZXMpIHsKKyAgICAgIHJldHVybiBpc09iamVjdChwcm90b3R5cGUpID8gbmF0aXZl Q3JlYXRlKHByb3RvdHlwZSkgOiB7fTsKKyAgICB9CisgICAgLy8gZmFsbGJhY2sgZm9yIGJyb3dz ZXJzIHdpdGhvdXQgYE9iamVjdC5jcmVhdGVgCisgICAgaWYgKCFuYXRpdmVDcmVhdGUpIHsKKyAg ICAgIGJhc2VDcmVhdGUgPSAoZnVuY3Rpb24oKSB7CisgICAgICAgIGZ1bmN0aW9uIE9iamVjdCgp IHt9CisgICAgICAgIHJldHVybiBmdW5jdGlvbihwcm90b3R5cGUpIHsKKyAgICAgICAgICBpZiAo aXNPYmplY3QocHJvdG90eXBlKSkgeworICAgICAgICAgICAgT2JqZWN0LnByb3RvdHlwZSA9IHBy b3RvdHlwZTsKKyAgICAgICAgICAgIHZhciByZXN1b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YgdGhpc0FyZyA9PSAndW5kZWZpbmVkJyB8fCAhKCdwcm90b3R5cGUnIGluIGZ1bmMpKSB7 CisgICAgICAgIHJldHVybiBmdW5jOworICAgICAgfQorICAgICAgdmFyIGJpbmREYXRhID0gZnVu Yy5fX2JpbmREYXRhX187CisgICAgICBpZiAodHlwZW9mIGJpbmREYXRhID09ICd1bmRlZmluZWQn KSB7CisgICAgICAgIGlmIChzdXBwb3J0LmZ1bmNOYW1lcykgeworICAgICAgICAgIGJpbmREYXRh ID0gIWZ1bmMubmFtZTsKKyAgICAgICAgfQorICAgICAgICBiaW5kRGF0YSA9IGJpbmREYXRhIHx8 ICFzdXBwb3J0LmZ1bmNEZWNvbXA7CisgICAgICAgIGlmICghYmluZERhdGEpIHsKKyAgICAgICAg ICB2YXIgc291cmNlID0gZm5Ub1N0cmluZy5jYWxsKGZ1bmMpOworICAgICAgICAgIGlmICghc3Vw cG9ydC5mdW5jTmFtZXMpIHsKKyAgICAgICAgICAgIGJpbmREYXRhID0gIXJlRnVuY05hbWUudGVz dChzb3VyY2UpOworICAgICAgICAgIH0KKyAgICAgICAgICBpZiAoIWJpbmREYXRhKSB7CisgICAg ICAgICAgICAvLyBjaGVja3MgaWYgYGZ1bmNgIHJlZmVyZW5jZXMgdGhlIGB0aGlzYCBrZXl3b3Jk IGFuZCBzdG9yZXMgdGhlIHJlc3VsdAorICAgICAgICAgICAgYmluZERhdGEgPSByZVRoaXMudGVz dChzb3VyY2UpOworICAgICAgICAgICAgc2V0QmluZERhdGEoZnVuYywgYmluZERhdGEpOworICAg ICAgICAgIH0KKyAgICAgICAgfQorICAgICAgfQorICAgICAgLy8gZXhpdCBlYXJseSBpZiB0aGVy ZSBhcmUgbm8gYHRoaXNgIHJlZmVyZW5jZXMgb3IgYGZ1bmNgIGlzIGJvdW5kCisgICAgICBpZiAo YmluZERhdGEgPT09IGZhbHNlIHx8IChiaW5kRGF0YSAhPT0gdHJ1ZSAmJiBiaW5kRGF0YVsxXSAm IDEpKSB7CisgICAgICAgIHJldHVybiBmdW5jOworICAgICAgfQorICAgICAgc3dpdGNoIChhcmdD b3VudCkgeworICAgICAgICBjYXNlIDE6IHJldHVybiBmdW5jdGlvbih2YWx1ZSkgeworICAgICAg ICAgIHJldHVybiBmdW5jLmNhbGwodGhpc0FyZywgdmFsdWUpOworICAgICAgICB9OworICAgICAg ICBjYXNlIDI6IHJldHVybiBmdW5jdGlvbihhLCBiKSB7CisgICAgICAgICAgcmV0dXJuIGZ1bmMu Y2FsbCh0aGlzQXJnLCBhLCBiKTsKKyAgICAgICAgfTsKKyAgICAgICAgY2FzZSAzOiByZXR1cm4g ZnVuY3Rpb24odmFsdWUsIGluZGV4LCBjb2xsZWN0aW9uKSB7CisgICAgICAgICAgcmV0dXJuIGZ1 bmMuY2FsbCh0aGlzQXJnLCB2YWx1ZSwgaW5kZXgsIGNvbGxlY3Rpb24pOworICAgICAgICB9Owor ICAgICAgICBjYXNlIDQ6IHJldHVybiBmdW5jdGlvbihhY2N1bXVsYXRvciwgdmFsdWUsIGluZGV4 LCBjb2xsZWN0aW9uKSB7CisgICAgICAgICAgcmV0dXJuIGZ1bmMuY2FsbCh0aGlzQXJnLCBhY2N1 bXVsYXRvciwgdmFsdWUsIGluZGV4LCBjb2xsZWN0aW9uKTsKKyAgICAgICAgfTsKKyAgICAgIH0K KyAgICAgIHJldHVybiBiaW5kKGZ1bmMsIHRoaXNBcmcpOworICAgIH0KKworICAgIC8qKgorICAg ICAqIFRoZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBjcmVhdGVXcmFwcGVyYCB0aGF0IGNyZWF0 ZXMgdGhlIHdyYXBwZXIgYW5kCisgICAgICogc2V0cyBpdHMgbWV0YSBkYXRhLgorICAgICAqCisg ICAgICogQHByaXZhdGUKKyAgICAgKiBAcGFyYW0ge0FycmF5fSBiaW5kRGF0YSBUaGUgYmluZCBk YXRhIGFycmF5LgorICAgICAqIEByZXR1cm5zIHtGdW5jdGlvbn0gUmV0dXJucyB0aGUgbmV3IGZ1 bmN0aW9uLgorICAgICAqLworICAgIGZ1bmN0aW9uIGJhc2VDcmVhdGVXcmFwcGVyKGJpbmREYXRh KSB7CisgICAgICB2YXIgZnVuYyA9IGJpbmREYXRhWzBdLAorICAgICAgICAgIGJpdG1hc2sgPSBi aW5kRGF0YVsxXSwKKyAgICAgICAgICBwYXJ0aWFsQXJncyA9IGJpbmREYXRhWzJdLAorICAgICAg ICAgIHBhcnRpYWxSaWdodEFyZ3MgPSBiaW5kRGF0YVszXSwKKyAgICAgICAgICB0aGlzQXJnID0g YmluZERhdGFbNF0sCisgICAgICAgICAgYXJpdHkgPSBiaW5kRGF0YVs1XTsKKworICAgICAgdmFy IGlzQmluZCA9IGJpdG1hc2sgJiAxLAorICAgICAgICAgIGlzQmluZEtleSA9IGJpdG1hc2sgJiAy LAorICAgICAgICAgIGlzQ3VycnkgPSBiaXRtYXNrICYgNCwKKyAgICAgICAgICBpc0N1cnJ5Qm91 bmQgPSBiaXRtYXNrICYgOCwKKyAgICAgICAgICBrZXkgPSBmdW5jOworCisgICAgICBmdW5jdGlv biBib3VuZCgpIHsKKyAgICAgICAgdmFyIHRoaXNCaW5kaW5nID0gaXNCaW5kID8gdGhpc0FyZyA6 IHRoaXM7CisgICAgICAgIGlmIChwYXJ0aWFsQXJncykgeworICAgICAgICAgIHZhciBhcmdzID0g c2xpY2UocGFydGlhbEFyZ3MpOworICAgICAgICAgIHB1c2guYXBwbHkoYXJncywgYXJndW1lbnRz KTsKKyAgICAgICAgfQorICAgICAgICBpZiAocGFydGlhbFJpZ2h0QXJncyB8fCBpc0N1cnJ5KSB7 CisgICAgICAgICAgYXJncyB8fCAoYXJncyA9IHNsaWNlKGFyZ3VtZW50cykpOworICAgICAgICAg IGlmIChwYXJ0aWFsUmlnaHRBcmdzKSB7CisgICAgICAgICAgICBwdXNoLmFwcGx5KGFyZ3MsIHBh cnRpYWxSaWdodEFyZ3MpOworICAgICAgICAgIH0KKyAgICAgICAgICBpZiA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GFycmF5IHRvIHByb2Nlc3MuCisgICAgICogQHBhcmFtIHtB cnJheX0gW3ZhbHVlc10gVGhlIGFycmF5IG9mIHZhbHVlcyB0byBleGNsdWRlLgorICAgICAqIEBy ZXR1cm5zIHtBcnJheX0gUmV0dXJucyBhIG5ldyBhcnJheSBvZiBmaWx0ZXJlZCB2YWx1ZXMuCisg ICAgICovCisgICAgZnVuY3Rpb24gYmFzZURpZmZlcmVuY2UoYXJyYXksIHZhbHVlcykgeworICAg ICAgdmFyIGluZGV4ID0gLTEsCisgICAgICAgICAgaW5kZXhPZiA9IGdldEluZGV4T2YoKSwKKyAg ICAgICAgICBsZW5ndGggPSBhcnJheSA/IGFycmF5Lmxlbmd0aCA6IDAsCisgICAgICAgICAgaXNM YXJnZSA9IGxlbmd0aCA+PSBsYXJnZUFycmF5U2l6ZSAmJiBpbmRleE9mID09PSBiYXNlSW5kZXhP ZiwKKyAgICAgICAgICByZXN1bHQgPSBbXTsKKworICAgICAgaWYgKGlzTGFyZ2UpIHsKKyAgICAg ICAgdmFyIGNhY2hlID0gY3JlYXRlQ2FjaGUodmFsdWVzKTsKKyAgICAgICAgaWYgKGNhY2hlKSB7 CisgICAgICAgICAgaW5kZXhPZiA9IGNhY2hlSW5kZXhPZjsKKyAgICAgICAgICB2YWx1ZXMgPSBj YWNoZTsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICBpc0xhcmdlID0gZmFsc2U7CisgICAg ICAgIH0KKyAgICAgIH0KKyAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7CisgICAgICAg IHZhciB2YWx1ZSA9IGFycmF5W2luZGV4XTsKKyAgICAgICAgaWYgKGluZGV4T2YodmFsdWVzLCB2 YWx1ZSkgPCAwKSB7CisgICAgICAgICAgcmVzdWx0LnB1c2godmFsdWUpOworICAgICAgICB9Cisg ICAgICB9CisgICAgICBpZiAoaXNMYXJnZSkgeworICAgICAgICByZWxlYXNlT2JqZWN0KHZhbHVl cyk7CisgIC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ZiAodmFsdWUgJiYgdHlwZW9mIHZh bHVlID09ICdvYmplY3QnICYmIHR5cGVvZiB2YWx1ZS5sZW5ndGggPT0gJ251bWJlcicKKyAgICAg ICAgICAgICYmIChpc0FycmF5KHZhbHVlKSB8fCBpc0FyZ3VtZW50cyh2YWx1ZSkpKSB7CisgICAg ICAgICAgLy8gcmVjdXJzaXZlbHkgZmxhdHRlbiBhcnJheXMgKHN1c2NlcHRpYmxlIHRvIGNhbGwg c3RhY2sgbGltaXRzKQorICAgICAgICAgIGlmICghaXNTaGFsbG93KSB7CisgICAgICAgICAgICB2 YWx1ZSA9IGJhc2VGbGF0dGVuKHZhbHVlLCBpc1NoYWxsb3csIGlzU3RyaWN0KTsKKyAgICAgICAg ICB9CisgICAgICAgICAgdmFyIHZhbEluZGV4ID0gLTEsCisgICAgICAgICAgICAgIHZhbExlbmd0 aCA9IHZhbHVlLmxlbmd0aCwKKyAgICAgICAgICAgICAgcmVzSW5kZXggPSByZXN1bHQubGVuZ3Ro OworCisgICAgICAgICAgcmVzdWx0Lmxlbmd0aCArPSB2YWxMZW5ndGg7CisgICAgICAgICAgd2hp bGUgKCsrdmFsSW5kZXggPCB2YWxMZW5ndGgpIHsKKyAgICAgICAgICAgIHJlc3VsdFtyZXNJbmRl eCsrXSA9IHZhbHVlW3ZhbEluZGV4XTsKKyAgICAgICAgICB9CisgICAgICAgIH0gZWxzZSBpZiAo IWlzU3RyaWN0KSB7CisgICAgICAgICAgcmVzdWx0LnB1c2godmFsdWUpOworICAgICAgICB9Cisg ICAgICB9CisgICAgICByZXR1cm4gcmVzdWx0OworICAgIH0KKworICAgIC8qKgorICAgICAqIFRo ZSBiYXNlIGltcGxlbWVudGF0aW9uIG9mIGBfLmlzRXF1YWxgLCB3aXRob3V0IHN1cHBvcnQgZm9y IGB0aGlzQXJnYCBiaW5kaW5nLAorICAgICAqIHRoYXQgYWxsb3dzIHBhcnRpYWwgIl8ud2hlcmUi IHN0eWxlIGNvbXBhcmlzb25zLgor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gICAgfQorICAgICAgfQor ICAgICAgLy8gZXhpdCBlYXJseSBmb3IgaWRlbnRpY2FsIHZhbHVlcworICAgICAgaWYgKGEgPT09 IGIpIHsKKyAgICAgICAgLy8gdHJlYXQgYCswYCB2cy4gYC0wYCBhcyBub3QgZXF1YWwKKyAgICAg ICAgcmV0dXJuIGEgIT09IDAgfHwgKDEgLyBhID09IDEgLyBiKTsKKyAgICAgIH0KKyAgICAgIHZh ciB0eXBlID0gdHlwZW9mIGEsCisgICAgICAgICAgb3RoZXJUeXBlID0gdHlwZW9mIGI7CisKKyAg ICAgIC8vIGV4aXQgZWFybHkgZm9yIHVubGlrZSBwcmltaXRpdmUgdmFsdWVzCisgICAgICBpZiAo YSA9PT0gYSAmJgorICAgICAgICAgICEoYSAmJiBvYmplY3RUeXBlc1t0eXBlXSkgJiYKKyAgICAg ICAgICAhKGIgJiYgb2JqZWN0VHlwZXNbb3RoZXJUeXBlXSkpIHsKKyAgICAgICAgcmV0dXJuIGZh bHNlOworICAgICAgfQorICAgICAgLy8gZXhpdCBlYXJseSBmb3IgYG51bGxgIGFuZCBgdW5kZWZp bmVkYCBhdm9pZGluZyBFUzMncyBGdW5jdGlvbiNjYWxsIGJlaGF2aW9yCisgICAgICAvLyBodHRw Oi8vZXM1LmdpdGh1Yi5pby8jeDE1LjMuNC40CisgICAgICBpZiAoYSA9PSBudWxsIHx8IGIgPT0g bnVsbCkgeworICAgICAgICByZXR1cm4gYSA9PT0gYjsKKyAgICAgIH0KKyAgICAgIC8vIGNvbXBh cmUgW1tDbGFzc11dIG5hbWVzCisgICAgICB2YXIgY2xhc3NOYW1lID0gdG9TdHJpbmcuY2FsbChh KSwKKyAgICAgICAgICBvdGhlckNsYXNzID0gdG9TdHJpbmcuY2FsbChiKTsKKworICAgICAgaWYg KGNsYXNzTmFtZSA9PSBhcmdzQ2xhc3MpIHsKKyAgICAgICAgY2xhc3NOYW1lID0gb2JqZWN0Q2xh c3M7CisgICAgICB9CisgICAgICBpZiAob3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cnJl c3BvbmRpbmcgb2JqZWN0IGluc3RhbmNlcyBhcyBlcXVhbAorICAgICAgICAgIHJldHVybiBhID09 IFN0cmluZyhiKTsKKyAgICAgIH0KKyAgICAgIHZhciBpc0FyciA9IGNsYXNzTmFtZSA9PSBhcnJh eUNsYXNzOworICAgICAgaWYgKCFpc0FycikgeworICAgICAgICAvLyB1bndyYXAgYW55IGBsb2Rh c2hgIHdyYXBwZWQgdmFsdWVzCisgICAgICAgIHZhciBhV3JhcHBlZCA9IGhhc093blByb3BlcnR5 LmNhbGwoYSwgJ19fd3JhcHBlZF9fJyksCisgICAgICAgICAgICBiV3JhcHBlZCA9IGhhc093blBy b3BlcnR5LmNhbGwoYiwgJ19fd3JhcHBlZF9fJyk7CisKKyAgICAgICAgaWYgKGFXcmFwcGVkIHx8 IGJXcmFwcGVkKSB7CisgICAgICAgICAgcmV0dXJuIGJhc2VJc0VxdWFsKGFXcmFwcGVkID8gYS5f X3dyYXBwZWRfXyA6IGEsIGJXcmFwcGVkID8gYi5fX3dyYXBwZWRfXyA6IGIsIGNhbGxiYWNrLCBp c1doZXJlLCBzdGFja0EsIHN0YWNrQik7CisgICAgICAgIH0KKyAgICAgICAgLy8gZXhpdCBmb3Ig ZnVuY3Rpb25zIGFuZCBET00gbm9kZXMKKyAgICAgICAgaWYgKGNsYXNzTmFtZSAhPSBvYmplY3RD bGFzcykgeworICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgfQorICAgICAgICAvLyBp biBvbGRlciB2ZXJzaW9ucyBvZiBPcGVyYSwgYGFyZ3VtZW50c2Agb2JqZWN0cyBoYXZlIGBBcnJh eWAgY29uc3RydWN0b3JzCisgICAgICAgIHZhciBjdG9yQSA9IGEuY29uc3RydWN0b3IsCisgICAg ICAgICAgICBjdG9yQiA9IGIuY29uc3RydWN0b3I7CisKKyAgICAgICAgLy8gbm9uIGBPYmplY3Rg IG9iamVjdCBpbnN0YW5jZXMgd2l0aCBkaWZmZXJlbnQgY29uc3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IGBhYCBhbmQgYGJgIHRvIHRoZSBzdGFjayBvZiB0cmF2ZXJzZWQgb2JqZWN0cworICAg ICAgc3RhY2tBLnB1c2goYSk7CisgICAgICBzdGFja0IucHVzaChiKTsKKworICAgICAgLy8gcmVj dXJzaXZlbHkgY29tcGFyZSBvYmplY3RzIGFuZCBhcnJheXMgKHN1c2NlcHRpYmxlIHRvIGNhbGwg c3RhY2sgbGltaXRzKQorICAgICAgaWYgKGlzQXJyKSB7CisgICAgICAgIC8vIGNvbXBhcmUgbGVu Z3RocyB0byBkZXRlcm1pbmUgaWYgYSBkZWVwIGNvbXBhcmlzb24gaXMgbmVjZXNzYXJ5CisgICAg ICAgIGxlbmd0aCA9IGEubGVuZ3RoOworICAgICAgICBzaXplID0gYi5sZW5ndGg7CisgICAgICAg IHJlc3VsdCA9IHNpemUgPT0gbGVuZ3RoOworCisgICAgICAgIGlmIChyZXN1bHQgfHwgaXNXaGVy ZSkgeworICAgICAgICAgIC8vIGRlZXAgY29tcGFyZSB0aGUgY29udGVudHMsIGlnbm9yaW5nIG5v bi1udW1lcmljIHByb3BlcnRpZXMKKyAgICAgICAgICB3aGlsZSAoc2l6ZS0tKSB7CisgICAgICAg ICAgICB2YXIgaW5kZXggPSBsZW5ndGgsCisgICAgICAgICAgICAgICAgdmFsdWUgPSBiW3NpemVd OworCisgICAgICAgICAgICBpZiAoaXNXaGVyZSkgeworICAgICAgICAgICAgICB3aGlsZSAoaW5k ZXgtLSkgeworICAgICAgICAgICAgICAgIGlmICgocmVzdWx0ID0gYmFzZUlzRXF1YWwoYVtpbmRl eF0sIHZhbHVlLCBjYWxsYmFjaywgaXNXaGVyZSwgc3RhY2tBLCBzdGFja0IpKSkgeworICAgICAg ICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICB9Cisg ICAgICAgICAgICB9IGVsc2UgaWYgKCEocmVzdWx0ID0gYmFzZUlzRXF1YWwoYVtzaXplXSwgdmFs dWUsIGNhbGxiYWNrLCBpc1doZXJlLCBzdGFja0EsIHN0YWNrQikpKSB7CisgICAgICAgICAgICAg IGJyZWFrOworICAgICAgICAgICAgfQorICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgfQor ICAgICAgZWxzZSB7CisgICAgICAgIC8vIGRlZXAgY29tcGFyZSBvYmplY3RzIHVzaW5nIGBmb3JJ bmAsIGluc3RlYWQgb2YgYGZvck93bmAsIHRvIGF2b2lkIGBPYmplY3Qua2V5c2AKKyAgICAgICAg Ly8gd2hpY2gsIGluIHRoaXMgY2FzZSwgaXMgbW9yZSBjb3N0bHkKKyAgICAgICAgZm9ySW4oYiwg ZnVuY3Rpb24odmFsdWUsIGtleSwgYikgeworICAgICAgICAgIGlmIChoYXNPd25Qcm9wZXJ0eS5j YWxsKGIsIGtleSkpIHsKKyAgICAgICAgICAgIC8vIGNvdW50IHRoZSBudW1iZXIgb2YgcHJvcGVy dGllcy4KKyAgICAgICAgICAgIHNpemUrKzsKKyAgICAgICAgICAgIC8vIGRlZXAgY29tcGFyZSBl YWNoIHByb3BlcnR5IHZhbHVlLgorICAgICAgICAgICAgcmV0dXJuIChyZXN1bHQgPSBoYXNPd25Q cm9wZXJ0eS5jYWxsKGEsIGtleSkgJiYgYmFzZUlzRXF1YWwoYVtrZXldLCB2YWx1ZSwgY2FsbGJh Y2ssIGlzV2hlcmUsIHN0YWNrQSwgc3RhY2tCKSk7CisgICAgICAgICAgfQorICAgICAgICB9KTsK KworICAgICAgICBpZiAocmVzdWx0ICYmICFpc1doZXJlKSB7CisgICAgICAgICAgLy8gZW5zdXJl IGJvdGggb2JqZWN0cyBoYXZlIHRoZSBzYW1lIG51bWJlciBvZiBwcm9wZXJ0aWVzCisgICAgICAg ICAgZm9ySW4oYSwgZnVuY3Rpb24odmFsdWUsIGtleSwgYSkgeworICAgICAgICAgICAgaWYgKGhh c093blByb3BlcnR5LmNhbGwoYSwga2V5KSkgeworICAgICAgICAgICAgICAvLyBgc2l6ZWAgd2ls bCBiZSBgLTFgIGlmIGBhYCBoYXMgbW9yZSBwcm9wZXJ0aWVzIHRoYW4gYGJgCisgICAgICAgICAg ICAgIHJldHVybiAocmVzdWx0ID0gLS1zaXplID4gLTEpOworICAgICAgICAgICAgfQorICAgICAg ICAgIH0pOworICAgICAgICB9CisgICAgICB9CisgICAgICBzdGFja0EucG9wKCk7CisgICAgICBz dGFja0IucG9wKCk7CisKKyAgICAgIGlmIChpbml0ZWRTdGFjaykgeworICAgICAgICByZWxlYXNl QXJyYXkoc3RhY2tBKTsKKyAgICAgICAgcmVsZWFzZUFycmF5KHN0YWNrQik7CisgICAgICB9Cisg ICAgICByZXR1cm4gcmVzdWx0OworICAgIH0KKworICAgIC8qKgorICAgICAqIFRoZSBiYXNlIGlt cGxlbWVudGF0aW9uIG9mIGBfLm1lcmdlYCB3aXRob3V0IGFyZ3VtZW50IGp1Z2dsaW5nIG9yIHN1 cHBvcnQKKyAgICAgKiBmb3IgYHRoaXNBcmdgIGJpbmRpbmcuCisgICAgICoKKyAgICAgKiBAcHJp dmF0ZQorICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIGRlc3RpbmF0aW9uIG9iamVj dC4KKyAgICAgKiBAcGFyYW0ge09iamVjdH0gc291cmNlIFRoZSBzb3VyY2Ugb2JqZWN0LgorICAg ICAqIEBwYXJhbSB7RnVuY3Rpb259IFtjYWxsYmFja10gVGhlIGZ1bmN0aW9uIHRvIGN1c3RvbWl6 ZSBtZXJnaW5nIHByb3BlcnRpZXMuCisgICAgICogQHBhcmFtIHtBcnJheX0gW3N0YWNrQT1bXV0g VHJhY2tzIHRyYXZlcnNlZCBzb3VyY2Ugb2JqZWN0cy4KKyAgICAgKiBAcGFyYW0ge0FycmF5fSBb c3RhY2tCPVtdXSBBc3NvY2lhdGVzIHZhbHVlcyB3aXRoIHNvdXJjZSBjb3VudGVycGFydHMuCisg ICAgICovCisgICAgZnVuY3Rpb24gYmFzZU1lcmdlKG9iamVjdCwgc291cmNlLCBjYWxsYmFjaywg c3RhY2tBLCBzdGFja0IpIHsKKyAgICAgIChpc0FycmF5KHNvdXJjZSkgPyBmb3JFYWNoIDogZm9y T3duKShzb3VyY2UsIGZ1bmN0aW9uKHNvdXJjZSwga2V5KSB7CisgICAgICAgIHZhciBmb3VuZCwK KyAgICAgICAgICAgIGlzQXJyLAorICAgICAgICAgICAgcmVzdWx0ID0gc291cmNlLAorICAgICAg ICAgICAgdmFsdWUgPSBvYmplY3Rba2V5XTsKKworICAgICAgICBpZiAoc291cmNlICYmICgoaXNB cnIgPSBpc0FycmF5KHNvdXJjZSkpIHx8IGlzUGxhaW5PYmplY3Qoc291cmNlKSkpIHsKKyAgICAg ICAgICAvLyBhdm9pZCBtZXJnaW5nIHByZXZpb3VzbHkgbWVyZ2VkIGN5Y2xpYyBzb3VyY2VzCisg ICAgICAgICAgdmFyIHN0YWNrTGVuZ3RoID0gc3RhY2tBLmxlbmd0aDsKKyAgICAgICAgICB3aGls ZSAoc3RhY2tMZW5ndGgtLSkgeworICAgICAgICAgICAgaWYgKChmb3VuZCA9IHN0YWNrQVtzdGFj a0xlbmd0aF0gPT0gc291cmNlKSkgeworICAgICAgICAgICAgICB2YWx1ZSA9IHN0YWNrQltzdGFj a0xlbmd0aF07CisgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQorICAgICAgICAg IH0KKyAgICAgICAgICBpZiAoIWZvdW5kKSB7CisgICAgICAgICAgICB2YXIgaXNTaGFsbG93Owor ICAgICAgICAgICAgaWYgKGNhbGxiYWNrKSB7CisgICAgICAgICAgICAgIHJlc3VsdCA9IGNhbGxi YWNrKHZhbHVlLCBzb3VyY2UpOworICAgICAgICAgICAgICBpZiAoKGlzU2hhbGxvdyA9IHR5cGVv ZiByZXN1bHQgIT0gJ3VuZGVmaW5lZCcpKSB7CisgICAgICAgICAgICAgICAgdmFsdWUgPSByZXN1 bHQ7CisgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmICghaXNT aGFsbG93KSB7CisgICAgICAgICAgICAgIHZhbHVlID0gaXNBcnIKKyAgICAgICAgICAgICAgICA/ IChpc0FycmF5KHZhbHVlKSA/IHZhbHVlIDogW10pCisgICAgICAgICAgICAgICAgOiAoaXNQbGFp bk9iamVjdCh2YWx1ZSkgPyB2YWx1ZSA6IHt9KTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAg IC8vIGFkZCBgc291cmNlYCBhbmQgYXNzb2NpYXRlZCBgdmFsdWVgIHRvIHRoZSBzdGFjayBvZiB0 cmF2ZXJzZWQgb2JqZWN0cworICAgICAgICAgICAgc3RhY2tBLnB1c2goc291cmNlKTsKKyAgICAg ICAgICAgIHN0YWNrQi5wdXNoKHZhbHVlKTsKKworICAgICAgICAgICAgLy8gcmVjdXJzaXZlbHkg bWVyZ2Ugb2JqZWN0cyBhbmQgYXJyYXlzIChzdXNjZXB0aWJsZSB0byBjYWxsIHN0YWNrIGxpbWl0 cykKKyAgICAgICAgICAgIGlmICghaXNTaGFsbG93KSB7CisgICAgICAgICAgICAgIGJhc2VNZXJn ZSh2YWx1ZSwgc291cmNlLCBjYWxsYmFjaywgc3RhY2tBLCBzdGFja0IpOworICAgICAgICAgICAg fQorICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICBpZiAo Y2FsbGJhY2spIHsKKyAgICAgICAgICAgIHJlc3VsdCA9IGNhbGxiYWNrKHZhbHVlLCBzb3VyY2Up OworICAgICAgICAgICAgaWYgKHR5cGVvZiByZXN1bHQgPT0gJ3VuZGVmaW5lZCcpIHsKKyAgICAg ICAgICAgICAgcmVzdWx0ID0gc291cmNlOworICAgICAgICAgICAgfQorICAgICAgICAgIH0KKyAg ICAgICAgICBpZiAodHlwZW9mIHJlc3VsdCAhPSAndW5kZWZpbmVkJykgeworICAgICAgICAgICAg dmFsdWUgPSByZXN1bHQ7CisgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIG9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XJhdGlvbi4KKyAgICAgKiBAcmV0dXJucyB7QXJyYXl9 IFJldHVybnMgYSBkdXBsaWNhdGUtdmFsdWUtZnJlZSBhcnJheS4KKyAgICAgKi8KKyAgICBmdW5j dGlvbiBiYXNlVW5pcShhcnJheSwgaXNTb3J0ZWQsIGNhbGxiYWNrKSB7CisgICAgICB2YXIgaW5k ZXggPSAtMSwKKyAgICAgICAgICBpbmRleE9mID0gZ2V0SW5kZXhPZigpLAorICAgICAgICAgIGxl bmd0aCA9IGFycmF5ID8gYXJyYXkubGVuZ3RoIDogMCwKKyAgICAgICAgICByZXN1bHQgPSBbXTsK KworICAgICAgdmFyIGlzTGFyZ2UgPSAhaXNTb3J0ZWQgJiYgbGVuZ3RoID49IGxhcmdlQXJyYXlT aXplICYmIGluZGV4T2YgPT09IGJhc2VJbmRleE9mLAorICAgICAgICAgIHNlZW4gPSAoY2FsbGJh Y2sgfHwgaXNMYXJnZSkgPyBnZXRBcnJheSgpIDogcmVzdWx0OworCisgICAgICBpZiAoaXNMYXJn ZSkgeworICAgICAgICB2YXIgY2FjaGUgPSBjcmVhdGVDYWNoZShzZWVuKTsKKyAgICAgICAgaW5k ZXhPZiA9IGNhY2hlSW5kZXhPZjsKKyAgICAgICAgc2VlbiA9IGNhY2hlOworICAgICAgfQorICAg ICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKKyAgICAgICAgdmFyIHZhbHVlID0gYXJyYXlb aW5kZXhdLAorICAgICAgICAgICAgY29tcHV0ZWQgPSBjYWxsYmFjayA/IGNhbGxiYWNrKHZhbHVl LCBpbmRleCwgYXJyYXkpIDogdmFsdWU7CisKKyAgICAgICAgaWYgKGlzU29ydGVkCisgICAgICAg ICAgICAgID8gIWluZGV4IHx8IHNlZW5bc2Vlbi5sZW5ndGggLSAxXSAhPT0gY29tcHV0ZWQKKyAg ICAgICAgICAgICAgOiBpbmRleE9mKHNlZW4sIGNvbXB1dGVkKSA8IDAKKyAgICAgICAgICAgICkg eworICAg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ZWN0aW9uLCBjYWxsYmFjaywg dGhpc0FyZykgeworICAgICAgICB2YXIgcmVzdWx0ID0ge307CisgICAgICAgIGNhbGxiYWNrID0g bG9kYXNoLmNyZWF0ZUNhbGxiYWNrKGNhbGxiYWNrLCB0aGlzQXJnLCAzKTsKKworICAgICAgICB2 YXIgaW5kZXggPSAtMSwKKyAgICAgICAgICAgIGxlbmd0aCA9IGNvbGxlY3Rpb24gPyBjb2xsZWN0 aW9uLmxlbmd0aCA6IDA7CisKKyAgICAgICAgaWYgKHR5cGVvZiBsZW5ndGggPT0gJ251bWJlcicp IHsKKyAgICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgeworICAgICAgICAgICAgdmFy IHZhbHVlID0gY29sbGVjdGlvbltpbmRleF07CisgICAgICAgICAgICBzZXR0ZXIocmVzdWx0LCB2 YWx1ZSwgY2FsbGJhY2sodmFsdWUsIGluZGV4LCBjb2xsZWN0aW9uKSwgY29sbGVjdGlvbik7Cisg ICAgICAgICAgfQorICAgICAgICB9IGVsc2UgeworICAgICAgICAgIGZvck93bihjb2xsZWN0aW9u LCBmdW5jdGlvbih2YWx1ZSwga2V5LCBjb2xsZWN0aW9uKSB7CisgICAgICAgICAgICBzZXR0ZXIo cmVzdWx0LCB2YWx1ZSwgY2FsbGJhY2sodmFsdWUsIGtleSwgY29sbGVjdGlvbiksIGNvbGxlY3Rp b24pOworICAgICAgICAgIH0pOworICAgICAgICB9CisgICAgICAgIHJldHVybiByZXN1bHQ7Cisg ICAgICB9OworICAgIH0KKworICAgIC8qKgorICAgICAqIENyZWF0ZXMgYSBmdW5jdGlvbiB0aGF0 LCB3aGVuIGNhbGxlZCwgZWl0aGVyIGN1cnJpZXMgb3IgaW52b2tlcyBgZnVuY2AKKyAgICAgKiB3 aXRoIGFuIG9wdGlvbmFsIGB0aGlzYCBiaW5kaW5nIGFuZCBwYXJ0aWFsbHkgYXBwbGllZCBhcmd1 bWVudHMuCisgICAgICoKKyAgICAgKiBAcHJ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gICAgICAgICBiaW5kRGF0YVsyXSA9IHNsaWNlKGJpbmREYXRh WzJdKTsKKyAgICAgICAgfQorICAgICAgICBpZiAoYmluZERhdGFbM10pIHsKKyAgICAgICAgICBi aW5kRGF0YVszXSA9IHNsaWNlKGJpbmREYXRhWzNdKTsKKyAgICAgICAgfQorICAgICAgICAvLyBz ZXQgYHRoaXNCaW5kaW5nYCBpcyBub3QgcHJldmlvdXNseSBib3VuZAorICAgICAgICBpZiAoaXNC aW5kICYmICEoYmluZERhdGFbMV0gJiAxKSkgeworICAgICAgICAgIGJpbmREYXRhWzRdID0gdGhp c0FyZzsKKyAgICAgICAgfQorICAgICAgICAvLyBzZXQgaWYgcHJldmlvdXNseSBib3VuZCBidXQg bm90IGN1cnJlbnRseSAoc3Vic2VxdWVudCBjdXJyaWVkIGZ1bmN0aW9ucykKKyAgICAgICAgaWYg KCFpc0JpbmQgJiYgYmluZERhdGFbMV0gJiAxKSB7CisgICAgICAgICAgYml0bWFzayB8PSA4Owor ICAgICAgICB9CisgICAgICAgIC8vIHNldCBjdXJyaWVkIGFyaXR5IGlmIG5vdCB5ZXQgc2V0Cisg ICAgICAgIGlmIChpc0N1cnJ5ICYmICEoYmluZERhdGFbMV0gJiA0KSkgeworICAgICAgICAgIGJp bmREYXRhWzVdID0gYXJpdHk7CisgICAgICAgIH0KKyAgICAgICAgLy8gYXBwZW5kIHBhcnRpYWwg bGVmdCBhcmd1bWVudHMKKyAgICAgICAgaWYgKGlzUGFydGlhbCkgeworICAgICAgICAgIHB1c2gu YXBwbHkoYmluZERhdGFbMl0gfHwgKGJpbmREYXRhWzJdID0gW10pLCBwYXJ0aWFsQXJncyk7Cisg ICAgICAgIH0KKyAgICAgICAgLy8gYXBwZW5kIHBhcnRpYWwgcmlnaHQgYXJndW1lbnRzCisgICAg ICAgIGlmIChpc1BhcnRpYWxSaWdodCkgeworICAgICAgICAgIHVuc2hpZnQuYXBwbHkoYmluZERh dGFbM10gfHwgKGJpbmREYXRhWzNdID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YmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIGluc3BlY3QuCisgICAgICogQHJldHVy bnMge0FycmF5fSBSZXR1cm5zIGFuIGFycmF5IG9mIHByb3BlcnR5IG5hbWVzLgorICAgICAqLwor ICAgIHZhciBzaGltS2V5cyA9IGZ1bmN0aW9uKG9iamVjdCkgeworICAgICAgdmFyIGluZGV4LCBp dGVyYWJsZSA9IG9iamVjdCwgcmVzdWx0ID0gW107CisgICAgICBpZiAoIWl0ZXJhYmxlKSByZXR1 cm4gcmVzdWx0OworICAgICAgaWYgKCEob2JqZWN0VHlwZXNbdHlwZW9mIG9iamVjdF0pKSByZXR1 cm4gcmVzdWx0OworICAgICAgICBmb3IgKGluZGV4IGluIGl0ZXJhYmxlKSB7CisgICAgICAgICAg aWYgKGhhc093blByb3BlcnR5LmNhbGwoaXRlcmFibGUsIGluZGV4KSkgeworICAgICAgICAgICAg cmVzdWx0LnB1c2goaW5kZXgpOworICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgcmV0dXJu IHJlc3VsdAorICAgIH07CisKKyAgICAvKioKKyAgICAgKiBDcmVhdGVzIGFuIGFycmF5IGNvbXBv c2VkIG9mIHRoZSBvd24gZW51bWVyYWJsZSBwcm9wZXJ0eSBuYW1lcyBvZiBhbiBvYmplY3QuCisg ICAgICoKKyAgICAgKiBAc3RhdGljCisgICAgICogQG1lbWJlck9mIF8KKyAgICAgKiBAY2F0ZWdv cnkgT2JqZWN0cworICAgICAqIEBwYXJhbSB7T2JqZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBp bnNwZWN0LgorICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyBhbiBhcnJheSBvZiBwcm9w ZXJ0eSBuYW1lcy4KKyAgICAgKiBAZXhhbXBsZQorICAgICAqCisgICAgICogXy5rZXlzKHsgJ29u ZSc6IDEsICd0d28nOiAyLCAndGhyZWUnOiAzIH0pOworICAgICAqIC8vID0+IFsnb25lJywgJ3R3 bycsICd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4KKyAgICAgKiBAcGFyYW0ge0Z1bmN0aW9u fSBbY2FsbGJhY2tdIFRoZSBmdW5jdGlvbiB0byBjdXN0b21pemUgY2xvbmluZyB2YWx1ZXMuCisg ICAgICogQHBhcmFtIHsqfSBbdGhpc0FyZ10gVGhlIGB0aGlzYCBiaW5kaW5nIG9mIGBjYWxsYmFj a2AuCisgICAgICogQHJldHVybnMgeyp9IFJldHVybnMgdGhlIGNsb25lZCB2YWx1ZS4KKyAgICAg KiBAZXhhbXBsZQorICAgICAqCisgICAgICogdmFyIGNoYXJhY3RlcnMgPSBbCisgICAgICogICB7 ICduYW1lJzogJ2Jhcm5leScsICdhZ2UnOiAzNiB9LAorICAgICAqICAgeyAnbmFtZSc6ICdmcmVk JywgICAnYWdlJzogNDAgfQorICAgICAqIF07CisgICAgICoKKyAgICAgKiB2YXIgc2hhbGxvdyA9 IF8uY2xvbmUoY2hhcmFjdGVycyk7CisgICAgICogc2hhbGxvd1swXSA9PT0gY2hhcmFjdGVyc1sw XTsKKyAgICAgKiAvLyA9PiB0cnVlCisgICAgICoKKyAgICAgKiB2YXIgZGVlcCA9IF8uY2xvbmUo Y2hhcmFjdGVycywgdHJ1ZSk7CisgICAgICogZGVlcFswXSA9PT0gY2hhcmFjdGVyc1swXTsKKyAg ICAgKiAvLyA9PiBmYWxzZQorICAgICAqCisgICAgICogXy5taXhpbih7CisgICAgICogICAnY2xv bmUnOiBfLnBhcnRpYWxSaWdodChfLmNsb25lLCBmdW5jdGlvbih2YWx1ZSkgeworICAgICAqICAg ICByZXR1cm4gXy5pc0VsZW1lbnQodmFsdWUpID8gdmFsdWUuY2xvbmVOb2RlKGZhbHNlKSA6IHVu ZGVmaW5lZDsKKyAgICAgKiAgIH0pCisgICAgICogfSk7CisgICAgICoKKyAgICAgKiB2YXIgY2xv bmUgPSBfLmNsb25lKGRvY3VtZW50LmJvZHkpOworICAgICAqIGNsb25lLmNoaWxkTm9kZXMubGVu Z3RoOworICAgICAqIC8vID0+IDAKK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ICAgICogXTsKKyAgICAgKgorICAgICAqIHZhciBkZWVwID0gXy5jbG9uZURlZXAoY2hhcmFjdGVy cyk7CisgICAgICogZGVlcFswXSA9PT0gY2hhcmFjdGVyc1swXTsKKyAgICAgKiAvLyA9PiBmYWxz ZQorICAgICAqCisgICAgICogdmFyIHZpZXcgPSB7CisgICAgICogICAnbGFiZWwnOiAnZG9jcycs CisgICAgICogICAnbm9kZSc6IGVsZW1lbnQKKyAgICAgKiB9OworICAgICAqCisgICAgICogdmFy IGNsb25lID0gXy5jbG9uZURlZXAodmlldywgZnVuY3Rpb24odmFsdWUpIHsKKyAgICAgKiAgIHJl dHVybiBfLmlzRWxlbWVudCh2YWx1ZSkgPyB2YWx1ZS5jbG9uZU5vZGUodHJ1ZSkgOiB1bmRlZmlu ZWQ7CisgICAgICogfSk7CisgICAgICoKKyAgICAgKiBjbG9uZS5ub2RlID09IHZpZXcubm9kZTsK KyAgICAgKiAvLyA9PiBmYWxzZQorICAgICAqLworICAgIGZ1bmN0aW9uIGNsb25lRGVlcCh2YWx1 ZSwgY2FsbGJhY2ssIHRoaXNBcmcpIHsKKyAgICAgIHJldHVybiBiYXNlQ2xvbmUodmFsdWUsIHRy dWUsIHR5cGVvZiBjYWxsYmFjayA9PSAnZnVuY3Rpb24nICYmIGJhc2VDcmVhdGVDYWxsYmFjayhj YWxsYmFjaywgdGhpc0FyZywgMSkpOworICAgIH0KKworICAgIC8qKgorICAgICAqIENyZWF0ZXMg YW4gb2JqZWN0IHRoYXQgaW5oZXJpdHMgZnJvbSB0aGUgZ2l2ZW4gYHByb3RvdHlwZWAgb2JqZWN0 LiBJZiBhCisgICAgICogYHByb3BlcnRpZXNgIG9iamVjdCBpcyBwcm92aWRlZCBpdHMgb3duIGVu dW1lcmFibGUgcHJvcGVydGllcyBhcmUgYXNzaWduZWQKKyAgICAgKiB0byB0aGUgY3JlYXRlZCBv YmplY3QuCisgICAgICoKKyAgICAgKiBAc3RhdGljCisgICAgICogQG1lbWJlck9mIF8KKyAgICAg KiBAY2F0ZWdvcnkgT2JqZWN0cworICAgICAqIEBwYXJhbSB7T2JqZWN0fSBwcm90b3R5cGUgVGhl IG9iamVjdCB0byBpbmhlcml0IGZyb20uCisgICAgICogQHBhcmFtIHtPYmplY3R9IFtwcm9wZXJ0 aWVzXSBUaGUgcHJvcGVydGllcyB0byBhc3NpZ24gdG8gdGhlIG9iamVjdC4KKyAgICAgKiBAcmV0 dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSBuZXcgb2JqZWN0LgorICAgICAqIEBleGFtcGxlCisg ICAgICoKKyAgICAgKiBmdW5jdGlvbiBTaGFwZSgpIHsKKyAgICAgKiAgIHRoaXMueCA9IDA7Cisg ICAgICogICB0aGlzLnkgPSAwOworICAgICAqIH0KKyAgICAgKgorICAgICAqIGZ1bmN0aW9uIENp cmNsZSgpIHsKKyAgICAgKiAgIFNoYXBlLmNhbGwodGhpcyk7CisgICAgICogfQorICAgICAqCisg ICAgICogQ2lyY2xlLnByb3RvdHlwZSA9IF8uY3JlYXRlKFNoYXBlLnByb3RvdHlwZSwgeyAnY29u c3RydWN0b3InOiBDaXJjbGUgfSk7CisgICAgICoKKyAgICAgKiB2YXIgY2lyY2xlID0gbmV3IENp cmNsZTsKKyAgICAgKiBjaXJjbGUgaW5zdGFuY2VvZiBDaXJjbGU7CisgICAgICogLy8gPT4gdHJ1 ZQorICAgICAqCisgICAgICogY2lyY2xlIGluc3RhbmNlb2YgU2hhcGU7CisgICAgICogLy8gPT4g dHJ1ZQorICAgICAqLworICAgIGZ1bmN0aW9uIGNyZWF0ZShwcm90b3R5cGUsIHByb3BlcnRpZXMp IHsKKyAgICAgIHZhciByZXN1bHQgPSBiYXNlQ3JlYXRlKHByb3RvdHlwZSk7CisgICAgICByZXR1 cm4gcHJvcGVydGllcyA/IGFzc2lnbihyZXN1bHQsIHByb3BlcnRpZXMpIDogcmVzdWx0OworICAg IH0KKworICAgIC8qKgorICAgICAqIEFzc2lnbnMgb3duIG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gICAgdmFyIGRlZmF1bHRzID0gZnVuY3Rpb24ob2JqZWN0LCBzb3VyY2UsIGd1YXJkKSB7Cisg ICAgICB2YXIgaW5kZXgsIGl0ZXJhYmxlID0gb2JqZWN0LCByZXN1bHQgPSBpdGVyYWJsZTsKKyAg ICAgIGlmICghaXRlcmFibGUpIHJldHVybiByZXN1bHQ7CisgICAgICB2YXIgYXJncyA9IGFyZ3Vt ZW50cywKKyAgICAgICAgICBhcmdzSW5kZXggPSAwLAorICAgICAgICAgIGFyZ3NMZW5ndGggPSB0 eXBlb2YgZ3VhcmQgPT0gJ251bWJlcicgPyAyIDogYXJncy5sZW5ndGg7CisgICAgICB3aGlsZSAo KythcmdzSW5kZXggPCBhcmdzTGVuZ3RoKSB7CisgICAgICAgIGl0ZXJhYmxlID0gYXJnc1thcmdz SW5kZXhdOworICAgICAgICBpZiAoaXRlcmFibGUgJiYgb2JqZWN0VHlwZXNbdHlwZW9mIGl0ZXJh YmxlXSkgeworICAgICAgICB2YXIgb3duSW5kZXggPSAtMSwKKyAgICAgICAgICAgIG93blByb3Bz ID0gb2JqZWN0VHlwZXNbdHlwZW9mIGl0ZXJhYmxlXSAmJiBrZXlzKGl0ZXJhYmxlKSwKKyAgICAg ICAgICAgIGxlbmd0aCA9IG93blByb3BzID8gb3duUHJvcHMubGVuZ3RoIDogMDsKKworICAgICAg ICB3aGlsZSAoKytvd25JbmRleCA8IGxlbmd0aCkgeworICAgICAgICAgIGluZGV4ID0gb3duUHJv cHNbb3duSW5kZXhdOworICAgICAgICAgIGlmICh0eXBlb2YgcmVzdWx0W2luZGV4XSA9PSAndW5k ZWZpbmVkJykgcmVzdWx0W2luZGV4XSA9IGl0ZXJhYmxlW2luZGV4XTsKKyAgICAgICAgfQorICAg ICAgICB9CisgICAgICB9CisgICAgICByZXR1cm4gcmVzdWx0CisgICAgfTsKKworICAgIC8qKgor ICAgICAqIFRoaXMgbWV0aG9kIGlzIGxpa2UgYF8uZmluZEluZGV4YCBleGNlcHQ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hlcmUiIHN0 eWxlIGNhbGxiYWNrLCByZXNwZWN0aXZlbHkuCisgICAgICogQHBhcmFtIHsqfSBbdGhpc0FyZ10g VGhlIGB0aGlzYCBiaW5kaW5nIG9mIGBjYWxsYmFja2AuCisgICAgICogQHJldHVybnMge3N0cmlu Z3x1bmRlZmluZWR9IFJldHVybnMgdGhlIGtleSBvZiB0aGUgZm91bmQgZWxlbWVudCwgZWxzZSBg dW5kZWZpbmVkYC4KKyAgICAgKiBAZXhhbXBsZQorICAgICAqCisgICAgICogdmFyIGNoYXJhY3Rl cnMgPSB7CisgICAgICogICAnYmFybmV5JzogeyAgJ2FnZSc6IDM2LCAnYmxvY2tlZCc6IGZhbHNl IH0sCisgICAgICogICAnZnJlZCc6IHsgICAgJ2FnZSc6IDQwLCAnYmxvY2tlZCc6IHRydWUgfSwK KyAgICAgKiAgICdwZWJibGVzJzogeyAnYWdlJzogMSwgICdibG9ja2VkJzogZmFsc2UgfQorICAg ICAqIH07CisgICAgICoKKyAgICAgKiBfLmZpbmRLZXkoY2hhcmFjdGVycywgZnVuY3Rpb24oY2hy KSB7CisgICAgICogICByZXR1cm4gY2hyLmFnZSA8IDQwOworICAgICAqIH0pOworICAgICAqIC8v ID0+ICdiYXJuZXknIChwcm9wZXJ0eSBvcmRlciBpcyBub3QgZ3VhcmFudGVlZCBhY3Jvc3MgZW52 aXJvbm1lbnRzKQorICAgICAqCisgICAgICogLy8gdXNpbmcgIl8ud2hlcmUiIGNhbGxiYWNrIHNo b3J0aGFuZAorICAgICAqIF8uZmluZEtleShjaGFyYWN0ZXJzLCB7ICdhZ2UnOiAxIH0pOworICAg ICAqIC8vID0+ICdwZWJibGVzJworICAgICAqCisgICAgICogLy8gdXNpbmcgIl8ucGx1Y2siIGNh bGxiYWNrIHNob3J0aGFuZAorICAgICAqIF8uZmluZEtleShjaGFyYWN0ZXJzLCAnYmxvY2tlZCcp OworICAgICAqIC8vID0+ICdmcmVkJworICAgICAqLworICAgIGZ1bmN0aW9u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gNDA7CisgICAgICogfSk7CisgICAgICogLy8g PT4gcmV0dXJucyBgcGViYmxlc2AsIGFzc3VtaW5nIGBfLmZpbmRLZXlgIHJldHVybnMgYGJhcm5l eWAKKyAgICAgKgorICAgICAqIC8vIHVzaW5nICJfLndoZXJlIiBjYWxsYmFjayBzaG9ydGhhbmQK KyAgICAgKiBfLmZpbmRMYXN0S2V5KGNoYXJhY3RlcnMsIHsgJ2FnZSc6IDQwIH0pOworICAgICAq IC8vID0+ICdmcmVkJworICAgICAqCisgICAgICogLy8gdXNpbmcgIl8ucGx1Y2siIGNhbGxiYWNr IHNob3J0aGFuZAorICAgICAqIF8uZmluZExhc3RLZXkoY2hhcmFjdGVycywgJ2Jsb2NrZWQnKTsK KyAgICAgKiAvLyA9PiAncGViYmxlcycKKyAgICAgKi8KKyAgICBmdW5jdGlvbiBmaW5kTGFzdEtl eShvYmplY3QsIGNhbGxiYWNrLCB0aGlzQXJnKSB7CisgICAgICB2YXIgcmVzdWx0OworICAgICAg Y2FsbGJhY2sgPSBsb2Rhc2guY3JlYXRlQ2FsbGJhY2soY2FsbGJhY2ssIHRoaXNBcmcsIDMpOwor ICAgICAgZm9yT3duUmlnaHQob2JqZWN0LCBmdW5jdGlvbih2YWx1ZSwga2V5LCBvYmplY3QpIHsK KyAgICAgICAgaWYgKGNhbGxiYWNrKHZhbHVlLCBrZXksIG9iamVjdCkpIHsKKyAgICAgICAgICBy ZXN1bHQgPSBrZXk7CisgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CisgICAgICB9 KTsKKyAgICAgIHJldHVybiByZXN1bHQ7CisgICAgfQorCisgICAgLyoqCisgICAgICogSXRlcmF0 ZXMgb3ZlciBvd24gYW5kIGluaGVyaXRlZCBlbnVtZXJhYmxlIHByb3BlcnRpZXMgb2YgYW4gb2Jq ZWN0LAorICAgICAqIGV4ZWN1dGluZyB0aGUgY2FsbGJhY2sgZm9yIGVhY2ggcHJvcGVydHkuIFRo ZSBjYWxsYmFjayBpcyBib3VuZCB0byBgdGhpc0FyZ2AKKyAgICAgKiBhbmQgaW52b2tlZCB3aXRo IHRocmVlIGFyZ3VtZW50czsgKHZhbHVlLCBrZXksIG9iamVjdCkuIENhbGxiYWNrcyBtYXkgZXhp dAorICAgICAqIGl0ZXJhdGlvbiBlYXJseSBieSBleHBsaWNpdGx5IHJldHVybmluZyBgZmFsc2Vg LgorICAgICAqCisgICAgICogQHN0YXRpYworICAgICAqIEBtZW1iZXJPZiBfCisgICAgICogQHR5 cGUgRnVuY3Rpb24KKyAgICAgKiBAY2F0ZWdvcnkgT2JqZWN0cworICAgICAqIEBwYXJhbSB7T2Jq ZWN0fSBvYmplY3QgVGhlIG9iamVjdCB0byBpdGVyYXRlIG92ZXIuCisgICAgICogQHBhcmFtIHtG dW5jdGlvbn0gW2NhbGxiYWNrPWlkZW50aXR5XSBUaGUgZnVuY3Rpb24gY2FsbGVkIHBlciBpdGVy YXRpb24uCisgICAgICogQHBhcmFtIHsqfSBbdGhpc0FyZ10gVGhlIGB0aGlzYCBiaW5kaW5nIG9m IGBjYWxsYmFja2AuCisgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyBgb2JqZWN0YC4K KyAgICAgKiBAZXhhbXBsZQorICAgICAqCisgICAgICogZnVuY3Rpb24gU2hhcGUoKSB7CisgICAg ICogICB0aGlzLnggPSAwOworICAgICAqICAgdGhpcy55ID0gMDsKKyAgICAgKiB9CisgICAgICoK KyAgICAgKiBTaGFwZS5wcm90b3R5cGUubW92ZSA9IGZ1bmN0aW9uKHgsIHkpIHsKKyAgICAgKiAg IHRoaXMueCArPSB4OworICAgICAqICAgdGhpcy55ICs9IHk7CisgICAgICogfTsKKyAgICAgKgor ICAgICAqIF8uZm9ySW4obmV3IFNoYXBlLCBmdW5jdGlvbih2YWx1ZSwga2V5KSB7CisgICAgICog ICBjb25zb2xlLmxvZyhrZXkpOworICAgICAqIH0pOworICAgICAqIC8vID0+IGxvZ3MgJ3gnLCAn eScsIGFuZ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IEBwYXJhbSB7RnVuY3Rp b259IFtjYWxsYmFjaz1pZGVudGl0eV0gVGhlIGZ1bmN0aW9uIGNhbGxlZCBwZXIgaXRlcmF0aW9u LgorICAgICAqIEBwYXJhbSB7Kn0gW3RoaXNBcmddIFRoZSBgdGhpc2AgYmluZGluZyBvZiBgY2Fs bGJhY2tgLgorICAgICAqIEByZXR1cm5zIHtPYmplY3R9IFJldHVybnMgYG9iamVjdGAuCisgICAg ICogQGV4YW1wbGUKKyAgICAgKgorICAgICAqIGZ1bmN0aW9uIFNoYXBlKCkgeworICAgICAqICAg dGhpcy54ID0gMDsKKyAgICAgKiAgIHRoaXMueSA9IDA7CisgICAgICogfQorICAgICAqCisgICAg ICogU2hhcGUucHJvdG90eXBlLm1vdmUgPSBmdW5jdGlvbih4LCB5KSB7CisgICAgICogICB0aGlz LnggKz0geDsKKyAgICAgKiAgIHRoaXMueSArPSB5OworICAgICAqIH07CisgICAgICoKKyAgICAg KiBfLmZvckluUmlnaHQobmV3IFNoYXBlLCBmdW5jdGlvbih2YWx1ZSwga2V5KSB7CisgICAgICog ICBjb25zb2xlLmxvZyhrZXkpOworICAgICAqIH0pOworICAgICAqIC8vID0+IGxvZ3MgJ21vdmUn LCAneScsIGFuZCAneCcgYXNzdW1pbmcgYF8uZm9ySW4gYCBsb2dzICd4JywgJ3knLCBhbmQgJ21v dmUnCisgICAgICovCisgICAgZnVuY3Rpb24gZm9ySW5SaWdodChvYmplY3QsIGNhbGxiYWNrLCB0 aGlzQXJnKSB7CisgICAgICB2YXIgcGFpcnMgPSBbXTsKKworICAgICAgZm9ySW4ob2JqZWN0LCBm dW5jdGlvbih2YWx1ZSwga2V5KSB7CisgICAgICAgIHBhaXJzLnB1c2goa2V5LCB2YWx1ZSk7Cisg ICAgICB9KTsKKworICAgICAgdmFyIGxlbmd0aCA9IHBhaXJzLmxlbmd0aDsKKyAgICAgIGNhbGxi YWNrID0gYmFzZUNyZWF0ZUNhbGxiYWNrKGNhbGxiYWNrLC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ICAgICAqIEBleGFtcGxlCisgICAgICoKKyAgICAgKiBfLmZvck93bih7ICcwJzogJ3plcm8nLCAn MSc6ICdvbmUnLCAnbGVuZ3RoJzogMiB9LCBmdW5jdGlvbihudW0sIGtleSkgeworICAgICAqICAg Y29uc29sZS5sb2coa2V5KTsKKyAgICAgKiB9KTsKKyAgICAgKiAvLyA9PiBsb2dzICcwJywgJzEn LCBhbmQgJ2xlbmd0aCcgKHByb3BlcnR5IG9yZGVyIGlzIG5vdCBndWFyYW50ZWVkIGFjcm9zcyBl bnZpcm9ubWVudHMpCisgICAgICovCisgICAgdmFyIGZvck93biA9IGZ1bmN0aW9uKGNvbGxlY3Rp b24sIGNhbGxiYWNrLCB0aGlzQXJnKSB7CisgICAgICB2YXIgaW5kZXgsIGl0ZXJhYmxlID0gY29s bGVjdGlvbiwgcmVzdWx0ID0gaXRlcmFibGU7CisgICAgICBpZiAoIWl0ZXJhYmxlKSByZXR1cm4g cmVzdWx0OworICAgICAgaWYgKCFvYmplY3RUeXBlc1t0eXBlb2YgaXRlcmFibGVdKSByZXR1cm4g cmVzdWx0OworICAgICAgY2FsbGJhY2sgPSBjYWxsYmFjayAmJiB0eXBlb2YgdGhpc0FyZyA9PSAn dW5kZWZpbmVkJyA/IGNhbGxiYWNrIDogYmFzZUNyZWF0ZUNhbGxiYWNrKGNhbGxiYWNrLCB0aGlz QXJnLCAzKTsKKyAgICAgICAgdmFyIG93bkluZGV4ID0gLTEsCisgICAgICAgICAgICBvd25Qcm9w cyA9IG9iamVjdFR5cGVzW3R5cGVvZiBpdGVyYWJsZV0gJiYga2V5cyhpdGVyYWJsZSksCisgICAg ICAgICAgICBsZW5ndGggPSBvd25Qcm9wcyA/IG93blByb3BzLmxlbmd0aCA6IDA7CisKKyAgICAg ICAgd2hpbGUgKCsrb3duSW5kZXggPCBsZW5ndGgpIHsKKyAgICAgICAgICBpbmRleCA9IG93blBy b3BzW293bkluZGV4XTsKKyAgICAgICAgICBpZiAoY2FsbGJhY2soaXRlcmFibGVbaW5kZXhdLCBp bmRleCwgY29sbGVjdGlvbikgPT09IGZhbHNlKSByZXR1cm4gcmVzdWx0OworICAgICAgICB9Cisg ICAgICByZXR1cm4gcmVzdWx0CisgICAgfTsKKworICAgIC8qKgorICAgICAqIFRoaXMgbWV0aG9k IGlzIGxpa2UgYF8uZm9yT3duYCBleGNlcHQgdGhhdCBpdCBpdGVyYXRlcyBvdmVyIGVsZW1lbnRz CisgICAgICogb2YgYSBgY29sbGVjdGlvbmAgaW4gdGhlIG9wcG9zaXRlIG9yZGVyLgorICAgICAq CisgICAgICogQHN0YXRpYworICAgICAqIEBtZW1iZXJPZiBfCisgICAgICogQGNhdGVnb3J5IE9i amVjdHMKKyAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdG8gaXRlcmF0 ZSBvdmVyLgorICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IFtjYWxsYmFjaz1pZGVudGl0eV0gVGhl IGZ1bmN0aW9uIGNhbGxlZCBwZXIgaXRlcmF0aW9uLgorICAgICAqIEBwYXJhbSB7Kn0gW3RoaXNB cmddIFRoZSBgdGhpc2AgYmluZGluZyBvZiBgY2FsbGJhY2tgLgorICAgICAqIEByZXR1cm5zIHtP YmplY3R9IFJldHVybnMgYG9iamVjdGAuCisgICAgICogQGV4YW1wbGUKKyAgICAgKgorICAgICAq IF8uZm9yT3duUmlnaHQoeyAnMCc6ICd6ZXJvJywgJzEnOiAnb25lJywgJ2xlbmd0aCc6IDIgfSwg ZnVuY3Rpb24obnVtLCBrZXkpIHsKKyAgICAgKiAgIGNvbnNvbGUubG9nKGtleSk7CisgICAgICog fSk7CisgICAgICogLy8gPT4gbG9ncyAnbGVuZ3RoJywgJzEnLCBhbmQgJzAnIGFzc3VtaW5nIGBf LmZvck93bmAgbG9ncyAnMCcsICcxJywgYW5kICdsZW5ndGgnCisgICAgICovCisgICAgZnVuY3Rp b24gZm9yT3duUmlnaHQob2JqZWN0LCBjYWxsYmFjaywgdGhpc0FyZykgeworICAgICAgdmFyIHBy b3BzID0ga2V5cyhvYmplY3QpLAorICAgICAgICAgIGxlbmd0aCA9IHByb3BzLmxlbmd0aDsKKwor ICAgICAgY2FsbGJhY2sgPSBiYXNlQ3JlYXRlQ2FsbGJhY2soY2FsbGJhY2ssIHRoaXNBcmcsIDMp OworICAgICAgd2hpbGUgKGxlbmd0aC0tKSB7CisgICAgICAgIHZhciBrZXkgPSBwcm9wc1tsZW5n dGhdOworICAgICAgICBpZiAoY2FsbGJhY2sob2JqZWN0W2tleV0sIGtleSwgb2JqZWN0KSA9PT0g ZmFsc2UpIHsKKyAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAgfQorICAgICAgcmV0 dXJuIG9iamVjdDsKKyAgICB9CisKKyAgICAvKioKKyAgICAgKiBDcmVhdGVzIGEgc29ydGVkIGFy cmF5IG9mIHByb3BlcnR5IG5hbWVzIG9mIGFsbCBlbnVtZXJhYmxlIHByb3BlcnRpZXMsCisgICAg ICogb3duIGFuZCBpbmhlcml0ZWQsIG9mIGBvYmplY3RgIHRoYXQgaGF2ZSBmdW5jdGlvbiB2YWx1 ZXMuCisgICAgICoKKyAgICAgKiBAc3RhdGljCisgICAgICogQG1lbWJlck9mIF8KKyAgICAgKiBA YWxpYXMgbWV0aG9kcworICAgICAqIEBjYXRlZ29yeSBPYmplY3RzCisgICAgICogQHBhcmFtIHtP YmplY3R9IG9iamVjdCBUaGUgb2JqZWN0IHRvIGluc3BlY3QuCisgICAgICogQHJldHVybnMge0Fy cmF5fSBSZXR1cm5zIGFuIGFycmF5IG9mIHByb3BlcnR5IG5hbWVzIHRoYXQgaGF2ZSBmdW5jdGlv biB2YWx1ZXMuCisgICAgICogQGV4YW1wbGUKKyAgICAgKgorICAgICAqIF8uZnVuY3Rpb25zKF8p OworICAgICAqIC8vID0+IFsnYWxsJywgJ2FueScsICdiaW5kJywgJ2JpbmRBbGwnLCAnY2xvbmUn LCAnY29tcGFjdCcsICdjb21wb3NlJywgLi4uXQorICAgICAqLworICAgIGZ1bmN0aW9uIGZ1bmN0 aW9ucyhvYmplY3QpIHsKKyAgICAgIHZhciByZXN1bHQgPSBbXTsKKyAgICAgIGZvckluKG9iamVj dCwgZnVuY3Rpb24odmFsdWUsIGtleSkgeworICAgICAgICBpZiAoaXNGdW5jdGlvbih2YWx1ZSkp IHsKKyAgICAgICAgICByZXN1bHQucHVzaChrZXkpOworICAgICAgICB9CisgICAgICB9KTsKKyAg ICAgIHJldHVybiByZXN1bHQuc29ydCgpOworICAgIH0KKworICAgIC8qKgorICAgICAqIENoZWNr cyBpZiB0aGUgc3BlY2lmaWVkIHByb3BlcnR5IG5hbWUgZXhpc3RzIGFzIGEgZGlyZWN0IHByb3Bl cnR5IG9mIGBvYmplY3RgLAorICAgICAqIGluc3RlYWQgb2YgYW4gaW5oZXJpdGVkIHByb3BlcnR5 LgorICAgICAqCisgICAgICogQHN0YXRpYworICAgICAqIEBtZW1iZXJPZiBfCisgICAgICogQGNh dGVnb3J5IE9iamVjdHMKKyAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3Qg dG8gaW5zcGVjdC4KKyAgICAgKiBAcGFyYW0ge3N0cmluZ30ga2V5IFRoZSBuYW1lIG9mIHRoZSBw cm9wZXJ0eSB0byBjaGVjay4KKyAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdHJ1 ZWAgaWYga2V5IGlzIGEgZGlyZWN0IHByb3BlcnR5LCBlbHNlIGBmYWxzZWAuCisgICAgICogQGV4 YW1wbGUKKyAgICAgKgorICAgICAqIF8uaGFzKHsgJ2EnOiAxLCAnYic6IDIsICdjJzogMyB9LCAn YicpOworICAgICAqIC8vID0+IHRydWUKKyAgICAgKi8KKyAgICBmdW5jdGlvbiBoYXMob2JqZWN0 LCBrZXkpIHsKKyAgICAgIHJldHVybiBvYmplY3QgPyBoYXNPd25Qcm9wZXJ0eS5jYWxsKG9iamVj dCwga2V5KSA6IGZhbHNlOworICAgIH0KKworICAgIC8qKgorICAgICAqIENyZWF0ZXMgYW4gb2Jq ZWN0IGNvbXBvc2VkIG9mIHRoZSBpbnZlcnRlZCBrZXlzIGFuZCB2YWx1ZXMgb2YgdGhlIGdpdmVu IG9iamVjdC4KKyAgICAgKgorICAgICAqIEBzdGF0aWMKKyAgICAgKiBAbWVtYmVyT2YgXworICAg ICAqIEBjYXRlZ29yeSBPYmplY3RzCisgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUg b2JqZWN0IHRvIGludmVydC4KKyAgICAgKiBAcmV0dXJucyB7T2JqZWN0fSBSZXR1cm5zIHRoZSBj cmVhdGVkIGludmVydGVkIG9iamVjdC4KKyAgICAgKiBAZXhhbXBsZQorICAgICAqCisgICAgICog Xy5pbnZlcnQoeyAnZmlyc3QnOiAnZnJlZCcsICdzZWNvbmQnOiAnYmFybmV5JyB9KTsKKyAgICAg KiAvLyA9PiB7ICdmcmVkJzogJ2ZpcnN0JywgJ2Jhcm5leSc6ICdzZWNvbmQnIH0KKyAgICAgKi8K KyAgICBmdW5jdGlvbiBpbnZlcnQob2JqZWN0KSB7CisgICAgICB2YXIgaW5kZXggPSAtMSwKKyAg ICAgICAgICBwcm9wcyA9IGtleXMob2JqZWN0KSwKKyAgICAgICAgICBsZW5ndGggPSBwcm9wcy5s ZW5ndGgsCisgICAgICAgICAgcmVzdWx0ID0ge307CisKKyAgICAgIHdoaWxlICgrK2luZGV4IDwg bGVuZ3RoKSB7CisgICAgICAgIHZhciBrZXkgPSBwcm9wc1tpbmRleF07CisgICAgICAgIHJlc3Vs dFtvYmplY3Rba2V5XV0gPSBrZXk7CisgICAgICB9CisgICAgICByZXR1cm4gcmVzdWx0OworICAg IH0KKworICAgIC8qKgorICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIGEgYm9vbGVhbiB2YWx1 ZS4KKyAgICAgKgorICAgICAqIEBzdGF0aWMKKyAgICAgKiBAbWVtY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ZWN0JyAmJiB0b1N0cmluZy5jYWxsKHZhbHVlKSA9PSBkYXRlQ2xhc3Mg fHwgZmFsc2U7CisgICAgfQorCisgICAgLyoqCisgICAgICogQ2hlY2tzIGlmIGB2YWx1ZWAgaXMg YSBET00gZWxlbWVudC4KKyAgICAgKgorICAgICAqIEBzdGF0aWMKKyAgICAgKiBAbWVtYmVyT2Yg XworICAgICAqIEBjYXRlZ29yeSBPYmplY3RzCisgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUg dmFsdWUgdG8gY2hlY2suCisgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVg IGlmIHRoZSBgdmFsdWVgIGlzIGEgRE9NIGVsZW1lbnQsIGVsc2UgYGZhbHNlYC4KKyAgICAgKiBA ZXhhbXBsZQorICAgICAqCisgICAgICogXy5pc0VsZW1lbnQoZG9jdW1lbnQuYm9keSk7CisgICAg ICogLy8gPT4gdHJ1ZQorICAgICAqLworICAgIGZ1bmN0aW9uIGlzRWxlbWVudCh2YWx1ZSkgewor ICAgICAgcmV0dXJuIHZhbHVlICYmIHZhbHVlLm5vZGVUeXBlID09PSAxIHx8IGZhbHNlOworICAg IH0KKworICAgIC8qKgorICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIGVtcHR5LiBBcnJheXMs IHN0cmluZ3MsIG9yIGBhcmd1bWVudHNgIG9iamVjdHMgd2l0aCBhCisgICAgICogbGVuZ3RoIG9m IGAwYCBhbmQgb2JqZWN0cyB3aXRoIG5vIG93biBlbnVtZXJhYmxlIHByb3BlcnRpZXMgYXJlIGNv bnNpZGVyZWQKKyAgICAgKiAiZW1wdHkiLgorICAgICAqCisgICAgICogQHN0YXRpYworICAgICAq IEBtZW1iZXJPZiBfCisgICAgICogQGNhdGVnb3J5IE9iamVjdHMKKyAgICAgKiBAcGFyYW0ge0Fy cmF5fE9iamVjdHxzdHJpbmd9IHZhbHVlIFRoZSB2YWx1ZSB0byBpbnNwZWN0LgorICAgICAq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nIH07 CisgICAgICoKKyAgICAgKiBvYmplY3QgPT0gY29weTsKKyAgICAgKiAvLyA9PiBmYWxzZQorICAg ICAqCisgICAgICogXy5pc0VxdWFsKG9iamVjdCwgY29weSk7CisgICAgICogLy8gPT4gdHJ1ZQor ICAgICAqCisgICAgICogdmFyIHdvcmRzID0gWydoZWxsbycsICdnb29kYnllJ107CisgICAgICog dmFyIG90aGVyV29yZHMgPSBbJ2hpJywgJ2dvb2RieWUnXTsKKyAgICAgKgorICAgICAqIF8uaXNF cXVhbCh3b3Jkcywgb3RoZXJXb3JkcywgZnVuY3Rpb24oYSwgYikgeworICAgICAqICAgdmFyIHJl R3JlZXQgPSAvXig/OmhlbGxvfGhpKSQvaSwKKyAgICAgKiAgICAgICBhR3JlZXQgPSBfLmlzU3Ry aW5nKGEpICYmIHJlR3JlZXQudGVzdChhKSwKKyAgICAgKiAgICAgICBiR3JlZXQgPSBfLmlzU3Ry aW5nKGIpICYmIHJlR3JlZXQudGVzdChiKTsKKyAgICAgKgorICAgICAqICAgcmV0dXJuIChhR3Jl ZXQgfHwgYkdyZWV0KSA/IChhR3JlZXQgPT0gYkdyZWV0KSA6IHVuZGVmaW5lZDsKKyAgICAgKiB9 KTsKKyAgICAgKiAvLyA9PiB0cnVlCisgICAgICovCisgICAgZnVuY3Rpb24gaXNFcXVhbChhLCBi LCBjYWxsYmFjaywgdGhpc0FyZykgeworICAgICAgcmV0dXJuIGJhc2VJc0VxdWFsKGEsIGIsIHR5 cGVvZiBjYWxsYmFjayA9PSAnZnVuY3Rpb24nICYmIGJhc2VDcmVhdGVDYWxsYmFjayhjYWxsYmFj aywgdGhpc0FyZywgMikpOworICAgIH0KKworICAgIC8qKgorICAgICAqIENoZWNrcyBpZiBgdmFs dWVgIGlzLCBvciBjYW4gYmUgY29lcmNlZCB0bywgYSBmaW5pdGUgbnVtYmVyLgorICAgICAqCisg ICAgICogTm90ZTogVGhpcyBpcyBub3QgdGhlIHNhbWUgYXMgbmF0aXZlIGBp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zCisgICAgICogQHBhcmFtIHsqfSB2YWx1ZSBUaGUgdmFs dWUgdG8gY2hlY2suCisgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlm IHRoZSBgdmFsdWVgIGlzIGEgZnVuY3Rpb24sIGVsc2UgYGZhbHNlYC4KKyAgICAgKiBAZXhhbXBs ZQorICAgICAqCisgICAgICogXy5pc0Z1bmN0aW9uKF8pOworICAgICAqIC8vID0+IHRydWUKKyAg ICAgKi8KKyAgICBmdW5jdGlvbiBpc0Z1bmN0aW9uKHZhbHVlKSB7CisgICAgICByZXR1cm4gdHlw ZW9mIHZhbHVlID09ICdmdW5jdGlvbic7CisgICAgfQorCisgICAgLyoqCisgICAgICogQ2hlY2tz IGlmIGB2YWx1ZWAgaXMgdGhlIGxhbmd1YWdlIHR5cGUgb2YgT2JqZWN0LgorICAgICAqIChlLmcu IGFycmF5cywgZnVuY3Rpb25zLCBvYmplY3RzLCByZWdleGVzLCBgbmV3IE51bWJlcigwKWAsIGFu ZCBgbmV3IFN0cmluZygnJylgKQorICAgICAqCisgICAgICogQHN0YXRpYworICAgICAqIEBtZW1i ZXJPZiBfCisgICAgICogQGNhdGVnb3J5IE9iamVjdHMKKyAgICAgKiBAcGFyYW0geyp9IHZhbHVl IFRoZSB2YWx1ZSB0byBjaGVjay4KKyAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBg dHJ1ZWAgaWYgdGhlIGB2YWx1ZWAgaXMgYW4gb2JqZWN0LCBlbHNlIGBmYWxzZWAuCisgICAgICog QGV4YW1wbGUKKyAgICAgKgorICAgICAqIF8uaXNPYmplY3Qoe30pOworICAgICAqIC8vID0+IHRy dWUKKyAgICAgKgorICAgICAqIF8uaXNPYmplY3QoWzEsIDIsIDNdKTsKKyAgICAgKiAvLyA9PiB0 cnVlCisgICAgICoKKyAgICAgKiBfLmlzT2JqZWN0KDEpOworICAgICAqIC8vID0+IGZhbHNlCisg ICAgICovCisgICAgZ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gPT4gdHJ1ZQorICAgICAqCisgICAg ICogaXNOYU4odW5kZWZpbmVkKTsKKyAgICAgKiAvLyA9PiB0cnVlCisgICAgICoKKyAgICAgKiBf LmlzTmFOKHVuZGVmaW5lZCk7CisgICAgICogLy8gPT4gZmFsc2UKKyAgICAgKi8KKyAgICBmdW5j dGlvbiBpc05hTih2YWx1ZSkgeworICAgICAgLy8gYE5hTmAgYXMgYSBwcmltaXRpdmUgaXMgdGhl IG9ubHkgdmFsdWUgdGhhdCBpcyBub3QgZXF1YWwgdG8gaXRzZWxmCisgICAgICAvLyAocGVyZm9y bSB0aGUgW1tDbGFzc11dIGNoZWNrIGZpcnN0IHRvIGF2b2lkIGVycm9ycyB3aXRoIHNvbWUgaG9z dCBvYmplY3RzIGluIElFKQorICAgICAgcmV0dXJuIGlzTnVtYmVyKHZhbHVlKSAmJiB2YWx1ZSAh PSArdmFsdWU7CisgICAgfQorCisgICAgLyoqCisgICAgICogQ2hlY2tzIGlmIGB2YWx1ZWAgaXMg YG51bGxgLgorICAgICAqCisgICAgICogQHN0YXRpYworICAgICAqIEBtZW1iZXJPZiBfCisgICAg ICogQGNhdGVnb3J5IE9iamVjdHMKKyAgICAgKiBAcGFyYW0geyp9IHZhbHVlIFRoZSB2YWx1ZSB0 byBjaGVjay4KKyAgICAgKiBAcmV0dXJucyB7Ym9vbGVhbn0gUmV0dXJucyBgdHJ1ZWAgaWYgdGhl IGB2YWx1ZWAgaXMgYG51bGxgLCBlbHNlIGBmYWxzZWAuCisgICAgICogQGV4YW1wbGUKKyAgICAg KgorICAgICAqIF8uaXNOdWxsKG51bGwpOworICAgICAqIC8vID0+IHRydWUKKyAgICAgKgorICAg ICAqIF8uaXNOdWxsKHVuZGVmaW5lZCk7CisgICAgICogLy8gPT4gZmFsc2UKKyAgICAgKi8KKyAg ICBmdW5jdGlvbiBpc051bGwodmFsdWUpIHsKKyAgICAgIHJldHVybiB2YWx1ZSA9PT0gbnVsbDsK KyAgICB9CisKKyAgICAvKio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lzIGEg cGxhaW4gb2JqZWN0LCBlbHNlIGBmYWxzZWAuCisgICAgICogQGV4YW1wbGUKKyAgICAgKgorICAg ICAqIGZ1bmN0aW9uIFNoYXBlKCkgeworICAgICAqICAgdGhpcy54ID0gMDsKKyAgICAgKiAgIHRo aXMueSA9IDA7CisgICAgICogfQorICAgICAqCisgICAgICogXy5pc1BsYWluT2JqZWN0KG5ldyBT aGFwZSk7CisgICAgICogLy8gPT4gZmFsc2UKKyAgICAgKgorICAgICAqIF8uaXNQbGFpbk9iamVj dChbMSwgMiwgM10pOworICAgICAqIC8vID0+IGZhbHNlCisgICAgICoKKyAgICAgKiBfLmlzUGxh aW5PYmplY3QoeyAneCc6IDAsICd5JzogMCB9KTsKKyAgICAgKiAvLyA9PiB0cnVlCisgICAgICov CisgICAgdmFyIGlzUGxhaW5PYmplY3QgPSAhZ2V0UHJvdG90eXBlT2YgPyBzaGltSXNQbGFpbk9i amVjdCA6IGZ1bmN0aW9uKHZhbHVlKSB7CisgICAgICBpZiAoISh2YWx1ZSAmJiB0b1N0cmluZy5j YWxsKHZhbHVlKSA9PSBvYmplY3RDbGFzcykpIHsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAg ICAgfQorICAgICAgdmFyIHZhbHVlT2YgPSB2YWx1ZS52YWx1ZU9mLAorICAgICAgICAgIG9ialBy b3RvID0gaXNOYXRpdmUodmFsdWVPZikgJiYgKG9ialByb3RvID0gZ2V0UHJvdG90eXBlT2YodmFs dWVPZikpICYmIGdldFByb3RvdHlwZU9mKG9ialByb3RvKTsKKworICAgICAgcmV0dXJuIG9ialBy b3RvCisgICAgICAgID8gKHZhbHVlID09IG9ialByb3RvIHx8IGdldFByb3RvdHlwZU9mKHZhbHVl KSA9PSBvYmpQcm90bykKKyAgICAgICAgOiBzaGltSXNQbGFpbk9iamVjdCh2YWx1ZSk7CisgICAg fTsKKworICAgIC8qKgorICAgICAqIENoZWNrcyBpZiBgdmFsdWVgIGlzIGEgcmVndWxhciBleHBy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nIHByb3BlcnRpZXMuCisgICAg ICogQHBhcmFtIHsqfSBbdGhpc0FyZ10gVGhlIGB0aGlzYCBiaW5kaW5nIG9mIGBjYWxsYmFja2Au CisgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyB0aGUgZGVzdGluYXRpb24gb2JqZWN0 LgorICAgICAqIEBleGFtcGxlCisgICAgICoKKyAgICAgKiB2YXIgbmFtZXMgPSB7CisgICAgICog ICAnY2hhcmFjdGVycyc6IFsKKyAgICAgKiAgICAgeyAnbmFtZSc6ICdiYXJuZXknIH0sCisgICAg ICogICAgIHsgJ25hbWUnOiAnZnJlZCcgfQorICAgICAqICAgXQorICAgICAqIH07CisgICAgICoK KyAgICAgKiB2YXIgYWdlcyA9IHsKKyAgICAgKiAgICdjaGFyYWN0ZXJzJzogWworICAgICAqICAg ICB7ICdhZ2UnOiAzNiB9LAorICAgICAqICAgICB7ICdhZ2UnOiA0MCB9CisgICAgICogICBdCisg ICAgICogfTsKKyAgICAgKgorICAgICAqIF8ubWVyZ2UobmFtZXMsIGFnZXMpOworICAgICAqIC8v ID0+IHsgJ2NoYXJhY3RlcnMnOiBbeyAnbmFtZSc6ICdiYXJuZXknLCAnYWdlJzogMzYgfSwgeyAn bmFtZSc6ICdmcmVkJywgJ2FnZSc6IDQwIH1dIH0KKyAgICAgKgorICAgICAqIHZhciBmb29kID0g eworICAgICAqICAgJ2ZydWl0cyc6IFsnYXBwbGUnXSwKKyAgICAgKiAgICd2ZWdldGFibGVzJzog WydiZWV0J10KKyAgICAgKiB9OworICAgICAqCisgICAgICogdmFyIG90aGVyRm9vZCA9IHsKKyAg ICAgKiAgICdmcnVpdHMnOiBbJ2JhbmFuYSddLAorICAgICAqICAgJ3ZlZ2V0YWJsZXMnOiBbJ2Nh cnJvdCddCisgICAgICogfTsKKyAgICAgKgorICAgICAqIF8ubWVyZ2UoZm9vZCwgb3RoZXJGb29k LCBmdW5jdGlvbihhLCBiKSB7CisgICAgICogICByZXR1cm4gXy5pc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mplY3QuCisgICAgICog QHBhcmFtIHtGdW5jdGlvbnwuLi5zdHJpbmd8c3RyaW5nW119IFtjYWxsYmFja10gVGhlIHByb3Bl cnRpZXMgdG8gb21pdCBvciB0aGUKKyAgICAgKiAgZnVuY3Rpb24gY2FsbGVkIHBlciBpdGVyYXRp b24uCisgICAgICogQHBhcmFtIHsqfSBbdGhpc0FyZ10gVGhlIGB0aGlzYCBiaW5kaW5nIG9mIGBj YWxsYmFja2AuCisgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyBhbiBvYmplY3Qgd2l0 aG91dCB0aGUgb21pdHRlZCBwcm9wZXJ0aWVzLgorICAgICAqIEBleGFtcGxlCisgICAgICoKKyAg ICAgKiBfLm9taXQoeyAnbmFtZSc6ICdmcmVkJywgJ2FnZSc6IDQwIH0sICdhZ2UnKTsKKyAgICAg KiAvLyA9PiB7ICduYW1lJzogJ2ZyZWQnIH0KKyAgICAgKgorICAgICAqIF8ub21pdCh7ICduYW1l JzogJ2ZyZWQnLCAnYWdlJzogNDAgfSwgZnVuY3Rpb24odmFsdWUpIHsKKyAgICAgKiAgIHJldHVy biB0eXBlb2YgdmFsdWUgPT0gJ251bWJlcic7CisgICAgICogfSk7CisgICAgICogLy8gPT4geyAn bmFtZSc6ICdmcmVkJyB9CisgICAgICovCisgICAgZnVuY3Rpb24gb21pdChvYmplY3QsIGNhbGxi YWNrLCB0aGlzQXJnKSB7CisgICAgICB2YXIgcmVzdWx0ID0ge307CisgICAgICBpZiAodHlwZW9m IGNhbGxiYWNrICE9ICdmdW5jdGlvbicpIHsKKyAgICAgICAgdmFyIHByb3BzID0gW107CisgICAg ICAgIGZvckluKG9iamVjdCwgZnVuY3Rpb24odmFsdWUsIGtleSkgeworICAgICAgICAgIHByb3Bz LnB1c2goa2V5KTsKKyAgICAgICAgfSk7CisgICAgICAgIHByb3BzID0gYmFzZURpZmZlcmVuY2Uo cHJvcHMsIGJhc2VGbGF0dGVuKGFyZ3VtZW50cywgdHJ1ZSwgZmFsc2UsIDEpKTsKKworICAgICAg ICB2YXIgaW5kZXggPSAtMSwKKyAgICAgICAgICAgIGxlbmd0aCA9IHByb3BzLmxlbmd0aDsKKwor ICAgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgeworICAgICAgICAgIHZhciBrZXkgPSBw cm9wc1tpbmRleF07CisgICAgICAgICAgcmVzdWx0W2tleV0gPSBvYmplY3Rba2V5XTsKKyAgICAg ICAgfQorICAgICAgfSBlbHNlIHsKKyAgICAgICAgY2FsbGJhY2sgPSBsb2Rhc2guY3JlYXRlQ2Fs bGJhY2soY2FsbGJhY2ssIHRoaXNBcmcsIDMpOworICAgICAgICBmb3JJbihvYmplY3QsIGZ1bmN0 aW9uKHZhbHVlLCBrZXksIG9iamVjdCkgeworICAgICAgICAgIGlmICghY2FsbGJhY2sodmFsdWUs IGtleSwgb2JqZWN0KSkgeworICAgICAgICAgICAgcmVzdWx0W2tleV0gPSB2YWx1ZTsKKyAgICAg ICAgICB9CisgICAgICAgIH0pOworICAgICAgfQorICAgICAgcmV0dXJuIHJlc3VsdDsKKyAgICB9 CisKKyAgICAvKioKKyAgICAgKiBDcmVhdGVzIGEgdHdvIGRpbWVuc2lvbmFsIGFycmF5IG9mIGFu IG9iamVjdCdzIGtleS12YWx1ZSBwYWlycywKKyAgICAgKiBpLmUuIGBbW2tleTEsIHZhbHVlMV0s IFtrZXkyLCB2YWx1ZTJdXWAuCisgICAgICoKKyAgICAgKiBAc3RhdGljCisgICAgICogQG1lbWJl ck9mIF8KKyAgICAgKiBAY2F0ZWdvcnkgT2JqZWN0cworICAgICAqIEBwYXJhbSB7T2JqZWN0fSBv YmplY3QgVGhlIG9iamVjdCB0byBpbnNwZWN0LgorICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0 dXJucyBuZXcgYXJyYXkgb2Yga2V5LXZhbHVlIHBhaXJzLgorICAgICAqIEBleGFtcGxlCisgICAg ICoKKyAgICAgKiBfLnBhaXJzKHsgJ2Jhcm5leSc6IDM2LCAnZnJlZCc6IDQwIH0pOworICAgICAq IC8vID0+IFtbJ2Jhcm5leScsIDM2XSwgWydmcmVkJywgNDBdXSAocHJvcGVydHkgb3JkZXIgaXMg bm90IGd1YXJhbnRlZWQgYWNyb3NzIGVudmlyb25tZW50cykKKyAgICAgKi8KKyAgICBmdW5jdGlv biBwYWlycyhvYmplY3QpIHsKKyAgICAgIHZhciBpbmRleCA9IC0xLAorICAgICAgICAgIHByb3Bz ID0ga2V5cyhvYmplY3QpLAorICAgICAgICAgIGxlbmd0aCA9IHByb3BzLmxlbmd0aCwKKyAgICAg ICAgICByZXN1bHQgPSBBcnJheShsZW5ndGgpOworCisgICAgICB3aGlsZSAoKytpbmRleCA8IGxl bmd0aCkgeworICAgICAgICB2YXIga2V5ID0gcHJvcHNbaW5kZXhdOworICAgICAgICByZXN1bHRb aW5kZXhdID0gW2tleSwgb2JqZWN0W2tleV1dOworICAgICAgfQorICAgICAgcmV0dXJuIHJlc3Vs dDsKKyAgICB9CisKKyAgICAvKioKKyAgICAgKiBDcmVhdGVzIGEgc2hhbGxvdyBjbG9uZSBvZiBg b2JqZWN0YCBjb21wb3NlZCBvZiB0aGUgc3BlY2lmaWVkIHByb3BlcnRpZXMuCisgICAgICogUHJv cGVydHkgbmFtZXMgbWF5IGJlIHNwZWNpZmllZCBhcyBpbmRpdmlkdWFsIGFyZ3VtZW50cyBvciBh cyBhcnJheXMgb2YKKyAgICAgKiBwcm9wZXJ0eSBuYW1lcy4gSWYgYSBjYWxsYmFjayBpcyBwcm92 aWRlZCBpdCB3aWxsIGJlIGV4ZWN1dGVkIGZvciBlYWNoCisgICAgICogcHJvcGVydHkgb2YgYG9i amVjdGAgcGlja2luZyB0aGUgcHJvcGVydGllcyB0aGUgY2FsbGJhY2sgcmV0dXJucyB0cnVleQor ICAgICAqIGZvci4gVGhlIGNhbGxiYWNrIGlzIGJvdW5kIHRvIGB0aGlzQXJnYCBhbmQgaW52b2tl ZCB3aXRoIHRocmVlIGFyZ3VtZW50czsKKyAgICAgKiAodmFsdWUsIGtleSwgb2JqZWN0KS4KKyAg ICAgKgorICAgICAqIEBzdGF0aWMKKyAgICAgKiBAbWVtYmVyT2YgXworICAgICAqIEBjYXRlZ29y eSBPYmplY3RzCisgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVjdCBUaGUgc291cmNlIG9iamVj dC4KKyAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufC4uLnN0cmluZ3xzdHJpbmdbXX0gW2NhbGxiYWNr XSBUaGUgZnVuY3Rpb24gY2FsbGVkIHBlcgorICAgICAqICBpdGVyYXRpb24gb3IgcHJvcGVydHkg bmFtZXMgdG8gcGljaywgc3BlY2lmaWVkIGFzIGluZGl2aWR1YWwgcHJvcGVydHkKKyAgICAgKiAg bmFtZXMgb3IgYXJyYXlzIG9mIHByb3BlcnR5IG5hbWVzLgorICAgICAqIEBwYXJhbSB7Kn0gW3Ro aXNBcmddIFRoZSBgdGhpc2AgYmluZGluZyBvZiBgY2FsbGJhY2tgLgorICAgICAqIEByZXR1cm5z IHtPYmplY3R9IFJldHVybnMgYW4gb2JqZWN0IGNvbXBvc2VkIG9mIHRoZSBwaWNrZWQgcHJvcGVy dGllcy4KKyAgICAgKiBAZXhhbXBsZQorICAgICAqCisgICAgICogXy5waWNrKHsgJ25hbWUnOiAn ZnJlZCcsICdfdXNlcmlkJzogJ2ZyZWQxJyB9LCAnbmFtZScpOworICAgICAqIC8vID0+IHsgJ25h bWUnOiAnZnJlZCcgfQorICAgICAqCisgICAgICogXy5waWNrKHsgJ25hbWUnOiAnZnJlZCcsICdf dXNlcmlkJzogJ2ZyZWQxJyB9LCBmdW5jdGlvbih2YWx1ZSwga2V5KSB7CisgICAgICogICByZXR1 cm4ga2V5LmNoYXJBdCgwKSAhPSAnXyc7CisgICAgICogfSk7CisgICAgICogLy8gPT4geyAnbmFt ZSc6ICdmcmVkJyB9CisgICAgICovCisgICAgZnVuY3Rpb24gcGljayhvYmplY3QsIGNhbGxiYWNr LCB0aGlzQXJnKSB7CisgICAgICB2YXIgcmVzdWx0ID0ge307CisgICAgICBpZiAodHlwZW9mIGNh bGxiYWNrICE9ICdmdW5jdGlvbicpIHsKKyAgICAgICAgdmFyIGluZGV4ID0gLTEsCisgICAgICAg ICAgICBwcm9wcyA9IGJhc2VGbGF0dGVuKGFyZ3VtZW50cywgdHJ1ZSwgZmFsc2UsIDEpLAorICAg ICAgICAgICAgbGVuZ3RoID0gaXNPYmplY3Qob2JqZWN0KSA/IHByb3BzLmxlbmd0aCA6IDA7CisK KyAgICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKKyAgICAgICAgICB2YXIga2V5ID0g cHJvcHNbaW5kZXhdOworICAgICAgICAgIGlmIChrZXkgaW4gb2JqZWN0KSB7CisgICAgICAgICAg ICByZXN1bHRba2V5XSA9IG9iamVjdFtrZXldOworICAgICAgICAgIH0KKyAgICAgICAgfQorICAg ICAgfSBlbHNlIHsKKyAgICAgICAgY2FsbGJhY2sgPSBsb2Rhc2guY3JlYXRlQ2FsbGJhY2soY2Fs bGJhY2ssIHRoaXNBcmcsIDMpOworICAgICAgICBmb3JJbihvYmplY3QsIGZ1bmN0aW9uKHZhbHVl LCBrZXksIG9iamVjdCkgeworICAgICAgICAgIGlmIChjYWxsYmFjayh2YWx1ZSwga2V5LCBvYmpl Y3QpKSB7CisgICAgICAgICAgICByZXN1bHRba2V5XSA9IHZhbHVlOworICAgICAgICAgIH0KKyAg ICAgICAgfSk7CisgICAgICB9CisgICAgICByZXR1cm4gcmVzdWx0OworICAgIH0KKworICAgIC8q KgorICAgICAqIEFuIGFsdGVybmF0aXZlIHRvIGBfLnJlZHVjZWAgdGhpcyBtZXRob2QgdHJhbnNm b3JtcyBgb2JqZWN0YCB0byBhIG5ldworICAgICAqIGBhY2N1bXVsYXRvcmAgb2JqZWN0IHdoaWNo IGlzIHRoZSByZXN1bHQgb2YgcnVubmluZyBlYWNoIG9mIGl0cyBvd24KKyA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wgZnVuY3Rp b24ocmVzdWx0LCBudW0pIHsKKyAgICAgKiAgIG51bSAqPSBudW07CisgICAgICogICBpZiAobnVt ICUgMikgeworICAgICAqICAgICByZXR1cm4gcmVzdWx0LnB1c2gobnVtKSA8IDM7CisgICAgICog ICB9CisgICAgICogfSk7CisgICAgICogLy8gPT4gWzEsIDksIDI1XQorICAgICAqCisgICAgICog dmFyIG1hcHBlZCA9IF8udHJhbnNmb3JtKHsgJ2EnOiAxLCAnYic6IDIsICdjJzogMyB9LCBmdW5j dGlvbihyZXN1bHQsIG51bSwga2V5KSB7CisgICAgICogICByZXN1bHRba2V5XSA9IG51bSAqIDM7 CisgICAgICogfSk7CisgICAgICogLy8gPT4geyAnYSc6IDMsICdiJzogNiwgJ2MnOiA5IH0KKyAg ICAgKi8KKyAgICBmdW5jdGlvbiB0cmFuc2Zvcm0ob2JqZWN0LCBjYWxsYmFjaywgYWNjdW11bGF0 b3IsIHRoaXNBcmcpIHsKKyAgICAgIHZhciBpc0FyciA9IGlzQXJyYXkob2JqZWN0KTsKKyAgICAg IGlmIChhY2N1bXVsYXRvciA9PSBudWxsKSB7CisgICAgICAgIGlmIChpc0FycikgeworICAgICAg ICAgIGFjY3VtdWxhdG9yID0gW107CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgdmFyIGN0 b3IgPSBvYmplY3QgJiYgb2JqZWN0LmNvbnN0cnVjdG9yLAorICAgICAgICAgICAgICBwcm90byA9 IGN0b3IgJiYgY3Rvci5wcm90b3R5cGU7CisKKyAgICAgICAgICBhY2N1bXVsYXRvciA9IGJhc2VD cmVhdGUocHJvdG8pOworICAgICAgICB9CisgICAgICB9CisgICAgICBpZiAoY2FsbGJhY2spIHsK KyAgICAgICAgY2FsbGJhY2sgPSBsb2Rhc2guY3JlYXRlQ2FsbGJhY2soY2FsbGJhY2ssIHRoaXNB cmcsIDQpOworICAgICAgICAoaXNBcnIgPyBmb3JFYWNoIDogZm9yT3duKShvYmplY3QsIGZ1bmN0 aW9uKHZhbHVlLCBpbmRleCwgb2JqZWN0KSB7CisgICAgICAgICAgcmV0dXJuIGNhbGxiYWNrKGFj Y3VtdWxhdG9yLCB2YWx1ZSwgaW5kZXgsIG9iamVjdCk7CisgICAgICAgIH0pOworICAgICAgfQor ICAgICAgcmV0dXJuIGFjY3VtdWxhdG9yOworICAgIH0KKworICAgIC8qKgorICAgICAqIENyZWF0 ZXMgYW4gYXJyYXkgY29tcG9zZWQgb2YgdGhlIG93biBlbnVtZXJhYmxlIHByb3BlcnR5IHZhbHVl cyBvZiBgb2JqZWN0YC4KKyAgICAgKgorICAgICAqIEBzdGF0aWMKKyAgICAgKiBAbWVtYmVyT2Yg XworICAgICAqIEBjYXRlZ29yeSBPYmplY3RzCisgICAgICogQHBhcmFtIHtPYmplY3R9IG9iamVj dCBUaGUgb2JqZWN0IHRvIGluc3BlY3QuCisgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5z IGFuIGFycmF5IG9mIHByb3BlcnR5IHZhbHVlcy4KKyAgICAgKiBAZXhhbXBsZQorICAgICAqCisg ICAgICogXy52YWx1ZXMoeyAnb25lJzogMSwgJ3R3byc6IDIsICd0aHJlZSc6IDMgfSk7CisgICAg ICogLy8gPT4gWzEsIDIsIDNdIChwcm9wZXJ0eSBvcmRlciBpcyBub3QgZ3VhcmFudGVlZCBhY3Jv c3MgZW52aXJvbm1lbnRzKQorICAgICAqLworICAgIGZ1bmN0aW9uIHZhbHVlcyhvYmplY3QpIHsK KyAgICAgIHZhciBpbmRleCA9IC0xLAorICAgICAgICAgIHByb3BzID0ga2V5cyhvYmplY3QpLAor ICAgICAgICAgIGxlbmd0aCA9IHByb3BzLmxlbmd0aCwKKyAgICAgICAgICByZXN1bHQgPSBBcnJh eShsZW5ndGgpOworCisgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgeworICAgICAgICBy ZXN1bHRbaW5kZXhdID0gb2JqZWN0W3Byb3BzW2luZGV4XV07CisgICAgICB9CisgICAgICByZ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wZWN0aXZlbHku CisgICAgICogQHBhcmFtIHsqfSBbdGhpc0FyZ10gVGhlIGB0aGlzYCBiaW5kaW5nIG9mIGBjYWxs YmFja2AuCisgICAgICogQHJldHVybnMge2Jvb2xlYW59IFJldHVybnMgYHRydWVgIGlmIGFsbCBl bGVtZW50cyBwYXNzZWQgdGhlIGNhbGxiYWNrIGNoZWNrLAorICAgICAqICBlbHNlIGBmYWxzZWAu CisgICAgICogQGV4YW1wbGUKKyAgICAgKgorICAgICAqIF8uZXZlcnkoW3RydWUsIDEsIG51bGws ICd5ZXMnXSk7CisgICAgICogLy8gPT4gZmFsc2UKKyAgICAgKgorICAgICAqIHZhciBjaGFyYWN0 ZXJzID0gWworICAgICAqICAgeyAnbmFtZSc6ICdiYXJuZXknLCAnYWdlJzogMzYgfSwKKyAgICAg KiAgIHsgJ25hbWUnOiAnZnJlZCcsICAgJ2FnZSc6IDQwIH0KKyAgICAgKiBdOworICAgICAqCisg ICAgICogLy8gdXNpbmcgIl8ucGx1Y2siIGNhbGxiYWNrIHNob3J0aGFuZAorICAgICAqIF8uZXZl cnkoY2hhcmFjdGVycywgJ2FnZScpOworICAgICAqIC8vID0+IHRydWUKKyAgICAgKgorICAgICAq IC8vIHVzaW5nICJfLndoZXJlIiBjYWxsYmFjayBzaG9ydGhhbmQKKyAgICAgKiBfLmV2ZXJ5KGNo YXJhY3RlcnMsIHsgJ2FnZSc6IDM2IH0pOworICAgICAqIC8vID0+IGZhbHNlCisgICAgICovCisg ICAgZnVuY3Rpb24gZXZlcnkoY29sbGVjdGlvbiwgY2FsbGJhY2ssIHRoaXNBcmcpIHsKKyAgICAg IHZhciByZXN1bHQgPSB0cnVlOworICAgICAgY2FsbGJhY2sgPSBsb2Rhc2guY3JlYXRlQ2FsbGJh Y2soY2FsbGJhY2ssIHRoaXNBcmcsIDMpOworCisgICAgICB2YXIgaW5kZXggPSAtMSwKKyAgICAg ICAgICBsZW5ndGggPSBjb2xsZWN0aW9uID8gY29sbGVjdGlvbi5sZW5ndGggOiAwOworCisgICAg ICBpZiAodHlwZW9mIGxlbmd0aCA9PSAnbnVtYmVyJykgeworICAgICAgICB3aGlsZSAoKytpbmRl eCA8IGxlbmd0aCkgeworICAgICAgICAgIGlmICghKHJlc3VsdCA9ICEhY2FsbGJhY2soY29sbGVj dGlvbltpbmRleF0sIGluZGV4LCBjb2xsZWN0aW9uKSkpIHsKKyAgICAgICAgICAgIGJyZWFrOwor ICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgfSBlbHNlIHsKKyAgICAgICAgZm9yT3duKGNv bGxlY3Rpb24sIGZ1bmN0aW9uKHZhbHVlLCBpbmRleCwgY29sbGVjdGlvbikgeworICAgICAgICAg IHJldHVybiAocmVzdWx0ID0gISFjYWxsYmFjayh2YWx1ZSwgaW5kZXgsIGNvbGxlY3Rpb24pKTsK KyAgICAgICAgfSk7CisgICAgICB9CisgICAgICByZXR1cm4gcmVzdWx0OworICAgIH0KKworICAg IC8qKgorICAgICAqIEl0ZXJhdGVzIG92ZXIgZWxlbWVudHMgb2YgYSBjb2xsZWN0aW9uLCByZXR1 cm5pbmcgYW4gYXJyYXkgb2YgYWxsIGVsZW1lbnRzCisgICAgICogdGhlIGNhbGxiYWNrIHJldHVy bnMgdHJ1ZXkgZm9yLiBUaGUgY2FsbGJhY2sgaXMgYm91bmQgdG8gYHRoaXNBcmdgIGFuZAorICAg ICAqIGludm9rZWQgd2l0aCB0aHJlZSBhcmd1bWVudHM7ICh2YWx1ZSwgaW5kZXh8a2V5LCBjb2xs ZWN0aW9uKS4KKyAgICAgKgorICAgICAqIElmIGEgcHJvcGVydHkgbmFtZSBpcyBwcm92aWRlZCBm b3IgYGNhbGxiYWNrYCB0aGUgY3JlYXRlZCAiXy5wbHVjayIgc3R5bGUKKyAgICAgKiBjYWxsYmFj ayB3aWxsIHJldHVybiB0aGUgcHJvcGVydHkgdmFsdWUgb2YgdGhlIGdpdmVuIGVsZW1lbnQuCisg ICAgICoKKyAgICAgKiBJZ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u dW1iZXInKSB7CisgICAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7CisgICAgICAgICAg dmFyIHZhbHVlID0gY29sbGVjdGlvbltpbmRleF07CisgICAgICAgICAgaWYgKGNhbGxiYWNrKHZh bHVlLCBpbmRleCwgY29sbGVjdGlvbikpIHsKKyAgICAgICAgICAgIHJlc3VsdC5wdXNoKHZhbHVl KTsKKyAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIH0gZWxzZSB7CisgICAgICAgIGZvck93 bihjb2xsZWN0aW9uLCBmdW5jdGlvbih2YWx1ZSwgaW5kZXgsIGNvbGxlY3Rpb24pIHsKKyAgICAg ICAgICBpZiAoY2FsbGJhY2sodmFsdWUsIGluZGV4LCBjb2xsZWN0aW9uKSkgeworICAgICAgICAg ICAgcmVzdWx0LnB1c2godmFsdWUpOworICAgICAgICAgIH0KKyAgICAgICAgfSk7CisgICAgICB9 CisgICAgICByZXR1cm4gcmVzdWx0OworICAgIH0KKworICAgIC8qKgorICAgICAqIEl0ZXJhdGVz IG92ZXIgZWxlbWVudHMgb2YgYSBjb2xsZWN0aW9uLCByZXR1cm5pbmcgdGhlIGZpcnN0IGVsZW1l bnQgdGhhdAorICAgICAqIHRoZSBjYWxsYmFjayByZXR1cm5zIHRydWV5IGZvci4gVGhlIGNhbGxi YWNrIGlzIGJvdW5kIHRvIGB0aGlzQXJnYCBhbmQKKyAgICAgKiBpbnZva2VkIHdpdGggdGhyZWUg YXJndW1lbnRzOyAodmFsdWUsIGluZGV4fGtleSwgY29sbGVjdGlvbikuCisgICAgICoKKyAgICAg KiBJZiBhIHByb3BlcnR5IG5hbWUgaXMgcHJvdmlkZWQgZm9yIGBjYWxsYmFja2AgdGhlIGNyZWF0 ZWQgIl8ucGx1Y2siIHN0eWxlCisgICAgICogY2FsbGJhY2sgd2lsbCByZXR1cm4gdGhlIHByb3Bl cnR5IHZhbHVlIG9mIHRoZSBnaXZlbiBlbGVtZW50LgorICAgICAqCisgICAg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i5sZW5ndGggOiAwOwor CisgICAgICBpZiAodHlwZW9mIGxlbmd0aCA9PSAnbnVtYmVyJykgeworICAgICAgICB3aGlsZSAo KytpbmRleCA8IGxlbmd0aCkgeworICAgICAgICAgIHZhciB2YWx1ZSA9IGNvbGxlY3Rpb25baW5k ZXhdOworICAgICAgICAgIGlmIChjYWxsYmFjayh2YWx1ZSwgaW5kZXgsIGNvbGxlY3Rpb24pKSB7 CisgICAgICAgICAgICByZXR1cm4gdmFsdWU7CisgICAgICAgICAgfQorICAgICAgICB9CisgICAg ICB9IGVsc2UgeworICAgICAgICB2YXIgcmVzdWx0OworICAgICAgICBmb3JPd24oY29sbGVjdGlv biwgZnVuY3Rpb24odmFsdWUsIGluZGV4LCBjb2xsZWN0aW9uKSB7CisgICAgICAgICAgaWYgKGNh bGxiYWNrKHZhbHVlLCBpbmRleCwgY29sbGVjdGlvbikpIHsKKyAgICAgICAgICAgIHJlc3VsdCA9 IHZhbHVlOworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICAgIH0KKyAgICAgICAg fSk7CisgICAgICAgIHJldHVybiByZXN1bHQ7CisgICAgICB9CisgICAgfQorCisgICAgLyoqCisg ICAgICogVGhpcyBtZXRob2QgaXMgbGlrZSBgXy5maW5kYCBleGNlcHQgdGhhdCBpdCBpdGVyYXRl cyBvdmVyIGVsZW1lbnRzCisgICAgICogb2YgYSBgY29sbGVjdGlvbmAgZnJvbSByaWdodCB0byBs ZWZ0LgorICAgICAqCisgICAgICogQHN0YXRpYworICAgICAqIEBtZW1iZXJPZiBfCisgICAgICog QGNhdGVnb3J5IENvbGxlY3Rpb25zCisgICAgICogQHBhcmFtIHtBcnJheXxPYmplY3R8c3RyaW5n fSBjb2xsZWN0aW9uIFRoZSBjb2xsZWN0aW9uIHRvIGl0ZXJhdGUgb3Zlci4KKyAgICAgKiBAcGFy YW0ge0Z1bmN0aW9ufE9iamVjdHxzdHJpbmd9IFtjYWxsYmFjaz1pZGVudGl0eV0gVGhlIGZ1bmN0 aW9uIGNhbGxlZAorICAgICAqICBwZXIgaXRlcmF0aW9uLiBJZiBhIHByb3BlcnR5IG5hbWUgb3Ig b2JqZWN0IGlzIHByb3ZpZGVkIGl0IHdpbGwgYmUgdXNlZAorICAgICAqICB0byBjcmVhdGUgYSAi Xy5wbHVjayIgb3IgIl8ud2hlcmUiIHN0eWxlIGNhbGxiYWNrLCByZXNwZWN0aXZlbHkuCisgICAg ICogQHBhcmFtIHsqfSBbdGhpc0FyZ10gVGhlIGB0aGlzYCBiaW5kaW5nIG9mIGBjYWxsYmFja2Au CisgICAgICogQHJldHVybnMgeyp9IFJldHVybnMgdGhlIGZvdW5kIGVsZW1lbnQsIGVsc2UgYHVu ZGVmaW5lZGAuCisgICAgICogQGV4YW1wbGUKKyAgICAgKgorICAgICAqIF8uZmluZExhc3QoWzEs IDIsIDMsIDRdLCBmdW5jdGlvbihudW0pIHsKKyAgICAgKiAgIHJldHVybiBudW0gJSAyID09IDE7 CisgICAgICogfSk7CisgICAgICogLy8gPT4gMworICAgICAqLworICAgIGZ1bmN0aW9uIGZpbmRM YXN0KGNvbGxlY3Rpb24sIGNhbGxiYWNrLCB0aGlzQXJnKSB7CisgICAgICB2YXIgcmVzdWx0Owor ICAgICAgY2FsbGJhY2sgPSBsb2Rhc2guY3JlYXRlQ2FsbGJhY2soY2FsbGJhY2ssIHRoaXNBcmcs IDMpOworICAgICAgZm9yRWFjaFJpZ2h0KGNvbGxlY3Rpb24sIGZ1bmN0aW9uKHZhbHVlLCBpbmRl eCwgY29sbGVjdGlvbikgeworICAgICAgICBpZiAoY2FsbGJhY2sodmFsdWUsIGluZGV4LCBjb2xs ZWN0aW9uKSkgeworICAgICAgICAgIHJlc3VsdCA9IHZhbHVlOworICAgICAgICAgIHJldHVybiBm YWxzZTsKKyAgICAgICAgfQorICAgICAgfSk7CisgICAgICByZXR1cm4gcmVzdWx0OworICAgIH0K KworICAgIC8qKgorICAgICAqIEl0ZXJhdGVzIG92ZXIg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md9IFJldHVybnMgYGNvbGxlY3Rpb25gLgorICAgICAqIEBleGFtcGxlCisgICAgICoK KyAgICAgKiBfKFsxLCAyLCAzXSkuZm9yRWFjaChmdW5jdGlvbihudW0pIHsgY29uc29sZS5sb2co bnVtKTsgfSkuam9pbignLCcpOworICAgICAqIC8vID0+IGxvZ3MgZWFjaCBudW1iZXIgYW5kIHJl dHVybnMgJzEsMiwzJworICAgICAqCisgICAgICogXy5mb3JFYWNoKHsgJ29uZSc6IDEsICd0d28n OiAyLCAndGhyZWUnOiAzIH0sIGZ1bmN0aW9uKG51bSkgeyBjb25zb2xlLmxvZyhudW0pOyB9KTsK KyAgICAgKiAvLyA9PiBsb2dzIGVhY2ggbnVtYmVyIGFuZCByZXR1cm5zIHRoZSBvYmplY3QgKHBy b3BlcnR5IG9yZGVyIGlzIG5vdCBndWFyYW50ZWVkIGFjcm9zcyBlbnZpcm9ubWVudHMpCisgICAg ICovCisgICAgZnVuY3Rpb24gZm9yRWFjaChjb2xsZWN0aW9uLCBjYWxsYmFjaywgdGhpc0FyZykg eworICAgICAgdmFyIGluZGV4ID0gLTEsCisgICAgICAgICAgbGVuZ3RoID0gY29sbGVjdGlvbiA/ IGNvbGxlY3Rpb24ubGVuZ3RoIDogMDsKKworICAgICAgY2FsbGJhY2sgPSBjYWxsYmFjayAmJiB0 eXBlb2YgdGhpc0FyZyA9PSAndW5kZWZpbmVkJyA/IGNhbGxiYWNrIDogYmFzZUNyZWF0ZUNhbGxi YWNrKGNhbGxiYWNrLCB0aGlzQXJnLCAzKTsKKyAgICAgIGlmICh0eXBlb2YgbGVuZ3RoID09ICdu dW1iZXInKSB7CisgICAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7CisgICAgICAgICAg aWYgKGNhbGxiYWNrKGNvbGxlY3Rpb25baW5kZXhdLCBpbmRleCwgY29sbGVjdGlvbikgPT09IGZh bHNlKSB7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICB9CisgICAgICAg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uZCBgdGhpc2AgYm91bmQgdG8sIGVhY2ggZWxlbWVudCBpbiB0 aGUgYGNvbGxlY3Rpb25gLgorICAgICAqCisgICAgICogQHN0YXRpYworICAgICAqIEBtZW1iZXJP ZiBfCisgICAgICogQGNhdGVnb3J5IENvbGxlY3Rpb25zCisgICAgICogQHBhcmFtIHtBcnJheXxP YmplY3R8c3RyaW5nfSBjb2xsZWN0aW9uIFRoZSBjb2xsZWN0aW9uIHRvIGl0ZXJhdGUgb3Zlci4K KyAgICAgKiBAcGFyYW0ge0Z1bmN0aW9ufHN0cmluZ30gbWV0aG9kTmFtZSBUaGUgbmFtZSBvZiB0 aGUgbWV0aG9kIHRvIGludm9rZSBvcgorICAgICAqICB0aGUgZnVuY3Rpb24gaW52b2tlZCBwZXIg aXRlcmF0aW9uLgorICAgICAqIEBwYXJhbSB7Li4uKn0gW2FyZ10gQXJndW1lbnRzIHRvIGludm9r ZSB0aGUgbWV0aG9kIHdpdGguCisgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIGEgbmV3 IGFycmF5IG9mIHRoZSByZXN1bHRzIG9mIGVhY2ggaW52b2tlZCBtZXRob2QuCisgICAgICogQGV4 YW1wbGUKKyAgICAgKgorICAgICAqIF8uaW52b2tlKFtbNSwgMSwgN10sIFszLCAyLCAxXV0sICdz b3J0Jyk7CisgICAgICogLy8gPT4gW1sxLCA1LCA3XSwgWzEsIDIsIDNdXQorICAgICAqCisgICAg ICogXy5pbnZva2UoWzEyMywgNDU2XSwgU3RyaW5nLnByb3RvdHlwZS5zcGxpdCwgJycpOworICAg ICAqIC8vID0+IFtbJzEnLCAnMicsICczJ10sIFsnNCcsICc1JywgJzYnXV0KKyAgICAgKi8KKyAg ICBmdW5jdGlvbiBpbnZva2UoY29sbGVjdGlvbiwgbWV0aG9kTmFtZSkgeworICAgICAgdmFyIGFy Z3MgPSBzbGljZShhcmd1bWVudHMsIDIpLAorICAgICAgICAgIGluZGV4ID0gLTEsCisgICAgICAg ICAgaX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VsdCkgeworICAgICAgICAg ICAgcmVzdWx0ID0gdmFsdWU7CisgICAgICAgICAgfQorICAgICAgICB9CisgICAgICB9IGVsc2Ug eworICAgICAgICBjYWxsYmFjayA9IChjYWxsYmFjayA9PSBudWxsICYmIGlzU3RyaW5nKGNvbGxl Y3Rpb24pKQorICAgICAgICAgID8gY2hhckF0Q2FsbGJhY2sKKyAgICAgICAgICA6IGxvZGFzaC5j cmVhdGVDYWxsYmFjayhjYWxsYmFjaywgdGhpc0FyZywgMyk7CisKKyAgICAgICAgZm9yRWFjaChj b2xsZWN0aW9uLCBmdW5jdGlvbih2YWx1ZSwgaW5kZXgsIGNvbGxlY3Rpb24pIHsKKyAgICAgICAg ICB2YXIgY3VycmVudCA9IGNhbGxiYWNrKHZhbHVlLCBpbmRleCwgY29sbGVjdGlvbik7CisgICAg ICAgICAgaWYgKGN1cnJlbnQgPiBjb21wdXRlZCkgeworICAgICAgICAgICAgY29tcHV0ZWQgPSBj dXJyZW50OworICAgICAgICAgICAgcmVzdWx0ID0gdmFsdWU7CisgICAgICAgICAgfQorICAgICAg ICB9KTsKKyAgICAgIH0KKyAgICAgIHJldHVybiByZXN1bHQ7CisgICAgfQorCisgICAgLyoqCisg ICAgICogUmV0cmlldmVzIHRoZSBtaW5pbXVtIHZhbHVlIG9mIGEgY29sbGVjdGlvbi4gSWYgdGhl IGNvbGxlY3Rpb24gaXMgZW1wdHkgb3IKKyAgICAgKiBmYWxzZXkgYEluZmluaXR5YCBpcyByZXR1 cm5lZC4gSWYgYSBjYWxsYmFjayBpcyBwcm92aWRlZCBpdCB3aWxsIGJlIGV4ZWN1dGVkCisgICAg ICogZm9yIGVhY2ggdmFsdWUgaW4gdGhlIGNvbGxlY3Rpb24gdG8gZ2VuZXJhdGUgdGhlIGNyaXRl cmlvbiBieSB3aGljaCB0aGUgdmFsdWUKKyAgICAgKiBpcyByYW5rZWQuIFRoZSBjYWxsYmFjayBp cyBib3VuZCB0byBgdGhpc0FyZ2AgYW5kIG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gICAgICogQHBhcmFt IHsqfSBbdGhpc0FyZ10gVGhlIGB0aGlzYCBiaW5kaW5nIG9mIGBjYWxsYmFja2AuCisgICAgICog QHJldHVybnMgeyp9IFJldHVybnMgdGhlIG1pbmltdW0gdmFsdWUuCisgICAgICogQGV4YW1wbGUK KyAgICAgKgorICAgICAqIF8ubWluKFs0LCAyLCA4LCA2XSk7CisgICAgICogLy8gPT4gMgorICAg ICAqCisgICAgICogdmFyIGNoYXJhY3RlcnMgPSBbCisgICAgICogICB7ICduYW1lJzogJ2Jhcm5l eScsICdhZ2UnOiAzNiB9LAorICAgICAqICAgeyAnbmFtZSc6ICdmcmVkJywgICAnYWdlJzogNDAg fQorICAgICAqIF07CisgICAgICoKKyAgICAgKiBfLm1pbihjaGFyYWN0ZXJzLCBmdW5jdGlvbihj aHIpIHsgcmV0dXJuIGNoci5hZ2U7IH0pOworICAgICAqIC8vID0+IHsgJ25hbWUnOiAnYmFybmV5 JywgJ2FnZSc6IDM2IH07CisgICAgICoKKyAgICAgKiAvLyB1c2luZyAiXy5wbHVjayIgY2FsbGJh Y2sgc2hvcnRoYW5kCisgICAgICogXy5taW4oY2hhcmFjdGVycywgJ2FnZScpOworICAgICAqIC8v ID0+IHsgJ25hbWUnOiAnYmFybmV5JywgJ2FnZSc6IDM2IH07CisgICAgICovCisgICAgZnVuY3Rp b24gbWluKGNvbGxlY3Rpb24sIGNhbGxiYWNrLCB0aGlzQXJnKSB7CisgICAgICB2YXIgY29tcHV0 ZWQgPSBJbmZpbml0eSwKKyAgICAgICAgICByZXN1bHQgPSBjb21wdXRlZDsKKworICAgICAgLy8g YWxsb3dzIHdvcmtpbmcgd2l0aCBmdW5jdGlvbnMgbGlrZSBgXy5tYXBgIHdpdGhvdXQgdXNpbmcK KyAgICAgIC8vIHRoZWlyIGBpbmRleGAgYXJndW1lbnQgYXMgYSBjYWxsYmFjaworICAgICAgaWYg KHR5cGVvZiBjYWxsYmFjayAhPSAnZnVuY3Rpb24nICYmIHRoaXNBcmcgJiYgdGhpc0FyZ1tjYWxs YmFja10gPT09IGNvbGxlY3Rpb24pIHsKKyAgICAgICAgY2FsbGJhY2sgPSBudWxsOworICAgICAg fQorICAgICAgaWYgKGNhbGxiYWNrID09IG51bGwgJiYgaXNBcnJheShjb2xsZWN0aW9uKSkgewor ICAgICAgICB2YXIgaW5kZXggPSAtMSwKKyAgICAgICAgICAgIGxlbmd0aCA9IGNvbGxlY3Rpb24u bGVuZ3RoOworCisgICAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7CisgICAgICAgICAg dmFyIHZhbHVlID0gY29sbGVjdGlvbltpbmRleF07CisgICAgICAgICAgaWYgKHZhbHVlIDwgcmVz dWx0KSB7CisgICAgICAgICAgICByZXN1bHQgPSB2YWx1ZTsKKyAgICAgICAgICB9CisgICAgICAg IH0KKyAgICAgIH0gZWxzZSB7CisgICAgICAgIGNhbGxiYWNrID0gKGNhbGxiYWNrID09IG51bGwg JiYgaXNTdHJpbmcoY29sbGVjdGlvbikpCisgICAgICAgICAgPyBjaGFyQXRDYWxsYmFjaworICAg ICAgICAgIDogbG9kYXNoLmNyZWF0ZUNhbGxiYWNrKGNhbGxiYWNrLCB0aGlzQXJnLCAzKTsKKwor ICAgICAgICBmb3JFYWNoKGNvbGxlY3Rpb24sIGZ1bmN0aW9uKHZhbHVlLCBpbmRleCwgY29sbGVj dGlvbikgeworICAgICAgICAgIHZhciBjdXJyZW50ID0gY2FsbGJhY2sodmFsdWUsIGluZGV4LCBj b2xsZWN0aW9uKTsKKyAgICAgICAgICBpZiAoY3VycmVudCA8IGNvbXB1dGVkKSB7CisgICAgICAg ICAgICBjb21wdXRlZCA9IGN1cnJlbnQ7CisgICAgICAgICAgICByZXN1bHQgPSB2YWx1ZTsKKyAg ICAgICAgICB9CisgICAgICAgIH0pOworICAgICAgfQorICAgICAgcmV0dXJuIHJlc3VsdDsKKyAg ICB9CisKKyAgICAvKioKKyAgICAgKiBSZXRyaWV2ZXMgdGhl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yLCAzXSwgZnVuY3Rpb24oc3VtLCBudW0p IHsKKyAgICAgKiAgIHJldHVybiBzdW0gKyBudW07CisgICAgICogfSk7CisgICAgICogLy8gPT4g NgorICAgICAqCisgICAgICogdmFyIG1hcHBlZCA9IF8ucmVkdWNlKHsgJ2EnOiAxLCAnYic6IDIs ICdjJzogMyB9LCBmdW5jdGlvbihyZXN1bHQsIG51bSwga2V5KSB7CisgICAgICogICByZXN1bHRb a2V5XSA9IG51bSAqIDM7CisgICAgICogICByZXR1cm4gcmVzdWx0OworICAgICAqIH0sIHt9KTsK KyAgICAgKiAvLyA9PiB7ICdhJzogMywgJ2InOiA2LCAnYyc6IDkgfQorICAgICAqLworICAgIGZ1 bmN0aW9uIHJlZHVjZShjb2xsZWN0aW9uLCBjYWxsYmFjaywgYWNjdW11bGF0b3IsIHRoaXNBcmcp IHsKKyAgICAgIGlmICghY29sbGVjdGlvbikgcmV0dXJuIGFjY3VtdWxhdG9yOworICAgICAgdmFy IG5vYWNjdW0gPSBhcmd1bWVudHMubGVuZ3RoIDwgMzsKKyAgICAgIGNhbGxiYWNrID0gbG9kYXNo LmNyZWF0ZUNhbGxiYWNrKGNhbGxiYWNrLCB0aGlzQXJnLCA0KTsKKworICAgICAgdmFyIGluZGV4 ID0gLTEsCisgICAgICAgICAgbGVuZ3RoID0gY29sbGVjdGlvbi5sZW5ndGg7CisKKyAgICAgIGlm ICh0eXBlb2YgbGVuZ3RoID09ICdudW1iZXInKSB7CisgICAgICAgIGlmIChub2FjY3VtKSB7Cisg ICAgICAgICAgYWNjdW11bGF0b3IgPSBjb2xsZWN0aW9uWysraW5kZXhdOworICAgICAgICB9Cisg ICAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7CisgICAgICAgICAgYWNjdW11bGF0b3Ig PSBjYWxsYmFjayhhY2N1bXVsYXRvciwgY29sbGVjdGlvbltpbmRleF0sIGluZGV4LCBjb2xsZWN0 aW9uKTsKKyAgICAgICAgfQorICAgICAgfSB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JldHVybiBmaWx0 ZXIoY29sbGVjdGlvbiwgZnVuY3Rpb24odmFsdWUsIGluZGV4LCBjb2xsZWN0aW9uKSB7CisgICAg ICAgIHJldHVybiAhY2FsbGJhY2sodmFsdWUsIGluZGV4LCBjb2xsZWN0aW9uKTsKKyAgICAgIH0p OworICAgIH0KKworICAgIC8qKgorICAgICAqIFJldHJpZXZlcyBhIHJhbmRvbSBlbGVtZW50IG9y IGBuYCByYW5kb20gZWxlbWVudHMgZnJvbSBhIGNvbGxlY3Rpb24uCisgICAgICoKKyAgICAgKiBA c3RhdGljCisgICAgICogQG1lbWJlck9mIF8KKyAgICAgKiBAY2F0ZWdvcnkgQ29sbGVjdGlvbnMK KyAgICAgKiBAcGFyYW0ge0FycmF5fE9iamVjdHxzdHJpbmd9IGNvbGxlY3Rpb24gVGhlIGNvbGxl Y3Rpb24gdG8gc2FtcGxlLgorICAgICAqIEBwYXJhbSB7bnVtYmVyfSBbbl0gVGhlIG51bWJlciBv ZiBlbGVtZW50cyB0byBzYW1wbGUuCisgICAgICogQHBhcmFtLSB7T2JqZWN0fSBbZ3VhcmRdIEFs bG93cyB3b3JraW5nIHdpdGggZnVuY3Rpb25zIGxpa2UgYF8ubWFwYAorICAgICAqICB3aXRob3V0 IHVzaW5nIHRoZWlyIGBpbmRleGAgYXJndW1lbnRzIGFzIGBuYC4KKyAgICAgKiBAcmV0dXJucyB7 QXJyYXl9IFJldHVybnMgdGhlIHJhbmRvbSBzYW1wbGUocykgb2YgYGNvbGxlY3Rpb25gLgorICAg ICAqIEBleGFtcGxlCisgICAgICoKKyAgICAgKiBfLnNhbXBsZShbMSwgMiwgMywgNF0pOworICAg ICAqIC8vID0+IDIKKyAgICAgKgorICAgICAqIF8uc2FtcGxlKFsxLCAyLCAzLCA0XSwgMik7Cisg ICAgICogLy8gPT4gWzMsIDFdCisgICAgICovCisgICAgZnVuY3Rpb24gc2FtcGxlKGNvbGxlY3Rp b24sIG4sIGd1YXJkKSB7CisgICAgICBpZi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ICAqICBlbHNlIGBmYWxzZWAuCisgICAgICogQGV4YW1wbGUKKyAgICAgKgorICAg ICAqIF8uc29tZShbbnVsbCwgMCwgJ3llcycsIGZhbHNlXSwgQm9vbGVhbik7CisgICAgICogLy8g PT4gdHJ1ZQorICAgICAqCisgICAgICogdmFyIGNoYXJhY3RlcnMgPSBbCisgICAgICogICB7ICdu YW1lJzogJ2Jhcm5leScsICdhZ2UnOiAzNiwgJ2Jsb2NrZWQnOiBmYWxzZSB9LAorICAgICAqICAg eyAnbmFtZSc6ICdmcmVkJywgICAnYWdlJzogNDAsICdibG9ja2VkJzogdHJ1ZSB9CisgICAgICog XTsKKyAgICAgKgorICAgICAqIC8vIHVzaW5nICJfLnBsdWNrIiBjYWxsYmFjayBzaG9ydGhhbmQK KyAgICAgKiBfLnNvbWUoY2hhcmFjdGVycywgJ2Jsb2NrZWQnKTsKKyAgICAgKiAvLyA9PiB0cnVl CisgICAgICoKKyAgICAgKiAvLyB1c2luZyAiXy53aGVyZSIgY2FsbGJhY2sgc2hvcnRoYW5kCisg ICAgICogXy5zb21lKGNoYXJhY3RlcnMsIHsgJ2FnZSc6IDEgfSk7CisgICAgICogLy8gPT4gZmFs c2UKKyAgICAgKi8KKyAgICBmdW5jdGlvbiBzb21lKGNvbGxlY3Rpb24sIGNhbGxiYWNrLCB0aGlz QXJnKSB7CisgICAgICB2YXIgcmVzdWx0OworICAgICAgY2FsbGJhY2sgPSBsb2Rhc2guY3JlYXRl Q2FsbGJhY2soY2FsbGJhY2ssIHRoaXNBcmcsIDMpOworCisgICAgICB2YXIgaW5kZXggPSAtMSwK KyAgICAgICAgICBsZW5ndGggPSBjb2xsZWN0aW9uID8gY29sbGVjdGlvbi5sZW5ndGggOiAwOwor CisgICAgICBpZiAodHlwZW9mIGxlbmd0aCA9PSAnbnVtYmVyJykgeworICAgICAgICB3aGlsZSAo KytpbmRleCA8IGxlbmd0aCkgeworICAgICAgICAgIGlmICgocmVzdWx0ID0gY2FsbGJhY2soY29s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FycmF5fSBS ZXR1cm5zIGEgbmV3IGFycmF5IG9mIHNvcnRlZCBlbGVtZW50cy4KKyAgICAgKiBAZXhhbXBsZQor ICAgICAqCisgICAgICogXy5zb3J0QnkoWzEsIDIsIDNdLCBmdW5jdGlvbihudW0pIHsgcmV0dXJu IE1hdGguc2luKG51bSk7IH0pOworICAgICAqIC8vID0+IFszLCAxLCAyXQorICAgICAqCisgICAg ICogXy5zb3J0QnkoWzEsIDIsIDNdLCBmdW5jdGlvbihudW0pIHsgcmV0dXJuIHRoaXMuc2luKG51 bSk7IH0sIE1hdGgpOworICAgICAqIC8vID0+IFszLCAxLCAyXQorICAgICAqCisgICAgICogdmFy IGNoYXJhY3RlcnMgPSBbCisgICAgICogICB7ICduYW1lJzogJ2Jhcm5leScsICAnYWdlJzogMzYg fSwKKyAgICAgKiAgIHsgJ25hbWUnOiAnZnJlZCcsICAgICdhZ2UnOiA0MCB9LAorICAgICAqICAg eyAnbmFtZSc6ICdiYXJuZXknLCAgJ2FnZSc6IDI2IH0sCisgICAgICogICB7ICduYW1lJzogJ2Zy ZWQnLCAgICAnYWdlJzogMzAgfQorICAgICAqIF07CisgICAgICoKKyAgICAgKiAvLyB1c2luZyAi Xy5wbHVjayIgY2FsbGJhY2sgc2hvcnRoYW5kCisgICAgICogXy5tYXAoXy5zb3J0QnkoY2hhcmFj dGVycywgJ2FnZScpLCBfLnZhbHVlcyk7CisgICAgICogLy8gPT4gW1snYmFybmV5JywgMjZdLCBb J2ZyZWQnLCAzMF0sIFsnYmFybmV5JywgMzZdLCBbJ2ZyZWQnLCA0MF1dCisgICAgICoKKyAgICAg KiAvLyBzb3J0aW5nIGJ5IG11bHRpcGxlIHByb3BlcnRpZXMKKyAgICAgKiBfLm1hcChfLnNvcnRC eShjaGFyYWN0ZXJzLCBbJ25hbWUnLCAnYWdlJ10pLCBfLnZhbHVlcyk7CisgICAgICogLy8gPSA+ IFtbJ2Jhcm5leScsIDI2XSwgWydiYXJuZXknLCAzNl0sIFsnZnJlZCcsIDMwXSwgWydmcmVkJywg NDBdXQorICAgICAqLworICAgIGZ1bmN0aW9uIHNvcnRCeShjb2xsZWN0aW9uLCBjYWxsYmFjaywg dGhpc0FyZykgeworICAgICAgdmFyIGluZGV4ID0gLTEsCisgICAgICAgICAgaXNBcnIgPSBpc0Fy cmF5KGNhbGxiYWNrKSwKKyAgICAgICAgICBsZW5ndGggPSBjb2xsZWN0aW9uID8gY29sbGVjdGlv bi5sZW5ndGggOiAwLAorICAgICAgICAgIHJlc3VsdCA9IEFycmF5KHR5cGVvZiBsZW5ndGggPT0g J251bWJlcicgPyBsZW5ndGggOiAwKTsKKworICAgICAgaWYgKCFpc0FycikgeworICAgICAgICBj YWxsYmFjayA9IGxvZGFzaC5jcmVhdGVDYWxsYmFjayhjYWxsYmFjaywgdGhpc0FyZywgMyk7Cisg ICAgICB9CisgICAgICBmb3JFYWNoKGNvbGxlY3Rpb24sIGZ1bmN0aW9uKHZhbHVlLCBrZXksIGNv bGxlY3Rpb24pIHsKKyAgICAgICAgdmFyIG9iamVjdCA9IHJlc3VsdFsrK2luZGV4XSA9IGdldE9i amVjdCgpOworICAgICAgICBpZiAoaXNBcnIpIHsKKyAgICAgICAgICBvYmplY3QuY3JpdGVyaWEg PSBtYXAoY2FsbGJhY2ssIGZ1bmN0aW9uKGtleSkgeyByZXR1cm4gdmFsdWVba2V5XTsgfSk7Cisg ICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgKG9iamVjdC5jcml0ZXJpYSA9IGdldEFycmF5KCkp WzBdID0gY2FsbGJhY2sodmFsdWUsIGtleSwgY29sbGVjdGlvbik7CisgICAgICAgIH0KKyAgICAg ICAgb2JqZWN0LmluZGV4ID0gaW5kZXg7CisgICAgICAgIG9iamVjdC52YWx1ZSA9IHZhbHVlOwor ICAgICAgfSk7CisKKyAgICAgIGxlbmd0aCA9IHJlc3VsdC5sZW5ndGg7CisgICAgICByZXN1bHQu c29ydChjb21wYXJlQXNjZW5kaW5nKTsKKyAgICAgIHdoaWxlIChsZW5ndGgtLSkgeworICAgICAg ICB2YXIgb2JqZWN0ID0gcmVzdWx0W2xlbmd0aF07CisgICAgICAgIHJlc3VsdFtsZW5ndGhdID0g b2JqZWN0LnZhbHVlOworICAgICAgICBpZiAoIWlzQXJyKSB7CisgICAgICAgICAgcmVsZWFzZUFy cmF5KG9iamVjdC5jcml0ZXJpYSk7CisgICAgICAgIH0KKyAgICAgICAgcmVsZWFzZU9iamVjdChv YmplY3QpOworICAgICAgfQorICAgICAgcmV0dXJuIHJlc3VsdDsKKyAgICB9CisKKyAgICAvKioK KyAgICAgKiBDb252ZXJ0cyB0aGUgYGNvbGxlY3Rpb25gIHRvIGFuIGFycmF5LgorICAgICAqCisg ICAgICogQHN0YXRpYworICAgICAqIEBtZW1iZXJPZiBfCisgICAgICogQGNhdGVnb3J5IENvbGxl Y3Rpb25zCisgICAgICogQHBhcmFtIHtBcnJheXxPYmplY3R8c3RyaW5nfSBjb2xsZWN0aW9uIFRo ZSBjb2xsZWN0aW9uIHRvIGNvbnZlcnQuCisgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5z IHRoZSBuZXcgY29udmVydGVkIGFycmF5LgorICAgICAqIEBleGFtcGxlCisgICAgICoKKyAgICAg KiAoZnVuY3Rpb24oKSB7IHJldHVybiBfLnRvQXJyYXkoYXJndW1lbnRzKS5zbGljZSgxKTsgfSko MSwgMiwgMywgNCk7CisgICAgICogLy8gPT4gWzIsIDMsIDRdCisgICAgICovCisgICAgZnVuY3Rp b24gdG9BcnJheShjb2xsZWN0aW9uKSB7CisgICAgICBpZiAoY29sbGVjdGlvbiAmJiB0eXBlb2Yg Y29sbGVjdGlvbi5sZW5ndGggPT0gJ251bWJlcicpIHsKKyAgICAgICAgcmV0dXJuIHNsaWNlKGNv bGxlY3Rpb24pOworICAgICAgfQorICAgICAgcmV0dXJuIHZhbHVlcyhjb2xsZWN0aW9uKTsKKyAg ICB9CisKKyAgICAvKioKKyAgICAgKiBQZXJm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2hv cHB5J10gfV0KKyAgICAgKgorICAgICAqIF8ud2hlcmUoY2hhcmFjdGVycywgeyAncGV0cyc6IFsn ZGlubyddIH0pOworICAgICAqIC8vID0+IFt7ICduYW1lJzogJ2ZyZWQnLCAnYWdlJzogNDAsICdw ZXRzJzogWydiYWJ5IHB1c3MnLCAnZGlubyddIH1dCisgICAgICovCisgICAgdmFyIHdoZXJlID0g ZmlsdGVyOworCisgICAgLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKyAgICAvKioKKyAgICAgKiBD cmVhdGVzIGFuIGFycmF5IHdpdGggYWxsIGZhbHNleSB2YWx1ZXMgcmVtb3ZlZC4gVGhlIHZhbHVl cyBgZmFsc2VgLCBgbnVsbGAsCisgICAgICogYDBgLCBgIiJgLCBgdW5kZWZpbmVkYCwgYW5kIGBO YU5gIGFyZSBhbGwgZmFsc2V5LgorICAgICAqCisgICAgICogQHN0YXRpYworICAgICAqIEBtZW1i ZXJPZiBfCisgICAgICogQGNhdGVnb3J5IEFycmF5cworICAgICAqIEBwYXJhbSB7QXJyYXl9IGFy cmF5IFRoZSBhcnJheSB0byBjb21wYWN0LgorICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJu cyBhIG5ldyBhcnJheSBvZiBmaWx0ZXJlZCB2YWx1ZXMuCisgICAgICogQGV4YW1wbGUKKyAgICAg KgorICAgICAqIF8uY29tcGFjdChbMCwgMSwgZmFsc2UsIDIsICcnLCAzXSk7CisgICAgICogLy8g PT4gWzEsIDIsIDNdCisgICAgICovCisgICAgZnVuY3Rpb24gY29tcGFjdChhcnJheSkgeworICAg ICAgdmFyIGluZGV4ID0gLTEsCisgICAgICAgICAgbGVuZ3RoID0gYXJyYXkgPyBhcnJheS5sZW5n dGggOiAwLAorICAgICAgICAgIHJlc3VsdCA9IFtdOworCisgICAgICB3aGlsZSAoKytpbmRleCA8 IGxlbmd0aCkgeworICAgICAgICB2YXIgdmFsdWUgPSBhcnJheVtpbmRleF07CisgICAgICAgIGlm ICh2YWx1ZSkgeworICAgICAgICAgIHJlc3VsdC5wdXNoKHZhbHVlKTsKKyAgICAgICAgfQorICAg ICAgfQorICAgICAgcmV0dXJuIHJlc3VsdDsKKyAgICB9CisKKyAgICAvKioKKyAgICAgKiBDcmVh dGVzIGFuIGFycmF5IGV4Y2x1ZGluZyBhbGwgdmFsdWVzIG9mIHRoZSBwcm92aWRlZCBhcnJheXMg dXNpbmcgc3RyaWN0CisgICAgICogZXF1YWxpdHkgZm9yIGNvbXBhcmlzb25zLCBpLmUuIGA9PT1g LgorICAgICAqCisgICAgICogQHN0YXRpYworICAgICAqIEBtZW1iZXJPZiBfCisgICAgICogQGNh dGVnb3J5IEFycmF5cworICAgICAqIEBwYXJhbSB7QXJyYXl9IGFycmF5IFRoZSBhcnJheSB0byBw cm9jZXNzLgorICAgICAqIEBwYXJhbSB7Li4uQXJyYXl9IFt2YWx1ZXNdIFRoZSBhcnJheXMgb2Yg dmFsdWVzIHRvIGV4Y2x1ZGUuCisgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIGEgbmV3 IGFycmF5IG9mIGZpbHRlcmVkIHZhbHVlcy4KKyAgICAgKiBAZXhhbXBsZQorICAgICAqCisgICAg ICogXy5kaWZmZXJlbmNlKFsxLCAyLCAzLCA0LCA1XSwgWzUsIDIsIDEwXSk7CisgICAgICogLy8g PT4gWzEsIDMsIDRdCisgICAgICovCisgICAgZnVuY3Rpb24gZGlmZmVyZW5jZShhcnJheSkgewor ICAgICAgcmV0dXJuIGJhc2VEaWZmZXJlbmNlKGFycmF5LCBiYXNlRmxhdHRlbihhcmd1bWVudHMs IHRydWUsIHRydWUsIDEpKTsKKyAgICB9CisKKyAgICAvKioKKyAgICAgKiBUaGlzIG1ldGhvZCBp cyBsaWtlIGBfLmZpbmRgIGV4Y2VwdCB0aGF0IGl0IHJldH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wZWN0aXZlbHku CisgICAgICogQHBhcmFtIHsqfSBbdGhpc0FyZ10gVGhlIGB0aGlzYCBiaW5kaW5nIG9mIGBjYWxs YmFja2AuCisgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgaW5kZXggb2YgdGhl IGZvdW5kIGVsZW1lbnQsIGVsc2UgYC0xYC4KKyAgICAgKiBAZXhhbXBsZQorICAgICAqCisgICAg ICogdmFyIGNoYXJhY3RlcnMgPSBbCisgICAgICogICB7ICduYW1lJzogJ2Jhcm5leScsICAnYWdl JzogMzYsICdibG9ja2VkJzogZmFsc2UgfSwKKyAgICAgKiAgIHsgJ25hbWUnOiAnZnJlZCcsICAg ICdhZ2UnOiA0MCwgJ2Jsb2NrZWQnOiB0cnVlIH0sCisgICAgICogICB7ICduYW1lJzogJ3BlYmJs ZXMnLCAnYWdlJzogMSwgICdibG9ja2VkJzogZmFsc2UgfQorICAgICAqIF07CisgICAgICoKKyAg ICAgKiBfLmZpbmRJbmRleChjaGFyYWN0ZXJzLCBmdW5jdGlvbihjaHIpIHsKKyAgICAgKiAgIHJl dHVybiBjaHIuYWdlIDwgMjA7CisgICAgICogfSk7CisgICAgICogLy8gPT4gMgorICAgICAqCisg ICAgICogLy8gdXNpbmcgIl8ud2hlcmUiIGNhbGxiYWNrIHNob3J0aGFuZAorICAgICAqIF8uZmlu ZEluZGV4KGNoYXJhY3RlcnMsIHsgJ2FnZSc6IDM2IH0pOworICAgICAqIC8vID0+IDAKKyAgICAg KgorICAgICAqIC8vIHVzaW5nICJfLnBsdWNrIiBjYWxsYmFjayBzaG9ydGhhbmQKKyAgICAgKiBf LmZpbmRJbmRleChjaGFyYWN0ZXJzLCAnYmxvY2tlZCcpOworICAgICAqIC8vID0+IDEKKyAgICAg Ki8KKyAgICBmdW5jdGlvbiBmaW5kSW5kZXgoYXJyYXksIGNhbGxiYWNrLCB0aGlzQXJnKSB7Cisg ICAgICB2YXIgaW5kZXggPSAtMSwKKyAgICAgICAgICBs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JyYXlz CisgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFycmF5IHRvIHNlYXJjaC4KKyAgICAg KiBAcGFyYW0ge0Z1bmN0aW9ufE9iamVjdHxzdHJpbmd9IFtjYWxsYmFjaz1pZGVudGl0eV0gVGhl IGZ1bmN0aW9uIGNhbGxlZAorICAgICAqICBwZXIgaXRlcmF0aW9uLiBJZiBhIHByb3BlcnR5IG5h bWUgb3Igb2JqZWN0IGlzIHByb3ZpZGVkIGl0IHdpbGwgYmUgdXNlZAorICAgICAqICB0byBjcmVh dGUgYSAiXy5wbHVjayIgb3IgIl8ud2hlcmUiIHN0eWxlIGNhbGxiYWNrLCByZXNwZWN0aXZlbHku CisgICAgICogQHBhcmFtIHsqfSBbdGhpc0FyZ10gVGhlIGB0aGlzYCBiaW5kaW5nIG9mIGBjYWxs YmFja2AuCisgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgaW5kZXggb2YgdGhl IGZvdW5kIGVsZW1lbnQsIGVsc2UgYC0xYC4KKyAgICAgKiBAZXhhbXBsZQorICAgICAqCisgICAg ICogdmFyIGNoYXJhY3RlcnMgPSBbCisgICAgICogICB7ICduYW1lJzogJ2Jhcm5leScsICAnYWdl JzogMzYsICdibG9ja2VkJzogdHJ1ZSB9LAorICAgICAqICAgeyAnbmFtZSc6ICdmcmVkJywgICAg J2FnZSc6IDQwLCAnYmxvY2tlZCc6IGZhbHNlIH0sCisgICAgICogICB7ICduYW1lJzogJ3BlYmJs ZXMnLCAnYWdlJzogMSwgICdibG9ja2VkJzogdHJ1ZSB9CisgICAgICogXTsKKyAgICAgKgorICAg ICAqIF8uZmluZExhc3RJbmRleChjaGFyYWN0ZXJzLCBmdW5jdGlvbihjaHIpIHsKKyAgICAgKiAg IHJldHVybiBjaHIuYWdlID4gMzA7CisgICAgICogfSk7CisgICAgICogLy8gPT4gMQorICAgICAq CisgICAgICogLy8gdXNpbmcgIl8ud2hlcmUiIGNhbGxiYWNrIHNob3J0aGFuZAorICAgICAqIF8u ZmluZExhc3RJbmRleChjaGFyYWN0ZXJzLCB7ICdhZ2UnOiAzNiB9KTsKKyAgICAgKiAvLyA9PiAw CisgICAgICoKKyAgICAgKiAvLyB1c2luZyAiXy5wbHVjayIgY2FsbGJhY2sgc2hvcnRoYW5kCisg ICAgICogXy5maW5kTGFzdEluZGV4KGNoYXJhY3RlcnMsICdibG9ja2VkJyk7CisgICAgICogLy8g PT4gMgorICAgICAqLworICAgIGZ1bmN0aW9uIGZpbmRMYXN0SW5kZXgoYXJyYXksIGNhbGxiYWNr LCB0aGlzQXJnKSB7CisgICAgICB2YXIgbGVuZ3RoID0gYXJyYXkgPyBhcnJheS5sZW5ndGggOiAw OworICAgICAgY2FsbGJhY2sgPSBsb2Rhc2guY3JlYXRlQ2FsbGJhY2soY2FsbGJhY2ssIHRoaXNB cmcsIDMpOworICAgICAgd2hpbGUgKGxlbmd0aC0tKSB7CisgICAgICAgIGlmIChjYWxsYmFjayhh cnJheVtsZW5ndGhdLCBsZW5ndGgsIGFycmF5KSkgeworICAgICAgICAgIHJldHVybiBsZW5ndGg7 CisgICAgICAgIH0KKyAgICAgIH0KKyAgICAgIHJldHVybiAtMTsKKyAgICB9CisKKyAgICAvKioK KyAgICAgKiBHZXRzIHRoZSBmaXJzdCBlbGVtZW50IG9yIGZpcnN0IGBuYCBlbGVtZW50cyBvZiBh biBhcnJheS4gSWYgYSBjYWxsYmFjaworICAgICAqIGlzIHByb3ZpZGVkIGVsZW1lbnRzIGF0IHRo ZSBiZWdpbm5pbmcgb2YgdGhlIGFycmF5IGFyZSByZXR1cm5lZCBhcyBsb25nCisgICAgICogYXMg dGhlIGNhbGxiYWNrIHJldHVybnMgdHJ1ZXkuIFRoZSBjYWxsYmFjayBpcyBib3VuZCB0byBgdGhp c0FyZ2AgYW5kCisgICAgICogaW52b2tlZCB3aXRoIHRocmVlIGFyZ3VtZW50czsgKHZhbHVlLCBp bmRleCwgYXJyYXkpLgorICAgICAq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UgYHRoaXNgIGJpbmRpbmcgb2YgYGNhbGxiYWNr YC4KKyAgICAgKiBAcmV0dXJucyB7Kn0gUmV0dXJucyB0aGUgZmlyc3QgZWxlbWVudChzKSBvZiBg YXJyYXlgLgorICAgICAqIEBleGFtcGxlCisgICAgICoKKyAgICAgKiBfLmZpcnN0KFsxLCAyLCAz XSk7CisgICAgICogLy8gPT4gMQorICAgICAqCisgICAgICogXy5maXJzdChbMSwgMiwgM10sIDIp OworICAgICAqIC8vID0+IFsxLCAyXQorICAgICAqCisgICAgICogXy5maXJzdChbMSwgMiwgM10s IGZ1bmN0aW9uKG51bSkgeworICAgICAqICAgcmV0dXJuIG51bSA8IDM7CisgICAgICogfSk7Cisg ICAgICogLy8gPT4gWzEsIDJdCisgICAgICoKKyAgICAgKiB2YXIgY2hhcmFjdGVycyA9IFsKKyAg ICAgKiAgIHsgJ25hbWUnOiAnYmFybmV5JywgICdibG9ja2VkJzogdHJ1ZSwgICdlbXBsb3llcic6 ICdzbGF0ZScgfSwKKyAgICAgKiAgIHsgJ25hbWUnOiAnZnJlZCcsICAgICdibG9ja2VkJzogZmFs c2UsICdlbXBsb3llcic6ICdzbGF0ZScgfSwKKyAgICAgKiAgIHsgJ25hbWUnOiAncGViYmxlcycs ICdibG9ja2VkJzogdHJ1ZSwgICdlbXBsb3llcic6ICduYScgfQorICAgICAqIF07CisgICAgICoK KyAgICAgKiAvLyB1c2luZyAiXy5wbHVjayIgY2FsbGJhY2sgc2hvcnRoYW5kCisgICAgICogXy5m aXJzdChjaGFyYWN0ZXJzLCAnYmxvY2tlZCcpOworICAgICAqIC8vID0+IFt7ICduYW1lJzogJ2Jh cm5leScsICdibG9ja2VkJzogdHJ1ZSwgJ2VtcGxveWVyJzogJ3NsYXRlJyB9XQorICAgICAqCisg ICAgICogLy8gdXNpbmcgIl8ud2hlcmUiIGNhbGxiYWNrIHNob3J0aGFuZAorICAgICAqIF8ucGx1 Y2soXy5maXJzdChjaGFyYWN0ZXJzLCB7ICdlbXBsb3llcic6ICdzbGF0ZScgfSksICduYW1lJyk7 CisgICAgICogLy8gPT4gWydiYXJuZXknLCAnZnJlZCddCisgICAgICovCisgICAgZnVuY3Rpb24g Zmlyc3QoYXJyYXksIGNhbGxiYWNrLCB0aGlzQXJnKSB7CisgICAgICB2YXIgbiA9IDAsCisgICAg ICAgICAgbGVuZ3RoID0gYXJyYXkgPyBhcnJheS5sZW5ndGggOiAwOworCisgICAgICBpZiAodHlw ZW9mIGNhbGxiYWNrICE9ICdudW1iZXInICYmIGNhbGxiYWNrICE9IG51bGwpIHsKKyAgICAgICAg dmFyIGluZGV4ID0gLTE7CisgICAgICAgIGNhbGxiYWNrID0gbG9kYXNoLmNyZWF0ZUNhbGxiYWNr KGNhbGxiYWNrLCB0aGlzQXJnLCAzKTsKKyAgICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgg JiYgY2FsbGJhY2soYXJyYXlbaW5kZXhdLCBpbmRleCwgYXJyYXkpKSB7CisgICAgICAgICAgbisr OworICAgICAgICB9CisgICAgICB9IGVsc2UgeworICAgICAgICBuID0gY2FsbGJhY2s7CisgICAg ICAgIGlmIChuID09IG51bGwgfHwgdGhpc0FyZykgeworICAgICAgICAgIHJldHVybiBhcnJheSA/ IGFycmF5WzBdIDogdW5kZWZpbmVkOworICAgICAgICB9CisgICAgICB9CisgICAgICByZXR1cm4g c2xpY2UoYXJyYXksIDAsIG5hdGl2ZU1pbihuYXRpdmVNYXgoMCwgbiksIGxlbmd0aCkpOworICAg IH0KKworICAgIC8qKgorICAgICAqIEZsYXR0ZW5zIGEgbmVzdGVkIGFycmF5ICh0aGUgbmVzdGlu ZyBjYW4gYmUgdG8gYW55IGRlcHRoKS4gSWYgYGlzU2hhbGxvd2AKKyAgICAgKiBpcyB0cnVleSwg dGhlIGFycmF5IHdpbGwgb25seSBiZSBmbGF0dGVuZWQgYSBzaW5nbGUgbGV2ZWwuIElmIGEgY2Fs bGJhY2sKKyAgICAgKiBpcyBwcm92aW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ICogQHBhcmFtIHsqfSB2 YWx1ZSBUaGUgdmFsdWUgdG8gc2VhcmNoIGZvci4KKyAgICAgKiBAcGFyYW0ge2Jvb2xlYW58bnVt YmVyfSBbZnJvbUluZGV4PTBdIFRoZSBpbmRleCB0byBzZWFyY2ggZnJvbSBvciBgdHJ1ZWAKKyAg ICAgKiAgdG8gcGVyZm9ybSBhIGJpbmFyeSBzZWFyY2ggb24gYSBzb3J0ZWQgYXJyYXkuCisgICAg ICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0aGUgaW5kZXggb2YgdGhlIG1hdGNoZWQgdmFs dWUgb3IgYC0xYC4KKyAgICAgKiBAZXhhbXBsZQorICAgICAqCisgICAgICogXy5pbmRleE9mKFsx LCAyLCAzLCAxLCAyLCAzXSwgMik7CisgICAgICogLy8gPT4gMQorICAgICAqCisgICAgICogXy5p bmRleE9mKFsxLCAyLCAzLCAxLCAyLCAzXSwgMiwgMyk7CisgICAgICogLy8gPT4gNAorICAgICAq CisgICAgICogXy5pbmRleE9mKFsxLCAxLCAyLCAyLCAzLCAzXSwgMiwgdHJ1ZSk7CisgICAgICog Ly8gPT4gMgorICAgICAqLworICAgIGZ1bmN0aW9uIGluZGV4T2YoYXJyYXksIHZhbHVlLCBmcm9t SW5kZXgpIHsKKyAgICAgIGlmICh0eXBlb2YgZnJvbUluZGV4ID09ICdudW1iZXInKSB7CisgICAg ICAgIHZhciBsZW5ndGggPSBhcnJheSA/IGFycmF5Lmxlbmd0aCA6IDA7CisgICAgICAgIGZyb21J bmRleCA9IChmcm9tSW5kZXggPCAwID8gbmF0aXZlTWF4KDAsIGxlbmd0aCArIGZyb21JbmRleCkg OiBmcm9tSW5kZXggfHwgMCk7CisgICAgICB9IGVsc2UgaWYgKGZyb21JbmRleCkgeworICAgICAg ICB2YXIgaW5kZXggPSBzb3J0ZWRJbmRleChhcnJheSwgdmFsdWUpOworICAgICAgICByZXR1cm4g YXJyYXlbaW5kZXhdID09PSB2YWx1ZSA/IGluZGV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hbWUnOiAnZnJlZCcsICAgICdibG9ja2VkJzogdHJ1ZSwgICdlbXBs b3llcic6ICdzbGF0ZScgfSwKKyAgICAgKiAgIHsgJ25hbWUnOiAncGViYmxlcycsICdibG9ja2Vk JzogdHJ1ZSwgICdlbXBsb3llcic6ICduYScgfQorICAgICAqIF07CisgICAgICoKKyAgICAgKiAv LyB1c2luZyAiXy5wbHVjayIgY2FsbGJhY2sgc2hvcnRoYW5kCisgICAgICogXy5pbml0aWFsKGNo YXJhY3RlcnMsICdibG9ja2VkJyk7CisgICAgICogLy8gPT4gW3sgJ25hbWUnOiAnYmFybmV5Jywg ICdibG9ja2VkJzogZmFsc2UsICdlbXBsb3llcic6ICdzbGF0ZScgfV0KKyAgICAgKgorICAgICAq IC8vIHVzaW5nICJfLndoZXJlIiBjYWxsYmFjayBzaG9ydGhhbmQKKyAgICAgKiBfLnBsdWNrKF8u aW5pdGlhbChjaGFyYWN0ZXJzLCB7ICdlbXBsb3llcic6ICduYScgfSksICduYW1lJyk7CisgICAg ICogLy8gPT4gWydiYXJuZXknLCAnZnJlZCddCisgICAgICovCisgICAgZnVuY3Rpb24gaW5pdGlh bChhcnJheSwgY2FsbGJhY2ssIHRoaXNBcmcpIHsKKyAgICAgIHZhciBuID0gMCwKKyAgICAgICAg ICBsZW5ndGggPSBhcnJheSA/IGFycmF5Lmxlbmd0aCA6IDA7CisKKyAgICAgIGlmICh0eXBlb2Yg Y2FsbGJhY2sgIT0gJ251bWJlcicgJiYgY2FsbGJhY2sgIT0gbnVsbCkgeworICAgICAgICB2YXIg aW5kZXggPSBsZW5ndGg7CisgICAgICAgIGNhbGxiYWNrID0gbG9kYXNoLmNyZWF0ZUNhbGxiYWNr KGNhbGxiYWNrLCB0aGlzQXJnLCAzKTsKKyAgICAgICAgd2hpbGUgKGluZGV4LS0gJiYgY2FsbGJh Y2soYXJyYXlbaW5kZXhdLCBpbmRleCwgYXJyYXkpKSB7CisgICAgICAgICAgbisrOworICAgICAg ICB9CisgICAgICB9IGVsc2UgeworICAgICAgICBuID0gKGNhbGxiYWNrID09IG51bGwgfHwgdGhp c0FyZykgPyAxIDogY2FsbGJhY2sgfHwgbjsKKyAgICAgIH0KKyAgICAgIHJldHVybiBzbGljZShh cnJheSwgMCwgbmF0aXZlTWluKG5hdGl2ZU1heCgwLCBsZW5ndGggLSBuKSwgbGVuZ3RoKSk7Cisg ICAgfQorCisgICAgLyoqCisgICAgICogQ3JlYXRlcyBhbiBhcnJheSBvZiB1bmlxdWUgdmFsdWVz IHByZXNlbnQgaW4gYWxsIHByb3ZpZGVkIGFycmF5cyB1c2luZworICAgICAqIHN0cmljdCBlcXVh bGl0eSBmb3IgY29tcGFyaXNvbnMsIGkuZS4gYD09PWAuCisgICAgICoKKyAgICAgKiBAc3RhdGlj CisgICAgICogQG1lbWJlck9mIF8KKyAgICAgKiBAY2F0ZWdvcnkgQXJyYXlzCisgICAgICogQHBh cmFtIHsuLi5BcnJheX0gW2FycmF5XSBUaGUgYXJyYXlzIHRvIGluc3BlY3QuCisgICAgICogQHJl dHVybnMge0FycmF5fSBSZXR1cm5zIGFuIGFycmF5IG9mIHNoYXJlZCB2YWx1ZXMuCisgICAgICog QGV4YW1wbGUKKyAgICAgKgorICAgICAqIF8uaW50ZXJzZWN0aW9uKFsxLCAyLCAzXSwgWzUsIDIs IDEsIDRdLCBbMiwgMV0pOworICAgICAqIC8vID0+IFsxLCAyXQorICAgICAqLworICAgIGZ1bmN0 aW9uIGludGVyc2VjdGlvbigpIHsKKyAgICAgIHZhciBhcmdzID0gW10sCisgICAgICAgICAgYXJn c0luZGV4ID0gLTEsCisgICAgICAgICAgYXJnc0xlbmd0aCA9IGFyZ3VtZW50cy5sZW5ndGgsCisg ICAgICAgICAgY2FjaGVzID0gZ2V0QXJyYXkoKSwKKyAgICAgICAgICBpbmRleE9mID0gZ2V0SW5k ZXhPZigpLAorICAgICAgICAgIHRydXN0SW5kZXhPZiA9IGluZGV4T2YgPT09IGJhc2VJbmRleE9m LAorICAgICAgICAgIHNlZW4gPSBnZXRBcnJheSgpOworCisgICAgICB3aGlsZSAoKythcmdzSW5k ZXggPCBhcmdzTGVuZ3RoKSB7CisgICAgICAgIHZhciB2YWx1ZSA9IGFyZ3VtZW50c1thcmdzSW5k ZXhdOworICAgICAgICBpZiAoaXNBcnJheSh2YWx1ZSkgfHwgaXNBcmd1bWVudHModmFsdWUpKSB7 CisgICAgICAgICAgYXJncy5wdXNoKHZhbHVlKTsKKyAgICAgICAgICBjYWNoZXMucHVzaCh0cnVz dEluZGV4T2YgJiYgdmFsdWUubGVuZ3RoID49IGxhcmdlQXJyYXlTaXplICYmCisgICAgICAgICAg ICBjcmVhdGVDYWNoZShhcmdzSW5kZXggPyBhcmdzW2FyZ3NJbmRleF0gOiBzZWVuKSk7CisgICAg ICAgIH0KKyAgICAgIH0KKyAgICAgIHZhciBhcnJheSA9IGFyZ3NbMF0sCisgICAgICAgICAgaW5k ZXggPSAtMSwKKyAgICAgICAgICBsZW5ndGggPSBhcnJheSA/IGFycmF5Lmxlbmd0aCA6IDAsCisg ICAgICAgICAgcmVzdWx0ID0gW107CisKKyAgICAgIG91dGVyOgorICAgICAgd2hpbGUgKCsraW5k ZXggPCBsZW5ndGgpIHsKKyAgICAgICAgdmFyIGNhY2hlID0gY2FjaGVzWzBdOworICAgICAgICB2 YWx1ZSA9IGFycmF5W2luZGV4XTsKKworICAgICAgICBpZiAoKGNhY2hlID8gY2FjaGVJbmRleE9m KGNhY2hlLCB2YWx1ZSkgOiBpbmRleE9mKHNlZW4sIHZhbHVlKSkgPCAwKSB7CisgICAgICAgICAg YXJnc0luZGV4ID0gYXJnc0xlbmd0aDsKKyAgICAgICAgICAoY2FjaGUgfHwgc2VlbikucHVzaCh2 YWx1ZSk7CisgICAgICAgICAgd2hpbGUgKC0tYXJnc0luZGV4KSB7CisgICAgICAgICAgICBjYWNo ZSA9IGNhY2hlc1thcmdzSW5kZXhdOworICAgICAgICAgICAgaWYgKChjYWNoZSA/IGNhY2hlSW5k ZXhPZihjYWNoZSwgdmFsdWUpIDogaW5kZXhPZihhcmdzW2FyZ3NJbmRleF0sIHZhbHVlKSkgPCAw KSB7CisgICAgICAgICAgICAgIGNvbnRpbnVlIG91dGVyOworICAgICAgICAgICAgfQorICAgICAg ICAgIH0KKyAgICAgICAgICByZXN1bHQucHVzaCh2YWx1ZSk7CisgICAgICAgIH0KKyAgICAgIH0K KyAgICAgIHdoaWxlIChhcmdzTGVuZ3RoLS0pIHsKKyAgICAgICAgY2FjaGUgPSBjYWNoZXNbYXJn c0xlbmd0aF07CisgICAgICAgIGlmIChjYWNoZSkgeworICAgICAgICAgIHJlbGVhc2VPYmplY3Qo Y2FjaGUpOworICAgICAgICB9CisgICAgICB9CisgICAgICByZWxlYXNlQXJyYXkoY2FjaGVzKTsK KyAgICAgIHJlbGVhc2VBcnJheShzZWVuKTsKKyAgICAgIHJldHVybiByZXN1bHQ7CisgICAgfQor CisgICAgLyoqCisgICAgICogR2V0cyB0aGUgbGFzdCBlbGVtZW50IG9yIGxhc3QgYG5gIGVsZW1l bnRzIG9mIGFuIGFycmF5LiBJZiBhIGNhbGxiYWNrIGlzCisgICAgICogcHJvdmlkZWQgZWxlbWVu dHMgYXQgdGhlIGVuZCBvZiB0aGUgYXJyYXkgYXJlIHJldHVybmVkIGFzIGxvbmcgYXMgdGhlCisg ICAgICogY2FsbGJhY2sgcmV0dXJucyB0cnVleS4gVGhlIGNhbGxiYWNrIGlzIGJvdW5kIHRvIGB0 aGlzQXJnYCBhbmQgaW52b2tlZAorICAgICAqIHdpdGggdGhyZWUgYXJndW1lbnRzOyAodmFsdWUs IGluZGV4LCBhcnJheSkuCisgICAgICoKKyAgICAgKiBJZiBhIHByb3BlcnR5IG5hbWUgaXMgcHJv dmlkZWQgZm9yIGBjYWxsYmFja2AgdGhlIGNyZWF0ZWQgIl8ucGx1Y2siIHN0eWxlCisgICAgICog Y2FsbGJhY2sgd2lsbCByZXR1cm4gdGhlIHByb3BlcnR5IHZhb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F8ubGFzdChbMSwgMiwgM10sIDIpOworICAgICAqIC8vID0+IFsyLCAzXQorICAg ICAqCisgICAgICogXy5sYXN0KFsxLCAyLCAzXSwgZnVuY3Rpb24obnVtKSB7CisgICAgICogICBy ZXR1cm4gbnVtID4gMTsKKyAgICAgKiB9KTsKKyAgICAgKiAvLyA9PiBbMiwgM10KKyAgICAgKgor ICAgICAqIHZhciBjaGFyYWN0ZXJzID0gWworICAgICAqICAgeyAnbmFtZSc6ICdiYXJuZXknLCAg J2Jsb2NrZWQnOiBmYWxzZSwgJ2VtcGxveWVyJzogJ3NsYXRlJyB9LAorICAgICAqICAgeyAnbmFt ZSc6ICdmcmVkJywgICAgJ2Jsb2NrZWQnOiB0cnVlLCAgJ2VtcGxveWVyJzogJ3NsYXRlJyB9LAor ICAgICAqICAgeyAnbmFtZSc6ICdwZWJibGVzJywgJ2Jsb2NrZWQnOiB0cnVlLCAgJ2VtcGxveWVy JzogJ25hJyB9CisgICAgICogXTsKKyAgICAgKgorICAgICAqIC8vIHVzaW5nICJfLnBsdWNrIiBj YWxsYmFjayBzaG9ydGhhbmQKKyAgICAgKiBfLnBsdWNrKF8ubGFzdChjaGFyYWN0ZXJzLCAnYmxv Y2tlZCcpLCAnbmFtZScpOworICAgICAqIC8vID0+IFsnZnJlZCcsICdwZWJibGVzJ10KKyAgICAg KgorICAgICAqIC8vIHVzaW5nICJfLndoZXJlIiBjYWxsYmFjayBzaG9ydGhhbmQKKyAgICAgKiBf Lmxhc3QoY2hhcmFjdGVycywgeyAnZW1wbG95ZXInOiAnbmEnIH0pOworICAgICAqIC8vID0+IFt7 ICduYW1lJzogJ3BlYmJsZXMnLCAnYmxvY2tlZCc6IHRydWUsICdlbXBsb3llcic6ICduYScgfV0K KyAgICAgKi8KKyAgICBmdW5jdGlvbiBsYXN0KGFycmF5LCBjYWxsYmFjaywgdGhpc0FyZykgewor ICAgICAgdmFyIG4gPSAwLAorICAgICAgICAgIGxlbmd0aCA9IGFycmF5ID8gYXJ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V4ID0gYXJyYXkgPyBhcnJheS5sZW5ndGggOiAw OworICAgICAgaWYgKHR5cGVvZiBmcm9tSW5kZXggPT0gJ251bWJlcicpIHsKKyAgICAgICAgaW5k ZXggPSAoZnJvbUluZGV4IDwgMCA/IG5hdGl2ZU1heCgwLCBpbmRleCArIGZyb21JbmRleCkgOiBu YXRpdmVNaW4oZnJvbUluZGV4LCBpbmRleCAtIDEpKSArIDE7CisgICAgICB9CisgICAgICB3aGls ZSAoaW5kZXgtLSkgeworICAgICAgICBpZiAoYXJyYXlbaW5kZXhdID09PSB2YWx1ZSkgeworICAg ICAgICAgIHJldHVybiBpbmRleDsKKyAgICAgICAgfQorICAgICAgfQorICAgICAgcmV0dXJuIC0x OworICAgIH0KKworICAgIC8qKgorICAgICAqIFJlbW92ZXMgYWxsIHByb3ZpZGVkIHZhbHVlcyBm cm9tIHRoZSBnaXZlbiBhcnJheSB1c2luZyBzdHJpY3QgZXF1YWxpdHkgZm9yCisgICAgICogY29t cGFyaXNvbnMsIGkuZS4gYD09PWAuCisgICAgICoKKyAgICAgKiBAc3RhdGljCisgICAgICogQG1l bWJlck9mIF8KKyAgICAgKiBAY2F0ZWdvcnkgQXJyYXlzCisgICAgICogQHBhcmFtIHtBcnJheX0g YXJyYXkgVGhlIGFycmF5IHRvIG1vZGlmeS4KKyAgICAgKiBAcGFyYW0gey4uLip9IFt2YWx1ZV0g VGhlIHZhbHVlcyB0byByZW1vdmUuCisgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIGBh cnJheWAuCisgICAgICogQGV4YW1wbGUKKyAgICAgKgorICAgICAqIHZhciBhcnJheSA9IFsxLCAy LCAzLCAxLCAyLCAzXTsKKyAgICAgKiBfLnB1bGwoYXJyYXksIDIsIDMpOworICAgICAqIGNvbnNv bGUubG9nKGFycmF5KTsKKyAgICAgKiAvLyA9PiBbMSwgMV0KKyAgICAgKi8KKyAgICBmdW5jdGlv biBwdWxsKGFycmF5KSB7CisgICAgICB2YXIgYXJnc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9IGVuZCBUaGUgZW5kIG9mIHRoZSByYW5nZS4KKyAgICAgKiBAcGFyYW0ge251bWJl cn0gW3N0ZXA9MV0gVGhlIHZhbHVlIHRvIGluY3JlbWVudCBvciBkZWNyZW1lbnQgYnkuCisgICAg ICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIGEgbmV3IHJhbmdlIGFycmF5LgorICAgICAqIEBl eGFtcGxlCisgICAgICoKKyAgICAgKiBfLnJhbmdlKDQpOworICAgICAqIC8vID0+IFswLCAxLCAy LCAzXQorICAgICAqCisgICAgICogXy5yYW5nZSgxLCA1KTsKKyAgICAgKiAvLyA9PiBbMSwgMiwg MywgNF0KKyAgICAgKgorICAgICAqIF8ucmFuZ2UoMCwgMjAsIDUpOworICAgICAqIC8vID0+IFsw LCA1LCAxMCwgMTVdCisgICAgICoKKyAgICAgKiBfLnJhbmdlKDAsIC00LCAtMSk7CisgICAgICog Ly8gPT4gWzAsIC0xLCAtMiwgLTNdCisgICAgICoKKyAgICAgKiBfLnJhbmdlKDEsIDQsIDApOwor ICAgICAqIC8vID0+IFsxLCAxLCAxXQorICAgICAqCisgICAgICogXy5yYW5nZSgwKTsKKyAgICAg KiAvLyA9PiBbXQorICAgICAqLworICAgIGZ1bmN0aW9uIHJhbmdlKHN0YXJ0LCBlbmQsIHN0ZXAp IHsKKyAgICAgIHN0YXJ0ID0gK3N0YXJ0IHx8IDA7CisgICAgICBzdGVwID0gdHlwZW9mIHN0ZXAg PT0gJ251bWJlcicgPyBzdGVwIDogKCtzdGVwIHx8IDEpOworCisgICAgICBpZiAoZW5kID09IG51 bGwpIHsKKyAgICAgICAgZW5kID0gc3RhcnQ7CisgICAgICAgIHN0YXJ0ID0gMDsKKyAgICAgIH0K KyAgICAgIC8vIHVzZSBgQXJyYXkobGVuZ3RoKWAgc28gZW5naW5lcyBsaWtlIENoYWtyYSBhbmQg VjggYXZvaWQgc2xvd2VyIG1vZGVzCisgICAgICAvLyBodHRwOi8veW91dHUuYmUvWEFxSX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3ZlKGFycmF5LCBj YWxsYmFjaywgdGhpc0FyZykgeworICAgICAgdmFyIGluZGV4ID0gLTEsCisgICAgICAgICAgbGVu Z3RoID0gYXJyYXkgPyBhcnJheS5sZW5ndGggOiAwLAorICAgICAgICAgIHJlc3VsdCA9IFtdOwor CisgICAgICBjYWxsYmFjayA9IGxvZGFzaC5jcmVhdGVDYWxsYmFjayhjYWxsYmFjaywgdGhpc0Fy ZywgMyk7CisgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgeworICAgICAgICB2YXIgdmFs dWUgPSBhcnJheVtpbmRleF07CisgICAgICAgIGlmIChjYWxsYmFjayh2YWx1ZSwgaW5kZXgsIGFy cmF5KSkgeworICAgICAgICAgIHJlc3VsdC5wdXNoKHZhbHVlKTsKKyAgICAgICAgICBzcGxpY2Uu Y2FsbChhcnJheSwgaW5kZXgtLSwgMSk7CisgICAgICAgICAgbGVuZ3RoLS07CisgICAgICAgIH0K KyAgICAgIH0KKyAgICAgIHJldHVybiByZXN1bHQ7CisgICAgfQorCisgICAgLyoqCisgICAgICog VGhlIG9wcG9zaXRlIG9mIGBfLmluaXRpYWxgIHRoaXMgbWV0aG9kIGdldHMgYWxsIGJ1dCB0aGUg Zmlyc3QgZWxlbWVudCBvcgorICAgICAqIGZpcnN0IGBuYCBlbGVtZW50cyBvZiBhbiBhcnJheS4g SWYgYSBjYWxsYmFjayBmdW5jdGlvbiBpcyBwcm92aWRlZCBlbGVtZW50cworICAgICAqIGF0IHRo ZSBiZWdpbm5pbmcgb2YgdGhlIGFycmF5IGFyZSBleGNsdWRlZCBmcm9tIHRoZSByZXN1bHQgYXMg bG9uZyBhcyB0aGUKKyAgICAgKiBjYWxsYmFjayByZXR1cm5zIHRydWV5LiBUaGUgY2FsbGJhY2sg aXMgYm91bmQgdG8gYHRoaXNBcmdgIGFuZCBpbnZva2VkCisgICAgICogd2l0aCB0aHJlZSBhcmd1 bWVudHM7ICh2YWx1ZSwgaW5kZXgsIGFycmF5KS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hlIGB0aGlzYCBi aW5kaW5nIG9mIGBjYWxsYmFja2AuCisgICAgICogQHJldHVybnMge0FycmF5fSBSZXR1cm5zIGEg c2xpY2Ugb2YgYGFycmF5YC4KKyAgICAgKiBAZXhhbXBsZQorICAgICAqCisgICAgICogXy5yZXN0 KFsxLCAyLCAzXSk7CisgICAgICogLy8gPT4gWzIsIDNdCisgICAgICoKKyAgICAgKiBfLnJlc3Qo WzEsIDIsIDNdLCAyKTsKKyAgICAgKiAvLyA9PiBbM10KKyAgICAgKgorICAgICAqIF8ucmVzdChb MSwgMiwgM10sIGZ1bmN0aW9uKG51bSkgeworICAgICAqICAgcmV0dXJuIG51bSA8IDM7CisgICAg ICogfSk7CisgICAgICogLy8gPT4gWzNdCisgICAgICoKKyAgICAgKiB2YXIgY2hhcmFjdGVycyA9 IFsKKyAgICAgKiAgIHsgJ25hbWUnOiAnYmFybmV5JywgICdibG9ja2VkJzogdHJ1ZSwgICdlbXBs b3llcic6ICdzbGF0ZScgfSwKKyAgICAgKiAgIHsgJ25hbWUnOiAnZnJlZCcsICAgICdibG9ja2Vk JzogZmFsc2UsICAnZW1wbG95ZXInOiAnc2xhdGUnIH0sCisgICAgICogICB7ICduYW1lJzogJ3Bl YmJsZXMnLCAnYmxvY2tlZCc6IHRydWUsICdlbXBsb3llcic6ICduYScgfQorICAgICAqIF07Cisg ICAgICoKKyAgICAgKiAvLyB1c2luZyAiXy5wbHVjayIgY2FsbGJhY2sgc2hvcnRoYW5kCisgICAg ICogXy5wbHVjayhfLnJlc3QoY2hhcmFjdGVycywgJ2Jsb2NrZWQnKSwgJ25hbWUnKTsKKyAgICAg KiAvLyA9PiBbJ2ZyZWQnLCAncGViYmxlcyddCisgICAgICoKKyAgICAgKiAvLyB1c2luZyAiXy53 aGVyZSIgY2FsbGJhY2sgc2hvcnRoYW5kCisgICAgICogXy5yZXN0KGNoYXJhY3RlcnMsIHsgJ2Vt cGxveWVyJzogJ3NsYXRlJyB9KTsKKyAgICAgKiAvLyA9PiBbeyAnbmFtZSc6ICdwZWJibGVzJywg J2Jsb2NrZWQnOiB0cnVlLCAnZW1wbG95ZXInOiAnbmEnIH1dCisgICAgICovCisgICAgZnVuY3Rp b24gcmVzdChhcnJheSwgY2FsbGJhY2ssIHRoaXNBcmcpIHsKKyAgICAgIGlmICh0eXBlb2YgY2Fs bGJhY2sgIT0gJ251bWJlcicgJiYgY2FsbGJhY2sgIT0gbnVsbCkgeworICAgICAgICB2YXIgbiA9 IDAsCisgICAgICAgICAgICBpbmRleCA9IC0xLAorICAgICAgICAgICAgbGVuZ3RoID0gYXJyYXkg PyBhcnJheS5sZW5ndGggOiAwOworCisgICAgICAgIGNhbGxiYWNrID0gbG9kYXNoLmNyZWF0ZUNh bGxiYWNrKGNhbGxiYWNrLCB0aGlzQXJnLCAzKTsKKyAgICAgICAgd2hpbGUgKCsraW5kZXggPCBs ZW5ndGggJiYgY2FsbGJhY2soYXJyYXlbaW5kZXhdLCBpbmRleCwgYXJyYXkpKSB7CisgICAgICAg ICAgbisrOworICAgICAgICB9CisgICAgICB9IGVsc2UgeworICAgICAgICBuID0gKGNhbGxiYWNr ID09IG51bGwgfHwgdGhpc0FyZykgPyAxIDogbmF0aXZlTWF4KDAsIGNhbGxiYWNrKTsKKyAgICAg IH0KKyAgICAgIHJldHVybiBzbGljZShhcnJheSwgbik7CisgICAgfQorCisgICAgLyoqCisgICAg ICogVXNlcyBhIGJpbmFyeSBzZWFyY2ggdG8gZGV0ZXJtaW5lIHRoZSBzbWFsbGVzdCBpbmRleCBh dCB3aGljaCBhIHZhbHVlCisgICAgICogc2hvdWxkIGJlIGluc2VydGVkIGludG8gYSBnaXZlbiBz b3J0ZWQgYXJyYXkgaW4gb3JkZXIgdG8gbWFpbnRhaW4gdGhlIHNvcnQKKyAgICAgKiBvcmRlciBv ZiB0aGUgYXJyYXkuIElmIGEgY2FsbGJhY2sgaXMgcHJvdmlkZWQgaXQgd2lsbCBiZSBleGVjdXRl ZCBmb3IKKyAgICA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Ugb3Igb2JqZWN0IGlzIHByb3ZpZGVkIGl0IHdpbGwgYmUgdXNlZAor ICAgICAqICB0byBjcmVhdGUgYSAiXy5wbHVjayIgb3IgIl8ud2hlcmUiIHN0eWxlIGNhbGxiYWNr LCByZXNwZWN0aXZlbHkuCisgICAgICogQHBhcmFtIHsqfSBbdGhpc0FyZ10gVGhlIGB0aGlzYCBi aW5kaW5nIG9mIGBjYWxsYmFja2AuCisgICAgICogQHJldHVybnMge251bWJlcn0gUmV0dXJucyB0 aGUgaW5kZXggYXQgd2hpY2ggYHZhbHVlYCBzaG91bGQgYmUgaW5zZXJ0ZWQKKyAgICAgKiAgaW50 byBgYXJyYXlgLgorICAgICAqIEBleGFtcGxlCisgICAgICoKKyAgICAgKiBfLnNvcnRlZEluZGV4 KFsyMCwgMzAsIDUwXSwgNDApOworICAgICAqIC8vID0+IDIKKyAgICAgKgorICAgICAqIC8vIHVz aW5nICJfLnBsdWNrIiBjYWxsYmFjayBzaG9ydGhhbmQKKyAgICAgKiBfLnNvcnRlZEluZGV4KFt7 ICd4JzogMjAgfSwgeyAneCc6IDMwIH0sIHsgJ3gnOiA1MCB9XSwgeyAneCc6IDQwIH0sICd4Jyk7 CisgICAgICogLy8gPT4gMgorICAgICAqCisgICAgICogdmFyIGRpY3QgPSB7CisgICAgICogICAn d29yZFRvTnVtYmVyJzogeyAndHdlbnR5JzogMjAsICd0aGlydHknOiAzMCwgJ2ZvdXJ0eSc6IDQw LCAnZmlmdHknOiA1MCB9CisgICAgICogfTsKKyAgICAgKgorICAgICAqIF8uc29ydGVkSW5kZXgo Wyd0d2VudHknLCAndGhpcnR5JywgJ2ZpZnR5J10sICdmb3VydHknLCBmdW5jdGlvbih3b3JkKSB7 CisgICAgICogICByZXR1cm4gZGljdC53b3JkVG9OdW1iZXJbd29yZF07CisgICAgICogfSk7Cisg ICAgICogLy8gPT4gMgorICAgICAqCisgICAgICogXy5zb3J0ZWRJbmRleChbJ3R3ZW50eScsICd0 aGlydHknLCAnZmlmdHknXSwgJ2ZvdXJ0eScsIGZ1bmN0aW9uKHdvcmQpIHsKKyAgICAgKiAgIHJl dHVybiB0aGlzLndvcmRUb051bWJlclt3b3JkXTsKKyAgICAgKiB9LCBkaWN0KTsKKyAgICAgKiAv LyA9PiAyCisgICAgICovCisgICAgZnVuY3Rpb24gc29ydGVkSW5kZXgoYXJyYXksIHZhbHVlLCBj YWxsYmFjaywgdGhpc0FyZykgeworICAgICAgdmFyIGxvdyA9IDAsCisgICAgICAgICAgaGlnaCA9 IGFycmF5ID8gYXJyYXkubGVuZ3RoIDogbG93OworCisgICAgICAvLyBleHBsaWNpdGx5IHJlZmVy ZW5jZSBgaWRlbnRpdHlgIGZvciBiZXR0ZXIgaW5saW5pbmcgaW4gRmlyZWZveAorICAgICAgY2Fs bGJhY2sgPSBjYWxsYmFjayA/IGxvZGFzaC5jcmVhdGVDYWxsYmFjayhjYWxsYmFjaywgdGhpc0Fy ZywgMSkgOiBpZGVudGl0eTsKKyAgICAgIHZhbHVlID0gY2FsbGJhY2sodmFsdWUpOworCisgICAg ICB3aGlsZSAobG93IDwgaGlnaCkgeworICAgICAgICB2YXIgbWlkID0gKGxvdyArIGhpZ2gpID4+ PiAxOworICAgICAgICAoY2FsbGJhY2soYXJyYXlbbWlkXSkgPCB2YWx1ZSkKKyAgICAgICAgICA/ IGxvdyA9IG1pZCArIDEKKyAgICAgICAgICA6IGhpZ2ggPSBtaWQ7CisgICAgICB9CisgICAgICBy ZXR1cm4gbG93OworICAgIH0KKworICAgIC8qKgorICAgICAqIENyZWF0ZXMgYW4gYXJyYXkgb2Yg dW5pcXVlIHZhbHVlcywgaW4gb3JkZXIsIG9mIHRoZSBwcm92aWRlZCBhcnJheXMgdXNpbmcKKyAg ICAgKiBzdHJpY3QgZXF1YWxpdHkgZm9yIGNvbXBhcmlzb25zLCBpLmUuIGA9PT1gLgorICAgICAq CisgICAgICogQHN0YXRpYworICAgICAqIEBtZW1iZXJPZiBfCisgICAgICogQGNhdG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sK KyAgICAgICAgdGhpc0FyZyA9IGNhbGxiYWNrOworICAgICAgICBjYWxsYmFjayA9ICh0eXBlb2Yg aXNTb3J0ZWQgIT0gJ2Z1bmN0aW9uJyAmJiB0aGlzQXJnICYmIHRoaXNBcmdbaXNTb3J0ZWRdID09 PSBhcnJheSkgPyBudWxsIDogaXNTb3J0ZWQ7CisgICAgICAgIGlzU29ydGVkID0gZmFsc2U7Cisg ICAgICB9CisgICAgICBpZiAoY2FsbGJhY2sgIT0gbnVsbCkgeworICAgICAgICBjYWxsYmFjayA9 IGxvZGFzaC5jcmVhdGVDYWxsYmFjayhjYWxsYmFjaywgdGhpc0FyZywgMyk7CisgICAgICB9Cisg ICAgICByZXR1cm4gYmFzZVVuaXEoYXJyYXksIGlzU29ydGVkLCBjYWxsYmFjayk7CisgICAgfQor CisgICAgLyoqCisgICAgICogQ3JlYXRlcyBhbiBhcnJheSBleGNsdWRpbmcgYWxsIHByb3ZpZGVk IHZhbHVlcyB1c2luZyBzdHJpY3QgZXF1YWxpdHkgZm9yCisgICAgICogY29tcGFyaXNvbnMsIGku ZS4gYD09PWAuCisgICAgICoKKyAgICAgKiBAc3RhdGljCisgICAgICogQG1lbWJlck9mIF8KKyAg ICAgKiBAY2F0ZWdvcnkgQXJyYXlzCisgICAgICogQHBhcmFtIHtBcnJheX0gYXJyYXkgVGhlIGFy cmF5IHRvIGZpbHRlci4KKyAgICAgKiBAcGFyYW0gey4uLip9IFt2YWx1ZV0gVGhlIHZhbHVlcyB0 byBleGNsdWRlLgorICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0dXJucyBhIG5ldyBhcnJheSBv ZiBmaWx0ZXJlZCB2YWx1ZXMuCisgICAgICogQGV4YW1wbGUKKyAgICAgKgorICAgICAqIF8ud2l0 aG91dChbMSwgMiwgMSwgMCwgMywgMSwgNF0sIDAsIDEpOworICAgICAqIC8vID0+IFsyLCAzLCA0 XQorICAgICAqLworICAgIGZ1bmN0aW9uIHdpdGhvdXQoYXJyYXkpIHsKKyAgICAgIHJldHVybiBi YXNlRGlmZmVyZW5jZShhcnJheSwgc2xpY2UoYXJndW1lbnRzLCAxKSk7CisgICAgfQorCisgICAg LyoqCisgICAgICogQ3JlYXRlcyBhbiBhcnJheSB0aGF0IGlzIHRoZSBzeW1tZXRyaWMgZGlmZmVy ZW5jZSBvZiB0aGUgcHJvdmlkZWQgYXJyYXlzLgorICAgICAqIFNlZSBodHRwOi8vZW4ud2lraXBl ZGlhLm9yZy93aWtpL1N5bW1ldHJpY19kaWZmZXJlbmNlLgorICAgICAqCisgICAgICogQHN0YXRp YworICAgICAqIEBtZW1iZXJPZiBfCisgICAgICogQGNhdGVnb3J5IEFycmF5cworICAgICAqIEBw YXJhbSB7Li4uQXJyYXl9IFthcnJheV0gVGhlIGFycmF5cyB0byBpbnNwZWN0LgorICAgICAqIEBy ZXR1cm5zIHtBcnJheX0gUmV0dXJucyBhbiBhcnJheSBvZiB2YWx1ZXMuCisgICAgICogQGV4YW1w bGUKKyAgICAgKgorICAgICAqIF8ueG9yKFsxLCAyLCAzXSwgWzUsIDIsIDEsIDRdKTsKKyAgICAg KiAvLyA9PiBbMywgNSwgNF0KKyAgICAgKgorICAgICAqIF8ueG9yKFsxLCAyLCA1XSwgWzIsIDMs IDVdLCBbMywgNCwgNV0pOworICAgICAqIC8vID0+IFsxLCA0LCA1XQorICAgICAqLworICAgIGZ1 bmN0aW9uIHhvcigpIHsKKyAgICAgIHZhciBpbmRleCA9IC0xLAorICAgICAgICAgIGxlbmd0aCA9 IGFyZ3VtZW50cy5sZW5ndGg7CisKKyAgICAgIHdoaWxlICgrK2luZGV4IDwgbGVuZ3RoKSB7Cisg ICAgICAgIHZhciBhcnJheSA9IGFyZ3VtZW50c1tpbmRleF07CisgICAgICAgIGlmIChpc0FycmF5 KGFycmF5KSB8fCBpc0FyZ3VtZW50cyhhcnJheSkpIHsKKyAgICAgICAgICB2YXIgcmVzdWx0ID0g cmVzdWx0CisgICAgICAgICAgICA/IGJhc2VVbmlxKGJhc2VEaWZmZXJlbmNlKHJlc3VsdCwgYXJy YXkpLmNvbmNhdChiYXNlRGlmZmVyZW5jZShhcnJheSwgcmVzdWx0KSkpCisgICAgICAgICAgICA6 IGFycmF5OworICAgICAgICB9CisgICAgICB9CisgICAgICByZXR1cm4gcmVzdWx0IHx8IFtdOwor ICAgIH0KKworICAgIC8qKgorICAgICAqIENyZWF0ZXMgYW4gYXJyYXkgb2YgZ3JvdXBlZCBlbGVt ZW50cywgdGhlIGZpcnN0IG9mIHdoaWNoIGNvbnRhaW5zIHRoZSBmaXJzdAorICAgICAqIGVsZW1l bnRzIG9mIHRoZSBnaXZlbiBhcnJheXMsIHRoZSBzZWNvbmQgb2Ygd2hpY2ggY29udGFpbnMgdGhl IHNlY29uZAorICAgICAqIGVsZW1lbnRzIG9mIHRoZSBnaXZlbiBhcnJheXMsIGFuZCBzbyBvbi4K KyAgICAgKgorICAgICAqIEBzdGF0aWMKKyAgICAgKiBAbWVtYmVyT2YgXworICAgICAqIEBhbGlh cyB1bnppcAorICAgICAqIEBjYXRlZ29yeSBBcnJheXMKKyAgICAgKiBAcGFyYW0gey4uLkFycmF5 fSBbYXJyYXldIEFycmF5cyB0byBwcm9jZXNzLgorICAgICAqIEByZXR1cm5zIHtBcnJheX0gUmV0 dXJucyBhIG5ldyBhcnJheSBvZiBncm91cGVkIGVsZW1lbnRzLgorICAgICAqIEBleGFtcGxlCisg ICAgICoKKyAgICAgKiBfLnppcChbJ2ZyZWQnLCAnYmFybmV5J10sIFszMCwgNDBdLCBbdHJ1ZSwg ZmFsc2VdKTsKKyAgICAgKiAvLyA9PiBbWydmcmVkJywgMzAsIHRydWVdLCBbJ2Jhcm5leScsIDQw LCBmYWxzZV1dCisgICAgICovCisgICAgZnVuY3Rpb24gemlwKCkgeworICAgICAgdmFyIGFycmF5 ID0gYXJndW1lbnRzLmxlbmd0aCA+IDEgPyBhcmd1bWVudHMgOiBhcmd1bWVudHNbMF0sCisgICAg ICAgICAgaW5kZXggPSAtMSwKKyAgICAgICAgICBsZW5ndGggPSBhcnJheSA/IG1heChwbHVjayhh cnJheSwgJ2xlbmd0aCcpKSA6IDAsCisgICAgICAgICAgcmVzdWx0ID0gQXJyYXkobGVuZ3RoIDwg MCA/IDAgOiBsZW5ndGgpOworCisgICAgICB3aGlsZSAoKytpbmRleCA8IGxlbmd0aCkgeworICAg ICAgICByZXN1bHRbaW5kZXhdID0gcGx1Y2soYXJyYXksIGluZGV4KTsKKyAgICAgIH0KKyAgICAg IHJldHVybiByZXN1bHQ7CisgICAgfQorCisgICAgLyoqCisgICAgICogQ3JlYXRlcyBhbiBvYmpl Y3QgY29tcG9zZWQgZnJvbSBhcnJheXMgb2YgYGtleXNgIGFuZCBgdmFsdWVzYC4gUHJvdmlkZQor ICAgICAqIGVpdGhlciBhIHNpbmdsZSB0d28gZGltZW5zaW9uYWwgYXJyYXksIGkuZS4gYFtba2V5 MSwgdmFsdWUxXSwgW2tleTIsIHZhbHVlMl1dYAorICAgICAqIG9yIHR3byBhcnJheXMsIG9uZSBv ZiBga2V5c2AgYW5kIG9uZSBvZiBjb3JyZXNwb25kaW5nIGB2YWx1ZXNgLgorICAgICAqCisgICAg ICogQHN0YXRpYworICAgICAqIEBtZW1iZXJPZiBfCisgICAgICogQGFsaWFzIG9iamVjdAorICAg ICAqIEBjYXRlZ29yeSBBcnJheXMKKyAgICAgKiBAcGFyYW0ge0FycmF5fSBrZXlzIFRoZSBhcnJh eSBvZiBrZXlzLgorICAgICAqIEBwYXJhbSB7QXJyYXl9IFt2YWx1ZXM9W11dIFRoZSBhcnJheSBv ZiB2YWx1ZXMuCisgICAgICogQHJldHVybnMge09iamVjdH0gUmV0dXJucyBhbiBvYmplY3QgY29t cG9zZWQgb2YgdGhlIGdpdmVuIGtleXMgYW5kCisgICAgICogIGNvcnJlc3BvbmRpbmcgdmFsdWVz LgorICAgICAqIEBleGFtcGxlCisgICAgICoKKyAgICAgKiBfLnppcE9iamVjdChbJ2ZyZWQnLCAn YmFybmV5J10sIFszMCwgNDBdKTsKKyAgICAgKiAvLyA9PiB7ICdmcmVkJzogMzAsICdiYXJuZXkn OiA0MCB9CisgICAgICovCisgICAgZnVuY3Rpb24gemlwT2JqZWN0KGtleXMsIHZhbHVlcykgewor ICAgICAgdmFyIGluZGV4ID0gLTEsCisgICAgICAgICAgbGVuZ3RoID0ga2V5cyA/IGtleXMubGVu Z3RoIDogMCwKKyAgICAgICAgICByZXN1bHQgPSB7fTsKKworICAgICAgaWYgKCF2YWx1ZXMgJiYg bGVuZ3RoICYmICFpc0FycmF5KGtleXNbMF0pKSB7CisgICAgICAgIHZhbHVlcyA9IFtdOworICAg ICAgfQorICAgICAgd2hpbGUgKCsraW5kZXggPCBsZW5ndGgpIHsKKyAgICAgICAgdmFyIGtleSA9 IGtleXNbaW5kZXhdOworICAgICAgICBpZiAodmFsdWVzKSB7CisgICAgICAgICAgcmVzdWx0W2tl eV0gPSB2YWx1ZXNbaW5kZXhdOworICAgICAgICB9IGVsc2UgaWYgKGtleSkgeworICAgICAgICAg IHJlc3VsdFtrZXlbMF1dID0ga2V5WzFdOworICAgICAgICB9CisgICAgICB9CisgICAgICByZXR1 cm4gcmVzdWx0OworICAgIH0KKworICAgIC8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisgICAgLyoq CisgICAgICogQ3JlYXRlcyBhIGZ1bmN0aW9uIHRoYXQgZXhlY3V0ZXMgYGZ1bmNgLCB3aXRoICB0 aGUgYHRoaXNgIGJpbmRpbmcgYW5kCisgICAgICogYXJndW1lbnRzIG9mIHRoZSBjcmVhdGVkIGZ1 bmN0aW9uLCBvbmx5IGFmdGVyIGJlaW5nIGNhbGxlZCBgbmAgdGltZXMuCisgICAgICoKKyAgICAg KiBAc3RhdGljCisgICAgICogQG1lbWJlck9mIF8KKyAgICAgKiBAY2F0ZWdvcnkgRnVuY3Rpb25z CisgICAgICogQHBhcmFtIHtudW1iZXJ9IG4gVGhlIG51bWJlciBvZiB0aW1lcyB0aGUgZnVuY3Rp b24gbXVzdCBiZSBjYWxsZWQgYmVmb3JlCisgICAgICogIGBmdW5jYCBpcyBleGVjdXRlZC4KKyAg ICAgKiBAcGFyYW0ge0Z1bmN0aW9ufSBmdW5jIFRoZSBmdW5jdGlvbiB0byByZXN0cmljdC4KKyAg ICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyByZXN0cmljdGVkIGZ1bmN0 aW9uLgorICAgICAqIEBleGFtcGxlCisgICAgICoKKyAgICAgKiB2YXIgc2F2ZXMgPSBbJ3Byb2Zp bGUnLCAnc2V0dGluZ3MnXTsKKyAgICAgKgorICAgICAqIHZhciBkb25lID0gXy5hZnRlcihzYXZl cy5sZW5ndGgsIGZ1bmN0aW9uKCkgeworICAgICAqICAgY29uc29sZS5sb2coJ0RvbmUgc2F2aW5n IScpOworICAgICAqIH0pOworICAgICAqCisgICAgICogXy5mb3JFYWNoKHNhdmVzLCBmdW5jdGlv bih0eXBlKSB7CisgICAgICogICBhc3luY1NhdmUoeyAndHlwZSc6IHR5cGUsICdjb21wbGV0ZSc6 IGRvbmUgfSk7CisgICAgICogfSk7CisgICAgICogLy8gPT4gbG9ncyAnRG9uZSBzYXZpbmchJywg YWZ0ZXIgYWxsIHNhdmVzIGhhdmUgY29tcGxldGVkCisgICAgICovCisgICAgZnVuY3Rpb24gYWZ0 ZXIobiwgZnVuYykgeworICAgICAgaWYgKCFpc0Z1bmN0aW9uKGZ1bmMpKSB7CisgICAgICAgIHRo cm93IG5ldyBUeXBlRXJyb3I7CisgICAgICB9CisgICAgICByZXR1cm4gZnVuY3Rpb24oKSB7Cisg ICAgICAgIGlmICgtLW4gPCAxKSB7CisgICAgICAgICAgcmV0dXJuIGZ1bmMuYXBwbHkodGhpcywg YXJndW1lbnRzKTsKKyAgICAgICAgfQorICAgICAgfTsKKyAgICB9CisKKyAgICAvKioKKyAgICAg KiBDcmVhdGVzIGEgZnVuY3Rpb24gdGhhdCwgd2hlbiBjYWxsZWQsIGludm9rZXMgYGZ1bmNgIHdp dGggdGhlIGB0aGlzYAorICAgICAqIGJpbmRpbmcgb2YgYHRoaXNBcmdgIGFuZCBwcmVwZW5kcyBh bnkgYWRkaXRpb25hbCBgYmluZGAgYXJndW1lbnRzIHRvIHRob3NlCisgICAgICogcHJvdmlkZWQg dG8gdGhlIGJvdW5kIGZ1bmN0aW9uLgorICAgICAqCisgICAgICogQHN0YXRpYworICAgICAqIEBt ZW1iZXJPZiBfCisgICAgICogQGNhdGVnb3J5IEZ1bmN0aW9ucworICAgICAqIEBwYXJhbSB7RnVu Y3Rpb259IGZ1bmMgVGhlIGZ1bmN0aW9uIHRvIGJpbmQuCisgICAgICogQHBhcmFtIHsqfSBbdGhp c0FyZ10gVGhlIGB0aGlzYCBiaW5kaW5nIG9mIGBmdW5jYC4KKyAgICAgKiBAcGFyYW0gey4uLip9 IFthcmddIEFyZ3VtZW50cyB0byBiZSBwYXJ0aWFsbHkgYXBwbGllZC4KKyAgICAgKiBAcmV0dXJu cyB7RnVuY3Rpb259IFJldHVybnMgdGhlIG5ldyBib3VuZCBmdW5jdGlvbi4KKyAgICAgKiBAZXhh bXBsZQorICAgICAqCisgICAgICogdmFyIGZ1bmMgPSBmdW5jdGlvbihncmVldGluZykgeworICAg ICAqICAgcmV0dXJuIGdyZWV0aW5nICsgJyAnICsgdGhpcy5uYW1lOworICAgICAqIH07CisgICAg ICoKKyAgICAgKiBmdW5jID0gXy5iaW5kKGZ1bmMsIHsgJ25hbWUnOiAnZnJlZCcgfSwgJ2hpJyk7 CisgICAgICogZnVuYygpOworICAgICAqIC8vID0+ICdoaSBmcmVkJworICAgICAqLworICAgIGZ1 bmN0aW9uIGJpbmQoZnVuYywgdGhpc0FyZykgeworICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5n dGggPiAyCisgICAgICAg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KiAgICdsYWJlbCc6ICdkb2NzJywK KyAgICAgKiAgICdvbkNsaWNrJzogZnVuY3Rpb24oKSB7IGNvbnNvbGUubG9nKCdjbGlja2VkICcg KyB0aGlzLmxhYmVsKTsgfQorICAgICAqIH07CisgICAgICoKKyAgICAgKiBfLmJpbmRBbGwodmll dyk7CisgICAgICogalF1ZXJ5KCcjZG9jcycpLm9uKCdjbGljaycsIHZpZXcub25DbGljayk7Cisg ICAgICogLy8gPT4gbG9ncyAnY2xpY2tlZCBkb2NzJywgd2hlbiB0aGUgYnV0dG9uIGlzIGNsaWNr ZWQKKyAgICAgKi8KKyAgICBmdW5jdGlvbiBiaW5kQWxsKG9iamVjdCkgeworICAgICAgdmFyIGZ1 bmNzID0gYXJndW1lbnRzLmxlbmd0aCA+IDEgPyBiYXNlRmxhdHRlbihhcmd1bWVudHMsIHRydWUs IGZhbHNlLCAxKSA6IGZ1bmN0aW9ucyhvYmplY3QpLAorICAgICAgICAgIGluZGV4ID0gLTEsCisg ICAgICAgICAgbGVuZ3RoID0gZnVuY3MubGVuZ3RoOworCisgICAgICB3aGlsZSAoKytpbmRleCA8 IGxlbmd0aCkgeworICAgICAgICB2YXIga2V5ID0gZnVuY3NbaW5kZXhdOworICAgICAgICBvYmpl Y3Rba2V5XSA9IGNyZWF0ZVdyYXBwZXIob2JqZWN0W2tleV0sIDEsIG51bGwsIG51bGwsIG9iamVj dCk7CisgICAgICB9CisgICAgICByZXR1cm4gb2JqZWN0OworICAgIH0KKworICAgIC8qKgorICAg ICAqIENyZWF0ZXMgYSBmdW5jdGlvbiB0aGF0LCB3aGVuIGNhbGxlZCwgaW52b2tlcyB0aGUgbWV0 aG9kIGF0IGBvYmplY3Rba2V5XWAKKyAgICAgKiBhbmQgcHJlcGVuZHMgYW55IGFkZGl0aW9uYWwg YGJpbmRLZXlgIGFyZ3VtZW50cyB0byB0aG9zZSBwcm92aWRlZCB0byB0aGUgYm91bmQKKyAgICAg KiBmdW5jdGlvbi4gVGhpcyBtZXRob2QgZGlmZmVycyBmcm9tIGBfLmJpbmRgIGJ5IGFsbG93aW5n IGJvdW5kIGZ1bmN0aW9ucyB0bworICAgICAqIHJlZmVyZW5jZSBtZXRob2RzIHRoYXQgd2lsbCBi ZSByZWRlZmluZWQgb3IgZG9uJ3QgeWV0IGV4aXN0LgorICAgICAqIFNlZSBodHRwOi8vbWljaGF1 eC5jYS9hcnRpY2xlcy9sYXp5LWZ1bmN0aW9uLWRlZmluaXRpb24tcGF0dGVybi4KKyAgICAgKgor ICAgICAqIEBzdGF0aWMKKyAgICAgKiBAbWVtYmVyT2YgXworICAgICAqIEBjYXRlZ29yeSBGdW5j dGlvbnMKKyAgICAgKiBAcGFyYW0ge09iamVjdH0gb2JqZWN0IFRoZSBvYmplY3QgdGhlIG1ldGhv ZCBiZWxvbmdzIHRvLgorICAgICAqIEBwYXJhbSB7c3RyaW5nfSBrZXkgVGhlIGtleSBvZiB0aGUg bWV0aG9kLgorICAgICAqIEBwYXJhbSB7Li4uKn0gW2FyZ10gQXJndW1lbnRzIHRvIGJlIHBhcnRp YWxseSBhcHBsaWVkLgorICAgICAqIEByZXR1cm5zIHtGdW5jdGlvbn0gUmV0dXJucyB0aGUgbmV3 IGJvdW5kIGZ1bmN0aW9uLgorICAgICAqIEBleGFtcGxlCisgICAgICoKKyAgICAgKiB2YXIgb2Jq ZWN0ID0geworICAgICAqICAgJ25hbWUnOiAnZnJlZCcsCisgICAgICogICAnZ3JlZXQnOiBmdW5j dGlvbihncmVldGluZykgeworICAgICAqICAgICByZXR1cm4gZ3JlZXRpbmcgKyAnICcgKyB0aGlz Lm5hbWU7CisgICAgICogICB9CisgICAgICogfTsKKyAgICAgKgorICAgICAqIHZhciBmdW5jID0g Xy5iaW5kS2V5KG9iamVjdCwgJ2dyZWV0JywgJ2hpJyk7CisgICAgICogZnVuYygpOworICAgICAq IC8vID0+ICdoaSBmcmVkJworICAgICAqCisgICAgICogb2JqZWN0LmdyZWV0ID0gZnVuY3Rpb24o Z3JlZXRpbmcpIHsKKyAgICAgKiAgIHJldHVybiBncmVldGluZyArICd5YSAnICsgdGhpcy5uYW1l ICsgJyEnOworICAgICAqIH07CisgICAgICoKKyAgICAgKiBmdW5jKCk7CisgICAgICogLy8gPT4g J2hpeWEgZnJlZCEnCisgICAgICovCisgICAgZnVuY3Rpb24gYmluZEtleShvYmplY3QsIGtleSkg eworICAgICAgcmV0dXJuIGFyZ3VtZW50cy5sZW5ndGggPiAyCisgICAgICAgID8gY3JlYXRlV3Jh cHBlcihrZXksIDE5LCBzbGljZShhcmd1bWVudHMsIDIpLCBudWxsLCBvYmplY3QpCisgICAgICAg IDogY3JlYXRlV3JhcHBlcihrZXksIDMsIG51bGwsIG51bGwsIG9iamVjdCk7CisgICAgfQorCisg ICAgLyoqCisgICAgICogQ3JlYXRlcyBhIGZ1bmN0aW9uIHRoYXQgaXMgdGhlIGNvbXBvc2l0aW9u IG9mIHRoZSBwcm92aWRlZCBmdW5jdGlvbnMsCisgICAgICogd2hlcmUgZWFjaCBmdW5jdGlvbiBj b25zdW1lcyB0aGUgcmV0dXJuIHZhbHVlIG9mIHRoZSBmdW5jdGlvbiB0aGF0IGZvbGxvd3MuCisg ICAgICogRm9yIGV4YW1wbGUsIGNvbXBvc2luZyB0aGUgZnVuY3Rpb25zIGBmKClgLCBgZygpYCwg YW5kIGBoKClgIHByb2R1Y2VzIGBmKGcoaCgpKSlgLgorICAgICAqIEVhY2ggZnVuY3Rpb24gaXMg ZXhlY3V0ZWQgd2l0aCB0aGUgYHRoaXNgIGJpbmRpbmcgb2YgdGhlIGNvbXBvc2VkIGZ1bmN0aW9u LgorICAgICAqCisgICAgICogQHN0YXRpYworICAgICAqIEBtZW1iZXJPZiBfCisgICAgICogQGNh dGVnb3J5IEZ1bmN0aW9ucworICAgICAqIEBwYXJhbSB7Li4uRnVuY3Rpb259IFtmdW5jXSBGdW5j dGlvbnMgdG8gY29tcG9zZS4KKyAgICAgKiBAcmV0dXJucyB7RnVuY3Rpb259IFJldHVybnMgdGhl IG5ldyBjb21wb3NlZCBmdW5jdGlvbi4KKyAgICAgKiBAZXhhbXBsZQorICAgICAqCisgICAgICog dmFyIHJlYWxOYW1lTWFwID0geworICAgICAqICAgJ3BlYmJsZXMnOiAncGVuZWxvcGUnCisgICAg ICogfTsKKyAgICAgKgorICAgICAqIHZhciBmb3JtYXQgPSBmdW5jdGlvbihuYW1lKSB7CisgICAg ICogICBuYW1lID0gcmVhbE5hbWVNYXBbbmFtZS50b0xvd2VyQ2FzZSgpXSB8fCBuYW1lOworICAg ICAqICAgcmV0dXJuIG5hbWUuY2hhckF0KDApLnRvVXBwZXJDYXNlKCkgKyBuYW1lLnNsaWNlKDEp LnRvTG93ZXJDYXNlKCk7CisgICAgICogfTsKKyAgICAgKgorICAgICAqIHZhciBncmVldCA9IGZ1 bmN0aW9uKGZvcm1hdHRlZCkgeworICAgICAqICAgcmV0dXJuICdIaXlhICcgKyBmb3JtYXR0ZWQg KyAnISc7CisgICAgICogfTsKKyAgICAgKgorICAgICAqIHZhciB3ZWxjb21lID0gXy5jb21wb3Nl KGdyZWV0LCBmb3JtYXQpOworICAgICAqIHdlbGNvbWUoJ3BlYmJsZXMnKTsKKyAgICAgKiAvLyA9 PiAnSGl5YSBQZW5lbG9wZSEnCisgICAgICovCisgICAgZnVuY3Rpb24gY29tcG9zZSgpIHsKKyAg ICAgIHZhciBmdW5jcyA9IGFyZ3VtZW50cywKKyAgICAgICAgICBsZW5ndGggPSBmdW5jcy5sZW5n dGg7CisKKyAgICAgIHdoaWxlIChsZW5ndGgtLSkgeworICAgICAgICBpZiAoIWlzRnVuY3Rpb24o ZnVuY3NbbGVuZ3RoXSkpIHsKKyAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yOworICAgICAg ICB9CisgICAgICB9CisgICAgICByZXR1cm4gZnVuY3Rpb24oKSB7CisgICAgICAgIHZhciBhcmdz ID0gYXJndW1lbnRzLAorICAgICAgICAgICAgbGVuZ3RoID0gZnVuY3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gICAgICAgICBtYXhUaW1lb3V0SWQsCisgICAgICAgICAgcmVzdWx0LAor ICAgICAgICAgIHN0YW1wLAorICAgICAgICAgIHRoaXNBcmcsCisgICAgICAgICAgdGltZW91dElk LAorICAgICAgICAgIHRyYWlsaW5nQ2FsbCwKKyAgICAgICAgICBsYXN0Q2FsbGVkID0gMCwKKyAg ICAgICAgICBtYXhXYWl0ID0gZmFsc2UsCisgICAgICAgICAgdHJhaWxpbmcgPSB0cnVlOworCisg ICAgICBpZiAoIWlzRnVuY3Rpb24oZnVuYykpIHsKKyAgICAgICAgdGhyb3cgbmV3IFR5cGVFcnJv cjsKKyAgICAgIH0KKyAgICAgIHdhaXQgPSBuYXRpdmVNYXgoMCwgd2FpdCkgfHwgMDsKKyAgICAg IGlmIChvcHRpb25zID09PSB0cnVlKSB7CisgICAgICAgIHZhciBsZWFkaW5nID0gdHJ1ZTsKKyAg ICAgICAgdHJhaWxpbmcgPSBmYWxzZTsKKyAgICAgIH0gZWxzZSBpZiAoaXNPYmplY3Qob3B0aW9u cykpIHsKKyAgICAgICAgbGVhZGluZyA9IG9wdGlvbnMubGVhZGluZzsKKyAgICAgICAgbWF4V2Fp dCA9ICdtYXhXYWl0JyBpbiBvcHRpb25zICYmIChuYXRpdmVNYXgod2FpdCwgb3B0aW9ucy5tYXhX YWl0KSB8fCAwKTsKKyAgICAgICAgdHJhaWxpbmcgPSAndHJhaWxpbmcnIGluIG9wdGlvbnMgPyBv cHRpb25zLnRyYWlsaW5nIDogdHJhaWxpbmc7CisgICAgICB9CisgICAgICB2YXIgZGVsYXllZCA9 IGZ1bmN0aW9uKCkgeworICAgICAgICB2YXIgcmVtYWluaW5nID0gd2FpdCAtIChub3coKSAtIHN0 YW1wKTsKKyAgICAgICAgaWYgKHJlbWFpbmluZyA8PSAwKSB7CisgICAgICAgICAgaWYgKG1heFRp bWVvdXRJZCkgeworICAgICAgICAgICAgY2xlYXJUaW1lb3V0KG1heFRpbWVvdXRJZCk7CisgICAg ICAgICAgfQorICAgICAgICAgIHZhciBpc0NhbGxlZCA9IHRyYWlsaW5nQ2FsbDsKKyAgICAgICAg ICBtYXhUaW1lb3V0SWQgPSB0aW1lb3V0SWQgPSB0cmFpbGluZ0NhbGwgPSB1bmRlZmluZWQ7Cisg ICAgICAgICAgaWYgKGlzQ2FsbGVkKSB7CisgICAgICAgICAgICBsYXN0Q2FsbGVkID0gbm93KCk7 CisgICAgICAgICAgICByZXN1bHQgPSBmdW5jLmFwcGx5KHRoaXNBcmcsIGFyZ3MpOworICAgICAg ICAgICAgaWYgKCF0aW1lb3V0SWQgJiYgIW1heFRpbWVvdXRJZCkgeworICAgICAgICAgICAgICBh cmdzID0gdGhpc0FyZyA9IG51bGw7CisgICAgICAgICAgICB9CisgICAgICAgICAgfQorICAgICAg ICB9IGVsc2UgeworICAgICAgICAgIHRpbWVvdXRJZCA9IHNldFRpbWVvdXQoZGVsYXllZCwgcmVt YWluaW5nKTsKKyAgICAgICAgfQorICAgICAgfTsKKworICAgICAgdmFyIG1heERlbGF5ZWQgPSBm dW5jdGlvbigpIHsKKyAgICAgICAgaWYgKHRpbWVvdXRJZCkgeworICAgICAgICAgIGNsZWFyVGlt ZW91dCh0aW1lb3V0SWQpOworICAgICAgICB9CisgICAgICAgIG1heFRpbWVvdXRJZCA9IHRpbWVv dXRJZCA9IHRyYWlsaW5nQ2FsbCA9IHVuZGVmaW5lZDsKKyAgICAgICAgaWYgKHRyYWlsaW5nIHx8 IChtYXhXYWl0ICE9PSB3YWl0KSkgeworICAgICAgICAgIGxhc3RDYWxsZWQgPSBub3coKTsKKyAg ICAgICAgICByZXN1bHQgPSBmdW5jLmFwcGx5KHRoaXNBcmcsIGFyZ3MpOworICAgICAgICAgIGlm ICghdGltZW91dElkICYmICFtYXhUaW1lb3V0SWQpIHsKKyAgICAgICAgICAgIGFyZ3MgPSB0aGlz QXJnID0gbnVsbDsKKyAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIH07CisKKyAgICAgIHJl dHVybiBmdW5jdGlvbigpIHsKKyAgICAgICAgYXJncyA9IGFyZ3VtZW50czsKKyAgICAgICAgc3Rh bXAgPSBub3coKTsKKyAgICAgICAgdGhpc0FyZyA9IHRoaXM7CisgICAgICAgIHRyYWlsaW5nQ2Fs bCA9IHRyYWlsaW5nICYmICh0aW1lb3V0SWQgfHwgIWxlYWRpbmcpOworCisgICAgICAgIGlmICht YXhXYWl0ID09PSBmYWxzZSkgeworICAgICAgICAgIHZhciBsZWFkaW5nQ2FsbCA9IGxlYWRpbmcg JiYgIXRpbWVvdXRJZDsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICBpZiAoIW1heFRpbWVv dXRJZCAmJiAhbGVhZGluZykgeworICAgICAgICAgICAgbGFzdENhbGxlZCA9IHN0YW1wOworICAg ICAgICAgIH0KKyAgICAgICAgICB2YXIgcmVtYWluaW5nID0gbWF4V2FpdCAtIChzdGFtcCAtIGxh c3RDYWxsZWQpLAorICAgICAgICAgICAgICBpc0NhbGxlZCA9IHJlbWFpbmluZyA8PSAwOworCisg ICAgICAgICAgaWYgKGlzQ2FsbGVkKSB7CisgICAgICAgICAgICBpZiAobWF4VGltZW91dElkKSB7 CisgICAgICAgICAgICAgIG1heFRpbWVvdXRJZCA9IGNsZWFyVGltZW91dChtYXhUaW1lb3V0SWQp OworICAgICAgICAgICAgfQorICAgICAgICAgICAgbGFzdENhbGxlZCA9IHN0YW1wOworICAgICAg ICAgICAgcmVzdWx0ID0gZnVuYy5hcHBseSh0aGlzQXJnLCBhcmdzKTsKKyAgICAgICAgICB9Cisg ICAgICAgICAgZWxzZSBpZiAoIW1heFRpbWVvdXRJZCkgeworICAgICAgICAgICAgbWF4VGltZW91 dElkID0gc2V0VGltZW91dChtYXhEZWxheWVkLCByZW1haW5pbmcpOworICAgICAgICAgIH0KKyAg ICAgICAgfQorICAgICAgICBpZiAoaXNDYWxsZWQgJiYgdGltZW91dElkKSB7CisgICAgICAgICAg dGltZW91dElkID0gY2xlYXJUaW1lb3V0KHRpbWVvdXRJZCk7CisgICAgICAgIH0KKyAgICAgICAg ZWxzZSBpZiAoIXRpbWVvdXRJZCAmJiB3YWl0ICE9PSBtYXhXYWl0KSB7CisgICAgICAgICAgdGlt ZW91dElkID0gc2V0VGltZW91dChkZWxheWVkLCB3YWl0KTsKKyAgICAgICAgfQorICAgICAgICBp ZiAobGVhZGluZ0NhbGwpIHsKKyAgICAgICAgICBpc0NhbGxlZCA9IHRydWU7CisgICAgICAgICAg cmVzdWx0ID0gZnVuYy5hcHBseSh0aGlzQXJnLCBhcmdzKTsKKyAgICAgICAgfQorICAgICAgICBp ZiAoaXNDYWxsZWQgJiYgIXRpbWVvdXRJZCAmJiAhbWF4VGltZW91dElkKSB7CisgICAgICAgICAg YXJncyA9IHRoaXNBcmcgPSBudWxsOworICAgICAgICB9CisgICAgICAgIHJldHVybiByZXN1bHQ7 CisgICAgICB9OworICAgIH0KKworICAgIC8qKgorICAgICAqIERlZmVycyBleGVjdXRpbmcgdGhl IGBmdW5jYCBmdW5jdGlvbiB1bnRpbCB0aGUgY3VycmVudCBjYWxsIHN0YWNrIGhhcyBjbGVhcmVk LgorICAgICAqIEFkZGl0aW9uYWwgYXJndW1lbnRzIHdpbGwgYmUgcHJvdmlkZWQgdG8gYGZ1bmNg IHdoZW4gaXQgaXMgaW52b2tlZC4KKyAgICAgKgorICAgICAqIEBzdGF0aWMKKyAgICAgKiBAbWVt YmVyT2YgXworICAgICAqIEBjYXRlZ29yeSBGdW5jdGlvbnMKKyAgICAgKiBAcGFyYW0ge0Z1bmN0 aW9ufSBmdW5jIFRoZSBmdW5jdGlvbiB0byBkZWZlci4KKyAgICAgKiBAcGFyYW0gey4uLip9IFth cmddIEFyZ3VtZW50cyB0byBpbnZva2UgdGhlIGZ1bmN0aW9uIHdpdGguCisgICAgICogQHJldHVy bnMge251bWJlcn0gUmV0dXJucyB0aGUgdGltZXIgaWQuCisgICAgICogQGV4YW1wbGUKKyAgICAg KgorICAgICAqIF8uZG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KiAvLyA9PiB7ICduYW1lJzog J3BlYmJsZXMnLCAnYWdlJzogMSB9CisgICAgICoKKyAgICAgKiBnZXQuY2FjaGUucGViYmxlcy5u YW1lID0gJ3BlbmVsb3BlJzsKKyAgICAgKiBnZXQoJ3BlYmJsZXMnKTsKKyAgICAgKiAvLyA9PiB7 ICduYW1lJzogJ3BlbmVsb3BlJywgJ2FnZSc6IDEgfQorICAgICAqLworICAgIGZ1bmN0aW9uIG1l bW9pemUoZnVuYywgcmVzb2x2ZXIpIHsKKyAgICAgIGlmICghaXNGdW5jdGlvbihmdW5jKSkgewor ICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yOworICAgICAgfQorICAgICAgdmFyIG1lbW9pemVk ID0gZnVuY3Rpb24oKSB7CisgICAgICAgIHZhciBjYWNoZSA9IG1lbW9pemVkLmNhY2hlLAorICAg ICAgICAgICAga2V5ID0gcmVzb2x2ZXIgPyByZXNvbHZlci5hcHBseSh0aGlzLCBhcmd1bWVudHMp IDoga2V5UHJlZml4ICsgYXJndW1lbnRzWzBdOworCisgICAgICAgIHJldHVybiBoYXNPd25Qcm9w ZXJ0eS5jYWxsKGNhY2hlLCBrZXkpCisgICAgICAgICAgPyBjYWNoZVtrZXldCisgICAgICAgICAg OiAoY2FjaGVba2V5XSA9IGZ1bmMuYXBwbHkodGhpcywgYXJndW1lbnRzKSk7CisgICAgICB9Cisg ICAgICBtZW1vaXplZC5jYWNoZSA9IHt9OworICAgICAgcmV0dXJuIG1lbW9pemVkOworICAgIH0K KworICAgIC8qKgorICAgICAqIENyZWF0ZXMgYSBmdW5jdGlvbiB0aGF0IGlzIHJlc3RyaWN0ZWQg dG8gZXhlY3V0ZSBgZnVuY2Agb25jZS4gUmVwZWF0IGNhbGxzIHRvCisgICAgICogdGhlIGZ1bmN0 aW9uIHdpbGwgcmV0dXJuIHRoZSB2YWx1ZSBvZiB0aGUgZmlyc3QgY2FsbC4gVGhlIGBmdW5jYCBp cyBleGVjdXRlZAorICAgICAqIHdpdGggdGhlIGB0aGlzYCBiaW5kaW5nIG9mIHRoZSBjcmVhdGVk IGZ1bmN0aW9uLgorICAgICAqCisgICAgICogQHN0YXRpYworICAgICAqIEBtZW1iZXJPZiBfCisg ICAgICogQGNhdGVnb3J5IEZ1bmN0aW9ucworICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGZ1bmMg VGhlIGZ1bmN0aW9uIHRvIHJlc3RyaWN0LgorICAgICAqIEByZXR1cm5zIHtGdW5jdGlvbn0gUmV0 dXJucyB0aGUgbmV3IHJlc3RyaWN0ZWQgZnVuY3Rpb24uCisgICAgICogQGV4YW1wbGUKKyAgICAg KgorICAgICAqIHZhciBpbml0aWFsaXplID0gXy5vbmNlKGNyZWF0ZUFwcGxpY2F0aW9uKTsKKyAg ICAgKiBpbml0aWFsaXplKCk7CisgICAgICogaW5pdGlhbGl6ZSgpOworICAgICAqIC8vIGBpbml0 aWFsaXplYCBleGVjdXRlcyBgY3JlYXRlQXBwbGljYXRpb25gIG9uY2UKKyAgICAgKi8KKyAgICBm dW5jdGlvbiBvbmNlKGZ1bmMpIHsKKyAgICAgIHZhciByYW4sCisgICAgICAgICAgcmVzdWx0Owor CisgICAgICBpZiAoIWlzRnVuY3Rpb24oZnVuYykpIHsKKyAgICAgICAgdGhyb3cgbmV3IFR5cGVF cnJvcjsKKyAgICAgIH0KKyAgICAgIHJldHVybiBmdW5jdGlvbigpIHsKKyAgICAgICAgaWYgKHJh bikgeworICAgICAgICAgIHJldHVybiByZXN1bHQ7CisgICAgICAgIH0KKyAgICAgICAgcmFuID0g dHJ1ZTsKKyAgICAgICAgcmVzdWx0ID0gZnVuYy5hcHBseSh0aGlzLCBhcmd1bWVudHMpOworCisg ICAgICAgIC8vIGNsZWFyIHRoZSBgZnVuY2AgdmFyaWFibGUgc28gdGhlIGZ1bmN0aW9uIG1heSBi ZSBnYXJiYWdlIGNvbGxlY3RlZAorICAgICAgICBmdW5jID0gbnVsbDsKKyAgICAgICAgcmV0dXJu IH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YsIHNsaWNlKGFyZ3VtZW50cywg MSkpOworICAgIH0KKworICAgIC8qKgorICAgICAqIFRoaXMgbWV0aG9kIGlzIGxpa2UgYF8ucGFy dGlhbGAgZXhjZXB0IHRoYXQgYHBhcnRpYWxgIGFyZ3VtZW50cyBhcmUKKyAgICAgKiBhcHBlbmRl ZCB0byB0aG9zZSBwcm92aWRlZCB0byB0aGUgbmV3IGZ1bmN0aW9uLgorICAgICAqCisgICAgICog QHN0YXRpYworICAgICAqIEBtZW1iZXJPZiBfCisgICAgICogQGNhdGVnb3J5IEZ1bmN0aW9ucwor ICAgICAqIEBwYXJhbSB7RnVuY3Rpb259IGZ1bmMgVGhlIGZ1bmN0aW9uIHRvIHBhcnRpYWxseSBh cHBseSBhcmd1bWVudHMgdG8uCisgICAgICogQHBhcmFtIHsuLi4qfSBbYXJnXSBBcmd1bWVudHMg dG8gYmUgcGFydGlhbGx5IGFwcGxpZWQuCisgICAgICogQHJldHVybnMge0Z1bmN0aW9ufSBSZXR1 cm5zIHRoZSBuZXcgcGFydGlhbGx5IGFwcGxpZWQgZnVuY3Rpb24uCisgICAgICogQGV4YW1wbGUK KyAgICAgKgorICAgICAqIHZhciBkZWZhdWx0c0RlZXAgPSBfLnBhcnRpYWxSaWdodChfLm1lcmdl LCBfLmRlZmF1bHRzKTsKKyAgICAgKgorICAgICAqIHZhciBvcHRpb25zID0geworICAgICAqICAg J3ZhcmlhYmxlJzogJ2RhdGEnLAorICAgICAqICAgJ2ltcG9ydHMnOiB7ICdqcSc6ICQgfQorICAg ICAqIH07CisgICAgICoKKyAgICAgKiBkZWZhdWx0c0RlZXAob3B0aW9ucywgXy50ZW1wbGF0ZVNl dHRpbmdzKTsKKyAgICAgKgorICAgICAqIG9wdGlvbnMudmFyaWFibGUKKyAgICAgKiAvLyA9PiAn ZGF0YScKKyAgICAgKgorICAgICAqIG9wdGlvbnMuaW1wb3J0cworICAgICAqIC8vID0+IHsgJ18n OiBfLCAnanEnOiAkIH0KKyAgICAg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Y3Qg d2l0aCBhIHNpbmdsZQorICAgICAgICAvLyBwcm9wZXJ0eSBjb250YWluaW5nIGEgcHJpbWl0aXZl IHZhbHVlCisgICAgICAgIHJldHVybiBmdW5jdGlvbihvYmplY3QpIHsKKyAgICAgICAgICB2YXIg YiA9IG9iamVjdFtrZXldOworICAgICAgICAgIHJldHVybiBhID09PSBiICYmIChhICE9PSAwIHx8 ICgxIC8gYSA9PSAxIC8gYikpOworICAgICAgICB9OworICAgICAgfQorICAgICAgcmV0dXJuIGZ1 bmN0aW9uKG9iamVjdCkgeworICAgICAgICB2YXIgbGVuZ3RoID0gcHJvcHMubGVuZ3RoLAorICAg ICAgICAgICAgcmVzdWx0ID0gZmFsc2U7CisKKyAgICAgICAgd2hpbGUgKGxlbmd0aC0tKSB7Cisg ICAgICAgICAgaWYgKCEocmVzdWx0ID0gYmFzZUlzRXF1YWwob2JqZWN0W3Byb3BzW2xlbmd0aF1d LCBmdW5jW3Byb3BzW2xlbmd0aF1dLCBudWxsLCB0cnVlKSkpIHsKKyAgICAgICAgICAgIGJyZWFr OworICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICByZXR1cm4gcmVzdWx0OworICAgICAg fTsKKyAgICB9CisKKyAgICAvKioKKyAgICAgKiBDb252ZXJ0cyB0aGUgY2hhcmFjdGVycyBgJmAs IGA8YCwgYD5gLCBgImAsIGFuZCBgJ2AgaW4gYHN0cmluZ2AgdG8gdGhlaXIKKyAgICAgKiBjb3Jy ZXNwb25kaW5nIEhUTUwgZW50aXRpZXMuCisgICAgICoKKyAgICAgKiBAc3RhdGljCisgICAgICog QG1lbWJlck9mIF8KKyAgICAgKiBAY2F0ZWdvcnkgVXRpbGl0aWVzCisgICAgICogQHBhcmFtIHtz dHJpbmd9IHN0cmluZyBUaGUgc3RyaW5nIHRvIGVzY2FwZS4KKyAgICAgKiBAcmV0dXJucyB7c3Ry aW5nfSBSZXR1cm5zIHRoZSBlc2NhcGVkIHN0cmluZy4KKyAgICAgKiBAZXhhbXBsZQorICAgICAq CisgICAgICogXy5lc2NhcGUoJ0ZyZWQsIFdpbG1hLCAmIFBlYmJsZXMnKTsKKyAgICAgKiAvLyA9 PiAnRnJlZCwgV2lsbWEsICZhbXA7IFBlYmJsZXMnCisgICAgICovCisgICAgZnVuY3Rpb24gZXNj YXBlKHN0cmluZykgeworICAgICAgcmV0dXJuIHN0cmluZyA9PSBudWxsID8gJycgOiBTdHJpbmco c3RyaW5nKS5yZXBsYWNlKHJlVW5lc2NhcGVkSHRtbCwgZXNjYXBlSHRtbENoYXIpOworICAgIH0K KworICAgIC8qKgorICAgICAqIFRoaXMgbWV0aG9kIHJldHVybnMgdGhlIGZpcnN0IGFyZ3VtZW50 IHByb3ZpZGVkIHRvIGl0LgorICAgICAqCisgICAgICogQHN0YXRpYworICAgICAqIEBtZW1iZXJP ZiBfCisgICAgICogQGNhdGVnb3J5IFV0aWxpdGllcworICAgICAqIEBwYXJhbSB7Kn0gdmFsdWUg QW55IHZhbHVlLgorICAgICAqIEByZXR1cm5zIHsqfSBSZXR1cm5zIGB2YWx1ZWAuCisgICAgICog QGV4YW1wbGUKKyAgICAgKgorICAgICAqIHZhciBvYmplY3QgPSB7ICduYW1lJzogJ2ZyZWQnIH07 CisgICAgICogXy5pZGVudGl0eShvYmplY3QpID09PSBvYmplY3Q7CisgICAgICogLy8gPT4gdHJ1 ZQorICAgICAqLworICAgIGZ1bmN0aW9uIGlkZW50aXR5KHZhbHVlKSB7CisgICAgICByZXR1cm4g dmFsdWU7CisgICAgfQorCisgICAgLyoqCisgICAgICogQWRkcyBmdW5jdGlvbiBwcm9wZXJ0aWVz IG9mIGEgc291cmNlIG9iamVjdCB0byB0aGUgZGVzdGluYXRpb24gb2JqZWN0LgorICAgICAqIElm IGBvYmplY3RgIGlzIGEgZnVuY3Rpb24gbWV0aG9kcyB3aWxsIGJlIGFkZGVkIHRvIGl0cyBwcm90 b3R5cGUgYXMgd2VsbC4KKyAgICAgKgorICAgICAqIEBzdGF0aW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AgICAgICAgICAg ICAgdmFsdWUgPSB0aGlzLl9fd3JhcHBlZF9fLAorICAgICAgICAgICAgICAgIGFyZ3MgPSBbdmFs dWVdOworCisgICAgICAgICAgICBwdXNoLmFwcGx5KGFyZ3MsIGFyZ3VtZW50cyk7CisgICAgICAg ICAgICB2YXIgcmVzdWx0ID0gZnVuYy5hcHBseShvYmplY3QsIGFyZ3MpOworICAgICAgICAgICAg aWYgKGNoYWluIHx8IGNoYWluQWxsKSB7CisgICAgICAgICAgICAgIGlmICh2YWx1ZSA9PT0gcmVz dWx0ICYmIGlzT2JqZWN0KHJlc3VsdCkpIHsKKyAgICAgICAgICAgICAgICByZXR1cm4gdGhpczsK KyAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICByZXN1bHQgPSBuZXcgY3RvcihyZXN1bHQp OworICAgICAgICAgICAgICByZXN1bHQuX19jaGFpbl9fID0gY2hhaW5BbGw7CisgICAgICAgICAg ICB9CisgICAgICAgICAgICByZXR1cm4gcmVzdWx0OworICAgICAgICAgIH07CisgICAgICAgIH0K KyAgICAgIH0pOworICAgIH0KKworICAgIC8qKgorICAgICAqIFJldmVydHMgdGhlICdfJyB2YXJp YWJsZSB0byBpdHMgcHJldmlvdXMgdmFsdWUgYW5kIHJldHVybnMgYSByZWZlcmVuY2UgdG8KKyAg ICAgKiB0aGUgYGxvZGFzaGAgZnVuY3Rpb24uCisgICAgICoKKyAgICAgKiBAc3RhdGljCisgICAg ICogQG1lbWJlck9mIF8KKyAgICAgKiBAY2F0ZWdvcnkgVXRpbGl0aWVzCisgICAgICogQHJldHVy bnMge0Z1bmN0aW9ufSBSZXR1cm5zIHRoZSBgbG9kYXNoYCBmdW5jdGlvbi4KKyAgICAgKiBAZXhh bXBsZQorICAgICAqCisgICAgICogdmFyIGxvZGFzaCA9IF8ubm9Db25mbGljdCgpOworICAgICAq LworICAgIGZ1bmN0aW9uIG5vQ29uZmxpY3QoKSB7CisgICAgICBjb250ZXh0Ll8gPSBvbGREYXNo OworICAgICAgcmV0dXJuIHRoaXM7CisgICAgfQorCisgICAgLyoqCisgICAgICogQSBuby1vcGVy YXRpb24gZnVuY3Rpb24uCisgICAgICoKKyAgICAgKiBAc3RhdGljCisgICAgICogQG1lbWJlck9m IF8KKyAgICAgKiBAY2F0ZWdvcnkgVXRpbGl0aWVzCisgICAgICogQGV4YW1wbGUKKyAgICAgKgor ICAgICAqIHZhciBvYmplY3QgPSB7ICduYW1lJzogJ2ZyZWQnIH07CisgICAgICogXy5ub29wKG9i amVjdCkgPT09IHVuZGVmaW5lZDsKKyAgICAgKiAvLyA9PiB0cnVlCisgICAgICovCisgICAgZnVu Y3Rpb24gbm9vcCgpIHsKKyAgICAgIC8vIG5vIG9wZXJhdGlvbiBwZXJmb3JtZWQKKyAgICB9CisK KyAgICAvKioKKyAgICAgKiBHZXRzIHRoZSBudW1iZXIgb2YgbWlsbGlzZWNvbmRzIHRoYXQgaGF2 ZSBlbGFwc2VkIHNpbmNlIHRoZSBVbml4IGVwb2NoCisgICAgICogKDEgSmFudWFyeSAxOTcwIDAw OjAwOjAwIFVUQykuCisgICAgICoKKyAgICAgKiBAc3RhdGljCisgICAgICogQG1lbWJlck9mIF8K KyAgICAgKiBAY2F0ZWdvcnkgVXRpbGl0aWVzCisgICAgICogQGV4YW1wbGUKKyAgICAgKgorICAg ICAqIHZhciBzdGFtcCA9IF8ubm93KCk7CisgICAgICogXy5kZWZlcihmdW5jdGlvbigpIHsgY29u c29sZS5sb2coXy5ub3coKSAtIHN0YW1wKTsgfSk7CisgICAgICogLy8gPT4gbG9ncyB0aGUgbnVt YmVyIG9mIG1pbGxpc2Vjb25kcyBpdCB0b29rIGZvciB0aGUgZGVmZXJyZWQgZnVuY3Rpb24gdG8g YmUgY2FsbGVkCisgICAgICovCisgICAgdmFyIG5vdyA9IGlzTmF0aXZlKG5vdyA9IERhdGUubm93 KSAmJiBub3cgfHwgZnVuY3Rpb24oKSB7CisgICAgICByZXR1cm4gbmV3IERhdGUoKS5nZXRU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CByYWRpeCkgeworICAgICAgLy8gRmlyZWZveCA8IDIxIGFuZCBP cGVyYSA8IDE1IGZvbGxvdyB0aGUgRVMzIHNwZWNpZmllZCBpbXBsZW1lbnRhdGlvbiBvZiBgcGFy c2VJbnRgCisgICAgICByZXR1cm4gbmF0aXZlUGFyc2VJbnQoaXNTdHJpbmcodmFsdWUpID8gdmFs dWUucmVwbGFjZShyZUxlYWRpbmdTcGFjZXNBbmRaZXJvcywgJycpIDogdmFsdWUsIHJhZGl4IHx8 IDApOworICAgIH07CisKKyAgICAvKioKKyAgICAgKiBDcmVhdGVzIGEgIl8ucGx1Y2siIHN0eWxl IGZ1bmN0aW9uLCB3aGljaCByZXR1cm5zIHRoZSBga2V5YCB2YWx1ZSBvZiBhCisgICAgICogZ2l2 ZW4gb2JqZWN0LgorICAgICAqCisgICAgICogQHN0YXRpYworICAgICAqIEBtZW1iZXJPZiBfCisg ICAgICogQGNhdGVnb3J5IFV0aWxpdGllcworICAgICAqIEBwYXJhbSB7c3RyaW5nfSBrZXkgVGhl IG5hbWUgb2YgdGhlIHByb3BlcnR5IHRvIHJldHJpZXZlLgorICAgICAqIEByZXR1cm5zIHtGdW5j dGlvbn0gUmV0dXJucyB0aGUgbmV3IGZ1bmN0aW9uLgorICAgICAqIEBleGFtcGxlCisgICAgICoK KyAgICAgKiB2YXIgY2hhcmFjdGVycyA9IFsKKyAgICAgKiAgIHsgJ25hbWUnOiAnZnJlZCcsICAg J2FnZSc6IDQwIH0sCisgICAgICogICB7ICduYW1lJzogJ2Jhcm5leScsICdhZ2UnOiAzNiB9Cisg ICAgICogXTsKKyAgICAgKgorICAgICAqIHZhciBnZXROYW1lID0gXy5wcm9wZXJ0eSgnbmFtZScp OworICAgICAqCisgICAgICogXy5tYXAoY2hhcmFjdGVycywgZ2V0TmFtZSk7CisgICAgICogLy8g PT4gWydiYXJuZXknLCAnZnJlZCddCisgICAgICoKKyAgICAgKiBfLnNvcnRCeShjaGFyYWN0ZXJz LCBnZXROYW1lKTsKKyAgICAgKiAvLyA9PiBbeyAnbmFtZSc6ICdiYXJuZXknLCAnYWdlJzogMzYg fSwgeyAnbmFtZSc6ICdmcmVkJywgICAnYWdlJzogNDAgfV0KKyAgICAgKi8KKyAgICBmdW5jdGlv biBwcm9wZXJ0eShrZXkpIHsKKyAgICAgIHJldHVybiBmdW5jdGlvbihvYmplY3QpIHsKKyAgICAg ICAgcmV0dXJuIG9iamVjdFtrZXldOworICAgICAgfTsKKyAgICB9CisKKyAgICAvKioKKyAgICAg KiBQcm9kdWNlcyBhIHJhbmRvbSBudW1iZXIgYmV0d2VlbiBgbWluYCBhbmQgYG1heGAgKGluY2x1 c2l2ZSkuIElmIG9ubHkgb25lCisgICAgICogYXJndW1lbnQgaXMgcHJvdmlkZWQgYSBudW1iZXIg YmV0d2VlbiBgMGAgYW5kIHRoZSBnaXZlbiBudW1iZXIgd2lsbCBiZQorICAgICAqIHJldHVybmVk LiBJZiBgZmxvYXRpbmdgIGlzIHRydWV5IG9yIGVpdGhlciBgbWluYCBvciBgbWF4YCBhcmUgZmxv YXRzIGEKKyAgICAgKiBmbG9hdGluZy1wb2ludCBudW1iZXIgd2lsbCBiZSByZXR1cm5lZCBpbnN0 ZWFkIG9mIGFuIGludGVnZXIuCisgICAgICoKKyAgICAgKiBAc3RhdGljCisgICAgICogQG1lbWJl ck9mIF8KKyAgICAgKiBAY2F0ZWdvcnkgVXRpbGl0aWVzCisgICAgICogQHBhcmFtIHtudW1iZXJ9 IFttaW49MF0gVGhlIG1pbmltdW0gcG9zc2libGUgdmFsdWUuCisgICAgICogQHBhcmFtIHtudW1i ZXJ9IFttYXg9MV0gVGhlIG1heGltdW0gcG9zc2libGUgdmFsdWUuCisgICAgICogQHBhcmFtIHti b29sZWFufSBbZmxvYXRpbmc9ZmFsc2VdIFNwZWNpZnkgcmV0dXJuaW5nIGEgZmxvYXRpbmctcG9p bnQgbnVtYmVyLgorICAgICAqIEByZXR1cm5zIHtudW1iZXJ9IFJldHVybnMgYSByYW5kb20gbnVt YmVyLgorICAgICAqIEBleGFtcGxlCisgICAgICoKKyAgICAgKiBfLnJhbmRvbSgwLCA1KTsKKyAg ICAgKiAvLyA9PiBhbiBpbnRlZ2VyIGJldHdlZW4gMCBhbmQgNQorICAgICAqCisgICAgICogXy5y YW5kb20oNSk7CisgICAgICogLy8gPT4gYWxzbyBhbiBpbnRlZ2VyIGJldHdlZW4gMCBhbmQgNQor ICAgICAqCisgICAgICogXy5yYW5kb20oNSwgdHJ1ZSk7CisgICAgICogLy8gPT4gYSBmbG9hdGlu Zy1wb2ludCBudW1iZXIgYmV0d2VlbiAwIGFuZCA1CisgICAgICoKKyAgICAgKiBfLnJhbmRvbSgx LjIsIDUuMik7CisgICAgICogLy8gPT4gYSBmbG9hdGluZy1wb2ludCBudW1iZXIgYmV0d2VlbiAx LjIgYW5kIDUuMgorICAgICAqLworICAgIGZ1bmN0aW9uIHJhbmRvbShtaW4sIG1heCwgZmxvYXRp bmcpIHsKKyAgICAgIHZhciBub01pbiA9IG1pbiA9PSBudWxsLAorICAgICAgICAgIG5vTWF4ID0g bWF4ID09IG51bGw7CisKKyAgICAgIGlmIChmbG9hdGluZyA9PSBudWxsKSB7CisgICAgICAgIGlm ICh0eXBlb2YgbWluID09ICdib29sZWFuJyAmJiBub01heCkgeworICAgICAgICAgIGZsb2F0aW5n ID0gbWluOworICAgICAgICAgIG1pbiA9IDE7CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAo IW5vTWF4ICYmIHR5cGVvZiBtYXggPT0gJ2Jvb2xlYW4nKSB7CisgICAgICAgICAgZmxvYXRpbmcg PSBtYXg7CisgICAgICAgICAgbm9NYXggPSB0cnVlOworICAgICAgICB9CisgICAgICB9CisgICAg ICBpZiAobm9NaW4gJiYgbm9NYXgpIHsKKyAgICAgICAgbWF4ID0gMTsKKyAgICAgIH0KKyAgICAg IG1pbiA9ICttaW4gfHwgMDsKKyAgICAgIGlmIChub01heCkgeworICAgICAgICBtYXggPSBt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WxlZC5zb3VyY2U7CisgICAgICogLy8gPT4gZnVuY3Rpb24oZGF0YSkgeworICAgICAq ICAgdmFyIF9fdCwgX19wID0gJycsIF9fZSA9IF8uZXNjYXBlOworICAgICAqICAgX19wICs9ICdo aSAnICsgKChfX3QgPSAoIGRhdGEubmFtZSApKSA9PSBudWxsID8gJycgOiBfX3QpICsgJyEnOwor ICAgICAqICAgcmV0dXJuIF9fcDsKKyAgICAgKiB9CisgICAgICoKKyAgICAgKiAvLyB1c2luZyB0 aGUgYHNvdXJjZWAgcHJvcGVydHkgdG8gaW5saW5lIGNvbXBpbGVkIHRlbXBsYXRlcyBmb3IgbWVh bmluZ2Z1bAorICAgICAqIC8vIGxpbmUgbnVtYmVycyBpbiBlcnJvciBtZXNzYWdlcyBhbmQgYSBz dGFjayB0cmFjZQorICAgICAqIGZzLndyaXRlRmlsZVN5bmMocGF0aC5qb2luKGN3ZCwgJ2pzdC5q cycpLCAnXAorICAgICAqICAgdmFyIEpTVCA9IHtcCisgICAgICogICAgICJtYWluIjogJyArIF8u dGVtcGxhdGUobWFpblRleHQpLnNvdXJjZSArICdcCisgICAgICogICB9O1wKKyAgICAgKiAnKTsK KyAgICAgKi8KKyAgICBmdW5jdGlvbiB0ZW1wbGF0ZSh0ZXh0LCBkYXRhLCBvcHRpb25zKSB7Cisg ICAgICAvLyBiYXNlZCBvbiBKb2huIFJlc2lnJ3MgYHRtcGxgIGltcGxlbWVudGF0aW9uCisgICAg ICAvLyBodHRwOi8vZWpvaG4ub3JnL2Jsb2cvamF2YXNjcmlwdC1taWNyby10ZW1wbGF0aW5nLwor ICAgICAgLy8gYW5kIExhdXJhIERva3Rvcm92YSdzIGRvVC5qcworICAgICAgLy8gaHR0cHM6Ly9n aXRodWIuY29tL29sYWRvL2RvVAorICAgICAgdmFyIHNldHRpbmdzID0gbG9kYXNoLnRlbXBsYXRl U2V0dGluZ3M7CisgICAgICB0ZXh0ID0gU3RyaW5nKHRleHQgfHwgJycpOworCisgICAgICAv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VtcGxhdGVWYWx1ZSwgZXZhbHVhdGVWYWx1 ZSwgb2Zmc2V0KSB7CisgICAgICAgIGludGVycG9sYXRlVmFsdWUgfHwgKGludGVycG9sYXRlVmFs dWUgPSBlc1RlbXBsYXRlVmFsdWUpOworCisgICAgICAgIC8vIGVzY2FwZSBjaGFyYWN0ZXJzIHRo YXQgY2Fubm90IGJlIGluY2x1ZGVkIGluIHN0cmluZyBsaXRlcmFscworICAgICAgICBzb3VyY2Ug Kz0gdGV4dC5zbGljZShpbmRleCwgb2Zmc2V0KS5yZXBsYWNlKHJlVW5lc2NhcGVkU3RyaW5nLCBl c2NhcGVTdHJpbmdDaGFyKTsKKworICAgICAgICAvLyByZXBsYWNlIGRlbGltaXRlcnMgd2l0aCBz bmlwcGV0cworICAgICAgICBpZiAoZXNjYXBlVmFsdWUpIHsKKyAgICAgICAgICBzb3VyY2UgKz0g IicgK1xuX19lKCIgKyBlc2NhcGVWYWx1ZSArICIpICtcbiciOworICAgICAgICB9CisgICAgICAg IGlmIChldmFsdWF0ZVZhbHVlKSB7CisgICAgICAgICAgaXNFdmFsdWF0aW5nID0gdHJ1ZTsKKyAg ICAgICAgICBzb3VyY2UgKz0gIic7XG4iICsgZXZhbHVhdGVWYWx1ZSArICI7XG5fX3AgKz0gJyI7 CisgICAgICAgIH0KKyAgICAgICAgaWYgKGludGVycG9sYXRlVmFsdWUpIHsKKyAgICAgICAgICBz b3VyY2UgKz0gIicgK1xuKChfX3QgPSAoIiArIGludGVycG9sYXRlVmFsdWUgKyAiKSkgPT0gbnVs bCA/ICcnIDogX190KSArXG4nIjsKKyAgICAgICAgfQorICAgICAgICBpbmRleCA9IG9mZnNldCAr IG1hdGNoLmxlbmd0aDsKKworICAgICAgICAvLyB0aGUgSlMgZW5naW5lIGVtYmVkZGVkIGluIEFk b2JlIHByb2R1Y3RzIHJlcXVpcmVzIHJldHVybmluZyB0aGUgYG1hdGNoYAorICAgICAgICAvLyBz dHJpbmcgaW4gb3JkZXIgdG8gcHJvZHVjZSB0aGUgY29ycmVjdCBgb2Zmc2V0YCB2YWx1ZQorICAg ICAgICByZXR1cm4gbWF0Y2g7CisgICAgICB9KTsKKworICAgICAgc291cmNlICs9ICInO1xuIjsK KworICAgICAgLy8gaWYgYHZhcmlhYmxlYCBpcyBub3Qgc3BlY2lmaWVkLCB3cmFwIGEgd2l0aC1z dGF0ZW1lbnQgYXJvdW5kIHRoZSBnZW5lcmF0ZWQKKyAgICAgIC8vIGNvZGUgdG8gYWRkIHRoZSBk YXRhIG9iamVjdCB0byB0aGUgdG9wIG9mIHRoZSBzY29wZSBjaGFpbgorICAgICAgdmFyIHZhcmlh YmxlID0gb3B0aW9ucy52YXJpYWJsZSwKKyAgICAgICAgICBoYXNWYXJpYWJsZSA9IHZhcmlhYmxl OworCisgICAgICBpZiAoIWhhc1ZhcmlhYmxlKSB7CisgICAgICAgIHZhcmlhYmxlID0gJ29iaic7 CisgICAgICAgIHNvdXJjZSA9ICd3aXRoICgnICsgdmFyaWFibGUgKyAnKSB7XG4nICsgc291cmNl ICsgJ1xufVxuJzsKKyAgICAgIH0KKyAgICAgIC8vIGNsZWFudXAgY29kZSBieSBzdHJpcHBpbmcg ZW1wdHkgc3RyaW5ncworICAgICAgc291cmNlID0gKGlzRXZhbHVhdGluZyA/IHNvdXJjZS5yZXBs YWNlKHJlRW1wdHlTdHJpbmdMZWFkaW5nLCAnJykgOiBzb3VyY2UpCisgICAgICAgIC5yZXBsYWNl KHJlRW1wdHlTdHJpbmdNaWRkbGUsICckMScpCisgICAgICAgIC5yZXBsYWNlKHJlRW1wdHlTdHJp bmdUcmFpbGluZywgJyQxOycpOworCisgICAgICAvLyBmcmFtZSBjb2RlIGFzIHRoZSBmdW5jdGlv biBib2R5CisgICAgICBzb3VyY2UgPSAnZnVuY3Rpb24oJyArIHZhcmlhYmxlICsgJykge1xuJyAr CisgICAgICAgIChoYXNWYXJpYWJsZSA/ICcnIDogdmFyaWFibGUgKyAnIHx8ICgnICsgdmFyaWFi bGUgKyAnID0ge30pO1xuJykgKworICAgICAgICAidmFyIF9fdCwgX19wID0gJycsIF9fZSA9IF8u ZXNjYXBlIiArCisgICAgICAgIChpc0V2YWx1YXRpbmcKKyAgICAgICAgICA/ICcsIF9faiA9IEFy cmF5LnByb3RvdHlwZS5qb2luO1xuJyArCisgICAgICAgICAgICAiZnVuY3Rpb24gcHJpbnQoKSB7 IF9fcCArPSBfX2ouY2FsbChhcmd1bWVudHMsICcnKSB9XG4iCisgICAgICAgICAgOiAnO1xuJwor ICAgICAgICApICsKKyAgICAgICAgc291cmNlICsKKyAgICAgICAgJ3JldHVybiBfX3Bcbn0nOwor CisgICAgICAvLyBVc2UgYSBzb3VyY2VVUkwgZm9yIGVhc2llciBkZWJ1Z2dpbmcuCisgICAgICAv LyBodHRwOi8vd3d3Lmh0bWw1cm9ja3MuY29tL2VuL3R1dG9yaWFscy9kZXZlbG9wZXJ0b29scy9z b3VyY2VtYXBzLyN0b2Mtc291cmNldXJsCisgICAgICB2YXIgc291cmNlVVJMID0gJ1xuLypcbi8v IyBzb3VyY2VVUkw9JyArIChvcHRpb25zLnNvdXJjZVVSTCB8fCAnL2xvZGFzaC90ZW1wbGF0ZS9z b3VyY2VbJyArICh0ZW1wbGF0ZUNvdW50ZXIrKykgKyAnXScpICsgJ1xuKi8nOworCisgICAgICB0 cnkgeworICAgICAgICB2YXIgcmVzdWx0ID0gRnVuY3Rpb24oaW1wb3J0c0tleXMsICdyZXR1cm4g JyArIHNvdXJjZSArIHNvdXJjZVVSTCkuYXBwbHkodW5kZWZpbmVkLCBpbXBvcnRzVmFsdWVzKTsK KyAgICAgIH0gY2F0Y2goZSkgeworICAgICAgICBlLnNvdXJjZSA9IHNvdXJjZTsKKyAgICAgICAg dGhyb3cgZTsKKyAgICAgIH0KKyAgICAgIGlmIChkYXRhKSB7CisgICAgICAgIHJldHVybiByZXN1 bHQoZGF0YSk7CisgICAgICB9CisgICAgICAvLyBwcm92aWRlIHRoZSBjb21waWxlZ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leGFtcGxlCisgICAgICoKKyAgICAg KiBfKFsxLCAyLCAzLCA0XSkKKyAgICAgKiAgLnRhcChmdW5jdGlvbihhcnJheSkgeyBhcnJheS5w b3AoKTsgfSkKKyAgICAgKiAgLnJldmVyc2UoKQorICAgICAqICAudmFsdWUoKTsKKyAgICAgKiAv LyA9PiBbMywgMiwgMV0KKyAgICAgKi8KKyAgICBmdW5jdGlvbiB0YXAodmFsdWUsIGludGVyY2Vw dG9yKSB7CisgICAgICBpbnRlcmNlcHRvcih2YWx1ZSk7CisgICAgICByZXR1cm4gdmFsdWU7Cisg ICAgfQorCisgICAgLyoqCisgICAgICogRW5hYmxlcyBleHBsaWNpdCBtZXRob2QgY2hhaW5pbmcg b24gdGhlIHdyYXBwZXIgb2JqZWN0LgorICAgICAqCisgICAgICogQG5hbWUgY2hhaW4KKyAgICAg KiBAbWVtYmVyT2YgXworICAgICAqIEBjYXRlZ29yeSBDaGFpbmluZworICAgICAqIEByZXR1cm5z IHsqfSBSZXR1cm5zIHRoZSB3cmFwcGVyIG9iamVjdC4KKyAgICAgKiBAZXhhbXBsZQorICAgICAq CisgICAgICogdmFyIGNoYXJhY3RlcnMgPSBbCisgICAgICogICB7ICduYW1lJzogJ2Jhcm5leScs ICdhZ2UnOiAzNiB9LAorICAgICAqICAgeyAnbmFtZSc6ICdmcmVkJywgICAnYWdlJzogNDAgfQor ICAgICAqIF07CisgICAgICoKKyAgICAgKiAvLyB3aXRob3V0IGV4cGxpY2l0IGNoYWluaW5nCisg ICAgICogXyhjaGFyYWN0ZXJzKS5maXJzdCgpOworICAgICAqIC8vID0+IHsgJ25hbWUnOiAnYmFy bmV5JywgJ2FnZSc6IDM2IH0KKyAgICAgKgorICAgICAqIC8vIHdpdGggZXhwbGljaXQgY2hhaW5p bmcKKyAgICAgKiBfKGNoYXJhY3RlcnMpLmNoYWluKCkKKyAgICAgKiAgIC5maXJzdCgpCisgICAg ICogICAucGljaygnYWdlJykKKyAgICAgKiAgIC52YWx1ZSgpOworICAgICAqIC8vID0+IHsgJ2Fn ZSc6IDM2IH0KKyAgICAgKi8KKyAgICBmdW5jdGlvbiB3cmFwcGVyQ2hhaW4oKSB7CisgICAgICB0 aGlzLl9fY2hhaW5fXyA9IHRydWU7CisgICAgICByZXR1cm4gdGhpczsKKyAgICB9CisKKyAgICAv KioKKyAgICAgKiBQcm9kdWNlcyB0aGUgYHRvU3RyaW5nYCByZXN1bHQgb2YgdGhlIHdyYXBwZWQg dmFsdWUuCisgICAgICoKKyAgICAgKiBAbmFtZSB0b1N0cmluZworICAgICAqIEBtZW1iZXJPZiBf CisgICAgICogQGNhdGVnb3J5IENoYWluaW5nCisgICAgICogQHJldHVybnMge3N0cmluZ30gUmV0 dXJucyB0aGUgc3RyaW5nIHJlc3VsdC4KKyAgICAgKiBAZXhhbXBsZQorICAgICAqCisgICAgICog XyhbMSwgMiwgM10pLnRvU3RyaW5nKCk7CisgICAgICogLy8gPT4gJzEsMiwzJworICAgICAqLwor ICAgIGZ1bmN0aW9uIHdyYXBwZXJUb1N0cmluZygpIHsKKyAgICAgIHJldHVybiBTdHJpbmcodGhp cy5fX3dyYXBwZWRfXyk7CisgICAgfQorCisgICAgLyoqCisgICAgICogRXh0cmFjdHMgdGhlIHdy YXBwZWQgdmFsdWUuCisgICAgICoKKyAgICAgKiBAbmFtZSB2YWx1ZU9mCisgICAgICogQG1lbWJl ck9mIF8KKyAgICAgKiBAYWxpYXMgdmFsdWUKKyAgICAgKiBAY2F0ZWdvcnkgQ2hhaW5pbmcKKyAg ICAgKiBAcmV0dXJucyB7Kn0gUmV0dXJucyB0aGUgd3JhcHBlZCB2YWx1ZS4KKyAgICAgKiBAZXhh bXBsZQorICAgICAqCisgICAgICogXyhbMSwgMiwgM10pLnZhbHVlT2YoKTsKKyAgICAgKiAvLyA9 PiBbMSwgMiwgM10KKyAgICAgKi8KKyAgICBmdW5jdGlvbiB3cmFwcGVyVmFsdWVPZigpIHsKKyAg ICAgIHJldHVybiB0aGlzLl9fd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tLS0tLS0tLS0tLS0tLS0qLworCisgICAgLyoqCisgICAg ICogVGhlIHNlbWFudGljIHZlcnNpb24gbnVtYmVyLgorICAgICAqCisgICAgICogQHN0YXRpYwor ICAgICAqIEBtZW1iZXJPZiBfCisgICAgICogQHR5cGUgc3RyaW5nCisgICAgICovCisgICAgbG9k YXNoLlZFUlNJT04gPSAnMi40LjEnOworCisgICAgLy8gYWRkICJDaGFpbmluZyIgZnVuY3Rpb25z IHRvIHRoZSB3cmFwcGVyCisgICAgbG9kYXNoLnByb3RvdHlwZS5jaGFpbiA9IHdyYXBwZXJDaGFp bjsKKyAgICBsb2Rhc2gucHJvdG90eXBlLnRvU3RyaW5nID0gd3JhcHBlclRvU3RyaW5nOworICAg IGxvZGFzaC5wcm90b3R5cGUudmFsdWUgPSB3cmFwcGVyVmFsdWVPZjsKKyAgICBsb2Rhc2gucHJv dG90eXBlLnZhbHVlT2YgPSB3cmFwcGVyVmFsdWVPZjsKKworICAgIC8vIGFkZCBgQXJyYXlgIGZ1 bmN0aW9ucyB0aGF0IHJldHVybiB1bndyYXBwZWQgdmFsdWVzCisgICAgZm9yRWFjaChbJ2pvaW4n LCAncG9wJywgJ3NoaWZ0J10sIGZ1bmN0aW9uKG1ldGhvZE5hbWUpIHsKKyAgICAgIHZhciBmdW5j ID0gYXJyYXlSZWZbbWV0aG9kTmFtZV07CisgICAgICBsb2Rhc2gucHJvdG90eXBlW21ldGhvZE5h bWVdID0gZnVuY3Rpb24oKSB7CisgICAgICAgIHZhciBjaGFpbkFsbCA9IHRoaXMuX19jaGFpbl9f LAorICAgICAgICAgICAgcmVzdWx0ID0gZnVuYy5hcHBseSh0aGlzLl9fd3JhcHBlZF9fLCBhcmd1 bWVudHMpOworCisgICAgICAgIHJldHVybiBjaGFpbkFsbAorICAgICAgICAgID8gbmV3IGxvZGFz aFdyYXBwZXIocmVzdWx0LCBjaGFpbkFsbCkKKyAgICAgICAgICA6IHJlc3VsdDsKKyAgICAgIH07 CisgICAgfSk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KyAgICAKKyAgICBpZiAobW9kZSA9PT0gdW5kZWZp bmVkKSB7CisgICAgICAgIG1vZGUgPSAwNzc3ICYgKH5wcm9jZXNzLnVtYXNrKCkpOworICAgIH0K KyAgICBpZiAoIW1hZGUpIG1hZGUgPSBudWxsOworICAgIAorICAgIHZhciBjYiA9IGYgfHwgZnVu Y3Rpb24gKCkge307CisgICAgcCA9IHBhdGgucmVzb2x2ZShwKTsKKyAgICAKKyAgICB4ZnMubWtk aXIocCwgbW9kZSwgZnVuY3Rpb24gKGVyKSB7CisgICAgICAgIGlmICghZXIpIHsKKyAgICAgICAg ICAgIG1hZGUgPSBtYWRlIHx8IHA7CisgICAgICAgICAgICByZXR1cm4gY2IobnVsbCwgbWFkZSk7 CisgICAgICAgIH0KKyAgICAgICAgc3dpdGNoIChlci5jb2RlKSB7CisgICAgICAgICAgICBjYXNl ICdFTk9FTlQnOgorICAgICAgICAgICAgICAgIG1rZGlyUChwYXRoLmRpcm5hbWUocCksIG9wdHMs IGZ1bmN0aW9uIChlciwgbWFkZSkgeworICAgICAgICAgICAgICAgICAgICBpZiAoZXIpIGNiKGVy LCBtYWRlKTsKKyAgICAgICAgICAgICAgICAgICAgZWxzZSBta2RpclAocCwgb3B0cywgY2IsIG1h ZGUpOworICAgICAgICAgICAgICAgIH0pOworICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAg ICAgICAgICAvLyBJbiB0aGUgY2FzZSBvZiBhbnkgb3RoZXIgZXJyb3IsIGp1c3Qgc2VlIGlmIHRo ZXJlJ3MgYSBkaXIKKyAgICAgICAgICAgIC8vIHRoZXJlIGFscmVhZHkuICBJZiBzbywgdGhlbiBo b29yYXkhICBJZiBub3QsIHRoZW4gc29tZXRoaW5nCisgICAgICAgICAgICAvLyBpcyBib3JrZWQu CisgICAgICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgICAgIHhmcy5zdGF0KHAsIGZ1bmN0 aW9uIChlcjIsIHN0YXQpIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gaWYgdGhlIHN0YXQgZmFp bHMsIHRoZW4gdGhhdCdzIHN1cGVyIHdlaXJkLgorICAgICAgICAgICAgICAgICAgICAvLyBsZXQg dGhlIG9yaWdpbmFsIGVycm9yIGJlIHRoZSBmYWlsdXJlIHJlYXNvbi4KKyAgICAgICAgICAgICAg ICAgICAgaWYgKGVyMiB8fCAhc3RhdC5pc0RpcmVjdG9yeSgpKSBjYihlciwgbWFkZSkKKyAgICAg ICAgICAgICAgICAgICAgZWxzZSBjYihudWxsLCBtYWRlKTsKKyAgICAgICAgICAgICAgICB9KTsK KyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgIH0pOworfQorCitta2RpclAu c3luYyA9IGZ1bmN0aW9uIHN5bmMgKHAsIG9wdHMsIG1hZGUpIHsKKyAgICBpZiAoIW9wdHMgfHwg dHlwZW9mIG9wdHMgIT09ICdvYmplY3QnKSB7CisgICAgICAgIG9wdHMgPSB7IG1vZGU6IG9wdHMg fTsKKyAgICB9CisgICAgCisgICAgdmFyIG1vZGUgPSBvcHRzLm1vZGU7CisgICAgdmFyIHhmcyA9 IG9wdHMuZnMgfHwgZnM7CisgICAgCisgICAgaWYgKG1vZGUgPT09IHVuZGVmaW5lZCkgeworICAg ICAgICBtb2RlID0gMDc3NyAmICh+cHJvY2Vzcy51bWFzaygpKTsKKyAgICB9CisgICAgaWYgKCFt YWRlKSBtYWRlID0gbnVsbDsKKworICAgIHAgPSBwYXRoLnJlc29sdmUocCk7CisKKyAgICB0cnkg eworICAgICAgICB4ZnMubWtkaXJTeW5jKHAsIG1vZGUpOworICAgICAgICBtYWRlID0gbWFkZSB8 fCBwOworICAgIH0KKyAgICBjYXRjaCAoZXJyMCkgeworICAgICAgICBzd2l0Y2ggKGVycjAuY29k ZSkgeworICAgICAgICAgICAgY2FzZSAnRU5PRU5UJyA6CisgICAgICAgICAgICAgICAgbWFkZSA9 IHN5bmMocGF0aC5kaXJuYW1lKHApLCBvcHRzLCBtYWRlKTsKKyAgICAgICAgICAgICAgICBzeW5j KHAsIG9wdHMsIG1hZGUpOworICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICAv LyBJbiB0aGUgY2FzZSBvZiBhbnkgb3RoZXIgZXJyb3IsIGp1c3Qgc2VlIGlmIHRoZXJlJ3MgYSBk aXIKKyAgICAgICAgICAgIC8vIHRoZXJlIGFscmVhZHkuICBJZiBzbywgdGhlbiBob29yYXkhICBJ ZiBub3QsIHRoZW4gc29tZXRoaW5nCisgICAgICAgICAgICAvLyBpcyBib3JrZWQuCisgICAgICAg ICAgICBkZWZhdWx0OgorICAgICAgICAgICAgICAgIHZhciBzdGF0OworICAgICAgICAgICAgICAg IHRyeSB7CisgICAgICAgICAgICAgICAgICAgIHN0YXQgPSB4ZnMuc3RhdFN5bmMocCk7CisgICAg ICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGNhdGNoIChlcnIxKSB7CisgICAgICAgICAg ICAgICAgICAgIHRocm93IGVycjA7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAg IGlmICghc3RhdC5pc0RpcmVjdG9yeSgpKSB0aHJvdyBlcnIwOworICAgICAgICAgICAgICAgIGJy ZWFrOworICAgICAgICB9CisgICAgfQorCisgICAgcmV0dXJuIG1hZGU7Cit9OwpkaWZmIC0tZ2l0 IGEvcGFja2FnZXMvY29udGV4dC1jb2xvcmluZy9jb250ZXh0LWNvbG9yaW5nLXRoZW1lcy5lbCBi L3BhY2thZ2VzL2NvbnRleHQtY29sb3JpbmcvY29udGV4dC1jb2xvcmluZy10aGVtZXMuZWwKbmV3 IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uYTk2NDE2OQotLS0gL2Rldi9udWxsCisr KyBiL3BhY2thZ2VzL2NvbnRleHQtY29sb3JpbmcvY29udGV4dC1jb2xvcmluZy10aGVtZXMuZWwK QEAgLTAsMCArMSwxMjIgQEAKKzs7OyBjb250ZXh0LWNvbG9yaW5nLXR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yAgIGNv bnRleHQtY29sb3JpbmctdGhlbWUtaGFzaC10YWJsZSkpCisKKyhkZWZ1biBjb250ZXh0LWNvbG9y aW5nLWxvYWQtdGhlbWUgKHRoZW1lKQorICAiQXBwbHkgVEhFTUUncyBjb2xvcnMgYW5kIG90aGVy IHByb3BlcnRpZXMgZm9yIGNvbnRleHQKK2NvbG9yaW5nLiIKKyAgKGxldCAoKGZ1bmN0aW9uIChn ZXRoYXNoIHRoZW1lIGNvbnRleHQtY29sb3JpbmctdGhlbWUtaGFzaC10YWJsZSkpKQorICAgICh3 aGVuIChudWxsIGZ1bmN0aW9uKQorICAgICAgKGVycm9yIChmb3JtYXQgIk5vIHN1Y2ggdGhlbWUg YCVzJyIgdGhlbWUpKSkKKyAgICAoZnVuY2FsbCBmdW5jdGlvbikpKQorCisoY29udGV4dC1jb2xv cmluZy1kZWZpbmUtdGhlbWUKKyAnbW9ub2thaQorIDpjb2xvcnMgJygiI0Y4RjhGMiIKKyAgICAg ICAgICAgIiM2NkQ5RUYiCisgICAgICAgICAgICIjQTFFRkU0IgorICAgICAgICAgICAiI0E2RTIy RSIKKyAgICAgICAgICAgIiNFNkRCNzQiCisgICAgICAgICAgICIjRkQ5NzFGIgorICAgICAgICAg ICAiI0Y5MjY3MiIKKyAgICAgICAgICAgIiNGRDVGRjAiCisgICAgICAgICAgICIjQUU4MUZGIikp CisKKyhjb250ZXh0LWNvbG9yaW5nLWRlZmluZS10aGVtZQorICdzb2xhcml6ZWQKKyA6Y29sb3Jz ICcoIiM4Mzk0OTYiCisgICAgICAgICAgICIjMjY4YmQyIgorICAgICAgICAgICAiIzJhYTE5OCIK KyAgICAgICAgICAgIiM4NTk5MDAiCisgICAgICAgICAgICIjYjU4OTAwIgorICAgICAgICAgICAi I2NiNGIxNiIKKyAgICAgICAgICAgIiNkYzMyMmYiCisgICAgICAgICAgICIjZDMzNjgyIgorICAg ICAgICAgICAiIzZjNzFjNCIKKyAgICAgICAgICAgIiM2OUI3RjAiCisgICAgICAgICAgICIjNjlD QUJGIgorICAgICAgICAgICAiI0I0QzM0MiIKKyAgICAgICAgICAgIiNERUI1NDIiCisgICAgICAg ICAgICIjRjI4MDRGIgorICAgICAgICAgICAiI0ZGNkU2NCIKKyAgICAgICAgICAgIiNGNzcxQUMi CisgICAgICAgICAgICIjOUVBMEU1IikpCisKKyhjb250ZXh0LWNvbG9yaW5nLWRlZmluZS10aGVt ZQorICd0YW5nbworIDpjb2xvcnMgJygiIzJlMzQzNiIKKyAgICAgICAgICAgIiMzNDY2MDQiCisg ICAgICAgICAgICIjMjA0YTg3IgorICAgICAgICAgICAiIzVjMzU2NiIKKyAgICAgICAgICAgIiNh NDAwMDAiCisgICAgICAgICAgICIjYjM1MDAwIgorICAgICAgICAgICAiI2M0YTAwMCIKKyAgICAg ICAgICAgIiM4YWUyMzQiCisgICAgICAgICAgICIjOGNjNGZmIgorICAgICAgICAgICAiI2FkN2Zh OCIKKyAgICAgICAgICAgIiNlZjI5MjkiCisgICAgICAgICAgICIjZmNhZjNlIgorICAgICAgICAg ICAiI2ZjZTk0ZiIpKQorCisoY29udGV4dC1jb2xvcmluZy1kZWZpbmUtdGhlbWUKKyAnemVuYnVy bgorIDpjb2xvcnMgJygiI0RDRENDQyIKKyAgICAgICAgICAgIiM5M0UwRTMiCisgICAgICAgICAg ICIjQkZFQkJGIgorICAgICAgICAgICAiI0YwREZBRiIKKyAgICAgICAgICAgIiNERkFGOEYiCisg ICAgICAgICAgICIjQ0M5MzkzIgorICAgICAgICAgICAiI0RDOENDMyIKKyAgICAgICAgICAgIiM5 NEJGRjMiCisgICAgICAgICAgICIjOUZDNTlGIgorICAgICAgICAgICAiI0QwQkY4RiIKKyAgICAg ICAgICAgIiNEQ0EzQTMiKSkKKworKHByb3ZpZGUgJ2NvbnRleHQtY29sb3JpbmctdGhlbWVzKQor Cis7OyBMb2NhbCBWYXJpYWJsZXM6Cis7OyBldmFsOiAod2hlbiAoZmJvdW5kcCAncmFpbmJvdy1t b2RlKS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b3JpbmctY29sb3JpemUtaWRsZS10aW1lcicgaWYgdGhhdCB0aW1lciBpcyBiZWluZwor dXNlZC4iKQorCisKKzs7OyBGYWNlcworCisoZGVmdW4gY29udGV4dC1jb2xvcmluZy1kZWZmYWNl IChsZXZlbCB0dHkgbGlnaHQgZGFyaykKKyAgKGxldCAoKGZhY2UgKGludGVybiAoZm9ybWF0ICJj b250ZXh0LWNvbG9yaW5nLWxldmVsLSVzLWZhY2UiIGxldmVsKSkpCisgICAgICAgIChkb2MgKGZv cm1hdCAiQ29udGV4dCBjb2xvcmluZyBmYWNlLCBsZXZlbCAlcy4iIGxldmVsKSkpCisgICAgKGV2 YWwgKG1hY3JvZXhwYW5kIGAoZGVmZmFjZSAsZmFjZQorICAgICAgICAgICAgICAgICAgICAgICAg ICAnKCgoKHR5cGUgdHR5KSkgKDpmb3JlZ3JvdW5kICx0dHkpKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICgoKGJhY2tncm91bmQgbGlnaHQpKSAoOmZvcmVncm91bmQgLGxpZ2h0KSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAoKChiYWNrZ3JvdW5kIGRhcmspKSAoOmZvcmVncm91 bmQgLGRhcmspKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgLGRvYworICAgICAgICAgICAg ICAgICAgICAgICAgICA6Z3JvdXAgJ2NvbnRleHQtY29sb3JpbmcpKSkpKQorCisoZGVmdmFyIGNv bnRleHQtY29sb3JpbmctZmFjZS1jb3VudCBuaWwKKyAgIk51bWJlciBvZiBmYWNlcyBhdmFpbGFi bGUgZm9yIGNvbnRleHQgY29sb3JpbmcuIikKKworKGRlZnVuIGNvbnRleHQtY29sb3JpbmctZGVm ZmFjZS1kZWZhdWx0IChsZXZlbCkKKyAgKGNvbnRleHQtY29sb3JpbmctZGVmZmFjZSBsZXZlbCAi d2hpdGUiICIjM2YzZjNmIiAiI2NkY2RjZCIpKQorCisoZGVmdW4gY29udGV4dC1jb2xvcmluZy1z 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AoY29uZCAoKGdldGhhc2ggc2NvcGUgY29udGV4dC1jb2xvcmlu Zy1qczItc2NvcGUtbGV2ZWwtaGFzaC10YWJsZSkpCisgICAgICAgICh0CisgICAgICAgICAobGV0 ICgobGV2ZWwgMCkKKyAgICAgICAgICAgICAgIChjdXJyZW50LXNjb3BlIHNjb3BlKQorICAgICAg ICAgICAgICAgZW5jbG9zaW5nLXNjb3BlKQorICAgICAgICAgICAod2hpbGUgKGFuZCBjdXJyZW50 LXNjb3BlCisgICAgICAgICAgICAgICAgICAgICAgIChqczItbm9kZS1wYXJlbnQgY3VycmVudC1z Y29wZSkKKyAgICAgICAgICAgICAgICAgICAgICAgKHNldHEgZW5jbG9zaW5nLXNjb3BlCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChqczItbm9kZS1nZXQtZW5jbG9zaW5nLXNjb3BlIGN1 cnJlbnQtc2NvcGUpKSkKKyAgICAgICAgICAgICAod2hlbiAob3IgY29udGV4dC1jb2xvcmluZy1q cy1ibG9jay1zY29wZXMKKyAgICAgICAgICAgICAgICAgICAgICAgKGxldCAoKHR5cGUgKGpzMi1z Y29wZS10eXBlIGN1cnJlbnQtc2NvcGUpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAob3Ig KD0gdHlwZSBqczItU0NSSVBUKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoPSB0eXBl IGpzMi1GVU5DVElPTikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKD0gdHlwZSBqczIt Q0FUQ0gpKSkpCisgICAgICAgICAgICAgICAoc2V0cSBsZXZlbCAoKyBsZXZlbCAxKSkpCisgICAg ICAgICAgICAgKHNldHEgY3VycmVudC1zY29wZSBlbmNsb3Npbmctc2NvcGUpKQorICAgICAgICAg ICAocHV0aGFzaCBzY29wZSBsZXZlbCBjb250ZXh0LWNvbG9yaW5nLWpzMi1zY29wZS1sZXZlbC1o YXNoLXRhYmxlKSkpKSkKKworKGRlZnN1YnN0IGNvbnRleHQtY29sb3JpbmctanMyLWxvY2FsLW5h bWUtbm9kZS1wIChub2RlKQorICAiRGV0ZXJtaW5lcyBpZiBOT0RFIGlzIGEganMyLW5hbWUtbm9k ZSByZXByZXNlbnRpbmcgYSBsb2NhbAordmFyaWFibGUuIgorICAoYW5kIChqczItbmFtZS1ub2Rl LXAgbm9kZSkKKyAgICAgICAobGV0ICgocGFyZW50IChqczItbm9kZS1wYXJlbnQgbm9kZSkpKQor ICAgICAgICAgKG5vdCAob3IgKGFuZCAoanMyLW9iamVjdC1wcm9wLW5vZGUtcCBwYXJlbnQpCisg ICAgICAgICAgICAgICAgICAgICAgIChlcSBub2RlIChqczItb2JqZWN0LXByb3Atbm9kZS1sZWZ0 IHBhcmVudCkpKQorICAgICAgICAgICAgICAgICAgKGFuZCAoanMyLXByb3AtZ2V0LW5vZGUtcCBw YXJlbnQpCisgICAgICAgICAgICAgICAgICAgICAgIDs7IEZvciBuZXN0ZWQgcHJvcGVydHkgbG9v a3VwLCB0aGUgbm9kZSBvbiB0aGUgbGVmdCBpcyBhCisgICAgICAgICAgICAgICAgICAgICAgIDs7 IGBqczItcHJvcC1nZXQtbm9kZScsIHNvIHRoaXMgYWx3YXlzIHdvcmtzLgorICAgICAgICAgICAg ICAgICAgICAgICAoZXEgbm9kZSAoanMyLXByb3AtZ2V0LW5vZGUtcmlnaHQgcGFyZW50KSkpKSkp KSkKKworKGRlZnN1YnN0IGNvbnRleHQtY29sb3JpbmctanMyLWNvbG9yaXplLW5vZGUgKG5vZGUg bGV2ZWwpCisgICJDb2xvcnMgTk9ERSB3aXRoIHRoZSBjb2xvciBmb3IgTEVWRUwuIgorICAobGV0 ICgoc3RhcnQgKGpzMi1ub2RlLWFicy1wb3Mgbm9kZSkpKQorICAgIChjb250ZXh0LWNvbG9yaW5n LWNvbG9yaXplLXJlZ2lvbgorICAgICBzdGFydAorICAgICAoKyBzdGFydCAoanMyLW5vZGUtbGVu IG5vZGUpKSA7IEVuZAorICAgICBsZXZlbCkpKQorCisoZGVmdW4gY29udGV4dC1jb2xvcmluZy1q czItY29sb3JpemUgKCkKKyAgIkNvbG9yaXplcyB0aGUgY3VycmVudCBidWZmZXIgdXNpbmcgdGhl IGFic3RyYWN0IHN5bnRheCB0cmVlCitnZW5lcmF0ZWQgYnkganMyLW1vZGUuIgorICA7OyBSZXNl dCB0aGUgaGFzaCB0YWJsZTsgdGhlIG9sZCBvbmUgY291bGQgYmUgb2Jzb2xldGUuCisgIChzZXRx IGNvbnRleHQtY29sb3JpbmctanMyLXNjb3BlLWxldmVsLWhhc2gtdGFibGUgKG1ha2UtaGFzaC10 YWJsZSA6dGVzdCAnZXEpKQorICAod2l0aC1zaWxlbnQtbW9kaWZpY2F0aW9ucworICAgIChqczIt dmlzaXQtYXN0CisgICAgIGpzMi1tb2RlLWFzdAorICAgICAobGFtYmRhIChub2RlIGVuZC1wKQor ICAgICAgICh3aGVuIChudWxsIGVuZC1wKQorICAgICAgICAgKGNvbmQKKyAgICAgICAgICAoKGpz Mi1zY29wZS1wIG5vZGUpCisgICAgICAgICAgIChjb250ZXh0LWNvbG9yaW5nLWpzMi1jb2xvcml6 ZS1ub2RlCisgICAgICAgICAgICBub2RlCisgICAgICAgICAgICAoY29udGV4dC1jb2xvcmluZy1q czItc2NvcGUtbGV2ZWwgbm9kZSkpKQorICAgICAgICAgICgoY29udGV4dC1jb2xvcmluZy1qczIt bG9jYWwtbmFtZS1ub2RlLXAgbm9kZSkKKyAgICAgICAgICAgKGxldCogKChlbmNsb3Npbmctc2Nv cGUgKGpzMi1ub2RlLWdldC1lbmNsb3Npbmctc2NvcGUgbm9kZSkpCisgICAgICAgICAgICAgICAg ICAoZGVmaW5pbmctc2NvcGUgKGpzMi1nZXQtZGVmaW5pbmctc2NvcGUKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgZW5jbG9zaW5nLXNjb3BlCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIChqczItbmFtZS1ub2RlLW5hbWUgb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Nlc3MpCisgICAgKHNl dHEgY29udGV4dC1jb2xvcmluZy1zY29waWZpZXItcHJvY2VzcyBuaWwpKSkKKworKGRlZnVuIGNv bnRleHQtY29sb3Jpbmctc2NvcGlmeS1zaGVsbC1jb21tYW5kIChjb21tYW5kICZvcHRpb25hbCBj YWxsYmFjaykKKyAgIkludm9rZXMgYSBzY29waWZpZXIgd2l0aCB0aGUgY3VycmVudCBidWZmZXIn cyBjb250ZW50cywKK3JlYWRpbmcgdGhlIHNjb3BpZmllcidzIHJlc3BvbnNlIGFzeW5jaHJvbm91 c2x5IGFuZCBhcHBseWluZyBhCitwYXJzZWQgbGlzdCBvZiB0b2tlbnMgdG8gYGNvbnRleHQtY29s b3JpbmctYXBwbHktdG9rZW5zJy4KKworSW52b2tlcyBDQUxMQkFDSyB3aGVuIGNvbXBsZXRlLiIK KworICA7OyBQcmlvciBydW5uaW5nIHRva2VuaXphdGlvbiBpcyBpbXBsaWNpdGx5IG9ic29sZXRl IGlmIHRoaXMgZnVuY3Rpb24gaXMKKyAgOzsgY2FsbGVkLgorICAoY29udGV4dC1jb2xvcmluZy1r aWxsLXNjb3BpZmllcikKKworICA7OyBTdGFydCB0aGUgcHJvY2Vzcy4KKyAgKHNldHEgY29udGV4 dC1jb2xvcmluZy1zY29waWZpZXItcHJvY2VzcworICAgICAgICAoc3RhcnQtcHJvY2Vzcy1zaGVs bC1jb21tYW5kICJzY29waWZpZXIiIG5pbCBjb21tYW5kKSkKKworICAobGV0ICgob3V0cHV0ICIi KQorICAgICAgICAoYnVmZmVyIGNvbnRleHQtY29sb3JpbmctYnVmZmVyKSkKKworICAgIDs7IFRo ZSBwcm9jZXNzIG1heSBwcm9kdWNlIG91dHB1dCBpbiBtdWx0aXBsZSBjaHVua3MuIFRoaXMgZmls dGVyCisgICAgOzsgYWNjdW11bGF0ZXMgdGhlIGNodW5rcyBpbnRvIGEgbWVzc2FnZS4KKyAgICAo c2V0LXByb2Nlc3MtZmlsdGVyCisgICAgIGNvbn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gdmlhIHN0ZGluLCBhbmQgd2l0aCBhIGZsYXQgSlNPTiBhcnJheSBvZiBz dGFydCwgZW5kIGFuZAorbGV2ZWwgZGF0YSByZXR1cm5lZCB2aWEgc3Rkb3V0LiIKKyAgKGxldCAo KG1vZGVzIChwbGlzdC1nZXQgcHJvcGVydGllcyA6bW9kZXMpKQorICAgICAgICAoY29sb3JpemVy IChwbGlzdC1nZXQgcHJvcGVydGllcyA6Y29sb3JpemVyKSkKKyAgICAgICAgKHNjb3BpZmllciAo cGxpc3QtZ2V0IHByb3BlcnRpZXMgOnNjb3BpZmllcikpCisgICAgICAgIChjb21tYW5kIChwbGlz dC1nZXQgcHJvcGVydGllcyA6Y29tbWFuZCkpKQorICAgICh3aGVuIChudWxsIG1vZGVzKQorICAg ICAgKGVycm9yICJObyBtb2RlIGRlZmluZWQgZm9yIGRpc3BhdGNoIikpCisgICAgKHdoZW4gKG5v dCAob3IgY29sb3JpemVyCisgICAgICAgICAgICAgICAgICAgc2NvcGlmaWVyCisgICAgICAgICAg ICAgICAgICAgY29tbWFuZCkpCisgICAgICAoZXJyb3IgIk5vIGNvbG9yaXplciwgc2NvcGlmaWVy IG9yIGNvbW1hbmQgZGVmaW5lZCBmb3IgZGlzcGF0Y2giKSkKKyAgICAocHV0aGFzaCBzeW1ib2wg cHJvcGVydGllcyBjb250ZXh0LWNvbG9yaW5nLWRpc3BhdGNoLWhhc2gtdGFibGUpCisgICAgKGRv bGlzdCAobW9kZSBtb2RlcykKKyAgICAgICh3aGVuIChudWxsIChnZXRoYXNoIG1vZGUgY29udGV4 dC1jb2xvcmluZy1tb2RlLWhhc2gtdGFibGUpKQorICAgICAgICAocHV0aGFzaCBtb2RlIHByb3Bl cnRpZXMgY29udGV4dC1jb2xvcmluZy1tb2RlLWhhc2gtdGFibGUpKSkpKQorCisoY29udGV4dC1j b2xvcmluZy1kZWZpbmUtZGlzcGF0Y2gKKyAnamF2YXNjcmlwdC1ub2RlCisgOm1vZGVzICcoanMt bW9k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B2YWx1ZSBzaG91bGQgbm90IGJlIGR5bmFtaWNhbGx5LWJvdW5kLgorICAgIChzZXRxIGNv bnRleHQtY29sb3JpbmctYnVmZmVyIChjdXJyZW50LWJ1ZmZlcikpCisKKyAgICA7OyBGb250IGxv Y2sgaXMgaW5jb21wYXRpYmxlIHdpdGggdGhpcyBtb2RlOyB0aGUgY29udmVyc2UgaXMgYWxzbyB0 cnVlLgorICAgIChmb250LWxvY2stbW9kZSAwKQorICAgIChqaXQtbG9jay1tb2RlIG5pbCkKKwor ICAgIDs7IENvbG9yaXplIG9uY2UgaW5pdGlhbGx5LgorICAgIChjb250ZXh0LWNvbG9yaW5nLWNv bG9yaXplKQorCisgICAgKGNvbmQKKyAgICAgKChlcXVhbCBtYWpvci1tb2RlICdqczItbW9kZSkK KyAgICAgIDs7IE9ubHkgcmVjb2xvciBvbiByZXBhcnNlLgorICAgICAgKGFkZC1ob29rICdqczIt cG9zdC1wYXJzZS1jYWxsYmFja3MgJ2NvbnRleHQtY29sb3JpbmctY29sb3JpemUgbmlsIHQpKQor ICAgICAodAorICAgICAgOzsgT25seSByZWNvbG9yIG9uIGNoYW5nZS4KKyAgICAgIChhZGQtaG9v ayAnYWZ0ZXItY2hhbmdlLWZ1bmN0aW9ucyAnY29udGV4dC1jb2xvcmluZy1jaGFuZ2UtZnVuY3Rp b24gbmlsIHQpKSkKKworICAgICh3aGVuIChub3QgKGVxdWFsIG1ham9yLW1vZGUgJ2pzMi1tb2Rl KSkKKyAgICAgIDs7IE9ubHkgcmVjb2xvciBpZGx5LgorICAgICAgKHNldHEgY29udGV4dC1jb2xv cmluZy1jb2xvcml6ZS1pZGxlLXRpbWVyCisgICAgICAgICAgICAocnVuLXdpdGgtaWRsZS10aW1l cgorICAgICAgICAgICAgIGNvbnRleHQtY29sb3JpbmctZGVsYXkKKyAgICAgICAgICAgICB0Cisg ICAgICAgICAgICAgJ2NvbnRleHQtY29sb3JpbmctbWF5YmUtY29sb3JpemUpKSkpKQorCisocHJ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9BUEkiPgorICogTW96aWxsYSBQ YXJzZXIgQVBJPC9hPi4gRS5nLiA8YSBocmVmPSJodHRwOi8vZXNwcmltYS5vcmciPmVzcHJpbWE8 L2E+IGlzIGEgcGFyc2VyCisgKiB0aGF0IHByb2R1Y2VzIHN1Y2ggc3ludGF4IHRyZWVzLgorICog PHA+CisgKiBUaGUgbWFpbiBpbnRlcmZhY2UgaXMgdGhlIHtAbGluayBhbmFseXplfSBmdW5jdGlv bi4KKyAqIEBtb2R1bGUKKyAqLworCisvKmpzbGludCBiaXR3aXNlOnRydWUgKi8KKy8qZ2xvYmFs IGV4cG9ydHM6dHJ1ZSwgZGVmaW5lOnRydWUsIHJlcXVpcmU6dHJ1ZSovCisoZnVuY3Rpb24gKGZh Y3RvcnksIGdsb2JhbCkgeworICAgICd1c2Ugc3RyaWN0JzsKKworICAgIGZ1bmN0aW9uIG5hbWVz cGFjZShzdHIsIG9iaikgeworICAgICAgICB2YXIgaSwgaXosIG5hbWVzLCBuYW1lOworICAgICAg ICBuYW1lcyA9IHN0ci5zcGxpdCgnLicpOworICAgICAgICBmb3IgKGkgPSAwLCBpeiA9IG5hbWVz Lmxlbmd0aDsgaSA8IGl6OyArK2kpIHsKKyAgICAgICAgICAgIG5hbWUgPSBuYW1lc1tpXTsKKyAg ICAgICAgICAgIGlmIChvYmouaGFzT3duUHJvcGVydHkobmFtZSkpIHsKKyAgICAgICAgICAgICAg ICBvYmogPSBvYmpbbmFtZV07CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAg IG9iaiA9IChvYmpbbmFtZV0gPSB7fSk7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAg ICAgcmV0dXJuIG9iajsKKyAgICB9CisKKyAgICAvLyBVbml2ZXJzYWwgTW9kdWxlIERlZmluaXRp b24gKFVNRCkgdG8gc3VwcG9ydCBBTUQsIENvbW1vbkpTL05vZGUuanMsCisgICAgLy8gYW5kIHBs YWluIGJyb3dzZXIgbG9hZGluZywKK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lwZS5nZXQg PSBmdW5jdGlvbiBNYXBHZXQoa2V5KSB7CisgICAgICAgICAgICBrZXkgPSAnJCcgKyBrZXk7Cisg ICAgICAgICAgICBpZiAodGhpcy5fX2RhdGEuaGFzT3duUHJvcGVydHkoa2V5KSkgeworICAgICAg ICAgICAgICAgIHJldHVybiB0aGlzLl9fZGF0YVtrZXldOworICAgICAgICAgICAgfQorICAgICAg ICAgICAgcmV0dXJuIHVuZGVmaW5lZDsKKyAgICAgICAgfTsKKworICAgICAgICBNYXAucHJvdG90 eXBlLmhhcyA9IGZ1bmN0aW9uIE1hcEhhcyhrZXkpIHsKKyAgICAgICAgICAgIGtleSA9ICckJyAr IGtleTsKKyAgICAgICAgICAgIHJldHVybiB0aGlzLl9fZGF0YS5oYXNPd25Qcm9wZXJ0eShrZXkp OworICAgICAgICB9OworCisgICAgICAgIE1hcC5wcm90b3R5cGUuc2V0ID0gZnVuY3Rpb24gTWFw U2V0KGtleSwgdmFsKSB7CisgICAgICAgICAgICBrZXkgPSAnJCcgKyBrZXk7CisgICAgICAgICAg ICB0aGlzLl9fZGF0YVtrZXldID0gdmFsOworICAgICAgICB9OworCisgICAgICAgIE1hcC5wcm90 b3R5cGVbJ2RlbGV0ZSddID0gZnVuY3Rpb24gTWFwRGVsZXRlKGtleSkgeworICAgICAgICAgICAg a2V5ID0gJyQnICsga2V5OworICAgICAgICAgICAgcmV0dXJuIGRlbGV0ZSB0aGlzLl9fZGF0YVtr ZXldOworICAgICAgICB9OworICAgIH0KKworICAgIGZ1bmN0aW9uIGFzc2VydChjb25kLCB0ZXh0 KSB7CisgICAgICAgIGlmICghY29uZCkgeworICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKHRl eHQpOworICAgICAgICB9CisgICAgfQorCisgICAgZnVuY3Rpb24gZGVmYXVsdE9wdGlvbnMoKSB7 CisgICAgICAgIHJldHVybiB7CisgICAgICAgICAgICBvcHRpbWlzdGljOiBmYWxzZSwKKyAgICAg ICAgICAgIGRpcmVjdGl2ZTogZmFsc2UKKyAgICAgICAgfTsKKyAgICB9CisKKyAgICBmdW5jdGlv biB1cGRhdGVEZWVwbHkodGFyZ2V0LCBvdmVycmlkZSkgeworICAgICAgICB2YXIga2V5LCB2YWw7 CisKKyAgICAgICAgZnVuY3Rpb24gaXNIYXNoT2JqZWN0KHRhcmdldCkgeworICAgICAgICAgICAg cmV0dXJuIHR5cGVvZiB0YXJnZXQgPT09ICdvYmplY3QnICYmIHRhcmdldCBpbnN0YW5jZW9mIE9i amVjdCAmJiAhKHRhcmdldCBpbnN0YW5jZW9mIFJlZ0V4cCk7CisgICAgICAgIH0KKworICAgICAg ICBmb3IgKGtleSBpbiBvdmVycmlkZSkgeworICAgICAgICAgICAgaWYgKG92ZXJyaWRlLmhhc093 blByb3BlcnR5KGtleSkpIHsKKyAgICAgICAgICAgICAgICB2YWwgPSBvdmVycmlkZVtrZXldOwor ICAgICAgICAgICAgICAgIGlmIChpc0hhc2hPYmplY3QodmFsKSkgeworICAgICAgICAgICAgICAg ICAgICBpZiAoaXNIYXNoT2JqZWN0KHRhcmdldFtrZXldKSkgeworICAgICAgICAgICAgICAgICAg ICAgICAgdXBkYXRlRGVlcGx5KHRhcmdldFtrZXldLCB2YWwpOworICAgICAgICAgICAgICAgICAg ICB9IGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgICAgdGFyZ2V0W2tleV0gPSB1cGRhdGVE ZWVwbHkoe30sIHZhbCk7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9 IGVsc2UgeworICAgICAgICAgICAgICAgICAgICB0YXJnZXRba2V5XSA9IHZhbDsKKyAgICAgICAg ICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIHRhcmdl dDsKKyAgICB9CisKKyAgICAvKioKKyAgICAgKiBBIFJlZmVyZW5jZSByZXByZXNlbnRzIGEgc2lu Z2xlIG9jY3VycmVuY2Ugb2YgYW4gaWRlbnRpZmllciBpbiBjb2RlLgorICAgICAqIEBjbGFzcyBS ZWZlcmVuY2UKKyAgICAgKi8KKyAgICBmdW5jdGlvbiBSZWZlcmVuY2UoaWRlbnQsIHNjb3BlLCBm bGFnLCB3cml0ZUV4cHIsIG1heWJlSW1wbGljaXRHbG9iYWwpIHsKKyAgICAgICAgLyoqCisgICAg ICAgICAqIElkZW50aWZpZXIgc3ludGF4IG5vZGUuCisgICAgICAgICAqIEBtZW1iZXIge2VzcHJp bWEjSWRlbnRpZmllcn0gUmVmZXJlbmNlI2lkZW50aWZpZXIKKyAgICAgICAgICovCisgICAgICAg IHRoaXMuaWRlbnRpZmllciA9IGlkZW50OworICAgICAgICAvKioKKyAgICAgICAgICogUmVmZXJl bmNlIHRvIHRoZSBlbmNsb3NpbmcgU2NvcGUuCisgICAgICAgICAqIEBtZW1iZXIge1Njb3BlfSBS ZWZlcmVuY2UjZnJvbQorICAgICAgICAgKi8KKyAgICAgICAgdGhpcy5mcm9tID0gc2NvcGU7Cisg ICAgICAgIC8qKgorICAgICAgICAgKiBXaGV0aGVyIHRoZSByZWZlcmVuY2UgY29tZXMgZnJvbSBh IGR5bmFtaWMgc2NvcGUgKHN1Y2ggYXMgJ2V2YWwnLAorICAgICAgICAgKiAnd2l0aCcsIGV0Yy4p LCBhbmQgbWF5IGJlIHRyYXBwZWQgYnkgZHluYW1pYyBzY29wZXMuCisgICAgICAgICAqIEBtZW1i ZXIge2Jvb2xlYW59IFJlZmVyZW5jZSN0YWludGVkCisgICAgICAgICAqLworICAgICAgICB0aGlz LnRhaW50ZWQgPSBmYWxzZTsKKyAgICAgICAgLyoqCisgICAgICAgICAqIFRoZSB2YXJpYWJsZSB0 aGlzIHJlZmVyZW5jZSBpcyByZXNvbHZlZCB3aXRoLgorICAgICAgICAgKiBAbWVtYmVyIHtWYXJp YWJsZX0gUmVmZXJlbmNlI3Jlc29sdmVkCisgICAgICAgICAqLworICAgICAgICB0aGlzLnJlc29s dmVkID0gbnVsbDsKKyAgICAgICAgLyoqCisgICAgICAgICAqIFRoZSByZWFkLXdyaXRlIG1vZGUg b2YgdGhlIHJlZmVyZW5jZS4gKFZhbHVlIGlzIG9uZSBvZiB7QGxpbmsKKyAgICAgICAgICogUmVm ZXJlbmNlLlJFQUR9LCB7QGxpbmsgUmVmZXJlbmNlLlJXfSwge0BsaW5rIFJlZmVyZW5jZS5XUklU RX0pLgorICAgICAgICAgKiBAbWVtYmVyIHtudW1iZXJ9IFJlZmVyZW5jZSNmbGFnCisgICAgICAg ICAqIEBwcml2YXRlCisgICAgICAgICAqLworICAgICAgICB0aGlzLmZsYWcgPSBmbGFnOworICAg ICAgICBpZiAodGhpcy5pc1dyaXRlKCkpIHsKKyAgICAgICAgICAgIC8qKgorICAgICAgICAgICAg ICogSWYgcmVmZXJlbmNlIGlzIHdyaXRlYWJsZSwgdGhpcyBpcyB0aGUgdHJlZSBiZWluZyB3cml0 dGVuIHRvIGl0LgorICAgICAgICAgICAgICogQG1lbWJlciB7ZXNwcmltYSNOb2RlfSBSZWZlcmVu Y2Ujd3JpdGVFeHByCisgICAgICAgICAgICAgKi8KKyAgICAgICAgICAgIHRoaXMud3JpdGVFeHBy ID0gd3JpdGVFeHByOworICAgICAgICB9CisgICAgICAgIC8qKgorICAgICAgICAgKiBXaGV0aGVy IHRoZSBSZWZlcmVuY2UgbWlnaHQgcmVmZXIgdG8gYSBnbG9iYWwgdmFyaWFibGUuCisgICAgICAg ICAqIEBtZW1iZXIge2Jvb2xlYW59IFJlZmVyZW5jZSNfX21heWJlSW1wbGljaXRHbG9iYWwKKyAg ICAgICAgICogQHByaXZhdGUKKyAgICAgICAgICovCisgICAgICAgIHRoaXMuX19tYXliZUltcGxp Y2l0R2xvYmFsID0gbWF5YmVJbXBsaWNpdEdsb2JhbDsKKyAgICB9CisKKyAgICAvKioKKyAgICAg KiBAY29uc3RhbnQgUmVmZXJlbmNlLlJFQUQKKyAgICAgKiBAcHJpdmF0ZQorICAgICAqLworICAg IFJlZmVyZW5jZS5SRUFEID0gMHgxOworICAgIC8qKgorICAgICAqIEBjb25zdGFudCBSZWZlcmVu Y2UuV1JJVEUKKyAgICAgKiBAcHJpdmF0ZQorICAgICAqLworICAgIFJlZmVyZW5jZS5XUklURSA9 IDB4MjsKKyAgICAvKioKKyAgICAgKiBAY29uc3RhbnQgUmVmZXJlbmNlLlJXCisgICAgICogQHBy aXZhdGUKKyAgICAgKi8KKyAgICBSZWZlcmVuY2UuUlcgPSAweDM7CisKKyAgICAvKioKKyAgICAg KiBXaGV0aGVyIHRoZSByZWZlcmVuY2UgaXMgc3RhdGljLgorICAgICAqIEBtZXRob2QgUmVmZXJl bmNlI2lzU3RhdGljCisgICAgICogQHJldHVybiB7Ym9vbGVhbn0KKyAgICAgKi8KKyAgICBSZWZl cmVuY2UucHJvdG90eXBlLmlzU3RhdGljID0gZnVuY3Rpb24gaXNTdGF0aWMoKSB7CisgICAgICAg IHJldHVybiAhdGhpcy50YWludGVkICYmIHRoaXMucmVzb2x2ZWQgJiYgdGhpcy5yZXNvbHZlZC5z Y29wZS5pc1N0YXRpYygpOworICAgIH07CisKKyAgICAvKioKKyAgICAgKiBXaGV0aGVyIHRoZSBy ZWZlcmVuY2UgaXMgd3JpdGVhYmxlLgorICAgICAqIEBtZXRob2QgUmVmZXJlbmNlI2lzV3JpdGUK KyAgICAgKiBAcmV0dXJuIHtib29sZWFufQorICAgICAqLworICAgIFJlZmVyZW5jZS5wcm90b3R5 cGUuaXNXcml0ZSA9IGZ1bmN0aW9uIGlzV3JpdGUoKSB7CisgICAgICAgIHJldHVybiB0aGlzLmZs YWcgJiBSZWZlcmVuY2UuV1JJVEU7CisgICAgfTsKKworICAgIC8qKgorICAgICAqIFdoZXRoZXIg dGhlIHJlZmVyZW5jZSBpcyByZWFkYWJsZS4KKyAgICAgKiBAbWV0aG9kIFJlZmVyZW5jZSNpc1Jl YWQKKyAgICAgKiBAcmV0dXJuIHtib29sZWFufQorICAgICAqLworICAgIFJlZmVyZW5jZS5wcm90 b3R5cGUuaXNSZWFkID0gZnVuY3Rpb24gaXNSZWFkKCkgeworICAgICAgICByZXR1cm4gdGhpcy5m bGFnICYgUmVmZXJlbmNlLlJFQUQ7CisgICAgfTsKKworICAgIC8qKgorICAgICAqIFdoZXRoZXIg dGhlIHJlZmVyZW5jZSBpcyByZWFkLW9ubHkuCisgICAgICogQG1ldGhvZCBSZWZlcmVuY2UjaXNS ZWFkT25seQorICAgICAqIEByZXR1cm4ge2Jvb2xlYW59CisgICAgICovCisgICAgUmVmZXJlbmNl LnByb3RvdHlwZS5pc1JlYWRPbmx5ID0gZnVuY3Rpb24gaXNSZWFkT25seSgpIHsKKyAgICAgICAg cmV0dXJuIHRoaXMuZmxhZyA9PT0gUmVmZXJlbmNlLlJFQUQ7CisgICAgfTsKKworICAgIC8qKgor ICAgICAqIFdoZXRoZXIgdGhlIHJlZmVyZW5jZSBpcyB3cml0ZS1vbmx5LgorICAgICAqIEBtZXRo b2QgUmVmZXJlbmNlI2lzV3JpdGVPbmx5CisgICAgICogQHJldHVybiB7Ym9vbGVhbn0KKyAgICAg Ki8KKyAgICBSZWZlcmVuY2UucHJvdG90eXBlLmlzV3JpdGVPbmx5ID0gZnVuY3Rpb24gaXNXcml0 ZU9ubHkoKSB7CisgICAgICAgIHJldHVybiB0aGlzLmZsYWcgPT09IFJlZmVyZW5jZS5XUklURTsK KyAgICB9OworCisgICAgLyoqCisgICAgICogV2hldGhlciB0aGUgcmVmZXJlbmNlIGlzIHJlYWQt d3JpdGUuCisgICAgICogQG1ldGhvZCBSZWZlcmVuY2UjaXNSZWFkV3JpdGUKKyAgICAgKiBAcmV0 dXJuIHtib29sZWFufQorICAgICAqLworICAgIFJlZmVyZW5jZS5wcm90b3R5cGUuaXNSZWFkV3Jp dGUgPSBmdW5jdGlvbiBpc1JlYWRXcml0ZSgpIHsKKyAgICAgICAgcmV0dXJuIHRoaXMuZmxhZyA9 PT0gUmVmZXJlbmNlLlJXOworICAgIH07CisKKyAgICAvKioKKyAgICAgKiBBIFZhcmlhYmxlIHJl cHJlc2VudHMgYSBsb2NhbGx5IHNjb3BlZCBpZGVudGlmaWVyLiBUaGVzZSBpbmNsdWRlIGFyZ3Vt ZW50cyB0bworICAgICAqIGZ1bmN0aW9ucy4KKyAgICAgKiBAY2xhc3MgVmFyaWFibGUKKyAgICAg Ki8KKyAgICBmdW5jdGlvbiBWYXJpYWJsZShuYW1lLCBzY29wZSkgeworICAgICAgICAvKioKKyAg ICAgICAgICogVGhlIHZhcmlhYmxlIG5hbWUsIGFzIGdpdmVuIGluIHRoZSBzb3VyY2UgY29kZS4K KyAgICAgICAgICogQG1lbWJlciB7U3RyaW5nfSBWYXJpYWJsZSNuYW1lCisgICAgICAgICAqLwor ICAgICAgICB0aGlzLm5hbWUgPSBuYW1lOworICAgICAgICAvKioKKyAgICAgICAgICogTGlzdCBv ZiBkZWZpbmluZyBvY2N1cnJlbmNlcyBvZiB0aGlzIHZhcmlhYmxlIChsaWtlIGluICd2YXIgLi4u JworICAgICAgICAgKiBzdGF0ZW1lbnRzIG9yIGFzIHBhcmFtZXRlciksIGFzIEFTVCBub2Rlcy4K KyAgICAgICAgICogQG1lbWJlciB7ZXNwcmltYS5JZGVudGlmaWVyW119IFZhcmlhYmxlI2lkZW50 aWZpZXJzCisgICAgICAgICAqLworICAgICAgICB0aGlzLmlkZW50aWZpZXJzID0gW107CisgICAg ICAgIC8qKgorICAgICAgICAgKiBMaXN0IG9mIHtAbGluayBSZWZlcmVuY2V8cmVmZXJlbmNlc30g b2YgdGhpcyB2YXJpYWJsZSAoZXhjbHVkaW5nIHBhcmFtZXRlciBlbnRyaWVzKQorICAgICAgICAg KiBpbiBpdHMgZGVmaW5pbmcgc2NvcGUgYW5kIGFsbCBuZXN0ZWQgc2NvcGVzLiBGb3IgZGVmaW5p bmcKKyAgICAgICAgICogb2NjdXJyZW5jZXMgb25seSBzZWUge0BsaW5rIFZhcmlhYmxlI2RlZnN9 LgorICAgICAgICAgKiBAbWVtYmVyIHtSZWZlcmVuY2VbXX0gVmFyaWFibGUjcmVmZXJlbmNlcwor ICAgICAgICAgKi8KKyAgICAgICAgdGhpcy5yZWZlcmVuY2VzID0gW107CisKKyAgICAgICAgLyoq CisgICAgICAgICAqIExpc3Qgb2YgZGVmaW5pbmcgb2NjdXJyZW5jZXMgb2YgdGhpcyB2YXJpYWJs ZSAobGlrZSBpbiAndmFyIC4uLicKKyAgICAgICAgICogc3RhdGVtZW50cyBvciBhcyBwYXJhbWV0 ZXIpLCBhcyBjdXN0b20gb2JqZWN0cy4KKyAgICAgICAgICogQHR5cGVkZWYge09iamVjdH0gRGVm RW50cnkKKyAgICAgICAgICogQHByb3BlcnR5IHtTdHJpbmd9IERlZkVudHJ5LnR5cGUgLSB0aGUg dHlwZSBvZiB0aGUgb2NjdXJyZW5jZSAoZS5nLgorICAgICAgICAgKiAgICAgICJQYXJhbWV0ZXIi LCAiVmFyaWFibGUiLCAuLi4pCisgICAgICAgICAqIEBwcm9wZXJ0eSB7ZXNwcmltYS5JZGVudGlm aWVyfSBEZWZFbnRyeS5uYW1lIC0gdGhlIGlkZW50aWZpZXIgQVNUIG5vZGUgb2YgdGhlIG9jY3Vy cmVuY2UKKyAgICAgICAgICogQHByb3BlcnR5IHtlc3ByaW1hLk5vZGV9IERlZkVudHJ5Lm5vZGUg LSB0aGUgZW5jbG9zaW5nIG5vZGUgb2YgdGhlCisgICAgICAgICAqICAgICAgaWRlbnRpZmllcgor ICAgICAgICAgKiBAcHJvcGVydHkge2VzcHJpbWEuTm9kZX0gW0RlZkVudHJ5LnBhcmVudF0gLSB0 aGUgZW5jbG9zaW5nIHN0YXRlbWVudAorICAgICAgICAgKiAgICAgIG5vZGUgb2YgdGhlIGlkZW50 aWZpZXIKKyAgICAgICAgICogQG1lbWJlciB7RGVmRW50cnlbXX0gVmFyaWFibGUjZGVmcworICAg ICAgICAgKi8KKyAgICAgICAgdGhpcy5kZWZzID0gW107CisKKyAgICAgICAgdGhpcy50YWludGVk ID0gZmFs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KSB7CisgICAgICAgICAgICBib2R5ID0g YmxvY2suYm9keTsKKyAgICAgICAgfSBlbHNlIGlmIChzY29wZS50eXBlID09PSAnZ2xvYmFsJykg eworICAgICAgICAgICAgYm9keSA9IGJsb2NrOworICAgICAgICB9IGVsc2UgeworICAgICAgICAg ICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CisKKyAgICAgICAgaWYgKG9wdGlvbnMuZGlyZWN0 aXZlKSB7CisgICAgICAgICAgICBmb3IgKGkgPSAwLCBpeiA9IGJvZHkuYm9keS5sZW5ndGg7IGkg PCBpejsgKytpKSB7CisgICAgICAgICAgICAgICAgc3RtdCA9IGJvZHkuYm9keVtpXTsKKyAgICAg ICAgICAgICAgICBpZiAoc3RtdC50eXBlICE9PSAnRGlyZWN0aXZlU3RhdGVtZW50JykgeworICAg ICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAg ICAgaWYgKHN0bXQucmF3ID09PSAnInVzZSBzdHJpY3QiJyB8fCBzdG10LnJhdyA9PT0gJ1wndXNl IHN0cmljdFwnJykgeworICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKKyAgICAgICAg ICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBm b3IgKGkgPSAwLCBpeiA9IGJvZHkuYm9keS5sZW5ndGg7IGkgPCBpejsgKytpKSB7CisgICAgICAg ICAgICAgICAgc3RtdCA9IGJvZHkuYm9keVtpXTsKKyAgICAgICAgICAgICAgICBpZiAoc3RtdC50 eXBlICE9PSBTeW50YXguRXhwcmVzc2lvblN0YXRlbWVudCkgeworICAgICAgICAgICAgICAgICAg ICBicmVhazsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZXhwciA9IHN0bXQu ZXhwcmVzc2lvbjsKKyAgICAgICAgICAgICAgICBpZiAoZXhwci50eXBlICE9PSBTeW50YXguTGl0 ZXJhbCB8fCB0eXBlb2YgZXhwci52YWx1ZSAhPT0gJ3N0cmluZycpIHsKKyAgICAgICAgICAgICAg ICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGlmIChleHBy LnJhdyAhPSBudWxsKSB7CisgICAgICAgICAgICAgICAgICAgIGlmIChleHByLnJhdyA9PT0gJyJ1 c2Ugc3RyaWN0IicgfHwgZXhwci5yYXcgPT09ICdcJ3VzZSBzdHJpY3RcJycpIHsKKyAgICAgICAg ICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOworICAgICAgICAgICAgICAgICAgICB9CisgICAg ICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGV4cHIudmFsdWUg PT09ICd1c2Ugc3RyaWN0JykgeworICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7 CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9 CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKworICAgIC8qKgorICAg ICAqIEBjbGFzcyBTY29wZQorICAgICAqLworICAgIGZ1bmN0aW9uIFNjb3BlKGJsb2NrLCBvcHQp IHsKKyAgICAgICAgdmFyIHZhcmlhYmxlLCBib2R5OworCisgICAgICAgIC8qKgorICAgICAgICAg KiBPbmUgb2YgJ2NhdGNoJywgJ3dpdGgnLCAnZnVuY3Rpb24nIG9yICdnbG9iYWwnLgorICAgICAg ICAgKiBAbWVtYmVyIHtTdHJpbmd9IFNjb3BlI3R5cGUKKyAgICAgICAgICovCisgICAgICAgIHRo aXMudHlwZSA9CisgICAgICAgICAgICAoYmxvY2sudHlwZSA9PT0gU3ludGF4LkNhdGNoQ2xhdXNl KSA/ICdjYXRjaCcgOgorICAgICAgICAgICAgKGJsb2NrLnR5cGUgPT09IFN5bnRheC5XaXRoU3Rh dGVtZW50KSA/ICd3aXRoJyA6CisgICAgICAgICAgICAoYmxvY2sudHlwZSA9PT0gU3ludGF4LlBy b2dyYW0pID8gJ2dsb2JhbCcgOiAnZnVuY3Rpb24nOworICAgICAgICAgLyoqCisgICAgICAgICAq IFRoZSBzY29wZWQge0BsaW5rIFZhcmlhYmxlfXMgb2YgdGhpcyBzY29wZSwgYXMgPGNvZGU+eyBW YXJpYWJsZS5uYW1lCisgICAgICAgICAqIDogVmFyaWFibGUgfTwvY29kZT4uCisgICAgICAgICAq IEBtZW1iZXIge01hcH0gU2NvcGUjc2V0CisgICAgICAgICAqLworICAgICAgICB0aGlzLnNldCA9 IG5ldyBNYXAoKTsKKyAgICAgICAgLyoqCisgICAgICAgICAqIFRoZSB0YWludGVkIHZhcmlhYmxl cyBvZiB0aGlzIHNjb3BlLCBhcyA8Y29kZT57IFZhcmlhYmxlLm5hbWUgOgorICAgICAgICAgKiBi b29sZWFuIH08L2NvZGU+LgorICAgICAgICAgKiBAbWVtYmVyIHtNYXB9IFNjb3BlI3RhaW50cyAq LworICAgICAgICB0aGlzLnRhaW50cyA9IG5ldyBNYXAoKTsKKyAgICAgICAgLyoqCisgICAgICAg ICAqIEdlbmVyYWxseSwgdGhyb3VnaCB0aGUgbGV4aWNhbCBzY29waW5nIG9mIEpTIHlvdSBjYW4g YWx3YXlzIGtub3cKKyAgICAgICAgICogd2hpY2ggdmFyaWFibGUgYW4gaWRlbnRpZmllciBpbiB0 aGUgc291cmNlIGNvZGUgcmVmZXJzIHRvLiBUaGVyZSBhcmUKKyAgICAgICAgICogYSBmZXcgZXhj ZXB0aW9ucyB0byB0aGlzIHJ1bGUuIFdpdGggJ2dsb2JhbCcgYW5kICd3aXRoJyBzY29wZXMgeW91 CisgICAgICAgICAqIGNhbiBvbmx5IGRlY2lkZSBhdCBydW50aW1lIHdoaWNoIHZhcmlhYmxlIGEg cmVmZXJlbmNlIHJlZmVycyB0by4KKyAgICAgICAgICogTW9yZW92ZXIsIGlmICdldmFsKCknIGlz IHVzZWQgaW4gYSBzY29wZSwgaXQgbWlnaHQgaW50cm9kdWNlIG5ldworICAgICAgICAgKiBiaW5k aW5ncyBpbiB0aGlzIG9yIGl0cyBwcmFyZW50IHNjb3Blcy4KKyAgICAgICAgICogQWxsIHRob3Nl IHNjb3BlcyBhcmUgY29uc2lkZXJlZCAnZHluYW1pYycuCisgICAgICAgICAqIEBtZW1iZXIge2Jv b2xlYW59IFNjb3BlI2R5bmFtaWMKKyAgICAgICAgICovCisgICAgICAgIHRoaXMuZHluYW1pYyA9 IHRoaXMudHlwZSA9PT0gJ2dsb2JhbCcgfHwgdGhpcy50eXBlID09PSAnd2l0aCc7CisgICAgICAg IC8qKgorICAgICAgICAgKiBBIHJlZmVyZW5jZSB0byB0aGUgc2NvcGUtZGVmaW5pbmcgc3ludGF4 IG5vZGUuCisgICAgICAgICAqIEBtZW1iZXIge2VzcHJpbWEuTm9kZX0gU2NvcGUjYmxvY2sKKyAg ICAgICAgICovCisgICAgICAgIHRoaXMuYmxvY2sgPSBibG9jazsKKyAgICAgICAgIC8qKgorICAg ICAgICAgKiBUaGUge0BsaW5rIFJlZmVyZW5jZXxyZWZlcmVuY2VzfSB0aGF0IGFyZSBub3QgcmVz b2x2ZWQgd2l0aCB0aGlzIHNjb3BlLgorICAgICAgICAgKiBAbWVtYmVyIHtSZWZlcmVuY2VbXX0g U2NvcGUjdGhyb3VnaAorICAgICAgICAgKi8KKyAgICAgICAgdGhpcy50aHJvdWdoID0gW107Cisg ICAgICAgICAvKioKKyAgICAgICAgICogVGhlIHNjb3BlZCB7QGxpbmsgVmFyaWFibGV9cyBvZiB0 aGlzIHNjb3BlLiBJbiB0aGUgY2FzZSBvZiBhCisgICAgICAgICAqICdmdW5jdGlvbicgc2NvcGUg dGhpcyBpbmNsdWRlcyB0aGUgYXV0b21hdGljIGFyZ3VtZW50IDxlbT5hcmd1bWVudHM8L2VtPiBh cworICAgICAgICAgKiBpdHMgZmlyc3QgZWxlbWVudCwgYXMgd2VsbCBhcyBhbGwgZnVydGhlciBm b3JtYWw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WxzZTsKKyAgICAgICAgIC8qKgorICAgICAgICAgKiBXaGV0aGVyIHRoaXMgaXMgYSBz Y29wZSB0aGF0IGNvbnRhaW5zIGFuICdldmFsKCknIGludm9jYXRpb24uCisgICAgICAgICAqIEBt ZW1iZXIge2Jvb2xlYW59IFNjb3BlI2RpcmVjdENhbGxUb0V2YWxTY29wZQorICAgICAgICAgKi8K KyAgICAgICAgdGhpcy5kaXJlY3RDYWxsVG9FdmFsU2NvcGUgPSBmYWxzZTsKKyAgICAgICAgIC8q KgorICAgICAgICAgKiBAbWVtYmVyIHtib29sZWFufSBTY29wZSN0aGlzRm91bmQKKyAgICAgICAg ICovCisgICAgICAgIHRoaXMudGhpc0ZvdW5kID0gZmFsc2U7CisgICAgICAgIGJvZHkgPSB0aGlz LnR5cGUgPT09ICdmdW5jdGlvbicgPyBibG9jay5ib2R5IDogYmxvY2s7CisgICAgICAgIGlmIChv cHQubmFtaW5nKSB7CisgICAgICAgICAgICB0aGlzLl9fZGVmaW5lKGJsb2NrLmlkLCB7CisgICAg ICAgICAgICAgICAgdHlwZTogVmFyaWFibGUuRnVuY3Rpb25OYW1lLAorICAgICAgICAgICAgICAg IG5hbWU6IGJsb2NrLmlkLAorICAgICAgICAgICAgICAgIG5vZGU6IGJsb2NrCisgICAgICAgICAg ICB9KTsKKyAgICAgICAgICAgIHRoaXMuZnVuY3Rpb25FeHByZXNzaW9uU2NvcGUgPSB0cnVlOwor ICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgaWYgKHRoaXMudHlwZSA9PT0gJ2Z1bmN0aW9u JykgeworICAgICAgICAgICAgICAgIHZhcmlhYmxlID0gbmV3IFZhcmlhYmxlKCdhcmd1bWVudHMn LCB0aGlzKTsKKyAgICAgICAgICAgICAgICB0aGlzLnRhaW50cy5zZXQoJ2FyZ3VtZW50cycsIHRy dWUpOworICAgICAgICAgICAgICAgIHRoaXMuc2V0LnNldCgnYXJndW1lbnRzJywgdmFyaWFibGUp OworICAgICAgICAgICAgICAgIHRoaXMudmFyaWFibGVzLnB1c2godmFyaWFibGUpOworICAgICAg ICAgICAgfQorCisgICAgICAgICAgICBpZiAoYmxvY2sudHlwZSA9PT0gU3ludGF4LkZ1bmN0aW9u RXhwcmVzc2lvbiAmJiBibG9jay5pZCkgeworICAgICAgICAgICAgICAgIG5ldyBTY29wZShibG9j aywgeyBuYW1pbmc6IHRydWUgfSk7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAg ICAgLyoqCisgICAgICAgICAqIFJlZmVyZW5jZSB0byB0aGUgcGFyZW50IHtAbGluayBTY29wZXxz Y29wZX0uCisgICAgICAgICAqIEBtZW1iZXIge1Njb3BlfSBTY29wZSN1cHBlcgorICAgICAgICAg Ki8KKyAgICAgICAgdGhpcy51cHBlciA9IGN1cnJlbnRTY29wZTsKKyAgICAgICAgIC8qKgorICAg ICAgICAgKiBXaGV0aGVyICd1c2Ugc3RyaWN0JyBpcyBpbiBlZmZlY3QgaW4gdGhpcyBzY29wZS4K KyAgICAgICAgICogQG1lbWJlciB7Ym9vbGVhbn0gU2NvcGUjaXNTdHJpY3QKKyAgICAgICAgICov CisgICAgICAgIHRoaXMuaXNTdHJpY3QgPSBpc1N0cmljdFNjb3BlKHRoaXMsIGJsb2NrKTsKKwor ICAgICAgICAgLyoqCisgICAgICAgICAqIExpc3Qgb2YgbmVzdGVkIHtAbGluayBTY29wZX1zLgor ICAgICAgICAgKiBAbWVtYmVyIHtTY29wZVtdfSBTY29wZSNjaGlsZFNjb3BlcworICAgICAgICAg Ki8KKyAgICAgICAgdGhpcy5jaGlsZFNjb3BlcyA9IFtdOworICAgICAgICBpZiAoY3VycmVudFNj b3BlKSB7CisgICAgICAgICAgICBjdXJyZW50U2NvcGUuY2hpbGRTY29wZXMucHVzaCh0aGlzKTsK KyAgICAgICAgfQorCisKKyAgICAgICAgLy8gUkFJSQorICAgICAgICBjdXJyZW50U2NvcGUgPSB0 aGlzOworICAgICAgICBpZiAodGhpcy50eXBlID09PSAnZ2xvYmFsJykgeworICAgICAgICAgICAg Z2xvYmFsU2NvcGUgPSB0aGlzOworICAgICAgICAgICAgZ2xvYmFsU2NvcGUuaW1wbGljaXQgPSB7 CisgICAgICAgICAgICAgICAgc2V0OiBuZXcgTWFwKCksCisgICAgICAgICAgICAgICAgdmFyaWFi bGVzOiBbXQorICAgICAgICAgICAgfTsKKyAgICAgICAgfQorICAgICAgICBzY29wZXMucHVzaCh0 aGlzKTsKKyAgICB9CisKKyAgICBTY29wZS5wcm90b3R5cGUuX19jbG9zZSA9IGZ1bmN0aW9uIF9f Y2xvc2UoKSB7CisgICAgICAgIHZhciBpLCBpeiwgcmVmLCBjdXJyZW50LCBub2RlLCBpbXBsaWNp dDsKKworICAgICAgICAvLyBCZWNhdXNlIGlmIHRoaXMgaXMgZ2xvYmFsIGVudmlyb25tZW50LCB1 cHBlciBpcyBudWxsCisgICAgICAgIGlmICghdGhpcy5keW5hbWljIHx8IG9wdGlvbnMub3B0aW1p c3RpYykgeworICAgICAgICAgICAgLy8gc3RhdGljIHJlc29sdmUKKyAgICAgICAgICAgIGZvciAo aSA9IDAsIGl6ID0gdGhpcy5sZWZ0Lmxlbmd0aDsgaSA8IGl6OyArK2kpIHsKKyAgICAgICAgICAg ICAgICByZWYgPSB0aGlzLmxlZnRbaV07CisgICAgICAgICAgICAgICAgaWYgKCF0aGlzLl9fcmVz b2x2ZShyZWYpKSB7CisgICAgICAgICAgICAgICAgICAgIHRoaXMuX19kZWxlZ2F0ZVRvVXBwZXJT Y29wZShyZWYpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfSBl bHNlIHsKKyAgICAgICAgICAgIC8vIHRoaXMgaXMgImdsb2JhbCIgLyAid2l0aCIgLyAiZnVuY3Rp b24gd2l0aCBldmFsIiBlbnZpcm9ubWVudAorICAgICAgICAgICAgaWYgKHRoaXMudHlwZSA9PT0g J3dpdGgnKSB7CisgICAgICAgICAgICAgICAgZm9yIChpID0gMCwgaXogPSB0aGlzLmxlZnQubGVu Z3RoOyBpIDwgaXo7ICsraSkgeworICAgICAgICAgICAgICAgICAgICByZWYgPSB0aGlzLmxlZnRb aV07CisgICAgICAgICAgICAgICAgICAgIHJlZi50YWludGVkID0gdHJ1ZTsKKyAgICAgICAgICAg ICAgICAgICAgdGhpcy5fX2RlbGVnYXRlVG9VcHBlclNjb3BlKHJlZik7CisgICAgICAgICAgICAg ICAgfQorICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICBmb3IgKGkgPSAwLCBp eiA9IHRoaXMubGVmdC5sZW5ndGg7IGkgPCBpejsgKytpKSB7CisgICAgICAgICAgICAgICAgICAg IC8vIG5vdGlmeSBhbGwgbmFtZXMgYXJlIHRocm91Z2ggdG8gZ2xvYmFsCisgICAgICAgICAgICAg ICAgICAgIHJlZiA9IHRoaXMubGVmdFtpXTsKKyAgICAgICAgICAgICAgICAgICAgY3VycmVudCA9 IHRoaXM7CisgICAgICAgICAgICAgICAgICAgIGRvIHsKKyAgICAgICAgICAgICAgICAgICAgICAg IGN1cnJlbnQudGhyb3VnaC5wdXNoKHJlZik7CisgICAgICAgICAgICAgICAgICAgICAgICBjdXJy ZW50ID0gY3VycmVudC51cHBlcjsKKyAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoY3VycmVu dCk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9CisKKyAgICAg ICAgaWYgKHRoaXMudHlwZSA9PT0gJ2dsb2JhbCcpIHsKKyAgICAgICAgICAgIGltcGxpY2l0ID0g W107CisgICAgICAgICAgICBmb3IgKGkgPSAwLCBpeiA9IHRoaXMubGVmdC5sZW5ndGg7IGkgPCBp ejsgKytpKSB7CisgICAgICAgICAgICAgICAgcmVmID0gdGhpcy5sZWZ0W2ldOworICAgICAgICAg ICAgICAgIGlmIChyZWYuX19tYXliZUltcGxpY2l0R2xvYmFsICYmICF0aGlzLnNldC5oYXMocmVm LmlkZW50aWZpZXIubmFtZSkpIHsKKyAgICAgICAgICAgICAgICAgICAgaW1wbGljaXQucHVzaChy ZWYuX19tYXliZUltcGxpY2l0R2xvYmFsKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAg ICB9CisKKyAgICAgICAgICAgIC8vIGNyZWF0ZSBhbiBpbXBsaWNpdCBnbG9iYWwgdmFyaWFibGUg ZnJvbSBhc3NpZ25tZW50IGV4cHJlc3Npb24KKyAgICAgICAgICAgIGZvciAoaSA9IDAsIGl6ID0g aW1wbGljaXQubGVuZ3RoOyBpIDwgaXo7ICsraSkgeworICAgICAgICAgICAgICAgIG5vZGUgPSBp bXBsaWNpdFtpXTsKKyAgICAgICAgICAgICAgICB0aGlzLl9fZGVmaW5lSW1wbGljaXQobm9kZS5s ZWZ0LCB7CisgICAgICAgICAgICAgICAgICAgIHR5cGU6IFZhcmlhYmxlLkltcGxpY2l0R2xvYmFs VmFyaWFibGUsCisgICAgICAgICAgICAgICAgICAgIG5hbWU6IG5vZGUubGVmdCwKKyAgICAgICAg ICAgICAgICAgICAgbm9kZTogbm9kZQorICAgICAgICAgICAgICAgIH0pOworICAgICAgICAgICAg fQorICAgICAgICB9CisKKyAgICAgICAgdGhpcy5sZWZ0ID0gbnVsbDsKKyAgICAgICAgY3VycmVu dFNjb3BlID0gdGhpcy51cHBlcjsKKyAgICB9OworCisgICAgU2NvcGUucHJvdG90eXBlLl9fcmVz b2x2ZSA9IGZ1bmN0aW9uIF9fcmVzb2x2ZShyZWYpIHsKKyAgICAgICAgdmFyIHZhcmlhYmxlLCBu YW1lOworICAgICAgICBuYW1lID0gcmVmLmlkZW50aWZpZXIubmFtZTsKKyAgICAgICAgaWYgKHRo aXMuc2V0LmhhcyhuYW1lKSkgeworICAgICAgICAgICAgdmFyaWFibGUgPSB0aGlzLnNldC5nZXQo bmFtZSk7CisgICAgICAgICAgICB2YXJpYWJsZS5yZWZlcmVuY2VzLnB1c2gocmVmKTsKKyAgICAg ICAgICAgIHZhcmlhYmxlLnN0YWNrID0gdmFyaWFibGUuc3RhY2sgJiYgcmVmLmZyb20udmFyaWFi bGVTY29wZSA9PT0gdGhpcy52YXJpYWJsZVNjb3BlOworICAgICAgICAgICAgaWYgKHJlZi50YWlu dGVkKSB7CisgICAgICAgICAgICAgICAgdmFyaWFibGUudGFpbnRlZCA9IHRydWU7CisgICAgICAg ICAgICAgICAgdGhpcy50YWludHMuc2V0KHZhcmlhYmxlLm5hbWUsIHRydWUpOworICAgICAgICAg ICAgfQorICAgICAgICAgICAgcmVmLnJlc29sdmVkID0gdmFyaWFibGU7CisgICAgICAgICAgICBy ZXR1cm4gdHJ1ZTsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgfTsKKwor ICAgIFNjb3BlLnByb3RvdHlwZS5fX2RlbGVnYXRlVG9VcHBlclNjb3BlID0gZnVuY3Rpb24gX19k ZWxlZ2F0ZVRvVXBwZXJTY29wZShyZWYpIHsKKyAgICAgICAgaWYgKHRoaXMudXBwZXIpIHsKKyAg ICAgICAgICAgIHRoaXMudXBwZXIubGVmdC5wdXNoKHJlZik7CisgICAgICAgIH0KKyAgICAgICAg dGhpcy50aHJvdWdoLnB1c2gocmVmKTsKKyAgICB9OworCisgICAgU2NvcGUucHJvdG90eXBlLl9f ZGVmaW5lSW1wbGljaXQgPSBmdW5jdGlvbiBfX2RlZmluZUltcGxpY2l0KG5vZGUsIGluZm8pIHsK KyAgICAgICAgdmFyIG5hbWUsIHZhcmlhYmxlOworICAgICAgICBpZiAobm9kZSAmJiBub2RlLnR5 cGUgPT09IFN5bnRheC5JZGVudGlmaWVyKSB7CisgICAgICAgICAgICBuYW1lID0gbm9kZS5uYW1l OworICAgICAgICAgICAgaWYgKCF0aGlzLmltcGxpY2l0LnNldC5oYXMobmFtZSkpIHsKKyAgICAg ICAgICAgICAgICB2YXJpYWJsZSA9IG5ldyBWYXJpYWJsZShuYW1lLCB0aGlzKTsKKyAgICAgICAg ICAgICAgICB2YXJpYWJsZS5pZGVudGlmaWVycy5wdXNoKG5vZGUpOworICAgICAgICAgICAgICAg IHZhcmlhYmxlLmRlZnMucHVzaChpbmZvKTsKKyAgICAgICAgICAgICAgICB0aGlzLmltcGxpY2l0 LnNldC5zZXQobmFtZSwgdmFyaWFibGUpOworICAgICAgICAgICAgICAgIHRoaXMuaW1wbGljaXQu dmFyaWFibGVzLnB1c2godmFyaWFibGUpOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAg ICAgICAgICB2YXJpYWJsZSA9IHRoaXMuaW1wbGljaXQuc2V0LmdldChuYW1lKTsKKyAgICAgICAg ICAgICAgICB2YXJpYWJsZS5pZGVudGlmaWVycy5wdXNoKG5vZGUpOworICAgICAgICAgICAgICAg IHZhcmlhYmxlLmRlZnMucHVzaChpbmZvKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAg IH07CisKKyAgICBTY29wZS5wcm90b3R5cGUuX19kZWZpbmUgPSBmdW5jdGlvbiBfX2RlZmluZShu b2RlLCBpbmZvKSB7CisgICAgICAgIHZhciBuYW1lLCB2YXJpYWJsZTsKKyAgICAgICAgaWYgKG5v ZGUgJiYgbm9kZS50eXBlID09PSBTeW50YXguSWRlbnRpZmllcikgeworICAgICAgICAgICAgbmFt ZSA9IG5vZGUubmFtZTsKKyAgICAgICAgICAgIGlmICghdGhpcy5zZXQuaGFzKG5hbWUpKSB7Cisg ICAgICAgICAgICAgICAgdmFyaWFibGUgPSBuZXcgVmFyaWFibGUobmFtZSwgdGhpcyk7CisgICAg ICAgICAgICAgICAgdmFyaWFibGUuaWRlbnRpZmllcnMucHVzaChub2RlKTsKKyAgICAgICAgICAg ICAgICB2YXJpYWJsZS5kZWZzLnB1c2goaW5mbyk7CisgICAgICAgICAgICAgICAgdGhpcy5zZXQu c2V0KG5hbWUsIHZhcmlhYmxlKTsKKyAgICAgICAgICAgICAgICB0aGlzLnZhcmlhYmxlcy5wdXNo KHZhcmlhYmxlKTsKKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgdmFyaWFi bGUgPSB0aGlzLnNldC5nZXQobmFtZSk7CisgICAgICAgICAgICAgICAgdmFyaWFibGUuaWRlbnRp ZmllcnMucHVzaChub2RlKTsKKyAgICAgICAgICAgICAgICB2YXJpYWJsZS5kZWZzLnB1c2goaW5m byk7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9OworCisgICAgU2NvcGUucHJvdG90 eXBlLl9fcmVmZXJlbmNpbmcgPSBmdW5jdGlvbiBfX3JlZmVyZW5jaW5nKG5vZGUsIGFzc2lnbiwg d3JpdGVFeHByLCBtYXliZUltcGxpY2l0R2xvYmFsKSB7CisgICAgICAgIHZhciByZWY7CisgICAg ICAgIC8vIGJlY2F1c2UgQXJyYXkgZWxlbWVudCBtYXkgYmUgbnVsbAorICAgICAgICBpZiAobm9k ZSAmJiBub2RlLnR5cGUgPT09IFN5bnRheC5JZGVudGlmaWVyKSB7CisgICAgICAgICAgICByZWYg PSBuZXcgUmVmZXJlbmNlKG5vZGUsIHRoaXMsIGFzc2lnbiB8fCBSZWZlcmVuY2UuUkVBRCwgd3Jp dGVFeHByLCBtYXliZUltcGxpY2l0R2xvYmFsKTsKKyAgICAgICAgICAgIHRoaXMucmVmZXJlbmNl cy5wdXNoKHJlZik7CisgICAgICAgICAgICB0aGlzLmxlZnQucHVzaChyZWYpOworICAgICAgICB9 CisgICAgfTsKKworICAgIFNjb3BlLnByb3RvdHlwZS5fX2RldGVjdEV2YWwgPSBmdW5jdGlvbiBf X2RldGVjdEV2YWwoKSB7CisgICAgICAgIHZhciBjdXJyZW50OworICAgICAgICBjdXJyZW50ID0g dGhpczsKKyAgICAgICAgdGhpcy5kaXJlY3RDYWxsVG9FdmFsU2NvcGUgPSB0cnVlOworICAgICAg ICBkbyB7CisgICAgICAgICAgICBjdXJyZW50LmR5bmFtaWMgPSB0cnVlOworICAgICAgICAgICAg Y3VycmVudCA9IGN1cnJlbnQudXBwZXI7CisgICAgICAgIH0gd2hpbGUgKGN1cnJlbnQpOworICAg IH07CisKKyAgICBTY29wZS5wcm90b3R5cGUuX19kZXRlY3RUaGlzID0gZnVuY3Rpb24gX19kZXRl Y3RUaGlzKCkgeworICAgICAgICB0aGlzLnRoaXNGb3VuZCA9IHRydWU7CisgICAgfTsKKworICAg IFNjb3BlLnByb3RvdHlwZS5fX2lzQ2xvc2VkID0gZnVuY3Rpb24gaXNDbG9zZWQoKSB7CisgICAg ICAgIHJldHVybiB0aGlzLmxlZnQgPT09IG51bGw7CisgICAgfTsKKworICAgIC8vIEFQSSBTY29w ZSNyZXNvbHZlKG5hbWUpCisgICAgLy8gcmV0dXJucyByZXNvbHZlZCByZWZlcmVuY2UKKyAgICBT Y29wZS5wcm90b3R5cGUucmVzb2x2ZSA9IGZ1bmN0aW9uIHJlc29sdmUoaWRlbnQpIHsKKyAgICAg ICAgdmFyIHJlZiwgaSwgaXo7CisgICAgICAgIGFzc2VydCh0aGlzLl9faXNDbG9zZWQoKSwgJ3Nj b3BlIHNob3VsZCBiZSBjbG9zZWQnKTsKKyAgICAgICAgYXNzZXJ0KGlkZW50LnR5cGUgPT09IFN5 bnRheC5JZGVudGlmaWVyLCAndGFyZ2V0IHNob3VsZCBiZSBpZGVudGlmaWVyJyk7CisgICAgICAg IGZvciAoaSA9IDAsIGl6ID0gdGhpcy5yZWZlcmVuY2VzLmxlbmd0aDsgaSA8IGl6OyArK2kpIHsK KyAgICAgICAgICAgIHJlZiA9IHRoaXMucmVmZXJlbmNlc1tpXTsKKyAgICAgICAgICAgIGlmIChy ZWYuaWRlbnRpZmllciA9PT0gaWRlbnQpIHsKKyAgICAgICAgICAgICAgICByZXR1cm4gcmVmOwor ICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIHJldHVybiBudWxsOworICAgIH07CisK KyAgICAvLyBBUEkgU2NvcGUjaXNTdGF0aWMKKyAgICAvLyByZXR1cm5zIHRoaXMgc2NvcGUgaXMg c3RhdGljCisgICAgU2NvcGUucHJvdG90eXBlLmlzU3RhdGljID0gZnVuY3Rpb24gaXNTdGF0aWMo KSB7CisgICAgICAgIHJldHVybiAhdGhpcy5keW5hbWljOworICAgIH07CisKKyAgICAvLyBBUEkg U2NvcGUjaXNBcmd1bWVudHNNYXRlcmlhbGl6ZWQKKyAgICAvLyByZXR1cm4gdGhpcyBzY29wZSBo YXMgbWF0ZXJpYWxpemVkIGFyZ3VtZW50cworICAgIFNjb3BlLnByb3RvdHlwZS5pc0FyZ3VtZW50 c01hdGVyaWFsaXplZCA9IGZ1bmN0aW9uIGlzQXJndW1lbnRzTWF0ZXJpYWxpemVkKCkgeworICAg ICAgICAvLyBUT0RPKENvbnN0ZWxsYXRpb24pCisgICAgICAgIC8vIFdlIGNhbiBtb3JlIGFnZ3Jl c3NpdmUgb24gdGhpcyBjb25kaXRpb24gbGlrZSB0aGlzLgorICAgICAgICAvLworICAgICAgICAv LyBmdW5jdGlvbiB0KCkgeworICAgICAgICAvLyAgICAgLy8gYXJndW1lbnRzIG9mIHQgaXMgYWx3 YXlzIGhpZGRlbi4KKyAgICAgICAgLy8gICAgIGZ1bmN0aW9uIGFyZ3VtZW50cygpIHsKKyAgICAg ICAgLy8gICAgIH0KKyAgICAgICAgLy8gfQorICAgICAgICB2YXIgdmFyaWFibGU7CisKKyAgICAg ICAgLy8gVGhpcyBpcyBub3QgZnVuY3Rpb24gc2NvcGUKKyAgICAgICAgaWYgKHRoaXMudHlwZSAh PT0gJ2Z1bmN0aW9uJykgeworICAgICAgICAgICAgcmV0dXJuIHRydWU7CisgICAgICAgIH0KKwor ICAgICAgICBpZiAoIXRoaXMuaXNTdGF0aWMoKSkgeworICAgICAgICAgICAgcmV0dXJuIHRydWU7 CisgICAgICAgIH0KKworICAgICAgICB2YXJpYWJsZSA9IHRoaXMuc2V0LmdldCgnYXJndW1lbnRz Jyk7CisgICAgICAgIGFzc2VydCh2YXJpYWJsZSwgJ2Fsd2F5cyBoYXZlIGFyZ3VtZW50cyB2YXJp YWJsZScpOworICAg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V07CisgICAgICAg IH0KKyAgICB9OworCisgICAgU2NvcGUucHJvdG90eXBlLmlzVXNlZE5hbWUgPSBmdW5jdGlvbiAo bmFtZSkgeworICAgICAgICBpZiAodGhpcy5zZXQuaGFzKG5hbWUpKSB7CisgICAgICAgICAgICBy ZXR1cm4gdHJ1ZTsKKyAgICAgICAgfQorICAgICAgICBmb3IgKHZhciBpID0gMCwgaXogPSB0aGlz LnRocm91Z2gubGVuZ3RoOyBpIDwgaXo7ICsraSkgeworICAgICAgICAgICAgaWYgKHRoaXMudGhy b3VnaFtpXS5pZGVudGlmaWVyLm5hbWUgPT09IG5hbWUpIHsKKyAgICAgICAgICAgICAgICByZXR1 cm4gdHJ1ZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICByZXR1cm4gZmFsc2U7 CisgICAgfTsKKworICAgIC8qKgorICAgICAqIEBjbGFzcyBTY29wZU1hbmFnZXIKKyAgICAgKi8K KyAgICBmdW5jdGlvbiBTY29wZU1hbmFnZXIoc2NvcGVzKSB7CisgICAgICAgIHRoaXMuc2NvcGVz ID0gc2NvcGVzOworICAgICAgICB0aGlzLmF0dGFjaGVkID0gZmFsc2U7CisgICAgfQorCisgICAg Ly8gUmV0dXJucyBhcHByb3BsaWF0ZSBzY29wZSBmb3IgdGhpcyBub2RlCisgICAgU2NvcGVNYW5h Z2VyLnByb3RvdHlwZS5fX2dldCA9IGZ1bmN0aW9uIF9fZ2V0KG5vZGUpIHsKKyAgICAgICAgdmFy IGksIGl6LCBzY29wZTsKKyAgICAgICAgaWYgKHRoaXMuYXR0YWNoZWQpIHsKKyAgICAgICAgICAg IHJldHVybiBub2RlW1Njb3BlLm1hbmdsZWROYW1lXSB8fCBudWxsOworICAgICAgICB9CisgICAg ICAgIGlmIChTY29wZS5pc1Njb3BlUmVxdWlyZWQobm9kZSkpIHsKKyAgICAgICAgICAgIGZvciAo aSA9IDAsIGl6ID0gdGhpcy5zY29wZXMubGVuZ3RoOyBpIDwgaXo7ICsraSkgeworICAgICAgICAg ICAgICAgIHNjb3BlID0gdGhpcy5zY29wZXNbaV07CisgICAgICAgICAgICAgICAgaWYgKCFzY29w ZS5mdW5jdGlvbkV4cHJlc3Npb25TY29wZSkgeworICAgICAgICAgICAgICAgICAgICBpZiAoc2Nv cGUuYmxvY2sgPT09IG5vZGUpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzY29w ZTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAg IH0KKyAgICAgICAgfQorICAgICAgICByZXR1cm4gbnVsbDsKKyAgICB9OworCisgICAgU2NvcGVN YW5hZ2VyLnByb3RvdHlwZS5hY3F1aXJlID0gZnVuY3Rpb24gYWNxdWlyZShub2RlKSB7CisgICAg ICAgIHJldHVybiB0aGlzLl9fZ2V0KG5vZGUpOworICAgIH07CisKKyAgICBTY29wZU1hbmFnZXIu cHJvdG90eXBlLnJlbGVhc2UgPSBmdW5jdGlvbiByZWxlYXNlKG5vZGUpIHsKKyAgICAgICAgdmFy IHNjb3BlID0gdGhpcy5fX2dldChub2RlKTsKKyAgICAgICAgaWYgKHNjb3BlKSB7CisgICAgICAg ICAgICBzY29wZSA9IHNjb3BlLnVwcGVyOworICAgICAgICAgICAgd2hpbGUgKHNjb3BlKSB7Cisg ICAgICAgICAgICAgICAgaWYgKCFzY29wZS5mdW5jdGlvbkV4cHJlc3Npb25TY29wZSkgeworICAg ICAgICAgICAgICAgICAgICByZXR1cm4gc2NvcGU7CisgICAgICAgICAgICAgICAgfQorICAgICAg ICAgICAgICAgIHNjb3BlID0gc2NvcGUudXBwZXI7CisgICAgICAgICAgICB9CisgICAgICAgIH0K KyAgICAgICAgcmV0dXJuIG51bGw7CisgICAgfTsKKworICAgIFNjb3BlTWFuYWdlci5wcm90b3R5 cGUuYXR0YWNoID0gZnVuY3Rpb24gYXR0YWNoKCkgeworICAgICAgICB2YXIgaSwgaXo7CisgICAg ICAgIGZvciAoaSA9IDAsIGl6ID0gdGhpcy5zY29wZXMubGVuZ3RoOyBpIDwgaXo7ICsraSkgewor ICAgICAgICAgICAgdGhpcy5zY29wZXNbaV0uYXR0YWNoKCk7CisgICAgICAgIH0KKyAgICAgICAg dGhpcy5hdHRhY2hlZCA9IHRydWU7CisgICAgfTsKKworICAgIFNjb3BlTWFuYWdlci5wcm90b3R5 cGUuZGV0YWNoID0gZnVuY3Rpb24gZGV0YWNoKCkgeworICAgICAgICB2YXIgaSwgaXo7CisgICAg ICAgIGZvciAoaSA9IDAsIGl6ID0gdGhpcy5zY29wZXMubGVuZ3RoOyBpIDwgaXo7ICsraSkgewor ICAgICAgICAgICAgdGhpcy5zY29wZXNbaV0uZGV0YWNoKCk7CisgICAgICAgIH0KKyAgICAgICAg dGhpcy5hdHRhY2hlZCA9IGZhbHNlOworICAgIH07CisKKyAgICBTY29wZS5pc1Njb3BlUmVxdWly ZWQgPSBmdW5jdGlvbiBpc1Njb3BlUmVxdWlyZWQobm9kZSkgeworICAgICAgICByZXR1cm4gU2Nv cGUuaXNWYXJpYWJsZVNjb3BlUmVxdWlyZWQobm9kZSkgfHwgbm9kZS50eXBlID09PSBTeW50YXgu V2l0aFN0YXRlbWVudCB8fCBub2RlLnR5cGUgPT09IFN5bnRheC5DYXRjaENsYXVzZTsKKyAgICB9 OworCisgICAgU2NvcGUuaXNWYXJpYWJsZVNjb3BlUmVxdWlyZWQgPSBmdW5jdGlvbiBpc1Zhcmlh YmxlU2NvcGVSZXF1aXJlZChub2RlKSB7CisgICAgICAgIHJldHVybiBub2RlLnR5cGUgPT09IFN5 bnRheC5Qcm9ncmFtIHx8IG5vZGUudHlwZSA9PT0gU3ludGF4LkZ1bmN0aW9uRXhwcmVzc2lvbiB8 fCBub2RlLnR5cGUgPT09IFN5bnRheC5GdW5jdGlvbkRlY2xhcmF0aW9uOworICAgIH07CisKKyAg ICAvKioKKyAgICAgKiBNYWluIGludGVyZmFjZSBmdW5jdGlvbi4gVGFrZXMgYW4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7CisgICAgICAgICAgICBlbnRlcjogZnVuY3Rpb24gZW50ZXIo bm9kZSkgeworICAgICAgICAgICAgICAgIHZhciBpLCBpeiwgZGVjbDsKKyAgICAgICAgICAgICAg ICBpZiAoU2NvcGUuaXNTY29wZVJlcXVpcmVkKG5vZGUpKSB7CisgICAgICAgICAgICAgICAgICAg IG5ldyBTY29wZShub2RlLCB7fSk7CisgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAg ICAgc3dpdGNoIChub2RlLnR5cGUpIHsKKyAgICAgICAgICAgICAgICBjYXNlIFN5bnRheC5Bc3Np Z25tZW50RXhwcmVzc2lvbjoKKyAgICAgICAgICAgICAgICAgICAgaWYgKG5vZGUub3BlcmF0b3Ig PT09ICc9JykgeworICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudFNjb3BlLl9fcmVmZXJl bmNpbmcobm9kZS5sZWZ0LCBSZWZlcmVuY2UuV1JJVEUsIG5vZGUucmlnaHQsICghY3VycmVudFNj b3BlLmlzU3RyaWN0ICYmIG5vZGUubGVmdC5uYW1lICE9IG51bGwpICYmIG5vZGUpOworICAgICAg ICAgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudFNj b3BlLl9fcmVmZXJlbmNpbmcobm9kZS5sZWZ0LCBSZWZlcmVuY2UuUlcsIG5vZGUucmlnaHQpOwor ICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRTY29wZS5f X3JlZmVyZW5jaW5nKG5vZGUucmlnaHQpOworICAgICAgICAgICAgICAgICAgICBicmVhazsKKwor ICAgICAgICAgICAgICAgIGNhc2UgU3ludGF4LkFycmF5RXhwcmVzc2lvbjoKKyAgICAgICAgICAg ICAgICAgICAgZm9yIChpID0gMCwgaXogPSBub2RlLmVsZW1lbnRzLmxlbmd0aDsgaSA8IGl6OyAr K2kpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRTY29wZS5fX3JlZmVyZW5jaW5n KG5vZGUuZWxlbWVudHNbaV0pOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAg ICAgICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgY2FzZSBTeW50YXguQmxvY2tTdGF0ZW1l bnQ6CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgY2FzZSBT eW50YXguQmluYXJ5RXhwcmVzc2lvbjoKKyAgICAgICAgICAgICAgICAgICAgY3VycmVudFNjb3Bl Ll9fcmVmZXJlbmNpbmcobm9kZS5sZWZ0KTsKKyAgICAgICAgICAgICAgICAgICAgY3VycmVudFNj b3BlLl9fcmVmZXJlbmNpbmcobm9kZS5yaWdodCk7CisgICAgICAgICAgICAgICAgICAgIGJyZWFr OworCisgICAgICAgICAgICAgICAgY2FzZSBTeW50YXguQnJlYWtTdGF0ZW1lbnQ6CisgICAgICAg ICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgY2FzZSBTeW50YXguQ2FsbEV4 cHJlc3Npb246CisgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRTY29wZS5fX3JlZmVyZW5jaW5n KG5vZGUuY2FsbGVlKTsKKyAgICAgICAgICAgICAgICAgICAgZm9yIChpID0gMCwgaXogPSBub2Rl Wydhcmd1bWVudHMnXS5sZW5ndGg7IGkgPCBpejsgKytpKSB7CisgICAgICAgICAgICAgICAgICAg ICAgICBjdXJyZW50U2NvcGUuX19yZWZlcmVuY2luZyhub2RlWydhcmd1bWVudHMnXVtpXSk7Cisg ICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICAvLyBjaGVjayB0aGlz IGlzIGRpcmVjdCBjYWxsIHRvIGV2YWwKKyAgICAgICAgICAgICAgICAgICAgaWYgKCFvcHRpb25z Lmlnbm9yZUV2YWwgJiYgbm9kZS5jYWxsZWUudHlwZSA9PT0gU3ludGF4LklkZW50aWZpZXIgJiYg bm9kZS5jYWxsZWUubmFtZSA9PT0gJ2V2YWwnKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBj dXJyZW50U2NvcGUudmFyaWFibGVTY29wZS5fX2RldGVjdEV2YWwoKTsKKyAgICAgICAgICAgICAg ICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgICAgIGNh c2UgU3ludGF4LkNhdGNoQ2xhdXNlOgorICAgICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUu X19kZWZpbmUobm9kZS5wYXJhbSwgeworICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogVmFy aWFibGUuQ2F0Y2hDbGF1c2UsCisgICAgICAgICAgICAgICAgICAgICAgICBuYW1lOiBub2RlLnBh cmFtLAorICAgICAgICAgICAgICAgICAgICAgICAgbm9kZTogbm9kZQorICAgICAgICAgICAgICAg ICAgICB9KTsKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgICAgICBj YXNlIFN5bnRheC5Db25kaXRpb25hbEV4cHJlc3Npb246CisgICAgICAgICAgICAgICAgICAgIGN1 cnJlbnRTY29wZS5fX3JlZmVyZW5jaW5nKG5vZGUudGVzdCk7CisgICAgICAgICAgICAgICAgICAg IGN1cnJlbnRTY29wZS5fX3JlZmVyZW5jaW5nKG5vZGUuY29uc2VxdWVudCk7CisgICAgICAgICAg ICAgICAgICAgIGN1cnJlbnRTY29wZS5fX3JlZmVyZW5jaW5nKG5vZGUuYWx0ZXJuYXRlKTsKKyAg ICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgICAgICBjYXNlIFN5bnRheC5D b250aW51ZVN0YXRlbWVudDoKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAg ICAgICAgICBjYXNlIFN5bnRheC5EaXJlY3RpdmVTdGF0ZW1lbnQ6CisgICAgICAgICAgICAgICAg ICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgY2FzZSBTeW50YXguRG9XaGlsZVN0YXRlbWVu dDoKKyAgICAgICAgICAgICAgICAgICAgY3VycmVudFNjb3BlLl9fcmVmZXJlbmNpbmcobm9kZS50 ZXN0KTsKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgICAgICBjYXNl IFN5bnRheC5EZWJ1Z2dlclN0YXRlbWVudDoKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisK KyAgICAgICAgICAgICAgICBjYXNlIFN5bnRheC5FbXB0eVN0YXRlbWVudDoKKyAgICAgICAgICAg ICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgICAgICBjYXNlIFN5bnRheC5FeHByZXNzaW9u U3RhdGVtZW50OgorICAgICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUuX19yZWZlcmVuY2lu Zyhub2RlLmV4cHJlc3Npb24pOworICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAg ICAgICAgICAgIGNhc2UgU3ludGF4LkZvclN0YXRlbWVudDoKKyAgICAgICAgICAgICAgICAgICAg Y3VycmVudFNjb3BlLl9fcmVmZXJlbmNpbmcobm9kZS5pbml0KTsKKyAgICAgICAgICAgICAgICAg ICAgY3VycmVudFNjb3BlLl9fcmVmZXJlbmNpbmcobm9kZS50ZXN0KTsKKyAgICAgICAgICAgICAg ICAgICAgY3VycmVudFNjb3BlLl9fcmVmZXJlbmNpbmcobm9kZS51cGRhdGUpOworICAgICAgICAg ICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgICAgIGNhc2UgU3ludGF4LkZvckluU3Rh dGVtZW50OgorICAgICAgICAgICAgICAgICAgICBpZiAobm9kZS5sZWZ0LnR5cGUgPT09IFN5bnRh eC5WYXJpYWJsZURlY2xhcmF0aW9uKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50 U2NvcGUuX19yZWZlcmVuY2luZyhub2RlLmxlZnQuZGVjbGFyYXRpb25zWzBdLmlkLCBSZWZlcmVu Y2UuV1JJVEUsIG51bGwsIGZhbHNlKTsKKyAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKKyAg ICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRTY29wZS5fX3JlZmVyZW5jaW5nKG5vZGUubGVm dCwgUmVmZXJlbmNlLldSSVRFLCBudWxsLCAoIWN1cnJlbnRTY29wZS5pc1N0cmljdCAmJiBub2Rl LmxlZnQubmFtZSAhPSBudWxsKSAmJiBub2RlKTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAg ICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUuX19yZWZlcmVuY2luZyhub2RlLnJpZ2h0KTsK KyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgICAgICBjYXNlIFN5bnRh eC5GdW5jdGlvbkRlY2xhcmF0aW9uOgorICAgICAgICAgICAgICAgICAgICAvLyBGdW5jdGlvbkRl Y2xhcmF0aW9uIG5hbWUgaXMgZGVmaW5lZCBpbiB1cHBlciBzY29wZQorICAgICAgICAgICAgICAg ICAgICBjdXJyZW50U2NvcGUudXBwZXIuX19kZWZpbmUobm9kZS5pZCwgeworICAgICAgICAgICAg ICAgICAgICAgICAgdHlwZTogVmFyaWFibGUuRnVuY3Rpb25OYW1lLAorICAgICAgICAgICAgICAg ICAgICAgICAgbmFtZTogbm9kZS5pZCwKKyAgICAgICAgICAgICAgICAgICAgICAgIG5vZGU6IG5v ZGUKKyAgICAgICAgICAgICAgICAgICAgfSk7CisgICAgICAgICAgICAgICAgICAgIGZvciAoaSA9 IDAsIGl6ID0gbm9kZS5wYXJhbXMubGVuZ3RoOyBpIDwgaXo7ICsraSkgeworICAgICAgICAgICAg ICAgICAgICAgICAgY3VycmVudFNjb3BlLl9fZGVmaW5lKG5vZGUucGFyYW1zW2ldLCB7CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogVmFyaWFibGUuUGFyYW1ldGVyLAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgIG5hbWU6IG5vZGUucGFyYW1zW2ldLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgIG5vZGU6IG5vZGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg aW5kZXg6IGkKKyAgICAgICAgICAgICAgICAgICAgICAgIH0pOworICAgICAgICAgICAgICAgICAg ICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgY2FzZSBT eW50YXguRnVuY3Rpb25FeHByZXNzaW9uOgorICAgICAgICAgICAgICAgICAgICAvLyBpZCBpcyBk ZWZpbmVkIGluIHVwcGVyIHNjb3BlCisgICAgICAgICAgICAgICAgICAgIGZvciAoaSA9IDAsIGl6 ID0gbm9kZS5wYXJhbXMubGVuZ3RoOyBpIDwgaXo7ICsraSkgeworICAgICAgICAgICAgICAgICAg ICAgICAgY3VycmVudFNjb3BlLl9fZGVmaW5lKG5vZGUucGFyYW1zW2ldLCB7CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgdHlwZTogVmFyaWFibGUuUGFyYW1ldGVyLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgIG5hbWU6IG5vZGUucGFyYW1zW2ldLAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgIG5vZGU6IG5vZGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kZXg6 IGkKKyAgICAgICAgICAgICAgICAgICAgICAgIH0pOworICAgICAgICAgICAgICAgICAgICB9Cisg ICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgY2FzZSBTeW50YXgu SWRlbnRpZmllcjoKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgICAg ICBjYXNlIFN5bnRheC5JZlN0YXRlbWVudDoKKyAgICAgICAgICAgICAgICAgICAgY3VycmVudFNj b3BlLl9fcmVmZXJlbmNpbmcobm9kZS50ZXN0KTsKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7 CisKKyAgICAgICAgICAgICAgICBjYXNlIFN5bnRheC5MaXRlcmFsOgorICAgICAgICAgICAgICAg ICAgICBicmVhazsKKworICAgICAgICAgICAgICAgIGNhc2UgU3ludGF4LkxhYmVsZWRTdGF0ZW1l bnQ6CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgY2FzZSBT eW50YXguTG9naWNhbEV4cHJlc3Npb246CisgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRTY29w ZS5fX3JlZmVyZW5jaW5nKG5vZGUubGVmdCk7CisgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRT Y29wZS5fX3JlZmVyZW5jaW5nKG5vZGUucmlnaHQpOworICAgICAgICAgICAgICAgICAgICBicmVh azsKKworICAgICAgICAgICAgICAgIGNhc2UgU3ludGF4Lk1lbWJlckV4cHJlc3Npb246CisgICAg ICAgICAgICAgICAgICAgIGN1cnJlbnRTY29wZS5fX3JlZmVyZW5jaW5nKG5vZGUub2JqZWN0KTsK KyAgICAgICAgICAgICAgICAgICAgaWYgKG5vZGUuY29tcHV0ZWQpIHsKKyAgICAgICAgICAgICAg ICAgICAgICAgIGN1cnJlbnRTY29wZS5fX3JlZmVyZW5jaW5nKG5vZGUucHJvcGVydHkpOworICAg ICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAg ICAgICAgICAgY2FzZSBTeW50YXguTmV3RXhwcmVzc2lvbjoKKyAgICAgICAgICAgICAgICAgICAg Y3VycmVudFNjb3BlLl9fcmVmZXJlbmNpbmcobm9kZS5jYWxsZWUpOworICAgICAgICAgICAgICAg ICAgICBmb3IgKGkgPSAwLCBpeiA9IG5vZGVbJ2FyZ3VtZW50cyddLmxlbmd0aDsgaSA8IGl6OyAr K2kpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRTY29wZS5fX3JlZmVyZW5jaW5n KG5vZGVbJ2FyZ3VtZW50cyddW2ldKTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAg ICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgICAgIGNhc2UgU3ludGF4Lk9iamVjdEV4 cHJlc3Npb246CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAg Y2FzZSBTeW50YXguUHJvZ3JhbToKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAg ICAgICAgICAgICBjYXNlIFN5bnRheC5Qcm9wZXJ0eToKKyAgICAgICAgICAgICAgICAgICAgY3Vy cmVudFNjb3BlLl9fcmVmZXJlbmNpbmcobm9kZS52YWx1ZSk7CisgICAgICAgICAgICAgICAgICAg IGJyZWFrOworCisgICAgICAgICAgICAgICAgY2FzZSBTeW50YXguUmV0dXJuU3RhdGVtZW50Ogor ICAgICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUuX19yZWZlcmVuY2luZyhub2RlLmFyZ3Vt ZW50KTsKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgICAgICBjYXNl IFN5bnRheC5TZXF1ZW5jZUV4cHJlc3Npb246CisgICAgICAgICAgICAgICAgICAgIGZvciAoaSA9 IDAsIGl6ID0gbm9kZS5leHByZXNzaW9ucy5sZW5ndGg7IGkgPCBpejsgKytpKSB7CisgICAgICAg ICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUuX19yZWZlcmVuY2luZyhub2RlLmV4cHJlc3Np b25zW2ldKTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVh azsKKworICAgICAgICAgICAgICAgIGNhc2UgU3ludGF4LlN3aXRjaFN0YXRlbWVudDoKKyAgICAg ICAgICAgICAgICAgICAgY3VycmVudFNjb3BlLl9fcmVmZXJlbmNpbmcobm9kZS5kaXNjcmltaW5h bnQpOworICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgICAgIGNhc2Ug U3ludGF4LlN3aXRjaENhc2U6CisgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRTY29wZS5fX3Jl ZmVyZW5jaW5nKG5vZGUudGVzdCk7CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAg ICAgICAgICAgICAgY2FzZSBTeW50YXguVGhpc0V4cHJlc3Npb246CisgICAgICAgICAgICAgICAg ICAgIGN1cnJlbnRTY29wZS52YXJpYWJsZVNjb3BlLl9fZGV0ZWN0VGhpcygpOworICAgICAgICAg ICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgICAgIGNhc2UgU3ludGF4LlRocm93U3Rh dGVtZW50OgorICAgICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUuX19yZWZlcmVuY2luZyhu b2RlLmFyZ3VtZW50KTsKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAg ICAgICBjYXNlIFN5bnRheC5UcnlTdGF0ZW1lbnQ6CisgICAgICAgICAgICAgICAgICAgIGJyZWFr OworCisgICAgICAgICAgICAgICAgY2FzZSBTeW50YXguVW5hcnlFeHByZXNzaW9uOgorICAgICAg ICAgICAgICAgICAgICBjdXJyZW50U2NvcGUuX19yZWZlcmVuY2luZyhub2RlLmFyZ3VtZW50KTsK KyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgICAgICAgICBjYXNlIFN5bnRh eC5VcGRhdGVFeHByZXNzaW9uOgorICAgICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUuX19y ZWZlcmVuY2luZyhub2RlLmFyZ3VtZW50LCBSZWZlcmVuY2UuUlcsIG51bGwpOworICAgICAgICAg ICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgICAgIGNhc2UgU3ludGF4LlZhcmlhYmxl RGVjbGFyYXRpb246CisgICAgICAgICAgICAgICAgICAgIGZvciAoaSA9IDAsIGl6ID0gbm9kZS5k ZWNsYXJhdGlvbnMubGVuZ3RoOyBpIDwgaXo7ICsraSkgeworICAgICAgICAgICAgICAgICAgICAg ICAgZGVjbCA9IG5vZGUuZGVjbGFyYXRpb25zW2ldOworICAgICAgICAgICAgICAgICAgICAgICAg Y3VycmVudFNjb3BlLnZhcmlhYmxlU2NvcGUuX19kZWZpbmUoZGVjbC5pZCwgeworICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHR5cGU6IFZhcmlhYmxlLlZhcmlhYmxlLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgIG5hbWU6IGRlY2wuaWQsCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgbm9kZTogZGVjbCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmRleDogaSwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnQ6IG5vZGUKKyAgICAgICAgICAgICAgICAg ICAgICAgIH0pOworICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlY2wuaW5pdCkgeworICAg ICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGluaXRpYWxpemVyIGlzIGZvdW5kCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgY3VycmVudFNjb3BlLl9fcmVmZXJlbmNpbmcoZGVjbC5pZCwg UmVmZXJlbmNlLldSSVRFLCBkZWNsLmluaXQsIGZhbHNlKTsKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICBjdXJyZW50U2NvcGUuX19yZWZlcmVuY2luZyhkZWNsLmluaXQpOworICAgICAgICAg ICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAg ICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgY2FzZSBTeW50YXguVmFyaWFibGVEZWNsYXJh dG9yOgorICAgICAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgICAgIGNhc2Ug U3ludGF4LldoaWxlU3RhdGVtZW50OgorICAgICAgICAgICAgICAgICAgICBjdXJyZW50U2NvcGUu X19yZWZlcmVuY2luZyhub2RlLnRlc3QpOworICAgICAgICAgICAgICAgICAgICBicmVhazsKKwor ICAgICAgICAgICAgICAgIGNhc2UgU3ludGF4LldpdGhTdGF0ZW1lbnQ6CisgICAgICAgICAgICAg ICAgICAgIC8vIFdpdGhTdGF0ZW1lbnQgb2JqZWN0IGlzIHJlZmVyZW5jZWQgYXQgdXBwZXIgc2Nv cGUKKyAgICAgICAgICAgICAgICAgICAgY3VycmVudFNjb3BlLnVwcGVyLl9fcmVmZXJlbmNpbmco bm9kZS5vYmplY3QpOworICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAg ICB9CisgICAgICAgICAgICB9LAorCisgICAgICAgICAgICBsZWF2ZTogZnVuY3Rpb24gbGVhdmUo bm9kZSkgeworICAgICAgICAgICAgICAgIHdoaWxlIChjdXJyZW50U2NvcGUgJiYgbm9kZSA9PT0g Y3VycmVudFNjb3BlLmJsb2NrKSB7CisgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRTY29wZS5f X2Nsb3NlKCk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9KTsK KworICAgICAgICBhc3NlcnQoY3VycmVudFNjb3BlID09PSBudWxsKTsKKyAgICAgICAgZ2xvYmFs U2NvcGUgPSBudWxsOworICAgICAgICBzY29wZXMgPSBudWxsOworICAgICAgICBvcHRpb25zID0g bnVsbDsKKworICAgICAgICByZXR1cm4gbmV3IFNjb3BlTWFuYWdlcihyZXN1bHRTY29wZXMpOwor ICAgIH0KKworICAgIC8qKiBAbmFtZSBtb2R1bGU6ZXNjb3BlLnZlcnNpb24gKi8KKyAgICBleHBv cnRzLnZlcnNpb24gPSAnMS4wLjEnOworICAgIC8qKiBAbmFtZSBtb2R1bGU6ZXNjb3BlLlJlZmVy ZW5jZSAqLworICAgIGV4cG9ydHMuUmVmZXJlbmNlID0gUmVmZXJlbmNlOworICAgIC8qKiBAbmFt ZSBtb2R1bGU6ZXNjb3BlLlZhcmlhYmxlICovCisgICAgZXhwb3J0cy5WYXJpYWJsZSA9IFZhcmlh YmxlOworICAgIC8qKiBAbmFtZSBtb2R1bGU6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bWQp IHsKKyAgICAgICAgZGVmaW5lKFsnZXhwb3J0cyddLCBmYWN0b3J5KTsKKyAgICB9IGVsc2UgaWYg KHR5cGVvZiBleHBvcnRzICE9PSAndW5kZWZpbmVkJykgeworICAgICAgICBmYWN0b3J5KGV4cG9y dHMpOworICAgIH0gZWxzZSB7CisgICAgICAgIGZhY3RvcnkoKHJvb3QuZXNwcmltYSA9IHt9KSk7 CisgICAgfQorfSh0aGlzLCBmdW5jdGlvbiAoZXhwb3J0cykgeworICAgICd1c2Ugc3RyaWN0JzsK KworICAgIHZhciBUb2tlbiwKKyAgICAgICAgVG9rZW5OYW1lLAorICAgICAgICBGbkV4cHJUb2tl bnMsCisgICAgICAgIFN5bnRheCwKKyAgICAgICAgUHJvcGVydHlLaW5kLAorICAgICAgICBNZXNz YWdlcywKKyAgICAgICAgUmVnZXgsCisgICAgICAgIFN5bnRheFRyZWVEZWxlZ2F0ZSwKKyAgICAg ICAgc291cmNlLAorICAgICAgICBzdHJpY3QsCisgICAgICAgIGluZGV4LAorICAgICAgICBsaW5l TnVtYmVyLAorICAgICAgICBsaW5lU3RhcnQsCisgICAgICAgIGxlbmd0aCwKKyAgICAgICAgZGVs ZWdhdGUsCisgICAgICAgIGxvb2thaGVhZCwKKyAgICAgICAgc3RhdGUsCisgICAgICAgIGV4dHJh OworCisgICAgVG9rZW4gPSB7CisgICAgICAgIEJvb2xlYW5MaXRlcmFsOiAxLAorICAgICAgICBF T0Y6IDIsCisgICAgICAgIElkZW50aWZpZXI6IDMsCisgICAgICAgIEtleXdvcmQ6IDQsCisgICAg ICAgIE51bGxMaXRlcmFsOiA1LAorICAgICAgICBOdW1lcmljTGl0ZXJhbDogNiwKKyAgICAgICAg UHVuY3R1YXRvcjogNywKKyAgICAgICAgU3RyaW5nTGl0ZXJhbDogOCwKKyAgICAgICAgUmVndWxh ckV4cHJlc3Npb246IDkKKyAgICB9OworCisgICAgVG9rZW5OYW1lID0ge307CisgICAgVG9rZW5O YW1lW1Rva2VuLkJvb2xlYW5MaXRlcmFsXSA9ICdCb29sZWFuJzsKKyAgICBUb2tlbk5hbWVbVG9r ZW4uRU9GXSA9ICc8ZW5kPic7CisgICAgVG9rZW5OYW1lW1Rva2VuLklkZW50aWZpZXJdID0gJ0lk ZW50aWZpZXInOworICAgIFRva2VuTmFtZVtUb2tlbi5LZXl3b3JkXSA9ICdLZXl3b3JkJzsKKyAg ICBUb2tlbk5hbWVbVG9rZW4uTnVsbExpdGVyYWxdID0gJ051bGwnOworICAgIFRva2VuTmFtZVtU b2tlbi5OdW1lcmljTGl0ZXJhbF0gPSAnTnVtZXJpYyc7CisgICAgVG9rZW5OYW1lW1Rva2VuLlB1 bmN0dWF0b3JdID0gJ1B1bmN0dWF0b3InOworICAgIFRva2VuTmFtZVtUb2tlbi5TdHJpbmdMaXRl cmFsXSA9ICdTdHJpbmcnOworICAgIFRva2VuTmFtZVtUb2tlbi5SZWd1bGFyRXhwcmVzc2lvbl0g PSAnUmVndWxhckV4cHJlc3Npb24nOworCisgICAgLy8gQSBmdW5jdGlvbiBmb2xsb3dpbmcgb25l IG9mIHRob3NlIHRva2VucyBpcyBhbiBleHByZXNzaW9uLgorICAgIEZuRXhwclRva2VucyA9IFsn KCcsICd7JywgJ1snLCAnaW4nLCAndHlwZW9mJywgJ2luc3RhbmNlb2YnLCAnbmV3JywKKyAgICAg ICAgICAgICAgICAgICAgJ3JldHVybicsICdjYXNlJywgJ2RlbGV0ZScsICd0aHJvdycsICd2b2lk JywKKyAgICAgICAgICAgICAgICAgICAgLy8gYXNzaWdubWVudCBvcGVyYXRvcnMKKyAgICAgICAg ICAgICAgICAgICAgJz0nLCAnKz0nLCAnLT0nLCAnKj0nLCAnLz0nLCAnJT0nLCAnPDw9JywgJz4+ PScsICc+Pj49JywKKyAgICAgICAgICAgICAgICAgICAgJyY9JywgJ3w9JywgJ149JywgJywnLAor ICAgICAgICAgICAgICAgICAgICAvLyBiaW5hcnkvdW5hcnkgb3BlcmF0b3JzCisgICAgICAgICAg ICAgICAgICAgICcrJywgJy0nLCAnKicsICcvJywgJyUnLCAnKysnLCAnLS0nLCAnPDwnLCAnPj4n LCAnPj4+JywgJyYnLAorICAgICAgICAgICAgICAgICAgICAnfCcsICdeJywgJyEnLCAnficsICcm JicsICd8fCcsICc/JywgJzonLCAnPT09JywgJz09JywgJz49JywKKyAgICAgICAgICAgICAgICAg ICAgJzw9JywgJzwnLCAnPicsICchPScsICchPT0nXTsKKworICAgIFN5bnRheCA9IHsKKyAgICAg ICAgQXNzaWdubWVudEV4cHJlc3Npb246ICdBc3NpZ25tZW50RXhwcmVzc2lvbicsCisgICAgICAg IEFycmF5RXhwcmVzc2lvbjogJ0FycmF5RXhwcmVzc2lvbicsCisgICAgICAgIEJsb2NrU3RhdGVt ZW50OiAnQmxvY2tTdGF0ZW1lbnQnLAorICAgICAgICBCaW5hcnlFeHByZXNzaW9uOiAnQmluYXJ5 RXhwcmVzc2lvbicsCisgICAgICAgIEJyZWFrU3RhdGVtZW50OiAnQnJlYWtTdGF0ZW1lbnQnLAor ICAgICAgICBDYWxsRXhwcmVzc2lvbjogJ0NhbGxFeHByZXNzaW9uJywKKyAgICAgICAgQ2F0Y2hD bGF1c2U6ICdDYXRjaENsYXVzZScsCisgICAgICAgIENvbmRpdGlvbmFsRXhwcmVzc2lvbjogJ0Nv bmRpdGlvbmFsRXhwcmVzc2lvbicsCisgICAgICAgIENvbnRpbnVlU3RhdGVtZW50OiAnQ29udGlu dWVTdGF0ZW1lbnQnLAorICAgICAgICBEb1doaWxlU3RhdGVtZW50OiAnRG9XaGlsZVN0YXRlbWVu dCcsCisgICAgICAgIERlYnVnZ2VyU3RhdGVtZW50OiAnRGVidWdnZXJTdGF0ZW1lbnQnLAorICAg ICAgICBFbXB0eVN0YXRlbWVudDogJ0VtcHR5U3RhdGVtZW50JywKKyAgICAgICAgRXhwcmVzc2lv blN0YXRlbWVudDogJ0V4cHJlc3Npb25TdGF0ZW1lbnQnLAorICAgICAgICBGb3JTdGF0ZW1lbnQ6 ICdGb3JTdGF0ZW1lbnQnLAorICAgICAgICBGb3JJblN0YXRlbWVudDogJ0ZvckluU3RhdGVtZW50 JywKKyAgICAgICAgRnVuY3Rpb25EZWNsYXJhdGlvbjogJ0Z1bmN0aW9uRGVjbGFyYXRpb24nLAor ICAgICAgICBGdW5jdGlvbkV4cHJlc3Npb246ICdGdW5jdGlvbkV4cHJlc3Npb24nLAorICAgICAg ICBJZGVudGlmaWVyOiAnSWRlbnRpZmllcicsCisgICAgICAgIElmU3RhdGVtZW50OiAnSWZTdGF0 ZW1lbnQnLAorICAgICAgICBMaXRlcmFsOiAnTGl0ZXJhbCcsCisgICAgICAgIExhYmVsZWRTdGF0 ZW1lbnQ6ICdMYWJlbGVkU3RhdGVtZW50JywKKyAgICAgICAgTG9naWNhbEV4cHJlc3Npb246ICdM b2dpY2FsRXhwcmVzc2lvbicsCisgICAgICAgIE1lbWJlckV4cHJlc3Npb246ICdNZW1iZXJFeHBy ZXNzaW9uJywKKyAgICAgICAgTmV3RXhwcmVzc2lvbjogJ05ld0V4cHJlc3Npb24nLAorICAgICAg ICBPYmplY3RFeHByZXNzaW9uOiAnT2JqZWN0RXhwcmVzc2lvbicsCisgICAgICAgIFByb2dyYW06 ICdQcm9ncmFtJywKKyAgICAgICAgUHJvcGVydHk6ICdQcm9wZXJ0eScsCisgICAgICAgIFJldHVy blN0YXRlbWVudDogJ1JldHVyblN0YXRlbWVudCcsCisgICAgICAgIFNlcXVlbmNlRXhwcmVzc2lv bjogJ1NlcXVlbmNlRXhwcmVzc2lvbicsCisgICAgICAgIFN3aXRjaFN0YXRlbWVudDogJ1N3aXRj aFN0YXRlbWVudCcsCisgICAgICAgIFN3aXRjaENhc2U6ICdTd2l0Y2hDYXNlJywKKyAgICAgICAg VGhpc0V4cHJlc3Npb246ICdUaGlzRXhwcmVzc2lvbicsCisgICAgICAgIFRocm93U3RhdGVtZW50 OiAnVGhyb3dTdGF0ZW1lbnQnLAorICAgICAgICBUcnlTdGF0ZW1lbnQ6ICdUcnlTdGF0ZW1lbnQn LAorICAgICAgICBVbmFyeUV4cHJlc3Npb246ICdVbmFyeUV4cHJlc3Npb24nLAorICAgICAgICBV cGRhdGVFeHByZXNzaW9uOiAnVXBkYXRlRXhwcmVzc2lvbicsCisgICAgICAgIFZhcmlhYmxlRGVj bGFyYXRpb246ICdWYXJpYWJsZURlY2xhcmF0aW9uJywKKyAgICAgICAgVmFyaWFibGVEZWNsYXJh dG9yOiAnVmFyaWFibGVEZWNsYXJhdG9yJywKKyAgICAgICAgV2hpbGVTdGF0ZW1lbnQ6ICdXaGls ZVN0YXRlbWVudCcsCisgICAgICAgIFdpdGhTdGF0ZW1lbnQ6ICdXaXRoU3RhdGVtZW50JworICAg IH07CisKKyAgICBQcm9wZXJ0eUtpbmQgPSB7CisgICAgICAgIERhdGE6IDEsCisgICAgICAgIEdl dDogMiwKKyAgICAgICAgU2V0OiA0CisgICAgfTsKKworICAgIC8vIEVycm9yIG1lc3NhZ2VzIHNo b3VsZCBiZSBpZGVudGljYWwgdG8gVjguCisgICAgTWVzc2FnZXMgPSB7CisgICAgICAgIFVuZXhw ZWN0ZWRUb2tlbjogICdVbmV4cGVjdGVkIHRva2VuICUwJywKKyAgICAgICAgVW5leHBlY3RlZE51 bWJlcjogICdVbmV4cGVjdGVkIG51bWJlcicsCisgICAgICAgIFVuZXhwZWN0ZWRTdHJpbmc6ICAn VW5leHBlY3RlZCBzdHJpbmcnLAorICAgICAgICBVbmV4cGVjdGVkSWRlbnRpZmllcjogICdVbmV4 cGVjdGVkIGlkZW50aWZpZXInLAorICAgICAgICBVbmV4cGVjdGVkUmVzZXJ2ZWQ6ICAnVW5leHBl Y3RlZCByZXNlcnZlZCB3b3JkJywKKyAgICAgICAgVW5leHBlY3RlZEVPUzogICdVbmV4cGVjdGVk IGVuZCBvZiBpbnB1dCcsCisgICAgICAgIE5ld2xpbmVBZnRlclRocm93OiAgJ0lsbGVnYWwgbmV3 bGluZSBhZnRlci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gICAgKGNoID49IDB4MTY4MCAmJiBbMHgx NjgwLCAweDE4MEUsIDB4MjAwMCwgMHgyMDAxLCAweDIwMDIsIDB4MjAwMywgMHgyMDA0LCAweDIw MDUsIDB4MjAwNiwgMHgyMDA3LCAweDIwMDgsIDB4MjAwOSwgMHgyMDBBLCAweDIwMkYsIDB4MjA1 RiwgMHgzMDAwLCAweEZFRkZdLmluZGV4T2YoY2gpID49IDApOworICAgIH0KKworICAgIC8vIDcu MyBMaW5lIFRlcm1pbmF0b3JzCisKKyAgICBmdW5jdGlvbiBpc0xpbmVUZXJtaW5hdG9yKGNoKSB7 CisgICAgICAgIHJldHVybiAoY2ggPT09IDB4MEEpIHx8IChjaCA9PT0gMHgwRCkgfHwgKGNoID09 PSAweDIwMjgpIHx8IChjaCA9PT0gMHgyMDI5KTsKKyAgICB9CisKKyAgICAvLyA3LjYgSWRlbnRp ZmllciBOYW1lcyBhbmQgSWRlbnRpZmllcnMKKworICAgIGZ1bmN0aW9uIGlzSWRlbnRpZmllclN0 YXJ0KGNoKSB7CisgICAgICAgIHJldHVybiAoY2ggPT09IDB4MjQpIHx8IChjaCA9PT0gMHg1Rikg fHwgIC8vICQgKGRvbGxhcikgYW5kIF8gKHVuZGVyc2NvcmUpCisgICAgICAgICAgICAoY2ggPj0g MHg0MSAmJiBjaCA8PSAweDVBKSB8fCAgICAgICAgIC8vIEEuLloKKyAgICAgICAgICAgIChjaCA+ PSAweDYxICYmIGNoIDw9IDB4N0EpIHx8ICAgICAgICAgLy8gYS4uegorICAgICAgICAgICAgKGNo ID09PSAweDVDKSB8fCAgICAgICAgICAgICAgICAgICAgICAvLyBcIChiYWNrc2xhc2gpCisgICAg ICAgICAgICAoKGNoID49IDB4ODApICYmIFJlZ2V4Lk5vbkFzY2lpSWRlbnRpZmllclN0YXJ0LnRl c3QoU3RyaW5nLmZyb21DaGFyQ29kZShjaCkpKTsKKyAgICB9CisKKyAgICBmdW5jdGlvbiBpc0lk ZW50aWZpZXJQYXJ0KGNoKSB7CisgICAgICAgIHJldHVybiAoY2ggPT09IDB4MjQpIHx8IChjaCA9 PT0gMHg1RikgfHwgIC8vICQgKGRvbGxhcikgYW5kIF8gKHVuZGVyc2NvcmUpCisgICAgICAgICAg ICAoY2ggPj0gMHg0MSAmJiBjaCA8PSAweDVBKSB8fCAgICAgICAgIC8vIEEuLloKKyAgICAgICAg ICAgIChjaCA+PSAweDYxICYmIGNoIDw9IDB4N0EpIHx8ICAgICAgICAgLy8gYS4uegorICAgICAg ICAgICAgKGNoID49IDB4MzAgJiYgY2ggPD0gMHgzOSkgfHwgICAgICAgICAvLyAwLi45CisgICAg ICAgICAgICAoY2ggPT09IDB4NUMpIHx8ICAgICAgICAgICAgICAgICAgICAgIC8vIFwgKGJhY2tz bGFzaCkKKyAgICAgICAgICAgICgoY2ggPj0gMHg4MCkgJiYgUmVnZXguTm9uQXNjaWlJZGVudGlm aWVyUGFydC50ZXN0KFN0cmluZy5mcm9tQ2hhckNvZGUoY2gpKSk7CisgICAgfQorCisgICAgLy8g Ny42LjEuMiBGdXR1cmUgUmVzZXJ2ZWQgV29yZHMKKworICAgIGZ1bmN0aW9uIGlzRnV0dXJlUmVz ZXJ2ZWRXb3JkKGlkKSB7CisgICAgICAgIHN3aXRjaCAoaWQpIHsKKyAgICAgICAgY2FzZSAnY2xh c3MnOgorICAgICAgICBjYXNlICdlbnVtJzoKKyAgICAgICAgY2FzZSAnZXhwb3J0JzoKKyAgICAg ICAgY2FzZSAnZXh0ZW5kcyc6CisgICAgICAgIGNhc2UgJ2ltcG9ydCc6CisgICAgICAgIGNhc2Ug J3N1cGVyJzoKKyAgICAgICAgICAgIHJldHVybiB0cnVlOworICAgICAgICBkZWZhdWx0OgorICAg ICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CisgICAgfQorCisgICAgZnVuY3Rpb24g aXNTdHJpY3RNb2RlUmVzZXJ2ZWRXb3JkKGlkKSB7CisgICAgICAgIHN3aXRjaCAoaWQpIHsKKyAg ICAgICAgY2FzZSAnaW1wbGVtZW50cyc6CisgICAgICAgIGNhc2UgJ2ludGVyZmFjZSc6CisgICAg ICAgIGNhc2UgJ3BhY2thZ2UnOgorICAgICAgICBjYXNlICdwcml2YXRlJzoKKyAgICAgICAgY2Fz ZSAncHJvdGVjdGVkJzoKKyAgICAgICAgY2FzZSAncHVibGljJzoKKyAgICAgICAgY2FzZSAnc3Rh dGljJzoKKyAgICAgICAgY2FzZSAneWllbGQnOgorICAgICAgICBjYXNlICdsZXQnOgorICAgICAg ICAgICAgcmV0dXJuIHRydWU7CisgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICByZXR1cm4g ZmFsc2U7CisgICAgICAgIH0KKyAgICB9CisKKyAgICBmdW5jdGlvbiBpc1Jlc3RyaWN0ZWRXb3Jk KGlkKSB7CisgICAgICAgIHJldHVybiBpZCA9PT0gJ2V2YWwnIHx8IGlkID09PSAnYXJndW1lbnRz JzsKKyAgICB9CisKKyAgICAvLyA3LjYuMS4xIEtleXdvcmRzCisKKyAgICBmdW5jdGlvbiBpc0tl eXdvcmQoaWQpIHsKKyAgICAgICAgaWYgKHN0cmljdCAmJiBpc1N0cmljdE1vZGVSZXNlcnZlZFdv cmQoaWQpKSB7CisgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKKyAgICAgICAgfQorCisgICAgICAg IC8vICdjb25zdCcgaXMgc3BlY2lhbGl6ZWQgYXMgS2V5d29yZCBpbiBWOC4KKyAgICAgICAgLy8g J3lpZWxkJyBhbmQgJ2xldCcgYXJlIGZvciBjb21wYXRpYmxpdHkgd2l0aCBTcGlkZXJNb25rZXkg YW5kIEVTLm5leHQuCisgICAgICAgIC8vIFNvbWUgb3RoZXJzIGFyZSBmcm9tIGZ1dHVyZSByZXNl cnZlZCB3b3Jkcy4KKworICAgICAgICBzd2l0Y2ggKGlkLmxlbmd0aCkgeworICAgICAgICBjYXNl IDI6CisgICAgICAgICAgICByZXR1cm4gKGlkID09PSAnaWYnKSB8fCAoaWQgPT09ICdpbicpIHx8 IChpZCA9PT0gJ2RvJyk7CisgICAgICAgIGNhc2UgMzoKKyAgICAgICAgICAgIHJldHVybiAoaWQg PT09ICd2YXInKSB8fCAoaWQgPT09ICdmb3InKSB8fCAoaWQgPT09ICduZXcnKSB8fAorICAgICAg ICAgICAgICAgIChpZCA9PT0gJ3RyeScpIHx8IChpZCA9PT0gJ2xldCcpOworICAgICAgICBjYXNl IDQ6CisgICAgICAgICAgICByZXR1cm4gKGlkID09PSAndGhpcycpIHx8IChpZCA9PT0gJ2Vsc2Un KSB8fCAoaWQgPT09ICdjYXNlJykgfHwKKyAgICAgICAgICAgICAgICAoaWQgPT09ICd2b2lkJykg fHwgKGlkID09PSAnd2l0aCcpIHx8IChpZCA9PT0gJ2VudW0nKTsKKyAgICAgICAgY2FzZSA1Ogor ICAgICAgICAgICAgcmV0dXJuIChpZCA9PT0gJ3doaWxlJykgfHwgKGlkID09PSAnYnJlYWsnKSB8 fCAoaWQgPT09ICdjYXRjaCcpIHx8CisgICAgICAgICAgICAgICAgKGlkID09PSAndGhyb3cnKSB8 fCAoaWQgPT09ICdjb25zdCcpIHx8IChpZCA9PT0gJ3lpZWxkJykgfHwKKyAgICAgICAgICAgICAg ICAoaWQgPT09ICdjbGFzcycpIHx8IChpZCA9PT0gJ3N1cGVyJyk7CisgICAgICAgIGNhc2UgNjoK KyAgICAgICAgICAgIHJldHVybiAoaWQgPT09ICdyZXR1cm4nKSB8fCAoaWQgPT09ICd0eXBlb2Yn KSB8fCAoaWQgPT09ICdkZWxldGUnKSB8fAorICAgICAgICAgICAgICAgIChpZCA9PT0gJ3N3aXRj aCcpIHx8IChpZCA9PT0gJ2V4cG9ydCcpIHx8IChpZCA9PT0gJ2ltcG9ydCcpOworICAgICAgICBj YXNlIDc6CisgICAgICAgICAgICByZXR1cm4gKGlkID09PSAnZGVmYXVsdCcpIHx8IChpZCA9PT0g J2ZpbmFsbHknKSB8fCAoaWQgPT09ICdleHRlbmRzJyk7CisgICAgICAgIGNhc2UgODoKKyAgICAg ICAgICAgIHJldHVybiAoaWQgPT09ICdmdW5jdGlvbicpIHx8IChpZCA9PT0gJ2NvbnRpbnVlJykg fHwgKGlkID09PSAnZGVidWdnZXInKTsKKyAgICAgICAgY2FzZSAxMDoKKyAgICAgICAgICAgIHJl dHVybiAoaWQgPT09ICdpbnN0YW5jZW9mJyk7CisgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAg ICByZXR1cm4gZmFsc2U7CisgICAgICAgIH0KKyAgICB9CisKKyAgICAvLyA3LjQgQ29tbWVudHMK KworICAgIGZ1bmN0aW9uIGFkZENvbW1lbnQodHlwZSwgdmFsdWUsIHN0YXJ0LCBlbmQsIGxvYykg eworICAgICAgICB2YXIgY29tbWVudCwgYXR0YWNoZXI7CisKKyAgICAgICAgYXNzZXJ0KHR5cGVv ZiBzdGFydCA9PT0gJ251bWJlcicsICdDb21tZW50IG11c3QgaGF2ZSB2YWxpZCBwb3NpdGlvbicp OworCisgICAgICAgIC8vIEJlY2F1c2UgdGhlIHdheSB0aGUgYWN0dWFsIHRva2VuIGlzIHNjYW5u ZWQsIG9mdGVuIHRoZSBjb21tZW50cworICAgICAgICAvLyAoaWYgYW55KSBhcmUgc2tpcHBlZCB0 d2ljZSBkdXJpbmcgdGhlIGxleGljYWwgYW5hbHlzaXMuCisgICAgICAgIC8vIFRodXMsIHdlIG5l ZWQgdG8gc2tpcCBhZGRpbmcgYSBjb21tZW50IGlmIHRoZSBjb21tZW50IGFycmF5IGFscmVhZHkK KyAgICAgICAgLy8gaGFuZGxlZCBpdC4KKyAgICAgICAgaWYgKHN0YXRlLmxhc3RDb21tZW50U3Rh cnQgPj0gc3RhcnQpIHsKKyAgICAgICAgICAgIHJldHVybjsKKyAgICAgICAgfQorICAgICAgICBz dGF0ZS5sYXN0Q29tbWVudFN0YXJ0ID0gc3RhcnQ7CisKKyAgICAgICAgY29tbWVudCA9IHsKKyAg ICAgICAgICAgIHR5cGU6IHR5cGUsCisgICAgICAgICAgICB2YWx1ZTogdmFsdWUKKyAgICAgICAg fTsKKyAgICAgICAgaWYgKGV4dHJhLnJhbmdlKSB7CisgICAgICAgICAgICBjb21tZW50LnJhbmdl ID0gW3N0YXJ0LCBlbmRdOworICAgICAgICB9CisgICAgICAgIGlmIChleHRyYS5sb2MpIHsKKyAg ICAgICAgICAgIGNvbW1lbnQubG9jID0gbG9jOworICAgICAgICB9CisgICAgICAgIGV4dHJhLmNv bW1lbnRzLnB1c2goY29tbWVudCk7CisgICAgICAgIGlmIChleHRyYS5hdHRhY2hDb21tZW50KSB7 CisgICAgICAgICAgICBleHRyYS5sZWFkaW5nQ29tbWVudHMucHVzaChjb21tZW50KTsKKyAgICAg ICAgICAgIGV4dHJhLnRyYWlsaW5nQ29tbWVudHMucHVzaChjb21tZW50KTsKKyAgICAgICAgfQor ICAgIH0KKworICAgIGZ1bmN0aW9uIHNraXBTaW5nbGVMaW5lQ29tbWVudChvZmZzZXQpIHsKKyAg ICAgICAgdmFyIHN0YXJ0LCBsb2MsIGNoLCBjb21tZW50OworCisgICAgICAgIHN0YXJ0ID0gaW5k ZXggLSBvZmZzZXQ7CisgICAgICAgIGxvYyA9IHsKKyAgICAgICAgICAgIHN0YXJ0OiB7CisgICAg ICAgICAgICAgICAgbGluZTogbGluZU51bWJlciwKKyAgICAgICAgICAgICAgICBjb2x1bW46IGlu ZGV4IC0gbGluZVN0YXJ0IC0gb2Zmc2V0CisgICAgICAgICAgICB9CisgICAgICAgIH07CisKKyAg ICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7CisgICAgICAgICAgICBjaCA9IHNvdXJjZS5j aGFyQ29kZUF0KGluZGV4KTsKKyAgICAgICAgICAgICsraW5kZXg7CisgICAgICAgICAgICBpZiAo aXNMaW5lVGVybWluYXRvcihjaCkpIHsKKyAgICAgICAgICAgICAgICBpZiAoZXh0cmEuY29tbWVu dHMpIHsKKyAgICAgICAgICAgICAgICAgICAgY29tbWVudCA9IHNvdXJjZS5zbGljZShzdGFydCAr IG9mZnNldCwgaW5kZXggLSAxKTsKKyAgICAgICAgICAgICAgICAgICAgbG9jLmVuZCA9IHsKKyAg ICAgICAgICAgICAgICAgICAgICAgIGxpbmU6IGxpbmVOdW1iZXIsCisgICAgICAgICAgICAgICAg ICAgICAgICBjb2x1bW46IGluZGV4IC0gbGluZVN0YXJ0IC0gMQorICAgICAgICAgICAgICAgICAg ICB9OworICAgICAgICAgICAgICAgICAgICBhZGRDb21tZW50KCdMaW5lJywgY29tbWVudCwgc3Rh cnQsIGluZGV4IC0gMSwgbG9jKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAg aWYgKGNoID09PSAxMyAmJiBzb3VyY2UuY2hhckNvZGVBdChpbmRleCkgPT09IDEwKSB7CisgICAg ICAgICAgICAgICAgICAgICsraW5kZXg7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAg ICAgICsrbGluZU51bWJlcjsKKyAgICAgICAgICAgICAgICBsaW5lU3RhcnQgPSBpbmRleDsKKyAg ICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAg ICBpZiAoZXh0cmEuY29tbWVudHMpIHsKKyAgICAgICAgICAgIGNvbW1lbnQgPSBzb3VyY2Uuc2xp Y2Uoc3RhcnQgKyBvZmZzZXQsIGluZGV4KTsKKyAgICAgICAgICAgIGxvYy5lbmQgPSB7CisgICAg ICAgICAgICAgICAgbGluZTogbGluZU51bWJlciwKKyAgICAgICAgICAgICAgICBjb2x1bW46IGlu ZGV4IC0gbGluZVN0YXJ0CisgICAgICAgICAgICB9OworICAgICAgICAgICAgYWRkQ29tbWVudCgn TGluZScsIGNvbW1lbnQsIHN0YXJ0LCBpbmRleCwgbG9jKTsKKyAgICAgICAgfQorICAgIH0KKwor ICAgIGZ1bmN0aW9uIHNraXBNdWx0aUxpbmVDb21tZW50KCkgeworICAgICAgICB2YXIgc3RhcnQs IGxvYywgY2gsIGNvbW1lbnQ7CisKKyAgICAgICAgaWYgKGV4dHJhLmNvbW1lbnRzKSB7CisgICAg ICAgICAgICBzdGFydCA9IGluZGV4IC0gMjsKKyAgICAgICAgICAgIGxvYyA9IHsKKyAgICAgICAg ICAgICAgICBzdGFydDogeworICAgICAgICAgICAgICAgICAgICBsaW5lOiBsaW5lTnVtYmVyLAor ICAgICAgICAgICAgICAgICAgICBjb2x1bW46IGluZGV4IC0gbGluZVN0YXJ0IC0gMgorICAgICAg ICAgICAgICAgIH0KKyAgICAgICAgICAgIH07CisgICAgICAgIH0KKworICAgICAgICB3aGlsZSAo aW5kZXggPCBsZW5ndGgpIHsKKyAgICAgICAgICAgIGNoID0gc291cmNlLmNoYXJDb2RlQXQoaW5k ZXgpOworICAgICAgICAgICAgaWYgKGlzTGluZVRlcm1pbmF0b3IoY2gpKSB7CisgICAgICAgICAg ICAgICAgaWYgKGNoID09PSAweDBEICYmIHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4ICsgMSkgPT09 IDB4MEEpIHsKKyAgICAgICAgICAgICAgICAgICAgKytpbmRleDsKKyAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgICAgKytsaW5lTnVtYmVyOworICAgICAgICAgICAgICAgICsraW5kZXg7 CisgICAgICAgICAgICAgICAgbGluZVN0YXJ0ID0gaW5kZXg7CisgICAgICAgICAgICAgICAgaWYg KGluZGV4ID49IGxlbmd0aCkgeworICAgICAgICAgICAgICAgICAgICB0aHJvd0Vycm9yKHt9LCBN ZXNzYWdlcy5VbmV4cGVjdGVkVG9rZW4sICdJTExFR0FMJyk7CisgICAgICAgICAgICAgICAgfQor ICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gMHgyQSkgeworICAgICAgICAgICAgICAgIC8v IEJsb2NrIGNvbW1lbnQgZW5kcyB3aXRoICcqLycuCisgICAgICAgICAgICAgICAgaWYgKHNvdXJj ZS5jaGFyQ29kZUF0KGluZGV4ICsgMSkgPT09IDB4MkYpIHsKKyAgICAgICAgICAgICAgICAgICAg KytpbmRleDsKKyAgICAgICAgICAgICAgICAgICAgKytpbmRleDsKKyAgICAgICAgICAgICAgICAg ICAgaWYgKGV4dHJhLmNvbW1lbnRzKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBjb21tZW50 ID0gc291cmNlLnNsaWNlKHN0YXJ0ICsgMiwgaW5kZXggLSAyKTsKKyAgICAgICAgICAgICAgICAg ICAgICAgIGxvYy5lbmQgPSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGluZTogbGlu ZU51bWJlciwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2x1bW46IGluZGV4IC0gbGlu ZVN0YXJ0CisgICAgICAgICAgICAgICAgICAgICAgICB9OworICAgICAgICAgICAgICAgICAgICAg ICAgYWRkQ29tbWVudCgnQmxvY2snLCBjb21tZW50LCBzdGFydCwgaW5kZXgsIGxvYyk7CisgICAg ICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAg ICAgICAgIH0KKyAgICAgICAgICAgICAgICArK2luZGV4OworICAgICAgICAgICAgfSBlbHNlIHsK KyAgICAgICAgICAgICAgICArK2luZGV4OworICAgICAgICAgICAgfQorICAgICAgICB9CisKKyAg ICAgICAgdGhyb3dFcnJvcih7fSwgTWVzc2FnZXMuVW5leHBlY3RlZFRva2VuLCAnSUxMRUdBTCcp OworICAgIH0KKworICAgIGZ1bmN0aW9uIHNraXBDb21tZW50KCkgeworICAgICAgICB2YXIgY2gs IHN0YXJ0OworCisgICAgICAgIHN0YXJ0ID0gKGluZGV4ID09PSAwKTsKKyAgICAgICAgd2hpbGUg KGluZGV4IDwgbGVuZ3RoKSB7CisgICAgICAgICAgICBjaCA9IHNvdXJjZS5jaGFyQ29kZUF0KGlu ZGV4KTsKKworICAgICAgICAgICAgaWYgKGlzV2hpdGVTcGFjZShjaCkpIHsKKyAgICAgICAgICAg ICAgICArK2luZGV4OworICAgICAgICAgICAgfSBlbHNlIGlmIChpc0xpbmVUZXJtaW5hdG9yKGNo KSkgeworICAgICAgICAgICAgICAgICsraW5kZXg7CisgICAgICAgICAgICAgICAgaWYgKGNoID09 PSAweDBEICYmIHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KSA9PT0gMHgwQSkgeworICAgICAgICAg ICAgICAgICAgICArK2luZGV4OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAr K2xpbmVOdW1iZXI7CisgICAgICAgICAgICAgICAgbGluZVN0YXJ0ID0gaW5kZXg7CisgICAgICAg ICAgICAgICAgc3RhcnQgPSB0cnVlOworICAgICAgICAgICAgfSBlbHNlIGlmIChjaCA9PT0gMHgy RikgeyAvLyBVKzAwMkYgaXMgJy8nCisgICAgICAgICAgICAgICAgY2ggPSBzb3VyY2UuY2hhckNv ZGVBdChpbmRleCArIDEpOworICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gMHgyRikgeworICAg ICAgICAgICAgICAgICAgICArK2luZGV4OworICAgICAgICAgICAgICAgICAgICArK2luZGV4Owor ICAgICAgICAgICAgICAgICAgICBza2lwU2luZ2xlTGluZUNvbW1lbnQoMik7CisgICAgICAgICAg ICAgICAgICAgIHN0YXJ0ID0gdHJ1ZTsKKyAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGNoID09 PSAweDJBKSB7ICAvLyBVKzAwMkEgaXMgJyonCisgICAgICAgICAgICAgICAgICAgICsraW5kZXg7 CisgICAgICAgICAgICAgICAgICAgICsraW5kZXg7CisgICAgICAgICAgICAgICAgICAgIHNraXBN dWx0aUxpbmVDb21tZW50KCk7CisgICAgICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAg ICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfSBlbHNlIGlm IChzdGFydCAmJiBjaCA9PT0gMHgyRCkgeyAvLyBVKzAwMkQgaXMgJy0nCisgICAgICAgICAgICAg ICAgLy8gVSswMDNFIGlzICc+JworICAgICAgICAgICAgICAgIGlmICgoc291cmNlLmNoYXJDb2Rl QXQoaW5kZXggKyAxKSA9PT0gMHgyRCkgJiYgKHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4ICsgMikg PT09IDB4M0UpKSB7CisgICAgICAgICAgICAgICAgICAgIC8vICctLT4nIGlzIGEgc2luZ2xlLWxp bmUgY29tbWVudAorICAgICAgICAgICAgICAgICAgICBpbmRleCArPSAzOworICAgICAgICAgICAg ICAgICAgICBza2lwU2luZ2xlTGluZUNvbW1lbnQoMyk7CisgICAgICAgICAgICAgICAgfSBlbHNl IHsKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgfQorICAgICAg ICAgICAgfSBlbHNlIGlmIChjaCA9PT0gMHgzQykgeyAvLyBVKzAwM0MgaXMgJzwnCisgICAgICAg ICAgICAgICAgaWYgKHNvdXJjZS5zbGljZShpbmRleCArIDEsIGluZGV4ICsgNCkgPT09ICchLS0n KSB7CisgICAgICAgICAgICAgICAgICAgICsraW5kZXg7IC8vIGA8YAorICAgICAgICAgICAgICAg ICAgICArK2luZGV4OyAvLyBgIWAKKyAgICAgICAgICAgICAgICAgICAgKytpbmRleDsgLy8gYC1g CisgICAgICAgICAgICAgICAgICAgICsraW5kZXg7IC8vIGAtYAorICAgICAgICAgICAgICAgICAg ICBza2lwU2luZ2xlTGluZUNvbW1lbnQoNCk7CisgICAgICAgICAgICAgICAgfSBlbHNlIHsKKyAg ICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAg fSBlbHNlIHsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0KKyAgICAgICAg fQorICAgIH0KKworICAgIGZ1bmN0aW9uIHNjYW5IZXhFc2NhcGUocHJlZml4KSB7CisgICAgICAg IHZhciBpLCBsZW4sIGNoLCBjb2RlID0gMDsKKworICAgICAgICBsZW4gPSAocHJlZml4ID09PSAn dScpID8gNCA6IDI7CisgICAgICAgIGZvciAoaSA9IDA7IGkgPCBsZW47ICsraSkgeworICAgICAg ICAgICAgaWYgKGluZGV4IDwgbGVuZ3RoICYmIGlzSGV4RGlnaXQoc291cmNlW2luZGV4XSkpIHsK KyAgICAgICAgICAgICAgICBjaCA9IHNvdXJjZVtpbmRleCsrXTsKKyAgICAgICAgICAgICAgICBj b2RlID0gY29kZSAqIDE2ICsgJzAxMjM0NTY3ODlhYmNkZWYnLmluZGV4T2YoY2gudG9Mb3dlckNh c2UoKSk7CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIHJldHVybiAnJzsK KyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICByZXR1cm4gU3RyaW5nLmZyb21DaGFy Q29kZShjb2RlKTsKKyAgICB9CisKKyAgICBmdW5jdGlvbiBnZXRFc2NhcGVkSWRlbnRpZmllcigp IHsKKyAgICAgICAgdmFyIGNoLCBpZDsKKworICAgICAgICBjaCA9IHNvdXJjZS5jaGFyQ29kZUF0 KGluZGV4KyspOworICAgICAgICBpZCA9IFN0cmluZy5mcm9tQ2hhckNvZGUoY2gpOworCisgICAg ICAgIC8vICdcdScgKFUrMDA1QywgVSswMDc1KSBkZW5vdGVzIGFuIGVzY2FwZWQgY2hhcmFjdGVy LgorICAgICAgICBpZiAoY2ggPT09IDB4NUMpIHsKKyAgICAgICAgICAgIGlmIChzb3VyY2UuY2hh ckNvZGVBdChpbmRleCkgIT09IDB4NzUpIHsKKyAgICAgICAgICAgICAgICB0aHJvd0Vycm9yKHt9 LCBNZXNzYWdlcy5VbmV4cGVjdGVkVG9rZW4sICdJTExFR0FMJyk7CisgICAgICAgICAgICB9Cisg ICAgICAgICAgICArK2luZGV4OworICAgICAgICAgICAgY2ggPSBzY2FuSGV4RXNjYXBlKCd1Jyk7 CisgICAgICAgICAgICBpZiAoIWNoIHx8IGNoID09PSAnXFwnIHx8ICFpc0lkZW50aWZpZXJTdGFy dChjaC5jaGFyQ29kZUF0KDApKSkgeworICAgICAgICAgICAgICAgIHRocm93RXJyb3Ioe30sIE1l c3NhZ2VzLlVuZXhwZWN0ZWRUb2tlbiwgJ0lMTEVHQUwnKTsKKyAgICAgICAgICAgIH0KKyAgICAg ICAgICAgIGlkID0gY2g7CisgICAgICAgIH0KKworICAgICAgICB3aGlsZSAoaW5kZXggPCBsZW5n dGgpIHsKKyAgICAgICAgICAgIGNoID0gc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpOworICAgICAg ICAgICAgaWYgKCFpc0lkZW50aWZpZXJQYXJ0KGNoKSkgeworICAgICAgICAgICAgICAgIGJyZWFr OworICAgICAgICAgICAgfQorICAgICAgICAgICAgKytpbmRleDsKKyAgICAgICAgICAgIGlkICs9 IFN0cmluZy5mcm9tQ2hhckNvZGUoY2gpOworCisgICAgICAgICAgICAvLyAnXHUnIChVKzAwNUMs IFUrMDA3NSkgZGVub3RlcyBhbiBlc2NhcGVkIGNoYXJhY3Rlci4KKyAgICAgICAgICAgIGlmIChj aCA9PT0gMHg1QykgeworICAgICAgICAgICAgICAgIGlkID0gaWQuc3Vic3RyKDAsIGlkLmxlbmd0 aCAtIDEpOworICAgICAgICAgICAgICAgIGlmIChzb3VyY2UuY2hhckNvZGVBdChpbmRleCkgIT09 IDB4NzUpIHsKKyAgICAgICAgICAgICAgICAgICAgdGhyb3dFcnJvcih7fSwgTWVzc2FnZXMuVW5l eHBlY3RlZFRva2VuLCAnSUxMRUdBTCcpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAg ICAgICArK2luZGV4OworICAgICAgICAgICAgICAgIGNoID0gc2NhbkhleEVzY2FwZSgndScpOwor ICAgICAgICAgICAgICAgIGlmICghY2ggfHwgY2ggPT09ICdcXCcgfHwgIWlzSWRlbnRpZmllclBh cnQoY2guY2hhckNvZGVBdCgwKSkpIHsKKyAgICAgICAgICAgICAgICAgICAgdGhyb3dFcnJvcih7 fSwgTWVzc2FnZXMuVW5leHBlY3RlZFRva2VuLCAnSUxMRUdBTCcpOworICAgICAgICAgICAgICAg IH0KKyAgICAgICAgICAgICAgICBpZCArPSBjaDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQor CisgICAgICAgIHJldHVybiBpZDsKKyAgICB9CisKKyAgICBmdW5jdGlvbiBnZXRJZGVudGlmaWVy KCkgeworICAgICAgICB2YXIgc3RhcnQsIGNoOworCisgICAgICAgIHN0YXJ0ID0gaW5kZXgrKzsK KyAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7CisgICAgICAgICAgICBjaCA9IHNvdXJj ZS5jaGFyQ29kZUF0KGluZGV4KTsKKyAgICAgICAgICAgIGlmIChjaCA9PT0gMHg1QykgeworICAg ICAgICAgICAgICAgIC8vIEJsYWNrc2xhc2ggKFUrMDA1QykgbWFya3MgVW5pY29kZSBlc2NhcGUg c2VxdWVuY2UuCisgICAgICAgICAgICAgICAgaW5kZXggPSBzdGFydDsKKyAgICAgICAgICAgICAg ICByZXR1cm4gZ2V0RXNjYXBlZElkZW50aWZpZXIoKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAg ICAgIGlmIChpc0lkZW50aWZpZXJQYXJ0KGNoKSkgeworICAgICAgICAgICAgICAgICsraW5kZXg7 CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAg ICAgfQorICAgICAgICB9CisKKyAgICAgICAgcmV0dXJuIHNvdXJjZS5zbGljZShzdGFydCwgaW5k ZXgpOworICAgIH0KKworICAgIGZ1bmN0aW9uIHNjYW5JZGVudGlmaWVyKCkgeworICAgICAgICB2 YXIgc3RhcnQsIGlkLCB0eXBlOworCisgICAgICAgIHN0YXJ0ID0gaW5kZXg7CisKKyAgICAgICAg Ly8gQmFja3NsYXNoIChVKzAwNUMpIHN0YXJ0cyBhbiBlc2NhcGVkIGNoYXJhY3Rlci4KKyAgICAg ICAgaWQgPSAoc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpID09PSAweDVDKSA/IGdldEVzY2FwZWRJ ZGVudGlmaWVyKCkgOiBnZXRJZGVudGlmaWVyKCk7CisKKyAgICAgICAgLy8gVGhlcmUgaXMgbm8g a2V5d29yZCBvciBsaXRlcmFsIHdpdGggb25seSBvbmUgY2hhcmFjdGVyLgorICAgICAgICAvLyBU aHVzLCBpdCBtdXN0IGJlIGFuIGlkZW50aWZpZXIuCisgICAgICAgIGlmIChpZC5sZW5ndGggPT09 IDEpIHsKKyAgICAgICAgICAgIHR5cGUgPSBUb2tlbi5JZGVudGlmaWVyOworICAgICAgICB9IGVs c2UgaWYgKGlzS2V5d29yZChpZCkpIHsKKyAgICAgICAgICAgIHR5cGUgPSBUb2tlbi5LZXl3b3Jk OworICAgICAgICB9IGVsc2UgaWYgKGlkID09PSAnbnVsbCcpIHsKKyAgICAgICAgICAgIHR5cGUg PSBUb2tlbi5OdWxsTGl0ZXJhbDsKKyAgICAgICAgfSBlbHNlIGlmIChpZCA9PT0gJ3RydWUnIHx8 IGlkID09PSAnZmFsc2UnKSB7CisgICAgICAgICAgICB0eXBlID0gVG9rZW4uQm9vbGVhbkxpdGVy YWw7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICB0eXBlID0gVG9rZW4uSWRlbnRpZmll cjsKKyAgICAgICAgfQorCisgICAgICAgIHJldHVybiB7CisgICAgICAgICAgICB0eXBlOiB0eXBl LAorICAgICAgICAgICAgdmFsdWU6IGlkLAorICAgICAgICAgICAgbGluZU51bWJlcjogbGluZU51 bWJlciwKKyAgICAgICAgICAgIGxpbmVTdGFydDogbGluZVN0YXJ0LAorICAgICAgICAgICAgc3Rh cnQ6IHN0YXJ0LAorICAgICAgICAgICAgZW5kOiBpbmRleAorICAgICAgICB9OworICAgIH0KKwor CisgICAgLy8gNy43IFB1bmN0dWF0b3JzCisKKyAgICBmdW5jdGlvbiBzY2FuUHVuY3R1YXRvcigp IHsKKyAgICAgICAgdmFyIHN0YXJ0ID0gaW5kZXgsCisgICAgICAgICAgICBjb2RlID0gc291cmNl LmNoYXJDb2RlQXQoaW5kZXgpLAorICAgICAgICAgICAgY29kZTIsCisgICAgICAgICAgICBjaDEg PSBzb3VyY2VbaW5kZXhdLAorICAgICAgICAgICAgY2gyLAorICAgICAgICAgICAgY2gzLAorICAg ICAgICAgICAgY2g0OworCisgICAgICAgIHN3aXRjaCAoY29kZSkgeworCisgICAgICAgIC8vIENo ZWNrIGZvciBtb3N0IGNvbW1vbiBzaW5nbGUtY2hhcmFjdGVyIHB1bmN0dWF0b3JzLgorICAgICAg ICBjYXNlIDB4MkU6ICAvLyAuIGRvdAorICAgICAgICBjYXNlIDB4Mjg6ICAvLyAoIG9wZW4gYnJh Y2tldAorICAgICAgICBjYXNlIDB4Mjk6ICAvLyApIGNsb3NlIGJyYWNrZXQKKyAgICAgICAgY2Fz ZSAweDNCOiAgLy8gOyBzZW1pY29sb24KKyAgICAgICAgY2FzZSAweDJDOiAgLy8gLCBjb21tYQor ICAgICAgICBjYXNlIDB4N0I6ICAvLyB7IG9wZW4gY3VybHkgYnJhY2UKKyAgICAgICAgY2FzZSAw eDdEOiAgLy8gfSBjbG9zZSBjdXJseSBicmFjZQorICAgICAgICBjYXNlIDB4NUI6ICAvLyBbCisg ICAgICAgIGNhc2UgMHg1RDogIC8vIF0KKyAgICAgICAgY2FzZSAweDNBOiAgLy8gOgorICAgICAg ICBjYXNlIDB4M0Y6ICAvLyA/CisgICAgICAgIGNhc2UgMHg3RTogIC8vIH4KKyAgICAgICAgICAg ICsraW5kZXg7CisgICAgICAgICAgICBpZiAoZXh0cmEudG9rZW5pemUpIHsKKyAgICAgICAgICAg ICAgICBpZiAoY29kZSA9PT0gMHgyOCkgeworICAgICAgICAgICAgICAgICAgICBleHRyYS5vcGVu UGFyZW5Ub2tlbiA9IGV4dHJhLnRva2Vucy5sZW5ndGg7CisgICAgICAgICAgICAgICAgfSBlbHNl IGlmIChjb2RlID09PSAweDdCKSB7CisgICAgICAgICAgICAgICAgICAgIGV4dHJhLm9wZW5DdXJs eVRva2VuID0gZXh0cmEudG9rZW5zLmxlbmd0aDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAg ICAgICB9CisgICAgICAgICAgICByZXR1cm4geworICAgICAgICAgICAgICAgIHR5cGU6IFRva2Vu LlB1bmN0dWF0b3IsCisgICAgICAgICAgICAgICAgdmFsdWU6IFN0cmluZy5mcm9tQ2hhckNvZGUo Y29kZSksCisgICAgICAgICAgICAgICAgbGluZU51bWJlcjogbGluZU51bWJlciwKKyAgICAgICAg ICAgICAgICBsaW5lU3RhcnQ6IGxpbmVTdGFydCwKKyAgICAgICAgICAgICAgICBzdGFydDogc3Rh cnQsCisgICAgICAgICAgICAgICAgZW5kOiBpbmRleAorICAgICAgICAgICAgfTsKKworICAgICAg ICBkZWZhdWx0OgorICAgICAgICAgICAgY29kZTIgPSBzb3VyY2UuY2hhckNvZGVBdChpbmRleCAr IDEpOworCisgICAgICAgICAgICAvLyAnPScgKFUrMDAzRCkgbWFya3MgYW4gYXNzaWdubWVudCBv ciBjb21wYXJpc29uIG9wZXJhdG9yLgorICAgICAgICAgICAgaWYgKGNvZGUyID09PSAweDNEKSB7 CisgICAgICAgICAgICAgICAgc3dpdGNoIChjb2RlKSB7CisgICAgICAgICAgICAgICAgY2FzZSAw eDJCOiAgLy8gKworICAgICAgICAgICAgICAgIGNhc2UgMHgyRDogIC8vIC0KKyAgICAgICAgICAg ICAgICBjYXNlIDB4MkY6ICAvLyAvCisgICAgICAgICAgICAgICAgY2FzZSAweDNDOiAgLy8gPAor ICAgICAgICAgICAgICAgIGNhc2UgMHgzRTogIC8vID4KKyAgICAgICAgICAgICAgICBjYXNlIDB4 NUU6ICAvLyBeCisgICAgICAgICAgICAgICAgY2FzZSAweDdDOiAgLy8gfAorICAgICAgICAgICAg ICAgIGNhc2UgMHgyNTogIC8vICUKKyAgICAgICAgICAgICAgICBjYXNlIDB4MjY6ICAvLyAmCisg ICAgICAgICAgICAgICAgY2FzZSAweDJBOiAgLy8gKgorICAgICAgICAgICAgICAgICAgICBpbmRl eCArPSAyOworICAgICAgICAgICAgICAgICAgICByZXR1cm4geworICAgICAgICAgICAgICAgICAg ICAgICAgdHlwZTogVG9rZW4uUHVuY3R1YXRvciwKKyAgICAgICAgICAgICAgICAgICAgICAgIHZh bHVlOiBTdHJpbmcuZnJvbUNoYXJDb2RlKGNvZGUpICsgU3RyaW5nLmZyb21DaGFyQ29kZShjb2Rl MiksCisgICAgICAgICAgICAgICAgICAgICAgICBsaW5lTnVtYmVyOiBsaW5lTnVtYmVyLAorICAg ICAgICAgICAgICAgICAgICAgICAgbGluZVN0YXJ0OiBsaW5lU3RhcnQsCisgICAgICAgICAgICAg ICAgICAgICAgICBzdGFydDogc3RhcnQsCisgICAgICAgICAgICAgICAgICAgICAgICBlbmQ6IGlu ZGV4CisgICAgICAgICAgICAgICAgICAgIH07CisKKyAgICAgICAgICAgICAgICBjYXNlIDB4MjE6 IC8vICEKKyAgICAgICAgICAgICAgICBjYXNlIDB4M0Q6IC8vID0KKyAgICAgICAgICAgICAgICAg ICAgaW5kZXggKz0gMjsKKworICAgICAgICAgICAgICAgICAgICAvLyAhPT0gYW5kID09PQorICAg ICAgICAgICAgICAgICAgICBpZiAoc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpID09PSAweDNEKSB7 CisgICAgICAgICAgICAgICAgICAgICAgICArK2luZGV4OworICAgICAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgICAgICAgIHJldHVybiB7CisgICAgICAgICAgICAgICAgICAgICAgICB0 eXBlOiBUb2tlbi5QdW5jdHVhdG9yLAorICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWU6IHNv dXJjZS5zbGljZShzdGFydCwgaW5kZXgpLAorICAgICAgICAgICAgICAgICAgICAgICAgbGluZU51 bWJlcjogbGluZU51bWJlciwKKyAgICAgICAgICAgICAgICAgICAgICAgIGxpbmVTdGFydDogbGlu ZVN0YXJ0LAorICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnQ6IHN0YXJ0LAorICAgICAgICAg ICAgICAgICAgICAgICAgZW5kOiBpbmRleAorICAgICAgICAgICAgICAgICAgICB9OworICAgICAg ICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorCisgICAgICAgIC8vIDQtY2hh cmFjdGVyIHB1bmN0dWF0b3I6ID4+Pj0KKworICAgICAgICBjaDQgPSBzb3VyY2Uuc3Vic3RyKGlu ZGV4LCA0KTsKKworICAgICAgICBpZiAoY2g0ID09PSAnPj4+PScpIHsKKyAgICAgICAgICAgIGlu ZGV4ICs9IDQ7CisgICAgICAgICAgICByZXR1cm4geworICAgICAgICAgICAgICAgIHR5cGU6IFRv a2VuLlB1bmN0dWF0b3IsCisgICAgICAgICAgICAgICAgdmFsdWU6IGNoNCwKKyAgICAgICAgICAg ICAgICBsaW5lTnVtYmVyOiBsaW5lTnVtYmVyLAorICAgICAgICAgICAgICAgIGxpbmVTdGFydDog bGluZVN0YXJ0LAorICAgICAgICAgICAgICAgIHN0YXJ0OiBzdGFydCwKKyAgICAgICAgICAgICAg ICBlbmQ6IGluZGV4CisgICAgICAgICAgICB9OworICAgICAgICB9CisKKyAgICAgICAgLy8gMy1j aGFyYWN0ZXIgcHVuY3R1YXRvcnM6ID09PSAhPT0gPj4+IDw8PSA+Pj0KKworICAgICAgICBjaDMg PSBjaDQuc3Vic3RyKDAsIDMpOworCisgICAgICAgIGlmIChjaDMgPT09ICc+Pj4nIHx8IGNoMyA9 PT0gJzw8PScgfHwgY2gzID09PSAnPj49JykgeworICAgICAgICAgICAgaW5kZXggKz0gMzsKKyAg ICAgICAgICAgIHJldHVybiB7CisgICAgICAgICAgICAgICAgdHlwZTogVG9rZW4uUHVuY3R1YXRv ciwKKyAgICAgICAgICAgICAgICB2YWx1ZTogY2gzLAorICAgICAgICAgICAgICAgIGxpbmVOdW1i ZXI6IGxpbmVOdW1iZXIsCisgICAgICAgICAgICAgICAgbGluZVN0YXJ0OiBsaW5lU3RhcnQsCisg ICAgICAgICAgICAgICAgc3RhcnQ6IHN0YXJ0LAorICAgICAgICAgICAgICAgIGVuZDogaW5kZXgK KyAgICAgICAgICAgIH07CisgICAgICAgIH0KKworICAgICAgICAvLyBPdGhlciAyLWNoYXJhY3Rl ciBwdW5jdHVhdG9yczogKysgLS0gPDwgPj4gJiYgfHwKKyAgICAgICAgY2gyID0gY2gzLnN1YnN0 cigwLCAyKTsKKworICAgICAgICBpZiAoKGNoMSA9PT0gY2gyWzFdICYmICgnKy08PiZ8Jy5pbmRl eE9mKGNoMSkgPj0gMCkpIHx8IGNoMiA9PT0gJz0+JykgeworICAgICAgICAgICAgaW5kZXggKz0g MjsKKyAgICAgICAgICAgIHJldHVybiB7CisgICAgICAgICAgICAgICAgdHlwZTogVG9rZW4uUHVu Y3R1YXRvciwKKyAgICAgICAgICAgICAgICB2YWx1ZTogY2gyLAorICAgICAgICAgICAgICAgIGxp bmVOdW1iZXI6IGxpbmVOdW1iZXIsCisgICAgICAgICAgICAgICAgbGluZVN0YXJ0OiBsaW5lU3Rh cnQsCisgICAgICAgICAgICAgICAgc3RhcnQ6IHN0YXJ0LAorICAgICAgICAgICAgICAgIGVuZDog aW5kZXgKKyAgICAgICAgICAgIH07CisgICAgICAgIH0KKworICAgICAgICAvLyAxLWNoYXJhY3Rl ciBwdW5jdHVhdG9yczogPCA+ID0gISArIC0gKiAlICYgfCBeIC8KKyAgICAgICAgaWYgKCc8Pj0h Ky0qJSZ8Xi8nLmluZGV4T2YoY2gxKSA+PSAwKSB7CisgICAgICAgICAgICArK2luZGV4OworICAg ICAgICAgICAgcmV0dXJuIHsKKyAgICAgICAgICAgICAgICB0eXBlOiBUb2tlbi5QdW5jdHVhdG9y LAorICAgICAgICAgICAgICAgIHZhbHVlOiBjaDEsCisgICAgICAgICAgICAgICAgbGluZU51bWJl cjogbGluZU51bWJlciwKKyAgICAgICAgICAgICAgICBsaW5lU3RhcnQ6IGxpbmVTdGFydCwKKyAg ICAgICAgICAgICAgICBzdGFydDogc3RhcnQsCisgICAgICAgICAgICAgICAgZW5kOiBpbmRleAor ICAgICAgICAgICAgfTsKKyAgICAgICAgfQorCisgICAgICAgIHRocm93RXJyb3Ioe30sIE1lc3Nh Z2VzLlVuZXhwZWN0ZWRUb2tlbiwgJ0lMTEVHQUwnKTsKKyAgICB9CisKKyAgICAvLyA3LjguMyBO dW1lcmljIExpdGVyYWxzCisKKyAgICBmdW5jdGlvbiBzY2FuSGV4TGl0ZXJhbChzdGFydCkgewor ICAgICAgICB2YXIgbnVtYmVyID0gJyc7CisKKyAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3Ro KSB7CisgICAgICAgICAgICBpZiAoIWlzSGV4RGlnaXQoc291cmNlW2luZGV4XSkpIHsKKyAgICAg ICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIG51bWJlciArPSBz b3VyY2VbaW5kZXgrK107CisgICAgICAgIH0KKworICAgICAgICBpZiAobnVtYmVyLmxlbmd0aCA9 PT0gMCkgeworICAgICAgICAgICAgdGhyb3dFcnJvcih7fSwgTWVzc2FnZXMuVW5leHBlY3RlZFRv a2VuLCAnSUxMRUdBTCcpOworICAgICAgICB9CisKKyAgICAgICAgaWYgKGlzSWRlbnRpZmllclN0 YXJ0KHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KSkpIHsKKyAgICAgICAgICAgIHRocm93RXJyb3Io e30sIE1lc3NhZ2VzLlVuZXhwZWN0ZWRUb2tlbiwgJ0lMTEVHQUwnKTsKKyAgICAgICAgfQorCisg ICAgICAgIHJldHVybiB7CisgICAgICAgICAgICB0eXBlOiBUb2tlbi5OdW1lcmljTGl0ZXJhbCwK KyAgICAgICAgICAgIHZhbHVlOiBwYXJzZUludCgnMHgnICsgbnVtYmVyLCAxNiksCisgICAgICAg ICAgICBsaW5lTnVtYmVyOiBsaW5lTnVtYmVyLAorICAgICAgICAgICAgbGluZVN0YXJ0OiBsaW5l U3RhcnQsCisgICAgICAgICAgICBzdGFydDogc3RhcnQsCisgICAgICAgICAgICBlbmQ6IGluZGV4 CisgICAgICAgIH07CisgICAgfQorCisgICAgZnVuY3Rpb24gc2Nhbk9jdGFsTGl0ZXJhbChzdGFy dCkgeworICAgICAgICB2YXIgbnVtYmVyID0gJzAnICsgc291cmNlW2luZGV4KytdOworICAgICAg ICB3aGlsZSAoaW5kZXggPCBsZW5ndGgpIHsKKyAgICAgICAgICAgIGlmICghaXNPY3RhbERpZ2l0 KHNvdXJjZVtpbmRleF0pKSB7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICB9 CisgICAgICAgICAgICBudW1iZXIgKz0gc291cmNlW2luZGV4KytdOworICAgICAgICB9CisKKyAg ICAgICAgaWYgKGlzSWRlbnRpZmllclN0YXJ0KHNvdXJjZS5jaGFyQ29kZUF0KGluZGV4KSkgfHwg aXNEZWNpbWFsRGlnaXQoc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpKSkgeworICAgICAgICAgICAg dGhyb3dFcnJvcih7fSwgTWVzc2FnZXMuVW5leHBlY3RlZFRva2VuLCAnSUxMRUdBTCcpOworICAg ICAgICB9CisKKyAgICAgICAgcmV0dXJuIHsKKyAgICAgICAgICAgIHR5cGU6IFRva2VuLk51bWVy aWNMaXRlcmFsLAorICAgICAgICAgICAgdmFsdWU6IHBhcnNlSW50KG51bWJlciwgOCksCisgICAg ICAgICAgICBvY3RhbDogdHJ1ZSwKKyAgICAgICAgICAgIGxpbmVOdW1iZXI6IGxpbmVOdW1iZXIs CisgICAgICAgICAgICBsaW5lU3RhcnQ6IGxpbmVTdGFydCwKKyAgICAgICAgICAgIHN0YXJ0OiBz dGFydCwKKyAgICAgICAgICAgIGVuZDogaW5kZXgKKyAgICAgICAgfTsKKyAgICB9CisKKyAgICBm dW5jdGlvbiBzY2FuTnVtZXJpY0xpdGVyYWwoKSB7CisgICAgICAgIHZhciBudW1iZXIsIHN0YXJ0 LCBjaDsKKworICAgICAgICBjaCA9IHNvdXJjZVtpbmRleF07CisgICAgICAgIGFzc2VydChpc0Rl Y2ltYWxEaWdpdChjaC5jaGFyQ29kZUF0KDApKSB8fCAoY2ggPT09ICcuJyksCisgICAgICAgICAg ICAnTnVtZXJpYyBsaXRlcmFsIG11c3Qgc3RhcnQgd2l0aCBhIGRlY2ltYWwgZGlnaXQgb3IgYSBk ZWNpbWFsIHBvaW50Jyk7CisKKyAgICAgICAgc3RhcnQgPSBpbmRleDsKKyAgICAgICAgbnVtYmVy ID0gJyc7CisgICAgICAgIGlmIChjaCAhPT0gJy4nKSB7CisgICAgICAgICAgICBudW1iZXIgPSBz b3VyY2VbaW5kZXgrK107CisgICAgICAgICAgICBjaCA9IHNvdXJjZVtpbmRleF07CisKKyAgICAg ICAgICAgIC8vIEhleCBudW1iZXIgc3RhcnRzIHdpdGggJzB4Jy4KKyAgICAgICAgICAgIC8vIE9j dGFsIG51bWJlciBzdGFydHMgd2l0aCAnMCcuCisgICAgICAgICAgICBpZiAobnVtYmVyID09PSAn MCcpIHsKKyAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICd4JyB8fCBjaCA9PT0gJ1gnKSB7Cisg ICAgICAgICAgICAgICAgICAgICsraW5kZXg7CisgICAgICAgICAgICAgICAgICAgIHJldHVybiBz Y2FuSGV4TGl0ZXJhbChzdGFydCk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAg IGlmIChpc09jdGFsRGlnaXQoY2gpKSB7CisgICAgICAgICAgICAgICAgICAgIHJldHVybiBzY2Fu T2N0YWxMaXRlcmFsKHN0YXJ0KTsKKyAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAg ICAvLyBkZWNpbWFsIG51bWJlciBzdGFydHMgd2l0aCAnMCcgc3VjaCBhcyAnMDknIGlzIGlsbGVn YWwuCisgICAgICAgICAgICAgICAgaWYgKGNoICYmIGlzRGVjaW1hbERpZ2l0KGNoLmNoYXJDb2Rl QXQoMCkpKSB7CisgICAgICAgICAgICAgICAgICAgIHRocm93RXJyb3Ioe30sIE1lc3NhZ2VzLlVu ZXhwZWN0ZWRUb2tlbiwgJ0lMTEVHQUwnKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAg ICB9CisKKyAgICAgICAgICAgIHdoaWxlIChpc0RlY2ltYWxEaWdpdChzb3VyY2UuY2hhckNvZGVB dChpbmRleCkpKSB7CisgICAgICAgICAgICAgICAgbnVtYmVyICs9IHNvdXJjZVtpbmRleCsrXTsK KyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGNoID0gc291cmNlW2luZGV4XTsKKyAgICAgICAg fQorCisgICAgICAgIGlmIChjaCA9PT0gJy4nKSB7CisgICAgICAgICAgICBudW1iZXIgKz0gc291 cmNlW2luZGV4KytdOworICAgICAgICAgICAgd2hpbGUgKGlzRGVjaW1hbERpZ2l0KHNvdXJjZS5j aGFyQ29kZUF0KGluZGV4KSkpIHsKKyAgICAgICAgICAgICAgICBudW1iZXIgKz0gc291cmNlW2lu ZGV4KytdOworICAgICAgICAgICAgfQorICAgICAgICAgICAgY2ggPSBzb3VyY2VbaW5kZXhdOwor ICAgICAgICB9CisKKyAgICAgICAgaWYgKGNoID09PSAnZScgfHwgY2ggPT09ICdFJykgeworICAg ICAgICAgICAgbnVtYmVyICs9IHNvdXJjZVtpbmRleCsrXTsKKworICAgICAgICAgICAgY2ggPSBz b3VyY2VbaW5kZXhdOworICAgICAgICAgICAgaWYgKGNoID09PSAnKycgfHwgY2ggPT09ICctJykg eworICAgICAgICAgICAgICAgIG51bWJlciArPSBzb3VyY2VbaW5kZXgrK107CisgICAgICAgICAg ICB9CisgICAgICAgICAgICBpZiAoaXNEZWNpbWFsRGlnaXQoc291cmNlLmNoYXJDb2RlQXQoaW5k ZXgpKSkgeworICAgICAgICAgICAgICAgIHdoaWxlIChpc0RlY2ltYWxEaWdpdChzb3VyY2UuY2hh ckNvZGVBdChpbmRleCkpKSB7CisgICAgICAgICAgICAgICAgICAgIG51bWJlciArPSBzb3VyY2Vb aW5kZXgrK107CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAg ICAgICAgICAgICB0aHJvd0Vycm9yKHt9LCBNZXNzYWdlcy5VbmV4cGVjdGVkVG9rZW4sICdJTExF R0FMJyk7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAgICBpZiAoaXNJZGVudGlm aWVyU3RhcnQoc291cmNlLmNoYXJDb2RlQXQoaW5kZXgpKSkgeworICAgICAgICAgICAgdGhyb3dF cnJvcih7fSwgTWVzc2FnZXMuVW5leHBlY3RlZFRva2VuLCAnSUxMRUdBTCcpOworICAgICAgICB9 CisKKyAgICAgICAgcmV0dXJuIHsKKyAgICAgICAgICAgIHR5cGU6IFRva2VuLk51bWVyaWNMaXRl cmFsLAorICAgICAgICAgICAgdmFsdWU6IHBhcnNlRmxvYXQobnVtYmVyKSwKKyAgICAgICAgICAg IGxpbmVOdW1iZXI6IGxpbmVOdW1iZXIsCisgICAgICAgICAgICBsaW5lU3RhcnQ6IGxpbmVTdGFy dCwKKyAgICAgICAgICAgIHN0YXJ0OiBzdGFydCwKKyAgICAgICAgICAgIGVuZDogaW5kZXgKKyAg ICAgICAgfTsKKyAgICB9CisKKyAgICAvLyA3LjguNCBTdHJpbmcgTGl0ZXJhbHMKKworICAgIGZ1 bmN0aW9uIHNjYW5TdHJpbmdMaXRlcmFsKCkgeworICAgICAgICB2YXIgc3RyID0gJycsIHF1b3Rl LCBzdGFydCwgY2gsIGNvZGUsIHVuZXNjYXBlZCwgcmVzdG9yZSwgb2N0YWwgPSBmYWxzZSwgc3Rh cnRMaW5lTnVtYmVyLCBzdGFydExpbmVTdGFydDsKKyAgICAgICAgc3RhcnRMaW5lTnVtYmVyID0g bGluZU51bWJlcjsKKyAgICAgICAgc3RhcnRMaW5lU3RhcnQgPSBsaW5lU3RhcnQ7CisKKyAgICAg ICAgcXVvdGUgPSBzb3VyY2VbaW5kZXhdOworICAgICAgICBhc3NlcnQoKHF1b3RlID09PSAnXCcn IHx8IHF1b3RlID09PSAnIicpLAorICAgICAgICAgICAgJ1N0cmluZyBsaXRlcmFsIG11c3Qgc3Rh cnRzIHdpdGggYSBxdW90ZScpOworCisgICAgICAgIHN0YXJ0ID0gaW5kZXg7CisgICAgICAgICsr aW5kZXg7CisKKyAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7CisgICAgICAgICAgICBj aCA9IHNvdXJjZVtpbmRleCsrXTsKKworICAgICAgICAgICAgaWYgKGNoID09PSBxdW90ZSkgewor ICAgICAgICAgICAgICAgIHF1b3RlID0gJyc7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAg ICAgICAgICB9IGVsc2UgaWYgKGNoID09PSAnXFwnKSB7CisgICAgICAgICAgICAgICAgY2ggPSBz b3VyY2VbaW5kZXgrK107CisgICAgICAgICAgICAgICAgaWYgKCFjaCB8fCAhaXNMaW5lVGVybWlu YXRvcihjaC5jaGFyQ29kZUF0KDApKSkgeworICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGNo KSB7CisgICAgICAgICAgICAgICAgICAgIGNhc2UgJ3UnOgorICAgICAgICAgICAgICAgICAgICBj YXNlICd4JzoKKyAgICAgICAgICAgICAgICAgICAgICAgIHJlc3RvcmUgPSBpbmRleDsKKyAgICAg ICAgICAgICAgICAgICAgICAgIHVuZXNjYXBlZCA9IHNjYW5IZXhFc2NhcGUoY2gpOworICAgICAg ICAgICAgICAgICAgICAgICAgaWYgKHVuZXNjYXBlZCkgeworICAgICAgICAgICAgICAgICAgICAg ICAgICAgIHN0ciArPSB1bmVzY2FwZWQ7CisgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Ug eworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4ID0gcmVzdG9yZTsKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICBzdHIgKz0gY2g7CisgICAgICAgICAgICAgICAgICAgICAgICB9 CisgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAgICAgY2Fz ZSAnbic6CisgICAgICAgICAgICAgICAgICAgICAgICBzdHIgKz0gJ1xuJzsKKyAgICAgICAgICAg ICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgICAgICBjYXNlICdyJzoKKyAgICAg ICAgICAgICAgICAgICAgICAgIHN0ciArPSAnXHInOworICAgICAgICAgICAgICAgICAgICAgICAg YnJlYWs7CisgICAgICAgICAgICAgICAgICAgIGNhc2UgJ3QnOgorICAgICAgICAgICAgICAgICAg ICAgICAgc3RyICs9ICdcdCc7CisgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAg ICAgICAgICAgICAgICAgY2FzZSAnYic6CisgICAgICAgICAgICAgICAgICAgICAgICBzdHIgKz0g J1xiJzsKKyAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgICAg ICBjYXNlICdmJzoKKyAgICAgICAgICAgICAgICAgICAgICAgIHN0ciArPSAnXGYnOworICAgICAg ICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgICAgIGNhc2UgJ3YnOgor ICAgICAgICAgICAgICAgICAgICAgICAgc3RyICs9ICdceDBCJzsKKyAgICAgICAgICAgICAgICAg ICAgICAgIGJyZWFrOworCisgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAg ICAgICAgICAgICAgICBpZiAoaXNPY3RhbERpZ2l0KGNoKSkgeworICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGNvZGUgPSAnMDEyMzQ1NjcnLmluZGV4T2YoY2gpOworCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgLy8gXDAgaXMgbm90IG9jdGFsIGVzY2FwZSBzZXF1ZW5jZQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGlmIChjb2RlICE9PSAwKSB7CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIG9jdGFsID0gdHJ1ZTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICB9CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaW5kZXggPCBsZW5ndGggJiYg aXNPY3RhbERpZ2l0KHNvdXJjZVtpbmRleF0pKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIG9jdGFsID0gdHJ1ZTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29k ZSA9IGNvZGUgKiA4ICsgJzAxMjM0NTY3Jy5pbmRleE9mKHNvdXJjZVtpbmRleCsrXSk7CisKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gMyBkaWdpdHMgYXJlIG9ubHkgYWxsb3dl ZCB3aGVuIHN0cmluZyBzdGFydHMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8g d2l0aCAwLCAxLCAyLCAzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgnMDEy MycuaW5kZXhPZihjaCkgPj0gMCAmJgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGluZGV4IDwgbGVuZ3RoICYmCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgaXNPY3RhbERpZ2l0KHNvdXJjZVtpbmRleF0pKSB7CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBjb2RlID0gY29kZSAqIDggKyAnMDEyMzQ1NjcnLmluZGV4T2Yo c291cmNlW2luZGV4KytdKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBz dHIgKz0gU3RyaW5nLmZyb21DaGFyQ29kZShjb2RlKTsKKyAgICAgICAgICAgICAgICAgICAgICAg IH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyICs9IGNoOworICAgICAg ICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAg ICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAg ICAgICAgICArK2xpbmVOdW1iZXI7CisgICAgICAgICAgICAgICAgICAgIGlmIChjaCA9PT0gICdc cicgJiYgc291cmNlW2luZGV4XSA9PT0gJ1xuJykgeworICAgICAgICAgICAgICAgICAgICAgICAg KytpbmRleDsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBsaW5l U3RhcnQgPSBpbmRleDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9IGVsc2UgaWYg KGlzTGluZVRlcm1pbmF0b3IoY2guY2hhckNvZGVBdCgwKSkpIHsKKyAgICAgICAgICAgICAgICBi cmVhazsKKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgc3RyICs9IGNoOwor ICAgICAgICAgICAgfQorICAgICAgICB9CisKKyAgICAgICAgaWYgKHF1b3RlICE9PSAnJykgewor ICAgICAgICAgICAgdGhyb3dFcnJvcih7fSwgTWVzc2FnZXMuVW5leHBlY3RlZFRva2VuLCAnSUxM RUdBTCcpOworICAgICAgICB9CisKKyAgICAgICAgcmV0dXJuIHsKKyAgICAgICAgICAgIHR5cGU6 IFRva2VuLlN0cmluZ0xpdGVyYWwsCisgICAgICAgICAgICB2YWx1ZTogc3RyLAorICAgICAgICAg ICAgb2N0YWw6IG9jdGFsLAorICAgICAgICAgICAgc3RhcnRMaW5lTnVtYmVyOiBzdGFydExpbmVO dW1iZXIsCisgICAgICAgICAgICBzdGFydExpbmVTdGFydDogc3RhcnRMaW5lU3RhcnQsCisgICAg ICAgICAgICBsaW5lTnVtYmVyOiBsaW5lTnVtYmVyLAorICAgICAgICAgICAgbGluZVN0YXJ0OiBs aW5lU3RhcnQsCisgICAgICAgICAgICBzdGFydDogc3RhcnQsCisgICAgICAgICAgICBlbmQ6IGlu ZGV4CisgICAgICAgIH07CisgICAgfQorCisgICAgZnVuY3Rpb24gdGVzdFJlZ0V4cChwYXR0ZXJu LCBmbGFncykgeworICAgICAgICB2YXIgdmFsdWU7CisgICAgICAgIHRyeSB7CisgICAgICAgICAg ICB2YWx1ZSA9IG5ldyBSZWdFeHAocGF0dGVybiwgZmxhZ3MpOworICAgICAgICB9IGNhdGNoIChl KSB7CisgICAgICAgICAgICB0aHJvd0Vycm9yKHt9LCBNZXNzYWdlcy5JbnZhbGlkUmVnRXhwKTsK KyAgICAgICAgfQorICAgICAgICByZXR1cm4gdmFsdWU7CisgICAgfQorCisgICAgZnVuY3Rpb24g c2NhblJlZ0V4cEJvZHkoKSB7CisgICAgICAgIHZhciBjaCwgc3RyLCBjbGFzc01hcmtlciwgdGVy bWluYXRlZCwgYm9keTsKKworICAgICAgICBjaCA9IHNvdXJjZVtpbmRleF07CisgICAgICAgIGFz c2VydChjaCA9PT0gJy8nLCAnUmVndWxhciBleHByZXNzaW9uIGxpdGVyYWwgbXVzdCBzdGFydCB3 aXRoIGEgc2xhc2gnKTsKKyAgICAgICAgc3RyID0gc291cmNlW2luZGV4KytdOworCisgICAgICAg IGNsYXNzTWFya2VyID0gZmFsc2U7CisgICAgICAgIHRlcm1pbmF0ZWQgPSBmYWxzZTsKKyAgICAg ICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7CisgICAgICAgICAgICBjaCA9IHNvdXJjZVtpbmRl eCsrXTsKKyAgICAgICAgICAgIHN0ciArPSBjaDsKKyAgICAgICAgICAgIGlmIChjaCA9PT0gJ1xc JykgeworICAgICAgICAgICAgICAgIGNoID0gc291cmNlW2luZGV4KytdOworICAgICAgICAgICAg ICAgIC8vIEVDTUEtMjYyIDcuOC41CisgICAgICAgICAgICAgICAgaWYgKGlzTGluZVRlcm1pbmF0 b3IoY2guY2hhckNvZGVBdCgwKSkpIHsKKyAgICAgICAgICAgICAgICAgICAgdGhyb3dFcnJvcih7 fSwgTWVzc2FnZXMuVW50ZXJtaW5hdGVkUmVnRXhwKTsKKyAgICAgICAgICAgICAgICB9CisgICAg ICAgICAgICAgICAgc3RyICs9IGNoOworICAgICAgICAgICAgfSBlbHNlIGlmIChpc0xpbmVUZXJt aW5hdG9yKGNoLmNoYXJDb2RlQXQoMCkpKSB7CisgICAgICAgICAgICAgICAgdGhyb3dFcnJvcih7 fSwgTWVzc2FnZXMuVW50ZXJtaW5hdGVkUmVnRXhwKTsKKyAgICAgICAgICAgIH0gZWxzZSBpZiAo Y2xhc3NNYXJrZXIpIHsKKyAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICddJykgeworICAgICAg ICAgICAgICAgICAgICBjbGFzc01hcmtlciA9IGZhbHNlOworICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgaWYgKGNoID09PSAnLycpIHsKKyAg ICAgICAgICAgICAgICAgICAgdGVybWluYXRlZCA9IHRydWU7CisgICAgICAgICAgICAgICAgICAg IGJyZWFrOworICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY2ggPT09ICdbJykgeworICAgICAg ICAgICAgICAgICAgICBjbGFzc01hcmtlciA9IHRydWU7CisgICAgICAgICAgICAgICAgfQorICAg ICAgICAgICAgfQorICAgICAgICB9CisKKyAgICAgICAgaWYgKCF0ZXJtaW5hdGVkKSB7CisgICAg ICAgICAgICB0aHJvd0Vycm9yKHt9LCBNZXNzYWdlcy5VbnRlcm1pbmF0ZWRSZWdFeHApOworICAg ICAgICB9CisKKyAgICAgICAgLy8gRXhjbHVkZSBsZWFkaW5nIGFuZCB0cmFpbGluZyBzbGFzaC4K KyAgICAgICAgYm9keSA9IHN0ci5zdWJzdHIoMSwgc3RyLmxlbmd0aCAtIDIpOworICAgICAgICBy ZXR1cm4geworICAgICAgICAgICAgdmFsdWU6IGJvZHksCisgICAgICAgICAgICBsaXRlcmFsOiBz dHIKKyAgICAgICAgfTsKKyAgICB9CisKKyAgICBmdW5jdGlvbiBzY2FuUmVnRXhwRmxhZ3MoKSB7 CisgICAgICAgIHZhciBjaCwgc3RyLCBmbGFncywgcmVzdG9yZTsKKworICAgICAgICBzdHIgPSAn JzsKKyAgICAgICAgZmxhZ3MgPSAnJzsKKyAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7 CisgICAgICAgICAgICBjaCA9IHNvdXJjZVtpbmRleF07CisgICAgICAgICAgICBpZiAoIWlzSWRl bnRpZmllclBhcnQoY2guY2hhckNvZGVBdCgwKSkpIHsKKyAgICAgICAgICAgICAgICBicmVhazsK KyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgKytpbmRleDsKKyAgICAgICAgICAgIGlmIChj aCA9PT0gJ1xcJyAmJiBpbmRleCA8IGxlbmd0aCkgeworICAgICAgICAgICAgICAgIGNoID0gc291 cmNlW2luZGV4XTsKKyAgICAgICAgICAgICAgICBpZiAoY2ggPT09ICd1JykgeworICAgICAgICAg ICAgICAgICAgICArK2luZGV4OworICAgICAgICAgICAgICAgICAgICByZXN0b3JlID0gaW5kZXg7 CisgICAgICAgICAgICAgICAgICAgIGNoID0gc2NhbkhleEVzY2FwZSgndScpOworICAgICAgICAg ICAgICAgICAgICBpZiAoY2gpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzICs9IGNo OworICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChzdHIgKz0gJ1xcdSc7IHJlc3RvcmUgPCBp bmRleDsgKytyZXN0b3JlKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyICs9IHNv dXJjZVtyZXN0b3JlXTsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAg ICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4ID0gcmVzdG9yZTsK KyAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdzICs9ICd1JzsKKyAgICAgICAgICAgICAgICAg ICAgICAgIHN0ciArPSAnXFx1JzsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAg ICAgICAgICB0aHJvd0Vycm9yVG9sZXJhbnQoe30sIE1lc3NhZ2VzLlVuZXhwZWN0ZWRUb2tlbiwg J0lMTEVHQUwnKTsKKyAgICAgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgICAg ICBzdHIgKz0gJ1xcJzsKKyAgICAgICAgICAgICAgICAgICAgdGhyb3dFcnJvclRvbGVyYW50KHt9 LCBNZXNzYWdlcy5VbmV4cGVjdGVkVG9rZW4sICdJTExFR0FMJyk7CisgICAgICAgICAgICAgICAg fQorICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICBmbGFncyArPSBjaDsKKyAg ICAgICAgICAgICAgICBzdHIgKz0gY2g7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAg ICAgICByZXR1cm4geworICAgICAgICAgICAgdmFsdWU6IGZsYWdzLAorICAgICAgICAgICAgbGl0 ZXJhbDogc3RyCisgICAgICAgIH07CisgICAgfQorCisgICAgZnVuY3Rpb24gc2NhblJlZ0V4cCgp IHsKKyAgICAgICAgdmFyIHN0YXJ0LCBib2R5LCBmbGFncywgcGF0dGVybiwgdmFsdWU7CisKKyAg ICAgICAgbG9va2FoZWFkID0gbnVsbDsKKyAgICAgICAgc2tpcENvbW1lbnQoKTsKKyAgICAgICAg c3RhcnQgPSBpbmRleDsKKworICAgICAgICBib2R5ID0gc2NhblJlZ0V4cEJvZHkoKTsKKyAgICAg ICAgZmxhZ3MgPSBzY2FuUmVnRXhwRmxhZ3MoKTsKKyAgICAgICAgdmFsdWUgPSB0ZXN0UmVnRXhw KGJvZHkudmFsdWUsIGZsYWdzLnZhbHVlKTsKKworICAgICAgICBpZiAoZXh0cmEudG9rZW5pemUp IHsKKyAgICAgICAgICAgIHJldHVybiB7CisgICAgICAgICAgICAgICAgdHlwZTogVG9rZW4uUmVn dWxhckV4cHJlc3Npb24sCisgICAgICAgICAgICAgICAgdmFsdWU6IHZhbHVlLAorICAgICAgICAg ICAgICAgIGxpbmVOdW1iZXI6IGxpbmVOdW1iZXIsCisgICAgICAgICAgICAgICAgbGluZVN0YXJ0 OiBsaW5lU3RhcnQsCisgICAgICAgICAgICAgICAgc3RhcnQ6IHN0YXJ0LAorICAgICAgICAgICAg ICAgIGVuZDogaW5kZXgKKyAgICAgICAgICAgIH07CisgICAgICAgIH0KKworICAgICAgICByZXR1 cm4geworICAgICAgICAgICAgbGl0ZXJhbDogYm9keS5saXRlcmFsICsgZmxhZ3MubGl0ZXJhbCwK KyAgICAgICAgICAgIHZhbHVlOiB2YWx1ZSwKKyAgICAgICAgICAgIHN0YXJ0OiBzdGFydCwKKyAg ICAgICAgICAgIGVuZDogaW5kZXgKKyAgICAgICAgfTsKKyAgICB9CisKKyAgICBmdW5jdGlvbiBj b2xsZWN0UmVnZXgoKSB7CisgICAgICAgIHZhciBwb3MsIGxvYywgcmVnZXgsIHRva2VuOworCisg ICAgICAgIHNraXBDb21tZW50KCk7CisKKyAgICAgICAgcG9zID0gaW5kZXg7CisgICAgICAgIGxv YyA9IHsKKyAgICAgICAgICAgIHN0YXJ0OiB7CisgICAgICAgICAgICAgICAgbGluZTogbGluZU51 bWJlciwKKyAgICAgICAgICAgICAgICBjb2x1bW46IGluZGV4IC0gbGluZVN0YXJ0CisgICAgICAg ICAgICB9CisgICAgICAgIH07CisKKyAgICAgICAgcmVnZXggPSBzY2FuUmVnRXhwKCk7CisgICAg ICAgIGxvYy5lbmQgPSB7CisgICAgICAgICAgICBsaW5lOiBsaW5lTnVtYmVyLAorICAgICAgICAg ICAgY29sdW1uOiBpbmRleCAtIGxpbmVTdGFydAorICAgICAgICB9OworCisgICAgICAgIC8qIGlz dGFuYnVsIGlnbm9yZSBuZXh0ICovCisgICAgICAgIGlmICghZXh0cmEudG9rZW5pemUpIHsKKyAg ICAgICAgICAgIC8vIFBvcCB0aGUgcHJldmlvdXMgdG9rZW4sIHdoaWNoIGlzIGxpa2VseSAnLycg b3IgJy89JworICAgICAgICAgICAgaWYgKGV4dHJhLnRva2Vucy5sZW5ndGggPiAwKSB7CisgICAg ICAgICAgICAgICAgdG9rZW4gPSBleHRyYS50b2tlbnNbZXh0cmEudG9rZW5zLmxlbmd0aCAtIDFd OworICAgICAgICAgICAgICAgIGlmICh0b2tlbi5yYW5nZVswXSA9PT0gcG9zICYmIHRva2VuLnR5 cGUgPT09ICdQdW5jdHVhdG9yJykgeworICAgICAgICAgICAgICAgICAgICBpZiAodG9rZW4udmFs dWUgPT09ICcvJyB8fCB0b2tlbi52YWx1ZSA9PT0gJy89JykgeworICAgICAgICAgICAgICAgICAg ICAgICAgZXh0cmEudG9rZW5zLnBvcCgpOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAg ICAgICAgICAgfQorICAgICAgICAgICAgfQorCisgICAgICAgICAgICBleHRyYS50b2tlbnMucHVz aCh7CisgICAgICAgICAgICAgICAgdHlwZTogJ1JlZ3VsYXJFeHByZXNzaW9uJywKKyAgICAgICAg ICAgICAgICB2YWx1ZTogcmVnZXgubGl0ZXJhbCwKKyAgICAgICAgICAgICAgICByYW5nZTogW3Bv cywgaW5kZXhdLAorICAgICAgICAgICAgICAgIGxvYzogbG9jCisgICAgICAgICAgICB9KTsKKyAg ICAgICAgfQorCisgICAgICAgIHJldHVybiByZWdleDsKKyAgICB9CisKKyAgICBmdW5jdGlvbiBp c0lkZW50aWZpZXJOYW1lKHRva2VuKSB7CisgICAgICAgIHJldHVybiB0b2tlbi50eXBlID09PSBU b2tlbi5JZGVudGlmaWVyIHx8CisgICAgICAgICAgICB0b2tlbi50eXBlID09PSBUb2tlbi5LZXl3 b3JkIHx8CisgICAgICAgICAgICB0b2tlbi50eXBlID09PSBUb2tlbi5Cb29sZWFuTGl0ZXJhbCB8 fAorICAgICAgICAgICAgdG9rZW4udHlwZSA9PT0gVG9rZW4uTnVsbExpdGVyYWw7CisgICAgfQor CisgICAgZnVuY3Rpb24gYWR2YW5jZVNsYXNoKCkgeworICAgICAgICB2YXIgcHJldlRva2VuLAor ICAgICAgICAgICAgY2hlY2tUb2tlbjsKKyAgICAgICAgLy8gVXNpbmcgdGhlIGZvbGxvd2luZyBh bGdvcml0aG06CisgICAgICAgIC8vIGh0dHBzOi8vZ2l0aHViLmNvbS9tb3ppbGxhL3N3ZWV0Lmpz L3dpa2kvZGVzaWduCisgICAgICAgIHByZXZUb2tlbiA9IGV4dHJhLnRva2Vuc1tleHRyYS50b2tl bnMubGVuZ3RoIC0gMV07CisgICAgICAgIGlmICghcHJldlRva2VuKSB7CisgICAgICAgICAgICAv LyBOb3RoaW5nIGJlZm9yZSB0aGF0OiBpdCBjYW5ub3QgYmUgYSBkaXZpc2lvbi4KKyAgICAgICAg ICAgIHJldHVybiBjb2xsZWN0UmVnZXgoKTsKKyAgICAgICAgfQorICAgICAgICBpZiAocHJldlRv a2VuLnR5cGUgPT09ICdQdW5jdHVhdG9yJykgeworICAgICAgICAgICAgaWYgKHByZXZUb2tlbi52 YWx1ZSA9PT0gJ10nKSB7CisgICAgICAgICAgICAgICAgcmV0dXJuIHNjYW5QdW5jdHVhdG9yKCk7 CisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAocHJldlRva2VuLnZhbHVlID09PSAnKScp IHsKKyAgICAgICAgICAgICAgICBjaGVja1Rva2VuID0gZXh0cmEudG9rZW5zW2V4dHJhLm9wZW5Q YXJlblRva2VuIC0gMV07CisgICAgICAgICAgICAgICAgaWYgKGNoZWNrVG9rZW4gJiYKKyAgICAg ICAgICAgICAgICAgICAgICAgIGNoZWNrVG9rZW4udHlwZSA9PT0gJ0tleXdvcmQnICYmCisgICAg ICAgICAgICAgICAgICAgICAgICAoY2hlY2tUb2tlbi52YWx1ZSA9PT0gJ2lmJyB8fAorICAgICAg ICAgICAgICAgICAgICAgICAgIGNoZWNrVG9rZW4udmFsdWUgPT09ICd3aGlsZScgfHwKKyAgICAg ICAgICAgICAgICAgICAgICAgICBjaGVja1Rva2VuLnZhbHVlID09PSAnZm9yJyB8fAorICAgICAg ICAgICAgICAgICAgICAgICAgIGNoZWNrVG9rZW4udmFsdWUgPT09ICd3aXRoJykpIHsKKyAgICAg ICAgICAgICAgICAgICAgcmV0dXJuIGNvbGxlY3RSZWdleCgpOworICAgICAgICAgICAgICAgIH0K KyAgICAgICAgICAgICAgICByZXR1cm4gc2NhblB1bmN0dWF0b3IoKTsKKyAgICAgICAgICAgIH0K KyAgICAgICAgICAgIGlmIChwcmV2VG9rZW4udmFsdWUgPT09ICd9JykgeworICAgICAgICAgICAg ICAgIC8vIERpdmlkaW5nIGEgZnVuY3Rpb24gYnkgYW55dGhpbmcgbWFrZXMgbGl0dGxlIHNlbnNl LAorICAgICAgICAgICAgICAgIC8vIGJ1dCB3ZSBoYXZlIHRvIGNoZWNrIGZvciB0aGF0LgorICAg ICAgICAgICAgICAgIGlmIChleHRyYS50b2tlbnNbZXh0cmEub3BlbkN1cmx5VG9rZW4gLSAzXSAm JgorICAgICAgICAgICAgICAgICAgICAgICAgZXh0cmEudG9rZW5zW2V4dHJhLm9wZW5DdXJseVRv a2VuIC0gM10udHlwZSA9PT0gJ0tleXdvcmQnKSB7CisgICAgICAgICAgICAgICAgICAgIC8vIEFu b255bW91cyBmdW5jdGlvbi4KKyAgICAgICAgICAgICAgICAgICAgY2hlY2tUb2tlbiA9IGV4dHJh LnRva2Vuc1tleHRyYS5vcGVuQ3VybHlUb2tlbiAtIDRdOworICAgICAgICAgICAgICAgICAgICBp ZiAoIWNoZWNrVG9rZW4pIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzY2FuUHVu Y3R1YXRvcigpOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfSBlbHNl IGlmIChleHRyYS50b2tlbnNbZXh0cmEub3BlbkN1cmx5VG9rZW4gLSA0XSAmJgorICAgICAgICAg ICAgICAgICAgICAgICAgZXh0cmEudG9rZW5zW2V4dHJhLm9wZW5DdXJseVRva2VuIC0gNF0udHlw ZSA9PT0gJ0tleXdvcmQnKSB7CisgICAgICAgICAgICAgICAgICAgIC8vIE5hbWVkIGZ1bmN0aW9u LgorICAgICAgICAgICAgICAgICAgICBjaGVja1Rva2VuID0gZXh0cmEudG9rZW5zW2V4dHJhLm9w ZW5DdXJseVRva2VuIC0gNV07CisgICAgICAgICAgICAgICAgICAgIGlmICghY2hlY2tUb2tlbikg eworICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNvbGxlY3RSZWdleCgpOworICAgICAg ICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAg ICAgICAgcmV0dXJuIHNjYW5QdW5jdHVhdG9yKCk7CisgICAgICAgICAgICAgICAgfQorICAgICAg ICAgICAgICAgIC8vIGNoZWNrVG9rZW4gZGV0ZXJtaW5lcyB3aGV0aGVyIHRoZSBmdW5jdGlvbiBp cworICAgICAgICAgICAgICAgIC8vIGEgZGVjbGFyYXRpb24gb3IgYW4gZXhwcmVzc2lvbi4KKyAg ICAgICAgICAgICAgICBpZiAoRm5FeHByVG9rZW5zLmluZGV4T2YoY2hlY2tUb2tlbi52YWx1ZSkg Pj0gMCkgeworICAgICAgICAgICAgICAgICAgICAvLyBJdCBpcyBhbiBleHByZXNzaW9uLgorICAg ICAgICAgICAgICAgICAgICByZXR1cm4gc2NhblB1bmN0dWF0b3IoKTsKKyAgICAgICAgICAgICAg ICB9CisgICAgICAgICAgICAgICAgLy8gSXQgaXMgYSBkZWNsYXJhdGlvbi4KKyAgICAgICAgICAg ICAgICByZXR1cm4gY29sbGVjdFJlZ2V4KCk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBy ZXR1cm4gY29sbGVjdFJlZ2V4KCk7CisgICAgICAgIH0KKyAgICAgICAgaWYgKHByZXZUb2tlbi50 eXBlID09PSAnS2V5d29yZCcpIHsKKyAgICAgICAgICAgIHJldHVybiBjb2xsZWN0UmVnZXgoKTsK KyAgICAgICAgfQorICAgICAgICByZXR1cm4gc2NhblB1bmN0dWF0b3IoKTsKKyAgICB9CisKKyAg ICBmdW5jdGlvbiBhZHZhbmNlKCkgeworICAgICAgICB2YXIgY2g7CisKKyAgICAgICAgc2tpcENv bW1lbnQoKTsKKworICAgICAgICBpZiAoaW5kZXggPj0gbGVuZ3RoKSB7CisgICAgICAgICAgICBy ZXR1cm4geworICAgICAgICAgICAgICAgIHR5cGU6IFRva2VuLkVPRiwKKyAgICAgICAgICAgICAg ICBsaW5lTnVtYmVyOiBsaW5lTnVtYmVyLAorICAgICAgICAgICAgICAgIGxpbmVTdGFydDogbGlu ZVN0YXJ0LAorICAgICAgICAgICAgICAgIHN0YXJ0OiBpbmRleCwKKyAgICAgICAgICAgICAgICBl bmQ6IGluZGV4CisgICAgICAgICAgICB9OworICAgICAgICB9CisKKyAgICAgICAgY2ggPSBzb3Vy Y2UuY2hhckNvZGVBdChpbmRleCk7CisKKyAgICAgICAgaWYgKGlzSWRlbnRpZmllclN0YXJ0KGNo KSkgeworICAgICAgICAgICAgcmV0dXJuIHNjYW5JZGVudGlmaWVyKCk7CisgICAgICAgIH0KKwor ICAgICAgICAvLyBWZXJ5IGNvbW1vbjogKCBhbmQgKSBhbmQgOworICAgICAgICBpZiAoY2ggPT09 IDB4MjggfHwgY2ggPT09IDB4MjkgfHwgY2ggPT09IDB4M0IpIHsKKyAgICAgICAgICAgIHJldHVy biBzY2FuUHVuY3R1YXRvcigpOworICAgICAgICB9CisKKyAgICAgICAgLy8gU3RyaW5nIGxpdGVy YWwgc3RhcnRzIHdpdGggc2luZ2xlIHF1b3RlIChVKzAwMjcpIG9yIGRvdWJsZSBxdW90ZSAoVSsw MDIyKS4KKyAgICAgICAgaWYgKGNoID09PSAweDI3IHx8IGNoID09PSAweDIyKSB7CisgICAgICAg ICAgICByZXR1cm4gc2NhblN0cmluZ0xpdGVyYWwoKTsKKyAgICAgICAgfQorCisKKyAgICAgICAg Ly8gRG90ICguKSBVKzAwMkUgY2FuIGFsc28gc3RhcnQgYSBmbG9hdGluZy1wb2ludCBudW1iZXIs IGhlbmNlIHRoZSBuZWVkCisgICAgICAgIC8vIHRvIGNoZWNrIHRoZSBuZXh0IGNoYXJhY3Rlci4K KyAgICAgICAgaWYgKGNoID09PSAweDJFKSB7CisgICAgICAgICAgICBpZiAoaXNEZWNpbWFsRGln aXQoc291cmNlLmNoYXJDb2RlQXQoaW5kZXggKyAxKSkpIHsKKyAgICAgICAgICAgICAgICByZXR1 cm4gc2Nhbk51bWVyaWNMaXRlcmFsKCk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICByZXR1 cm4gc2NhblB1bmN0dWF0b3IoKTsKKyAgICAgICAgfQorCisgICAgICAgIGlmIChpc0RlY2ltYWxE aWdpdChjaCkpIHsKKyAgICAgICAgICAgIHJldHVybiBzY2FuTnVtZXJpY0xpdGVyYWwoKTsKKyAg ICAgICAgfQorCisgICAgICAgIC8vIFNsYXNoICgvKSBVKzAwMkYgY2FuIGFsc28gc3RhcnQgYSBy ZWdleC4KKyAgICAgICAgaWYgKGV4dHJhLnRva2VuaXplICYmIGNoID09PSAweDJGKSB7CisgICAg ICAgICAgICByZXR1cm4gYWR2YW5jZVNsYXNoKCk7CisgICAgICAgIH0KKworICAgICAgICByZXR1 cm4gc2NhblB1bmN0dWF0b3IoKTsKKyAgICB9CisKKyAgICBmdW5jdGlvbiBjb2xsZWN0VG9rZW4o KSB7CisgICAgICAgIHZhciBsb2MsIHRva2VuLCByYW5nZSwgdmFsdWU7CisKKyAgICAgICAgc2tp cENvbW1lbnQoKTsKKyAgICAgICAgbG9jID0geworICAgICAgICAgICAgc3RhcnQ6IHsKKyAgICAg ICAgICAgICAgICBsaW5lOiBsaW5lTnVtYmVyLAorICAgICAgICAgICAgICAgIGNvbHVtbjogaW5k ZXggLSBsaW5lU3RhcnQKKyAgICAgICAgICAgIH0KKyAgICAgICAgfTsKKworICAgICAgICB0b2tl biA9IGFkdmFuY2UoKTsKKyAgICAgICAgbG9jLmVuZCA9IHsKKyAgICAgICAgICAgIGxpbmU6IGxp bmVOdW1iZXIsCisgICAgICAgICAgICBjb2x1bW46IGluZGV4IC0gbGluZVN0YXJ0CisgICAgICAg IH07CisKKyAgICAgICAgaWYgKHRva2VuLnR5cGUgIT09IFRva2VuLkVPRikgeworICAgICAgICAg ICAgdmFsdWUgPSBzb3VyY2Uuc2xpY2UodG9rZW4uc3RhcnQsIHRva2VuLmVuZCk7CisgICAgICAg ICAgICBleHRyYS50b2tlbnMucHVzaCh7CisgICAgICAgICAgICAgICAgdHlwZTogVG9rZW5OYW1l W3Rva2VuLnR5cGVdLAorICAgICAgICAgICAgICAgIHZhbHVlOiB2YWx1ZSwKKyAgICAgICAgICAg ICAgICByYW5nZTogW3Rva2VuLnN0YXJ0LCB0b2tlbi5lbmRdLAorICAgICAgICAgICAgICAgIGxv YzogbG9jCisgICAgICAgICAgICB9KTsKKyAgICAgICAgfQorCisgICAgICAgIHJldHVybiB0b2tl bjsKKyAgICB9CisKKyAgICBmdW5jdGlvbiBsZXgoKSB7CisgICAgICAgIHZhciB0b2tlbjsKKwor ICAgICAgICB0b2tlbiA9IGxvb2thaGVhZDsKKyAgICAgICAgaW5kZXggPSB0b2tlbi5lbmQ7Cisg ICAgICAgIGxpbmVOdW1iZXIgPSB0b2tlbi5saW5lTnVtYmVyOworICAgICAgICBsaW5lU3RhcnQg PSB0b2tlbi5saW5lU3RhcnQ7CisKKyAgICAgICAgbG9va2FoZWFkID0gKHR5cGVvZiBleHRyYS50 b2tlbnMgIT09ICd1bmRlZmluZWQnKSA/IGNvbGxlY3RUb2tlbigpIDogYWR2YW5jZSgpOworCisg ICAgICAgIGluZGV4ID0gdG9rZW4uZW5kOworICAgICAgICBsaW5lTnVtYmVyID0gdG9rZW4ubGlu ZU51bWJlcjsKKyAgICAgICAgbGluZVN0YXJ0ID0gdG9rZW4ubGluZVN0YXJ0OworCisgICAgICAg IHJldHVybiB0b2tlbjsKKyAgICB9CisKKyAgICBmdW5jdGlvbiBwZWVrKCkgeworICAgICAgICB2 YXIgcG9zLCBsaW5lLCBzdGFydDsKKworICAgICAgICBwb3MgPSBpbmRleDsKKyAgICAgICAgbGlu ZSA9IGxpbmVOdW1iZXI7CisgICAgICAgIHN0YXJ0ID0gbGluZVN0YXJ0OworICAgICAgICBsb29r YWhlYWQgPSAodHlwZW9mIGV4dHJhLnRva2VucyAhPT0gJ3VuZGVmaW5lZCcpID8gY29sbGVjdFRv a2VuKCkgOiBhZHZhbmNlKCk7CisgICAgICAgIGluZGV4ID0gcG9zOworICAgICAgICBsaW5lTnVt YmVyID0gbGluZTsKKyAgICAgICAgbGluZVN0YXJ0ID0gc3RhcnQ7CisgICAgfQorCisgICAgZnVu Y3Rpb24gUG9zaXRpb24obGluZSwgY29sdW1uKSB7CisgICAgICAgIHRoaXMubGluZSA9IGxpbmU7 CisgICAgICAgIHRoaXMuY29sdW1uID0gY29sdW1uOworICAgIH0KKworICAgIGZ1bmN0aW9uIFNv dXJjZUxvY2F0aW9uKHN0YXJ0TGluZSwgc3RhcnRDb2x1bW4sIGxpbmUsIGNvbHVtbikgeworICAg ICAgICB0aGlzLnN0YXJ0ID0gbmV3IFBvc2l0aW9uKHN0YXJ0TGluZSwgc3RhcnRDb2x1bW4pOwor ICAgICAgICB0aGlzLmVuZCA9IG5ldyBQb3NpdGlvbihsaW5lLCBjb2x1bW4pOworICAgIH0KKwor ICAgIFN5bnRheFRyZWVEZWxlZ2F0ZSA9IHsKKworICAgICAgICBuYW1lOiAnU3ludGF4VHJlZScs CisKKyAgICAgICAgcHJvY2Vzc0NvbW1lbnQ6IGZ1bmN0aW9uIChub2RlKSB7CisgICAgICAgICAg ICB2YXIgbGFzdENoaWxkLCB0cmFpbGluZ0NvbW1lbnRzOworCisgICAgICAgICAgICBpZiAobm9k ZS50eXBlID09PSBTeW50YXguUHJvZ3JhbSkgeworICAgICAgICAgICAgICAgIGlmIChub2RlLmJv ZHkubGVuZ3RoID4gMCkgeworICAgICAgICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgICAg ICAgICAgfQorICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoZXh0cmEudHJhaWxpbmdD b21tZW50cy5sZW5ndGggPiAwKSB7CisgICAgICAgICAgICAgICAgaWYgKGV4dHJhLnRyYWlsaW5n Q29tbWVudHNbMF0ucmFuZ2VbMF0gPj0gbm9kZS5yYW5nZVsxXSkgeworICAgICAgICAgICAgICAg ICAgICB0cmFpbGluZ0NvbW1lbnRzID0gZXh0cmEudHJhaWxpbmdDb21tZW50czsKKyAgICAgICAg ICAgICAgICAgICAgZXh0cmEudHJhaWxpbmdDb21tZW50cyA9IFtdOworICAgICAgICAgICAgICAg IH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIGV4dHJhLnRyYWlsaW5nQ29tbWVudHMubGVu Z3RoID0gMDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAg ICAgICAgICAgIGlmIChleHRyYS5ib3R0b21SaWdodFN0YWNrLmxlbmd0aCA+IDAgJiYKKyAgICAg ICAgICAgICAgICAgICAgICAgIGV4dHJhLmJvdHRvbVJpZ2h0U3RhY2tbZXh0cmEuYm90dG9tUmln aHRTdGFjay5sZW5ndGggLSAxXS50cmFpbGluZ0NvbW1lbnRzICYmCisgICAgICAgICAgICAgICAg ICAgICAgICBleHRyYS5ib3R0b21SaWdodFN0YWNrW2V4dHJhLmJvdHRvbVJpZ2h0U3RhY2subGVu Z3RoIC0gMV0udHJhaWxpbmdDb21tZW50c1swXS5yYW5nZVswXSA+PSBub2RlLnJhbmdlWzFdKSB7 CisgICAgICAgICAgICAgICAgICAgIHRyYWlsaW5nQ29tbWVudHMgPSBleHRyYS5ib3R0b21SaWdo dFN0YWNrW2V4dHJhLmJvdHRvbVJpZ2h0U3RhY2subGVuZ3RoIC0gMV0udHJhaWxpbmdDb21tZW50 czsKKyAgICAgICAgICAgICAgICAgICAgZGVsZXRlIGV4dHJhLmJvdHRvbVJpZ2h0U3RhY2tbZXh0 cmEuYm90dG9tUmlnaHRTdGFjay5sZW5ndGggLSAxXS50cmFpbGluZ0NvbW1lbnRzOworICAgICAg ICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgLy8gRWF0aW5nIHRoZSBz dGFjay4KKyAgICAgICAgICAgIHdoaWxlIChleHRyYS5ib3R0b21SaWdodFN0YWNrLmxlbmd0aCA+ IDAgJiYgZXh0cmEuYm90dG9tUmlnaHRTdGFja1tleHRyYS5ib3R0b21SaWdodFN0YWNrLmxlbmd0 aCAtIDFdLnJhbmdlWzBdID49IG5vZGUucmFuZ2VbMF0pIHsKKyAgICAgICAgICAgICAgICBsYXN0 Q2hpbGQgPSBleHRyYS5ib3R0b21SaWdodFN0YWNrLnBvcCgpOworICAgICAgICAgICAgfQorCisg ICAgICAgICAgICBpZiAobGFzdENoaWxkKSB7CisgICAgICAgICAgICAgICAgaWYgKGxhc3RDaGls ZC5sZWFkaW5nQ29tbWVudHMgJiYgbGFzdENoaWxkLmxlYWRpbmdDb21tZW50c1tsYXN0Q2hpbGQu bGVhZGluZ0NvbW1lbnRzLmxlbmd0aCAtIDFdLnJhbmdlWzFdIDw9IG5vZGUucmFuZ2VbMF0pIHsK KyAgICAgICAgICAgICAgICAgICAgbm9kZS5sZWFkaW5nQ29tbWVudHMgPSBsYXN0Q2hpbGQubGVh ZGluZ0NvbW1lbnRzOworICAgICAgICAgICAgICAgICAgICBkZWxldGUgbGFzdENoaWxkLmxlYWRp bmdDb21tZW50czsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9IGVsc2UgaWYgKGV4 dHJhLmxlYWRpbmdDb21tZW50cy5sZW5ndGggPiAwICYmIGV4dHJhLmxlYWRpbmdDb21tZW50c1tl eHRyYS5sZWFkaW5nQ29tbWVudHMubGVuZ3RoIC0gMV0ucmFuZ2VbMV0gPD0gbm9kZS5yYW5nZVsw XSkgeworICAgICAgICAgICAgICAgIG5vZGUubGVhZGluZ0NvbW1lbnRzID0gZXh0cmEubGVhZGlu Z0NvbW1lbnRzOworICAgICAgICAgICAgICAgIGV4dHJhLmxlYWRpbmdDb21tZW50cyA9IFtdOwor ICAgICAgICAgICAgfQorCisKKyAgICAgICAgICAgIGlmICh0cmFpbGluZ0NvbW1lbnRzKSB7Cisg ICAgICAgICAgICAgICAgbm9kZS50cmFpbGluZ0NvbW1lbnRzID0gdHJhaWxpbmdDb21tZW50czsK KyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgZXh0cmEuYm90dG9tUmlnaHRTdGFjay5wdXNo KG5vZGUpOworICAgICAgICB9LAorCisgICAgICAgIG1hcmtFbmQ6IGZ1bmN0aW9uIChub2RlLCBz dGFydFRva2VuKSB7CisgICAgICAgICAgICBpZiAoZXh0cmEucmFuZ2UpIHsKKyAgICAgICAgICAg ICAgICBub2RlLnJhbmdlID0gW3N0YXJ0VG9rZW4uc3RhcnQsIGluZGV4XTsKKyAgICAgICAgICAg IH0KKyAgICAgICAgICAgIGlmIChleHRyYS5sb2MpIHsKKyAgICAgICAgICAgICAgICBub2RlLmxv YyA9IG5ldyBTb3VyY2VMb2NhdGlvbigKKyAgICAgICAgICAgICAgICAgICAgc3RhcnRUb2tlbi5z dGFydExpbmVOdW1iZXIgPT09IHVuZGVmaW5lZCA/ICBzdGFydFRva2VuLmxpbmVOdW1iZXIgOiBz dGFydFRva2VuLnN0YXJ0TGluZU51bWJlciwKKyAgICAgICAgICAgICAgICAgICAgc3RhcnRUb2tl bi5zdGFydCAtIChzdGFydFRva2VuLnN0YXJ0TGluZVN0YXJ0ID09PSB1bmRlZmluZWQgPyAgc3Rh cnRUb2tlbi5saW5lU3RhcnQgOiBzdGFydFRva2VuLnN0YXJ0TGluZVN0YXJ0KSwKKyAgICAgICAg ICAgICAgICAgICAgbGluZU51bWJlciwKKyAgICAgICAgICAgICAgICAgICAgaW5kZXggLSBsaW5l U3RhcnQKKyAgICAgICAgICAgICAgICApOworICAgICAgICAgICAgICAgIHRoaXMucG9zdFByb2Nl c3Mobm9kZSk7CisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmIChleHRyYS5hdHRhY2hD b21tZW50KSB7CisgICAgICAgICAgICAgICAgdGhpcy5wcm9jZXNzQ29tbWVudChub2RlKTsKKyAg ICAgICAgICAgIH0KKyAgICAgICAgICAgIHJldHVybiBub2RlOworICAgICAgICB9LAorCisgICAg ICAgIHBvc3RQcm9jZXNzOiBmdW5jdGlvbiAobm9kZSkgeworICAgICAgICAgICAgaWYgKGV4dHJh LnNvdXJjZSkgeworICAgICAgICAgICAgICAgIG5vZGUubG9jLnNvdXJjZSA9IGV4dHJhLnNvdXJj ZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHJldHVybiBub2RlOworICAgICAgICB9LAor CisgICAgICAgIGNyZWF0ZUFycmF5RXhwcmVzc2lvbjogZnVuY3Rpb24gKGVsZW1lbnRzKSB7Cisg ICAgICAgICAgICByZXR1cm4geworICAgICAgICAgICAgICAgIHR5cGU6IFN5bnRheC5BcnJheUV4 cHJlc3Npb24sCisgICAgICAgICAgICAgICAgZWxlbWVudHM6IGVsZW1lbnRzCisgICAgICAgICAg ICB9OworICAgICAgICB9LAorCisgICAgICAgIGNyZWF0ZUFzc2lnbm1lbnRFeHByZXNzaW9uOiBm dW5jdGlvbiAob3BlcmF0b3IsIGxlZnQsIHJpZ2h0KSB7CisgICAgICAgICAgICByZXR1cm4gewor ICAgICAgICAgICAgICAgIHR5cGU6IFN5bnRheC5Bc3NpZ25tZW50RXhwcmVzc2lvbiwKKyAgICAg ICAgICAgICAgICBvcGVyYXRvcjogb3BlcmF0b3IsCisgICAgICAgICAgICAgICAgbGVmdDogbGVm dCwKKyAgICAgICAgICAgICAgICByaWdodDogcmlnaHQKKyAgICAgICAgICAgIH07CisgICAgICAg IH0sCisKKyAgICAgICAgY3JlYXRlQmluYXJ5RXhwcmVzc2lvbjogZnVuY3Rpb24gKG9wZXJhdG9y LCBsZWZ0LCByaWdodCkgeworICAgICAgICAgICAgdmFyIHR5cGUgPSAob3BlcmF0b3IgPT09ICd8 fCcgfHwgb3BlcmF0b3IgPT09ICcmJicpID8gU3ludGF4LkxvZ2ljYWxFeHByZXNzaW9uIDoKKyAg ICAgICAgICAgICAgICAgICAgICAgIFN5bnRheC5CaW5hcnlFeHByZXNzaW9uOworICAgICAgICAg ICAgcmV0dXJuIHsKKyAgICAgICAgICAgICAgICB0eXBlOiB0eXBlLAorICAgICAgICAgICAgICAg IG9wZXJhdG9yOiBvcGVyYXRvciwKKyAgICAgICAgICAgICAgICBsZWZ0OiBsZWZ0LAorICAgICAg ICAgICAgICAgIHJpZ2h0OiByaWdodAorICAgICAgICAgICAgfTsKKyAgICAgICAgfSwKKworICAg ICAgICBjcmVhdGVCbG9ja1N0YXRlbWVudDogZnVuY3Rpb24gKGJvZHkpIHsKKyAgICAgICAgICAg IHJldHVybiB7CisgICAgICAgICAgICAgICAgdHlwZTogU3ludGF4LkJsb2NrU3RhdGVtZW50LAor ICAgICAgICAgICAgICAgIGJvZHk6IGJvZHkKKyAgICAgICAgICAgIH07CisgICAgICAgIH0sCisK KyAgICAgICAgY3JlYXRlQnJlYWtTdGF0ZW1lbnQ6IGZ1bmN0aW9uIChsYWJlbCkgeworICAgICAg ICAgICAgcmV0dXJuIHsKKyAgICAgICAgICAgICAgICB0eXBlOiBTeW50YXguQnJlYWtTdGF0ZW1l bnQsCisgICAgICAgICAgICAgICAgbGFiZWw6IGxhYmVsCisgICAgICAgICAgICB9OworICAgICAg ICB9LAorCisgICAgICAgIGNyZWF0ZUNhbGxFeHByZXNzaW9uOiBmdW5jdGlvbiAoY2FsbGVlLCBh cmdzKSB7CisgICAgICAgICAgICByZXR1cm4geworICAgICAgICAgICAgICAgIHR5cGU6IFN5bnRh eC5DYWxsRXhwcmVzc2lvbiwKKyAgICAgICAgICAgICAgICBjYWxsZWU6IGNhbGxlZSwKKyAgICAg ICAgICAgICAgICAnYXJndW1lbnRzJzogYXJncworICAgICAgICAgICAgfTsKKyAgICAgICAgfSwK KworICAgICAgICBjcmVhdGVDYXRjaENsYXVzZTogZnVuY3Rpb24gKHBhcmFtLCBib2R5KSB7Cisg ICAgICAgICAgICByZXR1cm4geworICAgICAgICAgICAgICAgIHR5cGU6IFN5bnRheC5DYXRjaENs YXVzZSwKKyAgICAgICAgICAgICAgICBwYXJhbTogcGFyYW0sCisgICAgICAgICAgICAgICAgYm9k eTogYm9keQorICAgICAgICAgICAgfTsKKyAgICAgICAgfSwKKworICAgICAgICBjcmVhdGVDb25k aXRpb25hbEV4cHJlc3Npb246IGZ1bmN0aW9uICh0ZXN0LCBjb25zZXF1ZW50LCBhbHRlcm5hdGUp IHsKKyAgICAgICAgICAgIHJldHVybiB7CisgICAgICAgICAgICAgICAgdHlwZTogU3ludGF4LkNv bmRpdGlvbmFsRXhwcmVzc2lvbiwKKyAgICAgICAgICAgICAgICB0ZXN0OiB0ZXN0LAorICAgICAg ICAgICAgICAgIGNvbnNlcXVlbnQ6IGNvbnNlcXVlbnQsCisgICAgICAgICAgICAgICAgYWx0ZXJu YXRlOiBhbHRlcm5hdGUKKyAgICAgICAgICAgIH07CisgICAgICAgIH0sCisKKyAgICAgICAgY3Jl YXRlQ29udGludWVTdGF0ZW1lbnQ6IGZ1bmN0aW9uIChsYWJlbCkgeworICAgICAgICAgICAgcmV0 dXJuIHsKKyAgICAgICAgICAgICAgICB0eXBlOiBTeW50YXguQ29udGludWVTdGF0ZW1lbnQsCisg ICAgICAgICAgICAgICAgbGFiZWw6IGxhYmVsCisgICAgICAgICAgICB9OworICAgICAgICB9LAor CisgICAgICAgIGNyZWF0ZURlYnVnZ2VyU3RhdGVtZW50OiBmdW5jdGlvbiAoKSB7CisgICAgICAg ICAgICByZXR1cm4geworICAgICAgICAgICAgICAgIHR5cGU6IFN5bnRheC5EZWJ1Z2dlclN0YXRl bWVudAorICAgICAgICAgICAgfTsKKyAgICAgICAgfSwKKworICAgICAgICBjcmVhdGVEb1doaWxl U3RhdGVtZW50OiBmdW5jdGlvbiAoYm9keSwgdGVzdCkgeworICAgICAgICAgICAgcmV0dXJuIHsK KyAgICAgICAgICAgICAgICB0eXBlOiBTeW50YXguRG9XaGlsZVN0YXRlbWVudCwKKyAgICAgICAg ICAgICAgICBib2R5OiBib2R5LAorICAgICAgICAgICAgICAgIHRlc3Q6IHRlc3QKKyAgICAgICAg ICAgIH07CisgICAgICAgIH0sCisKKyAgICAgICAgY3JlYXRlRW1wdHlTdGF0ZW1lbnQ6IGZ1bmN0 aW9uICgpIHsKKyAgICAgICAgICAgIHJldHVybiB7CisgICAgICAgICAgICAgICAgdHlwZTogU3lu dGF4LkVtcHR5U3RhdGVtZW50CisgICAgICAgICAgICB9OworICAgICAgICB9LAorCisgICAgICAg IGNyZWF0ZUV4cHJlc3Npb25TdGF0ZW1lbnQ6IGZ1bmN0aW9uIChleHByZXNzaW9uKSB7CisgICAg ICAgICAgICByZXR1cm4geworICAgICAgICAgICAgICAgIHR5cGU6IFN5bnRheC5FeHByZXNzaW9u U3RhdGVtZW50LAorICAgICAgICAgICAgICAgIGV4cHJlc3Npb246IGV4cHJlc3Npb24KKyAgICAg ICAgICAgIH07CisgICAgICAgIH0sCisKKyAgICAgICAgY3JlYXRlRm9yU3RhdGVtZW50OiBmdW5j dGlvbiAoaW5pdCwgdGVzdCwgdXBkYXRlLCBib2R5KSB7CisgICAgICAgICAgICByZXR1cm4gewor ICAgICAgICAgICAgICAgIHR5cGU6IFN5bnRheC5Gb3JTdGF0ZW1lbnQsCisgICAgICAgICAgICAg ICAgaW5pdDogaW5pdCwKKyAgICAgICAgICAgICAgICB0ZXN0OiB0ZXN0LAorICAgICAgICAgICAg ICAgIHVwZGF0ZTogdXBkYXRlLAorICAgICAgICAgICAgICAgIGJvZHk6IGJvZHkKKyAgICAgICAg ICAgIH07CisgICAgICAgIH0sCisKKyAgICAgICAgY3JlYXRlRm9ySW5TdGF0ZW1lbnQ6IGZ1bmN0 aW9uIChsZWZ0LCByaWdodCwgYm9keSkgeworICAgICAgICAgICAgcmV0dXJuIHsKKyAgICAgICAg ICAgICAgICB0eXBlOiBTeW50YXguRm9ySW5TdGF0ZW1lbnQsCisgICAgICAgICAgICAgICAgbGVm dDogbGVmdCwKKyAgICAgICAgICAgICAgICByaWdodDogcmlnaHQsCisgICAgICAgICAgICAgICAg Ym9keTogYm9keSwKKyAgICAgICAgICAgICAgICBlYWNoOiBmYWxzZQorICAgICAgICAgICAgfTsK KyAgICAgICAgfSwKKworICAgICAgICBjcmVhdGVGdW5jdGlvbkRlY2xhcmF0aW9uOiBmdW5jdGlv biAoaWQsIHBhcmFtcywgZGVmYXVsdHMsIGJvZHkpIHsKKyAgICAgICAgICAgIHJldHVybiB7Cisg ICAgICAgICAgICAgICAgdHlwZTogU3ludGF4LkZ1bmN0aW9uRGVjbGFyYXRpb24sCisgICAgICAg ICAgICAgICAgaWQ6IGlkLAorICAgICAgICAgICAgICAgIHBhcmFtczogcGFyYW1zLAorICAgICAg ICAgICAgICAgIGRlZmF1bHRzOiBkZWZhdWx0cywKKyAgICAgICAgICAgICAgICBib2R5OiBib2R5 LAorICAgICAgICAgICAgICAgIHJlc3Q6IG51bGwsCisgICAgICAgICAgICAgICAgZ2VuZXJhdG9y OiBmYWxzZSwKKyAgICAgICAgICAgICAgICBleHByZXNzaW9uOiBmYWxzZQorICAgICAgICAgICAg fTsKKyAgICAgICAgfSwKKworICAgICAgICBjcmVhdGVGdW5jdGlvbkV4cHJlc3Npb246IGZ1bmN0 aW9uIChpZCwgcGFyYW1zLCBkZWZhdWx0cywgYm9keSkgeworICAgICAgICAgICAgcmV0dXJuIHsK KyAgICAgICAgICAgICAgICB0eXBlOiBTeW50YXguRnVuY3Rpb25FeHByZXNzaW9uLAorICAgICAg ICAgICAgICAgIGlkOiBpZCwKKyAgICAgICAgICAgICAgICBwYXJhbXM6IHBhcmFtcywKKyAgICAg ICAgICAgICAgICBkZWZhdWx0czogZGVmYXVsdHMsCisgICAgICAgICAgICAgICAgYm9keTogYm9k eSwKKyAgICAgICAgICAgICAgICByZXN0OiBudWxsLAorICAgICAgICAgICAgICAgIGdlbmVyYXRv cjogZmFsc2UsCisgICAgICAgICAgICAgICAgZXhwcmVzc2lvbjogZmFsc2UKKyAgICAgICAgICAg IH07CisgICAgICAgIH0sCisKKyAgICAgICAgY3JlYXRlSWRlbnRpZmllcjogZnVuY3Rpb24gKG5h bWUpIHsKKyAgICAgICAgICAgIHJldHVybiB7CisgICAgICAgICAgICAgICAgdHlwZTogU3ludGF4 LklkZW50aWZpZXIsCisgICAgICAgICAgICAgICAgbmFtZTogbmFtZQorICAgICAgICAgICAgfTsK KyAgICAgICAgfSwKKworICAgICAgICBjcmVhdGVJZlN0YXRlbWVudDogZnVuY3Rpb24gKHRlc3Qs IGNvbnNlcXVlbnQsIGFsdGVybmF0ZSkgeworICAgICAgICAgICAgcmV0dXJuIHsKKyAgICAgICAg ICAgICAgICB0eXBlOiBTeW50YXguSWZTdGF0ZW1lbnQsCisgICAgICAgICAgICAgICAgdGVzdDog dGVzdCwKKyAgICAgICAgICAgICAgICBjb25zZXF1ZW50OiBjb25zZXF1ZW50LAorICAgICAgICAg ICAgICAgIGFsdGVybmF0ZTogYWx0ZXJuYXRlCisgICAgICAgICAgICB9OworICAgICAgICB9LAor CisgICAgICAgIGNyZWF0ZUxhYmVsZWRTdGF0ZW1lbnQ6IGZ1bmN0aW9uIChsYWJlbCwgYm9keSkg eworICAgICAgICAgICAgcmV0dXJuIHsKKyAgICAgICAgICAgICAgICB0eXBlOiBTeW50YXguTGFi ZWxlZFN0YXRlbWVudCwKKyAgICAgICAgICAgICAgICBsYWJlbDogbGFiZWwsCisgICAgICAgICAg ICAgICAgYm9keTogYm9keQorICAgICAgICAgICAgfTsKKyAgICAgICAgfSwKKworICAgICAgICBj cmVhdGVMaXRlcmFsOiBmdW5jdGlvbiAodG9rZW4pIHsKKyAgICAgICAgICAgIHJldHVybiB7Cisg ICAgICAgICAgICAgICAgdHlwZTogU3ludGF4LkxpdGVyYWwsCisgICAgICAgICAgICAgICAgdmFs dWU6IHRva2VuLnZhbHVlLAorICAgICAgICAgICAgICAgIHJhdzogc291cmNlLnNsaWNlKHRva2Vu LnN0YXJ0LCB0b2tlbi5lbmQpCisgICAgICAgICAgICB9OworICAgICAgICB9LAorCisgICAgICAg IGNyZWF0ZU1lbWJlckV4cHJlc3Npb246IGZ1bmN0aW9uIChhY2Nlc3Nvciwgb2JqZWN0LCBwcm9w ZXJ0eSkgeworICAgICAgICAgICAgcmV0dXJuIHsKKyAgICAgICAgICAgICAgICB0eXBlOiBTeW50 YXguTWVtYmVyRXhwcmVzc2lvbiwKKyAgICAgICAgICAgICAgICBjb21wdXRlZDogYWNjZXNzb3Ig PT09ICdbJywKKyAgICAgICAgICAgICAgICBvYmplY3Q6IG9iamVjdCwKKyAgICAgICAgICAgICAg ICBwcm9wZXJ0eTogcHJvcGVydHkKKyAgICAgICAgICAgIH07CisgICAgICAgIH0sCisKKyAgICAg ICAgY3JlYXRlTmV3RXhwcmVzc2lvbjogZnVuY3Rpb24gKGNhbGxlZSwgYXJncykgeworICAgICAg ICAgICAgcmV0dXJuIHsKKyAgICAgICAgICAgICAgICB0eXBlOiBTeW50YXguTmV3RXhwcmVzc2lv biwKKyAgICAgICAgICAgICAgICBjYWxsZWU6IGNhbGxlZSwKKyAgICAgICAgICAgICAgICAnYXJn dW1lbnRzJzogYXJncworICAgICAgICAgICAgfTsKKyAgICAgICAgfSwKKworICAgICAgICBjcmVh dGVPYmplY3RFeHByZXNzaW9uOiBmdW5jdGlvbiAocHJvcGVydGllcykgeworICAgICAgICAgICAg cmV0dXJuIHsKKyAgICAgICAgICAgICAgICB0eXBlOiBTeW50YXguT2JqZWN0RXhwcmVzc2lvbiwK KyAgICAgICAgICAgICAgICBwcm9wZXJ0aWVzOiBwcm9wZXJ0aWVzCisgICAgICAgICAgICB9Owor ICAgICAgICB9LAorCisgICAgICAgIGNyZWF0ZVBvc3RmaXhFeHByZXNzaW9uOiBmdW5jdGlvbiAo b3BlcmF0b3IsIGFyZ3VtZW50KSB7CisgICAgICAgICAgICByZXR1cm4geworICAgICAgICAgICAg ICAgIHR5cGU6IFN5bnRheC5VcGRhdGVFeHByZXNzaW9uLAorICAgICAgICAgICAgICAgIG9wZXJh dG9yOiBvcGVyYXRvciwKKyAgICAgICAgICAgICAgICBhcmd1bWVudDogYXJndW1lbnQsCisgICAg ICAgICAgICAgICAgcHJlZml4OiBmYWxzZQorICAgICAgICAgICAgfTsKKyAgICAgICAgfSwKKwor ICAgICAgICBjcmVhdGVQcm9ncmFtOiBmdW5jdGlvbiAoYm9keSkgeworICAgICAgICAgICAgcmV0 dXJuIHsKKyAgICAgICAgICAgICAgICB0eXBlOiBTeW50YXguUHJvZ3JhbSwKKyAgICAgICAgICAg ICAgICBib2R5OiBib2R5CisgICAgICAgICAgICB9OworICAgICAgICB9LAorCisgICAgICAgIGNy ZWF0ZVByb3BlcnR5OiBmdW5jdGlvbiAoa2luZCwga2V5LCB2YWx1ZSkgeworICAgICAgICAgICAg cmV0dXJuIHsKKyAgICAgICAgICAgICAgICB0eXBlOiBTeW50YXguUHJvcGVydHksCisgICAgICAg ICAgICAgICAga2V5OiBrZXksCisgICAgICAgICAgICAgICAgdmFsdWU6IHZhbHVlLAorICAgICAg ICAgICAgICAgIGtpbmQ6IGtpbmQKKyAgICAgICAgICAgIH07CisgICAgICAgIH0sCisKKyAgICAg ICAgY3JlYXRlUmV0dXJuU3RhdGVtZW50OiBmdW5jdGlvbiAoYXJndW1lbnQpIHsKKyAgICAgICAg ICAgIHJldHVybiB7CisgICAgICAgICAgICAgICAgdHlwZTogU3ludGF4LlJldHVyblN0YXRlbWVu dCwKKyAgICAgICAgICAgICAgICBhcmd1bWVudDogYXJndW1lbnQKKyAgICAgICAgICAgIH07Cisg ICAgICAgIH0sCisKKyAgICAgICAgY3JlYXRlU2VxdWVuY2VFeHByZXNzaW9uOiBmdW5jdGlvbiAo ZXhwcmVzc2lvbnMpIHsKKyAgICAgICAgICAgIHJldHVybiB7CisgICAgICAgICAgICAgICAgdHlw ZTogU3ludGF4LlNlcXVlbmNlRXhwcmVzc2lvbiwKKyAgICAgICAgICAgICAgICBleHByZXNzaW9u czogZXhwcmVzc2lvbnMKKyAgICAgICAgICAgIH07CisgICAgICAgIH0sCisKKyAgICAgICAgY3Jl YXRlU3dpdGNoQ2FzZTogZnVuY3Rpb24gKHRlc3QsIGNvbnNlcXVlbnQpIHsKKyAgICAgICAgICAg IHJldHVybiB7CisgICAgICAgICAgICAgICAgdHlwZTogU3ludGF4LlN3aXRjaENhc2UsCisgICAg ICAgICAgICAgICAgdGVzdDogdGVzdCwKKyAgICAgICAgICAgICAgICBjb25zZXF1ZW50OiBjb25z ZXF1ZW50CisgICAgICAgICAgICB9OworICAgICAgICB9LAorCisgICAgICAgIGNyZWF0ZVN3aXRj aFN0YXRlbWVudDogZnVuY3Rpb24gKGRpc2NyaW1pbmFudCwgY2FzZXMpIHsKKyAgICAgICAgICAg IHJldHVybiB7CisgICAgICAgICAgICAgICAgdHlwZTogU3ludGF4LlN3aXRjaFN0YXRlbWVudCwK KyAgICAgICAgICAgICAgICBkaXNjcmltaW5hbnQ6IGRpc2NyaW1pbmFudCwKKyAgICAgICAgICAg ICAgICBjYXNlczogY2FzZXMKKyAgICAgICAgICAgIH07CisgICAgICAgIH0sCisKKyAgICAgICAg Y3JlYXRlVGhpc0V4cHJlc3Npb246IGZ1bmN0aW9uICgpIHsKKyAgICAgICAgICAgIHJldHVybiB7 CisgICAgICAgICAgICAgICAgdHlwZTogU3ludGF4LlRoaXNFeHByZXNzaW9uCisgICAgICAgICAg ICB9OworICAgICAgICB9LAorCisgICAgICAgIGNyZWF0ZVRocm93U3RhdGVtZW50OiBmdW5jdGlv biAoYXJndW1lbnQpIHsKKyAgICAgICAgICAgIHJldHVybiB7CisgICAgICAgICAgICAgICAgdHlw ZTogU3ludGF4LlRocm93U3RhdGVtZW50LAorICAgICAgICAgICAgICAgIGFyZ3VtZW50OiBhcmd1 bWVudAorICAgICAgICAgICAgfTsKKyAgICAgICAgfSwKKworICAgICAgICBjcmVhdGVUcnlTdGF0 ZW1lbnQ6IGZ1bmN0aW9uIChibG9jaywgZ3VhcmRlZEhhbmRsZXJzLCBoYW5kbGVycywgZmluYWxp emVyKSB7CisgICAgICAgICAgICByZXR1cm4geworICAgICAgICAgICAgICAgIHR5cGU6IFN5bnRh eC5UcnlTdGF0ZW1lbnQsCisgICAgICAgICAgICAgICAgYmxvY2s6IGJsb2NrLAorICAgICAgICAg ICAgICAgIGd1YXJkZWRIYW5kbGVyczogZ3VhcmRlZEhhbmRsZXJzLAorICAgICAgICAgICAgICAg IGhhbmRsZXJzOiBoYW5kbGVycywKKyAgICAgICAgICAgICAgICBmaW5hbGl6ZXI6IGZpbmFsaXpl cgorICAgICAgICAgICAgfTsKKyAgICAgICAgfSwKKworICAgICAgICBjcmVhdGVVbmFyeUV4cHJl c3Npb246IGZ1bmN0aW9uIChvcGVyYXRvciwgYXJndW1lbnQpIHsKKyAgICAgICAgICAgIGlmIChv cGVyYXRvciA9PT0gJysrJyB8fCBvcGVyYXRvciA9PT0gJy0tJykgeworICAgICAgICAgICAgICAg IHJldHVybiB7CisgICAgICAgICAgICAgICAgICAgIHR5cGU6IFN5bnRheC5VcGRhdGVFeHByZXNz aW9uLAorICAgICAgICAgICAgICAgICAgICBvcGVyYXRvcjogb3BlcmF0b3IsCisgICAgICAgICAg ICAgICAgICAgIGFyZ3VtZW50OiBhcmd1bWVudCwKKyAgICAgICAgICAgICAgICAgICAgcHJlZml4 OiB0cnVlCisgICAgICAgICAgICAgICAgfTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHJl dHVybiB7CisgICAgICAgICAgICAgICAgdHlwZTogU3ludGF4LlVuYXJ5RXhwcmVzc2lvbiwKKyAg ICAgICAgICAgICAgICBvcGVyYXRvcjogb3BlcmF0b3IsCisgICAgICAgICAgICAgICAgYXJndW1l bnQ6IGFyZ3VtZW50LAorICAgICAgICAgICAgICAgIHByZWZpeDogdHJ1ZQorICAgICAgICAgICAg fTsKKyAgICAgICAgfSwKKworICAgICAgICBjcmVhdGVWYXJpYWJsZURlY2xhcmF0aW9uOiBmdW5j dGlvbiAoZGVjbGFyYXRpb25zLCBraW5kKSB7CisgICAgICAgICAgICByZXR1cm4geworICAgICAg ICAgICAgICAgIHR5cGU6IFN5bnRheC5WYXJpYWJsZURlY2xhcmF0aW9uLAorICAgICAgICAgICAg ICAgIGRlY2xhcmF0aW9uczogZGVjbGFyYXRpb25zLAorICAgICAgICAgICAgICAgIGtpbmQ6IGtp bmQKKyAgICAgICAgICAgIH07CisgICAgICAgIH0sCisKKyAgICAgICAgY3JlYXRlVmFyaWFibGVE ZWNsYXJhdG9yOiBmdW5jdGlvbiAoaWQsIGluaXQpIHsKKyAgICAgICAgICAgIHJldHVybiB7Cisg ICAgICAgICAgICAgICAgdHlwZTogU3ludGF4LlZhcmlhYmxlRGVjbGFyYXRvciwKKyAgICAgICAg ICAgICAgICBpZDogaWQsCisgICAgICAgICAgICAgICAgaW5pdDogaW5pdAorICAgICAgICAgICAg fTsKKyAgICAgICAgfSwKKworICAgICAgICBjcmVhdGVXaGlsZVN0YXRlbWVudDogZnVuY3Rpb24g KHRlc3QsIGJvZHkpIHsKKyAgICAgICAgICAgIHJldHVybiB7CisgICAgICAgICAgICAgICAgdHlw ZTogU3ludGF4LldoaWxlU3RhdGVtZW50LAorICAgICAgICAgICAgICAgIHRlc3Q6IHRlc3QsCisg ICAgICAgICAgICAgICAgYm9keTogYm9keQorICAgICAgICAgICAgfTsKKyAgICAgICAgfSwKKwor ICAgICAgICBjcmVhdGVXaXRoU3RhdGVtZW50OiBmdW5jdGlvbiAob2JqZWN0LCBib2R5KSB7Cisg ICAgICAgICAgICByZXR1cm4geworICAgICAgICAgICAgICAgIHR5cGU6IFN5bnRheC5XaXRoU3Rh dGVtZW50LAorICAgICAgICAgICAgICAgIG9iamVjdDogb2JqZWN0LAorICAgICAgICAgICAgICAg IGJvZHk6IGJvZHkKKyAgICAgICAgICAgIH07CisgICAgICAgIH0KKyAgICB9OworCisgICAgLy8g UmV0dXJuIHRydWUgaWYgdGhlcmUgaXMgYSBsaW5lIHRlcm1pbmF0b3IgYmVmb3JlIHRoZSBuZXh0 IHRva2VuLgorCisgICAgZnVuY3Rpb24gcGVla0xpbmVUZXJtaW5hdG9yKCkgeworICAgICAgICB2 YXIgcG9zLCBsaW5lLCBzdGFydCwgZm91bmQ7CisKKyAgICAgICAgcG9zID0gaW5kZXg7CisgICAg ICAgIGxpbmUgPSBsaW5lTnVtYmVyOworICAgICAgICBzdGFydCA9IGxpbmVTdGFydDsKKyAgICAg ICAgc2tpcENvbW1lbnQoKTsKKyAgICAgICAgZm91bmQgPSBsaW5lTnVtYmVyICE9PSBsaW5lOwor ICAgICAgICBpbmRleCA9IHBvczsKKyAgICAgICAgbGluZU51bWJlciA9IGxpbmU7CisgICAgICAg IGxpbmVTdGFydCA9IHN0YXJ0OworCisgICAgICAgIHJldHVybiBmb3VuZDsKKyAgICB9CisKKyAg ICAvLyBUaHJvdyBhbiBleGNlcHRpb24KKworICAgIGZ1bmN0aW9uIHRocm93RXJyb3IodG9rZW4s IG1lc3NhZ2VGb3JtYXQpIHsKKyAgICAgICAgdmFyIGVycm9yLAorICAgICAgICAgICAgYXJncyA9 IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGFyZ3VtZW50cywgMiksCisgICAgICAgICAgICBt c2cgPSBtZXNzYWdlRm9ybWF0LnJlcGxhY2UoCisgICAgICAgICAgICAgICAgLyUoXGQpL2csCisg ICAgICAgICAgICAgICAgZnVuY3Rpb24gKHdob2xlLCBpbmRleCkgeworICAgICAgICAgICAgICAg ICAgICBhc3NlcnQoaW5kZXggPCBhcmdzLmxlbmd0aCwgJ01lc3NhZ2UgcmVmZXJlbmNlIG11c3Qg YmUgaW4gcmFuZ2UnKTsKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFyZ3NbaW5kZXhdOwor ICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICk7CisKKyAgICAgICAgaWYgKHR5cGVvZiB0 b2tlbi5saW5lTnVtYmVyID09PSAnbnVtYmVyJykgeworICAgICAgICAgICAgZXJyb3IgPSBuZXcg RXJyb3IoJ0xpbmUgJyArIHRva2VuLmxpbmVOdW1iZXIgKyAnOiAnICsgbXNnKTsKKyAgICAgICAg ICAgIGVycm9yLmluZGV4ID0gdG9rZW4uc3RhcnQ7CisgICAgICAgICAgICBlcnJvci5saW5lTnVt YmVyID0gdG9rZW4ubGluZU51bWJlcjsKKyAgICAgICAgICAgIGVycm9yLmNvbHVtbiA9IHRva2Vu LnN0YXJ0IC0gbGluZVN0YXJ0ICsgMTsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIGVy cm9yID0gbmV3IEVycm9yKCdMaW5lICcgKyBsaW5lTnVtYmVyICsgJzogJyArIG1zZyk7CisgICAg ICAgICAgICBlcnJvci5pbmRleCA9IGluZGV4OworICAgICAgICAgICAgZXJyb3IubGluZU51bWJl ciA9IGxpbmVOdW1iZXI7CisgICAgICAgICAgICBlcnJvci5jb2x1bW4gPSBpbmRleCAtIGxpbmVT dGFydCArIDE7CisgICAgICAgIH0KKworICAgICAgICBlcnJvci5kZXNjcmlwdGlvbiA9IG1zZzsK KyAgICAgICAgdGhyb3cgZXJyb3I7CisgICAgfQorCisgICAgZnVuY3Rpb24gdGhyb3dFcnJvclRv bGVyYW50KCkgeworICAgICAgICB0cnkgeworICAgICAgICAgICAgdGhyb3dFcnJvci5hcHBseShu dWxsLCBhcmd1bWVudHMpOworICAgICAgICB9IGNhdGNoIChlKSB7CisgICAgICAgICAgICBpZiAo ZXh0cmEuZXJyb3JzKSB7CisgICAgICAgICAgICAgICAgZXh0cmEuZXJyb3JzLnB1c2goZSk7Cisg ICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIHRocm93IGU7CisgICAgICAgICAg ICB9CisgICAgICAgIH0KKyAgICB9CisKKworICAgIC8vIFRocm93IGFuIGV4Y2VwdGlvbiBiZWNh dXNlIG9mIHRoZSB0b2tlbi4KKworICAgIGZ1bmN0aW9uIHRocm93VW5leHBlY3RlZCh0b2tlbikg eworICAgICAgICBpZiAodG9rZW4udHlwZSA9PT0gVG9rZW4uRU9GKSB7CisgICAgICAgICAgICB0 aHJvd0Vycm9yKHRva2VuLCBNZXNzYWdlcy5VbmV4cGVjdGVkRU9TKTsKKyAgICAgICAgfQorCisg ICAgICAgIGlmICh0b2tlbi50eXBlID09PSBUb2tlbi5OdW1lcmljTGl0ZXJhbCkgeworICAgICAg ICAgICAgdGhyb3dFcnJvcih0b2tlbiwgTWVzc2FnZXMuVW5leHBlY3RlZE51bWJlcik7CisgICAg ICAgIH0KKworICAgICAgICBpZiAodG9rZW4udHlwZSA9PT0gVG9rZW4uU3RyaW5nTGl0ZXJhbCkg eworICAgICAgICAgICAgdGhyb3dFcnJvcih0b2tlbiwgTWVzc2FnZXMuVW5leHBlY3RlZFN0cmlu Zyk7CisgICAgICAgIH0KKworICAgICAgICBpZiAodG9rZW4udHlwZSA9PT0gVG9rZW4uSWRlbnRp ZmllcikgeworICAgICAgICAgICAgdGhyb3dFcnJvcih0b2tlbiwgTWVzc2FnZXMuVW5leHBlY3Rl ZElkZW50aWZpZXIpOworICAgICAgICB9CisKKyAgICAgICAgaWYgKHRva2VuLnR5cGUgPT09IFRv a2VuLktleXdvcmQpIHsKKyAgICAgICAgICAgIGlmIChpc0Z1dHVyZVJlc2VydmVkV29yZCh0b2tl bi52YWx1ZSkpIHsKKyAgICAgICAgICAgICAgICB0aHJvd0Vycm9yKHRva2VuLCBNZXNzYWdlcy5V bmV4cGVjdGVkUmVzZXJ2ZWQpOworICAgICAgICAgICAgfSBlbHNlIGlmIChzdHJpY3QgJiYgaXNT dHJpY3RNb2RlUmVzZXJ2ZWRXb3JkKHRva2VuLnZhbHVlKSkgeworICAgICAgICAgICAgICAgIHRo cm93RXJyb3JUb2xlcmFudCh0b2tlbiwgTWVzc2FnZXMuU3RyaWN0UmVzZXJ2ZWRXb3JkKTsKKyAg ICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgICAgICB9CisgICAgICAgICAgICB0aHJvd0Vy cm9yKHRva2VuLCBNZXNzYWdlcy5VbmV4cGVjdGVkVG9rZW4sIHRva2VuLnZhbHVlKTsKKyAgICAg ICAgfQorCisgICAgICAgIC8vIEJvb2xlYW5MaXRlcmFsLCBOdWxsTGl0ZXJhbCwgb3IgUHVuY3R1 YXRvci4KKyAgICAgICAgdGhyb3dFcnJvcih0b2tlbiwgTWVzc2FnZXMuVW5leHBlY3RlZFRva2Vu LCB0b2tlbi52YWx1ZSk7CisgICAgfQorCisgICAgLy8gRXhwZWN0IHRoZSBuZXh0IHRva2VuIHRv IG1hdGNoIHRoZSBzcGVjaWZpZWQgcHVuY3R1YXRvci4KKyAgICAvLyBJZiBub3QsIGFuIGV4Y2Vw dGlvbiB3aWxsIGJlIHRocm93bi4KKworICAgIGZ1bmN0aW9uIGV4cGVjdCh2YWx1ZSkgeworICAg ICAgICB2YXIgdG9rZW4gPSBsZXgoKTsKKyAgICAgICAgaWYgKHRva2VuLnR5cGUgIT09IFRva2Vu LlB1bmN0dWF0b3IgfHwgdG9rZW4udmFsdWUgIT09IHZhbHVlKSB7CisgICAgICAgICAgICB0aHJv d1VuZXhwZWN0ZWQodG9rZW4pOworICAgICAgICB9CisgICAgfQorCisgICAgLy8gRXhwZWN0IHRo ZSBuZXh0IHRva2VuIHRvIG1hdGNoIHRoZSBzcGVjaWZpZWQga2V5d29yZC4KKyAgICAvLyBJZiBu b3QsIGFuIGV4Y2VwdGlvbiB3aWxsIGJlIHRocm93bi4KKworICAgIGZ1bmN0aW9uIGV4cGVjdEtl eXdvcmQoa2V5d29yZCkgeworICAgICAgICB2YXIgdG9rZW4gPSBsZXgoKTsKKyAgICAgICAgaWYg KHRva2VuLnR5cGUgIT09IFRva2VuLktleXdvcmQgfHwgdG9rZW4udmFsdWUgIT09IGtleXdvcmQp IHsKKyAgICAgICAgICAgIHRocm93VW5leHBlY3RlZCh0b2tlbik7CisgICAgICAgIH0KKyAgICB9 CisKKyAgICAvLyBSZXR1cm4gdHJ1ZSBpZiB0aGUgbmV4dCB0b2tlbiBtYXRjaGVzIHRoZSBzcGVj aWZpZWQgcHVuY3R1YXRvci4KKworICAgIGZ1bmN0aW9uIG1hdGNoKHZhbHVlKSB7CisgICAgICAg IHJldHVybiBsb29rYWhlYWQudHlwZSA9PT0gVG9rZW4uUHVuY3R1YXRvciAmJiBsb29rYWhlYWQu dmFsdWUgPT09IHZhbHVlOworICAgIH0KKworICAgIC8vIFJldHVybiB0cnVlIGlmIHRoZSBuZXh0 IHRva2VuIG1hdGNoZXMgdGhlIHNwZWNpZmllZCBrZXl3b3JkCisKKyAgICBmdW5jdGlvbiBtYXRj aEtleXdvcmQoa2V5d29yZCkgeworICAgICAgICByZXR1cm4gbG9va2FoZWFkLnR5cGUgPT09IFRv a2VuLktleXdvcmQgJiYgbG9va2FoZWFkLnZhbHVlID09PSBrZXl3b3JkOworICAgIH0KKworICAg IC8vIFJldHVybiB0cnVlIGlmIHRoZSBuZXh0IHRva2VuIGlzIGFuIGFzc2lnbm1lbnQgb3BlcmF0 b3IKKworICAgIGZ1bmN0aW9uIG1hdGNoQXNzaWduKCkgeworICAgICAgICB2YXIgb3A7CisKKyAg ICAgICAgaWYgKGxvb2thaGVhZC50eXBlICE9PSBUb2tlbi5QdW5jdHVhdG9yKSB7CisgICAgICAg ICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgIH0KKyAgICAgICAgb3AgPSBsb29rYWhlYWQudmFs dWU7CisgICAgICAgIHJldHVybiBvcCA9PT0gJz0nIHx8CisgICAgICAgICAgICBvcCA9PT0gJyo9 JyB8fAorICAgICAgICAgICAgb3AgPT09ICcvPScgfHwKKyAgICAgICAgICAgIG9wID09PSAnJT0n IHx8CisgICAgICAgICAgICBvcCA9PT0gJys9JyB8fAorICAgICAgICAgICAgb3AgPT09ICctPScg fHwKKyAgICAgICAgICAgIG9wID09PSAnPDw9JyB8fAorICAgICAgICAgICAgb3AgPT09ICc+Pj0n IHx8CisgICAgICAgICAgICBvcCA9PT0gJz4+Pj0nIHx8CisgICAgICAgICAgICBvcCA9PT0gJyY9 JyB8fAorICAgICAgICAgICAgb3AgPT09ICdePScgfHwKKyAgICAgICAgICAgIG9wID09PSAnfD0n OworICAgIH0KKworICAgIGZ1bmN0aW9uIGNvbnN1bWVTZW1pY29sb24oKSB7CisgICAgICAgIHZh ciBsaW5lOworCisgICAgICAgIC8vIENhdGNoIHRoZSB2ZXJ5IGNvbW1vbiBjYXNlIGZpcnN0OiBp bW1lZGlhdGVseSBhIHNlbWljb2xvbiAoVSswMDNCKS4KKyAgICAgICAgaWYgKHNvdXJjZS5jaGFy Q29kZUF0KGluZGV4KSA9PT0gMHgzQiB8fCBtYXRjaCgnOycpKSB7CisgICAgICAgICAgICBsZXgo KTsKKyAgICAgICAgICAgIHJldHVybjsKKyAgICAgICAgfQorCisgICAgICAgIGxpbmUgPSBsaW5l TnVtYmVyOworICAgICAgICBza2lwQ29tbWVudCgpOworICAgICAgICBpZiAobGluZU51bWJlciAh PT0gbGluZSkgeworICAgICAgICAgICAgcmV0dXJuOworICAgICAgICB9CisKKyAgICAgICAgaWYg KGxvb2thaGVhZC50eXBlICE9PSBUb2tlbi5FT0YgJiYgIW1hdGNoKCd9JykpIHsKKyAgICAgICAg ICAgIHRocm93VW5leHBlY3RlZChsb29rYWhlYWQpOworICAgICAgICB9CisgICAgfQorCisgICAg Ly8gUmV0dXJuIHRydWUgaWYgcHJvdmlkZWQgZXhwcmVzc2lvbiBpcyBMZWZ0SGFuZFNpZGVFeHBy ZXNzaW9uCisKKyAgICBmdW5jdGlvbiBpc0xlZnRIYW5kU2lkZShleHByKSB7CisgICAgICAgIHJl dHVybiBleHByLnR5cGUgPT09IFN5bnRheC5JZGVudGlmaWVyIHx8IGV4cHIudHlwZSA9PT0gU3lu dGF4Lk1lbWJlckV4cHJlc3Npb247CisgICAgfQorCisgICAgLy8gMTEuMS40IEFycmF5IEluaXRp YWxpc2VyCisKKyAgICBmdW5jdGlvbiBwYXJzZUFycmF5SW5pdGlhbGlzZXIoKSB7CisgICAgICAg IHZhciBlbGVtZW50cyA9IFtdLCBzdGFydFRva2VuOworCisgICAgICAgIHN0YXJ0VG9rZW4gPSBs b29rYWhlYWQ7CisgICAgICAgIGV4cGVjdCgnWycpOworCisgICAgICAgIHdoaWxlICghbWF0Y2go J10nKSkgeworICAgICAgICAgICAgaWYgKG1hdGNoKCcsJykpIHsKKyAgICAgICAgICAgICAgICBs ZXgoKTsKKyAgICAgICAgICAgICAgICBlbGVtZW50cy5wdXNoKG51bGwpOworICAgICAgICAgICAg fSBlbHNlIHsKKyAgICAgICAgICAgICAgICBlbGVtZW50cy5wdXNoKHBhcnNlQXNzaWdubWVudEV4 cHJlc3Npb24oKSk7CisKKyAgICAgICAgICAgICAgICBpZiAoIW1hdGNoKCddJykpIHsKKyAgICAg ICAgICAgICAgICAgICAgZXhwZWN0KCcsJyk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAg ICAgfQorICAgICAgICB9CisKKyAgICAgICAgbGV4KCk7CisKKyAgICAgICAgcmV0dXJuIGRlbGVn YXRlLm1hcmtFbmQoZGVsZWdhdGUuY3JlYXRlQXJyYXlFeHByZXNzaW9uKGVsZW1lbnRzKSwgc3Rh cnRUb2tlbik7CisgICAgfQorCisgICAgLy8gMTEuMS41IE9iamVjdCBJbml0aWFsaXNlcgorCisg ICAgZnVuY3Rpb24gcGFyc2VQcm9wZXJ0eUZ1bmN0aW9uKHBhcmFtLCBmaXJzdCkgeworICAgICAg ICB2YXIgcHJldmlvdXNTdHJpY3QsIGJvZHksIHN0YXJ0VG9rZW47CisKKyAgICAgICAgcHJldmlv dXNTdHJpY3QgPSBzdHJpY3Q7CisgICAgICAgIHN0YXJ0VG9rZW4gPSBsb29rYWhlYWQ7CisgICAg ICAgIGJvZHkgPSBwYXJzZUZ1bmN0aW9uU291cmNlRWxlbWVudHMoKTsKKyAgICAgICAgaWYgKGZp cnN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YXRlLmNyZWF0ZUxpdGVyYWwodG9rZW4pLCBzdGFydFRva2Vu KTsKKyAgICAgICAgfQorCisgICAgICAgIHJldHVybiBkZWxlZ2F0ZS5tYXJrRW5kKGRlbGVnYXRl LmNyZWF0ZUlkZW50aWZpZXIodG9rZW4udmFsdWUpLCBzdGFydFRva2VuKTsKKyAgICB9CisKKyAg ICBmdW5jdGlvbiBwYXJzZU9iamVjdFByb3BlcnR5KCkgeworICAgICAgICB2YXIgdG9rZW4sIGtl eSwgaWQsIHZhbHVlLCBwYXJhbSwgc3RhcnRUb2tlbjsKKworICAgICAgICB0b2tlbiA9IGxvb2th aGVhZDsKKyAgICAgICAgc3RhcnRUb2tlbiA9IGxvb2thaGVhZDsKKworICAgICAgICBpZiAodG9r ZW4udHlwZSA9PT0gVG9rZW4uSWRlbnRpZmllcikgeworCisgICAgICAgICAgICBpZCA9IHBhcnNl T2JqZWN0UHJvcGVydHlLZXkoKTsKKworICAgICAgICAgICAgLy8gUHJvcGVydHkgQXNzaWdubWVu dDogR2V0dGVyIGFuZCBTZXR0ZXIuCisKKyAgICAgICAgICAgIGlmICh0b2tlbi52YWx1ZSA9PT0g J2dldCcgJiYgIW1hdGNoKCc6JykpIHsKKyAgICAgICAgICAgICAgICBrZXkgPSBwYXJzZU9iamVj dFByb3BlcnR5S2V5KCk7CisgICAgICAgICAgICAgICAgZXhwZWN0KCcoJyk7CisgICAgICAgICAg ICAgICAgZXhwZWN0KCcpJyk7CisgICAgICAgICAgICAgICAgdmFsdWUgPSBwYXJzZVByb3BlcnR5 RnVuY3Rpb24oW10pOworICAgICAgICAgICAgICAgIHJldHVybiBkZWxlZ2F0ZS5tYXJrRW5kKGRl bGVnYXRlLmNyZWF0ZVByb3BlcnR5KCdnZXQnLCBrZXksIHZhbHVlKSwgc3RhcnRUb2tlbik7Cisg ICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAodG9rZW4udmFsdWUgPT09ICdzZXQnICYmICFt YXRjaCgnOicpKSB7CisgICAgICAgICAgICAgICAga2V5ID0gcGFyc2VPYmplY3RQcm9wZXJ0eUtl eSgpOworICAgICAgICAgICAgICAgIGV4cGVjdCgnKCcpOworICAgICAgICAgICAgICAgIHRva2Vu ID0gbG9va2FoZWFkOworICAgICAgICAgICAgICAgIGlmICh0b2tlbi50eXBlICE9PSBUb2tlbi5J ZGVudGlmaWVyKSB7CisgICAgICAgICAgICAgICAgICAgIGV4cGVjdCgnKScpOworICAgICAgICAg ICAgICAgICAgICB0aHJvd0Vycm9yVG9sZXJhbnQodG9rZW4sIE1lc3NhZ2VzLlVuZXhwZWN0ZWRU b2tlbiwgdG9rZW4udmFsdWUpOworICAgICAgICAgICAgICAgICAgICB2YWx1ZSA9IHBhcnNlUHJv cGVydHlGdW5jdGlvbihbXSk7CisgICAgICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAg ICAgICAgICAgcGFyYW0gPSBbIHBhcnNlVmFyaWFibGVJZGVudGlmaWVyKCkgXTsKKyAgICAgICAg ICAgICAgICAgICAgZXhwZWN0KCcpJyk7CisgICAgICAgICAgICAgICAgICAgIHZhbHVlID0gcGFy c2VQcm9wZXJ0eUZ1bmN0aW9uKHBhcmFtLCB0b2tlbik7CisgICAgICAgICAgICAgICAgfQorICAg ICAgICAgICAgICAgIHJldHVybiBkZWxlZ2F0ZS5tYXJrRW5kKGRlbGVnYXRlLmNyZWF0ZVByb3Bl cnR5KCdzZXQnLCBrZXksIHZhbHVlKSwgc3RhcnRUb2tlbik7CisgICAgICAgICAgICB9CisgICAg ICAgICAgICBleHBlY3QoJzonKTsKKyAgICAgICAgICAgIHZhbHVlID0gcGFyc2VBc3NpZ25tZW50 RXhwcmVzc2lvbigpOworICAgICAgICAgICAgcmV0dXJuIGRlbGVnYXRlLm1hcmtFbmQoZGVsZWdh dGUuY3JlYXRlUHJvcGVydHkoJ2luaXQnLCBpZCwgdmFsdWUpLCBzdGFydFRva2VuKTsKKyAgICAg ICAgfQorICAgICAgICBpZiAodG9rZW4udHlwZSA9PT0gVG9rZW4uRU9GIHx8IHRva2VuLnR5cGUg PT09IFRva2VuLlB1bmN0dWF0b3IpIHsKKyAgICAgICAgICAgIHRocm93VW5leHBlY3RlZCh0b2tl bik7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBrZXkgPSBwYXJzZU9iamVjdFByb3Bl cnR5S2V5KCk7CisgICAgICAgICAgICBleHBlY3QoJzonKTsKKyAgICAgICAgICAgIHZhbHVlID0g cGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbigpOworICAgICAgICAgICAgcmV0dXJuIGRlbGVnYXRl Lm1hcmtFbmQoZGVsZWdhdGUuY3JlYXRlUHJvcGVydHkoJ2luaXQnLCBrZXksIHZhbHVlKSwgc3Rh cnRUb2tlbik7CisgICAgICAgIH0KKyAgICB9CisKKyAgICBmdW5jdGlvbiBwYXJzZU9iamVjdElu aXRpYWxpc2VyKCkgeworICAgICAgICB2YXIgcHJvcGVydGllcyA9IFtdLCBwcm9wZXJ0eSwgbmFt ZSwga2V5LCBraW5kLCBtYXAgPSB7fSwgdG9TdHJpbmcgPSBTdHJpbmcsIHN0YXJ0VG9rZW47CisK KyAgICAgICAgc3RhcnRUb2tlbiA9IGxvb2thaGVhZDsKKworICAgICAgICBleHBlY3QoJ3snKTsK KworICAgICAgICB3aGlsZSAoIW1hdGNoKCd9JykpIHsKKyAgICAgICAgICAgIHByb3BlcnR5ID0g cGFyc2VPYmplY3RQcm9wZXJ0eSgpOworCisgICAgICAgICAgICBpZiAocHJvcGVydHkua2V5LnR5 cGUgPT09IFN5bnRheC5JZGVudGlmaWVyKSB7CisgICAgICAgICAgICAgICAgbmFtZSA9IHByb3Bl cnR5LmtleS5uYW1lOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICBuYW1l ID0gdG9TdHJpbmcocHJvcGVydHkua2V5LnZhbHVlKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAg ICAgIGtpbmQgPSAocHJvcGVydHkua2luZCA9PT0gJ2luaXQnKSA/IFByb3BlcnR5S2luZC5EYXRh IDogKHByb3BlcnR5LmtpbmQgPT09ICdnZXQnKSA/IFByb3BlcnR5S2luZC5HZXQgOiBQcm9wZXJ0 eUtpbmQuU2V0OworCisgICAgICAgICAgICBrZXkgPSAnJCcgKyBuYW1lOworICAgICAgICAgICAg aWYgKE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChtYXAsIGtleSkpIHsKKyAg ICAgICAgICAgICAgICBpZiAobWFwW2tleV0gPT09IFByb3BlcnR5S2luZC5EYXRhKSB7CisgICAg ICAgICAgICAgICAgICAgIGlmIChzdHJpY3QgJiYga2luZCA9PT0gUHJvcGVydHlLaW5kLkRhdGEp IHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHRocm93RXJyb3JUb2xlcmFudCh7fSwgTWVzc2Fn ZXMuU3RyaWN0RHVwbGljYXRlUHJvcGVydHkpOworICAgICAgICAgICAgICAgICAgICB9IGVsc2Ug aWYgKGtpbmQgIT09IFByb3BlcnR5S2luZC5EYXRhKSB7CisgICAgICAgICAgICAgICAgICAgICAg ICB0aHJvd0Vycm9yVG9sZXJhbnQoe30sIE1lc3NhZ2VzLkFjY2Vzc29yRGF0YVByb3BlcnR5KTsK KyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAg ICAgICAgICAgICAgIGlmIChraW5kID09PSBQcm9wZXJ0eUtpbmQuRGF0YSkgeworICAgICAgICAg ICAgICAgICAgICAgICAgdGhyb3dFcnJvclRvbGVyYW50KHt9LCBNZXNzYWdlcy5BY2Nlc3NvckRh dGFQcm9wZXJ0eSk7CisgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobWFwW2tleV0gJiBr aW5kKSB7CisgICAgICAgICAgICAgICAgICAgICAgICB0aHJvd0Vycm9yVG9sZXJhbnQoe30sIE1l c3NhZ2VzLkFjY2Vzc29yR2V0U2V0KTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAg ICAgICAgIH0KKyAgICAgICAgICAgICAgICBtYXBba2V5XSB8PSBraW5kOworICAgICAgICAgICAg fSBlbHNlIHsKKyAgICAgICAgICAgICAgICBtYXBba2V5XSA9IGtpbmQ7CisgICAgICAgICAgICB9 CisKKyAgICAgICAgICAgIHByb3BlcnRpZXMucHVzaChwcm9wZXJ0eSk7CisKKyAgICAgICAgICAg IGlmICghbWF0Y2goJ30nKSkgeworICAgICAgICAgICAgICAgIGV4cGVjdCgnLCcpOworICAgICAg ICAgICAgfQorICAgICAgICB9CisKKyAgICAgICAgZXhwZWN0KCd9Jyk7CisKKyAgICAgICAgcmV0 dXJuIGRlbGVnYXRlLm1hcmtFbmQoZGVsZWdhdGUuY3JlYXRlT2JqZWN0RXhwcmVzc2lvbihwcm9w ZXJ0aWVzKSwgc3RhcnRUb2tlbik7CisgICAgfQorCisgICAgLy8gMTEuMS42IFRoZSBHcm91cGlu ZyBPcGVyYXRvcgorCisgICAgZnVuY3Rpb24gcGFyc2VHcm91cEV4cHJlc3Npb24oKSB7CisgICAg ICAgIHZhciBleHByOworCisgICAgICAgIGV4cGVjdCgnKCcpOworCisgICAgICAgIGV4cHIgPSBw YXJzZUV4cHJlc3Npb24oKTsKKworICAgICAgICBleHBlY3QoJyknKTsKKworICAgICAgICByZXR1 cm4gZXhwcjsKKyAgICB9CisKKworICAgIC8vIDExLjEgUHJpbWFyeSBFeHByZXNzaW9ucworCisg ICAgZnVuY3Rpb24gcGFyc2VQcmltYXJ5RXhwcmVzc2lvbigpIHsKKyAgICAgICAgdmFyIHR5cGUs IHRva2VuLCBleHByLCBzdGFydFRva2VuOworCisgICAgICAgIGlmIChtYXRjaCgnKCcpKSB7Cisg ICAgICAgICAgICByZXR1cm4gcGFyc2VHcm91cEV4cHJlc3Npb24oKTsKKyAgICAgICAgfQorCisg ICAgICAgIGlmIChtYXRjaCgnWycpKSB7CisgICAgICAgICAgICByZXR1cm4gcGFyc2VBcnJheUlu aXRpYWxpc2VyKCk7CisgICAgICAgIH0KKworICAgICAgICBpZiAobWF0Y2goJ3snKSkgeworICAg ICAgICAgICAgcmV0dXJuIHBhcnNlT2JqZWN0SW5pdGlhbGlzZXIoKTsKKyAgICAgICAgfQorCisg ICAgICAgIHR5cGUgPSBsb29rYWhlYWQudHlwZTsKKyAgICAgICAgc3RhcnRUb2tlbiA9IGxvb2th aGVhZDsKKworICAgICAgICBpZiAodHlwZSA9PT0gVG9rZW4uSWRlbnRpZmllcikgeworICAgICAg ICAgICAgZXhwciA9ICBkZWxlZ2F0ZS5jcmVhdGVJZGVudGlmaWVyKGxleCgpLnZhbHVlKTsKKyAg ICAgICAgfSBlbHNlIGlmICh0eXBlID09PSBUb2tlbi5TdHJpbmdMaXRlcmFsIHx8IHR5cGUgPT09 IFRva2VuLk51bWVyaWNMaXRlcmFsKSB7CisgICAgICAgICAgICBpZiAoc3RyaWN0ICYmIGxvb2th aGVhZC5vY3RhbCkgeworICAgICAgICAgICAgICAgIHRocm93RXJyb3JUb2xlcmFudChsb29rYWhl YWQsIE1lc3NhZ2VzLlN0cmljdE9jdGFsTGl0ZXJhbCk7CisgICAgICAgICAgICB9CisgICAgICAg ICAgICBleHByID0gZGVsZWdhdGUuY3JlYXRlTGl0ZXJhbChsZXgoKSk7CisgICAgICAgIH0gZWxz ZSBpZiAodHlwZSA9PT0gVG9rZW4uS2V5d29yZCkgeworICAgICAgICAgICAgaWYgKG1hdGNoS2V5 d29yZCgnZnVuY3Rpb24nKSkgeworICAgICAgICAgICAgICAgIHJldHVybiBwYXJzZUZ1bmN0aW9u RXhwcmVzc2lvbigpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKG1hdGNoS2V5d29y ZCgndGhpcycpKSB7CisgICAgICAgICAgICAgICAgbGV4KCk7CisgICAgICAgICAgICAgICAgZXhw ciA9IGRlbGVnYXRlLmNyZWF0ZVRoaXNFeHByZXNzaW9uKCk7CisgICAgICAgICAgICB9IGVsc2Ug eworICAgICAgICAgICAgICAgIHRocm93VW5leHBlY3RlZChsZXgoKSk7CisgICAgICAgICAgICB9 CisgICAgICAgIH0gZWxzZSBpZiAodHlwZSA9PT0gVG9rZW4uQm9vbGVhbkxpdGVyYWwpIHsKKyAg ICAgICAgICAgIHRva2VuID0gbGV4KCk7CisgICAgICAgICAgICB0b2tlbi52YWx1ZSA9ICh0b2tl bi52YWx1ZSA9PT0gJ3RydWUnKTsKKyAgICAgICAgICAgIGV4cHIgPSBkZWxlZ2F0ZS5jcmVhdGVM aXRlcmFsKHRva2VuKTsKKyAgICAgICAgfSBlbHNlIGlmICh0eXBlID09PSBUb2tlbi5OdWxsTGl0 ZXJhbCkgeworICAgICAgICAgICAgdG9rZW4gPSBsZXgoKTsKKyAgICAgICAgICAgIHRva2VuLnZh bHVlID0gbnVsbDsKKyAgICAgICAgICAgIGV4cHIgPSBkZWxlZ2F0ZS5jcmVhdGVMaXRlcmFsKHRv a2VuKTsKKyAgICAgICAgfSBlbHNlIGlmIChtYXRjaCgnLycpIHx8IG1hdGNoKCcvPScpKSB7Cisg ICAgICAgICAgICBpZiAodHlwZW9mIGV4dHJhLnRva2VucyAhPT0gJ3VuZGVmaW5lZCcpIHsKKyAg ICAgICAgICAgICAgICBleHByID0gZGVsZWdhdGUuY3JlYXRlTGl0ZXJhbChjb2xsZWN0UmVnZXgo KSk7CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIGV4cHIgPSBkZWxlZ2F0 ZS5jcmVhdGVMaXRlcmFsKHNjYW5SZWdFeHAoKSk7CisgICAgICAgICAgICB9CisgICAgICAgICAg ICBwZWVrKCk7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWQo bGV4KCkpOworICAgICAgICB9CisKKyAgICAgICAgcmV0dXJuIGRlbGVnYXRlLm1hcmtFbmQoZXhw ciwgc3RhcnRUb2tlbik7CisgICAgfQorCisgICAgLy8gMTEuMiBMZWZ0LUhhbmQtU2lkZSBFeHBy ZXNzaW9ucworCisgICAgZnVuY3Rpb24gcGFyc2VBcmd1bWVudHMoKSB7CisgICAgICAgIHZhciBh cmdzID0gW107CisKKyAgICAgICAgZXhwZWN0KCcoJyk7CisKKyAgICAgICAgaWYgKCFtYXRjaCgn KScpKSB7CisgICAgICAgICAgICB3aGlsZSAoaW5kZXggPCBsZW5ndGgpIHsKKyAgICAgICAgICAg ICAgICBhcmdzLnB1c2gocGFyc2VBc3NpZ25tZW50RXhwcmVzc2lvbigpKTsKKyAgICAgICAgICAg ICAgICBpZiAobWF0Y2goJyknKSkgeworICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAg ICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgZXhwZWN0KCcsJyk7CisgICAgICAgICAgICB9 CisgICAgICAgIH0KKworICAgICAgICBleHBlY3QoJyknKTsKKworICAgICAgICByZXR1cm4gYXJn czsKKyAgICB9CisKKyAgICBmdW5jdGlvbiBwYXJzZU5vbkNvbXB1dGVkUHJvcGVydHkoKSB7Cisg ICAgICAgIHZhciB0b2tlbiwgc3RhcnRUb2tlbjsKKworICAgICAgICBzdGFydFRva2VuID0gbG9v a2FoZWFkOworICAgICAgICB0b2tlbiA9IGxleCgpOworCisgICAgICAgIGlmICghaXNJZGVudGlm aWVyTmFtZSh0b2tlbikpIHsKKyAgICAgICAgICAgIHRocm93VW5leHBlY3RlZCh0b2tlbik7Cisg ICAgICAgIH0KKworICAgICAgICByZXR1cm4gZGVsZWdhdGUubWFya0VuZChkZWxlZ2F0ZS5jcmVh dGVJZGVudGlmaWVyKHRva2VuLnZhbHVlKSwgc3RhcnRUb2tlbik7CisgICAgfQorCisgICAgZnVu Y3Rpb24gcGFyc2VOb25Db21wdXRlZE1lbWJlcigpIHsKKyAgICAgICAgZXhwZWN0KCcuJyk7CisK KyAgICAgICAgcmV0dXJuIHBhcnNlTm9uQ29tcHV0ZWRQcm9wZXJ0eSgpOworICAgIH0KKworICAg IGZ1bmN0aW9uIHBhcnNlQ29tcHV0ZWRNZW1iZXIoKSB7CisgICAgICAgIHZhciBleHByOworCisg ICAgICAgIGV4cGVjdCgnWycpOworCisgICAgICAgIGV4cHIgPSBwYXJzZUV4cHJlc3Npb24oKTsK KworICAgICAgICBleHBlY3QoJ10nKTsKKworICAgICAgICByZXR1cm4gZXhwcjsKKyAgICB9CisK KyAgICBmdW5jdGlvbiBwYXJzZU5ld0V4cHJlc3Npb24oKSB7CisgICAgICAgIHZhciBjYWxsZWUs IGFyZ3MsIHN0YXJ0VG9rZW47CisKKyAgICAgICAgc3RhcnRUb2tlbiA9IGxvb2thaGVhZDsKKyAg ICAgICAgZXhwZWN0S2V5d29yZCgnbmV3Jyk7CisgICAgICAgIGNhbGxlZSA9IHBhcnNlTGVmdEhh bmRTaWRlRXhwcmVzc2lvbigpOworICAgICAgICBhcmdzID0gbWF0Y2goJygnKSA/IHBhcnNlQXJn dW1lbnRzKCkgOiBbXTsKKworICAgICAgICByZXR1cm4gZGVsZWdhdGUubWFya0VuZChkZWxlZ2F0 ZS5jcmVhdGVOZXdFeHByZXNzaW9uKGNhbGxlZSwgYXJncyksIHN0YXJ0VG9rZW4pOworICAgIH0K KworICAgIGZ1bmN0aW9uIHBhcnNlTGVmdEhhbmRTaWRlRXhwcmVzc2lvbkFsbG93Q2FsbCgpIHsK KyAgICAgICAgdmFyIHByZXZpb3VzQWxsb3dJbiwgZXhwciwgYXJncywgcHJvcGVydHksIHN0YXJ0 VG9rZW47CisKKyAgICAgICAgc3RhcnRUb2tlbiA9IGxvb2thaGVhZDsKKworICAgICAgICBwcmV2 aW91c0FsbG93SW4gPSBzdGF0ZS5hbGxvd0luOworICAgICAgICBzdGF0ZS5hbGxvd0luID0gdHJ1 ZTsKKyAgICAgICAgZXhwciA9IG1hdGNoS2V5d29yZCgnbmV3JykgPyBwYXJzZU5ld0V4cHJlc3Np b24oKSA6IHBhcnNlUHJpbWFyeUV4cHJlc3Npb24oKTsKKyAgICAgICAgc3RhdGUuYWxsb3dJbiA9 IHByZXZpb3VzQWxsb3dJbjsKKworICAgICAgICBmb3IgKDs7KSB7CisgICAgICAgICAgICBpZiAo bWF0Y2goJy4nKSkgeworICAgICAgICAgICAgICAgIHByb3BlcnR5ID0gcGFyc2VOb25Db21wdXRl ZE1lbWJlcigpOworICAgICAgICAgICAgICAgIGV4cHIgPSBkZWxlZ2F0ZS5jcmVhdGVNZW1iZXJF eHByZXNzaW9uKCcuJywgZXhwciwgcHJvcGVydHkpOworICAgICAgICAgICAgfSBlbHNlIGlmICht YXRjaCgnKCcpKSB7CisgICAgICAgICAgICAgICAgYXJncyA9IHBhcnNlQXJndW1lbnRzKCk7Cisg ICAgICAgICAgICAgICAgZXhwciA9IGRlbGVnYXRlLmNyZWF0ZUNhbGxFeHByZXNzaW9uKGV4cHIs IGFyZ3MpOworICAgICAgICAgICAgfSBlbHNlIGlmIChtYXRjaCgnWycpKSB7CisgICAgICAgICAg ICAgICAgcHJvcGVydHkgPSBwYXJzZUNvbXB1dGVkTWVtYmVyKCk7CisgICAgICAgICAgICAgICAg ZXhwciA9IGRlbGVnYXRlLmNyZWF0ZU1lbWJlckV4cHJlc3Npb24oJ1snLCBleHByLCBwcm9wZXJ0 eSk7CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAg ICAgICAgfQorICAgICAgICAgICAgZGVsZWdhdGUubWFya0VuZChleHByLCBzdGFydFRva2VuKTsK KyAgICAgICAgfQorCisgICAgICAgIHJldHVybiBleHByOworICAgIH0KKworICAgIGZ1bmN0aW9u IHBhcnNlTGVmdEhhbmRTaWRlRXhwcmVzc2lvbigpIHsKKyAgICAgICAgdmFyIHByZXZpb3VzQWxs b3dJbiwgZXhwciwgcHJvcGVydHksIHN0YXJ0VG9rZW47CisKKyAgICAgICAgc3RhcnRUb2tlbiA9 IGxvb2thaGVhZDsKKworICAgICAgICBwcmV2aW91c0FsbG93SW4gPSBzdGF0ZS5hbGxvd0luOwor ICAgICAgICBleHByID0gbWF0Y2hLZXl3b3JkKCduZXcnKSA/IHBhcnNlTmV3RXhwcmVzc2lvbigp IDogcGFyc2VQcmltYXJ5RXhwcmVzc2lvbigpOworICAgICAgICBzdGF0ZS5hbGxvd0luID0gcHJl dmlvdXNBbGxvd0luOworCisgICAgICAgIHdoaWxlIChtYXRjaCgnLicpIHx8IG1hdGNoKCdbJykp IHsKKyAgICAgICAgICAgIGlmIChtYXRjaCgnWycpKSB7CisgICAgICAgICAgICAgICAgcHJvcGVy dHkgPSBwYXJzZUNvbXB1dGVkTWVtYmVyKCk7CisgICAgICAgICAgICAgICAgZXhwciA9IGRlbGVn YXRlLmNyZWF0ZU1lbWJlckV4cHJlc3Npb24oJ1snLCBleHByLCBwcm9wZXJ0eSk7CisgICAgICAg ICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIHByb3BlcnR5ID0gcGFyc2VOb25Db21wdXRl ZE1lbWJlcigpOworICAgICAgICAgICAgICAgIGV4cHIgPSBkZWxlZ2F0ZS5jcmVhdGVNZW1iZXJF eHByZXNzaW9uKCcuJywgZXhwciwgcHJvcGVydHkpOworICAgICAgICAgICAgfQorICAgICAgICAg ICAgZGVsZWdhdGUubWFya0VuZChleHByLCBzdGFydFRva2VuKTsKKyAgICAgICAgfQorCisgICAg ICAgIHJldHVybiBleHByOworICAgIH0KKworICAgIC8vIDExLjMgUG9zdGZpeCBFeHByZXNzaW9u cworCisgICAgZnVuY3Rpb24gcGFyc2VQb3N0Zml4RXhwcmVzc2lvbigpIHsKKyAgICAgICAgdmFy IGV4cHIsIHRva2VuLCBzdGFydFRva2VuID0gbG9va2FoZWFkOworCisgICAgICAgIGV4cHIgPSBw YXJzZUxlZnRIYW5kU2lkZUV4cHJlc3Npb25BbGxvd0NhbGwoKTsKKworICAgICAgICBpZiAobG9v a2FoZWFkLnR5cGUgPT09IFRva2VuLlB1bmN0dWF0b3IpIHsKKyAgICAgICAgICAgIGlmICgobWF0 Y2goJysrJykgfHwgbWF0Y2goJy0tJykpICYmICFwZWVrTGluZVRlcm1pbmF0b3IoKSkgeworICAg ICAgICAgICAgICAgIC8vIDExLjMuMSwgMTEuMy4yCisgICAgICAgICAgICAgICAgaWYgKHN0cmlj dCAmJiBleHByLnR5cGUgPT09IFN5bnRheC5JZGVudGlmaWVyICYmIGlzUmVzdHJpY3RlZFdvcmQo ZXhwci5uYW1lKSkgeworICAgICAgICAgICAgICAgICAgICB0aHJvd0Vycm9yVG9sZXJhbnQoe30s IE1lc3NhZ2VzLlN0cmljdExIU1Bvc3RmaXgpOworICAgICAgICAgICAgICAgIH0KKworICAgICAg ICAgICAgICAgIGlmICghaXNMZWZ0SGFuZFNpZGUoZXhwcikpIHsKKyAgICAgICAgICAgICAgICAg ICAgdGhyb3dFcnJvclRvbGVyYW50KHt9LCBNZXNzYWdlcy5JbnZhbGlkTEhTSW5Bc3NpZ25tZW50 KTsKKyAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICB0b2tlbiA9IGxleCgpOwor ICAgICAgICAgICAgICAgIGV4cHIgPSBkZWxlZ2F0ZS5tYXJrRW5kKGRlbGVnYXRlLmNyZWF0ZVBv c3RmaXhFeHByZXNzaW9uKHRva2VuLnZhbHVlLCBleHByKSwgc3RhcnRUb2tlbik7CisgICAgICAg ICAgICB9CisgICAgICAgIH0KKworICAgICAgICByZXR1cm4gZXhwcjsKKyAgICB9CisKKyAgICAv LyAxMS40IFVuYXJ5IE9wZXJhdG9ycworCisgICAgZnVuY3Rpb24gcGFyc2VVbmFyeUV4cHJlc3Np b24oKSB7CisgICAgICAgIHZhciB0b2tlbiwgZXhwciwgc3RhcnRUb2tlbjsKKworICAgICAgICBp ZiAobG9va2FoZWFkLnR5cGUgIT09IFRva2VuLlB1bmN0dWF0b3IgJiYgbG9va2FoZWFkLnR5cGUg IT09IFRva2VuLktleXdvcmQpIHsKKyAgICAgICAgICAgIGV4cHIgPSBwYXJzZVBvc3RmaXhFeHBy ZXNzaW9uKCk7CisgICAgICAgIH0gZWxzZSBpZiAobWF0Y2goJysrJykgfHwgbWF0Y2goJy0tJykp IHsKKyAgICAgICAgICAgIHN0YXJ0VG9rZW4gPSBsb29rYWhlYWQ7CisgICAgICAgICAgICB0b2tl biA9IGxleCgpOworICAgICAgICAgICAgZXhwciA9IHBhcnNlVW5hcnlFeHByZXNzaW9uKCk7Cisg ICAgICAgICAgICAvLyAxMS40LjQsIDExLjQuNQorICAgICAgICAgICAgaWYgKHN0cmljdCAmJiBl eHByLnR5cGUgPT09IFN5bnRheC5JZGVudGlmaWVyICYmIGlzUmVzdHJpY3RlZFdvcmQoZXhwci5u YW1lKSkgeworICAgICAgICAgICAgICAgIHRocm93RXJyb3JUb2xlcmFudCh7fSwgTWVzc2FnZXMu U3RyaWN0TEhTUHJlZml4KTsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKCFpc0xl ZnRIYW5kU2lkZShleHByKSkgeworICAgICAgICAgICAgICAgIHRocm93RXJyb3JUb2xlcmFudCh7 fSwgTWVzc2FnZXMuSW52YWxpZExIU0luQXNzaWdubWVudCk7CisgICAgICAgICAgICB9CisKKyAg ICAgICAgICAgIGV4cHIgPSBkZWxlZ2F0ZS5jcmVhdGVVbmFyeUV4cHJlc3Npb24odG9rZW4udmFs dWUsIGV4cHIpOworICAgICAgICAgICAgZXhwciA9IGRlbGVnYXRlLm1hcmtFbmQoZXhwciwgc3Rh cnRUb2tlbik7CisgICAgICAgIH0gZWxzZSBpZiAobWF0Y2goJysnKSB8fCBtYXRjaCgnLScpIHx8 IG1hdGNoKCd+JykgfHwgbWF0Y2goJyEnKSkgeworICAgICAgICAgICAgc3RhcnRUb2tlbiA9IGxv b2thaGVhZDsKKyAgICAgICAgICAgIHRva2VuID0gbGV4KCk7CisgICAgICAgICAgICBleHByID0g cGFyc2VVbmFyeUV4cHJlc3Npb24oKTsKKyAgICAgICAgICAgIGV4cHIgPSBkZWxlZ2F0ZS5jcmVh dGVVbmFyeUV4cHJlc3Npb24odG9rZW4udmFsdWUsIGV4cHIpOworICAgICAgICAgICAgZXhwciA9 IGRlbGVnYXRlLm1hcmtFbmQoZXhwciwgc3RhcnRUb2tlbik7CisgICAgICAgIH0gZWxzZSBpZiAo bWF0Y2hLZXl3b3JkKCdkZWxldGUnKSB8fCBtYXRjaEtleXdvcmQoJ3ZvaWQnKSB8fCBtYXRjaEtl eXdvcmQoJ3R5cGVvZicpKSB7CisgICAgICAgICAgICBzdGFydFRva2VuID0gbG9va2FoZWFkOwor ICAgICAgICAgICAgdG9rZW4gPSBsZXgoKTsKKyAgICAgICAgICAgIGV4cHIgPSBwYXJzZVVuYXJ5 RXhwcmVzc2lvbigpOworICAgICAgICAgICAgZXhwciA9IGRlbGVnYXRlLmNyZWF0ZVVuYXJ5RXhw cmVzc2lvbih0b2tlbi52YWx1ZSwgZXhwcik7CisgICAgICAgICAgICBleHByID0gZGVsZWdhdGUu bWFya0VuZChleHByLCBzdGFydFRva2VuKTsKKyAgICAgICAgICAgIGlmIChzdHJpY3QgJiYgZXhw ci5vcGVyYXRvciA9PT0gJ2RlbGV0ZScgJiYgZXhwci5hcmd1bWVudC50eXBlID09PSBTeW50YXgu SWRlbnRpZmllcikgeworICAgICAgICAgICAgICAgIHRocm93RXJyb3JUb2xlcmFudCh7fSwgTWVz c2FnZXMuU3RyaWN0RGVsZXRlKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfSBlbHNlIHsKKyAg ICAgICAgICAgIGV4cHIgPSBwYXJzZVBvc3RmaXhFeHByZXNzaW9uKCk7CisgICAgICAgIH0KKwor ICAgICAgICByZXR1cm4gZXhwcjsKKyAgICB9CisKKyAgICBmdW5jdGlvbiBiaW5hcnlQcmVjZWRl bmNlKHRva2VuLCBhbGxvd0luKSB7CisgICAgICAgIHZhciBwcmVjID0gMDsKKworICAgICAgICBp ZiAodG9rZW4udHlwZSAhPT0gVG9rZW4uUHVuY3R1YXRvciAmJiB0b2tlbi50eXBlICE9PSBUb2tl bi5LZXl3b3JkKSB7CisgICAgICAgICAgICByZXR1cm4gMDsKKyAgICAgICAgfQorCisgICAgICAg IHN3aXRjaCAodG9rZW4udmFsdWUpIHsKKyAgICAgICAgY2FzZSAnfHwnOgorICAgICAgICAgICAg cHJlYyA9IDE7CisgICAgICAgICAgICBicmVhazsKKworICAgICAgICBjYXNlICcmJic6CisgICAg ICAgICAgICBwcmVjID0gMjsKKyAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgIGNhc2UgJ3wn OgorICAgICAgICAgICAgcHJlYyA9IDM7CisgICAgICAgICAgICBicmVhazsKKworICAgICAgICBj YXNlICdeJzoKKyAgICAgICAgICAgIHByZWMgPSA0OworICAgICAgICAgICAgYnJlYWs7CisKKyAg ICAgICAgY2FzZSAnJic6CisgICAgICAgICAgICBwcmVjID0gNTsKKyAgICAgICAgICAgIGJyZWFr OworCisgICAgICAgIGNhc2UgJz09JzoKKyAgICAgICAgY2FzZSAnIT0nOgorICAgICAgICBjYXNl ICc9PT0nOgorICAgICAgICBjYXNlICchPT0nOgorICAgICAgICAgICAgcHJlYyA9IDY7CisgICAg ICAgICAgICBicmVhazsKKworICAgICAgICBjYXNlICc8JzoKKyAgICAgICAgY2FzZSAnPic6Cisg ICAgICAgIGNhc2UgJzw9JzoKKyAgICAgICAgY2FzZSAnPj0nOgorICAgICAgICBjYXNlICdpbnN0 YW5jZW9mJzoKKyAgICAgICAgICAgIHByZWMgPSA3OworICAgICAgICAgICAgYnJlYWs7CisKKyAg ICAgICAgY2FzZSAnaW4nOgorICAgICAgICAgICAgcHJlYyA9IGFsbG93SW4gPyA3IDogMDsKKyAg ICAgICAgICAgIGJyZWFrOworCisgICAgICAgIGNhc2UgJzw8JzoKKyAgICAgICAgY2FzZSAnPj4n OgorICAgICAgICBjYXNlICc+Pj4nOgorICAgICAgICAgICAgcHJlYyA9IDg7CisgICAgICAgICAg ICBicmVhazsKKworICAgICAgICBjYXNlICcrJzoKKyAgICAgICAgY2FzZSAnLSc6CisgICAgICAg ICAgICBwcmVjID0gOTsKKyAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgIGNhc2UgJyonOgor ICAgICAgICBjYXNlICcvJzoKKyAgICAgICAgY2FzZSAnJSc6CisgICAgICAgICAgICBwcmVjID0g MTE7CisgICAgICAgICAgICBicmVhazsKKworICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAg YnJlYWs7CisgICAgICAgIH0KKworICAgICAgICByZXR1cm4gcHJlYzsKKyAgICB9CisKKyAgICAv LyAxMS41IE11bHRpcGxpY2F0aXZlIE9wZXJhdG9ycworICAgIC8vIDExLjYgQWRkaXRpdmUgT3Bl cmF0b3JzCisgICAgLy8gMTEuNyBCaXR3aXNlIFNoaWZ0IE9wZXJhdG9ycworICAgIC8vIDExLjgg UmVsYXRpb25hbCBPcGVyYXRvcnMKKyAgICAvLyAxMS45IEVxdWFsaXR5IE9wZXJhdG9ycworICAg IC8vIDExLjEwIEJpbmFyeSBCaXR3aXNlIE9wZXJhdG9ycworICAgIC8vIDExLjExIEJpbmFyeSBM b2dpY2FsIE9wZXJhdG9ycworCisgICAgZnVuY3Rpb24gcGFyc2VCaW5hcnlFeHByZXNzaW9uKCkg eworICAgICAgICB2YXIgbWFya2VyLCBtYXJrZXJzLCBleHByLCB0b2tlbiwgcHJlYywgc3RhY2ss IHJpZ2h0LCBvcGVyYXRvciwgbGVmdCwgaTsKKworICAgICAgICBtYXJrZXIgPSBsb29rYWhlYWQ7 CisgICAgICAgIGxlZnQgPSBwYXJzZVVuYXJ5RXhwcmVzc2lvbigpOworCisgICAgICAgIHRva2Vu ID0gbG9va2FoZWFkOworICAgICAgICBwcmVjID0gYmluYXJ5UHJlY2VkZW5jZSh0b2tlbiwgc3Rh dGUuYWxsb3dJbik7CisgICAgICAgIGlmIChwcmVjID09PSAwKSB7CisgICAgICAgICAgICByZXR1 cm4gbGVmdDsKKyAgICAgICAgfQorICAgICAgICB0b2tlbi5wcmVjID0gcHJlYzsKKyAgICAgICAg bGV4KCk7CisKKyAgICAgICAgbWFya2VycyA9IFttYXJrZXIsIGxvb2thaGVhZF07CisgICAgICAg IHJpZ2h0ID0gcGFyc2VVbmFyeUV4cHJlc3Npb24oKTsKKworICAgICAgICBzdGFjayA9IFtsZWZ0 LCB0b2tlbiwgcmlnaHRdOworCisgICAgICAgIHdoaWxlICgocHJlYyA9IGJpbmFyeVByZWNlZGVu Y2UobG9va2FoZWFkLCBzdGF0ZS5hbGxvd0luKSkgPiAwKSB7CisKKyAgICAgICAgICAgIC8vIFJl ZHVjZTogbWFrZSBhIGJpbmFyeSBleHByZXNzaW9uIGZyb20gdGhlIHRocmVlIHRvcG1vc3QgZW50 cmllcy4KKyAgICAgICAgICAgIHdoaWxlICgoc3RhY2subGVuZ3RoID4gMikgJiYgKHByZWMgPD0g c3RhY2tbc3RhY2subGVuZ3RoIC0gMl0ucHJlYykpIHsKKyAgICAgICAgICAgICAgICByaWdodCA9 IHN0YWNrLnBvcCgpOworICAgICAgICAgICAgICAgIG9wZXJhdG9yID0gc3RhY2sucG9wKCkudmFs dWU7CisgICAgICAgICAgICAgICAgbGVmdCA9IHN0YWNrLnBvcCgpOworICAgICAgICAgICAgICAg IGV4cHIgPSBkZWxlZ2F0ZS5jcmVhdGVCaW5hcnlFeHByZXNzaW9uKG9wZXJhdG9yLCBsZWZ0LCBy aWdodCk7CisgICAgICAgICAgICAgICAgbWFya2Vycy5wb3AoKTsKKyAgICAgICAgICAgICAgICBt YXJrZXIgPSBtYXJrZXJzW21hcmtlcnMubGVuZ3RoIC0gMV07CisgICAgICAgICAgICAgICAgZGVs ZWdhdGUubWFya0VuZChleHByLCBtYXJrZXIpOworICAgICAgICAgICAgICAgIHN0YWNrLnB1c2go ZXhwcik7CisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIC8vIFNoaWZ0LgorICAgICAgICAg ICAgdG9rZW4gPSBsZXgoKTsKKyAgICAgICAgICAgIHRva2VuLnByZWMgPSBwcmVjOworICAgICAg ICAgICAgc3RhY2sucHVzaCh0b2tlbik7CisgICAgICAgICAgICBtYXJrZXJzLnB1c2gobG9va2Fo ZWFkKTsKKyAgICAgICAgICAgIGV4cHIgPSBwYXJzZVVuYXJ5RXhwcmVzc2lvbigpOworICAgICAg ICAgICAgc3RhY2sucHVzaChleHByKTsKKyAgICAgICAgfQorCisgICAgICAgIC8vIEZpbmFsIHJl ZHVjZSB0byBjbGVhbi11cCB0aGUgc3RhY2suCisgICAgICAgIGkgPSBzdGFjay5sZW5ndGggLSAx OworICAgICAgICBleHByID0gc3RhY2tbaV07CisgICAgICAgIG1hcmtlcnMucG9wKCk7CisgICAg ICAgIHdoaWxlIChpID4gMSkgeworICAgICAgICAgICAgZXhwciA9IGRlbGVnYXRlLmNyZWF0ZUJp bmFyeUV4cHJlc3Npb24oc3RhY2tbaSAtIDFdLnZhbHVlLCBzdGFja1tpIC0gMl0sIGV4cHIpOwor ICAgICAgICAgICAgaSAtPSAyOworICAgICAgICAgICAgbWFya2VyID0gbWFya2Vycy5wb3AoKTsK KyAgICAgICAgICAgIGRlbGVnYXRlLm1hcmtFbmQoZXhwciwgbWFya2VyKTsKKyAgICAgICAgfQor CisgICAgICAgIHJldHVybiBleHByOworICAgIH0KKworCisgICAgLy8gMTEuMTIgQ29uZGl0aW9u YWwgT3BlcmF0b3IKKworICAgIGZ1bmN0aW9uIHBhcnNlQ29uZGl0aW9uYWxFeHByZXNzaW9uKCkg eworICAgICAgICB2YXIgZXhwciwgcHJldmlvdXNBbGxvd0luLCBjb25zZXF1ZW50LCBhbHRlcm5h dGUsIHN0YXJ0VG9rZW47CisKKyAgICAgICAgc3RhcnRUb2tlbiA9IGxvb2thaGVhZDsKKworICAg ICAgICBleHByID0gcGFyc2VCaW5hcnlFeHByZXNzaW9uKCk7CisKKyAgICAgICAgaWYgKG1hdGNo KCc/JykpIHsKKyAgICAgICAgICAgIGxleCgpOworICAgICAgICAgICAgcHJldmlvdXNBbGxvd0lu ID0gc3RhdGUuYWxsb3dJbjsKKyAgICAgICAgICAgIHN0YXRlLmFsbG93SW4gPSB0cnVlOworICAg ICAgICAgICAgY29uc2VxdWVudCA9IHBhcnNlQXNzaWdubWVudEV4cHJlc3Npb24oKTsKKyAgICAg ICAgICAgIHN0YXRlLmFsbG93SW4gPSBwcmV2aW91c0FsbG93SW47CisgICAgICAgICAgICBleHBl Y3QoJzonKTsKKyAgICAgICAgICAgIGFsdGVybmF0ZSA9IHBhcnNlQXNzaWdubWVudEV4cHJlc3Np b24oKTsKKworICAgICAgICAgICAgZXhwciA9IGRlbGVnYXRlLmNyZWF0ZUNvbmRpdGlvbmFsRXhw cmVzc2lvbihleHByLCBjb25zZXF1ZW50LCBhbHRlcm5hdGUpOworICAgICAgICAgICAgZGVsZWdh dGUubWFya0VuZChleHByLCBzdGFydFRva2VuKTsKKyAgICAgICAgfQorCisgICAgICAgIHJldHVy biBleHByOworICAgIH0KKworICAgIC8vIDExLjEzIEFzc2lnbm1lbnQgT3BlcmF0b3JzCisKKyAg ICBmdW5jdGlvbiBwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKCkgeworICAgICAgICB2YXIgdG9r ZW4sIGxlZnQsIHJpZ2h0LCBub2RlLCBzdGFydFRva2VuOworCisgICAgICAgIHRva2VuID0gbG9v a2FoZWFkOworICAgICAgICBzdGFydFRva2VuID0gbG9va2FoZWFkOworCisgICAgICAgIG5vZGUg PSBsZWZ0ID0gcGFyc2VDb25kaXRpb25hbEV4cHJlc3Npb24oKTsKKworICAgICAgICBpZiAobWF0 Y2hBc3NpZ24oKSkgeworICAgICAgICAgICAgLy8gTGVmdEhhbmRTaWRlRXhwcmVzc2lvbgorICAg ICAgICAgICAgaWYgKCFpc0xlZnRIYW5kU2lkZShsZWZ0KSkgeworICAgICAgICAgICAgICAgIHRo cm93RXJyb3JUb2xlcmFudCh7fSwgTWVzc2FnZXMuSW52YWxpZExIU0luQXNzaWdubWVudCk7Cisg ICAgICAgICAgICB9CisKKyAgICAgICAgICAgIC8vIDExLjEzLjEKKyAgICAgICAgICAgIGlmIChz dHJpY3QgJiYgbGVmdC50eXBlID09PSBTeW50YXguSWRlbnRpZmllciAmJiBpc1Jlc3RyaWN0ZWRX b3JkKGxlZnQubmFtZSkpIHsKKyAgICAgICAgICAgICAgICB0aHJvd0Vycm9yVG9sZXJhbnQodG9r ZW4sIE1lc3NhZ2VzLlN0cmljdExIU0Fzc2lnbm1lbnQpOworICAgICAgICAgICAgfQorCisgICAg ICAgICAgICB0b2tlbiA9IGxleCgpOworICAgICAgICAgICAgcmlnaHQgPSBwYXJzZUFzc2lnbm1l bnRFeHByZXNzaW9uKCk7CisgICAgICAgICAgICBub2RlID0gZGVsZWdhdGUubWFya0VuZChkZWxl Z2F0ZS5jcmVhdGVBc3NpZ25tZW50RXhwcmVzc2lvbih0b2tlbi52YWx1ZSwgbGVmdCwgcmlnaHQp LCBzdGFydFRva2VuKTsKKyAgICAgICAgfQorCisgICAgICAgIHJldHVybiBub2RlOworICAgIH0K KworICAgIC8vIDExLjE0IENvbW1hIE9wZXJhdG9yCisKKyAgICBmdW5jdGlvbiBwYXJzZUV4cHJl c3Npb24oKSB7CisgICAgICAgIHZhciBleHByLCBzdGFydFRva2VuID0gbG9va2FoZWFkOworCisg ICAgICAgIGV4cHIgPSBwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9uKCk7CisKKyAgICAgICAgaWYg KG1hdGNoKCcsJykpIHsKKyAgICAgICAgICAgIGV4cHIgPSBkZWxlZ2F0ZS5jcmVhdGVTZXF1ZW5j ZUV4cHJlc3Npb24oWyBleHByIF0pOworCisgICAgICAgICAgICB3aGlsZSAoaW5kZXggPCBsZW5n dGgpIHsKKyAgICAgICAgICAgICAgICBpZiAoIW1hdGNoKCcsJykpIHsKKyAgICAgICAgICAgICAg ICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGxleCgpOwor ICAgICAgICAgICAgICAgIGV4cHIuZXhwcmVzc2lvbnMucHVzaChwYXJzZUFzc2lnbm1lbnRFeHBy ZXNzaW9uKCkpOworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBkZWxlZ2F0ZS5tYXJrRW5k KGV4cHIsIHN0YXJ0VG9rZW4pOworICAgICAgICB9CisKKyAgICAgICAgcmV0dXJuIGV4cHI7Cisg ICAgfQorCisgICAgLy8gMTIuMSBCbG9jaworCisgICAgZnVuY3Rpb24gcGFyc2VTdGF0ZW1lbnRM aXN0KCkgeworICAgICAgICB2YXIgbGlzdCA9IFtdLAorICAgICAgICAgICAgc3RhdGVtZW50Owor CisgICAgICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkgeworICAgICAgICAgICAgaWYgKG1hdGNo KCd9JykpIHsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0KKyAgICAgICAg ICAgIHN0YXRlbWVudCA9IHBhcnNlU291cmNlRWxlbWVudCgpOworICAgICAgICAgICAgaWYgKHR5 cGVvZiBzdGF0ZW1lbnQgPT09ICd1bmRlZmluZWQnKSB7CisgICAgICAgICAgICAgICAgYnJlYWs7 CisgICAgICAgICAgICB9CisgICAgICAgICAgICBsaXN0LnB1c2goc3RhdGVtZW50KTsKKyAgICAg ICAgfQorCisgICAgICAgIHJldHVybiBsaXN0OworICAgIH0KKworICAgIGZ1bmN0aW9uIHBhcnNl QmxvY2soKSB7CisgICAgICAgIHZhciBibG9jaywgc3RhcnRUb2tlbjsKKworICAgICAgICBzdGFy dFRva2VuID0gbG9va2FoZWFkOworICAgICAgICBleHBlY3QoJ3snKTsKKworICAgICAgICBibG9j ayA9IHBhcnNlU3RhdGVtZW50TGlzdCgpOworCisgICAgICAgIGV4cGVjdCgnfScpOworCisgICAg ICAgIHJldHVybiBkZWxlZ2F0ZS5tYXJrRW5kKGRlbGVnYXRlLmNyZWF0ZUJsb2NrU3RhdGVtZW50 KGJsb2NrKSwgc3RhcnRUb2tlbik7CisgICAgfQorCisgICAgLy8gMTIuMiBWYXJpYWJsZSBTdGF0 ZW1lbnQKKworICAgIGZ1bmN0aW9uIHBhcnNlVmFyaWFibGVJZGVudGlmaWVyKCkgeworICAgICAg ICB2YXIgdG9rZW4sIHN0YXJ0VG9rZW47CisKKyAgICAgICAgc3RhcnRUb2tlbiA9IGxvb2thaGVh ZDsKKyAgICAgICAgdG9rZW4gPSBsZXgoKTsKKworICAgICAgICBpZiAodG9rZW4udHlwZSAhPT0g VG9rZW4uSWRlbnRpZmllcikgeworICAgICAgICAgICAgdGhyb3dVbmV4cGVjdGVkKHRva2VuKTsK KyAgICAgICAgfQorCisgICAgICAgIHJldHVybiBkZWxlZ2F0ZS5tYXJrRW5kKGRlbGVnYXRlLmNy ZWF0ZUlkZW50aWZpZXIodG9rZW4udmFsdWUpLCBzdGFydFRva2VuKTsKKyAgICB9CisKKyAgICBm dW5jdGlvbiBwYXJzZVZhcmlhYmxlRGVjbGFyYXRpb24oa2luZCkgeworICAgICAgICB2YXIgaW5p dCA9IG51bGwsIGlkLCBzdGFydFRva2VuOworCisgICAgICAgIHN0YXJ0VG9rZW4gPSBsb29rYWhl YWQ7CisgICAgICAgIGlkID0gcGFyc2VWYXJpYWJsZUlkZW50aWZpZXIoKTsKKworICAgICAgICAv LyAxMi4yLjEKKyAgICAgICAgaWYgKHN0cmljdCAmJiBpc1Jlc3RyaWN0ZWRXb3JkKGlkLm5hbWUp KSB7CisgICAgICAgICAgICB0aHJvd0Vycm9yVG9sZXJhbnQoe30sIE1lc3NhZ2VzLlN0cmljdFZh ck5hbWUpOworICAgICAgICB9CisKKyAgICAgICAgaWYgKGtpbmQgPT09ICdjb25zdCcpIHsKKyAg ICAgICAgICAgIGV4cGVjdCgnPScpOworICAgICAgICAgICAgaW5pdCA9IHBhcnNlQXNzaWdubWVu dEV4cHJlc3Npb24oKTsKKyAgICAgICAgfSBlbHNlIGlmIChtYXRjaCgnPScpKSB7CisgICAgICAg ICAgICBsZXgoKTsKKyAgICAgICAgICAgIGluaXQgPSBwYXJzZUFzc2lnbm1lbnRFeHByZXNzaW9u KCk7CisgICAgICAgIH0KKworICAgICAgICByZXR1cm4gZGVsZWdhdGUubWFya0VuZChkZWxlZ2F0 ZS5jcmVhdGVWYXJpYWJsZURlY2xhcmF0b3IoaWQsIGluaXQpLCBzdGFydFRva2VuKTsKKyAgICB9 CisKKyAgICBmdW5jdGlvbiBwYXJzZVZhcmlhYmxlRGVjbGFyYXRpb25MaXN0KGtpbmQpIHsKKyAg ICAgICAgdmFyIGxpc3QgPSBbXTsKKworICAgICAgICBkbyB7CisgICAgICAgICAgICBsaXN0LnB1 c2gocGFyc2VWYXJpYWJsZURlY2xhcmF0aW9uKGtpbmQpKTsKKyAgICAgICAgICAgIGlmICghbWF0 Y2goJywnKSkgeworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQorICAgICAg ICAgICAgbGV4KCk7CisgICAgICAgIH0gd2hpbGUgKGluZGV4IDwgbGVuZ3RoKTsKKworICAgICAg ICByZXR1cm4gbGlzdDsKKyAgICB9CisKKyAgICBmdW5jdGlvbiBwYXJzZVZhcmlhYmxlU3RhdGVt ZW50KCkgeworICAgICAgICB2YXIgZGVjbGFyYXRpb25zOworCisgICAgICAgIGV4cGVjdEtleXdv cmQoJ3ZhcicpOworCisgICAgICAgIGRlY2xhcmF0aW9ucyA9IHBhcnNlVmFyaWFibGVEZWNsYXJh dGlvbkxpc3QoKTsKKworICAgICAgICBjb25zdW1lU2VtaWNvbG9uKCk7CisKKyAgICAgICAgcmV0 dXJuIGRlbGVnYXRlLmNyZWF0ZVZhcmlhYmxlRGVjbGFyYXRpb24oZGVjbGFyYXRpb25zLCAndmFy Jyk7CisgICAgfQorCisgICAgLy8ga2luZCBtYXkgYmUgYGNvbnN0YCBvciBgbGV0YAorICAgIC8v IEJvdGggYXJlIGV4cGVyaW1lbnRhbCBhbmQgbm90IGluIHRoZSBzcGVjaWZpY2F0aW9uIHlldC4K KyAgICAvLyBzZWUgaHR0cDovL3dpa2kuZWNtYXNjcmlwdC5vcmcvZG9rdS5waHA/aWQ9a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1bmN0aW9uIHBhcnNlSWZTdGF0ZW1lbnQoKSB7 CisgICAgICAgIHZhciB0ZXN0LCBjb25zZXF1ZW50LCBhbHRlcm5hdGU7CisKKyAgICAgICAgZXhw ZWN0S2V5d29yZCgnaWYnKTsKKworICAgICAgICBleHBlY3QoJygnKTsKKworICAgICAgICB0ZXN0 ID0gcGFyc2VFeHByZXNzaW9uKCk7CisKKyAgICAgICAgZXhwZWN0KCcpJyk7CisKKyAgICAgICAg Y29uc2VxdWVudCA9IHBhcnNlU3RhdGVtZW50KCk7CisKKyAgICAgICAgaWYgKG1hdGNoS2V5d29y ZCgnZWxzZScpKSB7CisgICAgICAgICAgICBsZXgoKTsKKyAgICAgICAgICAgIGFsdGVybmF0ZSA9 IHBhcnNlU3RhdGVtZW50KCk7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBhbHRlcm5h dGUgPSBudWxsOworICAgICAgICB9CisKKyAgICAgICAgcmV0dXJuIGRlbGVnYXRlLmNyZWF0ZUlm U3RhdGVtZW50KHRlc3QsIGNvbnNlcXVlbnQsIGFsdGVybmF0ZSk7CisgICAgfQorCisgICAgLy8g MTIuNiBJdGVyYXRpb24gU3RhdGVtZW50cworCisgICAgZnVuY3Rpb24gcGFyc2VEb1doaWxlU3Rh dGVtZW50KCkgeworICAgICAgICB2YXIgYm9keSwgdGVzdCwgb2xkSW5JdGVyYXRpb247CisKKyAg ICAgICAgZXhwZWN0S2V5d29yZCgnZG8nKTsKKworICAgICAgICBvbGRJbkl0ZXJhdGlvbiA9IHN0 YXRlLmluSXRlcmF0aW9uOworICAgICAgICBzdGF0ZS5pbkl0ZXJhdGlvbiA9IHRydWU7CisKKyAg ICAgICAgYm9keSA9IHBhcnNlU3RhdGVtZW50KCk7CisKKyAgICAgICAgc3RhdGUuaW5JdGVyYXRp b24gPSBvbGRJbkl0ZXJhdGlvbjsKKworICAgICAgICBleHBlY3RLZXl3b3JkKCd3aGlsZScpOwor CisgICAgICAgIGV4cGVjdCgnKCcpOworCisgICAgICAgIHRlc3QgPSBwYXJzZUV4cHJlc3Npb24o KTsKKworICAgICAgICBleHBlY3QoJyknKTsKKworICAgICAgICBpZiAobWF0Y2goJzsnKSkgewor ICAgICAgICAgICAgbGV4KCk7CisgICAgICAgIH0KKworICAgICAgICByZXR1cm4gZGVsZWdhdGUu Y3JlYXRlRG9XaGlsZVN0YXRlbWVudChib2R5LCB0ZXN0KTsKKyAgICB9CisKKyAgICBmdW5jdGlv biBwYXJzZVdoaWxlU3RhdGVtZW50KCkgeworICAgICAgICB2YXIgdGVzdCwgYm9keSwgb2xkSW5J dGVyYXRpb247CisKKyAgICAgICAgZXhwZWN0S2V5d29yZCgnd2hpbGUnKTsKKworICAgICAgICBl eHBlY3QoJygnKTsKKworICAgICAgICB0ZXN0ID0gcGFyc2VFeHByZXNzaW9uKCk7CisKKyAgICAg ICAgZXhwZWN0KCcpJyk7CisKKyAgICAgICAgb2xkSW5JdGVyYXRpb24gPSBzdGF0ZS5pbkl0ZXJh dGlvbjsKKyAgICAgICAgc3RhdGUuaW5JdGVyYXRpb24gPSB0cnVlOworCisgICAgICAgIGJvZHkg PSBwYXJzZVN0YXRlbWVudCgpOworCisgICAgICAgIHN0YXRlLmluSXRlcmF0aW9uID0gb2xkSW5J dGVyYXRpb247CisKKyAgICAgICAgcmV0dXJuIGRlbGVnYXRlLmNyZWF0ZVdoaWxlU3RhdGVtZW50 KHRlc3QsIGJvZHkpOworICAgIH0KKworICAgIGZ1bmN0aW9uIHBhcnNlRm9yVmFyaWFibGVEZWNs YXJhdGlvbigpIHsKKyAgICAgICAgdmFyIHRva2VuLCBkZWNsYXJhdGlvbnMsIHN0YXJ0VG9rZW47 CisKKyAgICAgICAgc3RhcnRUb2tlbiA9IGxvb2thaGVhZDsKKyAgICAgICAgdG9rZW4gPSBsZXgo KTsKKyAgICAgICAgZGVjbGFyYXRpb25zID0gcGFyc2VWYXJpYWJsZURlY2xhcmF0aW9uTGlzdCgp OworCisgICAgICAgIHJldHVybiBkZWxlZ2F0ZS5tYXJrRW5kKGRlbGVnYXRlLmNyZWF0ZVZhcmlh YmxlRGVjbGFyYXRpb24oZGVjbGFyYXRpb25zLCB0b2tlbi52YWx1ZSksIHN0YXJ0VG9rZW4pOwor ICAgIH0KKworICAgIGZ1bmN0aW9uIHBhcnNlRm9yU3RhdGVtZW50KCkgeworICAgICAgICB2YXIg aW5pdCwgdGVzdCwgdXBkYXRlLCBsZWZ0LCByaWdodCwgYm9keSwgb2xkSW5JdGVyYXRpb247CisK KyAgICAgICAgaW5pdCA9IHRlc3QgPSB1cGRhdGUgPSBudWxsOworCisgICAgICAgIGV4cGVjdEtl eXdvcmQoJ2ZvcicpOworCisgICAgICAgIGV4cGVjdCgnKCcpOworCisgICAgICAgIGlmIChtYXRj aCgnOycpKSB7CisgICAgICAgICAgICBsZXgoKTsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAg ICAgIGlmIChtYXRjaEtleXdvcmQoJ3ZhcicpIHx8IG1hdGNoS2V5d29yZCgnbGV0JykpIHsKKyAg ICAgICAgICAgICAgICBzdGF0ZS5hbGxvd0luID0gZmFsc2U7CisgICAgICAgICAgICAgICAgaW5p dCA9IHBhcnNlRm9yVmFyaWFibGVEZWNsYXJhdGlvbigpOworICAgICAgICAgICAgICAgIHN0YXRl LmFsbG93SW4gPSB0cnVlOworCisgICAgICAgICAgICAgICAgaWYgKGluaXQuZGVjbGFyYXRpb25z Lmxlbmd0aCA9PT0gMSAmJiBtYXRjaEtleXdvcmQoJ2luJykpIHsKKyAgICAgICAgICAgICAgICAg ICAgbGV4KCk7CisgICAgICAgICAgICAgICAgICAgIGxlZnQgPSBpbml0OworICAgICAgICAgICAg ICAgICAgICByaWdodCA9IHBhcnNlRXhwcmVzc2lvbigpOworICAgICAgICAgICAgICAgICAgICBp bml0ID0gbnVsbDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9IGVsc2UgeworICAg ICAgICAgICAgICAgIHN0YXRlLmFsbG93SW4gPSBmYWxzZTsKKyAgICAgICAgICAgICAgICBpbml0 ID0gcGFyc2VFeHByZXNzaW9uKCk7CisgICAgICAgICAgICAgICAgc3RhdGUuYWxsb3dJbiA9IHRy dWU7CisKKyAgICAgICAgICAgICAgICBpZiAobWF0Y2hLZXl3b3JkKCdpbicpKSB7CisgICAgICAg ICAgICAgICAgICAgIC8vIExlZnRIYW5kU2lkZUV4cHJlc3Npb24KKyAgICAgICAgICAgICAgICAg ICAgaWYgKCFpc0xlZnRIYW5kU2lkZShpbml0KSkgeworICAgICAgICAgICAgICAgICAgICAgICAg dGhyb3dFcnJvclRvbGVyYW50KHt9LCBNZXNzYWdlcy5JbnZhbGlkTEhTSW5Gb3JJbik7CisgICAg ICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICBsZXgoKTsKKyAgICAgICAg ICAgICAgICAgICAgbGVmdCA9IGluaXQ7CisgICAgICAgICAgICAgICAgICAgIHJpZ2h0ID0gcGFy c2VFeHByZXNzaW9uKCk7CisgICAgICAgICAgICAgICAgICAgIGluaXQgPSBudWxsOworICAgICAg ICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKHR5cGVvZiBsZWZ0 ID09PSAndW5kZWZpbmVkJykgeworICAgICAgICAgICAgICAgIGV4cGVjdCgnOycpOworICAgICAg ICAgICAgfQorICAgICAgICB9CisKKyAgICAgICAgaWYgKHR5cGVvZiBsZWZ0ID09PSAndW5kZWZp bmVkJykgeworCisgICAgICAgICAgICBpZiAoIW1hdGNoKCc7JykpIHsKKyAgICAgICAgICAgICAg ICB0ZXN0ID0gcGFyc2VFeHByZXNzaW9uKCk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBl eHBlY3QoJzsnKTsKKworICAgICAgICAgICAgaWYgKCFtYXRjaCgnKScpKSB7CisgICAgICAgICAg ICAgICAgdXBkYXRlID0gcGFyc2VFeHByZXNzaW9uKCk7CisgICAgICAgICAgICB9CisgICAgICAg IH0KKworICAgICAgICBleHBlY3QoJyknKTsKKworICAgICAgICBvbGRJbkl0ZXJhdGlvbiA9IHN0 YXRlLmluSXRlcmF0aW9uOworICAgICAgICBzdGF0ZS5pbkl0ZXJhdGlvbiA9IHRydWU7CisKKyAg ICAgICAgYm9keSA9IHBhcnNlU3RhdGVtZW50KCk7CisKKyAgICAgICAgc3RhdGUuaW5JdGVyYXRp b24gPSBvbGRJbkl0ZXJhdGlvbjsKKworICAgICAgICByZXR1cm4gKHR5cGVvZiBsZWZ0ID09PSAn dW5kZWZpbmVkJykgPworICAgICAgICAgICAgICAgIGRlbGVnYXRlLmNyZWF0ZUZvclN0YXRlbWVu dChpbml0LCB0ZXN0LCB1cGRhdGUsIGJvZHkpIDoKKyAgICAgICAgICAgICAgICBkZWxlZ2F0ZS5j cmVhdGVGb3JJblN0YXRlbWVudChsZWZ0LCByaWdodCwgYm9keSk7CisgICAgfQorCisgICAgLy8g MTIuNyBUaGUgY29udGludWUgc3RhdGVtZW50CisKKyAgICBmdW5jdGlvbiBwYXJzZUNvbnRpbnVl U3RhdGVtZW50KCkgeworICAgICAgICB2YXIgbGFiZWwgPSBudWxsLCBrZXk7CisKKyAgICAgICAg ZXhwZWN0S2V5d29yZCgnY29udGludWUnKTsKKworICAgICAgICAvLyBPcHRpbWl6ZSB0aGUgbW9z dCBjb21tb24gZm9ybTogJ2NvbnRpbnVlOycuCisgICAgICAgIGlmIChzb3VyY2UuY2hhckNvZGVB dChpbmRleCkgPT09IDB4M0IpIHsKKyAgICAgICAgICAgIGxleCgpOworCisgICAgICAgICAgICBp ZiAoIXN0YXRlLmluSXRlcmF0aW9uKSB7CisgICAgICAgICAgICAgICAgdGhyb3dFcnJvcih7fSwg TWVzc2FnZXMuSWxsZWdhbENvbnRpbnVlKTsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAg cmV0dXJuIGRlbGVnYXRlLmNyZWF0ZUNvbnRpbnVlU3RhdGVtZW50KG51bGwpOworICAgICAgICB9 CisKKyAgICAgICAgaWYgKHBlZWtMaW5lVGVybWluYXRvcigpKSB7CisgICAgICAgICAgICBpZiAo IXN0YXRlLmluSXRlcmF0aW9uKSB7CisgICAgICAgICAgICAgICAgdGhyb3dFcnJvcih7fSwgTWVz c2FnZXMuSWxsZWdhbENvbnRpbnVlKTsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgcmV0 dXJuIGRlbGVnYXRlLmNyZWF0ZUNvbnRpbnVlU3RhdGVtZW50KG51bGwpOworICAgICAgICB9CisK KyAgICAgICAgaWYgKGxvb2thaGVhZC50eXBlID09PSBUb2tlbi5JZGVudGlmaWVyKSB7CisgICAg ICAgICAgICBsYWJlbCA9IHBhcnNlVmFyaWFibGVJZGVudGlmaWVyKCk7CisKKyAgICAgICAgICAg IGtleSA9ICckJyArIGxhYmVsLm5hbWU7CisgICAgICAgICAgICBpZiAoIU9iamVjdC5wcm90b3R5 cGUuaGFzT3duUHJvcGVydHkuY2FsbChzdGF0ZS5sYWJlbFNldCwga2V5KSkgeworICAgICAgICAg ICAgICAgIHRocm93RXJyb3Ioe30sIE1lc3NhZ2VzLlVua25vd25MYWJlbCwgbGFiZWwubmFtZSk7 CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAgICBjb25zdW1lU2VtaWNvbG9uKCk7 CisKKyAgICAgICAgaWYgKGxhYmVsID09PSBudWxsICYmICFzdGF0ZS5pbkl0ZXJhdGlvbikgewor ICAgICAgICAgICAgdGhyb3dFcnJvcih7fSwgTWVzc2FnZXMuSWxsZWdhbENvbnRpbnVlKTsKKyAg ICAgICAgfQorCisgICAgICAgIHJldHVybiBkZWxlZ2F0ZS5jcmVhdGVDb250aW51ZVN0YXRlbWVu dChsYWJlbCk7CisgICAgfQorCisgICAgLy8gMTIuOCBUaGUgYnJlYWsgc3RhdGVtZW50CisKKyAg ICBmdW5jdGlvbiBwYXJzZUJyZWFrU3RhdGVtZW50KCkgeworICAgICAgICB2YXIgbGFiZWwgPSBu dWxsLCBrZXk7CisKKyAgICAgICAgZXhwZWN0S2V5d29yZCgnYnJlYWsnKTsKKworICAgICAgICAv LyBDYXRjaCB0aGUgdmVyeSBjb21tb24gY2FzZSBmaXJzdDogaW1tZWRpYXRlbHkgYSBzZW1pY29s b24gKFUrMDAzQikuCisgICAgICAgIGlmIChzb3VyY2UuY2hhckNvZGVBdChpbmRleCkgPT09IDB4 M0IpIHsKKyAgICAgICAgICAgIGxleCgpOworCisgICAgICAgICAgICBpZiAoIShzdGF0ZS5pbkl0 ZXJhdGlvbiB8fCBzdGF0ZS5pblN3aXRjaCkpIHsKKyAgICAgICAgICAgICAgICB0aHJvd0Vycm9y KHt9LCBNZXNzYWdlcy5JbGxlZ2FsQnJlYWspOworICAgICAgICAgICAgfQorCisgICAgICAgICAg ICByZXR1cm4gZGVsZWdhdGUuY3JlYXRlQnJlYWtTdGF0ZW1lbnQobnVsbCk7CisgICAgICAgIH0K KworICAgICAgICBpZiAocGVla0xpbmVUZXJtaW5hdG9yKCkpIHsKKyAgICAgICAgICAgIGlmICgh KHN0YXRlLmluSXRlcmF0aW9uIHx8IHN0YXRlLmluU3dpdGNoKSkgeworICAgICAgICAgICAgICAg IHRocm93RXJyb3Ioe30sIE1lc3NhZ2VzLklsbGVnYWxCcmVhayk7CisgICAgICAgICAgICB9CisK KyAgICAgICAgICAgIHJldHVybiBkZWxlZ2F0ZS5jcmVhdGVCcmVha1N0YXRlbWVudChudWxsKTsK KyAgICAgICAgfQorCisgICAgICAgIGlmIChsb29rYWhlYWQudHlwZSA9PT0gVG9rZW4uSWRlbnRp ZmllcikgeworICAgICAgICAgICAgbGFiZWwgPSBwYXJzZVZhcmlhYmxlSWRlbnRpZmllcigpOwor CisgICAgICAgICAgICBrZXkgPSAnJCcgKyBsYWJlbC5uYW1lOworICAgICAgICAgICAgaWYgKCFP YmplY3QucHJvdG90eXBlLmhhc093blByb3BlcnR5LmNhbGwoc3RhdGUubGFiZWxTZXQsIGtleSkp IHsKKyAgICAgICAgICAgICAgICB0aHJvd0Vycm9yKHt9LCBNZXNzYWdlcy5Vbmtub3duTGFiZWws IGxhYmVsLm5hbWUpOworICAgICAgICAgICAgfQorICAgICAgICB9CisKKyAgICAgICAgY29uc3Vt ZVNlbWljb2xvbigpOworCisgICAgICAgIGlmIChsYWJlbCA9PT0gbnVsbCAmJiAhKHN0YXRlLmlu SXRlcmF0aW9uIHx8IHN0YXRlLmluU3dpdGNoKSkgeworICAgICAgICAgICAgdGhyb3dFcnJvcih7 fSwgTWVzc2FnZXMuSWxsZWdhbEJyZWFrKTsKKyAgICAgICAgfQorCisgICAgICAgIHJldHVybiBk ZWxlZ2F0ZS5jcmVhdGVCcmVha1N0YXRlbWVudChsYWJlbCk7CisgICAgfQorCisgICAgLy8gMTIu OSBUaGUgcmV0dXJuIHN0YXRlbWVudAorCisgICAgZnVuY3Rpb24gcGFyc2VSZXR1cm5TdGF0ZW1l bnQoKSB7CisgICAgICAgIHZhciBhcmd1bWVudCA9IG51bGw7CisKKyAgICAgICAgZXhwZWN0S2V5 d29yZCgncmV0dXJuJyk7CisKKyAgICAgICAgaWYgKCFzdGF0ZS5pbkZ1bmN0aW9uQm9keSkgewor ICAgICAgICAgICAgdGhyb3dFcnJvclRvbGVyYW50KHt9LCBNZXNzYWdlcy5JbGxlZ2FsUmV0dXJu KTsKKyAgICAgICAgfQorCisgICAgICAgIC8vICdyZXR1cm4nIGZvbGxvd2VkIGJ5IGEgc3BhY2Ug YW5kIGFuIGlkZW50aWZpZXIgaXMgdmVyeSBjb21tb24uCisgICAgICAgIGlmIChzb3VyY2UuY2hh ckNvZGVBdChpbmRleCkgPT09IDB4MjApIHsKKyAgICAgICAgICAgIGlmIChpc0lkZW50aWZpZXJT dGFydChzb3VyY2UuY2hhckNvZGVBdChpbmRleCArIDEpKSkgeworICAgICAgICAgICAgICAgIGFy Z3VtZW50ID0gcGFyc2VFeHByZXNzaW9uKCk7CisgICAgICAgICAgICAgICAgY29uc3VtZVNlbWlj b2xvbigpOworICAgICAgICAgICAgICAgIHJldHVybiBkZWxlZ2F0ZS5jcmVhdGVSZXR1cm5TdGF0 ZW1lbnQoYXJndW1lbnQpOworICAgICAgICAgICAgfQorICAgICAgICB9CisKKyAgICAgICAgaWYg KHBlZWtMaW5lVGVybWluYXRvcigpKSB7CisgICAgICAgICAgICByZXR1cm4gZGVsZWdhdGUuY3Jl YXRlUmV0dXJuU3RhdGVtZW50KG51bGwpOworICAgICAgICB9CisKKyAgICAgICAgaWYgKCFtYXRj aCgnOycpKSB7CisgICAgICAgICAgICBpZiAoIW1hdGNoKCd9JykgJiYgbG9va2FoZWFkLnR5cGUg IT09IFRva2VuLkVPRikgeworICAgICAgICAgICAgICAgIGFyZ3VtZW50ID0gcGFyc2VFeHByZXNz aW9uKCk7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAgICBjb25zdW1lU2VtaWNv bG9uKCk7CisKKyAgICAgICAgcmV0dXJuIGRlbGVnYXRlLmNyZWF0ZVJldHVyblN0YXRlbWVudChh cmd1bWVudCk7CisgICAgfQorCisgICAgLy8gMTIuMTAgVGhlIHdpdGggc3RhdGVtZW50CisKKyAg ICBmdW5jdGlvbiBwYXJzZVdpdGhTdGF0ZW1lbnQoKSB7CisgICAgICAgIHZhciBvYmplY3QsIGJv ZHk7CisKKyAgICAgICAgaWYgKHN0cmljdCkgeworICAgICAgICAgICAgLy8gVE9ETyhpa2FyaWVu YXRvcik6IFNob3VsZCB3ZSB1cGRhdGUgdGhlIHRlc3QgY2FzZXMgaW5zdGVhZD8KKyAgICAgICAg ICAgIHNraXBDb21tZW50KCk7CisgICAgICAgICAgICB0aHJvd0Vycm9yVG9sZXJhbnQoe30sIE1l c3NhZ2VzLlN0cmljdE1vZGVXaXRoKTsKKyAgICAgICAgfQorCisgICAgICAgIGV4cGVjdEtleXdv cmQoJ3dpdGgnKTsKKworICAgICAgICBleHBlY3QoJygnKTsKKworICAgICAgICBvYmplY3QgPSBw YXJzZUV4cHJlc3Npb24oKTsKKworICAgICAgICBleHBlY3QoJyknKTsKKworICAgICAgICBib2R5 ID0gcGFyc2VTdGF0ZW1lbnQoKTsKKworICAgICAgICByZXR1cm4gZGVsZWdhdGUuY3JlYXRlV2l0 aFN0YXRlbWVudChvYmplY3QsIGJvZHkpOworICAgIH0KKworICAgIC8vIDEyLjEwIFRoZSBzd2l0 aCBzdGF0ZW1lbnQKKworICAgIGZ1bmN0aW9uIHBhcnNlU3dpdGNoQ2FzZSgpIHsKKyAgICAgICAg dmFyIHRlc3QsIGNvbnNlcXVlbnQgPSBbXSwgc3RhdGVtZW50LCBzdGFydFRva2VuOworCisgICAg ICAgIHN0YXJ0VG9rZW4gPSBsb29rYWhlYWQ7CisgICAgICAgIGlmIChtYXRjaEtleXdvcmQoJ2Rl ZmF1bHQnKSkgeworICAgICAgICAgICAgbGV4KCk7CisgICAgICAgICAgICB0ZXN0ID0gbnVsbDsK KyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIGV4cGVjdEtleXdvcmQoJ2Nhc2UnKTsKKyAg ICAgICAgICAgIHRlc3QgPSBwYXJzZUV4cHJlc3Npb24oKTsKKyAgICAgICAgfQorICAgICAgICBl eHBlY3QoJzonKTsKKworICAgICAgICB3aGlsZSAoaW5kZXggPCBsZW5ndGgpIHsKKyAgICAgICAg ICAgIGlmIChtYXRjaCgnfScpIHx8IG1hdGNoS2V5d29yZCgnZGVmYXVsdCcpIHx8IG1hdGNoS2V5 d29yZCgnY2FzZScpKSB7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICB9Cisg ICAgICAgICAgICBzdGF0ZW1lbnQgPSBwYXJzZVN0YXRlbWVudCgpOworICAgICAgICAgICAgY29u c2VxdWVudC5wdXNoKHN0YXRlbWVudCk7CisgICAgICAgIH0KKworICAgICAgICByZXR1cm4gZGVs ZWdhdGUubWFya0VuZChkZWxlZ2F0ZS5jcmVhdGVTd2l0Y2hDYXNlKHRlc3QsIGNvbnNlcXVlbnQp LCBzdGFydFRva2VuKTsKKyAgICB9CisKKyAgICBmdW5jdGlvbiBwYXJzZVN3aXRjaFN0YXRlbWVu dCgpIHsKKyAgICAgICAgdmFyIGRpc2NyaW1pbmFudCwgY2FzZXMsIGNsYXVzZSwgb2xkSW5Td2l0 Y2gsIGRlZmF1bHRGb3VuZDsKKworICAgICAgICBleHBlY3RLZXl3b3JkKCdzd2l0Y2gnKTsKKwor ICAgICAgICBleHBlY3QoJygnKTsKKworICAgICAgICBkaXNjcmltaW5hbnQgPSBwYXJzZUV4cHJl c3Npb24oKTsKKworICAgICAgICBleHBlY3QoJyknKTsKKworICAgICAgICBleHBlY3QoJ3snKTsK KworICAgICAgICBjYXNlcyA9IFtdOworCisgICAgICAgIGlmIChtYXRjaCgnfScpKSB7CisgICAg ICAgICAgICBsZXgoKTsKKyAgICAgICAgICAgIHJldHVybiBkZWxlZ2F0ZS5jcmVhdGVTd2l0Y2hT dGF0ZW1lbnQoZGlzY3JpbWluYW50LCBjYXNlcyk7CisgICAgICAgIH0KKworICAgICAgICBvbGRJ blN3aXRjaCA9IHN0YXRlLmluU3dpdGNoOworICAgICAgICBzdGF0ZS5pblN3aXRjaCA9IHRydWU7 CisgICAgICAgIGRlZmF1bHRGb3VuZCA9IGZhbHNlOworCisgICAgICAgIHdoaWxlIChpbmRleCA8 IGxlbmd0aCkgeworICAgICAgICAgICAgaWYgKG1hdGNoKCd9JykpIHsKKyAgICAgICAgICAgICAg ICBicmVhazsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGNsYXVzZSA9IHBhcnNlU3dpdGNo Q2FzZSgpOworICAgICAgICAgICAgaWYgKGNsYXVzZS50ZXN0ID09PSBudWxsKSB7CisgICAgICAg ICAgICAgICAgaWYgKGRlZmF1bHRGb3VuZCkgeworICAgICAgICAgICAgICAgICAgICB0aHJvd0Vy cm9yKHt9LCBNZXNzYWdlcy5NdWx0aXBsZURlZmF1bHRzSW5Td2l0Y2gpOworICAgICAgICAgICAg ICAgIH0KKyAgICAgICAgICAgICAgICBkZWZhdWx0Rm91bmQgPSB0cnVlOworICAgICAgICAgICAg fQorICAgICAgICAgICAgY2FzZXMucHVzaChjbGF1c2UpOworICAgICAgICB9CisKKyAgICAgICAg c3RhdGUuaW5Td2l0Y2ggPSBvbGRJblN3aXRjaDsKKworICAgICAgICBleHBlY3QoJ30nKTsKKwor ICAgICAgICByZXR1cm4gZGVsZWdhdGUuY3JlYXRlU3dpdGNoU3RhdGVtZW50KGRpc2NyaW1pbmFu dCwgY2FzZXMpOworICAgIH0KKworICAgIC8vIDEyLjEzIFRoZSB0aHJvdyBzdGF0ZW1lbnQKKwor ICAgIGZ1bmN0aW9uIHBhcnNlVGhyb3dTdGF0ZW1lbnQoKSB7CisgICAgICAgIHZhciBhcmd1bWVu dDsKKworICAgICAgICBleHBlY3RLZXl3b3JkKCd0aHJvdycpOworCisgICAgICAgIGlmIChwZWVr TGluZVRlcm1pbmF0b3IoKSkgeworICAgICAgICAgICAgdGhyb3dFcnJvcih7fSwgTWVzc2FnZXMu TmV3bGluZUFmdGVyVGhyb3cpOworICAgICAgICB9CisKKyAgICAgICAgYXJndW1lbnQgPSBwYXJz ZUV4cHJlc3Npb24oKTsKKworICAgICAgICBjb25zdW1lU2VtaWNvbG9uKCk7CisKKyAgICAgICAg cmV0dXJuIGRlbGVnYXRlLmNyZWF0ZVRocm93U3RhdGVtZW50KGFyZ3VtZW50KTsKKyAgICB9CisK KyAgICAvLyAxMi4xNCBUaGUgdHJ5IHN0YXRlbWVudAorCisgICAgZnVuY3Rpb24gcGFyc2VDYXRj aENsYXVzZSgpIHsKKyAgICAgICAgdmFyIHBhcmFtLCBib2R5LCBzdGFydFRva2VuOworCisgICAg ICAgIHN0YXJ0VG9rZW4gPSBsb29rYWhlYWQ7CisgICAgICAgIGV4cGVjdEtleXdvcmQoJ2NhdGNo Jyk7CisKKyAgICAgICAgZXhwZWN0KCcoJyk7CisgICAgICAgIGlmIChtYXRjaCgnKScpKSB7Cisg ICAgICAgICAgICB0aHJvd1VuZXhwZWN0ZWQobG9va2FoZWFkKTsKKyAgICAgICAgfQorCisgICAg ICAgIHBhcmFtID0gcGFyc2VWYXJpYWJsZUlkZW50aWZpZXIoKTsKKyAgICAgICAgLy8gMTIuMTQu MQorICAgICAgICBpZiAoc3RyaWN0ICYmIGlzUmVzdHJpY3RlZFdvcmQocGFyYW0ubmFtZSkpIHsK KyAgICAgICAgICAgIHRocm93RXJyb3JUb2xlcmFudCh7fSwgTWVzc2FnZXMuU3RyaWN0Q2F0Y2hW YXJpYWJsZSk7CisgICAgICAgIH0KKworICAgICAgICBleHBlY3QoJyknKTsKKyAgICAgICAgYm9k eSA9IHBhcnNlQmxvY2soKTsKKyAgICAgICAgcmV0dXJuIGRlbGVnYXRlLm1hcmtFbmQoZGVsZWdh dGUuY3JlYXRlQ2F0Y2hDbGF1c2UocGFyYW0sIGJvZHkpLCBzdGFydFRva2VuKTsKKyAgICB9CisK KyAgICBmdW5jdGlvbiBwYXJzZVRyeVN0YXRlbWVudCgpIHsKKyAgICAgICAgdmFyIGJsb2NrLCBo YW5kbGVycyA9IFtdLCBmaW5hbGl6ZXIgPSBudWxsOworCisgICAgICAgIGV4cGVjdEtleXdvcmQo J3RyeScpOworCisgICAgICAgIGJsb2NrID0gcGFyc2VCbG9jaygpOworCisgICAgICAgIGlmICht YXRjaEtleXdvcmQoJ2NhdGNoJykpIHsKKyAgICAgICAgICAgIGhhbmRsZXJzLnB1c2gocGFyc2VD YXRjaENsYXVzZSgpKTsKKyAgICAgICAgfQorCisgICAgICAgIGlmIChtYXRjaEtleXdvcmQoJ2Zp bmFsbHknKSkgeworICAgICAgICAgICAgbGV4KCk7CisgICAgICAgICAgICBmaW5hbGl6ZXIgPSBw YXJzZUJsb2NrKCk7CisgICAgICAgIH0KKworICAgICAgICBpZiAoaGFuZGxlcnMubGVuZ3RoID09 PSAwICYmICFmaW5hbGl6ZXIpIHsKKyAgICAgICAgICAgIHRocm93RXJyb3Ioe30sIE1lc3NhZ2Vz Lk5vQ2F0Y2hPckZpbmFsbHkpOworICAgICAgICB9CisKKyAgICAgICAgcmV0dXJuIGRlbGVnYXRl LmNyZWF0ZVRyeVN0YXRlbWVudChibG9jaywgW10sIGhhbmRsZXJzLCBmaW5hbGl6ZXIpOworICAg IH0KKworICAgIC8vIDEyLjE1IFRoZSBkZWJ1Z2dlciBzdGF0ZW1lbnQKKworICAgIGZ1bmN0aW9u IHBhcnNlRGVidWdnZXJTdGF0ZW1lbnQoKSB7CisgICAgICAgIGV4cGVjdEtleXdvcmQoJ2RlYnVn Z2VyJyk7CisKKyAgICAgICAgY29uc3VtZVNlbWljb2xvbigpOworCisgICAgICAgIHJldHVybiBk ZWxlZ2F0ZS5jcmVhdGVEZWJ1Z2dlclN0YXRlbWVudCgpOworICAgIH0KKworICAgIC8vIDEyIFN0 YXRlbWVudHMKKworICAgIGZ1bmN0aW9uIHBhcnNlU3RhdGVtZW50KCkgeworICAgICAgICB2YXIg dHlwZSA9IGxvb2thaGVhZC50eXBlLAorICAgICAgICAgICAgZXhwciwKKyAgICAgICAgICAgIGxh YmVsZWRCb2R5LAorICAgICAgICAgICAga2V5LAorICAgICAgICAgICAgc3RhcnRUb2tlbjsKKwor ICAgICAgICBpZiAodHlwZSA9PT0gVG9rZW4uRU9GKSB7CisgICAgICAgICAgICB0aHJvd1VuZXhw ZWN0ZWQobG9va2FoZWFkKTsKKyAgICAgICAgfQorCisgICAgICAgIGlmICh0eXBlID09PSBUb2tl bi5QdW5jdHVhdG9yICYmIGxvb2thaGVhZC52YWx1ZSA9PT0gJ3snKSB7CisgICAgICAgICAgICBy ZXR1cm4gcGFyc2VCbG9jaygpOworICAgICAgICB9CisKKyAgICAgICAgc3RhcnRUb2tlbiA9IGxv b2thaGVhZDsKKworICAgICAgICBpZiAodHlwZSA9PT0gVG9rZW4uUHVuY3R1YXRvcikgeworICAg ICAgICAgICAgc3dpdGNoIChsb29rYWhlYWQudmFsdWUpIHsKKyAgICAgICAgICAgIGNhc2UgJzsn OgorICAgICAgICAgICAgICAgIHJldHVybiBkZWxlZ2F0ZS5tYXJrRW5kKHBhcnNlRW1wdHlTdGF0 ZW1lbnQoKSwgc3RhcnRUb2tlbik7CisgICAgICAgICAgICBjYXNlICcoJzoKKyAgICAgICAgICAg ICAgICByZXR1cm4gZGVsZWdhdGUubWFya0VuZChwYXJzZUV4cHJlc3Npb25TdGF0ZW1lbnQoKSwg c3RhcnRUb2tlbik7CisgICAgICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgICAgIGJyZWFr OworICAgICAgICAgICAgfQorICAgICAgICB9CisKKyAgICAgICAgaWYgKHR5cGUgPT09IFRva2Vu LktleXdvcmQpIHsKKyAgICAgICAgICAgIHN3aXRjaCAobG9va2FoZWFkLnZhbHVlKSB7CisgICAg ICAgICAgICBjYXNlICdicmVhayc6CisgICAgICAgICAgICAgICAgcmV0dXJuIGRlbGVnYXRlLm1h cmtFbmQocGFyc2VCcmVha1N0YXRlbWVudCgpLCBzdGFydFRva2VuKTsKKyAgICAgICAgICAgIGNh c2UgJ2NvbnRpbnVlJzoKKyAgICAgICAgICAgICAgICByZXR1cm4gZGVsZWdhdGUubWFya0VuZChw YXJzZUNvbnRpbnVlU3RhdGVtZW50KCksIHN0YXJ0VG9rZW4pOworICAgICAgICAgICAgY2FzZSAn ZGVidWdnZXInOgorICAgICAgICAgICAgICAgIHJldHVybiBkZWxlZ2F0ZS5tYXJrRW5kKHBhcnNl RGVidWdnZXJTdGF0ZW1lbnQoKSwgc3RhcnRUb2tlbik7CisgICAgICAgICAgICBjYXNlICdkbyc6 CisgICAgICAgICAgICAgICAgcmV0dXJuIGRlbGVnYXRlLm1hcmtFbmQocGFyc2VEb1doaWxlU3Rh dGVtZW50KCksIHN0YXJ0VG9rZW4pOworICAgICAgICAgICAgY2FzZSAnZm9yJzoKKyAgICAgICAg ICAgICAgICByZXR1cm4gZGVsZWdhdGUubWFya0VuZChwYXJzZUZvclN0YXRlbWVudCgpLCBzdGFy dFRva2VuKTsKKyAgICAgICAgICAgIGNhc2UgJ2Z1bmN0aW9uJzoKKyAgICAgICAgICAgICAgICBy ZXR1cm4gZGVsZWdhdGUubWFya0VuZChwYXJzZUZ1bmN0aW9uRGVjbGFyYXRpb24oKSwgc3RhcnRU b2tlbik7CisgICAgICAgICAgICBjYXNlICdpZic6CisgICAgICAgICAgICAgICAgcmV0dXJuIGRl bGVnYXRlLm1hcmtFbmQocGFyc2VJZlN0YXRlbWVudCgpLCBzdGFydFRva2VuKTsKKyAgICAgICAg ICAgIGNhc2UgJ3JldHVybic6CisgICAgICAgICAgICAgICAgcmV0dXJuIGRlbGVnYXRlLm1hcmtF bmQocGFyc2VSZXR1cm5TdGF0ZW1lbnQoKSwgc3RhcnRUb2tlbik7CisgICAgICAgICAgICBjYXNl ICdzd2l0Y2gnOgorICAgICAgICAgICAgICAgIHJldHVybiBkZWxlZ2F0ZS5tYXJrRW5kKHBhcnNl U3dpdGNoU3RhdGVtZW50KCksIHN0YXJ0VG9rZW4pOworICAgICAgICAgICAgY2FzZSAndGhyb3cn OgorICAgICAgICAgICAgICAgIHJldHVybiBkZWxlZ2F0ZS5tYXJrRW5kKHBhcnNlVGhyb3dTdGF0 ZW1lbnQoKSwgc3RhcnRUb2tlbik7CisgICAgICAgICAgICBjYXNlICd0cnknOgorICAgICAgICAg ICAgICAgIHJldHVybiBkZWxlZ2F0ZS5tYXJrRW5kKHBhcnNlVHJ5U3RhdGVtZW50KCksIHN0YXJ0 VG9rZW4pOworICAgICAgICAgICAgY2FzZSAndmFyJzoKKyAgICAgICAgICAgICAgICByZXR1cm4g ZGVsZWdhdGUubWFya0VuZChwYXJzZVZhcmlhYmxlU3RhdGVtZW50KCksIHN0YXJ0VG9rZW4pOwor ICAgICAgICAgICAgY2FzZSAnd2hpbGUnOgorICAgICAgICAgICAgICAgIHJldHVybiBkZWxlZ2F0 ZS5tYXJrRW5kKHBhcnNlV2hpbGVTdGF0ZW1lbnQoKSwgc3RhcnRUb2tlbik7CisgICAgICAgICAg ICBjYXNlICd3aXRoJzoKKyAgICAgICAgICAgICAgICByZXR1cm4gZGVsZWdhdGUubWFya0VuZChw YXJzZVdpdGhTdGF0ZW1lbnQoKSwgc3RhcnRUb2tlbik7CisgICAgICAgICAgICBkZWZhdWx0Ogor ICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQorICAgICAgICB9CisKKyAgICAg ICAgZXhwciA9IHBhcnNlRXhwcmVzc2lvbigpOworCisgICAgICAgIC8vIDEyLjEyIExhYmVsbGVk IFN0YXRlbWVudHMKKyAgICAgICAgaWYgKChleHByLnR5cGUgPT09IFN5bnRheC5JZGVudGlmaWVy KSAmJiBtYXRjaCgnOicpKSB7CisgICAgICAgICAgICBsZXgoKTsKKworICAgICAgICAgICAga2V5 ID0gJyQnICsgZXhwci5uYW1lOworICAgICAgICAgICAgaWYgKE9iamVjdC5wcm90b3R5cGUuaGFz T3duUHJvcGVydHkuY2FsbChzdGF0ZS5sYWJlbFNldCwga2V5KSkgeworICAgICAgICAgICAgICAg IHRocm93RXJyb3Ioe30sIE1lc3NhZ2VzLlJlZGVjbGFyYXRpb24sICdMYWJlbCcsIGV4cHIubmFt ZSk7CisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0YXRlLmxhYmVsU2V0W2tleV0gPSB0 cnVlOworICAgICAgICAgICAgbGFiZWxlZEJvZHkgPSBwYXJzZVN0YXRlbWVudCgpOworICAgICAg ICAgICAgZGVsZXRlIHN0YXRlLmxhYmVsU2V0W2tleV07CisgICAgICAgICAgICByZXR1cm4gZGVs ZWdhdGUubWFya0VuZChkZWxlZ2F0ZS5jcmVhdGVMYWJlbGVkU3RhdGVtZW50KGV4cHIsIGxhYmVs ZWRCb2R5KSwgc3RhcnRUb2tlbik7CisgICAgICAgIH0KKworICAgICAgICBjb25zdW1lU2VtaWNv bG9uKCk7CisKKyAgICAgICAgcmV0dXJuIGRlbGVnYXRlLm1hcmtFbmQoZGVsZWdhdGUuY3JlYXRl RXhwcmVzc2lvblN0YXRlbWVudChleHByKSwgc3RhcnRUb2tlbik7CisgICAgfQorCisgICAgLy8g MTMgRnVuY3Rpb24gRGVmaW5pdGlvbgorCisgICAgZnVuY3Rpb24gcGFyc2VGdW5jdGlvblNvdXJj ZUVsZW1lbnRzKCkgeworICAgICAgICB2YXIgc291cmNlRWxlbWVudCwgc291cmNlRWxlbWVudHMg PSBbXSwgdG9rZW4sIGRpcmVjdGl2ZSwgZmlyc3RSZXN0cmljdGVkLAorICAgICAgICAgICAgb2xk TGFiZWxTZXQsIG9sZEluSXRlcmF0aW9uLCBvbGRJblN3aXRjaCwgb2xkSW5GdW5jdGlvbkJvZHks IHN0YXJ0VG9rZW47CisKKyAgICAgICAgc3RhcnRUb2tlbiA9IGxvb2thaGVhZDsKKyAgICAgICAg ZXhwZWN0KCd7Jyk7CisKKyAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7CisgICAgICAg ICAgICBpZiAobG9va2FoZWFkLnR5cGUgIT09IFRva2VuLlN0cmluZ0xpdGVyYWwpIHsKKyAgICAg ICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHRva2VuID0gbG9v a2FoZWFkOworCisgICAgICAgICAgICBzb3VyY2VFbGVtZW50ID0gcGFyc2VTb3VyY2VFbGVtZW50 KCk7CisgICAgICAgICAgICBzb3VyY2VFbGVtZW50cy5wdXNoKHNvdXJjZUVsZW1lbnQpOworICAg ICAgICAgICAgaWYgKHNvdXJjZUVsZW1lbnQuZXhwcmVzc2lvbi50eXBlICE9PSBTeW50YXguTGl0 ZXJhbCkgeworICAgICAgICAgICAgICAgIC8vIHRoaXMgaXMgbm90IGRpcmVjdGl2ZQorICAgICAg ICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZGlyZWN0aXZlID0g c291cmNlLnNsaWNlKHRva2VuLnN0YXJ0ICsgMSwgdG9rZW4uZW5kIC0gMSk7CisgICAgICAgICAg ICBpZiAoZGlyZWN0aXZlID09PSAndXNlIHN0cmljdCcpIHsKKyAgICAgICAgICAgICAgICBzdHJp Y3QgPSB0cnVlOworICAgICAgICAgICAgICAgIGlmIChmaXJzdFJlc3RyaWN0ZWQpIHsKKyAgICAg ICAgICAgICAgICAgICAgdGhyb3dFcnJvclRvbGVyYW50KGZpcnN0UmVzdHJpY3RlZCwgTWVzc2Fn ZXMuU3RyaWN0T2N0YWxMaXRlcmFsKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9 IGVsc2UgeworICAgICAgICAgICAgICAgIGlmICghZmlyc3RSZXN0cmljdGVkICYmIHRva2VuLm9j dGFsKSB7CisgICAgICAgICAgICAgICAgICAgIGZpcnN0UmVzdHJpY3RlZCA9IHRva2VuOworICAg ICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorCisgICAgICAgIG9sZExh YmVsU2V0ID0gc3RhdGUubGFiZWxTZXQ7CisgICAgICAgIG9sZEluSXRlcmF0aW9uID0gc3RhdGUu aW5JdGVyYXRpb247CisgICAgICAgIG9sZEluU3dpdGNoID0gc3RhdGUuaW5Td2l0Y2g7CisgICAg ICAgIG9sZEluRnVuY3Rpb25Cb2R5ID0gc3RhdGUuaW5GdW5jdGlvbkJvZHk7CisKKyAgICAgICAg c3RhdGUubGFiZWxTZXQgPSB7fTsKKyAgICAgICAgc3RhdGUuaW5JdGVyYXRpb24gPSBmYWxzZTsK KyAgICAgICAgc3RhdGUuaW5Td2l0Y2ggPSBmYWxzZTsKKyAgICAgICAgc3RhdGUuaW5GdW5jdGlv bkJvZHkgPSB0cnVlOworCisgICAgICAgIHdoaWxlIChpbmRleCA8IGxlbmd0aCkgeworICAgICAg ICAgICAgaWYgKG1hdGNoKCd9JykpIHsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAg ICAgIH0KKyAgICAgICAgICAgIHNvdXJjZUVsZW1lbnQgPSBwYXJzZVNvdXJjZUVsZW1lbnQoKTsK KyAgICAgICAgICAgIGlmICh0eXBlb2Ygc291cmNlRWxlbWVudCA9PT0gJ3VuZGVmaW5lZCcpIHsK KyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHNvdXJj ZUVsZW1lbnRzLnB1c2goc291cmNlRWxlbWVudCk7CisgICAgICAgIH0KKworICAgICAgICBleHBl Y3QoJ30nKTsKKworICAgICAgICBzdGF0ZS5sYWJlbFNldCA9IG9sZExhYmVsU2V0OworICAgICAg ICBzdGF0ZS5pbkl0ZXJhdGlvbiA9IG9sZEluSXRlcmF0aW9uOworICAgICAgICBzdGF0ZS5pblN3 aXRjaCA9IG9sZEluU3dpdGNoOworICAgICAgICBzdGF0ZS5pbkZ1bmN0aW9uQm9keSA9IG9sZElu RnVuY3Rpb25Cb2R5OworCisgICAgICAgIHJldHVybiBkZWxlZ2F0ZS5tYXJrRW5kKGRlbGVnYXRl LmNyZWF0ZUJsb2NrU3RhdGVtZW50KHNvdXJjZUVsZW1lbnRzKSwgc3RhcnRUb2tlbik7CisgICAg fQorCisgICAgZnVuY3Rpb24gcGFyc2VQYXJhbXMoZmlyc3RSZXN0cmljdGVkKSB7CisgICAgICAg IHZhciBwYXJhbSwgcGFyYW1zID0gW10sIHRva2VuLCBzdHJpY3RlZCwgcGFyYW1TZXQsIGtleSwg bWVzc2FnZTsKKyAgICAgICAgZXhwZWN0KCcoJyk7CisKKyAgICAgICAgaWYgKCFtYXRjaCgnKScp KSB7CisgICAgICAgICAgICBwYXJhbVNldCA9IHt9OworICAgICAgICAgICAgd2hpbGUgKGluZGV4 IDwgbGVuZ3RoKSB7CisgICAgICAgICAgICAgICAgdG9rZW4gPSBsb29rYWhlYWQ7CisgICAgICAg ICAgICAgICAgcGFyYW0gPSBwYXJzZVZhcmlhYmxlSWRlbnRpZmllcigpOworICAgICAgICAgICAg ICAgIGtleSA9ICckJyArIHRva2VuLnZhbHVlOworICAgICAgICAgICAgICAgIGlmIChzdHJpY3Qp IHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGlzUmVzdHJpY3RlZFdvcmQodG9rZW4udmFsdWUp KSB7CisgICAgICAgICAgICAgICAgICAgICAgICBzdHJpY3RlZCA9IHRva2VuOworICAgICAgICAg ICAgICAgICAgICAgICAgbWVzc2FnZSA9IE1lc3NhZ2VzLlN0cmljdFBhcmFtTmFtZTsKKyAgICAg ICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBpZiAoT2JqZWN0LnByb3RvdHlw ZS5oYXNPd25Qcm9wZXJ0eS5jYWxsKHBhcmFtU2V0LCBrZXkpKSB7CisgICAgICAgICAgICAgICAg ICAgICAgICBzdHJpY3RlZCA9IHRva2VuOworICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2Fn ZSA9IE1lc3NhZ2VzLlN0cmljdFBhcmFtRHVwZTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAg ICAgICAgICAgICAgIH0gZWxzZSBpZiAoIWZpcnN0UmVzdHJpY3RlZCkgeworICAgICAgICAgICAg ICAgICAgICBpZiAoaXNSZXN0cmljdGVkV29yZCh0b2tlbi52YWx1ZSkpIHsKKyAgICAgICAgICAg ICAgICAgICAgICAgIGZpcnN0UmVzdHJpY3RlZCA9IHRva2VuOworICAgICAgICAgICAgICAgICAg ICAgICAgbWVzc2FnZSA9IE1lc3NhZ2VzLlN0cmljdFBhcmFtTmFtZTsKKyAgICAgICAgICAgICAg ICAgICAgfSBlbHNlIGlmIChpc1N0cmljdE1vZGVSZXNlcnZlZFdvcmQodG9rZW4udmFsdWUpKSB7 CisgICAgICAgICAgICAgICAgICAgICAgICBmaXJzdFJlc3RyaWN0ZWQgPSB0b2tlbjsKKyAgICAg ICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSBNZXNzYWdlcy5TdHJpY3RSZXNlcnZlZFdvcmQ7 CisgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoT2JqZWN0LnByb3RvdHlwZS5oYXNPd25Q cm9wZXJ0eS5jYWxsKHBhcmFtU2V0LCBrZXkpKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBm aXJzdFJlc3RyaWN0ZWQgPSB0b2tlbjsKKyAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Ug PSBNZXNzYWdlcy5TdHJpY3RQYXJhbUR1cGU7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAg ICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgcGFyYW1zLnB1c2gocGFyYW0pOworICAgICAg ICAgICAgICAgIHBhcmFtU2V0W2tleV0gPSB0cnVlOworICAgICAgICAgICAgICAgIGlmIChtYXRj aCgnKScpKSB7CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIH0K KyAgICAgICAgICAgICAgICBleHBlY3QoJywnKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQor CisgICAgICAgIGV4cGVjdCgnKScpOworCisgICAgICAgIHJldHVybiB7CisgICAgICAgICAgICBw YXJhbXM6IHBhcmFtcywKKyAgICAgICAgICAgIHN0cmljdGVkOiBzdHJpY3RlZCwKKyAgICAgICAg ICAgIGZpcnN0UmVzdHJpY3RlZDogZmlyc3RSZXN0cmljdGVkLAorICAgICAgICAgICAgbWVzc2Fn ZTogbWVzc2FnZQorICAgICAgICB9OworICAgIH0KKworICAgIGZ1bmN0aW9uIHBhcnNlRnVuY3Rp b25EZWNsYXJhdGlvbigpIHsKKyAgICAgICAgdmFyIGlkLCBwYXJhbXMgPSBbXSwgYm9keSwgdG9r ZW4sIHN0cmljdGVkLCB0bXAsIGZpcnN0UmVzdHJpY3RlZCwgbWVzc2FnZSwgcHJldmlvdXNTdHJp Y3QsIHN0YXJ0VG9rZW47CisKKyAgICAgICAgc3RhcnRUb2tlbiA9IGxvb2thaGVhZDsKKworICAg ICAgICBleHBlY3RLZXl3b3JkKCdmdW5jdGlvbicpOworICAgICAgICB0b2tlbiA9IGxvb2thaGVh ZDsKKyAgICAgICAgaWQgPSBwYXJzZVZhcmlhYmxlSWRlbnRpZmllcigpOworICAgICAgICBpZiAo c3RyaWN0KSB7CisgICAgICAgICAgICBpZiAoaXNSZXN0cmljdGVkV29yZCh0b2tlbi52YWx1ZSkp IHsKKyAgICAgICAgICAgICAgICB0aHJvd0Vycm9yVG9sZXJhbnQodG9rZW4sIE1lc3NhZ2VzLlN0 cmljdEZ1bmN0aW9uTmFtZSk7CisgICAgICAgICAgICB9CisgICAgICAgIH0gZWxzZSB7CisgICAg ICAgICAgICBpZiAoaXNSZXN0cmljdGVkV29yZCh0b2tlbi52YWx1ZSkpIHsKKyAgICAgICAgICAg ICAgICBmaXJzdFJlc3RyaWN0ZWQgPSB0b2tlbjsKKyAgICAgICAgICAgICAgICBtZXNzYWdlID0g TWVzc2FnZXMuU3RyaWN0RnVuY3Rpb25OYW1lOworICAgICAgICAgICAgfSBlbHNlIGlmIChpc1N0 cmljdE1vZGVSZXNlcnZlZFdvcmQodG9rZW4udmFsdWUpKSB7CisgICAgICAgICAgICAgICAgZmly c3RSZXN0cmljdGVkID0gdG9rZW47CisgICAgICAgICAgICAgICAgbWVzc2FnZSA9IE1lc3NhZ2Vz LlN0cmljdFJlc2VydmVkV29yZDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorCisgICAgICAg IHRtcCA9IHBhcnNlUGFyYW1zKGZpcnN0UmVzdHJpY3RlZCk7CisgICAgICAgIHBhcmFtcyA9IHRt cC5wYXJhbXM7CisgICAgICAgIHN0cmljdGVkID0gdG1wLnN0cmljdGVkOworICAgICAgICBmaXJz dFJlc3RyaWN0ZWQgPSB0bXAuZmlyc3RSZXN0cmljdGVkOworICAgICAgICBpZiAodG1wLm1lc3Nh Z2UpIHsKKyAgICAgICAgICAgIG1lc3NhZ2UgPSB0bXAubWVzc2FnZTsKKyAgICAgICAgfQorCisg ICAgICAgIHByZXZpb3VzU3RyaWN0ID0gc3RyaWN0OworICAgICAgICBib2R5ID0gcGFyc2VGdW5j dGlvblNvdXJjZUVsZW1lbnRzKCk7CisgICAgICAgIGlmIChzdHJpY3QgJiYgZmlyc3RSZXN0cmlj dGVkKSB7CisgICAgICAgICAgICB0aHJvd0Vycm9yKGZpcnN0UmVzdHJpY3RlZCwgbWVzc2FnZSk7 CisgICAgICAgIH0KKyAgICAgICAgaWYgKHN0cmljdCAmJiBzdHJpY3RlZCkgeworICAgICAgICAg ICAgdGhyb3dFcnJvclRvbGVyYW50KHN0cmljdGVkLCBtZXNzYWdlKTsKKyAgICAgICAgfQorICAg ICAgICBzdHJpY3QgPSBwcmV2aW91c1N0cmljdDsKKworICAgICAgICByZXR1cm4gZGVsZWdhdGUu bWFya0VuZChkZWxlZ2F0ZS5jcmVhdGVGdW5jdGlvbkRlY2xhcmF0aW9uKGlkLCBwYXJhbXMsIFtd LCBib2R5KSwgc3RhcnRUb2tlbik7CisgICAgfQorCisgICAgZnVuY3Rpb24gcGFyc2VGdW5jdGlv bkV4cHJlc3Npb24oKSB7CisgICAgICAgIHZhciB0b2tlbiwgaWQgPSBudWxsLCBzdHJpY3RlZCwg Zmlyc3RSZXN0cmljdGVkLCBtZXNzYWdlLCB0bXAsIHBhcmFtcyA9IFtdLCBib2R5LCBwcmV2aW91 c1N0cmljdCwgc3RhcnRUb2tlbjsKKworICAgICAgICBzdGFydFRva2VuID0gbG9va2FoZWFkOwor ICAgICAgICBleHBlY3RLZXl3b3JkKCdmdW5jdGlvbicpOworCisgICAgICAgIGlmICghbWF0Y2go JygnKSkgeworICAgICAgICAgICAgdG9rZW4gPSBsb29rYWhlYWQ7CisgICAgICAgICAgICBpZCA9 IHBhcnNlVmFyaWFibGVJZGVudGlmaWVyKCk7CisgICAgICAgICAgICBpZiAoc3RyaWN0KSB7Cisg ICAgICAgICAgICAgICAgaWYgKGlzUmVzdHJpY3RlZFdvcmQodG9rZW4udmFsdWUpKSB7CisgICAg ICAgICAgICAgICAgICAgIHRocm93RXJyb3JUb2xlcmFudCh0b2tlbiwgTWVzc2FnZXMuU3RyaWN0 RnVuY3Rpb25OYW1lKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9IGVsc2Ugewor ICAgICAgICAgICAgICAgIGlmIChpc1Jlc3RyaWN0ZWRXb3JkKHRva2VuLnZhbHVlKSkgeworICAg ICAgICAgICAgICAgICAgICBmaXJzdFJlc3RyaWN0ZWQgPSB0b2tlbjsKKyAgICAgICAgICAgICAg ICAgICAgbWVzc2FnZSA9IE1lc3NhZ2VzLlN0cmljdEZ1bmN0aW9uTmFtZTsKKyAgICAgICAgICAg ICAgICB9IGVsc2UgaWYgKGlzU3RyaWN0TW9kZVJlc2VydmVkV29yZCh0b2tlbi52YWx1ZSkpIHsK KyAgICAgICAgICAgICAgICAgICAgZmlyc3RSZXN0cmljdGVkID0gdG9rZW47CisgICAgICAgICAg ICAgICAgICAgIG1lc3NhZ2UgPSBNZXNzYWdlcy5TdHJpY3RSZXNlcnZlZFdvcmQ7CisgICAgICAg ICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9CisKKyAgICAgICAgdG1wID0gcGFy c2VQYXJhbXMoZmlyc3RSZXN0cmljdGVkKTsKKyAgICAgICAgcGFyYW1zID0gdG1wLnBhcmFtczsK KyAgICAgICAgc3RyaWN0ZWQgPSB0bXAuc3RyaWN0ZWQ7CisgICAgICAgIGZpcnN0UmVzdHJpY3Rl ZCA9IHRtcC5maXJzdFJlc3RyaWN0ZWQ7CisgICAgICAgIGlmICh0bXAubWVzc2FnZSkgeworICAg ICAgICAgICAgbWVzc2FnZSA9IHRtcC5tZXNzYWdlOworICAgICAgICB9CisKKyAgICAgICAgcHJl dmlvdXNTdHJpY3QgPSBzdHJpY3Q7CisgICAgICAgIGJvZHkgPSBwYXJzZUZ1bmN0aW9uU291cmNl RWxlbWVudHMoKTsKKyAgICAgICAgaWYgKHN0cmljdCAmJiBmaXJzdFJlc3RyaWN0ZWQpIHsKKyAg ICAgICAgICAgIHRocm93RXJyb3IoZmlyc3RSZXN0cmljdGVkLCBtZXNzYWdlKTsKKyAgICAgICAg fQorICAgICAgICBpZiAoc3RyaWN0ICYmIHN0cmljdGVkKSB7CisgICAgICAgICAgICB0aHJvd0Vy cm9yVG9sZXJhbnQoc3RyaWN0ZWQsIG1lc3NhZ2UpOworICAgICAgICB9CisgICAgICAgIHN0cmlj dCA9IHByZXZpb3VzU3RyaWN0OworCisgICAgICAgIHJldHVybiBkZWxlZ2F0ZS5tYXJrRW5kKGRl bGVnYXRlLmNyZWF0ZUZ1bmN0aW9uRXhwcmVzc2lvbihpZCwgcGFyYW1zLCBbXSwgYm9keSksIHN0 YXJ0VG9rZW4pOworICAgIH0KKworICAgIC8vIDE0IFByb2dyYW0KKworICAgIGZ1bmN0aW9uIHBh cnNlU291cmNlRWxlbWVudCgpIHsKKyAgICAgICAgaWYgKGxvb2thaGVhZC50eXBlID09PSBUb2tl bi5LZXl3b3JkKSB7CisgICAgICAgICAgICBzd2l0Y2ggKGxvb2thaGVhZC52YWx1ZSkgeworICAg ICAgICAgICAgY2FzZSAnY29uc3QnOgorICAgICAgICAgICAgY2FzZSAnbGV0JzoKKyAgICAgICAg ICAgICAgICByZXR1cm4gcGFyc2VDb25zdExldERlY2xhcmF0aW9uKGxvb2thaGVhZC52YWx1ZSk7 CisgICAgICAgICAgICBjYXNlICdmdW5jdGlvbic6CisgICAgICAgICAgICAgICAgcmV0dXJuIHBh cnNlRnVuY3Rpb25EZWNsYXJhdGlvbigpOworICAgICAgICAgICAgZGVmYXVsdDoKKyAgICAgICAg ICAgICAgICByZXR1cm4gcGFyc2VTdGF0ZW1lbnQoKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAg fQorCisgICAgICAgIGlmIChsb29rYWhlYWQudHlwZSAhPT0gVG9rZW4uRU9GKSB7CisgICAgICAg ICAgICByZXR1cm4gcGFyc2VTdGF0ZW1lbnQoKTsKKyAgICAgICAgfQorICAgIH0KKworICAgIGZ1 bmN0aW9uIHBhcnNlU291cmNlRWxlbWVudHMoKSB7CisgICAgICAgIHZhciBzb3VyY2VFbGVtZW50 LCBzb3VyY2VFbGVtZW50cyA9IFtdLCB0b2tlbiwgZGlyZWN0aXZlLCBmaXJzdFJlc3RyaWN0ZWQ7 CisKKyAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3RoKSB7CisgICAgICAgICAgICB0b2tlbiA9 IGxvb2thaGVhZDsKKyAgICAgICAgICAgIGlmICh0b2tlbi50eXBlICE9PSBUb2tlbi5TdHJpbmdM aXRlcmFsKSB7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICB9CisKKyAgICAg ICAgICAgIHNvdXJjZUVsZW1lbnQgPSBwYXJzZVNvdXJjZUVsZW1lbnQoKTsKKyAgICAgICAgICAg IHNvdXJjZUVsZW1lbnRzLnB1c2goc291cmNlRWxlbWVudCk7CisgICAgICAgICAgICBpZiAoc291 cmNlRWxlbWVudC5leHByZXNzaW9uLnR5cGUgIT09IFN5bnRheC5MaXRlcmFsKSB7CisgICAgICAg ICAgICAgICAgLy8gdGhpcyBpcyBub3QgZGlyZWN0aXZlCisgICAgICAgICAgICAgICAgYnJlYWs7 CisgICAgICAgICAgICB9CisgICAgICAgICAgICBkaXJlY3RpdmUgPSBzb3VyY2Uuc2xpY2UodG9r ZW4uc3RhcnQgKyAxLCB0b2tlbi5lbmQgLSAxKTsKKyAgICAgICAgICAgIGlmIChkaXJlY3RpdmUg PT09ICd1c2Ugc3RyaWN0JykgeworICAgICAgICAgICAgICAgIHN0cmljdCA9IHRydWU7CisgICAg ICAgICAgICAgICAgaWYgKGZpcnN0UmVzdHJpY3RlZCkgeworICAgICAgICAgICAgICAgICAgICB0 aHJvd0Vycm9yVG9sZXJhbnQoZmlyc3RSZXN0cmljdGVkLCBNZXNzYWdlcy5TdHJpY3RPY3RhbExp dGVyYWwpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAg ICAgICAgICAgaWYgKCFmaXJzdFJlc3RyaWN0ZWQgJiYgdG9rZW4ub2N0YWwpIHsKKyAgICAgICAg ICAgICAgICAgICAgZmlyc3RSZXN0cmljdGVkID0gdG9rZW47CisgICAgICAgICAgICAgICAgfQor ICAgICAgICAgICAgfQorICAgICAgICB9CisKKyAgICAgICAgd2hpbGUgKGluZGV4IDwgbGVuZ3Ro KSB7CisgICAgICAgICAgICBzb3VyY2VFbGVtZW50ID0gcGFyc2VTb3VyY2VFbGVtZW50KCk7Cisg ICAgICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgaWYgKi8KKyAgICAgICAgICAgIGlmICh0eXBl b2Ygc291cmNlRWxlbWVudCA9PT0gJ3VuZGVmaW5lZCcpIHsKKyAgICAgICAgICAgICAgICBicmVh azsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHNvdXJjZUVsZW1lbnRzLnB1c2goc291cmNl RWxlbWVudCk7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIHNvdXJjZUVsZW1lbnRzOworICAg IH0KKworICAgIGZ1bmN0aW9uIHBhcnNlUHJvZ3JhbSgpIHsKKyAgICAgICAgdmFyIGJvZHksIHN0 YXJ0VG9rZW47CisKKyAgICAgICAgc2tpcENvbW1lbnQoKTsKKyAgICAgICAgcGVlaygpOworICAg ICAgICBzdGFydFRva2VuID0gbG9va2FoZWFkOworICAgICAgICBzdHJpY3QgPSBmYWxzZTsKKwor ICAgICAgICBib2R5ID0gcGFyc2VTb3VyY2VFbGVtZW50cygpOworICAgICAgICByZXR1cm4gZGVs ZWdhdGUubWFya0VuZChkZWxlZ2F0ZS5jcmVhdGVQcm9ncmFtKGJvZHkpLCBzdGFydFRva2VuKTsK KyAgICB9CisKKyAgICBmdW5jdGlvbiBmaWx0ZXJUb2tlbkxvY2F0aW9uKCkgeworICAgICAgICB2 YXIgaSwgZW50cnksIHRva2VuLCB0b2tlbnMgPSBbXTsKKworICAgICAgICBmb3IgKGkgPSAwOyBp IDwgZXh0cmEudG9rZW5zLmxlbmd0aDsgKytpKSB7CisgICAgICAgICAgICBlbnRyeSA9IGV4dHJh LnRva2Vuc1tpXTsKKyAgICAgICAgICAgIHRva2VuID0geworICAgICAgICAgICAgICAgIHR5cGU6 IGVudHJ5LnR5cGUsCisgICAgICAgICAgICAgICAgdmFsdWU6IGVudHJ5LnZhbHVlCisgICAgICAg ICAgICB9OworICAgICAgICAgICAgaWYgKGV4dHJhLnJhbmdlKSB7CisgICAgICAgICAgICAgICAg dG9rZW4ucmFuZ2UgPSBlbnRyeS5yYW5nZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlm IChleHRyYS5sb2MpIHsKKyAgICAgICAgICAgICAgICB0b2tlbi5sb2MgPSBlbnRyeS5sb2M7Cisg ICAgICAgICAgICB9CisgICAgICAgICAgICB0b2tlbnMucHVzaCh0b2tlbik7CisgICAgICAgIH0K KworICAgICAgICBleHRyYS50b2tlbnMgPSB0b2tlbnM7CisgICAgfQorCisgICAgZnVuY3Rpb24g dG9rZW5pemUoY29kZSwgb3B0aW9ucykgeworICAgICAgICB2YXIgdG9TdHJpbmcsCisgICAgICAg ICAgICB0b2tlbiwKKyAgICAgICAgICAgIHRva2VuczsKKworICAgICAgICB0b1N0cmluZyA9IFN0 cmluZzsKKyAgICAgICAgaWYgKHR5cGVvZiBjb2RlICE9PSAnc3RyaW5nJyAmJiAhKGNvZGUgaW5z dGFuY2VvZiBTdHJpbmcpKSB7CisgICAgICAgICAgICBjb2RlID0gdG9TdHJpbmcoY29kZSk7Cisg ICAgICAgIH0KKworICAgICAgICBkZWxlZ2F0ZSA9IFN5bnRheFRyZWVEZWxlZ2F0ZTsKKyAgICAg ICAgc291cmNlID0gY29kZTsKKyAgICAgICAgaW5kZXggPSAwOworICAgICAgICBsaW5lTnVtYmVy ID0gKHNvdXJjZS5sZW5ndGggPiAwKSA/IDEgOiAwOworICAgICAgICBsaW5lU3RhcnQgPSAwOwor ICAgICAgICBsZW5ndGggPSBzb3VyY2UubGVuZ3RoOworICAgICAgICBsb29rYWhlYWQgPSBudWxs OworICAgICAgICBzdGF0ZSA9IHsKKyAgICAgICAgICAgIGFsbG93SW46IHRydWUsCisgICAgICAg ICAgICBsYWJlbFNldDoge30sCisgICAgICAgICAgICBpbkZ1bmN0aW9uQm9keTogZmFsc2UsCisg ICAgICAgICAgICBpbkl0ZXJhdGlvbjogZmFsc2UsCisgICAgICAgICAgICBpblN3aXRjaDogZmFs c2UsCisgICAgICAgICAgICBsYXN0Q29tbWVudFN0YXJ0OiAtMQorICAgICAgICB9OworCisgICAg ICAgIGV4dHJhID0ge307CisKKyAgICAgICAgLy8gT3B0aW9ucyBtYXRjaGluZy4KKyAgICAgICAg b3B0aW9ucyA9IG9wdGlvbnMgfHwge307CisKKyAgICAgICAgLy8gT2YgY291cnNlIHdlIGNvbGxl Y3QgdG9rZW5zIGhlcmUuCisgICAgICAgIG9wdGlvbnMudG9rZW5zID0gdHJ1ZTsKKyAgICAgICAg ZXh0cmEudG9rZW5zID0gW107CisgICAgICAgIGV4dHJhLnRva2VuaXplID0gdHJ1ZTsKKyAgICAg ICAgLy8gVGhlIGZvbGxvd2luZyB0d28gZmllbGRzIGFyZSBuZWNlc3NhcnkgdG8gY29tcHV0ZSB0 aGUgUmVnZXggdG9rZW5zLgorICAgICAgICBleHRyYS5vcGVuUGFyZW5Ub2tlbiA9IC0xOworICAg ICAgICBleHRyYS5vcGVuQ3VybHlUb2tlbiA9IC0xOworCisgICAgICAgIGV4dHJhLnJhbmdlID0g KHR5cGVvZiBvcHRpb25zLnJhbmdlID09PSAnYm9vbGVhbicpICYmIG9wdGlvbnMucmFuZ2U7Cisg ICAgICAgIGV4dHJhLmxvYyA9ICh0eXBlb2Ygb3B0aW9ucy5sb2MgPT09ICdib29sZWFuJykgJiYg b3B0aW9ucy5sb2M7CisKKyAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zLmNvbW1lbnQgPT09ICdi b29sZWFuJyAmJiBvcHRpb25zLmNvbW1lbnQpIHsKKyAgICAgICAgICAgIGV4dHJhLmNvbW1lbnRz ID0gW107CisgICAgICAgIH0KKyAgICAgICAgaWYgKHR5cGVvZiBvcHRpb25zLnRvbGVyYW50ID09 PSAnYm9vbGVhbicgJiYgb3B0aW9ucy50b2xlcmFudCkgeworICAgICAgICAgICAgZXh0cmEuZXJy b3JzID0gW107CisgICAgICAgIH0KKworICAgICAgICB0cnkgeworICAgICAgICAgICAgcGVlaygp OworICAgICAgICAgICAgaWYgKGxvb2thaGVhZC50eXBlID09PSBUb2tlbi5FT0YpIHsKKyAgICAg ICAgICAgICAgICByZXR1cm4gZXh0cmEudG9rZW5zOworICAgICAgICAgICAgfQorCisgICAgICAg ICAgICB0b2tlbiA9IGxleCgpOworICAgICAgICAgICAgd2hpbGUgKGxvb2thaGVhZC50eXBlICE9 PSBUb2tlbi5FT0YpIHsKKyAgICAgICAgICAgICAgICB0cnkgeworICAgICAgICAgICAgICAgICAg ICB0b2tlbiA9IGxleCgpOworICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGxleEVycm9yKSB7Cisg ICAgICAgICAgICAgICAgICAgIHRva2VuID0gbG9va2FoZWFkOworICAgICAgICAgICAgICAgICAg ICBpZiAoZXh0cmEuZXJyb3JzKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBleHRyYS5lcnJv cnMucHVzaChsZXhFcnJvcik7CisgICAgICAgICAgICAgICAgICAgICAgICAvLyBXZSBoYXZlIHRv IGJyZWFrIG9uIHRoZSBmaXJzdCBlcnJvcgorICAgICAgICAgICAgICAgICAgICAgICAgLy8gdG8g YXZvaWQgaW5maW5pdGUgbG9vcHMuCisgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAg ICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHRocm93 IGxleEVycm9yOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorICAg ICAgICAgICAgfQorCisgICAgICAgICAgICBmaWx0ZXJUb2tlbkxvY2F0aW9uKCk7CisgICAgICAg ICAgICB0b2tlbnMgPSBleHRyYS50b2tlbnM7CisgICAgICAgICAgICBpZiAodHlwZW9mIGV4dHJh LmNvbW1lbnRzICE9PSAndW5kZWZpbmVkJykgeworICAgICAgICAgICAgICAgIHRva2Vucy5jb21t ZW50cyA9IGV4dHJhLmNvbW1lbnRzOworICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKHR5 cGVvZiBleHRyYS5lcnJvcnMgIT09ICd1bmRlZmluZWQnKSB7CisgICAgICAgICAgICAgICAgdG9r ZW5zLmVycm9ycyA9IGV4dHJhLmVycm9yczsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfSBjYXRj aCAoZSkgeworICAgICAgICAgICAgdGhyb3cgZTsKKyAgICAgICAgfSBmaW5hbGx5IHsKKyAgICAg ICAgICAgIGV4dHJhID0ge307CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIHRva2VuczsKKyAg ICB9CisKKyAgICBmdW5jdGlvbiBwYXJzZShjb2RlLCBvcHRpb25zKSB7CisgICAgICAgIHZhciBw cm9ncmFtLCB0b1N0cmluZzsKKworICAgICAgICB0b1N0cmluZyA9IFN0cmluZzsKKyAgICAgICAg aWYgKHR5cGVvZiBjb2RlICE9PSAnc3RyaW5nJyAmJiAhKGNvZGUgaW5zdGFuY2VvZiBTdHJpbmcp KSB7CisgICAgICAgICAgICBjb2RlID0gdG9TdHJpbmcoY29kZSk7CisgICAgICAgIH0KKworICAg ICAgICBkZWxlZ2F0ZSA9IFN5bnRheFRyZWVEZWxlZ2F0ZTsKKyAgICAgICAgc291cmNlID0gY29k ZTsKKyAgICAgICAgaW5kZXggPSAwOworICAgICAgICBsaW5lTnVtYmVyID0gKHNvdXJjZS5sZW5n dGggPiAwKSA/IDEgOiAwOworICAgICAgICBsaW5lU3RhcnQgPSAwOworICAgICAgICBsZW5ndGgg PSBzb3VyY2UubGVuZ3RoOworICAgICAgICBsb29rYWhlYWQgPSBudWxsOworICAgICAgICBzdGF0 ZSA9IHsKKyAgICAgICAgICAgIGFsbG93SW46IHRydWUsCisgICAgICAgICAgICBsYWJlbFNldDog e30sCisgICAgICAgICAgICBpbkZ1bmN0aW9uQm9keTogZmFsc2UsCisgICAgICAgICAgICBpbkl0 ZXJhdGlvbjogZmFsc2UsCisgICAgICAgICAgICBpblN3aXRjaDogZmFsc2UsCisgICAgICAgICAg ICBsYXN0Q29tbWVudFN0YXJ0OiAtMQorICAgICAgICB9OworCisgICAgICAgIGV4dHJhID0ge307 CisgICAgICAgIGlmICh0eXBlb2Ygb3B0aW9ucyAhPT0gJ3VuZGVmaW5lZCcpIHsKKyAgICAgICAg ICAgIGV4dHJhLnJhbmdlID0gKHR5cGVvZiBvcHRpb25zLnJhbmdlID09PSAnYm9vbGVhbicpICYm IG9wdGlvbnMucmFuZ2U7CisgICAgICAgICAgICBleHRyYS5sb2MgPSAodHlwZW9mIG9wdGlvbnMu bG9jID09PSAnYm9vbGVhbicpICYmIG9wdGlvbnMubG9jOworICAgICAgICAgICAgZXh0cmEuYXR0 YWNoQ29tbWVudCA9ICh0eXBlb2Ygb3B0aW9ucy5hdHRhY2hDb21tZW50ID09PSAnYm9vbGVhbicp ICYmIG9wdGlvbnMuYXR0YWNoQ29tbWVudDsKKworICAgICAgICAgICAgaWYgKGV4dHJhLmxvYyAm JiBvcHRpb25zLnNvdXJjZSAhPT0gbnVsbCAmJiBvcHRpb25zLnNvdXJjZSAhPT0gdW5kZWZpbmVk KSB7CisgICAgICAgICAgICAgICAgZXh0cmEuc291cmNlID0gdG9TdHJpbmcob3B0aW9ucy5zb3Vy Y2UpOworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAodHlwZW9mIG9wdGlvbnMudG9r ZW5zID09PSAnYm9vbGVhbicgJiYgb3B0aW9ucy50b2tlbnMpIHsKKyAgICAgICAgICAgICAgICBl eHRyYS50b2tlbnMgPSBbXTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmICh0eXBlb2Yg b3B0aW9ucy5jb21tZW50ID09PSAnYm9vbGVhbicgJiYgb3B0aW9ucy5jb21tZW50KSB7CisgICAg ICAgICAgICAgICAgZXh0cmEuY29tbWVudHMgPSBbXTsKKyAgICAgICAgICAgIH0KKyAgICAgICAg ICAgIGlmICh0eXBlb2Ygb3B0aW9ucy50b2xlcmFudCA9PT0gJ2Jvb2xlYW4nICYmIG9wdGlvbnMu dG9sZXJhbnQpIHsKKyAgICAgICAgICAgICAgICBleHRyYS5lcnJvcnMgPSBbXTsKKyAgICAgICAg ICAgIH0KKyAgICAgICAgICAgIGlmIChleHRyYS5hdHRhY2hDb21tZW50KSB7CisgICAgICAgICAg ICAgICAgZXh0cmEucmFuZ2UgPSB0cnVlOworICAgICAgICAgICAgICAgIGV4dHJhLmNvbW1lbnRz ID0gW107CisgICAgICAgICAgICAgICAgZXh0cmEuYm90dG9tUmlnaHRTdGFjayA9IFtdOworICAg ICAgICAgICAgICAgIGV4dHJhLnRyYWlsaW5nQ29tbWVudHMgPSBbXTsKKyAgICAgICAgICAgICAg ICBleHRyYS5sZWFkaW5nQ29tbWVudHMgPSBbXTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQor CisgICAgICAgIHRyeSB7CisgICAgICAgICAgICBwcm9ncmFtID0gcGFyc2VQcm9ncmFtKCk7Cisg ICAgICAgICAgICBpZiAodHlwZW9mIGV4dHJhLmNvbW1lbnRzICE9PSAndW5kZWZpbmVkJykgewor ICAgICAgICAgICAgICAgIHByb2dyYW0uY29tbWVudHMgPSBleHRyYS5jb21tZW50czsKKyAgICAg ICAgICAgIH0KKyAgICAgICAgICAgIGlmICh0eXBlb2YgZXh0cmEudG9rZW5zICE9PSAndW5kZWZp bmVkJykgeworICAgICAgICAgICAgICAgIGZpbHRlclRva2VuTG9jYXRpb24oKTsKKyAgICAgICAg ICAgICAgICBwcm9ncmFtLnRva2VucyA9IGV4dHJhLnRva2VuczsKKyAgICAgICAgICAgIH0KKyAg ICAgICAgICAgIGlmICh0eXBlb2YgZXh0cmEuZXJyb3JzICE9PSAndW5kZWZpbmVkJykgeworICAg ICAgICAgICAgICAgIHByb2dyYW0uZXJyb3JzID0gZXh0cmEuZXJyb3JzOworICAgICAgICAgICAg fQorICAgICAgICB9IGNhdGNoIChlKSB7CisgICAgICAgICAgICB0aHJvdyBlOworICAgICAgICB9 IGZpbmFsbHkgeworICAgICAgICAgICAgZXh0cmEgPSB7fTsKKyAgICAgICAgfQorCisgICAgICAg IHJldHVybiBwcm9ncmFtOworICAgIH0KKworICAgIC8vIFN5bmMgd2l0aCAqLmpzb24gbWFuaWZl c3RzLgorICAgIGV4cG9ydHMudmVyc2lvbiA9ICcxLjIuMic7CisKKyAgICBleHBvcnRzLnRva2Vu aXplID0gdG9rZW5pemU7CisKKyAgICBleHBvcnRzLnBhcnNlID0gcGFyc2U7CisKKyAgICAvLyBE ZWVwIGNvcHkuCisgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqLworICAgIGV4cG9ydHMuU3lu dGF4ID0gKGZ1bmN0aW9uICgpIHsKKyAgICAgICAgdmFyIG5hbWUsIHR5cGVzID0ge307CisKKyAg ICAgICAgaWYgKHR5cGVvZiBPYmplY3QuY3JlYXRlID09PSAnZnVuY3Rpb24nKSB7CisgICAgICAg ICAgICB0eXBlcyA9IE9iamVjdC5jcmVhdGUobnVsbCk7CisgICAgICAgIH0KKworICAgICAgICBm b3IgKG5hbWUgaW4gU3ludGF4KSB7CisgICAgICAgICAgICBpZiAoU3ludGF4Lmhhc093blByb3Bl cnR5KG5hbWUpKSB7CisgICAgICAgICAgICAgICAgdHlwZXNbbmFtZV0gPSBTeW50YXhbbmFtZV07 CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAgICBpZiAodHlwZW9mIE9iamVjdC5m cmVlemUgPT09ICdmdW5jdGlvbicpIHsKKyAgICAgICAgICAgIE9iamVjdC5mcmVlemUodHlwZXMp OworICAgICAgICB9CisKKyAgICAgICAgcmV0dXJuIHR5cGVzOworICAgIH0oKSk7CisKK30pKTsK Ky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KyAgICAgICAgU0tJUCwKKyAgICAgICAgUkVNT1ZFOworCisgICAgZnVuY3Rpb24gaWdub3JlSlNI aW50RXJyb3IoKSB7IH0KKworICAgIGlzQXJyYXkgPSBBcnJheS5pc0FycmF5OworICAgIGlmICgh aXNBcnJheSkgeworICAgICAgICBpc0FycmF5ID0gZnVuY3Rpb24gaXNBcnJheShhcnJheSkgewor ICAgICAgICAgICAgcmV0dXJuIE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcuY2FsbChhcnJheSkg PT09ICdbb2JqZWN0IEFycmF5XSc7CisgICAgICAgIH07CisgICAgfQorCisgICAgZnVuY3Rpb24g ZGVlcENvcHkob2JqKSB7CisgICAgICAgIHZhciByZXQgPSB7fSwga2V5LCB2YWw7CisgICAgICAg IGZvciAoa2V5IGluIG9iaikgeworICAgICAgICAgICAgaWYgKG9iai5oYXNPd25Qcm9wZXJ0eShr ZXkpKSB7CisgICAgICAgICAgICAgICAgdmFsID0gb2JqW2tleV07CisgICAgICAgICAgICAgICAg aWYgKHR5cGVvZiB2YWwgPT09ICdvYmplY3QnICYmIHZhbCAhPT0gbnVsbCkgeworICAgICAgICAg ICAgICAgICAgICByZXRba2V5XSA9IGRlZXBDb3B5KHZhbCk7CisgICAgICAgICAgICAgICAgfSBl bHNlIHsKKyAgICAgICAgICAgICAgICAgICAgcmV0W2tleV0gPSB2YWw7CisgICAgICAgICAgICAg ICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIHJldHVybiByZXQ7CisgICAg fQorCisgICAgZnVuY3Rpb24gc2hhbGxvd0NvcHkob2JqKSB7CisgICAgICAgIHZhciByZXQgPSB7 fSwga2V5OworICAgICAgICBmb3IgKGtleSBpbiBvYmopIHsKKyAgICAgICAgICAgIGlmIChvYmou aGFzT3duUHJvcGVydHkoa2V5KSkgeworICAgICAgICAgICAgICAgIHJldFtrZXldID0gb2JqW2tl eV07CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIHJldDsKKyAgICB9 CisgICAgaWdub3JlSlNIaW50RXJyb3Ioc2hhbGxvd0NvcHkpOworCisgICAgLy8gYmFzZWQgb24g TExWTSBsaWJjKysgdXBwZXJfYm91bmQgLyBsb3dlcl9ib3VuZAorICAgIC8vIE1JVCBMaWNlbnNl CisKKyAgICBmdW5jdGlvbiB1cHBlckJvdW5kKGFycmF5LCBmdW5jKSB7CisgICAgICAgIHZhciBk aWZmLCBsZW4sIGksIGN1cnJlbnQ7CisKKyAgICAgICAgbGVuID0gYXJyYXkubGVuZ3RoOworICAg ICAgICBpID0gMDsKKworICAgICAgICB3aGlsZSAobGVuKSB7CisgICAgICAgICAgICBkaWZmID0g bGVuID4+PiAxOworICAgICAgICAgICAgY3VycmVudCA9IGkgKyBkaWZmOworICAgICAgICAgICAg aWYgKGZ1bmMoYXJyYXlbY3VycmVudF0pKSB7CisgICAgICAgICAgICAgICAgbGVuID0gZGlmZjsK KyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgaSA9IGN1cnJlbnQgKyAxOwor ICAgICAgICAgICAgICAgIGxlbiAtPSBkaWZmICsgMTsKKyAgICAgICAgICAgIH0KKyAgICAgICAg fQorICAgICAgICByZXR1cm4gaTsKKyAgICB9CisKKyAgICBmdW5jdGlvbiBsb3dlckJvdW5kKGFy cmF5LCBmdW5jKSB7CisgICAgICAgIHZhciBkaWZmLCBsZW4sIGksIGN1cnJlbnQ7CisKKyAgICAg ICAgbGVuID0gYXJyYXkubGVuZ3RoOworICAgICAgICBpID0gMDsKKworICAgICAgICB3aGlsZSAo bGVuKSB7CisgICAgICAgICAgICBkaWZmID0gbGVuID4+PiAxOworICAgICAgICAgICAgY3VycmVu dCA9IGkgKyBkaWZmOworICAgICAgICAgICAgaWYgKGZ1bmMoYXJyYXlbY3VycmVudF0pKSB7Cisg ICAgICAgICAgICAgICAgaSA9IGN1cnJlbnQgKyAxOworICAgICAgICAgICAgICAgIGxlbiAtPSBk aWZmICsgMTsKKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgbGVuID0gZGlm ZjsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICByZXR1cm4gaTsKKyAgICB9Cisg ICAgaWdub3JlSlNIaW50RXJyb3IobG93ZXJCb3VuZCk7CisKKyAgICBvYmplY3RDcmVhdGUgPSBP YmplY3QuY3JlYXRlIHx8IChmdW5jdGlvbiAoKSB7CisgICAgICAgIGZ1bmN0aW9uIEYoKSB7IH0K KworICAgICAgICByZXR1cm4gZnVuY3Rpb24gKG8pIHsKKyAgICAgICAgICAgIEYucHJvdG90eXBl ID0gbzsKKyAgICAgICAgICAgIHJldHVybiBuZXcgRigpOworICAgICAgICB9OworICAgIH0pKCk7 CisKKyAgICBvYmplY3RLZXlzID0gT2JqZWN0LmtleXMgfHwgZnVuY3Rpb24gKG8pIHsKKyAgICAg ICAgdmFyIGtleXMgPSBbXSwga2V5OworICAgICAgICBmb3IgKGtleSBpbiBvKSB7CisgICAgICAg ICAgICBrZXlzLnB1c2goa2V5KTsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4ga2V5czsKKyAg ICB9OworCisgICAgZnVuY3Rpb24gZXh0ZW5kKHRvLCBmcm9tKSB7CisgICAgICAgIG9iamVjdEtl eXMoZnJvbSkuZm9yRWFjaChmdW5jdGlvbiAoa2V5KSB7CisgICAgICAgICAgICB0b1trZXldID0g ZnJvbVtrZXldOworICAgICAgICB9KTsKKyAgICAgICAgcmV0dXJuIHRvOworICAgIH0KKworICAg IFN5bnRheCA9IHsKKyAgICAgICAgQXNzaWdubWVudEV4cHJlc3Npb246ICdBc3NpZ25tZW50RXhw cmVzc2lvbicsCisgICAgICAgIEFycmF5RXhwcmVzc2lvbjogJ0FycmF5RXhwcmVzc2lvbicsCisg ICAgICAgIEFycmF5UGF0dGVybjogJ0FycmF5UGF0dGVybicsCisgICAgICAgIEFycm93RnVuY3Rp b25FeHByZXNzaW9uOiAnQXJyb3dGdW5jdG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0ZXJhbCcsCisgICAgICAgIExhYmVsZWRT dGF0ZW1lbnQ6ICdMYWJlbGVkU3RhdGVtZW50JywKKyAgICAgICAgTG9naWNhbEV4cHJlc3Npb246 ICdMb2dpY2FsRXhwcmVzc2lvbicsCisgICAgICAgIE1lbWJlckV4cHJlc3Npb246ICdNZW1iZXJF eHByZXNzaW9uJywKKyAgICAgICAgTWV0aG9kRGVmaW5pdGlvbjogJ01ldGhvZERlZmluaXRpb24n LAorICAgICAgICBNb2R1bGVTcGVjaWZpZXI6ICdNb2R1bGVTcGVjaWZpZXInLAorICAgICAgICBO ZXdFeHByZXNzaW9uOiAnTmV3RXhwcmVzc2lvbicsCisgICAgICAgIE9iamVjdEV4cHJlc3Npb246 ICdPYmplY3RFeHByZXNzaW9uJywKKyAgICAgICAgT2JqZWN0UGF0dGVybjogJ09iamVjdFBhdHRl cm4nLAorICAgICAgICBQcm9ncmFtOiAnUHJvZ3JhbScsCisgICAgICAgIFByb3BlcnR5OiAnUHJv cGVydHknLAorICAgICAgICBSZXR1cm5TdGF0ZW1lbnQ6ICdSZXR1cm5TdGF0ZW1lbnQnLAorICAg ICAgICBTZXF1ZW5jZUV4cHJlc3Npb246ICdTZXF1ZW5jZUV4cHJlc3Npb24nLAorICAgICAgICBT cHJlYWRFbGVtZW50OiAnU3ByZWFkRWxlbWVudCcsCisgICAgICAgIFN3aXRjaFN0YXRlbWVudDog J1N3aXRjaFN0YXRlbWVudCcsCisgICAgICAgIFN3aXRjaENhc2U6ICdTd2l0Y2hDYXNlJywKKyAg ICAgICAgVGFnZ2VkVGVtcGxhdGVFeHByZXNzaW9uOiAnVGFnZ2VkVGVtcGxhdGVFeHByZXNzaW9u JywKKyAgICAgICAgVGVtcGxhdGVFbGVtZW50OiAnVGVtcGxhdGVFbGVtZW50JywKKyAgICAgICAg VGVtcGxhdGVMaXRlcmFsOiAnVGVtcGxhdGVMaXRlcmFsJywKKyAgICAgICAgVGhpc0V4cHJlc3Np b246ICdUaGlzRXhwc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zZTogWydwYXJh bScsICdib2R5J10sCisgICAgICAgIENsYXNzQm9keTogWydib2R5J10sCisgICAgICAgIENsYXNz RGVjbGFyYXRpb246IFsnaWQnLCAnYm9keScsICdzdXBlckNsYXNzJ10sCisgICAgICAgIENsYXNz RXhwcmVzc2lvbjogWydpZCcsICdib2R5JywgJ3N1cGVyQ2xhc3MnXSwKKyAgICAgICAgQ29tcHJl aGVuc2lvbkJsb2NrOiBbJ2xlZnQnLCAncmlnaHQnXSwgIC8vIENBVVRJT046IEl0J3MgZGVmZXJy ZWQgdG8gRVM3LgorICAgICAgICBDb21wcmVoZW5zaW9uRXhwcmVzc2lvbjogWydibG9ja3MnLCAn ZmlsdGVyJywgJ2JvZHknXSwgIC8vIENBVVRJT046IEl0J3MgZGVmZXJyZWQgdG8gRVM3LgorICAg ICAgICBDb25kaXRpb25hbEV4cHJlc3Npb246IFsndGVzdCcsICdjb25zZXF1ZW50JywgJ2FsdGVy bmF0ZSddLAorICAgICAgICBDb250aW51ZVN0YXRlbWVudDogWydsYWJlbCddLAorICAgICAgICBE ZWJ1Z2dlclN0YXRlbWVudDogW10sCisgICAgICAgIERpcmVjdGl2ZVN0YXRlbWVudDogW10sCisg ICAgICAgIERvV2hpbGVTdGF0ZW1lbnQ6IFsnYm9keScsICd0ZXN0J10sCisgICAgICAgIEVtcHR5 U3RhdGVtZW50OiBbXSwKKyAgICAgICAgRXhwb3J0QmF0Y2hTcGVjaWZpZXI6IFtdLAorICAgICAg ICBFeHBvcnREZWNsYXJhdGlvbjogWydkZWNsYXJhdGlvbicsICdzcGVjaWZpZXJzJywgJ3NvdXJj ZSddLAorICAgICAgICBFeHBvcnRTcGVjaWZpZXI6IFsnaWQnLCAnbmFtZSddLAorICAgICAgICBF eHByZXNzaW9uU3RhdGVtZW50OiBbJ2V4cHJlc3Npb24nXSwKKyAgICAgICAgRm9yU3RhdGVtZW50 OiBbJ2luaXQnLCAndGVzdCcsICd1cGRhdGUnLCAnYm9keSddLAorICAgICAgICBGb3JJblN0YXRl bWVudDogWydsZWZ0JywgJ3JpZ2h0JywgJ2JvZHknXSwKKyAgICAgICAgRm9yT2ZTdGF0ZW1lbnQ6 IFsnbGVmdCcsICdyaWdodCcsICdib2R5J10sCisgICAgICAgIEZ1bmN0aW9uRGVjbGFyYXRpb246 IFsnaWQnLCAncGFyYW1zJywgJ2RlZmF1bHRzJywgJ3Jlc3QnLCAnYm9keSddLAorICAgICAgICBG dW5jdGlvbkV4cHJlc3Npb246IFsnaWQnLCAncGFyYW1zJywgJ2RlZmF1bHRzJywgJ3Jlc3QnLCAn Ym9keSddLAorICAgICAgICBHZW5lcmF0b3JFeHByZXNzaW9uOiBbJ2Jsb2NrcycsICdmaWx0ZXIn LCAnYm9keSddLCAgLy8gQ0FVVElPTjogSXQncyBkZWZlcnJlZCB0byBFUzcuCisgICAgICAgIElk ZW50aWZpZXI6IFtdLAorICAgICAgICBJZlN0YXRlbWVudDogWyd0ZXN0JywgJ2NvbnNlcXVlbnQn LCAnYWx0ZXJuYXRlJ10sCisgICAgICAgIEltcG9ydERlY2xhcmF0aW9uOiBbJ3NwZWNpZmllcnMn LCAnc291cmNlJ10sCisgICAgICAgIEltcG9ydERlZmF1bHRTcGVjaWZpZXI6IFsnaWQnXSwKKyAg ICAgICAgSW1wb3J0TmFtZXNwYWNlU3BlY2lmaWVyOiBbJ2lkJ10sCisgICAgICAgIEltcG9ydFNw ZWNpZmllcjogWydpZCcsICduYW1lJ10sCisgICAgICAgIExpdGVyYWw6IFtdLAorICAgICAgICBM YWJlbGVkU3RhdGVtZW50OiBbJ2xhYmVsJywgJ2JvZHknXSwKKyAgICAgICAgTG9naWNhbEV4cHJl c3Npb246IFsnbGVmdCcsICdyaWdodCddLAorICAgICAgICBNZW1iZXJFeHByZXNzaW9uOiBbJ29i amVjdCcsICdwcm9wZXJ0eSddLAorICAgICAgICBNZXRob2REZWZpbml0aW9uOiBbJ2tleScsICd2 YWx1ZSddLAorICAgICAgICBNb2R1bGVTcGVjaWZpZXI6IFtdLAorICAgICAgICBOZXdFeHByZXNz aW9uOiBbJ2NhbGxlZScsICdhcmd1bWVudHMnXSwKKyAgICAgICAgT2JqZWN0RXhwcmVzc2lvbjog Wydwcm9wZXJ0aWVzJ10sCisgICAgICAgIE9iamVjdFBhdHRlcm46IFsncHJvcGVydGllcyddLAor ICAgICAgICBQcm9ncmFtOiBbJ2JvZHknXSwKKyAgICAgICAgUHJvcGVydHk6IFsna2V5JywgJ3Zh bHVlJ10sCisgICAgICAgIFJldHVyblN0YXRlbWVudDogWydhcmd1bWVudCddLAorICAgICAgICBT ZXF1ZW5jZUV4cHJlc3Npb246IFsnZXhwcmVzc2lvbnMnXSwKKyAgICAgICAgU3ByZWFkRWxlbWVu dDogWydhcmd1bWVudCddLAorICAgICAgICBTd2l0Y2hTdGF0ZW1lbnQ6IFsnZGlzY3JpbWluYW50 JywgJ2Nhc2VzJ10sCisgICAgICAgIFN3aXRjaENhc2U6IFsndGVzdCcsICdjb25zZXF1ZW50J10s CisgICAgICAgIFRhZ2dlZFRlbXBsYXRlRXhwcmVzc2lvbjogWyd0YWcnLCAncXVhc2knXSwKKyAg ICAgICAgVGVtcGxhdGVFbGVtZW50OiBbXSwKKyAgICAgICAgVGVtcGxhdGVMaXRlcmFsOiBbJ3F1 YXNpcycsICdleHByZXNzaW9ucyddLAorICAgICAgICBUaGlzRXhwcmVzc2lvbjogW10sCisgICAg ICAgIFRocm93U3RhdGVtZW50OiBbJ2FyZ3VtZW50J10sCisgICAgICAgIFRyeVN0YXRlbWVudDog WydibG9jaycsICdoYW5kbGVycycsICdoYW5kbGVyJywgJ2d1YXJkZWRIYW5kbGVycycsICdmaW5h bGl6ZXInXSwKKyAgICAgICAgVW5hcnlFeHByZXNzaW9uOiBbJ2FyZ3VtZW50J10sCisgICAgICAg IFVwZGF0ZUV4cHJlc3Npb246IFsnYXJndW1lbnQnXSwKKyAgICAgICAgVmFyaWFibGVEZWNsYXJh dGlvbjogWydkZWNsYXJhdGlvbnMnXSwKKyAgICAgICAgVmFyaWFibGVEZWNsYXJhdG9yOiBbJ2lk JywgJ2luaXQnXSwKKyAgICAgICAgV2hpbGVTdGF0ZW1lbnQ6IFsndGVzdCcsICdib2R5J10sCisg ICAgICAgIFdpdGhTdGF0ZW1lbnQ6IFsnb2JqZWN0JywgJ2JvZHknXSwKKyAgICAgICAgWWllbGRF eHByZXNzaW9uOiBbJ2FyZ3VtZW50J10KKyAgICB9OworCisgICAgLy8gdW5pcXVlIGlkCisgICAg QlJFQUsgPSB7fTsKKyAgICBTS0lQID0ge307CisgICAgUkVNT1ZFID0ge307CisKKyAgICBWaXNp dG9yT3B0aW9uID0geworICAgICAgICBCcmVhazogQlJFQUssCisgICAgICAgIFNraXA6IFNLSVAs CisgICAgICAgIFJlbW92ZTogUkVNT1ZFCisgICAgfTsKKworICAgIGZ1bmN0aW9uIFJlZmVyZW5j ZShwYXJlbnQsIGtleSkgeworICAgICAgICB0aGlzLnBhcmVudCA9IHBhcmVudDsKKyAgICAgICAg dGhpcy5rZXkgPSBrZXk7CisgICAgfQorCisgICAgUmVmZXJlbmNlLnByb3RvdHlwZS5yZXBsYWNl ID0gZnVuY3Rpb24gcmVwbGFjZShub2RlKSB7CisgICAgICAgIHRoaXMucGFyZW50W3RoaXMua2V5 XSA9IG5vZGU7CisgICAgfTsKKworICAgIFJlZmVyZW5jZS5wcm90b3R5cGUucmVtb3ZlID0gZnVu Y3Rpb24gcmVtb3ZlKCkgeworICAgICAgICBpZiAoaXNBcnJheSh0aGlzLnBhcmVudCkpIHsKKyAg ICAgICAgICAgIHRoaXMucGFyZW50LnNwbGljZSh0aGlzLmtleSwgMSk7CisgICAgICAgICAgICBy ZXR1cm4gdHJ1ZTsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIHRoaXMucmVwbGFjZShu dWxsKTsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgfQorICAgIH07CisKKyAg ICBmdW5jdGlvbiBFbGVtZW50KG5vZGUsIHBhdGgsIHdyYXAsIHJlZikgeworICAgICAgICB0aGlz Lm5vZGUgPSBub2RlOworICAgICAgICB0aGlzLnBhdGggPSBwYXRoOworICAgICAgICB0aGlzLndy YXAgPSB3cmFwOworICAgICAgICB0aGlzLnJlZiA9IHJlZjsKKyAgICB9CisKKyAgICBmdW5jdGlv biBDb250cm9sbGVyKCkgeyB9CisKKyAgICAvLyBBUEk6CisgICAgLy8gcmV0dXJuIHByb3BlcnR5 IHBhdGggYXJyYXkgZnJvbSByb290IHRvIGN1cnJlbnQgbm9kZQorICAgIENvbnRyb2xsZXIucHJv dG90eXBlLnBhdGggPSBmdW5jdGlvbiBwYXRoKCkgeworICAgICAgICB2YXIgaSwgaXosIGosIGp6 LCByZXN1bHQsIGVsZW1lbnQ7CisKKyAgICAgICAgZnVuY3Rpb24gYWRkVG9QYXRoKHJlc3VsdCwg cGF0aCkgeworICAgICAgICAgICAgaWYgKGlzQXJyYXkocGF0aCkpIHsKKyAgICAgICAgICAgICAg ICBmb3IgKGogPSAwLCBqeiA9IHBhdGgubGVuZ3RoOyBqIDwgano7ICsraikgeworICAgICAgICAg ICAgICAgICAgICByZXN1bHQucHVzaChwYXRoW2pdKTsKKyAgICAgICAgICAgICAgICB9CisgICAg ICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIHJlc3VsdC5wdXNoKHBhdGgpOworICAg ICAgICAgICAgfQorICAgICAgICB9CisKKyAgICAgICAgLy8gcm9vdCBub2RlCisgICAgICAgIGlm ICghdGhpcy5fX2N1cnJlbnQucGF0aCkgeworICAgICAgICAgICAgcmV0dXJuIG51bGw7CisgICAg ICAgIH0KKworICAgICAgICAvLyBmaXJzdCBub2RlIGlzIHNlbnRpbmVsLCBzZWNvbmQgbm9kZSBp cyByb290IGVsZW1lbnQKKyAgICAgICAgcmVzdWx0ID0gW107CisgICAgICAgIGZvciAoaSA9IDIs IGl6ID0gdGhpcy5fX2xlYXZlbGlzdC5sZW5ndGg7IGkgPCBpejsgKytpKSB7CisgICAgICAgICAg ICBlbGVtZW50ID0gdGhpcy5fX2xlYXZlbGlzdFtpXTsKKyAgICAgICAgICAgIGFkZFRvUGF0aChy ZXN1bHQsIGVsZW1lbnQucGF0aCk7CisgICAgICAgIH0KKyAgICAgICAgYWRkVG9QYXRoKHJlc3Vs dCwgdGhpcy5fX2N1cnJlbnQucGF0aCk7CisgICAgICAgIHJldHVybiByZXN1bHQ7CisgICAgfTsK KworICAgIC8vIEFQSToKKyAgICAvLyByZXR1cm4gdHlwZSBvZiBjdXJyZW50IG5vZGUKKyAgICBD b250cm9sbGVyLnByb3RvdHlwZS50eXBlID0gZnVuY3Rpb24gKCkgeworICAgICAgICB2YXIgbm9k ZSA9IHRoaXMuY3VycmVudCgpOworICAgICAgICByZXR1cm4gbm9kZS50eXBlIHx8IHRoaXMuX19j dXJyZW50LndyYXA7CisgICAgfTsKKworICAgIC8vIEFQSToKKyAgICAvLyByZXR1cm4gYXJyYXkg b2YgcGFyZW50IGVsZW1lbnRzCisgICAgQ29udHJvbGxlci5wcm90b3R5cGUucGFyZW50cyA9IGZ1 bmN0aW9uIHBhcmVudHMoKSB7CisgICAgICAgIHZhciBpLCBpeiwgcmVzdWx0OworCisgICAgICAg IC8vIGZpcnN0IG5vZGUgaXMgc2VudGluZWwKKyAgICAgICAgcmVzdWx0ID0gW107CisgICAgICAg IGZvciAoaSA9IDEsIGl6ID0gdGhpcy5fX2xlYXZlbGlzdC5sZW5ndGg7IGkgPCBpejsgKytpKSB7 CisgICAgICAgICAgICByZXN1bHQucHVzaCh0aGlzLl9fbGVhdmVsaXN0W2ldLm5vZGUpOworICAg ICAgICB9CisKKyAgICAgICAgcmV0dXJuIHJlc3VsdDsKKyAgICB9OworCisgICAgLy8gQVBJOgor ICAgIC8vIHJldHVybiBjdXJyZW50IG5vZGUKKyAgICBDb250cm9sbGVyLnByb3RvdHlwZS5jdXJy ZW50ID0gZnVuY3Rpb24gY3VycmVudCgpIHsKKyAgICAgICAgcmV0dXJuIHRoaXMuX19jdXJyZW50 Lm5vZGU7CisgICAgfTsKKworICAgIENvbnRyb2xsZXIucHJvdG90eXBlLl9fZXhlY3V0ZSA9IGZ1 bmN0aW9uIF9fZXhlY3V0ZShjYWxsYmFjaywgZWxlbWVudCkgeworICAgICAgICB2YXIgcHJldmlv dXMsIHJlc3VsdDsKKworICAgICAgICByZXN1bHQgPSB1bmRlZmluZWQ7CisKKyAgICAgICAgcHJl dmlvdXMgID0gdGhpcy5fX2N1cnJlbnQ7CisgICAgICAgIHRoaXMuX19jdXJyZW50ID0gZWxlbWVu dDsKKyAgICAgICAgdGhpcy5fX3N0YXRlID0gbnVsbDsKKyAgICAgICAgaWYgKGNhbGxiYWNrKSB7 CisgICAgICAgICAgICByZXN1bHQgPSBjYWxsYmFjay5jYWxsKHRoaXMsIGVsZW1lbnQubm9kZSwg dGhpcy5fX2xlYXZlbGlzdFt0aGlzLl9fbGVhdmVsaXN0Lmxlbmd0aCAtIDFdLm5vZGUpOworICAg ICAgICB9CisgICAgICAgIHRoaXMuX19jdXJyZW50ID0gcHJldmlvdXM7CisKKyAgICAgICAgcmV0 dXJuIHJlc3VsdDsKKyAgICB9OworCisgICAgLy8gQVBJOgorICAgIC8vIG5vdGlmeSBjb250cm9s IHNraXAgLyBicmVhaworICAgIENvbnRyb2xsZXIucHJvdG90eXBlLm5vdGlmeSA9IGZ1bmN0aW9u IG5vdGlmeShmbGFnKSB7CisgICAgICAgIHRoaXMuX19zdGF0ZSA9IGZsYWc7CisgICAgfTsKKwor ICAgIC8vIEFQSToKKyAgICAvLyBza2lwIGNoaWxkIG5vZGVzIG9mIGN1cnJlbnQgbm9kZQorICAg IENvbnRyb2xsZXIucHJvdG90eXBlLnNraXAgPSBmdW5jdGlvbiAoKSB7CisgICAgICAgIHRoaXMu bm90aWZ5KFNLSVApOworICAgIH07CisKKyAgICAvLyBBUEk6CisgICAgLy8gYnJlYWsgdHJhdmVy c2FscworICAgIENvbnRyb2xsZXIucHJvdG90eXBlWydicmVhayddID0gZnVuY3Rpb24gKCkgewor ICAgICAgICB0aGlzLm5vdGlmeShCUkVBSyk7CisgICAgfTsKKworICAgIC8vIEFQSToKKyAgICAv LyByZW1vdmUgbm9kZQorICAgIENvbnRyb2xsZXIucHJvdG90eXBlLnJlbW92ZSA9IGZ1bmN0aW9u ICgpIHsKKyAgICAgICAgdGhpcy5ub3RpZnkoUkVNT1ZFKTsKKyAgICB9OworCisgICAgQ29udHJv bGxlci5wcm90b3R5cGUuX19pbml0aWFsaXplID0gZnVuY3Rpb24ocm9vdCwgdmlzaXRvcikgewor ICAgICAgICB0aGlzLnZpc2l0b3IgPSB2aXNpdG9yOworICAgICAgICB0aGlzLnJvb3QgPSByb290 OworICAgICAgICB0aGlzLl9fd29ya2xpc3QgPSBbXTsKKyAgICAgICAgdGhpcy5fX2xlYXZlbGlz dCA9IFtdOworICAgICAgICB0aGlzLl9fY3VycmVudCA9IG51bGw7CisgICAgICAgIHRoaXMuX19z dGF0ZSA9IG51bGw7CisgICAgICAgIHRoaXMuX19mYWxsYmFjayA9IHZpc2l0b3IuZmFsbGJhY2sg PT09ICdpdGVyYXRpb24nOworICAgICAgICB0aGlzLl9fa2V5cyA9IFZpc2l0b3JLZXlzOworICAg ICAgICBpZiAodmlzaXRvci5rZXlzKSB7CisgICAgICAgICAgICB0aGlzLl9fa2V5cyA9IGV4dGVu ZChvYmplY3RDcmVhdGUodGhpcy5fX2tleXMpLCB2aXNpdG9yLmtleXMpOworICAgICAgICB9Cisg ICAgfTsKKworICAgIGZ1bmN0aW9uIGlzTm9kZShub2RlKSB7CisgICAgICAgIGlmIChub2RlID09 IG51bGwpIHsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgfQorICAgICAgICBy ZXR1cm4gdHlwZW9mIG5vZGUgPT09ICdvYmplY3QnICYmIHR5cGVvZiBub2RlLnR5cGUgPT09ICdz dHJpbmcnOworICAgIH0KKworICAgIGZ1bmN0aW9uIGlzUHJvcGVydHkobm9kZVR5cGUsIGtleSkg eworICAgICAgICByZXR1cm4gKG5vZGVUeXBlID09PSBTeW50YXguT2JqZWN0RXhwcmVzc2lvbiB8 fCBub2RlVHlwZSA9PT0gU3ludGF4Lk9iamVjdFBhdHRlcm4pICYmICdwcm9wZXJ0aWVzJyA9PT0g a2V5OworICAgIH0KKworICAgIENvbnRyb2xsZXIucHJvdG90eXBlLnRyYXZlcnNlID0gZnVuY3Rp b24gdHJhdmVyc2Uocm9vdCwgdmlzaXRvcikgeworICAgICAgICB2YXIgd29ya2xpc3QsCisgICAg ICAgICAgICBsZWF2ZWxpc3QsCisgICAgICAgICAgICBlbGVtZW50LAorICAgICAgICAgICAgbm9k ZSwKKyAgICAgICAgICAgIG5vZGVUeXBlLAorICAgICAgICAgICAgcmV0LAorICAgICAgICAgICAg a2V5LAorICAgICAgICAgICAgY3VycmVudCwKKyAgICAgICAgICAgIGN1cnJlbnQyLAorICAgICAg ICAgICAgY2FuZGlkYXRlcywKKyAgICAgICAgICAgIGNhbmRpZGF0ZSwKKyAgICAgICAgICAgIHNl bnRpbmVsOworCisgICAgICAgIHRoaXMuX19pbml0aWFsaXplKHJvb3QsIHZpc2l0b3IpOworCisg ICAgICAgIHNlbnRpbmVsID0ge307CisKKyAgICAgICAgLy8gcmVmZXJlbmNlCisgICAgICAgIHdv cmtsaXN0ID0gdGhpcy5fX3dvcmtsaXN0OworICAgICAgICBsZWF2ZWxpc3QgPSB0aGlzLl9fbGVh dmVsaXN0OworCisgICAgICAgIC8vIGluaXRpYWxpemUKKyAgICAgICAgd29ya2xpc3QucHVzaChu ZXcgRWxlbWVudChyb290LCBudWxsLCBudWxsLCBudWxsKSk7CisgICAgICAgIGxlYXZlbGlzdC5w dXNoKG5ldyBFbGVtZW50KG51bGwsIG51bGwsIG51bGwsIG51bGwpKTsKKworICAgICAgICB3aGls ZSAod29ya2xpc3QubGVuZ3RoKSB7CisgICAgICAgICAgICBlbGVtZW50ID0gd29ya2xpc3QucG9w KCk7CisKKyAgICAgICAgICAgIGlmIChlbGVtZW50ID09PSBzZW50aW5lbCkgeworICAgICAgICAg ICAgICAgIGVsZW1lbnQgPSBsZWF2ZWxpc3QucG9wKCk7CisKKyAgICAgICAgICAgICAgICByZXQg PSB0aGlzLl9fZXhlY3V0ZSh2aXNpdG9yLmxlYXZlLCBlbGVtZW50KTsKKworICAgICAgICAgICAg ICAgIGlmICh0aGlzLl9fc3RhdGUgPT09IEJSRUFLIHx8IHJldCA9PT0gQlJFQUspIHsKKyAgICAg ICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAg ICBjb250aW51ZTsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKGVsZW1lbnQubm9k ZSkgeworCisgICAgICAgICAgICAgICAgcmV0ID0gdGhpcy5fX2V4ZWN1dGUodmlzaXRvci5lbnRl ciwgZWxlbWVudCk7CisKKyAgICAgICAgICAgICAgICBpZiAodGhpcy5fX3N0YXRlID09PSBCUkVB SyB8fCByZXQgPT09IEJSRUFLKSB7CisgICAgICAgICAgICAgICAgICAgIHJldHVybjsKKyAgICAg ICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICB3b3JrbGlzdC5wdXNoKHNlbnRpbmVsKTsK KyAgICAgICAgICAgICAgICBsZWF2ZWxpc3QucHVzaChlbGVtZW50KTsKKworICAgICAgICAgICAg ICAgIGlmICh0aGlzLl9fc3RhdGUgPT09IFNLSVAgfHwgcmV0ID09PSBTS0lQKSB7CisgICAgICAg ICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAg ICAgIG5vZGUgPSBlbGVtZW50Lm5vZGU7CisgICAgICAgICAgICAgICAgbm9kZVR5cGUgPSBlbGVt ZW50LndyYXAgfHwgbm9kZS50eXBlOworICAgICAgICAgICAgICAgIGNhbmRpZGF0ZXMgPSB0aGlz Ll9fa2V5c1tub2RlVHlwZV07CisgICAgICAgICAgICAgICAgaWYgKCFjYW5kaWRhdGVzKSB7Cisg ICAgICAgICAgICAgICAgICAgIGlmICh0aGlzLl9fZmFsbGJhY2spIHsKKyAgICAgICAgICAgICAg ICAgICAgICAgIGNhbmRpZGF0ZXMgPSBvYmplY3RLZXlzKG5vZGUpOworICAgICAgICAgICAgICAg ICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdV bmtub3duIG5vZGUgdHlwZSAnICsgbm9kZVR5cGUgKyAnLicpOworICAgICAgICAgICAgICAgICAg ICB9CisgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgY3VycmVudCA9IGNhbmRp ZGF0ZXMubGVuZ3RoOworICAgICAgICAgICAgICAgIHdoaWxlICgoY3VycmVudCAtPSAxKSA+PSAw KSB7CisgICAgICAgICAgICAgICAgICAgIGtleSA9IGNhbmRpZGF0ZXNbY3VycmVudF07CisgICAg ICAgICAgICAgICAgICAgIGNhbmRpZGF0ZSA9IG5vZGVba2V5XTsKKyAgICAgICAgICAgICAgICAg ICAgaWYgKCFjYW5kaWRhdGUpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwor ICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgaWYgKGlzQXJyYXko Y2FuZGlkYXRlKSkgeworICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudDIgPSBjYW5kaWRh dGUubGVuZ3RoOworICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKChjdXJyZW50MiAtPSAx KSA+PSAwKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFjYW5kaWRhdGVbY3Vy cmVudDJdKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAg ICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBp ZiAoaXNQcm9wZXJ0eShub2RlVHlwZSwgY2FuZGlkYXRlc1tjdXJyZW50XSkpIHsKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgZWxlbWVudCA9IG5ldyBFbGVtZW50KGNhbmRpZGF0ZVtj dXJyZW50Ml0sIFtrZXksIGN1cnJlbnQyXSwgJ1Byb3BlcnR5JywgbnVsbCk7CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpc05vZGUoY2FuZGlkYXRlW2N1cnJlbnQyXSkp IHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxlbWVudCA9IG5ldyBFbGVtZW50 KGNhbmRpZGF0ZVtjdXJyZW50Ml0sIFtrZXksIGN1cnJlbnQyXSwgbnVsbCwgbnVsbCk7CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgY29udGludWU7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgIHdvcmtsaXN0LnB1c2goZWxlbWVudCk7CisgICAgICAgICAg ICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoaXNOb2RlKGNh bmRpZGF0ZSkpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHdvcmtsaXN0LnB1c2gobmV3IEVs ZW1lbnQoY2FuZGlkYXRlLCBrZXksIG51bGwsIG51bGwpKTsKKyAgICAgICAgICAgICAgICAgICAg fQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH07CisK KyAgICBDb250cm9sbGVyLnByb3RvdHlwZS5yZXBsYWNlID0gZnVuY3Rpb24gcmVwbGFjZShyb290 LCB2aXNpdG9yKSB7CisgICAgICAgIGZ1bmN0aW9uIHJlbW92ZUVsZW0oZWxlbWVudCkgeworICAg ICAgICAgICAgdmFyIGksCisgICAgICAgICAgICAgICAga2V5LAorICAgICAgICAgICAgICAgIG5l eHRFbGVtLAorICAgICAgICAgICAgICAgIHBhcmVudDsKKworICAgICAgICAgICAgaWYgKGVsZW1l bnQucmVmLnJlbW92ZSgpKSB7CisgICAgICAgICAgICAgICAgLy8gV2hlbiB0aGUgcmVmZXJlbmNl IGlzIGFuIGVsZW1lbnQgb2YgYW4gYXJyYXkuCisgICAgICAgICAgICAgICAga2V5ID0gZWxlbWVu dC5yZWYua2V5OworICAgICAgICAgICAgICAgIHBhcmVudCA9IGVsZW1lbnQucmVmLnBhcmVudDsK KworICAgICAgICAgICAgICAgIC8vIElmIHJlbW92ZWQgZnJvbSBhcnJheSwgdGhlbiBkZWNyZWFz ZSBmb2xsb3dpbmcgaXRlbXMnIGtleXMuCisgICAgICAgICAgICAgICAgaSA9IHdvcmtsaXN0Lmxl bmd0aDsKKyAgICAgICAgICAgICAgICB3aGlsZSAoaS0tKSB7CisgICAgICAgICAgICAgICAgICAg IG5leHRFbGVtID0gd29ya2xpc3RbaV07CisgICAgICAgICAgICAgICAgICAgIGlmIChuZXh0RWxl bS5yZWYgJiYgbmV4dEVsZW0ucmVmLnBhcmVudCA9PT0gcGFyZW50KSB7CisgICAgICAgICAgICAg ICAgICAgICAgICBpZiAgKG5leHRFbGVtLnJlZi5rZXkgPCBrZXkpIHsKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAg ICAgICAgICAgICAgICAgIC0tbmV4dEVsZW0ucmVmLmtleTsKKyAgICAgICAgICAgICAgICAgICAg fQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorCisgICAgICAg IHZhciB3b3JrbGlzdCwKKyAgICAgICAgICAgIGxlYXZlbGlzdCwKKyAgICAgICAgICAgIG5vZGUs CisgICAgICAgICAgICBub2RlVHlwZSwKKyAgICAgICAgICAgIHRhcmdldCwKKyAgICAgICAgICAg IGVsZW1lbnQsCisgICAgICAgICAgICBjdXJyZW50LAorICAgICAgICAgICAgY3VycmVudDIsCisg ICAgICAgICAgICBjYW5kaWRhdGVzLAorICAgICAgICAgICAgY2FuZGlkYXRlLAorICAgICAgICAg ICAgc2VudGluZWwsCisgICAgICAgICAgICBvdXRlciwKKyAgICAgICAgICAgIGtleTsKKworICAg ICAgICB0aGlzLl9faW5pdGlhbGl6ZShyb290LCB2aXNpdG9yKTsKKworICAgICAgICBzZW50aW5l bCA9IHt9OworCisgICAgICAgIC8vIHJlZmVyZW5jZQorICAgICAgICB3b3JrbGlzdCA9IHRoaXMu X193b3JrbGlzdDsKKyAgICAgICAgbGVhdmVsaXN0ID0gdGhpcy5fX2xlYXZlbGlzdDsKKworICAg ICAgICAvLyBpbml0aWFsaXplCisgICAgICAgIG91dGVyID0geworICAgICAgICAgICAgcm9vdDog cm9vdAorICAgICAgICB9OworICAgICAgICBlbGVtZW50ID0gbmV3IEVsZW1lbnQocm9vdCwgbnVs bCwgbnVsbCwgbmV3IFJlZmVyZW5jZShvdXRlciwgJ3Jvb3QnKSk7CisgICAgICAgIHdvcmtsaXN0 LnB1c2goZWxlbWVudCk7CisgICAgICAgIGxlYXZlbGlzdC5wdXNoKGVsZW1lbnQpOworCisgICAg ICAgIHdoaWxlICh3b3JrbGlzdC5sZW5ndGgpIHsKKyAgICAgICAgICAgIGVsZW1lbnQgPSB3b3Jr bGlzdC5wb3AoKTsKKworICAgICAgICAgICAgaWYgKGVsZW1lbnQgPT09IHNlbnRpbmVsKSB7Cisg ICAgICAgICAgICAgICAgZWxlbWVudCA9IGxlYXZlbGlzdC5wb3AoKTsKKworICAgICAgICAgICAg ICAgIHRhcmdldCA9IHRoaXMuX19leGVjdXRlKHZpc2l0b3IubGVhdmUsIGVsZW1lbnQpOworCisg ICAgICAgICAgICAgICAgLy8gbm9kZSBtYXkgYmUgcmVwbGFjZWQgd2l0aCBudWxsLAorICAgICAg ICAgICAgICAgIC8vIHNvIGRpc3Rpbmd1aXNoIGJldHdlZW4gdW5kZWZpbmVkIGFuZCBudWxsIGlu IHRoaXMgcGxhY2UKKyAgICAgICAgICAgICAgICBpZiAodGFyZ2V0ICE9PSB1bmRlZmluZWQgJiYg dGFyZ2V0ICE9PSBCUkVBSyAmJiB0YXJnZXQgIT09IFNLSVAgJiYgdGFyZ2V0ICE9PSBSRU1PVkUp IHsKKyAgICAgICAgICAgICAgICAgICAgLy8gcmVwbGFjZQorICAgICAgICAgICAgICAgICAgICBl bGVtZW50LnJlZi5yZXBsYWNlKHRhcmdldCk7CisgICAgICAgICAgICAgICAgfQorCisgICAgICAg ICAgICAgICAgaWYgKHRoaXMuX19zdGF0ZSA9PT0gUkVNT1ZFIHx8IHRhcmdldCA9PT0gUkVNT1ZF KSB7CisgICAgICAgICAgICAgICAgICAgIHJlbW92ZUVsZW0oZWxlbWVudCk7CisgICAgICAgICAg ICAgICAgfQorCisgICAgICAgICAgICAgICAgaWYgKHRoaXMuX19zdGF0ZSA9PT0gQlJFQUsgfHwg dGFyZ2V0ID09PSBCUkVBSykgeworICAgICAgICAgICAgICAgICAgICByZXR1cm4gb3V0ZXIucm9v dDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgY29udGludWU7CisgICAgICAg ICAgICB9CisKKyAgICAgICAgICAgIHRhcmdldCA9IHRoaXMuX19leGVjdXRlKHZpc2l0b3IuZW50 ZXIsIGVsZW1lbnQpOworCisgICAgICAgICAgICAvLyBub2RlIG1heSBiZSByZXBsYWNlZCB3aXRo IG51bGwsCisgICAgICAgICAgICAvLyBzbyBkaXN0aW5ndWlzaCBiZXR3ZWVuIHVuZGVmaW5lZCBh bmQgbnVsbCBpbiB0aGlzIHBsYWNlCisgICAgICAgICAgICBpZiAodGFyZ2V0ICE9PSB1bmRlZmlu ZWQgJiYgdGFyZ2V0ICE9PSBCUkVBSyAmJiB0YXJnZXQgIT09IFNLSVAgJiYgdGFyZ2V0ICE9PSBS RU1PVkUpIHsKKyAgICAgICAgICAgICAgICAvLyByZXBsYWNlCisgICAgICAgICAgICAgICAgZWxl bWVudC5yZWYucmVwbGFjZSh0YXJnZXQpOworICAgICAgICAgICAgICAgIGVsZW1lbnQubm9kZSA9 IHRhcmdldDsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKHRoaXMuX19zdGF0ZSA9 PT0gUkVNT1ZFIHx8IHRhcmdldCA9PT0gUkVNT1ZFKSB7CisgICAgICAgICAgICAgICAgcmVtb3Zl RWxlbShlbGVtZW50KTsKKyAgICAgICAgICAgICAgICBlbGVtZW50Lm5vZGUgPSBudWxsOworICAg ICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAodGhpcy5fX3N0YXRlID09PSBCUkVBSyB8fCB0 YXJnZXQgPT09IEJSRUFLKSB7CisgICAgICAgICAgICAgICAgcmV0dXJuIG91dGVyLnJvb3Q7Cisg ICAgICAgICAgICB9CisKKyAgICAgICAgICAgIC8vIG5vZGUgbWF5IGJlIG51bGwKKyAgICAgICAg ICAgIG5vZGUgPSBlbGVtZW50Lm5vZGU7CisgICAgICAgICAgICBpZiAoIW5vZGUpIHsKKyAgICAg ICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgd29ya2xp c3QucHVzaChzZW50aW5lbCk7CisgICAgICAgICAgICBsZWF2ZWxpc3QucHVzaChlbGVtZW50KTsK KworICAgICAgICAgICAgaWYgKHRoaXMuX19zdGF0ZSA9PT0gU0tJUCB8fCB0YXJnZXQgPT09IFNL SVApIHsKKyAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICAgIH0KKworICAgICAg ICAgICAgbm9kZVR5cGUgPSBlbGVtZW50LndyYXAgfHwgbm9kZS50eXBlOworICAgICAgICAgICAg Y2FuZGlkYXRlcyA9IHRoaXMuX19rZXlzW25vZGVUeXBlXTsKKyAgICAgICAgICAgIGlmICghY2Fu ZGlkYXRlcykgeworICAgICAgICAgICAgICAgIGlmICh0aGlzLl9fZmFsbGJhY2spIHsKKyAgICAg ICAgICAgICAgICAgICAgY2FuZGlkYXRlcyA9IG9iamVjdEtleXMobm9kZSk7CisgICAgICAgICAg ICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdVbmtu b3duIG5vZGUgdHlwZSAnICsgbm9kZVR5cGUgKyAnLicpOworICAgICAgICAgICAgICAgIH0KKyAg ICAgICAgICAgIH0KKworICAgICAgICAgICAgY3VycmVudCA9IGNhbmRpZGF0ZXMubGVuZ3RoOwor ICAgICAgICAgICAgd2hpbGUgKChjdXJyZW50IC09IDEpID49IDApIHsKKyAgICAgICAgICAgICAg ICBrZXkgPSBjYW5kaWRhdGVzW2N1cnJlbnRdOworICAgICAgICAgICAgICAgIGNhbmRpZGF0ZSA9 IG5vZGVba2V5XTsKKyAgICAgICAgICAgICAgICBpZiAoIWNhbmRpZGF0ZSkgeworICAgICAgICAg ICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAg ICBpZiAoaXNBcnJheShjYW5kaWRhdGUpKSB7CisgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQy ID0gY2FuZGlkYXRlLmxlbmd0aDsKKyAgICAgICAgICAgICAgICAgICAgd2hpbGUgKChjdXJyZW50 MiAtPSAxKSA+PSAwKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWNhbmRpZGF0ZVtj dXJyZW50Ml0pIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAgICAg ICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpc1Byb3Bl cnR5KG5vZGVUeXBlLCBjYW5kaWRhdGVzW2N1cnJlbnRdKSkgeworICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGVsZW1lbnQgPSBuZXcgRWxlbWVudChjYW5kaWRhdGVbY3VycmVudDJdLCBba2V5 LCBjdXJyZW50Ml0sICdQcm9wZXJ0eScsIG5ldyBSZWZlcmVuY2UoY2FuZGlkYXRlLCBjdXJyZW50 MikpOworICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChpc05vZGUoY2FuZGlkYXRl W2N1cnJlbnQyXSkpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbGVtZW50ID0gbmV3 IEVsZW1lbnQoY2FuZGlkYXRlW2N1cnJlbnQyXSwgW2tleSwgY3VycmVudDJdLCBudWxsLCBuZXcg UmVmZXJlbmNlKGNhbmRpZGF0ZSwgY3VycmVudDIpKTsKKyAgICAgICAgICAgICAgICAgICAgICAg IH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7CisgICAgICAg ICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICB3b3JrbGlzdC5wdXNo KGVsZW1lbnQpOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfSBlbHNl IGlmIChpc05vZGUoY2FuZGlkYXRlKSkgeworICAgICAgICAgICAgICAgICAgICB3b3JrbGlzdC5w dXNoKG5ldyBFbGVtZW50KGNhbmRpZGF0ZSwga2V5LCBudWxsLCBuZXcgUmVmZXJlbmNlKG5vZGUs IGtleSkpKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CisgICAgICAgIH0KKwor ICAgICAgICByZXR1cm4gb3V0ZXIucm9vdDsKKyAgICB9OworCisgICAgZnVuY3Rpb24gdHJhdmVy c2Uocm9vdCwgdmlzaXRvcikgeworICAgICAgICB2YXIgY29udHJvbGxlciA9IG5ldyBDb250cm9s bGVyKCk7CisgICAgICAgIHJldHVybiBjb250cm9sbGVyLnRyYXZlcnNlKHJvb3QsIHZpc2l0b3Ip OworICAgIH0KKworICAgIGZ1bmN0aW9uIHJlcGxhY2Uocm9vdCwgdmlzaXRvcikgeworICAgICAg ICB2YXIgY29udHJvbGxlciA9IG5ldyBDb250cm9sbGVyKCk7CisgICAgICAgIHJldHVybiBjb250 cm9sbGVyLnJlcGxhY2Uocm9vdCwgdmlzaXRvcik7CisgICAgfQorCisgICAgZnVuY3Rpb24gZXh0 ZW5kQ29tbWVudFJhbmdlKGNvbW1lbnQsIHRva2VucykgeworICAgICAgICB2YXIgdGFyZ2V0Owor CisgICAgICAgIHRhcmdldCA9IHVwcGVyQm91bmQodG9rZW5zLCBmdW5jdGlvbiBzZWFyY2godG9r ZW4pIHsKKyAgICAgICAgICAgIHJldHVybiB0b2tlbi5yYW5nZVswXSA+IGNvbW1lbnQucmFuZ2Vb MF07CisgICAgICAgIH0pOworCisgICAgICAgIGNvbW1lbnQuZXh0ZW5kZWRSYW5nZSA9IFtjb21t ZW50LnJhbmdlWzBdLCBjb21tZW50LnJhbmdlWzFdXTsKKworICAgICAgICBpZiAodGFyZ2V0ICE9 PSB0b2tlbnMubGVuZ3RoKSB7CisgICAgICAgICAgICBjb21tZW50LmV4dGVuZGVkUmFuZ2VbMV0g PSB0b2tlbnNbdGFyZ2V0XS5yYW5nZVswXTsKKyAgICAgICAgfQorCisgICAgICAgIHRhcmdldCAt PSAxOworICAgICAgICBpZiAodGFyZ2V0ID49IDApIHsKKyAgICAgICAgICAgIGNvbW1lbnQuZXh0 ZW5kZWRSYW5nZVswXSA9IHRva2Vuc1t0YXJnZXRdLnJhbmdlWzFdOworICAgICAgICB9CisKKyAg ICAgICAgcmV0dXJuIGNvbW1lbnQ7CisgICAgfQorCisgICAgZnVuY3Rpb24gYXR0YWNoQ29tbWVu dHModHJlZSwgcHJvdmlkZWRDb21tZW50cywgdG9rZW5zKSB7CisgICAgICAgIC8vIEF0IGZpcnN0 LCB3ZSBzaG91bGQgY2FsY3VsYXRlIGV4dGVuZGVkIGNvbW1lbnQgcmFuZ2VzLgorICAgICAgICB2 YXIgY29tbWVudHMgPSBbXSwgY29tbWVudCwgbGVuLCBpLCBjdXJzb3I7CisKKyAgICAgICAgaWYg KCF0cmVlLnJhbmdlKSB7CisgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ2F0dGFjaENvbW1l bnRzIG5lZWRzIHJhbmdlIGluZm9ybWF0aW9uJyk7CisgICAgICAgIH0KKworICAgICAgICAvLyB0 b2tlbnMgYXJyYXkgaXMgZW1wdHksIHdlIGF0dGFjaCBjb21tZW50cyB0byB0cmVlIGFzICdsZWFk aW5nQ29tbWVudHMnCisgICAgICAgIGlmICghdG9rZW5zLmxlbmd0aCkgeworICAgICAgICAgICAg aWYgKHByb3ZpZGVkQ29tbWVudHMubGVuZ3RoKSB7CisgICAgICAgICAgICAgICAgZm9yIChpID0g MCwgbGVuID0gcHJvdmlkZWRDb21tZW50cy5sZW5ndGg7IGkgPCBsZW47IGkgKz0gMSkgeworICAg ICAgICAgICAgICAgICAgICBjb21tZW50ID0gZGVlcENvcHkocHJvdmlkZWRDb21tZW50c1tpXSk7 CisgICAgICAgICAgICAgICAgICAgIGNvbW1lbnQuZXh0ZW5kZWRSYW5nZSA9IFswLCB0cmVlLnJh bmdlWzBdXTsKKyAgICAgICAgICAgICAgICAgICAgY29tbWVudHMucHVzaChjb21tZW50KTsKKyAg ICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgdHJlZS5sZWFkaW5nQ29tbWVudHMgPSBj b21tZW50czsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHJldHVybiB0cmVlOworICAgICAg ICB9CisKKyAgICAgICAgZm9yIChpID0gMCwgbGVuID0gcHJvdmlkZWRDb21tZW50cy5sZW5ndGg7 IGkgPCBsZW47IGkgKz0gMSkgeworICAgICAgICAgICAgY29tbWVudHMucHVzaChleHRlbmRDb21t ZW50UmFuZ2UoZGVlcENvcHkocHJvdmlkZWRDb21tZW50c1tpXSksIHRva2VucykpOworICAgICAg ICB9CisKKyAgICAgICAgLy8gVGhpcyBpcyBiYXNlZCBvbiBKb2huIEZyZWVtYW4ncyBpbXBsZW1l bnRhdGlvbi4KKyAgICAgICAgY3Vyc29yID0gMDsKKyAgICAgICAgdHJhdmVyc2UodHJlZSwgewor ICAgICAgICAgICAgZW50ZXI6IGZ1bmN0aW9uIChub2RlKSB7CisgICAgICAgICAgICAgICAgdmFy IGNvbW1lbnQ7CisKKyAgICAgICAgICAgICAgICB3aGlsZSAoY3Vyc29yIDwgY29tbWVudHMubGVu Z3RoKSB7CisgICAgICAgICAgICAgICAgICAgIGNvbW1lbnQgPSBjb21tZW50c1tjdXJzb3JdOwor ICAgICAgICAgICAgICAgICAgICBpZiAoY29tbWVudC5leHRlbmRlZFJhbmdlWzFdID4gbm9kZS5y YW5nZVswXSkgeworICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAg ICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICBpZiAoY29tbWVudC5leHRlbmRlZFJhbmdl WzFdID09PSBub2RlLnJhbmdlWzBdKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIW5v ZGUubGVhZGluZ0NvbW1lbnRzKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS5s ZWFkaW5nQ29tbWVudHMgPSBbXTsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAg ICAgICAgICAgICAgICAgIG5vZGUubGVhZGluZ0NvbW1lbnRzLnB1c2goY29tbWVudCk7CisgICAg ICAgICAgICAgICAgICAgICAgICBjb21tZW50cy5zcGxpY2UoY3Vyc29yLCAxKTsKKyAgICAgICAg ICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAx OworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAg ICAgICAgLy8gYWxyZWFkeSBvdXQgb2Ygb3duZWQgbm9kZQorICAgICAgICAgICAgICAgIGlmIChj dXJzb3IgPT09IGNvbW1lbnRzLmxlbmd0aCkgeworICAgICAgICAgICAgICAgICAgICByZXR1cm4g VmlzaXRvck9wdGlvbi5CcmVhazsKKyAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAg ICBpZiAoY29tbWVudHNbY3Vyc29yXS5leHRlbmRlZFJhbmdlWzBdID4gbm9kZS5yYW5nZVsxXSkg eworICAgICAgICAgICAgICAgICAgICByZXR1cm4gVmlzaXRvck9wdGlvbi5Ta2lwOworICAgICAg ICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfSk7CisKKyAgICAgICAgY3Vyc29y ID0gMDsKKyAgICAgICAgdHJhdmVyc2UodHJlZSwgeworICAgICAgICAgICAgbGVhdmU6IGZ1bmN0 aW9uIChub2RlKSB7CisgICAgICAgICAgICAgICAgdmFyIGNvbW1lbnQ7CisKKyAgICAgICAgICAg ICAgICB3aGlsZSAoY3Vyc29yIDwgY29tbWVudHMubGVuZ3RoKSB7CisgICAgICAgICAgICAgICAg ICAgIGNvbW1lbnQgPSBjb21tZW50c1tjdXJzb3JdOworICAgICAgICAgICAgICAgICAgICBpZiAo bm9kZS5yYW5nZVsxXSA8IGNvbW1lbnQuZXh0ZW5kZWRSYW5nZVswXSkgeworICAgICAgICAgICAg ICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAg ICAgICAgICBpZiAobm9kZS5yYW5nZVsxXSA9PT0gY29tbWVudC5leHRlbmRlZFJhbmdlWzBdKSB7 CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIW5vZGUudHJhaWxpbmdDb21tZW50cykgewor ICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUudHJhaWxpbmdDb21tZW50cyA9IFtdOwor ICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS50 cmFpbGluZ0NvbW1lbnRzLnB1c2goY29tbWVudCk7CisgICAgICAgICAgICAgICAgICAgICAgICBj b21tZW50cy5zcGxpY2UoY3Vyc29yLCAxKTsKKyAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsK KyAgICAgICAgICAgICAgICAgICAgICAgIGN1cnNvciArPSAxOworICAgICAgICAgICAgICAgICAg ICB9CisgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgLy8gYWxyZWFkeSBvdXQg b2Ygb3duZWQgbm9kZQorICAgICAgICAgICAgICAgIGlmIChjdXJzb3IgPT09IGNvbW1lbnRzLmxl bmd0aCkgeworICAgICAgICAgICAgICAgICAgICByZXR1cm4gVmlzaXRvck9wdGlvbi5CcmVhazsK KyAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICBpZiAoY29tbWVudHNbY3Vyc29y XS5leHRlbmRlZFJhbmdlWzBdID4gbm9kZS5yYW5nZVsxXSkgeworICAgICAgICAgICAgICAgICAg ICByZXR1cm4gVmlzaXRvck9wdGlvbi5Ta2lwOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAg ICAgIH0KKyAgICAgICAgfSk7CisKKyAgICAgICAgcmV0dXJuIHRyZWU7CisgICAgfQorCisgICAg ZXhwb3J0cy52ZXJzaW9uID0gJzEuOC4wJzsKKyAgICBleHBvcnRzLlN5bnRheCA9IFN5bnRheDsK KyAgICBleHBvcnRzLnRyYXZlcnNlID0gdHJhdmVyc2U7CisgICAgZXhwb3J0cy5yZXBsYWNlID0g cmVwbGFjZTsKKyAgICBleHBvcnRzLmF0dGFjaENvbW1lbnRzID0gYXR0YWNoQ29tbWVudHM7Cisg ICAgZXhwb3J0cy5WaXNpdG9yS2V5cyA9IFZpc2l0b3JLZXlzOworICAgIGV4cG9ydHMuVmlzaXRv ck9wdGlvbiA9IFZpc2l0b3JPcHRpb247CisgICAgZXhwb3J0cy5Db250cm9sbGVyID0gQ29udHJv bGxlcjsKK30pKTsKKy8qIHZpbTogc2V0IHN3PTQgdHM9NCBldCB0dz04MCA6ICovCmRpZmYgLS1n aXQgYS9wYWNrYWdlcy9jb250ZXh0LWNvbG9yaW5nL2xhbmd1YWdlcy9qYXZhc2NyaXB0L3Njb3Bp Zmllci5qcyBiL3Bh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nNlIGZvciBtb3JlIGRldGFpbHMuCisKKy8vIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNv cHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlCisvLyBhbG9uZyB3aXRoIHRoaXMg cHJvZ3JhbS4gIElmIG5vdCwgc2VlIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvPi4KKwor J3VzZSBzdHJpY3QnOworCit2YXIgZXNjb3BlID0gcmVxdWlyZSgnLi9saWJyYXJpZXMvZXNjb3Bl JyksCisgICAgZXNwcmltYSA9IHJlcXVpcmUoJy4vbGlicmFyaWVzL2VzcHJpbWEnKTsKKworLy8g R2l2ZW4gY29kZSwgcmV0dXJucyBhbiBhcnJheSBvZiB0b2tlbnMgZm9yIGNvbnRleHQtY29sb3Jp bmcuCitmdW5jdGlvbiBzY29waWZpZXIoY29kZSkgeworCisgICAgdmFyIGFuYWx5emVkU2NvcGVz LAorICAgICAgICBhc3QsCisgICAgICAgIGRlZmluaXRpb24sCisgICAgICAgIGRlZmluaXRpb25z Q291bnQsCisgICAgICAgIGRlZmluaXRpb25zSW5kZXgsCisgICAgICAgIGksCisgICAgICAgIGlz RGVmaW5lZCwKKyAgICAgICAgaiwKKyAgICAgICAgaywKKyAgICAgICAgcG9pbnRlciwKKyAgICAg ICAgcmFuZ2UsCisgICAgICAgIHJlZmVyZW5jZSwKKyAgICAgICAgc2NvcGUsCisgICAgICAgIHNj b3BlcywKKyAgICAgICAgdG9rZW5zLAorICAgICAgICB2YXJpYWJsZTsKKworICAgIC8vIFN0cmlw IEJPTS4KKyAgICBjb2RlID0gY29kZS5yZXBsYWNlKC9eXHVmZWZmL2csICcnKTsKKworICAgIC8v IEdyYWNlZnVsbHkgaGFuZGxlIHBhcnNlIGVycm9ycyBieSBkb2luZyBub3RoaW5nLgorICAgIHRy eSB7CisgICAgICAgIGFzdCA9IGVzcHJpbWEucGFyc2UoY29kZSwgeworICAgICAgICAgICAgcmFu Z2U6IHRydWUKKyAgICAgICAgfSk7CisgICAgICAgIGFuYWx5emVkU2NvcGVzID0gZXNjb3BlLmFu YWx5emUoYXN0KS5zY29wZXM7CisgICAgfSBjYXRjaCAoZXJyb3IpIHsKKyAgICAgICAgcHJvY2Vz cy5leGl0KDEpOworICAgIH0KKworICAgIHNjb3BlcyA9IFtdOworICAgIHRva2VucyA9IFtdOwor ICAgIGZvciAoaSA9IDA7IGkgPCBhbmFseXplZFNjb3Blcy5sZW5ndGg7IGkgKz0gMSkgeworICAg ICAgICBzY29wZSA9IGFuYWx5emVkU2NvcGVzW2ldOworICAgICAgICAvLyBIYXZpbmcgaXRzIGxl dmVsIHNldCBpbXBsaWVzIGl0IHdhcyBhbHJlYWR5IGFubm90YXRlZC4KKyAgICAgICAgaWYgKHNj b3BlLmxldmVsID09PSB1bmRlZmluZWQpIHsKKyAgICAgICAgICAgIGlmIChzY29wZS51cHBlcikg eworICAgICAgICAgICAgICAgIGlmIChzY29wZS51cHBlci5mdW5jdGlvbkV4cHJlc3Npb25TY29w ZSkgeworICAgICAgICAgICAgICAgICAgICAvLyBQcmV0ZW5kIGZ1bmN0aW9uIGV4cHJlc3Npb24g c2NvcGUgZG9lc24ndCBleGlzdC4KKyAgICAgICAgICAgICAgICAgICAgc2NvcGUubGV2ZWwgPSBz Y29wZS51cHBlci5sZXZlbDsKKyAgICAgICAgICAgICAgICAgICAgc2NvcGUudmFyaWFibGVzID0g c2NvcGUudXBwZXIudmFyaWFibGVzLmNvbmNhdChzY29wZS52YXJpYWJsZXMpOworICAgICAgICAg ICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgIHNjb3BlLmxldmVsID0gc2NvcGUu dXBwZXIubGV2ZWwgKyAxOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0gZWxzZSB7 CisgICAgICAgICAgICAgICAgLy8gQmFzZSBjYXNlLgorICAgICAgICAgICAgICAgIHNjb3BlLmxl dmVsID0gMDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIC8vIFdlJ3ZlIG9ubHkgZ2l2ZW4g dGhlIHNjb3BlIGEgbGV2ZWwgZm9yIHBvc3Rlcml0eSdzIHNha2UuICBXZSdyZQorICAgICAgICAg ICAgLy8gZG9uZSBub3cuCisgICAgICAgICAgICBpZiAoIXNjb3BlLmZ1bmN0aW9uRXhwcmVzc2lv blNjb3BlKSB7CisgICAgICAgICAgICAgICAgcmFuZ2UgPSBzY29wZS5ibG9jay5yYW5nZTsKKyAg ICAgICAgICAgICAgICBzY29wZXMucHVzaCgKKyAgICAgICAgICAgICAgICAgICAgcmFuZ2VbMF0g KyAxLAorICAgICAgICAgICAgICAgICAgICByYW5nZVsxXSArIDEsCisgICAgICAgICAgICAgICAg ICAgIHNjb3BlLmxldmVsCisgICAgICAgICAgICAgICAgKTsKKyAgICAgICAgICAgICAgICBkZWZp bml0aW9uc0luZGV4ID0gdG9rZW5zLmxlbmd0aDsKKyAgICAgICAgICAgICAgICBkZWZpbml0aW9u c0NvdW50ID0gMDsKKyAgICAgICAgICAgICAgICBmb3IgKGogPSAwOyBqIDwgc2NvcGUudmFyaWFi bGVzLmxlbmd0aDsgaiArPSAxKSB7CisgICAgICAgICAgICAgICAgICAgIHZhcmlhYmxlID0gc2Nv cGUudmFyaWFibGVzW2pdOworICAgICAgICAgICAgICAgICAgICBkZWZpbml0aW9uc0NvdW50ICs9 IHZhcmlhYmxlLmRlZnMubGVuZ3RoOworICAgICAgICAgICAgICAgICAgICBmb3IgKGsgPSAwOyBr IDwgdmFyaWFibGUuZGVmcy5sZW5ndGg7IGsgKz0gMSkgeworICAgICAgICAgICAgICAgICAgICAg ICAgZGVmaW5pdGlvbiA9IHZhcmlhYmxlLmRlZnNba107CisgICAgICAgICAgICAgICAgICAgICAg ICByYW5nZSA9IGRlZmluaXRpb24ubmFtZS5yYW5nZTsKKyAgICAgICAgICAgICAgICAgICAgICAg IHRva2Vucy5wdXNoKAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJhbmdlWzBdICsgMSwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICByYW5nZVsxXSArIDEsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgc2NvcGUubGV2ZWwKKyAgICAgICAgICAgICAgICAgICAgICAgICk7Cisg ICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAg Zm9yIChqID0gMDsgaiA8IHNjb3BlLnJlZmVyZW5jZXMubGVuZ3RoOyBqICs9IDEpIHsKKyAgICAg ICAgICAgICAgICAgICAgcmVmZXJlbmNlID0gc2NvcGUucmVmZXJlbmNlc1tqXTsKKyAgICAgICAg ICAgICAgICAgICAgcmFuZ2UgPSByZWZlcmVuY2UuaWRlbnRpZmllci5yYW5nZTsKKyAgICAgICAg ICAgICAgICAgICAgaXNEZWZpbmVkID0gZmFsc2U7CisgICAgICAgICAgICAgICAgICAgIC8vIERl dGVybWluZSBpZiBhIGRlZmluaXRpb24gYWxyZWFkeSBleGlzdHMgZm9yIHRoZSByYW5nZS4KKyAg ICAgICAgICAgICAgICAgICAgLy8gKGVzY29wZSBkZXRlY3RzIHZhcmlhYmxlcyB0d2ljZSBpZiB0 aGV5IGFyZSBkZWNsYXJlZCBhbmQKKyAgICAgICAgICAgICAgICAgICAgLy8gaW5pdGlhbGl6ZWQg c2ltdWx0YW5lb3VzbHk7IHRoaXMgZmlsdGVycyB0aGVtLikKKyAgICAgICAgICAgICAgICAgICAg Zm9yIChrID0gMDsgayA8IGRlZmluaXRpb25zQ291bnQ7IGsgKz0gMSkgeworICAgICAgICAgICAg ICAgICAgICAgICAgcG9pbnRlciA9IGRlZmluaXRpb25zSW5kZXggKyAoayAqIDMpOworICAgICAg ICAgICAgICAgICAgICAgICAgaWYgKHRva2Vuc1twb2ludGVyXSA9PT0gcmFuZ2VbMF0gKyAxICYm CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRva2Vuc1twb2ludGVyICsgMV0gPT09 IHJhbmdlWzFdICsgMSkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzRGVmaW5lZCA9 IHRydWU7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAg ICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAg aWYgKCFpc0RlZmluZWQpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHRva2Vucy5wdXNoKAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEhhbmRsZSBnbG9iYWwgcmVmZXJlbmNlcyB0 b28uCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmFuZ2VbMF0gKyAxLAorICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHJhbmdlWzFdICsgMSwKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICByZWZlcmVuY2UucmVzb2x2ZWQgPyByZWZlcmVuY2UucmVzb2x2ZWQuc2NvcGUubGV2ZWwg OiAwCisgICAgICAgICAgICAgICAgICAgICAgICApOworICAgICAgICAgICAgICAgICAgICB9Cisg ICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorCisgICAg cmV0dXJuIHNjb3Blcy5jb25jYXQodG9rZW5zKTsKK30KKworbW9kdWxlLmV4cG9ydHMgPSBzY29w aWZpZXI7CmRpZmYgLS1naXQgYS9wYWNrYWdlcy9jb250ZXh0LWNvbG9yaW5nL2xpYnJhcmllcy8u ZGlyLWxvY2Fscy5lbCBiL3BhY2thZ2VzL2NvbnRleHQtY29sb3JpbmcvbGlicmFyaWVzLy5kaXIt bG9jYWxzLmVsCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLmQwYjdjZDUKLS0t IC9kZXYvbnVsbAorKysgYi9wYWNrYWdlcy9jb250ZXh0LWNvbG9yaW5nL2xpYnJhcmllcy8uZGly LWxvY2Fscy5lbApAQCAtMCww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XMgYXJndW1lbnQsIHRoZSB0ZXN0Cit3aWxsIGZhaWwgd2l0aCB0aGF0IGVycm9yIHN0 cmluZy4KKworQk9EWSBpcyB0aGUgYWN0dWFsIHRlc3QuIgorICAoZGVjbGFyZSAoaW5kZW50IDIp KQorICAobGV0ICgodmFybGlzdAorICAgICAgICAgKGNvbnMKKyAgICAgICAgICAnY2FsbGJhY2tl ZAorICAgICAgICAgIChtYXBjYXIKKyAgICAgICAgICAgKGxhbWJkYSAoY2FsbGJhY2spCisgICAg ICAgICAgICAgKGxpc3QKKyAgICAgICAgICAgICAgY2FsbGJhY2sKKyAgICAgICAgICAgICAgYChs YW1iZGEgKCZvcHRpb25hbCBlcnJvci1tZXNzYWdlKQorICAgICAgICAgICAgICAgICAoaWYgZXJy b3ItbWVzc2FnZQorICAgICAgICAgICAgICAgICAgICAgKGVydC1mYWlsIChmb3JtYXQgIkNhbGxi YWNrICVzIGludm9rZWQgd2l0aCBhcmd1bWVudDogJXMiICcsY2FsbGJhY2sgZXJyb3ItbWVzc2Fn ZSkpCisgICAgICAgICAgICAgICAgICAgKGlmIChtZW1iZXIgJyxjYWxsYmFjayBjYWxsYmFja2Vk KQorICAgICAgICAgICAgICAgICAgICAgICAoZXJ0LWZhaWwgKGZvcm1hdCAiQ2FsbGJhY2sgJXMg Y2FsbGVkIG11bHRpcGxlIHRpbWVzIiAnLGNhbGxiYWNrKSkKKyAgICAgICAgICAgICAgICAgICAg IChwdXNoICcsY2FsbGJhY2sgY2FsbGJhY2tlZCkpKSkpKQorICAgICAgICAgICBjYWxsYmFja3Mp KSkpCisgICAgYChlcnQtZGVmdGVzdCAsbmFtZSAoKQorICAgICAgIChsZXQqICx2YXJsaXN0Cisg ICAgICAgICAod2l0aC10aW1lb3V0CisgICAgICAgICAgICAgKGVydC1hc3luYy10aW1lb3V0Cisg ICAgICAgICAgICAgIChlcnQtZmFpbCAoZm9ybWF0ICJUaW1lb3V0IG9mICVkcyBleGNlZWRlZCIg ZXJ0LWFz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yAgICAgICAgICBwYXJzZUZsb2F0IHBhcnNlSW50IHVuZGVmaW5lZCB1bmVz Y2FwZSkpCisiRWNtYS0yNjIgZXh0ZXJucy4gIEluY2x1ZGVkIGluIGBqczItZXh0ZXJucycgYnkg ZGVmYXVsdC4iKQorCisoZGVmdmFyIGpzMi1icm93c2VyLWV4dGVybnMKKyAgKG1hcGNhciAnc3lt Ym9sLW5hbWUKKyAgICAgICAgICAnKDs7IERPTSBsZXZlbCAxCisgICAgICAgICAgICBBdHRyIENE QVRBU2VjdGlvbiBDaGFyYWN0ZXJEYXRhIENvbW1lbnQgRE9NRXhjZXB0aW9uCisgICAgICAgICAg ICBET01JbXBsZW1lbnRhdGlvbiBEb2N1bWVudCBEb2N1bWVudEZyYWdtZW50CisgICAgICAgICAg ICBEb2N1bWVudFR5cGUgRWxlbWVudCBFbnRpdHkgRW50aXR5UmVmZXJlbmNlCisgICAgICAgICAg ICBFeGNlcHRpb25Db2RlIE5hbWVkTm9kZU1hcCBOb2RlIE5vZGVMaXN0IE5vdGF0aW9uCisgICAg ICAgICAgICBQcm9jZXNzaW5nSW5zdHJ1Y3Rpb24gVGV4dAorCisgICAgICAgICAgICA7OyBET00g bGV2ZWwgMgorICAgICAgICAgICAgSFRNTEFuY2hvckVsZW1lbnQgSFRNTEFwcGxldEVsZW1lbnQg SFRNTEFyZWFFbGVtZW50CisgICAgICAgICAgICBIVE1MQlJFbGVtZW50IEhUTUxCYXNlRWxlbWVu dCBIVE1MQmFzZUZvbnRFbGVtZW50CisgICAgICAgICAgICBIVE1MQm9keUVsZW1lbnQgSFRNTEJ1 dHRvbkVsZW1lbnQgSFRNTENvbGxlY3Rpb24KKyAgICAgICAgICAgIEhUTUxETGlzdEVsZW1lbnQg SFRNTERpcmVjdG9yeUVsZW1lbnQgSFRNTERpdkVsZW1lbnQKKyAgICAgICAgICAgIEhUTUxEb2N1 bWVudCBIVE1MRWxlbWVudCBIVE1MRmllbGRTZXRFbGVtZW50CisgICAgICAgICAgICBIVE1MRm9u dEVsZW1lbnQgSFRNTEZvcm1FbGVtZW50IEhUTUxGcmFtZUVsZW1lbnQKKyAgICAgICAgICAgIEhU TUxGcmFtZVNldEVsZW1lbnQgSFRNTEhSRWxlbWVudCBIVE1MSGVhZEVsZW1lbnQKKyAgICAgICAg ICAgIEhUTUxIZWFkaW5nRWxlbWVudCBIVE1MSHRtbEVsZW1lbnQgSFRNTElGcmFtZUVsZW1lbnQK KyAgICAgICAgICAgIEhUTUxJbWFnZUVsZW1lbnQgSFRNTElucHV0RWxlbWVudCBIVE1MSXNJbmRl eEVsZW1lbnQKKyAgICAgICAgICAgIEhUTUxMSUVsZW1lbnQgSFRNTExhYmVsRWxlbWVudCBIVE1M TGVnZW5kRWxlbWVudAorICAgICAgICAgICAgSFRNTExpbmtFbGVtZW50IEhUTUxNYXBFbGVtZW50 IEhUTUxNZW51RWxlbWVudAorICAgICAgICAgICAgSFRNTE1ldGFFbGVtZW50IEhUTUxNb2RFbGVt ZW50IEhUTUxPTGlzdEVsZW1lbnQKKyAgICAgICAgICAgIEhUTUxPYmplY3RFbGVtZW50IEhUTUxP cHRHcm91cEVsZW1lbnQKKyAgICAgICAgICAgIEhUTUxPcHRpb25FbGVtZW50IEhUTUxPcHRpb25z Q29sbGVjdGlvbgorICAgICAgICAgICAgSFRNTFBhcmFncmFwaEVsZW1lbnQgSFRNTFBhcmFtRWxl bWVudCBIVE1MUHJlRWxlbWVudAorICAgICAgICAgICAgSFRNTFF1b3RlRWxlbWVudCBIVE1MU2Ny aXB0RWxlbWVudCBIVE1MU2VsZWN0RWxlbWVudAorICAgICAgICAgICAgSFRNTFN0eWxlRWxlbWVu dCBIVE1MVGFibGVDYXB0aW9uRWxlbWVudAorICAgICAgICAgICAgSFRNTFRhYmxlQ2VsbEVsZW1l bnQgSFRNTFRhYmxlQ29sRWxlbWVudAorICAgICAgICAgICAgSFRNTFRhYmxlRWxlbWVudCBIVE1M VGFibGVSb3dFbGVtZW50CisgICAgICAgICAgICBIVE1MVGFibGVTZWN0aW9uRWxlbWVudCBIVE1M VGV4dEFyZWFFbGVtZW50CisgICAgICAgICAgICBIVE1MVGl0bGVFbGVtZW50IEhUTUxVTGlzdEVs ZW1lbnQKKworICAgICAgICAgICAgOzsgRE9NIGxldmVsIDMKKyAgICAgICAgICAgIERPTUNvbmZp Z3VyYXRpb24gRE9NRXJyb3IgRE9NRXhjZXB0aW9uCisgICAgICAgICAgICBET01JbXBsZW1lbnRh dGlvbkxpc3QgRE9NSW1wbGVtZW50YXRpb25Tb3VyY2UKKyAgICAgICAgICAgIERPTUxvY2F0b3Ig RE9NU3RyaW5nTGlzdCBOYW1lTGlzdCBUeXBlSW5mbworICAgICAgICAgICAgVXNlckRhdGFIYW5k bGVyCisKKyAgICAgICAgICAgIDs7IFdpbmRvdworICAgICAgICAgICAgd2luZG93IGFsZXJ0IGNv bmZpcm0gZG9jdW1lbnQgamF2YSBuYXZpZ2F0b3IgcHJvbXB0IHNjcmVlbgorICAgICAgICAgICAg c2VsZiB0b3AKKworICAgICAgICAgICAgOzsgVzNDIENTUworICAgICAgICAgICAgQ1NTQ2hhcnNl dFJ1bGUgQ1NTRm9udEZhY2UgQ1NTRm9udEZhY2VSdWxlCisgICAgICAgICAgICBDU1NJbXBvcnRS dWxlIENTU01lZGlhUnVsZSBDU1NQYWdlUnVsZQorICAgICAgICAgICAgQ1NTUHJpbWl0aXZlVmFs dWUgQ1NTUHJvcGVydGllcyBDU1NSdWxlIENTU1J1bGVMaXN0CisgICAgICAgICAgICBDU1NTdHls ZURlY2xhcmF0aW9uIENTU1N0eWxlUnVsZSBDU1NTdHlsZVNoZWV0CisgICAgICAgICAgICBDU1NW YWx1ZSBDU1NWYWx1ZUxpc3QgQ291bnRlciBET01JbXBsZW1lbnRhdGlvbkNTUworICAgICAgICAg ICAgRG9jdW1lbnRDU1MgRG9jdW1lbnRTdHlsZSBFbGVtZW50Q1NTSW5saW5lU3R5bGUKKyAgICAg ICAgICAgIExpbmtTdHlsZS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lnaW5hbGx5IHVzZWQgc3ltYm9s cyB0byByZXByZXNlbnQgdG9rZW5zLCBidXQgUmhpbm8gdXNlcworOzsgaW50cyBhbmQgdGhlbiBz ZXRzIHZhcmlvdXMgZmxhZyBiaXRzIGluIHRoZW0sIHNvIGludHMgaXQgaXMuCis7OyBUaGUgdXBz aG90IGlzIHRoYXQgd2UgbmVlZCBhIGBqczItJyBwcmVmaXggaW4gZnJvbnQgb2YgZWFjaCBuYW1l LgorKGRlZnZhciBqczItRVJST1IgLTEpCisoZGVmdmFyIGpzMi1FT0YgMCkKKyhkZWZ2YXIganMy LUVPTCAxKQorKGRlZnZhciBqczItRU5URVJXSVRIIDIpICAgICAgIDsgYmVnaW4gaW50ZXJwcmV0 ZXIgYnl0ZWNvZGVzCisoZGVmdmFyIGpzMi1MRUFWRVdJVEggMykKKyhkZWZ2YXIganMyLVJFVFVS TiA0KQorKGRlZnZhciBqczItR09UTyA1KQorKGRlZnZhciBqczItSUZFUSA2KQorKGRlZnZhciBq czItSUZORSA3KQorKGRlZnZhciBqczItU0VUTkFNRSA4KQorKGRlZnZhciBqczItQklUT1IgOSkK KyhkZWZ2YXIganMyLUJJVFhPUiAxMCkKKyhkZWZ2YXIganMyLUJJVEFORCAxMSkKKyhkZWZ2YXIg anMyLUVRIDEyKQorKGRlZnZhciBqczItTkUgMTMpCisoZGVmdmFyIGpzMi1MVCAxNCkKKyhkZWZ2 YXIganMyLUxFIDE1KQorKGRlZnZhciBqczItR1QgMTYpCisoZGVmdmFyIGpzMi1HRSAxNykKKyhk ZWZ2YXIganMyLUxTSCAxOCkKKyhkZWZ2YXIganMyLVJTSCAxOSkKKyhkZWZ2YXIganMyLVVSU0gg MjApCisoZGVmdmFyIGpzMi1BREQgMjEpICAgICAgICAgICAgOyBpbmZpeCBwbHVzCisoZGVmdmFy IGpzMi1TVUIgMjIpICAgICAgICAgICAgOyBpbmZpeCBtaW51cworKGRlZnZhciBqczItTVVMIDIz KQorKGRlZnZhciBqczItRElWIDI0KQorKGRlZnZhciBqczItTU9EIDI1KQorKGRlZnZhciBqczIt Tk9UIDI2KQorKGRlZnZhciBqczItQklUTk9UIDI3KQorKGRlZnZhciBqczItUE9TIDI4KSAgICAg ICAgICAgIDsgdW5hcnkgcGx1cworKGRlZnZhciBqczItTkVHIDI5KSAgICAgICAgICAgIDsgdW5h cnkgbWludXMKKyhkZWZ2YXIganMyLU5FVyAzMCkKKyhkZWZ2YXIganMyLURFTFBST1AgMzEpCiso ZGVmdmFyIGpzMi1UWVBFT0YgMzIpCisoZGVmdmFyIGpzMi1HRVRQUk9QIDMzKQorKGRlZnZhciBq czItR0VUUFJPUE5PV0FSTiAzNCkKKyhkZWZ2YXIganMyLVNFVFBST1AgMzUpCisoZGVmdmFyIGpz Mi1HRVRFTEVNIDM2KQorKGRlZnZhciBqczItU0VURUxFTSAzNykKKyhkZWZ2YXIganMyLUNBTEwg MzgpCisoZGVmdmFyIGpzMi1OQU1FIDM5KSAgICAgICAgICAgOyBhbiBpZGVudGlmaWVyCisoZGVm dmFyIGpzMi1OVU1CRVIgNDApCisoZGVmdmFyIGpzMi1TVFJJTkcgNDEpCisoZGVmdmFyIGpzMi1O VUxMIDQyKQorKGRlZnZhciBqczItVEhJUyA0MykKKyhkZWZ2YXIganMyLUZBTFNFIDQ0KQorKGRl ZnZhciBqczItVFJVRSA0NSkKKyhkZWZ2YXIganMyLVNIRVEgNDYpICAgICAgICAgICA7IHNoYWxs b3cgZXF1YWxpdHkgKD09PSkKKyhkZWZ2YXIganMyLVNITkUgNDcpICAgICAgICAgICA7IHNoYWxs b3cgaW5lcXVhbGl0eSAoIT09KQorKGRlZnZhciBqczItUkVHRVhQIDQ4KQorKGRlZnZhciBqczIt QklORE5BTUUgNDkpCisoZGVmdmFyIGpzMi1USFJPVyA1MCkKKyhkZWZ2YXIganMyLVJFVEhST1cg NTEpICAgICAgICA7IHJldGhyb3cgY2F1Z2h0IGV4Y2VwdGlvbjogY2F0Y2ggKGUgaWYgKSB1c2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UgX19wcm90bworKGRlZnZhciBqczItWUlFTEQgNzIpICAg ICAgICAgIDsgSlMgMS43IHlpZWxkIHBzZXVkbyBrZXl3b3JkCisKKzs7IFhNTCBzdXBwb3J0Ciso ZGVmdmFyIGpzMi1ERUZBVUxUTkFNRVNQQUNFIDczKQorKGRlZnZhciBqczItRVNDWE1MQVRUUiA3 NCkKKyhkZWZ2YXIganMyLUVTQ1hNTFRFWFQgNzUpCisoZGVmdmFyIGpzMi1SRUZfTUVNQkVSIDc2 KSAgICAgOyBSZWZlcmVuY2UgZm9yIHguQHksIHguLnkgZXRjLgorKGRlZnZhciBqczItUkVGX05T X01FTUJFUiA3NykgIDsgUmVmZXJlbmNlIGZvciB4Lm5zOjp5LCB4Li5uczo6eSBldGMuCisoZGVm dmFyIGpzMi1SRUZfTkFNRSA3OCkgICAgICAgOyBSZWZlcmVuY2UgZm9yIEB5LCBAW3ldIGV0Yy4K KyhkZWZ2YXIganMyLVJFRl9OU19OQU1FIDc5KSAgICA7IFJlZmVyZW5jZSBmb3IgbnM6OnksIEBu czo6eUBbeV0gZXRjLgorCisoZGVmdmFyIGpzMi1maXJzdC1ieXRlY29kZSBqczItRU5URVJXSVRI KQorKGRlZnZhciBqczItbGFzdC1ieXRlY29kZSBqczItUkVGX05TX05BTUUpCisKKyhkZWZ2YXIg anMyLVRSWSA4MCkKKyhkZWZ2YXIganMyLVNFTUkgODEpICAgICAgICAgICA7IHNlbWljb2xvbgor KGRlZnZhciBqczItTEIgODIpICAgICAgICAgICAgIDsgbGVmdCBhbmQgcmlnaHQgYnJhY2tldHMK KyhkZWZ2YXIganMyLVJCIDgzKQorKGRlZnZhciBqczItTEMgODQpICAgICAgICAgICAgIDsgbGVm dCBhbmQgcmlnaHQgY3VybHktYnJhY2VzCisoZGVmdmFyIGpzMi1SQyA4NSkKKyhkZWZ2YXIganMy LUxQIDg2KSAgICAgICAgICAgICA7IGxlZnQgYW5kIHJpZ2h0IHBhcmVucworKGRlZnZhciBqczIt UlAgODcpCisoZGVmdmFyIGpzMi1DT01NQSA4OCkgICAgICAgICAgOyBjb21tYSBvcGVyYXRvcgor CisoZGVmdmFyIGpzMi1BU1NJR04gODkpICAgICAgICAgOyBzaW1wbGUgYXNzaWdubWVudCAoPSkK KyhkZWZ2YXIganMyLUFTU0lHTl9CSVRPUiA5MCkgICA7IHw9CisoZGVmdmFyIGpzMi1BU1NJR05f QklUWE9SIDkxKSAgOyBePQorKGRlZnZhciBqczItQVNTSUdOX0JJVEFORCA5MikgIDsgJj0KKyhk ZWZ2YXIganMyLUFTU0lHTl9MU0ggOTMpICAgICA7IDw8PQorKGRlZnZhciBqczItQVNTSUdOX1JT SCA5NCkgICAgIDsgPj49CisoZGVmdmFyIGpzMi1BU1NJR05fVVJTSCA5NSkgICAgOyA+Pj49Ciso ZGVmdmFyIGpzMi1BU1NJR05fQUREIDk2KSAgICAgOyArPQorKGRlZnZhciBqczItQVNTSUdOX1NV QiA5NykgICAgIDsgLT0KKyhkZWZ2YXIganMyLUFTU0lHTl9NVUwgOTgpICAgICA7ICo9CisoZGVm dmFyIGpzMi1BU1NJR05fRElWIDk5KSAgICAgOyAvPQorKGRlZnZhciBqczItQVNTSUdOX01PRCAx MDApICAgIDsgJT0KKworKGRlZnZhciBqczItZmlyc3QtYXNzaWduIGpzMi1BU1NJR04pCisoZGVm dmFyIGpzMi1sYXN0LWFzc2lnbiBqczItQVNTSUdOX01PRCkKKworKGRlZnZhciBqczItSE9PSyAx MDEpICAgICAgICAgIDsgY29uZGl0aW9uYWwgKD86KQorKGRlZnZhciBqczItQ09MT04gMTAyKQor KGRlZnZhciBqczItT1IgMTAzKSAgICAgICAgICAgIDsgbG9naWNhbCBvciAofHwpCisoZGVmdmFy IGpzMi1BTkQgMTA0KSAgICAgICAgICAgOyBsb2dpY2FsIGFuZCAoJiYpCisoZGVmdmFyIGpzMi1J TkMgMTA1KSAgICAgICAgICAgOyBpbmNyZW1lbnQvZGVjcmVtZW50ICgrKyAtLSkKKyhkZWZ2YXIg anMyLURFQyAxMDYpCisoZGVmdmFyIGpzMi1ET1QgMTA3KSAgICAgICAgICAgOyBtZW1iZXIgb3Bl cmF0b3IgKC4pCisoZGVmdmFyIGpzMi1GVU5DVElPTiAxMDgpICAgICAgOyBmdW5jdGlvbiBrZXl3 b3JkCisoZGVmdmFyIGpzMi1FWFBPUlQgMTA5KSAgICAgICAgOyBleHBvcnQga2V5d29yZAorKGRl ZnZhciBqczItSU1QT1JUIDExMCkgICAgICAgIDsgaW1wb3J0IGtleXdvcmQKKyhkZWZ2YXIganMy LUlGIDExMSkgICAgICAgICAgICA7IGlmIGtleXdvcmQKKyhkZWZ2YXIganMyLUVMU0UgMTEyKSAg ICAgICAgICA7IGVsc2Uga2V5d29yZAorKGRlZnZhciBqczItU1dJVENIIDExMykgICAgICAgIDsg c3dpdGNoIGtleXdvcmQKKyhkZWZ2YXIganMyLUNBU0UgMTE0KSAgICAgICAgICA7IGNhc2Uga2V5 d29yZAorKGRlZnZhciBqczItREVGQVVMVCAxMTUpICAgICAgIDsgZGVmYXVsdCBrZXl3b3JkCiso ZGVmdmFyIGpzMi1XSElMRSAxMTYpICAgICAgICAgOyB3aGlsZSBrZXl3b3JkCisoZGVmdmFyIGpz Mi1ETyAxMTcpICAgICAgICAgICAgOyBkbyBrZXl3b3JkCisoZGVmdmFyIGpzMi1GT1IgMTE4KSAg ICAgICAgICAgOyBmb3Iga2V5d29yZAorKGRlZnZhciBqczItQlJFQUsgMTE5KSAgICAgICAgIDsg YnJlYWsga2V5d29yZAorKGRlZnZhciBqczItQ09OVElOVUUgMTIwKSAgICAgIDsgY29udGludWUg a2V5d29yZAorKGRlZnZhciBqczItVkFSIDEyMSkgICAgICAgICAgIDsgdmFyIGtleXdvcmQKKyhk ZWZ2YXIganMyLVdJVEggMTIyKSAgICAgICAgICA7IHdpdGgga2V5d29yZAorKGRlZnZhciBqczIt Q0FUQ0ggMTIzKSAgICAgICAgIDsgY2F0Y2gga2V5d29yZAorKGRlZnZhci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0ZQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBt YWtlLWpzMi10cy1zdGF0ZSAoJmtleSAobGluZW5vIGpzMi10cy1saW5lbm8pCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjdXJzb3IganMyLXRz LWN1cnNvcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKHRva2VucyAoY29weS1zZXF1ZW5jZSBqczItdGktdG9rZW5zKSkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHRva2Vucy1jdXJzb3Ig anMyLXRpLXRva2Vucy1jdXJzb3IpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIChsb29rYWhlYWQganMyLXRpLWxvb2thaGVhZCkpKSkKKyAgbGlu ZW5vCisgIGN1cnNvcgorICB0b2tlbnMKKyAgdG9rZW5zLWN1cnNvcgorICBsb29rYWhlYWQpCisK Kzs7OyBQYXJzZXIgdmFyaWFibGVzCisKKyhqczItZGVmbG9jYWwganMyLXBhcnNlZC1lcnJvcnMg bmlsCisgICJMaXN0IG9mIGVycm9ycyBwcm9kdWNlZCBkdXJpbmcgc2Nhbm5pbmcvcGFyc2luZy4i KQorCisoanMyLWRlZmxvY2FsIGpzMi1wYXJzZWQtd2FybmluZ3MgbmlsCisgICJMaXN0IG9mIHdh cm5pbmdzIHByb2R1Y2VkIGR1cmluZyBzY2FubmluZy9wYXJzaW5nLiIpCisKKyhqczItZGVmbG9j YWwganMyLXJlY292ZXItZnJvbS1wYXJzZS1lcnJvcnMgdAorICAiTm9uLW5pbCB0byBjb250aW51 ZSBwYXJzaW5nIGFmdGVyIGEgc3ludGF4IGVycm9yLgorCitJbiByZWNvdmVyeSBtb2RlLCB0aGUg QVNUIHdpbGwgYmUgYnVpbHQgaW4gZnVsbCwgYW5kIGFueSBl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XB0LgorTm90IGN1cnJlbnRseSB1c2VkLiIKKyAgOmdyb3VwICdq czItbW9kZSkKKworKGRlZmZhY2UganMyLXByaXZhdGUtZnVuY3Rpb24tY2FsbAorICAnKCh0IDpm b3JlZ3JvdW5kICJnb2xkZW5yb2QiKSkKKyAgIkZhY2UgdXNlZCB0byBoaWdobGlnaHQgY2FsbHMg dG8gcHJpdmF0ZSBmdW5jdGlvbnMgaW4gamF2YXNjcmlwdC4KK05vdCBjdXJyZW50bHkgdXNlZC4i CisgIDpncm91cCAnanMyLW1vZGUpCisKKyhkZWZmYWNlIGpzMi1qc2RvYy1odG1sLXRhZy1uYW1l CisgICcoKCgoY2xhc3MgY29sb3IpIChtaW4tY29sb3JzIDg4KSAoYmFja2dyb3VuZCBsaWdodCkp CisgICAgICg6Zm9yZWdyb3VuZCAicm9zeWJyb3duIikpCisgICAgKCgoY2xhc3MgY29sb3IpICht aW4tY29sb3JzIDgpIChiYWNrZ3JvdW5kIGRhcmspKQorICAgICAoOmZvcmVncm91bmQgInllbGxv dyIpKQorICAgICgoKGNsYXNzIGNvbG9yKSAobWluLWNvbG9ycyA4KSAoYmFja2dyb3VuZCBsaWdo dCkpCisgICAgICg6Zm9yZWdyb3VuZCAibWFnZW50YSIpKSkKKyAgICAiRmFjZSB1c2VkIHRvIGhp Z2hsaWdodCBqc2RvYyBodG1sIHRhZyBuYW1lcyIKKyAgOmdyb3VwICdqczItbW9kZSkKKworKGRl ZmZhY2UganMyLWpzZG9jLWh0bWwtdGFnLWRlbGltaXRlcgorICAnKCgoKGNsYXNzIGNvbG9yKSAo bWluLWNvbG9ycyA4OCkgKGJhY2tncm91bmQgbGlnaHQpKQorICAgICAoOmZvcmVncm91bmQgImRh cmsga2hha2kiKSkKKyAgICAoKChjbGFzcyBjb2xvcikgKG1pbi1jb2xvcnMgOCkgKGJhY2tncm91 bmQgZGFyaykpCisgICAgICg6Zm9yZWdyb3VuZCAiZ3JlZW4iKSkKKyAgICAoKChjbGFzcyBjb2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My LWluZGVudC1ib3VuY2UtYmFja3dhcmRzKSkKKworICAgIChkZWZpbmUta2V5IG1hcCBbbWVudS1i YXIgamF2YXNjcmlwdF0KKyAgICAgIChjb25zICJKYXZhU2NyaXB0IiAobWFrZS1zcGFyc2Uta2V5 bWFwICJKYXZhU2NyaXB0IikpKQorCisgICAgKGRlZmluZS1rZXkgbWFwIFttZW51LWJhciBqYXZh c2NyaXB0IGN1c3RvbWl6ZS1qczItbW9kZV0KKyAgICAgICcobWVudS1pdGVtICJDdXN0b21pemUg anMyLW1vZGUiIGpzMi1tb2RlLWN1c3RvbWl6ZQorICAgICAgICAgICAgICAgICAgOmhlbHAgIkN1 c3RvbWl6ZSB0aGUgYmVoYXZpb3Igb2YgdGhpcyBtb2RlIikpCisKKyAgICAoZGVmaW5lLWtleSBt YXAgW21lbnUtYmFyIGphdmFzY3JpcHQganMyLWZvcmNlLXJlZnJlc2hdCisgICAgICAnKG1lbnUt aXRlbSAiRm9yY2UgYnVmZmVyIHJlZnJlc2giIGpzMi1tb2RlLXJlc2V0CisgICAgICAgICAgICAg ICAgICA6aGVscCAiUmUtcGFyc2UgdGhlIGJ1ZmZlciBmcm9tIHNjcmF0Y2giKSkKKworICAgIChk ZWZpbmUta2V5IG1hcCBbbWVudS1iYXIgamF2YXNjcmlwdCBzZXBhcmF0b3ItMl0KKyAgICAgICco Ii0tIikpCisKKyAgICAoZGVmaW5lLWtleSBtYXAgW21lbnUtYmFyIGphdmFzY3JpcHQgbmV4dC1l cnJvcl0KKyAgICAgICcobWVudS1pdGVtICJOZXh0IHdhcm5pbmcgb3IgZXJyb3IiIG5leHQtZXJy b3IKKyAgICAgICAgICAgICAgICAgIDplbmFibGVkIChhbmQganMyLW1vZGUtYXN0CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChvciAoanMyLWFzdC1yb290LWVycm9ycyBqczItbW9k ZS1hc3QpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoanMyLWFzdC1yb290 LXdhcm5pbmdzIGpzMi1tb2RlLWFzdCkpKQorICAgICAgICAgICAgICAgICAgOmhlbHAgIk1vdmUg dG8gbmV4dCB3YXJuaW5nIG9yIGVycm9yIikpCisKKyAgICAoZGVmaW5lLWtleSBtYXAgW21lbnUt YmFyIGphdmFzY3JpcHQgZGlzcGxheS1lcnJvcnNdCisgICAgICAnKG1lbnUtaXRlbSAiU2hvdyBl cnJvcnMgYW5kIHdhcm5pbmdzIiBqczItbW9kZS1kaXNwbGF5LXdhcm5pbmdzLWFuZC1lcnJvcnMK KyAgICAgICAgICAgICAgICAgIDp2aXNpYmxlIChub3QganMyLW1vZGUtc2hvdy1wYXJzZS1lcnJv cnMpCisgICAgICAgICAgICAgICAgICA6aGVscCAiVHVybiBvbiBkaXNwbGF5IG9mIHdhcm5pbmdz IGFuZCBlcnJvcnMiKSkKKworICAgIChkZWZpbmUta2V5IG1hcCBbbWVudS1iYXIgamF2YXNjcmlw dCBoaWRlLWVycm9yc10KKyAgICAgICcobWVudS1pdGVtICJIaWRlIGVycm9ycyBhbmQgd2Fybmlu Z3MiIGpzMi1tb2RlLWhpZGUtd2FybmluZ3MtYW5kLWVycm9ycworICAgICAgICAgICAgICAgICAg OnZpc2libGUganMyLW1vZGUtc2hvdy1wYXJzZS1lcnJvcnMKKyAgICAgICAgICAgICAgICAgIDpo ZWxwICJUdXJuIG9mZiBkaXNwbGF5IG9mIHdhcm5pbmdzIGFuZCBlcnJvcnMiKSkKKworICAgIChk ZWZpbmUta2V5IG1hcCBbbWVudS1iYXIgamF2YXNjcmlwdCBzZXBhcmF0b3ItMV0KKyAgICAgICco Ii0tIikpCisKKyAgICAoZGVmaW5lLWtleSBtYXAgW21lbnUtYmFyIGphdmFzY3JpcHQganMyLXRv Z2dsZS1mdW5jdGlvbl0KKyAgICAgICcobWVudS1pdGVtICJTaG93L2NvbGxhcHNlIGVsZW1lbnQi IGpzMi1tb2RlLXRvZ2dsZS1lbGVtZW50CisgICAgICAgICAgICAgICAgICA6aGVscCAiSGlkZSBv ciBzaG93IGZ1bmN0aW9uIGJvZHkgb3IgY29tbWVudCIpKQorCisgICAgKGRlZmluZS1rZXkgbWFw IFttZW51LWJhciBqYXZhc2NyaXB0IHNob3ctY29tbWVudHNdCisgICAgICAnKG1lbnUtaXRlbSAi U2hvdyBibG9jayBjb21tZW50cyIganMyLW1vZGUtdG9nZ2xlLWhpZGUtY29tbWVudHMKKyAgICAg ICAgICAgICAgICAgIDp2aXNpYmxlIGpzMi1tb2RlLWNvbW1lbnRzLWhpZGRlbgorICAgICAgICAg ICAgICAgICAgOmhlbHAgIkV4cGFuZCBhbGwgaGlkZGVuIGJsb2NrIGNvbW1lbnRzIikpCisKKyAg ICAoZGVmaW5lLWtleSBtYXAgW21lbnUtYmFyIGphdmFzY3JpcHQgaGlkZS1jb21tZW50c10KKyAg ICAgICcobWVudS1pdGVtICJIaWRlIGJsb2NrIGNvbW1lbnRzIiBqczItbW9kZS10b2dnbGUtaGlk ZS1jb21tZW50cworICAgICAgICAgICAgICAgICAgOnZpc2libGUgKG5vdCBqczItbW9kZS1jb21t ZW50cy1oaWRkZW4pCisgICAgICAgICAgICAgICAgICA6aGVscCAiU2hvdyBibG9jayBjb21tZW50 cyBhcyAvKi4uLiovIikpCisKKyAgICAoZGVmaW5lLWtleSBtYXAgW21lbnUtYmFyIGphdmFzY3Jp cHQgc2hvdy1hbGwtZnVuY3Rpb25zXQorICAgICAgJyhtZW51LWl0ZW0gIlNob3cgZnVuY3Rpb24g Ym9kaWVzIiBqczItbW9kZS10b2dnbGUtaGlkZS1mdW5jdGlvbnMKKyAgICAgICAgICAgICAgICAg IDp2aXNpYmxlIGpzMi1tb2RlLWZ1bmN0aW9ucy1oaWRkZW4KKyAgICAgICAgICAgICAgICAgIDpo ZWxwICJFeHBhbmQgYWxsIGhpZGRlbiBmdW5jdGlvbiBib2RpZXMiKSkKKworICAgIChkZWZpbmUt a2V5IG1hcCBbbWVudS1iYXIgamF2YXNjcmlwdCBoaW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ZXJhdGlvbiBlcnJvciB3aGls ZSBjb21waWxpbmcgc2NyaXB0OiAlcyIpCisKKzs7IENvbnRleHQKKyhqczItbXNnICJtc2cuY3Rv ci5ub3QuZm91bmQiCisgICAgICAgICAiQ29uc3RydWN0b3IgZm9yICclcycgbm90IGZvdW5kLiIp CisKKyhqczItbXNnICJtc2cubm90LmN0b3IiCisgICAgICAgICAiJyVzJyBpcyBub3QgYSBjb25z dHJ1Y3Rvci4iKQorCis7OyBGdW5jdGlvbk9iamVjdAorKGpzMi1tc2cgIm1zZy52YXJhcmdzLmN0 b3IiCisgICAgICAgICAiTWV0aG9kIG9yIGNvbnN0cnVjdG9yICclcycgbXVzdCBiZSBzdGF0aWMg IgorICAgICAgICAgIndpdGggdGhlIHNpZ25hdHVyZSAoQ29udGV4dCBjeCwgT2JqZWN0W10gYXJn cywgIgorICAgICAgICAgIkZ1bmN0aW9uIGN0b3JPYmosIGJvb2xlYW4gaW5OZXdFeHByKSAiCisg ICAgICAgICAidG8gZGVmaW5lIGEgdmFyaWFibGUgYXJndW1lbnRzIGNvbnN0cnVjdG9yLiIpCisK KyhqczItbXNnICJtc2cudmFyYXJncy5mdW4iCisgICAgICAgICAiTWV0aG9kICclcycgbXVzdCBi ZSBzdGF0aWMgd2l0aCB0aGUgc2lnbmF0dXJlICIKKyAgICAgICAgICIoQ29udGV4dCBjeCwgU2Ny aXB0YWJsZSB0aGlzT2JqLCBPYmplY3RbXSBhcmdzLCBGdW5jdGlvbiBmdW5PYmopICIKKyAgICAg ICAgICJ0byBkZWZpbmUgYSB2YXJpYWJsZSBhcmd1bWVudHMgZnVuY3Rpb24uIikKKworKGpzMi1t c2cgIm1zZy5pbmNvbXBhdC5jYWxsIgorICAgICAgICAgIk1ldGhvZCAnJXMnIGNhbGxlZCBvbiBp bmNvbXBhdGlibGUgb2JqZWN0LiIpCisKKyhqczItbXNnICJtc2cuYmFkLnBhcm1zIgorICAgICAg ICAgIlVuc3VwcG9ydGVkIHBhcmFtZXRlciB0eXBlICclcycgaW4gbWV0aG9kICclcycuIikKKwor KGpzMi1tc2cgIm1zZy5iYWQubWV0aG9kLnJldHVybiIKKyAgICAgICAgICJVbnN1cHBvcnRlZCBy ZXR1cm4gdHlwZSAnJXMnIGluIG1ldGhvZCAnJXMnLiIpCisKKyhqczItbXNnICJtc2cuYmFkLmN0 b3IucmV0dXJuIgorICAgICAgICAgIkNvbnN0cnVjdGlvbiBvZiBvYmplY3RzIG9mIHR5cGUgJyVz JyBpcyBub3Qgc3VwcG9ydGVkLiIpCisKKyhqczItbXNnICJtc2cubm8ub3ZlcmxvYWQiCisgICAg ICAgICAiTWV0aG9kICclcycgb2NjdXJzIG11bHRpcGxlIHRpbWVzIGluIGNsYXNzICclcycuIikK KworKGpzMi1tc2cgIm1zZy5tZXRob2Qubm90LmZvdW5kIgorICAgICAgICAgIk1ldGhvZCAnJXMn IG5vdCBmb3VuZCBpbiAnJXMnLiIpCisKKzs7IElSRmFjdG9yeQorCisoanMyLW1zZyAibXNnLmJh ZC5mb3IuaW4ubGhzIgorICAgICAgICAgIkludmFsaWQgbGVmdC1oYW5kIHNpZGUgb2YgZm9yLi5p biBsb29wLiIpCisKKyhqczItbXNnICJtc2cubXVsdC5pbmRleCIKKyAgICAgICAgICJPbmx5IG9u ZSB2YXJpYWJsZSBhbGxvd2VkIGluIGZvci4uaW4gbG9vcC4iKQorCisoanMyLW1zZyAibXNnLmJh ZC5mb3IuaW4uZGVzdHJ1Y3QiCisgICAgICAgICAiTGVmdCBoYW5kIHNpZGUgb2YgZm9yLi5pbiBs b29wIG11c3QgYmUgYW4gYXJyYXkgb2YgIgorICAgICAgICAgImxlbmd0aCAyIHRvIGFjY2VwdCBr ZXkvdmFsdWUgcGFpci4iKQorCisoanMyLW1zZyAibXNnLmNhbnQuY29udmVydCIKKyAgICAgICAg ICJDYW4ndCBjb252ZXJ0IHRvIHR5cGUgJyVzJy4iKQorCisoanMyLW1zZyAibXNnLmJhZC5hc3Np Z24ubGVmdCIKKyAgICAgICAgICJJbnZhbGlkIGFzc2lnbm1lbnQgbGVmdC1oYW5kIHNpZGUuIikK KworKGpzMi1tc2cgIm1zZy5iYWQuZGVjciIKKyAgICAgICAgICJJbnZhbGlkIGRlY2VyZW1lbnQg b3BlcmFuZC4iKQorCisoanMyLW1zZyAibXNnLmJhZC5pbmNyIgorICAgICAgICAgIkludmFsaWQg aW5jcmVtZW50IG9wZXJhbmQuIikKKworKGpzMi1tc2cgIm1zZy5iYWQueWllbGQiCisgICAgICAg ICAieWllbGQgbXVzdCBiZSBpbiBhIGZ1bmN0aW9uLiIpCisKKyhqczItbXNnICJtc2cueWllbGQu cGFyZW50aGVzaXplZCIKKyAgICAgICAgICJ5aWVsZCBleHByZXNzaW9uIG11c3QgYmUgcGFyZW50 aGVzaXplZC4iKQorCis7OyBOYXRpdmVHbG9iYWwKKyhqczItbXNnICJtc2cuY2FudC5jYWxsLmlu ZGlyZWN0IgorICAgICAgICAgICJGdW5jdGlvbiAnJXMnIG11c3QgYmUgY2FsbGVkIGRpcmVjdGx5 LCBhbmQgbm90IGJ5IHdheSBvZiBhICIKKyAgICAgICAgICAiZnVuY3Rpb24gb2YgYW5vdGhlciBu YW1lLiIpCisKKyhqczItbXNnICJtc2cuZXZhbC5ub25zdHJpbmciCisgICAgICAgICAgIkNhbGxp bmcgZXZhbCgpIHdpdGggYW55dGhpbmcgb3RoZXIgdGhhbiBhIHByaW1pdGl2ZSAiCisgICAgICAg ICAgInN0cmluZyB2YWx1ZSB3aWxsIHNpbXBseSByZXR1cm4gdGhlIHZhbHVlLiAiCisgICAgICAg ICAgIklzIHRoaXMgd2hhdCB5b3UgaW50ZW5kZWQ/IikKKworKGpzMi1tc2cgIm1zZy5ldmFsLm5v bnN0cmluZy5zdHJpY3QiCisgICAgICAgICAiQ2FsbGluZyBldmFsKCkgd2l0aCBhbnl0aGluZyBv dGhlciB0aGFuIGEgcHJpbWl0aXZlICIKKyAgICAgICAgICJzdHJpbmcgdmFsdWUgaXMgbm90IGFs bG93ZWQgaW4gc3RyaWN0IG1vZGUuIikKKworKGpzMi1tc2cgIm1zZy5iYWQuZGVzdHJ1Y3Qub3Ai CisgICAgICAgICAiSW52YWxpZCBkZXN0cnVjdHVyaW5nIGFzc2lnbm1lbnQgb3BlcmF0b3IiKQor Cis7OyBOYXRpdmVDYWxsCisoanMyLW1zZyAibXNnLm9ubHkuZnJvbS5uZXciCisgICAgICAgICAi JyVzJyBtYXkgb25seSBiZSBpbnZva2VkIGZyb20gYSBgbmV3JyBleHByZXNzaW9uLiIpCisKKyhq czItbXNnICJtc2cuZGVwcmVjLmN0b3IiCisgICAgICAgICAiVGhlICclcycgY29uc3RydWN0b3Ig aXMgZGVwcmVjYXRlZC4iKQorCis7OyBOYXRpdmVGdW5jdGlvbgorKGpzMi1tc2cgIm1zZy5uby5m dW5jdGlvbi5yZWYuZm91bmQiCisgICAgICAgICAibm8gc291cmNlIGZvdW5kIHRvIGRlY29tcGls ZSBmdW5jdGlvbiByZWZlcmVuY2UgJXMiKQorCisoanMyLW1zZyAibXNnLmFyZy5pc250LmFycmF5 IgorICAgICAgICAgInNlY29uZCBhcmd1bWVudCB0byBGdW5jdGlvbi5wcm90b3R5cGUuYXBwbHkg bXVzdCBiZSBhbiBhcnJheSIpCisKKzs7IE5hdGl2ZUdsb2JhbAorKGpzMi1tc2cgIm1zZy5iYWQu ZXNjLm1hc2siCisgICAgICAgICAiaW52YWxpZCBzdHJpbmcgZXNjYXBlIG1hc2siKQorCis7OyBO YXRpdmVSZWdFeHAKKyhqczItbXNnICJtc2cuYmFkLnF1YW50IgorICAiSW52YWxpZCBxdWFudGlm aWVyICVzIikKKworKGpzMi1tc2cgIm1zZy5vdmVybGFyZ2UuYmFja3JlZiIKKyAgIk92ZXJseSBs YXJnZSBiYWNrIHJlZmVyZW5jZSAlcyIpCisKKyhqczItbXNnICJtc2cub3ZlcmxhcmdlLm1pbiIK KyAgIk92ZXJseSBsYXJnZSBtaW5pbXVtICVzIikKKworKGpzMi1tc2cgIm1zZy5vdmVybGFyZ2Uu bWF4IgorICAiT3Zlcmx5IGxhcmdlIG1heGltdW0gJXMiKQorCisoanMyLW1zZyAibXNnLnplcm8u cXVhbnQiCisgICJaZXJvIHF1YW50aWZpZXIgJXMiKQorCisoanMyLW1zZyAibXNnLm1heC5sdC5t aW4iCisgICJNYXhpbXVtICVzIGxlc3MgdGhhbiBtaW5pbXVtIikKKworKGpzMi1tc2cgIm1zZy51 bnRlcm0ucXVhbnQiCisgICJVbnRlcm1pbmF0ZWQgcXVhbnRpZmllciAlcyIpCisKKyhqczItbXNn ICJtc2cudW50ZXJtLnBhcmVuIgorICAiVW50ZXJtaW5hdGVkIHBhcmVudGhldGljYWwgJXMiKQor CisoanMyLW1zZyAibXNnLnVudGVybS5jbGFzcyIKKyAgIlVudGVybWluYXRlZCBjaGFyYWN0ZXIg Y2xhc3MgJXMiKQorCisoanMyLW1zZyAibXNnLmJhZC5yYW5nZSIKKyAgIkludmFsaWQgcmFuZ2Ug aW4gY2hhcmFjdGVyIGNsYXNzLiIpCisKKyhqczItbXNnICJtc2cudHJhaWwuYmFja3NsYXNoIgor ICAiVHJhaWxpbmcgXFwgaW4gcmVndWxhciBleHByZXNzaW9uLiIpCisKKyhqczItbXNnICJtc2cu cmUudW5tYXRjaGVkLnJpZ2h0LnBhcmVuIgorICAidW5tYXRjaGVkICkgaW4gcmVndWxhciBleHBy ZXNzaW9uLiIpCisKKyhqczItbXNnICJtc2cubm8ucmVnZXhwIgorICAiUmVndWxhciBleHByZXNz aW9ucyBhcmUgbm90IGF2YWlsYWJsZS4iKQorCisoanMyLW1zZyAibXNnLmJhZC5iYWNrcmVmIgor ICAiYmFjay1yZWZlcmVuY2UgZXhjZWVkcyBudW1iZXIgb2YgY2FwdHVyaW5nIHBhcmVudGhlc2Vz LiIpCisKKyhqczItbXNnICJtc2cuYmFkLnJlZ2V4cC5jb21waWxlIgorICAgICAgICAgIk9ubHkg b25lIGFyZ3VtZW50IG1heSBiZSBzcGVjaWZpZWQgaWYgdGhlIGZpcnN0ICIKKyAgICAgICAgICJh cmd1bWVudCB0byBSZWdFeHAucHJvdG90eXBlLmNvbXBpbGUgaXMgYSBSZWdFeHAgb2JqZWN0LiIp CisKKzs7IFBhcnNlcgorKGpzMi1tc2cgIm1zZy5nb3Quc3ludGF4LmVycm9ycyIKKyAgICAgICAg ICJDb21waWxhdGlvbiBwcm9kdWNlZCAlcyBzeW50YXggZXJyb3JzLiIpCisKKyhqczItbXNnICJt c2cudmFyLnJlZGVjbCIKKyAgICAgICAgICJUeXBlRXJyb3I6IHJlZGVjbGFyYXRpb24gb2YgdmFy ICVzLiIpCisKKyhqczItbXNnICJtc2cuY29uc3QucmVkZWNsIgorICAgICAgICAgIlR5cGVFcnJv cjogcmVkZWNsYXJhdGlvbiBvZiBjb25zdCAlcy4iKQorCisoanMyLW1zZyAibXNnLmxldC5yZWRl Y2wiCisgICAgICAgICAiVHlwZUVycm9yOiByZWRlY2xhcmF0aW9uIG9mIHZhcmlhYmxlICVzLiIp CisKKyhqczItbXNnICJtc2cucGFybS5yZWRlY2wiCisgICAgICAgICAiVHlwZUVycm9yOiByZWRl Y2xhcmF0aW9uIG9mIGZvcm1hbCBwYXJhbWV0ZXIgJXMuIikKKworKGpzMi1tc2cgIm1zZy5mbi5y ZWRlY2wiCisgICAgICAgICAiVHlwZUVycm9yOiByZWRlY2xhcmF0aW9uIG9mIGZ1bmN0aW9uICVz LiIpCisKKyhqczItbXNnICJtc2cubGV0LmRlY2wubm90LmluLmJsb2NrIgorICAgICAgICAgIlN5 bnRheEVycm9yOiBsZXQgZGVjbGFyYXRpb24gbm90IGRpcmVjdGx5IHdpdGhpbiBibG9jayIpCisK KyhqczItbXNnICJtc2cubW9kLmltcG9ydC5kZWNsLmF0LnRvcC5sZXZlbCIKKyAgICAgICAgICJT eW50YXhFcnJvcjogaW1wb3J0IGRlY2xhcmF0aW9ucyBtYXkgb25seSBhcHBlYXIgYXQgdGhlIHRv cCBsZXZ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vZGVUcmFuc2Zvcm1lcgorKGpzMi1t c2cgIm1zZy5kdXAubGFiZWwiCisgICAgICAgICAiZHVwbGljYXRlZCBsYWJlbCIpCisKKyhqczIt bXNnICJtc2cudW5kZWYubGFiZWwiCisgICAgICAgICAidW5kZWZpbmVkIGxhYmVsIikKKworKGpz Mi1tc2cgIm1zZy5iYWQuYnJlYWsiCisgICAgICAgICAidW5sYWJlbGxlZCBicmVhayBtdXN0IGJl IGluc2lkZSBsb29wIG9yIHN3aXRjaCIpCisKKyhqczItbXNnICJtc2cuY29udGludWUub3V0c2lk ZSIKKyAgICAgICAgICJjb250aW51ZSBtdXN0IGJlIGluc2lkZSBsb29wIikKKworKGpzMi1tc2cg Im1zZy5jb250aW51ZS5ub25sb29wIgorICAgICAgICAgImNvbnRpbnVlIGNhbiBvbmx5IHVzZSBs YWJlbHMgb2YgaXRlcmF0aW9uIHN0YXRlbWVudHMiKQorCisoanMyLW1zZyAibXNnLmJhZC50aHJv dy5lb2wiCisgICAgICAgICAiTGluZSB0ZXJtaW5hdG9yIGlzIG5vdCBhbGxvd2VkIGJldHdlZW4g dGhlIHRocm93ICIKKyAgICAgICAgICJrZXl3b3JkIGFuZCB0aHJvdyBleHByZXNzaW9uLiIpCisK KyhqczItbXNnICJtc2cudW5uYW1lZC5mdW5jdGlvbi5zdG10IiA7IGFkZGVkIGJ5IGpzMi1tb2Rl CisgICAgICAgICAiZnVuY3Rpb24gc3RhdGVtZW50IHJlcXVpcmVzIGEgbmFtZSIpCisKKyhqczIt bXNnICJtc2cubm8ucGFyZW4ucGFybXMiCisgICAgICAgICAibWlzc2luZyAoIGJlZm9yZSBmdW5j dGlvbiBwYXJhbWV0ZXJzLiIpCisKKyhqczItbXNnICJtc2cubm8ucGFybSIKKyAgICAgICAgICJt aXNzaW5nIGZvcm1hbCBwYXJhbWV0ZXIiKQorCisoanMyLW1zZyAibXNnLm5vLnBhcmVuLmFmdGVy LnBhcm1zIgorICAgICAgICAgIm1pc3NpbmcgKS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m1pc3NpbmcgOyBhZnRlciBzdGF0ZW1lbnQiKQorCisoanMyLW1zZyAibXNnLm5vLm5h bWUuYWZ0ZXIuZG90IgorICAgICAgICAgIm1pc3NpbmcgbmFtZSBhZnRlciAuIG9wZXJhdG9yIikK KworKGpzMi1tc2cgIm1zZy5uby5uYW1lLmFmdGVyLmNvbG9uY29sb24iCisgICAgICAgICAibWlz c2luZyBuYW1lIGFmdGVyIDo6IG9wZXJhdG9yIikKKworKGpzMi1tc2cgIm1zZy5uby5uYW1lLmFm dGVyLmRvdGRvdCIKKyAgICAgICAgICJtaXNzaW5nIG5hbWUgYWZ0ZXIgLi4gb3BlcmF0b3IiKQor CisoanMyLW1zZyAibXNnLm5vLm5hbWUuYWZ0ZXIueG1sQXR0ciIKKyAgICAgICAgICJtaXNzaW5n IG5hbWUgYWZ0ZXIgLkAiKQorCisoanMyLW1zZyAibXNnLm5vLmJyYWNrZXQuaW5kZXgiCisgICAg ICAgICAibWlzc2luZyBdIGluIGluZGV4IGV4cHJlc3Npb24iKQorCisoanMyLW1zZyAibXNnLm5v LnBhcmVuLnN3aXRjaCIKKyAgICAgICAgICJtaXNzaW5nICggYmVmb3JlIHN3aXRjaCBleHByZXNz aW9uIikKKworKGpzMi1tc2cgIm1zZy5uby5wYXJlbi5hZnRlci5zd2l0Y2giCisgICAgICAgICAi bWlzc2luZyApIGFmdGVyIHN3aXRjaCBleHByZXNzaW9uIikKKworKGpzMi1tc2cgIm1zZy5uby5i cmFjZS5zd2l0Y2giCisgICAgICAgICAibWlzc2luZyAneycgYmVmb3JlIHN3aXRjaCBib2R5IikK KworKGpzMi1tc2cgIm1zZy5iYWQuc3dpdGNoIgorICAgICAgICAgImludmFsaWQgc3dpdGNoIHN0 YXRlbWVudCIpCisKKyhqczItbXNnICJtc2cubm8uY29sb24uY2FzZSIKKyAgICAgICAgICJtaXNz aW5nIDogYWZ0ZXIgY2FzZSBleHByZXNzaW9uIikKKworKGpzMi1tc2cgIm1zZy5kb3VibGUuc3dp dGNoLmRlZmF1bHQiCisgICAgICAgICAiZG91YmxlIGRlZmF1bHQgbGFiZWwgaW4gdGhlIHN3aXRj aCBzdGF0ZW1lbnQiKQorCisoanMyLW1zZyAibXNnLm5vLndoaWxlLmRvIgorICAgICAgICAgIm1p c3Npbmcgd2hpbGUgYWZ0ZXIgZG8tbG9vcCBib2R5IikKKworKGpzMi1tc2cgIm1zZy5uby5wYXJl bi5mb3IiCisgICAgICAgICAibWlzc2luZyAoIGFmdGVyIGZvciIpCisKKyhqczItbXNnICJtc2cu bm8uc2VtaS5mb3IiCisgICAgICAgICAibWlzc2luZyA7IGFmdGVyIGZvci1sb29wIGluaXRpYWxp emVyIikKKworKGpzMi1tc2cgIm1zZy5uby5zZW1pLmZvci5jb25kIgorICAgICAgICAgIm1pc3Np bmcgOyBhZnRlciBmb3ItbG9vcCBjb25kaXRpb24iKQorCisoanMyLW1zZyAibXNnLmluLmFmdGVy LmZvci5uYW1lIgorICAgICAgICAgIm1pc3NpbmcgaW4gb3Igb2YgYWZ0ZXIgZm9yIikKKworKGpz Mi1tc2cgIm1zZy5uby5wYXJlbi5mb3IuY3RybCIKKyAgICAgICAgICJtaXNzaW5nICkgYWZ0ZXIg Zm9yLWxvb3AgY29udHJvbCIpCisKKyhqczItbXNnICJtc2cubm8ucGFyZW4ud2l0aCIKKyAgICAg ICAgICJtaXNzaW5nICggYmVmb3JlIHdpdGgtc3RhdGVtZW50IG9iamVjdCIpCisKKyhqczItbXNn ICJtc2cubm8ucGFyZW4uYWZ0ZXIud2l0aCIKKyAgICAgICAgICJtaXNzaW5nICkgYWZ0ZXIgd2l0 aC1zdGF0ZW1lbnQgb2JqZWN0IikKKworKGpzMi1tc2cgIm1zZy5uby5wYXJlbi5hZnRlci5sZXQi CisgICAgICAgICAibWlzc2luZyAoIGFmdGVyIGxldCIpCisKKyhqczItbXNnICJtc2cubm8ucGFy ZW4ubGV0IgorICAgICAgICAgIm1pc3NpbmcgKSBhZnRlciB2YXJpYWJsZSBsaXN0IikKKworKGpz Mi1tc2cgIm1zZy5uby5jdXJseS5sZXQiCisgICAgICAgICAibWlzc2luZyB9IGFmdGVyIGxldCBz dGF0ZW1lbnQiKQorCisoanMyLW1zZyAibXNnLmJhZC5yZXR1cm4iCisgICAgICAgICAiaW52YWxp ZCByZXR1cm4iKQorCisoanMyLW1zZyAibXNnLm5vLmJyYWNlLmJsb2NrIgorICAgICAgICAgIm1p c3NpbmcgfSBpbiBjb21wb3VuZCBzdGF0ZW1lbnQiKQorCisoanMyLW1zZyAibXNnLmJhZC5sYWJl bCIKKyAgICAgICAgICJpbnZhbGlkIGxhYmVsIikKKworKGpzMi1tc2cgIm1zZy5iYWQudmFyIgor ICAgICAgICAgIm1pc3NpbmcgdmFyaWFibGUgbmFtZSIpCisKKyhqczItbXNnICJtc2cuYmFkLnZh ci5pbml0IgorICAgICAgICAgImludmFsaWQgdmFyaWFibGUgaW5pdGlhbGl6YXRpb24iKQorCiso anMyLW1zZyAibXNnLm5vLmNvbG9uLmNvbmQiCisgICAgICAgICAibWlzc2luZyA6IGluIGNvbmRp dGlvbmFsIGV4cHJlc3Npb24iKQorCisoanMyLW1zZyAibXNnLm5vLnBhcmVuLmFyZyIKKyAgICAg ICAgICJtaXNzaW5nICkgYWZ0ZXIgYXJndW1lbnQgbGlzdCIpCisKKyhqczItbXNnICJtc2cubm8u YnJhY2tldC5hcmciCisgICAgICAgICAibWlzc2luZyBdIGFmdGVyIGVsZW1lbnQgbGlzdCIpCisK KyhqczItbXNnICJtc2cuYmFkLnByb3AiCisgICAgICAgICAiaW52YWxpZCBwcm9wZXJ0eSBpZCIp CisKKyhqczItbXNnICJtc2cubm8uY29sb24ucHJvcCIKKyAgICAgICAgICJtaXNzaW5nIDogYWZ0 ZXIgcHJvcGVydHkgaWQiKQorCisoanMyLW1zZyAibXNnLm5vLmJyYWNlLnByb3AiCisgICAgICAg ICAibWlzc2luZyB9IGFmdGVyIHByb3BlcnR5IGxpc3QiKQorCisoanMyLW1zZyAibXNnLm5vLnBh cmVuIgorICAgICAgICAgIm1pc3NpbmcgKSBpbiBwYXJlbnRoZXRpY2FsIikKKworKGpzMi1tc2cg Im1zZy5yZXNlcnZlZC5pZCIKKyAgICAgICAgICInJXMnIGlzIGEgcmVzZXJ2ZWQgaWRlbnRpZmll ciIpCisKKyhqczItbXNnICJtc2cubm8ucGFyZW4uY2F0Y2giCisgICAgICAgICAibWlzc2luZyAo IGJlZm9yZSBjYXRjaC1ibG9jayBjb25kaXRpb24iKQorCisoanMyLW1zZyAibXNnLmJhZC5jYXRj aGNvbmQiCisgICAgICAgICAiaW52YWxpZCBjYXRjaCBibG9jayBjb25kaXRpb24iKQorCisoanMy LW1zZyAibXNnLmNhdGNoLnVucmVhY2hhYmxlIgorICAgICAgICAgImFueSBjYXRjaCBjbGF1c2Vz IGZvbGxvd2luZyBhbiB1bnF1YWxpZmllZCBjYXRjaCBhcmUgdW5yZWFjaGFibGUiKQorCisoanMy LW1zZyAibXNnLm5vLmJyYWNlLnRyeSIKKyAgICAgICAgICJtaXNzaW5nICd7JyBiZWZvcmUgdHJ5 IGJsb2NrIikKKworKGpzMi1tc2cgIm1zZy5uby5icmFjZS5jYXRjaGJsb2NrIgorICAgICAgICAg Im1pc3NpbmcgJ3snIGJlZm9yZSBjYXRjaC1ibG9jayBib2R5IikKKworKGpzMi1tc2cgIm1zZy50 cnkubm8uY2F0Y2hmaW5hbGx5IgorICAgICAgICAgIid0cnknIHdpdGhvdXQgJ2NhdGNoJyBvciAn ZmluYWxseSciKQorCisoanMyLW1zZyAibXNnLm5vLnJldHVybi52YWx1ZSIKKyAgICAgICAgICJm dW5jdGlvbiAlcyBkb2VzIG5vdCBhbHdheXMgcmV0dXJuIGEgdmFsdWUiKQorCisoanMyLW1zZyAi bXNnLmFub24ubm8ucmV0dXJuLnZhbHVlIgorICAgICAgICAgImFub255bW91cyBmdW5jdGlvbiBk b2VzIG5vdCBhbHdheXMgcmV0dXJuIGEgdmFsdWUiKQorCisoanMyLW1zZyAibXNnLnJldHVybi5p bmNvbnNpc3RlbnQiCisgICAgICAgICAicmV0dXJuIHN0YXRlbWVudCBpcyBpbmNvbnNpc3RlbnQg d2l0aCBwcmV2aW91cyB1c2FnZSIpCisKKyhqczItbXNnICJtc2cuZ2VuZXJhdG9yLnJldHVybnMi CisgICAgICAgICAiVHlwZUVycm9yOiBsZWdhY3kgZ2VuZXJhdG9yIGZ1bmN0aW9uICclcycgcmV0 dXJucyBhIHZhbHVlIikKKworKGpzMi1tc2cgIm1zZy5hbm9uLmdlbmVyYXRvci5yZXR1cm5zIgor ICAgICAgICAgIlR5cGVFcnJvcjogYW5vbnltb3VzIGxlZ2FjeSBnZW5lcmF0b3IgZnVuY3Rpb24g cmV0dXJucyBhIHZhbHVlIikKKworKGpzMi1tc2cgIm1zZy5zeW50YXgiCisgICAgICAgICAic3lu dGF4IGVycm9yIikKKworKGpzMi1tc2cgIm1zZy51bmV4cGVjdGVkLmVvZiIKKyAgICAgICAgICJV bmV4cGVjdGVkIGVuZCBvZiBmaWxlIikKKworKGpzMi1tc2cgIm1zZy5YTUwuYmFkLmZvcm0iCisg ICAgICAgICAiaWxsZWdhbGx5IGZvcm1lZCBYTUwgc3ludGF4IikKKworKGpzMi1tc2cgIm1zZy5Y TUwubm90LmF2YWlsYWJsZSIKKyAgICAgICAgICJYTUwgcnVudGltZSBub3QgYXZhaWxhYmxlIikK KworKGpzMi1tc2cgIm1zZy50b28uZGVlcC5wYXJzZXIucmVjdXJzaW9uIgorICAgICAgICAgIlRv byBkZWVwIHJlY3Vyc2lvbiB3aGlsZSBwYXJzaW5nIikKKworKGpzMi1tc2cgIm1zZy5uby5zaWRl LmVmZmVjdHMiCisgICAgICAgICAiQ29kZSBoYXMgbm8gc2lkZSBlZmZlY3RzIikKKworKGpzMi1t c2cgIm1zZy5leHRyYS50cmFpbGluZy5jb21tYSIKKyAgICAgICAgICJUcmFpbGluZyBjb21tYSBp cyBub3Qgc3VwcG9ydGVkIGluIHNvbWUgYnJvd3NlcnMiKQorCisoanMyLW1zZyAibXNnLmFycmF5 LnRyYWlsaW5nLmNvbW1hIgorICAgICAgICAgIlRyYWlsaW5nIGNvbW1hIHlpZWxkcyBkaWZmZXJl bnQgYmVoYXZpb3IgYWNyb3NzIGJyb3dzZXJzIikKKworKGpzMi1tc2cgIm1zZy5lcXVhbC5hcy5h c3NpZ24iCisgICAgICAgICAoY29uY2F0ICJUZXN0IGZvciBlcXVhbGl0eSAoPT0pIG1pc3R5cGVk IGFzIGFzc2lnbm1lbnQgKD0pPyIKKyAgICAgICAgICAgICAgICAgIiAocGFyZW50aGVzaXplIHRv IHN1cHByZXNzIHdhcm5pbmcpIikpCisKKyhqczItbXNnICJtc2cudmFyLmhpZGVzLmFyZyIKKyAg ICAgICAgICJWYXJpYWJsZSAlcyBoaWRlcyBhcmd1bWVudCIpCisKKyhqczItbXNnICJtc2cuZGVz dHJ1Y3QuYXNzaWduLm5vLmluaXQiCisgICAgICAgICAiTWlzc2luZyA9IGluIGRlc3RydWN0dXJp bmcgZGVjbGFyYXRpb24iKQorCis7OyBTY3JpcHRSdW50aW1lCisoanMyLW1zZyAibXNnLm5vLnBy b3BlcnRpZXMiCisgICAgICAgICAiJXMgaGFzIG5vIHByb3BlcnRpZXMuIikKKworKGpzMi1tc2cg Im1zZy5pbnZhbGlkLml0ZXJhdG9yIgorICAgICAgICAgIkludmFsaWQgaXRlcmF0b3IgdmFsdWUi KQorCisoanMyLW1zZyAibXNnLml0ZXJhdG9yLnByaW1pdGl2ZSIKKyAgICAgICAgICJfX2l0ZXJh dG9yX18gcmV0dXJuZWQgYSBwcmltaXRpdmUgdmFsdWUiKQorCisoanMyLW1zZyAibXNnLmFzc24u Y3JlYXRlLnN0cmljdCIKKyAgICAgICAgICJBc3NpZ25tZW50IHRvIHVuZGVjbGFyZWQgdmFyaWFi bGUgJXMiKQorCisoanMyLW1zZyAibXNnLnVuZGVjbGFyZWQudmFyaWFibGUiICA7IGFkZGVkIGJ5 IG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IgorICAgICAgICAgIkNhbm5vdCBy ZWFkIHByb3BlcnR5ICclcycgZnJvbSAlcyIpCisKKyhqczItbXNnICJtc2cudW5kZWYucHJvcC53 cml0ZSIKKyAgICAgICAgICJDYW5ub3Qgc2V0IHByb3BlcnR5ICclcycgb2YgJXMgdG8gJyVzJyIp CisKKyhqczItbXNnICJtc2cudW5kZWYucHJvcC5kZWxldGUiCisgICAgICAgICAiQ2Fubm90IGRl bGV0ZSBwcm9wZXJ0eSAnJXMnIG9mICVzIikKKworKGpzMi1tc2cgIm1zZy51bmRlZi5tZXRob2Qu Y2FsbCIKKyAgICAgICAgICJDYW5ub3QgY2FsbCBtZXRob2QgJyVzJyBvZiAlcyIpCisKKyhqczIt bXNnICJtc2cudW5kZWYud2l0aCIKKyAgICAgICAgICJDYW5ub3QgYXBwbHkgJ3dpdGgnIHRvICVz IikKKworKGpzMi1tc2cgIm1zZy5pc250LmZ1bmN0aW9uIgorICAgICAgICAgIiVzIGlzIG5vdCBh IGZ1bmN0aW9uLCBpdCBpcyAlcy4iKQorCisoanMyLW1zZyAibXNnLmlzbnQuZnVuY3Rpb24uaW4i CisgICAgICAgICAiQ2Fubm90IGNhbGwgcHJvcGVydHkgJXMgaW4gb2JqZWN0ICVzLiAiCisgICAg ICAgICAiSXQgaXMgbm90IGEgZnVuY3Rpb24sIGl0IGlzICclcycuIikKKworKGpzMi1tc2cgIm1z Zy5mdW5jdGlvbi5ub3QuZm91bmQiCisgICAgICAgICAiQ2Fubm90IGZpbmQgZnVuY3Rpb24gJXMu IikKKworKGpzMi1tc2cgIm1zZy5mdW5jdGlvbi5ub3QuZm91bmQuaW4iCisgICAgICAgICAiQ2Fu bm90IGZpbmQgZnVuY3Rpb24gJXMgaW4gb2JqZWN0ICVzLiIpCisKKyhqczItbXNnICJtc2cuaXNu dC54bWwub2JqZWN0IgorICAgICAgICAgIiVzIGlzIG5vdCBhbiB4bWwgb2JqZWN0LiIpCisKKyhq czItbXNnICJtc2cubm8ucmVmLn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5LnJlYWRv bmx5IgorICAgICAgICAgIkNhbm5vdCBtb2RpZnkgcmVhZG9ubHkgcHJvcGVydHk6ICVzLiIpCisK Kzs7IFRva2VuU3RyZWFtCisoanMyLW1zZyAibXNnLm1pc3NpbmcuZXhwb25lbnQiCisgICAgICAg ICAibWlzc2luZyBleHBvbmVudCIpCisKKyhqczItbXNnICJtc2cuY2F1Z2h0Lm5mZSIKKyAgICAg ICAgICJudW1iZXIgZm9ybWF0IGVycm9yIikKKworKGpzMi1tc2cgIm1zZy51bnRlcm1pbmF0ZWQu c3RyaW5nLmxpdCIKKyAgICAgICAgICJ1bnRlcm1pbmF0ZWQgc3RyaW5nIGxpdGVyYWwiKQorCiso anMyLW1zZyAibXNnLnVudGVybWluYXRlZC5jb21tZW50IgorICAgICAgICAgInVudGVybWluYXRl ZCBjb21tZW50IikKKworKGpzMi1tc2cgIm1zZy51bnRlcm1pbmF0ZWQucmUubGl0IgorICAgICAg ICAgInVudGVybWluYXRlZCByZWd1bGFyIGV4cHJlc3Npb24gbGl0ZXJhbCIpCisKKyhqczItbXNn ICJtc2cuaW52YWxpZC5yZS5mbGFnIgorICAgICAgICAgImludmFsaWQgZmxhZyBhZnRlciByZWd1 bGFyIGV4cHJlc3Npb24iKQorCisoanMyLW1zZyAibXNnLm5vLnJlLmlucHV0LmZvciIKKyAgICAg ICAgICJubyBpbnB1dCBmb3IgJXMiKQorCisoanMyLW1zZyAibXNnLmlsbGVnYWwuY2hhcmFjdGVy IgorICAgICAgICAgImlsbGVnYWwgY2hhcmFjdGVyIikKKworKGpzMi1tc2cgIm1zZy5pbnZhbGlk LmVzY2FwZSIKKyAgICAgICAgICJpbnZhbGlkIFVuaWNvZGUgZXNjYXBlIHNlcXVlbmNlIikKKwor KGpzMi1tc2cgIm1zZy5iYWQubmFtZXNwYWNlIgorICAgICAgICAgIm5vdCBhIHZhbGlkIGRlZmF1 bHQgbmFtZXNwYWNlIHN0YXRlbWVudC4gIgorICAgICAgICAgIlN5bnRheC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CisgICAgICAgICAi bmFtZSBpcyByZXF1aXJlZCBhZnRlciBleHRlbmRzIikKKworKGpzMi1tc2cgIm1zZy5uby5icmFj ZS5jbGFzcyIgOyBhZGRlZCBieSBqczItbW9kZQorICAgICAgICAgIm1pc3NpbmcgJ3snIGJlZm9y ZSBjbGFzcyBib2R5IikKKworKGpzMi1tc2cgIm1zZy5taXNzaW5nLmNvbXB1dGVkLnJiIiA7IGFk ZGVkIGJ5IGpzMi1tb2RlCisgICAgICAgICAibWlzc2luZyAnXScgYWZ0ZXIgY29tcHV0ZWQgcHJv cGVydHkgZXhwcmVzc2lvbiIpCisKKzs7OyBUb2tlbnMgQnVmZmVyCisKKyhkZWZjb25zdCBqczIt dGktbWF4LWxvb2thaGVhZCAyKQorKGRlZmNvbnN0IGpzMi10aS1udG9rZW5zICgxKyBqczItdGkt bWF4LWxvb2thaGVhZCkpCisKKyhkZWZ1biBqczItbmV3LXRva2VuIChvZmZzZXQpCisgIChsZXQg KCh0b2tlbiAobWFrZS1qczItdG9rZW4gKCsgb2Zmc2V0IGpzMi10cy1jdXJzb3IpKSkpCisgICAg KHNldHEganMyLXRpLXRva2Vucy1jdXJzb3IgKG1vZCAoMSsganMyLXRpLXRva2Vucy1jdXJzb3Ip IGpzMi10aS1udG9rZW5zKSkKKyAgICAoYXNldCBqczItdGktdG9rZW5zIGpzMi10aS10b2tlbnMt Y3Vyc29yIHRva2VuKQorICAgIHRva2VuKSkKKworKGRlZnN1YnN0IGpzMi1jdXJyZW50LXRva2Vu ICgpCisgIChhcmVmIGpzMi10aS10b2tlbnMganMyLXRpLXRva2Vucy1jdXJzb3IpKQorCisoZGVm c3Vic3QganMyLWN1cnJlbnQtdG9rZW4tc3RyaW5nICgpCisgIChqczItdG9rZW4tc3RyaW5nIChq czItY3VycmVudC10b2tlbikpKQorCisoZGVmc3Vic3QganMyLWN1cnJlbnQtdG9rZW4tdHlwZSAo KQorICAoanMyLXRva2VuLXR5cGUgKGpzMi1jdXJyZW50LXRva2VuKSkpCisKKyhkZWZzdWJzdCBq czItY3VycmVudC10b2tlbi1iZWcgKCkKKyAgKGpzMi10b2tlbi1iZWcgKGpzMi1jdXJyZW50LXRv a2VuKSkpCisKKyhkZWZzdWJzdCBqczItY3VycmVudC10b2tlbi1lbmQgKCkKKyAgKGpzMi10b2tl bi1lbmQgKGpzMi1jdXJyZW50LXRva2VuKSkpCisKKyhkZWZ1biBqczItY3VycmVudC10b2tlbi1s ZW4gKCkKKyAgKGxldCAoKHRva2VuIChqczItY3VycmVudC10b2tlbikpKQorICAgICgtIChqczIt dG9rZW4tZW5kIHRva2VuKQorICAgICAgIChqczItdG9rZW4tYmVnIHRva2VuKSkpKQorCisoZGVm dW4ganMyLXRzLXNlZWsgKHN0YXRlKQorICAoc2V0cSBqczItdHMtbGluZW5vIChqczItdHMtc3Rh dGUtbGluZW5vIHN0YXRlKQorICAgICAgICBqczItdHMtY3Vyc29yIChqczItdHMtc3RhdGUtY3Vy c29yIHN0YXRlKQorICAgICAgICBqczItdGktdG9rZW5zIChqczItdHMtc3RhdGUtdG9rZW5zIHN0 YXRlKQorICAgICAgICBqczItdGktdG9rZW5zLWN1cnNvciAoanMyLXRzLXN0YXRlLXRva2Vucy1j dXJzb3Igc3RhdGUpCisgICAgICAgIGpzMi10aS1sb29rYWhlYWQgKGpzMi10cy1zdGF0ZS1sb29r YWhlYWQgc3RhdGUpKSkKKworOzs7IFV0aWxpdGllcworCisoZGVmdW4ganMyLWRlbGV0ZS1pZiAo cHJlZGljYXRlIGxpc3QpCisgICJSZW1vdmUgYWxsIGl0ZW1zIHNhdGlzZnlpbmcgUFJFRElDQVRF IGluIExJU1QuIgorICAoY2wtbG9vcCBmb3IgaXRlbSBpbiBsaXN0CisgICAgICAgICAgIGlmIChu b3QgKGZ1bmNhbGwgcHJlZGljYXRlIGl0ZW0pKQorICAgICAgICAgICBjb2xsZWN0IGl0ZW0pKQor CisoZGVmdW4ganMyLXBvc2l0aW9uIChlbGVtZW50IGxpc3QpCisgICJGaW5kIDAtaW5kZXhlZCBw b3NpdGlvbiBvZiBFTEVNRU5UIGluIExJU1QgY29tcGFyaW5nIHdpdGggYGVxJy4KK1JldHVybnMg bmlsIGlmIGVsZW1lbnQgaXMgbm90IGZvdW5kIGluIHRoZSBsaXN0LiIKKyAgKGxldCAoKGNvdW50 IDApCisgICAgICAgIGZvdW5kKQorICAgICh3aGlsZSAoYW5kIGxpc3QgKG5vdCBmb3VuZCkpCisg ICAgICAoaWYgKGVxIGVsZW1lbnQgKGNhciBsaXN0KSkKKyAgICAgICAgICAoc2V0cSBmb3VuZCB0 KQorICAgICAgICAoc2V0cSBjb3VudCAoMSsgY291bnQpCisgICAgICAgICAgICAgIGxpc3QgKGNk ciBsaXN0KSkpKQorICAgIChpZiBmb3VuZCBjb3VudCkpKQorCisoZGVmdW4ganMyLWZpbmQtaWYg KHByZWRpY2F0ZSBsaXN0KQorICAiRmluZCBmaXJzdCBpdGVtIHNhdGlzZnlpbmcgUFJFRElDQVRF IGluIExJU1QuIgorICAobGV0IChyZXN1bHQpCisgICAgKHdoaWxlIChhbmQgbGlzdCAobm90IHJl c3VsdCkpCisgICAgICAoaWYgKGZ1bmNhbGwgcHJlZGljYXRlIChjYXIgbGlzdCkpCisgICAgICAg ICAgKHNldHEgcmVzdWx0IChjYXIgbGlzdCkpKQorICAgICAgKHNldHEgbGlzdCAoY2RyIGxpc3Qp KSkKKyAgICByZXN1bHQpKQorCisoZGVmbWFjcm8ganMyLXRpbWUgKGZvcm0pCisgICJFdmFsdWF0 ZSBGT1JNLCBkaXNjYXJkIHJlc3VsdCwgYW5kIHJldHVybiBlbGFwc2VkIHRpbWUgaW4gc2VjLiIK KyAgKGRlY2xhcmUgKGRlYnVnIHQpKQorICAobGV0ICgoYmVnIChtYWtlLXN5bWJvbCAiLS1qczIt dGltZS1iZWctLSIpKQorICAgICAgICAoZGVsdGEgKG1ha2Utc3ltYm9sICItLWpzMi10aW1lLWVu ZC0tIikpKQorICAgIGAobGV0ICgoLGJlZyAoY3VycmVudC10aW1lKSkKKyAgICAgICAgICAgLGRl bHRhKQorICAgICAgICxmb3JtCisgICAgICAgKC8gKHRydW5jYXRlICgqICgtIChmbG9hdC10aW1l IChjdXJyZW50LXRpbWUpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAoZmxvYXQtdGltZSAs YmVnKSkKKyAgICAgICAgICAgICAgICAgICAgICAgMTAwMDApKQorICAgICAgICAgIDEwMDAwLjAp KSkpCisKKyhkZWZzdWJzdCBqczItc2FtZS1saW5lIChwb3MpCisgICJSZXR1cm4gdCBpZiBQT1Mg aXMgb24gdGhlIHNhbWUgbGluZSBhcyBjdXJyZW50IHBvaW50LiIKKyAgKGFuZCAoPj0gcG9zIChw b2ludC1hdC1ib2wpKQorICAgICAgICg8PSBwb3MgKHBvaW50LWF0LWVvbCkpKSkKKworKGRlZnVu IGpzMi1jb2RlLWJ1ZyAoKQorICAiU2lnbmFsIGFuIGVycm9yIHdoZW4gd2UgZW5jb3VudGVyIGFu IHVuZXhwZWN0ZWQgY29kZSBwYXRoLiIKKyAgKGVycm9yICJmYWlsZWQgYXNzZXJ0aW9uIikpCisK KyhkZWZzdWJzdCBqczItcmVjb3JkLXRleHQtcHJvcGVydHkgKGJlZyBlbmQgcHJvcCB2YWx1ZSkK KyAgIlJlY29yZCBhIHRleHQgcHJvcGVydHkgdG8gc2V0IHdoZW4gcGFyc2luZyBmaW5pc2hlcy4i CisgIChwdXNoIChsaXN0IGJlZyBlbmQgcHJvcCB2YWx1ZSkganMyLW1vZGUtZGVmZXJyZWQtcHJv cGVydGllcykpCisKKzs7IEknZCBsaWtlIHRvIGFzc29jaWF0ZSBlcnJvcnMgd2l0aCBub2Rlcywg YnV0IGZvciBub3cgdGhlCis7OyBlYXNpZXN0IHRoaW5nIHRvIGRvIGlzIGdldCB0aGUgY29udGV4 dCBpbmZvIGZyb20gdGhlIGxhc3QgdG9rZW4uCisoZGVmdW4ganMyLXJlY29yZC1wYXJzZS1lcnJv ciAobXNnICZvcHRpb25hbCBhcmcgcG9zIGxlbikKKyAgKHB1c2ggKGxpc3QgKGxpc3QgbXNnIGFy ZykKKyAgICAgICAgICAgICAgKG9yIHBvcyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKSkKKyAgICAg ICAgICAgICAgKG9yIGxlbiAoanMyLWN1cnJlbnQtdG9rZW4tbGVuKSkpCisgICAgICAgIGpzMi1w YXJzZWQtZXJyb3JzKSkKKworKGRlZnVuIGpzMi1yZXBvcnQtZXJyb3IgKG1zZyAmb3B0aW9uYWwg bXNnLWFyZyBwb3MgbGVuKQorICAiU2lnbmFsIGEgc3ludGF4IGVycm9yIG9yIHJlY29yZCBhIHBh cnNlIGVycm9yLiIKKyAgKGlmIGpzMi1yZWNvdmVyLWZyb20tcGFyc2UtZXJyb3JzCisgICAgICAo anMyLXJlY29yZC1wYXJzZS1lcnJvciBtc2cgbXNnLWFyZyBwb3MgbGVuKQorICAoc2lnbmFsICdq czItc3ludGF4LWVycm9yCisgICAgICAgICAgKGxpc3QgbXNnCisgICAgICAgICAgICAgICAganMy LXRzLWxpbmVubworICAgICAgICAgICAgICAgIChzYXZlLWV4Y3Vyc2lvbgorICAgICAgICAgICAg ICAgICAgKGdvdG8tY2hhciBqczItdHMtY3Vyc29yKQorICAgICAgICAgICAgICAgICAgKGN1cnJl bnQtY29sdW1uKSkKKyAgICAgICAgICAgICAgICBqczItdHMtaGl0LWVvZikpKSkKKworKGRlZnVu IGpzMi1yZXBvcnQtd2FybmluZyAobXNnICZvcHRpb25hbCBtc2ctYXJnIHBvcyBsZW4gZmFjZSkK KyAgKGlmIGpzMi1jb21waWxlci1yZXBvcnQtd2FybmluZy1hcy1lcnJvcgorICAgICAgKGpzMi1y ZXBvcnQtZXJyb3IgbXNnIG1zZy1hcmcgcG9zIGxlbikKKyAgICAocHVzaCAobGlzdCAobGlzdCBt c2cgbXNnLWFyZykKKyAgICAgICAgICAgICAgICAob3IgcG9zIChqczItY3VycmVudC10b2tlbi1i ZWcpKQorICAgICAgICAgICAgICAgIChvciBsZW4gKGpzMi1jdXJyZW50LXRva2VuLWxlbikpCisg ICAgICAgICAgICAgICAgZmFjZSkKKyAgICAgICAgICBqczItcGFyc2VkLXdhcm5pbmdzKSkpCisK KyhkZWZ1biBqczItYWRkLXN0cmljdC13YXJuaW5nIChtc2ctaWQgJm9wdGlvbmFsIG1zZy1hcmcg YmVnIGVuZCkKKyAgKGlmIGpzMi1jb21waWxlci1zdHJpY3QtbW9kZQorICAgICAgKGpzMi1yZXBv cnQtd2FybmluZyBtc2ctaWQgbXNnLWFyZyBiZWcKKyAgICAgICAgICAgICAgICAgICAgICAgICAg KGFuZCBiZWcgZW5kICgtIGVuZCBiZWcpKSkpKQorCisocHV0ICdqczItc3ludGF4LWVycm9yICdl cnJvci1jb25kaXRpb25zCisgICAgICcoZXJyb3Igc3ludGF4LWVycm9yIGpzMi1zeW50YXgtZXJy b3IpKQorKHB1dCAnanMyLXN5bnRheC1lcnJvciAnZXJyb3ItbWVzc2FnZSAiU3ludGF4IGVycm9y IikKKworKHB1dCAnanMyLXBhcnNlLWVycm9yICdlcnJvci1jb25kaXRpb25zCisgICAgICcoZXJy b3IgcGFyc2UtZXJyb3IganMyLXBhcnNlLWVycm9yKSkKKyhwdXQgJ2pzMi1wYXJzZS1lcnJvciAn ZXJyb3ItbWVzc2FnZSAiUGFyc2UgZXJyb3IiKQorCisoZGVmbWFjcm8ganMyLWNsZWFyLWZsYWcg KGZsYWdzIGZsYWcpCisgIGAoc2V0cSAsZmxhZ3MgKGxvZ2FuZCAsZmxhZ3MgKGxvZ25vdCAsZmxh ZykpKSkKKworKGRlZm1hY3JvIGpzMi1zZXQtZmxhZyAoZmxhZ3MgZmxhZykKKyAgIkxvZ2ljYWwt b3IgRkxBRyBpbnRvIEZMQUdTLiIKKyAgYChzZXRxICxmbGFncyAobG9naW9yICxmbGFncyAsZmxh ZykpKQorCisoZGVmc3Vic3QganMyLWZsYWctc2V0LXAgKGZsYWdzIG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4sIHRoZW4gdGhlCitjYWxsYmFjayBpcyBjYWxsZWQgaW1tZWRp YXRlbHkgd2l0aCBhIG5vbi1uaWwgRU5ELVAgYXJndW1lbnQuCisKK1RoZSBub2RlIHRyYXZlcnNh bCBpcyBhcHByb3hpbWF0ZWx5IGxleGljYWwtb3JkZXIsIGFsdGhvdWdoIHRoZXJlCithcmUgY3Vy cmVudGx5IG5vIGd1YXJhbnRlZXMgYXJvdW5kIHRoaXMuIgorICAod2hlbiBub2RlCisgICAgKGxl dCAoKHZmdW5jIChnZXQgKGFyZWYgbm9kZSAwKSAnanMyLXZpc2l0b3IpKSkKKyAgICAgIDs7IHZp c2l0IHRoZSBub2RlCisgICAgICAod2hlbiAgKGZ1bmNhbGwgY2FsbGJhY2sgbm9kZSBuaWwpCisg ICAgICAgIDs7IHZpc2l0IHRoZSBraWRzCisgICAgICAgIChjb25kCisgICAgICAgICAoKGVxIHZm dW5jICdqczItdmlzaXQtbm9uZSkKKyAgICAgICAgICBuaWwpICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDsgZG9uJ3QgZXZlbiBib3RoZXIgY2FsbGluZyBpdAorICAgICAgICAgOzsgRWFjaCBB U1Qgbm9kZSB0eXBlIGhhcyB0byBkZWZpbmUgYSBganMyLXZpc2l0b3InIGZ1bmN0aW9uCisgICAg ICAgICA7OyB0aGF0IHRha2VzIGEgbm9kZSBhbmQgYSBjYWxsYmFjaywgYW5kIGNhbGxzIGBqczIt dmlzaXQtYXN0JworICAgICAgICAgOzsgb24gZWFjaCBjaGlsZCBvZiB0aGUgbm9kZS4KKyAgICAg ICAgICh2ZnVuYworICAgICAgICAgIChmdW5jYWxsIHZmdW5jIG5vZGUgY2FsbGJhY2spKQorICAg ICAgICAgKHQKKyAgICAgICAgICAoZXJyb3IgIiVzIGRvZXMgbm90IGRlZmluZSBhIHZpc2l0b3It dHJhdmVyc2FsIGZ1bmN0aW9uIgorICAgICAgICAgICAgICAgICAoYXJlZiBub2RlIDApKSkpKQor ICA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ub2RlLWFi cy1wb3MgbikgKGpzMi1ub2RlLWxlbiBuKSkpCisKKzs7IEl0J3MgaW1wb3J0YW50IHRvIG1ha2Ug c3VyZSBibG9jayBub2RlcyBoYXZlIGEgTGlzcCBsaXN0IGZvciB0aGUKKzs7IGNoaWxkIG5vZGVz LCB0byBsaW1pdCBwcmludGluZyByZWN1cnNpb24gZGVwdGggaW4gYW4gQVNUIHRoYXQKKzs7IG90 aGVyd2lzZSBjb25zaXN0cyBvZiBkZWZzdHJ1Y3QgdmVjdG9ycy4gIEVtYWNzIHdpbGwgY3Jhc2gg cHJpbnRpbmcKKzs7IGEgc3VmZmljaWVudGx5IGxhcmdlIHZlY3RvciB0cmVlLgorCisoY2wtZGVm c3RydWN0IChqczItYmxvY2stbm9kZQorICAgICAgICAgICAgICAgKDppbmNsdWRlIGpzMi1ub2Rl KQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBuaWwpCisgICAgICAgICAgICAgICAoOmNv bnN0cnVjdG9yIG1ha2UtanMyLWJsb2NrLW5vZGUgKCZrZXkgKHR5cGUganMyLUJMT0NLKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChwb3Mg KGpzMi1jdXJyZW50LXRva2VuLWJlZykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgbGVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvcHMKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBraWRzKSkpCisgICJBIGJsb2NrIG9mIHN0 YXRlbWVudHMuIgorICBraWRzKSAgOyBhIExpc3AgbGlzdCBvZiB0aGUgY2hpbGQgc3RhdGVtZW50 IG5vZGVzCisKKyhwdXQgJ2NsLXN0cnVjdC1qczItYmxvY2stbm9kZSAnanMyLXZpc2l0b3IgJ2pz Mi12aXNpdC1ibG9jaykKKyhwdXQgJ2NsLXN0cnVjdC1qczItYmxvY2stbm9kZSAnanMyLXByaW50 ZXIgJ2pzMi1wcmludC1ibG9jaykKKworKGRlZnVuIGpzMi12aXNpdC1ibG9jayAoYXN0IGNhbGxi YWNrKQorICAiVmlzaXQgdGhlIGBqczItYmxvY2stbm9kZScgY2hpbGRyZW4gb2YgQVNULiIKKyAg KGRvbGlzdCAoa2lkIChqczItYmxvY2stbm9kZS1raWRzIGFzdCkpCisgICAgKGpzMi12aXNpdC1h c3Qga2lkIGNhbGxiYWNrKSkpCisKKyhkZWZ1biBqczItcHJpbnQtYmxvY2sgKG4gaSkKKyAgKGxl dCAoKHBhZCAoanMyLW1ha2UtcGFkIGkpKSkKKyAgICAoaW5zZXJ0IHBhZCAie1xuIikKKyAgICAo ZG9saXN0IChraWQgKGpzMi1ibG9jay1ub2RlLWtpZHMgbikpCisgICAgICAoanMyLXByaW50LWFz dCBraWQgKDErIGkpKSkKKyAgICAoaW5zZXJ0IHBhZCAifSIpKSkKKworKGNsLWRlZnN0cnVjdCAo anMyLXNjb3BlCisgICAgICAgICAgICAgICAoOmluY2x1ZGUganMyLWJsb2NrLW5vZGUpCisgICAg ICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG5pbCkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0 b3IgbWFrZS1qczItc2NvcGUgKCZrZXkgKHR5cGUganMyLUJMT0NLKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocG9zIChqczItY3VycmVudC10b2tl bi1iZWcpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBsZW4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg a2lkcykpKQorICA7OyBUaGUgc3ltYm9sLXRhYmxlIGlzIGEgTGlua2VkSGFzaE1hcDxTdHJpbmcs U3ltYm9sPiBpbiBSa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gKG5vdCAoanMyLXNjb3BlLXAgcGFyZW50KSkKKyAgICAgIChz ZXRxIHBhcmVudCAoanMyLW5vZGUtcGFyZW50IHBhcmVudCkpKQorICAgIHBhcmVudCkpCisKKyhk ZWZ1biBqczItZ2V0LWRlZmluaW5nLXNjb3BlIChzY29wZSBuYW1lKQorICAiU2VhcmNoIHVwIHNj b3BlIGNoYWluIGZyb20gU0NPUEUgbG9va2luZyBmb3IgTkFNRSwgYSBzdHJpbmcgb3Igc3ltYm9s LgorUmV0dXJucyBganMyLXNjb3BlJyBpbiB3aGljaCBOQU1FIGlzIGRlZmluZWQsIG9yIG5pbCBp ZiBub3QgZm91bmQuIgorICAobGV0ICgoc3ltIChpZiAoc3ltYm9scCBuYW1lKQorICAgICAgICAg ICAgICAgICBuYW1lCisgICAgICAgICAgICAgICAoaW50ZXJuIG5hbWUpKSkKKyAgICAgICAgdGFi bGUKKyAgICAgICAgcmVzdWx0CisgICAgICAgIChjb250aW51ZSB0KSkKKyAgICAod2hpbGUgKGFu ZCBzY29wZSBjb250aW51ZSkKKyAgICAgIChpZiAob3IKKyAgICAgICAgICAgKGFuZCAoc2V0cSB0 YWJsZSAoanMyLXNjb3BlLXN5bWJvbC10YWJsZSBzY29wZSkpCisgICAgICAgICAgICAgICAgKGFz c3Egc3ltIHRhYmxlKSkKKyAgICAgICAgICAgKGFuZCAoZXEgc3ltICdhcmd1bWVudHMpCisgICAg ICAgICAgICAgICAgKGpzMi1mdW5jdGlvbi1ub2RlLXAgc2NvcGUpKSkKKyAgICAgICAgICAoc2V0 cSBjb250aW51ZSBuaWwKKyAgICAgICAgICAgICAgICByZXN1bHQgc2NvcGUpCisgICAgICAgIChz ZXRxIHNjb3BlIChqczItc2NvcGUtcGFyZW50LXNjb3BlIHNjb3BlKSkpKQorICAgIHJlc3VsdCkp CisKKyhkZWZ1biBqczItc2NvcGUtZ2V0LXN5bWJvbCAoc2NvcGUgbmFtZSkKKyAgIlJldHVybiBz eW1ib2wgdGFibGUgZW50cnkgZm9yIE5BTUUgaW4gU0NPUEUuCitOQU1FIGNhbiBiZSBhIHN0cmlu ZyBvciBzeW1ib2wuICAgUmV0dXJucyBhIGBqczItc3ltYm9sJyBvciBuaWwgaWYgbm90IGZvdW5k LiIKKyAgKGFuZCAoanMyLXNjb3BlLXN5bWJvbC10YWJsZSBzY29wZSkKKyAgICAgICAoY2RyIChh c3NxIChpZiAoc3ltYm9scCBuYW1lKQorICAgICAgICAgICAgICAgICAgICAgIG5hbWUKKyAgICAg ICAgICAgICAgICAgICAgKGludGVybiBuYW1lKSkKKyAgICAgICAgICAgICAgICAgIChqczItc2Nv cGUtc3ltYm9sLXRhYmxlIHNjb3BlKSkpKSkKKworKGRlZnVuIGpzMi1zY29wZS1wdXQtc3ltYm9s IChzY29wZSBuYW1lIHN5bWJvbCkKKyAgIkVudGVyIFNZTUJPTCBpbnRvIHN5bWJvbC10YWJsZSBm b3IgU0NPUEUgdW5kZXIgTkFNRS4KK05BTUUgY2FuIGJlIGEgTGlzcCBzeW1ib2wgb3Igc3RyaW5n LiAgU1lNQk9MIGlzIGEgYGpzMi1zeW1ib2wnLiIKKyAgKGxldCogKCh0YWJsZSAoanMyLXNjb3Bl LXN5bWJvbC10YWJsZSBzY29wZSkpCisgICAgICAgICAoc3ltIChpZiAoc3ltYm9scCBuYW1lKSBu YW1lIChpbnRlcm4gbmFtZSkpKQorICAgICAgICAgKGVudHJ5IChhc3NxIHN5bSB0YWJsZSkpKQor ICAgIChpZiBlbnRyeQorICAgICAgICAoc2V0Y2RyIGVudHJ5IHN5bWJvbCkKKyAgICAgIChwdXNo IChjb25zIHN5bSBzeW1ib2wpCisgICAgICAgICAgICAoanMyLXNjb3BlLXN5bWJvbC10YWJsZSBz Y29wZSkpKSkpCisKKyhjbC1kZWZzdHJ1Y3QgKGpzMi1zeW1ib2wKKyAgICAgICAgICAgICAgICg6 Y29uc3RydWN0b3IgbmlsKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBtYWtlLWpzMi1z eW1ib2wgKGRlY2wtdHlwZSBuYW1lICZvcHRpb25hbCBhc3Qtbm9kZSkpKQorICAiQSBzeW1ib2wg dGFibGUgZW50cnkuIgorICA7OyBPbmUgb2YganMyLUZVTkNUSU9OLCBqczItTFAgKGZvciBwYXJh bWV0ZXJzKSwganMyLVZBUiwKKyAgOzsganMyLUxFVCwgb3IganMyLUNPTlNUCisgIGRlY2wtdHlw ZQorICBuYW1lICA7IHN0cmluZworICBhc3Qtbm9kZSkgOyBhIGBqczItbm9kZScKKworKGNsLWRl ZnN0cnVjdCAoanMyLWVycm9yLW5vZGUKKyAgICAgICAgICAgICAgICg6aW5jbHVkZSBqczItbm9k ZSkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbmlsKSA7IHNpbGVuY2UgZW1hY3MyMSBi eXRlLWNvbXBpbGVyCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG1ha2UtanMyLWVycm9y LW5vZGUgKCZrZXkgKHR5cGUganMyLUVSUk9SKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIChwb3MgKGpzMi1jdXJyZW50LXRva2VuLWJlZykp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg bGVuKSkpCisgICJBU1Qgbm9kZSByZXByZXNlbnRpbmcgYSBwYXJzZSBlcnJvci4iKQorCisocHV0 ICdjbC1zdHJ1Y3QtanMyLWVycm9yLW5vZGUgJ2pzMi12aXNpdG9yICdqczItdmlzaXQtbm9uZSkK KyhwdXQgJ2NsLXN0cnVjdC1qczItZXJyb3Itbm9kZSAnanMyLXByaW50ZXIgJ2pzMi1wcmludC1u b25lKQorCisoY2wtZGVmc3RydWN0IChqczItc2NyaXB0LW5vZGUKKyAgICAgICAgICAgICAgICg6 aW5jbHVkZSBqczItc2NvcGUpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG5pbCkKKyAg ICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbWFrZS1qczItc2NyaXB0LW5vZGUgKCZrZXkgKHR5 cGUganMyLVNDUklQVCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKHBvcyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKSkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDs7IEZJWE1F OiBXaGF0IGFyZSB0aG9zZT8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgdmFyLWRlY2xzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bi1kZWNscykpKQorICBmdW5jdGlvbnMgICA7 IExpc3AgbGlzdCBvZiBuZXN0ZWQgZnVuY3Rpb25zCisgIHJlZ2V4cHMgICAgIDsgTGlzcCBsaXN0 IG9mIChzdHJpbmcgLiBmbGFncykKKyAgc3ltYm9scyAgICAgOyBhbGlzdCAoZXZlcnkgc3ltYm9s IGdldHMgdW5pcXVlIGluZGV4KQorICAocGFyYW0tY291bnQgMCkKKyAgdmFyLW5hbWVzICAgOyB2 ZWN0b3Igb2Ygc3RyaW5nIG5hbWVzCisgIGNvbnN0cyAgICAgIDsgYm9vbC12ZWN0b3IgbWF0Y2hp bmcgdmFyLWRlY2xzCisgICh0ZW1wLW51bWJlciAwKSkgIDsgZm9yIGdlbmVyYXRpbmcgdGVtcCB2 YXJpYWJsZXMKKworKHB1dCAnY2wtc3RydWN0LWpzMi1zY3JpcHQtbm9kZSAnanMyLXZpc2l0b3Ig J2pzMi12aXNpdC1ibG9jaykKKyhwdXQgJ2NsLXN0cnVjdC1qczItc2NyaXB0LW5vZGUgJ2pzMi1w cmludGVyICdqczItcHJpbnQtc2NyaXB0KQorCisoZGVmdW4ganMyLXByaW50LXNjcmlwdCAobm9k ZSBpbmRlbnQpCisgIChkb2xpc3QgKGtpZCAoanMyLWJsb2NrLW5vZGUta2lkcyBub2RlKSkKKyAg ICAoanMyLXByaW50LWFzdCBraWQgaW5kZW50KSkpCisKKyhjbC1kZWZzdHJ1Y3QgKGpzMi1hc3Qt cm9vdAorICAgICAgICAgICAgICAgKDppbmNsdWRlIGpzMi1zY3JpcHQtbm9kZSkKKyAgICAgICAg ICAgICAgICg6Y29uc3RydWN0b3IgbmlsKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBt YWtlLWpzMi1hc3Qtcm9vdCAoJmtleSAodHlwZSBqczItU0NSSVBUKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocG9zIChqczItY3VycmVudC10 b2tlbi1iZWcpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBsZW4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgYnVmZmVyKSkpCisgICJUaGUgcm9vdCBub2RlIG9mIGEganMyIEFTVC4iCisgIGJ1 ZmZlciAgICAgICAgIDsgdGhlIHNvdXJjZSBidWZmZXIgZnJvbSB3aGljaCB0aGUgY29kZSB3YXMg cGFyc2VkCisgIGNvbW1lbnRzICAgICAgIDsgYSBMaXNwIGxpc3Qgb2YgY29tbWVudHMsIG9yZGVy ZWQgYnkgc3RhcnQgcG9zaXRpb24KKyAgZXJyb3JzICAgICAgICAgOyBhIExpc3AgbGlzdCBvZiBl cnJvcnMgZm91bmQgZHVyaW5nIHBhcnNpbmcKKyAgd2FybmluZ3MgICAgICAgOyBhIExpc3AgbGlz dCBvZiB3YXJuaW5ncyBmb3VuZCBkdXJpbmcgcGFyc2luZworICBub2RlLWNvdW50KSAgICA7IG51 bWJlciBvZiBub2RlcyBpbiB0aGUgdHJlZSwgaW5jbHVkaW5nIHRoZSByb290CisKKyhwdXQgJ2Ns LXN0cnVjdC1qczItYXN0LXJvb3QgJ2pzMi12aXNpdG9yICdqczItdmlzaXQtYXN0LXJvb3QpCiso cHV0ICdjbC1zdHJ1Y3QtanMyLWFzdC1yb290ICdqczItcHJpbnRlciAnanMyLXByaW50LXNjcmlw dCkKKworKGRlZnVuIGpzMi12aXNpdC1hc3Qtcm9vdCAoYXN0IGNhbGxiYWNrKQorICAoZG9saXN0 IChraWQgKGpzMi1hc3Qtcm9vdC1raWRzIGFzdCkpCisgICAgKGpzMi12aXNpdC1hc3Qga2lkIGNh bGxiYWNrKSkKKyAgKGRvbGlzdCAoY29tbWVudCAoanMyLWFzdC1yb290LWNvbW1lbnRzIGFzdCkp CisgICAgKGpzMi12aXNpdC1hc3QgY29tbWVudCBjYWxsYmFjaykpKQorCisoY2wtZGVmc3RydWN0 IChqczItY29tbWVudC1ub2RlCisgICAgICAgICAgICAgICAoOmluY2x1ZGUganMyLW5vZGUpCisg ICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG5pbCkKKyAgICAgICAgICAgICAgICg6Y29uc3Ry dWN0b3IgbWFrZS1qczItY29tbWVudC1ub2RlICgma2V5ICh0eXBlIGpzMi1DT01NRU5UKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHBv cyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbgorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybWF0KSkpCisgIGZvcm1hdCkgIDsg J2xpbmUsICdibG9jaywgJ2pzZG9jIG9yICdodG1sCisKKyhwdXQgJ2NsLXN0cnVjdC1qczItY29t bWVudC1ub2RlICdqczItdmlzaXRvciAnanMyLXZpc2l0LW5vbmUpCisocHV0ICdjbC1zdHJ1Y3Qt anMyLWNvbW1lbnQtbm9kZSAnanMyLXByaW50ZXIgJ2pzMi1wcmludC1jb21tZW50KQorCisoZGVm dW4ganMyLXByaW50LWNvbW1lbnQgKG4gaSkKKyAgOzsgV2UgcmVhbGx5IG91Z2h0IHRvIGxpbmsg ZW5kLW9mLWxpbmUgY29tbWVudHMgdG8gdGhlaXIgbm9kZXMuCisgIDs7IE9yIG1heWJlIHdlIGNv dWxkIGFkZCBhIG5ldyBjb21tZW50IHR5cGUsICdlbmRsaW5lLgorICAoaW5zZXJ0IChqczItbWFr ZS1wYWQgaSkKKyAgICAgICAgICAoanMyLW5vZGUtc3RyaW5nIG4pKSkKKworKGNsLWRlZnN0cnVj dCAoanMyLWV4cHItc3RtdC1ub2RlCisgICAgICAgICAgICAgICAoOmluY2x1ZGUganMyLW5vZGUp CisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG5pbCkKKyAgICAgICAgICAgICAgICg6Y29u c3RydWN0b3IgbWFrZS1qczItZXhwci1zdG10LW5vZGUgKCZrZXkgKHR5cGUganMyLUVYUFJfVk9J RCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKHBvcyBqczItdHMtY3Vyc29yKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW4KKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhwcikpKQorICAiQW4gZXhwcmVz c2lvbiBzdGF0ZW1lbnQuIgorICBleHByKQorCisoZGVmc3Vic3QganMyLWV4cHItc3RtdC1ub2Rl LXNldC1oYXMtcmVzdWx0IChub2RlKQorICAiQ2hhbmdlIE5PREUgdHlwZSB0byBganMyLUVYUFJf UkVTVUxUJy4gIFVzZWQgZm9yIGNvZGUgZ2VuZXJhdGlvbi4iCisgIChzZXRmIChqczItbm9kZS10 eXBlIG5vZGUpIGpzMi1FWFBSX1JFU1VMVCkpCisKKyhwdXQgJ2NsLXN0cnVjdC1qczItZXhwci1z dG10LW5vZGUgJ2pzMi12aXNpdG9yICdqczItdmlzaXQtZXhwci1zdG10LW5vZGUpCisocHV0ICdj bC1zdHJ1Y3QtanMyLWV4cHItc3RtdC1ub2RlICdqczItcHJpbnRlciAnanMyLXByaW50LWV4cHIt c3RtdC1ub2RlKQorCisoZGVmdW4ganMyLXZpc2l0LWV4cHItc3RtdC1ub2RlIChuIHYpCisgIChq czItdmlzaXQtYXN0IChqczItZXhwci1zdG10LW5vZGUtZXhwciBuKSB2KSkKKworKGRlZnVuIGpz Mi1wcmludC1leHByLXN0bXQtbm9kZSAobiBpbmRlbnQpCisgIChqczItcHJpbnQtYXN0IChqczIt ZXhwci1zdG10LW5vZGUtZXhwciBuKSBpbmRlbnQpCisgIChpbnNlcnQgIjtcbiIpKQorCisoY2wt ZGVmc3RydWN0IChqczItbG9vcC1ub2RlCisgICAgICAgICAgICAgICAoOmluY2x1ZGUganMyLXNj b3BlKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBuaWwpKQorICAiQWJzdHJhY3Qgc3Vw ZXJ0eXBlIG9mIGxvb3Agbm9kZXMuIgorICBib2R5ICAgICAgOyBhIGBqczItYmxvY2stbm9kZScK KyAgbHAgICAgICAgIDsgcG9zaXRpb24gb2YgbGVmdC1wYXJlbiwgbmlsIGlmIG9taXR0ZWQKKyAg cnApICAgICAgIDsgcG9zaXRpb24gb2YgcmlnaHQtcGFyZW4sIG5pbCBpZiBvbWl0dGVkCisKKyhj bC1kZWZzdHJ1Y3QgKGpzMi1kby1ub2RlCisgICAgICAgICAgICAgICAoOmluY2x1ZGUganMyLWxv b3Atbm9kZSkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbmlsKQorICAgICAgICAgICAg ICAgKDpjb25zdHJ1Y3RvciBtYWtlLWpzMi1kby1ub2RlICgma2V5ICh0eXBlIGpzMi1ETykKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocG9zIChq czItY3VycmVudC10b2tlbi1iZWcpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGxlbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGJvZHkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBjb25kaXRpb24KKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZS1wb3MKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBscAorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJwKSkpCisgICJBU1Qgbm9kZSBmb3IgZG8t bG9vcC4iCisgIGNvbmRpdGlvbiAgOyB3aGlsZSAoZXhwcmVzc2lvbikKKyAgd2hpbGUtcG9zKSA7 IGJ1ZmZlciBwb3NpdGlvbiBvZiAnd2hpbGUnIGtleXdvcmQKKworKHB1dCAnY2wtc3RydWN0LWpz Mi1kby1ub2RlICdqczItdmlzaXRvciAnanMyLXZpc2l0LWRvLW5vZGUpCisocHV0ICdjbC1zdHJ1 Y3QtanMyLWRvLW5vZGUgJ2pzMi1wcmludGVyICdqczItcHJpbnQtZG8tbm9kZSkKKworKGRlZnVu IGpzMi12aXNpdC1kby1ub2RlIChuIHYpCisgIChqczItdmlzaXQtYXN0IChqczItZG8tbm9kZS1i b2R5IG4pIHYpCisgIChqczItdmlzaXQtYXN0IChqczItZG8tbm9kZS1jb25kaXRpb24gbikgdikp CisKKyhkZWZ1biBqczItcHJpbnQtZG8tbm9kZSAobiBpKQorICAobGV0ICgocGFkIChqczItbWFr ZS1wYWQgaSkpKQorICAgIChpbnNlcnQgcGFkICJkbyB7XG4iKQorICAgIChkb2xpc3QgKGtpZCAo anMyLWJsb2NrLW5vZGUta2lkcyAoanMyLWRvLW5vZGUtYm9keSBuKSkpCisgICAgICAoanMyLXBy aW50LWFzdCBraWQgKDErIGkpKSkKKyAgICAoaW5zZXJ0IHBhZCAifSB3aGlsZSAoIikKKyAgICAo anMyLXByaW50LWFzdCAoanMyLWRvLW5vZGUtY29uZGl0aW9uIG4pIDApCisgICAgKGluc2VydCAi KTtcbiIpKSkKKworKGNsLWRlZnN0cnVjdCAoanMyLWV4cG9ydC1ub2RlCisgICAgICAgICAgICAg ICAoOmluY2x1ZGUganMyLW5vZGUpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG5pbCkK KyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbWFrZS1qczItZXhwb3J0LW5vZGUgKCZrZXkg KHR5cGUganMyLUVYUE9SVCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKHBvcykgKGpzMi1jdXJyZW50LXRva2VuLWJlZykKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4cG9y dHMtbGlzdAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBmcm9tLWNsYXVzZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBkZWNsYXJhdGlvbgorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0KSkpCisgICJBU1Qgbm9kZSBm b3IgYW4gZXhwb3J0IHN0YXRlbWVudC4gVGhlcmUgYXJlIG1hbnkgdGhpbmdzIHRoYXQgY2FuI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KyAgICAgIChqczItdmlzaXQtYXN0IGZyb20gdikp CisgICAgKHdoZW4gZGVjbGFyYXRpb24KKyAgICAgIChqczItdmlzaXQtYXN0IGRlY2xhcmF0aW9u IHYpKQorICAgICh3aGVuIGRlZmF1bHQKKyAgICAgIChqczItdmlzaXQtYXN0IGRlZmF1bHQgdikp KSkKKworKGRlZnVuIGpzMi1wcmludC1leHBvcnQtbm9kZSAobiBpKQorICAobGV0ICgocGFkIChq czItbWFrZS1wYWQgaSkpCisgICAgICAgIChleHBvcnRzLWxpc3QgKGpzMi1leHBvcnQtbm9kZS1l eHBvcnRzLWxpc3QgbikpCisgICAgICAgIChmcm9tIChqczItZXhwb3J0LW5vZGUtZnJvbS1jbGF1 c2UgbikpCisgICAgICAgIChkZWNsYXJhdGlvbiAoanMyLWV4cG9ydC1ub2RlLWRlY2xhcmF0aW9u IG4pKQorICAgICAgICAoZGVmYXVsdCAoanMyLWV4cG9ydC1ub2RlLWRlZmF1bHQgbikpKQorICAg IChpbnNlcnQgcGFkICJleHBvcnQgIikKKyAgICAoY29uZAorICAgICAoZGVmYXVsdAorICAgICAg IChpbnNlcnQgImRlZmF1bHQgIikKKyAgICAgICAoanMyLXByaW50LWFzdCBkZWZhdWx0IGkpKQor ICAgICAoZGVjbGFyYXRpb24KKyAgICAgICAoanMyLXByaW50LWFzdCBkZWNsYXJhdGlvbiBpKSkK KyAgICAgKChhbmQgZXhwb3J0cy1saXN0IGZyb20pCisgICAgICAoanMyLXByaW50LW5hbWVkLWlt cG9ydHMgZXhwb3J0cy1saXN0KQorICAgICAgKGluc2VydCAiICIpCisgICAgICAoanMyLXByaW50 LWZyb20tY2xhdXNlIGZyb20pKQorICAgICAoZnJvbQorICAgICAgKGluc2VydCAiKiAiKQorICAg ICAgKGpzMi1wcmludC1mcm9tLWNsYXVzZSBmcm9tKSkKKyAgICAgKGV4cG9ydHMtbGlzdAorICAg ICAgKGpzMi1wcmludC1uYW1lZC1pbXBvcnRzIGV4cG9ydHMtbGlzdCkpKQorICAgIChpbnNlcnQg IjtcbiIpKSkKKworKGNsLWRlZnN0cnVjdCAoanMyLXdoaWxlLW5vZGUKKyAgICAgICAgICAgICAg ICg6aW5jbHVkZSBqczItbG9vcC1ub2RlKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBu aWwpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG1ha2UtanMyLXdoaWxlLW5vZGUgKCZr ZXkgKHR5cGUganMyLVdISUxFKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIChwb3MgKGpzMi1jdXJyZW50LXRva2VuLWJlZykpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuIGJvZHkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBj b25kaXRpb24gbHAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBycCkpKQorICAiQVNUIG5vZGUgZm9yIHdoaWxlLWxvb3AuIgorICBjb25kaXRp b24pICAgIDsgd2hpbGUtY29uZGl0aW9uCisKKyhwdXQgJ2NsLXN0cnVjdC1qczItd2hpbGUtbm9k ZSAnanMyLXZpc2l0b3IgJ2pzMi12aXNpdC13aGlsZS1ub2RlKQorKHB1dCAnY2wtc3RydWN0LWpz Mi13aGlsZS1ub2RlICdqczItcHJpbnRlciAnanMyLXByaW50LXdoaWxlLW5vZGUpCisKKyhkZWZ1 biBqczItdmlzaXQtd2hpbGUtbm9kZSAobiB2KQorICAoanMyLXZpc2l0LWFzdCAoanMyLXdoaWxl LW5vZGUtY29uZGl0aW9uIG4pIHYpCisgIChqczItdmlzaXQtYXN0IChqczItd2hpbGUtbm9kZS1i b2R5IG4pIHYpKQorCisoZGVmdW4ganMyLXByaW50LXdoaWxlLW5vZGUgKG4gaSkKKyAgKGxldCAo KHBhZCAoanMyLW1ha2UtcGFkIGkpKSkKKyAgICAoaW5zZXJ0IHBhZCAid2hpbGUgKCIpCisgICAg KGpzMi1wcmludC1hc3QgKGpzMi13aGlsZS1ub2RlLWNvbmRpdGlvbiBuKSAwKQorICAgIChpbnNl cnQgIikge1xuIikKKyAgICAoanMyLXByaW50LWJvZHkgKGpzMi13aGlsZS1ub2RlLWJvZHkgbikg KDErIGkpKQorICAgIChpbnNlcnQgcGFkICJ9XG4iKSkpCisKKyhjbC1kZWZzdHJ1Y3QgKGpzMi1m b3Itbm9kZQorICAgICAgICAgICAgICAgKDppbmNsdWRlIGpzMi1sb29wLW5vZGUpCisgICAgICAg ICAgICAgICAoOmNvbnN0cnVjdG9yIG5pbCkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3Ig bWFrZS1qczItZm9yLW5vZGUgKCZrZXkgKHR5cGUganMyLUZPUikKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHBvcyBqczItdHMtY3Vyc29yKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW4g Ym9keSBpbml0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGNvbmRpdGlvbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICB1cGRhdGUgbHAgcnApKSkKKyAgIkFTVCBub2RlIGZvciBhIEMtc3R5bGUg Zm9yLWxvb3AuIgorICBpbml0ICAgICAgIDsgaW5pdGlhbGl6YXRpb24gZXhwcmVzc2lvbgorICBj b25kaXRpb24gIDsgbG9vcCBjb25kaXRpb24KKyAgdXBkYXRlKSAgICA7IHVwZGF0ZSBjbGF1c2UK KworKHB1dCAnY2wtc3RydWN0LWpzMi1mb3Itbm9kZSAnanMyLXZpc2l0b3IgJ2pzMi12aXNpdC1m b3Itbm9kZSkKKyhwdXQgJ2NsLXN0cnVjdC1qczItZm9yLW5vZGUgJ2pzMi1wcmludGVyICdqczIt cHJpbnQtZm9yLW5vZGUpCisKKyhkZWZ1biBqczItdmlzaXQtZm9yLW5vZGUgKG4gdikKKyAgKGpz Mi12aXNpdC1hc3QgKGpzMi1mb3Itbm9kZS1pbml0IG4pIHYpCisgIChqczItdmlzaXQtYXN0IChq czItZm9yLW5vZGUtY29uZGl0aW9uIG4pIHYpCisgIChqczItdmlzaXQtYXN0IChqczItZm9yLW5v ZGUtdXBkYXRlIG4pIHYpCisgIChqczItdmlzaXQtYXN0IChqczItZm9yLW5vZGUtYm9keSBuKSB2 KSkKKworKGRlZnVuIGpzMi1wcmludC1mb3Itbm9kZSAobiBpKQorICAobGV0ICgocGFkIChqczIt bWFrZS1wYWQgaSkpKQorICAgIChpbnNlcnQgcGFkICJmb3IgKCIpCisgICAgKGpzMi1wcmludC1h c3QgKGpzMi1mb3Itbm9kZS1pbml0IG4pIDApCisgICAgKGluc2VydCAiOyAiKQorICAgIChqczIt cHJpbnQtYXN0IChqczItZm9yLW5vZGUtY29uZGl0aW9uIG4pIDApCisgICAgKGluc2VydCAiOyAi KQorICAgIChqczItcHJpbnQtYXN0IChqczItZm9yLW5vZGUtdXBkYXRlIG4pIDApCisgICAgKGlu c2VydCAiKSB7XG4iKQorICAgIChqczItcHJpbnQtYm9keSAoanMyLWZvci1ub2RlLWJvZHkgbikg KDErIGkpKQorICAgIChpbnNlcnQgcGFkICJ9XG4iKSkpCisKKyhjbC1kZWZzdHJ1Y3QgKGpzMi1m b3ItaW4tbm9kZQorICAgICAgICAgICAgICAgKDppbmNsdWRlIGpzMi1sb29wLW5vZGUpCisgICAg ICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG5pbCkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0 b3IgbWFrZS1qczItZm9yLWluLW5vZGUgKCZrZXkgKHR5cGUganMyLUZPUikKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHBvcyBqczItdHMt Y3Vyc29yKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBsZW4gYm9keQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBpdGVyYXRvcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBvYmplY3QKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW4tcG9zCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVhY2gtcG9zCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVhY2gt cCBmb3JvZi1wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGxwIHJwKSkpCisgICJBU1Qgbm9kZSBmb3IgYSBmb3IuLmluIGxvb3AuIgorICBp dGVyYXRvciAgOyBbdmFyXSBmb28gaW4gLi4uCisgIG9iamVjdCAgICA7IG9iamVjdCBvdmVyIHdo aWNoIHdlJ3JlIGl0ZXJhdGluZworICBpbi1wb3MgICAgOyBidWZmZXIgcG9zaXRpb24gb2YgJ2lu JyBrZXl3b3JkCisgIGVhY2gtcG9zICA7IGJ1ZmZlciBwb3NpdGlvbiBvZiAnZWFjaCcga2V5d29y ZCwgaWYgZm9yZWFjaC1wCisgIGZvcmVhY2gtcCA7IHQgaWYgaXQncyBhIGZvci1lYWNoIGxvb3AK KyAgZm9yb2YtcCkgIDsgdCBpZiBpdCdzIGEgZm9yLW9mIGxvb3AKKworKHB1dCAnY2wtc3RydWN0 LWpzMi1mb3ItaW4tbm9kZSAnanMyLXZpc2l0b3IgJ2pzMi12aXNpdC1mb3ItaW4tbm9kZSkKKyhw dXQgJ2NsLXN0cnVjdC1qczItZm9yLWluLW5vZGUgJ2pzMi1wcmludGVyICdqczItcHJpbnQtZm9y LWluLW5vZGUpCisKKyhkZWZ1biBqczItdmlzaXQtZm9yLWluLW5vZGUgKG4gdikKKyAgKGpzMi12 aXNpdC1hc3QgKGpzMi1mb3ItaW4tbm9kZS1pdGVyYXRvciBuKSB2KQorICAoanMyLXZpc2l0LWFz dCAoanMyLWZvci1pbi1ub2RlLW9iamVjdCBuKSB2KQorICAoanMyLXZpc2l0LWFzdCAoanMyLWZv ci1pbi1ub2RlLWJvZHkgbikgdikpCisKKyhkZWZ1biBqczItcHJpbnQtZm9yLWluLW5vZGUgKG4g aSkKKyAgKGxldCAoKHBhZCAoanMyLW1ha2UtcGFkIGkpKQorICAgICAgICAoZm9yZWFjaCAoanMy LWZvci1pbi1ub2RlLWZvcmVhY2gtcCBuKSkKKyAgICAgICAgKGZvcm9mIChqczItZm9yLWluLW5v ZGUtZm9yb2YtcCBuKSkpCisgICAgKGluc2VydCBwYWQgImZvciAiKQorICAgIChpZiBmb3JlYWNo CisgICAgICAgIChpbnNlcnQgImVhY2ggIikpCisgICAgKGluc2VydCAiKCIpCisgICAgKGpzMi1w cmludC1hc3QgKGpzMi1mb3ItaW4tbm9kZS1pdGVyYXRvciBuKSAwKQorICAgIChpbnNlcnQgKGlm IGZvcm9mICIgb2YgIiAiIGluICIpKQorICAgIChqczItcHJpbnQtYXN0IChqczItZm9yLWluLW5v ZGUtb2JqZWN0IG4pIDApCisgICAgKGluc2VydCAiKSB7XG4iKQorICAgIChqczItcHJpbnQtYm9k eSAoanMyLWZvci1pbi1ub2RlLWJvZHkgbikgKDErIGkpKQorICAgIChpbnNlcnQgcGFkICJ9XG4i KSkpCisKKyhjbC1kZWZzdHJ1Y3QgKGpzMi1yZXR1cm4tbm9kZQorICAgICAgICAgICAgICAgKDpp bmNsdWRlIGpzMi1ub2RlKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBuaWwpCisgICAg ICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG1ha2UtanMyLXJldHVybi1ub2RlICgma2V5ICh0eXBl IGpzMi1SRVRVUk4pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIChwb3MganMyLXRzLWN1cnNvcikKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHZhbCkpKQorICAiQVNUIG5v ZGUgZm9yIGEgcmV0dXJuIHN0YXRlbWVudC4iCisgIHJldHZhbCkgIDsgZXhwcmVzc2lvbiB0byBy ZXR1cm4sIG9yICd1bmRlZmluZWQKKworKHB1dCAnY2wtc3RydWN0LWpzMi1yZXR1cm4tbm9kZSAn anMyLXZpc2l0b3IgJ2pzMi12aXNpdC1yZXR1cm4tbm9kZSkKKyhwdXQgJ2NsLXN0cnVjdC1qczIt cmV0dXJuLW5vZGUgJ2pzMi1wcmludGVyICdqczItcHJpbnQtcmV0dXJuLW5vZGUpCisKKyhkZWZ1 biBqczItdmlzaXQtcmV0dXJuLW5vZGUgKG4gdikKKyAgKGpzMi12aXNpdC1hc3QgKGpzMi1yZXR1 cm4tbm9kZS1yZXR2YWwgbikgdikpCisKKyhkZWZ1biBqczItcHJpbnQtcmV0dXJuLW5vZGUgKG4g aSkKKyAgKGluc2VydCAoanMyLW1ha2UtcGFkIGkpICJyZXR1cm4iKQorICAod2hlbiAoanMyLXJl dHVybi1ub2RlLXJldHZhbCBuKQorICAgIChpbnNlcnQgIiAiKQorICAgIChqczItcHJpbnQtYXN0 IChqczItcmV0dXJuLW5vZGUtcmV0dmFsIG4pIDApKQorICAoaW5zZXJ0ICI7XG4iKSkKKworKGNs LWRlZnN0cnVjdCAoanMyLWlmLW5vZGUKKyAgICAgICAgICAgICAgICg6aW5jbHVkZSBqczItbm9k ZSkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbmlsKQorICAgICAgICAgICAgICAgKDpj b25zdHJ1Y3RvciBtYWtlLWpzMi1pZi1ub2RlICgma2V5ICh0eXBlIGpzMi1JRikKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocG9zIGpzMi10cy1j dXJzb3IpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgbGVuIGNvbmRpdGlvbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHRoZW4tcGFydAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGVsc2UtcG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgZWxzZS1wYXJ0IGxwCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcnApKSkKKyAgIkFTVCBub2RlIGZvciBh biBpZi1zdGF0ZW1lbnQuIgorICBjb25kaXRpb24gICA7IGV4cHJlc3Npb24KKyAgdGhlbi1wYXJ0 ICAgOyBzdGF0ZW1lbnQgb3IgYmxvY2sKKyAgZWxzZS1wb3MgICAgOyBvcHRpb25hbCBidWZmZXIg cG9zaXRpb24gb2YgJ2Vsc2UnIGtleXdvcmQKKyAgZWxzZS1wYXJ0ICAgOyBvcHRpb25hbCBzdGF0 ZW1lbnQgb3IgYmxvY2sKKyAgbHAgICAgICAgICAgOyBwb3NpdGlvbiBvZiBsZWZ0LXBhcmVuLCBu aWwgaWYgb21pdHRlZAorICBycCkgICAgICAgICA7IHBvc2l0aW9uIG9mIHJpZ2h0LXBhcmVuLCBu aWwgaWYgb21pdHRlZAorCisocHV0ICdjbC1zdHJ1Y3QtanMyLWlmLW5vZGUgJ2pzMi12aXNpdG9y ICdqczItdmlzaXQtaWYtbm9kZSkKKyhwdXQgJ2NsLXN0cnVjdC1qczItaWYtbm9kZSAnanMyLXBy aW50ZXIgJ2pzMi1wcmludC1pZi1ub2RlKQorCisoZGVmdW4ganMyLXZpc2l0LWlmLW5vZGUgKG4g dikKKyAgKGpzMi12aXNpdC1hc3QgKGpzMi1pZi1ub2RlLWNvbmRpdGlvbiBuKSB2KQorICAoanMy LXZpc2l0LWFzdCAoanMyLWlmLW5vZGUtdGhlbi1wYXJ0IG4pIHYpCisgIChqczItdmlzaXQtYXN0 IChqczItaWYtbm9kZS1lbHNlLXBhcnQgbikgdikpCisKKyhkZWZ1biBqczItcHJpbnQtaWYtbm9k ZSAobiBpKQorICAobGV0ICgocGFkIChqczItbWFrZS1wYWQgaSkpCisgICAgICAgICh0aGVuLXBh cnQgKGpzMi1pZi1ub2RlLXRoZW4tcGFydCBuKSkKKyAgICAgICAgKGVsc2UtcGFydCAoanMyLWlm LW5vZGUtZWxzZS1wYXJ0IG4pKSkKKyAgICAoaW5zZXJ0IHBhZCAiaWYgKCIpCisgICAgKGpzMi1w cmludC1hc3QgKGpzMi1pZi1ub2RlLWNvbmRpdGlvbiBuKSAwKQorICAgIChpbnNlcnQgIikge1xu IikKKyAgICAoanMyLXByaW50LWJvZHkgdGhlbi1wYXJ0ICgxKyBpKSkKKyAgICAoaW5zZXJ0IHBh ZCAifSIpCisgICAgKGNvbmQKKyAgICAgKChub3QgZWxzZS1wYXJ0KQorICAgICAgKGluc2VydCAi XG4iKSkKKyAgICAgKChqczItaWYtbm9kZS1wIGVsc2UtcGFydCkKKyAgICAgIChpbnNlcnQgIiBl bHNlICIpCisgICAgICAoanMyLXByaW50LWJvZHkgZWxzZS1wYXJ0IGkpKQorICAgICAodAorICAg ICAgKGluc2VydCAiIGVsc2Uge1xuIikKKyAgICAgIChqczItcHJpbnQtYm9keSBlbHNlLXBhcnQg KDErIGkpKQorICAgICAgKGluc2VydCBwYWQgIn1cbiIpKSkpKQorCisoY2wtZGVmc3RydWN0IChq czItZXhwb3J0LWJpbmRpbmctbm9kZQorICAgICAgICAgICAgICAgKDppbmNsdWRlIGpzMi1ub2Rl KQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBuaWwpCisgICAgICAgICAgICAgICAoOmNv bnN0cnVjdG9yIG1ha2UtanMyLWV4cG9ydC1iaW5kaW5nLW5vZGUgKCZrZXkgKHR5cGUgLTEpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgcG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgbGVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jYWwtbmFtZQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dGVybi1u YW1lKSkpCisgICJBU1Qgbm9kZSBmb3IgYW4gZXh0ZXJuYWwgc3ltYm9sIGJpbmRpbmcuCitJdCBj b250YWlucyBhIGxvY2FsLW5hbWUgbm9kZSB3aGljaCBpcyB0aGUgbmFtZSBvZiB0aGUgdmFsdWUg aW4gdGhlCitjdXJyZW50IHNjb3BlLCBhbmQgZXh0ZXJuLW5hbWUgd2hpY2ggaXMgdGhlIG5hbWUg b2YgdGhlIHZhbHVlIGluIHRoZQoraW1wb3J0ZWQgb3IgZXhwb3J0ZWQgc2NvcGUuIEJ5IGRlZmF1 bHQgdGhlc2UgYXJlIHRoZSBzYW1lLCBidXQgaWYgdGhlCituYW1lIGlzIGFsaWFzZWQgYXMgaW4g e2ZvbyBhcyBiYXJ9LCBpdCB3b3VsZCBoYXZlIGFuIGV4dGVybi1uYW1lIG5vZGUKK2NvbnRhaW5p bmcgJ2ZvbycgYW5kIGEgbG9jYWwtbmFtZSBub2RlIGNvbnRhaW5pbmcgJ2JhcicuIgorICBsb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EUuZy4gJ2Zvbycgb3IKKydmb28gYXMgYmFyJy4iCisgIChsZXQg KChsb2NhbC1uYW1lIChqczItZXhwb3J0LWJpbmRpbmctbm9kZS1sb2NhbC1uYW1lIG4pKQorICAg ICAgICAoZXh0ZXJuLW5hbWUgKGpzMi1leHBvcnQtYmluZGluZy1ub2RlLWV4dGVybi1uYW1lIG4p KSkKKyAgICAoaW5zZXJ0IChqczItbmFtZS1ub2RlLW5hbWUgZXh0ZXJuLW5hbWUpKQorICAgICh3 aGVuIChub3QgKGVxdWFsIGxvY2FsLW5hbWUgZXh0ZXJuLW5hbWUpKQorICAgICAgKGluc2VydCAi IGFzICIpCisgICAgICAoaW5zZXJ0IChqczItbmFtZS1ub2RlLW5hbWUgbG9jYWwtbmFtZSkpKSkp CisKKworKGNsLWRlZnN0cnVjdCAoanMyLWltcG9ydC1ub2RlCisgICAgICAgICAgICAgICAoOmlu Y2x1ZGUganMyLW5vZGUpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG5pbCkKKyAgICAg ICAgICAgICAgICg6Y29uc3RydWN0b3IgbWFrZS1qczItaW1wb3J0LW5vZGUgKCZrZXkgKHR5cGUg anMyLUlNUE9SVCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKHBvcyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGltcG9ydAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9t CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IG1vZHVsZS1pZCkpKQorICAiQVNUIG5vZGUgZm9yIGFuIGltcG9ydCBzdGF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gIChpbXBvcnQtY2xhdXNlIChqczItaW1wb3J0LW5vZGUtaW1wb3J0IG4pKQor ICAgICAgICAoZnJvbS1jbGF1c2UgKGpzMi1pbXBvcnQtbm9kZS1mcm9tIG4pKQorICAgICAgICAo bW9kdWxlLWlkIChqczItaW1wb3J0LW5vZGUtbW9kdWxlLWlkIG4pKSkKKyAgICAoaW5zZXJ0IHBh ZCAiaW1wb3J0ICIpCisgICAgKGlmIGltcG9ydC1jbGF1c2UKKyAgICAgICAgKHByb2duCisgICAg ICAgICAgKGpzMi1wcmludC1pbXBvcnQtY2xhdXNlIGltcG9ydC1jbGF1c2UpCisgICAgICAgICAg KGluc2VydCAiICIpCisgICAgICAgICAgKGpzMi1wcmludC1mcm9tLWNsYXVzZSBmcm9tLWNsYXVz ZSkpCisgICAgICAoaW5zZXJ0ICInIikKKyAgICAgIChpbnNlcnQgbW9kdWxlLWlkKQorICAgICAg KGluc2VydCAiJyIpKQorICAgIChpbnNlcnQgIjtcbiIpKSkKKworKGNsLWRlZnN0cnVjdCAoanMy LWltcG9ydC1jbGF1c2Utbm9kZQorICAgICAgICAgICAgICAgKDppbmNsdWRlIGpzMi1ub2RlKQor ICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBuaWwpCisgICAgICAgICAgICAgICAoOmNvbnN0 cnVjdG9yIG1ha2UtanMyLWltcG9ydC1jbGF1c2Utbm9kZSAoJmtleSAodHlwZSAtMSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IHBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgbGVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBuYW1lc3BhY2UtaW1wb3J0CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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ZWQtaW1wb3J0cyBuKSkKKyAgICAgICAgKGRlZmF1bHQgKGpzMi1pbXBvcnQtY2xhdXNl LW5vZGUtZGVmYXVsdC1iaW5kaW5nIG4pKSkKKyAgICAod2hlbiBucy1pbXBvcnQKKyAgICAgIChq czItdmlzaXQtYXN0IG5zLWltcG9ydCB2KSkKKyAgICAod2hlbiBuYW1lZC1pbXBvcnRzCisgICAg ICAoZG9saXN0IChpbXBvcnQgbmFtZWQtaW1wb3J0cykKKyAgICAgICAgKGpzMi12aXNpdC1hc3Qg aW1wb3J0IHYpKSkKKyAgICAod2hlbiBkZWZhdWx0CisgICAgICAoanMyLXZpc2l0LWFzdCBkZWZh dWx0IHYpKSkpCisKKyhkZWZ1biBqczItcHJpbnQtaW1wb3J0LWNsYXVzZSAobikKKyAgKGxldCAo KG5zLWltcG9ydCAoanMyLWltcG9ydC1jbGF1c2Utbm9kZS1uYW1lc3BhY2UtaW1wb3J0IG4pKQor ICAgICAgICAobmFtZWQtaW1wb3J0cyAoanMyLWltcG9ydC1jbGF1c2Utbm9kZS1uYW1lZC1pbXBv cnRzIG4pKQorICAgICAgICAoZGVmYXVsdCAoanMyLWltcG9ydC1jbGF1c2Utbm9kZS1kZWZhdWx0 LWJpbmRpbmcgbikpKQorICAgIChjb25kCisgICAgICgoYW5kIGRlZmF1bHQgbnMtaW1wb3J0KQor ICAgICAgKGpzMi1wcmludC1hc3QgZGVmYXVsdCkKKyAgICAgIChpbnNlcnQgIiwgIikKKyAgICAg IChqczItcHJpbnQtbmFtZXNwYWNlLWltcG9ydCBucy1pbXBvcnQpKQorICAgICAoKGFuZCBkZWZh dWx0IG5hbWVkLWltcG9ydHMpCisgICAgICAoanMyLXByaW50LWFzdCBkZWZhdWx0KQorICAgICAg KGluc2VydCAiLCAiKQorICAgICAgKGpzMi1wcmludC1uYW1lZC1pbXBvcnRzIG5hbWVkLWltcG9y dHMpKQorICAgICAoZGVmYXVsdAorICAgICAgKGpzMi1wcmludC1hc3QgZGVmYXVsdCkpCisgICAg IChucy1pbXBvcnQKKyAgICAgIChqczItcHJpbnQtbmFtZXNwYWNlLWltcG9ydCBucy1pbXBvcnQp KQorICAgICAobmFtZWQtaW1wb3J0cworICAgICAgKGpzMi1wcmludC1uYW1lZC1pbXBvcnRzIG5h bWVkLWltcG9ydHMpKSkpKQorCisoZGVmdW4ganMyLXByaW50LW5hbWVzcGFjZS1pbXBvcnQgKG5v ZGUpCisgIChpbnNlcnQgIiogYXMgIikKKyAgKGluc2VydCAoanMyLW5hbWUtbm9kZS1uYW1lIChq czItbmFtZXNwYWNlLWltcG9ydC1ub2RlLW5hbWUgbm9kZSkpKSkKKworKGRlZnVuIGpzMi1wcmlu dC1uYW1lZC1pbXBvcnRzIChpbXBvcnRzKQorICAoaW5zZXJ0ICJ7IikKKyAgKGxldCAoKGxlbiAo bGVuZ3RoIGltcG9ydHMpKQorICAgICAgICAobiAwKSkKKyAgICAod2hpbGUgKDwgbiBsZW4pCisg ICAgICAoanMyLXByaW50LWV4dGVybi1iaW5kaW5nIChudGggbiBpbXBvcnRzKSAwKQorICAgICAg KHVubGVzcyAoPSBuICgtIGxlbiAxKSkKKyAgICAgICAgKGluc2VydCAiLCAiKSkKKyAgICAgIChz ZXRxIG4gKCsgbiAxKSkpKQorICAoaW5zZXJ0ICJ9IikpCisKKyhjbC1kZWZzdHJ1Y3QgKGpzMi1u YW1lc3BhY2UtaW1wb3J0LW5vZGUKKyAgICAgICAgICAgICAgICg6aW5jbHVkZSBqczItbm9kZSkK KyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbmlsKQorICAgICAgICAgICAgICAgKDpjb25z dHJ1Y3RvciBtYWtlLWpzMi1uYW1lc3BhY2UtaW1wb3J0LW5vZGUgKCZrZXkgKHR5cGUgLTEpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGxlbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZSkpKQorICAiQVNUIG5vZGUg Zm9yIGEgY29tcGxldGUgbmFtZXNwYWNlIGltcG9ydC4KK0UuZy4gdGhlICcqIGFzIGxpYicgZXhw cmVzc2lvbiBpbjoKKworaW1wb3J0ICogYXMgbGliIGZyb20gJ3NyYy9saWInCisKK0l0IGNvbnRh aW5zIGEgc2luZ2xlIG5hbWUgbm9kZSByZWZlcnJpbmcgdG8gdGhlIGJvdW5kIG5hbWUuIgorICBu YW1lKSA7IGpzMi1uYW1lLW5vZGUgb2YgdGhlIGJvdW5kIG5hbWUuCisKKyhkZWZ1biBqczItdmlz aXQtbmFtZXNwYWNlLWltcG9ydCAobiB2KQorICAoanMyLXZpc2l0LWFzdCAoanMyLW5hbWVzcGFj ZS1pbXBvcnQtbm9kZS1uYW1lIG4pIHYpKQorCisocHV0ICdjbC1zdHJ1Y3QtanMyLW5hbWVzcGFj ZS1pbXBvcnQtbm9kZSAnanMyLXZpc2l0b3IgJ2pzMi12aXNpdC1uYW1lc3BhY2UtaW1wb3J0KQor KHB1dCAnY2wtc3RydWN0LWpzMi1uYW1lc3BhY2UtaW1wb3J0LW5vZGUgJ2pzMi1wcmludGVyICdq czItcHJpbnQtbmFtZXNwYWNlLWltcG9ydCkKKworKGNsLWRlZnN0cnVjdCAoanMyLWZyb20tY2xh dXNlLW5vZGUKKyAgICAgICAgICAgICAgICg6aW5jbHVkZSBqczItbm9kZSkKKyAgICAgICAgICAg ICAgICg6Y29uc3RydWN0b3IgbmlsKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBtYWtl LWpzMi1mcm9tLWNsYXVzZS1ub2RlICgma2V5ICh0eXBlIGpzMi1OQU1FKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvcworICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGxlbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIG1vZHVsZS1pZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIG1ldGFkYXRhLXApKSkKKyAgIkFTVCBub2RlIGZvciB0 aGUgZnJvbSBjbGF1c2UgaW4gYW4gaW1wb3J0IG9yIGV4cG9ydCBzdGF0ZW1lbnQuCitFLmcuIGZy b20gJ215L21vZHVsZScuIEl0IGNhbiByZWZlcmUgdG8gZWl0aGVyIGFuIGV4dGVybmFsIG1vZHVs ZSwgb3IgdG8gdGhlCittb2R1bGVzIG1ldGFkYXRhIGl0c2VsZi4iCisgIG1vZHVsZS1pZCA7IHN0 cmluZyBjb250YWluaW5nIHRoZSBtb2R1bGUgc3BlY2lmaWVyLgorICBtZXRhZGF0YS1wKSA7IHRy dWUgaWYgdGhpcyBjbGF1c2UgcmVmZXJzIHRvIHRoZSBtb2R1bGUncyBtZXRhZGF0YQorCisocHV0 ICdjbC1zdHJ1Y3QtanMyLWZyb20tY2xhdXNlLW5vZGUgJ2pzMi12aXNpdG9yICdqczItdmlzaXQt bm9uZSkKKyhwdXQgJ2NsLXN0cnVjdC1qczItZnJvbS1jbGF1c2Utbm9kZSAnanMyLXByaW50ZXIg J2pzMi1wcmludC1mcm9tLWNsYXVzZSkKKworKGRlZnVuIGpzMi1wcmludC1mcm9tLWNsYXVzZSAo bikKKyAgKGluc2VydCAiZnJvbSAiKQorICAoaWYgKGpzMi1mcm9tLWNsYXVzZS1ub2RlLW1ldGFk YXRhLXAgbikKKyAgICAgIChpbnNlcnQgInRoaXMgbW9kdWxlIikKKyAgICAoaW5zZXJ0ICInIikK KyAgICAoaW5zZXJ0IChqczItZnJvbS1jbGF1c2Utbm9kZS1tb2R1bGUtaWQgbikpCisgICAgKGlu c2VydCAiJyIpKSkKKworKGNsLWRlZnN0cnVjdCAoanMyLXRyeS1ub2RlCisgICAgICAgICAgICAg ICAoOmluY2x1ZGUganMyLW5vZGUpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG5pbCkK KyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbWFrZS1qczItdHJ5LW5vZGUgKCZrZXkgKHR5 cGUganMyLVRSWSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKHBvcyBqczItdHMtY3Vyc29yKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBsZW4KKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJ5LWJsb2NrCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhdGNoLWNsYXVzZXMKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmluYWxseS1ibG9j aykpKQorICAiQVNUIG5vZGUgZm9yIGEgdHJ5LXN0YXRlbWVudC4iCisgIHRyeS1ibG9jaworICBj YXRjaC1jbGF1c2VzICA7IGEgTGlzcCBsaXN0IG9mIGBqczItY2F0Y2gtbm9kZScKKyAgZmluYWxs eS1ibG9jaykgOyBhIGBqczItZmluYWxseS1ub2RlJworCisocHV0ICdjbC1zdHJ1Y3QtanMyLXRy eS1ub2RlICdqczItdmlzaXRvciAnanMyLXZpc2l0LXRyeS1ub2RlKQorKHB1dCAnY2wtc3RydWN0 LWpzMi10cnktbm9kZSAnanMyLXByaW50ZXIgJ2pzMi1wcmludC10cnktbm9kZSkKKworKGRlZnVu IGpzMi12aXNpdC10cnktbm9kZSAobiB2KQorICAoanMyLXZpc2l0LWFzdCAoanMyLXRyeS1ub2Rl LXRyeS1ibG9jayBuKSB2KQorICAoZG9saXN0IChjbGF1c2UgKGpzMi10cnktbm9kZS1jYXRjaC1j bGF1c2VzIG4pKQorICAgIChqczItdmlzaXQtYXN0IGNsYXVzZSB2KSkKKyAgKGpzMi12aXNpdC1h c3QgKGpzMi10cnktbm9kZS1maW5hbGx5LWJsb2NrIG4pIHYpKQorCisoZGVmdW4ganMyLXByaW50 LXRyeS1ub2RlIChuIGkpCisgIChsZXQgKChwYWQgKGpzMi1tYWtlLXBhZCBpKSkKKyAgICAgICAg KGNhdGNoZXMgKGpzMi10cnktbm9kZS1jYXRjaC1jbGF1c2VzIG4pKQorICAgICAgICAoZmluYWxs eSAoanMyLXRyeS1ub2RlLWZpbmFsbHktYmxvY2sgbikpKQorICAgIChpbnNlcnQgcGFkICJ0cnkg e1xuIikKKyAgICAoanMyLXByaW50LWJvZHkgKGpzMi10cnktbm9kZS10cnktYmxvY2sgbikgKDEr IGkpKQorICAgIChpbnNlcnQgcGFkICJ9IikKKyAgICAod2hlbiBjYXRjaGVzCisgICAgICAoZG9s aXN0IChjYXRjaCBjYXRjaGVzKQorICAgICAgICAoanMyLXByaW50LWFzdCBjYXRjaCBpKSkpCisg ICAgKGlmIGZpbmFsbHkKKyAgICAgICAgKGpzMi1wcmludC1hc3QgZmluYWxseSBpKQorICAgICAg KGluc2VydCAiXG4iKSkpKQorCisoY2wtZGVmc3RydWN0IChqczItY2F0Y2gtbm9kZQorICAgICAg ICAgICAgICAgKDppbmNsdWRlIGpzMi1zY29wZSkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0 b3IgbmlsKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBtYWtlLWpzMi1jYXRjaC1ub2Rl ICgma2V5ICh0eXBlIGpzMi1DQVRDSCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAocG9zIGpzMi10cy1jdXJzb3IpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW0KKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBndWFyZC1r d2QKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBndWFyZC1leHByCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgbHAgcnApKSkKKyAgIkFTVCBub2RlIGZvciBhIGNhdGNoIGNsYXVzZS4iCisg IHBhcmFtICAgICAgIDsgZGVzdHJ1Y3R1cmluZyBmb3JtIG9yIHNpbXBsZSBuYW1lIG5vZGUKKyAg Z3VhcmQta3dkICAgOyByZWxhdGl2ZSBidWZmZXIgcG9zaXRpb24gb2YgImlmIiBpbiAiY2F0Y2gg KHggaWYgLi4uKSIKKyAgZ3VhcmQtZXhwciAgOyBjYXRjaCBjb25kaXRpb24sIGEgYGpzMi1ub2Rl JworICBscCAgICAgICAgICA7IGJ1ZmZlciBwb3NpdGlvbiBvZiBsZWZ0LXBhcmVuLCBuaWwgaWYg b21pdHRlZAorICBycCkgICAgICAgICA7IGJ1ZmZlciBwb3NpdGlvbiBvZiByaWdodC1wYXJlbiwg bmlsIGlmIG9taXR0ZWQKKworKHB1dCAnY2wtc3RydWN0LWpzMi1jYXRjaC1ub2RlICdqczItdmlz aXRvciAnanMyLXZpc2l0LWNhdGNoLW5vZGUpCisocHV0ICdjbC1zdHJ1Y3QtanMyLWNhdGNoLW5v ZGUgJ2pzMi1wcmludGVyICdqczItcHJpbnQtY2F0Y2gtbm9kZSkKKworKGRlZnVuIGpzMi12aXNp dC1jYXRjaC1ub2RlIChuIHYpCisgIChqczItdmlzaXQtYXN0IChqczItY2F0Y2gtbm9kZS1wYXJh bSBuKSB2KQorICAod2hlbiAoanMyLWNhdGNoLW5vZGUtZ3VhcmQta3dkIG4pCisgICAgKGpzMi12 aXNpdC1hc3QgKGpzMi1jYXRjaC1ub2RlLWd1YXJkLWV4cHIgbikgdikpCisgIChqczItdmlzaXQt YmxvY2sgbiB2KSkKKworKGRlZnVuIGpzMi1wcmludC1jYXRjaC1ub2RlIChuIGkpCisgIChsZXQg KChwYWQgKGpzMi1tYWtlLXBhZCBpKSkKKyAgICAgICAgKGd1YXJkLWt3ZCAoanMyLWNhdGNoLW5v ZGUtZ3VhcmQta3dkIG4pKQorICAgICAgICAoZ3VhcmQtZXhwciAoanMyLWNhdGNoLW5vZGUtZ3Vh cmQtZXhwciBuKSkpCisgICAgKGluc2VydCAiIGNhdGNoICgiKQorICAgIChqczItcHJpbnQtYXN0 IChqczItY2F0Y2gtbm9kZS1wYXJhbSBuKSAwKQorICAgICh3aGVuIGd1YXJkLWt3ZAorICAgICAg KGluc2VydCAiIGlmICIpCisgICAgICAoanMyLXByaW50LWFzdCBndWFyZC1leHByIDApKQorICAg IChpbnNlcnQgIikge1xuIikKKyAgICAoanMyLXByaW50LWJvZHkgbiAoMSsgaSkpCisgICAgKGlu c2VydCBwYWQgIn0iKSkpCisKKyhjbC1kZWZzdHJ1Y3QgKGpzMi1maW5hbGx5LW5vZGUKKyAgICAg ICAgICAgICAgICg6aW5jbHVkZSBqczItbm9kZSkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0 b3IgbmlsKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBtYWtlLWpzMi1maW5hbGx5LW5v ZGUgKCZrZXkgKHR5cGUganMyLUZJTkFMTFkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocG9zIGpzMi10cy1jdXJzb3IpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW4gYm9k eSkpKQorICAiQVNUIG5vZGUgZm9yIGEgZmluYWxseSBjbGF1c2UuIgorICBib2R5KSAgOyBhIGBq czItbm9kZScsIG9mdGVuIGJ1dCBub3QgYWx3YXlzIGEgYmxvY2sgbm9kZQorCisocHV0ICdjbC1z dHJ1Y3QtanMyLWZpbmFsbHktbm9kZSAnanMyLXZpc2l0b3IgJ2pzMi12aXNpdC1maW5hbGx5LW5v ZGUpCisocHV0ICdjbC1zdHJ1Y3QtanMyLWZpbmFsbHktbm9kZSAnanMyLXByaW50ZXIgJ2pzMi1w cmludC1maW5hbGx5LW5vZGUpCisKKyhkZWZ1biBqczItdmlzaXQtZmluYWxseS1ub2RlIChuIHYp CisgIChqczItdmlzaXQtYXN0IChqczItZmluYWxseS1ub2RlLWJvZHkgbikgdikpCisKKyhkZWZ1 biBqczItcHJpbnQtZmluYWxseS1ub2RlIChuIGkpCisgIChsZXQgKChwYWQgKGpzMi1tYWtlLXBh ZCBpKSkpCisgICAgKGluc2VydCAiIGZpbmFsbHkge1xuIikKKyAgICAoanMyLXByaW50LWJvZHkg KGpzMi1maW5hbGx5LW5vZGUtYm9keSBuKSAoMSsgaSkpCisgICAgKGluc2VydCBwYWQgIn1cbiIp KSkKKworKGNsLWRlZnN0cnVjdCAoanMyLXN3aXRjaC1ub2RlCisgICAgICAgICAgICAgICAoOmlu Y2x1ZGUganMyLW5vZGUpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG5pbCkKKyAgICAg ICAgICAgICAgICg6Y29uc3RydWN0b3IgbWFrZS1qczItc3dpdGNoLW5vZGUgKCZrZXkgKHR5cGUg anMyLVNXSVRDSCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKHBvcyBqczItdHMtY3Vyc29yKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW4KKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzY3JpbWluYW50CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2VzIGxw CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IHJwKSkpCisgICJBU1Qgbm9kZSBmb3IgYSBzd2l0Y2ggc3RhdGVtZW50LiIKKyAgZGlzY3JpbWlu YW50ICA7IGEgYGpzMi1ub2RlJyAoc3dpdGNoIGV4cHJlc3Npb24pCisgIGNhc2VzICA7IGEgTGlz cCBsaXN0IG9mIGBqczItY2FzZS1ub2RlJworICBscCAgICAgOyBwb3NpdGlvbiBvZiBvcGVuLXBh cmVuIGZvciBkaXNjcmltaW5hbnQsIG5pbCBpZiBvbWl0dGVkCisgIHJwKSAgICA7IHBvc2l0aW9u IG9mIGNsb3NlLXBhcmVuIGZvciBkaXNjcmltaW5hbnQsIG5pbCBpZiBvbWl0dGVkCisKKyhwdXQg J2NsLXN0cnVjdC1qczItc3dpdGNoLW5vZGUgJ2pzMi12aXNpdG9yICdqczItdmlzaXQtc3dpdGNo LW5vZGUpCisocHV0ICdjbC1zdHJ1Y3QtanMyLXN3aXRjaC1ub2RlICdqczItcHJpbnRlciAnanMy LXByaW50LXN3aXRjaC1ub2RlKQorCisoZGVmdW4ganMyLXZpc2l0LXN3aXRjaC1ub2RlIChuIHYp CisgIChqczItdmlzaXQtYXN0IChqczItc3dpdGNoLW5vZGUtZGlzY3JpbWluYW50IG4pIHYpCisg IChkb2xpc3QgKGMgKGpzMi1zd2l0Y2gtbm9kZS1jYXNlcyBuKSkKKyAgICAoanMyLXZpc2l0LWFz dCBjIHYpKSkKKworKGRlZnVuIGpzMi1wcmludC1zd2l0Y2gtbm9kZSAobiBpKQorICAobGV0ICgo cGFkIChqczItbWFrZS1wYWQgaSkpCisgICAgICAgIChjYXNlcyAoanMyLXN3aXRjaC1ub2RlLWNh c2VzIG4pKSkKKyAgICAoaW5zZXJ0IHBhZCAic3dpdGNoICgiKQorICAgIChqczItcHJpbnQtYXN0 IChqczItc3dpdGNoLW5vZGUtZGlzY3JpbWluYW50IG4pIDApCisgICAgKGluc2VydCAiKSB7XG4i KQorICAgIChkb2xpc3QgKGNhc2UgY2FzZXMpCisgICAgICAoanMyLXByaW50LWFzdCBjYXNlIGkp KQorICAgIChpbnNlcnQgcGFkICJ9XG4iKSkpCisKKyhjbC1kZWZzdHJ1Y3QgKGpzMi1jYXNlLW5v ZGUKKyAgICAgICAgICAgICAgICg6aW5jbHVkZSBqczItYmxvY2stbm9kZSkKKyAgICAgICAgICAg ICAgICg6Y29uc3RydWN0b3IgbmlsKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBtYWtl LWpzMi1jYXNlLW5vZGUgKCZrZXkgKHR5cGUganMyLUNBU0UpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocG9zIGpzMi10cy1jdXJzb3IpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW4g a2lkcyBleHByKSkpCisgICJBU1Qgbm9kZSBmb3IgYSBjYXNlIGNsYXVzZSBvZiBhIHN3aXRjaCBz dGF0ZW1lbnQuIgorICBleHByKSAgIDsgdGhlIGNhc2UgZXhwcmVzc2lvbiAobmlsIGZvciBkZWZh dWx0KQorCisocHV0ICdjbC1zdHJ1Y3QtanMyLWNhc2Utbm9kZSAnanMyLXZpc2l0b3IgJ2pzMi12 aXNpdC1jYXNlLW5vZGUpCisocHV0ICdjbC1zdHJ1Y3QtanMyLWNhc2Utbm9kZSAnanMyLXByaW50 ZXIgJ2pzMi1wcmludC1jYXNlLW5vZGUpCisKKyhkZWZ1biBqczItdmlzaXQtY2FzZS1ub2RlIChu IHYpCisgIChqczItdmlzaXQtYXN0IChqczItY2FzZS1ub2RlLWV4cHIgbikgdikKKyAgKGpzMi12 aXNpdC1ibG9jayBuIHYpKQorCisoZGVmdW4ganMyLXByaW50LWNhc2Utbm9kZSAobiBpKQorICAo bGV0ICgocGFkIChqczItbWFrZS1wYWQgaSkpCisgICAgICAgIChleHByIChqczItY2FzZS1ub2Rl LWV4cHIgbikpKQorICAgIChpbnNlcnQgcGFkKQorICAgIChpZiAobnVsbCBleHByKQorICAgICAg ICAoaW5zZXJ0ICJkZWZhdWx0OlxuIikKKyAgICAgIChpbnNlcnQgImNhc2UgIikKKyAgICAgIChq czItcHJpbnQtYXN0IGV4cHIgMCkKKyAgICAgIChpbnNlcnQgIjpcbiIpKQorICAgIChkb2xpc3Qg KGtpZCAoanMyLWNhc2Utbm9kZS1raWRzIG4pKQorICAgICAgKGpzMi1wcmludC1hc3Qga2lkICgx KyBpKSkpKSkKKworKGNsLWRlZnN0cnVjdCAoanMyLXRocm93LW5vZGUKKyAgICAgICAgICAgICAg ICg6aW5jbHVkZSBqczItbm9kZSkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbmlsKQor ICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBtYWtlLWpzMi10aHJvdy1ub2RlICgma2V5ICh0 eXBlIGpzMi1USFJPVykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAocG9zIGpzMi10cy1jdXJzb3IpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuIGV4cHIpKSkKKyAgIkFTVCBub2Rl IGZvciBhIHRocm93IHN0YXRlbWVudC4iCisgIGV4cHIpICAgOyB0aGUgZXhwcmVzc2lvbiB0byB0 aHJvdworCisocHV0ICdjbC1zdHJ1Y3QtanMyLXRocm93LW5vZGUgJ2pzMi12aXNpdG9yICdqczIt dmlzaXQtdGhyb3ctbm9kZSkKKyhwdXQgJ2NsLXN0cnVjdC1qczItdGhyb3ctbm9kZSAnanMyLXBy aW50ZXIgJ2pzMi1wcmludC10aHJvdy1ub2RlKQorCisoZGVmdW4ganMyLXZpc2l0LXRocm93LW5v ZGUgKG4gdikKKyAgKGpzMi12aXNpdC1hc3QgKGpzMi10aHJvdy1ub2RlLWV4cHIgbikgdikpCisK KyhkZWZ1biBqczItcHJpbnQtdGhyb3ctbm9kZSAobiBpKQorICAoaW5zZXJ0IChqczItbWFrZS1w YWQgaSkgInRocm93ICIpCisgIChqczItcHJpbnQtYXN0IChqczItdGhyb3ctbm9kZS1leHByIG4p IDApCisgIChpbnNlcnQgIjtcbiIpKQorCisoY2wtZGVmc3RydWN0IChqczItd2l0aC1ub2RlCisg ICAgICAgICAgICAgICAoOmluY2x1ZGUganMyLW5vZGUpCisgICAgICAgICAgICAgICAoOmNvbnN0 cnVjdG9yIG5pbCkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbWFrZS1qczItd2l0aC1u b2RlICgma2V5ICh0eXBlIGpzMi1XSVRIKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKHBvcyBqczItdHMtY3Vyc29yKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuIG9iamVjdAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9keSBs cCBycCkpKQorICAiQVNUIG5vZGUgZm9yIGEgd2l0aC1zdGF0ZW1lbnQuIgorICBvYmplY3QKKyAg Ym9keQorICBscCAgICA7IGJ1ZmZlciBwb3NpdGlvbiBvZiBsZWZ0LXBhcmVuIGFyb3VuZCBvYmpl Y3QsIG5pbCBpZiBvbWl0dGVkCisgIHJwKSAgIDsgYnVmZmVyIHBvc2l0aW9uIG9mIHJpZ2h0LXBh cmVuIGFyb3VuZCBvYmplY3QsIG5pbCBpZiBvbWl0dGVkCisKKyhwdXQgJ2NsLXN0cnVjdC1qczIt d2l0aC1ub2RlICdqczItdmlzaXRvciAnanMyLXZpc2l0LXdpdGgtbm9kZSkKKyhwdXQgJ2NsLXN0 cnVjdC1qczItd2l0aC1ub2RlICdqczItcHJpbnRlciAnanMyLXByaW50LXdpdGgtbm9kZSkKKwor KGRlZnVuIGpzMi12aXNpdC13aXRoLW5vZGUgKG4gdikKKyAgKGpzMi12aXNpdC1hc3QgKGpzMi13 aXRoLW5vZGUtb2JqZWN0IG4pIHYpCisgIChqczItdmlzaXQtYXN0IChqczItd2l0aC1ub2RlLWJv ZHkgbikgdikpCisKKyhkZWZ1biBqczItcHJpbnQtd2l0aC1ub2RlIChuIGkpCisgIChsZXQgKChw YWQgKGpzMi1tYWtlLXBhZCBpKSkpCisgICAgKGluc2VydCBwYWQgIndpdGggKCIpCisgICAgKGpz Mi1wcmludC1hc3QgKGpzMi13aXRoLW5vZGUtb2JqZWN0IG4pIDApCisgICAgKGluc2VydCAiKSB7 XG4iKQorICAgIChqczItcHJpbnQtYm9keSAoanMyLXdpdGgtbm9kZS1ib2R5IG4pICgxKyBpKSkK KyAgICAoaW5zZXJ0IHBhZCAifVxuIikpKQorCisoY2wtZGVmc3RydWN0IChqczItbGFiZWwtbm9k ZQorICAgICAgICAgICAgICAgKDppbmNsdWRlIGpzMi1ub2RlKQorICAgICAgICAgICAgICAgKDpj b25zdHJ1Y3RvciBuaWwpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG1ha2UtanMyLWxh YmVsLW5vZGUgKCZrZXkgKHR5cGUganMyLUxBQkVMKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChwb3MganMyLXRzLWN1cnNvcikKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW4gbmFt ZSkpKQorICAiQVNUIG5vZGUgZm9yIGEgc3RhdGVtZW50IGxhYmVsIG9yIGNhc2UgbGFiZWwuIgor ICBuYW1lICAgOyBhIHN0cmluZworICBsb29wKSAgOyBmb3IgdmFsaWRhdGluZyBhbmQgY29kZS1n ZW5lcmF0aW5nIGNvbnRpbnVlLXRvLWxhYmVsCisKKyhwdXQgJ2NsLXN0cnVjdC1qczItbGFiZWwt bm9kZSAnanMyLXZpc2l0b3IgJ2pzMi12aXNpdC1ub25lKQorKHB1dCAnY2wtc3RydWN0LWpzMi1s YWJlbC1ub2RlICdqczItcHJpbnRlciAnanMyLXByaW50LWxhYmVsKQorCisoZGVmdW4ganMyLXBy aW50LWxhYmVsIChuIGkpCisgIChpbnNlcnQgKGpzMi1tYWtlLXBhZCBpKQorICAgICAgICAgIChq czItbGFiZWwtbm9kZS1uYW1lIG4pCisgICAgICAgICAgIjpcbiIpKQorCisoY2wtZGVmc3RydWN0 IChqczItbGFiZWxlZC1zdG10LW5vZGUKKyAgICAgICAgICAgICAgICg6aW5jbHVkZSBqczItbm9k ZSkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbmlsKQorICAgICAgICAgICAgICAgOzsg dHlwZSBuZWVkcyB0byBiZSBpbiBganMyLXNpZGUtZWZmZWN0aW5nLXRva2VucycgdG8gYXZvaWQg c3B1cmlvdXMKKyAgICAgICAgICAgICAgIDs7IG5vLXNpZGUtZWZmZWN0cyB3YXJuaW5ncywgaGVu Y2UganMyLUVYUFJfUkVTVUxULgorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBtYWtlLWpz Mi1sYWJlbGVkLXN0bXQtbm9kZSAoJmtleSAodHlwZSBqczItRVhQUl9SRVNVTFQpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChw b3MganMyLXRzLWN1cnNvcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgbGVuIGxhYmVscyBzdG10KSkpCisgICJBU1Qgbm9kZSBm b3IgYSBzdGF0ZW1lbnQgd2l0aCBvbmUgb3IgbW9yZSBsYWJlbHMuCitNdWx0aXBsZSBsYWJlbHMg Zm9yIGEgc3RhdGVtZW50IG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oY2wtZGVmc3RydWN0IChqczItanVtcC1ub2RlCisgICAgICAgICAg ICAgICAoOmluY2x1ZGUganMyLW5vZGUpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG5p bCkpCisgICJBYnN0cmFjdCBzdXBlcnR5cGUgb2YgYnJlYWsgYW5kIGNvbnRpbnVlIG5vZGVzLiIK KyAgbGFiZWwgICA7IGBqczItbmFtZS1ub2RlJyBmb3IgbG9jYXRpb24gb2YgbGFiZWwgaWRlbnRp ZmllciwgaWYgcHJlc2VudAorICB0YXJnZXQpIDsgdGFyZ2V0IGpzMi1sYWJlbHMtbm9kZSBvciBs b29wL3N3aXRjaCBzdGF0ZW1lbnQKKworKGRlZnVuIGpzMi12aXNpdC1qdW1wLW5vZGUgKG4gdikK KyAgOzsgV2UgZG9uJ3QgdmlzaXQgdGhlIHRhcmdldCwgc2luY2UgaXQncyBhIGJhY2stbGluay4K KyAgKGpzMi12aXNpdC1hc3QgKGpzMi1qdW1wLW5vZGUtbGFiZWwgbikgdikpCisKKyhjbC1kZWZz dHJ1Y3QgKGpzMi1icmVhay1ub2RlCisgICAgICAgICAgICAgICAoOmluY2x1ZGUganMyLWp1bXAt bm9kZSkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbmlsKQorICAgICAgICAgICAgICAg KDpjb25zdHJ1Y3RvciBtYWtlLWpzMi1icmVhay1ub2RlICgma2V5ICh0eXBlIGpzMi1CUkVBSykK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo cG9zIGpzMi10cy1jdXJzb3IpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgbGVuIGxhYmVsIHRhcmdldCkpKQorICAiQVNUIG5vZGUgZm9yIGEg YnJlYWsgc3RhdGVtZW50LgorVGhlIGxhYmVsIGZpZWxkIGlzIGEgYGpzMi1uYW1lLW5vZGUnLCBw b3NzaWJseSBuaWwsIGZvciB0aGUgbmFtZWQgbGFiZWwKK2lmIHByb3ZpZGVkLiAgRS5nLiBpbiAn YnJlYWsgZm9vJywgaXQgcmVwcmVzZW50cyAnZm9vJy4gIFRoZSB0YXJnZXQgZmllbGQKK2lzIHRo ZSB0YXJnZXQgb2YgdGhlIGJyZWFrIC0gYSBsYWJlbCBub2RlIG9yIGVuY2xvc2luZyBsb29wL3N3 aXRjaCBzdGF0ZW1lbnQuIikKKworKHB1dCAnY2wtc3RydWN0LWpzMi1icmVhay1ub2RlICdqczIt dmlzaXRvciAnanMyLXZpc2l0LWp1bXAtbm9kZSkKKyhwdXQgJ2NsLXN0cnVjdC1qczItYnJlYWst bm9kZSAnanMyLXByaW50ZXIgJ2pzMi1wcmludC1icmVhay1ub2RlKQorCisoZGVmdW4ganMyLXBy aW50LWJyZWFrLW5vZGUgKG4gaSkKKyAgKGluc2VydCAoanMyLW1ha2UtcGFkIGkpICJicmVhayIp CisgICh3aGVuIChqczItYnJlYWstbm9kZS1sYWJlbCBuKQorICAgIChpbnNlcnQgIiAiKQorICAg IChqczItcHJpbnQtYXN0IChqczItYnJlYWstbm9kZS1sYWJlbCBuKSAwKSkKKyAgKGluc2VydCAi O1xuIikpCisKKyhjbC1kZWZzdHJ1Y3QgKGpzMi1jb250aW51ZS1ub2RlCisgICAgICAgICAgICAg ICAoOmluY2x1ZGUganMyLWp1bXAtbm9kZSkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3Ig bmlsKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBtYWtlLWpzMi1jb250aW51ZS1ub2Rl ICgma2V5ICh0eXBlIGpzMi1DT05USU5VRSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocG9zIGpzMi10cy1jdXJzb3IpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuIGxh YmVsIHRhcmdldCkpKQorICAiQVNUIG5vZGUgZm9yIGEgY29udGludWUgc3RhdGVtZW50LgorVGhl IGxhYmVsIGZpZWxkIGlzIHRoZSB1c2VyLXN1cHBsaWVkIGVuY2xvc2luZyBsYWJlbCBuYW1lLCBh IGBqczItbmFtZS1ub2RlJy4KK0l0IGlzIG5pbCBpZiBjb250aW51ZSBzcGVjaWZpZXMgbm8gbGFi ZWwuICBUaGUgdGFyZ2V0IGZpZWxkIGlzIHRoZSBqdW1wIHRhcmdldDoKK2EgYGpzMi1sYWJlbC1u b2RlJyBvciB0aGUgaW5uZXJtb3N0IGVuY2xvc2luZyBsb29wLiIpCisKKyhwdXQgJ2NsLXN0cnVj dC1qczItY29udGludWUtbm9kZSAnanMyLXZpc2l0b3IgJ2pzMi12aXNpdC1qdW1wLW5vZGUpCiso cHV0ICdjbC1zdHJ1Y3QtanMyLWNvbnRpbnVlLW5vZGUgJ2pzMi1wcmludGVyICdqczItcHJpbnQt Y29udGludWUtbm9kZSkKKworKGRlZnVuIGpzMi1wcmludC1jb250aW51ZS1ub2RlIChuIGkpCisg IChpbnNlcnQgKGpzMi1tYWtlLXBhZCBpKSAiY29udGludWUiKQorICAod2hlbiAoanMyLWNvbnRp bnVlLW5vZGUtbGFiZWwgbikKKyAgICAoaW5zZXJ0ICIgIikKKyAgICAoanMyLXByaW50LWFzdCAo anMyLWNvbnRpbnVlLW5vZGUtbGFiZWwgbikgMCkpCisgIChpbnNlcnQgIjtcbiIpKQorCisoY2wt ZGVmc3RydWN0IChqczItZnVuY3Rpb24tbm9kZQorICAgICAgICAgICAgICAgKDppbmNsdWRlIGpz Mi1zY3JpcHQtbm9kZSkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbmlsKQorICAgICAg ICAgICAgICAgKDpjb25zdHJ1Y3RvciBtYWtlLWpzMi1mdW5jdGlvbi1ub2RlICgma2V5ICh0eXBl IGpzMi1GVU5DVElPTikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAocG9zIGpzMi10cy1jdXJzb3IpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGZ0eXBlICdGVU5D VElPTikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAoZm9ybSAnRlVOQ1RJT05fU1RBVEVNRU5UKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChuYW1lICIiKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcyBy ZXN0LXAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBib2R5CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgZ2VuZXJhdG9yLXR5cGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBscCBycCkpKQorICAiQVNUIG5vZGUgZm9y IGEgZnVuY3Rpb24gZGVjbGFyYXRpb24uCitUaGUgYHBhcmFtcycgZmllbGQgaXMgYSBMaXNwIGxp c3Qgb2Ygbm9kZXMuICBFYWNoIG5vZGUgaXMgZWl0aGVyIGEgc2ltcGxlCitganMyLW5hbWUtbm9k ZScsIG9yIGlmIGl0J3MgYSBkZXN0cnVjdHVyaW5nLWFzc2lnbm1lbnQgcGFyYW1ldGVyLCBhCitg anMyLWFycmF5LW5vZGUnIG9yIGBqczItb2JqZWN0LW5vZGUnLiIKKyAgZnR5cGUgICAgICAgICAg ICA7IEZVTkNUSU9OLCBHRVRURVIgb3IgU0VUVEVSCisgIGZvcm0gICAgICAg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ZXIgYXJyb3cpCisgICAgICAoaW5z ZXJ0IHBhZCAiZnVuY3Rpb24iKQorICAgICAgKHdoZW4gKGVxIChqczItZnVuY3Rpb24tbm9kZS1n ZW5lcmF0b3ItdHlwZSBuKSAnU1RBUikKKyAgICAgICAgKGluc2VydCAiKiIpKSkKKyAgICAod2hl biBuYW1lCisgICAgICAoaW5zZXJ0ICIgIikKKyAgICAgIChqczItcHJpbnQtYXN0IG5hbWUgMCkp CisgICAgKGluc2VydCAiKCIpCisgICAgKGNsLWxvb3Agd2l0aCBsZW4gPSAobGVuZ3RoIHBhcmFt cykKKyAgICAgICAgICAgICBmb3IgcGFyYW0gaW4gcGFyYW1zCisgICAgICAgICAgICAgZm9yIGNv dW50IGZyb20gMQorICAgICAgICAgICAgIGRvCisgICAgICAgICAgICAgKHdoZW4gKGFuZCByZXN0 LXAgKD0gY291bnQgbGVuKSkKKyAgICAgICAgICAgICAgIChpbnNlcnQgIi4uLiIpKQorICAgICAg ICAgICAgIChqczItcHJpbnQtYXN0IHBhcmFtIDApCisgICAgICAgICAgICAgKHdoZW4gKDwgY291 bnQgbGVuKQorICAgICAgICAgICAgICAgKGluc2VydCAiLCAiKSkpCisgICAgKGluc2VydCAiKSAi KQorICAgICh3aGVuIGFycm93CisgICAgICAoaW5zZXJ0ICI9PiAiKSkKKyAgICAoaW5zZXJ0ICJ7 IikKKyAgICA7OyBUT0RPOiAgZml4IHRoaXMgdG8gYmUgc21hcnRlciBhYm91dCBpbmRlbnRpbmcs IGV0Yy4KKyAgICAodW5sZXNzIGV4cHIKKyAgICAgIChpbnNlcnQgIlxuIikpCisgICAgKGlmIChq czItYmxvY2stbm9kZS1wIGJvZHkpCisgICAgICAgIChqczItcHJpbnQtYm9keSBib2R5ICgxKyBp KSkKKyAgICAgIChqczItcHJpbnQtYXN0IGJvZHkgMCkpCisgICAgKGluc2VydCBwYWQgIn0iKQor ICAgICh1bmxlc3MgZXhwcgorICAgICAgKGluc2VydCAiXG4iKSkpKQorCis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10b2tlbi1iZWcpKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbiBraWRzCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVjbC10eXBlKSkp CisgICJBU1Qgbm9kZSBmb3IgYSB2YXJpYWJsZSBkZWNsYXJhdGlvbiBsaXN0IChWQVIsIENPTlNU IG9yIExFVCkuCitUaGUgbm9kZSBib3VuZHMgZGlmZmVyIGRlcGVuZGluZyBvbiB0aGUgZGVjbGFy YXRpb24gdHlwZS4gIEZvciBWQVIgb3IKK0NPTlNUIGRlY2xhcmF0aW9ucywgdGhlIGJvdW5kcyBp bmNsdWRlIHRoZSB2YXIvY29uc3Qga2V5d29yZC4gIEZvciBMRVQKK2RlY2xhcmF0aW9ucywgdGhl IG5vZGUgYmVnaW5zIGF0IHRoZSBwb3NpdGlvbiBvZiB0aGUgZmlyc3QgY2hpbGQuIgorICBraWRz ICAgICAgICA7IGEgTGlzcCBsaXN0IG9mIGBqczItdmFyLWluaXQtbm9kZScgc3RydWN0cy4KKyAg ZGVjbC10eXBlKSAgOyBqczItVkFSLCBqczItQ09OU1Qgb3IganMyLUxFVAorCisocHV0ICdjbC1z dHJ1Y3QtanMyLXZhci1kZWNsLW5vZGUgJ2pzMi12aXNpdG9yICdqczItdmlzaXQtdmFyLWRlY2wp CisocHV0ICdjbC1zdHJ1Y3QtanMyLXZhci1kZWNsLW5vZGUgJ2pzMi1wcmludGVyICdqczItcHJp bnQtdmFyLWRlY2wpCisKKyhkZWZ1biBqczItdmlzaXQtdmFyLWRlY2wgKG4gdikKKyAgKGRvbGlz dCAoa2lkIChqczItdmFyLWRlY2wtbm9kZS1raWRzIG4pKQorICAgIChqczItdmlzaXQtYXN0IGtp ZCB2KSkpCisKKyhkZWZ1biBqczItcHJpbnQtdmFyLWRlY2wgKG4gaSkKKyAgKGxldCAoKHBhZCAo anMyLW1ha2UtcGFkIGkpKQorICAgICAgICAodHQgKGpzMi12YXItZGVjbC1ub2RlLWRlY2wtdHlw ZSBuKSkpCisgICAgKGluc2VydCBwYWQpCisgICAgKGluc2VydCAoY29uZAorICAgICAgICAgICAg ICgoPSB0dCBqczItVkFSKSAidmFyICIpCisgICAgICAgICAgICAgKCg9IHR0IGpzMi1MRVQpICJs ZXQgIikKKyAgICAgICAgICAgICAoKD0gdHQganMyLUNPTlNUKSAiY29uc3QgIikKKyAgICAgICAg ICAgICAodAorICAgICAgICAgICAgICAoZXJyb3IgIm1hbGZvcm1lZCB2YXItZGVjbCBub2RlIikp KSkKKyAgICAoY2wtbG9vcCB3aXRoIGtpZHMgPSAoanMyLXZhci1kZWNsLW5vZGUta2lkcyBuKQor ICAgICAgICAgICAgIHdpdGggbGVuID0gKGxlbmd0aCBraWRzKQorICAgICAgICAgICAgIGZvciBr aWQgaW4ga2lkcworICAgICAgICAgICAgIGZvciBjb3VudCBmcm9tIDEKKyAgICAgICAgICAgICBk bworICAgICAgICAgICAgIChqczItcHJpbnQtYXN0IGtpZCAwKQorICAgICAgICAgICAgIChpZiAo PCBjb3VudCBsZW4pCisgICAgICAgICAgICAgICAgIChpbnNlcnQgIiwgIikpKSkpCisKKyhjbC1k ZWZzdHJ1Y3QgKGpzMi12YXItaW5pdC1ub2RlCisgICAgICAgICAgICAgICAoOmluY2x1ZGUganMy LW5vZGUpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG5pbCkKKyAgICAgICAgICAgICAg ICg6Y29uc3RydWN0b3IgbWFrZS1qczItdmFyLWluaXQtbm9kZSAoJmtleSAodHlwZSBqczItVkFS KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIChwb3MganMyLXRzLWN1cnNvcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBsZW4gdGFyZ2V0CisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5pdGlhbGl6ZXIpKSkKKyAg IkFTVCBub2RlIGZvciBhIHZhcmlhYmxlIGRlY2xhcmF0aW9uLgorVGhlIHR5cGUgZmllbGQgd2ls bCBiZSBqczItQ09OU1QgZm9yIGEgY29uc3QgZGVjbC4iCisgIHRhcmdldCAgICAgICAgOyBganMy LW5hbWUtbm9kZScsIGBqczItb2JqZWN0LW5vZGUnLCBvciBganMyLWFycmF5LW5vZGUnCisgIGlu aXRpYWxpemVyKSAgOyBpbml0aWFsaXplciBleHByZXNzaW9uLCBhIGBqczItbm9kZScKKworKHB1 dCAnY2wtc3RydWN0LWpzMi12YXItaW5pdC1ub2RlICdqczItdmlzaXRvciAnanMyLXZpc2l0LXZh ci1pbml0LW5vZGUpCisocHV0ICdjbC1zdHJ1Y3QtanMyLXZhci1pbml0LW5vZGUgJ2pzMi1wcmlu dGVyICdqczItcHJpbnQtdmFyLWluaXQtbm9kZSkKKworKGRlZnVuIGpzMi12aXNpdC12YXItaW5p dC1ub2RlIChuIHYpCisgIChqczItdmlzaXQtYXN0IChqczItdmFyLWluaXQtbm9kZS10YXJnZXQg bikgdikKKyAgKGpzMi12aXNpdC1hc3QgKGpzMi12YXItaW5pdC1ub2RlLWluaXRpYWxpemVyIG4p IHYpKQorCisoZGVmdW4ganMyLXByaW50LXZhci1pbml0LW5vZGUgKG4gaSkKKyAgKGxldCAoKHBh ZCAoanMyLW1ha2UtcGFkIGkpKQorICAgICAgICAobmFtZSAoanMyLXZhci1pbml0LW5vZGUtdGFy Z2V0IG4pKQorICAgICAgICAoaW5pdCAoanMyLXZhci1pbml0LW5vZGUtaW5pdGlhbGl6ZXIgbikp KQorICAgIChpbnNlcnQgcGFkKQorICAgIChqczItcHJpbnQtYXN0IG5hbWUgMCkKKyAgICAod2hl biBpbml0CisgICAgICAoaW5zZXJ0ICIgPSAiKQorICAgICAgKGpzMi1wcmludC1hc3QgaW5pdCAw KSkpKQorCisoY2wtZGVmc3RydWN0IChqczItY29uZC1ub2RlCisgICAgICAgICAgICAgICAoOmlu Y2x1ZGUganMyLW5vZGUpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG5pbCkKKyAgICAg ICAgICAgICAgICg6Y29uc3RydWN0b3IgbWFrZS1qczItY29uZC1ub2RlICgma2V5ICh0eXBlIGpz Mi1IT09LKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKHBvcyBqczItdHMtY3Vyc29yKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgbGVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXN0LWV4cHIKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRydWUtZXhwcgorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmFsc2UtZXhwcgorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcS1wb3Mg Yy1wb3MpKSkKKyAgIkFTVCBub2RlIGZvciB0aGUgdGVybmFyeSBvcGVyYXRvciIKKyAgdGVzdC1l eHByCisgIHRydWUtZXhwcgorICBmYWxzZS1leHByCisgIHEtcG9zICAgOyBidWZmZXIgcG9zaXRp b24gb2YgPworICBjLXBvcykgIDsgYnVmZmVyIHBvc2l0aW9uIG9mIDoKKworKHB1dCAnY2wtc3Ry dWN0LWpzMi1jb25kLW5vZGUgJ2pzMi12aXNpdG9yICdqczItdmlzaXQtY29uZC1ub2RlKQorKHB1 dCAnY2wtc3RydWN0LWpzMi1jb25kLW5vZGUgJ2pzMi1wcmludGVyICdqczItcHJpbnQtY29uZC1u b2RlKQorCisoZGVmdW4ganMyLXZpc2l0LWNvbmQtbm9kZSAobiB2KQorICAoanMyLXZpc2l0LWFz dCAoanMyLWNvbmQtbm9kZS10ZXN0LWV4cHIgbikgdikKKyAgKGpzMi12aXNpdC1hc3QgKGpzMi1j b25kLW5vZGUtdHJ1ZS1leHByIG4pIHYpCisgIChqczItdmlzaXQtYXN0IChqczItY29uZC1ub2Rl LWZhbHNlLWV4cHIgbikgdikpCisKKyhkZWZ1biBqczItcHJpbnQtY29uZC1ub2RlIChuIGkpCisg IChsZXQgKChwYWQgKGpzMi1tYWtlLXBhZCBpKSkpCisgICAgKGluc2VydCBwYWQpCisgICAgKGpz Mi1wcmludC1hc3QgKGpzMi1jb25kLW5vZGUtdGVzdC1leHByIG4pIDApCisgICAgKGluc2VydCAi ID8gIikKKyAgICAoanMyLXByaW50LWFzdCAoanMyLWNvbmQtbm9kZS10cnVlLWV4cHIgbikgMCkK KyAgICAoaW5zZXJ0ICIgOiAiKQorICAgIChqczItcHJpbnQtYXN0IChqczItY29uZC1ub2RlLWZh bHNlLWV4cHIgbikgMCkpKQorCisoY2wtZGVmc3RydWN0IChqczItaW5maXgtbm9kZQorICAgICAg ICAgICAgICAgKDppbmNsdWRlIGpzMi1ub2RlKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3Rv ciBuaWwpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG1ha2UtanMyLWluZml4LW5vZGUg KCZrZXkgdHlwZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIChwb3MganMyLXRzLWN1cnNvcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW4gb3AtcG9zCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVmdCByaWdodCkpKQorICAi UmVwcmVzZW50cyBpbmZpeCBleHByZXNzaW9ucy4KK0luY2x1ZGVzIGFzc2lnbm1lbnQgb3BzIGxp a2UgYHw9JywgYW5kIHRoZSBjb21tYSBvcGVyYXRvci4KK1RoZSB0eXBlIGZpZWxkIGluaGVyaXRl ZCBmcm9tIGBqczItbm9kZScgaG9sZHMgdGhlIG9wZXJhdG9yLiIKKyAgb3AtcG9zICAgIDsgYnVm ZmVyIHBvc2l0aW9uIHdoZXJlIG9wZXJhdG9yIGJlZ2lucworICBsZWZ0ICAgICAgOyBhbnkgYGpz Mi1ub2RlJworICByaWdodCkgICAgOyBhbnkgYGpzMi1ub2RlJworCisocHV0ICdjbC1zdHJ1Y3Qt anMyLWluZml4LW5vZGUgJ2pzMi12aXNpdG9yICdqczItdmlzaXQtaW5maXgtbm9kZSkKKyhwdXQg J2NsLXN0cnVjdC1qczItaW5maXgtbm9kZSAnanMyLXByaW50ZXIgJ2pzMi1wcmludC1pbmZpeC1u b2RlKQorCisoZGVmdW4ganMyLXZpc2l0LWluZml4LW5vZGUgKG4gdikKKyAgKGpzMi12aXNpdC1h c3QgKGpzMi1pbmZpeC1ub2RlLWxlZnQgbikgdikKKyAgKGpzMi12aXNpdC1hc3QgKGpzMi1pbmZp eC1ub2RlLXJpZ2h0IG4pIHYpKQorCisoZGVmY29uc3QganMyLW9wZXJhdG9yLXRva2VucworICAo bGV0ICgodGFibGUgKG1ha2UtaGFzaC10YWJsZSA6dGVzdCAnZXEpKQorICAgICAgICAodG9rZW5z CisgICAgICAgICAobGlzdCAoY29ucyBqczItSU4gImluIikKKyAgICAgICAgICAgICAgIChjb25z IGpzMi1UWVBFT0YgInR5cGVvZiIpCisgICAgICAgICAgICAgICAoY29ucyBqczItSU5TVEFOQ0VP RiAiaW5zdGFuY2VvZiIpCisgICAgICAgICAgICAgICAoY29ucyBqczItREVMUFJPUCAiZGVsZXRl IikKKyAgICAgICAgICAgICAgIChjb25zIGpzMi1DT01NQSAiLCIpCisgICAgICAgICAgICAgICAo Y29ucyBqczItQ09MT04gIjoiKQorICAgICAgICAgICAgICAgKGNvbnMganMyLU9SICJ8fCIpCisg ICAgICAgICAgICAgICAoY29ucyBqczItQU5EICImJiIpCisgICAgICAgICAgICAgICAoY29ucyBq czItSU5DICIrKyIpCisgICAgICAgICAgICAgICAoY29ucyBqczItREVDICItLSIpCisgICAgICAg ICAgICAgICAoY29ucyBqczItQklUT1IgInwiKQorICAgICAgICAgICAgICAgKGNvbnMganMyLUJJ VFhPUiAiXiIpCisgICAgICAgICAgICAgICAoY29ucyBqczItQklUQU5EICImIikKKyAgICAgICAg ICAgICAgIChjb25zIGpzMi1FUSAiPT0iKQorICAgICAgICAgICAgICAgKGNvbnMganMyLU5FICIh PSIpCisgICAgICAgICAgICAgICAoY29ucyBqczItTFQgIjwiKQorICAgICAgICAgICAgICAgKGNv bnMganMyLUxFICI8PSIpCisgICAgICAgICAgICAgICAoY29ucyBqczItR1QgIj4iKQorICAgICAg ICAgICAgICAgKGNvbnMganMyLUdFICI+PSIpCisgICAgICAgICAgICAgICAoY29ucyBqczItTFNI ICI8PCIpCisgICAgICAgICAgICAgICAoY29ucyBqczItUlNIICI+PiIpCisgICAgICAgICAgICAg ICAoY29ucyBqczItVVJTSCAiPj4+IikKKyAgICAgICAgICAgICAgIChjb25zIGpzMi1BREQgIisi KSAgICAgICA7IGluZml4IHBsdXMKKyAgICAgICAgICAgICAgIChjb25zIGpzMi1TVUIgIi0iKSAg ICAgICA7IGluZml4IG1pbnVzCisgICAgICAgICAgICAgICAoY29ucyBqczItTVVMICIqIikKKyAg ICAgICAgICAgICAgIChjb25zIGpzMi1ESVYgIi8iKQorICAgICAgICAgICAgICAgKGNvbnMganMy LU1PRCAiJSIpCisgICAgICAgICAgICAgICAoY29ucyBqczItTk9UICIhIikKKyAgICAgICAgICAg ICAgIChjb25zIGpzMi1CSVROT1QgIn4iKQorICAgICAgICAgICAgICAgKGNvbnMganMyLVBPUyAi KyIpICAgICAgIDsgdW5hcnkgcGx1cworICAgICAgICAgICAgICAgKGNvbnMganMyLU5FRyAiLSIp ICAgICAgIDsgdW5hcnkgbWludXMKKyAgICAgICAgICAgICAgIChjb25zIGpzMi1UUklQTEVET1Qg Ii4uLiIpCisgICAgICAgICAgICAgICAoY29ucyBqczItU0hFUSAiPT09IikgICAgOyBzaGFsbG93 IGVxdWFsaXR5CisgICAgICAgICAgICAgICAoY29ucyBqczItU0hORSAiIT09IikgICAgOyBzaGFs bG93IGluZXF1YWxpdHkKKyAgICAgICAgICAgICAgIChjb25zIGpzMi1BU1NJR04gIj0iKQorICAg ICAgICAgICAgICAgKGNvbnMganMyLUFTU0lHTl9CSVRPUiAifD0iKQorICAgICAgICAgICAgICAg KGNvbnMganMyLUFTU0lHTl9CSVRYT1IgIl49IikKKyAgICAgICAgICAgICAgIChjb25zIGpzMi1B U1NJR05fQklUQU5EICImPSIpCisgICAgICAgICAgICAgICAoY29ucyBqczItQVNTSUdOX0xTSCAi PDw9IikKKyAgICAgICAgICAgICAgIChjb25zIGpzMi1BU1NJR05fUlNIICI+Pj0iKQorICAgICAg ICAgICAgICAgKGNvbnMganMyLUFTU0lHTl9VUlNIICI+Pj49IikKKyAgICAgICAgICAgICAgIChj b25zIGpzMi1BU1NJR05fQUREICIrPSIpCisgICAgICAgICAgICAgICAoY29ucyBqczItQVNTSUdO X1NVQiAiLT0iKQorICAgICAgICAgICAgICAgKGNvbnMganMyLUFTU0lHTl9NVUwgIio9IikKKyAg ICAgICAgICAgICAgIChjb25zIGpzMi1BU1NJR05fRElWICIvPSIpCisgICAgICAgICAgICAgICAo Y29ucyBqczItQVNTSUdOX01PRCAiJT0iKSkpKQorICAgIChjbC1sb29wIGZvciAoayAuIHYpIGlu IHRva2VucyBkbworICAgICAgICAgICAgIChwdXRoYXNoIGsgdiB0YWJsZSkpCisgICAgdGFibGUp KQorCisoZGVmdW4ganMyLXByaW50LWluZml4LW5vZGUgKG4gaSkKKyAgKGxldCogKCh0dCAoanMy LW5vZGUtdHlwZSBuKSkKKyAgICAgICAgIChvcCAoZ2V0aGFzaCB0dCBqczItb3BlcmF0b3ItdG9r ZW5zKSkpCisgICAgKHVubGVzcyBvcAorICAgICAgKGVycm9yICJ1bnJlY29nbml6ZWQgaW5maXgg b3BlcmF0b3IgJXMiIChqczItbm9kZS10eXBlIG4pKSkKKyAgICAoaW5zZXJ0IChqczItbWFrZS1w YWQgaSkpCisgICAgKGpzMi1wcmludC1hc3QgKGpzMi1pbmZpeC1ub2RlLWxlZnQgbikgMCkKKyAg ICAodW5sZXNzICg9IHR0IGpzMi1DT01NQSkKKyAgICAgIChpbnNlcnQgIiAiKSkKKyAgICAoaW5z ZXJ0IG9wKQorICAgIChpbnNlcnQgIiAiKQorICAgIChqczItcHJpbnQtYXN0IChqczItaW5maXgt bm9kZS1yaWdodCBuKSAwKSkpCisKKyhjbC1kZWZzdHJ1Y3QgKGpzMi1hc3NpZ24tbm9kZQorICAg ICAgICAgICAgICAgKDppbmNsdWRlIGpzMi1pbmZpeC1ub2RlKQorICAgICAgICAgICAgICAgKDpj b25zdHJ1Y3RvciBuaWwpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG1ha2UtanMyLWFz c2lnbi1ub2RlICgma2V5IHR5cGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKHBvcyBqczItdHMtY3Vyc29yKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW4gb3AtcG9zCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlZnQg cmlnaHQpKSkKKyAgIlJlcHJlc2VudHMgYW55IGFzc2lnbm1lbnQuCitUaGUgdHlwZSBmaWVsZCBo b2xkcyB0aGUgYWN0dWFsIGFzc2lnbm1lbnQgb3BlcmF0b3IuIikKKworKHB1dCAnY2wtc3RydWN0 LWpzMi1hc3NpZ24tbm9kZSAnanMyLXZpc2l0b3IgJ2pzMi12aXNpdC1pbmZpeC1ub2RlKQorKHB1 dCAnY2wtc3RydWN0LWpzMi1hc3NpZ24tbm9kZSAnanMyLXByaW50ZXIgJ2pzMi1wcmludC1pbmZp eC1ub2RlKQorCisoY2wtZGVmc3RydWN0IChqczItdW5hcnktbm9kZQorICAgICAgICAgICAgICAg KDppbmNsdWRlIGpzMi1ub2RlKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBuaWwpCisg ICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG1ha2UtanMyLXVuYXJ5LW5vZGUgKCZrZXkgdHlw ZSA7IHJlcXVpcmVkCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKHBvcyBqczItdHMtY3Vyc29yKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbiBvcGVyYW5kKSkpCisgICJBU1Qgbm9k ZSB0eXBlIGZvciB1bmFyeSBvcGVyYXRvciBub2Rlcy4KK1RoZSB0eXBlIGZpZWxkIGNhbiBiZSBO T1QsIEJJVE5PVCwgUE9TLCBORUcsIElOQywgREVDLAorVFlQRU9GLCBERUxQUk9QIG9yIFRSSVBM RURPVC4gIEZvciBJTkMgb3IgREVDLCBhICdwb3N0Zml4IG5vZGUKK3Byb3BlcnR5IGlzIGFkZGVk IGlmIHRoZSBvcGVyYXRvciBmb2xsb3dzIHRoZSBvcGVyYW5kLiIKKyAgb3BlcmFuZCkgIDsgYSBg anMyLW5vZGUnIGV4cHJlc3Npb24KKworKHB1dCAnY2wtc3RydWN0LWpzMi11bmFyeS1ub2RlICdq czItdmlzaXRvciAnanMyLXZpc2l0LXVuYXJ5LW5vZGUpCisocHV0ICdjbC1zdHJ1Y3QtanMyLXVu YXJ5LW5vZGUgJ2pzMi1wcmludGVyICdqczItcHJpbnQtdW5hcnktbm9kZSkKKworKGRlZnVuIGpz Mi12aXNpdC11bmFyeS1ub2RlIChuIHYpCisgIChqczItdmlzaXQtYXN0IChqczItdW5hcnktbm9k ZS1vcGVyYW5kIG4pIHYpKQorCisoZGVmdW4ganMyLXByaW50LXVuYXJ5LW5vZGUgKG4gaSkKKyAg KGxldCogKCh0dCAoanMyLW5vZGUtdHlwZSBuKSkKKyAgICAgICAgIChvcCAoZ2V0aGFzaCB0dCBq czItb3BlcmF0b3ItdG9rZW5zKSkKKyAgICAgICAgIChwb3N0Zml4IChqczItbm9kZS1nZXQtcHJv cCBuICdwb3N0Zml4KSkpCisgICAgKHVubGVzcyBvcAorICAgICAgKGVycm9yICJ1bnJlY29nbml6 ZWQgdW5hcnkgb3BlcmF0b3IgJXMiIHR0KSkKKyAgICAoaW5zZXJ0IChqczItbWFrZS1wYWQgaSkp CisgICAgKHVubGVzcyBwb3N0Zml4CisgICAgICAoaW5zZXJ0IG9wKSkKKyAgICAoaWYgKG9yICg9 IHR0IGpzMi1UWVBFT0YpCisgICAgICAgICAgICAoPSB0dCBqczItREVMUFJPUCkpCisgICAgICAg IChpbnNlcnQgIiAiKSkKKyAgICAoanMyLXByaW50LWFzdCAoanMyLXVuYXJ5LW5vZGUtb3BlcmFu ZCBuKSAwKQorICAgICh3aGVuIHBvc3RmaXgKKyAgICAgIChpbnNlcnQgb3ApKSkpCisKKyhjbC1k ZWZzdHJ1Y3QgKGpzMi1sZXQtbm9kZQorICAgICAgICAgICAgICAgKDppbmNsdWRlIGpzMi1zY29w ZSkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbmlsKQorICAgICAgICAgICAgICAgKDpj b25zdHJ1Y3RvciBtYWtlLWpzMi1sZXQtbm9kZSAoJmtleSAodHlwZSBqczItTEVURVhQUikKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHBvcyAo anMyLWN1cnJlbnQtdG9rZW4tYmVnKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgbGVuIHZhcnMgYm9keQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBscCBycCkpKQorICAiQVNUIG5vZGUgZm9y IGEgbGV0IGV4cHJlc3Npb24gb3IgYSBsZXQgc3RhdGVtZW50LgorTm90ZSB0aGF0IGEgbGV0IGRl Y2xhcmF0aW9uIHN1Y2ggYXMgbGV0IHg9NiwgeT03IGlzIGEgYGpzMi12YXItZGVjbC1ub2RlJy4i CisgIHZhcnMgICA7IGEgYGpzMi12YXItZGVjbC1ub2RlJworICBib2R5ICAgOyBhIGBqczItbm9k ZScgcmVwcmVzZW50aW5nIHRoZSBleHByZXNzaW9uIG9yIGJvZHkgYmxvY2sKKyAgbHAKKyAgcnAp CisKKyhwdXQgJ2NsLXN0cnVjdC1qczItbGV0LW5vZGUgJ2pzMi12aXNpdG9yICdqczItdmlzaXQt bGV0LW5vZGUpCisocHV0ICdjbC1zdHJ1Y3QtanMyLWxldC1ub2RlICdqczItcHJpbnRlciAnanMy LXByaW50LWxldC1ub2RlKQorCisoZGVmdW4ganMyLXZpc2l0LWxldC1ub2RlIChuIHYpCisgIChq czItdmlzaXQtYXN0IChqczItbGV0LW5vZGUtdmFycyBuKSB2KQorICAoanMyLXZpc2l0LWFzdCAo anMyLWxldC1ub2RlLWJvZHkgbikgdikpCisKKyhkZWZ1biBqczItcHJpbnQtbGV0LW5vZGUgKG4g aSkKKyAgKGluc2VydCAoanMyLW1ha2UtcGFkIGkpICJsZXQgKCIpCisgIChsZXQgKChwIChwb2lu dCkpKQorICAgIChqczItcHJpbnQtYXN0IChqczItbGV0LW5vZGUtdmFycyBuKSAwKQorICAgIChk ZWxldGUtcmVnaW9uIHAgKCsgcCA0KSkpCisgIChpbnNlcnQgIikgIikKKyAgKGpzMi1wcmludC1h c3QgKGpzMi1sZXQtbm9kZS1ib2R5IG4pIGkpKQorCisoY2wtZGVmc3RydWN0IChqczIta2V5d29y ZC1ub2RlCisgICAgICAgICAgICAgICAoOmluY2x1ZGUganMyLW5vZGUpCisgICAgICAgICAgICAg ICAoOmNvbnN0cnVjdG9yIG5pbCkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbWFrZS1q czIta2V5d29yZC1ub2RlICgma2V5IHR5cGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIChwb3MgKGpzMi1jdXJyZW50LXRva2VuLWJlZykp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAobGVuICgtIGpzMi10cy1jdXJzb3IgcG9zKSkpKSkKKyAgIkFTVCBub2RlIHJlcHJlc2VudGlu ZyBhIGxpdGVyYWwga2V5d29yZCBzdWNoIGFzIGBudWxsJy4KK1VzZWQgZm9yIGBudWxsJywgYHRo aXMnLCBgdHJ1ZScsIGBmYWxzZScgYW5kIGBkZWJ1Z2dlcicuCitUaGUgbm9kZSB0eXBlIGlzIHNl dCB0byBqczItTlVMTCwganMyLVRISVMsIGV0Yy4iKQorCisocHV0ICdjbC1zdHJ1Y3QtanMyLWtl eXdvcmQtbm9kZSAnanMyLXZpc2l0b3IgJ2pzMi12aXNpdC1ub25lKQorKHB1dCAnY2wtc3RydWN0 LWpzMi1rZXl3b3JkLW5vZGUgJ2pzMi1wcmludGVyICdqczItcHJpbnQta2V5d29yZC1ub2RlKQor CisoZGVmdW4ganMyLXByaW50LWtleXdvcmQtbm9kZSAobiBpKQorICAoaW5zZXJ0IChqczItbWFr ZS1wYWQgaSkKKyAgICAgICAgICAobGV0ICgodHQgKGpzMi1ub2RlLXR5cGUgbikpKQorICAgICAg ICAgICAgKGNvbmQKKyAgICAgICAgICAgICAoKD0gdHQganMyLVRISVMpICJ0aGlzIikKKyAgICAg ICAgICAgICAoKD0gdHQganMyLVNVUEVSKSAic3VwZXIiKQorICAgICAgICAgICAgICgoPSB0dCBq czItTlVMTCkgIm51bGwiKQorICAgICAgICAgICAgICgoPSB0dCBqczItVFJVRSkgInRydWUiKQor ICAgICAgICAgICAgICgoPSB0dCBqczItRkFMU0UpICJmYWxzZSIpCisgICAgICAgICAgICAgKCg9 IHR0IGpzMi1ERUJVR0dFUikgImRlYnVnZ2VyIikKKyAgICAgICAgICAgICAodCAoZXJyb3IgIklu dmFsaWQga2V5d29yZCBsaXRlcmFsIHR5cGU6ICVkIiB0dCkpKSkpKQorCisoZGVmc3Vic3QganMy LXRoaXMtb3Itc3VwZXItbm9kZS1wIChub2RlKQorICAiUmV0dXJuIHQgaWYgTk9ERSBpcyBhIGBq czItbGl0ZXJhbC1ub2RlJyBvZiB0eXBlIGpzMi1USElTIG9yIGpzMi1TVVBFUi4iCisgIChsZXQg KCh0eXBlIChqczItbm9kZS10eXBlIG5vZGUpKSkKKyAgICAob3IgKGVxIHR5cGUganMyLVRISVMp IChlcSB0eXBlIGpzMi1TVVBFUikpKSkKKworKGNsLWRlZnN0cnVjdCAoanMyLW5ldy1ub2RlCisg ICAgICAgICAgICAgICAoOmluY2x1ZGUganMyLW5vZGUpCisgICAgICAgICAgICAgICAoOmNvbnN0 cnVjdG9yIG5pbCkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbWFrZS1qczItbmV3LW5v ZGUgKCZrZXkgKHR5cGUganMyLU5FVykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKHBvcyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuIHRhcmdl dAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBh cmdzIGluaXRpYWxpemVyCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGxwIHJwKSkpCisgICJBU1Qgbm9kZSBmb3IgbmV3LWV4cHJlc3Npb24gc3Vj aCBhcyBuZXcgRm9vKCkuIgorICB0YXJnZXQgIDsgYW4gaWRlbnRpZmllciBvciByZWZlcmVuY2UK KyAgYXJncyAgICA7IGEgTGlzcCBsaXN0IG9mIGFyZ3VtZW50IG5vZGVzCisgIGxwICAgICAgOyBw b3NpdGlvbiBvZiBsZWZ0LXBhcmVuLCBuaWwgaWYgb21pdHRlZAorICBycCAgICAgIDsgcG9zaXRp b24gb2YgcmlnaHQtcGFyZW4sIG5pbCBpZiBvbWl0dGVkCisgIGluaXRpYWxpemVyKSA7IGV4cGVy aW1lbnRhbCBSaGlubyBzeW50YXg6ICBvcHRpb25hbCBganMyLW9iamVjdC1ub2RlJworCisocHV0 ICdjbC1zdHJ1Y3QtanMyLW5ldy1ub2RlICdqczItdmlzaXRvciAnanMyLXZpc2l0LW5ldy1ub2Rl KQorKHB1dCAnY2wtc3RydWN0LWpzMi1uZXctbm9kZSAnanMyLXByaW50ZXIgJ2pzMi1wcmludC1u ZXctbm9kZSkKKworKGRlZnVuIGpzMi12aXNpdC1uZXctbm9kZSAobiB2KQorICAoanMyLXZpc2l0 LWFzdCAoanMyLW5ldy1ub2RlLXRhcmdldCBuKSB2KQorICAoZG9saXN0IChhcmcgKGpzMi1uZXct bm9kZS1hcmdzIG4pKQorICAgIChqczItdmlzaXQtYXN0IGFyZyB2KSkKKyAgKGpzMi12aXNpdC1h c3QgKGpzMi1uZXctbm9kZS1pbml0aWFsaXplciBuKSB2KSkKKworKGRlZnVuIGpzMi1wcmludC1u ZXctbm9kZSAobiBpKQorICAoaW5zZXJ0IChqczItbWFrZS1wYWQgaSkgIm5ldyAiKQorICAoanMy LXByaW50LWFzdCAoanMyLW5ldy1ub2RlLXRhcmdldCBuKSkKKyAgKGluc2VydCAiKCIpCisgIChq czItcHJpbnQtbGlzdCAoanMyLW5ldy1ub2RlLWFyZ3MgbikpCisgIChpbnNlcnQgIikiKQorICAo d2hlbiAoanMyLW5ldy1ub2RlLWluaXRpYWxpemVyIG4pCisgICAgKGluc2VydCAiICIpCisgICAg KGpzMi1wcmludC1hc3QgKGpzMi1uZXctbm9kZS1pbml0aWFsaXplciBuKSkpKQorCisoY2wtZGVm c3RydWN0IChqczItbmFtZS1ub2RlCisgICAgICAgICAgICAgICAoOmluY2x1ZGUganMyLW5vZGUp CisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG5pbCkKKyAgICAgICAgICAgICAgICg6Y29u c3RydWN0b3IgbWFrZS1qczItbmFtZS1ub2RlICgma2V5ICh0eXBlIGpzMi1OQU1FKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHBvcyAoanMy LWN1cnJlbnQtdG9rZW4tYmVnKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIChsZW4gKC0ganMyLXRzLWN1cnNvcgorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoanMyLWN1cnJl bnQtdG9rZW4tYmVnKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAobmFtZSAoanMyLWN1cnJlbnQtdG9rZW4tc3RyaW5nKSkpKSkKKyAgIkFT VCBub2RlIGZvciBhIEphdmFTY3JpcHQgaWRlbnRpZmllciIKKyAgbmFtZSAgIDsgYSBzdHJpbmcK KyAgc2NvcGUpIDsgYSBganMyLXNjb3BlJyAob3B0aW9uYWwsIHVzZWQgZm9yIGNvZGVnZW4pCisK KyhwdXQgJ2NsLXN0cnVjdC1qczItbmFtZS1ub2RlICdqczItdmlzaXRvciAnanMyLXZpc2l0LW5v bmUpCisocHV0ICdjbC1zdHJ1Y3QtanMyLW5hbWUtbm9kZSAnanMyLXByaW50ZXIgJ2pzMi1wcmlu dC1uYW1lLW5vZGUpCisKKyhkZWZ1biBqczItcHJpbnQtbmFtZS1ub2RlIChuIGkpCisgIChpbnNl cnQgKGpzMi1tYWtlLXBhZCBpKQorICAgICAgICAgIChqczItbmFtZS1ub2RlLW5hbWUgbikpKQor CisoZGVmc3Vic3QganMyLW5hbWUtbm9kZS1sZW5ndGggKG5vZGUpCisgICJSZXR1cm4gaWRlbnRp ZmllciBsZW5ndGggb2YgTk9ERSwgYSBganMyLW5hbWUtbm9kZScuCitSZXR1cm5zIDAgaWYgTk9E RSBpcyBuaWwgb3IgaXRzIGlkZW50aWZpZXIgZmllbGQgaXMgbmlsLiIKKyAgKGlmIG5vZGUKKyAg ICAgIChsZW5ndGggKGpzMi1uYW1lLW5vZGUtbmFtZSBub2RlKSkKKyAgICAwKSkKKworKGNsLWRl ZnN0cnVjdCAoanMyLW51bWJlci1ub2RlCisgICAgICAgICAgICAgICAoOmluY2x1ZGUganMyLW5v ZGUpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG5pbCkKKyAgICAgICAgICAgICAgICg6 Y29uc3RydWN0b3IgbWFrZS1qczItbnVtYmVyLW5vZGUgKCZrZXkgKHR5cGUganMyLU5VTUJFUikK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg KHBvcyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGxlbiAoLSBqczItdHMtY3Vyc29yCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKGpzMi1jdXJyZW50LXRva2VuLWJlZykpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodmFsdWUgKGpzMi1jdXJyZW50LXRva2VuLXN0 cmluZykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIChudW0tdmFsdWUgKGpzMi10b2tlbi1udW1iZXIKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGpzMi1jdXJy ZW50LXRva2VuKSkpKSkpCisgICJBU1Qgbm9kZSBmb3IgYSBudW1iZXIgbGl0ZXJhbC4iCisgIHZh bHVlICAgICAgOyB0aGUgb3JpZ2luYWwgc3RyaW5nLCBlLmcuICI2LjAyZTIzIgorICBudW0tdmFs dWUpIDsgdGhlIHBhcnNlZCBudW1iZXIgdmFsdWUKKworKHB1dCAnY2wtc3RydWN0LWpzMi1udW1i ZXItbm9kZSAnanMyLXZpc2l0b3IgJ2pzMi12aXNpdC1ub25lKQorKHB1dCAnY2wtc3RydWN0LWpz Mi1udW1iZXItbm9kZSAnanMyLXByaW50ZXIgJ2pzMi1wcmludC1udW1iZXItbm9kZSkKKworKGRl ZnVuIGpzMi1wcmludC1udW1iZXItbm9kZSAobiBpKQorICAoaW5zZXJ0IChqczItbWFrZS1wYWQg aSkKKyAgICAgICAgICAobnVtYmVyLXRvLXN0cmluZyAoanMyLW51bWJlci1ub2RlLW51bS12YWx1 ZSBuKSkpKQorCisoY2wtZGVmc3RydWN0IChqczItcmVnZXhwLW5vZGUKKyAgICAgICAgICAgICAg ICg6aW5jbHVkZSBqczItbm9kZSkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbmlsKQor ICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBtYWtlLWpzMi1yZWdleHAtbm9kZSAoJmtleSAo dHlwZSBqczItUkVHRVhQKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAocG9zIChqczItY3VycmVudC10b2tlbi1iZWcpKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobGVuICgtIGpz Mi10cy1jdXJzb3IKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKSkpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlIGZsYWdz KSkpCisgICJBU1Qgbm9kZSBmb3IgYSByZWd1bGFyIGV4cHJlc3Npb24gbGl0ZXJhbC4iCisgIHZh bHVlICA7IHRoZSByZWdleHAgc3RyaW5nLCB3aXRob3V0IC8vIGRlbGltaXRlcnMKKyAgZmxhZ3Mp IDsgYSBzdHJpbmcgb2YgZmxhZ3MsIGUuZy4gYG1pJy4KKworKHB1dCAnY2wtc3RydWN0LWpzMi1y ZWdleHAtbm9kZSAnanMyLXZpc2l0b3IgJ2pzMi12aXNpdC1ub25lKQorKHB1dCAnY2wtc3RydWN0 LWpzMi1yZWdleHAtbm9kZSAnanMyLXByaW50ZXIgJ2pzMi1wcmludC1yZWdleHApCisKKyhkZWZ1 biBqczItcHJpbnQtcmVnZXhwIChuIGkpCisgIChpbnNlcnQgKGpzMi1tYWtlLXBhZCBpKQorICAg ICAgICAgICIvIgorICAgICAgICAgIChqczItcmVnZXhwLW5vZGUtdmFsdWUgbikKKyAgICAgICAg ICAiLyIpCisgIChpZiAoanMyLXJlZ2V4cC1ub2RlLWZsYWdzIG4pCisgICAgICAoaW5zZXJ0IChq czItcmVnZXhwLW5vZGUtZmxhZ3MgbikpKSkKKworKGNsLWRlZnN0cnVjdCAoanMyLXN0cmluZy1u b2RlCisgICAgICAgICAgICAgICAoOmluY2x1ZGUganMyLW5vZGUpCisgICAgICAgICAgICAgICAo OmNvbnN0cnVjdG9yIG5pbCkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbWFrZS1qczIt c3RyaW5nLW5vZGUgKCZrZXkgKHR5cGUganMyLVNUUklORykKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHBvcyAoanMyLWN1cnJlbnQtdG9r ZW4tYmVnKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKGxlbiAoLSBqczItdHMtY3Vyc29yCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGpzMi1jdXJyZW50LXRva2Vu LWJlZykpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAodmFsdWUgKGpzMi1jdXJyZW50LXRva2VuLXN0cmluZykpKSkpCisgICJTdHJpbmcg bGl0ZXJhbC4KK0VzY2FwZSBjaGFyYWN0ZXJzIGFyZSBub3QgZXZhbHVhdGVkOyBlLmcuIFxuIGlz IDIgY2hhcnMgaW4gdmFsdWUgZmllbGQuCitZb3UgY2FuIHRlbGwgdGhlIHF1b3RlIHR5cGUgYnkg bG9va2luZyBhdCB0aGUgZmlyc3QgY2hhcmFjdGVyLiIKKyAgdmFsdWUpIDsgdGhlIGNoYXJhY3Rl cnMgb2YgdGhlIHN0cmluZywgaW5jbHVkaW5nIHRoZSBxdW90ZXMKKworKHB1dCAnY2wtc3RydWN0 LWpzMi1zdHJpbmctbm9kZSAnanMyLXZpc2l0b3IgJ2pzMi12aXNpdC1ub25lKQorKHB1dCAnY2wt c3RydWN0LWpzMi1zdHJpbmctbm9kZSAnanMyLXByaW50ZXIgJ2pzMi1wcmludC1zdHJpbmctbm9k ZSkKKworKGRlZnVuIGpzMi1wcmludC1zdHJpbmctbm9kZSAobiBpKQorICAoaW5zZXJ0IChqczIt bWFrZS1wYWQgaSkKKyAgICAgICAgICAoanMyLW5vZGUtc3RyaW5nIG4pKSkKKworKGNsLWRlZnN0 cnVjdCAoanMyLXRlbXBsYXRlLW5vZGUKKyAgICAgICAgICAgICAgICg6aW5jbHVkZSBqczItbm9k ZSkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbmlsKQorICAgICAgICAgICAgICAgKDpj b25zdHJ1Y3RvciBtYWtlLWpzMi10ZW1wbGF0ZS1ub2RlICgma2V5ICh0eXBlIGpzMi1URU1QTEFU RV9IRUFEKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGJlZyBsZW4ga2lkcykpKQorICAiVGVtcGxhdGUgbGl0ZXJhbC4iCisgIGtpZHMp ICA7IGBqczItc3RyaW5nLW5vZGUnIGlzIHVzZWQgZm9yIHN0cmluZyBzZWdtZW50cywgb3RoZXIg bm9kZXMKKyAgICAgICAgIDsgZm9yIHN1YnN0aXR1dGlvbnMgaW5zaWRlLgorCisocHV0ICdjbC1z dHJ1Y3QtanMyLXRlbXBsYXRlLW5vZGUgJ2pzMi12aXNpdG9yICdqczItdmlzaXQtdGVtcGxhdGUp CisocHV0ICdjbC1zdHJ1Y3QtanMyLXRlbXBsYXRlLW5vZGUgJ2pzMi1wcmludGVyICdqczItcHJp bnQtdGVtcGxhdGUpCisKKyhkZWZ1biBqczItdmlzaXQtdGVtcGxhdGUgKG4gY2FsbGJhY2spCisg IChkb2xpc3QgKGtpZCAoanMyLXRlbXBsYXRlLW5vZGUta2lkcyBuKSkKKyAgICAoanMyLXZpc2l0 LWFzdCBraWQgY2FsbGJhY2spKSkKKworKGRlZnVuIGpzMi1wcmludC10ZW1wbGF0ZSAobiBpKQor ICAoaW5zZXJ0IChqczItbWFrZS1wYWQgaSkpCisgIChkb2xpc3QgKGtpZCAoanMyLXRlbXBsYXRl LW5vZGUta2lkcyBuKSkKKyAgICAoaWYgKGpzMi1zdHJpbmctbm9kZS1wIGtpZCkKKyAgICAgICAg KGluc2VydCAoanMyLW5vZGUtc3RyaW5nIGtpZCkpCisgICAgICAoanMyLXByaW50LWFzdCBraWQp KSkpCisKKyhjbC1kZWZzdHJ1Y3QgKGpzMi10YWdnZWQtdGVtcGxhdGUtbm9kZQorICAgICAgICAg ICAgICAgKDppbmNsdWRlIGpzMi1ub2RlKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBu aWwpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVj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QorCisoY2wt ZGVmc3RydWN0IChqczItYXJyYXktbm9kZQorICAgICAgICAgICAgICAgKDppbmNsdWRlIGpzMi1u b2RlKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBuaWwpCisgICAgICAgICAgICAgICAo OmNvbnN0cnVjdG9yIG1ha2UtanMyLWFycmF5LW5vZGUgKCZrZXkgKHR5cGUganMyLUFSUkFZTElU KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IChwb3MganMyLXRzLWN1cnNvcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBsZW4gZWxlbXMpKSkKKyAgIkFTVCBub2RlIGZvciBhbiBhcnJh eSBsaXRlcmFsLiIKKyAgZWxlbXMpICA7IGxpc3Qgb2YgZXhwcmVzc2lvbnMuICBbZm9vLCxiYXJd IHlpZWxkcyBhIG5pbCBtaWRkbGUgZWxlbWVudC4KKworKHB1dCAnY2wtc3RydWN0LWpzMi1hcnJh eS1ub2RlICdqczItdmlzaXRvciAnanMyLXZpc2l0LWFycmF5LW5vZGUpCisocHV0ICdjbC1zdHJ1 Y3QtanMyLWFycmF5LW5vZGUgJ2pzMi1wcmludGVyICdqczItcHJpbnQtYXJyYXktbm9kZSkKKwor KGRlZnVuIGpzMi12aXNpdC1hcnJheS1ub2RlIChuIHYpCisgIChkb2xpc3QgKGUgKGpzMi1hcnJh eS1ub2RlLWVsZW1zIG4pKQorICAgIChqczItdmlzaXQtYXN0IGUgdikpKSAgOyBDYW4gYmUgbmls OyBlLmcuIFthLCAsYl0uCisKKyhkZWZ1biBqczItcHJpbnQtYXJyYXktbm9kZSAobiBpKQorICAo aW5zZXJ0IChqczItbWFrZS1wYWQgaSkgIlsiKQorICAobGV0ICgoZWxlbXMgKGpzMi1hcnJheS1u b2RlLWVsZW1zIG4pKSkKKyAgICAoanMyLXByaW50LWxpc3QgZWxlbXMpCisgICAgKHdoZW4gKGFu ZCBlbGVtcyAobnVsbCAoY2FyIChsYXN0IGVsZW1zKSkpKQorICAgICAgKGluc2VydCAiLCIpKSkK KyAgKGluc2VydCAiXSIpKQorCisoY2wtZGVmc3RydWN0IChqczItY2xhc3Mtbm9kZQorICAgICAg ICAgICAgICAgKDppbmNsdWRlIGpzMi1ub2RlKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3Rv ciBuaWwpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG1ha2UtanMyLWNsYXNzLW5vZGUg KCZrZXkgKHR5cGUganMyLUNMQVNTKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIChwb3MganMyLXRzLWN1cnNvcikKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZm9ybSAnQ0xBU1NfU1RB VEVNRU5UKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIChuYW1lICIiKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGV4dGVuZHMgbGVuIGVsZW1zKSkpCisgICJBU1Qgbm9kZSBmb3IgYW4g Y2xhc3MgZXhwcmVzc2lvbi4KK2BlbGVtcycgaXMgYSBsaXN0IG9mIGBqczItb2JqZWN0LXByb3At bm9kZScsIGFuZCBgZXh0ZW5kcycgaXMgYW4KK29wdGlvbmFsIGBqczItZXhwci1ub2RlJyIKKyAg Zm9ybSAgICAgICAgICAgICA7IENMQVNTX3tTVEFURU1FTlR8RVhQUkVTU0lPTn0KKyAgbmFtZSAg ICAgICAgICAgICA7IGNsYXNzIG5hbWUgKGEgYGpzMi1ub2RlLW5hbWUnLCBvciBuaWwgaWYgYW5v bnltb3VzKQorICBleHRlbmRzICAgICAgICAgIDsgY2xhc3MgaGVyaXRhZ2UgKGEgYGpzMi1leHBy LW5vZGUnLCBvciBuaWwgaWYgbm9uZSkKKyAgZWxlbXMpCisKKyhwdXQgJ2NsLXN0cnVjdC1qczIt Y2xhc3Mtbm9kZSAnanMyLXZpc2l0b3IgJ2pzMi12aXNpdC1jbGFzcy1ub2RlKQorKHB1dCAnY2wt c3RydWN0LWpzMi1jbGFzcy1ub2RlICdqczItcHJpbnRlciAnanMyLXByaW50LWNsYXNzLW5vZGUp CisKKyhkZWZ1biBqczItdmlzaXQtY2xhc3Mtbm9kZSAobiB2KQorICAoanMyLXZpc2l0LWFzdCAo anMyLWNsYXNzLW5vZGUtbmFtZSBuKSB2KQorICAoanMyLXZpc2l0LWFzdCAoanMyLWNsYXNzLW5v ZGUtZXh0ZW5kcyBuKSB2KQorICAoZG9saXN0IChlIChqczItY2xhc3Mtbm9kZS1lbGVtcyBuKSkK KyAgICAoanMyLXZpc2l0LWFzdCBlIHYpKSkKKworKGRlZnVuIGpzMi1wcmludC1jbGFzcy1ub2Rl IChuIGkpCisgIChsZXQqICgocGFkIChqczItbWFrZS1wYWQgaSkpCisgICAgICAgICAobmFtZSAo anMyLWNsYXNzLW5vZGUtbmFtZSBuKSkKKyAgICAgICAgIChleHRlbmRzIChqczItY2xhc3Mtbm9k ZS1leHRlbmRzIG4pKQorICAgICAgICAgKGVsZW1zIChqczItY2xhc3Mtbm9kZS1lbGVtcyBuKSkp CisgICAgKGluc2VydCBwYWQgImNsYXNzIikKKyAgICAod2hlbiBuYW1lCisgICAgICAoaW5zZXJ0 ICIgIikKKyAgICAgIChqczItcHJpbnQtYXN0IG5hbWUgMCkpCisgICAgKHdoZW4gZXh0ZW5kcwor ICAgICAgKGluc2VydCAiIGV4dGVuZHMgIikKKyAgICAgIChqczItcHJpbnQtYXN0IGV4dGVuZHMp KQorICAgIChpbnNlcnQgIiB7IikKKyAgICAoZG9saXN0IChlbGVtIGVsZW1zKQorICAgICAgKGlu c2VydCAiXG4iKQorICAgICAgKGlmIChqczItbm9kZS1nZXQtcHJvcCBlbGVtICdTVEFUSUMpCisg ICAgICAgICAgKHByb2duIChpbnNlcnQgKGpzMi1tYWtlLXBhZCAoMSsgaSkpICJzdGF0aWMgIikK KyAgICAgICAgICAgICAgICAgKGpzMi1wcmludC1hc3QgZWxlbSAwKSkgOzsgVE9ETyhzZGgpOiBp bmRlbnRhdGlvbiBpc24ndCBxdWl0ZSByaWdodAorICAgICAgICAoanMyLXByaW50LWFzdCBlbGVt ICgxKyBpKSkpKQorICAgIChpbnNlcnQgIlxuIiBwYWQgIn0iKSkpCisKKyhjbC1kZWZzdHJ1Y3Qg KGpzMi1vYmplY3Qtbm9kZQorICAgICAgICAgICAgICAgKDppbmNsdWRlIGpzMi1ub2RlKQorICAg ICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBuaWwpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVj dG9yIG1ha2UtanMyLW9iamVjdC1ub2RlICgma2V5ICh0eXBlIGpzMi1PQkpFQ1RMSVQpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChwb3Mg anMyLXRzLWN1cnNvcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgbGVuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGVsZW1zKSkpCisgICJBU1Qgbm9kZSBmb3IgYW4gb2JqZWN0IGxp dGVyYWwgZXhwcmVzc2lvbi4KK2BlbGVtcycgaXMgYSBsaXN0IG9mIGBqczItb2JqZWN0LXByb3At bm9kZScuIgorICBlbGVtcykKKworKHB1dCAnY2wtc3RydWN0LWpzMi1vYmplY3Qtbm9kZSAnanMy LXZpc2l0b3IgJ2pzMi12aXNpdC1vYmplY3Qtbm9kZSkKKyhwdXQgJ2NsLXN0cnVjdC1qczItb2Jq ZWN0LW5vZGUgJ2pzMi1wcmludGVyICdqczItcHJpbnQtb2JqZWN0LW5vZGUpCisKKyhkZWZ1biBq czItdmlzaXQtb2JqZWN0LW5vZGUgKG4gdikKKyAgKGRvbGlzdCAoZSAoanMyLW9iamVjdC1ub2Rl LWVsZW1zIG4pKQorICAgIChqczItdmlzaXQtYXN0IGUgdikpKQorCisoZGVmdW4ganMyLXByaW50 LW9iamVjdC1ub2RlIChuIGkpCisgIChpbnNlcnQgKGpzMi1tYWtlLXBhZCBpKSAieyIpCisgIChq czItcHJpbnQtbGlzdCAoanMyLW9iamVjdC1ub2RlLWVsZW1zIG4pKQorICAoaW5zZXJ0ICJ9Iikp CisKKyhjbC1kZWZzdHJ1Y3QgKGpzMi1vYmplY3QtcHJvcC1ub2RlCisgICAgICAgICAgICAgICAo OmluY2x1ZGUganMyLWluZml4LW5vZGUpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG5p bCkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbWFrZS1qczItb2JqZWN0LXByb3Atbm9k ZSAoJmtleSAodHlwZSBqczItQ09MT04pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHBvcyBqczItdHMtY3Vyc29yKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxl biBsZWZ0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgcmlnaHQgb3AtcG9zKSkpCisgICJBU1Qgbm9kZSBmb3IgYW4gb2JqZWN0IGxp dGVyYWwgcHJvcDp2YWx1ZSBlbnRyeS4KK1RoZSBgbGVmdCcgZmllbGQgaXMgdGhlIHByb3BlcnR5 OiAgYSBuYW1lIG5vZGUsIHN0cmluZyBub2RlIG9yIG51bWJlciBub2RlLgorVGhlIGByaWdodCcg ZmllbGQgaXMgYSBganMyLW5vZGUnIHJlcHJlc2VudGluZyB0aGUgaW5pdGlhbGl6ZXIgdmFsdWUu CitJZiB0aGUgcHJvcGVydHkgaXMgYWJicmV2aWF0ZWQsIHRoZSBub2RlJ3MgYFNIT1JUSEFORCcg cHJvcGVydHkgaXMgbm9uLW5pbAorYW5kIGJvdGggZmllbGRzIGhhdmUgdGhlIHNhbWUgdmFsdWUu IikKKworKHB1dCAnY2wtc3RydWN0LWpzMi1vYmplY3QtcHJvcC1ub2RlICdqczItdmlzaXRvciAn anMyLXZpc2l0LWluZml4LW5vZGUpCisocHV0ICdjbC1zdHJ1Y3QtanMyLW9iamVjdC1wcm9wLW5v ZGUgJ2pzMi1wcmludGVyICdqczItcHJpbnQtb2JqZWN0LXByb3Atbm9kZSkKKworKGRlZnVuIGpz Mi1wcmludC1vYmplY3QtcHJvcC1ub2RlIChuIGkpCisgIChsZXQqICgobGVmdCAoanMyLW9iamVj dC1wcm9wLW5vZGUtbGVmdCBuKSkKKyAgICAgICAgIChjb21wdXRlZCAobm90IChvciAoanMyLXN0 cmluZy1ub2RlLXAgbGVmdCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAoanMyLW51bWJl ci1ub2RlLXAgbGVmdCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAoanMyLW5hbWUtbm9k ZS1wIGxlZnQpKSkpKQorICAgIChpbnNlcnQgKGpzMi1tYWtlLXBhZCBpKSkKKyAgICAoaWYgY29t cHV0ZWQKKyAgICAgICAgKGluc2VydCAiWyIpKQorICAgIChqczItcHJpbnQtYXN0IGxlZnQgMCkK KyAgICAoaWYgY29tcHV0ZWQKKyAgICAgICAgKGluc2VydCAiXSIpKQorICAgIChpZiAobm90IChq czItbm9kZS1nZXQtcHJvcCBuICdTSE9SVEhBTkQpKQorICAgICAgICAocHJvZ24KKyAgICAgICAg ICAoaW5zZXJ0ICI6ICIpCisgICAgICAgICAgKGpzMi1wcmludC1hc3QgKGpzMi1vYmplY3QtcHJv cC1ub2RlLXJpZ2h0IG4pIDApKSkpKQorCisoY2wtZGVmc3RydWN0IChqczItZ2V0dGVyLXNldHRl ci1ub2RlCisgICAgICAgICAgICAgICAoOmluY2x1ZGUganMyLWluZml4LW5vZGUpCisgICAgICAg ICAgICAgICAoOmNvbnN0cnVjdG9yIG5pbCkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3Ig bWFrZS1qczItZ2V0dGVyLXNldHRlci1ub2RlICgma2V5IHR5cGUgOyBHRVQsIFNFVCwgb3IgRlVO Q1RJT04KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIChwb3MganMyLXRzLWN1cnNvcikKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbiBsZWZ0IHJpZ2h0KSkp CisgICJBU1Qgbm9kZSBmb3IgYSBnZXR0ZXIvc2V0dGVyIHByb3BlcnR5IGluIGFuIG9iamVjdCBs aXRlcmFsLgorVGhlIGBsZWZ0JyBmaWVsZCBpcyB0aGUgYGpzMi1uYW1lLW5vZGUnIG5hbWluZyB0 aGUgZ2V0dGVyL3NldHRlciBwcm9wLgorVGhlIGByaWdodCcgZmllbGQgaXMgYWx3YXlzIGFuIGFu b255bW91cyBganMyLWZ1bmN0aW9uLW5vZGUnIHdpdGggYSBub2RlCitwcm9wZXJ0eSBgR0VUVEVS X1NFVFRFUicgc2V0IHRvIGpzMi1HRVQsIGpzMi1TRVQsIG9yIGpzMi1GVU5DVElPTi4gIikKKwor KHB1dCAnY2wtc3RydWN0LWpzMi1nZXR0ZXItc2V0dGVyLW5vZGUgJ2pzMi12aXNpdG9yICdqczIt dmlzaXQtaW5maXgtbm9kZSkKKyhwdXQgJ2NsLXN0cnVjdC1qczItZ2V0dGVyLXNldHRlci1ub2Rl ICdqczItcHJpbnRlciAnanMyLXByaW50LWdldHRlci1zZXR0ZXIpCisKKyhkZWZ1biBqczItcHJp bnQtZ2V0dGVyLXNldHRlciAobiBpKQorICAobGV0ICgocGFkIChqczItbWFrZS1wYWQgaSkpCisg ICAgICAgIChsZWZ0IChqczItZ2V0dGVyLXNldHRlci1ub2RlLWxlZnQgbikpCisgICAgICAgIChy aWdodCAoanMyLWdldHRlci1zZXR0ZXItbm9kZS1yaWdodCBuKSkpCisgICAgKGluc2VydCBwYWQp CisgICAgKGlmICgvPSAoanMyLW5vZGUtdHlwZSBuKSBqczItRlVOQ1RJT04pCisgICAgICAgIChp bnNlcnQgKGlmICg9IChqczItbm9kZS10eXBlIG4pIGpzMi1HRVQpICJnZXQgIiAic2V0ICIpKSkK KyAgICAoanMyLXByaW50LWFzdCBsZWZ0IDApCisgICAgKGpzMi1wcmludC1hc3QgcmlnaHQgMCkp KQorCisoY2wtZGVmc3RydWN0IChqczItcHJvcC1nZXQtbm9kZQorICAgICAgICAgICAgICAgKDpp bmNsdWRlIGpzMi1pbmZpeC1ub2RlKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBuaWwp CisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG1ha2UtanMyLXByb3AtZ2V0LW5vZGUgKCZr ZXkgKHR5cGUganMyLUdFVFBST1ApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKHBvcyBqczItdHMtY3Vyc29yKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbiBsZWZ0IHJp Z2h0KSkpCisgICJBU1Qgbm9kZSBmb3IgYSBkb3R0ZWQgcHJvcGVydHkgcmVmZXJlbmNlLCBlLmcu IGZvby5iYXIgb3IgZm9vKCkuYmFyIikKKworKHB1dCAnY2wtc3RydWN0LWpzMi1wcm9wLWdldC1u b2RlICdqczItdmlzaXRvciAnanMyLXZpc2l0LXByb3AtZ2V0LW5vZGUpCisocHV0ICdjbC1zdHJ1 Y3QtanMyLXByb3AtZ2V0LW5vZGUgJ2pzMi1wcmludGVyICdqczItcHJpbnQtcHJvcC1nZXQtbm9k ZSkKKworKGRlZnVuIGpzMi12aXNpdC1wcm9wLWdldC1ub2RlIChuIHYpCisgIChqczItdmlzaXQt YXN0IChqczItcHJvcC1nZXQtbm9kZS1sZWZ0IG4pIHYpCisgIChqczItdmlzaXQtYXN0IChqczIt cHJvcC1nZXQtbm9kZS1yaWdodCBuKSB2KSkKKworKGRlZnVuIGpzMi1wcmludC1wcm9wLWdldC1u b2RlIChuIGkpCisgIChpbnNlcnQgKGpzMi1tYWtlLXBhZCBpKSkKKyAgKGpzMi1wcmludC1hc3Qg KGpzMi1wcm9wLWdldC1ub2RlLWxlZnQgbikgMCkKKyAgKGluc2VydCAiLiIpCisgIChqczItcHJp bnQtYXN0IChqczItcHJvcC1nZXQtbm9kZS1yaWdodCBuKSAwKSkKKworKGNsLWRlZnN0cnVjdCAo anMyLWVsZW0tZ2V0LW5vZGUKKyAgICAgICAgICAgICAgICg6aW5jbHVkZSBqczItbm9kZSkKKyAg ICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbmlsKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1 Y3RvciBtYWtlLWpzMi1lbGVtLWdldC1ub2RlICgma2V5ICh0eXBlIGpzMi1HRVRFTEVNKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChw b3MganMyLXRzLWN1cnNvcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBsZW4gdGFyZ2V0IGVsZW1lbnQKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYiByYikpKQorICAiQVNU IG5vZGUgZm9yIGFuIGFycmF5IGluZGV4IGV4cHJlc3Npb24gc3VjaCBhcyBmb29bYmFyXS4iCisg IHRhcmdldCAgOyBhIGBqczItbm9kZScgLSB0aGUgZXhwcmVzc2lvbiBwcmVjZWRpbmcgdGhlICIu IgorICBlbGVtZW50IDsgYSBganM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ICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocG9zIGpzMi10cy1jdXJzb3IpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW4g dGFyZ2V0IGFyZ3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGxwIHJwKSkpCisgICJBU1Qgbm9kZSBmb3IgYSBKYXZhU2NyaXB0IGZ1bmN0aW9u IGNhbGwuIgorICB0YXJnZXQgIDsgYSBganMyLW5vZGUnIGV2YWx1YXRpbmcgdG8gdGhlIGZ1bmN0 aW9uIHRvIGNhbGwKKyAgYXJncyAgOyBhIExpc3AgbGlzdCBvZiBganMyLW5vZGUnIGFyZ3VtZW50 cworICBscCAgICA7IHBvc2l0aW9uIG9mIG9wZW4tcGFyZW4sIG9yIG5pbCBpZiBtaXNzaW5nCisg IHJwKSAgIDsgcG9zaXRpb24gb2YgY2xvc2UtcGFyZW4sIG9yIG5pbCBpZiBtaXNzaW5nCisKKyhw dXQgJ2NsLXN0cnVjdC1qczItY2FsbC1ub2RlICdqczItdmlzaXRvciAnanMyLXZpc2l0LWNhbGwt bm9kZSkKKyhwdXQgJ2NsLXN0cnVjdC1qczItY2FsbC1ub2RlICdqczItcHJpbnRlciAnanMyLXBy aW50LWNhbGwtbm9kZSkKKworKGRlZnVuIGpzMi12aXNpdC1jYWxsLW5vZGUgKG4gdikKKyAgKGpz Mi12aXNpdC1hc3QgKGpzMi1jYWxsLW5vZGUtdGFyZ2V0IG4pIHYpCisgIChkb2xpc3QgKGFyZyAo anMyLWNhbGwtbm9kZS1hcmdzIG4pKQorICAgIChqczItdmlzaXQtYXN0IGFyZyB2KSkpCisKKyhk ZWZ1biBqczItcHJpbnQtY2FsbC1ub2RlIChuIGkpCisgIChpbnNlcnQgKGpzMi1tYWtlLXBhZCBp KSkKKyAgKGpzMi1wcmludC1hc3QgKGpzMi1jYWxsLW5vZGUtdGFyZ2V0IG4pIDApCisgIChpbnNl cnQgIigiKQorICAoanMyLXByaW50LWxpc3QgKGpzMi1jYWxsLW5vZGUtYXJncyBuKSkKKyAgKGlu c2VydCAiKSIpKQorCisoY2wtZGVmc3RydWN0IChqczIteWllbGQtbm9kZQorICAgICAgICAgICAg ICAgKDppbmNsdWRlIGpzMi1ub2RlKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBuaWwp CisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG1ha2UtanMyLXlpZWxkLW5vZGUgKCZrZXkg KHR5cGUganMyLVlJRUxEKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIChwb3MganMyLXRzLWN1cnNvcikKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW4gdmFsdWUgc3Rhci1wKSkpCisg ICJBU1Qgbm9kZSBmb3IgeWllbGQgc3RhdGVtZW50IG9yIGV4cHJlc3Npb24uIgorICBzdGFyLXAg OyB3aGV0aGVyIGl0J3MgeWllbGQqCisgIHZhbHVlKSA7IG9wdGlvbmFsOiAgdmFsdWUgdG8gYmUg eWllbGRlZAorCisocHV0ICdjbC1zdHJ1Y3QtanMyLXlpZWxkLW5vZGUgJ2pzMi12aXNpdG9yICdq czItdmlzaXQteWllbGQtbm9kZSkKKyhwdXQgJ2NsLXN0cnVjdC1qczIteWllbGQtbm9kZSAnanMy LXByaW50ZXIgJ2pzMi1wcmludC15aWVsZC1ub2RlKQorCisoZGVmdW4ganMyLXZpc2l0LXlpZWxk LW5vZGUgKG4gdikKKyAgKGpzMi12aXNpdC1hc3QgKGpzMi15aWVsZC1ub2RlLXZhbHVlIG4pIHYp KQorCisoZGVmdW4ganMyLXByaW50LXlpZWxkLW5vZGUgKG4gaSkKKyAgKGluc2VydCAoanMyLW1h a2UtcGFkIGkpKQorICAoaW5zZXJ0ICJ5aWVsZCIpCisgICh3aGVuIChqczIteWllbGQtbm9kZS1z dGFyLXAgbikKKyAgICAoaW5zZXJ0ICIqIikpCisgICh3aGVuIChqczIteWllbGQtbm9kZS12YWx1 ZSBuKQorICAgIChpbnNlcnQgIiAiKQorICAgIChqczItcHJpbnQtYXN0IChqczIteWllbGQtbm9k ZS12YWx1ZSBuKSAwKSkpCisKKyhjbC1kZWZzdHJ1Y3QgKGpzMi1wYXJlbi1ub2RlCisgICAgICAg ICAgICAgICAoOmluY2x1ZGUganMyLW5vZGUpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9y IG5pbCkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbWFrZS1qczItcGFyZW4tbm9kZSAo JmtleSAodHlwZSBqczItTFApCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKHBvcyBqczItdHMtY3Vyc29yKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbiBleHByKSkpCisgICJBU1Qg bm9kZSBmb3IgYSBwYXJlbnRoZXNpemVkIGV4cHJlc3Npb24uCitJbiBwYXJ0aWN1bGFyLCB1c2Vk IHdoZW4gdGhlIHBhcmVucyBhcmUgc3ludGFjdGljYWxseSBvcHRpb25hbCwKK2FzIG9wcG9zZWQg dG8gcmVxdWlyZWQgcGFyZW5zIHN1Y2ggYXMgdGhvc2UgZW5jbG9zaW5nIGFuIGlmLWNvbmRpdGlv bmFsLiIKKyAgZXhwcikgICA7IGBqczItbm9kZScKKworKHB1dCAnY2wtc3RydWN0LWpzMi1wYXJl bi1ub2RlICdqczItdmlzaXRvciAnanMyLXZpc2l0LXBhcmVuLW5vZGUpCisocHV0ICdjbC1zdHJ1 Y3QtanMyLXBhcmVuLW5vZGUgJ2pzMi1wcmludGVyICdqczItcHJpbnQtcGFyZW4tbm9kZSkKKwor KGRlZnVuIGpzMi12aXNpdC1wYXJlbi1ub2RlIChuIHYpCisgIChqczItdmlzaXQtYXN0IChqczIt cGFyZW4tbm9kZS1leHByIG4pIHYpKQorCisoZGVmdW4ganMyLXByaW50LXBhcmVuLW5vZGUgKG4g aSkKKyAgKGluc2VydCAoanMyLW1ha2UtcGFkIGkpKQorICAoaW5zZXJ0ICIoIikKKyAgKGpzMi1w cmludC1hc3QgKGpzMi1wYXJlbi1ub2RlLWV4cHIgbikgMCkKKyAgKGluc2VydCAiKSIpKQorCiso Y2wtZGVmc3RydWN0IChqczItY29tcC1ub2RlCisgICAgICAgICAgICAgICAoOmluY2x1ZGUganMy LXNjb3BlKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBuaWwpCisgICAgICAgICAgICAg ICAoOmNvbnN0cnVjdG9yIG1ha2UtanMyLWNvbXAtbm9kZSAoJmtleSAodHlwZSBqczItQVJSQVlD T01QKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKHBvcyBqczItdHMtY3Vyc29yKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgbGVuIHJlc3VsdAorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9vcHMgZmlsdGVycworICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybSkpKQorICAiQVNU IG5vZGUgZm9yIGFuIEFycmF5IGNvbXByZWhlbnNpb24gc3VjaCBhcyBbW3gseV0gZm9yICh4IGlu IGZvbykgZm9yICh5IGluIGJhcildLiIKKyAgcmVzdWx0ICA7IHJlc3VsdCBleHByZXNzaW9uIChq dXN0IGFmdGVyIGxlZnQtYnJhY2tldCkKKyAgbG9vcHMgICA7IGEgTGlzcCBsaXN0IG9mIGBqczIt Y29tcC1sb29wLW5vZGUnCisgIGZpbHRlcnMgOyBhIExpc3AgbGlzdCBvZiBndWFyZC9ma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SkpCisgICAgKGluc2VydCBwYWQgKGlmIGdlbi1wICIoIiAi WyIpKQorICAgICh3aGVuIGxlZ2FjeS1wCisgICAgICAoanMyLXByaW50LWFzdCByZXN1bHQgMCkp CisgICAgKGRvbGlzdCAobCBsb29wcykKKyAgICAgICh3aGVuIGxlZ2FjeS1wCisgICAgICAgIChp bnNlcnQgIiAiKSkKKyAgICAgIChqczItcHJpbnQtYXN0IGwgMCkKKyAgICAgICh1bmxlc3MgbGVn YWN5LXAKKyAgICAgICAgKGluc2VydCAiICIpKSkKKyAgICAoZG9saXN0IChmIGZpbHRlcnMpCisg ICAgICAod2hlbiBsZWdhY3ktcAorICAgICAgICAoaW5zZXJ0ICIgIikpCisgICAgICAoaW5zZXJ0 ICJpZiAoIikKKyAgICAgIChqczItcHJpbnQtYXN0IGYgMCkKKyAgICAgIChpbnNlcnQgIikiKQor ICAgICAgKHVubGVzcyBsZWdhY3ktcAorICAgICAgICAoaW5zZXJ0ICIgIikpKQorICAgICh1bmxl c3MgbGVnYWN5LXAKKyAgICAgIChqczItcHJpbnQtYXN0IHJlc3VsdCAwKSkKKyAgICAoaW5zZXJ0 IChpZiBnZW4tcCAiKSIgIl0iKSkpKQorCisoY2wtZGVmc3RydWN0IChqczItY29tcC1sb29wLW5v ZGUKKyAgICAgICAgICAgICAgICg6aW5jbHVkZSBqczItZm9yLWluLW5vZGUpCisgICAgICAgICAg ICAgICAoOmNvbnN0cnVjdG9yIG5pbCkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbWFr ZS1qczItY29tcC1sb29wLW5vZGUgKCZrZXkgKHR5cGUganMyLUZPUikKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHBvcyBqczItdHMt Y3Vyc29yKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBsZW4gaXRlcmF0b3IKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgb2JqZWN0IGluLXBvcworICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoLXAKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ZWFjaC1wb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgZm9yb2YtcAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBscCBycCkpKQorICAiQVNUIHN1YnRyZWUgZm9yIGVhY2gg J2ZvciAoZm9vIGluIGJhciknIGxvb3AgaW4gYW4gYXJyYXkgY29tcHJlaGVuc2lvbi4iKQorCiso cHV0ICdjbC1zdHJ1Y3QtanMyLWNvbXAtbG9vcC1ub2RlICdqczItdmlzaXRvciAnanMyLXZpc2l0 LWNvbXAtbG9vcCkKKyhwdXQgJ2NsLXN0cnVjdC1qczItY29tcC1sb29wLW5vZGUgJ2pzMi1wcmlu dGVyICdqczItcHJpbnQtY29tcC1sb29wKQorCisoZGVmdW4ganMyLXZpc2l0LWNvbXAtbG9vcCAo biB2KQorICAoanMyLXZpc2l0LWFzdCAoanMyLWNvbXAtbG9vcC1ub2RlLWl0ZXJhdG9yIG4pIHYp CisgIChqczItdmlzaXQtYXN0IChqczItY29tcC1sb29wLW5vZGUtb2JqZWN0IG4pIHYpKQorCiso ZGVmdW4ganMyLXByaW50LWNvbXAtbG9vcCAobiBfaSkKKyAgKGluc2VydCAiZm9yICIpCisgICh3 aGVuIChqczItY29tcC1sb29wLW5vZGUtZm9yZWFjaC1wIG4pIChpbnNlcnQgImVhY2ggIikpCisg IChpbnNlcnQgIigiKQorICAoanMyLXByaW50LWFzdCAoanMyLWNvbXAtbG9vcC1ub2RlLWl0ZXJh dG9yIG4pIDApCisgIChpbnNlcnQgKGlmIChqczItY29tcC1sb29wLW5vZGUtZm9yb2YtcCBuKQor ICAgICAgICAgICAgICAiIG9mICIgIiBpbiAiKSkKKyAgKGpzMi1wcmludC1hc3QgKGpzMi1jb21w LWxvb3Atbm9kZS1vYmplY3QgbikgMCkKKyAgKGluc2VydCAiKSIpKQorCisoY2wtZGVmc3RydWN0 IChqczItZW1wdHktZXhwci1ub2RlCisgICAgICAgICAgICAgICAoOmluY2x1ZGUganMyLW5vZGUp CisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG5pbCkKKyAgICAgICAgICAgICAgICg6Y29u c3RydWN0b3IgbWFrZS1qczItZW1wdHktZXhwci1ub2RlICgma2V5ICh0eXBlIGpzMi1FTVBUWSkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIChwb3MgKGpzMi1jdXJyZW50LXRva2VuLWJlZykpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW4pKSkKKyAgIkFTVCBub2Rl IGZvciBhbiBlbXB0eSBleHByZXNzaW9uLiIpCisKKyhwdXQgJ2NsLXN0cnVjdC1qczItZW1wdHkt ZXhwci1ub2RlICdqczItdmlzaXRvciAnanMyLXZpc2l0LW5vbmUpCisocHV0ICdjbC1zdHJ1Y3Qt anMyLWVtcHR5LWV4cHItbm9kZSAnanMyLXByaW50ZXIgJ2pzMi1wcmludC1ub25lKQorCisoY2wt ZGVmc3RydWN0IChqczIteG1sLW5vZGUKKyAgICAgICAgICAgICAgICg6aW5jbHVkZSBqczItYmxv Y2stbm9kZSkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbmlsKQorICAgICAgICAgICAg ICAgKDpjb25zdHJ1Y3RvciBtYWtlLWpzMi14bWwtbm9kZSAoJmtleSAodHlwZSBqczItWE1MKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocG9z IChqczItY3VycmVudC10b2tlbi1iZWcpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBsZW4ga2lkcykpKQorICAiQVNUIG5vZGUgZm9yIGluaXRp YWwgcGFyc2Ugb2YgRTRYIGxpdGVyYWxzLgorVGhlIGtpZHMgZmllbGQgaXMgYSBsaXN0IG9mIFhN TCBmcmFnbWVudHMsIGVhY2ggYSBganMyLXN0cmluZy1ub2RlJyBvcgorYSBganMyLXhtbC1qcy1l eHByLW5vZGUnLiAgRXF1aXZhbGVudCB0byBSaGlubydzIFhtbExpdGVyYWwgbm9kZS4iKQorCiso cHV0ICdjbC1zdHJ1Y3QtanMyLXhtbC1ub2RlICdqczItdmlzaXRvciAnanMyLXZpc2l0LWJsb2Nr KQorKHB1dCAnY2wtc3RydWN0LWpzMi14bWwtbm9kZSAnanMyLXByaW50ZXIgJ2pzMi1wcmludC14 bWwtbm9kZSkKKworKGRlZnVuIGpzMi1wcmludC14bWwtbm9kZSAobiBpKQorICAoZG9saXN0IChr aWQgKGpzMi14bWwtbm9kZS1raWRzIG4pKQorICAgIChqczItcHJpbnQtYXN0IGtpZCBpKSkpCisK KyhjbC1kZWZzdHJ1Y3QgKGpzMi14bWwtanMtZXhwci1ub2RlCisgICAgICAgICAgICAgICAoOmlu Y2x1ZGUganMyLXhtbC1ub2RlKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBuaWwpCisg ICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG1ha2UtanMyLXhtbC1qcy1leHByLW5vZGUgKCZr ZXkgKHR5cGUganMyLVhNTCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAocG9zIGpzMi10cy1jdXJzb3IpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuIGV4cHIp KSkKKyAgIkFTVCBub2RlIGZvciBhbiBlbWJlZGRlZCBKYXZhU2NyaXB0IHtleHByZXNzaW9ufSBp biBhbiBFNFggbGl0ZXJhbC4KK1RoZSBzdGFydCBhbmQgZW5kIGZpZWxkcyBjb3JyZXNwb25kIHRv IHRoZSBjdXJseS1icmFjZXMuIgorICBleHByKSAgOyBhIGBqczItZXhwci1ub2RlJyBvZiBzb21l IHNvcnQKKworKHB1dCAnY2wtc3RydWN0LWpzMi14bWwtanMtZXhwci1ub2RlICdqczItdmlzaXRv ciAnanMyLXZpc2l0LXhtbC1qcy1leHByKQorKHB1dCAnY2wtc3RydWN0LWpzMi14bWwtanMtZXhw ci1ub2RlICdqczItcHJpbnRlciAnanMyLXByaW50LXhtbC1qcy1leHByKQorCisoZGVmdW4ganMy LXZpc2l0LXhtbC1qcy1leHByIChuIHYpCisgIChqczItdmlzaXQtYXN0IChqczIteG1sLWpzLWV4 cHItbm9kZS1leHByIG4pIHYpKQorCisoZGVmdW4ganMyLXByaW50LXhtbC1qcy1leHByIChuIGkp CisgIChpbnNlcnQgKGpzMi1tYWtlLXBhZCBpKSkKKyAgKGluc2VydCAieyIpCisgIChqczItcHJp bnQtYXN0IChqczIteG1sLWpzLWV4cHItbm9kZS1leHByIG4pIDApCisgIChpbnNlcnQgIn0iKSkK KworKGNsLWRlZnN0cnVjdCAoanMyLXhtbC1kb3QtcXVlcnktbm9kZQorICAgICAgICAgICAgICAg KDppbmNsdWRlIGpzMi1pbmZpeC1ub2RlKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBu aWwpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG1ha2UtanMyLXhtbC1kb3QtcXVlcnkt bm9kZSAoJmtleSAodHlwZSBqczItRE9UUVVFUlkpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocG9zIGpzMi10cy1jdXJzb3Ip CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBvcC1wb3MgbGVuIGxlZnQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJpZ2h0IHJwKSkpCisgICJBU1Qgbm9kZSBm b3IgYW4gRTRYIGZvby4oYmFyKSBmaWx0ZXIgZXhwcmVzc2lvbi4KK05vdGUgdGhhdCB0aGUgbGVm dC1wYXJlbiBpcyBhdXRvbWF0aWNhbGx5IHRoZSBjaGFyYWN0ZXIgaW1tZWRpYXRlbHkKK2ZvbGxv d2luZyB0aGUgZG90ICguKSBpbiB0aGUgb3BlcmF0b3IuICBObyB3aGl0ZXNwYWNlIGlzIHBlcm1p dHRlZAorYmV0d2VlbiB0aGUgZG90IGFuZCB0aGUgbHAgYnkgdGhlIHNjYW5uZXIuIgorICBycCkK KworKHB1dCAnY2wtc3RydWN0LWpzMi14bWwtZG90LXF1ZXJ5LW5vZGUgJ2pzMi12aXNpdG9yICdq czItdmlzaXQtaW5maXgtbm9kZSkKKyhwdXQgJ2NsLXN0cnVjdC1qczIteG1sLWRvdC1xdWVyeS1u b2RlICdqczItcHJpbnRlciAnanMyLXByaW50LXhtbC1kb3QtcXVlcnkpCisKKyhkZWZ1biBqczIt cHJpbnQteG1sLWRvdC1xdWVyeSAobiBpKQorICAoaW5zZXJ0IChqczItbWFrZS1wYWQgaSkpCisg IChqczItcHJpbnQtYXN0IChqczIteG1sLWRvdC1xdWVyeS1ub2RlLWxlZnQgbikgMCkKKyAgKGlu c2VydCAiLigiKQorICAoanMyLXByaW50LWFzdCAoanMyLXhtbC1kb3QtcXVlcnktbm9kZS1yaWdo dCBuKSAwKQorICAoaW5zZXJ0ICIpIikpCisKKyhjbC1kZWZzdHJ1Y3QgKGpzMi14bWwtcmVmLW5v ZGUKKyAgICAgICAgICAgICAgICg6aW5jbHVkZSBqczItbm9kZSkKKyAgICAgICAgICAgICAgICg6 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vZGUnIG1heSBhbHNvIGJlIGEgc3RhbmRhbG9uZSBwcmltYXJ5IGV4cHJlc3Npb24g d2l0aAorbm8gZXhwbGljaXQgdGFyZ2V0LCB3aGljaCBpcyB2YWxpZCBpbiBjZXJ0YWluIGV4cHJl c3Npb24gY29udGV4dHMgc3VjaCBhcworCisgIGNvbXBhbnkuLmVtcGxveWVlLihAaWQgPCAxMDAp CisKK2luIHRoaXMgY2FzZSwgdGhlIEBpZCBpcyBhIGBqczIteG1sLXJlZicgdGhhdCBpcyBwYXJ0 IG9mIGFuIGluZml4ICc8JworZXhwcmVzc2lvbiB3aG9zZSBwYXJlbnQgaXMgYSBganMyLXhtbC1k b3QtcXVlcnktbm9kZScuIgorICBuYW1lc3BhY2UKKyAgYXQtcG9zCisgIGNvbG9uLXBvcykKKwor KGRlZnN1YnN0IGpzMi14bWwtcmVmLW5vZGUtYXR0ci1hY2Nlc3MtcCAobm9kZSkKKyAgIlJldHVy biBub24tbmlsIGlmIHRoaXMgZXhwcmVzc2lvbiBiZWdhbiB3aXRoIGFuIEAtdG9rZW4uIgorICAo YW5kIChudW1iZXJwIChqczIteG1sLXJlZi1ub2RlLWF0LXBvcyBub2RlKSkKKyAgICAgICAoY2wt cGx1c3AgKGpzMi14bWwtcmVmLW5vZGUtYXQtcG9zIG5vZGUpKSkpCisKKyhjbC1kZWZzdHJ1Y3Qg KGpzMi14bWwtcHJvcC1yZWYtbm9kZQorICAgICAgICAgICAgICAgKDppbmNsdWRlIGpzMi14bWwt cmVmLW5vZGUpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG5pbCkKKyAgICAgICAgICAg ICAgICg6Y29uc3RydWN0b3IgbWFrZS1qczIteG1sLXByb3AtcmVmLW5vZGUgKCZrZXkgKHR5cGUg anMyLVJFRl9OQU1FKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAocG9zIChqczItY3VycmVudC10b2tlbi1iZWcpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBs ZW4gcHJvcG5hbWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgbmFtZXNwYWNlIGF0LXBvcworICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xvbi1wb3MpKSkKKyAg IkFTVCBub2RlIGZvciBhbiBFNFggWE1MIFtleHByXSBwcm9wZXJ0eS1yZWYgZXhwcmVzc2lvbi4K K1RoZSBKYXZhU2NyaXB0IHN5bnRheCBpcyBhbiBvcHRpb25hbCBALCBhbiBvcHRpb25hbCBuczo6 LCBhbmQgYSBuYW1lLgorCisgIFsgJ0AnIF0gWyBuYW1lICc6OicgXSBuYW1lCisKK0V4YW1wbGVz IGluY2x1ZGUgbmFtZSwgbnM6Om5hbWUsIG5zOjoqLCAqOjpuYW1lLCAqOjoqLCBAYXR0ciwgQG5z OjphdHRyLAorQG5zOjoqLCBAKjo6YXR0ciwgQCo6OiosIGFuZCBAKi4KKworVGhlIG5vZGUgc3Rh cnRzIGF0IHRoZSBAIHRva2VuLCBpZiBwcmVzZW50LiAgT3RoZXJ3aXNlIGl0IHN0YXJ0cyBhdCB0 aGUKK25hbWVzcGFjZSBuYW1lLiAgVGhlIG5vZGUgYm91bmRzIGV4dGVuZCB0aHJvdWdoIHRoZSBj bG9zaW5nIHJpZ2h0LWJyYWNrZXQsCitvciBpZiBpdCBpcyBtaXNzaW5nIGR1ZSB0byBhIHN5bnRh eCBlcnJvciwgdGhyb3VnaCB0aGUgZW5kIG9mIHRoZSBpbmRleAorZXhwcmVzc2lvbi4iCisgIHBy b3BuYW1lKQorCisocHV0ICdjbC1zdHJ1Y3QtanMyLXhtbC1wcm9wLXJlZi1ub2RlICdqczItdmlz aXRvciAnanMyLXZpc2l0LXhtbC1wcm9wLXJlZi1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AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHBvcyAo anMyLWN1cnJlbnQtdG9rZW4tYmVnKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuIGV4cHIgbGIgcmIKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZXNw YWNlIGF0LXBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBjb2xvbi1wb3MpKSkKKyAgIkFTVCBub2RlIGZvciBhbiBFNFggWE1M IFtleHByXSBtZW1iZXItcmVmIGV4cHJlc3Npb24uCitTeW50YXg6CisKKyBbICdAJyBdIFsgbmFt ZSAnOjonIF0gJ1snIGV4cHIgJ10nCisKK0V4YW1wbGVzIGluY2x1ZGUgbnM6OltleHByXSwgQG5z OjpbZXhwcl0sIEBbZXhwcl0sICo6OltleHByXSBhbmQgQCo6OltleHByXS4KKworTm90ZSB0aGF0 IHRoZSBmb3JtIFtleHByXSAoaS5lLiBubyBuYW1lc3BhY2Ugb3IgYXR0cmlidXRlLXF1YWxpZmll cikKK2lzIG5vdCBhIGxlZ2FsIEU0WCBYTUwgZWxlbWVudC1yZWYgZXhwcmVzc2lvbiwgc2luY2Ug aXQncyBhbHJlYWR5IHVzZWQKK2ZvciBzdGFuZGFyZCBKYXZhU2NyaXB0IGVsZW1lbnQtZ2V0IGFy cmF5IGluZGV4aW5nLiAgSGVuY2UsIGEKK2BqczIteG1sLWVsZW0tcmVmLW5vZGUnIGFsd2F5cyBo YXMgZWl0aGVyIHRoZSBhdHRyaWJ1dGUtcXVhbGlmaWVyLCBhCitub24tbmlsIG5hbWVzcGFjZSBu b2RlLCBvciBib3RoLgorCitUaGUgbm9kZSBzdGFydHMgYXQgdGhlIEAgdG9rZW4sIGlmIHByZXNl bnQuICBPd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KQorICAoaW5zZXJ0ICJbIikKKyAgKGlmIChq czIteG1sLWVsZW0tcmVmLW5vZGUtZXhwciBuKQorICAgICAgKGpzMi1wcmludC1hc3QgKGpzMi14 bWwtZWxlbS1yZWYtbm9kZS1leHByIG4pIDApKQorICAoaW5zZXJ0ICJdIikpCisKKzs7OyBQbGFj ZWhvbGRlciBub2RlcyBmb3Igd2hlbiB3ZSB0cnkgcGFyc2luZyB0aGUgWE1MIGxpdGVyYWxzIHN0 cnVjdHVyYWxseS4KKworKGNsLWRlZnN0cnVjdCAoanMyLXhtbC1zdGFydC10YWctbm9kZQorICAg ICAgICAgICAgICAgKDppbmNsdWRlIGpzMi14bWwtbm9kZSkKKyAgICAgICAgICAgICAgICg6Y29u c3RydWN0b3IgbmlsKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBtYWtlLWpzMi14bWwt c3RhcnQtdGFnLW5vZGUgKCZrZXkgKHR5cGUganMyLVhNTCkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChwb3MganMyLXRzLWN1 cnNvcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGxlbiBuYW1lIGF0dHJzIGtpZHMKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVtcHR5LXApKSkKKyAgIkFT VCBub2RlIGZvciBhbiBYTUwgc3RhcnQtdGFnLiAgTm90IGN1cnJlbnRseSB1c2VkLgorVGhlIGBr aWRzJyBmaWVsZCBpcyBhIExpc3AgbGlzdCBvZiBjaGlsZCBjb250ZW50IG5vZGVzLiIKKyAgbmFt ZSAgICAgIDsgYSBganMyLXhtbC1uYW1lLW5vZGUnCisgIGF0dHJzICAgICA7IGEgTGlzcCBsaXN0 IG9mIGBqczIteG1sLWF0dHItbm9kZScKKyAgZW1wdHktcCkg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wuCisoY2wtZGVmc3RydWN0IChqczIteG1sLWVuZC10YWctbm9kZQorICAgICAgICAgICAgICAg KDppbmNsdWRlIGpzMi14bWwtbm9kZSkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3Igbmls KQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBtYWtlLWpzMi14bWwtZW5kLXRhZy1ub2Rl ICgma2V5ICh0eXBlIGpzMi1YTUwpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKHBvcyBqczItdHMtY3Vyc29yKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbiBu YW1lKSkpCisgICJBU1Qgbm9kZSBmb3IgYW4gWE1MIGVuZC10YWcuICBOb3QgY3VycmVudGx5IHVz ZWQuIgorICBuYW1lKSAgOyBhIGBqczIteG1sLW5hbWUtbm9kZScKKworKHB1dCAnY2wtc3RydWN0 LWpzMi14bWwtZW5kLXRhZy1ub2RlICdqczItdmlzaXRvciAnanMyLXZpc2l0LXhtbC1lbmQtdGFn KQorKHB1dCAnY2wtc3RydWN0LWpzMi14bWwtZW5kLXRhZy1ub2RlICdqczItcHJpbnRlciAnanMy LXByaW50LXhtbC1lbmQtdGFnKQorCisoZGVmdW4ganMyLXZpc2l0LXhtbC1lbmQtdGFnIChuIHYp CisgIChqczItdmlzaXQtYXN0IChqczIteG1sLWVuZC10YWctbm9kZS1uYW1lIG4pIHYpKQorCiso ZGVmdW4ganMyLXByaW50LXhtbC1lbmQtdGFnIChuIGkpCisgIChpbnNlcnQgKGpzMi1tYWtlLXBh ZCBpKSkKKyAgKGluc2VydCAiPC8iKQorICAoanMyLXByaW50LWFzdCAoanMyLXhtbC1lbmQtdGFn LW5vZGUtbmFtZSBuKSAwKQorICAoaW5zZXJ0ICI+IikpCisKKyhjbC1kZWZzdHJ1Y3QgKGpzMi14 bWwtbmFtZS1ub2RlCisgICAgICAgICAgICAgICAoOmluY2x1ZGUganMyLXhtbC1ub2RlKQorICAg ICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBuaWwpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVj dG9yIG1ha2UtanMyLXhtbC1uYW1lLW5vZGUgKCZrZXkgKHR5cGUganMyLVhNTCkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocG9zIGpz Mi10cy1jdXJzb3IpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgbGVuIG5hbWVzcGFjZSBraWRzKSkpCisgICJBU1Qgbm9kZSBmb3IgYW4g RTRYIFhNTCBuYW1lLiAgTm90IGN1cnJlbnRseSB1c2VkLgorQW55IFhNTCBuYW1lIGNhbiBiZSBx dWFsaWZpZWQgd2l0aCBhIG5hbWVzcGFjZSwgaGVuY2UgdGhlIG5hbWVzcGFjZSBmaWVsZC4KK0Z1 cnRoZXIsIGFueSBFNFggbmFtZSBjYW4gYmUgY29tcHJpc2VkIG9mIGFyYml0cmFyeSBKYXZhU2Ny aXB0IHt9IGV4cHJlc3Npb25zLgorVGhlIGtpZHMgZmllbGQgaXMgYSBsaXN0IG9mIGBqczItbmFt ZS1ub2RlJyBhbmQgYGpzMi14bWwtanMtZXhwci1ub2RlJy4KK0ZvciBhIHNpbXBsZSBuYW1lLCB0 aGUga2lkcyBsaXN0IGhhcyBleGFjdGx5IG9uZSBub2RlLCBhIGBqczItbmFtZS1ub2RlJy4iCisg IG5hbWVzcGFjZSkgIDsgYSBganMyLXN0cmluZy1ub2RlJworCisocHV0ICdjbC1zdHJ1Y3QtanMy LXhtbC1uYW1lLW5vZGUgJ2pzMi12aXNpdG9yICdqczItdmlzaXQteG1sLW5hbWUtbm9kZSkKKyhw dXQgJ2NsLXN0cnVjdC1qczIteG1sLW5hbWUtbm9kZSAnanMyLXByaW50ZXIgJ2pzMi1wcmludC14 bWwtbmFtZS1ub2RlKQorCisoZGVmdW4ganMyLXZpc2l0LXhtbC1uYW1lLW5vZGUgKG4gdikKKyAg KGpzMi12aXNpdC1hc3QgKGpzMi14bWwtbmFtZS1ub2RlLW5hbWVzcGFjZSBuKSB2KSkKKworKGRl ZnVuIGpzMi1wcmludC14bWwtbmFtZS1ub2RlIChuIGkpCisgIChpbnNlcnQgKGpzMi1tYWtlLXBh ZCBpKSkKKyAgKHdoZW4gKGpzMi14bWwtbmFtZS1ub2RlLW5hbWVzcGFjZSBuKQorICAgIChqczIt cHJpbnQtYXN0IChqczIteG1sLW5hbWUtbm9kZS1uYW1lc3BhY2UgbikgMCkKKyAgICAoaW5zZXJ0 ICI6OiIpKQorICAoZG9saXN0IChraWQgKGpzMi14bWwtbmFtZS1ub2RlLWtpZHMgbikpCisgICAg KGpzMi1wcmludC1hc3Qga2lkIDApKSkKKworKGNsLWRlZnN0cnVjdCAoanMyLXhtbC1waS1ub2Rl CisgICAgICAgICAgICAgICAoOmluY2x1ZGUganMyLXhtbC1ub2RlKQorICAgICAgICAgICAgICAg KDpjb25zdHJ1Y3RvciBuaWwpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG1ha2UtanMy LXhtbC1waS1ub2RlICgma2V5ICh0eXBlIGpzMi1YTUwpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChwb3MganMyLXRzLWN1cnNvcikKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVu IG5hbWUgYXR0cnMpKSkKKyAgIkFTVCBub2RlIGZvciBhbiBFNFggWE1MIHByb2Nlc3NpbmcgaW5z dHJ1Y3Rpb24uICBOb3QgY3VycmVudGx5IHVzZWQuIgorICBuYW1lICAgOyBhIGBqczIteG1sLW5h bWUtbm9kZScKKyAgYXR0cnMpIDsgYSBsaXN0IG9mIGBqczIteG1sLWF0dHItbm9kZScKKworKHB1 dCAnY2wtc3RydWN0LWpzMi14bWwtcGktbm9kZSAnanMyLXZpc2l0b3IgJ2pzMi12aXNpdC14bWwt cGktbm9kZSkKKyhwdXQgJ2NsLXN0cnVjdC1qczIteG1sLXBpLW5vZGUgJ2pzMi1wcmludGVyICdq czItcHJpbnQteG1sLXBpLW5vZGUpCisKKyhkZWZ1biBqczItdmlzaXQteG1sLXBpLW5vZGUgKG4g dikKKyAgKGpzMi12aXNpdC1hc3QgKGpzMi14bWwtcGktbm9kZS1uYW1lIG4pIHYpCisgIChkb2xp c3QgKGF0dHIgKGpzMi14bWwtcGktbm9kZS1hdHRycyBuKSkKKyAgICAoanMyLXZpc2l0LWFzdCBh dHRyIHYpKSkKKworKGRlZnVuIGpzMi1wcmludC14bWwtcGktbm9kZSAobiBpKQorICAoaW5zZXJ0 IChqczItbWFrZS1wYWQgaSkgIjw/IikKKyAgKGpzMi1wcmludC1hc3QgKGpzMi14bWwtcGktbm9k ZS1uYW1lIG4pKQorICAod2hlbiAoanMyLXhtbC1waS1ub2RlLWF0dHJzIG4pCisgICAgKGluc2Vy dCAiICIpCisgICAgKGpzMi1wcmludC1saXN0IChqczIteG1sLXBpLW5vZGUtYXR0cnMgbikpKQor ICAoaW5zZXJ0ICI/PiIpKQorCisoY2wtZGVmc3RydWN0IChqczIteG1sLWNkYXRhLW5vZGUKKyAg ICAgICAgICAgICAgICg6aW5jbHVkZSBqczIteG1sLW5vZGUpCisgICAgICAgICAgICAgICAoOmNv bnN0cnVjdG9yIG5pbCkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbWFrZS1qczIteG1s LWNkYXRhLW5vZGUgKCZrZXkgKHR5cGUganMyLVhNTCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHBvcyBqczItdHMtY3Vyc29yKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBsZW4gY29udGVudCkpKQorICAiQVNUIG5vZGUgZm9yIGEgQ0RBVEEgZXNjYXBlIHNlY3Rpb24u ICBOb3QgY3VycmVudGx5IHVzZWQuIgorICBjb250ZW50KSAgOyBhIGBqczItc3RyaW5nLW5vZGUn IHdpdGggbm9kZS1wcm9wZXJ0eSAncXVvdGUtdHlwZSAnY2RhdGEKKworKHB1dCAnY2wtc3RydWN0 LWpzMi14bWwtY2RhdGEtbm9kZSAnanMyLXZpc2l0b3IgJ2pzMi12aXNpdC14bWwtY2RhdGEtbm9k ZSkKKyhwdXQgJ2NsLXN0cnVjdC1qczIteG1sLWNkYXRhLW5vZGUgJ2pzMi1wcmludGVyICdqczIt cHJpbnQteG1sLWNkYXRhLW5vZGUpCisKKyhkZWZ1biBqczItdmlzaXQteG1sLWNkYXRhLW5vZGUg KG4gdikKKyAgKGpzMi12aXNpdC1hc3QgKGpzMi14bWwtY2RhdGEtbm9kZS1jb250ZW50IG4pIHYp KQorCisoZGVmdW4ganMyLXByaW50LXhtbC1jZGF0YS1ub2RlIChuIGkpCisgIChpbnNlcnQgKGpz Mi1tYWtlLXBhZCBpKSkKKyAgKGpzMi1wcmludC1hc3QgKGpzMi14bWwtY2RhdGEtbm9kZS1jb250 ZW50IG4pKSkKKworKGNsLWRlZnN0cnVjdCAoanMyLXhtbC1hdHRyLW5vZGUKKyAgICAgICAgICAg ICAgICg6aW5jbHVkZSBqczIteG1sLW5vZGUpCisgICAgICAgICAgICAgICAoOmNvbnN0cnVjdG9y IG5pbCkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbWFrZS1qczItYXR0ci1ub2RlICgm a2V5ICh0eXBlIGpzMi1YTUwpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAocG9zIGpzMi10cy1jdXJzb3IpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW4gbmFtZSB2YWx1ZQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXEtcG9zIHF1 b3RlLXR5cGUpKSkKKyAgIkFTVCBub2RlIHJlcHJlc2VudGluZyBhIGZvbz0nYmFyJyBYTUwgYXR0 cmlidXRlIHZhbHVlLiAgTm90IHlldCB1c2VkLiIKKyAgbmFtZSAgIDsgYSBganMyLXhtbC1uYW1l LW5vZGUnCisgIHZhbHVlICA7IGEgYGpzMi14bWwtbmFtZS1ub2RlJworICBlcS1wb3MgOyBidWZm ZXIgcG9zaXRpb24gb2YgIj0iIHNpZ24KKyAgcXVvdGUtdHlwZSkgOyAnc2luZ2xlIG9yICdkb3Vi bGUKKworKHB1dCAnY2wtc3RydWN0LWpzMi14bWwtYXR0ci1ub2RlICdqczItdmlzaXRvciAnanMy LXZpc2l0LXhtbC1hdHRyLW5vZGUpCisocHV0ICdjbC1zdHJ1Y3QtanMyLXhtbC1hdHRyLW5vZGUg J2pzMi1wcmludGVyICdqczItcHJpbnQteG1sLWF0dHItbm9kZSkKKworKGRlZnVuIGpzMi12aXNp dC14bWwtYXR0ci1ub2RlIChuIHYpCisgIChqczItdmlzaXQtYXN0IChqczIteG1sLWF0dHItbm9k ZS1uYW1lIG4pIHYpCisgIChqczItdmlzaXQtYXN0IChqczIteG1sLWF0dHItbm9kZS12YWx1ZSBu KSB2KSkKKworKGRlZnVuIGpzMi1wcmludC14bWwtYXR0ci1ub2RlIChuIGkpCisgIChsZXQgKChx dW90ZSAoaWYgKGVxIChqczIteG1sLWF0dHItbm9kZS1xdW90ZS10eXBlIG4pICdzaW5nbGUpCisg ICAgICAgICAgICAgICAgICAgIiciCisgICAgICAgICAgICAgICAgICJcIiIpKSkKKyAgICAoaW5z ZXJ0IChqczItbWFrZS1wYWQgaSkpCisgICAgKGpzMi1wcmludC1hc3QgKGpzMi14bWwtYXR0ci1u b2RlLW5hbWUgbikgMCkKKyAgICAoaW5zZXJ0ICI9IiBxdW90ZSkKKyAgICAoanMyLXByaW50LWFz dCAoanMyLXhtbC1hdHRyLW5vZGUtdmFsdWUgbikgMCkKKyAgICAoaW5zZXJ0IHF1b3RlKSkpCisK KyhjbC1kZWZzdHJ1Y3QgKGpzMi14bWwtdGV4dC1ub2RlCisgICAgICAgICAgICAgICAoOmluY2x1 ZGUganMyLXhtbC1ub2RlKQorICAgICAgICAgICAgICAgKDpjb25zdHJ1Y3RvciBuaWwpCisgICAg ICAgICAgICAgICAoOmNvbnN0cnVjdG9yIG1ha2UtanMyLXRleHQtbm9kZSAoJmtleSAodHlwZSBq czItWE1MKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKHBvcyBqczItdHMtY3Vyc29yKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgbGVuIGNvbnRlbnQpKSkKKyAgIkFTVCBub2RlIGZvciBh biBFNFggWE1MIHRleHQgbm9kZS4gIE5vdCBjdXJyZW50bHkgdXNlZC4iCisgIGNvbnRlbnQpICA7 IGEgTGlzcCBsaXN0IG9mIGBqczItc3RyaW5nLW5vZGUnIGFuZCBganMyLXhtbC1qcy1leHByLW5v ZGUnCisKKyhwdXQgJ2NsLXN0cnVjdC1qczIteG1sLXRleHQtbm9kZSAnanMyLXZpc2l0b3IgJ2pz Mi12aXNpdC14bWwtdGV4dC1ub2RlKQorKHB1dCAnY2wtc3RydWN0LWpzMi14bWwtdGV4dC1ub2Rl ICdqczItcHJpbnRlciAnanMyLXByaW50LXhtbC10ZXh0LW5vZGUpCisKKyhkZWZ1biBqczItdmlz aXQteG1sLXRleHQtbm9kZSAobiB2KQorICAoanMyLXZpc2l0LWFzdCAoanMyLXhtbC10ZXh0LW5v ZGUtY29udGVudCBuKSB2KSkKKworKGRlZnVuIGpzMi1wcmludC14bWwtdGV4dC1ub2RlIChuIGkp CisgIChpbnNlcnQgKGpzMi1tYWtlLXBhZCBpKSkKKyAgKGRvbGlzdCAoa2lkIChqczIteG1sLXRl eHQtbm9kZS1jb250ZW50IG4pKQorICAgIChqczItcHJpbnQtYXN0IGtpZCkpKQorCisoY2wtZGVm c3RydWN0IChqczIteG1sLWNvbW1lbnQtbm9kZQorICAgICAgICAgICAgICAgKDppbmNsdWRlIGpz Mi14bWwtbm9kZSkKKyAgICAgICAgICAgICAgICg6Y29uc3RydWN0b3IgbmlsKQorICAgICAgICAg ICAgICAgKDpjb25zdHJ1Y3RvciBtYWtlLWpzMi14bWwtY29tbWVudC1ub2RlICgma2V5ICh0eXBl IGpzMi1YTUwpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKHBvcyBqczItdHMtY3Vyc29yKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxlbikpKQorICAiQVNUIG5v ZGUgZm9yIEU0WCBYTUwgY29tbWVudC4gIE5vdCBjdXJyZW50bHkgdXNlZC4iKQorCisocHV0ICdj bC1zdHJ1Y3QtanMyLXhtbC1jb21tZW50LW5vZGUgJ2pzMi12aXNpdG9yICdqczItdmlzaXQtbm9u ZSkKKyhwdXQgJ2NsLXN0cnVjdC1qczIteG1sLWNvbW1lbnQtbm9kZSAnanMyLXByaW50ZXIgJ2pz Mi1wcmludC14bWwtY29tbWVudCkKKworKGRlZnVuIGpzMi1wcmludC14bWwtY29tbWVudCAobiBp KQorICAoaW5zZXJ0IChqczItbWFrZS1wYWQgaSkKKyAgICAgICAgICAoanMyLW5vZGUtc3RyaW5n IG4pKSkKKworOzs7IE5vZGUgdXRpbGl0aWVzCisKKyhkZWZzdWJzdCBqczItbm9kZS1saW5lIChu KQorICAiRmV0Y2ggdGhlIHNvdXJjZSBsaW5lIG51bWJlciBhdCB0aGUgc3RhcnQgb2Ygbm9kZSBO LgorVGhpcyBpcyBPKG4pIGluIHRoZSBsZW5ndGggb2YgdGhlIHNvd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gICAgICAgc2liIChjYXIga2lkcykpKQorICAgIHNp YikpCisKKyhkZWZ1biBqczItbm9kZS1uZXh0LXNpYmxpbmcgKG5vZGUpCisgICJSZXR1cm4gdGhl IG5leHQgc3RhdGVtZW50IGluIHBhcmVudCBibG9jay4KK1JldHVybnMgbmlsIGlmIE5PREUgaXMg bm90IGluIHRoZSBibG9jaywgb3IgUEFSRU5UIGlzIG5vdAorYSBibG9jayBub2RlLCBvciBpZiBO T0RFIGlzIHRoZSBsYXN0IHN0YXRlbWVudC4iCisgIChsZXQqICgocCAoanMyLW5vZGUtcGFyZW50 IG5vZGUpKQorICAgICAgICAgKGtpZHMgKGpzMi1ub2RlLWNoaWxkLWxpc3QgcCkpKQorICAgICh3 aGlsZSAoYW5kIGtpZHMKKyAgICAgICAgICAgICAgICAobm90IChlcSBub2RlIChjYXIga2lkcykp KSkKKyAgICAgIChzZXRxIGtpZHMgKGNkciBraWRzKSkpCisgICAgKGNhZHIga2lkcykpKQorCiso ZGVmdW4ganMyLW5vZGUtZmluZC1jaGlsZC1iZWZvcmUgKHBvcyBwYXJlbnQgJm9wdGlvbmFsIGFm dGVyKQorICAiRmluZCB0aGUgbGFzdCBjaGlsZCB0aGF0IHN0YXJ0cyBiZWZvcmUgUE9TIGluIHBh cmVudC4KK0lmIEFGVEVSIGlzIG5vbi1uaWwsIHJldHVybnMgZmlyc3QgY2hpbGQgc3RhcnRpbmcg YWZ0ZXIgUE9TLgorUE9TIGlzIGFuIGFic29sdXRlIGJ1ZmZlciBwb3NpdGlvbi4gIFBBUkVOVCBp cyBhbnkgbm9kZQorc3VwcG9ydGVkIGJ5IGBqczItbm9kZS1jaGlsZC1saXN0Jy4KK1JldHVybnMg bmlsIGlmIG5vIGFwcGxpY2FibGUgY2hpbGQgaXMgZm91bmQuIgorICAobGV0ICgoa2lkcyAoaWYg KGpzMi1mdW5jdGlvbi1ub2RlLXAgcGFyZW50KQorICAgICAgICAgICAgICAgICAgKGpzMi1ibG9j ay1ub2RlLWtpZHMgKGpzMi1mdW5jdGlvbi1ub2RlLWJvZHkgcGFyZW50KSkKKyAgICAgICAgICAg ICAgICAoanMyLW5vZGUtY2hpbGQtbGlzdCBwYXJlbnQpKSkKKyAgICAgICAgKGJlZyAoanMyLW5v ZGUtYWJzLXBvcyAoaWYgKGpzMi1mdW5jdGlvbi1ub2RlLXAgcGFyZW50KQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAoanMyLWZ1bmN0aW9uLW5vZGUtYm9keSBwYXJlbnQpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnQpKSkKKyAgICAgICAga2lkIHJl c3VsdCBmbgorICAgICAgICAoY29udGludWUgdCkpCisgICAgKHNldHEgZm4gKGlmIGFmdGVyICc+ PSAnPCkpCisgICAgKHdoaWxlIChhbmQga2lkcyBjb250aW51ZSkKKyAgICAgIChzZXRxIGtpZCAo Y2FyIGtpZHMpKQorICAgICAgKGlmIChmdW5jYWxsIGZuICgrIGJlZyAoanMyLW5vZGUtcG9zIGtp ZCkpIHBvcykKKyAgICAgICAgICAoc2V0cSByZXN1bHQga2lkCisgICAgICAgICAgICAgICAgY29u dGludWUgKG5vdCBhZnRlcikpCisgICAgICAgIChzZXRxIGNvbnRpbnVlIGFmdGVyKSkKKyAgICAg IChzZXRxIGtpZHMgKGNkciBraWRzKSkpCisgICAgcmVzdWx0KSkKKworKGRlZnVuIGpzMi1ub2Rl LWZpbmQtY2hpbGQtYWZ0ZXIgKHBvcyBwYXJlbnQpCisgICJGaW5kIGZpcnN0IGNoaWxkIHRoYXQg c3RhcnRzIGFmdGVyIFBPUyBpbiBwYXJlbnQuCitQT1MgaXMgYW4gYWJzb2x1dGUgYnVmZmVyIHBv c2l0aW9uLiAgUEFSRU5UIGlzIGFueSBub2RlCitzdXBwb3J0ZWQgYnkgYGpzMi1ub2RlLWNoaWxk LWxpc3QnLgorUmV0dXJucyBuaWwgaWYgbm8gYXBwbGljYWJsZSBjaGlsZCBpcyBmb3VuZC4iCisg IChqczItbm9kZS1maW5kLWNoaWxkLWJlZm9yZSBwb3MgcGFyZW50ICdhZnRlcikpCisKKyhkZWZ1 biBqczItbm9kZS1yZXBsYWNlLWNoaWxkIChwb3MgcGFyZW50IG5ldy1ub2RlKQorICAiUmVwbGFj ZSBub2RlIGF0IGluZGV4IFBPUyBpbiBQQVJFTlQgd2l0aCBORVctTk9ERS4KK09ubHkgd29ya3Mg Zm9yIHBhcmVudHMgc3VwcG9ydGVkIGJ5IGBqczItbm9kZS1jaGlsZC1saXN0Jy4iCisgIChsZXQg KChraWRzIChqczItbm9kZS1jaGlsZC1saXN0IHBhcmVudCkpCisgICAgICAgIChpIDApKQorICAg ICh3aGlsZSAoPCBpIHBvcykKKyAgICAgIChzZXRxIGtpZHMgKGNkciBraWRzKQorICAgICAgICAg ICAgaSAoMSsgaSkpKQorICAgIChzZXRjYXIga2lkcyBuZXctbm9kZSkKKyAgICAoanMyLW5vZGUt YWRkLWNoaWxkcmVuIHBhcmVudCBuZXctbm9kZSkpKQorCisoZGVmdW4ganMyLW5vZGUtYnVmZmVy IChuKQorICAiUmV0dXJuIHRoZSBidWZmZXIgYXNzb2NpYXRlZCB3aXRoIEFTVCBOLgorUmV0dXJu cyBuaWwgaWYgdGhlIGJ1ZmZlciBpcyBub3Qgc2V0IGFzIGEgcHJvcGVydHkgb24gdGhlIHJvb3QK K25vZGUsIG9yIGlmIHBhcmVudCBsaW5rcyB3ZXJlIG5vdCByZWNvcmRlZCBkdXJpbmcgcGFyc2lu Zy4iCisgIChsZXQgKChyb290IChqczItbm9kZS1yb290IG4pKSkKKyAgICAoYW5kIHJvb3QKKyAg ICAgICAgIChqczItYXN0LXJvb3QtcCByb290KQorICAgICAgICAgKGpzMi1hc3Qtcm9vdC1idWZm ZXIgcm9vdCkpKSkKKworKGRlZnVuIGpzMi1ibG9jay1ub2RlLXB1c2ggKG4ga2lkKQorICAiUHVz aCBqczItbm9kZSBLSUQgb250byB0aGUgZW5kIG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Qgbm9kZXMgYXJlIGlnbm9yZWQuIgorICAobGV0 ICgoYXN0IGpzMi1tb2RlLWFzdCkKKyAgICAgICAgcmVzdWx0KQorICAgICh1bmxlc3MgYXN0Cisg ICAgICAoZXJyb3IgIk5vIEphdmFTY3JpcHQgQVNUIGF2YWlsYWJsZSIpKQorICAgIDs7IExvb2sg dGhyb3VnaCBjb21tZW50cyBmaXJzdCwgc2luY2UgdGhleSBtYXkgYmUgaW5zaWRlIG5vZGVzIHRo YXQKKyAgICA7OyB3b3VsZCBvdGhlcndpc2UgcmVwb3J0IGEgbWF0Y2guCisgICAgKHNldHEgcG9z IChvciBwb3MgKHBvaW50KSkKKyAgICAgICAgICByZXN1bHQgKGlmICg+IHBvcyAoanMyLW5vZGUt YWJzLWVuZCBhc3QpKQorICAgICAgICAgICAgICAgICAgICAgYXN0CisgICAgICAgICAgICAgICAg ICAgKGlmIChub3Qgc2tpcC1jb21tZW50cykKKyAgICAgICAgICAgICAgICAgICAgICAgKGpzMi1j b21tZW50LWF0LXBvaW50IHBvcykpKSkKKyAgICAodW5sZXNzIHJlc3VsdAorICAgICAgKHNldHEg anMyLWRpc2NvdmVyZWQtbm9kZSBuaWwKKyAgICAgICAgICAgIGpzMi12aXNpdG9yLW9mZnNldCAw CisgICAgICAgICAgICBqczItbm9kZS1zZWFyY2gtcG9pbnQgcG9zKQorICAgICAgKHVud2luZC1w cm90ZWN0CisgICAgICAgICAgKGNhdGNoICdqczItdmlzaXQtZG9uZQorICAgICAgICAgICAgKGpz Mi12aXNpdC1hc3QgYXN0ICMnanMyLW5vZGUtYXQtcG9pbnQtdmlzaXRvcikpCisgICAgICAgIChz ZXRxIGpzMi12aXNpdG9yLW9mZnNldCBuaWwKKyAgICAgICAgICAgICAganMyLW5vZGUtc2VhcmNo LXBvaW50IG5pbCkpCisgICAgICAoc2V0cSByZXN1bHQganMyLWRpc2NvdmVyZWQtbm9kZSkpCisg ICAgOzsgbWF5IGhhdmUgZm91bmQgYSBjb21tZW50IGJleW9uZCBlbmQgb2YgbGFzdCBjaGlsZCBu b2RlLAorICAgIDs7IHNpbmNlIHZpc2l0aW5nIHRoZSBhc3Qtcm9vdCBsb29rcyBhdCB0aGUgY29t bWVudC1saXN0IGxhc3QuCisgICAgKGlmIChhbmQgc2tpcC1jb21tZW50cworICAgICAgICAgICAg IChqczItY29tbWVudC1ub2RlLXAgcmVzdWx0KSkKKyAgICAgICAgKHNldHEgcmVzdWx0IG5pbCkp CisgICAgKG9yIHJlc3VsdCBqczItbW9kZS1hc3QpKSkKKworKGRlZnVuIGpzMi1ub2RlLWF0LXBv aW50LXZpc2l0b3IgKG5vZGUgZW5kLXApCisgIChsZXQgKChyZWwtcG9zIChqczItbm9kZS1wb3Mg bm9kZSkpCisgICAgICAgIGFicy1wb3MKKyAgICAgICAgYWJzLWVuZAorICAgICAgICAocG9pbnQg anMyLW5vZGUtc2VhcmNoLXBvaW50KSkKKyAgICAoY29uZAorICAgICAoZW5kLXAKKyAgICAgIDs7 IHRoaXMgZXZhbHVhdGVzIHRvIGEgbm9uLW5pbCByZXR1cm4gdmFsdWUsIGV2ZW4gaWYgaXQncyB6 ZXJvCisgICAgICAoY2wtZGVjZiBqczItdmlzaXRvci1vZmZzZXQgcmVsLXBvcykpCisgICAgIDs7 IHdlIGFscmVhZHkgbG9va2VkIGZvciBjb21tZW50cyBiZWZvcmUgdmlzaXRpbmcsIGFuZCBkb24n dCB3YW50IHRoZW0gbm93CisgICAgICgoanMyLWNvbW1lbnQtbm9kZS1wIG5vZGUpCisgICAgICBu aWwpCisgICAgICh0CisgICAgICAoc2V0cSBhYnMtcG9zIChjbC1pbmNmIGpzMi12aXNpdG9yLW9m ZnNldCByZWwtcG9zKQorICAgICAgICAgICAgOzsgd2Ugb25seSB3YW50IHRvIHVzZSB0aGUgbm9k ZSBpZiB0aGUgcG9pbnQgaXMgYmVmb3JlCisgICAgICAgICAgICA7OyB0aGUgbGFzdCBjaGFyYWN0 ZXIgcG9zaXRpb24gaW4gdGhlIG5vZGUsIHNvIHdlIGRlY3JlbWVudAorICAgICAgICAgICAgOzsg dGhlIGFic29sdXRlIGVuZCBieSAxLgorICAgICAgICAgICAgYWJzLWVuZCAoKyBhYnMtcG9zIChq czItbm9kZS1sZW4gbm9kZSkgLTEpKQorICAgICAgKGNvbmQKKyAgICAgICA7OyBJZiB0aGlzIG5v ZGUgc3RhcnRzIGFmdGVyIHNlYXJjaC1wb2ludCwgc3RvcCB0aGUgc2VhcmNoLgorICAgICAgICgo PiBhYnMtcG9zIHBvaW50KQorICAgICAgICAodGhyb3cgJ2pzMi12aXNpdC1kb25lIG5pbCkpCisg ICAgICAgOzsgSWYgdGhpcyBub2RlIGVuZHMgYmVmb3JlIHRoZSBzZWFyY2gtcG9pbnQsIGRvbid0 IGNoZWNrIGtpZHMuCisgICAgICAgKCg+IHBvaW50IGFicy1lbmQpCisgICAgICAgIG5pbCkKKyAg ICAgICAodAorICAgICAgICA7OyBPdGhlcndpc2UgcG9pbnQgaXMgd2l0aGluIHRoaXMgbm9kZSwg cG9zc2libHkgaW4gYSBjaGlsZC4KKyAgICAgICAgKHNldHEganMyLWRpc2NvdmVyZWQtbm9kZSBu b2RlKQorICAgICAgICB0KSkpKSkpICA7IGtlZXAgcHJvY2Vzc2luZyBraWRzIHRvIGxvb2sgZm9y IG1vcmUgc3BlY2lmaWMgbWF0Y2gKKworKGRlZnN1YnN0IGpzMi1ibG9jay1jb21tZW50LXAgKG5v ZGUpCisgICJSZXR1cm4gbm9uLW5pbCBpZiBOT0RFIGlzIGEgY29tbWVudCBub2RlIG9mIGZvcm1h dCBganNkb2MnIG9yIGBibG9jaycuIgorICAoYW5kIChqczItY29tbWVudC1ub2RlLXAgbm9kZSkK KyAgICAgICAobWVtcSAoanMyLWNvbW1lbnQtbm9kZS1mb3JtYXQgbm9kZSkgJyhqc2RvYyBibG9j aykpKSkKKworOzsgVE9ETzogIHB1dCB0aGUgY29tbWVudHMgaW4gYSB2ZWN0b3IgYW5kIGJpbmFy eS1zZWFyY2ggdGhlbSBpbnN0ZWFkCisoZGVmdW4ganMyLWNvbW1lbnQtYXQtcG9pbnQgKCZvcHRp b25hbCBwb3MpCisgICJMb29rIHRocm91Z2ggc2Nhbm5lZCBjb21tZW50IG5vZGVzIGZvciBvbmUg Y29udGFpbmluZyBQT1MuCitQT1MgaXMgYSBidWZmZXIgcG9zaXRpb24gdGhhdCBkZWZhdWx0cyB0 byBjdXJyZW50IHBvaW50LgorRnVuY3Rpb24gcmV0dXJucyBuaWwgaWYgUE9TIHdhcyBub3QgaW4g YW55IGNvbW1lbnQgbm9kZS4iCisgIChsZXQgKChhc3QganMyLW1vZGUtYXN0KQorICAgICAgICAo eCAob3IgcG9zIChwb2ludCkpKQorICAgICAgICBiZWcgZW5kKQorICAgICh1bmxlc3MgYXN0Cisg ICAgICAoZXJyb3IgIk5vIEphdmFTY3JpcHQgQVNUIGF2YWlsYWJsZSIpKQorICAgIChjYXRjaCAn ZG9uZQorICAgICAgOzsgQ29tbWVudHMgYXJlIHN0b3JlZCBpbiBsZXhpY2FsIG9yZGVyLgorICAg ICAgKGRvbGlzdCAoY29tbWVudCAoanMyLWFzdC1yb290LWNvbW1lbnRzIGFzdCkgbmlsKQorICAg ICAgICAoc2V0cSBiZWcgKGpzMi1ub2RlLWFicy1wb3MgY29tbWVudCkKKyAgICAgICAgICAgICAg ZW5kICgrIGJlZyAoanMyLW5vZGUtbGVuIGNvbW1lbnQpKSkKKyAgICAgICAgKGlmIChhbmQgKD49 IHggYmVnKQorICAgICAgICAgICAgICAgICAoPD0geCBlbmQpKQorICAgICAgICAgICAgKHRocm93 ICdkb25lIGNvbW1lbnQpKSkpKSkKKworKGRlZnVuIGpzMi1tb2RlLWZpbmQtcGFyZW50LWZuIChu b2RlKQorICAiRmluZCBmdW5jdGlvbiBlbmNsb3NpbmcgTk9ERS4KK1JldHVybnMgbmlsIGlmIE5P REUgaXMgbm90IGluc2lkZSBhIGZ1bmN0aW9uLiIKKyAgKHNldHEgbm9kZSAoanMyLW5vZGUtcGFy ZW50IG5vZGUpKQorICAod2hpbGUgKGFuZCBub2RlIChub3QgKGpzMi1mdW5jdGlvbi1ub2RlLXAg bm9kZSkpKQorICAgIChzZXRxIG5vZGUgKGpzMi1ub2RlLXBhcmVudCBub2RlKSkpCisgIChhbmQg KGpzMi1mdW5jdGlvbi1ub2RlLXAgbm9kZSkgbm9kZSkpCisKKyhkZWZ1biBqczItbW9kZS1maW5k LWVuY2xvc2luZy1mbiAobm9kZSkKKyAgIkZpbmQgZnVuY3Rpb24gb3Igcm9vdCBlbmNsb3Npbmcg Tk9ERS4iCisgIChpZiAoanMyLWFzdC1yb290LXAgbm9kZSkKKyAgICAgIG5vZGUKKyAgICAoc2V0 cSBub2RlIChqczItbm9kZS1wYXJlbnQgbm9kZSkpCisgICAgKHdoaWxlIChub3QgKG9yIChqczIt YXN0LXJvb3QtcCBub2RlKQorICAgICAgICAgICAgICAgICAgICAoanMyLWZ1bmN0aW9uLW5vZGUt cCBub2RlKSkpCisgICAgICAoc2V0cSBub2RlIChqczItbm9kZS1wYXJlbnQgbm9kZSkpKQorICAg IG5vZGUpKQorCisgKGRlZnVuIGpzMi1tb2RlLWZpbmQtZW5jbG9zaW5nLW5vZGUgKGJlZyBlbmQp CisgICJGaW5kIG5vZGUgZnVsbHkgZW5jbG9zaW5nIEJFRyBhbmQgRU5ELiIKKyAgKGxldCAoKG5v ZGUgKGpzMi1ub2RlLWF0LXBvaW50IGJlZykpCisgICAgICAgIHBvcworICAgICAgICAoY29udGlu dWUgdCkpCisgICAgKHdoaWxlIGNvbnRpbnVlCisgICAgICAoaWYgKG9yIChqczItYXN0LXJvb3Qt cCBub2RlKQorICAgICAgICAgICAgICAoYW5kCisgICAgICAgICAgICAgICAoPD0gKHNldHEgcG9z IChqczItbm9kZS1hYnMtcG9zIG5vZGUpKSBiZWcpCisgICAgICAgICAgICAgICAoPj0gKCsgcG9z IChqczItbm9kZS1sZW4gbm9kZSkpIGVuZCkpKQorICAg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VuIGpzMi1wcmludC1ub25lIChfbm9kZSBfaW5kZW50KQorICAiVmlzaXRvciBm b3IgQVNUIG5vZGUgd2l0aCBubyBwcmludGVkIHJlcHJlc2VudGF0aW9uLiIpCisKKyhkZWZ1biBq czItcHJpbnQtYm9keSAobm9kZSBpbmRlbnQpCisgICJQcmludCBhIHN0YXRlbWVudCwgb3IgYSBi bG9jayB3aXRob3V0IGJyYWNlcy4iCisgIChpZiAoanMyLWJsb2NrLW5vZGUtcCBub2RlKQorICAg ICAgKGRvbGlzdCAoa2lkIChqczItYmxvY2stbm9kZS1raWRzIG5vZGUpKQorICAgICAgICAoanMy LXByaW50LWFzdCBraWQgaW5kZW50KSkKKyAgICAoanMyLXByaW50LWFzdCBub2RlIGluZGVudCkp KQorCisoZGVmdW4ganMyLXByaW50LWxpc3QgKGFyZ3MgJm9wdGlvbmFsIGRlbGltaXRlcikKKyAg KGNsLWxvb3Agd2l0aCBsZW4gPSAobGVuZ3RoIGFyZ3MpCisgICAgICAgICAgIGZvciBhcmcgaW4g YXJncworICAgICAgICAgICBmb3IgY291bnQgZnJvbSAxCisgICAgICAgICAgIGRvCisgICAgICAg ICAgICh3aGVuIGFyZyAoanMyLXByaW50LWFzdCBhcmcgMCkpCisgICAgICAgICAgIChpZiAoPCBj b3VudCBsZW4pCisgICAgICAgICAgICAgICAoaW5zZXJ0IChvciBkZWxpbWl0ZXIgIiwgIikpKSkp CisKKyhkZWZ1biBqczItcHJpbnQtdHJlZSAoYXN0KQorICAiUHJpbnRzIGFuIEFTVCB0byB0aGUg Y3VycmVudCBidWZmZXIuCitNYWtlcyBganMyLWFzdC1wYXJlbnQtbm9kZXMnIGF2YWlsYWJsZSB0 byB0aGUgcHJpbnRlciBmdW5jdGlvbnMuIgorICAobGV0ICgobWF4LWxpc3AtZXZhbC1kZXB0aCAo bWF4IG1heC1saXNwLWV2YWwtZGVwdGggMTUwMCkpKQorICAgIChqczItcHJpbnQtYXN0IGFzdCkp KQorCisoZGVmdW4ganMyLXByaW50LWFzdCAobm9kZSAmb3B0aW9uYWwgaW5kZW50KQorICAiSGVs cGVyIGZ1bmN0aW9uIGZvciBwcmludGluZyBBU1Qgbm9kZXMuCitSZXF1aXJlcyBganMyLWFzdC1w YXJlbnQtbm9kZXMnIHRvIGJlIG5vbi1uaWwuCitZb3Ugc2hvdWxkIHVzZSBganMyLXByaW50LXRy ZWUnIGluc3RlYWQgb2YgdGhpcyBmdW5jdGlvbi4iCisgIChsZXQgKChwcmludGVyIChnZXQgKGFy ZWYgbm9kZSAwKSAnanMyLXByaW50ZXIpKQorICAgICAgICAoaSAob3IgaW5kZW50IDApKSkKKyAg ICA7OyBUT0RPOiAgd2VkZ2UgY29tbWVudHMgaW4gaGVyZSBzb21ld2hlcmUKKyAgICAoaWYgcHJp bnRlcgorICAgICAgICAoZnVuY2FsbCBwcmludGVyIG5vZGUgaSkpKSkKKworKGRlZmNvbnN0IGpz Mi1zaWRlLWVmZmVjdGluZy10b2tlbnMKKyAgKGxldCAoKHRva2VucyAobWFrZS1ib29sLXZlY3Rv ciBqczItbnVtLXRva2VucyBuaWwpKSkKKyAgICAoZG9saXN0ICh0dCAobGlzdCBqczItQVNTSUdO CisgICAgICAgICAgICAgICAgICAgICAganMyLUFTU0lHTl9BREQKKyAgICAgICAgICAgICAgICAg ICAgICBqczItQVNTSUdOX0JJVEFORAorICAgICAgICAgICAgICAgICAgICAgIGpzMi1BU1NJR05f QklUT1IKKyAgICAgICAgICAgICAgICAgICAgICBqczItQVNTSUdOX0JJVFhPUgorICAgICAgICAg ICAgICAgICAgICAgIGpzMi1BU1NJR05fRElWCisgICAgICAgICAgICAgICAgICAgICAganMyLUFT U0lHTl9MU0gKKyAgICAgICAgICAgICAgICAgICAgICBqczItQVNTSUdOX01PRAorICAgICAgICAg ICAgICAgICAgICAgIGpzMi1BU1NJR05fTVVMCisgICAgICAgICAgICAgICAgICAgICAganMyLUFT U0lHTl9SU0gKKyAgICAgICAgICAgICAgICAgICAgICBqczItQVNTSUdOX1NVQgorICAgICAgICAg ICAgICAgICAgICAgIGpzMi1BU1NJR05fVVJTSAorICAgICAgICAgICAgICAgICAgICAgIGpzMi1C TE9DSworICAgICAgICAgICAgICAgICAgICAgIGpzMi1CUkVBSworICAgICAgICAgICAgICAgICAg ICAgIGpzMi1DQUxMCisgICAgICAgICAgICAgICAgICAgICAganMyLUNBVENICisgICAgICAgICAg ICAgICAgICAgICAganMyLUNBVENIX1NDT1BFCisgICAgICAgICAgICAgICAgICAgICAganMyLUNM QVNTCisgICAgICAgICAgICAgICAgICAgICAganMyLUNPTlNUCisgICAgICAgICAgICAgICAgICAg ICAganMyLUNPTlRJTlVFCisgICAgICAgICAgICAgICAgICAgICAganMyLURFQlVHR0VSCisgICAg ICAgICAgICAgICAgICAgICAganMyLURFQworICAgICAgICAgICAgICAgICAgICAgIGpzMi1ERUxQ Uk9QCisgICAgICAgICAgICAgICAgICAgICAganMyLURFTF9SRUYKKyAgICAgICAgICAgICAgICAg ICAgICBqczItRE8KKyAgICAgICAgICAgICAgICAgICAgICBqczItRUxTRQorICAgICAgICAgICAg ICAgICAgICAgIGpzMi1FTVBUWQorICAgICAgICAgICAgICAgICAgICAgIGpzMi1FTlRFUldJVEgK KyAgICAgICAgICAgICAgICAgICAgICBqczItRVhQT1JUCisgICAgICAgICAgICAgICAgICAgICAg anMyLUVYUFJfUkVTVUxUCisgICAgICAgICAgICAgICAgICAgICAganMyLUZJTkFMTFkKKyAgICAg ICAgICAgICAgICAgICAgICBqczItRk9SCisgICAgICAgICAgICAgICAgICAgICAganMyLUZVTkNU SU9OCisgICAgICAgICAgICAgICAgICAgICAganMyLUdPVE8KKyAgICAgICAgICAgICAgICAgICAg ICBqczItSUYKKyAgICAgICAgICAgICAgICAgICAgICBqczItSUZFUQorICAgICAgICAgICAgICAg ICAgICAgIGpzMi1JRk5FCisgICAgICAgICAgICAgICAgICAgICAganMyLUlNUE9SVAorICAgICAg ICAgICAgICAgICAgICAgIGpzMi1JTkMKKyAgICAgICAgICAgICAgICAgICAgICBqczItSlNSCisg ICAgICAgICAgICAgICAgICAgICAganMyLUxBQkVMCisgICAgICAgICAgICAgICAgICAgICAganMy LUxFQVZFV0lUSAorICAgICAgICAgICAgICAgICAgICAgIGpzMi1MRVQKKyAgICAgICAgICAgICAg ICAgICAgICBqczItTEVURVhQUgorICAgICAgICAgICAgICAgICAgICAgIGpzMi1MT0NBTF9CTE9D SworICAgICAgICAgICAgICAgICAgICAgIGpzMi1MT09QCisgICAgICAgICAgICAgICAgICAgICAg anMyLU5FVworICAgICAgICAgICAgICAgICAgICAgIGpzMi1SRUZfQ0FMTAorICAgICAgICAgICAg ICAgICAgICAgIGpzMi1SRVRIUk9XCisgICAgICAgICAgICAgICAgICAgICAganMyLVJFVFVSTgor ICAgICAgICAgICAgICAgICAgICAgIGpzMi1SRVRVUk5fUkVTVUxUCisgICAgICAgICAgICAgICAg ICAgICAganMyLVNFTUkKKyAgICAgICAgICAgICAgICAgICAgICBqczItU0VURUxFTQorICAgICAg ICAgICAgICAgICAgICAgIGpzMi1TRVRFTEVNX09QCisgICAgICAgICAgICAgICAgICAgICAganMy LVNFVE5BTUUKKyAgICAgICAgICAgICAgICAgICAgICBqczItU0VUUFJPUAorICAgICAgICAgICAg ICAgICAgICAgIGpzMi1TRVRQUk9QX09QCisgICAgICAgICAgICAgICAgICAgICAganMyLVNFVFZB UgorICAgICAgICAgICAgICAgICAgICAgIGpzMi1TRVRfUkVGCisgICAgICAgICAgICAgICAgICAg ICAganMyLVNFVF9SRUZfT1AKKyAgICAgICAgICAgICAgICAgICAgICBqczItU1dJVENICisgICAg ICAgICAgICAgICAgICAgICAganMyLVRBUkdFVAorICAgICAgICAgICAgICAgICAgICAgIGpzMi1U SFJPVworICAgICAgICAgICAgICAgICAgICAgIGpzMi1UUlkKKyAgICAgICAgICAgICAgICAgICAg ICBqczItVkFSCisgICAgICAgICAgICAgICAgICAgICAganMyLVdISUxFCisgICAgICAgICAgICAg ICAgICAgICAganMyLVdJVEgKKyAgICAgICAgICAgICAgICAgICAgICBqczItV0lUSEVYUFIKKyAg ICAgICAgICAgICAgICAgICAgICBqczItWUlFTEQpKQorICAgICAgKGFzZXQgdG9rZW5zIHR0IHQp KQorICAgIChpZiBqczItaW5zdGFuY2VvZi1oYXMtc2lkZS1lZmZlY3RzCisgICAgICAgIChhc2V0 IHRva2VucyBqczItSU5TVEFOQ0VPRiB0KSkKKyAgICB0b2tlbnMpKQorCisoZGVmdW4ganMyLW5v ZGUtaGFzLXNpZGUtZWZmZWN0cyAobm9kZSkKKyAgIlJldHVybiB0IGlmIE5PREUgaGFzIHNpZGUg ZWZmZWN0cy4iCisgICh3aGVuIG5vZGUgIDsgbWFrZXMgaXQgZWFzaWVyIHRvIGhhbmRsZSBtYWxm b3JtZWQgZXhwcmVzc2lvbnMKKyAgICAobGV0ICgodHQgKGpzMi1ub2RlLXR5cGUgbm9kZSkpKQor ICAgICAgKGNvbmQKKyAgICAgICA7OyBUaGlzIGRvdWJ0bGVzcyBuZWVkcyBzb21lIHdvcmssIHNp bmNlIEVYUFJfVk9JRCBpcyB1c2VkCisgICAgICAgOzsgaW4gc2V2ZXJhbCB3YXlzIGluIFJoaW5v IGFuZCBJIG1heSBub3QgaGF2ZSBjYXVnaHQgdGhlbSBhbGwuCisgICAgICAgOzsgSSdsbCB3YWl0 IGZvciBwZW9wbGUgdG8gbm90aWNlIGluY29ycmVjdCB3YXJuaW5ncy4KKyAgICAgICAoKGFuZCAo PSB0dCBqczItRVhQUl9WT0lEKQorICAgICAgICAgICAgIChqczItZXhwci1zdG10LW5vZGUtcCBu b2RlKSkgOyBidXQgbm90IGlmIEVYUFJfUkVTVUxUCisgICAgICAgIChsZXQgKChleHByIChqczIt ZXhwci1zdG10LW5vZGUtZXhwciBub2RlKSkpCisgICAgICAgICAgKG9yIChqczItbm9kZS1oYXMt c2lkZS1lZmZlY3RzIGV4cHIpCisgICAgICAgICAgICAgICh3aGVuIChqczItc3RyaW5nLW5vZGUt cCBleHByKQorICAgICAgICAgICAgICAgIChtZW1iZXIgKGpzMi1zdHJpbmctbm9kZS12YWx1ZSBl eHByKSAnKCJ1c2Ugc3RyaWN0IiAidXNlIGFzbSIpKSkpKSkKKyAgICAgICAoKD0gdHQganMyLUNP TU1BKQorICAgICAgICAoanMyLW5vZGUtaGFzLXNpZGUtZWZmZWN0cyAoanMyLWluZml4LW5vZGUt cmlnaHQgbm9kZSkpKQorICAgICAgICgob3IgKD0gdHQganMyLUFORCkKKyAgICAgICAgICAgICg9 IHR0IGpzMi1PUikpCisgICAgICAgIChvciAoanMyLW5vZGUtaGFzLXNpZGUtZWZmZWN0cyAoanMy LWluZml4LW5vZGUtcmlnaHQgbm9kZSkpCisgICAgICAgICAgICAoanMyLW5vZGUtaGFzLXNpZGUt ZWZmZWN0cyAoanMyLWluZml4LW5vZGUtbGVmdCBub2RlKSkpKQorICAgICAgICgoPSB0dCBqczIt SE9PSykKKyAgICAgICAgKGFuZCAoanMyLW5vZGUtaGFzLXNpZGUtZWZmZWN0cyAoanMyLWNvbmQt bm9kZS10cnVlLWV4cHIgbm9kZSkpCisgICAgICAgICAgICAgKGpzMi1ub2RlLWhhcy1zaWRlLWVm ZmVjdHMgKGpzMi1jb25kLW5vZGUtZmFsc2UtZXhwciBub2RlKSkpKQorICAgICAgICgoanMyLXBh cmVuLW5vZGUtcCBub2RlKQorICAgICAgICAoanMyLW5vZGUtaGFzLXNpZGUtZWZmZWN0cyAoanMy LXBhcmVuLW5vZGUtZXhwciBub2RlKSkpCisgICAgICAgKCg9IHR0IGpzMi1FUlJPUikgOyBhdm9p ZCBjYXNjYWRlZCBlcnJvciBtZXNzYWdlcworICAgICAgICBuaWwpCisgICAgICAgKHQKKyAgICAg ICAgKGFyZWYganMyLXNpZGUtZWZmZWN0aW5nLXRva2VucyB0dCkpKSkpKQorCisoZGVmY29uc3Qg anMyLXN0bXQtbm9kZS10eXBlcworICAobGlzdCBqczItQkxPQ0sKKyAgICAgICAganMyLUJSRUFL CisgICAgICAgIGpzMi1DT05USU5VRQorICAgICAgICBqczItREVGQVVMVCAgOyBlNHggImRlZmF1 bHQgeG1sIG5hbWVzcGFjZSIgc3RhdGVtZW50CisgICAgICAgIGpzMi1ETworICAgICAgICBqczIt RVhQT1JUCisgICAgICAgIGpzMi1FWFBSX1JFU1VMVAorICAgICAgICBqczItRVhQUl9WT0lECisg ICAgICAgIGpzMi1GT1IKKyAgICAgICAganMyLUlGCisgICAgICAgIGpzMi1JTVBPUlQKKyAgICAg ICAganMyLVJFVFVSTgorICAgICAgICBqczItU1dJVENICisgICAgICAgIGpzMi1USFJPVworICAg ICAgICBqczItVFJZCisgICAgICAgIGpzMi1XSElMRQorICAgICAgICBqczItV0lUSCkKKyAgIk5v ZGUgdHlwZXMgdGhhdCBvbmx5IGFwcGVhciBpbiBzdGF0ZW1lbnQgY29udGV4dHMuCitUaGUgbGlz dCBkb2VzIG5vdCBpbmNsdWRlIG5vZGVzIHRoYXQgYWx3YXlzIGFwcGVhciBhcyB0aGUgY2hpbGQK K29mIGFub3RoZXIgc3BlY2lmaWMgc3RhdGVtZW50IHR5cGUsIHN1Y2ggYXMgc3dpdGNoLWNhc2Vz LAorY2F0Y2ggYW5kIGZpbmFsbHkgYmxvY2tzLCBhbmQgZWxzZS1jbGF1c2VzLiAgVGhlIGxpc3Qg YWxzbyBleGNsdWRlcworbm9kZXMgbGlrZSB5aWVsZCwgbGV0IGFuZCB2YXIsIHdoaWNoIG1heSBh cHBlYXIgaW4gZWl0aGVyIGV4cHJlc3Npb24KK29yIHN0YXRlbWVudCBjb250ZXh0LCBhbmQgaW4g dGhlIGxhdHRlciBjb250ZXh0IGFsd2F5cyBoYXZlIGEKK2BqczItZXhwci1zdG10LW5vZGUnIHBh cmVudC4gIEZpbmFsbHksIHRoZSBsaXN0IGRvZXMgbm90IGluY2x1ZGUKK2Z1bmN0aW9ucyBvciBz Y3JpcHRzLCB3aGljaCBhcmUgdHJlYXRlZCBzZXBhcmF0ZWx5IGZyb20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FTkRfVU5SRUFDSEVEKQorICAgICAgICBkZWZh dWx0LWNhc2UpCisgICAgOzsgZXhhbWluZSB0aGUgY2FzZXMKKyAgICAoY2F0Y2ggJ2JyZWFrCisg ICAgICAoZG9saXN0IChjIChqczItc3dpdGNoLW5vZGUtY2FzZXMgbm9kZSkpCisgICAgICAgIChp ZiAoanMyLWNhc2Utbm9kZS1leHByIGMpCisgICAgICAgICAgICAoanMyLXNldC1mbGFnIHJ2IChq czItZW5kLWNoZWNrLWJsb2NrIGMpKQorICAgICAgICAgIChzZXRxIGRlZmF1bHQtY2FzZSBjKQor ICAgICAgICAgICh0aHJvdyAnYnJlYWsgbmlsKSkpKQorICAgIDs7IHdlIGRvbid0IGNhcmUgaG93 IHRoZSBjYXNlcyBkcm9wIGludG8gZWFjaCBvdGhlcgorICAgIChqczItY2xlYXItZmxhZyBydiBq czItRU5EX0RST1BTX09GRikKKyAgICA7OyBleGFtaW5lIHRoZSBkZWZhdWx0CisgICAgKGpzMi1z ZXQtZmxhZyBydiAoaWYgZGVmYXVsdC1jYXNlCisgICAgICAgICAgICAgICAgICAgICAgICAgKGpz Mi1lbmQtY2hlY2sgZGVmYXVsdC1jYXNlKQorICAgICAgICAgICAgICAgICAgICAgICBqczItRU5E X0RST1BTX09GRikpCisgICAgcnYpKQorCisoZGVmdW4ganMyLWVuZC1jaGVjay10cnkgKG5vZGUp CisgIklmIHRoZSBibG9jayBoYXMgYSBmaW5hbGx5LCByZXR1cm4gY29uc2lzdGVuY3kgaXMgY2hl Y2tlZCBpbiB0aGUKK2ZpbmFsbHkgYmxvY2suIElmIGFsbCBjb2RlIHBhdGhzIGluIHRoZSBmaW5h bGx5IHJldHVybiwgdGhlbiB0aGUKK3JldHVybnMgaW4gdGhlIHRyeS1jYXRjaCBibG9ja3MgZG9u J3QgbWF0dGVyLiBJZiB0aGVyZSBpcyBhIGNvZGUgcGF0aAordGhhdCBkb2VzIG5vdCByZXR1cm4g b3IgaWYgdGhlcmUgaXMgbm8gZmluYWxseSBibG9jaywgdGhlIHJldHVybnMKK29mIHRoZSB0cnkg YW5kIGNhdGNoIGJsb2NrcyBhcmUgY2hlY2tlZCBmb3IgbWlzbWF0Y2guCitSZXR1cm5zIGxvZ2lj YWwgT1Igb2YgRU5EXyogZmxhZ3MuIgorIChsZXQgKChmaW5hbGx5IChqczItdHJ5LW5vZGUtZmlu YWxseS1ibG9jayBub2RlKSkKKyAgICAgICBydikKKyAgIDs7IGNoZWNrIHRoZSBmaW5hbGx5IGlm IGl0IGV4aXN0cworICAgKHNldHEgcnYgKGlmIGZpbmFsbHkKKyAgICAgICAgICAgICAgICAoanMy LWVuZC1jaGVjayAoanMyLWZpbmFsbHktbm9kZS1ib2R5IGZpbmFsbHkpKQorICAgICAgICAgICAg ICBqczItRU5EX0RST1BTX09GRikpCisgICA7OyBJZiB0aGUgZmluYWxseSBibG9jayBhbHdheXMg cmV0dXJucywgdGhlbiBub25lIG9mIHRoZSByZXR1cm5zCisgICA7OyBpbiB0aGUgdHJ5IG9yIGNh dGNoIGJsb2NrcyBtYXR0ZXIuCisgICAod2hlbiAoanMyLWZsYWctc2V0LXAgcnYganMyLUVORF9E Uk9QU19PRkYpCisgICAgIChqczItY2xlYXItZmxhZyBydiBqczItRU5EX0RST1BTX09GRikKKyAg ICAgOzsgZXhhbWluZSB0aGUgdHJ5IGJsb2NrCisgICAgIChqczItc2V0LWZsYWcgcnYgKGpzMi1l bmQtY2hlY2sgKGpzMi10cnktbm9kZS10cnktYmxvY2sgbm9kZSkpKQorICAgICA7OyBjaGVjayBl YWNoIGNhdGNoIGJsb2NrCisgICAgIChkb2xpc3QgKGNiIChqczItdHJ5LW5vZGUtY2F0Y2gtY2xh dXNlcyBub2RlKSkKKyAgICAgICAoanMyLXNldC1mbGFnIHJ2IChqczItZW5kLWNoZWNrIGNiKSkp KQorICAgcnYpKQorCisoZGVmdW4ganMyLWVuZC1jaGVjay1sb29wIChub2RlKQorICAiUmV0dXJu IHN0YXRlbWVudCBpbiB0aGUgbG9vcCBib2R5IG11c3QgYmUgY29uc2lzdGVudC4KK1RoZSBkZWZh dWx0IGFzc3VtcHRpb24gZm9yIGFueSBraW5kIG9mIGEgbG9vcCBpcyB0aGF0IGl0IHdpbGwgZXZl bnR1YWxseQordGVybWluYXRlLiAgVGhlIG9ubHkgZXhjZXB0aW9uIGlzIGEgbG9vcCB3aXRoIGEg Y29uc3RhbnQgdHJ1ZSBjb25kaXRpb24uCitDb2RlIHRoYXQgZm9sbG93cyBzdWNoIGEgbG9vcCBp cyBleGFtaW5lZCBvbmx5IGlmIG9uZSBjYW4gZGV0ZXJtaW5lCitzdGF0aWNhbGx5IHRoYXQgdGhl cmUgaXMgYSBicmVhayBvdXQgb2YgdGhlIGxvb3AuCisKKyAgICBmb3IoLi4uIDsgLi4uIDsgLi4u KSB7fQorICAgIGZvciguLi4gaW4gLi4uICkge30KKyAgICB3aGlsZSguLi4pIHsgfQorICAgIGRv IHsgfSB3aGlsZSguLi4pCisKK1JldHVybnMgbG9naWNhbCBPUiBvZiBFTkRfKiBmbGFncy4iCisg IChsZXQgKChydiAoanMyLWVuZC1jaGVjayAoanMyLWxvb3Atbm9kZS1ib2R5IG5vZGUpKSkKKyAg ICAgICAgKGNvbmRpdGlvbiAoY29uZAorICAgICAgICAgICAgICAgICAgICAoKGpzMi13aGlsZS1u b2RlLXAgbm9kZSkKKyAgICAgICAgICAgICAgICAgICAgIChqczItd2hpbGUtbm9kZS1jb25kaXRp b24gbm9kZSkpCisgICAgICAgICAgICAgICAgICAgICAoKGpzMi1kby1ub2RlLXAgbm9kZSkKKyAg ICAgICAgICAgICAgICAgICAgICAoanMyLWRvLW5vZGUtY29uZGl0aW9uIG5vZGUpKQorICAgICAg ICAgICAgICAgICAgICAgKChqczItZm9yLW5vZGUtcCBub2RlKQorICAgICAgICAgICAgICAgICAg ICAgIChqczItZm9yLW5vZGUtY29uZGl0aW9uIG5vZGUpKSkpKQorCisgICAgOzsgY2hlY2sgdG8g c2VlIGlmIHRoZSBsb29wIGNvbmRpdGlvbiBpcyBhbHdheXMgdHJ1ZQorICAgIChpZiAoYW5kIGNv bmRpdGlvbgorICAgICAgICAgICAgIChlcSAoanMyLWFsd2F5cy1kZWZpbmVkLWJvb2xlYW4tcCBj b25kaXRpb24pICdBTFdBWVNfVFJVRSkpCisgICAgICAgIChqczItY2xlYXItZmxhZyBydiBqczIt RU5EX0RST1BTX09GRikpCisKKyAgICA7OyBsb29rIGZvciBlZmZlY3Qgb2YgYnJlYWtzCisgICAg KGpzMi1zZXQtZmxhZyBydiAoanMyLW5vZGUtZ2V0LXByb3Agbm9kZQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICdDT05UUk9MX0JMT0NLX1BST1AKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqczItRU5EX1VOUkVBQ0hFRCkpCisgICAgcnYp KQorCisoZGVmdW4ganMyLWVuZC1jaGVjay1ibG9jayAobm9kZSkKKyAgIkEgZ2VuZXJhbCBibG9j ayBvZiBjb2RlIGlzIGV4YW1pbmVkIHN0YXRlbWVudCBieSBzdGF0ZW1lbnQuCitJZiBhbnkgc3Rh dGVtZW50IChldmVuIGEgY29tcG91bmQgb25lKSByZXR1cm5zIGluIGFsbCBicmFuY2hlcywgdGhl bgorc3Vic2VxdWVudCBzdGF0ZW1lbnRzIGFyZSBub3QgZXhhbWluZWQuCitSZXR1cm5zIGxvZ2lj YWwgT1Igb2YgRU5EXyogZmxhZ3MuIgorICAobGV0KiAoKHJ2IGpzMi1FTkRfRFJPUFNfT0ZGKQor ICAgICAgICAgKGtpZHMgKGpzMi1ibG9jay1ub2RlLWtpZHMgbm9kZSkpCisgICAgICAgICAobiAo Y2FyIGtpZHMpKSkKKyAgICA7OyBDaGVjayBlYWNoIHN0YXRtZW50LiAgSWYgdGhlIHN0YXRlbWVu dCBjYW4gY29udGludWUgb250byB0aGUgbmV4dAorICAgIDs7IG9uZSAoaS5lLiBFTkRfRFJPUF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V0 IChraWQpCisgICAgKGNvbmQKKyAgICAgKChqczItYnJlYWstbm9kZS1wIG5vZGUpCisgICAgICAo anMyLWVuZC1jaGVjay1icmVhayBub2RlKSkKKyAgICAgKChqczItZXhwci1zdG10LW5vZGUtcCBu b2RlKQorICAgICAgKGlmIChzZXRxIGtpZCAoanMyLWV4cHItc3RtdC1ub2RlLWV4cHIgbm9kZSkp CisgICAgICAgICAgKGpzMi1lbmQtY2hlY2sga2lkKQorICAgICAgICBqczItRU5EX0RST1BTX09G RikpCisgICAgICgob3IgKGpzMi1jb250aW51ZS1ub2RlLXAgbm9kZSkKKyAgICAgICAgICAoanMy LXRocm93LW5vZGUtcCBub2RlKSkKKyAgICAgIGpzMi1FTkRfVU5SRUFDSEVEKQorICAgICAoKGpz Mi1yZXR1cm4tbm9kZS1wIG5vZGUpCisgICAgICAoaWYgKHNldHEga2lkIChqczItcmV0dXJuLW5v ZGUtcmV0dmFsIG5vZGUpKQorICAgICAgICAgIGpzMi1FTkRfUkVUVVJOU19WQUxVRQorICAgICAg ICBqczItRU5EX1JFVFVSTlMpKQorICAgICAoKGpzMi1sb29wLW5vZGUtcCBub2RlKQorICAgICAg KGpzMi1lbmQtY2hlY2stbG9vcCBub2RlKSkKKyAgICAgKChqczItc3dpdGNoLW5vZGUtcCBub2Rl KQorICAgICAgKGpzMi1lbmQtY2hlY2stc3dpdGNoIG5vZGUpKQorICAgICAoKGpzMi1sYWJlbGVk LXN0bXQtbm9kZS1wIG5vZGUpCisgICAgICAoanMyLWVuZC1jaGVjay1sYWJlbCBub2RlKSkKKyAg ICAgKChqczItaWYtbm9kZS1wIG5vZGUpCisgICAgICAoanMyLWVuZC1jaGVjay1pZiBub2RlKSkK KyAgICAgKChqczItdHJ5LW5vZGUtcCBub2RlKQorICAgICAgKGpzMi1lbmQtY2hlY2stdHJ5IG5v ZGUpKQorICAgICAoKGpzMi1ibG9jay1ub2RlLXAgbm9kZSkKKyAgICAgIChpZiAobnVsbCAoanMy LWJsb2NrLW5vZGUta2lkcyBub2RlKSkKKyAgICAgICAgICBqczItRU5EX0RST1BTX09GRgorICAg ICAgICAoanMyLWVuZC1jaGVjay1ibG9jayBub2RlKSkpCisgICAgICgoanMyLXlpZWxkLW5vZGUt cCBub2RlKQorICAgICAganMyLUVORF9ZSUVMRFMpCisgICAgICh0CisgICAgICBqczItRU5EX0RS T1BTX09GRikpKSkKKworKGRlZnVuIGpzMi1hbHdheXMtZGVmaW5lZC1ib29sZWFuLXAgKG5vZGUp CisgICJDaGVjayBpZiBOT0RFIGFsd2F5cyBldmFsdWF0ZXMgdG8gdHJ1ZSBvciBmYWxzZSBpbiBi b29sZWFuIGNvbnRleHQuCitSZXR1cm5zICdBTFdBWVNfVFJVRSwgJ0FMV0FZU19GQUxTRSwgb3Ig bmlsIGlmIGl0J3MgbmVpdGhlciBhbHdheXMgdHJ1ZQorbm9yIGFsd2F5cyBmYWxzZS4iCisgIChs ZXQgKCh0dCAoanMyLW5vZGUtdHlwZSBub2RlKSkKKyAgICAgICAgbnVtKQorICAgIChjb25kCisg ICAgICgob3IgKD0gdHQganMyLUZBTFNFKSAoPSB0dCBqczItTlVMTCkpCisgICAgICAnQUxXQVlT X0ZBTFNFKQorICAgICAoKD0gdHQganMyLVRSVUUpCisgICAgICAnQUxXQVlTX1RSVUUpCisgICAg ICgoPSB0dCBqczItTlVNQkVSKQorICAgICAgKHNldHEgbnVtIChqczItbnVtYmVyLW5vZGUtbnVt LXZhbHVlIG5vZGUpKQorICAgICAgKGlmIChhbmQgKG5vdCAoZXEgbnVtIDAuMGUrTmFOKSkKKyAg ICAgICAgICAgICAgIChub3QgKHplcm9wIG51bSkpKQorICAgICAgICAgICdBTFdBWVNfVFJVRQor ICAgICAgICAnQUxXQVlTX0ZBTFNFKSkKKyAgICAgKHQKKyAgICAgIG5pbCkpKSkKKworOzs7IFNj YW5uZXIgLS0gYSBwb3J0IG9mIE1vemlsbGEgUmhpbm8ncyBsZXhlci4KKzs7IENvcnJlc3BvbmRz IHRvIFJoaW5vIGZpbGVzIFRva2VuLmphdmEgYW5kIFRva2VuU3RyZWFtLmphdmEuCisKKyhkZWZ2 YXIganMyLXRva2VucyBuaWwKKyAgIkxpc3Qgb2YgYWxsIGRlZmluZWQgdG9rZW4gbmFtZXMuIikg IDsgaW5pdGlhbGl6ZWQgaW4gYGpzMi10b2tlbi1uYW1lcycKKworKGRlZmNvbnN0IGpzMi10b2tl bi1uYW1lcworICAobGV0KiAoKG5hbWVzIChtYWtlLXZlY3RvciBqczItbnVtLXRva2VucyAtMSkp CisgICAgICAgICAoY2FzZS1mb2xkLXNlYXJjaCBuaWwpICA7IG9ubHkgbWF0Y2gganMyLVVQUEVS X0NBU0UKKyAgICAgICAgIChzeW1zIChhcHJvcG9zLWludGVybmFsICJeanMyLVxcKD86W1s6dXBw ZXI6XV9dK1xcKSIpKSkKKyAgICAoY2wtbG9vcCBmb3Igc3ltIGluIHN5bXMKKyAgICAgICAgICAg ICBmb3IgaSBmcm9tIDAKKyAgICAgICAgICAgICBkbworICAgICAgICAgICAgICh1bmxlc3MgKG9y IChtZW1xIHN5bSAnKGpzMi1FT0ZfQ0hBUiBqczItRVJST1IpKQorICAgICAgICAgICAgICAgICAg ICAgICAgIChub3QgKGJvdW5kcCBzeW0pKSkKKyAgICAgICAgICAgICAgIChhc2V0IG5hbWVzIChz eW1ib2wtdmFsdWUgc3ltKSAgICAgICAgICAgOyBjb2RlLCBlLmcuIDE1MgorICAgICAgICAgICAg ICAgICAgICAgKGRvd25jYXNlCisgICAgICAgICAgICAgICAgICAgICAgKHN1YnN0cmluZyAoc3lt Ym9sLW5hbWUgc3ltKSA0KSkpIDsgbmFtZSwgZS5nLiAibGV0IgorICAgICAgICAgICAgICAgKHB1 c2ggc3ltIGpzMi10b2tlbnMpKSkKKyAgICBuYW1lcykKKyAgIlZlY3RvciBtYXBwaW5nIGludCB2 YWx1ZXMgdG8gdG9rZW4gc3RyaW5nIG5hbWVzLCBzYW5zIGBqczItJyBwcmVmaXguIikKKworKGRl ZnVuIGpzMi10dC1uYW1lICh0b2spCisgICJSZXR1cm4gYSBzdHJpbmcgbmFtZSBmb3IgVE9LLCBh IHRva2VuIHN5bWJvbCBvciBjb2RlLgorU2lnbmFscyBhbiBlcnJvciBpZiBpdCdzIG5vdCBhIHJl Y29nbml6ZWQgdG9rZW4uIgorICAobGV0ICgoY29kZSB0b2spKQorICAgIChpZiAoc3ltYm9scCB0 b2spCisgICAgICAgIChzZXRxIGNvZGUgKHN5bWJvbC12YWx1ZSB0b2spKSkKKyAgICAoaWYgKGVx IGNvZGUgLTEpCisgICAgICAgICJFUlJPUiIKKyAgICAgIChpZiAoYW5kIChudW1iZXJwIGNvZGUp CisgICAgICAgICAgICAgICAobm90IChjbC1taW51c3AgY29kZSkpCisgICAgICAgICAgICAgICAo PCBjb2RlIGpzMi1udW0tdG9rZW5zKSkKKyAgICAgICAgICAoYXJlZiBqczItdG9rZW4tbmFtZXMg Y29kZSkKKyAgICAgICAgKGVycm9yICJJbnZhbGlkIHRva2VuOiAlcyIgY29kZSkpKSkpCisKKyhk ZWZzdWJzdCBqczItdHQtc3ltICh0b2spCisgICJSZXR1cm4gc3ltYm9sIGZvciBUT0sgZ2l2ZW4g aXRzIGNvZGUsIGUuZy4gJ2pzMi1MUCBmb3IgY29kZSA4Ni4iCisgIChpbnRlcm4gKGpzMi10dC1u YW1lIHRvaykpKQorCisoZGVmY29uc3QganMyLXRva2VuLWNvZGVzCisgIChsZXQgKCh0YWJsZSAo bWFrZS1oYXNoLXRhYmxlIDp0ZXN0ICdlcSA6c2l6ZSAyNTYpKSkKKyAgICAoY2wtbG9vcCBmb3Ig bmFtZSBhY3Jvc3MganMyLXRva2VuLW5hbWVzCisgICAgICAgICAgICAgZm9yIHN5bSA9IChpbnRl cm4gKGNvbmNhdCAianMyLSIgKHVwY2FzZSBuYW1lKSkpCisgICAgICAgICAgICAgZG8KKyAgICAg ICAgICAgICAocHV0aGFzaCBzeW0gKHN5bWJvbC12YWx1ZSBzeW0pIHRhYmxlKSkKKyAgICA7OyBj bGVhbiB1cCBhIGZldyB0aGF0IGFyZSAid3JvbmciIGluIFJoaW5vJ3MgdG9rZW4gY29kZXMKKyAg ICAocHV0aGFzaCAnanMyLURFTEVURSBqczItREVMUFJPUCB0YWJsZSkKKyAgICB0YWJsZSkKKyAg Ikhhc2h0YWJsZSBtYXBwaW5nIHRva2VuIHR5cGUgc3ltYm9scyB0byB0aGVpciBieXRlY29kZXMu IikKKworKGRlZnN1YnN0IGpzMi10dC1jb2RlIChzeW0pCisgICJSZXR1cm4gY29kZSBmb3IgdG9r ZW4gc3ltYm9sIFNZTSwgZS5nLiA4NiBmb3IgJ2pzMi1MUC4iCisgIChvciAoZ2V0aGFzaCBzeW0g anMyLXRva2VuLWNvZGVzKQorICAgICAgKGVycm9yICJJbnZhbGlkIHRva2VuIHN5bWJvbDogJXMg IiBzeW0pKSkgIDsgc2lnbmFsIGNvZGUgYnVnCisKKyhkZWZ1biBqczItcmVwb3J0LXNjYW4tZXJy b3IgKG1zZyAmb3B0aW9uYWwgbm8tdGhyb3cgYmVnIGxlbikKKyAgKHNldGYgKGpzMi10b2tlbi1l bmQgKGpzMi1jdXJyZW50LXRva2VuKSkganMyLXRzLWN1cnNvcikKKyAgKGpzMi1yZXBvcnQtZXJy b3IgbXNnIG5pbAorICAgICAgICAgICAgICAgICAgICAob3IgYmVnIChqczItY3VycmVudC10b2tl bi1iZWcpKQorICAgICAgICAgICAgICAgICAgICAob3IgbGVuIChqczItY3VycmVudC10b2tlbi1s ZW4pKSkKKyAgKHVubGVzcyBuby10aHJvdworICAgICh0aHJvdyAncmV0dXJuIGpzMi1FUlJPUikp KQorCisoZGVmdW4ganMyLXNldC1zdHJpbmctZnJvbS1idWZmZXIgKHRva2VuKQorICAiU2V0IGBz dHJpbmcnIGFuZCBgZW5kJyBzbG90cyBmb3IgVE9LRU4sIHJldHVybiB0aGUgc3RyaW5nLiIKKyAg KHNldGYgKGpzMi10b2tlbi1lbm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m9tIHRoZSBpbnB1dCBidWZmZXIuCitJbmNy ZW1lbnRzIGBqczItdHMtbGluZW5vJyBpZiB0aGUgcmV0dXJuIHZhbHVlIGlzIGEgbmV3bGluZSBj aGFyLgorVXBkYXRlcyBganMyLXRzLWN1cnNvcicgdG8gdGhlIHBvaW50IGFmdGVyIHRoZSByZXR1 cm5lZCBjaGFyLgorUmV0dXJucyBganMyLUVPRl9DSEFSJyBpZiB3ZSBoaXQgdGhlIGVuZCBvZiB0 aGUgYnVmZmVyLgorQWxzbyB1cGRhdGVzIGBqczItdHMtaGl0LWVvZicgYW5kIGBqczItdHMtbGlu ZS1zdGFydCcgYXMgbmVlZGVkLiIKKyAgKGxldCAoYykKKyAgICA7OyBjaGVjayBmb3IgZW5kIG9m IGJ1ZmZlcgorICAgIChpZiAoPj0ganMyLXRzLWN1cnNvciAocG9pbnQtbWF4KSkKKyAgICAgICAg KHNldHEganMyLXRzLWhpdC1lb2YgdAorICAgICAgICAgICAgICBqczItdHMtY3Vyc29yICgxKyBq czItdHMtY3Vyc29yKQorICAgICAgICAgICAgICBjIGpzMi1FT0ZfQ0hBUikgIDsgcmV0dXJuIHZh bHVlCisgICAgICA7OyBvdGhlcndpc2UgcmVhZCBuZXh0IGNoYXIKKyAgICAgIChzZXRxIGMgKGNo YXItYmVmb3JlIChjbC1pbmNmIGpzMi10cy1jdXJzb3IpKSkKKyAgICAgIDs7IGlmIHdlIHJlYWQg YSBuZXdsaW5lLCB1cGRhdGUgY291bnRlcnMKKyAgICAgIChpZiAoPSBjID9cbikKKyAgICAgICAg ICAoc2V0cSBqczItdHMtbGluZS1zdGFydCBqczItdHMtY3Vyc29yCisgICAgICAgICAgICAgICAg anMyLXRzLWxpbmVubyAoMSsganMyLXRzLWxpbmVubykpKQorICAgICAgOzsgVE9ETzogIHNraXAg b3ZlciBmb3JtYXQgY2hhcmFjdGVycworICAgICAgYykpKQorCisoZGVmdW4ganMyLXJlYWQtdW5p Y29kZS1lc2NhcGUgKCkKKy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GFyYWN0ZXIgaWYgaXQgbWF0Y2hlcyBURVNULCBh IGNoYXJhY3Rlci4KK1JldHVybnMgbmlsIGFuZCBjb25zdW1lcyBub3RoaW5nIGlmIFRFU1QgaXMg bm90IHRoZSBuZXh0IGNoYXJhY3Rlci4iCisgIChsZXQgKChjIChqczItZ2V0LWNoYXIpKSkKKyAg ICAoaWYgKGVxIGMgdGVzdCkKKyAgICAgICAgdAorICAgICAgKGpzMi11bmdldC1jaGFyKQorICAg ICAgbmlsKSkpCisKKyhkZWZ1biBqczItcGVlay1jaGFyICgpCisgIChwcm9nMQorICAgICAgKGpz Mi1nZXQtY2hhcikKKyAgICAoanMyLXVuZ2V0LWNoYXIpKSkKKworKGRlZnVuIGpzMi1pZGVudGlm aWVyLXN0YXJ0LXAgKGMpCisgICJJcyBDIGEgdmFsaWQgc3RhcnQgdG8gYW4gRVM1IElkZW50aWZp ZXI/CitTZWUgaHR0cDovL2VzNS5naXRodWIuaW8vI3g3LjYiCisgIChvcgorICAgKG1lbXEgYyAn KD8kID9fKSkKKyAgIChtZW1xIChnZXQtY2hhci1jb2RlLXByb3BlcnR5IGMgJ2dlbmVyYWwtY2F0 ZWdvcnkpCisgICAgICAgICA7OyBMZXR0ZXJzCisgICAgICAgICAnKEx1IExsIEx0IExtIExvIE5s KSkpKQorCisoZGVmdW4ganMyLWlkZW50aWZpZXItcGFydC1wIChjKQorICAiSXMgQyBhIHZhbGlk IHBhcnQgb2YgYW4gRVM1IElkZW50aWZpZXI/CitTZWUgaHR0cDovL2VzNS5naXRodWIuaW8vI3g3 LjYiCisgIChvcgorICAgKG1lbXEgYyAnKD8kID9fID9cdTIwMGMgID9cdTIwMGQpKQorICAgKG1l bXEgKGdldC1jaGFyLWNvZGUtcHJvcGVydHkgYyAnZ2VuZXJhbC1jYXRlZ29yeSkKKyAgICAgICAg ICcoOzsgTGV0dGVycworICAgICAgICAgICBMdSBMbCBMdCBMbSBMbyBObAorICAgICAgICAgICA7 OyBDb21iaW5pbmcgTWFya3MKKyAgICAgICAgICAgTW4gTWMKKyAgICAgICAgICAgOzsgRGlnaXRz CisgICAgICAgICAgIE5kCisgICAgICAgICAgIDs7IENvbm5lY3RvciBQdW5jdHVhdGlvbgorICAg ICAgICAgICBQYykpKSkKKworKGRlZnVuIGpzMi1hbHBoYS1wIChjKQorICAoY29uZCAoKGFuZCAo PD0gP0EgYykgKDw9IGMgP1opKSB0KQorICAgICAgICAoKGFuZCAoPD0gP2EgYykgKDw9IGMgP3op KSB0KQorICAgICAgICAodCBuaWwpKSkKKworKGRlZnN1YnN0IGpzMi1kaWdpdC1wIChjKQorICAo YW5kICg8PSA/MCBjKSAoPD0gYyA/OSkpKQorCisoZGVmdW4ganMyLWpzLXNwYWNlLXAgKGMpCisg IChpZiAoPD0gYyAxMjcpCisgICAgICAobWVtcSBjICcoI3gyMCAjeDkgI3hCICN4QyAjeEQpKQor ICAgIChvcgorICAgICAoZXEgYyAjeEEwKQorICAgICA7OyBUT0RPOiAgY2hhbmdlIHRoaXMgbmls IHRvIGNoZWNrIGZvciBVbmljb2RlIHNwYWNlIGNoYXJhY3RlcgorICAgICBuaWwpKSkKKworKGRl ZmNvbnN0IGpzMi1lb2wtY2hhcnMgKGxpc3QganMyLUVPRl9DSEFSID9cbiA/XHIpKQorCisoZGVm dW4ganMyLXNraXAtbGluZSAoKQorICAiU2tpcCB0byBlbmQgb2YgbGluZS4iCisgICh3aGlsZSAo bm90IChtZW1xIChqczItZ2V0LWNoYXIpIGpzMi1lb2wtY2hhcnMpKSkKKyAgKGpzMi11bmdldC1j aGFyKQorICAoc2V0ZiAoanMyLXRva2VuLWVuZCAoanMyLWN1cnJlbnQtdG9rZW4pKSBqczItdHMt Y3Vyc29yKQorICAoc2V0cSBqczItdG9rZW4tZW5kIGpzMi10cy1jdXJzb3IpKQorCisoZGVmdW4g anMyLWluaXQtc2Nhbm5lciAoJm9wdGlvbmFsIGJ1ZiBsaW5lKQorICAiQ3JlYXRlIHRva2VuIHN0 cmVhbSBmb3IgQlVGIHN0YXJ0aW5nIG9uIExJTkUuCitCVUYgZGVmYXVsdHMgdG8gYGN1cnJlbnQt YnVmZmVyJyBhbmQgTElORSBkZWZhdWx0cyB0byAxLgorCitBIGJ1ZmZlciBjYW4gb25seSBoYXZl IG9uZSBzY2FubmVyIGFjdGl2ZSBhdCBhIHRpbWUsIHdoaWNoIHlpZWxkcworZHJhbWF0aWNhbGx5 IHNpbXBsZXIgY29kZSB0aGFuIHVzaW5nIGEgZGVmc3RydWN0LiAgSWYgeW91IG5lZWQgdG8KK2hh dmUgc2ltdWx0YW5lb3VzIHNjYW5uZXJzIGluIGEgYnVmZmVyLCBjb3B5IHRoZSByZWdpb25zIHRv IHNjYW4KK2ludG8gdGVtcCBidWZmZXJzLiIKKyAgKHdpdGgtY3VycmVudC1idWZmZXIgKG9yIGJ1 ZiAoY3VycmVudC1idWZmZXIpKQorICAgIChzZXRxIGpzMi10cy1kaXJ0eS1saW5lIG5pbAorICAg ICAgICAgIGpzMi10cy1oaXQtZW9mIG5pbAorICAgICAgICAgIGpzMi10cy1saW5lLXN0YXJ0IDAK KyAgICAgICAgICBqczItdHMtbGluZW5vIChvciBsaW5lIDEpCisgICAgICAgICAganMyLXRzLWxp bmUtZW5kLWNoYXIgLTEKKyAgICAgICAgICBqczItdHMtY3Vyc29yIChwb2ludC1taW4pCisgICAg ICAgICAganMyLXRpLXRva2VucyAobWFrZS12ZWN0b3IganMyLXRpLW50b2tlbnMgbmlsKQorICAg ICAgICAgIGpzMi10aS10b2tlbnMtY3Vyc29yIDAKKyAgICAgICAgICBqczItdGktbG9va2FoZWFk IDAKKyAgICAgICAgICBqczItdHMtaXMteG1sLWF0dHJpYnV0ZSBuaWwKKyAgICAgICAgICBqczIt dHMteG1sLWlzLXRhZy1jb250ZW50IG5pbAorICAgICAgICAgIGpzMi10cy14bWwtb3Blbi10YWdz LWNvdW50IDAKKyAgICAgICAgICBqczItdHMtc3RyaW5nLWJ1ZmZlciBuaWwpKSkKKwor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isgICAgZmFsc2UgZmluYWxseSBmb3IgZnVuY3Rp b24KKyAgICBpZiBpbiBpbnN0YW5jZW9mIGltcG9ydAorICAgIGxldAorICAgIG5ldyBudWxsCisg ICAgcmV0dXJuCisgICAgc3RhdGljIHN1cGVyIHN3aXRjaAorICAgIHRoaXMgdGhyb3cgdHJ1ZSB0 cnkgdHlwZW9mCisgICAgdmFyIHZvaWQKKyAgICB3aGlsZSB3aXRoCisgICAgeWllbGQpKQorCis7 OyBUb2tlbiBuYW1lcyBhcmVuJ3QgZXhhY3RseSB0aGUgc2FtZSBhcyB0aGUga2V5d29yZHMsIHVu Zm9ydHVuYXRlbHkuCis7OyBFLmcuIGRlbGV0ZSBpcyBqczItREVMUFJPUC4KKyhkZWZjb25zdCBq czIta3dkLXRva2VucworICAobGV0ICgodGFibGUgKG1ha2UtdmVjdG9yIGpzMi1udW0tdG9rZW5z IG5pbCkpCisgICAgICAgICh0b2tlbnMKKyAgICAgICAgIChsaXN0IGpzMi1CUkVBSworICAgICAg ICAgICAgICAganMyLUNBU0UganMyLUNBVENIIGpzMi1DTEFTUyBqczItQ09OU1QganMyLUNPTlRJ TlVFCisgICAgICAgICAgICAgICBqczItREVCVUdHRVIganMyLURFRkFVTFQganMyLURFTFBST1Ag anMyLURPCisgICAgICAgICAgICAgICBqczItRUxTRSBqczItRVhQT1JUCisgICAgICAgICAgICAg ICBqczItRUxTRSBqczItRVhURU5EUyBqczItRVhQT1JUCisgICAgICAgICAgICAgICBqczItRkFM U0UganMyLUZJTkFMTFkganMyLUZPUiBqczItRlVOQ1RJT04KKyAgICAgICAgICAgICAgIGpzMi1J RiBqczItSU4ganMyLUlOU1RBTkNFT0YganMyLUlNUE9SVAorICAgICAgICAgICAgICAganMyLUxF VAorICAgICAgICAgICAgICAganMyLU5FVyBqczItTlVMTAorICAgICAgICAgICAgICAganMyLVJF VFVSTgorICAgICAgICAgICAgICAganMyLVNUQVRJQyBqczItU1VQRVIganMyLVNXSVRDSAorICAg ICAgICAgICAgICAganMyLVRISVMganMyLVRIUk9XIGpzMi1UUlVFIGpzMi1UUlkganMyLVRZUEVP RgorICAgICAgICAgICAgICAganMyLVZBUgorICAgICAgICAgICAgICAganMyLVdISUxFIGpzMi1X SVRICisgICAgICAgICAgICAgICBqczItWUlFTEQpKSkKKyAgICAoZG9saXN0IChpIHRva2VucykK KyAgICAgIChhc2V0IHRhYmxlIGkgJ2ZvbnQtbG9jay1rZXl3b3JkLWZhY2UpKQorICAgIChhc2V0 IHRhYmxlIGpzMi1TVFJJTkcgJ2ZvbnQtbG9jay1zdHJpbmctZmFjZSkKKyAgICAoYXNldCB0YWJs ZSBqczItUkVHRVhQICdmb250LWxvY2stc3RyaW5nLWZhY2UpCisgICAgKGFzZXQgdGFibGUganMy LU5PX1NVQlNfVEVNUExBVEUgJ2ZvbnQtbG9jay1zdHJpbmctZmFjZSkKKyAgICAoYXNldCB0YWJs ZSBqczItVEVNUExBVEVfSEVBRCAnZm9udC1sb2NrLXN0cmluZy1mYWNlKQorICAgIChhc2V0IHRh YmxlIGpzMi1DT01NRU5UICdmb250LWxvY2stY29tbWVudC1mYWNlKQorICAgIChhc2V0IHRhYmxl IGpzMi1USElTICdmb250LWxvY2stYnVpbHRpbi1mYWNlKQorICAgIChhc2V0IHRhYmxlIGpzMi1T VVBFUiAnZm9udC1sb2NrLWJ1aWx0aW4tZmFjZSkKKyAgICAoYXNldCB0YWJsZSBqczItVk9JRCAn Zm9udC1sb2NrLWNvbnN0YW50LWZhY2UpCisgICAgKGFzZXQgdGFibGUganMyLU5VTEwgJ2ZvbnQt bG9jay1jb25zdGFudC1mYWNlKQorICAgIChhc2V0IHRhYmxlIGpzMi1UUlVFICdmb250LWxvY2st Y29uc3RhbnQtZmFjZSkKKyAgICAoYXNldCB0YWJsZSBqczItRkFMU0UgJ2ZvbnQtbG9jay1jb25z dGFudC1mYWNlKQorICAgIChhc2V0IHRhYmxlIGpzMi1OT1QgJ2ZvbnQtbG9jay1uZWdhdGlvbi1j aGFyLWZhY2UpCisgICAgdGFibGUpCisgICJWZWN0b3Igd2hvc2UgdmFsdWVzIGFyZSBub24tbmls IGZvciB0b2tlbnMgdGhhdCBhcmUga2V5d29yZHMuCitUaGUgdmFsdWVzIGFyZSBkZWZhdWx0IGZh Y2VzIHRvIHVzZSBmb3IgaGlnaGxpZ2h0aW5nIHRoZSBrZXl3b3Jkcy4iKQorCis7OyBGSVhNRTog U3VwcG9ydCBzdHJpY3QgbW9kZS1vbmx5IGZ1dHVyZSByZXNlcnZlZCB3b3JkcywgYWZ0ZXIgd2Ug a25vdworOzsgd2hpY2ggcGFydHMgc2NvcGVzIGFyZSBpbiBzdHJpY3QgbW9kZSwgYW5kIHdoaWNo IGFyZSBub3QuCisoZGVmY29uc3QganMyLXJlc2VydmVkLXdvcmRzICcoY2xhc3MgZW51bSBleHBv cnQgZXh0ZW5kcyBpbXBvcnQgc3VwZXIpCisgICJGdXR1cmUgcmVzZXJ2ZWQga2V5d29yZHMgaW4g RUNNQVNjcmlwdCA1LjEuIikKKworKGRlZmNvbnN0IGpzMi1rZXl3b3JkLW5hbWVzCisgIChsZXQg KCh0YWJsZSAobWFrZS1oYXNoLXRhYmxlIDp0ZXN0ICdlcXVhbCkpKQorICAgIChjbC1sb29wIGZv ciBrIGluIGpzMi1rZXl3b3JkcworICAgICAgICAgICAgIGRvIChwdXRoYXNoCisgICAgICAgICAg ICAgICAgIChzeW1ib2wtbmFtZSBrKSAgICAgICAgICAgICAgICAgICAgICAgICAgICA7IGluc3Rh bmNlb2YKKyAgICAgICAgICAgICAgICAgKGludGVybiAoY29uY2F0ICJqczItIgorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKHVwY2FzZSAoc3ltYm9sLW5hbWUgaykpKSkgOyBqczIt SU5TVEFOQ0VPRgorICAgICAgICAgICAgICAgICB0YWJsZSkpCisgICAgdGFibGUpCisgICJKYXZh U2NyaXB0IGtleXdvcmRzIGJ5IG5hbWUsIG1hcHBlZCB0byB0aGVpci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mIChqczItdG9rZW4tYmVnIHRva2VuKSAoMS0ganMyLXRzLWN1cnNv cikKKyAgICAgICAgKGpzMi10b2tlbi1lbmQgdG9rZW4pIGpzMi10cy1jdXJzb3IpKQorCisoZGVm c3Vic3QganMyLXRzLXJldHVybiAodG9rZW4gdHlwZSkKKyAgIlVwZGF0ZSB0aGUgYGVuZCcgYW5k IGB0eXBlJyBzbG90cyBvZiBUT0tFTiwKK3RoZW4gdGhyb3cgYHJldHVybicgd2l0aCB2YWx1ZSBU WVBFLiIKKyAgKHNldGYgKGpzMi10b2tlbi1lbmQgdG9rZW4pIGpzMi10cy1jdXJzb3IKKyAgICAg ICAgKGpzMi10b2tlbi10eXBlIHRva2VuKSB0eXBlKQorICAodGhyb3cgJ3JldHVybiB0eXBlKSkK KworKGRlZnVuIGpzMi14LWRpZ2l0LXRvLWludCAoYyBhY2N1bXVsYXRvcikKKyAgIkJ1aWxkIHVw IGEgaGV4IG51bWJlci4KK0lmIEMgaXMgYSBoZXhhZGVjaW1hbCBkaWdpdCwgcmV0dXJuIEFDQ1VN VUxBVE9SICogMTYgcGx1cworY29ycmVzcG9uZGluZyBudW1iZXIuICBPdGhlcndpc2UgcmV0dXJu IC0xLiIKKyAgKGNhdGNoICdyZXR1cm4KKyAgICAoY2F0Y2ggJ2NoZWNrCisgICAgICA7OyBVc2Ug MC4uOSA8IEEuLlogPCBhLi56CisgICAgICAoY29uZAorICAgICAgICgoPD0gYyA/OSkKKyAgICAg ICAgKGNsLWRlY2YgYyA/MCkKKyAgICAgICAgKGlmICg8PSAwIGMpCisgICAgICAgICAgICAodGhy b3cgJ2NoZWNrIG5pbCkpKQorICAgICAgICgoPD0gYyA/RikKKyAgICAgICAgKHdoZW4gKDw9ID9B IGMpCisgICAgICAgICAgKGNsLWRlY2YgYyAoLSA/QSAxMCkpCisgICAgICAgICAgKHRocm93ICdj aGVjayBuaWwpKSkKKyAgICAgICAoKDw9IGMgP2YpCisgICAgICAgICh3aGVuICg8PSA/YSBjK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pLWxvb2thaGVhZCkKKyAgICAoc2V0cSBqczItdGkt dG9rZW5zLWN1cnNvciAobW9kICgxKyBqczItdGktdG9rZW5zLWN1cnNvcikganMyLXRpLW50b2tl bnMpKQorICAgIChsZXQgKCh0dCAoanMyLWN1cnJlbnQtdG9rZW4tdHlwZSkpKQorICAgICAgKGNs LWFzc2VydCAobm90ICg9IHR0IGpzMi1FT0wpKSkKKyAgICAgIHR0KSkpCisKKyhkZWZ1biBqczIt dW5nZXQtdG9rZW4gKCkKKyAgKGNsLWFzc2VydCAoPCBqczItdGktbG9va2FoZWFkIGpzMi10aS1t YXgtbG9va2FoZWFkKSkKKyAgKGNsLWluY2YganMyLXRpLWxvb2thaGVhZCkKKyAgKHNldHEganMy LXRpLXRva2Vucy1jdXJzb3IgKG1vZCAoMS0ganMyLXRpLXRva2Vucy1jdXJzb3IpIGpzMi10aS1u dG9rZW5zKSkpCisKKyhkZWZ1biBqczItZ2V0LXRva2VuLWludGVybmFsIChtb2RpZmllcikKKyAg KGxldCogKCh0b2tlbiAoanMyLWdldC10b2tlbi1pbnRlcm5hbC0xIG1vZGlmaWVyKSkgOyBjYWxs IHNjYW5uZXIKKyAgICAgICAgICh0dCAoanMyLXRva2VuLXR5cGUgdG9rZW4pKQorICAgICAgICAg c2F3LWVvbAorICAgICAgICAgZmFjZSkKKyAgICA7OyBwcm9jZXNzIGNvbW1lbnRzCisgICAgKHdo aWxlIChvciAoPSB0dCBqczItRU9MKSAoPSB0dCBqczItQ09NTUVOVCkpCisgICAgICAoaWYgKD0g dHQganMyLUVPTCkKKyAgICAgICAgICAoc2V0cSBzYXctZW9sIHQpCisgICAgICAgIChzZXRxIHNh dy1lb2wgbmlsKQorICAgICAgICAod2hlbiBqczItcmVjb3JkLWNvbW1lbnRzCisgICAgICAgICAg KGpzMi1yZWNvcmQtY29tbWVudCB0b2tlbikpKQorICAgICAgKHNldHEganMyLXRpLXRva2Vucy1j dXJzb3IgKG1vZCAoMS0ganMyLXRpLXRva2Vucy1jdXJzb3IpIGpzMi10aS1udG9rZW5zKSkKKyAg ICAgIChzZXRxIHRva2VuIChqczItZ2V0LXRva2VuLWludGVybmFsLTEgbW9kaWZpZXIpIDsgY2Fs bCBzY2FubmVyIGFnYWluCisgICAgICAgICAgICB0dCAoanMyLXRva2VuLXR5cGUgdG9rZW4pKSkK KworICAgICh3aGVuIHNhdy1lb2wKKyAgICAgIChzZXRmIChqczItdG9rZW4tZm9sbG93cy1lb2wt cCB0b2tlbikgdCkpCisKKyAgICA7OyBwZXJmb3JtIGxleGljYWwgZm9udGlmaWNhdGlvbiBhcyBz b29uIGFzIHRva2VuIGlzIHNjYW5uZWQKKyAgICAod2hlbiBqczItcGFyc2UtaWRlLW1vZGUKKyAg ICAgIChjb25kCisgICAgICAgKChjbC1taW51c3AgdHQpCisgICAgICAgIChqczItcmVjb3JkLWZh Y2UgJ2pzMi1lcnJvciB0b2tlbikpCisgICAgICAgKChzZXRxIGZhY2UgKGFyZWYganMyLWt3ZC10 b2tlbnMgdHQpKQorICAgICAgICAoanMyLXJlY29yZC1mYWNlIGZhY2UgdG9rZW4pKQorICAgICAg ICgoYW5kICg9IHR0IGpzMi1OQU1FKQorICAgICAgICAgICAgIChlcXVhbCAoanMyLXRva2VuLXN0 cmluZyB0b2tlbikgInVuZGVmaW5lZCIpKQorICAgICAgICAoanMyLXJlY29yZC1mYWNlICdmb250 LWxvY2stY29uc3RhbnQtZmFjZSB0b2tlbikpKSkKKyAgICB0dCkpCisKKyhkZWZzdWJzdCBqczIt c3RyaW5nLXRvLW51bWJlciAoc3RyIGJhc2UpCisgIDs7IFRPRE86ICBNYXliZSBwb3J0IFNjcmlw dFJ1bnRpbWUuc3RyaW5nVG9OdW1iZXIuCisgIChjb25kaXRpb24tY2FzZSBuaWwKKyAgICAgIChz dHJpbmctdG8tbnVtYmVyIHN0ciBiYXNlKQorICAgIChvdmVyZmxvdy1lcnJvciAtMSkpKQorCiso ZGVmdW4ganMyLWdldC10b2tlbi1pbnRlcm5hbC0xIChtb2RpZmllcikKKyAgIlJldHVybiBuZXh0 IEphdmFTY3JpcHQgdG9rZW4gdHlwZSwgYW4gaW50IHN1Y2ggYXMganMyLVJFVFVSTi4KK0R1cmlu ZyBvcGVyYXRpb24sIGNyZWF0ZXMgYW4gaW5zdGFuY2Ugb2YgYGpzMi10b2tlbicgc3RydWN0LCBz ZXRzCitpdHMgcmVsZXZhbnQgZmllbGRzIGFuZCBwdXRzIGl0IGludG8gYGpzMi10aS10b2tlbnMn LiIKKyAgKGxldCAoaWRlbnRpZmllci1zdGFydAorICAgICAgICBpcy11bmljb2RlLWVzY2FwZS1z dGFydCBjIGMxCisgICAgICAgIGNvbnRhaW5zLWVzY2FwZSBlc2NhcGUtdmFsIHN0ciByZXN1bHQg YmFzZQorICAgICAgICBxdW90ZS1jaGFyIHZhbCBsb29rLWZvci1zbGFzaCBjb250aW51ZSB0dAor ICAgICAgICAodG9rZW4gKGpzMi1uZXctdG9rZW4gMCkpKQorICAgIChzZXRxCisgICAgIHR0Cisg ICAgIChjYXRjaCAncmV0dXJuCisgICAgICAgKHdoZW4gKGVxIG1vZGlmaWVyICdURU1QTEFURV9U QUlMKQorICAgICAgICAgKHNldGYgKGpzMi10b2tlbi1iZWcgdG9rZW4pICgxLSBqczItdHMtY3Vy c29yKSkKKyAgICAgICAgICh0aHJvdyAncmV0dXJuIChqczItZ2V0LXN0cmluZy1vci10ZW1wbGF0 ZS10b2tlbiA/YCB0b2tlbikpKQorICAgICAgICh3aGlsZSB0CisgICAgICAgICA7OyBFYXQgd2hp dGVzcGFjZSwgcG9zc2libHkgc2Vuc2l0aXZlIHRvIG5ld2xpbmVzLgorICAgICAgICAgKHNldHEg Y29udGludWUgdCkKKyAgICAgICAgICh3aGlsZSBjb250aW51ZQorICAgICAgICAgICAoc2V0cSBj IChqczItZ2V0LWNoYXIpKQorICAgICAgICAgICAoY29uZAorICAgICAgICAgICAgKChlcSBjIGpz Mi1FT0ZfQ0hBUikKKyAgICAgICAgICAgICAoanMyLXVuZ2V0LWNoYXIpCisgICAgICAgICAgICAg KGpzMi10cy1zZXQtY2hhci10b2tlbi1ib3VuZHMgdG9rZW4pCisgICAgICAgICAgICAgKHRocm93 ICdyZXR1cm4ganMyLUVPRikpCisgICAgICAgICAgICAoKGVxIGMgP1xuKQorICAgICAgICAgICAg IChqczItdHMtc2V0LWNoYXItdG9rZW4tYm91bmRzIHRva2VuKQorICAgICAgICAgICAgIChzZXRx IGpzMi10cy1kaXJ0eS1saW5lIG5pbCkKKyAgICAgICAgICAgICAodGhyb3cgJ3JldHVybiBqczIt RU9MKSkKKyAgICAgICAgICAgICgobm90IChqczItanMtc3BhY2UtcCBjKSkKKyAgICAgICAgICAg ICAoaWYgKC89IGMgPy0pICAgICAgICAgICAgICA7IGluIGNhc2UgZW5kIG9mIEhUTUwgY29tbWVu dAorICAgICAgICAgICAgICAgICAoc2V0cSBqczItdHMtZGlydHktbGluZSB0KSkKKyAgICAgICAg ICAgICAoc2V0cSBjb250aW51ZSBuaWwpKSkpCisgICAgICAgICA7OyBBc3N1bWUgdGhlIHRva2Vu IHdpbGwgYmUgMSBjaGFyIC0gZml4ZWQgdXAgYmVsb3cuCisgICAgICAgICAoanMyLXRzLXNldC1j aGFyLXRva2VuLWJvdW5kcyB0b2tlbikKKyAgICAgICAgICh3aGVuIChlcSBjID9AKQorICAgICAg ICAgICAodGhyb3cgJ3JldHVybiBqczItWE1MQVRUUikpCisgICAgICAgICA7OyBpZGVudGlmaWVy L2tleXdvcmQvaW5zdGFuY2VvZj8KKyAgICAgICAgIDs7IHdhdGNoIG91dCBmb3Igc3RhcnRpbmcg d2l0aCBhIDxiYWNrc2xhc2g+CisgICAgICAgICAoY29uZAorICAgICAgICAgICgoZXEgYyA/XFwp CisgICAgICAgICAgIChzZXRxIGMgKGpzMi1nZXQtY2hhcikpCisgICAgICAgICAgIChpZiAoZXEg YyA/dSkKKyAgICAgICAgICAgICAgIChzZXRxIGlkZW50aWZpZXItc3RhcnQgdAorICAgICAgICAg ICAgICAgICAgICAgaXMtdW5pY29kZS1lc2NhcGUtc3RhcnQgdAorICAgICAgICAgICAgICAgICAg ICAganMyLXRzLXN0cmluZy1idWZmZXIgbmlsKQorICAgICAgICAgICAgIChzZXRxIGlkZW50aWZp ZXItc3RhcnQgbmlsKQorICAgICAgICAgICAgIChqczItdW5nZXQtY2hhcikKKyAgICAgICAgICAg ICAoc2V0cSBjID9cXCkpKQorICAgICAgICAgICh0CisgICAgICAgICAgICh3aGVuIChzZXRxIGlk ZW50aWZpZXItc3RhcnQgKGpzMi1pZGVudGlmaWVyLXN0YXJ0LXAgYykpCisgICAgICAgICAgICAg KHNldHEganMyLXRzLXN0cmluZy1idWZmZXIgbmlsKQorICAgICAgICAgICAgIChqczItYWRkLXRv LXN0cmluZyBjKSkpKQorICAgICAgICAgKHdoZW4gaWRlbnRpZmllci1zdGFydAorICAgICAgICAg ICAoc2V0cSBjb250YWlucy1lc2NhcGUgaXMtdW5pY29kZS1lc2NhcGUtc3RhcnQpCisgICAgICAg ICAgIChjYXRjaCAnYnJlYWsKKyAgICAgICAgICAgICAod2hpbGUgdAorICAgICAgICAgICAgICAg KGlmIGlzLXVuaWNvZGUtZXNjYXBlLXN0YXJ0CisgICAgICAgICAgICAgICAgICAgOzsgc3RyaWN0 bHkgc3BlYWtpbmcgd2Ugc2hvdWxkIHByb2JhYmx5IHB1c2gtYmFjaworICAgICAgICAgICAgICAg ICAgIDs7IGFsbCB0aGUgYmFkIGNoYXJhY3RlcnMgaWYgdGhlIDxiYWNrc2xhc2g+dVhYWFgKKyAg ICAgICAgICAgICAgICAgICA7OyBzZXF1ZW5jZSBpcyBtYWxmb3JtZWQuIEJ1dCBzaW5jZSB0aGVy ZSBpc24ndCBhCisgICAgICAgICAgICAgICAgICAgOzsgY29ycmVjdCBjb250ZXh0KGlzIHRoZXJl PykgZm9yIGEgYmFkIFVuaWNvZGUKKyAgICAgICAgICAgICAgICAgICA7OyBlc2NhcGUgc2VxdWVu Y2UgaW4gYW4gaWRlbnRpZmllciwgd2UgY2FuIHJlcG9ydAorICAgICAgICAgICAgICAgICAgIDs7 IGFuIGVycm9yIGhlcmUuCisgICAgICAgICAgICAgICAgICAgKHByb2duCisgICAgICAgICAgICAg ICAgICAgICAoc2V0cSBlc2NhcGUtdmFsIDApCisgICAgICAgICAgICAgICAgICAgICAoZG90aW1l cyAoXyA0KQorICAgICAgICAgICAgICAgICAgICAgICAoc2V0cSBjIChqczItZ2V0LWNoYXIpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVzY2FwZS12YWwgKGpzMi14LWRpZ2l0LXRvLWlu dCBjIGVzY2FwZS12YWwpKQorICAgICAgICAgICAgICAgICAgICAgICA7OyBOZXh0IGNoZWNrIHRh a2VzIGNhcmUgb2YgYyA8IDAgYW5kIGJhZCBlc2NhcGUKKyAgICAgICAgICAgICAgICAgICAgICAg KGlmIChjbC1taW51c3AgZXNjYXBlLXZhbCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICh0 aHJvdyAnYnJlYWsgbmlsKSkpCisgICAgICAgICAgICAgICAgICAgICAoaWYgKGNsLW1pbnVzcCBl c2NhcGUtdmFsKQorICAgICAgICAgICAgICAgICAgICAgICAgIChqczItcmVwb3J0LXNjYW4tZXJy b3IgIm1zZy5pbnZhbGlkLmVzY2FwZSIgdCkpCisgICAgICAgICAgICAgICAgICAgICAoanMyLWFk ZC10by1zdHJpbmcgZXNjYXBlLXZhbCkKKyAgICAgICAgICAgICAgICAgICAgIChzZXRxIGlzLXVu aWNvZGUtZXNjYXBlLXN0YXJ0IG5pbCkpCisgICAgICAgICAgICAgICAgIChzZXRxIGMgKGpzMi1n ZXQtY2hhcikpCisgICAgICAgICAgICAgICAgIChjb25kCisgICAgICAgICAgICAgICAgICAoKGVx IGMgP1xcKQorICAgICAgICAgICAgICAgICAgIChzZXRxIGMgKGpzMi1nZXQtY2hhcikpCisgICAg ICAgICAgICAgICAgICAgKGlmIChlcSBjID91KQorICAgICAgICAgICAgICAgICAgICAgICAoc2V0 cSBpcy11bmljb2RlLWVzY2FwZS1zdGFydCB0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGNvbnRhaW5zLWVzY2FwZSB0KQorICAgICAgICAgICAgICAgICAgICAgKGpzMi1yZXBvcnQtc2Nh bi1lcnJvciAibXNnLmlsbGVnYWwuY2hhcmFjdGVyIiB0KSkpCisgICAgICAgICAgICAgICAgICAo dAorICAgICAgICAgICAgICAgICAgIChpZiAob3IgKGVxIGMganMyLUVPRl9DSEFSKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgKG5vdCAoanMyLWlkZW50aWZpZXItcGFydC1wIGMpKSkKKyAg ICAgICAgICAgICAgICAgICAgICAgKHRocm93ICdicmVhayBuaWwpKQorICAgICAgICAgICAgICAg ICAgIChqczItYWRkLXRvLXN0cmluZyBjKSkpKSkpCisgICAgICAgICAgIChqczItdW5nZXQtY2hh cikKKyAgICAgICAgICAgKHNldGYgc3RyIChqczItY29sbGVjdC1zdHJpbmcganMyLXRzLXN0cmlu Zy1idWZmZXIpCisgICAgICAgICAgICAgICAgIChqczItdG9rZW4tZW5kIHRva2VuKSBqczItdHMt Y3Vyc29yKQorICAgICAgICAgICA7OyBGSVhNRTogSW52YWxpZCBpbiBFUzUgYW5kIEVTNiwgc2Vl CisgICAgICAgICAgIDs7IGh0dHBzOi8vYnVnemlsbGEubW96aWxsYS5vcmcvc2hvd19idWcuY2dp P2lkPTY5NDM2MAorICAgICAgICAgICA7OyBQcm9iYWJseSBzaG91bGQganVzdCBkcm9wIHRoaXMg Y29uZGl0aW9uYWwuCisgICAgICAgICAgICh1bmxlc3MgY29udGFpbnMtZXNjYXBlCisgICAgICAg ICAgICAgOzsgT1BUIHdlIHNob3VsZG4ndCBoYXZlIHRvIG1ha2UgYSBzdHJpbmcgKG9iamVjdCEp IHRvCisgICAgICAgICAgICAgOzsgY2hlY2sgaWYgaXQncyBhIGtleXdvcmQuCisgICAgICAgICAg ICAgOzsgUmV0dXJuIHRoZSBjb3JyZXNwb25kaW5nIHRva2VuIGlmIGl0J3MgYSBrZXl3b3JkCisg ICAgICAgICAgICAgKHdoZW4gKGFuZCAobm90IChlcSBtb2RpZmllciAnS0VZV09SRF9JU19OQU1F KSkKKyAgICAgICAgICAgICAgICAgICAgICAgIChzZXRxIHJlc3VsdCAoanMyLXN0cmluZy10by1r ZXl3b3JkIHN0cikpKQorICAgICAgICAgICAgICAgKGlmIChhbmQgKDwganMyLWxhbmd1YWdlLXZl cnNpb24gMTcwKQorICAgICAgICAgICAgICAgICAgICAgICAgKG1lbXEgcmVzdWx0ICcoanMyLUxF VCBqczItWUlFTEQpKSkKKyAgICAgICAgICAgICAgICAgICA7OyBMRVQgYW5kIFlJRUxEIGFyZSB0 b2tlbnMgb25seSBpbiAxLjcgYW5kIGxhdGVyCisgICAgICAgICAgICAgICAgICAgKHNldHEgcmVz dWx0ICdqczItTkFNRSkpCisgICAgICAgICAgICAgICAod2hlbiAoZXEgcmVzdWx0ICdqczItUkVT RVJWRUQpCisgICAgICAgICAgICAgICAgIChzZXRmIChqczItdG9rZW4tc3RyaW5nIHRva2VuKSBz dHIpKQorICAgICAgICAgICAgICAgKHRocm93ICdyZXR1cm4gKGpzMi10dC1jb2RlIHJlc3VsdCkp KSkKKyAgICAgICAgICAgOzsgSWYgd2Ugd2FudCB0byBpbnRlcm4gdGhlc2UgYXMgUmhpbm8gZG9l cywganVzdCB1c2UgKGludGVybiBzdHIpCisgICAgICAgICAgIChzZXRmIChqczItdG9rZW4tc3Ry aW5nIHRva2VuKSBzdHIpCisgICAgICAgICAgICh0aHJvdyAncmV0dXJuIGpzMi1OQU1FKSkgICAg OyBlbmQgaWRlbnRpZmllci9rd2QgY2hlY2sKKyAgICAgICAgIDs7IGlzIGl0IGEgbnVtYmVyPwor ICAgICAgICAgKHdoZW4gKG9yIChqczItZGlnaXQtcCBjKQorICAgICAgICAgICAgICAgICAgIChh bmQgKGVxIGMgPy4pIChqczItZGlnaXQtcCAoanMyLXBlZWstY2hhcikpKSkKKyAgICAgICAgICAg KHNldHEganMyLXRzLXN0cmluZy1idWZmZXIgbmlsCisgICAgICAgICAgICAgICAgIGJhc2UgMTAp CisgICAgICAgICAgICh3aGVuIChlcSBjID8wKQorICAgICAgICAgICAgIChzZXRxIGMgKGpzMi1n ZXQtY2hhcikpCisgICAgICAgICAgICAgKGNvbmQKKyAgICAgICAgICAgICAgKChvciAoZXEgYyA/ eCkgKGVxIGMgP1gpKQorICAgICAgICAgICAgICAgKHNldHEgYmFzZSAxNikKKyAgICAgICAgICAg ICAgIChzZXRxIGMgKGpzMi1nZXQtY2hhcikpKQorICAgICAgICAgICAgICAoKGFuZCAob3IgKGVx IGMgP2IpIChlcSBjID9CKSkKKyAgICAgICAgICAgICAgICAgICAgKD49IGpzMi1sYW5ndWFnZS12 ZXJzaW9uIDIwMCkpCisgICAgICAgICAgICAgICAoc2V0cSBiYXNlIDIpCisgICAgICAgICAgICAg ICAoc2V0cSBjIChqczItZ2V0LWNoYXIpKSkKKyAgICAgICAgICAgICAgKChhbmQgKG9yIChlcSBj ID9vKSAoZXEgYyA/TykpCisgICAgICAgICAgICAgICAgICAgICg+PSBqczItbGFuZ3VhZ2UtdmVy c2lvbiAyMDApKQorICAgICAgICAgICAgICAgKHNldHEgYmFzZSA4KQorICAgICAgICAgICAgICAg KHNldHEgYyAoanMyLWdldC1jaGFyKSkpCisgICAgICAgICAgICAgICgoanMyLWRpZ2l0LXAgYykK KyAgICAgICAgICAgICAgIChzZXRxIGJhc2UgJ21heWJlLTgpKQorICAgICAgICAgICAgICAodAor ICAgICAgICAgICAgICAgKGpzMi1hZGQtdG8tc3RyaW5nID8wKSkpKQorICAgICAgICAgICAoY29u ZAorICAgICAgICAgICAgKChlcSBiYXNlIDE2KQorICAgICAgICAgICAgIChpZiAoPiAwIChqczIt eC1kaWdpdC10by1pbnQgYyAwKSkKKyAgICAgICAgICAgICAgICAgKGpzMi1yZXBvcnQtc2Nhbi1l cnJvciAibXNnLm1pc3NpbmcuaGV4LmRpZ2l0cyIpCisgICAgICAgICAgICAgICAod2hpbGUgKDw9 IDAgKGpzMi14LWRpZ2l0LXRvLWludCBjIDApKQorICAgICAgICAgICAgICAgICAoanMyLWFkZC10 by1zdHJpbmcgYykKKyAgICAgICAgICAgICAgICAgKHNldHEgYyAoanMyLWdldC1jaGFyKSkpKSkK KyAgICAgICAgICAgICgoZXEgYmFzZSAyKQorICAgICAgICAgICAgIChpZiAobm90IChtZW1xIGMg Jyg/MCA/MSkpKQorICAgICAgICAgICAgICAgICAoanMyLXJlcG9ydC1zY2FuLWVycm9yICJtc2cu bWlzc2luZy5iaW5hcnkuZGlnaXRzIikKKyAgICAgICAgICAgICAgICh3aGlsZSAobWVtcSBjICco PzAgPzEpKQorICAgICAgICAgICAgICAgICAoanMyLWFkZC10by1zdHJpbmcgYykKKyAgICAgICAg ICAgICAgICAgKHNldHEgYyAoanMyLWdldC1jaGFyKSkpKSkKKyAgICAgICAgICAgICgoZXEgYmFz ZSA4KQorICAgICAgICAgICAgIChpZiAob3IgKD4gPzAgYykgKDwgPzcgYykpCisgICAgICAgICAg ICAgICAgIChqczItcmVwb3J0LXNjYW4tZXJyb3IgIm1zZy5taXNzaW5nLm9jdGFsLmRpZ2l0cyIp CisgICAgICAgICAgICAgICAod2hpbGUgKGFuZCAoPD0gPzAgYykgKD49ID83IGMpKQorICAgICAg ICAgICAgICAgICAoanMyLWFkZC10by1zdHJpbmcgYykKKyAgICAgICAgICAgICAgICAgKHNldHEg YyAoanMyLWdldC1jaGFyKSkpKSkKKyAgICAgICAgICAgICh0CisgICAgICAgICAgICAgKHdoaWxl IChhbmQgKDw9ID8wIGMpICg8PSBjID85KSkKKyAgICAgICAgICAgICAgIDs7IFdlIHBlcm1pdCAw OCBhbmQgMDkgYXMgZGVjaW1hbCBudW1iZXJzLCB3aGljaAorICAgICAgICAgICAgICAgOzsgbWFr ZXMgb3VyIGJlaGF2aW9yIGEgc3VwZXJzZXQgb2YgdGhlIEVDTUEKKyAgICAgICAgICAgICAgIDs7 IG51bWVyaWMgZ3JhbW1hci4gIFdlIG1pZ2h0IG5vdCBhbHdheXMgYmUgc28KKyAgICAgICAgICAg ICAgIDs7IHBlcm1pc3NpdmUsIHNvIHdlIHdhcm4gYWJvdXQgaXQuCisgICAgICAgICAgICAgICAo d2hlbiAoYW5kIChlcSBiYXNlICdtYXliZS04KSAoPj0gYyA/OCkpCisgICAgICAgICAgICAgICAg IChqczItcmVwb3J0LXdhcm5pbmcgIm1zZy5iYWQub2N0YWwubGl0ZXJhbCIKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAoaWYgKGVxIGMgPzgpICI4IiAiOSIpKQorICAgICAg ICAgICAgICAgICAoc2V0cSBiYXNlIDEwKSkKKyAgICAgICAgICAgICAgIChqczItYWRkLXRvLXN0 cmluZyBjKQorICAgICAgICAgICAgICAgKHNldHEgYyAoanMyLWdldC1jaGFyKSkpCisgICAgICAg ICAgICAgKHdoZW4gKGVxIGJhc2UgJ21heWJlLTgpCisgICAgICAgICAgICAgICAoc2V0cSBiYXNl IDgpKSkpCisgICAgICAgICAgICh3aGVuIChhbmQgKGVxIGJhc2UgMTApIChtZW1xIGMgJyg/LiA/ ZSA/RSkpKQorICAgICAgICAgICAgICh3aGVuIChlcSBjID8uKQorICAgICAgICAgICAgICAgKGNs LWxvb3AgZG8KKyAgICAgICAgICAgICAgICAgICAgICAgIChqczItYWRkLXRvLXN0cmluZyBjKQor ICAgICAgICAgICAgICAgICAgICAgICAgKHNldHEgYyAoanMyLWdldC1jaGFyKSkKKyAgICAgICAg ICAgICAgICAgICAgICAgIHdoaWxlIChqczItZGlnaXQtcCBjKSkpCisgICAgICAgICAgICAgKHdo ZW4gKG1lbXEgYyAnKD9lID9FKSkKKyAgICAgICAgICAgICAgIChqczItYWRkLXRvLXN0cmluZyBj KQorICAgICAgICAgICAgICAgKHNldHEgYyAoanMyLWdldC1jaGFyKSkKKyAgICAgICAgICAgICAg ICh3aGVuIChtZW1xIGMgJyg/KyA/LSkpCisgICAgICAgICAgICAgICAgIChqczItYWRkLXRvLXN0 cmluZyBjKQorICAgICAgICAgICAgICAgICAoc2V0cSBjIChqczItZ2V0LWNoYXIpKSkKKyAgICAg ICAgICAgICAgICh1bmxlc3MgKGpzMi1kaWdpdC1wIGMpCisgICAgICAgICAgICAgICAgIChqczIt cmVwb3J0LXNjYW4tZXJyb3IgIm1zZy5taXNzaW5nLmV4cG9uZW50IiB0KSkKKyAgICAgICAgICAg ICAgIChjbC1sb29wIGRvCisgICAgICAgICAgICAgICAgICAgICAgICAoanMyLWFkZC10by1zdHJp bmcgYykKKyAgICAgICAgICAgICAgICAgICAgICAgIChzZXRxIGMgKGpzMi1nZXQtY2hhcikpCisg ICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAoanMyLWRpZ2l0LXAgYykpKSkKKyAgICAgICAg ICAgKGpzMi11bmdldC1jaGFyKQorICAgICAgICAgICAobGV0ICgoc3RyIChqczItc2V0LXN0cmlu Zy1mcm9tLWJ1ZmZlciB0b2tlbikpKQorICAgICAgICAgICAgIChzZXRmIChqczItdG9rZW4tbnVt YmVyIHRva2VuKQorICAgICAgICAgICAgICAgICAgIChqczItc3RyaW5nLXRvLW51bWJlciBzdHIg YmFzZSkpKQorICAgICAgICAgICAodGhyb3cgJ3JldHVybiBqczItTlVNQkVSKSkKKyAgICAgICAg IDs7IGlzIGl0IGEgc3RyaW5nPworICAgICAgICAgKHdoZW4gKG9yIChtZW1xIGMgJyg/XCIgP1wn KSkKKyAgICAgICAgICAgICAgICAgICAoYW5kICg+PSBqczItbGFuZ3VhZ2UtdmVyc2lvbiAyMDAp CisgICAgICAgICAgICAgICAgICAgICAgICAoPSBjID9gKSkpCisgICAgICAgICAgICh0aHJvdyAn cmV0dXJuCisgICAgICAgICAgICAgICAgICAoanMyLWdldC1zdHJpbmctb3ItdGVtcGxhdGUtdG9r ZW4gYyB0b2tlbikpKQorICAgICAgICAgKGpzMi10cy1yZXR1cm4gdG9rZW4KKyAgICAgICAgICAg ICAgICAgICAgICAgIChjbC1jYXNlIGMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKD9cOwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgKHRocm93ICdyZXR1cm4ganMyLVNFTUkpKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAoP1xbCisgICAgICAgICAgICAgICAgICAgICAgICAgICAo dGhyb3cgJ3JldHVybiBqczItTEIpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAoP1xdCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAodGhyb3cgJ3JldHVybiBqczItUkIpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAoP3sKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICh0aHJv dyAncmV0dXJuIGpzMi1MQykpCisgICAgICAgICAgICAgICAgICAgICAgICAgICg/fQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgKHRocm93ICdyZXR1cm4ganMyLVJDKSkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgKD9cKAorICAgICAgICAgICAgICAgICAgICAgICAgICAgKHRocm93ICdy ZXR1cm4ganMyLUxQKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKD9cKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgKHRocm93ICdyZXR1cm4ganMyLVJQKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgKD8sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAodGhyb3cgJ3JldHVy biBqczItQ09NTUEpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAoPz8KKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICh0aHJvdyAncmV0dXJuIGpzMi1IT09LKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgKD86CisgICAgICAgICAgICAgICAgICAgICAgICAgICAoaWYgKGpzMi1tYXRj aC1jaGFyID86KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzMi1DT0xPTkNPTE9O CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0aHJvdyAncmV0dXJuIGpzMi1DT0xPTikp KQorICAgICAgICAgICAgICAgICAgICAgICAgICAoPy4KKyAgICAgICAgICAgICAgICAgICAgICAg ICAgIChpZiAoanMyLW1hdGNoLWNoYXIgPy4pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKGlmIChqczItbWF0Y2gtY2hhciA/LikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAganMyLVRSSVBMRURPVCBqczItRE9URE9UKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAoaWYgKGpzMi1tYXRjaC1jaGFyID9cKCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGpzMi1ET1RRVUVSWQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0aHJv dyAncmV0dXJuIGpzMi1ET1QpKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICg/fAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgKGlmIChqczItbWF0Y2gtY2hhciA/fCkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAodGhyb3cgJ3JldHVybiBqczItT1IpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIChpZiAoanMyLW1hdGNoLWNoYXIgPz0pCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBqczItQVNTSUdOX0JJVE9SCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKHRocm93ICdyZXR1cm4ganMyLUJJVE9SKSkpKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAoP14KKyAgICAgICAgICAgICAgICAgICAgICAgICAgIChpZiAoanMyLW1hdGNo LWNoYXIgPz0pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganMyLUFTU0lHTl9CSVRP UgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodGhyb3cgJ3JldHVybiBqczItQklUWE9S KSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICg/JgorICAgICAgICAgICAgICAgICAgICAg ICAgICAgKGlmIChqczItbWF0Y2gtY2hhciA/JikKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAodGhyb3cgJ3JldHVybiBqczItQU5EKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAoaWYgKGpzMi1tYXRjaC1jaGFyID89KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAganMyLUFTU0lHTl9CSVRBTkQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodGhy b3cgJ3JldHVybiBqczItQklUQU5EKSkpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAoPz0K KyAgICAgICAgICAgICAgICAgICAgICAgICAgIChpZiAoanMyLW1hdGNoLWNoYXIgPz0pCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKGlmIChqczItbWF0Y2gtY2hhciA/PSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganMyLVNIRVEKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICh0aHJvdyAncmV0dXJuIGpzMi1FUSkpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIChpZiAoanMyLW1hdGNoLWNoYXIgPz4pCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAoanMyLXRzLXJldHVybiB0b2tlbiBqczItQVJST1cpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKHRocm93ICdyZXR1cm4ganMyLUFTU0lHTikpKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgKD8hCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoaWYg KGpzMi1tYXRjaC1jaGFyID89KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpZiAo anMyLW1hdGNoLWNoYXIgPz0pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpz Mi1TSE5FCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqczItTkUpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICh0aHJvdyAncmV0dXJuIGpzMi1OT1QpKSkKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgKD88CisgICAgICAgICAgICAgICAgICAgICAgICAgICA7OyBOQjp0 cmVhdCBIVE1MIGJlZ2luLWNvbW1lbnQgYXMgY29tbWVudC10aWxsLWVvbAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgKHdoZW4gKGpzMi1tYXRjaC1jaGFyID8hKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAod2hlbiAoanMyLW1hdGNoLWNoYXIgPy0pCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKHdoZW4gKGpzMi1tYXRjaC1jaGFyID8tKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKGpzMi1za2lwLWxpbmUpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAoc2V0ZiAoanMyLXRva2VuLWNvbW1lbnQtdHlwZSAoanMyLWN1cnJlbnQtdG9r ZW4pKSAnaHRtbCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0aHJvdyAncmV0 dXJuIGpzMi1DT01NRU5UKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChqczItdW5n ZXQtY2hhcikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoaWYgKGpzMi1tYXRjaC1jaGFy ID88KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpZiAoanMyLW1hdGNoLWNoYXIg Pz0pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzMi1BU1NJR05fTFNICisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqczItTFNIKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAoaWYgKGpzMi1tYXRjaC1jaGFyID89KQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAganMyLUxFCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHRo cm93ICdyZXR1cm4ganMyLUxUKSkpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAoPz4KKyAg ICAgICAgICAgICAgICAgICAgICAgICAgIChpZiAoanMyLW1hdGNoLWNoYXIgPz4pCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKGlmIChqczItbWF0Y2gtY2hhciA/PikKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKGlmIChqczItbWF0Y2gtY2hhciA/PSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzMi1BU1NJR05fVVJTSAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzMi1VUlNIKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKGlmIChqczItbWF0Y2gtY2hhciA/PSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBqczItQVNTSUdOX1JTSAorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBqczItUlNIKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg KGlmIChqczItbWF0Y2gtY2hhciA/PSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IGpzMi1HRQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0aHJvdyAncmV0dXJuIGpz Mi1HVCkpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKD8qCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAoaWYgKGpzMi1tYXRjaC1jaGFyID89KQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGpzMi1BU1NJR05fTVVMCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0 aHJvdyAncmV0dXJuIGpzMi1NVUwpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKD8vCisg ICAgICAgICAgICAgICAgICAgICAgICAgICA7OyBpcyBpdCBhIC8vIGNvbW1lbnQ/CisgICAgICAg ICAgICAgICAgICAgICAgICAgICAod2hlbiAoanMyLW1hdGNoLWNoYXIgPy8pCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIChzZXRmIChqczItdG9rZW4tYmVnIHRva2VuKSAoLSBqczItdHMt Y3Vyc29yIDIpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoanMyLXNraXAtbGluZSkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHNldGYgKGpzMi10b2tlbi1jb21tZW50LXR5 cGUgdG9rZW4pICdsaW5lKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICA7OyBpbmNsdWRl IG5ld2xpbmUgc28gaGlnaGxpZ2h0aW5nIGdvZXMgdG8gZW5kIG9mIHdpbmRvdworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAoY2wtaW5jZiAoanMyLXRva2VuLWVuZCB0b2tlbikpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICh0aHJvdyAncmV0dXJuIGpzMi1DT01NRU5UKSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgIDs7IGlzIGl0IGEgLyogY29tbWVudD8KKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICh3aGVuIChqczItbWF0Y2gtY2hhciA/KikKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKHNldGYgbG9vay1mb3Itc2xhc2ggbmlsCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIChqczItdG9rZW4tYmVnIHRva2VuKSAoLSBqczItdHMtY3Vy c29yIDIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChqczItdG9rZW4tY29t bWVudC10eXBlIHRva2VuKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaWYg KGpzMi1tYXRjaC1jaGFyID8qKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKHByb2duCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZXRx IGxvb2stZm9yLXNsYXNoIHQpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICdqc2RvYykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnYmxvY2sp KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAod2hpbGUgdAorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIChzZXRxIGMgKGpzMi1nZXQtY2hhcikpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKGNvbmQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChl cSBjIGpzMi1FT0ZfQ0hBUikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZXRm IChqczItdG9rZW4tZW5kIHRva2VuKSAoMS0ganMyLXRzLWN1cnNvcikpCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAoanMyLXJlcG9ydC1lcnJvciAibXNnLnVudGVybWluYXRlZC5j b21tZW50IikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0aHJvdyAncmV0dXJu IGpzMi1DT01NRU5UKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChlcSBjID8q KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHNldHEgbG9vay1mb3Itc2xhc2gg dCkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoZXEgYyA/LykKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChpZiBsb29rLWZvci1zbGFzaAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChqczItdHMtcmV0dXJuIHRva2VuIGpzMi1DT01NRU5U KSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0CisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAoc2V0ZiBsb29rLWZvci1zbGFzaCBuaWwKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChqczItdG9rZW4tZW5kIHRva2VuKSBqczItdHMtY3Vy c29yKSkpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIChpZiAoanMyLW1hdGNoLWNoYXIg Pz0pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganMyLUFTU0lHTl9ESVYKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKHRocm93ICdyZXR1cm4ganMyLURJVikpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAoPyMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICh3aGVu IGpzMi1za2lwLXByZXByb2Nlc3Nvci1kaXJlY3RpdmVzCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIChqczItc2tpcC1saW5lKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc2V0 ZiAoanMyLXRva2VuLWNvbW1lbnQtdHlwZSB0b2tlbikgJ3ByZXByb2Nlc3NvcgorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAoanMyLXRva2VuLWVuZCB0b2tlbikganMyLXRzLWN1 cnNvcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHRocm93ICdyZXR1cm4ganMyLUNP TU1FTlQpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgKHRocm93ICdyZXR1cm4ganMyLUVS Uk9SKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKD8lCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAoaWYgKGpzMi1tYXRjaC1jaGFyID89KQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGpzMi1BU1NJR05fTU9ECisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0aHJv dyAncmV0dXJuIGpzMi1NT0QpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKD9+CisgICAg ICAgICAgICAgICAgICAgICAgICAgICAodGhyb3cgJ3JldHVybiBqczItQklUTk9UKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgKD8rCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoaWYg KGpzMi1tYXRjaC1jaGFyID89KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzMi1B U1NJR05fQURECisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpZiAoanMyLW1hdGNoLWNo YXIgPyspCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqczItSU5DCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKHRocm93ICdyZXR1cm4ganMyLUFERCkpKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgKD8tCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoY29u ZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoanMyLW1hdGNoLWNoYXIgPz0pCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChzZXRxIGMganMyLUFTU0lHTl9TVUIpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICgoanMyLW1hdGNoLWNoYXIgPy0pCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICh1bmxlc3MganMyLXRzLWRpcnR5LWxpbmUKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA7OyB0cmVhdCBIVE1MIGVuZC1jb21tZW50IGFmdGVyIHBvc3NpYmxl IHdoaXRlc3BhY2UKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA7OyBhZnRlciBsaW5l IHN0YXJ0IGFzIGNvbW1lbnQtdW50aWwtZW9sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKHdoZW4gKGpzMi1tYXRjaC1jaGFyID8+KQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKGpzMi1za2lwLWxpbmUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAo c2V0ZiAoanMyLXRva2VuLWNvbW1lbnQtdHlwZSAoanMyLWN1cnJlbnQtdG9rZW4pKSAnaHRtbCkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0aHJvdyAncmV0dXJuIGpzMi1DT01N RU5UKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZXRxIGMganMyLURFQykpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKHQKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKHNldHEgYyBqczItU1VCKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoc2V0cSBq czItdHMtZGlydHktbGluZSB0KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgYykKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgKG90aGVyd2lzZQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgKGpzMi1yZXBvcnQtc2Nhbi1lcnJvciAibXNnLmlsbGVnYWwuY2hhcmFjdGVyIikpKSkpKSkK KyAgICAoc2V0ZiAoanMyLXRva2VuLXR5cGUgdG9rZW4pIHR0KQorICAgIHRva2VuKSkKKworKGRl ZnVuIGpzMi1nZXQtc3RyaW5nLW9yLXRlbXBsYXRlLXRva2VuIChxdW90ZS1jaGFyIHRva2VuKQor ICA7OyBXZSBhdHRlbXB0IHRvIGFjY3VtdWxhdGUgYSBzdHJpbmcgdGhlIGZhc3Qgd2F5LCBieQor ICA7OyBidWlsZGluZyBpdCBkaXJlY3RseSBvdXQgb2YgdGhlIHJlYWRlci4gIEJ1dCBpZiB0aGVy ZQorICA7OyBhcmUgYW55IGVzY2FwZWQgY2hhcmFjdGVycyBpbiB0aGUgc3RyaW5nLCB3ZSByZXZl cnQgdG8KKyAgOzsgYnVpbGRpbmcgaXQgb3V0IG9mIGEgc3RyaW5nIGJ1ZmZlci4KKyAgKGxldCAo KGMgKGpzMi1nZXQtY2hhcikpCisgICAgICAgIGpzMi10cy1zdHJpbmctYnVmZmVyCisgICAgICAg IG5jKQorICAgIChjYXRjaCAnYnJlYWsKKyAgICAgICh3aGlsZSAoLz0gYyBxdW90ZS1jaGFyKQor ICAgICAgICAoY2F0Y2ggJ2NvbnRpbnVlCisgICAgICAgICAgKHdoZW4gKGVxIGMganMyLUVPRl9D SEFSKQorICAgICAgICAgICAgKGpzMi11bmdldC1jaGFyKQorICAgICAgICAgICAgKGpzMi1yZXBv cnQtZXJyb3IgIm1zZy51bnRlcm1pbmF0ZWQuc3RyaW5nLmxpdCIpCisgICAgICAgICAgICAodGhy b3cgJ2JyZWFrIG5pbCkpCisgICAgICAgICAgKHdoZW4gKGFuZCAoZXEgYyA/XG4pIChub3QgKGVx IHF1b3RlLWNoYXIgP2ApKSkKKyAgICAgICAgICAgIChqczItdW5nZXQtY2hhcikKKyAgICAgICAg ICAgIChqczItcmVwb3J0LWVycm9yICJtc2cudW50ZXJtaW5hdGVkLnN0cmluZy5saXQiKQorICAg ICAgICAgICAgKHRocm93ICdicmVhayBuaWwpKQorICAgICAgICAgICh3aGVuIChlcSBjID9cXCkK KyAgICAgICAgICAgIDs7IFdlJ3ZlIGhpdCBhbiBlc2NhcGVkIGNoYXJhY3RlcgorICAgICAgICAg ICAgKHNldHEgYyAoanMyLWdldC1jaGFyKSkKKyAgICAgICAgICAgIChjbC1jYXNlIGMKKyAgICAg ICAgICAgICAgKD9iIChzZXRxIGMgP1xiKSkKKyAgICAgICAgICAgICAgKD9mIChzZXRxIGMgP1xm KSkKKyAgICAgICAgICAgICAgKD9uIChzZXRxIGMgP1xuKSkKKyAgICAgICAgICAgICAgKD9yIChz ZXRxIGMgP1xyKSkKKyAgICAgICAgICAgICAgKD90IChzZXRxIGMgP1x0KSkKKyAgICAgICAgICAg ICAgKD92IChzZXRxIGMgP1x2KSkKKyAgICAgICAgICAgICAgKD91CisgICAgICAgICAgICAgICAo c2V0cSBjMSAoanMyLXJlYWQtdW5pY29kZS1lc2NhcGUpKQorICAgICAgICAgICAgICAgKGlmIGpz Mi1wYXJzZS1pZGUtbW9kZQorICAgICAgICAgICAgICAgICAgIChpZiBjMQorICAgICAgICAgICAg ICAgICAgICAgICAocHJvZ24KKyAgICAgICAgICAgICAgICAgICAgICAgICA7OyBqdXN0IGNvcHkg dGhlIHN0cmluZyBpbiBJREUtbW9kZQorICAgICAgICAgICAgICAgICAgICAgICAgIChqczItYWRk LXRvLXN0cmluZyA/XFwpCisgICAgICAgICAgICAgICAgICAgICAgICAgKGpzMi1hZGQtdG8tc3Ry aW5nID91KQorICAgICAgICAgICAgICAgICAgICAgICAgIChkb3RpbWVzIChfIDMpCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAoanMyLWFkZC10by1zdHJpbmcgKGpzMi1nZXQtY2hhcikpKQor ICAgICAgICAgICAgICAgICAgICAgICAgIChzZXRxIGMgKGpzMi1nZXQtY2hhcikpKSA7IGFkZGVk IGF0IGVuZCBvZiBsb29wCisgICAgICAgICAgICAgICAgICAgICA7OyBmbGFnIGl0IGFzIGFuIGlu dmFsaWQgZXNjYXBlCisgICAgICAgICAgICAgICAgICAgICAoanMyLXJlcG9ydC13YXJuaW5nICJt c2cuaW52YWxpZC5lc2NhcGUiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIG5pbCAoLSBqczItdHMtY3Vyc29yIDIpIDYpKQorICAgICAgICAgICAgICAgICA7OyBHZXQg NCBoZXggZGlnaXRzOyBpZiB0aGUgdSBlc2NhcGUgaXMgbm90CisgICAgICAgICAgICAgICAgIDs7 IGZvbGxvd2VkIGJ5IDQgaGV4IGRpZ2l0cywgdXNlICd1JyArIHRoZQorICAgICAgICAgICAgICAg ICA7OyBsaXRlcmFsIGNoYXJhY3RlciBzZXF1ZW5jZSB0aGF0IGZvbGxvd3MuCisgICAgICAgICAg ICAgICAgIChqczItYWRkLXRvLXN0cmluZyA/dSkKKyAgICAgICAgICAgICAgICAgKHNldHEgZXNj YXBlLXZhbCAwKQorICAgICAgICAgICAgICAgICAoZG90aW1lcyAoXyA0KQorICAgICAgICAgICAg ICAgICAgIChzZXRxIGMgKGpzMi1nZXQtY2hhcikKKyAgICAgICAgICAgICAgICAgICAgICAgICBl c2NhcGUtdmFsIChqczIteC1kaWdpdC10by1pbnQgYyBlc2NhcGUtdmFsKSkKKyAgICAgICAgICAg ICAgICAgICAoaWYgKGNsLW1pbnVzcCBlc2NhcGUtdmFsKQorICAgICAgICAgICAgICAgICAgICAg ICAodGhyb3cgJ2NvbnRpbnVlIG5pbCkpCisgICAgICAgICAgICAgICAgICAgKGpzMi1hZGQtdG8t c3RyaW5nIGMpKQorICAgICAgICAgICAgICAgICA7OyBwcmVwYXJlIGZvciByZXBsYWNlIG9mIHN0 b3JlZCAndScgc2VxdWVuY2UgYnkgZXNjYXBlIHZhbHVlCisgICAgICAgICAgICAgICAgIChzZXRx IGpzMi10cy1zdHJpbmctYnVmZmVyIChudGhjZHIgNSBqczItdHMtc3RyaW5nLWJ1ZmZlcikKKyAg ICAgICAgICAgICAgICAgICAgICAgYyBlc2NhcGUtdmFsKSkpCisgICAgICAgICAgICAgICg/eAor ICAgICAgICAgICAgICAgOzsgR2V0IDIgaGV4IGRpZ2l0cywgZGVmYXVsdGluZyB0byAneCcrbGl0 ZXJhbAorICAgICAgICAgICAgICAgOzsgc2VxdWVuY2UsIGFzIGFib3ZlLgorICAgICAgICAgICAg ICAgKHNldHEgYyAoanMyLWdldC1jaGFyKQorICAgICAgICAgICAgICAgICAgICAgZXNjYXBlLXZh bCAoanMyLXgtZGlnaXQtdG8taW50IGMgMCkpCisgICAgICAgICAgICAgICAoaWYgKGNsLW1pbnVz cCBlc2NhcGUtdmFsKQorICAgICAgICAgICAgICAgICAgIChwcm9nbgorICAgICAgICAgICAgICAg ICAgICAgKGpzMi1hZGQtdG8tc3RyaW5nID94KQorICAgICAgICAgICAgICAgICAgICAgKHRocm93 ICdjb250aW51ZSBuaWwpKQorICAgICAgICAgICAgICAgICAoc2V0cSBjMSBjCisgICAgICAgICAg ICAgICAgICAgICAgIGMgKGpzMi1nZXQtY2hhcikKKyAgICAgICAgICAgICAgICAgICAgICAgZXNj YXBlLXZhbCAoanMyLXgtZGlnaXQtdG8taW50IGMgZXNjYXBlLXZhbCkpCisgICAgICAgICAgICAg ICAgIChpZiAoY2wtbWludXNwIGVzY2FwZS12YWwpCisgICAgICAgICAgICAgICAgICAgICAocHJv Z24KKyAgICAgICAgICAgICAgICAgICAgICAgKGpzMi1hZGQtdG8tc3RyaW5nID94KQorICAgICAg ICAgICAgICAgICAgICAgICAoanMyLWFkZC10by1zdHJpbmcgYzEpCisgICAgICAgICAgICAgICAg ICAgICAgICh0aHJvdyAnY29udGludWUgbmlsKSkKKyAgICAgICAgICAgICAgICAgICA7OyBnb3Qg MiBoZXggZGlnaXRzCisgICAgICAgICAgICAgICAgICAgKHNldHEgYyBlc2NhcGUtdmFsKSkpKQor ICAgICAgICAgICAgICAoP1xuCisgICAgICAgICAgICAgICA7OyBSZW1vdmUgbGluZSB0ZXJtaW5h dG9yIGFmdGVyIGVzY2FwZSB0byBmb2xsb3cKKyAgICAgICAgICAgICAgIDs7IFNwaWRlck1vbmtl eSBhbmQgQy9DKysKKyAgICAgICAgICAgICAgIChzZXRxIGMgKGpzMi1nZXQtY2hhcikpCisgICAg ICAgICAgICAgICAodGhyb3cgJ2NvbnRpbnVlIG5pbCkpCisgICAgICAgICAgICAgICh0CisgICAg ICAgICAgICAgICAod2hlbiAoYW5kICg8PSA/MCBjKSAoPCBjID84KSkKKyAgICAgICAgICAgICAg ICAgKHNldHEgdmFsICgtIGMgPzApCisgICAgICAgICAgICAgICAgICAgICAgIGMgKGpzMi1nZXQt Y2hhcikpCisgICAgICAgICAgICAgICAgICh3aGVuIChhbmQgKDw9ID8wIGMpICg8IGMgPzgpKQor ICAgICAgICAgICAgICAgICAgIChzZXRxIHZhbCAoLSAoKyAoKiA4IHZhbCkgYykgPzApCisgICAg ICAgICAgICAgICAgICAgICAgICAgYyAoanMyLWdldC1jaGFyKSkKKyAgICAgICAgICAgICAgICAg ICAod2hlbiAoYW5kICg8PSA/MCBjKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDwg YyA/OCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg8IHZhbCAjbzM3KSkKKyAgICAg ICAgICAgICAgICAgICAgIDs7IGMgaXMgM3JkIGNoYXIgb2Ygb2N0YWwgc2VxdWVuY2Ugb25seQor ICAgICAgICAgICAgICAgICAgICAgOzsgaWYgdGhlIHJlc3VsdGluZyB2YWwgPD0gMDM3NworICAg ICAgICAgICAgICAgICAgICAgKHNldHEgdmFsICgtICgrICgqIDggdmFsKSBjKSA/MCkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgIGMgKGpzMi1nZXQtY2hhcikpKSkKKyAgICAgICAgICAgICAg ICAgKGpzMi11bmdldC1jaGFyKQorICAgICAgICAgICAgICAgICAoc2V0cSBjIHZhbCkpKSkpCisg ICAgICAgICAgKHdoZW4gKGFuZCAoZXEgcXVvdGUtY2hhciA/YCkgKGVxIGMgPyQpKQorICAgICAg ICAgICAgKHdoZW4gKGVxIChzZXRxIG5jIChqczItZ2V0LWNoYXIpKSA/XHspCisgICAgICAgICAg ICAgICh0aHJvdyAnYnJlYWsgbmlsKSkKKyAgICAgICAgICAgIChqczItdW5nZXQtY2hhcikpCisg ICAgICAgICAgKGpzMi1hZGQtdG8tc3RyaW5nIGMpCisgICAgICAgICAgKHNldHEgYyAoanMyLWdl dC1jaGFyKSkpKSkKKyAgICAoanMyLXNldC1zdHJpbmctZnJvbS1idWZmZXIgdG9rZW4pCisgICAg KGlmIChub3QgKGVxIHF1b3RlLWNoYXIgP2ApKQorICAgICAgICBqczItU1RSSU5HCisgICAgICAo aWYgKGFuZCAoZXEgYyA/JCkgKGVxIG5jID9ceykpCisgICAgICAgICAganMyLVRFTVBMQVRFX0hF QUQKKyAgICAgICAganMyLU5PX1NVQlNfVEVNUExBVEUpKSkpCisKKyhkZWZ1biBqczItcmVhZC1y ZWdleHAgKHN0YXJ0LXR0KQorICAiQ2FsbGVkIGJ5IHBhcnNlciB3aGVuIGl0IGdldHMgLyBvciAv PSBpbiBsaXRlcmFsIGNvbnRleHQuIgorICAobGV0IChjIGVycgorICAgICAgICBpbi1jbGFzcyAg OyBpbnNpZGUgYSAnWycgLi4gJ10nIGNoYXJhY3Rlci1jbGFzcworICAgICAgICBmbGFncworICAg ICAgICAoY29udGludWUgdCkKKyAgICAgICAgKHRva2VuIChqczItbmV3LXRva2VuIDApKSkKKyAg ICAoc2V0cSBqczItdHMtc3RyaW5nLWJ1ZmZlciBuaWwpCisgICAgKGlmIChlcSBzdGFydC10dCBq czItQVNTSUdOX0RJVikKKyAgICAgICAgOzsgbWlzLXNjYW5uZWQgLz0KKyAgICAgICAgKGpzMi1h ZGQtdG8tc3RyaW5nID89KQorICAgICAgKGlmIChub3QgKGVxIHN0YXJ0LXR0IGpzMi1ESVYpKQor ICAgICAgICAgIChlcnJvciAiZmFpbGVkIGFzc2VydGlvbiIpKSkKKyAgICAod2hpbGUgKGFuZCAo bm90IGVycikKKyAgICAgICAgICAgICAgICAob3IgKC89IChzZXRxIGMgKGpzMi1nZXQtY2hhcikp ID8vKQorICAgICAgICAgICAgICAgICAgICBpbi1jbGFzcykpCisgICAgICAoY29uZAorICAgICAg ICgob3IgKD0gYyA/XG4pCisgICAgICAgICAgICAoPSBjIGpzMi1FT0ZfQ0hBUikpCisgICAgICAg IChzZXRmIChqczItdG9rZW4tZW5kIHRva2VuKSAoMS0ganMyLXRzLWN1cnNvcikKKyAgICAgICAg ICAgICAgZXJyIHQKKyAgICAgICAgICAgICAgKGpzMi10b2tlbi1zdHJpbmcgdG9rZW4pIChqczIt Y29sbGVjdC1zdHJpbmcganMyLXRzLXN0cmluZy1idWZmZXIpKQorICAgICAgICAoanMyLXJlcG9y dC1lcnJvciAibXNnLnVudGVybWluYXRlZC5yZS5saXQiKSkKKyAgICAgICAodCAoY29uZAorICAg ICAgICAgICAoKD0gYyA/XFwpCisgICAgICAgICAgICAoanMyLWFkZC10by1zdHJpbmcgYykKKyAg ICAgICAgICAgIChzZXRxIGMgKGpzMi1nZXQtY2hhcikpKQorICAgICAgICAgICAoKD0gYyA/XFsp CisgICAgICAgICAgICAoc2V0cSBpbi1jbGFzcyB0KSkKKyAgICAgICAgICAgKCg9IGMgP1xdKQor ICAgICAgICAgICAgKHNldHEgaW4tY2xhc3MgbmlsKSkpCisgICAgICAgICAgKGpzMi1hZGQtdG8t c3RyaW5nIGMpKSkpCisgICAgKHVubGVzcyBlcnIKKyAgICAgICh3aGlsZSBjb250aW51ZQorICAg ICAgICAoY29uZAorICAgICAgICAgKChqczItbWF0Y2gtY2hhciA/ZykKKyAgICAgICAgICAocHVz aCA/ZyBmbGFncykpCisgICAgICAgICAoKGpzMi1tYXRjaC1jaGFyID9pKQorICAgICAgICAgIChw dXNoID9pIGZsYWdzKSkKKyAgICAgICAgICgoanMyLW1hdGNoLWNoYXIgP20pCisgICAgICAgICAg KHB1c2ggP20gZmxhZ3MpKQorICAgICAgICAgKChhbmQgKGpzMi1tYXRjaC1jaGFyID91KQorICAg ICAgICAgICAgICAgKD49IGpzMi1sYW5ndWFnZS12ZXJzaW9uIDIwMCkpCisgICAgICAgICAgKHB1 c2ggP3UgZmxhZ3MpKQorICAgICAgICAgKChhbmQgKGpzMi1tYXRjaC1jaGFyID95KQorICAgICAg ICAgICAgICAgKD49IGpzMi1sYW5ndWFnZS12ZXJzaW9uIDIwMCkpCisgICAgICAgICAgKHB1c2gg P3kgZmxhZ3MpKQorICAgICAgICAgKHQKKyAgICAgICAgICAoc2V0cSBjb250aW51ZSBuaWwpKSkp CisgICAgICAoaWYgKGpzMi1hbHBoYS1wIChqczItcGVlay1jaGFyKSkKKyAgICAgICAgICAoanMy LXJlcG9ydC1zY2FuLWVycm9yICJtc2cuaW52YWxpZC5yZS5mbGFnIiB0CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBqczItdHMtY3Vyc29yIDEpKQorICAgICAgKGpzMi1zZXQtc3Ry aW5nLWZyb20tYnVmZmVyIHRva2VuKSkKKyAgICAoanMyLWNvbGxlY3Qtc3RyaW5nIGZsYWdzKSkp CisKKyhkZWZ1biBqczItZ2V0LWZpcnN0LXhtbC10b2tlbiAoKQorICAoc2V0cSBqczItdHMteG1s LW9wZW4tdGFncy1jb3VudCAwCisgICAgICAgIGpzMi10cy1pcy14bWwtYXR0cmlidXRlIG5pbAor ICAgICAgICBqczItdHMteG1sLWlzLXRhZy1jb250ZW50IG5pbCkKKyAgKGpzMi11bmdldC1jaGFy KQorICAoanMyLWdldC1uZXh0LXhtbC10b2tlbikpCisKKyhkZWZ1biBqczIteG1sLWRpc2NhcmQt c3RyaW5nICh0b2tlbikKKyAgIlRocm93IGF3YXkgdGhlIHN0cmluZyBpbiBwcm9ncmVzcyBhbmQg ZmxhZyBhbiBYTUwgcGFyc2UgZXJyb3IuIgorICAoc2V0ZiBqczItdHMtc3RyaW5nLWJ1ZmZlciBu aWwKKyAgICAgICAgKGpzMi10b2tlbi1zdHJpbmcgdG9rZW4pIG5pbCkKKyAgKGpzMi1yZXBvcnQt c2Nhbi1lcnJvciAibXNnLlhNTC5iYWQuZm9ybSIgdCkpCisKKyhkZWZ1biBqczItZ2V0LW5leHQt eG1sLXRva2VuICgpCisgIChzZXRxIGpzMi10cy1zdHJpbmctYnVmZmVyIG5pbCkgIDsgZm9yIHJl Y29yZGluZyB0aGUgWE1MCisgIChsZXQgKCh0b2tlbiAoanMyLW5ldy10b2tlbiAwKSkKKyAgICAg ICAgYyByZXN1bHQpCisgICAgKHNldHEgcmVzdWx0CisgICAgICAgICAgKGNhdGNoICdyZXR1cm4K KyAgICAgICAgICAgICh3aGlsZSB0CisgICAgICAgICAgICAgIChzZXRxIGMgKGpzMi1nZXQtY2hh cikpCisgICAgICAgICAgICAgIChjb25kCisgICAgICAgICAgICAgICAoKD0gYyBqczItRU9GX0NI QVIpCisgICAgICAgICAgICAgICAgKHRocm93ICdyZXR1cm4ganMyLUVSUk9SKSkKKyAgICAgICAg ICAgICAgIChqczItdHMteG1sLWlzLXRhZy1jb250ZW50CisgICAgICAgICAgICAgICAgKGNsLWNh c2UgYworICAgICAgICAgICAgICAgICAgKD8+CisgICAgICAgICAgICAgICAgICAgKGpzMi1hZGQt dG8tc3RyaW5nIGMpCisgICAgICAgICAgICAgICAgICAgKHNldHEganMyLXRzLXhtbC1pcy10YWct Y29udGVudCBuaWwKKyAgICAgICAgICAgICAgICAgICAgICAgICBqczItdHMtaXMteG1sLWF0dHJp YnV0ZSBuaWwpKQorICAgICAgICAgICAgICAgICAgKD8vCisgICAgICAgICAgICAgICAgICAgKGpz Mi1hZGQtdG8tc3RyaW5nIGMpCisgICAgICAgICAgICAgICAgICAgKHdoZW4gKGVxID8+IChqczIt cGVlay1jaGFyKSkKKyAgICAgICAgICAgICAgICAgICAgIChzZXRxIGMgKGpzMi1nZXQtY2hhcikp CisgICAgICAgICAgICAgICAgICAgICAoanMyLWFkZC10by1zdHJpbmcgYykKKyAgICAgICAgICAg ICAgICAgICAgIChzZXRxIGpzMi10cy14bWwtaXMtdGFnLWNvbnRlbnQgbmlsKQorICAgICAgICAg ICAgICAgICAgICAgKGNsLWRlY2YganMyLXRzLXhtbC1vcGVuLXRhZ3MtY291bnQpKSkKKyAgICAg ICAgICAgICAgICAgICg/eworICAgICAgICAgICAgICAgICAgIChqczItdW5nZXQtY2hhcikKKyAg ICAgICAgICAgICAgICAgICAoanMyLXNldC1zdHJpbmctZnJvbS1idWZmZXIgdG9rZW4pCisgICAg ICAgICAgICAgICAgICAgKHRocm93ICdyZXR1cm4ganMyLVhNTCkpCisgICAgICAgICAgICAgICAg ICAoKD9cJyA/XCIpCisgICAgICAgICAgICAgICAgICAgKGpzMi1hZGQtdG8tc3RyaW5nIGMpCisg ICAgICAgICAgICAgICAgICAgKHVubGVzcyAoanMyLXJlYWQtcXVvdGVkLXN0cmluZyBjIHRva2Vu KQorICAgICAgICAgICAgICAgICAgICAgKHRocm93ICdyZXR1cm4ganMyLUVSUk9SKSkpCisgICAg ICAgICAgICAgICAgICAoPz0KKyAgICAgICAgICAgICAgICAgICAoanMyLWFkZC10by1zdHJpbmcg YykKKyAgICAgICAgICAgICAgICAgICAoc2V0cSBqczItdHMtaXMteG1sLWF0dHJpYnV0ZSB0KSkK KyAgICAgICAgICAgICAgICAgICgoPyA/XHQgP1xyID9cbikKKyAgICAgICAgICAgICAgICAgICAo anMyLWFkZC10by1zdHJpbmcgYykpCisgICAgICAgICAgICAgICAgICAodAorICAgICAgICAgICAg ICAgICAgIChqczItYWRkLXRvLXN0cmluZyBjKQorICAgICAgICAgICAgICAgICAgIChzZXRxIGpz Mi10cy1pcy14bWwtYXR0cmlidXRlIG5pbCkpKQorICAgICAgICAgICAgICAgICh3aGVuIChhbmQg KG5vdCBqczItdHMteG1sLWlzLXRhZy1jb250ZW50KQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgKHplcm9wIGpzMi10cy14bWwtb3Blbi10YWdzLWNvdW50KSkKKyAgICAgICAgICAgICAgICAg IChqczItc2V0LXN0cmluZy1mcm9tLWJ1ZmZlciB0b2tlbikKKyAgICAgICAgICAgICAgICAgICh0 aHJvdyAncmV0dXJuIGpzMi1YTUxFTkQpKSkKKyAgICAgICAgICAgICAgICh0CisgICAgICAgICAg ICAgICAgOzsgZWxzZSBub3QgdGFnIGNvbnRlbnQKKyAgICAgICAgICAgICAgICAoY2wtY2FzZSBj CisgICAgICAgICAgICAgICAgICAoPzwKKyAgICAgICAgICAgICAgICAgICAoanMyLWFkZC10by1z dHJpbmcgYykKKyAgICAgICAgICAgICAgICAgICAoc2V0cSBjIChqczItcGVlay1jaGFyKSkKKyAg ICAgICAgICAgICAgICAgICAoY2wtY2FzZSBjCisgICAgICAgICAgICAgICAgICAgICAoPyEKKyAg ICAgICAgICAgICAgICAgICAgICAoc2V0cSBjIChqczItZ2V0LWNoYXIpKSA7OyBza2lwICEKKyAg ICAgICAgICAgICAgICAgICAgICAoanMyLWFkZC10by1zdHJpbmcgYykKKyAgICAgICAgICAgICAg ICAgICAgICAoc2V0cSBjIChqczItcGVlay1jaGFyKSkKKyAgICAgICAgICAgICAgICAgICAgICAo Y2wtY2FzZSBjCisgICAgICAgICAgICAgICAgICAgICAgICAoPy0KKyAgICAgICAgICAgICAgICAg ICAgICAgICAoc2V0cSBjIChqczItZ2V0LWNoYXIpKSA7OyBza2lwIC0KKyAgICAgICAgICAgICAg ICAgICAgICAgICAoanMyLWFkZC10by1zdHJpbmcgYykKKyAgICAgICAgICAgICAgICAgICAgICAg ICAoaWYgKGVxIGMgPy0pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChwcm9nbgorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIChqczItYWRkLXRvLXN0cmluZyBjKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICh1bmxlc3MgKGpzMi1yZWFkLXhtbC1jb21tZW50IHRv a2VuKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHRocm93ICdyZXR1cm4ganMy LUVSUk9SKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoanMyLXhtbC1kaXNjYXJkLXN0 cmluZyB0b2tlbikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICh0aHJvdyAncmV0dXJuIGpz Mi1FUlJPUikpKQorICAgICAgICAgICAgICAgICAgICAgICAgKD9cWworICAgICAgICAgICAgICAg ICAgICAgICAgIChzZXRxIGMgKGpzMi1nZXQtY2hhcikpIDs7IHNraXAgWworICAgICAgICAgICAg ICAgICAgICAgICAgIChqczItYWRkLXRvLXN0cmluZyBjKQorICAgICAgICAgICAgICAgICAgICAg ICAgIChpZiAoYW5kICg9IChqczItZ2V0LWNoYXIpID9DKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICg9IChqczItZ2V0LWNoYXIpID9EKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICg9IChqczItZ2V0LWNoYXIpID9BKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICg9IChqczItZ2V0LWNoYXIpID9UKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICg9IChqczItZ2V0LWNoYXIpID9BKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICg9IChqczItZ2V0LWNoYXIpID9cWykpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIChwcm9nbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChqczItYWRk LXRvLXN0cmluZyA/QykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoanMyLWFkZC10 by1zdHJpbmcgP0QpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGpzMi1hZGQtdG8t c3RyaW5nID9BKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChqczItYWRkLXRvLXN0 cmluZyA/VCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoanMyLWFkZC10by1zdHJp bmcgP0EpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGpzMi1hZGQtdG8tc3RyaW5n ID9cWykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5sZXNzIChqczItcmVhZC1j ZGF0YSB0b2tlbikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0aHJvdyAncmV0 dXJuIGpzMi1FUlJPUikpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgKGpzMi14bWwtZGlz Y2FyZC1zdHJpbmcgdG9rZW4pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAodGhyb3cgJ3Jl dHVybiBqczItRVJST1IpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICh0CisgICAgICAgICAg ICAgICAgICAgICAgICAgKHVubGVzcyAoanMyLXJlYWQtZW50aXR5IHRva2VuKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgKHRocm93ICdyZXR1cm4ganMyLUVSUk9SKSkpKQorICAgICAgICAg ICAgICAgICAgICAgIDs7IEFsbG93IGJhcmUgQ0RBVEEgc2VjdGlvbiwgZS5nLjoKKyAgICAgICAg ICAgICAgICAgICAgICA7OyAgIGxldCB4bWwgPSA8IVtDREFUQVsgZm9vIGJhciBiYXogXV0+Owor ICAgICAgICAgICAgICAgICAgICAgICh3aGVuICh6ZXJvcCBqczItdHMteG1sLW9wZW4tdGFncy1j b3VudCkKKyAgICAgICAgICAgICAgICAgICAgICAgICh0aHJvdyAncmV0dXJuIGpzMi1YTUxFTkQp KSkKKyAgICAgICAgICAgICAgICAgICAgICg/PworICAgICAgICAgICAgICAgICAgICAgIChzZXRx IGMgKGpzMi1nZXQtY2hhcikpIDs7IHNraXAgPworICAgICAgICAgICAgICAgICAgICAgIChqczIt YWRkLXRvLXN0cmluZyBjKQorICAgICAgICAgICAgICAgICAgICAgICh1bmxlc3MgKGpzMi1yZWFk LVBJIHRva2VuKQorICAgICAgICAgICAgICAgICAgICAgICAgKHRocm93ICdyZXR1cm4ganMyLUVS Uk9SKSkpCisgICAgICAgICAgICAgICAgICAgICAoPy8KKyAgICAgICAgICAgICAgICAgICAgICA7 OyBlbmQgdGFnCisgICAgICAgICAgICAgICAgICAgICAgKHNldHEgYyAoanMyLWdldC1jaGFyKSkg Ozsgc2tpcCAvCisgICAgICAgICAgICAgICAgICAgICAgKGpzMi1hZGQtdG8tc3RyaW5nIGMpCisg ICAgICAgICAgICAgICAgICAgICAgKHdoZW4gKHplcm9wIGpzMi10cy14bWwtb3Blbi10YWdzLWNv dW50KQorICAgICAgICAgICAgICAgICAgICAgICAgKGpzMi14bWwtZGlzY2FyZC1zdHJpbmcgdG9r ZW4pCisgICAgICAgICAgICAgICAgICAgICAgICAodGhyb3cgJ3JldHVybiBqczItRVJST1IpKQor ICAgICAgICAgICAgICAgICAgICAgIChzZXRxIGpzMi10cy14bWwtaXMtdGFnLWNvbnRlbnQgdCkK KyAgICAgICAgICAgICAgICAgICAgICAoY2wtZGVjZiBqczItdHMteG1sLW9wZW4tdGFncy1jb3Vu dCkpCisgICAgICAgICAgICAgICAgICAgICAodAorICAgICAgICAgICAgICAgICAgICAgIDs7IHN0 YXJ0IHRhZworICAgICAgICAgICAgICAgICAgICAgIChzZXRxIGpzMi10cy14bWwtaXMtdGFnLWNv bnRlbnQgdCkKKyAgICAgICAgICAgICAgICAgICAgICAoY2wtaW5jZiBqczItdHMteG1sLW9wZW4t dGFncy1jb3VudCkpKSkKKyAgICAgICAgICAgICAgICAgICg/eworICAgICAgICAgICAgICAgICAg IChqczItdW5nZXQtY2hhcikKKyAgICAgICAgICAgICAgICAgICAoanMyLXNldC1zdHJpbmctZnJv bS1idWZmZXIgdG9rZW4pCisgICAgICAgICAgICAgICAgICAgKHRocm93ICdyZXR1cm4ganMyLVhN TCkpCisgICAgICAgICAgICAgICAgICAodAorICAgICAgICAgICAgICAgICAgIChqczItYWRkLXRv LXN0cmluZyBjKSkpKSkpKSkKKyAgICAoc2V0ZiAoanMyLXRva2VuLWVuZCB0b2tlbikganMyLXRz LWN1cnNvcikKKyAgICAoc2V0ZiAoanMyLXRva2VuLXR5cGUgdG9rZW4pIHJlc3VsdCkKKyAgICBy ZXN1bHQpKQorCisoZGVmdW4ganMyLXJlYWQtcXVvdGVkLXN0cmluZyAocXVvdGUgdG9rZW4pCisg IChsZXQgKGMpCisgICAgKGNhdGNoICdyZXR1cm4KKyAgICAgICh3aGlsZSAoLz0gKHNldHEgYyAo anMyLWdldC1jaGFyKSkganMyLUVPRl9DSEFSKQorICAgICAgICAoanMyLWFkZC10by1zdHJpbmcg YykKKyAgICAgICAgKGlmIChlcSBjIHF1b3RlKQorICAgICAgICAgICAgKHRocm93ICdyZXR1cm4g dCkpKQorICAgICAgKGpzMi14bWwtZGlzY2FyZC1zdHJpbmcgdG9rZW4pICA7OyB0aHJvdyBhd2F5 IHN0cmluZyBpbiBwcm9ncmVzcworICAgICAgbmlsKSkpCisKKyhkZWZ1biBqczItcmVhZC14bWwt Y29tbWVudCAodG9rZW4pCisgIChsZXQgKChjIChqczItZ2V0LWNoYXIpKSkKKyAgICAoY2F0Y2gg J3JldHVybgorICAgICAgKHdoaWxlICgvPSBjIGpzMi1FT0ZfQ0hBUikKKyAgICAgICAgKGNhdGNo ICdjb250aW51ZQorICAgICAgICAgIChqczItYWRkLXRvLXN0cmluZyBjKQorICAgICAgICAgICh3 aGVuIChhbmQgKGVxIGMgPy0pIChlcSA/LSAoanMyLXBlZWstY2hhcikpKQorICAgICAgICAgICAg KHNldHEgYyAoanMyLWdldC1jaGFyKSkKKyAgICAgICAgICAgIChqczItYWRkLXRvLXN0cmluZyBj KQorICAgICAgICAgICAgKGlmIChlcSAoanMyLXBlZWstY2hhcikgPz4pCisgICAgICAgICAgICAg ICAgKHByb2duCisgICAgICAgICAgICAgICAgICAoc2V0cSBjIChqczItZ2V0LWNoYXIpKSA7OyBz a2lwID4KKyAgICAgICAgICAgICAgICAgIChqczItYWRkLXRvLXN0cmluZyBjKQorICAgICAgICAg ICAgICAgICAgKHRocm93ICdyZXR1cm4gdCkpCisgICAgICAgICAgICAgICh0aHJvdyAnY29udGlu dWUgbmlsKSkpCisgICAgICAgICAgKHNldHEgYyAoanMyLWdldC1jaGFyKSkpKQorICAgICAgKGpz Mi14bWwtZGlzY2FyZC1zdHJpbmcgdG9rZW4pCisgICAgICBuaWwpKSkKKworKGRlZnVuIGpzMi1y ZWFkLWNkYXRhICh0b2tlbikKKyAgKGxldCAoKGMgKGpzMi1nZXQtY2hhcikpKQorICAgIChjYXRj aCAncmV0dXJuCisgICAgICAod2hpbGUgKC89IGMganMyLUVPRl9DSEFSKQorICAgICAgICAoY2F0 Y2ggJ2NvbnRpbnVlCisgICAgICAgICAgKGpzMi1hZGQtdG8tc3RyaW5nIGMpCisgICAgICAgICAg KHdoZW4gKGFuZCAoZXEgYyA/XF0pIChlcSAoanMyLXBlZWstY2hhcikgP1xdKSkKKyAgICAgICAg ICAgIChzZXRxIGMgKGpzMi1nZXQtY2hhcikpCisgICAgICAgICAgICAoanMyLWFkZC10by1zdHJp bmcgYykKKyAgICAgICAgICAgIChpZiAoZXEgKGpzMi1wZWVrLWNoYXIpID8+KQorICAgICAgICAg ICAgICAgIChwcm9nbgorICAgICAgICAgICAgICAgICAgKHNldHEgYyAoanMyLWdldC1jaGFyKSkg OzsgU2tpcCA+CisgICAgICAgICAgICAgICAgICAoanMyLWFkZC10by1zdHJpbmcgYykKKyAgICAg ICAgICAgICAgICAgICh0aHJvdyAncmV0dXJuIHQpKQorICAgICAgICAgICAgICAodGhyb3cgJ2Nv bnRpbnVlIG5pbCkpKQorICAgICAgICAgIChzZXRxIGMgKGpzMi1nZXQtY2hhcikpKSkKKyAgICAg IChqczIteG1sLWRpc2NhcmQtc3RyaW5nIHRva2VuKQorICAgICAgbmlsKSkpCisKKyhkZWZ1biBq czItcmVhZC1lbnRpdHkgKHRva2VuKQorICAobGV0ICgoZGVjbC10YWdzIDEpCisgICAgICAgIGMp CisgICAgKGNhdGNoICdyZXR1cm4KKyAgICAgICh3aGlsZSAoLz0ganMyLUVPRl9DSEFSIChzZXRx IGMgKGpzMi1nZXQtY2hhcikpKQorICAgICAgICAoanMyLWFkZC10by1zdHJpbmcgYykKKyAgICAg ICAgKGNsLWNhc2UgYworICAgICAgICAgICg/PAorICAgICAgICAgICAoY2wtaW5jZiBkZWNsLXRh Z3MpKQorICAgICAgICAgICg/PgorICAgICAgICAgICAoY2wtZGVjZiBkZWNsLXRhZ3MpCisgICAg ICAgICAgIChpZiAoemVyb3AgZGVjbC10YWdzKQorICAgICAgICAgICAgICAgKHRocm93ICdyZXR1 cm4gdCkpKSkpCisgICAgICAoanMyLXhtbC1kaXNjYXJkLXN0cmluZyB0b2tlbikKKyAgICAgIG5p bCkpKQorCisoZGVmdW4ganMyLXJlYWQtUEkgKHRva2VuKQorICAiU2NhbiBhbiBYTUwgcHJvY2Vz c2luZyBpbnN0cnVjdGlvbi4iCisgIChsZXQgKGMpCisgICAgKGNhdGNoICdyZXR1cm4KKyAgICAg ICh3aGlsZSAoLz0ganMyLUVPRl9DSEFSIChzZXRxIGMgKGpzMi1nZXQtY2hhcikpKQorICAgICAg ICAoanMyLWFkZC10by1zdHJpbmcgYykKKyAgICAgICAgKHdoZW4gKGFuZCAoZXEgYyA/PykgKGVx IChqczItcGVlay1jaGFyKSA/PikpCisgICAgICAgICAgKHNldHEgYyAoanMyLWdldC1jaGFyKSkg IDs7IFNraXAgPgorICAgICAgICAgIChqczItYWRkLXRvLXN0cmluZyBjKQorICAgICAgICAgICh0 aHJvdyAncmV0dXJuIHQpKSkKKyAgICAgIChqczIteG1sLWRpc2NhcmQtc3RyaW5nIHRva2VuKQor ICAgICAgbmlsKSkpCisKKzs7OyBIaWdobGlnaHRpbmcKKworKGRlZnVuIGpzMi1zZXQtZmFjZSAo YmVnIGVuZCBmYWNlICZvcHRpb25hbCByZWNvcmQpCisgICJGb250aWZ5IGEgcmVnaW9uLiAgSWYg UkVDT1JEIGlzIG5vbi1uaWwsIHJlY29yZCBmb3IgbGF0ZXIuIgorICAod2hlbiAoY2wtcGx1c3Ag anMyLWhpZ2hsaWdodC1sZXZlbCkKKyAgICAoc2V0cSBiZWcgKG1pbiAocG9pbnQtbWF4KSBiZWcp CisgICAgICAgICAgYmVnIChtYXggKHBvaW50LW1pbikgYmVnKQorICAgICAgICAgIGVuZCAobWlu IChwb2ludC1tYXgpIGVuZCkKKyAgICAgICAgICBlbmQgKG1heCAocG9pbnQtbWluKSBlbmQpKQor ICAgIChpZiByZWNvcmQKKyAgICAgICAgKHB1c2ggKGxpc3QgYmVnIGVuZCBmYWNlKSBqczItbW9k ZS1mb250aWZpY2F0aW9ucykKKyAgICAgIChwdXQtdGV4dC1wcm9wZXJ0eSBiZWcgZW5kICdmb250 LWxvY2stZmFjZSBmYWNlKSkpKQorCisoZGVmc3Vic3QganMyLWNsZWFyLWZhY2UgKGJlZyBlbmQp CisgIChyZW1vdmUtdGV4dC1wcm9wZXJ0aWVzIGJlZyBlbmQgJyhmb250LWxvY2stZmFjZSBuaWwK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlbHAtZWNobyBuaWwKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvaW50LWVudGVyZWQgbmlsCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjLWluLXN3cyBuaWwpKSkKKworKGRlZmNvbnN0 IGpzMi1lY21hLWdsb2JhbC1wcm9wcworICAoY29uY2F0ICJeIgorICAgICAgICAgIChyZWdleHAt b3B0CisgICAgICAgICAgICcoIkluZmluaXR5IiAiTmFOIiAidW5kZWZpbmVkIiAiYXJndW1lbnRz IikgdCkKKyAgICAgICAgICAiJCIpCisgICJWYWx1ZSBwcm9wZXJ0aWVzIG9mIHRoZSBFY21hLTI2 MiBHbG9iYWwgT2JqZWN0LgorU2hvd24gYXQgb3IgYWJvdmUgYGpzMi1oaWdobGlnaHQtbGV2ZWwn IDIuIikKKworOzsgbWlnaHQgd2FudCB0byBhZGQgdGhlIG5hbWUgImFyZ3VtZW50cyIgdG8gdGhp cyBsaXN0PworKGRlZmNvbnN0IGpzMi1lY21hLW9iamVjdC1wcm9wcworICAoY29uY2F0ICJeIgor ICAgICAgICAgIChyZWdleHAtb3B0CisgICAgICAgICAgICcoInByb3RvdHlwZSIgIl9fcHJvdG9f XyIgIl9fcGFyZW50X18iKSB0KQorICAgICAgICAgICIkIikKKyAgIlZhbHVlIHByb3BlcnRpZXMg b2YgdGhlIEVjbWEtMjYyIE9iamVjdCBjb25zdHJ1Y3Rvci4KK1Nob3duIGF0IG9yIGFib3ZlIGBq czItaGlnaGxpZ2h0LWxldmVsJyAyLiIpCisKKyhkZWZjb25zdCBqczItZWNtYS1nbG9iYWwtZnVu Y3MKKyAgKGNvbmNhdAorICAgIl4iCisgICAocmVnZXhwLW9wdAorICAgICcoImRlY29kZVVSSSIg ImRlY29kZVVSSUNvbXBvbmVudCIgImVuY29kZVVSSSIgImVuY29kZVVSSUNvbXBvbmVudCIKKyAg ICAgICJldmFsIiAiaXNGaW5pdGUiICJpc05hTiIgInBhcnNlRmxvYXQiICJwYXJzZUludCIpIHQp CisgICAiJCIpCisgICJGdW5jdGlvbiBwcm9wZXJ0aWVzIG9mIHRoZSBFY21hLTI2MiB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CAiXiIKKyAgICAgICAgICAocmVnZXhwLW9wdAorICAg ICAgICAgICAnKCJhYnMiICJhY29zIiAiYXNpbiIgImF0YW4iICJhdGFuMiIgImNlaWwiICJjb3Mi ICJleHAiICJmbG9vciIKKyAgICAgICAgICAgICAibG9nIiAibWF4IiAibWluIiAicG93IiAicmFu ZG9tIiAicm91bmQiICJzaW4iICJzcXJ0IiAidGFuIikgdCkKKyAgICAgICAgICAiJCIpCisgICJG dW5jdGlvbiBwcm9wZXJ0aWVzIG9mIHRoZSBFY21hLTI2MiBNYXRoIG9iamVjdC4KK1Nob3duIGF0 IG9yIGFib3ZlIGBqczItaGlnaGxpZ2h0LWxldmVsJyAyLiIpCisKKyhkZWZjb25zdCBqczItZWNt YS1mdW5jdGlvbi1wcm9wcworICAoY29uY2F0CisgICAiXiIKKyAgIChyZWdleHAtb3B0CisgICAg Jyg7OyBwcm9wZXJ0aWVzIG9mIHRoZSBPYmplY3QgcHJvdG90eXBlIG9iamVjdAorICAgICAgImhh c093blByb3BlcnR5IiAiaXNQcm90b3R5cGVPZiIgInByb3BlcnR5SXNFbnVtZXJhYmxlIgorICAg ICAgInRvTG9jYWxlU3RyaW5nIiAidG9TdHJpbmciICJ2YWx1ZU9mIgorICAgICAgOzsgcHJvcGVy dGllcyBvZiB0aGUgRnVuY3Rpb24gcHJvdG90eXBlIG9iamVjdAorICAgICAgImFwcGx5IiAiY2Fs bCIKKyAgICAgIDs7IHByb3BlcnRpZXMgb2YgdGhlIEFycmF5IHByb3RvdHlwZSBvYmplY3QKKyAg ICAgICJjb25jYXQiICJqb2luIiAicG9wIiAicHVzaCIgInJldmVyc2UiICJzaGlmdCIgInNsaWNl IiAic29ydCIKKyAgICAgICJzcGxpY2UiICJ1bnNoaWZ0IgorICAgICAgOzsgcHJvcGVydGllcyBv ZiB0aGUgU3RyaW5nIHByb3RvdHlwZSBvYmplY3QKKyAgICAgICJjaGFyQXQiICJjaGFyQ29kZUF0 IiAiZnJvbUNoYXJDb2RlIiAiaW5kZXhPZiIgImxhc3RJbmRleE9mIgorICAgICAgImxvY2FsZUNv bXBhcmUiICJtYXRjaCIgInJlcGxhY2UiICJzZWFyY2giICJzcGxpdCIgInN1YnN0cmluZyIKKyAg ICAgICJ0b0xvY2FsZUxvd2VyQ2FzZSIgInRvTG9jYWxlVXBwZXJDYXNlIiAidG9Mb3dlckNhc2Ui CisgICAgICAidG9VcHBlckNhc2UiCisgICAgICA7OyBwcm9wZXJ0aWVzIG9mIHRoZSBOdW1iZXIg cHJvdG90eXBlIG9iamVjdAorICAgICAgInRvRXhwb25lbnRpYWwiICJ0b0ZpeGVkIiAidG9QcmVj aXNpb24iCisgICAgICA7OyBwcm9wZXJ0aWVzIG9mIHRoZSBEYXRlIHByb3RvdHlwZSBvYmplY3QK KyAgICAgICJnZXREYXRlIiAiZ2V0RGF5IiAiZ2V0RnVsbFllYXIiICJnZXRIb3VycyIgImdldE1p bGxpc2Vjb25kcyIKKyAgICAgICJnZXRNaW51dGVzIiAiZ2V0TW9udGgiICJnZXRTZWNvbmRzIiAi Z2V0VGltZSIKKyAgICAgICJnZXRUaW1lem9uZU9mZnNldCIgImdldFVUQ0RhdGUiICJnZXRVVENE YXkiICJnZXRVVENGdWxsWWVhciIKKyAgICAgICJnZXRVVENIb3VycyIgImdldFVUQ01pbGxpc2Vj b25kcyIgImdldFVUQ01pbnV0ZXMiICJnZXRVVENNb250aCIKKyAgICAgICJnZXRVVENTZWNvbmRz IiAic2V0RGF0ZSIgInNldEZ1bGxZZWFyIiAic2V0SG91cnMiCisgICAgICAic2V0TWlsbGlzZWNv bmRzIiAic2V0TWludXRlcyIgInNldE1vbnRoIiAic2V0U2Vjb25kcyIgInNldFRpbWUiCisgICAg ICAic2V0VVRDRGF0ZSIgInNldFVUQ0Z1bGxZZWFyIiAic2V0VVRDSG91cnMiICJzZXRVVENNaWxs aXNlY29uZHMiCisgICAgICAic2V0VVRDTWludXRlcyIgInNldFVUQ01vbnRoIiAic2V0VVRDU2Vj b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uYW1lLW5vZGUtbmFtZSB0YXJnZXQpKSkK KyAgICAgICAgKHByb3AtbmFtZSAoaWYgcHJvcCAoanMyLW5hbWUtbm9kZS1uYW1lIHByb3ApKSkK KyAgICAgICAgKGxldmVsMiAoPj0ganMyLWhpZ2hsaWdodC1sZXZlbCAyKSkKKyAgICAgICAgKGxl dmVsMyAoPj0ganMyLWhpZ2hsaWdodC1sZXZlbCAzKSkpCisgICAgKHdoZW4gbGV2ZWwyCisgICAg ICAobGV0ICgoZmFjZQorICAgICAgICAgICAgIChpZiBjYWxsLXAKKyAgICAgICAgICAgICAgICAg KGNvbmQKKyAgICAgICAgICAgICAgICAgICgoYW5kIHRhcmdldCBwcm9wKQorICAgICAgICAgICAg ICAgICAgIChjb25kCisgICAgICAgICAgICAgICAgICAgICgoYW5kIGxldmVsMyAoc3RyaW5nLW1h dGNoIGpzMi1lY21hLWZ1bmN0aW9uLXByb3BzIHByb3AtbmFtZSkpCisgICAgICAgICAgICAgICAg ICAgICAnZm9udC1sb2NrLWJ1aWx0aW4tZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgKChhbmQg dGFyZ2V0LW5hbWUgcHJvcCkKKyAgICAgICAgICAgICAgICAgICAgIChjb25kCisgICAgICAgICAg ICAgICAgICAgICAgKChzdHJpbmc9IHRhcmdldC1uYW1lICJEYXRlIikKKyAgICAgICAgICAgICAg ICAgICAgICAgKGlmIChzdHJpbmctbWF0Y2gganMyLWVjbWEtZGF0ZS1wcm9wcyBwcm9wLW5hbWUp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAnZm9udC1sb2NrLWJ1aWx0aW4tZmFjZSkpCisg ICAgICAgICAgICAgICAgICAgICAgKChzdHJpbmc9IHRhcmdldC1uYW1lICJNYXRoIikKKyAgICAg ICAgICAgICAgICAgICAgICAgKGlmIChzdHJpbmctbWF0Y2gganMyLWVjbWEtbWF0aC1mdW5jcyBw cm9wLW5hbWUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAnZm9udC1sb2NrLWJ1aWx0aW4t ZmFjZSkpKSkpKQorICAgICAgICAgICAgICAgICAgKHByb3AKKyAgICAgICAgICAgICAgICAgICAo aWYgKHN0cmluZy1tYXRjaCBqczItZWNtYS1nbG9iYWwtZnVuY3MgcHJvcC1uYW1lKQorICAgICAg ICAgICAgICAgICAgICAgICAnZm9udC1sb2NrLWJ1aWx0aW4tZmFjZSkpKQorICAgICAgICAgICAg ICAgKGNvbmQKKyAgICAgICAgICAgICAgICAoKGFuZCB0YXJnZXQgcHJvcCkKKyAgICAgICAgICAg ICAgICAgKGNvbmQKKyAgICAgICAgICAgICAgICAgICgoc3RyaW5nPSB0YXJnZXQtbmFtZSAiTnVt YmVyIikKKyAgICAgICAgICAgICAgICAgICAoaWYgKHN0cmluZy1tYXRjaCBqczItZWNtYS1udW1i ZXItcHJvcHMgcHJvcC1uYW1lKQorICAgICAgICAgICAgICAgICAgICAgICAnZm9udC1sb2NrLWNv bnN0YW50LWZhY2UpKQorICAgICAgICAgICAgICAgICAgKChzdHJpbmc9IHRhcmdldC1uYW1lICJN YXRoIikKKyAgICAgICAgICAgICAgICAgICAoaWYgKHN0cmluZy1tYXRjaCBqczItZWNtYS1tYXRo LXByb3BzIHByb3AtbmFtZSkKKyAgICAgICAgICAgICAgICAgICAgICAgJ2ZvbnQtbG9jay1jb25z dGFudC1mYWNlKSkpKQorICAgICAgICAgICAgICAgIChwcm9wCisgICAgICAgICAgICAgICAgIChp ZiAoc3RyaW5nLW1hdGNoIGpzMi1lY21hLW9iamVjdC1wcm9wcyBwcm9wLW5hbWUpCisgICAgICAg ICAgICAgICAgICAgICAnZm9udC1sb2NrLWNvbnN0YW50LWZhY2UpKSkpKSkKKyAgICAgICAgKHdo ZW4gZmFjZQorICAgICAgICAgIChsZXQgKChwb3MgKCsgKGpzMi1ub2RlLXBvcyBwYXJlbnQpICA7 IGFic29sdXRlCisgICAgICAgICAgICAgICAgICAgICAgICAoanMyLW5vZGUtcG9zIHByb3ApKSkp IDsgcmVs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Aod2hlbiAoanMyLW5hbWUtbm9k ZS1wIG5hbWUpCisgICAgICAoanMyLXNldC1mYWNlIChzZXRxIHBvcyAoKyAoanMyLW5vZGUtcG9z IGV4cHIpICA7IHBhcmVudCBpcyBhYnNvbHV0ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKGpzMi1ub2RlLXBvcyBuYW1lKSkpCisgICAgICAgICAgICAgICAgICAgICgrIHBvcyAo anMyLW5vZGUtbGVuIG5hbWUpKQorICAgICAgICAgICAgICAgICAgICAnZm9udC1sb2NrLWZ1bmN0 aW9uLW5hbWUtZmFjZQorICAgICAgICAgICAgICAgICAgICAncmVjb3JkKSkpKQorCis7OyBzb3Vy Y2U6ICBodHRwOi8vanNkb2Muc291cmNlZm9yZ2UubmV0LworOzsgTm90ZSAtIHRoaXMgc3ludGF4 IGlzIGZvciBHb29nbGUncyBlbmhhbmNlZCBqc2RvYyBwYXJzZXIgdGhhdAorOzsgYWxsb3dzIHR5 cGUgc3BlY2lmaWNhdGlvbnMsIGFuZCBuZWVkcyB3b3JrIGJlZm9yZSBlbnRlcmluZyB0aGUgd2ls ZC4KKworKGRlZmNvbnN0IGpzMi1qc2RvYy1wYXJhbS10YWctcmVnZXhwCisgIChjb25jYXQgIl5c XHMtKlxcKitcXHMtKlxcKEAiCisgICAgICAgICAgIlxcKD86cGFyYW1cXHxhcmd1bWVudFxcKSIK KyAgICAgICAgICAiXFwpIgorICAgICAgICAgICJcXHMtKlxcKHtbXn1dK31cXCk/IiAgICAgICAg IDsgb3B0aW9uYWwgdHlwZQorICAgICAgICAgICJcXHMtKlxcWz9cXChbWzphbG51bTpdXyRcLl0r XFwpP1xcXT8iICA7IG5hbWUKKyAgICAgICAgICAiXFw+IikKKyAgIk1hdGNoZXMganNkb2MgdGFn cyB3aXRoIG9wdGlvbmFsIHR5cGUgYW5kIG9wdGlvbmFsIHBhcmFtIG5hbWUuIikKKworKGRlZmNv bnN0IGpzMi1qc2RvYy10eXBlZC10YWctcmVnZXhwCisgIChjb25jYXQgIl5cXHMtKlxcKitcXHMt KlxcKEBcXCg/OiIKKyAgICAgICAgICAocmVnZXhwLW9wdAorICAgICAgICAgICAnKCJlbnVtIgor ICAgICAgICAgICAgICJleHRlbmRzIgorICAgICAgICAgICAgICJmaWVsZCIKKyAgICAgICAgICAg ICAiaWQiCisgICAgICAgICAgICAgImltcGxlbWVudHMiCisgICAgICAgICAgICAgImxlbmRzIgor ICAgICAgICAgICAgICJtb2RzIgorICAgICAgICAgICAgICJyZXF1aXJlcyIKKyAgICAgICAgICAg ICAicmV0dXJuIgorICAgICAgICAgICAgICJyZXR1cm5zIgorICAgICAgICAgICAgICJ0aHJvdyIK KyAgICAgICAgICAgICAidGhyb3dzIikpCisgICAgICAgICAgIlxcKVxcKVxccy0qXFwoe1tefV0r fVxcKT8iKQorICAiTWF0Y2hlcyBqc2RvYyB0YWdzIHdpdGggb3B0aW9uYWwgdHlwZS4iKQorCiso ZGVmY29uc3QganMyLWpzZG9jLWFyZy10YWctcmVnZXhwCisgIChjb25jYXQgIl5cXHMtKlxcKitc XHMtKlxcKEBcXCg/OiIKKyAgICAgICAgICAocmVnZXhwLW9wdAorICAgICAgICAgICAnKCJhbGlh cyIKKyAgICAgICAgICAgICAiYXVnbWVudHMiCisgICAgICAgICAgICAgImJvcnJvd3MiCisgICAg ICAgICAgICAgImJ1ZyIKKyAgICAgICAgICAgICAiYmFzZSIKKyAgICAgICAgICAgICAiY29uZmln IgorICAgICAgICAgICAgICJkZWZhdWx0IgorICAgICAgICAgICAgICJkZWZpbmUiCisgICAgICAg ICAgICAgImV4Y2VwdGlvbiIKKyAgICAgICAgICAgICAiZnVuY3Rpb24iCisgICAgICAgICAgICAg Im1lbWJlciIKKyAgICAgICAgICAgICAibWVtYmVyT2YiCisgICAgICAgICAgICAgIm5hbWUiCisg ICAgICAgICAgICAgIm5hbWVzcGFjZSIKKyAgICAgICAgICAgICAicHJvcGVydHkiCisgICAgICAg ICAgICAgInNpbmNlIgorICAgICAgICAgICAgICJzdXBwcmVzcyIKKyAgICAgICAgICAgICAidGhp cyIKKyAgICAgICAgICAgICAidGhyb3dzIgorICAgICAgICAgICAgICJ0eXBlIgorICAgICAgICAg ICAgICJ2ZXJzaW9uIikpCisgICAgICAgICAgIlxcKVxcKVxccy0rXFwoW14gXHRdK1xcKSIpCisg ICJNYXRjaGVzIGpzZG9jIHRhZ3Mgd2l0aCBhIHNpbmdsZSBhcmd1bWVudC4iKQorCisoZGVmY29u c3QganMyLWpzZG9jLWVtcHR5LXRhZy1yZWdleHAKKyAgKGNvbmNhdCAiXlxccy0qXFwqK1xccy0q XFwoQFxcKD86IgorICAgICAgICAgIChyZWdleHAtb3B0CisgICAgICAgICAgICcoImFkZG9uIgor ICAgICAgICAgICAgICJhdXRob3IiCisgICAgICAgICAgICAgImNsYXNzIgorICAgICAgICAgICAg ICJjb25zdCIKKyAgICAgICAgICAgICAiY29uc3RhbnQiCisgICAgICAgICAgICAgImNvbnN0cnVj dG9yIgorICAgICAgICAgICAgICJjb25zdHJ1Y3RzIgorICAgICAgICAgICAgICJkZXByZWNhdGVk IgorICAgICAgICAgICAgICJkZXNjIgorICAgICAgICAgICAgICJkZXNjcmlwdGlvbiIKKyAgICAg ICAgICAgICAiZXZlbnQiCisgICAgICAgICAgICAgImV4YW1wbGUiCisgICAgICAgICAgICAgImV4 ZWMiCisgICAgICAgICAgICAgImV4cG9ydCIKKyAgICAgICAgICAgICAiZmlsZW92ZXJ2aWV3Igor ICAgICAgICAgICAgICJmaW5hbCIKKyAgICAgICAgICAgICAiZnVuY3Rpb24iCisgICAgICAgICAg ICAgImhpZGRlbiIKKyAgICAgICAgICAgICAiaWdub3JlIgorICAgICAgICAgICAgICJpbXBsaWNp dENhc3QiCisgICAgICAgICAgICAgImluaGVyaXREb2MiCisgICAgICAgICAgICAgImlubmVyIgor ICAgICAgICAgICAgICJpbnRlcmZhY2UiCisgICAgICAgICAgICAgImxpY2Vuc2UiCisgICAgICAg ICAgICAgIm5vYWxpYXMiCisgICAgICAgICAgICAgIm5vc2hhZG93IgorICAgICAgICAgICAgICJu b3R5cGVjaGVjayIKKyAgICAgICAgICAgICAib3ZlcnJpZGUiCisgICAgICAgICAgICAgIm93bmVy IgorICAgICAgICAgICAgICJwcmVzZXJ2ZSIKKyAgICAgICAgICAgICAicHJlc2VydmVUcnkiCisg ICAgICAgICAgICAgInByaXZhdGUiCisgICAgICAgICAgICAgInByb3RlY3RlZCIKKyAgICAgICAg ICAgICAicHVibGljIgorICAgICAgICAgICAgICJzdGF0aWMiCisgICAgICAgICAgICAgInN1cHBv cnRlZCIKKyAgICAgICAgICAgICApKQorICAgICAgICAgICJcXClcXClcXHMtKiIpCisgICJNYXRj aGVzIGVtcHR5IGpzZG9jIHRhZ3MuIikKKworKGRlZmNvbnN0IGpzMi1qc2RvYy1saW5rLXRhZy1y ZWdleHAKKyAgIntcXChAXFwoPzpsaW5rXFx8Y29kZVxcKVxcKVxccy0rXFwoW14jfVxuXStcXClc XCgjLitcXCk/fSIKKyAgIk1hdGNoZXMgYSBqc2RvYyBsaW5rIG9yIGNvZGUgdGFnLiIpCisKKyhk ZWZjb25zdCBqczItanNkb2Mtc2VlLXRhZy1yZWdleHAKKyAgIl5cXHMtKlxcKitcXHMtKlxcKEBz ZWVcXClcXHMtK1xcKFteI31cbl0rXFwpXFwoIy4rXFwpPyIKKyAgIk1hdGNoZXMgYSBqc2RvYyBA c2VlIHRhZy4iKQorCisoZGVmY29uc3QganMyLWpzZG9jLWh0bWwtdGFnLXJlZ2V4cAorICAiXFwo PC8/XFwpXFwoW1s6YWxwaGE6XV0rXFwpXFxzLSpcXCgvPz5cXCkiCisgICJNYXRjaGVzIGEgc2lt cGxlIChubyBhdHRyaWJ1dGVzKSBodG1sIHN0YXJ0LSBvciBlbmQtdGFnLiIpCisKKyhkZWZ1biBq czItanNkb2MtaGlnaGxpZ2h0LWhlbHBlciAoKQorICAoanMyLXNldC1mYWNlIChtYXRjaC1iZWdp bm5pbmcgMSkKKyAgICAgICAgICAgICAgICAobWF0Y2gtZW5kIDEpCisgICAgICAgICAgICAgICAg J2pzMi1qc2RvYy10YWcpCisgIChpZiAobWF0Y2gtYmVnaW5uaW5nIDIpCisgICAgICAoaWYgKHNh dmUtZXhjdXJzaW9uCisgICAgICAgICAgICAoZ290by1jaGFyIChtYXRjaC1iZWdpbm5pbmcgMikp CisgICAgICAgICAgICAoPSAoY2hhci1hZnRlcikgP3spKQorICAgICAgICAgIChqczItc2V0LWZh Y2UgKDErIChtYXRjaC1iZWdpbm5pbmcgMikpCisgICAgICAgICAgICAgICAgICAgICAgICAoMS0g KG1hdGNoLWVuZCAyKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICdqczItanNkb2MtdHlwZSkK KyAgICAgICAgKGpzMi1zZXQtZmFjZSAobWF0Y2gtYmVnaW5uaW5nIDIpCisgICAgICAgICAgICAg ICAgICAgICAgKG1hdGNoLWVuZCAyKQorICAgICAgICAgICAgICAgICAgICAgICdqczItanNkb2Mt dmFsdWUpKSkKKyAgKGlmIChtYXRjaC1iZWdpbm5pbmcgMykKKyAgICAgIChqczItc2V0LWZhY2Ug KG1hdGNoLWJlZ2lubmluZyAzKQorICAgICAgICAgICAgICAgICAgICAobWF0Y2gtZW5kIDMpCisg ICAgICAgICAgICAgICAgICAgICdqczItanNkb2MtdmFsdWUpKSkKKworKGRlZnVuIGpzMi1oaWdo bGlnaHQtanNkb2MgKGFzdCkKKyAgIkhpZ2hsaWdodCBkb2MgY29tbWVudCB0YWdzLiIKKyAgKGxl dCAoKGNvbW1lbnRzIChqczItYXN0LXJvb3QtY29tbWVudHMgYXN0KSkKKyAgICAgICAgYmVnIGVu ZCkKKyAgICAoc2F2ZS1leGN1cnNpb24KKyAgICAgIChkb2xpc3QgKG5vZGUgY29tbWVudHMpCisg ICAgICAgICh3aGVuIChlcSAoanMyLWNvbW1lbnQtbm9kZS1mb3JtYXQgbm9kZSkgJ2pzZG9jKQor ICAgICAgICAgIChzZXRxIGJlZyAoanMyLW5vZGUtYWJzLXBvcyBub2RlKQorICAgICAgICAgICAg ICAgIGVuZCAoKyBiZWcgKGpzMi1ub2RlLWxlbiBub2RlKSkpCisgICAgICAgICAgKHNhdmUtcmVz dHJpY3Rpb24KKyAgICAgICAgICAgIChuYXJyb3ctdG8tcmVnaW9uIGJlZyBlbmQpCisgICAgICAg ICAgICAoZG9saXN0IChyZSAobGlzdCBqczItanNkb2MtcGFyYW0tdGFnLXJlZ2V4cAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAganMyLWpzZG9jLXR5cGVkLXRhZy1yZWdleHAKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGpzMi1qc2RvYy1hcmctdGFnLXJlZ2V4cAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAganMyLWpzZG9jLWxpbmstdGFnLXJlZ2V4cAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAganMyLWpzZG9jLXNlZS10YWctcmVnZXhwCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBqczItanNkb2MtZW1wdHktdGFnLXJlZ2V4cCkpCisgICAg ICAgICAgICAgIChnb3RvLWNoYXIgYmVnKQorICAgICAgICAgICAgICAod2hpbGUgKHJlLXNlYXJj aC1mb3J3YXJkIHJlIG5pbCB0KQorICAgICAgICAgICAgICAgIChqczItanNkb2MtaGlnaGxpZ2h0 LWhlbHBlcikpKQorICAgICAgICAgICAgOzsgc2ltcGxlIGhpZ2hsaWdodGluZyBmb3IgaHRtbCB0 YWdzCisgICAgICAgICAgICAoZ290by1jaGFyIGJlZykKKyAgICAgICAgICAgICh3aGlsZSAocmUt c2VhcmNoLWZvcndhcmQganMyLWpzZG9jLWh0bWwtdGFnLXJlZ2V4cCBuaWwgdCkKKyAgICAgICAg ICAgICAgKGpzMi1zZXQtZmFjZSAobWF0Y2gtYmVnaW5uaW5nIDEpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKG1hdGNoLWVuZCAxKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICdq czItanNkb2MtaHRtbC10YWctZGVsaW1pdGVyKQorICAgICAgICAgICAgICAoanMyLXNldC1mYWNl IChtYXRjaC1iZWdpbm5pbmcgMikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWF0Y2gt ZW5kIDIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2pzMi1qc2RvYy1odG1sLXRhZy1u YW1lKQorICAgICAgICAgICAgICAoanMyLXNldC1mYWNlIChtYXRjaC1iZWdpbm5pbmcgMykKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAobWF0Y2gtZW5kIDMpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJ2pzMi1qc2RvYy1odG1sLXRhZy1kZWxpbWl0ZXIpKSkpKSkpKQorCisoZGVm dW4ganMyLWhpZ2hsaWdodC1hc3NpZ24tdGFyZ2V0cyAoX25vZGUgbGVmdCByaWdodCkKKyAgIkhp Z2hsaWdodCBmdW5jdGlvbiBwcm9wZXJ0aWVzIGFuZCBleHRlcm5hbCB2YXJpYWJsZXMuIgorICAo bGV0IChsZWZ0cG9zIG5hbWUpCisgICAgOzsgaGlnaGxpZ2h0IHZhcnMgYW5kIHByb3BzIGFzc2ln bmVkIGZ1bmN0aW9uIHZhbHVlcworICAgICh3aGVuIChvciAoanMyLWZ1bmN0aW9uLW5vZGUtcCBy aWdodCkKKyAgICAgICAgICAgICAgKGpzMi1jbGFzcy1ub2RlLXAgcmlnaHQpKQorICAgICAgKGNv bmQKKyAgICAgICA7OyB2YXIgZm9vID0gZnVuY3Rpb24oKSB7Li4ufQorICAgICAgICgoanMyLW5h bWUtbm9kZS1wIGxlZnQpCisgICAgICAgIChzZXRxIG5hbWUgbGVmdCkpCisgICAgICAgOzsgZm9v LmJhci5iYXogPSBmdW5jdGlvbigpIHsuLi59CisgICAgICAgKChhbmQgKGpzMi1wcm9wLWdldC1u b2RlLXAgbGVmdCkKKyAgICAgICAgICAgICAoanMyLW5hbWUtbm9kZS1wIChqczItcHJvcC1nZXQt bm9kZS1yaWdodCBsZWZ0KSkpCisgICAgICAgIChzZXRxIG5hbWUgKGpzMi1wcm9wLWdldC1ub2Rl LXJpZ2h0IGxlZnQpKSkpCisgICAgICAod2hlbiBuYW1lCisgICAgICAgIChqczItc2V0LWZhY2Ug KHNldHEgbGVmdHBvcyAoanMyLW5vZGUtYWJzLXBvcyBuYW1lKSkKKyAgICAgICAgICAgICAgICAg ICAgICAoKyBsZWZ0cG9zIChqczItbm9kZS1sZW4gbmFtZSkpCisgICAgICAgICAgICAgICAgICAg ICAgJ2ZvbnQtbG9jay1mdW5jdGlvbi1uYW1lLWZhY2UKKyAgICAgICAgICAgICAgICAgICAgICAn cmVjb3JkKSkpKSkKKworKGRlZnVuIGpzMi1yZWNvcmQtbmFtZS1ub2RlIChub2RlKQorICAiU2F2 ZXMgTk9ERSB0byBganMyLXJlY29yZGVkLWlkZW50aWZpZXJzJyB0byBjaGVjayBmb3IgdW5kZWNs YXJlZCB2YXJpYWJsZXMKK2xhdGVyLiBOT0RFIG11c3QgYmUgYSBuYW1lIG5vZGUuIgorICAobGV0 ICgobGVmdHBvcyAoanMyLW5vZGUtYWJzLXBvcyBub2RlKSkpCisgICAgKHB1c2ggKGxpc3Qgbm9k ZSBqczItY3VycmVudC1zY29wZQorICAgICAgICAgICAgICAgIGxlZnRwb3MKKyAgICAgICAgICAg ICAgICAoKyBsZWZ0cG9zIChqczItbm9kZS1sZW4gbm9kZSkpKQorICAgICAgICAgIGpzMi1yZWNv cmRlZC1pZGVudGlmaWVycykpKQorCisoZGVmdW4ganMyLWhpZ2hsaWdodC11bmRlY2xhcmVkLXZh cnMgKCkKKyAgIkFmdGVyIGVudGlyZSBwYXJzZSBpcyBmaW5pc2hlZCwgbG9vayBmb3IgdW5kZWNs YXJlZCB2YXJpYWJsZSByZWZlcmVuY2VzLgorV2UgaGF2ZSB0byB3YWl0IHVudGlsIGVudGlyZSBi dWZmZXIgaXMgcGFyc2VkLCBzaW5jZSBKYXZhU2NyaXB0IHBlcm1pdHMgdmFyCitkZWNscyB0byBv Y2N1ciBhZnRlciB0aGV5J3JlIHVzZWQuCisKK0lmIGFueSB1bmRlY2xhcmVkIHZhciBuYW1lIGlz IGluIGBqczItZXh0ZXJucycgb3IgYGpzMi1hZGRpdGlvbmFsLWV4dGVybnMnLAoraXQgaXMgY29u c2lkZXJlZCBkZWNsYXJlZC4iCisgIChsZXQgKG5hbWUpCisgICAgKGRvbGlzdCAoZW50cnkganMy LXJlY29yZGVkLWlkZW50aWZpZXJzKQorICAgICAgKGNsLWRlc3RydWN0dXJpbmctYmluZCAobmFt ZS1ub2RlIHNjb3BlIHBvcyBlbmQpIGVudHJ5CisgICAgICAgIChzZXRxIG5hbWUgKGpzMi1uYW1l LW5vZGUtbmFtZSBuYW1lLW5vZGUpKQorICAgICAgICAodW5sZXNzIChvciAobWVtYmVyIG5hbWUg anMyLWdsb2JhbC1leHRlcm5zKQorICAgICAgICAgICAgICAgICAgICAobWVtYmVyIG5hbWUganMy LWRlZmF1bHQtZXh0ZXJucykKKyAgICAgICAgICAgICAgICAgICAgKG1lbWJlciBuYW1lIGpzMi1h ZGRpdGlvbmFsLWV4dGVybnMpCisgICAgICAgICAgICAgICAgICAgIChqczItZ2V0LWRlZmluaW5n LXNjb3BlIHNjb3BlIG5hbWUpKQorICAgICAgICAgIChqczItcmVwb3J0LXdhcm5pbmcgIm1zZy51 bmRlY2xhcmVkLnZhcmlhYmxlIiBuYW1lIHBvcyAoLSBlbmQgcG9zKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgJ2pzMi1leHRlcm5hbC12YXJpYWJsZSkpKSkKKyAgICAoc2V0cSBqczIt cmVjb3JkZWQtaWRlbnRpZmllcnMgbmlsKSkpCisKKyhkZWZ1biBqczItc2V0LWRlZmF1bHQtZXh0 ZXJucyAoKQorICAiU2V0IHRoZSB2YWx1ZSBvZiBganMyLWRlZmF1bHQtZXh0ZXJucycgYmFzZWQg b24gdGhlIHZhcmlvdXMKK2BqczItaW5jbHVkZS0/LWV4dGVybnMnIHZhcmlhYmxlcy4iCisgIChz ZXRxIGpzMi1kZWZhdWx0LWV4dGVybnMKKyAgICAgICAgKGFwcGVuZCBqczItZWNtYS0yNjItZXh0 ZXJucworICAgICAgICAgICAgICAgIChpZiBqczItaW5jbHVkZS1icm93c2VyLWV4dGVybnMganMy LWJyb3dzZXItZXh0ZXJucykKKyAgICAgICAgICAgICAgICAoaWYgKGFuZCBqczItaW5jbHVkZS1i cm93c2VyLWV4dGVybnMKKyAgICAgICAgICAgICAgICAgICAgICAgICAoPj0ganMyLWxhbmd1YWdl LXZlcnNpb24gMjAwKSkganMyLWhhcm1vbnktZXh0ZXJucykKKyAgICAgICAgICAgICAgICAoaWYg anMyLWluY2x1ZGUtcmhpbm8tZXh0ZXJucyBqczItcmhpbm8tZXh0ZXJucykKKyAgICAgICAgICAg ICAgICAoaWYganMyLWluY2x1ZGUtbm9kZS1leHRlcm5zIGpzMi1ub2RlLWV4dGVybnMpCisgICAg ICAgICAgICAgICAgKGlmIChvciBqczItaW5jbHVkZS1icm93c2VyLWV4dGVybnMganMyLWluY2x1 ZGUtbm9kZS1leHRlcm5zKQorICAgICAgICAgICAgICAgICAgICBqczItdHlwZWQtYXJyYXktZXh0 ZXJucykpKSkKKworKGRlZnVuIGpzMi1hcHBseS1qc2xpbnQtZ2xvYmFscyAoKQorICAoc2V0cSBq czItYWRkaXRpb25hbC1leHRlcm5zCisgICAgICAgIChuY29uYyAoanMyLWdldC1qc2xpbnQtZ2xv YmFscykKKyAgICAgICAgICAgICAgIGpzMi1hZGRpdGlvbmFsLWV4dGVybnMpKSkKKworKGRlZnVu IGpzMi1nZXQtanNsaW50LWdsb2JhbHMgKCkKKyAgKGNsLWxvb3AgZm9yIG5vZGUgaW4gKGpzMi1h c3Qtcm9vdC1jb21tZW50cyBqczItbW9kZS1hc3QpCisgICAgICAgICAgIHdoZW4gKGFuZCAoZXEg J2Jsb2NrIChqczItY29tbWVudC1ub2RlLWZvcm1hdCBub2RlKSkKKyAgICAgICAgICAgICAgICAg ICAgIChzYXZlLWV4Y3Vyc2lvbgorICAgICAgICAgICAgICAgICAgICAgICAoZ290by1jaGFyIChq czItbm9kZS1hYnMtcG9zIG5vZGUpKQorICAgICAgICAgICAgICAgICAgICAgICAobG9va2luZy1h dCAiL1xcKmdsb2JhbCAiKSkpCisgICAgICAgICAgIGFwcGVuZCAoanMyLWdldC1qc2xpbnQtZ2xv YmFscy1pbgorICAgICAgICAgICAgICAgICAgIChtYXRjaC1lbmQgMCkKKyAgICAgICAgICAgICAg ICAgICAoanMyLW5vZGUtYWJzLWVuZCBub2RlKSkpKQorCisoZGVmdW4ganMyLWdldC1qc2xpbnQt Z2xvYmFscy1pbiAoYmVnIGVuZCkKKyAgKGxldCAocmVzKQorICAgIChzYXZlLWV4Y3Vyc2lvbgor ICAgICAgKGdvdG8tY2hhciBiZWcpCisgICAgICAod2hpbGUgKHJlLXNlYXJjaC1mb3J3YXJkIGpz Mi1tb2RlLWlkZW50aWZpZXItcmUgZW5kIHQpCisgICAgICAgIChsZXQgKChtYXRjaCAobWF0Y2gt c3RyaW5nIDApKSkKKyAgICAgICAgICAodW5sZXNzIChtZW1iZXIgbWF0Y2ggJygidHJ1ZSIgImZh bHNlIikpCisgICAgICAgICAgICAocHVzaCBtYXRjaCByZXMpKSkpKQorICAgIChucmV2ZXJzZSBy ZXMpKSkKKworOzs7IElNZW51IHN1cHBvcnQKKworOzsgV2UgY3VycmVudGx5IG9ubHkgc3VwcG9y dCBpbWVudSwgYnV0IGV2ZW50dWFsbHkgc2hvdWxkIHN1cHBvcnQgc3BlZWRiYXIgYW5kCis7OyBw b3NzaWJseSBvdGhlciBicm93c2luZyBtZWNoYW5pc21zLgorCis7OyBUaGUgYmFzaWMgc3RyYXRl Z3kgaXMgdG8gaWRlbnRpZnkgZnVuY3Rpb24gYXNzaWdubWVudCB0YXJnZXRzIG9mIHRoZSBmb3Jt Cis7OyB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m9kZSkp CisgICAgICAobGlzdCBub2RlKSkKKyAgICAgOzsgZm9vLmJhci5iYXogaXMgcGFyZW50aGVzaXpl ZCBhcyAoZm9vLmJhcikuYmF6ID0+IHJpZ2h0IG9wZXJhbmQgaXMgYSBsZWFmCisgICAgICgoanMy LXByb3AtZ2V0LW5vZGUtcCBub2RlKSAgICAgICAgOyBmb28uYmFyCisgICAgICAoc2V0cSBsZWZ0 IChqczItcHJvcC1nZXQtbm9kZS1sZWZ0IG5vZGUpCisgICAgICAgICAgICByaWdodCAoanMyLXBy b3AtZ2V0LW5vZGUtcmlnaHQgbm9kZSkpCisgICAgICAoaWYgKHNldHEgaGVhZCAoanMyLWNvbXB1 dGUtbmVzdGVkLXByb3AtZ2V0IGxlZnQpKQorICAgICAgICAgIChuY29uYyBoZWFkIChsaXN0IHJp Z2h0KSkpKQorICAgICAoKGpzMi1lbGVtLWdldC1ub2RlLXAgbm9kZSkgICAgICAgIDsgZm9vWydi YXInXSBvciBmb29bMTAxXQorICAgICAgKHNldHEgbGVmdCAoanMyLWVsZW0tZ2V0LW5vZGUtdGFy Z2V0IG5vZGUpCisgICAgICAgICAgICByaWdodCAoanMyLWVsZW0tZ2V0LW5vZGUtZWxlbWVudCBu b2RlKSkKKyAgICAgIChpZiAob3IgKGpzMi1zdHJpbmctbm9kZS1wIHJpZ2h0KSAgICAgIDsgWydi YXInXQorICAgICAgICAgICAgICAoYW5kIChqczItbnVtYmVyLW5vZGUtcCByaWdodCkgOyBbMTBd CisgICAgICAgICAgICAgICAgICAgKHN0cmluZy1tYXRjaCAiXlswLTldKyQiCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAoanMyLW51bWJlci1ub2RlLXZhbHVlIHJpZ2h0KSkpKQor ICAgICAgICAgIChpZiAoc2V0cSBoZWFkIChqczItY29tcHV0ZS1uZXN0ZWQtcHJvcC1nZXQgbGVm dCkpCisgICAgICAgICAgICAgIChuY29uYyBoZWFkIChsaXN0IHJpZ2h0KSkpKSk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b286IGZ1bmN0aW9uKCkgey4uLn0KKyAgICAgICAgICgoanMyLWZ1bmN0aW9uLW5vZGUtcCAo c2V0cSByaWdodCAoanMyLWluZml4LW5vZGUtcmlnaHQgZSkpKQorICAgICAgICAgICh3aGVuIChq czItcHJvcC1ub2RlLW5hbWUgbGVmdCkKKyAgICAgICAgICAgIDs7IEFzIGEgcG9saWN5IGRlY2lz aW9uLCB3ZSByZWNvcmQgdGhlIHBvc2l0aW9uIG9mIHRoZSBwcm9wZXJ0eSwKKyAgICAgICAgICAg IDs7IG5vdCB0aGUgcG9zaXRpb24gb2YgdGhlIGBmdW5jdGlvbicga2V5d29yZCwgc2luY2UgdGhl IHByb3BlcnR5CisgICAgICAgICAgICA7OyBpcyBlZmZlY3RpdmVseSB0aGUgbmFtZSBvZiB0aGUg ZnVuY3Rpb24uCisgICAgICAgICAgICAoanMyLXJlY29yZC1pbWVudS1lbnRyeSByaWdodCAoYXBw ZW5kIHFuYW1lIChsaXN0IGxlZnQpKSBwb3MpKSkKKyAgICAgICAgIDs7IGZvbzoge29iamVjdC1s aXRlcmFsfSAtLSBhZGQgZm9vIHRvIHFuYW1lLCBvZmZzZXQgcG9zaXRpb24sIGFuZCByZWN1cnNl CisgICAgICAgICAoKGpzMi1vYmplY3Qtbm9kZS1wIHJpZ2h0KQorICAgICAgICAgIChqczItcmVj b3JkLW9iamVjdC1saXRlcmFsIHJpZ2h0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKGFwcGVuZCBxbmFtZSAobGlzdCAoanMyLWluZml4LW5vZGUtbGVmdCBlKSkpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCsgcG9zIChqczItbm9kZS1wb3Mgcmln aHQpKSkpKSkpKSkKKworKGRlZnVuIGpzMi1ub2RlLXRvcC1sZXZlbC1kZWNsLXAgKG5vZGUpCisg ICJSZXR1cm4gdCBpZiBOT0RFJ3MgbmFtZSBpcyBkZWZpbmVkIGluIHRoZSB0b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AgICAgICAgICAgICAgICAgICAgIChsZXQgKChncmFuZHBhcmVudCAo anMyLW5vZGUtcGFyZW50LXNjcmlwdC1vci1mbiBmbikpKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAoaWYgKGpzMi1hc3Qtcm9vdC1wIGdyYW5kcGFyZW50KQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgbmlsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGdldGhhc2ggZ3Jh bmRwYXJlbnQganMyLWltZW51LWZ1bmN0aW9uLW1hcCAnc2tpcCkpKQorICAgICAgICAgICAgICAg ICAgICAgICdza2lwKSkKKyAgICAgICAgICAgICAgKHB1dGhhc2ggZm4gcGFyZW50LXFuYW1lIGpz Mi1pbWVudS1mdW5jdGlvbi1tYXApKQorICAgICAgICAgICAgKGlmIChlcSBwYXJlbnQtcW5hbWUg J3NraXApCisgICAgICAgICAgICAgICAgOzsgV2UgZG9uJ3Qgc2hvdyBpdCwgbGV0J3MgcmVjb3Jk IHRoYXQgZmFjdC4KKyAgICAgICAgICAgICAgICAocmVtaGFzaCBjdXJyZW50LWZuIGpzMi1pbWVu dS1mdW5jdGlvbi1tYXApCisgICAgICAgICAgICAgIDs7IFByZXBlbmQgcGFyZW50IGZuIHFuYW1l IHRvIHRoaXMgY2hhaW4uCisgICAgICAgICAgICAgIChsZXQgKChxbmFtZSAoYXBwZW5kIHBhcmVu dC1xbmFtZSBjaGFpbikpKQorICAgICAgICAgICAgICAgIChwdXRoYXNoIGN1cnJlbnQtZm4gKGJ1 dGxhc3QgcW5hbWUpIGpzMi1pbWVudS1mdW5jdGlvbi1tYXApCisgICAgICAgICAgICAgICAgKHB1 c2ggcW5hbWUgcmVzdWx0KSkpKSkpKQorICAgIDs7IENvbGxlY3QgY2hhaW5zIG9idGFpbmVkIGJ5 IHRoaXJkLXBhcnR5IGNvZGUuCisgICAgKGxldCAoanMyLWltZW51LXJlY29yZGVyKQorICAgICAg KHJ1bi1ob29rcyAnanMyLWJ1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bGVtZW50IGxvb2tzIGxpa2UgKElO REVYLU5BTUUgU1VCLUFMSVNUKS4KKzs7IFRoZSBzdWItYWxpc3QgZW50cmllcyBpbW1lZGlhdGVs eSBmb2xsb3cgSU5ERVgtTkFNRSwgdGhlIGhlYWQgb2YgdGhlIGxpc3QuCisKKyhkZWZ1biBqczIt dHJlZWlmeSAobHN0KQorICAiQ29udmVydCAoYSBiIGMgZCkgdG8gKGEgKChiICgoYyBkKSkpKSku IgorICAoaWYgKG51bGwgKGNkZHIgbHN0KSkgIDsgbGlzdCBsZW5ndGggPD0gMgorICAgICAgbHN0 CisgICAgKGxpc3QgKGNhciBsc3QpIChsaXN0IChqczItdHJlZWlmeSAoY2RyIGxzdCkpKSkpKQor CisoZGVmdW4ganMyLWJ1aWxkLWFsaXN0LXRyaWUgKGNoYWlucyB0cmllKQorICAiTWVyZ2UgZGVj bGFyYXRpb24gbmFtZSBjaGFpbnMgaW50byBhIHRyaWUtbGlrZSBhbGlzdCBzdHJ1Y3R1cmUgZm9y IGltZW51LgorQ0hBSU5TIGlzIHRoZSBxbmFtZSBjaGFpbiBsaXN0IHByb2R1Y2VkIGR1cmluZyBw YXJzaW5nLiBUUklFIGlzIGEKK2xpc3Qgb2YgZWxlbWVudHMgYnVpbHQgdXAgc28gZmFyLiIKKyAg KGxldCAoaGVhZCB0YWlsIHBvcyBicmFuY2gga2lkcykKKyAgICAoZG9saXN0IChjaGFpbiBjaGFp bnMpCisgICAgICAoc2V0cSBoZWFkIChjYXIgY2hhaW4pCisgICAgICAgICAgICB0YWlsIChjZHIg Y2hhaW4pCisgICAgICAgICAgICBwb3MgKGlmIChudW1iZXJwIChjYXIgdGFpbCkpIChjYXIgdGFp bCkpCisgICAgICAgICAgICBicmFuY2ggKGpzMi1maW5kLWlmIChsYW1iZGEgKG4pCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKHN0cmluZz0gKGNhciBuKSBoZWFkKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJpZSkKKyAgICAgICAgICAgIGtpZHMgKGNsLXNl Y29uZCBicmFuY2gpKQorICAgICAgKGNvbmQKKyAgICAgICA7OyBjYXNlIDE6ICB0aGlzIGtleSBp c24ndCBpbiB0aGUgdHJpZSB5ZXQKKyAgICAgICAoKG51bGwgYnJhbmNoKQorICAgICAgICAoaWYg dHJpZQorICAgICAgICAgICAgKHNldGNkciAobGFzdCB0cmllKSAobGlzdCAoanMyLXRyZWVpZnkg Y2hhaW4pKSkKKyAgICAgICAgICAoc2V0cSB0cmllIChsaXN0IChqczItdHJlZWlmeSBjaGFpbikp KSkpCisgICAgICAgOzsgY2FzZSAyOiAga2V5IGlzIHByZXNlbnQgd2l0aCBhIHNpbmdsZSBudW1i ZXIgZW50cnk6ICByZXBsYWNlIHcvIGxpc3QKKyAgICAgICA7OyAgKCJhMSIgMTApICArICAoImEx IiAyMCkgPT4gKCJhMSIgKCgiPGRlZmluaXRpb24+IiAxMCkKKyAgICAgICA7OyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICgiPGRlZmluaXRpb24+IiAyMCkpKQorICAgICAgICgo bnVtYmVycCBraWRzKQorICAgICAgICAoc2V0Y2FyIChjZHIgYnJhbmNoKQorICAgICAgICAgICAg ICAgIChsaXN0IChsaXN0ICI8ZGVmaW5pdGlvbi0xPiIga2lkcykKKyAgICAgICAgICAgICAgICAg ICAgICAoaWYgcG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgIChsaXN0ICI8ZGVmaW5pdGlv bi0yPiIgcG9zKQorICAgICAgICAgICAgICAgICAgICAgICAgKGpzMi10cmVlaWZ5IHRhaWwpKSkp KQorICAgICAgIDs7IGNhc2UgMzogIGtleSBpcyB0aGVyZSAod2l0aCBraWRzKSwgYW5kIHdlJ3Jl IGEgbnVtYmVyIGVudHJ5CisgICAgICAgKHBvcworICAgICAgICAoc2V0Y2RyIChsYXN0IGtpZHMp CisgICAgICAgICAgICAgICAgKGxpc3QKKyAgICAgICAgICAgICAgICAgKGxpc3QgKGZvcm1hdCAi PGRlZmluaXRpb24tJWQ+IgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxKyAoY2wt bG9vcCBmb3Iga2lkIGluIGtpZHMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgY291bnQgKGVxID88IChhcmVmIChjYXIga2lkKSAwKSkpKSkKKyAgICAgICAgICAg ICAgICAgICAgICAgcG9zKSkpKQorICAgICAgIDs7IGNhc2UgNDogIGtleSBpcyB0aGVyZSB3aXRo IGtpZHMsIG5lZWQgdG8gbWVyZ2UgaW4gb3VyIGNoYWluCisgICAgICAgKHQKKyAgICAgICAgKGpz Mi1idWlsZC1hbGlzdC10cmllIChsaXN0IHRhaWwpIGtpZHMpKSkpCisgICAgdHJpZSkpCisKKyhk ZWZ1biBqczItZmxhdHRlbi10cmllICh0cmllKQorICAiQ29udmVydCBUUklFIHRvIGltZW51LWZv cm1hdC4KK1JlY3Vyc2VzIHRocm91Z2ggbm9kZXMsIGFuZCBmb3IgZWFjaCBvbmUgd2hvc2Ugc2Vj b25kIGVsZW1lbnQgaXMgYSBsaXN0LAorYXBwZW5kcyB0aGUgbGlzdCdzIGZsYXR0ZW5lZCBlbGVt ZW50cyB0byB0aGUgY3VycmVudCBlbGVtZW50LiAgQWxzbworY2hhbmdlcyB0aGUgdGFpbHMgaW50 byBjb25zZXMuICBGb3IgaW5zdGFuY2UsIHRoaXMgcHJlLWZsYXR0ZW5lZCB0cmllCisKKycoYSAo KGIgMjApCisgICAgIChjICgoZCAzMCkKKyAgICAgICAgIChlIDQwKSkpKSkKKworYmVjb21lcwor CisnKGEgKGIgLiAyMCkKKyAgICAoYyAoZCAuIDMwKQorICAgICAgIChlIC4gNDApKSkKKworTm90 ZSB0aGF0IHRoZSByb290IG9mIHRoZSB0cmllIGhhcyBubyBrZXksIGp1c3QgYSBsaXN0IG9mIGNo YWlucy4KK1RoaXMgaXMgYWxzbyB0cnVlIGZvciB0aGUgdmFsdWUgb2YgYW55IGtleSB3aXRoIG11 bHRpcGxlIGNoaWxkcmVuLAorZS5nLiBrZXkgJ2MnIGluIHRoZSBleGFtcGxlIGFib3ZlLiIKKyAg KGNvbmQKKyAgICgobGlzdHAgKGNhciB0cmllKSkKKyAgICAobWFwY2FyICMnanMyLWZsYXR0ZW4t dHJpZSB0cmllKSkKKyAgICh0CisgICAgKGlmIChudW1iZXJwIChjbC1zZWNvbmQgdHJpZSkpCisg ICAgICAgIChjb25zIChjYXIgdHJpZSkgKGNsLXNlY29uZCB0cmllKSkKKyAgICAgIDs7IGVsc2Ug cG9wIGxpc3QgYW5kIGFwcGVuZCBpdHMga2lkcworICAgICAgKGFwcGx5ICMnYXBwZW5kIChsaXN0 IChjYXIgdHJpZSkpIChqczItZmxhdHRlbi10cmllIChjZHIgdHJpZSkpKSkpKSkKKworKGRlZnVu IGpzMi1idWlsZC1pbWVudS1pbmRleCAoKQorICAiVHVybiBganMyLWltZW51LXJlY29yZGVyJyBp bnRvIGFuIGltZW51IGRhdGEgc3RydWN0dXJlLiIKKyAgKHdoZW4gKGVxIGpzMi1pbWVudS1yZWNv cmRlciAnZW1wdHkpCisgICAgKHNldHEganMyLWltZW51LXJlY29yZGVyIG5pbCkpCisgIChsZXQq ICgoY2hhaW5zIChqczItYnJvd3NlLXBvc3Rwcm9jZXNzLWNoYWlucykpCisgICAgICAgICAocmVz dWx0IChqczItYnVpbGQtYWxpc3QtdHJpZSBjaGFpbnMgbmlsKSkpCisgICAgKGpzMi1mbGF0dGVu LXRyaWUgcmVzdWx0KSkpCisKKyhkZWZ1biBqczItdGVzdC1wcmludC1jaGFpbnMgKGNoYWlucykK KyAgIlByaW50IGEgbGlzdCBvZiBxbmFtZSBjaGFpbnMuCitFYWNoIGVsZW1lbnQgb2YgQ0hBSU5T IGlzIGEgbGlzdCBvZiB0aGUgZm9ybSAoTk9ERSBbTk9ERSAqXSBwb3MpOworaS5lLiBvbmUgb3Ig bW9yZSBub2RlcywgYW5kIGFuIGludGVnZXIgcG9zaXRpb24gYXMgdGhlIGxpc3QgdGFpbC4iCisg IChtYXBjb25jYXQgKGxhbWJkYSAoY2hhaW4pCisgICAgICAgICAgICAgICAoY29uY2F0ICIoIgor ICAgICAgICAgICAgICAgICAgICAgICAobWFwY29uY2F0IChsYW1iZGEgKGVsZW0pCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaWYgKGpzMi1ub2RlLXAgZWxlbSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAob3IgKGpzMi1ub2RlLXFuYW1lLWNv bXBvbmVudCBlbGVtKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAibmlsIikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG51bWJlci10 by1zdHJpbmcgZWxlbSkpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoYWlu CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIiAiKQorICAgICAgICAgICAgICAg ICAgICAgICAiKSIpKQorICAgICAgICAgICAgIGNoYWlucworICAgICAgICAgICAgICJcbiIpKQor Cis7OzsgUGFyc2VyCisKKyhkZWZjb25zdCBqczItdmVyc2lvbiAiMS44LjUiCisgICJWZXJzaW9u IG9mIEphdmFTY3JpcHQgc3VwcG9ydGVkLiIpCisKKyhkZWZ1biBqczItcmVjb3JkLWZhY2UgKGZh Y2UgJm9wdGlvbmFsIHRva2VuKQorICAiUmVjb3JkIGEgc3R5bGUgcnVuIG9mIEZBQ0UgZm9yIFRP S0VOIG9yIHRoZSBjdXJyZW50IHRva2VuLiIKKyAgKHVubGVzcyB0b2tlbiAoc2V0cSB0b2tlbiAo anMyLWN1cnJlbnQtdG9rZW4pKSkKKyAgKGpzMi1zZXQtZmFjZSAoanMyLXRva2VuLWJlZyB0b2tl bikgKGpzMi10b2tlbi1lbmQgdG9rZW4pIGZhY2UgJ3JlY29yZCkpCisKKyhkZWZzdWJzdCBqczIt bm9kZS1lbmQgKG4pCisgICJDb21wdXRlcyB0aGUgYWJzb2x1dGUgZW5kIG9mIG5vZGUgTi4KK1Vz ZSB3aXRoIGNhdXRpb24hICBBc3N1bWVzIGBqczItbm9kZS1wb3MnIGlzIC1hYnNvbHV0ZS0sIHdo aWNoCitpcyBvbmx5IHRydWUgdW50aWwgdGhlIG5vZGUgaXMgYWRkZWQgdG8gaXRzIHBhcmVudDsg aS5lLiwgd2hpbGUgcGFyc2luZy4iCisgICgrIChqczItbm9kZS1wb3MgbikKKyAgICAgKGpzMi1u b2RlLWxlbiBuKSkpCisKKyhkZWZ1biBqczItcmVjb3JkLWNvbW1lbnQgKHRva2VuKQorICAiUmVj b3JkIGEgY29tbWVudCBpbiBganMyLXNjYW5uZWQtY29tbWVudHMnLiIKKyAgKGxldCAoKGN0IChq czItdG9rZW4tY29tbWVudC10eXBlIHRva2VuKSkKKyAgICAgICAgKGJlZyAoanMyLXRva2VuLWJl ZyB0b2tlbikpCisgICAgICAgIChlbmQgKGpzMi10b2tlbi1lbmQgdG9rZW4pKSkKKyAgICAocHVz aCAobWFrZS1qczItY29tbWVudC1ub2RlIDpsZW4gKC0gZW5kIGJlZykKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDpmb3JtYXQgY3QpCisgICAgICAgICAganMyLXNjYW5uZWQtY29t bWVudHMpCisgICAgKHdoZW4ganMyLXBhcnNlLWlkZS1tb2RlCisgICAgICAoanMyLXJlY29yZC1m YWNlIChpZiAoZXEgY3QgJ2pzZG9jKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2ZvbnQt bG9jay1kb2MtZmFjZQorICAgICAgICAgICAgICAgICAgICAgICAgICdmb250LWxvY2stY29tbWVu dC1mYWNlKQorICAgICAgICAgICAgICAgICAgICAgICB0b2tlbikKKyAgICAgICh3aGVuIChtZW1x IGN0ICcoaHRtbCBwcmVwcm9jZXNzb3IpKQorICAgICAgICA7OyBUZWxsIGNjLWVuZ2luZSB0aGUg Ym91bmRzIG9mIHRoZSBjb21tZW50LgorICAgICAgICAoanMyLXJlY29yZC10ZXh0LXByb3BlcnR5 IGJlZyAoMS0gZW5kKSAnYy1pbi1zd3MgdCkpKSkpCisKKyhkZWZ1biBqczItcGVlay10b2tlbiAo KQorICAiUmV0dXJuIHRoZSBuZXh0IHRva2VuIHR5cGUgd2l0aG91dCBjb25zdW1pbmcgaXQuCitJ ZiBganMyLXRpLWxvb2thaGVhZCcgaXMgcG9zaXRpdmUsIHJldHVybiB0aGUgdHlwZSBvZiBuZXh0 IHRva2VuCitmcm9tIGBqczItdGktdG9rZW5zJy4gIE90aGVyd2lzZSwgY2FsbCBganMyLWdldC10 b2tlbicuIgorICAoaWYgKG5vdCAoemVyb3AganMyLXRpLWxvb2thaGVhZCkpCisgICAgICAoanMy LXRva2VuLXR5cGUKKyAgICAgICAoYXJlZiBqczItdGktdG9rZW5zIChtb2QgKDErIGpzMi10aS10 b2tlbnMtY3Vyc29yKSBqczItdGktbnRva2VucykpKQorICAgIChsZXQgKCh0dCAoanMyLWdldC10 b2tlbi1pbnRlcm5hbCBuaWwpKSkKKyAgICAgIChqczItdW5nZXQtdG9rZW4pCisgICAgICB0dCkp KQorCisoZGVmYWxpYXMgJ2pzMi1uZXh0LXRva2VuICdqczItZ2V0LXRva2VuKQorCisoZGVmdW4g anMyLW1hdGNoLXRva2VuIChtYXRjaCAmb3B0aW9uYWwgZG9udC11bmdldCkKKyAgIkdldCBuZXh0 IHRva2VuIGFuZCByZXR1cm4gdCBpZiBpdCBtYXRjaGVzIE1BVENILCBhIGJ5dGVjb2RlLgorUmV0 dXJucyBuaWwgYW5kIGNvbnN1bWVzIG5vdGhpbmcgaWYgTUFUQ0ggaXMgbm90IHRoZSBuZXh0IHRv a2VuLiIKKyAgKGlmICgvPSAoanMyLWdldC10b2tlbikgbWF0Y2gpCisgICAgICAoaWdub3JlICh1 bmxlc3MgZG9udC11bmdldCAoan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GpzMi1jdXJyZW50LXNjb3BlIHNjb3BlKSkpCisgIChzZXRmIChqczIt c2NvcGUtcGFyZW50LXNjb3BlIHNjb3BlKSBqczItY3VycmVudC1zY29wZQorICAgICAgICBqczIt Y3VycmVudC1zY29wZSBzY29wZSkpCisKKyhkZWZzdWJzdCBqczItcG9wLXNjb3BlICgpCisgIChz ZXRxIGpzMi1jdXJyZW50LXNjb3BlCisgICAgICAgIChqczItc2NvcGUtcGFyZW50LXNjb3BlIGpz Mi1jdXJyZW50LXNjb3BlKSkpCisKKyhkZWZ1biBqczItZW50ZXItbG9vcCAobG9vcC1ub2RlKQor ICAocHVzaCBsb29wLW5vZGUganMyLWxvb3Atc2V0KQorICAocHVzaCBsb29wLW5vZGUganMyLWxv b3AtYW5kLXN3aXRjaC1zZXQpCisgIChqczItcHVzaC1zY29wZSBsb29wLW5vZGUpCisgIDs7IFRl bGwgdGhlIGN1cnJlbnQgbGFiZWxlZCBzdGF0ZW1lbnQgKGlmIGFueSkgaXRzIHN0YXRlbWVudCwK KyAgOzsgYW5kIHNldCB0aGUganVtcCB0YXJnZXQgb2YgdGhlIGZpcnN0IGxhYmVsIHRvIHRoZSBs b29wLgorICA7OyBUaGVzZSBhcmUgdXNlZCBpbiBganMyLXBhcnNlLWNvbnRpbnVlJyB0byB2ZXJp ZnkgdGhhdCB0aGUKKyAgOzsgY29udGludWUgdGFyZ2V0IGlzIGFuIGFjdHVhbCBsYWJlbGVkIGxv b3AuICAoQW5kIGZvciBjb2RlZ2VuLikKKyAgKHdoZW4ganMyLWxhYmVsZWQtc3RtdAorICAgIChz ZXRmIChqczItbGFiZWxlZC1zdG10LW5vZGUtc3RtdCBqczItbGFiZWxlZC1zdG10KSBsb29wLW5v ZGUKKyAgICAgICAgICAoanMyLWxhYmVsLW5vZGUtbG9vcCAoY2FyIChqczItbGFiZWxlZC1zdG10 LW5vZGUtbGFiZWxzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganMyLWxh YmVsZ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lcnNpb24gMTYwKSkKKyAgICAgICAgOzsgVGhpcyBpcyBhIHJlY3Vy c2l2ZS1kZXNjZW50IHBhcnNlciwgc28gZ2l2ZSBpdCBhIGJpZyBzdGFjay4KKyAgICAgICAgKG1h eC1saXNwLWV2YWwtZGVwdGggKG1heCBtYXgtbGlzcC1ldmFsLWRlcHRoIDMwMDApKQorICAgICAg ICAobWF4LXNwZWNwZGwtc2l6ZSAobWF4IG1heC1zcGVjcGRsLXNpemUgMzAwMCkpCisgICAgICAg IChjYXNlLWZvbGQtc2VhcmNoIG5pbCkKKyAgICAgICAgYXN0KQorICAgICh3aXRoLWN1cnJlbnQt YnVmZmVyIChvciBidWYgKGN1cnJlbnQtYnVmZmVyKSkKKyAgICAgIChzZXRxIGpzMi1zY2FubmVk LWNvbW1lbnRzIG5pbAorICAgICAgICAgICAganMyLXBhcnNlZC1lcnJvcnMgbmlsCisgICAgICAg ICAgICBqczItcGFyc2VkLXdhcm5pbmdzIG5pbAorICAgICAgICAgICAganMyLWltZW51LXJlY29y ZGVyIG5pbAorICAgICAgICAgICAganMyLWltZW51LWZ1bmN0aW9uLW1hcCBuaWwKKyAgICAgICAg ICAgIGpzMi1sYWJlbC1zZXQgbmlsKQorICAgICAgKGpzMi1pbml0LXNjYW5uZXIpCisgICAgICAo c2V0cSBhc3QgKGpzMi1kby1wYXJzZSkpCisgICAgICAodW5sZXNzIGpzMi10cy1oaXQtZW9mCisg ICAgICAgIChqczItcmVwb3J0LWVycm9yICJtc2cuZ290LnN5bnRheC5lcnJvcnMiIChsZW5ndGgg anMyLXBhcnNlZC1lcnJvcnMpKSkKKyAgICAgIChzZXRmIChqczItYXN0LXJvb3QtZXJyb3JzIGFz dCkganMyLXBhcnNlZC1lcnJvcnMKKyAgICAgICAgICAgIChqczItYXN0LXJvb3Qtd2FybmluZ3Mg YXN0KSBqczItcGFyc2VkLXdhcm5pbmdzKQorICAgICAgOzsgaWYgd2UgZGlkbid0IGZpbmQgYW55 IGRlY2xhcmF0aW9ucywgcHV0IGEgZHVtbXkgaW4gdGhpcyBsaXN0IHNvIHdlCisgICAgICA7OyBk b24ndCBlbmQgdXAgcmUtcGFyc2luZyB0aGUgYnVmZmVyIGluIGBqczItbW9kZS1jcmVhdGUtaW1l bnUtaW5kZXgnCisgICAgICAodW5sZXNzIGpzMi1pbWVudS1yZWNvcmRlcgorICAgICAgICAoc2V0 cSBqczItaW1lbnUtcmVjb3JkZXIgJ2VtcHR5KSkKKyAgICAgIChydW4taG9va3MgJ2pzMi1wYXJz ZS1maW5pc2hlZC1ob29rKQorICAgICAgYXN0KSkpCisKKzs7IENvcnJlc3BvbmRzIHRvIFJoaW5v J3MgUGFyc2VyLnBhcnNlKCkgbWV0aG9kLgorKGRlZnVuIGpzMi1kby1wYXJzZSAoKQorICAiUGFy c2UgY3VycmVudCBidWZmZXIgc3RhcnRpbmcgZnJvbSBjdXJyZW50IHBvaW50LgorU2Nhbm5lciBz aG91bGQgYmUgaW5pdGlhbGl6ZWQuIgorICAobGV0ICgocG9zIGpzMi10cy1jdXJzb3IpCisgICAg ICAgIChlbmQganMyLXRzLWN1cnNvcikgIDsgaW4gY2FzZSBmaWxlIGlzIGVtcHR5CisgICAgICAg IHJvb3QgbiB0dCkKKyAgICA7OyBpbml0aWFsaXplIGJ1ZmZlci1sb2NhbCBwYXJzaW5nIHZhcnMK KyAgICAoc2V0ZiByb290IChtYWtlLWpzMi1hc3Qtcm9vdCA6YnVmZmVyIChidWZmZXItbmFtZSkg OnBvcyBwb3MpCisgICAgICAgICAganMyLWN1cnJlbnQtc2NyaXB0LW9yLWZuIHJvb3QKKyAgICAg ICAgICBqczItY3VycmVudC1zY29wZSByb290CisgICAgICAgICAganMyLW5lc3Rpbmctb2YtZnVu Y3Rpb24gMAorICAgICAgICAgIGpzMi1sYWJlbGVkLXN0bXQgbmlsCisgICAgICAgICAganMyLXJl Y29yZGVkLWlkZW50aWZpZXJzIG5pbCkgIDsgZm9yIGpzMi1oaWdobGlnaHQKKyAgICAod2hpbGUg KC89IChzZXRxIHR0IChqczItZ2V0LXRva2VuKSkganMyLUVPRikKKyAgICAgIChpZiAoPSB0dCBq czItRlVOQ1RJT04pCisgICAgICAgICAgKHByb2duCisgICAgICAgICAgICAoc2V0cSBuIChpZiBq czItY2FsbGVkLWJ5LWNvbXBpbGUtZnVuY3Rpb24KKyAgICAgICAgICAgICAgICAgICAgICAgIChq czItcGFyc2UtZnVuY3Rpb24tZXhwcikKKyAgICAgICAgICAgICAgICAgICAgICAoanMyLXBhcnNl LWZ1bmN0aW9uLXN0bXQpKSkpCisgICAgICAgIDs7IG5vdCBhIGZ1bmN0aW9uIC0gcGFyc2UgYSBz dGF0ZW1lbnQKKyAgICAgICAgKGpzMi11bmdldC10b2tlbikKKyAgICAgICAgKHNldHEgbiAoanMy LXBhcnNlLXN0YXRlbWVudCkpKQorICAgICAgOzsgYWRkIGZ1bmN0aW9uIG9yIHN0YXRlbWVudCB0 byBzY3JpcHQKKyAgICAgIChzZXRxIGVuZCAoanMyLW5vZGUtZW5kIG4pKQorICAgICAgKGpzMi1i bG9jay1ub2RlLXB1c2ggcm9vdCBuKSkKKyAgICA7OyBhZGQgY29tbWVudHMgdG8gcm9vdCBpbiBs ZXhpY2FsIG9yZGVyCisgICAgKHdoZW4ganMyLXNjYW5uZWQtY29tbWVudHMKKyAgICAgIDs7IGlm IHdlIGZpbmQgYSBjb21tZW50IGJleW9uZCBlbmQgb2Ygbm9ybWFsIGtpZHMsIHVzZSBpdHMgZW5k CisgICAgICAoc2V0cSBlbmQgKG1heCBlbmQgKGpzMi1ub2RlLWVuZCAoY2wtZmlyc3QganMyLXNj YW5uZWQtY29tbWVudHMpKSkpCisgICAgICAoZG9saXN0IChjb21tZW50IGpzMi1zY2FubmVkLWNv bW1lbnRzKQorICAgICAgICAocHVzaCBjb21tZW50IChqczItYXN0LXJvb3QtY29tbWVudHMgcm9v dCkpCisgICAgICAgIChqczItbm9kZS1hZGQtY2hpbGRyZW4gcm9vdCBjb21tZW50KSkpCisgICAg KHNldGYgKGpzMi1ub2RlLWxlbiByb290KSAoLSBlbmQgcG9zKSkKKyAgICAoc2V0cSBqczItbW9k ZS1hc3Qgcm9vdCkgIDsgTWFrZSBzdXJlIHRoaXMgaXMgYXZhaWxhYmxlIGZvciBjYWxsYmFja3Mu CisgICAgOzsgR2l2ZSBleHRlbnNpb25zIGEgY2hhbmNlIHRvIG11Y2sgd2l0aCB0aGluZ3MgYmVm b3JlIGhpZ2hsaWdodGluZyBzdGFydHMuCisgICAgKGxldCAoKGpzMi1hZGRpdGlvbmFsLWV4dGVy bnMganMyLWFkZGl0aW9uYWwtZXh0ZXJucykpCisgICAgICAoc2F2ZS1leGN1cnNpb24KKyAgICAg ICAgKHJ1bi1ob29rcyAnanMyLXBvc3QtcGFyc2UtY2FsbGJhY2tzKSkKKyAgICAgIChqczItaGln aGxpZ2h0LXVuZGVjbGFyZWQtdmFycykpCisgICAgcm9vdCkpCisKKyhkZWZ1biBqczItcGFyc2Ut ZnVuY3Rpb24tY2xvc3VyZS1ib2R5IChmbi1ub2RlKQorICAiUGFyc2UgYSBKYXZhU2NyaXB0IDEu OCBmdW5jdGlvbiBjbG9zdXJlIGJvZHkuIgorICAobGV0ICgoanMyLW5lc3Rpbmctb2YtZnVuY3Rp b24gKDErIGpzMi1uZXN0aW5nLW9mLWZ1bmN0aW9uKSkpCisgICAgKGlmIGpzMi10cy1oaXQtZW9m CisgICAgICAgIChqczItcmVwb3J0LWVycm9yICJtc2cubm8uYnJhY2UuYm9keSIgbmlsCisgICAg ICAgICAgICAgICAgICAgICAgICAgIChqczItbm9kZS1wb3MgZm4tbm9kZSkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgKC0ganMyLXRzLWN1cnNvciAoanMyLW5vZGUtcG9zIGZuLW5vZGUpKSkK KyAgICAgIChqczItbm9kZS1hZGQtY2hpbGRyZW4gZm4tbm9kZQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAoc2V0ZiAoanMyLWZ1bmN0aW9uLW5vZGUtYm9keSBmbi1ub2RlKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoanMyLXBhcnNlLWV4cHIgdCkpKSkpKQorCiso ZGVmdW4ganMyLXBhcnNlLWZ1bmN0aW9uLWJvZHkgKGZuLW5vZGUpCisgIChqczItbXVzdC1tYXRj aCBqczItTEMgIm1zZy5uby5icmFjZS5ib2R5IgorICAgICAgICAgICAgICAgICAgKGpzMi1ub2Rl LXBvcyBmbi1ub2RlKQorICAgICAgICAgICAgICAgICAgKC0ganMyLXRzLWN1cnNvciAoanMyLW5v ZGUtcG9zIGZuLW5vZGUpKSkKKyAgKGxldCAoKHBvcyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKSkg ICAgICAgICA7IExDIHBvc2l0aW9uCisgICAgICAgIChwbiAobWFrZS1qczItYmxvY2stbm9kZSkp ICA7IHN0YXJ0cyBhdCBMQyBwb3NpdGlvbgorICAgICAgICB0dAorICAgICAgICBlbmQpCisgICAg KGNsLWluY2YganMyLW5lc3Rpbmctb2YtZnVuY3Rpb24pCisgICAgKHVud2luZC1wcm90ZWN0Cisg ICAgICAgICh3aGlsZSAobm90IChvciAoPSAoc2V0cSB0dCAoanMyLXBlZWstdG9rZW4pKSBqczIt RVJST1IpCisgICAgICAgICAgICAgICAgICAgICAgICAoPSB0dCBqczItRU9GKQorICAgICAgICAg ICAgICAgICAgICAgICAgKD0gdHQganMyLVJDKSkpCisgICAgICAgICAgKGpzMi1ibG9jay1ub2Rl LXB1c2ggcG4gKGlmICgvPSB0dCBqczItRlVOQ1RJT04pCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIChqczItcGFyc2Utc3RhdGVtZW50KQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKGpzMi1nZXQtdG9rZW4pCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAoanMyLXBhcnNlLWZ1bmN0aW9uLXN0bXQpKSkpCisgICAg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pzMi1zZXQtZmFjZSAoc2V0cSBsZWZ0cG9zIChqczItbm9k ZS1hYnMtcG9zIG5vZGUpKQorICAgICAgICAgICAgICAgICAgICAgICgrIGxlZnRwb3MgKGpzMi1u b2RlLWxlbiBub2RlKSkKKyAgICAgICAgICAgICAgICAgICAgICBmYWNlICdyZWNvcmQpKSkpCisg ICAoKGpzMi1vYmplY3Qtbm9kZS1wIG5vZGUpCisgICAgKGRvbGlzdCAoZWxlbSAoanMyLW9iamVj dC1ub2RlLWVsZW1zIG5vZGUpKQorICAgICAgKGpzMi1kZWZpbmUtZGVzdHJ1Y3Qtc3ltYm9scwor ICAgICAgIDs7IEluIGFiYnJldmlhdGVkIGRlc3RydWN0dXJpbmcge2EsIGJ9LCByaWdodCA9PSBs ZWZ0LgorICAgICAgIChqczItb2JqZWN0LXByb3Atbm9kZS1yaWdodCBlbGVtKQorICAgICAgIGRl Y2wtdHlwZSBmYWNlIGlnbm9yZS1ub3QtaW4tYmxvY2spKSkKKyAgICgoanMyLWFycmF5LW5vZGUt cCBub2RlKQorICAgIChkb2xpc3QgKGVsZW0gKGpzMi1hcnJheS1ub2RlLWVsZW1zIG5vZGUpKQor ICAgICAgKHdoZW4gZWxlbQorICAgICAgICAoanMyLWRlZmluZS1kZXN0cnVjdC1zeW1ib2xzIGVs ZW0gZGVjbC10eXBlIGZhY2UgaWdub3JlLW5vdC1pbi1ibG9jaykpKSkKKyAgICh0IChqczItcmVw b3J0LWVycm9yICJtc2cubm8ucGFybSIgbmlsIChqczItbm9kZS1hYnMtcG9zIG5vZGUpCisgICAg ICAgICAgICAgICAgICAgICAgICAoanMyLW5vZGUtbGVuIG5vZGUpKSkpKQorCisoZGVmdW4ganMy LXBhcnNlLWZ1bmN0aW9uLXBhcmFtcyAoZnVuY3Rpb24tdHlwZSBmbi1ub2RlIHBvcykKKyAgKGlm IChqczItbWF0Y2gtdG9rZW4ganMyLVJQKQorICAgICAgKHNldGYgKGpzMi1mdW5jdGlvbi1ub2Rl LXJwIGZuLW5vZGUpICgtIChqczItY3VycmVudC10b2tlbi1iZWcpIHBvcykpCisgICAgKGxldCAo KHBhcmVuLWZyZWUtYXJyb3cgKGFuZCAoZXEgZnVuY3Rpb24tdHlwZSAnRlVOQ1RJT05fQVJST1cp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZXEgKGpzMi1jdXJyZW50LXRva2Vu LXR5cGUpIGpzMi1OQU1FKSkpCisgICAgICAgICAgcGFyYW1zIHBhcmFtIGRlZmF1bHQtZm91bmQg cmVzdC1wYXJhbS1hdCkKKyAgICAgICh3aGVuIHBhcmVuLWZyZWUtYXJyb3cKKyAgICAgICAgKGpz Mi11bmdldC10b2tlbikpCisgICAgICAoY2wtbG9vcCBmb3IgdHQgPSAoanMyLXBlZWstdG9rZW4p CisgICAgICAgICAgICAgICBkbworICAgICAgICAgICAgICAgKGNvbmQKKyAgICAgICAgICAgICAg ICA7OyBkZXN0cnVjdHVyaW5nIHBhcmFtCisgICAgICAgICAgICAgICAgKChhbmQgKG5vdCBwYXJl bi1mcmVlLWFycm93KQorICAgICAgICAgICAgICAgICAgICAgIChvciAoPSB0dCBqczItTEIpICg9 IHR0IGpzMi1MQykpKQorICAgICAgICAgICAgICAgICAoanMyLWdldC10b2tlbikKKyAgICAgICAg ICAgICAgICAgKHdoZW4gZGVmYXVsdC1mb3VuZAorICAgICAgICAgICAgICAgICAgIChqczItcmVw b3J0LWVycm9yICJtc2cubm8uZGVmYXVsdC5hZnRlci5kZWZhdWx0LnBhcmFtIikpCisgICAgICAg ICAgICAgICAgIChzZXRxIHBhcmFtIChqczItcGFyc2UtZGVzdHJ1Y3QtcHJpbWFyeS1leHByKSkK KyAgICAgICAgICAgICAgICAgKGpzMi1kZWZpbmUtZGVzdHJ1Y3Qtc3ltYm9scyBwYXJhbQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzMi1MUAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdqczItZnVuY3Rpb24tcGFy YW0pCisgICAgICAgICAgICAgICAgIChwdXNoIHBhcmFtIHBhcmFtcykpCisgICAgICAgICAgICAg ICAgOzsgdmFyaWFibGUgbmFtZQorICAgICAgICAgICAgICAgICh0CisgICAgICAgICAgICAgICAg ICh3aGVuIChhbmQgKD49IGpzMi1sYW5ndWFnZS12ZXJzaW9uIDIwMCkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAobm90IHBhcmVuLWZyZWUtYXJyb3cpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKGpzMi1tYXRjaC10b2tlbiBqczItVFJJUExFRE9UKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgIChub3QgcmVzdC1wYXJhbS1hdCkpCisgICAgICAgICAgICAgICAgICAgOzsg dG8gcmVwb3J0IGVycm9ycyBpZiB0aGVyZSBhcmUgbW9yZSBwYXJhbWV0ZXJzCisgICAgICAgICAg ICAgICAgICAgKHNldHEgcmVzdC1wYXJhbS1hdCAobGVuZ3RoIHBhcmFtcykpKQorICAgICAgICAg ICAgICAgICAoanMyLW11c3QtbWF0Y2gtbmFtZSAibXNnLm5vLnBhcm0iKQorICAgICAgICAgICAg ICAgICAoanMyLXJlY29yZC1mYWNlICdqczItZnVuY3Rpb24tcGFyYW0pCisgICAgICAgICAgICAg ICAgIChzZXRxIHBhcmFtIChqczItY3JlYXRlLW5hbWUtbm9kZSkpCisgICAgICAgICAgICAgICAg IChqczItZGVmaW5lLXN5bWJvbCBqczItTFAgKGpzMi1jdXJyZW50LXRva2VuLXN0cmluZykgcGFy YW0pCisgICAgICAgICAgICAgICAgIDs7IGRlZmF1bHQgcGFyYW1ldGVyIHZhbHVlCisgICAgICAg ICAgICAgICAgICh3aGVuIChvciAoYW5kIGRlZmF1bHQtZm91bmQKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKG5vdCByZXN0LXBhcmFtLWF0KQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAoanMyLW11c3QtbWF0Y2gganMyLUFTU0lHTgorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIm1zZy5uby5kZWZhdWx0LmFmdGVyLmRlZmF1 bHQucGFyYW0iCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAoanMyLW5vZGUtcG9zIHBhcmFtKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKGpzMi1ub2RlLWxlbiBwYXJhbSkpKQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgKGFuZCAoPj0ganMyLWxhbmd1YWdlLXZlcnNpb24gMjAwKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAoanMyLW1hdGNoLXRva2VuIGpzMi1BU1NJR04pKSkKKyAgICAg ICAgICAgICAgICAgICAoY2wtYXNzZXJ0IChub3QgcGFyZW4tZnJlZS1hcnJvdykpCisgICAgICAg ICAgICAgICAgICAgKGxldCogKChwb3MgKGpzMi1ub2RlLXBvcyBwYXJhbSkpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICh0dCAoanMyLWN1cnJlbnQtdG9rZW4tdHlwZSkpCisgICAgICAgICAg ICAgICAgICAgICAgICAgIChvcC1wb3MgKC0gKGpzMi1jdXJyZW50LXRva2VuLWJlZykgcG9zKSkK KyAgICAgICAgICAgICAgICAgICAgICAgICAgKGxlZnQgcGFyYW0pCisgICAgICAgICAgICAgICAg ICAgICAgICAgIChyaWdodCAoanMyLXBhcnNlLWFzc2lnbi1leHByKSkKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgKGxlbiAoLSAoanMyLW5vZGUtZW5kIHJpZ2h0KSBwb3MpKSkKKyAgICAgICAg ICAgICAgICAgICAgIChzZXRxIHBhcmFtIChtYWtlLWpzMi1hc3NpZ24tbm9kZQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIDp0eXBlIHR0IDpwb3MgcG9zIDpsZW4gbGVuIDpvcC1w b3Mgb3AtcG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmxlZnQgbGVmdCA6 cmlnaHQgcmlnaHQpCisgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0LWZvdW5kIHQp CisgICAgICAgICAgICAgICAgICAgICAoanMyLW5vZGUtYWRkLWNoaWxkcmVuIHBhcmFtIGxlZnQg cmlnaHQpKSkKKyAgICAgICAgICAgICAgICAgKHB1c2ggcGFyYW0gcGFyYW1zKSkpCisgICAgICAg ICAgICAgICAod2hlbiAoYW5kIHJlc3QtcGFyYW0tYXQgKD4gKGxlbmd0aCBwYXJhbXMpICgxKyBy ZXN0LXBhcmFtLWF0KSkpCisgICAgICAgICAgICAgICAgIChqczItcmVwb3J0LWVycm9yICJtc2cu cGFyYW0uYWZ0ZXIucmVzdCIgbmlsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IChqczItbm9kZS1wb3MgcGFyYW0pIChqczItbm9kZS1sZW4gcGFyYW0pKSkKKyAgICAgICAgICAg ICAgIHdoaWxlCisgICAgICAgICAgICAgICAoanMyLW1hdGNoLXRva2VuIGpzMi1DT01NQSkpCisg ICAgICAod2hlbiAoYW5kIChub3QgcGFyZW4tZnJlZS1hcnJvdykKKyAgICAgICAgICAgICAgICAg KGpzMi1tdXN0LW1hdGNoIGpzMi1SUCAibXNnLm5vLnBhcmVuLmFmdGVyLnBhcm1zIikpCisgICAg ICAgIChzZXRmIChqczItZnVuY3Rpb24tbm9kZS1ycCBmbi1ub2RlKSAoLSAoanMyLWN1cnJlbnQt dG9rZW4tYmVnKSBwb3MpKSkKKyAgICAgICh3aGVuIHJlc3QtcGFyYW0tYXQKKyAgICAgICAgKHNl dGYgKGpzMi1mdW5jdGlvbi1ub2RlLXJlc3QtcCBmbi1ub2RlKSB0KSkKKyAgICAgIChkb2xpc3Qg KHAgcGFyYW1zKQorICAgICAgICAoanMyLW5vZGUtYWRkLWN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gICAgICAgKGpzMi1hZGQtc3RyaWN0LXdhcm5pbmcgIm1zZy5uby5yZXR1cm4udmFsdWUiCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGpzMi1uYW1lLW5vZGUtbmFtZSBuYW1l KSBwb3MgZW5kKQorICAgICAgICAoanMyLWFkZC1zdHJpY3Qtd2FybmluZyAibXNnLmFub24ubm8u cmV0dXJuLnZhbHVlIiBuaWwgcG9zIGVuZCkpKSkpCisKKyhkZWZ1biBqczItcGFyc2UtZnVuY3Rp b24tc3RtdCAoKQorICAobGV0ICgocG9zIChqczItY3VycmVudC10b2tlbi1iZWcpKQorICAgICAg ICAoc3Rhci1wIChqczItbWF0Y2gtdG9rZW4ganMyLU1VTCkpKQorICAgIChqczItbXVzdC1tYXRj aC1uYW1lICJtc2cudW5uYW1lZC5mdW5jdGlvbi5zdG10IikKKyAgICAobGV0ICgobmFtZSAoanMy LWNyZWF0ZS1uYW1lLW5vZGUgdCkpCisgICAgICAgICAgcG4gbWVtYmVyLWV4cHIpCisgICAgICAo Y29uZAorICAgICAgICgoanMyLW1hdGNoLXRva2VuIGpzMi1MUCkKKyAgICAgICAgKGpzMi1wYXJz ZS1mdW5jdGlvbiAnRlVOQ1RJT05fU1RBVEVNRU5UIHBvcyBzdGFyLXAgbmFtZSkpCisgICAgICAg KGpzMi1hbGxvdy1tZW1iZXItZXhwci1hcy1mdW5jdGlvbi1uYW1lCisgICAgICAgIChzZXRxIG1l bWJlci1leHByIChqczItcGFyc2UtbWVtYmVyLWV4cHItdGFpbCBuaWwgbmFtZSkpCisgICAgICAg IChqczItcGFyc2UtaGlnaGxpZ2h0LW1lbWJlci1leHByLWZuLW5hbWUgbWVtYmVyLWV4cHIpCisg ICAgICAgIChqczItbXVzdC1tYXRjaCBqczItTFAgIm1zZy5uby5wYXJlbi5wYXJtcyIpCisgICAg ICAgIChzZXRmIHBuIChqczItcGFyc2UtZnVuY3Rpb24gJ0ZVTkNUSU9OX1NUQVRFTUVO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gOyBldmVudHVhbGx5IG1hdGNoZWQgTFA/CisgICAgICAgIChzZXRx IGxwIChqczItY3VycmVudC10b2tlbi1iZWcpKSkKKyAgICAoc2V0ZiBmbi1ub2RlIChtYWtlLWpz Mi1mdW5jdGlvbi1ub2RlIDpwb3MgcG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6bmFtZSBuYW1lCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6Zm9ybSBmdW5jdGlvbi10eXBlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA6bHAgKGlmIGxwICgtIGxwIHBvcykpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA6Z2VuZXJhdG9yLXR5cGUgKGFuZCBzdGFyLXAgJ1NUQVIp KSkKKyAgICAod2hlbiBuYW1lCisgICAgICAoanMyLXNldC1mYWNlIChqczItbm9kZS1wb3MgbmFt ZSkgKGpzMi1ub2RlLWVuZCBuYW1lKQorICAgICAgICAgICAgICAgICAgICAnZm9udC1sb2NrLWZ1 bmN0aW9uLW5hbWUtZmFjZSAncmVjb3JkKQorICAgICAgKHdoZW4gKGFuZCAoZXEgZnVuY3Rpb24t dHlwZSAnRlVOQ1RJT05fU1RBVEVNRU5UKQorICAgICAgICAgICAgICAgICAoY2wtcGx1c3AgKGpz Mi1uYW1lLW5vZGUtbGVuZ3RoIG5hbWUpKSkKKyAgICAgICAgOzsgRnVuY3Rpb24gc3RhdGVtZW50 cyBkZWZpbmUgYSBzeW1ib2wgaW4gdGhlIGVuY2xvc2luZyBzY29wZQorICAgICAgICAoanMyLWRl ZmluZS1zeW1ib2wganMyLUZVTkNUSU9OIChqczItbmFtZS1ub2RlLW5hbWUgbmFtZSkgZm4tbm9k ZSkpKQorICAgIChpZiAob3IgKGpzMi1pbnNpZGUtZnVuY3Rpb24pIChjbC1wbHVzcCBqczItbmVz dGluZy1vZi13aXRoKSkKKy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1zZy5iYWQuYXJyb3cuYXJn cyIpKQorICAgICAgKGlmIChhbmQgKD49IGpzMi1sYW5ndWFnZS12ZXJzaW9uIDE4MCkKKyAgICAg ICAgICAgICAgICgvPSAoanMyLXBlZWstdG9rZW4pIGpzMi1MQykpCisgICAgICAgICAgKGpzMi1w YXJzZS1mdW5jdGlvbi1jbG9zdXJlLWJvZHkgZm4tbm9kZSkKKyAgICAgICAgKGpzMi1wYXJzZS1m dW5jdGlvbi1ib2R5IGZuLW5vZGUpKQorICAgICAgKGpzMi1jaGVjay1pbmNvbnNpc3RlbnQtcmV0 dXJuLXdhcm5pbmcgZm4tbm9kZSBuYW1lKQorCisgICAgICAod2hlbiBuYW1lCisgICAgICAgIChq czItbm9kZS1hZGQtY2hpbGRyZW4gZm4tbm9kZSBuYW1lKQorICAgICAgICA7OyBGdW5jdGlvbiBl eHByZXNzaW9ucyBkZWZpbmUgYSBuYW1lIG9ubHkgaW4gdGhlIGJvZHkgb2YgdGhlCisgICAgICAg IDs7IGZ1bmN0aW9uLCBhbmQgb25seSBpZiBub3QgaGlkZGVuIGJ5IGEgcGFyYW1ldGVyIG5hbWUK KyAgICAgICAgKHdoZW4gKGFuZCAoZXEgZnVuY3Rpb24tdHlwZSAnRlVOQ1RJT05fRVhQUkVTU0lP TikKKyAgICAgICAgICAgICAgICAgICAobnVsbCAoanMyLXNjb3BlLWdldC1zeW1ib2wganMyLWN1 cnJlbnQtc2NvcGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKGpzMi1uYW1lLW5vZGUtbmFtZSBuYW1lKSkpKQorICAgICAgICAgIChqczItZGVmaW5lLXN5 bWJvbCBqczItRlVOQ1RJT04KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGpzMi1uYW1l LW5vZGUtbmFtZSBuYW1lKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbi1ub2RlKSkK KyAgICAgICAgKHdoZW4gKGVxIGZ1bmN0aW9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S1zdG10LWNvdW50KQorICAgICAgICAgICAgICAgICAgIGpzMi1zdGF0ZW1lbnRzLXBlci1wYXVz ZSkpCisgICAgICAgICAoaW5wdXQtcGVuZGluZy1wKQorICAgICAgICAgKHRocm93ICdpbnRlcnJ1 cHRlZCB0KSkKKyAgICAoc2V0cSBwbiAoanMyLXN0YXRlbWVudC1oZWxwZXIpKQorICAgIDs7IG5v LXNpZGUtZWZmZWN0cyB3YXJuaW5nIGNoZWNrCisgICAgKHVubGVzcyAoanMyLW5vZGUtaGFzLXNp ZGUtZWZmZWN0cyBwbikKKyAgICAgIChzZXRxIGVuZCAoanMyLW5vZGUtZW5kIHBuKSkKKyAgICAg IChzYXZlLWV4Y3Vyc2lvbgorICAgICAgICAoZ290by1jaGFyIGVuZCkKKyAgICAgICAgKHNldHEg YmVnIChtYXggKGpzMi1ub2RlLXBvcyBwbikgKHBvaW50LWF0LWJvbCkpKSkKKyAgICAgIChqczIt YWRkLXN0cmljdC13YXJuaW5nICJtc2cubm8uc2lkZS5lZmZlY3RzIiBuaWwgYmVnIGVuZCkpCisg ICAgcG4pKQorCis7OyBUaGVzZSBjb3JyZXNwb25kIHRvIHRoZSBzd2l0Y2ggY2FzZXMgaW4gUGFy c2VyLnN0YXRlbWVudEhlbHBlcgorKGRlZmNvbnN0IGpzMi1wYXJzZXJzCisgIChsZXQgKChwYXJz ZXJzIChtYWtlLXZlY3RvciBqczItbnVtLXRva2VucworICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAjJ2pzMi1wYXJzZS1leHByLXN0bXQpKSkKKyAgICAoYXNldCBwYXJzZXJzIGpzMi1C UkVBSyAgICAgIydqczItcGFyc2UtYnJlYWspCisgICAgKGFzZXQgcGFyc2VycyBqczItQ0xBU1Mg ICAgICMnanMyLXBhcnNlLWNsYXNzLXN0bXQpCisgICAgKGFzZXQgcGFyc2VycyBqczItQ09OU1Qg ICAgICMnanMyLXBhcnNlLWNvbnN0LXZhcikKKyAgICAoYXNldCBwYXJzZXJzIGpzMi1DT05USU5V RSAgIydqczItcGFyc2UtY29udGludWUpCisgICAgKGFzZXQgcGFyc2VycyBqczItREVCVUdHRVIg ICMnanMyLXBhcnNlLWRlYnVnZ2VyKQorICAgIChhc2V0IHBhcnNlcnMganMyLURFRkFVTFQgICAj J2pzMi1wYXJzZS1kZWZhdWx0LXhtbC1uYW1lc3BhY2UpCisgICAgKGFzZXQgcGFyc2VycyBqczIt RE8gICAgICAgICMnanMyLXBhcnNlLWRvKQorICAgIChhc2V0IHBhcnNlcnMganMyLUVYUE9SVCAg ICAjJ2pzMi1wYXJzZS1leHBvcnQpCisgICAgKGFzZXQgcGFyc2VycyBqczItRk9SICAgICAgICMn anMyLXBhcnNlLWZvcikKKyAgICAoYXNldCBwYXJzZXJzIGpzMi1GVU5DVElPTiAgIydqczItcGFy c2UtZnVuY3Rpb24tc3RtdCkKKyAgICAoYXNldCBwYXJzZXJzIGpzMi1JRiAgICAgICAgIydqczIt cGFyc2UtaWYpCisgICAgKGFzZXQgcGFyc2VycyBqczItSU1QT1JUICAgICMnanMyLXBhcnNlLWlt cG9ydCkKKyAgICAoYXNldCBwYXJzZXJzIGpzMi1MQyAgICAgICAgIydqczItcGFyc2UtYmxvY2sp CisgICAgKGFzZXQgcGFyc2VycyBqczItTEVUICAgICAgICMnanMyLXBhcnNlLWxldC1zdG10KQor ICAgIChhc2V0IHBhcnNlcnMganMyLU5BTUUgICAgICAjJ2pzMi1wYXJzZS1uYW1lLW9yLWxhYmVs KQorICAgIChhc2V0IHBhcnNlcnMganMyLVJFVFVSTiAgICAjJ2pzMi1wYXJzZS1yZXQteWllbGQp CisgICAgKGFzZXQgcGFyc2VycyBqczItU0VNSSAgICAgICMnanMyLXBhcnNlLXNlbWkpCisgICAg KGFzZXQgcGFyc2VycyBqczItU1dJVENIICAgICMnanMyLXBhcnNlLXN3aXRjaCkKKyAgICAoYXNl dCBwYXJzZXJzIGpzMi1USFJPVyAgICAgIydqczItcGFyc2UtdGhyb3cpCisgICAgKGFzZXQgcGFy c2VycyBqczItVFJZICAgICAgICMnanMyLXBhcnNlLXRyeSkKKyAgICAoYXNldCBwYXJzZXJzIGpz Mi1WQVIgICAgICAgIydqczItcGFyc2UtY29uc3QtdmFyKQorICAgIChhc2V0IHBhcnNlcnMganMy LVdISUxFICAgICAjJ2pzMi1wYXJzZS13aGlsZSkKKyAgICAoYXNldCBwYXJzZXJzIGpzMi1XSVRI ICAgICAgIydqczItcGFyc2Utd2l0aCkKKyAgICAoYXNldCBwYXJzZXJzIGpzMi1ZSUVMRCAgICAg IydqczItcGFyc2UtcmV0LXlpZWxkKQorICAgIHBhcnNlcnMpCisgICJBIHZlY3RvciBtYXBwaW5n IHRva2VuIHR5cGVzIHRvIHBhcnNlciBmdW5jdGlvbnMuIikKKworKGRlZnVuIGpzMi1wYXJzZS13 YXJuLW1pc3Npbmctc2VtaSAoYmVnIGVuZCkKKyAgKGFuZCBqczItbW9kZS1zaG93LXN0cmljdC13 YXJuaW5ncworICAgICAgIGpzMi1zdHJpY3QtbWlzc2luZy1zZW1pLXdhcm5pbmcKKyAgICAgICAo anMyLWFkZC1zdHJpY3Qtd2FybmluZworICAgICAgICAibXNnLm1pc3Npbmcuc2VtaSIgbmlsCisg ICAgICAgIDs7IGJhY2sgdXAgdG8gYmVnaW5uaW5nIG9mIHN0YXRlbWVudCBvciBsaW5lCisgICAg ICAgIChtYXggYmVnIChzYXZlLWV4Y3Vyc2lvbgorICAgICAgICAgICAgICAgICAgIChnb3RvLWNo YXIgZW5kKQorICAgICAgICAgICAgICAgICAgIChwb2ludC1hdC1ib2wpKSkKKyAgICAgICAgZW5k KSkpCisKKyhkZWZjb25zdCBqczItbm8tc2VtaS1pbnNlcnRpb24KKyAgKGxpc3QganMyLUlGCisg ICAgICAgIGpzMi1TV0lUQ0gKKyAgICAgICAganMyLVdISUxFCisgICAgICAgIGpzMi1ETworICAg ICAgICBqczItRk9SCisgICAgICAgIGpzMi1UUlkKKyAgICAgICAganMyLVdJVEgKKyAgICAgICAg anMyLUxDCisgICAgICAgIGpzMi1FUlJPUgorICAgICAgICBqczItU0VNSQorICAgICAgICBqczIt Q0xBU1MKKyAgICAgICAganMyLUZVTkNUSU9OKQorICAiTGlzdCBvZiB0b2tlbnMgdGhhdCBkb24n dCBkbyBhdXRvbWF0aWMgc2VtaWNvbG9uIGluc2VydGlvbi4iKQorCisoZGVmY29uc3QganMyLWF1 dG9pbnNlcnQtc2VtaS1hbmQtd2FybgorICAobGlzdCBqczItRVJST1IganMyLUVPRiBqczItUkMp KQorCisoZGVmdW4ganMyLXN0YXRlbWVudC1oZWxwZXIgKCkKKyAgKGxldCogKCh0dCAoanMyLWdl dC10b2tlbikpCisgICAgICAgICAoZmlyc3QtdHQgdHQpCisgICAgICAgICAocGFyc2VyIChpZiAo PSB0dCBqczItRVJST1IpCisgICAgICAgICAgICAgICAgICAgICAjJ2pzMi1wYXJzZS1zZW1pCisg ICAgICAgICAgICAgICAgICAgKGFyZWYganMyLXBhcnNlcnMgdHQpKSkKKyAgICAgICAgIHBuKQor ICAgIDs7IElmIHRoZSBzdGF0ZW1lbnQgaXMgc2V0LCB0aGVuIGl0J3MgYmVlbiB0b2xkIGl0cyBs YWJlbCBieSBub3cuCisgICAgKGFuZCBqczItbGFiZWxlZC1zdG10CisgICAgICAgICAoanMyLWxh YmVsZWQtc3RtdC1ub2RlLXN0bXQganMyLWxhYmVsZWQtc3RtdCkKKyAgICAgICAgIChzZXRxIGpz Mi1sYWJlbGVkLXN0bXQgbmlsKSkKKyAgICAoc2V0cSBwbiAoZnVuY2FsbCBwYXJzZXIpKQorICAg IDs7IERvbid0IGRvIGF1dG8gc2VtaSBpbnNlcnRpb24gZm9yIGNlcnRhaW4gc3RhdGVtZW50IHR5 cGVzLgorICAgICh1bmxlc3MgKG9yIChtZW1xIGZpcnN0LXR0IGpzMi1uby1zZW1pLWluc2VydGlv bikKKyAgICAgICAgICAgICAgICAoanMyLWxhYmVsZWQtc3RtdC1ub2RlLXAgcG4pKQorICAgICAg KGpzMi1hdXRvLWluc2VydC1zZW1pY29sb24gcG4pKQorICAgIHBuKSkKKworKGRlZnVuIGpzMi1h dXRvLWluc2VydC1zZW1pY29sb24gKHBuKQorICAobGV0KiAoKHR0IChqczItZ2V0LXRva2VuKSkK KyAgICAgICAgIChwb3MgKGpzMi1ub2RlLXBvcyBwbikpKQorICAgICAgKGNvbmQKKyAgICAgICAo KD0gdHQganMyLVNFTUkpCisgICAgICAgIDs7IGV4dGVuZCB0aGUgbm9kZSBib3VuZHMgdG8gaW5j bHVkZSB0aGUgc2VtaWNvbG9uLgorICAgICAgICAoc2V0ZiAoanMyLW5vZGUtbGVuIHBuKSAoLSAo anMyLWN1cnJlbnQtdG9rZW4tZW5kKSBwb3MpKSkKKyAgICAgICAoKG1lbXEgdHQganMyLWF1dG9p bnNlcnQtc2VtaS1hbmQtd2FybikKKyAgICAgICAgKGpzMi11bmdldC10b2tlbikgOyBOb3QgJzsn LCBkbyBub3QgY29uc3VtZS4KKyAgICAgICAgOzsgQXV0b2luc2VydCA7CisgICAgICAgIChqczIt cGFyc2Utd2Fybi1taXNzaW5nLXNlbWkgcG9zIChqczItbm9kZS1lbmQgcG4pKSkKKyAgICAgICAo dAorICAgICAgICAoaWYgKG5vdCAoanMyLXRva2VuLWZvbGxvd3MtZW9sLXAgKGpzMi1jdXJyZW50 LXRva2VuKSkpCisgICAgICAgICAgICA7OyBSZXBvcnQgZXJyb3IgaWYgbm8gRU9MIG9yIGF1dG9p bnNlcnQgJzsnIG90aGVyd2lzZQorICAgICAgICAgICAgKGpzMi1yZXBvcnQtZXJyb3IgIm1zZy5u by5zZW1pLnN0bXQiKQorICAgICAgICAgIChqczItcGFyc2Utd2Fybi1taXNzaW5nLXNlbWkgcG9z IChqczItbm9kZS1lbmQgcG4pKSkKKyAgICAgICAgKGpzMi11bmdldC10b2tlbikgOyBOb3QgJzsn LCBkbyBub3QgY29uc3VtZS4KKyAgICAgICAgKSkpKQorCisoZGVmdW4ganMy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ICAgICAgICAgICAoanMyLW5vZGUtcG9zIHBuKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAoKyAoanMyLW5vZGUtcG9zIHBuKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAoanMyLW5vZGUtbGVuIHBuKSkpKQorICAgIChsaXN0IHBuIGxwIHJwKSkpCisKKyhkZWZ1 biBqczItcGFyc2UtaWYgKCkKKyAgIlBhcnNlciBmb3IgaWYtc3RhdGVtZW50LiAgTGFzdCBtYXRj aGVkIHRva2VuIG11c3QgYmUganMyLUlGLiIKKyAgKGxldCAoKHBvcyAoanMyLWN1cnJlbnQtdG9r ZW4tYmVnKSkKKyAgICAgICAgY29uZCBpZi10cnVlIGlmLWZhbHNlIGVsc2UtcG9zIGVuZCBwbikK KyAgICAoc2V0cSBjb25kIChqczItcGFyc2UtY29uZGl0aW9uKQorICAgICAgICAgIGlmLXRydWUg KGpzMi1wYXJzZS1zdGF0ZW1lbnQpCisgICAgICAgICAgaWYtZmFsc2UgKGlmIChqczItbWF0Y2gt dG9rZW4ganMyLUVMU0UpCisgICAgICAgICAgICAgICAgICAgICAgIChwcm9nbgorICAgICAgICAg ICAgICAgICAgICAgICAgIChzZXRxIGVsc2UtcG9zICgtIChqczItY3VycmVudC10b2tlbi1iZWcp IHBvcykpCisgICAgICAgICAgICAgICAgICAgICAgICAgKGpzMi1wYXJzZS1zdGF0ZW1lbnQpKSkK KyAgICAgICAgICBlbmQgKGpzMi1ub2RlLWVuZCAob3IgaWYtZmFsc2UgaWYtdHJ1ZSkpCisgICAg ICAgICAgcG4gKG1ha2UtanMyLWlmLW5vZGUgOnBvcyBwb3MKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6bGVuICgtIGVuZCBwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgOmNvbmRpdGlvbiAoY2FyIGNvbmQpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg OnRoZW4tcGFydCBpZi10cnVlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmVsc2Ut cGFydCBpZi1mYWxzZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDplbHNlLXBvcyBl bHNlLXBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpscCAoanMyLXJlbHBvcyAo Y2wtc2Vjb25kIGNvbmQpIHBvcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6cnAg KGpzMi1yZWxwb3MgKGNsLXRoaXJkIGNvbmQpIHBvcykpKQorICAgIChqczItbm9kZS1hZGQtY2hp bGRyZW4gcG4gKGNhciBjb25kKSBpZi10cnVlIGlmLWZhbHNlKQorICAgIHBuKSkKKworKGRlZnVu IGpzMi1wYXJzZS1pbXBvcnQgKCkKKyAgIlBhcnNlIGltcG9ydCBzdGF0ZW1lbnQuIFRoZSBjdXJy ZW50IHRva2VuIG11c3QgYmUganMyLUlNUE9SVC4iCisgICh1bmxlc3MgKGpzMi1hc3Qtcm9vdC1w IGpzMi1jdXJyZW50LXNjb3BlKQorICAgIChqczItcmVwb3J0LWVycm9yICJtc2cubW9kLmltcG9y dC5kZWNsLmF0LnRvcC5sZXZlbCIpKQorICAobGV0ICgoYmVnIChqczItY3VycmVudC10b2tlbi1i ZWcpKSkKKyAgICAoY29uZCAoKGpzMi1tYXRjaC10b2tlbiBqczItU1RSSU5HKQorICAgICAgICAg ICAobWFrZS1qczItaW1wb3J0LW5vZGUKKyAgICAgICAgICAgIDpwb3MgYmVnCisgICAgICAgICAg ICA6bGVuICgtIChqczItY3VycmVudC10b2tlbi1lbmQpIGJlZykKKyAgICAgICAgICAgIDptb2R1 bGUtaWQgKGpzMi1jdXJyZW50LXRva2VuLXN0cmluZykpKQorICAgICAgICAgICh0CisgICAgICAg ICAgIChsZXQqICgoaW1wb3J0LWNsYXVzZSAoanMyLXBhcnNlLWltcG9ydC1jbGF1c2UpKQorICAg ICAgICAgICAgICAgICAgKGZyb20tY2xhdXNlIChhbmQgaW1wb3J0LWNsYXVzZSAoanMyLXBhcnNl LWZyb20tY2xhdXNlKSkpCisgICAgICAgICAgICAgICAgICAobW9kdWxlLWlkICh3aGVuIGZyb20t Y2xhdXNlIChqczItZnJvbS1jbGF1c2Utbm9kZS1tb2R1bGUtaWQgZnJvbS1jbGF1c2UpKSkKKyAg ICAgICAgICAgICAgICAgIChub2RlIChtYWtlLWpzMi1pbXBvcnQtbm9kZQorICAgICAgICAgICAg ICAgICAgICAgICAgIDpwb3MgYmVnCisgICAgICAgICAgICAgICAgICAgICAgICAgOmxlbiAoLSAo anMyLWN1cnJlbnQtdG9rZW4tZW5kKSBiZWcpCisgICAgICAgICAgICAgICAgICAgICAgICAgOmlt cG9ydCBpbXBvcnQtY2xhdXNlCisgICAgICAgICAgICAgICAgICAgICAgICAgOmZyb20gZnJvbS1j bGF1c2UKKyAgICAgICAgICAgICAgICAgICAgICAgICA6bW9kdWxlLWlkIG1vZHVsZS1pZCkpKQor ICAgICAgICAgICAgICh3aGVuIGltcG9ydC1jbGF1c2UKKyAgICAgICAgICAgICAgIChqczItbm9k ZS1hZGQtY2hpbGRyZW4gbm9kZSBpbXBvcnQtY2xhdXNlKSkKKyAgICAgICAgICAgICAod2hlbiBm cm9tLWNsYXVzZQorICAgICAgICAgICAgICAgKGpzMi1ub2RlLWFkZC1jaGlsZHJlbiBub2RlIGZy b20tY2xhdXNlKSkKKyAgICAgICAgICAgICBub2RlKSkpKSkKKworKGRlZnVuIGpzMi1wYXJzZS1p bXBvcnQtY2xhdXNlICgpCisgICJQYXJzZSB0aGUgYmluZGluZ3MgaW4gYW4gaW1wb3J0IHN0YXRl bWVudC4KK1RoaXMgY2FuIHRha2UgbWFueSBmb3JtczoKKworSW1wb3J0ZWREZWZhdWx0QmluZGlu ZyAtPiAnZm9vJworTmFtZVNwYWNlSW1wb3J0IC0+ICcqIGFzIGxpYicKK05hbWVkSW1wb3J0cyAt PiAne2ZvbyBhcyBiYXIsIGJhbmd9JworSW1wb3J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lt cG9ydCBjbGF1c2UpIG5zLWltcG9ydCkKKyAgICAgICAgKHB1c2ggbnMtaW1wb3J0IGNoaWxkcmVu KSkpCisgICAgICgoanMyLW1hdGNoLXRva2VuIGpzMi1MQykKKyAgICAgIChsZXQgKChpbXBvcnRz IChqczItcGFyc2UtZXhwb3J0LWJpbmRpbmdzIHQpKSkKKyAgICAgICAgKHNldGYgKGpzMi1pbXBv cnQtY2xhdXNlLW5vZGUtbmFtZWQtaW1wb3J0cyBjbGF1c2UpIGltcG9ydHMpCisgICAgICAgIChk b2xpc3QgKGltcG9ydCBpbXBvcnRzKQorICAgICAgICAgIChwdXNoIGltcG9ydCBjaGlsZHJlbikK KyAgICAgICAgICAobGV0ICgobmFtZS1ub2RlIChqczItZXhwb3J0LWJpbmRpbmctbm9kZS1sb2Nh bC1uYW1lIGltcG9ydCkpKQorICAgICAgICAgICAgKHdoZW4gbmFtZS1ub2RlCisgICAgICAgICAg ICAgIChqczItZGVmaW5lLXN5bWJvbAorICAgICAgICAgICAgICAganMyLUxFVCAoanMyLW5hbWUt bm9kZS1uYW1lIG5hbWUtbm9kZSkgbmFtZS1ub2RlIHQpKSkpKSkKKyAgICAgKCg9IChqczItcGVl ay10b2tlbikganMyLU5BTUUpCisgICAgICAobGV0ICgoYmluZGluZyAoanMyLW1heWJlLXBhcnNl LWV4cG9ydC1iaW5kaW5nKSkpCisgICAgICAgIChsZXQgKChub2RlLW5hbWUgKGpzMi1leHBvcnQt YmluZGluZy1ub2RlLWxvY2FsLW5hbWUgYmluZGluZykpKQorICAgICAgICAgIChqczItZGVmaW5l LXN5bWJvbCBqczItTEVUIChqczItbmFtZS1ub2RlLW5hbWUgbm9kZS1uYW1lKSBub2RlLW5hbWUg dCkpCisgICAgICAgIChzZXRmIChqczItaW1wb3J0LWNsYXVzZS1ub2RlLWRlZmF1bHQtYmluZGlu ZyBjbGF1c2UpIGJpbmRpbmcpCisgICAgICAgIChwdXNoIGJpbmRpbmcgY2hpbGRyZW4pKQorICAg ICAgKHdoZW4gKGpzMi1tYXRjaC10b2tlbiBqczItQ09NTUEpCisgICAgICAgIChjb25kCisgICAg ICAgICAoKGpzMi1tYXRjaC10b2tlbiBqczItTVVMKQorICAgICAgICAgIChsZXQgKChucy1pbXBv cnQgKGpzMi1wYXJzZS1uYW1lc3BhY2UtaW1wb3J0KSkpCisgICAgICAgICAgICAobGV0ICgobmFt ZS1ub2RlIChqczItbmFtZXNwYWNlLWltcG9ydC1ub2RlLW5hbWUgbnMtaW1wb3J0KSkpCisgICAg ICAgICAgICAgIChqczItZGVmaW5lLXN5bWJvbAorICAgICAgICAgICAgICAganMyLUxFVCAoanMy LW5hbWUtbm9kZS1uYW1lIG5hbWUtbm9kZSkgbmFtZS1ub2RlIHQpKQorICAgICAgICAgICAgKHNl dGYgKGpzMi1pbXBvcnQtY2xhdXNlLW5vZGUtbmFtZXNwYWNlLWltcG9ydCBjbGF1c2UpIG5zLWlt cG9ydCkKKyAgICAgICAgICAgIChwdXNoIG5zLWltcG9ydCBjaGlsZHJlbikpKQorICAgICAgICAg KChqczItbWF0Y2gtdG9rZW4ganMyLUxDKQorICAgICAgICAgIChsZXQgKChpbXBvcnRzIChqczIt cGFyc2UtZXhwb3J0LWJpbmRpbmdzIHQpKSkKKyAgICAgICAgICAgIChzZXRmIChqczItaW1wb3J0 LWNsYXVzZS1ub2RlLW5hbWVkLWltcG9ydHMgY2xhdXNlKSBpbXBvcnRzKQorICAgICAgICAgICAg KGRvbGlzdCAoaW1wb3J0IGltcG9ydHMpCisgICAgICAgICAgICAgIChwdXNoIGltcG9ydCBjaGls ZHJlbikKKyAgICAgICAgICAgICAgKGxldCAoKG5hbWUtbm9kZSAoanMyLWV4cG9ydC1iaW5kaW5n LW5vZGUtbG9jYWwtbmFtZSBpbXBvcnQpKSkKKyAgICAgICAgICAgICAgICAod2hlbiBuYW1lLW5v ZGUKKyAgICAgICAgICAgICAgICAgIChqczItZGVmaW5lLXN5bWJvbAorICAgICAgICAgICAgICAg ICAgIGpzMi1MRVQgKGpzMi1uYW1lLW5vZGUtbmFtZSBuYW1lLW5vZGUpIG5hbWUtbm9kZSB0KSkp KSkpCisgICAgICAgICAodCAoanMyLXJlcG9ydC1lcnJvciAibXNnLnN5bnRheCIpKSkpKQorICAg ICAodCAoanMyLXJlcG9ydC1lcnJvciAibXNnLm1vZC5kZWNsYXJhdGlvbi5hZnRlci5pbXBvcnQi KSkpCisgICAgKHNldGYgKGpzMi1ub2RlLWxlbiBjbGF1c2UpICgtIChqczItY3VycmVudC10b2tl bi1lbmQpIGJlZykpCisgICAgKGFwcGx5ICMnanMyLW5vZGUtYWRkLWNoaWxkcmVuIGNsYXVzZSBj aGlsZHJlbikKKyAgICBjbGF1c2UpKQorCisoZGVmdW4ganMyLXBhcnNlLW5hbWVzcGFjZS1pbXBv cnQgKCkKKyAgIlBhcnNlIGEgbmFtZXNwYWNlIGltcG9ydCBleHByZXNzaW9uIHN1Y2ggYXMgICcq IGFzIGJhcicuCitUaGUgY3VycmVudCB0b2tlbiBtdXN0IGJlIGpzMi1NVUwuIgorICAobGV0ICgo YmVnIChqczItY3VycmVudC10b2tlbi1iZWcpKSkKKyAgICAod2hlbiAoanMyLW11c3QtbWF0Y2gg anMyLU5BTUUgIm1zZy5zeW50YXgiKQorICAgICAgICAoaWYgKGVxdWFsICJhcyIgKGpzMi1jdXJy ZW50LXRva2VuLXN0cmluZykpCisgICAgICAgICAgICAod2hlbiAoanMyLW11c3QtbWF0Y2gtcHJv cC1uYW1lICJtc2cuc3ludGF4IikKKyAgICAgICAgICAgICAgKGxldCAoKG5vZGUgKG1ha2UtanMy LW5hbWVzcGFjZS1pbXBvcnQtbm9kZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgOnBvcyBi ZWcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIDpsZW4gKC0gKGpzMi1jdXJyZW50LXRva2Vu LWVuZCkgYmVnKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgOm5hbWUgKG1ha2UtanMyLW5h bWUtbm9kZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpwb3MgKGpzMi1jdXJy ZW50LXRva2VuLWJlZykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6bGVuIChq czItY3VycmVudC10b2tlbi1lbmQpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg Om5hbWUgKGpzMi1jdXJyZW50LXRva2VuLXN0cmluZykpKSkpCisgICAgICAgICAgICAgICAgKGpz Mi1ub2RlLWFkZC1jaGlsZHJlbiBub2RlIChqczItbmFtZXNwYWNlLWltcG9ydC1ub2RlLW5hbWUg bm9kZSkpCisgICAgICAgICAgICAgICAgbm9kZSkpCisgICAgICAgICAgKGpzMi11bmdldC10b2tl bikKKyAgICAgICAgICAoanMyLXJlcG9ydC1lcnJvciAibXNnLnN5bnRheCIpKSkpKQorCisKKyhk ZWZ1biBqczItcGFyc2UtZnJvbS1jbGF1c2UgKCkKKyAgIlBhcnNlIHRoZSBmcm9tIGNsYXVzZSBp biBhbiBpbXBvcnQgb3IgZXhwb3J0IHN0YXRlbWVudC4gRS5nLiBmcm9tICdzcmMvbGliJyIKKyAg KHdoZW4gKGpzMi1tdXN0LW1hdGNoLW5hbWUgIm1zZy5tb2QuZnJvbS5hZnRlci5pbXBvcnQuc3Bl Yy5zZXQiKQorICAgIChsZXQgKChiZWcgKGpzMi1jdXJyZW50LXRva2VuLWJlZykpKQorICAgICAg KGlmIChlcXVhbCAiZnJvbSIgKGpzMi1jdXJyZW50LXRva2VuLXN0cmluZykpCisgICAgICAgICAg KGNvbmQKKyAgICAgICAgICAgKChqczItbWF0Y2gtdG9rZW4ganMyLVNUUklORykKKyAgICAgICAg ICAgIChtYWtlLWpzMi1mcm9tLWNsYXVzZS1ub2RlCisgICAgICAgICAgICAgOnBvcyBiZWcKKyAg ICAgICAgICAgICA6bGVuICgtIChqczItY3VycmVudC10b2tlbi1lbmQpIGJlZykKKyAgICAgICAg ICAgICA6bW9kdWxlLWlkIChqczItY3VycmVudC10b2tlbi1zdHJpbmcpCisgICAgICAgICAgICAg Om1ldGFkYXRhLXAgbmlsKSkKKyAgICAgICAgICAgKChqczItbWF0Y2gtdG9rZW4ganMyLVRISVMp CisgICAgICAgICAgICAod2hlbiAoanMyLW11c3QtbWF0Y2gtbmFtZSAibXNnLm1vZC5zcGVjLmFm dGVyLmZyb20iKQorICAgICAgICAgICAgICAoaWYgKGVxdWFsICJtb2R1bGUiIChqczItY3VycmVu dC10b2tlbi1zdHJpbmcpKQorICAgICAgICAgICAgICAgICAgKG1ha2UtanMyLWZyb20tY2xhdXNl LW5vZGUKKyAgICAgICAgICAgICAgICAgICA6cG9zIGJlZworICAgICAgICAgICAgICAgICAgIDps ZW4gKC0gKGpzMi1jdXJyZW50LXRva2VuLWVuZCkgYmVnKQorICAgICAgICAgICAgICAgICAgIDpt b2R1bGUtaWQgInRoaXMiCisgICAgICAgICAgICAgICAgICAgOm1ldGFkYXRhLXAgdCkKKyAgICAg ICAgICAgICAgICAoanMyLXVuZ2V0LXRva2VuKQorICAgICAgICAgICAgICAgIChqczItdW5nZXQt dG9rZW4pCisgICAgICAgICAgICAgICAgKGpzMi1yZXBvcnQtZXJyb3IgIm1zZy5tb2Quc3BlYy5h ZnRlci5mcm9tIikKKyAgICAgICAgICAgICAgICBuaWwpKSkKKyAgICAgICAgICAgKHQgKGpzMi1y ZXBvcnQtZXJyb3IgIm1zZy5tb2Quc3BlYy5hZnRlci5mcm9tIikgbmlsKSkKKyAgICAgICAgKGpz Mi11bmdldC10b2tlbikKKyAgICAgICAgKGpzMi1yZXBvcnQtZXJyb3IgIm1zZy5tb2QuZnJvbS5h ZnRlci5pbXBvcnQuc3BlYy5zZXQiKQorICAgICAgICBuaWwpKSkpCisKKyhkZWZ1biBqczItcGFy c2UtZXhwb3J0LWJpbmRpbmdzICgmb3B0aW9uYWwgaW1wb3J0LXApCisgICJQYXJzZSBhIGxpc3Qg b2YgZXhwb3J0IGJpbmRpbmcgZXhwcmVzc2lvbnMgc3VjaCBhcyB7fSwge2ZvbywgYmFyfSwgYW5k Cit7Zm9vIGFzIGJhciwgYmF6IGFzIGJhbmd9LiBUaGUgY3VycmVudCB0b2tlbiBtdXN0IGJlCitq czItTEMuIFJldHVybiBhIGxpc3AgbGlzdCBvZiBqczItZXhwb3J0LWJpbmRpbmctbm9kZSIKKyAg KGxldCAoKGJpbmRpbmdzIChsaXN0KSkpCisgICAgKHdoaWxlCisgICAgICAgIChsZXQgKChiaW5k aW5nIChqczItbWF5YmUtcGFyc2UtZXhwb3J0LWJpbmRpbmcpKSkKKyAgICAgICAgICAod2hlbiBi aW5kaW5nCisgICAgICAgICAgICAocHVzaCBiaW5kaW5nIGJpbmRpbmdzKSkKKyAgICAgICAgICAo anMyLW1hdGNoLXRva2VuIGpzMi1DT01NQSkpKQorICAgICh3aGVuIChqczItbXVzdC1tYXRjaCBq czItUkMgKGlmIGltcG9ydC1wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg Im1zZy5tb2QucmMuYWZ0ZXIuaW1wb3J0LnNwZWMubGlzdCIKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIm1zZy5tb2QucmMuYWZ0ZXIuZXhwb3J0LnNwZWMubGlzdCIpKQorICAg ICAgKHJldmVyc2UgYmluZGluZ3MpKSkpCisKKyhkZWZ1biBqczItbWF5YmUtcGFyc2UtZXhwb3J0 LWJpbmRpbmcgKCkKKyAgIkF0dGVtcHQgdG8gcGFyc2UgYSBiaW5kaW5nIGV4cHJlc3Npb24gZm91 bmQgaW5zaWRlIGFuIGltcG9ydC9leHBvcnQgc3RhdGVtZW50LgorVGhpcyBjYW4gdGFrZSB0aGUg Zm9ybSBvZiBlaXRoZXIgYXMgc2luZ2xlIGpzMi1OQU1FIHRva2VuIGFzIGluICdmb28nIG9yIGFz IGluIGEKK3JlYmluZGluZyBleHByZXNzaW9uICdiYXIgYXMgZm9vJy4gSWYgaXQgbWF0Y2hlcywg aXQgd2lsbCByZXR1cm4gYW4gaW5zdGFuY2Ugb2YKK2pzMi1leHBvcnQtYmluZGluZy1ub2RlIGFu ZCBjb25zdW1lIGFsbCB0aGUgdG9rZW5zLiBJZiBpdCBkb2VzIG5vdCBtYXRjaCwgaXQKK2NvbnN1 bWVzIG5vIHRva2Vucy4iCisgIChsZXQgKChleHRlcm4tbmFtZSAod2hlbiAoanMyLW1hdGNoLXBy b3AtbmFtZSkgKGpzMi1jdXJyZW50LXRva2VuLXN0cmluZykpKQorICAgICAgICAoYmVnIChqczIt Y3VycmVudC10b2tlbi1iZWcpKQorICAgICAgICAoZXh0ZXJuLW5hbWUtbGVuIChqczItY3VycmVu dC10b2tlbi1sZW4pKQorICAgICAgICAoaXMtcmVzZXJ2ZWQtbmFtZSAob3IgKD0gKGpzMi1jdXJy ZW50LXRva2VuLXR5cGUpIGpzMi1SRVNFUlZFRCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIChhcmVmIGpzMi1rd2QtdG9rZW5zIChqczItY3VycmVudC10b2tlbi10eXBlKSkpKSkKKyAg ICAoaWYgZXh0ZXJuLW5hbWUKKyAgICAgICAgKGxldCAoKGFzIChhbmQgKGpzMi1tYXRjaC10b2tl biBqczItTkFNRSkgKGpzMi1jdXJyZW50LXRva2VuLXN0cmluZykpKSkKKyAgICAgICAgICAoaWYg KGFuZCBhcyAoZXF1YWwgImFzIiAoanMyLWN1cnJlbnQtdG9rZW4tc3RyaW5nKSkpCisgICAgICAg ICAgICAgIChsZXQgKChuYW1lCisgICAgICAgICAgICAgICAgICAgICAob3IKKyAgICAgICAgICAg ICAgICAgICAgICAoYW5kIChqczItbWF0Y2gtdG9rZW4ganMyLURFRkFVTFQpICJkZWZhdWx0IikK KyAgICAgICAgICAgICAgICAgICAgICAoYW5kIChqczItbWF0Y2gtdG9rZW4ganMyLU5BTUUpIChq czItY3VycmVudC10b2tlbi1zdHJpbmcpKSkpKQorICAgICAgICAgICAgICAgIChpZiBuYW1lCisg ICAgICAgICAgICAgICAgICAgIChsZXQgKChub2RlIChtYWtlLWpzMi1leHBvcnQtYmluZGluZy1u b2RlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6cG9zIGJlZworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgOmxlbiAoLSAoanMyLWN1cnJlbnQtdG9rZW4tZW5kKSBi ZWcpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6bG9jYWwtbmFtZSAobWFrZS1q czItbmFtZS1ub2RlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgOm5hbWUgbmFtZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIDpwb3MgKGpzMi1jdXJyZW50LXRva2VuLWJlZykKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICA6bGVuIChqczItY3VycmVudC10b2tlbi1sZW4pKQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmV4dGVybi1uYW1lIChtYWtlLWpzMi1uYW1l LW5vZGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOm5h bWUgZXh0ZXJuLW5hbWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOnBvcyBiZWcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOmxlbiBleHRlcm4tbmFtZS1sZW4pKSkpCisgICAgICAgICAgICAgICAgICAgICAgKGpz Mi1ub2RlLWFkZC1jaGlsZHJlbgorICAgICAgICAgICAgICAgICAgICAgICBub2RlCisgICAgICAg ICAgICAgICAgICAgICAgIChqczItZXhwb3J0LWJpbmRpbmctbm9kZS1sb2NhbC1uYW1lIG5vZGUp CisgICAgICAgICAgICAgICAgICAgICAgIChqczItZXhwb3J0LWJpbmRpbmctbm9kZS1leHRlcm4t bmFtZSBub2RlKSkKKyAgICAgICAgICAgICAgICAgICAgICBub2RlKQorICAgICAgICAgICAgICAg ICAgKGpzMi11bmdldC10b2tlbikKKyAgICAgICAgICAgICAgICAgIG5pbCkpCisgICAgICAgICAg ICAod2hlbiBhcyAoanMyLXVuZ2V0LXRva2VuKSkKKyAgICAgICAgICAgIChsZXQqICgobmFtZS1u b2RlIChtYWtlLWpzMi1uYW1lLW5vZGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpu YW1lIChqczItY3VycmVudC10b2tlbi1zdHJpbmcpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA6cG9zIChqczItY3VycmVudC10b2tlbi1iZWcpCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6bGVuIChqczItY3VycmVudC10b2tlbi1sZW4pKSkKKyAgICAgICAgICAgICAgICAg IChub2RlIChtYWtlLWpzMi1leHBvcnQtYmluZGluZy1ub2RlCisgICAgICAgICAgICAgICAgICAg ICAgICAgOnBvcyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKQorICAgICAgICAgICAgICAgICAgICAg ICAgIDpsZW4gKGpzMi1jdXJyZW50LXRva2VuLWxlbikKKyAgICAgICAgICAgICAgICAgICAgICAg ICA6bG9jYWwtbmFtZSBuYW1lLW5vZGUKKyAgICAgICAgICAgICAgICAgICAgICAgICA6ZXh0ZXJu LW5hbWUgbmFtZS1ub2RlKSkpCisgICAgICAgICAgICAgICh3aGVuIGlzLXJlc2VydmVkLW5hbWUK KyAgICAgICAgICAgICAgICAoanMyLXJlcG9ydC1lcnJvciAibXNnLm1vZC5hcy5hZnRlci5yZXNl cnZlZC53b3JkIiBleHRlcm4tbmFtZSkpCisgICAgICAgICAgICAgIChqczItbm9kZS1hZGQtY2hp bGRyZW4gbm9kZSBuYW1lLW5vZGUpCisgICAgICAgICAgICAgIG5vZGUpKSkKKyAgICAgIG5pbCkp KQorCisoZGVmdW4ganMyLXBhcnNlLXN3aXRjaCAoKQorICAiUGFyc2VyIGZvciBzd2l0Y2gtc3Rh dGVtZW50LiAgTGFzdCBtYXRjaGVkIHRva2VuIG11c3QgYmUganMyLVNXSVRDSC4iCisgIChsZXQg KChwb3MgKGpzMi1jdXJyZW50LXRva2VuLWJlZykpCisgICAgICAgIHR0IHBuIGRpc2NyaW1pbmFu dCBoYXMtZGVmYXVsdCBjYXNlLWV4cHIgY2FzZS1ub2RlCisgICAgICAgIGNhc2UtcG9zIGNhc2Vz IHN0bXQgbHApCisgICAgKGlmIChqczItbXVzdC1tYXRjaCBqczItTFAgIm1zZy5uby5wYXJlbi5z d2l0Y2giKQorICAgICAgICAoc2V0cSBscCAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKSkpCisgICAg KHNldHEgZGlzY3JpbWluYW50IChqczItcGFyc2UtZXhwcikKKyAgICAgICAgICBwbiAobWFrZS1q czItc3dpdGNoLW5vZGUgOmRpc2NyaW1pbmFudCBkaXNjcmltaW5hbnQKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgOnBvcyBwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgOmxwIChqczItcmVscG9zIGxwIHBvcykpKQorICAgIChqczItbm9kZS1hZGQtY2hp bGRyZW4gcG4gZGlzY3JpbWluYW50KQorICAgIChqczItZW50ZXItc3dpdGNoIHBuKQorICAgICh1 bndpbmQtcHJvdGVjdAorICAgICAgICAocHJvZ24KKyAgICAgICAgICAoaWYgKGpzMi1tdXN0LW1h dGNoIGpzMi1SUCAibXNnLm5vLnBhcmVuLmFmdGVyLnN3aXRjaCIpCisgICAgICAgICAgICAgIChz ZXRmIChqczItc3dpdGNoLW5vZGUtcnAgcG4pICgtIChqczItY3VycmVudC10b2tlbi1iZWcpIHBv cykpKQorICAgICAgICAgIChqczItbXVzdC1tYXRjaCBqczItTEMgIm1zZy5uby5icmFjZS5zd2l0 Y2giKQorICAgICAgICAgIChjYXRjaCAnYnJlYWsKKyAgICAgICAgICAgICh3aGlsZSB0CisgICAg ICAgICAgICAgIChzZXRxIHR0IChqczItbmV4dC10b2tlbikKKyAgICAgICAgICAgICAgICAgICAg Y2FzZS1wb3MgKGpzMi1jdXJyZW50LXRva2VuLWJlZykpCisgICAgICAgICAgICAgIChjb25kCisg ICAgICAgICAgICAgICAoKD0gdHQganMyLVJDKQorICAgICAgICAgICAgICAgIChzZXRmIChqczIt bm9kZS1sZW4gcG4pICgtIChqczItY3VycmVudC10b2tlbi1lbmQpIHBvcykpCisgICAgICAgICAg ICAgICAgKHRocm93ICdicmVhayBuaWwpKSAgOyBkb25lCisgICAgICAgICAgICAgICAoKD0gdHQg anMyLUNBU0UpCisgICAgICAgICAgICAgICAgKHNldHEgY2FzZS1leHByIChqczItcGFyc2UtZXhw cikpCisgICAgICAgICAgICAgICAgKGpzMi1tdXN0LW1hdGNoIGpzMi1DT0xPTiAibXNnLm5vLmNv bG9uLmNhc2UiKSkKKyAgICAgICAgICAgICAgICgoPSB0dCBqczItREVGQVVMVCkKKyAgICAgICAg ICAgICAgICAoaWYgaGFzLWRlZmF1bHQKKyAgICAgICAgICAgICAgICAgICAgKGpzMi1yZXBvcnQt ZXJyb3IgIm1zZy5kb3VibGUuc3dpdGNoLmRlZmF1bHQiKSkKKyAgICAgICAgICAgICAgICAoc2V0 cSBoYXMtZGVmYXVsdCB0CisgICAgICAgICAgICAgICAgICAgICAgY2FzZS1leHByIG5pbCkKKyAg ICAgICAgICAgICAgICAoanMyLW11c3QtbWF0Y2gganMyLUNPTE9OICJtc2cubm8uY29sb24uY2Fz ZSIpKQorICAgICAgICAgICAgICAgKHQKKyAgICAgICAgICAgICAgICAoanMyLXJlcG9ydC1lcnJv ciAibXNnLmJhZC5zd2l0Y2giKQorICAgICAgICAgICAgICAgICh0aHJvdyAnYnJlYWsgbmlsKSkp CisgICAgICAgICAgICAgIChzZXRxIGNhc2Utbm9kZSAobWFrZS1qczItY2FzZS1ub2RlIDpwb3Mg Y2FzZS1wb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgOmxlbiAoLSAoanMyLWN1cnJlbnQtdG9rZW4tZW5kKSBjYXNlLXBvcykKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmV4cHIgY2FzZS1leHByKSkK KyAgICAgICAgICAgICAgKGpzMi1ub2RlLWFkZC1jaGlsZHJlbiBjYXNlLW5vZGUgY2FzZS1leHBy KQorICAgICAgICAgICAgICAod2hpbGUgKGFuZCAoLz0gKHNldHEgdHQgKGpzMi1wZWVrLXRva2Vu KSkganMyLVJDKQorICAgICAgICAgICAgICAgICAgICAgICAgICAoLz0gdHQganMyLUNBU0UpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICgvPSB0dCBqczItREVGQVVMVCkKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgKC89IHR0IGpzMi1FT0YpKQorICAgICAgICAgICAgICAgIChzZXRmIHN0 bXQgKGpzMi1wYXJzZS1zdGF0ZW1lbnQpCisgICAgICAgICAgICAgICAgICAgICAgKGpzMi1ub2Rl LWxlbiBjYXNlLW5vZGUpICgtIChqczItbm9kZS1lbmQgc3RtdCkgY2FzZS1wb3MpKQorICAgICAg ICAgICAgICAgIChqczItYmxvY2stbm9kZS1wdXNoIGNhc2Utbm9kZSBzdG10KSkKKyAgICAgICAg ICAgICAgKHB1c2ggY2FzZS1ub2RlIGNhc2VzKSkpCisgICAgICAgICAgOzsgYWRkIGNhc2VzIGxh c3QsIGFzIHB1c2hpbmcgcmV2ZXJzZXMgdGhlIG9yZGVyIHRvIGJlIGNvcnJlY3QKKyAgICAgICAg ICAoZG9saXN0IChraWQgY2FzZXMpCisgICAgICAgICAgICAoanMyLW5vZGUtYWRkLWNoaWxkcmVu IHBuIGtpZCkKKyAgICAgICAgICAgIChwdXNoIGtpZCAoanMyLXN3aXRjaC1ub2RlLWNhc2VzIHBu KSkpCisgICAgICAgICAgcG4pICA7IHJldHVybiB2YWx1ZQorICAgICAgKGpzMi1leGl0LXN3aXRj aCkpKSkKKworKGRlZnVuIGpzMi1wYXJzZS13aGlsZSAoKQorICAiUGFyc2VyIGZvciB3aGlsZS1z dGF0ZW1lbnQuICBMYXN0IG1hdGNoZWQgdG9rZW4gbXVzdCBiZSBqczItV0hJTEUuIgorICAobGV0 ICgocG9zIChqczItY3VycmVudC10b2tlbi1iZWcpKQorICAgICAgICAocG4gKG1ha2UtanMyLXdo aWxlLW5vZGUpKQorICAgICAgICBjb25kIGJvZHkpCisgICAgKGpzMi1lbnRlci1sb29wIHBuKQor ICAgICh1bndpbmQtcHJvdGVjdAorICAgICAgICAocHJvZ24KKyAgICAgICAgICAoc2V0ZiBjb25k IChqczItcGFyc2UtY29uZGl0aW9uKQorICAgICAgICAgICAgICAgIChqczItd2hpbGUtbm9kZS1j b25kaXRpb24gcG4pIChjYXIgY29uZCkKKyAgICAgICAgICAgICAgICBib2R5IChqczItcGFyc2Ut c3RhdGVtZW50KQorICAgICAgICAgICAgICAgIChqczItd2hpbGUtbm9kZS1ib2R5IHBuKSBib2R5 CisgICAgICAgICAgICAgICAgKGpzMi1ub2RlLWxlbiBwbikgKC0gKGpzMi1ub2RlLWVuZCBib2R5 KSBwb3MpCisgICAgICAgICAgICAgICAgKGpzMi13aGlsZS1ub2RlLWxwIHBuKSAoanMyLXJlbHBv cyAoY2wtc2Vjb25kIGNvbmQpIHBvcykKKyAgICAgICAgICAgICAgICAoanMyLXdoaWxlLW5vZGUt cnAgcG4pIChqczItcmVscG9zIChjbC10aGlyZCBjb25kKSBwb3MpKQorICAgICAgICAgIChqczIt bm9kZS1hZGQtY2hpbGRyZW4gcG4gYm9keSAoY2FyIGNvbmQpKSkKKyAgICAgIChqczItZXhpdC1s b29wKSkKKyAgICBwbikpCisKKyhkZWZ1biBqczItcGFyc2UtZG8gKCkKKyAgIlBhcnNlciBmb3Ig ZG8tc3RhdGVtZW50LiAgTGFzdCBtYXRjaGVkIHRva2VuIG11c3QgYmUganMyLURPLiIKKyAgKGxl dCAoKHBvcyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKSkKKyAgICAgICAgKHBuIChtYWtlLWpzMi1k by1ub2RlKSkKKyAgICAgICAgY29uZCBib2R5IGVuZCkKKyAgICAoanMyLWVudGVyLWxvb3AgcG4p CisgICAgKHVud2luZC1wcm90ZWN0CisgICAgICAgIChwcm9nbgorICAgICAgICAgIChzZXRxIGJv ZHkgKGpzMi1wYXJzZS1zdGF0ZW1lbnQpKQorICAgICAgICAgIChqczItbXVzdC1tYXRjaCBqczIt V0hJTEUgIm1zZy5uby53aGlsZS5kbyIpCisgICAgICAgICAgKHNldGYgKGpzMi1kby1ub2RlLXdo aWxlLXBvcyBwbikgKC0gKGpzMi1jdXJyZW50LXRva2VuLWJlZykgcG9zKQorICAgICAgICAgICAg ICAgIGNvbmQgKGpzMi1wYXJzZS1jb25kaXRpb24pCisgICAgICAgICAgICAgICAgKGpzMi1kby1u b2RlLWNvbmRpdGlvbiBwbikgKGNhciBjb25kKQorICAgICAgICAgICAgICAgIChqczItZG8tbm9k ZS1ib2R5IHBuKSBib2R5CisgICAgICAgICAgICAgICAgZW5kIGpzMi10cy1jdXJzb3IKKyAgICAg ICAgICAgICAgICAoanMyLWRvLW5vZGUtbHAgcG4pIChqczItcmVscG9zIChjbC1zZWNvbmQgY29u ZCkgcG9zKQorICAgICAgICAgICAgICAgIChqczItZG8tbm9kZS1ycCBwbikgKGpzMi1yZWxwb3Mg KGNsLXRoaXJkIGNvbmQpIHBvcykpCisgICAgICAgICAgKGpzMi1ub2RlLWFkZC1jaGlsZHJlbiBw biAoY2FyIGNvbmQpIGJvZHkpKQorICAgICAgKGpzMi1leGl0LWxvb3ApKQorICAgIDs7IEFsd2F5 cyBhdXRvLWluc2VydCBzZW1pY29sb24gdG8gZm9sbG93IFNwaWRlck1vbmtleToKKyAgICA7OyBJ dCBpcyByZXF1aXJlZCBieSBFQ01BU2NyaXB0IGJ1dCBpcyBpZ25vcmVkIGJ5IHRoZSBy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XVzZSAoanMyLXBhcnNlLWZyb20tY2xhdXNlKSkKKyAgICAg ICh3aGVuIGZyb20tY2xhdXNlCisgICAgICAgIChwdXNoIGZyb20tY2xhdXNlIGNoaWxkcmVuKSkp CisgICAgICgoanMyLW1hdGNoLXRva2VuIGpzMi1MQykKKyAgICAgIChzZXRxIGV4cG9ydHMtbGlz dCAoanMyLXBhcnNlLWV4cG9ydC1iaW5kaW5ncykpCisgICAgICAod2hlbiBleHBvcnRzLWxpc3QK KyAgICAgICAgKGRvbGlzdCAoZXhwb3J0IGV4cG9ydHMtbGlzdCkKKyAgICAgICAgICAocHVzaCBl eHBvcnQgY2hpbGRyZW4pKSkKKyAgICAgICh3aGVuIChqczItbWF0Y2gtdG9rZW4ganMyLU5BTUUp CisgICAgICAgIChpZiAoZXF1YWwgImZyb20iIChqczItY3VycmVudC10b2tlbi1zdHJpbmcpKQor ICAgICAgICAgICAgKHByb2duCisgICAgICAgICAgICAgIChqczItdW5nZXQtdG9rZW4pCisgICAg ICAgICAgICAgIChzZXRxIGZyb20tY2xhdXNlIChqczItcGFyc2UtZnJvbS1jbGF1c2UpKSkKKyAg ICAgICAgICAoanMyLXVuZ2V0LXRva2VuKSkpKQorICAgICAoKGpzMi1tYXRjaC10b2tlbiBqczIt REVGQVVMVCkKKyAgICAgIChzZXRxIGRlZmF1bHQgKGpzMi1wYXJzZS1leHByKSkpCisgICAgICgo b3IgKGpzMi1tYXRjaC10b2tlbiBqczItVkFSKSAoanMyLW1hdGNoLXRva2VuIGpzMi1DT05TVCkg KGpzMi1tYXRjaC10b2tlbiBqczItTEVUKSkKKyAgICAgIChzZXRxIGRlY2xhcmF0aW9uIChqczIt cGFyc2UtdmFyaWFibGVzIChqczItY3VycmVudC10b2tlbi10eXBlKSAoanMyLWN1cnJlbnQtdG9r ZW4tYmVnKSkpKQorICAgICAodAorICAgICAgKHNldHEgZGVjbGFyYXRpb24gKGpzMi1wYXJzZS1l eHByKSkpKQorICAgICh3aGVuIGZyb20tY2xhdXNlCisgICAgICAocHVzaCBmcm9tLWNsYXVzZSBj aGlsZHJlbikpCisgICAgKHdoZW4gZGVjbGFyYXRpb24KKyAgICAgIChwdXNoIGRlY2xhcmF0aW9u IGNoaWxkcmVuKSkKKyAgICAod2hlbiBkZWZhdWx0CisgICAgICAocHVzaCBkZWZhdWx0IGNoaWxk cmVuKSkKKyAgICAobGV0ICgobm9kZSAobWFrZS1qczItZXhwb3J0LW5vZGUKKyAgICAgICAgICAg ICAgICAgIDpwb3MgYmVnCisgICAgICAgICAgICAgICAgICA6bGVuICgtIChqczItY3VycmVudC10 b2tlbi1lbmQpIGJlZykKKyAgICAgICAgICAgICAgICAgIDpleHBvcnRzLWxpc3QgZXhwb3J0cy1s aXN0CisgICAgICAgICAgICAgICAgICA6ZnJvbS1jbGF1c2UgZnJvbS1jbGF1c2UKKyAgICAgICAg ICAgICAgICAgIDpkZWNsYXJhdGlvbiBkZWNsYXJhdGlvbgorICAgICAgICAgICAgICAgICAgOmRl ZmF1bHQgZGVmYXVsdCkpKQorICAgICAgKGFwcGx5ICMnanMyLW5vZGUtYWRkLWNoaWxkcmVuIG5v ZGUgY2hpbGRyZW4pCisgICAgICBub2RlKSkpCisKKyhkZWZ1biBqczItcGFyc2UtZm9yICgpCisg ICJQYXJzZSBhIGZvciwgZm9yLWluIG9yIGZvciBlYWNoLWluIHN0YXRlbWVudC4KK0xhc3QgbWF0 Y2hlZCB0b2tlbiBtdXN0IGJlIGpzMi1GT1IuIgorICAobGV0ICgoZm9yLXBvcyAoanMyLWN1cnJl bnQtdG9rZW4tYmVnKSkKKyAgICAgICAgcG4gaXMtZm9yLWVhY2ggaXMtZm9yLWluLW9yLW9mIGlz LWZvci1vZgorICAgICAgICBpbi1wb3MgZWFjaC1wb3MgdG1wLXBvcworICAgICAgICBpbml0ICA7 IE5vZGUgaW5pdCBpcyBhbHNvIGZvbyBpbiAnZm9vIGluIG9iamVjdCcuCisgICAgICAgIGNvbmQg IDsgTm9kZSBjb25kIGlzIGFsc28gb2JqZWN0IGluICdmb28gaW4gb2JqZWN0Jy4KKyAgICAgICAg aW5jciAgOyAzcmQgc2VjdGlvbiBvZiBmb3ItbG9vcCBpbml0aWFsaXplci4KKyAgICAgICAgYm9k eSB0dCBscCBycCkKKyAgICA7OyBTZWUgaWYgdGhpcyBpcyBhIGZvciBlYWNoICgpIGluc3RlYWQg b2YganVzdCBhIGZvciAoKQorICAgICh3aGVuIChqczItbWF0Y2gtdG9rZW4ganMyLU5BTUUpCisg ICAgICAoaWYgKHN0cmluZz0gImVhY2giIChqczItY3VycmVudC10b2tlbi1zdHJpbmcpKQorICAg ICAgICAgIChwcm9nbgorICAgICAgICAgICAgKHNldHEgaXMtZm9yLWVhY2ggdAorICAgICAgICAg ICAgICAgICAgZWFjaC1wb3MgKC0gKGpzMi1jdXJyZW50LXRva2VuLWJlZykgZm9yLXBvcykpIDsg cmVsYXRpdmUKKyAgICAgICAgICAgIChqczItcmVjb3JkLWZhY2UgJ2ZvbnQtbG9jay1rZXl3b3Jk LWZhY2UpKQorICAgICAgICAoanMyLXJlcG9ydC1lcnJvciAibXNnLm5vLnBhcmVuLmZvciIpKSkK KyAgICAoaWYgKGpzMi1tdXN0LW1hdGNoIGpzMi1MUCAibXNnLm5vLnBhcmVuLmZvciIpCisgICAg ICAgIChzZXRxIGxwICgtIChqczItY3VycmVudC10b2tlbi1iZWcpIGZvci1wb3MpKSkKKyAgICAo c2V0cSB0dCAoanMyLWdldC10b2tlbikpCisgICAgOzsgJ2ZvcicgbWFrZXMgbG9jYWwgc2NvcGUK KyAgICAoanMyLXB1c2gtc2NvcGUgKG1ha2UtanMyLXNjb3BlKSkKKyAgICAodW53aW5kLXByb3Rl Y3QKKyAgICAgICAgOzsgcGFyc2UgaW5pdCBjbGF1c2UKKyAgICAgICAgKGxldCAoKGpzMi1pbi1m b3ItaW5pdCB0KSkgIDsgc2V0IGFzIGR5bmFtaWMgdmFyaWFibGUKKyAgICAgICAgICAoY29uZAor ICAgICAgICAgICAoKD0gdHQganMyLVNFTUkpCisgICAgICAgICAgICAoanMyLXVuZ2V0LXRva2Vu KQorICAgICAgICAgICAgKHNldHEgaW5pdCAobWFrZS1qczItZW1wdHktZXhwci1ub2RlKSkpCisg ICAgICAgICAgICgob3IgKD0gdHQganMyLVZBUikgKD0gdHQganMyLUxFVCkpCisgICAgICAgICAg ICAoc2V0cSBpbml0IChqczItcGFyc2UtdmFyaWFibGVzIHR0IChqczItY3VycmVudC10b2tlbi1i ZWcpKSkpCisgICAgICAgICAgICh0CisgICAgICAgICAgICAoanMyLXVuZ2V0LXRva2VuKQorICAg ICAgICAgICAgKHNldHEgaW5pdCAoanMyLXBhcnNlLWV4cHIpKSkpKQorICAgICAgKGlmIChvciAo anMyLW1hdGNoLXRva2VuIGpzMi1JTikKKyAgICAgICAgICAgICAgKGFuZCAoPj0ganMyLWxhbmd1 YWdlLXZlcnNpb24gMjAwKQorICAgICAgICAgICAgICAgICAgIChqczItbWF0Y2gtY29udGV4dHVh bC1rd2QgIm9mIikKKyAgICAgICAgICAgICAgICAgICAoc2V0cSBpcy1mb3Itb2YgdCkpKQorICAg ICAgICAgIChzZXRxIGlzLWZvci1pbi1vci1vZiB0CisgICAgICAgICAgICAgICAgaW4tcG9zICgt IChqczItY3VycmVudC10b2tlbi1iZWcpIGZvci1wb3MpCisgICAgICAgICAgICAgICAgOzsgc2Nv cGUgb2YgaXRlcmF0aW9uIHRhcmdldCBvYmplY3QgaXMgbm90IHRoZSBzY29wZSB3ZSd2ZSBjcmVh dGVkIGFib3ZlLgorICAgICAgICAgICAgICAgIDs7IHN0YXNoIGN1cnJlbnQgc2NvcGUgdGVtcG9y YXJ5LgorICAgICAgICAgICAgICAgIGNvbmQgKGxldCAoKGpzMi1jdXJyZW50LXNjb3BlIChqczIt c2NvcGUtcGFyZW50LXNjb3BlIGpzMi1jdXJyZW50LXNjb3BlKSkpCisgICAgICAgICAgICAgICAg ICAgICAgIChqczItcGFyc2UtZXhwcikpKSAgOyBvYmplY3Qgb3ZlciB3aGljaCB3ZSdyZSBpdGVy YXRpbmcKKyAgICAgICAgOzsgZWxzZSBvcmRpbmFyeSBmb3IgbG9vcCAtIHBhcnNlIGNvbmQgYW5k IGluY3IKKyAgICAgICAgKGpzMi1tdXN0LW1hdGNoIGpzMi1TRU1JICJtc2cubm8uc2VtaS5mb3Ii KQorICAgICAgICAoc2V0cSBjb25kIChpZiAoPSAoanMyLXBlZWstdG9rZW4pIGpzMi1TRU1JKQor ICAgICAgICAgICAgICAgICAgICAgICAobWFrZS1qczItZW1wdHktZXhwci1ub2RlKSA7IG5vIGxv b3AgY29uZGl0aW9uCisgICAgICAgICAgICAgICAgICAgICAoanMyLXBhcnNlLWV4cHIpKSkKKyAg ICAgICAgKGpzMi1tdXN0LW1hdGNoIGpzMi1TRU1JICJtc2cubm8uc2VtaS5mb3IuY29uZCIpCisg ICAgICAgIChzZXRxIHRtcC1wb3MgKGpzMi1jdXJyZW50LXRva2VuLWVuZCkKKyAgICAgICAgICAg ICAgaW5jciAoaWYgKD0gKGpzMi1wZWVrLXRva2VuKSBqczItUlApCisgICAgICAgICAgICAgICAg ICAgICAgIChtYWtlLWpzMi1lbXB0eS1leHByLW5vZGUgOnBvcyB0bXAtcG9zKQorICAgICAgICAg ICAgICAgICAgICAgKGpzMi1wYXJzZS1leHByKSkpKQorICAgICAgKGlmIChqczItbXVzdC1tYXRj aCBqczItUlAgIm1zZy5uby5wYXJlbi5mb3IuY3RybCIpCisgICAgICAgICAgKHNldHEgcnAgKC0g KGpzMi1jdXJyZW50LXRva2VuLWJlZykgZm9yLXBvcykpKQorICAgICAgKGlmIChub3QgaXMtZm9y LWluLW9yLW9mKQorICAgICAgICAgIChzZXRxIHBuIChtYWtlLWpzMi1mb3Itbm9kZSA6aW5pdCBp bml0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpjb25kaXRpb24gY29u ZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6dXBkYXRlIGluY3IKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmxwIGxwCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIDpycCBycCkpCisgICAgICAgIDs7IGNvbmQgY291bGQg YmUgbnVsbCBpZiAnaW4gb2JqJyBnb3QgZWF0ZW4gYnkgdGhlIGluaXQgbm9kZS4KKyAgICAgICAg KGlmIChqczItaW5maXgtbm9kZS1wIGluaXQpCisgICAgICAgICAgICA7OyBpdCB3YXMgKGZvbyBp biBiYXIpIGluc3RlYWQgb2YgKHZhciBmb28gaW4gYmFyKQorICAgICAgICAgICAgKHNldHEgY29u ZCAoanMyLWluZml4LW5vZGUtcmlnaHQgaW5pdCkKKyAgICAgICAgICAgICAgICAgIGluaXQgKGpz Mi1pbmZpeC1ub2RlLWxlZnQgaW5pdCkpCisgICAgICAgICAgKGlmIChhbmQgKGpzMi12YXItZGVj bC1ub2RlLXAgaW5pdCkKKyAgICAgICAgICAgICAgICAgICAoPiAobGVuZ3RoIChqczItdmFyLWRl Y2wtbm9kZS1raWRzIGluaXQpKSAxKSkKKyAgICAgICAgICAgICAgKGpzMi1yZXBvcnQtZXJyb3Ig Im1zZy5tdWx0LmluZGV4IikpKQorICAgICAgICAoc2V0cSBwbiAobWFrZS1qczItZm9yLWluLW5v ZGUgOml0ZXJhdG9yIGluaXQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDpvYmplY3QgY29uZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmlu LXBvcyBpbi1wb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpmb3Jl YWNoLXAgaXMtZm9yLWVhY2gKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDplYWNoLXBvcyBlYWNoLXBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgOmZvcm9mLXAgaXMtZm9yLW9mCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICA6bHAgbHAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpycCBy cCkpKQorICAgICAgKHVud2luZC1wcm90ZWN0CisgICAgICAgICAgKHByb2duCisgICAgICAgICAg ICAoanMyLWVudGVyLWxvb3AgcG4pCisgICAgICAgICAgICA7OyBXZSBoYXZlIHRvIHBhcnNlIHRo ZSBib2R5IC1hZnRlci0gY3JlYXRpbmcgdGhlIGxvb3Agbm9kZSwKKyAgICAgICAgICAgIDs7IHNv IHRoYXQgdGhlIGxvb3Agbm9kZSBhcHBlYXJzIGluIHRoZSBqczItbG9vcC1zZXQsIGFsbG93aW5n CisgICAgICAgICAgICA7OyBicmVhay9jb250aW51ZSBzdGF0ZW1lbnRzIHRvIGZpbmQgdGhlIGVu Y2xvc2luZyBsb29wLgorICAgICAgICAgICAgKHNldGYgYm9keSAoanMyLXBhcnNlLXN0YXRlbWVu dCkKKyAgICAgICAgICAgICAgICAgIChqczItbG9vcC1ub2RlLWJvZHkgcG4pIGJvZHkKKyAgICAg ICAgICAgICAgICAgIChqczItbm9kZS1wb3MgcG4pIGZvci1wb3MKKyAgICAgICAgICAgICAgICAg IChqczItbm9kZS1sZW4gcG4pICgtIChqczItbm9kZS1lbmQgYm9keSkgZm9yLXBvcykpCisgICAg ICAgICAgICAoanMyLW5vZGUtYWRkLWNoaWxkcmVuIHBuIGluaXQgY29uZCBpbmNyIGJvZHkpKQor ICAgICAgICA7OyBmaW5hbGx5CisgICAgICAgIChqczItZXhpdC1sb29wKSkKKyAgICAgIChqczIt cG9wLXNjb3BlKSkKKyAgICBwbikpCisKKyhkZWZ1biBqczItcGFyc2UtdHJ5ICgpCisgICJQYXJz ZSBhIHRyeSBzdGF0ZW1lbnQuICBMYXN0IG1hdGNoZWQgdG9rZW4gbXVzdCBiZSBqczItVFJZLiIK KyAgKGxldCAoKHRyeS1wb3MgKGpzMi1jdXJyZW50LXRva2VuLWJlZykpCisgICAgICAgIHRyeS1l bmQKKyAgICAgICAgdHJ5LWJsb2NrCisgICAgICAgIGNhdGNoLWJsb2NrcworICAgICAgICBmaW5h bGx5LWJsb2NrCisgICAgICAgIHNhdy1kZWZhdWx0LWNhdGNoCisgICAgICAgIHBlZWspCisgICAg KGlmICgvPSAoanMyLXBlZWstdG9rZW4pIGpzMi1MQykKKyAgICAgICAgKGpzMi1yZXBvcnQtZXJy b3IgIm1zZy5uby5icmFjZS50cnkiKSkKKyAgICAoc2V0cSB0cnktYmxvY2sgKGpzMi1wYXJzZS1z dGF0ZW1lbnQpCisgICAgICAgICAgdHJ5LWVuZCAoanMyLW5vZGUtZW5kIHRyeS1ibG9jaykKKyAg ICAgICAgICBwZWVrIChqczItcGVlay10b2tlbikpCisgICAgKGNvbmQKKyAgICAgKCg9IHBlZWsg anMyLUNBVENIKQorICAgICAgKHdoaWxlIChqczItbWF0Y2gtdG9rZW4ganMyLUNBVENIKQorICAg ICAgICAobGV0KiAoKGNhdGNoLXBvcyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKSkKKyAgICAgICAg ICAgICAgIChjYXRjaC1ub2RlIChtYWtlLWpzMi1jYXRjaC1ub2RlIDpwb3MgY2F0Y2gtcG9zKSkK KyAgICAgICAgICAgICAgIHBhcmFtCisgICAgICAgICAgICAgICBndWFyZC1rd2QKKyAgICAgICAg ICAgICAgIGNhdGNoLWNvbmQKKyAgICAgICAgICAgICAgIGxwIHJwKQorICAgICAgICAgIChpZiBz YXctZGVmYXVsdC1jYXRjaAorICAgICAgICAgICAgICAoanMyLXJlcG9ydC1lcnJvciAibXNnLmNh dGNoLnVucmVhY2hhYmxlIikpCisgICAgICAgICAgKGlmIChqczItbXVzdC1tYXRjaCBqczItTFAg Im1zZy5uby5wYXJlbi5jYXRjaCIpCisgICAgICAgICAgICAgIChzZXRxIGxwICgtIChqczItY3Vy cmVudC10b2tlbi1iZWcpIGNhdGNoLXBvcykpKQorICAgICAgICAgIChqczItcHVzaC1zY29wZSBj YXRjaC1ub2RlKQorICAgICAgICAgIChsZXQgKCh0dCAoanMyLXBlZWstdG9rZW4pKSkKKyAgICAg ICAgICAgIChjb25kCisgICAgICAgICAgICAgOzsgRGVzdHJ1Y3R1cmluZyBwYXR0ZXJuOgorICAg ICAgICAgICAgIDs7ICAgICBjYXRjaCAoeyBtZXNzYWdlLCBmaWxlIH0pIHsgLi4uIH0KKyAgICAg ICAgICAgICAoKG9yICg9IHR0IGpzMi1MQikgKD0gdHQganMyLUxDKSkKKyAgICAgICAgICAgICAg KGpzMi1nZXQtdG9rZW4pCisgICAgICAgICAgICAgIChzZXRxIHBhcmFtIChqczItcGFyc2UtZGVz dHJ1Y3QtcHJpbWFyeS1leHByKSkKKyAgICAgICAgICAgICAgKGpzMi1kZWZpbmUtZGVzdHJ1Y3Qt c3ltYm9scyBwYXJhbSBqczItTEVUIG5pbCkpCisgICAgICAgICAgICAgOzsgU2ltcGxlIG5hbWUu CisgICAgICAgICAgICAgKHQKKyAgICAgICAgICAgICAgKGpzMi1tdXN0LW1hdGNoLW5hbWUgIm1z Zy5iYWQuY2F0Y2hjb25kIikKKyAgICAgICAgICAgICAgKHNldHEgcGFyYW0gKGpzMi1jcmVhdGUt bmFtZS1ub2RlKSkKKyAgICAgICAgICAgICAgKGpzMi1kZWZpbmUtc3ltYm9sIGpzMi1MRVQgKGpz Mi1jdXJyZW50LXRva2VuLXN0cmluZykgcGFyYW0pKSkpCisgICAgICAgICAgOzsgQ2F0Y2ggY29u ZGl0aW9uLgorICAgICAgICAgIChpZiAoanMyLW1hdGNoLXRva2VuIGpzMi1JRikKKyAgICAgICAg ICAgICAgKHNldHEgZ3VhcmQta3dkICgtIChqczItY3VycmVudC10b2tlbi1iZWcpIGNhdGNoLXBv cykKKyAgICAgICAgICAgICAgICAgICAgY2F0Y2gtY29uZCAoanMyLXBhcnNlLWV4cHIpKQorICAg ICAgICAgICAgKHNldHEgc2F3LWRlZmF1bHQtY2F0Y2ggdCkpCisgICAgICAgICAgKGlmIChqczIt bXVzdC1tYXRjaCBqczItUlAgIm1zZy5iYWQuY2F0Y2hjb25kIikKKyAgICAgICAgICAgICAgKHNl dHEgcnAgKC0gKGpzMi1jdXJyZW50LXRva2VuLWJlZykgY2F0Y2gtcG9zKSkpCisgICAgICAgICAg KGpzMi1tdXN0LW1hdGNoIGpzMi1MQyAibXNnLm5vLmJyYWNlLmNhdGNoYmxvY2siKQorICAgICAg ICAgIChqczItcGFyc2Utc3RhdGVtZW50cyBjYXRjaC1ub2RlKQorICAgICAgICAgIChpZiAoanMy LW11c3QtbWF0Y2gganMyLVJDICJtc2cubm8uYnJhY2UuYWZ0ZXIuYm9keSIpCisgICAgICAgICAg ICAgIChzZXRxIHRyeS1lbmQgKGpzMi1jdXJyZW50LXRva2VuLWVuZCkpKQorICAgICAgICAgIChq czItcG9wLXNjb3BlKQorICAgICAgICAgIChzZXRmIChqczItbm9kZS1sZW4gY2F0Y2gtbm9kZSkg KC0gdHJ5LWVuZCBjYXRjaC1wb3MpCisgICAgICAgICAgICAgICAgKGpzMi1jYXRjaC1ub2RlLXBh cmFtIGNhdGNoLW5vZGUpIHBhcmFtCisgICAgICAgICAgICAgICAgKGpzMi1jYXRjaC1ub2RlLWd1 YXJkLWV4cHIgY2F0Y2gtbm9kZSkgY2F0Y2gtY29uZAorICAgICAgICAgICAgICAgIChqczItY2F0 Y2gtbm9kZS1ndWFyZC1rd2QgY2F0Y2gtbm9kZSkgZ3VhcmQta3dkCisgICAgICAgICAgICAgICAg KGpzMi1jYXRjaC1ub2RlLWxwIGNhdGNoLW5vZGUpIGxwCisgICAgICAgICAgICAgICAgKGpzMi1j YXRjaC1ub2RlLXJwIGNhdGNoLW5vZGUpIHJwKQorICAgICAgICAgIChqczItbm9kZS1hZGQtY2hp bGRyZW4gY2F0Y2gtbm9kZSBwYXJhbSBjYXRjaC1jb25kKQorICAgICAgICAgIChwdXNoIGNhdGNo LW5vZGUgY2F0Y2gtYmxvY2tzKSkpKQorICAgICAoKC89IHBlZWsganMyLUZJTkFMTFkpCisgICAg ICAoanMyLW11c3QtbWF0Y2gganMyLUZJTkFMTFkgIm1zZy50cnkubm8uY2F0Y2hmaW5hbGx5Igor ICAgICAgICAgICAgICAgICAgICAgIChqczItbm9kZS1wb3MgdHJ5LWJsb2NrKQorICAgICAgICAg ICAgICAgICAgICAgICgtIChzZXRxIHRyeS1lbmQgKGpzMi1ub2RlLWVuZCB0cnktYmxvY2spKQor ICAgICAgICAgICAgICAgICAgICAgICAgIChqczItbm9kZS1wb3MgdHJ5LWJsb2NrKSkpKSkKKyAg ICAod2hlbiAoanMyLW1hdGNoLXRva2VuIGpzMi1GSU5BTExZKQorICAgICAgKGxldCAoKGZpbmFs bHktcG9zIChqczItY3VycmVudC10b2tlbi1iZWcpKQorICAgICAgICAgICAgKGJsb2NrIChqczIt cGFyc2Utc3RhdGVtZW50KSkpCisgICAgICAgIChzZXRxIHRyeS1lbmQgKGpzMi1ub2RlLWVuZCBi bG9jaykKKyAgICAgICAgICAgICAgZmluYWxseS1ibG9jayAobWFrZS1qczItZmluYWxseS1ub2Rl IDpwb3MgZmluYWxseS1wb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDpsZW4gKC0gdHJ5LWVuZCBmaW5hbGx5LXBvcykKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpib2R5IGJsb2NrKSkKKyAgICAg ICAgKGpzMi1ub2RlLWFkZC1jaGlsZHJlbiBmaW5hbGx5LWJsb2NrIGJsb2NrKSkpCisgICAgKGxl dCAoKHBuIChtYWtlLWpzMi10cnktbm9kZSA6cG9zIHRyeS1wb3MKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDpsZW4gKC0gdHJ5LWVuZCB0cnktcG9zKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgOnRyeS1ibG9jayB0cnktYmxvY2sKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDpmaW5hbGx5LWJsb2NrIGZpbmFsbHktYmxvY2spKSkKKyAgICAgIChq czItbm9kZS1hZGQtY2hpbGRyZW4gcG4gdHJ5LWJsb2NrIGZpbmFsbHktYmxvY2spCisgICAgICA7 OyBQdXNoIHRoZW0gb250byB0aGUgdHJ5LW5vZGUsIHdoaWNoIHJldmVyc2VzIGFuZCBjb3JyZWN0 cyB0aGVpciBvcmRlci4KKyAgICAgIChkb2xpc3QgKGNiIGNhdGNoLWJsb2NrcykKKyAgICAgICAg KGpzMi1ub2RlLWFkZC1jaGlsZHJlbiBwbiBjYikKKyAgICAgICAgKHB1c2ggY2IgKGpzMi10cnkt bm9kZS1jYXRjaC1jbGF1c2VzIHBuKSkpCisgICAgICBwbikpKQorCisoZGVmdW4ganMyLXBhcnNl LXRocm93ICgpCisgICJQYXJzZXIgZm9yIHRocm93LXN0YXRlbWVudC4gIExhc3QgbWF0Y2hlZCB0 b2tlbiBtdXN0IGJlIGpzMi1USFJPVy4iCisgIChsZXQgKChwb3MgKGpzMi1jdXJyZW50LXRva2Vu LWJlZykpCisgICAgICAgIGV4cHIgcG4pCisgICAgKGlmICg9IChqczItcGVlay10b2tlbi1vci1l b2wpIGpzMi1FT0wpCisgICAgICAgIDs7IEVDTUFTY3JpcHQgZG9lcyBub3QgYWxsb3cgbmV3IGxp bmVzIGJlZm9yZSB0aHJvdyBleHByZXNzaW9uLAorICAgICAgICA7OyBzZWUgYnVnIDI1NjYxNwor ICAgICAgICAoanMyLXJlcG9ydC1lcnJvciAibXNnLmJhZC50aHJvdy5lb2wiKSkKKyAgICAoc2V0 cSBleHByIChqczItcGFyc2UtZXhwcikKKyAgICAgICAgICBwbiAobWFrZS1qczItdGhyb3ctbm9k ZSA6cG9zIHBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpsZW4gKC0gKGpz Mi1ub2RlLWVuZCBleHByKSBwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg OmV4cHIgZXhwcikpCisgICAgKGpzMi1ub2RlLWFkZC1jaGlsZHJlbiBwbiBleHByKQorICAgIHBu KSkKKworKGRlZnVuIGpzMi1tYXRjaC1qdW1wLWxhYmVsLW5hbWUgKGxhYmVsLW5hbWUpCisgICJJ ZiBicmVhay9jb250aW51ZSBzcGVjaWZpZWQgYSBsYWJlbCwgcmV0dXJuIHRoYXQgbGFiZWwncyBs YWJlbGVkIHN0bXQuCitSZXR1cm5zIHRoZSBjb3JyZXNwb25kaW5nIGBqczItbGFiZWxlZC1zdG10 LW5vZGUnLCBvciBpZiBMQUJFTC1OQU1FCitkb2VzIG5vdCBtYXRjaCBhbiBleGlzdGluZyBsYWJl bCwgcmVwb3J0cyBhbiBlcnJvciBhbmQgcmV0dXJucyBuaWwuIgorICAobGV0ICgoYnVuZGxlIChj ZHIgKGFzc29jIGxhYmVsLW5hbWUganMyLWxhYmVsLXNldCkpKSkKKyAgICAoaWYgKG51bGwgYnVu ZGxlKQorICAgICAgICAoanMyLXJlcG9ydC1lcnJvciAibXNnLnVuZGVmLmxhYmVsIikpCisgICAg YnVuZGxlKSkKKworKGRlZnVuIGpzMi1wYXJzZS1icmVhayAoKQorICAiUGFyc2VyIGZvciBicmVh ay1zdGF0ZW1lbnQuICBMYXN0IG1hdGNoZWQgdG9rZW4gbXVzdCBiZSBqczItQlJFQUsuIgorICAo bGV0ICgocG9zIChqczItY3VycmVudC10b2tlbi1iZWcpKQorICAgICAgICAoZW5kIChqczItY3Vy cmVudC10b2tlbi1lbmQpKQorICAgICAgICBicmVhay10YXJnZXQgOyBzdGF0ZW1lbnQgdG8gYnJl YWsgZnJvbQorICAgICAgICBicmVhay1sYWJlbCAgOyBpbiAiYnJlYWsgZm9vIiwgbmFtZS1ub2Rl IHJlcHJlc2VudGluZyB0aGUgZm9vCisgICAgICAgIGxhYmVscyAgICAgICA7IG1hdGNoaW5nIGxh YmVsZWQgc3RhdGVtZW50IHRvIGJyZWFrIHRvCisgICAgICAgIHBuKQorICAgICh3aGVuIChlcSAo anMyLXBlZWstdG9rZW4tb3ItZW9sKSBqczItTkFNRSkKKyAgICAgIChqczItZ2V0LXRva2VuKQor ICAgICAgKHNldHEgYnJlYWstbGFiZWwgKGpzMi1jcmVhdGUtbmFtZS1ub2RlKQorICAgICAgICAg ICAgZW5kIChqczItbm9kZS1lbmQgYnJlYWstbGFiZWwpCisgICAgICAgICAgICA7OyBtYXRjaEp1 bXBMYWJlbE5hbWUgb25seSBtYXRjaGVzIGlmIHRoZXJlIGlzIG9uZQorICAgICAgICAgICAgbGFi ZWxzIChqczItbWF0Y2gtanVtcC1sYWJlbC1uYW1lIChqczItY3VycmVudC10b2tlbi1zdHJpbmcp KQorICAgICAgICAgICAgYnJlYWstdGFyZ2V0IChpZiBsYWJlbHMgKGNhciAoanMyLWxhYmVsZWQt c3RtdC1ub2RlLWxhYmVscyBsYWJlbHMpKSkpKQorICAgICh1bmxlc3MgKG9yIGJyZWFrLXRhcmdl dCBicmVhay1sYWJlbCkKKyAgICAgIDs7IG5vIGJyZWFrIHRhcmdldCBzcGVjaWZpZWQgLSB0cnkg Zm9yIGlubmVybW9zdCBlbmNsb3NpbmcgbG9vcC9zd2l0Y2gKKyAgICAgIChpZiAobnVsbCBqczIt bG9vcC1hbmQtc3dpdGNoLXNldCkKKyAgICAgICAgICAodW5sZXNzIGJyZWFrLWxhYmVsCisgICAg ICAgICAgICAoanMyLXJlcG9ydC1lcnJvciAibXNnLmJhZC5icmVhayIgbmlsIHBvcyAobGVuZ3Ro ICJicmVhayIpKSkKKyAgICAgICAgKHNldHEgYnJlYWstdGFyZ2V0IChjYXIganMyLWxvb3AtYW5k LXN3aXRjaC1zZXQpKSkpCisgICAgKHNldHEgcG4gKG1ha2UtanMyLWJyZWFrLW5vZGUgOnBvcyBw b3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6bGVuICgtIGVuZCBwb3MpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmxhYmVsIGJyZWFrLWxhYmVsCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOnRhcmdldCBicmVhay10YXJnZXQpKQorICAg IChqczItbm9kZS1hZGQtY2hpbGRyZW4gcG4gYnJlYWstbGFiZWwpICA7IGJ1dCBub3QgYnJlYWst dGFyZ2V0CisgICAgcG4pKQorCisoZGVmdW4ganMyLXBhcnNlLWNvbnRpbnVlICgpCisgICJQYXJz ZXIgZm9yIGNvbnRpbnVlLXN0YXRlbWVudC4gIExhc3QgbWF0Y2hlZCB0b2tlbiBtdXN0IGJlIGpz Mi1DT05USU5VRS4iCisgIChsZXQgKChwb3MgKGpzMi1jdXJyZW50LXRva2VuLWJlZykpCisgICAg ICAgIChlbmQgKGpzMi1jdXJyZW50LXRva2VuLWVuZCkpCisgICAgICAgIGxhYmVsICAgOyBvcHRp b25hbCB1c2VyLXNwZWNpZmllZCBsYWJlbCwgYSBganMyLW5hbWUtbm9kZScKKyAgICAgICAgbGFi ZWxzICA7IGN1cnJlbnQgbWF0Y2hpbmcgbGFiZWxlZCBzdG10LCBpZiBhbnkKKyAgICAgICAgdGFy Z2V0ICA7IHRoZSBganMyLWxvb3Atbm9kZScgdGFyZ2V0IG9mIHRoaXMgY29udGludWUgc3RtdAor ICAgICAgICBwbikKKyAgICAod2hlbiAoPSAoanMyLXBlZWstdG9rZW4tb3ItZW9sKSBqczItTkFN RSkKKyAgICAgIChqczItZ2V0LXRva2VuKQorICAgICAgKHNldHEgbGFiZWwgKGpzMi1jcmVhdGUt bmFtZS1ub2RlKQorICAgICAgICAgICAgZW5kIChqczItbm9kZS1lbmQgbGFiZWwpCisgICAgICAg ICAgICA7OyBtYXRjaEp1bXBMYWJlbE5hbWUgb25seSBtYXRjaGVzIGlmIHRoZXJlIGlzIG9uZQor ICAgICAgICAgICAgbGFiZWxzIChqczItbWF0Y2gtanVtcC1sYWJlbC1uYW1lIChqczItY3VycmVu dC10b2tlbi1zdHJpbmcpKSkpCisgICAgKGNvbmQKKyAgICAgKChudWxsIGxhYmVscykgIDsgbm8g Y3VycmVudCBsYWJlbCB0byBnbyB0bworICAgICAgKGlmIChudWxsIGpzMi1sb29wLXNldCkgIDsg bm8gbG9vcCB0byBjb250aW51ZSB0bworICAgICAgICAgIChqczItcmVwb3J0LWVycm9yICJtc2cu Y29udGludWUub3V0c2lkZSIgbmlsIHBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAgIChs ZW5ndGggImNvbnRpbnVlIikpCisgICAgICAgIChzZXRxIHRhcmdldCAoY2FyIGpzMi1sb29wLXNl dCkpKSkgIDsgaW5uZXJtb3N0IGVuY2xvc2luZyBsb29wCisgICAgICh0CisgICAgICAoaWYgKGpz Mi1sb29wLW5vZGUtcCAoanMyLWxhYmVsZWQtc3RtdC1ub2RlLXN0bXQgbGFiZWxzKSkKKyAgICAg ICAgICAoc2V0cSB0YXJnZXQgKGpzMi1sYWJlbGVkLXN0bXQtbm9kZS1zdG10IGxhYmVscykpCisg ICAgICAgIChqczItcmVwb3J0LWVycm9yICJtc2cuY29udGludWUubm9ubG9vcCIgbmlsIHBvcyAo LSBlbmQgcG9zKSkpKSkKKyAgICAoc2V0cSBwbiAobWFrZS1qczItY29udGludWUtbm9kZSA6cG9z IHBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpsZW4gKC0gZW5kIHBv cykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6bGFiZWwgbGFiZWwKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6dGFyZ2V0IHRhcmdldCkpCisgICAg KGpzMi1ub2RlLWFkZC1jaGlsZHJlbiBwbiBsYWJlbCkgIDsgYnV0IG5vdCB0YXJnZXQgLSBpdCdz IG5vdCBvdXIgY2hpbGQKKyAgICBwbikpCisKKyhkZWZ1biBqczItcGFyc2Utd2l0aCAoKQorICAi UGFyc2VyIGZvciB3aXRoLXN0YXRlbWVudC4gIExhc3QgbWF0Y2hlZCB0b2tlbiBtdXN0IGJlIGpz Mi1XSVRILiIKKyAgKGxldCAoKHBvcyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKSkKKyAgICAgICAg b2JqIGJvZHkgcG4gbHAgcnApCisgICAgKGlmIChqczItbXVzdC1tYXRjaCBqczItTFAgIm1zZy5u by5wYXJlbi53aXRoIikKKyAgICAgICAgKHNldHEgbHAgKGpzMi1jdXJyZW50LXRva2VuLWJlZykp KQorICAgIChzZXRxIG9iaiAoanMyLXBhcnNlLWV4cHIpKQorICAgIChpZiAoanMyLW11c3QtbWF0 Y2gganMyLVJQICJtc2cubm8ucGFyZW4uYWZ0ZXIud2l0aCIpCisgICAgICAgIChzZXRxIHJwIChq czItY3VycmVudC10b2tlbi1iZWcpKSkKKyAgICAobGV0ICgoanMyLW5lc3Rpbmctb2Ytd2l0aCAo MSsganMyLW5lc3Rpbmctb2Ytd2l0aCkpKQorICAgICAgICAoc2V0cSBib2R5IChqczItcGFyc2Ut c3RhdGVtZW50KSkpCisgICAgKHNldHEgcG4gKG1ha2UtanMyLXdpdGgtbm9kZSA6cG9zIHBvcwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmxlbiAoLSAoanMyLW5vZGUtZW5kIGJv ZHkpIHBvcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpvYmplY3Qgb2JqCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6Ym9keSBib2R5CisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA6bHAgKGpzMi1yZWxwb3MgbHAgcG9zKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgOnJwIChqczItcmVscG9zIHJwIHBvcykpKQorICAgIChqczIt bm9kZS1hZGQtY2hpbGRyZW4gcG4gb2JqIGJvZHkpCisgICAgcG4pKQorCisoZGVmdW4ganMyLXBh cnNlLWNvbnN0LXZhciAoKQorICAiUGFyc2VyIGZvciB2YXItIG9yIGNvbnN0LXN0YXRlbWVudC4K K0xhc3QgbWF0Y2hlZCB0b2tlbiBtdXN0IGJlIGpzMi1DT05TVCBvciBqczItVkFSLiIKKyAgKGxl dCAoKHR0IChqczItY3VycmVudC10b2tlbi10eXBlKSkKKyAgICAgICAgKHBvcyAoanMyLWN1cnJl bnQtdG9rZW4tYmVnKSkKKyAgICAgICAgZXhwciBwbikKKyAgICAoc2V0cSBleHByIChqczItcGFy c2UtdmFyaWFibGVzIHR0IChqczItY3VycmVudC10b2tlbi1iZWcpKQorICAgICAgICAgIHBuICht YWtlLWpzMi1leHByLXN0bXQtbm9kZSA6cG9zIHBvcworICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA6bGVuICgtIChqczItbm9kZS1lbmQgZXhwcikgcG9zKQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ZXhwciBleHByKSkKKyAgICAoanMyLW5vZGUt YWRkLWNoaWxkcmVuIHBuIGV4cHIpCisgICAgcG4pKQorCisoZGVmdW4ganMyLXdyYXAtd2l0aC1l eHByLXN0bXQgKHBvcyBleHByICZvcHRpb25hbCBhZGQtY2hpbGQpCisgIChsZXQgKChwbiAobWFr ZS1qczItZXhwci1zdG10LW5vZGUgOnBvcyBwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6bGVuIChqczItbm9kZS1sZW4gZXhwcikKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA6dHlwZSAoaWYgKGpzMi1pbnNpZGUtZnVuY3Rpb24pCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzMi1FWFBSX1ZPSUQKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpzMi1FWFBSX1JFU1VM VCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ZXhwciBleHByKSkpCisg ICAgKGlmIGFkZC1jaGlsZAorICAgICAgICAoanMyLW5vZGUtYWRkLWNoaWxkcmVuIHBuIGV4cHIp KQorICAgIHBuKSkKKworKGRlZnVuIGpzMi1wYXJzZS1sZXQtc3RtdCAoKQorICAiUGFyc2VyIGZv ciBsZXQtc3RhdGVtZW50LiAgTGFzdCBtYXRjaGVkIHRva2VuIG11c3QgYmUganMyLUxFVC4iCisg IChsZXQgKChwb3MgKGpzMi1jdXJyZW50LXRva2VuLWJlZykpCisgICAgICAgIGV4cHIgcG4pCisg ICAgKGlmICg9IChqczItcGVlay10b2tlbikganMyLUxQKQorICAgICAgICA7OyBsZXQgZXhwcmVz c2lvbiBpbiBzdGF0ZW1lbnQgY29udGV4dAorICAgICAgICAoc2V0cSBleHByIChqczItcGFyc2Ut bGV0IHBvcyAnc3RhdGVtZW50KQorICAgICAgICAgICAgICBwbiAoanMyLXdyYXAtd2l0aC1leHBy LXN0bXQgcG9zIGV4cHIgdCkpCisgICAgICA7OyBlbHNlIHdlJ3JlIGxvb2tpbmcgYXQgYSBzdGF0 ZW1lbnQgbGlrZSBsZXQgeD02LCB5PTc7CisgICAgICAoc2V0ZiBleHByIChqczItcGFyc2UtdmFy aWFibGVzIGpzMi1MRVQgcG9zKQorICAgICAgICAgICAgcG4gKGpzMi13cmFwLXdpdGgtZXhwci1z dG10IHBvcyBleHByIHQpCisgICAgICAgICAgICAoanMyLW5vZGUtdHlwZSBwbikganMyLUVYUFJf UkVTVUxUKSkKKyAgICBwbikpCisKKyhkZWZ1biBqczItcGFyc2UtcmV0LXlpZWxkICgpCisgIChq czItcGFyc2UtcmV0dXJuLW9yLXlpZWxkIChqczItY3VycmVudC10b2tlbi10eXBlKSBuaWwpKQor CisoZGVmY29uc3QganMyLXBhcnNlLXJldHVybi1zdG10LWVuZGVycworICAobGlzdCBqczItU0VN SSBqczItUkMganMyLUVPRiBqczItRU9MIGpzMi1FUlJPUiBqczItUkIganMyLVJQIGpzMi1ZSUVM RCkpCisKKyhkZWZzdWJz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ICAgICAgICAg ICAgICAgICAgICAgICAgICJtc2cuYmFkLnJldHVybiIKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgIm1zZy5iYWQueWllbGQiKSkpCisgICAgKHdoZW4gKGFuZCBpbnNpZGUtZnVuY3Rpb24KKyAg ICAgICAgICAgICAgIChlcSBnZW4tdHlwZSAnU1RBUikKKyAgICAgICAgICAgICAgIChqczItbWF0 Y2gtdG9rZW4ganMyLU1VTCkpCisgICAgICAoc2V0cSB5aWVsZC1zdGFyLXAgdCkpCisgICAgOzsg VGhpcyBpcyB1Z2x5LCBidXQgd2UgZG9uJ3Qgd2FudCB0byByZXF1aXJlIGEgc2VtaWNvbG9uLgor ICAgICh1bmxlc3MgKG1lbXEgKGpzMi1wZWVrLXRva2VuLW9yLWVvbCkganMyLXBhcnNlLXJldHVy bi1zdG10LWVuZGVycykKKyAgICAgIChzZXRxIGUgKGpzMi1wYXJzZS1leHByKQorICAgICAgICAg ICAgZW5kIChqczItbm9kZS1lbmQgZSkpKQorICAgIChjb25kCisgICAgICgoZXEgdHQganMyLVJF VFVSTikKKyAgICAgIChqczItc2V0LWZsYWcganMyLWVuZC1mbGFncyAoaWYgKG51bGwgZSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganMyLWVuZC1yZXR1cm5zCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqczItZW5kLXJldHVybnMtdmFsdWUpKQor ICAgICAgKHNldHEgcmV0IChtYWtlLWpzMi1yZXR1cm4tbm9kZSA6cG9zIHBvcworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6bGVuICgtIGVuZCBwb3MpCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpyZXR2YWwgZSkpCisgICAgICAoanMyLW5vZGUt YWRkLWNoaWxkcmVuIHJldCBlKQorICAgICAgOzsgU2VlIGlmIHdlIG5lZWQgYSBzdHJpY3QgbW9k ZSB3YXJuaW5nLgor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AgIDs7IEZJWE1FOiBX ZSBzaG91bGQgcHJvYmFibHkgc3dpdGNoIHRvIHNhdmluZyBhbmQgdXNpbmcgbGFzdFlpZWxkT2Zm c2V0LAorICAgICAgOzsgbGlrZSBTcGlkZXJNb25rZXkgZG9lcy4KKyAgICAgIChqczItcmVwb3J0 LWVycm9yICJtc2cuc3ludGF4IiBuaWwgcG9zIDUpKQorICAgICAodAorICAgICAgKHNldHEgcmV0 IChtYWtlLWpzMi15aWVsZC1ub2RlIDpwb3MgcG9zCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOmxlbiAoLSBlbmQgcG9zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDp2YWx1ZSBlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg OnN0YXItcCB5aWVsZC1zdGFyLXApKQorICAgICAgKGpzMi1ub2RlLWFkZC1jaGlsZHJlbiByZXQg ZSkKKyAgICAgICh1bmxlc3MgZXhwci1jb250ZXh0CisgICAgICAgIChzZXRxIGUgcmV0CisgICAg ICAgICAgICAgIHJldCAoanMyLXdyYXAtd2l0aC1leHByLXN0bXQgcG9zIGUgdCkpCisgICAgICAo anMyLXNldC1yZXF1aXJlcy1hY3RpdmF0aW9uKQorICAgICAgKGpzMi1zZXQtaXMtZ2VuZXJhdG9y KSkpKQorICAgIDs7IHNlZSBpZiB3ZSBhcmUgbWl4aW5nIHlpZWxkcyBhbmQgdmFsdWUgcmV0dXJu cy4KKyAgICAod2hlbiAoYW5kIGluc2lkZS1mdW5jdGlvbgorICAgICAgICAgICAgICAgKGpzMi1m bGFnLXNldC1wIGpzMi1lbmQtZmxhZ3MganMyLWVuZC1yZXR1cm5zLXZhbHVlKQorICAgICAgICAg ICAgICAgKGVxIChqczItZnVuY3Rpb24tbm9kZS1nZW5lcmF0b3ItdHlwZSBqczItY3VycmVudC1z Y3JpcHQtb3ItZm4pCisgICAgICAgICAgICAgICAgICAgJ0xFR0FDWSkpCisgICAgICAoc2V0cSBu YW1lIChqczItZnVuY3Rpb24tbmFtZSBqczItY3VycmVudC1zY3JpcHQtb3ItZm4pKQorICAgICAg KGlmICh6ZXJvcCAobGVuZ3RoIG5hbWUpKQorICAgICAgICAgIChqczItcmVwb3J0LWVycm9yICJt c2cuYW5vbi5nZW5lcmF0b3IucmV0dXJucyIgbmlsIHBvcyAoLSBlbmQgcG9zKSkKKyAgICAgICAg KGpzMi1yZXBvcnQtZXJyb3IgIm1zZy5nZW5lcmF0b3IucmV0dXJucyIgbmFtZSBwb3MgKC0gZW5k IHBvcykpKSkKKyAgICByZXQpKQorCisoZGVmdW4ganMyLXBhcnNlLWRlYnVnZ2VyICgpCisgICht YWtlLWpzMi1rZXl3b3JkLW5vZGUgOnR5cGUganMyLURFQlVHR0VSKSkKKworKGRlZnVuIGpzMi1w YXJzZS1ibG9jayAoKQorICAiUGFyc2VyIGZvciBhIGN1cmx5LWRlbGltaXRlZCBzdGF0ZW1lbnQg YmxvY2suCitMYXN0IHRva2VuIG1hdGNoZWQgbXVzdCBiZSBganMyLUxDJy4iCisgIChsZXQgKChw b3MgKGpzMi1jdXJyZW50LXRva2VuLWJlZykpCisgICAgICAgIChwbiAobWFrZS1qczItc2NvcGUp KSkKKyAgICAoanMyLXB1c2gtc2NvcGUgcG4pCisgICAgKHVud2luZC1wcm90ZWN0CisgICAgICAg IChwcm9nbgorICAgICAgICAgIChqczItcGFyc2Utc3RhdGVtZW50cyBwbikKKyAgICAgICAgICAo anMyLW11c3QtbWF0Y2gganMyLVJDICJtc2cubm8uYnJhY2UuYmxvY2siKQorICAgICAgICAgIChz ZXRmIChqczItbm9kZS1sZW4gcG4pICgtIChqczItY3VycmVudC10b2tlbi1lbmQpIHBvcykpKQor ICAgICAgKGpzMi1wb3Atc2NvcGUpKQorICAgIHBuKSkKKworOzsgRm9yIGBqczItRVJST1InIHRv bywgdG8gaGF2ZSBhIG5vZGUgZm9yIGVycm9yIHJlY292ZXJ5IHRvIHdvcmsgb24uCisoZGVmdW4g anMyLXBhcnNlLXNlbWkgKCkKKyAgIlBhcnNlIGEgc3RhdGVtZW50IG9yIGhhbmRsZSBhbiBlcnJv ci4KK0N1cnJlbnQgdG9rZW4gdHlwZSBpcyBganMyLVNFTUknIG9yIGBqczItRVJST1InLiIKKyAg KGxldCAoKHR0IChqczItY3VycmVudC10b2tlbi10eXBlKSkgcG9zIGxlbikKKyAgICAoaWYgKGVx IHR0IGpzMi1TRU1JKQorICAgICAgICAobWFrZS1qczItZW1wdHktZXhwci1ub2RlIDpsZW4gMSkK KyAgICAgIChzZXRxIHBvcyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKQorICAgICAgICAgICAgbGVu ICgtIChqczItY3VycmVudC10b2tlbi1lbmQpIHBvcykpCisgICAgICAoanMyLXJlcG9ydC1lcnJv ciAibXNnLnN5bnRheCIgbmlsIHBvcyBsZW4pCisgICAgICAobWFrZS1qczItZXJyb3Itbm9kZSA6 cG9zIHBvcyA6bGVuIGxlbikpKSkKKworKGRlZnVuIGpzMi1wYXJzZS1kZWZhdWx0LXhtbC1uYW1l c3BhY2UgKCkKKyAgIlBhcnNlIGEgYGRlZmF1bHQgeG1sIG5hbWVzcGFjZSA9IDxleHByPicgZTR4 IHN0YXRlbWVudC4iCisgIChsZXQgKChwb3MgKGpzMi1jdXJyZW50LXRva2VuLWJlZykpCisgICAg ICAgIGVuZCBsZW4gZXhwciB1bmFyeSkKKyAgICAoanMyLW11c3QtaGF2ZS14bWwpCisgICAgKGpz Mi1zZXQtcmVxdWlyZXMtYWN0aXZhdGlvbikKKyAgICAoc2V0cSBsZW4gKC0ganMyLXRzLWN1cnNv ciBwb3MpKQorICAgICh1bmxlc3MgKGFuZCAoanMyLW1hdGNoLXRva2VuIGpzMi1OQU1FKQorICAg ICAgICAgICAgICAgICAoc3RyaW5nPSAoanMyLWN1cnJlbnQtdG9rZW4tc3RyaW5nKSAieG1sIikp CisgICAgICAoanMyLXJlcG9ydC1lcnJvciAibXNnLmJhZC5uYW1lc3BhY2UiIG5pbCBwb3MgbGVu KSkKKyAgICAodW5sZXNzIChhbmQgKGpzMi1tYXRjaC10b2tlbiBqczItTkFNRSkKKyAgICAgICAg ICAgICAgICAgKHN0cmluZz0gKGpzMi1jdXJyZW50LXRva2VuLXN0cmluZykgIm5hbWVzcGFjZSIp KQorICAgICAgKGpzMi1yZXBvcnQtZXJyb3IgIm1zZy5iYWQubmFtZXNwYWNlIiBuaWwgcG9zIGxl bikpCisgICAgKHVubGVzcyAoanMyLW1hdGNoLXRva2VuIGpzMi1BU1NJR04pCisgICAgICAoanMy LXJlcG9ydC1lcnJvciAibXNnLmJhZC5uYW1lc3BhY2UiIG5pbCBwb3MgbGVuKSkKKyAgICAoc2V0 cSBleHByIChqczItcGFyc2UtZXhwcikKKyAgICAgICAgICBlbmQgKGpzMi1ub2RlLWVuZCBleHBy KQorICAgICAgICAgIHVuYXJ5IChtYWtlLWpzMi11bmFyeS1ub2RlIDp0eXBlIGpzMi1ERUZBVUxU TkFNRVNQQUNFCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOnBvcyBwb3MK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6bGVuICgtIGVuZCBwb3MpCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOm9wZXJhbmQgZXhwcikpCisgICAg KGpzMi1ub2RlLWFkZC1jaGlsZHJlbiB1bmFyeSBleHByKQorICAgIChtYWtlLWpzMi1leHByLXN0 bXQtbm9kZSA6cG9zIHBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6bGVuICgtIGVu ZCBwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpleHByIHVuYXJ5KSkpCisKKyhk ZWZ1biBqczItcmVjb3JkLWxhYmVsIChsYWJlbCBidW5kbGUpCisgIDs7IGN1cnJlbnQgdG9rZW4g c2hvdWxkIGJlIGNvbG9uIHRoYXQgYGpzMi1wYXJzZS1wc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BleHByIGJ1bmRsZSkK KyAgICAgIDs7IGxvb2sgZm9yIG1vcmUgbGFiZWxzCisgICAgICAod2hpbGUgKGFuZCBjb250aW51 ZSAoPSAoanMyLWdldC10b2tlbikganMyLU5BTUUpKQorICAgICAgICAoaWYgKHNldHEgZXhwciAo anMyLW1heWJlLXBhcnNlLWxhYmVsKSkKKyAgICAgICAgICAgIChqczItcmVjb3JkLWxhYmVsIGV4 cHIgYnVuZGxlKQorICAgICAgICAgIChzZXRxIGV4cHIgKGpzMi1wYXJzZS1leHByKQorICAgICAg ICAgICAgICAgIHN0bXQgKGpzMi13cmFwLXdpdGgtZXhwci1zdG10IChqczItbm9kZS1wb3MgZXhw cikgZXhwciB0KQorICAgICAgICAgICAgICAgIGNvbnRpbnVlIG5pbCkKKyAgICAgICAgICAoanMy LWF1dG8taW5zZXJ0LXNlbWljb2xvbiBzdG10KSkpCisgICAgICA7OyBubyBtb3JlIGxhYmVsczsg bm93IHBhcnNlIHRoZSBsYWJlbGVkIHN0YXRlbWVudAorICAgICAgKHVud2luZC1wcm90ZWN0Cisg ICAgICAgICAgICAodW5sZXNzIHN0bXQKKyAgICAgICAgICAgICAgKGxldCAoKGpzMi1sYWJlbGVk LXN0bXQgYnVuZGxlKSkgIDsgYmluZCBkeW5hbWljYWxseQorICAgICAgICAgICAgICAgIChqczIt dW5nZXQtdG9rZW4pCisgICAgICAgICAgICAgICAgKHNldHEgc3RtdCAoanMyLXN0YXRlbWVudC1o ZWxwZXIpKSkpCisgICAgICAgIDs7IHJlbW92ZSB0aGUgbGFiZWxzIGZvciB0aGlzIHN0YXRlbWVu dCBmcm9tIHRoZSBnbG9iYWwgc2V0CisgICAgICAgIChkb2xpc3QgKGxhYmVsIChqczItbGFiZWxl ZC1zdG10LW5vZGUtbGFiZWxzIGJ1bmRsZSkpCisgICAgICAgICAgKHNldHEganMyLWxhYmVsLXNl dCAocmVtb3ZlIGxhYmVsIGpzMi1sYWJlbC1zZXQpKSkpCisgICAgICAoc2V0ZiAoanMyLWxhYmVs ZWQtc3RtdC1ub2RlLXN0bXQgYnVuZGxlKSBzdG10CisgICAgICAgICAgICAoanMyLW5vZGUtbGVu IGJ1bmRsZSkgKC0gKGpzMi1ub2RlLWVuZCBzdG10KSBwb3MpKQorICAgICAgKGpzMi1ub2RlLWFk ZC1jaGlsZHJlbiBidW5kbGUgc3RtdCkKKyAgICAgIGJ1bmRsZSkpKQorCisoZGVmdW4ganMyLW1h eWJlLXBhcnNlLWxhYmVsICgpCisgIChjbC1hc3NlcnQgKD0gKGpzMi1jdXJyZW50LXRva2VuLXR5 cGUpIGpzMi1OQU1FKSkKKyAgKGxldCAobGFiZWwtcG9zCisgICAgICAgIChuZXh0LXR0IChqczIt Z2V0LXRva2VuKSkKKyAgICAgICAgKGxhYmVsLWVuZCAoanMyLWN1cnJlbnQtdG9rZW4tZW5kKSkp CisgICAgOzsgRG8gbm90IGNvbnN1bWUgY29sb24sIGl0IGlzIHVzZWQgYXMgdW53aW5kIGluZGlj YXRvcgorICAgIDs7IHRvIHJldHVybiB0byBzdGF0ZW1lbnRIZWxwZXIuCisgICAgKGpzMi11bmdl dC10b2tlbikKKyAgICAoaWYgKD0gbmV4dC10dCBqczItQ09MT04pCisgICAgICAgIChwcm9nMgor ICAgICAgICAgICAgKHNldHEgbGFiZWwtcG9zIChqczItY3VycmVudC10b2tlbi1iZWcpKQorICAg ICAgICAgICAgKG1ha2UtanMyLWxhYmVsLW5vZGUgOnBvcyBsYWJlbC1wb3MKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIDpsZW4gKC0gbGFiZWwtZW5kIGxhYmVsLXBvcykKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpuYW1lIChqczItY3VycmVudC10b2tlbi1zdHJp bmcpKQorICAgICAgICAgIChqczItc2V0LWZhY2UgbGFiZWwtcG9zCisgICAgICAgICAgICAgICAg ICAgICAgICBsYWJlbC1lbmQKKyAgICAgICAgICAgICAgICAgICAgICAgICdmb250LWxvY2stdmFy aWFibGUtbmFtZS1mYWNlICdyZWNvcmQpKQorICAgICAgOzsgQmFja3RyYWNrIGZyb20gdGhlIG5h bWUgdG9rZW4sIHRvby4KKyAgICAgIChqczItdW5nZXQtdG9rZW4pCisgICAgICBuaWwpKSkKKwor KGRlZnVuIGpzMi1wYXJzZS1leHByLXN0bXQgKCkKKyAgIkRlZmF1bHQgcGFyc2VyIGluIHN0YXRl bWVudCBjb250ZXh0LCBpZiBubyByZWNvZ25pemVkIHN0YXRlbWVudCBmb3VuZC4iCisgIChqczIt d3JhcC13aXRoLWV4cHItc3RtdCAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgKHByb2duCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChqczIt dW5nZXQtdG9rZW4pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChqczItcGFyc2UtZXhw cikpIHQpKQorCisoZGVmdW4ganMyLXBhcnNlLXZhcmlhYmxlcyAoZGVjbC10eXBlIHBvcykKKyAg IlBhcnNlIGEgY29tbWEtc2VwYXJhdGVkIGxpc3Qgb2YgdmFyaWFibGUgZGVjbGFyYXRpb25zLgor Q291bGQgYmUgYSAndmFyJywgJ2NvbnN0JyBvciAnbGV0JyBleHByZXNzaW9uLCBwb3NzaWJseSBp biBhIGZvci1sb29wIGluaXRpYWxpemVyLgorCitERUNMLVRZUEUgaXMgYSB0b2tlbiB2YWx1ZTog ZWl0aGVyIFZBUiwgQ09OU1QsIG9yIExFVCBkZXBlbmRpbmcgb24gY29udGV4dC4KK0ZvciAndmFy JyBvciAnY29uc3QnLCB0aGUga2V5d29yZCBzaG91bGQgYmUgdGhlIHRva2VuIGxhc3Qgc2Nhbm5l ZC4KKworUE9TIGlzIHRoZSBwb3NpdGlvbiB3aGVyZSB0aGUgbm9kZSBzaG91bGQgc3RhcnQuIEl0 J3Mgc29tZXRpbWVzIHRoZQordmFyL2NvbnN0L2xldCBrZXl3b3JkLCBhbmQgb3RoZXIgdGltZXMg dGhlIGJlZ2lubmluZyBvZiB0aGUgZmlyc3QgdG9rZW4KK2luIHRoZSBmaXJzdCB2YXJpYWJsZSBk ZWNsYXJhdGlvbi4KKworUmV0dXJucyB0aGUgcGFyc2VkIGBqczItdmFyLWRlY2wtbm9kZScgZXhw cmVzc2lvbiBub2RlLiIKKyAgKGxldCogKChyZXN1bHQgKG1ha2UtanMyLXZhci1kZWNsLW5vZGUg OmRlY2wtdHlwZSBkZWNsLXR5cGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOnBvcyBwb3MpKQorICAgICAgICAgZGVzdHJ1Y3R1cmluZyBraWQtcG9zIHR0IGluaXQg bmFtZSBlbmQgbmJlZyBuZW5kIHZpCisgICAgICAgICAoY29udGludWUgdCkpCisgICAgOzsgRXhh bXBsZToKKyAgICA7OyB2YXIgZm9vID0ge2E6IDEsIGI6IDJ9LCBiYXIgPSBbMywgNF07CisgICAg OzsgdmFyIHtiOiBzMiwgYTogczF9ID0gZm9vLCB4ID0gNiwgeSwgW3MzLCBzNF0gPSBiYXI7Cisg ICAgOzsgdmFyIHthLCBifSA9IGJhejsKKyAgICAod2hpbGUgY29udGludWUKKyAgICAgIChzZXRx IGRlc3RydWN0dXJpbmcgbmlsCisgICAgICAgICAgICBuYW1lIG5pbAorICAgICAgICAgICAgdHQg KGpzMi1nZXQtdG9rZW4pCisgICAgICAgICAgICBraWQtcG9zIChqczItY3VycmVudC10b2tlbi1i ZWcpCisgICAgICAgICAgICBlbmQgKGpzMi1jdXJyZW50LXRva2VuLWVuZCkKKyAgICAgICAgICAg IGluaXQgbmlsKQorICAgICAgKGlmIChvciAoPSB0dCBqczItTEIpICg9IHR0IGpzMi1MQykpCisg ICAgICAgICAgOzsgRGVzdHJ1Y3R1cmluZyBhc3NpZ25tZW50LCBlLmcuLCB2YXIgW2EsIGJdID0g Li4uCisgICAgICAgICAgKHNldHEgZGVzdHJ1Y3R1cmluZyAoanMyLXBhcnNlLWRlc3RydWN0LXBy aW1hcnktZXhwcikKKyAgICAgICAgICAgICAgICBlbmQgKGpzMi1ub2RlLWVuZCBkZXN0cnVjdHVy aW5nKSkKKyAgICAgICAgOzsgU2ltcGxlIHZhcmlhYmxlIG5hbWUKKyAgICAgICAgKGpzMi11bmdl dC10b2tlbikKKyAgICAgICAgKHdoZW4gKGpzMi1tdXN0LW1hdGNoLW5hbWUgIm1zZy5iYWQudmFy IikKKyAgICAgICAgICAoc2V0cSBuYW1lIChqczItY3JlYXRlLW5hbWUtbm9kZSkKKyAgICAgICAg ICAgICAgICBuYmVnIChqczItY3VycmVudC10b2tlbi1iZWcpCisgICAgICAgICAgICAgICAgbmVu ZCAoanMyLWN1cnJlbnQtdG9rZW4tZW5kKQorICAgICAgICAgICAgICAgIGVuZCBuZW5kKQorICAg ICAgICAgIChqczItZGVmaW5lLXN5bWJvbCBkZWNsLXR5cGUgKGpzMi1jdXJyZW50LXRva2VuLXN0 cmluZykgbmFtZSBqczItaW4tZm9yLWluaXQpKSkKKyAgICAgICh3aGVuIChqczItbWF0Y2gtdG9r ZW4ganMyLUFTU0lHTikKKyAgICAgICAgKHNldHEgaW5pdCAoanMyLXBhcnNlLWFzc2lnbi1leHBy KQorICAgICAgICAgICAgICBlbmQgKGpzMi1ub2RlLWVuZCBpbml0KSkKKyAgICAgICAgKGpzMi1y ZWNvcmQtaW1lbnUtZnVuY3Rpb25zIGluaXQgbmFtZSkpCisgICAgICAod2hlbiBuYW1lCisgICAg ICAgIChqczItc2V0LWZhY2UgbmJlZyBuZW5kIChpZiAoanMyLWZ1bmN0aW9uLW5vZGUtcCBpbml0 KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2ZvbnQtbG9jay1mdW5jdGlv bi1uYW1lLWZhY2UKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZm9udC1sb2Nr LXZhcmlhYmxlLW5hbWUtZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAncmVjb3JkKSkKKyAg ICAgIChzZXRxIHZpIChtYWtlLWpzMi12YXItaW5pdC1ub2RlIDpwb3Mga2lkLXBvcworICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmxlbiAoLSBlbmQga2lkLXBvcykKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDp0eXBlIGRlY2wtdHlwZSkpCisg ICAgICAoaWYgZGVzdHJ1Y3R1cmluZworICAgICAgICAgIChwcm9nbgorICAgICAgICAgICAgKGlm IChhbmQgKG51bGwgaW5pdCkgKG5vdCBqczItaW4tZm9yLWluaXQpKQorICAgICAgICAgICAgICAg IChqczItcmVwb3J0LWVycm9yICJtc2cuZGVzdHJ1Y3QuYXNzaWduLm5vLmluaXQiKSkKKyAgICAg ICAgICAgIChqczItZGVmaW5lLWRlc3RydWN0LXN5bWJvbHMgZGVzdHJ1Y3R1cmluZworICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWNsLXR5cGUKKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2ZvbnQtbG9jay12YXJpYWJsZS1uYW1lLWZh Y2UpCisgICAgICAgICAgICAoc2V0ZiAoanMyLXZhci1pbml0LW5vZGUtdGFyZ2V0IHZpKSBkZXN0 cnVjdHVyaW5nKSkKKyAgICAgICAgKHNldGYgKGpzMi12YXItaW5pdC1ub2RlLXRhcmdldCB2aSkg bmFtZSkpCisgICAgICAoc2V0ZiAoanMyLXZhci1pbml0LW5vZGUtaW5pdGlhbGl6ZXIgdmkpIGlu aXQpCisgICAgICAoanMyLW5vZGUtYWRkLWNoaWxkcmVuIHZpIG5hbWUgZGVzdHJ1Y3R1cmluZyBp bml0KQorICAgICAgKGpzMi1ibG9jay1ub2RlLXB1c2ggcmVzdWx0IHZpKQorICAgICAgKHVubGVz cyAoanMyLW1hdGNoLXRva2VuIGpzMi1DT01NQSkKKyAgICAgICAgKHNldHEgY29udGludWUgbmls KSkpCisgICAgKHNldGYgKGpzMi1ub2RlLWxlbiByZXN1bHQpICgtIGVuZCBwb3MpKQorICAgIHJl c3VsdCkpCisKKyhkZWZ1biBqczItcGFyc2UtbGV0IChwb3MgJm9wdGlvbmFsIHN0bXQtcCkKKyAg IlBhcnNlIGEgbGV0IGV4cHJlc3Npb24gb3Igc3RhdGVtZW50LgorQSBsZXQtZXhwcmVzc2lvbiBp cyBvZiB0aGUgZm9ybSBgbGV0ICh2YXJzKSBleHByJy4KK0EgbGV0LXN0YXRtZW50IGlzIG9mIHRo ZSBmb3JtIGBsZXQgKHZhcnMpIHtzdGF0ZW1lbnRzfScuCitUaGUgdGhpcmQgZm9ybSBvZiBsZXQg aXMgYSB2YXJpYWJsZSBkZWNsYXJhdGlvbiBsaXN0LCBoYW5kbGVkCitieSBganMyLXBhcnNlLXZh cmlhYmxlcycuIgorICAobGV0ICgocG4gKG1ha2UtanMyLWxldC1ub2RlIDpwb3MgcG9zKSkKKyAg ICAgICAgYmVnIHZhcnMgYm9keSkKKyAgICAoaWYgKGpzMi1tdXN0LW1hdGNoIGpzMi1MUCAibXNn Lm5vLnBhcmVuLmFmdGVyLmxldCIpCisgICAgICAgIChzZXRmIChqczItbGV0LW5vZGUtbHAgcG4p ICgtIChqczItY3VycmVudC10b2tlbi1iZWcpIHBvcykpKQorICAgIChqczItcHVzaC1zY29wZSBw bikKKyAgICAodW53aW5kLXByb3RlY3QKKyAgICAgICAgKHByb2duCisgICAgICAgICAgKHNldHEg dmFycyAoanMyLXBhcnNlLXZhcmlhYmxlcyBqczItTEVUIChqczItY3VycmVudC10b2tlbi1iZWcp KSkKKyAgICAgICAgICAoaWYgKGpzMi1tdXN0LW1hdGNoIGpzMi1SUCAibXNnLm5vLnBhcmVuLmxl dCIpCisgICAgICAgICAgICAgIChzZXRmIChqczItbGV0LW5vZGUtcnAgcG4pICgtIChqczItY3Vy cmVudC10b2tlbi1iZWcpIHBvcykpKQorICAgICAgICAgIChpZiAoYW5kIHN0bXQtcCAoanMyLW1h dGNoLXRva2VuIGpzMi1MQykpCisgICAgICAgICAgICAgIDs7IGxldCBzdGF0ZW1lbnQKKyAgICAg ICAgICAgICAgKHByb2duCisgICAgICAgICAgICAgICAgKHNldGYgYmVnIChqczItY3VycmVudC10 b2tlbi1iZWcpICA7IHBvc2l0aW9uIHN0bXQgYXQgTEMKKyAgICAgICAgICAgICAgICAgICAgICBi b2R5IChqczItcGFyc2Utc3RhdGVtZW50cykpCisgICAgICAgICAgICAgICAgKGpzMi1tdXN0LW1h dGNoIGpzMi1SQyAibXNnLm5vLmN1cmx5LmxldCIpCisgICAgICAgICAgICAgICAgKHNldGYgKGpz Mi1ub2RlLWxlbiBib2R5KSAoLSAoanMyLWN1cnJlbnQtdG9rZW4tZW5kKSBiZWcpCisgICAgICAg ICAgICAgICAgICAgICAgKGpzMi1ub2RlLWxlbiBwbikgKC0gKGpzMi1jdXJyZW50LXRva2VuLWVu ZCkgcG9zKQorICAgICAgICAgICAgICAgICAgICAgIChqczItbGV0LW5vZGUtYm9keSBwbikgYm9k eQorICAgICAgICAgICAgICAgICAgICAgIChqczItbm9kZS10eXBlIHBuKSBqczItTEVUKSkKKyAg ICAgICAgICAgIDs7IGxldCBleHByZXNzaW9uCisgICAgICAgICAgICAoc2V0ZiBib2R5IChqczIt cGFyc2UtZXhwcikKKyAgICAgICAgICAgICAgICAgIChqczItbm9kZS1sZW4gcG4pICgtIChqczIt bm9kZS1lbmQgYm9keSkgcG9zKQorICAgICAgICAgICAgICAgICAgKGpzMi1sZXQtbm9kZS1ib2R5 IHBuKSBib2R5KSkKKyAgICAgICAgICAoc2V0ZiAoanMyLWxldC1ub2RlLXZhcnMgcG4pIHZhcnMp CisgICAgICAgICAgKGpzMi1ub2RlLWFkZC1jaGlsZHJlbiBwbiB2YXJzIGJvZHkpKQorICAgICAg KGpzMi1wb3Atc2NvcGUpKQorICAgIHBuKSkKKworKGRlZnVuIGpzMi1kZWZpbmUtbmV3LXN5bWJv bCAoZGVjbC10eXBlIG5hbWUgbm9kZSAmb3B0aW9uYWwgc2NvcGUpCisgIChqczItc2NvcGUtcHV0 LXN5bWJvbCAob3Igc2NvcGUganMyLWN1cnJlbnQtc2NvcGUpCisgICAgICAgICAgICAgICAgICAg ICAgICBuYW1lCisgICAgICAgICAgICAgICAgICAgICAgICAobWFrZS1qczItc3ltYm9sIGRlY2wt dHlwZSBuYW1lIG5vZGUpKSkKKworKGRlZnVuIGpzMi1kZWZpbmUtc3ltYm9sIChkZWNsLXR5cGUg bmFtZSAmb3B0aW9uYWwgbm9kZSBpZ25vcmUtbm90LWluLWJsb2NrKQorICAiRGVmaW5lIGEgc3lt Ym9sIGluIHRoZSBjdXJyZW50IHNjb3BlLgorSWYgTk9ERSBpcyBub24tbmlsLCBpdCBpcyB0aGUg QVNUIG5vZGUgYXNzb2NpYXRlZCB3aXRoIHRoZSBzeW1ib2wuIgorICAobGV0KiAoKGRlZmluaW5n LXNjb3BlIChqczItZ2V0LWRlZmluaW5nLXNjb3BlIGpzMi1jdXJyZW50LXNjb3BlIG5hbWUpKQor ICAgICAgICAgKHN5bWJvbCAoaWYgZGVmaW5pbmctc2NvcGUKKyAgICAgICAgICAgICAgICAgICAg IChqczItc2NvcGUtZ2V0LXN5bWJvbCBkZWZpbmluZy1zY29wZSBuYW1lKSkpCisgICAgICAgICAo c2R0IChpZiBzeW1ib2wgKGpzMi1zeW1ib2wtZGVjbC10eXBlIHN5bWJvbCkgLTEpKQorICAgICAg ICAgKHBvcyAoaWYgbm9kZSAoanMyLW5vZGUtYWJzLXBvcyBub2RlKSkpCisgICAgICAgICAobGVu IChpZiBub2RlIChqczItbm9kZS1sZW4gbm9kZSkpKSkKKyAgICAoY29uZAorICAgICAoKGFuZCBz eW1ib2wgOyBhbHJlYWR5IGRlZmluZWQKKyAgICAgICAgICAgKG9yICg9IHNkdCBqczItQ09OU1Qp IDsgb2xkIHZlcnNpb24gaXMgY29uc3QKKyAgICAgICAgICAgICAgICg9IGRlY2wtdHlwZSBqczIt Q09OU1QpIDsgbmV3IHZlcnNpb24gaXMgY29uc3QKKyAgICAgICAgICAgICAgIDs7IHR3byBsZXQt Ym91bmQgdmFycyBpbiB0aGlzIGJsb2NrIGhhdmUgc2FtZSBuYW1lCisgICAgICAgICAgICAgICAo YW5kICg9IHNkdCBqczItTEVUKQorICAgICAgICAgICAgICAgICAgICAoZXEgZGVmaW5pbmctc2Nv cGUganMyLWN1cnJlbnQtc2NvcGUpKSkpCisgICAgICAoanMyLXJlcG9ydC1lcnJvcgorICAgICAg IChjb25kCisgICAgICAgICgoPSBzZHQganMyLUNPTlNUKSAibXNnLmNvbnN0LnJlZGVjbCIpCisg ICAgICAgICgoPSBzZHQganMyLUxFVCkgIm1zZy5sZXQucmVkZWNsIikKKyAgICAgICAgKCg9IHNk dCBqczItVkFSKSAibXNnLnZhci5yZWRlY2wiKQorICAgICAgICAoKD0gc2R0IGpzMi1GVU5DVElP TikgIm1zZy5mdW5jdGlvbi5yZWRlY2wiKQorICAgICAgICAodCAibXNnLnBhcm0ucmVkZWNsIikp CisgICAgICAgbmFtZSBwb3MgbGVuKSkKKyAgICAgKCg9IGRlY2wtdHlwZSBqczItTEVUKQorICAg ICAgKGlmIChhbmQgKG5vdCBpZ25vcmUtbm90LWluLWJsb2NrKQorICAgICAgICAgICAgICAgKG9y ICg9IChqczItbm9kZS10eXBlIGpzMi1jdXJyZW50LXNjb3BlKSBqczItSUYpCisgICAgICAgICAg ICAgICAgICAgKGpzMi1sb29wLW5vZGUtcCBqczItY3VycmVudC1zY29wZSkpKQorICAgICAgICAg IChqczItcmVwb3J0LWVycm9yICJtc2cubGV0LmRlY2wubm90LmluLmJsb2NrIikKKyAgICAgICAg KGpzMi1kZWZpbmUtbmV3LXN5bWJvbCBkZWNsLXR5cGUgbmFtZSBub2RlKSkpCisgICAgICgob3Ig KD0gZGVjbC10eXBlIGpzMi1WQVIpCisgICAgICAgICAgKD0gZGVjbC10eXBlIGpzMi1DT05TVCkK KyAgICAgICAgICAoPSBkZWNsLXR5cGUganMyLUZVTkNUSU9OKSkKKyAgICAgIChpZiBzeW1ib2wK KyAgICAgICAgICAoaWYgKGFuZCBqczItc3RyaWN0LXZhci1yZWRlY2xhcmF0aW9uLXdhcm5pbmcg KD0gc2R0IGpzMi1WQVIpKQorICAgICAgICAgICAgICAoanMyLWFkZC1zdHJpY3Qtd2FybmluZyAi bXNnLnZhci5yZWRlY2wiIG5hbWUpCisgICAgICAgICAgICAoaWYgKGFuZCBqczItc3RyaWN0LXZh ci1oaWRlcy1mdW5jdGlvbi1hcmctd2FybmluZyAoPSBzZHQganMyLUxQKSkKKyAgICAgICAgICAg ICAgICAoanMyLWFkZC1zdHJpY3Qtd2FybmluZyAibXNnLnZhci5oaWRlcy5hcmciIG5hbWUpKSkK KyAgICAgICAgKGpzMi1kZWZpbmUtbmV3LXN5bWJvbCBkZWNsLXR5cGUgbmFtZSBub2RlCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAganMyLWN1cnJlbnQtc2NyaXB0LW9yLWZuKSkpCisg ICAgICgoPSBkZWNsLXR5cGUganMyLUxQKQorICAgICAgKGlmIHN5bWJvbAorICAgICAgICAgIDs7 IG11c3QgYmUgZHVwbGljYXRlIHBhcmFtZXRlci4gU2Vjb25kIHBhcmFtZXRlciBoaWRlcyB0aGUK KyAgICAgICAgICA7OyBmaXJzdCwgc28gZ28gYWhlYWQgYW5kIGFkZCB0aGUgc2Vjb25kIHBhcmFy YW1ldGVyCisgICAgICAgICAgKGpzMi1yZXBvcnQtd2FybmluZyAibXNnLmR1cC5wYXJtcyIgbmFt ZSkpCisgICAgICAoanMyLWRlZmluZS1uZXctc3ltYm9sIGRlY2wtdHlwZSBuYW1lIG5vZGUpKQor ICAgICAodCAoanMyLWNvZGUtYnVnKSkpKSkKKworKGRlZnVuIGpzMi1wYXJzZS1wYXJlbi1leHBy LW9yLWdlbmVyYXRvci1jb21wICgpCisgIChsZXQgKChweC1wb3MgKGpzMi1jdXJyZW50LXRva2Vu LWJlZykpKQorICAgIChpZiAoYW5kICg+PSBqczItbGFuZ3VhZ2UtdmVyc2lvbiAyMDApCisgICAg ICAgICAgICAgKGpzMi1tYXRjaC10b2tlbiBqczItRk9SKSkKKyAgICAgICAgKGpzMi1wYXJzZS1n ZW5lcmF0b3ItY29tcCBweC1wb3MpCisgICAgICAobGV0KiAoKGpzMi1pbi1mb3ItaW5pdCBuaWwp CisgICAgICAgICAgICAgKGV4cHIgKGpzMi1wYXJzZS1leHByKSkKKyAgICAgICAgICAgICAocG4g KG1ha2UtanMyLXBhcmVuLW5vZGUgOnBvcyBweC1wb3MKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgOmV4cHIgZXhwcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6bGVuICgtIChqczItY3VycmVudC10b2tlbi1lbmQpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHgtcG9zKSkpKQorICAgICAgICAoanMyLW5v ZGUtYWRkLWNoaWxkcmVuIHBuIChqczItcGFyZW4tbm9kZS1leHByIHBuKSkKKyAgICAgICAgKGpz Mi1tdXN0LW1hdGNoIGpzMi1SUCAibXNnLm5vLnBhcmVuIikKKyAgICAgICAgcG4pKSkpCisKKyhk ZWZ1biBqczItcGFyc2UtZXhwciAoJm9wdGlvbmFsIG9uZXNob3QpCisgIChsZXQqICgocG4gKGpz Mi1wYXJzZS1hc3NpZ24tZXhwcikpCisgICAgICAgICAocG9zIChqczItbm9kZS1wb3MgcG4pKQor ICAgICAgICAgbGVmdAorICAgICAgICAgcmlnaHQKKyAgICAgICAgIG9wLXBvcykKKyAgICAod2hp bGUgKGFuZCAobm90IG9uZXNob3QpCisgICAgICAgICAgICAgICAgKGpzMi1tYXRjaC10b2tlbiBq czItQ09NTUEpKQorICAgICAgKHNldHEgb3AtcG9zICgtIChqczItY3VycmVudC10b2tlbi1iZWcp IHBvcykpICA7IHJlbGF0aXZlCisgICAgICAoaWYgKD0gKGpzMi1wZWVrLXRva2VuKSBqczItWUlF TEQpCisgICAgICAgICAgKGpzMi1yZXBvcnQtZXJyb3IgIm1zZy55aWVsZC5wYXJlbnRoZXNpemVk IikpCisgICAgICAoc2V0cSByaWdodCAoanMyLXBhcnNlLWFzc2lnbi1leHByKQorICAgICAgICAg ICAgbGVmdCBwbgorICAgICAgICAgICAgcG4gKG1ha2UtanMyLWluZml4LW5vZGUgOnR5cGUganMy LUNPTU1BCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6cG9zIHBvcworICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmxlbiAoLSBqczItdHMtY3Vyc29yIHBv cykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpvcC1wb3Mgb3AtcG9zCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6bGVmdCBsZWZ0CisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICA6cmlnaHQgcmlnaHQpKQorICAgICAgKGpzMi1ub2Rl LWFkZC1jaGlsZHJlbiBwbiBsZWZ0IHJpZ2h0KSkKKyAgICBwbikpCisKKyhkZWZ1biBqczItcGFy c2UtYXNzaWduLWV4cHIgKCkKKyAgKGxldCAoKHR0IChqczItZ2V0LXRva2VuKSkKKyAgICAgICAg KHBvcyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKSkKKyAgICAgICAgcG4gbGVmdCByaWdodCBvcC1w b3MKKyAgICAgICAgdHMtc3RhdGUgcmVjb3JkZWQtaWRlbnRpZmllcnMgcGFyc2VkLWVycm9ycykK KyAgICAoaWYgKD0gdHQganMyLVlJRUxEKQorICAgICAgICAoanMyLXBhcnNlLXJldHVybi1vci15 aWVsZCB0dCB0KQorICAgICAgOzsgU2F2ZSB0aGUgdG9rZW5pemVyIHN0YXRlIGluIGNhc2Ugd2Ug ZmluZCBhbiBhcnJvdyBmdW5jdGlvbgorICAgICAgOzsgYW5kIGhhdmUgdG8gcmV3aW5kLgorICAg ICAgKHNldHEgdHMtc3RhdGUgKG1ha2UtanMyLXRzLXN0YXRlKQorICAgICAgICAgICAgcmVjb3Jk ZWQtaWRlbnRpZmllcnMganMyLXJlY29yZGVkLWlkZW50aWZpZXJzCisgICAgICAgICAgICBwYXJz ZWQtZXJyb3JzIGpzMi1wYXJzZWQtZXJyb3JzKQorICAgICAgOzsgbm90IHlpZWxkIC0gcGFyc2Ug YXNzaWdubWVudCBleHByZXNzaW9uCisgICAgICAoc2V0cSBwbiAoanMyLXBhcnNlLWNvbmQtZXhw cikKKyAgICAgICAgICAgIHR0IChqczItZ2V0LXRva2VuKSkKKyAgICAgIChjb25kCisgICAgICAg KChhbmQgKDw9IGpzMi1maXJzdC1hc3NpZ24gdHQpCisgICAgICAgICAgICAgKDw9IHR0IGpzMi1s YXN0LWFzc2lnbikpCisgICAgICAgIDs7IHR0IGV4cHJlc3MgYXNzaWdubWVudCAoPSwgfD0sIF49 LCAuLi4sICU9KQorICAgICAgICAoc2V0cSBvcC1wb3MgKC0gKGpzMi1jdXJyZW50LXRva2VuLWJl ZykgcG9zKSAgOyByZWxhdGl2ZQorICAgICAgICAgICAgICBsZWZ0IHBuKQorICAgICAgICAoc2V0 cSByaWdodCAoanMyLXBhcnNlLWFzc2lnbi1leHByKQorICAgICAgICAgICAgICBwbiAobWFrZS1q czItYXNzaWduLW5vZGUgOnR5cGUgdHQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDpwb3MgcG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6 bGVuICgtIChqczItbm9kZS1lbmQgcmlnaHQpIHBvcykKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDpvcC1wb3Mgb3AtcG9zCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA6bGVmdCBsZWZ0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6cmlnaHQgcmlnaHQpKQorICAgICAgICAod2hlbiBqczItcGFyc2UtaWRlLW1vZGUK KyAgICAgICAgICAoanMyLWhpZ2hsaWdodC1hc3NpZ24tdGFyZ2V0cyBwbiBsZWZ0IHJpZ2h0KQor ICAgICAgICAgIChqczItcmVjb3JkLWltZW51LWZ1bmN0aW9ucyByaWdodCBsZWZ0KSkKKyAgICAg ICAgOzsgZG8gdGhpcyBsYXN0IHNvIGlkZSBjaGVja3MgYWJvdmUgY2FuIHVzZSBhYnNvbHV0ZSBw b3NpdGlvbnMKKyAgICAgICAgKGpzMi1ub2RlLWFkZC1jaGlsZHJlbiBwbiBsZWZ0IHJpZ2h0KSkK KyAgICAgICAoKGFuZCAoPSB0dCBqczItQVJST1cpCisgICAgICAgICAgICAgKD49IGpzMi1sYW5n dWFnZS12ZXJzaW9uIDIwMCkpCisgICAgICAgIChqczItdHMtc2VlayB0cy1zdGF0ZSkKKyAgICAg ICAgKHNldHEganMyLXJlY29yZGVkLWlkZW50aWZpZXJzIHJlY29yZGVkLWlkZW50aWZpZXJzCisg ICAgICAgICAgICAgIGpzMi1wYXJzZWQtZXJyb3JzIHBhcnNlZC1lcnJvcnMpCisgICAgICAgIChz ZXRxIHBuIChqczItcGFyc2UtZnVuY3Rpb24gJ0ZVTkNUSU9OX0FSUk9XIChqczItY3VycmVudC10 b2tlbi1iZWcpIG5pbCkpKQorICAgICAgICh0CisgICAgICAgIChqczItdW5nZXQtdG9rZW4pKSkK KyAgICAgIHBuKSkpCisKKyhkZWZ1biBqczItcGFyc2UtY29uZC1leHByICgpCisgIChsZXQgKChw b3MgKGpzMi1jdXJyZW50LXRva2VuLWJlZykpCisgICAgICAgIChwbiAoanMyLXBhcnNlLW9yLWV4 cHIpKQorICAgICAgICB0ZXN0LWV4cHIKKyAgICAgICAgaWYtdHJ1ZQorICAgICAgICBpZi1mYWxz ZQorICAgICAgICBxLXBvcworICAgICAgICBjLXBvcykKKyAgICAod2hlbiAoanMyLW1hdGNoLXRv a2VuIGpzMi1IT09LKQorICAgICAgKHNldHEgcS1wb3MgKC0gKGpzMi1jdXJyZW50LXRva2VuLWJl ZykgcG9zKQorICAgICAgICAgICAgaWYtdHJ1ZSAobGV0IChqczItaW4tZm9yLWluaXQpIChqczIt cGFyc2UtYXNzaWduLWV4cHIpKSkKKyAgICAgIChqczItbXVzdC1tYXRjaCBqczItQ09MT04gIm1z Zy5uby5jb2xvbi5jb25kIikKKyAgICAgIChzZXRxIGMtcG9zICgtIChqczItY3VycmVudC10b2tl bi1iZWcpIHBvcykKKyAgICAgICAgICAgIGlmLWZhbHNlIChqczItcGFyc2UtYXNzaWduLWV4cHIp CisgICAgICAgICAgICB0ZXN0LWV4cHIgcG4KKyAgICAgICAgICAgIHBuIChtYWtlLWpzMi1jb25k LW5vZGUgOnBvcyBwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmxlbiAo LSAoanMyLW5vZGUtZW5kIGlmLWZhbHNlKSBwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDp0ZXN0LWV4cHIgdGVzdC1leHByCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDp0cnVlLWV4cHIgaWYtdHJ1ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6ZmFsc2UtZXhwciBpZi1mYWxzZQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6cS1wb3MgcS1wb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg OmMtcG9zIGMtcG9zKSkKKyAgICAgIChqczItbm9kZS1hZGQtY2hpbGRyZW4gcG4gdGVzdC1leHBy IGlmLXRydWUgaWYtZmFsc2UpKQorICAgIHBuKSkKKworKGRlZnVuIGpzMi1tYWtlLWJpbmFyeSAo dHlwZSBsZWZ0IHBhcnNlcikKKyAgIkhlbHBlciBmb3IgY29uc3RydWN0aW5nIGEgYmluYXJ5LW9w ZXJhdG9yIEFTVCBub2RlLgorTEVGVCBpcyB0aGUgbGVmdC1zaWRlLWV4cHJlc3Npb24sIGFscmVh ZHkgcGFyc2VkLCBhbmQgdGhlCitiaW5hcnkgb3BlcmF0b3Igc2hvdWxkIGhhdmUganVzdCBiZWVu IG1hdGNoZWQuCitQQVJTRVIgaXMgYSBmdW5jdGlvbiB0byBjYWxsIHRvIHBhcnNlIHRoZSByaWdo dCBvcGVyYW5kLAorb3IgYSBganMyLW5vZGUnIHN0cnVjdCBpZiBpdCBoYXMgYWxyZWFkeSBiZWVu IHBhcnNlZC4KK0ZJWE1FOiBUaGUgbGF0dGVyIG9wdGlvbiBpcyB1bnVzZWQ/IgorICAobGV0KiAo KHBvcyAoanMyLW5vZGUtcG9zIGxlZnQpKQorICAgICAgICAgKG9wLXBvcyAoLSAoanMyLWN1cnJl bnQtdG9rZW4tYmVnKSBwb3MpKQorICAgICAgICAgKHJpZ2h0IChpZiAoanMyLW5vZGUtcCBwYXJz ZXIpCisgICAgICAgICAgICAgICAgICAgIHBhcnNlcgorICAgICAgICAgICAgICAgICAgKGpzMi1n ZXQtdG9rZW4pCisgICAgICAgICAgICAgICAgICAoZnVuY2FsbCBwYXJzZXIpKSkKKyAgICAgICAg IChwbiAobWFrZS1qczItaW5maXgtbm9kZSA6dHlwZSB0eXBlCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgOnBvcyBwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA6bGVuICgtIChqczItbm9kZS1lbmQgcmlnaHQpIHBvcykKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICA6b3AtcG9zIG9wLXBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDpsZWZ0IGxlZnQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6cmln aHQgcmlnaHQpKSkKKyAgICAoanMyLW5vZGUtYWRkLWNoaWxkcmVuIHBuIGxlZnQgcmlnaHQpCisg ICAgcG4pKQorCisoZGVmdW4ganMyLXBhcnNlLW9yLWV4cHIgKCkKKyAgKGxldCAoKHBuIChqczIt cGFyc2UtYW5kLWV4cHIpKSkKKyAgICAod2hlbiAoanMyLW1hdGNoLXRva2VuIGpzMi1PUikKKyAg ICAgIChzZXRxIHBuIChqczItbWFrZS1iaW5hcnkganMyLU9SCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHBuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdqczItcGFy c2Utb3ItZXhwcikpKQorICAgIHBuKSkKKworKGRlZnVuIGpzMi1wYXJzZS1hbmQtZXhwciAoKQor ICAobGV0ICgocG4gKGpzMi1wYXJzZS1iaXQtb3ItZXhwcikpKQorICAgICh3aGVuIChqczItbWF0 Y2gtdG9rZW4ganMyLUFORCkKKyAgICAgIChzZXRxIHBuIChqczItbWFrZS1iaW5hcnkganMyLUFO RAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbgorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAnanMyLXBhcnNlLWFuZC1leHByKSkpCisgICAgcG4pKQorCisoZGVmdW4g anMyLXBhcnNlLWJpdC1vci1leHByICgpCisgIChsZXQgKChwbiAoanMyLXBhcnNlLWJpdC14b3It ZXhwcikpKQorICAgICh3aGlsZSAoanMyLW1hdGNoLXRva2VuIGpzMi1CSVRPUikKKyAgICAgIChz ZXRxIHBuIChqczItbWFrZS1iaW5hcnkganMyLUJJVE9SCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIHBuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdqczItcGFyc2Ut Yml0LXhvci1leHByKSkpCisgICAgcG4pKQorCisoZGVmdW4ganMyLXBhcnNlLWJpdC14b3ItZXhw ciAoKQorICAobGV0ICgocG4gKGpzMi1wYXJzZS1iaXQtYW5kLWV4cHIpKSkKKyAgICAod2hpbGUg KGpzMi1tYXRjaC10b2tlbiBqczItQklUWE9SKQorICAgICAgKHNldHEgcG4gKGpzMi1tYWtlLWJp bmFyeSBqczItQklUWE9SCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBuCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICdqczItcGFyc2UtYml0LWFuZC1leHByKSkpCisg ICAgcG4pKQorCisoZGVmdW4ganMyLXBhcnNlLWJpdC1hbmQtZXhwciAoKQorICAobGV0ICgocG4g KGpzMi1wYXJzZS1lcS1leHByKSkpCisgICAgKHdoaWxlIChqczItbWF0Y2gtdG9rZW4ganMyLUJJ VEFORCkKKyAgICAgIChzZXRxIHBuIChqczItbWFrZS1iaW5hcnkganMyLUJJVEFORAorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBwbgorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAnanMyLXBhcnNlLWVxLWV4cHIpKSkKKyAgICBwbikpCisKKyhkZWZjb25zdCBqczItcGFy c2UtZXEtb3BzCisgIChsaXN0IGpzMi1FUSBqczItTkUganMyLVNIRVEganMyLVNITkUpKQorCiso ZGVmdW4ganMyLXBhcnNlLWVxLWV4cHIgKCkKKyAgKGxldCAoKHBuIChqczItcGFyc2UtcmVsLWV4 cHIpKQorICAgICAgICB0dCkKKyAgICAod2hpbGUgKG1lbXEgKHNldHEgdHQgKGpzMi1nZXQtdG9r ZW4pKSBqczItcGFyc2UtZXEtb3BzKQorICAgICAgKHNldHEgcG4gKGpzMi1tYWtlLWJpbmFyeSB0 dAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwbgorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAnanMyLXBhcnNlLXJlbC1leHByKSkpCisgICAgKGpzMi11bmdldC10b2tl bikKKyAgICBwbikpCisKKyhkZWZjb25zdCBqczItcGFyc2UtcmVsLW9wcworICAobGlzdCBqczIt SU4ganMyLUlOU1RBTkNFT0YganMyLUxFIGpzMi1MVCBqczItR0UganMyLUdUKSkKKworKGRlZnVu IGpzMi1wYXJzZS1yZWwtZXhwciAoKQorICAobGV0ICgocG4gKGpzMi1wYXJzZS1zaGlmdC1leHBy KSkKKyAgICAgICAgKGNvbnRpbnVlIHQpCisgICAgICAgIHR0KQorICAgICh3aGlsZSBjb250aW51 ZQorICAgICAgKHNldHEgdHQgKGpzMi1nZXQtdG9rZW4pKQorICAgICAgKGNvbmQKKyAgICAgICAo KGFuZCBqczItaW4tZm9yLWluaXQgKD0gdHQganMyLUlOKSkKKyAgICAgICAgKGpzMi11bmdldC10 b2tlbikKKyAgICAgICAgKHNldHEgY29udGludWUgbmlsKSkKKyAgICAgICAoKG1lbXEgdHQganMy LXBhcnNlLXJlbC1vcHMpCisgICAgICAgIChzZXRxIHBuIChqczItbWFrZS1iaW5hcnkgdHQgcG4g J2pzMi1wYXJzZS1zaGlmdC1leHByKSkpCisgICAgICAgKHQKKyAgICAgICAgKGpzMi11bmdldC10 b2tlbikKKyAgICAgICAgKHNldHEgY29udGludWUgbmlsKSkpKQorICAgIHBuKSkKKworKGRlZmNv bnN0IGpzMi1wYXJzZS1zaGlmdC1vcHMKKyAgKGxpc3QganMyLUxTSCBqczItVVJTSCBqczItUlNI KSkKKworKGRlZnVuIGpzMi1wYXJzZS1zaGlmdC1leHByICgpCisgIChsZXQgKChwbiAoanMyLXBh cnNlLWFkZC1leHByKSkKKyAgICAgICAgdHQKKyAgICAgICAgKGNvbnRpbnVlIHQpKQorICAgICh3 aGlsZSBjb250aW51ZQorICAgICAgKHNldHEgdHQgKGpzMi1nZXQtdG9rZW4pKQorICAgICAgKGlm IChtZW1xIHR0IGpzMi1wYXJzZS1zaGlmdC1vcHMpCisgICAgICAgICAgKHNldHEgcG4gKGpzMi1t YWtlLWJpbmFyeSB0dCBwbiAnanMyLXBhcnNlLWFkZC1leHByKSkKKyAgICAgICAgKGpzMi11bmdl dC10b2tlbikKKyAgICAgICAgKHNldHEgY29udGludWUgbmlsKSkpCisgICAgcG4pKQorCisoZGVm dW4ganMyLXBhcnNlLWFkZC1leHByICgpCisgIChsZXQgKChwbiAoanMyLXBhcnNlLW11bC1leHBy KSkKKyAgICAgICAgdHQKKyAgICAgICAgKGNvbnRpbnVlIHQpKQorICAgICh3aGlsZSBjb250aW51 ZQorICAgICAgKHNldHEgdHQgKGpzMi1nZXQtdG9rZW4pKQorICAgICAgKGlmIChvciAoPSB0dCBq czItQUREKSAoPSB0dCBqczItU1VCKSkKKyAgICAgICAgICAoc2V0cSBwbiAoanMyLW1ha2UtYmlu YXJ5IHR0IHBuICdqczItcGFyc2UtbXVsLWV4cHIpKQorICAgICAgICAoanMyLXVuZ2V0LXRva2Vu KQorICAgICAgICAoc2V0cSBjb250aW51ZSBuaWwpKSkKKyAgICBwbikpCisKKyhkZWZjb25zdCBq czItcGFyc2UtbXVsLW9wcworICAobGlzdCBqczItTVVMIGpzMi1ESVYganMyLU1PRCkpCisKKyhk ZWZ1biBqczItcGFyc2UtbXVsLWV4cHIgKCkKKyAgKGxldCAoKHBuIChqczItcGFyc2UtdW5hcnkt ZXhwcikpCisgICAgICAgIHR0CisgICAgICAgIChjb250aW51ZSB0KSkKKyAgICAod2hpbGUgY29u dGludWUKKyAgICAgIChzZXRxIHR0IChqczItZ2V0LXRva2VuKSkKKyAgICAgIChpZiAobWVtcSB0 dCBqczItcGFyc2UtbXVsLW9wcykKKyAgICAgICAgICAoc2V0cSBwbiAoanMyLW1ha2UtYmluYXJ5 IHR0IHBuICdqczItcGFyc2UtdW5hcnktZXhwcikpCisgICAgICAgIChqczItdW5nZXQtdG9rZW4p CisgICAgICAgIChzZXRxIGNvbnRpbnVlIG5pbCkpKQorICAgIHBuKSkKKworKGRlZnVuIGpzMi1t YWtlLXVuYXJ5ICh0eXBlIHBhcnNlciAmcmVzdCBhcmdzKQorICAiTWFrZSBhIHVuYXJ5IG5vZGUg b2YgdHlwZSBUWVBFLgorUEFSU0VSIGlzIGVpdGhlciBhIG5vZGUgKGZvciBwb3N0Zml4IG9wZXJh dG9ycykgb3IgYSBmdW5jdGlvbiB0byBjYWxsCit0byBwYXJzZSB0aGUgb3BlcmFuZCAoZm9yIHBy ZWZpeCBvcGVyYXRvcnMpLiIKKyAgKGxldCogKChwb3MgKGpzMi1jdXJyZW50LXRva2VuLWJlZykp CisgICAgICAgICAocG9zdGZpeCAoanMyLW5vZGUtcCBwYXJzZXIpKQorICAgICAgICAgKGV4cHIg KGlmIHBvc3RmaXgKKyAgICAgICAgICAgICAgICAgICBwYXJzZXIKKyAgICAgICAgICAgICAgICAg KGFwcGx5IHBhcnNlciBhcmdzKSkpCisgICAgICAgICBlbmQKKyAgICAgICAgIHBuKQorICAgIChp ZiBwb3N0Zml4ICA7IGUuZy4gaSsrCisgICAgICAgIChzZXRxIHBvcyAoanMyLW5vZGUtcG9zIGV4 cHIpCisgICAgICAgICAgICAgIGVuZCAoanMyLWN1cnJlbnQtdG9rZW4tZW5kKSkKKyAgICAgIChz ZXRxIGVuZCAoanMyLW5vZGUtZW5kIGV4cHIpKSkKKyAgICAoc2V0cSBwbiAobWFrZS1qczItdW5h cnktbm9kZSA6dHlwZSB0eXBlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOnBv cyBwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6bGVuICgtIGVuZCBwb3Mp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOm9wZXJhbmQgZXhwcikpCisgICAg KGpzMi1ub2RlLWFkZC1jaGlsZHJlbiBwbiBleHByKQorICAgIHBuKSkKKworKGRlZmNvbnN0IGpz Mi1pbmNyZW1lbnRhYmxlLW5vZGUtdHlwZXMKKyAgKGxpc3QganMyLU5BTUUganMyLUdFVFBST1Ag anMyLUdFVEVMRU0ganMyLUdFVF9SRUYganMyLUNBTEwpCisgICJOb2RlIHR5cGVzIHRoYXQgY2Fu IGJlIHRoZSBvcGVyYW5kIG9mIGEgKysgb3IgLS0gb3BlcmF0b3IuIikKKworKGRlZnVuIGpzMi1j aGVjay1iYWQtaW5jLWRlYyAodHQgYmVnIGVuZCB1bmFyeSkKKyAgKHVubGVzcyAobWVtcSAoanMy LW5vZGUtdHlwZSAoanMyLXVuYXJ5LW5vZGUtb3BlcmFuZCB1bmFyeSkpCisgICAgICAgICAgICAg ICAganMyLWluY3JlbWVudGFibGUtbm9kZS10eXBlcykKKyAgICAoanMyLXJlcG9ydC1lcnJvciAo aWYgKD0gdHQganMyLUlOQykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIm1zZy5iYWQuaW5j ciIKKyAgICAgICAgICAgICAgICAgICAgICAgICJtc2cuYmFkLmRlY3IiKQorICAgICAgICAgICAg ICAgICAgICAgIG5pbCBiZWcgKC0gZW5kIGJlZykpKSkKKworKGRlZnVuIGpzMi1wYXJzZS11bmFy eS1leHByICgpCisgIChsZXQgKCh0dCAoanMyLWN1cnJlbnQtdG9rZW4tdHlwZSkpCisgICAgICAg IHBuIGV4cHIgYmVnIGVuZCkKKyAgICAoY29uZAorICAgICAoKG9yICg9IHR0IGpzMi1WT0lEKQor ICAgICAgICAgICg9IHR0IGpzMi1OT1QpCisgICAgICAgICAgKD0gdHQganMyLUJJVE5PVCkKKyAg ICAgICAgICAoPSB0dCBqczItVFlQRU9GKSkKKyAgICAgIChqczItZ2V0LXRva2VuKQorICAgICAg KGpzMi1tYWtlLXVuYXJ5IHR0ICdqczItcGFyc2UtdW5hcnktZXhwcikpCisgICAgICgoPSB0dCBq czItQUREKQorICAgICAgKGpzMi1nZXQtdG9rZW4pCisgICAgICA7OyBDb252ZXJ0IHRvIHNwZWNp YWwgUE9TIHRva2VuIGluIGRlY29tcGlsZXIgYW5kIHBhcnNlIHRyZWUKKyAgICAgIChqczItbWFr ZS11bmFyeSBqczItUE9TICdqczItcGFyc2UtdW5hcnktZXhwcikpCisgICAgICgoPSB0dCBqczIt U1VCKQorICAgICAgKGpzMi1nZXQtdG9rZW4pCisgICAgICA7OyBDb252ZXJ0IHRvIHNwZWNpYWwg TkVHIHRva2VuIGluIGRlY29tcGlsZXIgYW5kIHBhcnNlIHRyZWUKKyAgICAgIChqczItbWFrZS11 bmFyeSBqczItTkVHICdqczItcGFyc2UtdW5hcnktZXhwcikpCisgICAgICgob3IgKD0gdHQganMy LUlOQykKKyAgICAgICAgICAoPSB0dCBqczItREVDKSkKKyAgICAgIChqczItZ2V0LXRva2VuKQor ICAgICAgKHByb2cxCisgICAgICAgICAgKHNldHEgYmVnIChqczItY3VycmVudC10b2tlbi1iZWcp CisgICAgICAgICAgICAgICAgZW5kIChqczItY3VycmVudC10b2tlbi1lbmQpCisgICAgICAgICAg ICAgICAgZXhwciAoanMyLW1ha2UtdW5hcnkgdHQgJ2pzMi1wYXJzZS1tZW1iZXItZXhwciB0KSkK KyAgICAgICAgKGpzMi1jaGVjay1iYWQtaW5jLWRlYyB0dCBiZWcgZW5kIGV4cHIpKSkKKyAgICAg KCg9IHR0IGpzMi1ERUxQUk9QKQorICAgICAgKGpzMi1nZXQtdG9rZW4pCisgICAgICAoanMyLW1h a2UtdW5hcnkganMyLURFTFBST1AgJ2pzMi1wYXJzZS11bmFyeS1leHByKSkKKyAgICAgKCg9IHR0 IGpzMi1FUlJPUikKKyAgICAgIChqczItZ2V0LXRva2VuKQorICAgICAgKG1ha2UtanMyLWVycm9y LW5vZGUpKSAgOyB0cnkgdG8gY29udGludWUKKyAgICAgKChhbmQgKD0gdHQganMyLUxUKQorICAg ICAgICAgICBqczItY29tcGlsZXIteG1sLWF2YWlsYWJsZSkKKyAgICAgIDs7IFhNTCBzdHJlYW0g ZW5jb3VudGVyZWQgaW4gZXhwcmVzc2lvbi4KKyAgICAgIChqczItcGFyc2UtbWVtYmVyLWV4cHIt dGFpbCB0IChqczItcGFyc2UteG1sLWluaXRpYWxpemVyKSkpCisgICAgICh0CisgICAgICAoc2V0 cSBwbiAoanMyLXBhcnNlLW1lbWJlci1leHByIHQpCisgICAgICAgICAgICA7OyBEb24ndCBsb29r IGFjcm9zcyBhIG5ld2xpbmUgYm91bmRhcnkgZm9yIGEgcG9zdGZpeCBpbmNvcC4KKyAgICAgICAg ICAgIHR0IChqczItcGVlay10b2tlbi1vci1lb2wpKQorICAgICAgKHdoZW4gKG9yICg9IHR0IGpz Mi1JTkMpICg9IHR0IGpzMi1ERUMpKQorICAgICAgICAoanMyLWdldC10b2tlbikKKyAgICAgICAg KHNldGYgZXhwciBwbgorICAgICAgICAgICAgICBwbiAoanMyLW1ha2UtdW5hcnkgdHQgZXhwcikp CisgICAgICAgIChqczItbm9kZS1zZXQtcHJvcCBwbiAncG9zdGZpeCB0KQorICAgICAgICAoanMy LWNoZWNrLWJhZC1pbmMtZGVjIHR0IChqczItY3VycmVudC10b2tlbi1iZWcpIChqczItY3VycmVu dC10b2tlbi1lbmQpIHBuKSkKKyAgICAgIHBuKSkpKQorCisoZGVmdW4ganMyLXBhcnNlLXhtbC1p bml0aWFsaXplciAoKQorICAiUGFyc2UgYW4gRTRYIFhNTCBpbml0aWFsaXplci4KK0knbSBwYXJz aW5nIGl0IHRoZSB3YXkgUmhpbm8gcGFyc2VzIGl0LCBidXQgd2l0aG91dCB0aGUgdHJlZS1yZXdy aXRpbmcuCitUaGVuIEknbGwgcG9zdHByb2Nlc3MgdGhlIHJlc3VsdCwgZGVwZW5kaW5nIG9uIHdo ZXRoZXIgd2UncmUgaW4gSURFCittb2RlIG9yIGNvZGVnZW4gbW9kZSwgYW5kIGdlbmVyYXRlIHRo ZSBhcHByb3ByaWF0ZSByZXdyaXR0ZW4gQVNULgorSURFIG1vZGUgdXNlcyBhIHJpY2ggQVNUIHRo YXQgbW9kZWxzIHRoZSBYTUwgc3RydWN0dXJlLiAgQ29kZWdlbiBtb2RlCitqdXN0IGNvbmNhdGVu YXRlcyBldmVyeXRoaW5nIGFuZCBtYWtlcyBhIG5ldyBYTUwgb3IgWE1MTGlzdCBvdXQgb2YgaXQu IgorICAobGV0ICgodHQgKGpzMi1nZXQtZmlyc3QteG1sLXRva2VuKSkKKyAgICAgICAgcG4teG1s IHBuIGV4cHIga2lkcyBleHByLXBvcworICAgICAgICAoY29udGludWUgdCkKKyAgICAgICAgKGZp cnN0LXRva2VuIHQpKQorICAgICh3aGVuIChub3QgKG9yICg9IHR0IGpzMi1YTUwpICg9IHR0IGpz Mi1YTUxFTkQpKSkKKyAgICAgIChqczItcmVwb3J0LWVycm9yICJtc2cuc3ludGF4IikpCisgICAg KHNldHEgcG4teG1sIChtYWtlLWpzMi14bWwtbm9kZSkpCisgICAgKHdoaWxlIGNvbnRpbnVlCisg ICAgICAoaWYgZmlyc3QtdG9rZW4KKyAgICAgICAgICAoc2V0cSBmaXJzdC10b2tlbiBuaWwpCisg ICAgICAgIChzZXRxIHR0IChqczItZ2V0LW5leHQteG1sLXRva2VuKSkpCisgICAgICAoY29uZAor ICAgICAgIDs7IGpzMi1YTUwgbWVhbnMgd2UgZm91bmQgYSB7ZXhwcn0gaW4gdGhlIFhNTCBzdHJl YW0uCisgICAgICAgOzsgVGhlIHRva2VuIHN0cmluZyBpcyB0aGUgWE1MIHVwIHRvIHRoZSBsZWZ0 LWN1cmx5LgorICAgICAgICgoPSB0dCBqczItWE1MKQorICAgICAgICAocHVzaCAobWFrZS1qczIt c3RyaW5nLW5vZGUgOnBvcyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgOmxlbiAoLSBqczItdHMtY3Vyc29yIChqczItY3VycmVudC10 b2tlbi1iZWcpKSkKKyAgICAgICAgICAgICAga2lkcykKKyAgICAgICAgKGpzMi1tdXN0LW1hdGNo IGpzMi1MQyAibXNnLnN5bnRheCIpCisgICAgICAgIChzZXRxIGV4cHItcG9zIGpzMi10cy1jdXJz b3IKKyAgICAgICAgICAgICAgZXhwciAoaWYgKGVxIChqczItcGVlay10b2tlbikganMyLVJDKQor ICAgICAgICAgICAgICAgICAgICAgICAobWFrZS1qczItZW1wdHktZXhwci1ub2RlIDpwb3MgZXhw ci1wb3MpCisgICAgICAgICAgICAgICAgICAgICAoanMyLXBhcnNlLWV4cHIpKSkKKyAgICAgICAg KGpzMi1tdXN0LW1hdGNoIGpzMi1SQyAibXNnLnN5bnRheCIpCisgICAgICAgIChzZXRxIHBuICht YWtlLWpzMi14bWwtanMtZXhwci1ub2RlIDpwb3MgKGpzMi1ub2RlLXBvcyBleHByKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6bGVuIChqczItbm9kZS1sZW4g ZXhwcikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmV4cHIg ZXhwcikpCisgICAgICAgIChqczItbm9kZS1hZGQtY2hpbGRyZW4gcG4gZXhwcikKKyAgICAgICAg KHB1c2ggcG4ga2lkcykpCisgICAgICAgOzsgYSBqczItWE1MRU5EIHRva2VuIG1lYW5zIHdlIGhp dCB0aGUgZmluYWwgY2xvc2UtdGFnLgorICAgICAgICgoPSB0dCBqczItWE1MRU5EKQorICAgICAg ICAocHVzaCAobWFrZS1qczItc3RyaW5nLW5vZGUgOnBvcyAoanMyLWN1cnJlbnQtdG9rZW4tYmVn KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmxlbiAoLSBqczItdHMtY3Vy c29yIChqczItY3VycmVudC10b2tlbi1iZWcpKSkKKyAgICAgICAgICAgICAga2lkcykKKyAgICAg ICAgKGRvbGlzdCAoa2lkIChucmV2ZXJzZSBraWRzKSkKKyAgICAgICAgICAoanMyLWJsb2NrLW5v ZGUtcHVzaCBwbi14bWwga2lkKSkKKyAgICAgICAgKHNldGYgKGpzMi1ub2RlLWxlbiBwbi14bWwp ICgtIGpzMi10cy1jdXJzb3IKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IChqczItbm9kZS1wb3MgcG4teG1sKSkKKyAgICAgICAgICAgICAgY29udGludWUgbmlsKSkKKyAg ICAgICAodAorICAgICAgICAoanMyLXJlcG9ydC1lcnJvciAibXNnLnN5bnRheCIpCisgICAgICAg IChzZXRxIGNvbnRpbnVlIG5pbCkpKSkKKyAgICBwbi14bWwpKQorCisKKyhkZWZ1biBqczItcGFy c2UtYXJndW1lbnQtbGlzdCAoKQorICAiUGFyc2UgYW4gYXJndW1lbnQgbGlzdCBhbmQgcmV0dXJu IGl0IGFzIGEgTGlzcCBsaXN0IG9mIG5vZGVzLgorUmV0dXJucyB0aGUgbGlzdCBpbiByZXZlcnNl IG9yZGVyLiAgQ29uc3VtZXMgdGhlIHJpZ2h0LXBhcmVuIHRva2VuLiIKKyAgKGxldCAocmVzdWx0 KQorICAgICh1bmxlc3MgKGpzMi1tYXRjaC10b2tlbiBqczItUlApCisgICAgICAoY2wtbG9vcCBk bworICAgICAgICAgICAgICAgKGxldCAoKHR0IChqczItZ2V0LXRva2VuKSkpCisgICAgICAgICAg ICAgICAgIChpZiAoPSB0dCBqczItWUlFTEQpCisgICAgICAgICAgICAgICAgICAgICAoanMyLXJl cG9ydC1lcnJvciAibXNnLnlpZWxkLnBhcmVudGhlc2l6ZWQiKSkKKyAgICAgICAgICAgICAgICAg KGlmIChhbmQgKD0gdHQganMyLVRSSVBMRURPVCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAg KD49IGpzMi1sYW5ndWFnZS12ZXJzaW9uIDIwMCkpCisgICAgICAgICAgICAgICAgICAgICAocHVz aCAoanMyLW1ha2UtdW5hcnkgdHQgJ2pzMi1wYXJzZS1hc3NpZ24tZXhwcikgcmVzdWx0KQorICAg ICAgICAgICAgICAgICAgIChqczItdW5nZXQtdG9rZW4pCisgICAgICAgICAgICAgICAgICAgKHB1 c2ggKGpzMi1wYXJzZS1hc3NpZ24tZXhwcikgcmVzdWx0KSkpCisgICAgICAgICAgICAgICB3aGls ZQorICAgICAgICAgICAgICAgKGpzMi1tYXRjaC10b2tlbiBqczItQ09NTUEpKQorICAgICAgKGpz Mi1tdXN0LW1hdGNoIGpzMi1SUCAibXNnLm5vLnBhcmVuLmFyZyIpCisgICAgICByZXN1bHQpKSkK KworKGRlZnVuIGpzMi1wYXJzZS1tZW1iZXItZXhwciAoJm9wdGlvbmFsIGFsbG93LWNhbGwtc3lu dGF4KQorICAobGV0ICgodHQgKGpzMi1jdXJyZW50LXRva2VuLXR5cGUpKQorICAgICAgICBwbiBw b3MgdGFyZ2V0IGFyZ3MgYmVnIGVuZCBpbml0KQorICAgIChpZiAoLz0gdHQganMyLU5FVykKKyAg ICAgICAgKHNldHEgcG4gKGpzMi1wYXJzZS1wcmltYXJ5LWV4cHIpKQorICAgICAgOzsgcGFyc2Ug YSAnbmV3JyBleHByZXNzaW9uCisgICAgICAoanMyLWdldC10b2tlbikKKyAgICAgIChzZXRxIHBv cyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKQorICAgICAgICAgICAgYmVnIHBvcworICAgICAgICAg ICAgdGFyZ2V0IChqczItcGFyc2UtbWVtYmVyLWV4cHIpCisgICAgICAgICAgICBlbmQgKGpzMi1u b2RlLWVuZCB0YXJnZXQpCisgICAgICAgICAgICBwbiAobWFrZS1qczItbmV3LW5vZGUgOnBvcyBw b3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6dGFyZ2V0IHRhcmdldAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpsZW4gKC0gZW5kIHBvcykpKQorICAgICAg KGpzMi1oaWdobGlnaHQtZnVuY3Rpb24tY2FsbCAoanMyLWN1cnJlbnQtdG9rZW4pKQorICAgICAg KGpzMi1ub2RlLWFkZC1jaGlsZHJlbiBwbiB0YXJnZXQpCisgICAgICAod2hlbiAoanMyLW1hdGNo LXRva2VuIGpzMi1MUCkKKyAgICAgICAgOzsgQWRkIHRoZSBhcmd1bWVudHMgdG8gcG4sIGlmIGFu eSBhcmUgc3VwcGxpZWQuCisgICAgICAgIChzZXRmIGJlZyBwb3MgIDsgc3RhcnQgb2YgIm5ldyIg a2V5d29yZAorICAgICAgICAgICAgICBwb3MgKGpzMi1jdXJyZW50LXRva2VuLWJlZykKKyAgICAg ICAgICAgICAgYXJncyAobnJldmVyc2UgKGpzMi1wYXJzZS1hcmd1bWVudC1saXN0KSkKKyAgICAg ICAgICAgICAgKGpzMi1uZXctbm9kZS1hcmdzIHBuKSBhcmdzCisgICAgICAgICAgICAgIGVuZCAo anMyLWN1cnJlbnQtdG9rZW4tZW5kKQorICAgICAgICAgICAgICAoanMyLW5ldy1ub2RlLWxwIHBu KSAoLSBwb3MgYmVnKQorICAgICAgICAgICAgICAoanMyLW5ldy1ub2RlLXJwIHBuKSAoLSBlbmQg MSBiZWcpKQorICAgICAgICAoYXBwbHkgIydqczItbm9kZS1hZGQtY2hpbGRyZW4gcG4gYXJncykp CisgICAgICAod2hlbiAoYW5kIGpzMi1hbGxvdy1yaGluby1uZXctZXhwci1pbml0aWFsaXplcgor ICAgICAgICAgICAgICAgICAoanMyLW1hdGNoLXRva2VuIGpzMi1MQykpCisgICAgICAgIChzZXRm IGluaXQgKGpzMi1wYXJzZS1vYmplY3QtbGl0ZXJhbCkKKyAgICAgICAgICAgICAgZW5kIChqczIt bm9kZS1lbmQgaW5pdCkKKyAgICAgICAgICAgICAgKGpzMi1uZXctbm9kZS1pbml0aWFsaXplciBw bikgaW5pdCkKKyAgICAgICAgKGpzMi1ub2RlLWFkZC1jaGlsZHJlbiBwbiBpbml0KSkKKyAgICAg ICAgKHNldGYgKGpzMi1ub2RlLWxlbiBwbikgKC0gZW5kIGJlZykpKSAgOyBlbmQgb3V0ZXIgaWYK KyAgICAoanMyLXBhcnNlLW1lbWJlci1leHByLXRhaWwgYWxsb3ctY2FsbC1zeW50YXggcG4pKSkK KworKGRlZnVuIGpzMi1wYXJzZS1tZW1iZXItZXhwci10YWlsIChhbGxvdy1jYWxsLXN5bnRheCBw bikKKyAgIlBhcnNlIGEgY2hhaW4gb2YgcHJvcGVydHkvYXJyYXkgYWNjZXNzZXMgb3IgZnVuY3Rp b24gY2FsbHMuCitJbmNsdWRlcyBwYXJzaW5nIGZvciBFNFggb3BlcmF0b3JzIGxpa2UgYC4uJyBh bmQgYC5AJy4KK0lmIEFMTE9XLUNBTEwtU1lOVEFYIGlzIG5pbCwgc3RvcHMgd2hlbiB3ZSBlbmNv dW50ZXIgYSBsZWZ0LXBhcmVuLgorUmV0dXJucyBhbiBleHByZXNzaW9uIHRyZWUgdGhhdCBpbmNs dWRlcyBQTiwgdGhlIHBhcmVudCBub2RlLiIKKyAgKGxldCAodHQKKyAgICAgICAgKGNvbnRpbnVl IHQpKQorICAgICh3aGlsZSBjb250aW51ZQorICAgICAgKHNldHEgdHQgKGpzMi1nZXQtdG9rZW4p KQorICAgICAgKGNvbmQKKyAgICAgICAoKG9yICg9IHR0IGpzMi1ET1QpICg9IHR0IGpzMi1ET1RE T1QpKQorICAgICAgICAoc2V0cSBwbiAoanMyLXBhcnNlLXByb3BlcnR5LWFjY2VzcyB0dCBwbikp KQorICAgICAgICgoPSB0dCBqczItRE9UUVVFUlkpCisgICAgICAgIChzZXRxIHBuIChqczItcGFy c2UtZG90LXF1ZXJ5IHBuKSkpCisgICAgICAgKCg9IHR0IGpzMi1MQikKKyAgICAgICAgKHNldHEg cG4gKGpzMi1wYXJzZS1lbGVtZW50LWdldCBwbikpKQorICAgICAgICgoPSB0dCBqczItTFApCisg ICAgICAgIChqczItdW5nZXQtdG9rZW4pCisgICAgICAgIChpZiBhbGxvdy1jYWxsLXN5bnRheAor ICAgICAgICAgICAgKHNldHEgcG4gKGpzMi1wYXJzZS1mdW5jdGlvbi1jYWxsIHBuKSkKKyAgICAg ICAgICAoc2V0cSBjb250aW51ZSBuaWwpKSkKKyAgICAgICAoKD0gdHQganMyLVRFTVBMQVRFX0hF QUQpCisgICAgICAgIChzZXRxIHBuIChqczItcGFyc2UtdGFnZ2VkLXRlbXBsYXRlIHBuIChqczIt cGFyc2UtdGVtcGxhdGUtbGl0ZXJhbCkpKSkKKyAgICAgICAoKD0gdHQganMyLU5PX1NVQlNfVEVN UExBVEUpCisgICAgICAgIChzZXRxIHBuIChqczItcGFyc2UtdGFnZ2VkLXRlbXBsYXRlIHBuICht YWtlLWpzMi1zdHJpbmctbm9kZSA6dHlwZSB0dCkpKSkKKyAgICAgICAodAorICAgICAgICAoanMy LXVuZ2V0LXRva2VuKQorICAgICAgICAoc2V0cSBjb250aW51ZSBuaWwpKSkpCisgICAgKGlmICg+ PSBqczItaGlnaGxpZ2h0LWxldmVsIDIpCisgICAgICAgIChqczItcGFyc2UtaGlnaGxpZ2h0LW1l bWJlci1leHByLW5vZGUgcG4pKQorICAgIHBuKSkKKworKGRlZnVuIGpzMi1wYXJzZS10YWdnZWQt dGVtcGxhdGUgKHRhZy1ub2RlIHRwbC1ub2RlKQorICAiUGFyc2UgdGFnZ2VkIHRlbXBsYXRlIGV4 cHJlc3Npb24uIgorICAobGV0KiAoKGJlZyAoanMyLW5vZGUtcG9zIHRhZy1ub2RlKSkKKyAgICAg ICAgIChwbiAobWFrZS1qczItdGFnZ2VkLXRlbXBsYXRlLW5vZGUgOmJlZyBiZWcKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmxlbiAoLSAoanMyLWN1cnJlbnQt dG9rZW4tZW5kKSBiZWcpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIDp0YWcgdGFnLW5vZGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgOnRlbXBsYXRlIHRwbC1ub2RlKSkpCisgICAgKGpzMi1ub2RlLWFkZC1jaGlsZHJlbiBw biB0YWctbm9kZSB0cGwtbm9kZSkKKyAgICBwbikpCisKKyhkZWZ1biBqczItcGFyc2UtZG90LXF1 ZXJ5IChwbikKKyAgIlBhcnNlIGEgZG90LXF1ZXJ5IGV4cHJlc3Npb24sIGUuZy4gZm9vLmJhci4o QG5hbWUgPT0gMikKK0xhc3QgdG9rZW4gcGFyc2VkIG11c3QgYmUgYGpzMi1ET1RRVUVSWScuIgor ICAobGV0ICgocG9zIChqczItbm9kZS1wb3MgcG4pKQorICAgICAgICBvcC1wb3MgZXhwciBlbmQp CisgICAgKGpzMi1tdXN0LWhhdmUteG1sKQorICAgIChqczItc2V0LXJlcXVpcmVzLWFjdGl2YXRp b24pCisgICAgKHNldHEgb3AtcG9zIChqczItY3VycmVudC10b2tlbi1iZWcpCisgICAgICAgICAg ZXhwciAoanMyLXBhcnNlLWV4cHIpCisgICAgICAgICAgZW5kIChqczItbm9kZS1lbmQgZXhwcikK KyAgICAgICAgICBwbiAobWFrZS1qczIteG1sLWRvdC1xdWVyeS1ub2RlIDpsZWZ0IHBuCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6cG9zIHBvcworICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOm9wLXBvcyBvcC1wb3MKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpyaWdodCBleHByKSkKKyAgICAoanMy LW5vZGUtYWRkLWNoaWxkcmVuIHBuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoanMyLXht bC1kb3QtcXVlcnktbm9kZS1sZWZ0IHBuKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgKGpz Mi14bWwtZG90LXF1ZXJ5LW5vZGUtcmlnaHQgcG4pKQorICAgIChpZiAoanMyLW11c3QtbWF0Y2gg anMyLVJQICJtc2cubm8ucGFyZW4iKQorICAgICAgICAoc2V0ZiAoanMyLXhtbC1kb3QtcXVlcnkt bm9kZS1ycCBwbikgKGpzMi1jdXJyZW50LXRva2VuLWJlZykKKyAgICAgICAgICAgICAgZW5kIChq czItY3VycmVudC10b2tlbi1lbmQpKSkKKyAgICAoc2V0ZiAoanMyLW5vZGUtbGVuIHBuKSAoLSBl bmQgcG9zKSkKKyAgICBwbikpCisKKyhkZWZ1biBqczItcGFyc2UtZWxlbWVudC1nZXQgKHBuKQor ICAiUGFyc2UgYW4gZWxlbWVudC1nZXQgZXhwcmVzc2lvbiwgZS5nLiBmb29bYmFyXS4KK0xhc3Qg dG9rZW4gcGFyc2VkIG11c3QgYmUgYGpzMi1SQicuIgorICAobGV0ICgobGIgKGpzMi1jdXJyZW50 LXRva2VuLWJlZykpCisgICAgICAgIChwb3MgKGpzMi1ub2RlLXBvcyBwbikpCisgICAgICAgIHJi IGV4cHIpCisgICAgKHNldHEgZXhwciAoanMyLXBhcnNlLWV4cHIpKQorICAgIChpZiAoanMyLW11 c3QtbWF0Y2gganMyLVJCICJtc2cubm8uYnJhY2tldC5pbmRleCIpCisgICAgICAgIChzZXRxIHJi IChqczItY3VycmVudC10b2tlbi1iZWcpKSkKKyAgICAoc2V0cSBwbiAobWFrZS1qczItZWxlbS1n ZXQtbm9kZSA6dGFyZ2V0IHBuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg OnBvcyBwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ZWxlbWVudCBl eHByCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmxiIChqczItcmVscG9z IGxiIHBvcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6cmIgKGpzMi1y ZWxwb3MgcmIgcG9zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpsZW4g KC0gKGpzMi1jdXJyZW50LXRva2VuLWVuZCkgcG9zKSkpCisgICAgKGpzMi1ub2RlLWFkZC1jaGls ZHJlbiBwbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgKGpzMi1lbGVtLWdldC1ub2RlLXRh cmdldCBwbikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIChqczItZWxlbS1nZXQtbm9kZS1l bGVtZW50IHBuKSkKKyAgICBwbikpCisKKyhkZWZ1biBqczItaGlnaGxpZ2h0LWZ1bmN0aW9uLWNh bGwgKHRva2VuKQorICAod2hlbiAoZXEgKGpzMi10b2tlbi10eXBlIHRva2VuKSBqczItTkFNRSkK KyAgICAoanMyLXJlY29yZC1mYWNlICdqczItZnVuY3Rpb24tY2FsbCB0b2tlbikpKQorCisoZGVm dW4ganMyLXBhcnNlLWZ1bmN0aW9uLWNhbGwgKHBuKQorICAoanMyLWhpZ2hsaWdodC1mdW5jdGlv bi1jYWxsIChqczItY3VycmVudC10b2tlbikpCisgIChqczItZ2V0LXRva2VuKQorICAobGV0IChh cmdzCisgICAgICAgIChwb3MgKGpzMi1ub2RlLXBvcyBwbikpKQorICAgIChzZXRxIHBuIChtYWtl LWpzMi1jYWxsLW5vZGUgOnBvcyBwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDp0YXJnZXQgcG4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpscCAoLSAoanMy LWN1cnJlbnQtdG9rZW4tYmVnKSBwb3MpKSkKKyAgICAoanMyLW5vZGUtYWRkLWNoaWxkcmVuIHBu IChqczItY2FsbC1ub2RlLXRhcmdldCBwbikpCisgICAgOzsgQWRkIHRoZSBhcmd1bWVudHMgdG8g cG4sIGlmIGFueSBhcmUgc3VwcGxpZWQuCisgICAgKHNldGYgYXJncyAobnJldmVyc2UgKGpzMi1w YXJzZS1hcmd1bWVudC1saXN0KSkKKyAgICAgICAgICAoanMyLWNhbGwtbm9kZS1ycCBwbikgKC0g KGpzMi1jdXJyZW50LXRva2VuLWJlZykgcG9zKQorICAgICAgICAgIChqczItY2FsbC1ub2RlLWFy Z3MgcG4pIGFyZ3MpCisgICAgKGFwcGx5ICMnanMyLW5vZGUtYWRkLWNoaWxkcmVuIHBuIGFyZ3Mp CisgICAgKHNldGYgKGpzMi1ub2RlLWxlbiBwbikgKC0ganMyLXRzLWN1cnNvciBwb3MpKQorICAg IHBuKSkKKworKGRlZnVuIGpzMi1wYXJzZS1wcm9wZXJ0eS1hY2Nlc3MgKHR0IHBuKQorICAiUGFy c2UgYSBwcm9wZXJ0eSBhY2Nlc3MsIFhNTCBkZXNjZW5kYW50cyBhY2Nlc3MsIG9yIFhNTCBhdHRy IGFjY2Vzcy4iCisgIChsZXQgKChtZW1iZXItdHlwZS1mbGFncyAwKQorICAgICAgICAoZG90LXBv cyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKSkKKyAgICAgICAgKGRvdC1sZW4gKGlmICg9IHR0IGpz Mi1ET1RET1QpIDIgMSkpCisgICAgICAgIG5hbWUKKyAgICAgICAgcmVmICA7IHJpZ2h0IHNpZGUg b2YgLiBvciAuLiBvcGVyYXRvcgorICAgICAgICByZXN1bHQpCisgICAgKHdoZW4gKD0gdHQganMy LURPVERPVCkKKyAgICAgIChqczItbXVzdC1oYXZlLXhtbCkKKyAgICAgIChzZXRxIG1lbWJlci10 eXBlLWZsYWdzIGpzMi1kZXNjZW5kYW50cy1mbGFnKSkKKyAgICAoaWYgKG5vdCBqczItY29tcGls ZXIteG1sLWF2YWlsYWJsZSkKKyAgICAgICAgKHByb2duCisgICAgICAgICAgKGpzMi1tdXN0LW1h dGNoLXByb3AtbmFtZSAibXNnLm5vLm5hbWUuYWZ0ZXIuZG90IikKKyAgICAgICAgICAoc2V0cSBu YW1lIChqczItY3JlYXRlLW5hbWUtbm9kZSB0IGpzMi1HRVRQUk9QKQorICAgICAgICAgICAgICAg IHJlc3VsdCAobWFrZS1qczItcHJvcC1nZXQtbm9kZSA6bGVmdCBwbgorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6cG9zIChqczItY3VycmVudC10b2tlbi1i ZWcpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpyaWdo dCBuYW1lCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDps ZW4gKGpzMi1jdXJyZW50LXRva2VuLWxlbikpKQorICAgICAgICAgIChqczItbm9kZS1hZGQtY2hp bGRyZW4gcmVzdWx0IHBuIG5hbWUpCisgICAgICAgICAgcmVzdWx0KQorICAgICAgOzsgb3RoZXJ3 aXNlIGxvb2sgZm9yIFhNTCBvcGVyYXRvcnMKKyAgICAgIChzZXRmIHJlc3VsdCAoaWYgKD0gdHQg anMyLURPVCkKKyAgICAgICAgICAgICAgICAgICAgICAgKG1ha2UtanMyLXByb3AtZ2V0LW5vZGUp CisgICAgICAgICAgICAgICAgICAgICAobWFrZS1qczItaW5maXgtbm9kZSA6dHlwZSBqczItRE9U RE9UKSkKKyAgICAgICAgICAgIChqczItbm9kZS1wb3MgcmVzdWx0KSAoanMyLW5vZGUtcG9zIHBu KQorICAgICAgICAgICAgKGpzMi1pbmZpeC1ub2RlLW9wLXBvcyByZXN1bHQpIGRvdC1wb3MKKyAg ICAgICAgICAgIChqczItaW5maXgtbm9kZS1sZWZ0IHJlc3VsdCkgcG4gIDsgZG8gdGhpcyBhZnRl ciBzZXR0aW5nIHBvc2l0aW9uCisgICAgICAgICAgICB0dCAoanMyLWdldC1wcm9wLW5hbWUtdG9r ZW4pKQorICAgICAgKGNvbmQKKyAgICAgICA7OyBoYW5kbGVzOiBuYW1lLCBuczo6bmFtZSwgbnM6 OiosIG5zOjpbZXhwcl0KKyAgICAgICAoKD0gdHQganMyLU5BTUUpCisgICAgICAgIChzZXRxIHJl ZiAoanMyLXBhcnNlLXByb3BlcnR5LW5hbWUgLTEgbmlsIG1lbWJlci10eXBlLWZsYWdzKSkpCisg ICAgICAgOzsgaGFuZGxlczogKiwgKjo6bmFtZSwgKjo6KiwgKjo6W2V4cHJdCisgICAgICAgKCg9 IHR0IGpzMi1NVUwpCisgICAgICAgIChzZXRxIHJlZiAoanMyLXBhcnNlLXByb3BlcnR5LW5hbWUg bmlsICIqIiBtZW1iZXItdHlwZS1mbGFncykpKQorICAgICAgIDs7IGhhbmRsZXM6ICdAYXR0cics ICdAbnM6OmF0dHInLCAnQG5zOjoqJywgJ0Buczo6W2V4cHJdJywgZXRjLgorICAgICAgICgoPSB0 dCBqczItWE1MQVRUUikKKyAgICAgICAgKHNldHEgcmVzdWx0IChqczItcGFyc2UtYXR0cmlidXRl LWFjY2VzcykpKQorICAgICAgICh0CisgICAgICAgIChqczItcmVwb3J0LWVycm9yICJtc2cubm8u bmFtZS5hZnRlci5kb3QiIG5pbCBkb3QtcG9zIGRvdC1sZW4pKSkKKyAgICAgIChpZiByZWYKKyAg ICAgICAgICAoc2V0ZiAoanMyLW5vZGUtbGVuIHJlc3VsdCkgKC0gKGpzMi1ub2RlLWVuZCByZWYp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChqczItbm9kZS1wb3Mg cmVzdWx0KSkKKyAgICAgICAgICAgICAgICAoanMyLWluZml4LW5vZGUtcmlnaHQgcmVzdWx0KSBy ZWYpKQorICAgICAgKGlmIChqczItaW5maXgtbm9kZS1wIHJlc3VsdCkKKyAgICAgICAgICAoanMy LW5vZGUtYWRkLWNoaWxkcmVuIHJlc3VsdAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKGpzMi1pbmZpeC1ub2RlLWxlZnQgcmVzdWx0KQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKGpzMi1pbmZpeC1ub2RlLXJpZ2h0IHJlc3VsdCkpKQorICAgICAgcmVzdWx0KSkp CisKKyhkZWZ1biBqczItcGFyc2UtYXR0cmlidXRlLWFjY2VzcyAoKQorICAiUGFyc2UgYW4gRTRY IFhNTCBhdHRyaWJ1dGUgZXhwcmVzc2lvbi4KK1RoaXMgaW5jbHVkZXMgZXhwcmVzc2lvbnMgb2Yg dGhlIGZvcm1zOgorCisgIEBhdHRyICAgICAgQG5zOjphdHRyICAgICBAbnM6OioKKyAgQCogICAg ICAgICBAKjo6YXR0ciAgICAgIEAqOjoqCisgIEBbZXhwcl0gICAgQCo6OltleHByXSAgICBAbnM6 OltleHByXQorCitDYWxsZWQgaWYgd2UgcGVla2VkIGFuICdAJyB0b2tlbi4iCisgIChsZXQgKCh0 dCAoanMyLWdldC1wcm9wLW5hbWUtdG9rZW4pKQorICAgICAgICAoYXQtcG9zIChqczItY3VycmVu dC10b2tlbi1iZWcpKSk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m93JyBvciAnKicu CitNRU1CRVItVFlQRS1GTEFHUyBpcyBhIGJpdCBzZXQgdHJhY2tpbmcgd2hldGhlciB3ZSdyZSBh ICcuJyBvciAnLi4nIGNoaWxkLgorCitSZXR1cm5zIGEgYGpzMi14bWwtcmVmLW5vZGUnIGlmIGl0 J3MgYW4gYXR0cmlidXRlIGFjY2VzcywgYSBjaGlsZCBvZiBhICcuLicKK29wZXJhdG9yLCBvciB0 aGUgbmFtZSBpcyBmb2xsb3dlZCBieSA6Oi4gIEZvciBhIHBsYWluIG5hbWUsIHJldHVybnMgYQor YGpzMi1uYW1lLW5vZGUnLiAgUmV0dXJucyBhIGBqczItZXJyb3Itbm9kZScgZm9yIG1hbGZvcm1l ZCBYTUwgZXhwcmVzc2lvbnMuIgorICAobGV0ICgocG9zIChvciBhdC1wb3MgKGpzMi1jdXJyZW50 LXRva2VuLWJlZykpKQorICAgICAgICBjb2xvbi1wb3MKKyAgICAgICAgKG5hbWUgKGpzMi1jcmVh dGUtbmFtZS1ub2RlIHQgKGpzMi1jdXJyZW50LXRva2VuLXR5cGUpIHMpKQorICAgICAgICBucyB0 dCBwbikKKyAgICAoY2F0Y2ggJ3JldHVybgorICAgICAgKHdoZW4gKGpzMi1tYXRjaC10b2tlbiBq czItQ09MT05DT0xPTikKKyAgICAgICAgKHNldHEgbnMgbmFtZQorICAgICAgICAgICAgICBjb2xv bi1wb3MgKGpzMi1jdXJyZW50LXRva2VuLWJlZykKKyAgICAgICAgICAgICAgdHQgKGpzMi1nZXQt cHJvcC1uYW1lLXRva2VuKSkKKyAgICAgICAgKGNvbmQKKyAgICAgICAgIDs7IGhhbmRsZXMgbmFt ZTo6bmFtZQorICAgICAgICAgKCg9IHR0IGpzMi1OQU1FKQorICAgICAgICAgIChzZXRxIG5hbWUg KGpzMi1jcmVhdGUtbmFtZS1ub2RlKSkpCisgICAgICAgICA7OyBoYW5kbGVzIG5hbWU6OioKKyAg ICAgICAgICgoPSB0dCBqczItTVVMKQorICAgICAgICAgIChzZXRxIG5hbWUgKGpzMi1jcmVhdGUt bmFtZS1ub2RlIG5pbCBuaWwgIioiKSkpCisgICAgICAgICA7OyBoYW5kbGVzIG5hbWU6OltleHBy XQorICAgICAgICAgKCg9IHR0IGpzMi1MQikKKyAgICAgICAgICAodGhyb3cgJ3JldHVybiAoanMy LXBhcnNlLXhtbC1lbGVtLXJlZiBhdC1wb3MgbnMgY29sb24tcG9zKSkpCisgICAgICAgICAodAor ICAgICAgICAgIChqczItcmVwb3J0LWVycm9yICJtc2cubm8ubmFtZS5hZnRlci5jb2xvbmNvbG9u IikpKSkKKyAgICAgIChpZiAoYW5kIChudWxsIG5zKSAoemVyb3AgbWVtYmVyLXR5cGUtZmxhZ3Mp KQorICAgICAgICAgIG5hbWUKKyAgICAgICAgKHByb2cxCisgICAgICAgICAgICAoc2V0cSBwbgor ICAgICAgICAgICAgICAgICAgKG1ha2UtanMyLXhtbC1wcm9wLXJlZi1ub2RlIDpwb3MgcG9zCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmxlbiAoLSAoanMy LW5vZGUtZW5kIG5hbWUpIHBvcykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICA6YXQtcG9zIGF0LXBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIDpjb2xvbi1wb3MgY29sb24tcG9zCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgOnByb3BuYW1lIG5hbWUpKQorICAgICAgICAgIChq czItbm9kZS1hZGQtY2hpbGRyZW4gcG4gbmFtZSkpKSkpKQorCisoZGVmdW4ganMyLXBhcnNlLXht bC1lbGVtLXJlZiAoYXQtcG9zICZvcHRpb25hbCBuYW1lc3BhY2UgY29sb24tcG9zKQorICAiUGFy c2UgdGhlIFtleHByXSBwb3J0aW9uIG9mIGFuIHhtbCBlbGVtZW50IHJlZmVyZW5jZS4KK0ZvciBp bnN0YW5jZSwgQFtleHByXSwgQCo6OltleHByXSwgb3IgbnM6OltleHByXS4iCisgIChsZXQqICgo bGIgKGpzMi1jdXJyZW50LXRva2VuLWJlZykpCisgICAgICAgICAocG9zIChvciBhdC1wb3MgbGIp KQorICAgICAgICAgcmIKKyAgICAgICAgIChleHByIChqczItcGFyc2UtZXhwcikpCisgICAgICAg ICAoZW5kIChqczItbm9kZS1lbmQgZXhwcikpCisgICAgICAgICBwbikKKyAgICAoaWYgKGpzMi1t dXN0LW1hdGNoIGpzMi1SQiAibXNnLm5vLmJyYWNrZXQuaW5kZXgiKQorICAgICAgICAoc2V0cSBy YiAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKQorICAgICAgICAgICAgICBlbmQgKGpzMi1jdXJyZW50 LXRva2VuLWVuZCkpKQorICAgIChwcm9nMQorICAgICAgICAoc2V0cSBwbgorICAgICAgICAgICAg ICAobWFrZS1qczIteG1sLWVsZW0tcmVmLW5vZGUgOnBvcyBwb3MKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIDpsZW4gKC0gZW5kIHBvcykKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpuYW1lc3BhY2UgbmFtZXNwYWNlCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6Y29sb24tcG9zIGNvbG9uLXBvcwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmF0LXBvcyBhdC1wb3MK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpleHByIGV4cHIKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpsYiAoanMyLXJlbHBvcyBs YiBwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6cmIgKGpz Mi1yZWxwb3MgcmIgcG9zKSkpCisgICAgICAoanMyLW5vZGUtYWRkLWNoaWxkcmVuIHBuIG5hbWVz cGFjZSBleHByKSkpKQorCisoZGVmdW4ganMyLXBhcnNlLWRlc3RydWN0LXByaW1hcnktZXhwciAo KQorICAobGV0ICgoanMyLWlzLWluLWRlc3RydWN0dXJpbmcgdCkpCisgICAgKGpzMi1wYXJzZS1w cmltYXJ5LWV4cHIpKSkKKworKGRlZnVuIGpzMi1wYXJzZS1wcmltYXJ5LWV4cHIgKCkKKyAgIlBh cnNlIGEgbGl0ZXJhbCAobGVhZikgZXhwcmVzc2lvbiBvZiBzb21lIHNvcnQuCitJbmNsdWRlcyBj b21wbGV4IGxpdGVyYWxzIHN1Y2ggYXMgZnVuY3Rpb25zLCBvYmplY3QtbGl0ZXJhbHMsCithcnJh eS1saXRlcmFscywgYXJyYXkgY29tcHJlaGVuc2lvbnMgYW5kIHJlZ3VsYXIgZXhwcmVzc2lvbnMu IgorICAobGV0IChwbiAgICAgIDsgcGFyZW50IG5vZGUgICh1c3VhbGx5IHJldHVybiB2YWx1ZSkK KyAgICAgICAgdHQpCisgICAgKHNldHEgdHQgKGpzMi1jdXJyZW50LXRva2VuLXR5cGUpKQorICAg IChjb25kCisgICAgICgoPSB0dCBqczItQ0xBU1MpCisgICAgICAoanMyLXBhcnNlLWNsYXNzLWV4 cHIpKQorICAgICAoKD0gdHQganMyLUZVTkNUSU9OKQorICAgICAgKGpzMi1wYXJzZS1mdW5jdGlv bi1leHByKSkKKyAgICAgKCg9IHR0IGpzMi1MQikKKyAgICAgIChqczItcGFyc2UtYXJyYXktY29t cC1vci1saXRlcmFsKSkKKyAgICAgKCg9IHR0IGpzMi1MQykKKyAgICAgIChqczItcGFyc2Utb2Jq ZWN0LWxpdGVyYWwpKQorICAgICAoKD0gdHQganMyLUxFVCkKKyAgICAgIChqczItcGFyc2UtbGV0 IChqczItY3VycmVudC10b2tlbi1iZWcpKSkKKyAgICAgKCg9IHR0IGpzMi1MUCkKKyAgICAgIChq czItcGFyc2UtcGFyZW4tZXhwci1vci1nZW5lcmF0b3ItY29tcCkpCisgICAgICgoPSB0dCBqczIt WE1MQVRUUikKKyAgICAgIChqczItbXVzdC1oYXZlLXhtbCkKKyAgICAgIChqczItcGFyc2UtYXR0 cmlidXRlLWFjY2VzcykpCisgICAgICgoPSB0dCBqczItTkFNRSkKKyAgICAgIChqczItcGFyc2Ut bmFtZSB0dCkpCisgICAgICgoPSB0dCBqczItTlVNQkVSKQorICAgICAgKG1ha2UtanMyLW51bWJl ci1ub2RlKSkKKyAgICAgKChvciAoPSB0dCBqczItU1RSSU5HKSAoPSB0dCBqczItTk9fU1VCU19U RU1QTEFURSkpCisgICAgICAobWFrZS1qczItc3RyaW5nLW5vZGUgOnR5cGUgdHQpKQorICAgICAo KD0gdHQganMyLVRFTVBMQVRFX0hFQUQpCisgICAgICAoanMyLXBhcnNlLXRlbXBsYXRlLWxpdGVy YWwpKQorICAgICAoKG9yICg9IHR0IGpzMi1ESVYpICg9IHR0IGpzMi1BU1NJR05fRElWKSkKKyAg ICAgIDs7IEdvdCAvIG9yIC89IHdoaWNoIGluIHRoaXMgY29udGV4dCBtZWFucyBhIHJlZ2V4cCBs aXRlcmFsCisgICAgICAobGV0ICgocHgtcG9zIChqczItY3VycmVudC10b2tlbi1iZWcpKQorICAg ICAgICAgICAgKGZsYWdzIChqczItcmVhZC1yZWdleHAgdHQpKQorICAgICAgICAgICAgKGVuZCAo anMyLWN1cnJlbnQtdG9rZW4tZW5kKSkpCisgICAgICAgIChwcm9nMQorICAgICAgICAgICAgKG1h a2UtanMyLXJlZ2V4cC1ub2RlIDpwb3MgcHgtcG9zCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgOmxlbiAoLSBlbmQgcHgtcG9zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIDp2YWx1ZSAoanMyLWN1cnJlbnQtdG9rZW4tc3RyaW5nKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDpmbGFncyBmbGFncykKKyAgICAgICAgICAoanMyLXNldC1mYWNl IHB4LXBvcyBlbmQgJ2ZvbnQtbG9jay1zdHJpbmctZmFjZSAncmVjb3JkKQorICAgICAgICAgIChq czItcmVjb3JkLXRleHQtcHJvcGVydHkgcHgtcG9zIGVuZCAnc3ludGF4LXRhYmxlICcoMikpKSkp CisgICAgICgob3IgKD0gdHQganMyLU5VTEwpCisgICAgICAgICAgKD0gdHQganMyLVRISVMpCisg ICAgICAgICAgKD0gdHQganMyLVNVUEVSKQorICAgICAgICAgICg9IHR0IGpzMi1GQUxTRSkKKyAg ICAgICAgICAoPSB0dCBqczItVFJVRSkpCisgICAgICAobWFrZS1qczIta2V5d29yZC1ub2RlIDp0 eXBlIHR0KSkKKyAgICAgKCg9IHR0IGpzMi1SUCkKKyAgICAgIDs7IE5vdCB2YWxpZCBleHByZXNz aW9uIHN5bnRheCwgYnV0IHRoaXMgaXMgdmFsaWQgaW4gYW4gYXJyb3cKKyAgICAgIDs7IGZ1bmN0 aW9uIHdpdGggbm8gcGFyYW1zOiAoKSA9PiBib2R5LgorICAgICAgKGlmIChlcSAoanMyLXBlZWst dG9rZW4pIGpzMi1BUlJPVykKKyAgICAgICAgICAocHJvZ24KKyAgICAgICAgICAgIChqczItdW5n ZXQtdG9rZW4pICA7IFB1dCBiYWNrIHRoZSByaWdodCBwYXJlbi4KKyAgICAgICAgICAgIDs7IFJl dHVybiB3aGF0ZXZlciwgaXQgd2lsbCBob3BlZnVsbHkgYmUgcmV3aW5kZWQgYW5kCisgICAgICAg ICAgICA7OyByZXBhcnNlZCB3aGVuIHdlIHJlYWNoIHRoZSA9Pi4KKyAgICAgICAgICAgIChtYWtl LWpzMi1rZXl3b3JkLW5vZGUgOnR5cGUganMyLU5VTEwpKQorICAgICAgICAoanMyLXJlcG9ydC1l cnJvciAibXNnLnN5bnRheCIpCisgICAgICAgIChtYWtlLWpzMi1lcnJvci1ub2RlKSkpCisgICAg ICgoPSB0dCBqczItVFJJUExFRE9UKQorICAgICAgOzsgTGlrZXdpc2UsIG9ubHkgdmFsaWQgaW4g YW4gYXJyb3cgZnVuY3Rpb24gd2l0aCBhIHJlc3QgcGFyYW0uCisgICAgICAoaWYgKGFuZCAoanMy LW1hdGNoLXRva2VuIGpzMi1OQU1FKQorICAgICAgICAgICAgICAgKGpzMi1tYXRjaC10b2tlbiBq czItUlApCisgICAgICAgICAgICAgICAoZXEgKGpzMi1wZWVrLXRva2VuKSBqczItQVJST1cpKQor ICAgICAgICAgIChwcm9nbgorICAgICAgICAgICAgKGpzMi11bmdldC10b2tlbikgIDsgUHV0IGJh Y2sgdGhlIHJpZ2h0IHBhcmVuLgorICAgICAgICAgICAgOzsgU2VlIHRoZSBwcmV2aW91cyBjYXNl LgorICAgICAgICAgICAgKG1ha2UtanMyLWtleXdvcmQtbm9kZSA6dHlwZSBqczItTlVMTCkpCisg ICAgICAgIChqczItcmVwb3J0LWVycm9yICJtc2cuc3ludGF4IikKKyAgICAgICAgKG1ha2UtanMy LWVycm9yLW5vZGUpKSkKKyAgICAgKCg9IHR0IGpzMi1SRVNFUlZFRCkKKyAgICAgIChqczItcmVw b3J0LWVycm9yICJtc2cucmVzZXJ2ZWQuaWQiKQorICAgICAgKG1ha2UtanMyLW5hbWUtbm9kZSkp CisgICAgICgoPSB0dCBqczItRVJST1IpCisgICAgICA7OyB0aGUgc2Nhbm5lciBvciBvbmUgb2Yg aXRzIHN1YnJvdXRpbmVzIHJlcG9ydGVkIHRoZSBlcnJvci4KKyAgICAgIChtYWtlLWpzMi1lcnJv ci1ub2RlKSkKKyAgICAgKCg9IHR0IGpzMi1FT0YpCisgICAgICAobGV0KiAoKHB4LXBvcyAocG9p bnQtYXQtYm9sKSkKKyAgICAgICAgICAgICAobGVuICgtIGpzMi10cy1jdXJzb3IgcHgtcG9zKSkp CisgICAgICAgIChqczItcmVwb3J0LWVycm9yICJtc2cudW5leHBlY3RlZC5lb2YiIG5pbCBweC1w b3MgbGVuKSkKKyAgICAgIChtYWtlLWpzMi1lcnJvci1ub2RlIDpwb3MgKDEtIGpzMi10cy1jdXJz b3IpKSkKKyAgICAgKHQKKyAgICAgIChqczItcmVwb3J0LWVycm9yICJtc2cuc3ludGF4IikKKyAg ICAgIChtYWtlLWpzMi1lcnJvci1ub2RlKSkpKSkKKworKGRlZnVuIGpzMi1wYXJzZS10ZW1wbGF0 ZS1saXRlcmFsICgpCisgIChsZXQgKChiZWcgKGpzMi1jdXJyZW50LXRva2VuLWJlZykpCisgICAg ICAgIChraWRzIChsaXN0IChtYWtlLWpzMi1zdHJpbmctbm9kZSA6dHlwZSBqczItVEVNUExBVEVf SEVBRCkpKQorICAgICAgICAodHQganMyLVRFTVBMQVRFX0hFQUQpKQorICAgICh3aGlsZSAoZXEg dHQganMyLVRFTVBMQVRFX0hFQUQpCisgICAgICAocHVzaCAoanMyLXBhcnNlLWV4cHIpIGtpZHMp CisgICAgICAoanMyLW11c3QtbWF0Y2gganMyLVJDICJtc2cuc3ludGF4IikKKyAgICAgIChzZXRx IHR0IChqczItZ2V0LXRva2VuICdURU1QTEFURV9UQUlMKSkKKyAgICAgIChwdXNoIChtYWtlLWpz Mi1zdHJpbmctbm9kZSA6dHlwZSB0dCkga2lkcykpCisgICAgKHNldHEga2lkcyAobnJldmVyc2Ug a2lkcykpCisgICAgKGxldCAoKHRwbCAobWFrZS1qczItdGVtcGxhdGUtbm9kZSA6YmVnIGJlZwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmxlbiAoLSAoanMyLWN1cnJl bnQtdG9rZW4tZW5kKSBiZWcpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICA6a2lkcyBraWRzKSkpCisgICAgICAoYXBwbHkgIydqczItbm9kZS1hZGQtY2hpbGRyZW4gdHBs IGtpZHMpCisgICAgICB0cGwpKSkKKworKGRlZnVuIGpzMi1wYXJzZS1uYW1lIChfdHQpCisgIChs ZXQgKChuYW1lIChqczItY3VycmVudC10b2tlbi1zdHJpbmcpKQorICAgICAgICBub2RlKQorICAg IChzZXRxIG5vZGUgKGlmIGpzMi1jb21waWxlci14bWwtYXZhaWxhYmxlCisgICAgICAgICAgICAg ICAgICAgKGpzMi1wYXJzZS1wcm9wZXJ0eS1uYW1lIG5pbCBuYW1lIDApCisgICAgICAgICAgICAg ICAgIChqczItY3JlYXRlLW5hbWUtbm9kZSAnY2hlY2stYWN0aXZhdGlvbiBuaWwgbmFtZSkpKQor ICAgIChpZiBqczItaGlnaGxpZ2h0LWV4dGVybmFsLXZhcmlhYmxlcworICAgICAgICAoanMyLXJl Y29yZC1uYW1lLW5vZGUgbm9kZSkpCisgICAgbm9kZSkpCisKKyhkZWZ1biBqczItcGFyc2Utd2Fy bi10cmFpbGluZy1jb21tYSAobXNnIHBvcyBlbGVtcyBjb21tYS1wb3MpCisgIChqczItYWRkLXN0 cmljdC13YXJuaW5nCisgICBtc2cgbmlsCisgICA7OyBiYWNrIHVwIGZyb20gY29tbWEgdG8gYmVn aW5uaW5nIG9mIGxpbmUgb3IgYXJyYXkvb2JqbGl0CisgICAobWF4IChpZiBlbGVtcworICAgICAg ICAgICAgKGpzMi1ub2RlLXBvcyAoY2FyIGVsZW1zKSkKKyAgICAgICAgICBwb3MpCisgICAgICAg IChzYXZlLWV4Y3Vyc2lvbgorICAgICAgICAgIChnb3RvLWNoYXIgY29tbWEtcG9zKQorICAgICAg ICAgIChiYWNrLXRvLWluZGVudGF0aW9uKQorICAgICAgICAgIChwb2ludCkpKQorICAgY29tbWEt cG9zKSkKKworKGRlZnVuIGpzMi1wYXJzZS1hcnJheS1jb21wLW9yLWxpdGVyYWwgKCkKKyAgKGxl dCAoKHBvcyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKSkpCisgICAgKGlmIChhbmQgKD49IGpzMi1s YW5ndWFnZS12ZXJzaW9uIDIwMCkKKyAgICAgICAgICAgICAoanMyLW1hdGNoLXRva2VuIGpzMi1G T1IpKQorICAgICAgICAoanMyLXBhcnNlLWFycmF5LWNvbXAgcG9zKQorICAgICAgKGpzMi1wYXJz ZS1hcnJheS1saXRlcmFsIHBvcykpKSkKKworKGRlZnVuIGpzMi1wYXJzZS1hcnJheS1saXRlcmFs IChwb3MpCisgIChsZXQgKChhZnRlci1sYi1vci1jb21tYSB0KQorICAgICAgICBhZnRlci1jb21t YSB0dCBlbGVtcyBwbgorICAgICAgICAoY29udGludWUgdCkpCisgICAgKHVubGVzcyBqczItaXMt aW4tZGVzdHJ1Y3R1cmluZworICAgICAgKGpzMi1wdXNoLXNjb3BlIChtYWtlLWpzMi1zY29wZSkp KSA7IGZvciB0aGUgbGVnYWN5IGFycmF5IGNvbXAKKyAgICAod2hpbGUgY29udGludWUKKyAgICAg IChzZXRxIHR0IChqczItZ2V0LXRva2VuKSkKKyAgICAgIChjb25kCisgICAgICAgOzsgY29tbWEK KyAgICAgICAoKD0gdHQganMyLUNPTU1BKQorICAgICAgICAoc2V0cSBhZnRlci1jb21tYSAoanMy LWN1cnJlbnQtdG9rZW4tZW5kKSkKKyAgICAgICAgKGlmIChub3QgYWZ0ZXItbGItb3ItY29tbWEp CisgICAgICAgICAgICAoc2V0cSBhZnRlci1sYi1vci1jb21tYSB0KQorICAgICAgICAgIChwdXNo IG5pbCBlbGVtcykpKQorICAgICAgIDs7IGVuZCBvZiBhcnJheQorICAgICAgICgob3IgKD0gdHQg anMyLVJCKQorICAgICAgICAgICAgKD0gdHQganMyLUVPRikpICA7IHByZXZlbnQgaW5maW5pdGUg bG9vcAorICAgICAgICAoaWYgKD0gdHQganMyLUVPRikKKyAgICAgICAgICAgIChqczItcmVwb3J0 LWVycm9yICJtc2cubm8uYnJhY2tldC5hcmciIG5pbCBwb3MpKQorICAgICAgICAod2hlbiAoYW5k IGFmdGVyLWNvbW1hICg8IGpzMi1sYW5ndWFnZS12ZXJzaW9uIDE3MCkpCisgICAgICAgICAgKGpz Mi1wYXJzZS13YXJuLXRyYWlsaW5nLWNvbW1hICJtc2cuYXJyYXkudHJhaWxpbmcuY29tbWEiCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvcyAocmVtb3ZlIG5pbCBl bGVtcykgYWZ0ZXItY29tbWEpKQorICAgICAgICAoc2V0cSBjb250aW51ZSBuaWwKKyAgICAgICAg ICAgICAgcG4gKG1ha2UtanMyLWFycmF5LW5vZGUgOnBvcyBwb3MKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgOmxlbiAoLSBqczItdHMtY3Vyc29yIHBvcykKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmVsZW1zIChucmV2ZXJzZSBlbGVtcykpKQor ICAgICAgICAoYXBwbHkgIydqczItbm9kZS1hZGQtY2hpbGRyZW4gcG4gKGpzMi1hcnJheS1ub2Rl LWVsZW1zIHBuKSkpCisgICAgICAgOzsgZGVzdHJ1Y3R1cmluZyBiaW5kaW5nCisgICAgICAgKGpz Mi1pcy1pbi1kZXN0cnVjdHVyaW5nCisgICAgICAgIChwdXNoIChpZiAob3IgKD0gdHQganMyLUxD KQorICAgICAgICAgICAgICAgICAgICAgICg9IHR0IGpzMi1MQikKKyAgICAgICAgICAgICAgICAg ICAgICAoPSB0dCBqczItTkFNRSkpCisgICAgICAgICAgICAgICAgICA7OyBbYSwgYiwgY10gfCB7 YSwgYiwgY30gfCB7YTp4LCBiOnksIGM6en0gfCBhCisgICAgICAgICAgICAgICAgICAoanMyLXBh cnNlLWRlc3RydWN0LXByaW1hcnktZXhwcikKKyAgICAgICAgICAgICAgICA7OyBpbnZhbGlkIHBh dHRlcm4KKyAgICAgICAgICAgICAgICAoanMyLXJlcG9ydC1lcnJvciAibXNnLmJhZC52YXIiKQor ICAgICAgICAgICAgICAgIChtYWtlLWpzMi1lcnJvci1ub2RlKSkKKyAgICAgICAgICAgICAgZWxl bXMpCisgICAgICAgIChzZXRxIGFmdGVyLWxiLW9yLWNvbW1hIG5pbAorICAgICAgICAgICAgICBh ZnRlci1jb21tYSBuaWwpKQorICAgICAgIDs7IGFycmF5IGNvbXAKKyAgICAgICAoKGFuZCAoPj0g anMyLWxhbmd1YWdlLXZlcnNpb24gMTcwKQorICAgICAgICAgICAgICg9IHR0IGpzMi1GT1IpICAg ICAgICAgIDsgY2hlY2sgZm9yIGFycmF5IGNvbXByZWhlbnNpb24KKyAgICAgICAgICAgICAobm90 IGFmdGVyLWxiLW9yLWNvbW1hKSA7ICJmb3IiIGNhbid0IGZvbGxvdyBhIGNvbW1hCisgICAgICAg ICAgICAgZWxlbXMgICAgICAgICAgICAgICAgICAgOyBtdXN0IGhhdmUgYXQgbGVhc3QgMSBlbGVt ZW50CisgICAgICAgICAgICAgKG5vdCAoY2RyIGVsZW1zKSkpICAgICAgOyBidXQgbm8gMm5kIGVs ZW1lbnQKKyAgICAgICAgKGpzMi11bmdldC10b2tlbikKKyAgICAgICAgKHNldGYgY29udGludWUg bmlsCisgICAgICAgICAgICAgIHBuIChqczItcGFyc2UtbGVnYWN5LWFycmF5LWNvbXAgKGNhciBl bGVtcykgcG9zKSkpCisgICAgICAgOzsgYW5vdGhlciBlbGVtZW50CisgICAgICAgKHQKKyAgICAg ICAgKHVubGVzcyBhZnRlci1sYi1vci1jb21tYQorICAgICAgICAgIChqczItcmVwb3J0LWVycm9y ICJtc2cubm8uYnJhY2tldC5hcmciKSkKKyAgICAgICAgKGlmIChhbmQgKD0gdHQganMyLVRSSVBM RURPVCkKKyAgICAgICAgICAgICAgICAgKD49IGpzMi1sYW5ndWFnZS12ZXJzaW9uIDIwMCkpCisg ICAgICAgICAgICA7OyBzcHJlYWQgb3BlcmF0b3IKKyAgICAgICAgICAgIChwdXNoIChqczItbWFr ZS11bmFyeSB0dCAnanMyLXBhcnNlLWFzc2lnbi1leHByKQorICAgICAgICAgICAgICAgICAgZWxl bXMpCisgICAgICAgICAgKGpzMi11bmdldC10b2tlbikKKyAgICAgICAgICAocHVzaCAoanMyLXBh cnNlLWFzc2lnbi1leHByKSBlbGVtcykpCisgICAgICAgIChzZXRxIGFmdGVyLWxiLW9yLWNvbW1h IG5pbAorICAgICAgICAgICAgICBhZnRlci1jb21tYSBuaWwpKSkpCisgICAgKHVubGVzcyBqczIt aXMtaW4tZGVzdHJ1Y3R1cmluZworICAgICAgKGpzMi1wb3Atc2NvcGUpKQorICAgIHBuKSkKKwor KGRlZnVuIGpzMi1wYXJzZS1sZWdhY3ktYXJyYXktY29tcCAoZXhwciBwb3MpCisgICJQYXJzZSBh IGxlZ2FjeSBhcnJheSBjb21wcmVoZW5zaW9uIChKYXZhU2NyaXB0IDEuNykuCitFWFBSIGlzIHRo ZSBmaXJzdCBleHByZXNzaW9uIGFmdGVyIHRoZSBvcGVuaW5nIGxlZnQtYnJhY2tldC4KK1BPUyBp cyB0aGUgYmVnaW5uaW5nIG9mIHRoZSBMQiB0b2tlbiBwcmVjZWRpbmcgRVhQUi4KK1dlIHNob3Vs ZCBoYXZlIGp1c3QgcGFyc2VkIHRoZSAnZm9yJyBrZXl3b3JkIGJlZm9yZSBjYWxsaW5nIHRoaXMg ZnVuY3Rpb24uIgorICAobGV0ICgoY3VycmVudC1zY29wZSBqczItY3VycmVudC1zY29wZSkKKyAg ICAgICAgbG9vcHMgZmlyc3QgZmlsdGVyIHJlc3VsdCkKKyAgICAodW53aW5kLXByb3RlY3QKKyAg ICAgICAgKHByb2duCisgICAgICAgICAgKHdoaWxlIChqczItbWF0Y2gtdG9rZW4ganMyLUZPUikK KyAgICAgICAgICAgIChsZXQgKChsb29wIChtYWtlLWpzMi1jb21wLWxvb3Atbm9kZSkpKQorICAg ICAgICAgICAgICAoanMyLXB1c2gtc2NvcGUgbG9vcCkKKyAgICAgICAgICAgICAgKHB1c2ggbG9v cCBsb29wcykKKyAgICAgICAgICAgICAgKGpzMi1wYXJzZS1jb21wLWxvb3AgbG9vcCkpKQorICAg ICAgICAgIDs7IEZpcnN0IGxvb3AgdGFrZXMgZXhwciBzY29wZSdzIHBhcmVudC4KKyAgICAgICAg ICAoc2V0ZiAoanMyLXNjb3BlLXBhcmVudC1zY29wZSAoc2V0cSBmaXJzdCAoY2FyIChsYXN0IGxv b3BzKSkpKQorICAgICAgICAgICAgICAgIChqczItc2NvcGUtcGFyZW50LXNjb3BlIGN1cnJlbnQt c2NvcGUpKQorICAgICAgICAgIDs7IFNldCBleHByIHNjb3BlJ3MgcGFyZW50IHRvIHRoZSBsYXN0 IGxvb3AuCisgICAgICAgICAgKHNldGYgKGpzMi1zY29wZS1wYXJlbnQtc2NvcGUgY3VycmVudC1z Y29wZSkgKGNhciBsb29wcykpCisgICAgICAgICAgKGlmICgvPSAoanMyLWdldC10b2tlbikganMy LUlGKQorICAgICAgICAgICAgICAoanMyLXVuZ2V0LXRva2VuKQorICAgICAgICAgICAgKHNldHEg ZmlsdGVyIChqczItcGFyc2UtY29uZGl0aW9uKSkpKQorICAgICAgKGRvdGltZXMgKF8gKDEtIChs ZW5ndGggbG9vcHMpKSkKKyAgICAgICAgKGpzMi1wb3Atc2NvcGUpKSkKKyAgICAoanMyLW11c3Qt bWF0Y2gganMyLVJCICJtc2cubm8uYnJhY2tldC5hcmciIHBvcykKKyAgICAoc2V0cSByZXN1bHQg KG1ha2UtanMyLWNvbXAtbm9kZSA6cG9zIHBvcworICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDpsZW4gKC0ganMyLXRzLWN1cnNvciBwb3MpCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgOnJlc3VsdCBleHByCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOmxvb3BzIChucmV2ZXJzZSBsb29wcykKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICA6ZmlsdGVycyAoYW5kIGZpbHRlciAobGlzdCAoY2FyIGZpbHRlcikp KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpmb3JtICdMRUdBQ1lfQVJS QVkpKQorICAgIChhcHBseSAjJ2pzMi1ub2RlLWFkZC1jaGlsZHJlbiByZXN1bHQgZXhwciAoY2Fy IGZpbHRlcikKKyAgICAgICAgICAgKGpzMi1jb21wLW5vZGUtbG9vcHMgcmVzdWx0KSkKKyAgICBy ZXN1bHQpKQorCisoZGVmdW4ganMyLXBhcnNlLWFycmF5LWNvbXAgKHBvcykKKyAgIlBhcnNlIGFu IEVTNiBhcnJheSBjb21wcmVoZW5zaW9uLgorUE9TIGlzIHRoZSBiZWdpbm5pbmcgb2YgdGhlIExC IHRva2VuLgorV2Ugc2hvdWxkIGhhdmUganVzdCBwYXJzZWQgdGhlICdmb3InIGtleXdvcmQgYmVm b3JlIGNhbGxpbmcgdGhpcyBmdW5jdGlvbi4iCisgIChsZXQgKChwbiAoanMyLXBhcnNlLWNvbXBy ZWhlbnNpb24gcG9zICdBUlJBWSkpKQorICAgIChqczItbXVzdC1tYXRjaCBqczItUkIgIm1zZy5u by5icmFja2V0LmFyZyIgcG9zKQorICAgIHBuKSkKKworKGRlZnVuIGpzMi1wYXJzZS1nZW5lcmF0 b3ItY29tcCAocG9zKQorICAobGV0KiAoKGpzMi1uZXN0aW5nLW9mLWZ1bmN0aW9uICgxKyBqczIt bmVzdGluZy1vZi1mdW5jdGlvbikpCisgICAgICAgICAoanMyLWN1cnJlbnQtc2NyaXB0LW9yLWZu CisgICAgICAgICAgKG1ha2UtanMyLWZ1bmN0aW9uLW5vZGUgOmdlbmVyYXRvci10eXBlICdDT01Q UkVIRU5TSU9OKSkKKyAgICAgICAgIChwbiAoanMyLXBhcnNlLWNvbXByZWhlbnNpb24gcG9zICdT VEFSX0dFTkVSQVRPUikpKQorICAgIChqczItbXVzdC1tYXRjaCBqczItUlAgIm1zZy5uby5wYXJl biIgcG9zKQorICAgIHBuKSkKKworKGRlZnVuIGpzMi1wYXJzZS1jb21wcmVoZW5zaW9uIChwb3Mg Zm9ybSkKKyAgKGxldCAobG9vcHMgZmlsdGVycyBleHByIHJlc3VsdCkKKyAgICAodW53aW5kLXBy b3RlY3QKKyAgICAgICAgKHByb2duCisgICAgICAgICAgKGpzMi11bmdldC10b2tlbikKKyAgICAg ICAgICAod2hpbGUgKGpzMi1tYXRjaC10b2tlbiBqczItRk9SKQorICAgICAgICAgICAgKGxldCAo KGxvb3AgKG1ha2UtanMyLWNvbXAtbG9vcC1ub2RlKSkpCisgICAgICAgICAgICAgIChqczItcHVz aC1zY29wZSBsb29wKQorICAgICAgICAgICAgICAocHVzaCBsb29wIGxvb3BzKQorICAgICAgICAg ICAgICAoanMyLXBhcnNlLWNvbXAtbG9vcCBsb29wKSkpCisgICAgICAgICAgKHdoaWxlIChqczIt bWF0Y2gtdG9rZW4ganMyLUlGKQorICAgICAgICAgICAgKHB1c2ggKGNhciAoanMyLXBhcnNlLWNv bmRpdGlvbikpIGZpbHRlcnMpKQorICAgICAgICAgIChzZXRxIGV4cHIgKGpzMi1wYXJzZS1hc3Np Z24tZXhwcikpKQorICAgICAgKGRvbGlzdCAoXyBsb29wcykKKyAgICAgICAgKGpzMi1wb3Atc2Nv cGUpKSkKKyAgICAoc2V0cSByZXN1bHQgKG1ha2UtanMyLWNvbXAtbm9kZSA6cG9zIHBvcworICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpsZW4gKC0ganMyLXRzLWN1cnNvciBw b3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOnJlc3VsdCBleHByCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmxvb3BzIChucmV2ZXJzZSBsb29w cykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ZmlsdGVycyAobnJldmVy c2UgZmlsdGVycykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6Zm9ybSBm b3JtKSkKKyAgICAoYXBwbHkgIydqczItbm9kZS1hZGQtY2hpbGRyZW4gcmVzdWx0IChqczItY29t cC1ub2RlLWxvb3BzIHJlc3VsdCkpCisgICAgKGFwcGx5ICMnanMyLW5vZGUtYWRkLWNoaWxkcmVu IHJlc3VsdCBleHByIChqczItY29tcC1ub2RlLWZpbHRlcnMgcmVzdWx0KSkKKyAgICByZXN1bHQp KQorCisoZGVmdW4ganMyLXBhcnNlLWNvbXAtbG9vcCAocG4gJm9wdGlvbmFsIG9ubHktb2YtcCkK KyAgIlBhcnNlIGEgJ2ZvciBbZWFjaF0gKGZvbyBbaW58b2ZdIGJhciknIGV4cHJlc3Npb24gaW4g YW4gQXJyYXkgY29tcHJlaGVuc2lvbi4KK1RoZSBjdXJyZW50IHRva2VuIHNob3VsZCBiZSB0aGUg aW5pdGlhbCBGT1IuCitJZiBPTkxZLU9GLVAgaXMgbm9uLW5pbCwgb25seSB0aGUgJ2ZvciAoZm9v IG9mIGJhciknIGZvcm0gaXMgYWxsb3dlZC4iCisgIChsZXQgKChwb3MgKGpzMi1jb21wLWxvb3At bm9kZS1wb3MgcG4pKQorICAgICAgICB0dCBpdGVyIG9iaiBmb3JlYWNoLXAgZm9yb2YtcCBpbi1w b3MgZWFjaC1wb3MgbHAgcnApCisgICAgKHdoZW4gKGFuZCAobm90IG9ubHktb2YtcCkgKGpzMi1t YXRjaC10b2tlbiBqczItTkFNRSkpCisgICAgICAoaWYgKHN0cmluZz0gKGpzMi1jdXJyZW50LXRv a2VuLXN0cmluZykgImVhY2giKQorICAgICAgICAgIChwcm9nbgorICAgICAgICAgICAgKHNldHEg Zm9yZWFjaC1wIHQKKyAgICAgICAgICAgICAgICAgIGVhY2gtcG9zICgtIChqczItY3VycmVudC10 b2tlbi1iZWcpIHBvcykpIDsgcmVsYXRpdmUKKyAgICAgICAgICAgIChqczItcmVjb3JkLWZhY2Ug J2ZvbnQtbG9jay1rZXl3b3JkLWZhY2UpKQorICAgICAgICAoanMyLXJlcG9ydC1lcnJvciAibXNn Lm5vLnBhcmVuLmZvciIpKSkKKyAgICAoaWYgKGpzMi1tdXN0LW1hdGNoIGpzMi1MUCAibXNnLm5v LnBhcmVuLmZvciIpCisgICAgICAgIChzZXRxIGxwICgtIChqczItY3VycmVudC10b2tlbi1iZWcp IHBvcykpKQorICAgIChzZXRxIHR0IChqczItcGVlay10b2tlbikpCisgICAgKGNvbmQKKyAgICAg KChvciAoPSB0dCBqczItTEIpCisgICAgICAgICAgKD0gdHQganMyLUxDKSkKKyAgICAgIChqczIt Z2V0LXRva2VuKQorICAgICAgKHNldHEgaXRlciAoanMyLXBhcnNlLWRlc3RydWN0LXByaW1hcnkt ZXhwcikpCisgICAgICAoanMyLWRlZmluZS1kZXN0cnVjdC1zeW1ib2xzIGl0ZXIganMyLUxFVAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnZm9udC1sb2NrLXZhcmlhYmxlLW5h bWUtZmFjZSB0KSkKKyAgICAgKChqczItbWF0Y2gtdG9rZW4ganMyLU5BTUUpCisgICAgICAoc2V0 cSBpdGVyIChqczItY3JlYXRlLW5hbWUtbm9kZSkpKQorICAgICAodAorICAgICAgKGpzMi1yZXBv cnQtZXJyb3IgIm1zZy5iYWQudmFyIikpKQorICAgIDs7IERlZmluZSBhcyBhIGxldCBzaW5jZSB3 ZSB3YW50IHRoZSBzY29wZSBvZiB0aGUgdmFyaWFibGUgdG8KKyAgICA7OyBiZSByZXN0cmljdGVk IHRvIHRoZSBhcnJheSBjb21wcmVoZW5zaW9uCisgICAgKGlmIChqczItbmFtZS1ub2RlLXAgaXRl cikKKyAgICAgICAgKGpzMi1kZWZpbmUtc3ltYm9sIGpzMi1MRVQgKGpzMi1uYW1lLW5vZGUtbmFt ZSBpdGVyKSBwbiB0KSkKKyAgICAoaWYgKG9yIChhbmQgKG5vdCBvbmx5LW9mLXApIChqczItbWF0 Y2gtdG9rZW4ganMyLUlOKSkKKyAgICAgICAgICAgIChhbmQgKD49IGpzMi1sYW5ndWFnZS12ZXJz aW9uIDIwMCkKKyAgICAgICAgICAgICAgICAgKGpzMi1tYXRjaC1jb250ZXh0dWFsLWt3ZCAib2Yi KQorICAgICAgICAgICAgICAgICAoc2V0cSBmb3JvZi1wIHQpKSkKKyAgICAgICAgKHNldHEgaW4t cG9zICgtIChqczItY3VycmVudC10b2tlbi1iZWcpIHBvcykpCisgICAgICAoanMyLXJlcG9ydC1l cnJvciAibXNnLmluLmFmdGVyLmZvci5uYW1lIikpCisgICAgKHNldHEgb2JqIChqczItcGFyc2Ut ZXhwcikpCisgICAgKGlmIChqczItbXVzdC1tYXRjaCBqczItUlAgIm1zZy5uby5wYXJlbi5mb3Iu Y3RybCIpCisgICAgICAgIChzZXRxIHJwICgtIChqczItY3VycmVudC10b2tlbi1iZWcpIHBvcykp KQorICAgIChzZXRmIChqczItbm9kZS1wb3MgcG4pIHBvcworICAgICAgICAgIChqczItbm9kZS1s ZW4gcG4pICgtIGpzMi10cy1jdXJzb3IgcG9zKQorICAgICAgICAgIChqczItY29tcC1sb29wLW5v ZGUtaXRlcmF0b3IgcG4pIGl0ZXIKKyAgICAgICAgICAoanMyLWNvbXAtbG9vcC1ub2RlLW9iamVj dCBwbikgb2JqCisgICAgICAgICAgKGpzMi1jb21wLWxvb3Atbm9kZS1pbi1wb3MgcG4pIGluLXBv cworICAgICAgICAgIChqczItY29tcC1sb29wLW5vZGUtZWFjaC1wb3MgcG4pIGVhY2gtcG9zCisg ICAgICAgICAgKGpzMi1jb21wLWxvb3Atbm9kZS1mb3JlYWNoLXAgcG4pIGZvcmVhY2gtcAorICAg ICAgICAgIChqczItY29tcC1sb29wLW5vZGUtZm9yb2YtcCBwbikgZm9yb2YtcAorICAgICAgICAg IChqczItY29tcC1sb29wLW5vZGUtbHAgcG4pIGxwCisgICAgICAgICAgKGpzMi1jb21wLWxvb3At bm9kZS1ycCBwbikgcnApCisgICAgKGpzMi1ub2RlLWFkZC1jaGlsZHJlbiBwbiBpdGVyIG9iaikK KyAgICBwbikpCisKKyhkZWZ1biBqczItcGFyc2UtY2xhc3Mtc3RtdCAoKQorICAobGV0ICgocG9z IChqczItY3VycmVudC10b2tlbi1iZWcpKSkKKyAgICAoanMyLW11c3QtbWF0Y2gtbmFtZSAibXNn LnVubmFtZ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ZXh0ZW5kcykKKyAgICAgICAgICAg ICAgKGpzMi1yZXBvcnQtZXJyb3IgIm1zZy5iYWQuZXh0ZW5kcyIpKSkpCisgICAgKGpzMi1tdXN0 LW1hdGNoIGpzMi1MQyAibXNnLm5vLmJyYWNlLmNsYXNzIikKKyAgICAoc2V0cSBlbGVtcyAoanMy LXBhcnNlLW9iamVjdC1saXRlcmFsLWVsZW1zIHQpCisgICAgICAgICAgcG4gKG1ha2UtanMyLWNs YXNzLW5vZGUgOnBvcyBwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6bGVu ICgtIGpzMi10cy1jdXJzb3IgcG9zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IDpmb3JtIGZvcm0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6bmFtZSBuYW1l CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmV4dGVuZHMgZXh0ZW5kcworICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDplbGVtcyBlbGVtcykpCisgICAgKGFwcGx5 ICMnanMyLW5vZGUtYWRkLWNoaWxkcmVuIHBuIChqczItY2xhc3Mtbm9kZS1lbGVtcyBwbikpCisg ICAgcG4pKQorCisoZGVmdW4ganMyLXBhcnNlLW9iamVjdC1saXRlcmFsICgpCisgIChsZXQqICgo cG9zIChqczItY3VycmVudC10b2tlbi1iZWcpKQorICAgICAgICAgKGVsZW1zIChqczItcGFyc2Ut b2JqZWN0LWxpdGVyYWwtZWxlbXMpKQorICAgICAgICAgKHJlc3VsdCAobWFrZS1qczItb2JqZWN0 LW5vZGUgOnBvcyBwb3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDps ZW4gKC0ganMyLXRzLWN1cnNvciBwb3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICA6ZWxlbXMgZWxlbXMpKSkKKyAgICAoYXBwbHkgIydqczItbm9kZS1hZGQtY2hpbGRy ZW4gcmVzdWx0IChqczItb2JqZWN0LW5vZGUtZWxlbXMgcmVzdWx0KSkKKyAgICByZXN1bHQpKQor CisoZGVmdW4ganMyLXBhcnNlLW9iamVjdC1saXRlcmFsLWVsZW1zICgmb3B0aW9uYWwgY2xhc3Mt cCkKKyAgKGxldCAoKHBvcyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKSkKKyAgICAgICAgKHN0YXRp YyBuaWwpCisgICAgICAgIChjb250aW51ZSB0KQorICAgICAgICB0dCBlbGVtcyBlbGVtIGFmdGVy LWNvbW1hKQorICAgICh3aGlsZSBjb250aW51ZQorICAgICAgKHNldHEgc3RhdGljIChhbmQgY2xh c3MtcCAoanMyLW1hdGNoLXRva2VuIGpzMi1TVEFUSUMpKQorICAgICAgICAgICAgdHQgKGpzMi1n ZXQtcHJvcC1uYW1lLXRva2VuKQorICAgICAgICAgICAgZWxlbSBuaWwpCisgICAgICAoY29uZAor ICAgICAgIDs7IHtmb286IC4uLn0sIHsnZm9vJzogLi4ufSwge2ZvbywgYmFyLCAuLi59LAorICAg ICAgIDs7IHtnZXQgZm9vKCkgey4uLn19LCB7c2V0IGZvbyh4KSB7Li4ufX0sIG9yIHtmb28oeCkg ey4uLn19CisgICAgICAgOzsgVE9ETyhzZGgpOiBzdXBwb3J0ICpmb28oKSB7Li4ufQorICAgICAg ICgob3IgKD0ganMyLU5BTUUgdHQpCisgICAgICAgICAgICAoPSB0dCBqczItU1RSSU5HKSkKKyAg ICAgICAgKHNldHEgYWZ0ZXItY29tbWEgbmlsCisgICAgICAgICAgICAgIGVsZW0gKGpzMi1wYXJz ZS1uYW1lZC1wcm9wIHR0KSkKKyAgICAgICAgKGlmIChhbmQgKG51bGwgZWxlbSkKKyAgICAgICAg ICAgICAgICAgKG5vdCBqczItcmVjb3Zlci1mcm9tLXBhcnNlLWVycm9ycykpCisgICAgICAgICAg ICAoc2V0cSBjb250aW51ZSBuaWwpKSkKKyAgICAgICA7OyB7W1N5bWJvbC5pdGVyYXRvcl06IC4u Ln0KKyAgICAgICAoKGFuZCAoPSB0dCBqczItTEIpCisgICAgICAgICAgICAgKD49IGpzMi1sYW5n dWFnZS12ZXJzaW9uIDIwMCkpCisgICAgICAgIChsZXQgKChleHByIChqczItcGFyc2UtZXhwcikp KQorICAgICAgICAgIChqczItbXVzdC1tYXRjaCBqczItUkIgIm1zZy5taXNzaW5nLmNvbXB1dGVk LnJiIikKKyAgICAgICAgICAoc2V0cSBhZnRlci1jb21tYSBuaWwKKyAgICAgICAgICAgICAgICBl bGVtIChqczItcGFyc2UtcGxhaW4tcHJvcGVydHkgZXhwcikpKSkKKyAgICAgICA7OyB7MTI6IHh9 IG9yIHsxMC43OiB4fQorICAgICAgICgoPSB0dCBqczItTlVNQkVSKQorICAgICAgICAoc2V0cSBh ZnRlci1jb21tYSBuaWwKKyAgICAgICAgICAgICAgZWxlbSAoanMyLXBhcnNlLXBsYWluLXByb3Bl cnR5IChtYWtlLWpzMi1udW1iZXItbm9kZSkpKSkKKyAgICAgICA7OyBCcmVhayBvdXQgb2YgbG9v cCwgYW5kIGhhbmRsZSB0cmFpbGluZyBjb21tYXMuCisgICAgICAgKChvciAoPSB0dCBqczItUkMp CisgICAgICAgICAgICAoPSB0dCBqczItRU9GKSkKKyAgICAgICAgKGpzMi11bmdldC10b2tlbikK KyAgICAgICAgKHNldHEgY29udGludWUgbmlsKQorICAgICAgICAoaWYgYWZ0ZXItY29tbWEKKyAg ICAgICAgICAgIChqczItcGFyc2Utd2Fybi10cmFpbGluZy1jb21tYSAibXNnLmV4dHJhLnRyYWls aW5nLmNvbW1hIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBv cyBlbGVtcyBhZnRlci1jb21tYSkpKQorICAgICAgICh0CisgICAgICAgIChqczItcmVwb3J0LWVy cm9yICJtc2cuYmFkLnByb3AiKQorICAgICAgICAodW5sZXNzIGpzMi1yZWNvdmVyLWZyb20tcGFy c2UtZXJyb3JzCisgICAgICAgICAgKHNldHEgY29udGludWUgbmlsKSkpKSAgICAgICAgIDsgZW5k IHN3aXRjaAorICAgICAgOzsgSGFuZGxlIHN0YXRpYyBmb3IgY2xhc3NlcycgY29kZWdlbi4KKyAg ICAgIChpZiBzdGF0aWMKKyAgICAgICAgICAoaWYgZWxlbSAoanMyLW5vZGUtc2V0LXByb3AgZWxl bSAnU1RBVElDIHQpCisgICAgICAgICAgICAoanMyLXJlcG9ydC1lcnJvciAibXNnLnVuZXhwZWN0 ZWQuc3RhdGljIikpKQorICAgICAgOzsgSGFuZGxlIGNvbW1hcywgZGVwZW5kaW5nIG9uIGNsYXNz LXAuCisgICAgICAobGV0ICgoY29tbWEgKGpzMi1tYXRjaC10b2tlbiBqczItQ09NTUEpKSkKKyAg ICAgICAgKGlmIGNsYXNzLXAKKyAgICAgICAgICAgIChpZiBjb21tYQorICAgICAgICAgICAgICAg IChqczItcmVwb3J0LWVycm9yICJtc2cuY2xhc3MudW5leHBlY3RlZC5jb21tYSIpKQorICAgICAg ICAgIChpZiBjb21tYQorICAgICAgICAgICAgICAoc2V0cSBhZnRlci1jb21tYSAoanMyLWN1cnJl bnQtdG9rZW4tZW5kKSkKKyAgICAgICAgICAgIChzZXRxIGNvbnRpbnVlIG5pbCkpKSkKKyAgICAg IDs7IEFwcGVuZCBhbnkgcGFyc2VkIGVsZW1lbnQuCisgICAgICAoaWYgZWxlbSAocHVzaCBlbGVt IGVsZW1zKSkpICAgICAgIDsgZW5kIGxvb3AKKyAgICAoanMyLW11c3QtbWF0Y2gganMyLVJDICJt c2cubm8uYnJhY2UucHJvcCIpCisgICAgKG5yZXZlcnNlIGVsZW1zKSkpCisKKyhkZWZ1biBqczIt cGFyc2UtbmFtZWQtcHJvcCAodHQpCisgICJQYXJzZSBhIG5hbWUsIHN0cmluZywgb3IgZ2V0dGVy L3NldHRlciBvYmplY3QgcHJvcGVydHkuCitXaGVuIGBqczItaXMtaW4tZGVzdHJ1Y3R1cmluZycg aXMgdCwgZm9ybXMgbGlrZSB7YSwgYiwgY30gd2lsbCBiZSBwZXJtaXR0ZWQuIgorICAobGV0ICgo c3RyaW5nLXByb3AgKGFuZCAoPSB0dCBqczItU1RSSU5HKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAobWFrZS1qczItc3RyaW5nLW5vZGUpKSkKKyAgICAgICAgZXhwcgorICAgICAgICAocHBv cyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKSkKKyAgICAgICAgKHBlbmQgKGpzMi1jdXJyZW50LXRv a2VuLWVuZCkpCisgICAgICAgIChuYW1lIChqczItY3JlYXRlLW5hbWUtbm9kZSkpCisgICAgICAg IChwcm9wIChqczItY3VycmVudC10b2tlbi1zdHJpbmcpKSkKKyAgICAoY29uZAorICAgICA7OyBn ZXR0ZXIvc2V0dGVyIHByb3AKKyAgICAgKChhbmQgKD0gdHQganMyLU5BTUUpCisgICAgICAgICAg ICg9IChqczItcGVlay10b2tlbikganMyLU5BTUUpCisgICAgICAgICAgIChvciAoc3RyaW5nPSBw cm9wICJnZXQiKQorICAgICAgICAgICAgICAgKHN0cmluZz0gcHJvcCAic2V0IikpKQorICAgICAg KGpzMi1nZXQtdG9rZW4pCisgICAgICAoanMyLXNldC1mYWNlIHBwb3MgcGVuZCAnZm9udC1sb2Nr LWtleXdvcmQtZmFjZSAncmVjb3JkKSAgOyBnZXQvc2V0CisgICAgICAoanMyLXJlY29yZC1mYWNl ICdmb250LWxvY2stZnVuY3Rpb24tbmFtZS1mYWNlKSAgICAgIDsgZm9yIHBlZWtlZCBuYW1lCisg ICAgICAoc2V0cSBuYW1lIChqczItY3JlYXRlLW5hbWUtbm9kZSkpIDsgZGlzY2FyZCBnZXQvc2V0 ICYgdXNlIHBlZWtlZCBuYW1lCisgICAgICAoanMyLXBhcnNlLWdldHRlci1zZXR0ZXItcHJvcCBw cG9zIG5hbWUgcHJvcCkpCisgICAgIDs7IG1ldGhvZCBkZWZpbml0aW9uOiB7ZigpIHsuLi59fQor ICAgICAoKGFuZCAoPSAoanMyLXBlZWstdG9rZW4pIGpzMi1MUCkKKyAgICAgICAgICAgKD49IGpz Mi1sYW5ndWFnZS12ZXJzaW9uIDIwMCkpCisgICAgICAoanMyLXJlY29yZC1mYWNlICdmb250LWxv Y2stZnVuY3Rpb24tbmFtZS1mYWNlKSAgICAgIDsgbmFtZQorICAgICAgKGpzMi1wYXJzZS1nZXR0 ZXItc2V0dGVyLXByb3AgcHBvcyBuYW1lICIiKSkKKyAgICAgOzsgcmVndWxhciBwcm9wCisgICAg ICh0CisgICAgICAocHJvZzEKKyAgICAgICAgICAoc2V0cSBleHByIChqczItcGFyc2UtcGxhaW4t cHJvcGVydHkgKG9yIHN0cmluZy1wcm9wIG5hbWUpKSkKKyAgICAgICAgKHdoZW4gKGFuZCAobm90 IHN0cmluZy1wcm9wKQorICAgICAgICAgICAgICAgICAgIChub3QganMyLWlzLWluLWRlc3RydWN0 dXJpbmcpCisgICAgICAgICAgICAgICAgICAganMyLWhpZ2hsaWdodC1leHRlcm5hbC12YXJpYWJs ZXMKKyAgICAgICAgICAgICAgICAgICAoanMyLW5vZGUtZ2V0LXByb3AgZXhwciAnU0hPUlRIQU5E KSkKKyAgICAgICAgICAoanMyLXJlY29yZC1uYW1lLW5vZGUgbmFtZSkpCisgICAgICAgIChqczIt c2V0LWZhY2UgcHBvcyBwZW5kCisgICAgICAgICAgICAgICAgICAgICAgKGlmIChqczItZnVuY3Rp b24tbm9kZS1wCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoanMyLW9iamVjdC1wcm9wLW5v ZGUtcmlnaHQgZXhwcikpCisgICAgICAgICAgICAgICAgICAgICAgICAgICdmb250LWxvY2stZnVu Y3Rpb24tbmFtZS1mYWNlCisgICAgICAgICAgICAgICAgICAgICAgICAnZm9udC1sb2NrLXZhcmlh YmxlLW5hbWUtZmFjZSkKKyAgICAgICAgICAgICAgICAgICAgICAncmVjb3JkKSkpKSkpCisKKyhk ZWZ1biBqczItcGFyc2UtcGxhaW4tcHJvcGVydHkgKHByb3ApCisgICJQYXJzZSBhIG5vbi1nZXR0 ZXIvc2V0dGVyIHByb3BlcnR5IGluIGFuIG9iamVjdCBsaXRlcmFsLgorUFJPUCBpcyB0aGUgbm9k ZSByZXByZXNlbnRpbmcgdGhlIHByb3BlcnR5OiAgYSBudW1iZXIsIG5hbWUgb3Igc3RyaW5nLiIK KyAgKGxldCogKCh0dCAoanMyLWdldC10b2tlbikpCisgICAgICAgICAocG9zIChqczItbm9kZS1w b3MgcHJvcCkpCisgICAgICAgICBjb2xvbiBleHByIHJlc3VsdCkKKyAgICAoY29uZAorICAgICA7 OyBBYmJyZXZpYXRlZCBwcm9wZXJ0eSwgYXMgaW4ge2ZvbywgYmFyfQorICAgICAoKGFuZCAoPj0g anMyLWxhbmd1YWdlLXZlcnNpb24gMjAwKQorICAgICAgICAgICAob3IgKD0gdHQganMyLUNPTU1B KQorICAgICAgICAgICAgICAgKD0gdHQganMyLVJDKSkKKyAgICAgICAgICAgKG5vdCAoanMyLW51 bWJlci1ub2RlLXAgcHJvcCkpKQorICAgICAgKGpzMi11bmdldC10b2tlbikKKyAgICAgIChzZXRx IHJlc3VsdCAobWFrZS1qczItb2JqZWN0LXByb3Atbm9kZQorICAgICAgICAgICAgICAgICAgICA6 cG9zIHBvcworICAgICAgICAgICAgICAgICAgICA6bGVmdCBwcm9wCisgICAgICAgICAgICAgICAg ICAgIDpyaWdodCBwcm9wCisgICAgICAgICAgICAgICAgICAgIDpvcC1wb3MgKGpzMi1jdXJyZW50 LXRva2VuLWxlbikpKQorICAgICAgKGpzMi1ub2RlLWFkZC1jaGlsZHJlbiByZXN1bHQgcHJvcCkK KyAgICAgIChqczItbm9kZS1zZXQtcHJvcCByZXN1bHQgJ1NIT1JUSEFORCB0KQorICAgICAgcmVz dWx0KQorICAgICA7OyBOb3JtYWwgcHJvcGVydHkKKyAgICAgKHQKKyAgICAgIChpZiAoPSB0dCBq czItQ09MT04pCisgICAgICAgICAgKHNldHEgY29sb24gKC0gKGpzMi1jdXJyZW50LXRva2VuLWJl ZykgcG9zKQorICAgICAgICAgICAgICAgIGV4cHIgKGpzMi1wYXJzZS1hc3NpZ24tZXhwcikpCisg ICAgICAgIChqczItcmVwb3J0LWVycm9yICJtc2cubm8uY29sb24ucHJvcCIpCisgICAgICAgIChz ZXRxIGV4cHIgKG1ha2UtanMyLWVycm9yLW5vZGUpKSkKKyAgICAgIChzZXRxIHJlc3VsdCAobWFr ZS1qczItb2JqZWN0LXByb3Atbm9kZQorICAgICAgICAgICAgICAgICAgIDpwb3MgcG9zCisgICAg ICAgICAgICAgICAgICAgOzsgZG9uJ3QgaW5jbHVkZSBsYXN0IGNvbnN1bWVkIHRva2VuIGluIGxl bmd0aAorICAgICAgICAgICAgICAgICAgIDpsZW4gKC0gKCsgKGpzMi1ub2RlLXBvcyBleHByKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGpzMi1ub2RlLWxlbiBleHByKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgIHBvcykKKyAgICAgICAgICAgICAgICAgICA6bGVmdCBwcm9w CisgICAgICAgICAgICAgICAgICAgOnJpZ2h0IGV4cHIKKyAgICAgICAgICAgICAgICAgICA6b3At cG9zIGNvbG9uKSkKKyAgICAgIChqczItbm9kZS1hZGQtY2hpbGRyZW4gcmVzdWx0IHByb3AgZXhw cikKKyAgICAgIHJlc3VsdCkpKSkKKworKGRlZnVuIGpzMi1wYXJzZS1nZXR0ZXItc2V0dGVyLXBy b3AgKHBvcyBwcm9wIHR5cGUtc3RyaW5nKQorICAiUGFyc2UgZ2V0dGVyIG9yIHNldHRlciBwcm9w ZXJ0eSBpbiBhbiBvYmplY3QgbGl0ZXJhbC4KK0phdmFTY3JpcHQgc3ludGF4IGlzOgorCisgIHsg Z2V0IGZvbygpIHsuLi59LCBzZXQgZm9vKHgpIHsuLi59IH0KKworYW5kIGV4cHJlc3Npb24gY2xv c3VyZSBzdHlsZSBpcyBhbHNvIHN1cHBvcnRlZAorCisgIHsgZ2V0IGZvbygpIHgsIHNldCBmb28o eCkgX3ggPSB4IH0KKworUE9TIGlzIHRoZSBzdGFydCBwb3NpdGlvbiBvZiB0aGUgYGdldCcgb3Ig YHNldCcga2V5d29yZC4KK1BST1AgaXMgdGhlIGBqczItbmFtZS1ub2RlJyByZXByZXNlbnRpbmcg dGhlIHByb3BlcnR5IG5hbWUuCitHRVQtUCBpcyBub24tbmlsIGlmIHRoZSBrZXl3b3JkIHdhcyBg Z2V0Jy4iCisgIChsZXQgKCh0eXBlIChjb25kCisgICAgICAgICAgICAgICAoKHN0cmluZz0gImdl dCIgdHlwZS1zdHJpbmcpIGpzMi1HRVQpCisgICAgICAgICAgICAgICAoKHN0cmluZz0gInNldCIg dHlwZS1zdHJpbmcpIGpzMi1TRVQpCisgICAgICAgICAgICAgICAodCBqczItRlVOQ1RJT04pKSkK KyAgICAgICAgcmVzdWx0IGVuZAorICAgICAgICAoZm4gKGpzMi1wYXJzZS1mdW5jdGlvbi1leHBy KSkpCisgICAgOzsgaXQgaGFzIHRvIGJlIGFuIGFub255bW91cyBmdW5jdGlvbiwgYXMgd2UgYWxy ZWFkeSBwYXJzZWQgdGhlIG5hbWUKKyAgICAoaWYgKC89IChqczItbm9kZS10eXBlIGZuKSBqczIt RlVOQ1RJT04pCisgICAgICAgIChqczItcmVwb3J0LWVycm9yICJtc2cuYmFkLnByb3AiKQorICAg ICAgKGlmIChjbC1wbHVzcCAobGVuZ3RoIChqczItZnVuY3Rpb24tbmFtZSBmbikpKQorICAgICAg ICAgIChqczItcmVwb3J0LWVycm9yICJtc2cuYmFkLnByb3AiKSkpCisgICAgKGpzMi1ub2RlLXNl dC1wcm9wIGZuICdHRVRURVJfU0VUVEVSIHR5cGUpICA7IGZvciBjb2RlZ2VuCisgICAgKHNldHEg ZW5kIChqczItbm9kZS1lbmQgZm4pCisgICAgICAgICAgcmVzdWx0IChtYWtlLWpzMi1nZXR0ZXIt c2V0dGVyLW5vZGUgOnR5cGUgdHlwZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIDpwb3MgcG9zCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgOmxlbiAoLSBlbmQgcG9zKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIDpsZWZ0IHByb3AKKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICA6cmlnaHQgZm4pKQorICAgIChqczItbm9kZS1hZGQtY2hpbGRy ZW4gcmVzdWx0IHByb3AgZm4pCisgICAgcmVzdWx0KSkKKworKGRlZnVuIGpzMi1jcmVhdGUtbmFt ZS1ub2RlICgmb3B0aW9uYWwgY2hlY2stYWN0aXZhdGlvbi1wIHRva2VuIHN0cmluZykKKyAgIkNy ZWF0ZSBhIG5hbWUgbm9kZSB1c2luZyB0aGUgY3VycmVudCB0b2tlbiBhbmQsIG9wdGlvbmFsbHks IFNUUklORy4KK0FuZCwgaWYgQ0hFQ0stQUNUSVZBVElPTi1QIGlzIG5vbi1uaWwsIHVzZSB0aGUg dmFsdWUgb2YgVE9LRU4uIgorICAobGV0KiAoKGJlZyAoanMyLWN1cnJlbnQtdG9rZW4tYmVnKSkK KyAgICAgICAgICh0dCAoanMyLWN1cnJlbnQtdG9rZW4tdHlwZSkpCisgICAgICAgICAocyAob3Ig c3RyaW5nCisgICAgICAgICAgICAgICAgKGlmICg9IGpzMi1OQU1FIHR0KQorICAgICAgICAgICAg ICAgICAgICAoanMyLWN1cnJlbnQtdG9rZW4tc3RyaW5nKQorICAgICAgICAgICAgICAgICAgKGpz Mi10dC1uYW1lIHR0KSkpKQorICAgICAgICAgbmFtZSkKKyAgICAoc2V0cSBuYW1lIChtYWtlLWpz Mi1uYW1lLW5vZGUgOnBvcyBiZWcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg Om5hbWUgcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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5d29yZHMuIikKKworKGRlZnVuIGpzMi1yZS1zZWFyY2gtZm9yd2FyZC1pbm5l ciAocmVnZXhwICZvcHRpb25hbCBib3VuZCBjb3VudCkKKyAgIkF1eGlsaWFyeSBmdW5jdGlvbiBm b3IgYGpzMi1yZS1zZWFyY2gtZm9yd2FyZCcuIgorICAobGV0IChwYXJzZSBzYXZlZC1wb2ludCkK KyAgICAod2hpbGUgKD4gY291bnQgMCkKKyAgICAgIChyZS1zZWFyY2gtZm9yd2FyZCByZWdleHAg Ym91bmQpCisgICAgICAoc2V0cSBwYXJzZSAoaWYgc2F2ZWQtcG9pbnQKKyAgICAgICAgICAgICAg ICAgICAgICAocGFyc2UtcGFydGlhbC1zZXhwIHNhdmVkLXBvaW50IChwb2ludCkpCisgICAgICAg ICAgICAgICAgICAgIChzeW50YXgtcHBzcyAocG9pbnQpKSkpCisgICAgICAoY29uZCAoKG50aCAz IHBhcnNlKQorICAgICAgICAgICAgIChyZS1zZWFyY2gtZm9yd2FyZAorICAgICAgICAgICAgICAo Y29uY2F0ICJcXChcXD1cXHxbXlxcXVxcfF5cXCkiIChzdHJpbmcgKG50aCAzIHBhcnNlKSkpCisg ICAgICAgICAgICAgIChzYXZlLWV4Y3Vyc2lvbiAoZW5kLW9mLWxpbmUpIChwb2ludCkpIHQpKQor ICAgICAgICAgICAgKChudGggNyBwYXJzZSkKKyAgICAgICAgICAgICAoZm9yd2FyZC1saW5lKSkK KyAgICAgICAgICAgICgob3IgKG50aCA0IHBhcnNlKQorICAgICAgICAgICAgICAgICAoYW5kIChl cSAoY2hhci1iZWZvcmUpID9cLykgKGVxIChjaGFyLWFmdGVyKSA/XCopKSkKKyAgICAgICAgICAg ICAocmUtc2VhcmNoLWZvcndhcmQgIlxcKi8iKSkKKyAgICAgICAgICAgICh0CisgICAgICAgICAg ICAgKHNldHEgY291bnQgKDEtIGNvdW50KSkpKQorICAgICAgKHNldHEgc2F2ZWQtcG9pbnQgKHBv aW50KSkpKQorICAocG9pbnQpKQorCisoZGVmdW4ganMyLXJlLXNlYXJjaC1mb3J3YXJkIChyZWdl eHAgJm9wdGlvbmFsIGJvdW5kIG5vZXJyb3IgY291bnQpCisgICJTZWFyY2ggZm9yd2FyZCBidXQg aWdub3JlIHN0cmluZ3MgYW5kIGNvbW1lbnRzLgorSW52b2tlcyBgcmUtc2VhcmNoLWZvcndhcmQn IGJ1dCB0cmVhdHMgdGhlIGJ1ZmZlciBhcyBpZiBzdHJpbmdzCithbmQgY29tbWVudHMgaGF2ZSBi ZWVuIHJlbW92ZWQuIgorICAobGV0ICgoc2F2ZWQtcG9pbnQgKHBvaW50KSkpCisgICAgKGNvbmRp dGlvbi1jYXNlIGVycgorICAgICAgICAoY29uZCAoKG51bGwgY291bnQpCisgICAgICAgICAgICAg ICAoanMyLXJlLXNlYXJjaC1mb3J3YXJkLWlubmVyIHJlZ2V4cCBib3VuZCAxKSkKKyAgICAgICAg ICAgICAgKCg8IGNvdW50IDApCisgICAgICAgICAgICAgICAoanMyLXJlLXNlYXJjaC1iYWNrd2Fy ZC1pbm5lciByZWdleHAgYm91bmQgKC0gY291bnQpKSkKKyAgICAgICAgICAgICAgKCg+IGNvdW50 IDApCisgICAgICAgICAgICAgICAoanMyLXJlLXNlYXJjaC1mb3J3YXJkLWlubmVyIHJlZ2V4cCBi b3VuZCBjb3VudCkpKQorICAgICAgKHNlYXJjaC1mYWlsZWQKKyAgICAgICAoZ290by1jaGFyIHNh dmVkLXBvaW50KQorICAgICAgICh1bmxlc3Mgbm9lcnJvcgorICAgICAgICAgKGVycm9yIChlcnJv ci1tZXNzYWdlLXN0cmluZyBlcnIpKSkpKSkpCisKKyhkZWZ1biBqczItcmUtc2VhcmNoLWJhY2t3 YXJkLWlubmVyIChyZWdleHAgJm9wdGlvbmFsIGJvdW5kIGNvdW50KQorICAiQXV4aWxpYXJ5IGZ1 bmN0aW9uIGZvciBganMyLXJlLXNlYXJjaC1iYWNrd2FyZCcuIgorICAobGV0IChwYXJzZSkKKyAg ICAod2hpbGUgKD4gY291bnQgMCkKKyAgICAgIChyZS1zZWFyY2gtYmFja3dhcmQgcmVnZXhwIGJv dW5kKQorICAgICAgKHNldHEgcGFyc2UgKHN5bnRheC1wcHNzIChwb2ludCkpKQorICAgICAgKGNv bmQgKChudGggMyBwYXJzZSkKKyAgICAgICAgICAgICAocmUtc2VhcmNoLWJhY2t3YXJkCisgICAg ICAgICAgICAgIChjb25jYXQgIlxcKFteXFxdXFx8XlxcKSIgKHN0cmluZyAobnRoIDMgcGFyc2Up KSkKKyAgICAgICAgICAgICAgKGxpbmUtYmVnaW5uaW5nLXBvc2l0aW9uKSB0KSkKKyAgICAgICAg ICAgICgobnRoIDcgcGFyc2UpCisgICAgICAgICAgICAgKGdvdG8tY2hhciAobnRoIDggcGFyc2Up KSkKKyAgICAgICAgICAgICgob3IgKG50aCA0IHBhcnNlKQorICAgICAgICAgICAgICAgICAoYW5k IChlcSAoY2hhci1iZWZvcmUpID8vKSAoZXEgKGNoYXItYWZ0ZXIpID8qKSkpCisgICAgICAgICAg ICAgKHJlLXNlYXJjaC1iYWNrd2FyZCAiL1xcKiIpKQorICAgICAgICAgICAgKHQKKyAgICAgICAg ICAgICAoc2V0cSBjb3VudCAoMS0gY291bnQpKSkpKSkKKyAgKHBvaW50KSkKKworKGRlZnVuIGpz Mi1yZS1zZWFyY2gtYmFja3dhcmQgKHJlZ2V4cCAmb3B0aW9uYWwgYm91bmQgbm9lcnJvciBjb3Vu dCkKKyAgIlNlYXJjaCBiYWNrd2FyZCBidXQgaWdub3JlIHN0cmluZ3MgYW5kIGNvbW1lbnRzLgor SW52b2tlcyBgcmUtc2VhcmNoLWJhY2t3YXJkJyBidXQgdHJlYXRzIHRoZSBidWZmZXIgYXMgaWYg c3RyaW5ncworYW5kIGNvbW1lbnRzIGhhdmUgYmVlbiByZW1vdmVkLiIKKyAgKGxldCAoKHNhdmVk LXBvaW50IChwb2ludCkpKQorICAgIChjb25kaXRpb24tY2FzZSBlcnIKKyAgICAgICAgKGNvbmQg KChudWxsIGNvdW50KQorICAgICAgICAgICAgICAgKGpzMi1yZS1zZWFyY2gtYmFja3dhcmQtaW5u ZXIgcmVnZXhwIGJvdW5kIDEpKQorICAgICAgICAgICAgICAoKDwgY291bnQgMCkKKyAgICAgICAg ICAgICAgIChqczItcmUtc2VhcmNoLWZvcndhcmQtaW5uZXIgcmVnZXhwIGJvdW5kICgtIGNvdW50 KSkpCisgICAgICAgICAgICAgICgoPiBjb3VudCAwKQorICAgICAgICAgICAgICAgKGpzMi1yZS1z ZWFyY2gtYmFja3dhcmQtaW5uZXIgcmVnZXhwIGJvdW5kIGNvdW50KSkpCisgICAgICAoc2VhcmNo LWZhaWxlZAorICAgICAgIChnb3RvLWNoYXIgc2F2ZWQtcG9pbnQpCisgICAgICAgKHVubGVzcyBu b2Vycm9yCisgICAgICAgICAoZXJyb3IgKGVycm9yLW1lc3NhZ2Utc3RyaW5nIGVycikpKSkpKSkK KworKGRlZnVuIGpzMi1sb29raW5nLWF0LW9wZXJhdG9yLXAgKCkKKyAgIlJldHVybiBub24tbmls IGlmIHRleHQgYWZ0ZXIgcG9pbnQgaXMgYSBub24tY29tbWEgb3BlcmF0b3IuIgorICAoYW5kIChs b29raW5nLWF0IGpzMi1pbmRlbnQtb3BlcmF0b3ItcmUpCisgICAgICAgKG9yIChub3QgKGxvb2tp bmctYXQgIjoiKSkKKyAgICAgICAgICAgKHNhdmUtZXhjdXJzaW9uCisgICAgICAgICAgICAgKGFu ZCAoanMyLXJlLXNlYXJjaC1iYWNrd2FyZCAiWz86e11cXHxcXDxjYXNlXFw+IiBuaWwgdCkKKyAg ICAgICAgICAgICAgICAgIChsb29raW5nLWF0ICI/IikpKSkpKQorCisoZGVmdW4ganMyLWNvbnRp bnVlZC1leHByZXNzaW9uLXAgKCkKKyAgIlJldHVybiBub24tbmlsIGlmIHRoZSBjdXJyZW50IGxp bmUgY29udGludWVzIGFuIGV4cHJlc3Npb24uIgorICAoc2F2ZS1leGN1cnNpb24KKyAgICAoYmFj ay10by1pbmRlbnRhdGlvbikKKyAgICAob3IgKGpzMi1sb29raW5nLWF0LW9wZXJhdG9yLXApCisg ICAgICAgICh3aGVuIChjYXRjaCAnZm91bmQKKyAgICAgICAgICAgICAgICAod2hpbGUgKGFuZCAo cmUtc2VhcmNoLWJhY2t3YXJkICJcbiIgbmlsIHQpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKGxldCAoKHN0YXRlIChzeW50YXgtcHBzcykpKQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKHdoZW4gKG50aCA0IHN0YXRlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAoZ290by1jaGFyIChudGggOCBzdGF0ZSkpKSA7OyBza2lwIGNvbW1lbnRzCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAoc2tpcC1jaGFycy1iYWNrd2FyZCAiIFx0IikKKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIChpZiAoYm9scCkKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICB0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0aHJvdyAnZm91 bmQgdCkpKSkpKQorICAgICAgICAgIChiYWNrd2FyZC1jaGFyKQorICAgICAgICAgICh3aGVuIChq czItbG9va2luZy1hdC1vcGVyYXRvci1wKQorICAgICAgICAgICAgKGJhY2t3YXJkLWNoYXIpCisg ICAgICAgICAgICAobm90IChsb29raW5nLWF0ICJcXCpcXHxcXCtcXCtcXHwtLVxcfC9bLypdIikp KSkpKSkKKworKGRlZnVuIGpzMi1lbmQtb2YtZG8td2hpbGUtbG9vcC1wICgpCisgICJSZXR1cm4g bm9uLW5pbCBpZiB3b3JkIGFmdGVyIHBvaW50IGlzIGB3aGlsZScgb2YgYSBkby13aGlsZQorc3Rh dGVtZW50LCBlbHNlIHJldHVybnMgbmlsLiBBIGJyYWNlbGVzcyBkby13aGlsZSBzdGF0ZW1lbnQK K3NwYW5uaW5nIHNldmVyYWwgbGluZXMgcmVxdWlyZXMgdGhhdCB0aGUgc3RhcnQgb2YgdGhlIGxv b3AgaXMKK2luZGVudGVkIHRvIHRoZSBzYW1lIGNvbHVtbiBhcyB0aGUgY3VycmVudCBsaW5lLiIK KyAgKGludGVyYWN0aXZlKQorICAoc2F2ZS1leGN1cnNpb24KKyAgICAod2hlbiAobG9va2luZy1h dCAiXFxzLSpcXDx3aGlsZVxcPiIpCisgICAgICAoaWYgKHNhdmUtZXhjdXJzaW9uCisgICAgICAg ICAgICAoc2tpcC1jaGFycy1iYWNrd2FyZCAiWyBcdFxuXSp9IikKKyAgICAgICAgICAgIChsb29r aW5nLWF0ICJbIFx0XG5dKn0iKSkKKyAgICAgICAgICAoc2F2ZS1leGN1cnNpb24KKyAgICAgICAg ICAgIChiYWNrd2FyZC1saXN0KSAoYmFja3dhcmQtd29yZCAxKSAobG9va2luZy1hdCAiXFw8ZG9c XD4iKSkKKyAgICAgICAgKGpzMi1yZS1zZWFyY2gtYmFja3dhcmQgIlxcPGRvXFw+IiAocG9pbnQt YXQtYm9sKSB0KQorICAgICAgICAob3IgKGxvb2tpbmctYXQgIlxcPGRvXFw+IikKKyAgICAgICAg ICAgIChsZXQgKChzYXZlZC1pbmRlbnQgKGN1cnJlbnQtaW5kZW50YXRpb24pKSkKKyAgICAgICAg ICAgICAgKHdoaWxlIChhbmQgKGpzMi1yZS1zZWFyY2gtYmFja3dhcmQgIl5bIFx0XSpcXDwiIG5p bCB0KQorICAgICAgICAgICAgICAgICAgICAgICAgICAoLz0gKGN1cnJlbnQtaW5kZW50YXRpb24p IHNhdmVkLWluZGVudCkpKQorICAgICAgICAgICAgICAoYW5kIChsb29raW5nLWF0ICJbIFx0XSpc XDxkb1xcPiIpCisgICAgICAgICAgICAgICAgICAgKG5vdCAoanMyLXJlLXNlYXJjaC1mb3J3YXJk CisgICAgICAgICAgICAgICAgICAgICAgICAgIlxcPHdoaWxlXFw+IiAocG9pbnQtYXQtZW9sKSB0 KSkKKyAgICAgICAgICAgICAgICAgICAoPSAoY3VycmVudC1pbmRlbnRhdGlvbikgc2F2ZWQtaW5k ZW50KSkpKSkpKSkKKworKGRlZnVuIGpzMi1tdWx0aWxpbmUtZGVjbC1pbmRlbnRhdGlvbiAoKQor ICAiUmV0dXJuIHRoZSBkZWNsYXJhdGlvbiBpbmRlbnRhdGlvbiBjb2x1bW4gaWYgdGhlIGN1cnJl bnQgbGluZSBiZWxvbmdzCit0byBhIG11bHRpbGluZSBkZWNsYXJhdGlvbiBzdGF0ZW1lbnQuICBT ZWUgYGpzMi1wcmV0dHktbXVsdGlsaW5lLWRlY2xhcmF0aW9ucycuIgorICAobGV0IChmb3J3YXJk LXNleHAtZnVuY3Rpb24gOyB1c2UgTGlzcCB2ZXJzaW9uCisgICAgICAgIGF0LW9wZW5pbmctYnJh Y2tldCkKKyAgICAoc2F2ZS1leGN1cnNpb24KKyAgICAgIChiYWNrLXRvLWluZGVudGF0aW9uKQor ICAgICAgKHdoZW4gKG5vdCAobG9va2luZy1hdCBqczItZGVjbGFyYXRpb24ta2V5d29yZC1yZSkp CisgICAgICAgICh3aGVuIChsb29raW5nLWF0IGpzMi1pbmRlbnQtb3BlcmF0b3ItcmUpCisgICAg ICAgICAgKGdvdG8tY2hhciAobWF0Y2gtZW5kIDApKSkgOyBjb250aW51ZWQgZXhwcmVzc2lvbnMg YXJlIG9rCisgICAgICAgICh3aGlsZSAoYW5kIChub3QgYXQtb3BlbmluZy1icmFja2V0KQorICAg ICAgICAgICAgICAgICAgICAobm90IChib2JwKSkKKyAgICAgICAgICAgICAgICAgICAgKGxldCAo KHBvcyAocG9pbnQpKSkKKyAgICAgICAgICAgICAgICAgICAgICAoc2F2ZS1leGN1cnNpb24KKyAg ICAgICAgICAgICAgICAgICAgICAgIChqczItYmFja3dhcmQtc3dzKQorICAgICAgICAgICAgICAg ICAgICAgICAgKG9yIChlcSAoY2hhci1iZWZvcmUpID8sKQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgIChhbmQgKG5vdCAoZXEgKGNoYXItYmVmb3JlKSA/XDspKQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKHByb2cyIChza2lwLXN5bnRheC1iYWNrd2FyZCAiLiIpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGxvb2tpbmctYXQganMyLWluZGVudC1v cGVyYXRvci1yZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGpzMi1iYWNr d2FyZC1zd3MpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG5vdCAoZXEgKGNo YXItYmVmb3JlKSA/XDspKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAoanMyLXNhbWUt bGluZSBwb3MpKSkpKQorICAgICAgICAgIChjb25kaXRpb24tY2FzZSBfCisgICAgICAgICAgICAg IChiYWNrd2FyZC1zZXhwKQorICAgICAgICAgICAgKHNjYW4tZXJyb3IgKHNldHEgYXQtb3Blbmlu Zy1icmFja2V0IHQpKSkpCisgICAgICAgICh3aGVuIChsb29raW5nLWF0IGpzMi1kZWNsYXJhdGlv bi1rZXl3b3JkLXJlKQorICAgICAgICAgIChnb3RvLWNoYXIgKG1hdGNoLWVuZCAwKSkKKyAgICAg ICAgICAoMSsgKGN1cnJlbnQtY29sdW1uKSkpKSkpKQorCisoZGVmdW4ganMyLWN0cmwtc3RhdGVt ZW50LWluZGVudGF0aW9uICgpCisgICJSZXR1cm4gdGhlIHByb3BlciBpbmRlbnRhdGlvbiBvZiBj dXJyZW50IGxpbmUgaWYgaXQgaXMgYSBjb250cm9sIHN0YXRlbWVudC4KK1JldHVybnMgYW4gaW5k ZW50YXRpb24gaWYgdGhpcyBsaW5lIHN0YXJ0cyB0aGUgYm9keSBvZiBhIGNvbnRyb2wKK3N0YXRl bWVudCB3aXRob3V0IGJyYWNlcywgZWxzZSByZXR1cm5zIG5pbC4iCisgIChsZXQgKGZvcndhcmQt c2V4cC1mdW5jdGlvbikKKyAgICAoc2F2ZS1leGN1cnNpb24KKyAgICAgIChiYWNrLXRvLWluZGVu dGF0aW9uKQorICAgICAgKHdoZW4gKGFuZCAobm90IChqczItc2FtZS1saW5lIChwb2ludC1taW4p KSkKKyAgICAgICAgICAgICAgICAgKG5vdCAobG9va2luZy1hdCAieyIpKQorICAgICAgICAgICAg ICAgICAoanMyLXJlLXNlYXJjaC1iYWNrd2FyZCAiW1s6Z3JhcGg6XV0iIG5pbCB0KQorICAgICAg ICAgICAgICAgICAobm90IChsb29raW5nLWF0ICJbeyhbXSIpKQorICAgICAgICAgICAgICAgICAo cHJvZ24KKyAgICAgICAgICAgICAgICAgICAoZm9yd2FyZC1jaGFyKQorICAgICAgICAgICAgICAg ICAgICh3aGVuICg9IChjaGFyLWJlZm9yZSkgP1wpKQorICAgICAgICAgICAgICAgICAgICAgOzsg c2Nhbi1zZXhwcyBzb21ldGltZXMgdGhyb3dzIGFuIGVycm9yCisgICAgICAgICAgICAgICAgICAg ICAoaWdub3JlLWVycm9ycyAoYmFja3dhcmQtc2V4cCkpCisgICAgICAgICAgICAgICAgICAgICAo c2tpcC1jaGFycy1iYWNrd2FyZCAiIFx0IiAocG9pbnQtYXQtYm9sKSkpCisgICAgICAgICAgICAg ICAgICAgKGxldCAoKHB0IChwb2ludCkpKQorICAgICAgICAgICAgICAgICAgICAgKGJhY2stdG8t aW5kZW50YXRpb24pCisgICAgICAgICAgICAgICAgICAgICAod2hlbiAobG9va2luZy1hdCAifVsg XHRdKiIpCisgICAgICAgICAgICAgICAgICAgICAgIChnb3RvLWNoYXIgKG1hdGNoLWVuZCAwKSkp CisgICAgICAgICAgICAgICAgICAgICAoYW5kIChsb29raW5nLWF0IGpzMi1wb3NzaWJseS1icmFj ZWxlc3Mta2V5d29yZHMtcmUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICg9IChtYXRjaC1l bmQgMCkgcHQpCisgICAgICAgICAgICAgICAgICAgICAgICAgIChub3QgKGpzMi1lbmQtb2YtZG8t d2hpbGUtbG9vcC1wKSkpKSkpCisgICAgICAgICgrIChjdXJyZW50LWluZGVudGF0aW9uKSBqczIt YmFzaWMtb2Zmc2V0KSkpKSkKKworKGRlZnVuIGpzMi1pbmRlbnQtaW4tYXJyYXktY29tcCAocGFy c2Utc3RhdHVzKQorICAiUmV0dXJuIG5vbi1uaWwgaWYgd2UgdGhpbmsgd2UncmUgaW4gYW4gYXJy YXkgY29tcHJlaGVuc2lvbi4KK0luIHBhcnRpY3VsYXIsIHJldHVybiB0aGUgYnVmZmVyIHBvc2l0 aW9uIG9mIHRoZSBmaXJzdCBgZm9yJyBrd2QuIgorICAobGV0ICgoYnJhY2tldCAobnRoIDEgcGFy c2Utc3RhdHVzKSkKKyAgICAgICAgKGVuZCAocG9pbnQpKSkKKyAgICAod2hlbiBicmFja2V0Cisg ICAgICAoc2F2ZS1leGN1cnNpb24KKyAgICAgICAgKGdvdG8tY2hhciBicmFja2V0KQorICAgICAg ICAod2hlbiAobG9va2luZy1hdCAiXFxbIikKKyAgICAgICAgICAoZm9yd2FyZC1jaGFyIDEpCisg ICAgICAgICAgKGpzMi1mb3J3YXJkLXN3cykKKyAgICAgICAgICAoaWYgKGxvb2tpbmctYXQgIltb e10iKQorICAgICAgICAgICAgICAobGV0IChmb3J3YXJkLXNleHAtZnVuY3Rpb24pIDsgdXNlIExp c3AgdmVyc2lvbgorICAgICAgICAgICAgICAgIChmb3J3YXJkLXNleHApICAgICAgICAgICAgIDsg c2tpcCBkZXN0cnVjdHVyaW5nIGZvcm0KKyAgICAgICAgICAgICAgICAoanMyLWZvcndhcmQtc3dz KQorICAgICAgICAgICAgICAgIChpZiAoYW5kICgvPSAoY2hhci1hZnRlcikgPywpIDsgcmVndWxh ciBhcnJheQorICAgICAgICAgICAgICAgICAgICAgICAgIChsb29raW5nLWF0ICJmb3IiKSkKKyAg ICAgICAgICAgICAgICAgICAgKG1hdGNoLWJlZ2lubmluZyAwKSkpCisgICAgICAgICAgICA7OyB0 byBza2lwIGFyYml0cmFyeSBleHByZXNzaW9ucyB3ZSBuZWVkIHRoZSBwYXJzZXIsCisgICAgICAg ICAgICA7OyBzbyB3ZSdsbCBqdXN0IGd1ZXNzIGF0IGl0LgorICAgICAgICAgICAgKGlmIChhbmQg KD4gZW5kIChwb2ludCkpIDsgbm90IGVtcHR5IGxpdGVyYWwKKyAgICAgICAgICAgICAgICAgICAg IChyZS1zZWFyY2gtZm9yd2FyZCAiW14sXV0qIFxcKGZvclxcKSAiIGVuZCB0KQorICAgICAgICAg ICAgICAgICAgICAgOzsgbm90IGluc2lkZSBjb21tZW50IG9yIHN0cmluZyBsaXRlcmFsCisgICAg ICAgICAgICAgICAgICAgICAobGV0ICgoc3RhdGUgKHBhcnNlLXBhcnRpYWwtc2V4cCBicmFja2V0 IChwb2ludCkpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgKG5vdCAob3IgKG50aCAzIHN0YXRl KSAobnRoIDQgc3RhdGUpKSkpKQorICAgICAgICAgICAgICAgIChtYXRjaC1iZWdpbm5pbmcgMSkp KSkpKSkpCisKKyhkZWZ1biBqczItYXJyYXktY29tcC1pbmRlbnRhdGlvbiAocGFyc2Utc3RhdHVz IGZvci1rd2QpCisgIChpZiAoanMyLXNhbWUtbGluZSBmb3Ita3dkKQorICAgICAgOzsgZmlyc3Qg Y29udGludWF0aW9uIGxpbmUKKyAgICAgIChzYXZlLWV4Y3Vyc2lvbgorICAgICAgICAoZ290by1j aGFyIChudGggMSBwYXJzZS1zdGF0dXMpKQorICAgICAgICAoZm9yd2FyZC1jaGFyIDEpCisgICAg ICAgIChza2lwLWNoYXJzLWZvcndhcmQgIiBcdCIpCisgICAgICAgIChjdXJyZW50LWNvbHVtbikp CisgICAgKHNhdmUtZXhjdXJzaW9uCisgICAgICAoZ290by1jaGFyIGZvci1rd2QpCisgICAgICAo Y3VycmVudC1jb2x1bW4pKSkpCisKKyhkZWZ1biBqczItcHJvcGVyLWluZGVudGF0aW9uIChwYXJz ZS1zdGF0dXMpCisgICJSZXR1cm4gdGhlIHByb3BlciBpbmRlbnRhdGlvbiBmb3IgdGhlIGN1cnJl bnQgbGluZS4iCisgIChzYXZlLWV4Y3Vyc2lvbgorICAgIChiYWNrLXRvLWluZGVudGF0aW9uKQor ICAgIChsZXQqICgoY3RybC1zdG10LWluZGVudCAoanMyLWN0cmwtc3RhdGVtZW50LWluZGVudGF0 aW9uKSkKKyAgICAgICAgICAgKGF0LWNsb3NpbmctYnJhY2tldCAobG9va2luZy1hdCAiW119KV0i KSkKKyAgICAgICAgICAgKHNhbWUtaW5kZW50LXAgKG9yIGF0LWNsb3NpbmctYnJhY2tldAorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgKGxvb2tpbmctYXQgIlxcPGNhc2VcXD5bXjpdIikK KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhbmQgKGxvb2tpbmctYXQgIlxcPGRlZmF1 bHQ6IikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHNhdmUtZXhjdXJzaW9u CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGpzMi1iYWNrd2FyZC1zd3Mp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG5vdCAobWVtcSAoY2hhci1i ZWZvcmUpICcoPywgP3spKSkpKSkpCisgICAgICAgICAgIChjb250aW51ZWQtZXhwci1wIChqczIt Y29udGludWVkLWV4cHJlc3Npb24tcCkpCisgICAgICAgICAgIChkZWNsYXJhdGlvbi1pbmRlbnQg KGFuZCBqczItcHJldHR5LW11bHRpbGluZS1kZWNsYXJhdGlvbnMKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIChqczItbXVsdGlsaW5lLWRlY2wtaW5kZW50YXRpb24pKSkKKyAg ICAgICAgICAgKGJyYWNrZXQgKG50aCAxIHBhcnNlLXN0YXR1cykpCisgICAgICAgICAgIGJlZyBp bmRlbnQpCisgICAgICAoY29uZAorICAgICAgIDs7IGluZGVudCBhcnJheSBjb21wcmVoZW5zaW9u IGNvbnRpbnVhdGlvbiBsaW5lcyBzcGVjaWFsbHkKKyAgICAgICAoKGFuZCBicmFja2V0CisgICAg ICAgICAgICAgKD49IGpzMi1sYW5ndWFnZS12ZXJzaW9uIDE3MCkKKyAgICAgICAgICAgICAobm90 IChqczItc2FtZS1saW5lIGJyYWNrZXQpKQorICAgICAgICAgICAgIChzZXRxIGJlZyAoanMyLWlu ZGVudC1pbi1hcnJheS1jb21wIHBhcnNlLXN0YXR1cykpCisgICAgICAgICAgICAgKD49IChwb2lu dCkgKHNhdmUtZXhjdXJzaW9uCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoZ290by1jaGFy IGJlZykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIChwb2ludC1hdC1ib2wpKSkpIDsgYXQg b3IgYWZ0ZXIgZmlyc3QgbG9vcD8KKyAgICAgICAgKGpzMi1hcnJheS1jb21wLWluZGVudGF0aW9u IHBhcnNlLXN0YXR1cyBiZWcpKQorCisgICAgICAgKGN0cmwtc3RtdC1pbmRlbnQpCisKKyAgICAg ICAoKGFuZCBkZWNsYXJhdGlvbi1pbmRlbnQgY29udGludWVkLWV4cHItcCkKKyAgICAgICAgKCsg ZGVjbGFyYXRpb24taW5kZW50IGpzMi1iYXNpYy1vZmZzZXQpKQorCisgICAgICAgKGRlY2xhcmF0 aW9uLWluZGVudCkKKworICAgICAgIChicmFja2V0CisgICAgICAgIChnb3RvLWNoYXIgYnJhY2tl dCkKKyAgICAgICAgKGNvbmQKKyAgICAgICAgICgobG9va2luZy1hdCAiWyh7W11bIFx0XSpcXCgv Wy8qXVxcfCRcXCkiKQorICAgICAgICAgICh3aGVuIChzYXZlLWV4Y3Vyc2lvbiAoc2tpcC1jaGFy cy1iYWNrd2FyZCAiIFx0KSIpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChsb29r aW5nLWF0ICIpIikpCisgICAgICAgICAgICAoYmFja3dhcmQtbGlzdCkpCisgICAgICAgICAgKGJh Y2stdG8taW5kZW50YXRpb24pCisgICAgICAgICAgKGFuZCAoZXEganMyLXByZXR0eS1tdWx0aWxp bmUtZGVjbGFyYXRpb25zICdhbGwpCisgICAgICAgICAgICAgICAobG9va2luZy1hdCBqczItZGVj bGFyYXRpb24ta2V5d29yZC1yZSkKKyAgICAgICAgICAgICAgIChnb3RvLWNoYXIgKDErIChtYXRj aC1lbmQgMCkpKSkKKyAgICAgICAgICAoc2V0cSBpbmRlbnQKKyAgICAgICAgICAgICAgICAoY29u ZCAoc2FtZS1pbmRlbnQtcAorICAgICAgICAgICAgICAgICAgICAgICAoY3VycmVudC1jb2x1bW4p KQorICAgICAgICAgICAgICAgICAgICAgIChjb250aW51ZWQtZXhwci1wCisgICAgICAgICAgICAg ICAgICAgICAgICgrIChjdXJyZW50LWNvbHVtbikgKCogMiBqczItYmFzaWMtb2Zmc2V0KSkpCisg ICAgICAgICAgICAgICAgICAgICAgKHQKKyAgICAgICAgICAgICAgICAgICAgICAgKCsgKGN1cnJl bnQtY29sdW1uKSBqczItYmFzaWMtb2Zmc2V0KSkpKQorICAgICAgICAgIChpZiAoYW5kIGpzMi1p bmRlbnQtc3dpdGNoLWJvZHkKKyAgICAgICAgICAgICAgICAgICAobm90IGF0LWNsb3NpbmctYnJh Y2tldCkKKyAgICAgICAgICAgICAgICAgICAobG9va2luZy1hdCAiXFxfPHN3aXRjaFxcXz4iKSkK KyAgICAgICAgICAgICAgKCsgaW5kZW50IGpzMi1iYXNpYy1vZmZzZXQpCisgICAgICAgICAgICBp bmRlbnQpKQorICAgICAgICAgKHQKKyAgICAgICAgICAodW5sZXNzIHNhbWUtaW5kZW50LXAKKyAg ICAgICAgICAgIChmb3J3YXJkLWNoYXIpCisgICAgICAgICAgICAoc2tpcC1jaGFycy1mb3J3YXJk ICIgXHQiKSkKKyAgICAgICAgICAoY3VycmVudC1jb2x1bW4pKSkpCisKKyAgICAgICAoY29udGlu dWVkLWV4cHItcCBqczItYmFzaWMtb2Zmc2V0KQorCisgICAgICAgKHQgMCkpKSkpCisKKyhkZWZ1 biBqczItbGluZXVwLWNvbW1lbnQgKHBhcnNlLXN0YXR1cykKKyAgIkluZGVudCBhIG11bHRpLWxp bmUgYmxvY2sgY29tbWVudCBjb250aW51YXRpb24gbGluZS4iCisgIChsZXQqICgoYmVnIChudGgg OCBwYXJzZS1zdGF0dXMpKQorICAgICAgICAgKGZpcnN0LWxpbmUgKGpzMi1zYW1lLWxpbmUgYmVn KSkKKyAgICAgICAgIChvZmZzZXQgKHNhdmUtZXhjdXJzaW9uCisgICAgICAgICAgICAgICAgICAg KGdvdG8tY2hhciBiZWcpCisgICAgICAgICAgICAgICAgICAgKGlmIChsb29raW5nLWF0ICIvXFwq IikKKyAgICAgICAgICAgICAgICAgICAgICAgKCsgMSAoY3VycmVudC1jb2x1bW4pKQorICAgICAg ICAgICAgICAgICAgICAgMCkpKSkKKyAgICAodW5sZXNzIGZpcnN0LWxpbmUKKyAgICAgIChpbmRl bnQtbGluZS10byBvZmZzZXQpKSkpCisKKyhkZWZ1biBqczItYmFja3dhcmQtc3dzICgpCisgICJN b3ZlIGJhY2t3YXJkIHRocm91Z2ggd2hpdGVzcGFjZSBhbmQgY29tbWVudHMuIgorICAoaW50ZXJh Y3RpdmUpCisgICh3aGlsZSAoZm9yd2FyZC1jb21tZW50IC0xKSkpCisKKyhkZWZ1biBqczItZm9y d2FyZC1zd3MgKCkKKyAgIk1vdmUgZm9yd2FyZCB0aHJvdWdoIHdoaXRlc3BhY2UgYW5kIGNvbW1l bnRzLiIKKyAgKGludGVyYWN0aXZlKQorICAod2hpbGUgKGZvcndhcmQtY29tbWVudCAxKSkpCisK KyhkZWZ1biBqczItY3VycmVudC1pbmRlbnQgKCZvcHRpb25hbCBwb3MpCisgICJSZXR1cm4gY29s dW1uIG9mIGluZGVudGF0aW9uIG9uIGN1cnJlbnQgbGluZS4KK0lmIFBPUyBpcyBub24tbmlsLCBn byB0byB0aGF0IHBvaW50IGFuZCByZXR1cm4gaW5kZW50YXRpb24gZm9yIHRoYXQgbGluZS4iCisg IChzYXZlLWV4Y3Vyc2lvbgorICAgIChpZiBwb3MKKyAgICAgICAgKGdvdG8tY2hhciBwb3MpKQor ICAgIChiYWNrLXRvLWluZGVudGF0aW9uKQorICAgIChjdXJyZW50LWNvbHVtbikpKQorCisoZGVm dW4ganMyLWFyZ2xpc3QtY2xvc2UgKCkKKyAgIlJldHVybiBub24tbmlsIGlmIHdlJ3JlIG9uIGEg bGluZSBiZWdpbm5pbmcgd2l0aCBhIGNsb3NlLXBhcmVuL2JyYWNlLiIKKyAgKHNhdmUtZXhjdXJz aW9uCisgICAgKGdvdG8tY2hhciAocG9pbnQtYXQtYm9sKSkKKyAgICAoanMyLWZvcndhcmQtc3dz KQorICAgIChsb29raW5nLWF0ICJbXSl9XSIpKSkKKworKGRlZnVuIGpzMi1pbmRlbnQtbG9va3Mt bGlrZS1sYWJlbC1wICgpCisgIChnb3RvLWNoYXIgKHBvaW50LWF0LWJvbCkpCisgIChqczItZm9y d2FyZC1zd3MpCisgIChsb29raW5nLWF0IChjb25jYXQganMyLW1vZGUtaWRlbnRpZmllci1yZSAi OiIpKSkKKworKGRlZnVuIGpzMi1pbmRlbnQtaW4tb2JqbGl0LXAgKHBhcnNlLXN0YXR1cykKKyAg IlJldHVybiBub24tbmlsIGlmIHRoaXMgbG9va3MgbGlrZSBhbiBvYmplY3QtbGl0ZXJhbCBlbnRy eS4iCisgIChsZXQgKChzdGFydCAobnRoIDEgcGFyc2Utc3RhdHVzKSkpCisgICAgKGFuZAorICAg ICBzdGFydAorICAgICAoc2F2ZS1leGN1cnNpb24KKyAgICAgICAoYW5kICh6ZXJvcCAoZm9yd2Fy ZC1saW5lIC0xKSkKKyAgICAgICAgICAgIChub3QgKDwgKHBvaW50KSBzdGFydCkpICAgICA7IGNy b3NzZWQgYSB7fSBib3VuZGFyeQorICAgICAgICAgICAgKGpzMi1pbmRlbnQtbG9va3MtbGlrZS1s YWJlbC1wKSkpCisgICAgIChzYXZlLWV4Y3Vyc2lvbgorICAgICAgIChqczItaW5kZW50LWxvb2tz LWxpa2UtbGFiZWwtcCkpKSkpCisKKzs7IElmIHByZXYgbGluZSBsb29rcyBsaWtlIGZvb2Jhcih7 IHRoZW4gd2UncmUgcGFzc2luZyBhbiBvYmplY3QKKzs7IGxpdGVyYWwgdG8gYSBmdW5jdGlvbiBj YWxsLCBhbmQgcGVvcGxlIHByZXR0eSBtdWNoIGFsd2F5cyB3YW50IHRvCis7OyBkZS1kZW50IGJh Y2sgdG8gdGhlIHByZXZpb3VzIGxpbmUsIHNvIG1vdmUgdGhlICdiYXNpYy1vZmZzZXQnCis7OyBw b3NpdGlvbiB0byB0aGUgZnJvbnQuCisoZGVmdW4ganMyLWluZGVudC1vYmpsaXQtYXJnLXAgKHBh cnNlLXN0YXR1cykKKyAgKHNhdmUtZXhjdXJzaW9uCisgICAgKGJhY2stdG8taW5kZW50YXRpb24p CisgICAgKGpzMi1iYWNrd2FyZC1zd3MpCisgICAgKGFuZCAoZXEgKDEtIChwb2ludCkpIChudGgg MSBwYXJzZS1zdGF0dXMpKQorICAgICAgICAgKGVxIChjaGFyLWJlZm9yZSkgP3spCisgICAgICAg ICAocHJvZ24KKyAgICAgICAgICAgKGZvcndhcmQtY2hhciAtMSkKKyAgICAgICAgICAgKHNraXAt Y2hhcnMtYmFja3dhcmQgIiBcdCIpCisgICAgICAgICAgIChlcSAoY2hhci1iZWZvcmUpID9cKCkp KSkpCisKKyhkZWZ1biBqczItaW5kZW50LWNhc2UtYmxvY2stcCAoKQorICAoc2F2ZS1leGN1cnNp b24KKyAgICAoYmFjay10by1pbmRlbnRhdGlvbikKKyAgICAoanMyLWJhY2t3YXJkLXN3cykKKyAg ICAoZ290by1jaGFyIChwb2ludC1hdC1ib2wpKQorICAgIChza2lwLWNoYXJzLWZvcndhcmQgIiBc dCIpCisgICAgKGxvb2tpbmctYXQgImNhc2VcXHMtLis6IikpKQorCisoZGVmdW4ganMyLWJvdW5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gICAgOzsgdGVtcG9yYXJpbHkgZG9uJ3QgcmVj b3JkIHVuZG8gaW5mbywgaWYgdXNlciByZXF1ZXN0ZWQgdGhpcworICAgICh3aGVuIGpzMi1tb2Rl LWluZGVudC1pbmhpYml0LXVuZG8KKyAgICAgIChzZXRxIGJ1ZmZlci11bmRvLWxpc3QgdCkpCisg ICAgKHVud2luZC1wcm90ZWN0CisgICAgICAgIChwcm9nbgorICAgICAgICAgIDs7IEZpcnN0IGxp a2VseSBwb2ludDogIGluZGVudCBmcm9tIGJlZ2lubmluZyBvZiBwcmV2aW91cyBjb2RlIGxpbmUK KyAgICAgICAgICAocHVzaCAoc2V0cSBiYXNpYy1vZmZzZXQKKyAgICAgICAgICAgICAgICAgICAg ICAoKyAoc2F2ZS1leGN1cnNpb24KKyAgICAgICAgICAgICAgICAgICAgICAgICAgIChiYWNrLXRv LWluZGVudGF0aW9uKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgKGpzMi1iYWNrd2FyZC1z d3MpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoYmFjay10by1pbmRlbnRhdGlvbikKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgIChjdXJyZW50LWNvbHVtbikpCisgICAgICAgICAgICAg ICAgICAgICAgICAganMyLWJhc2ljLW9mZnNldCkpCisgICAgICAgICAgICAgICAgcG9zaXRpb25z KQorCisgICAgICAgICAgOzsgKEZpcnN0ICsgZXBzaWxvbikgbGlrZWx5IHBvaW50OiAgaW5kZW50 IDJ4IGZyb20gYmVnaW5uaW5nIG9mCisgICAgICAgICAgOzsgcHJldmlvdXMgY29kZSBsaW5lLiAg R29vZ2xlIGRvZXMgaXQgdGhpcyB3YXkuCisgICAgICAgICAgKHB1c2ggKHNldHEgYmFzaWMtb2Zm c2V0CisgICAgICAgICAgICAgICAgICAgICAgKCsgKHNhdmUtZXhjdXJzaW9uCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAoYmFjay10by1pbmRlbnRhdGlvbikKKyAgICAgICAgICAgICAgICAg ICAgICAgICAgIChqczItYmFja3dhcmQtc3dzKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg KGJhY2stdG8taW5kZW50YXRpb24pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAoY3VycmVu dC1jb2x1bW4pKQorICAgICAgICAgICAgICAgICAgICAgICAgICgqIDIganMyLWJhc2ljLW9mZnNl dCkpKQorICAgICAgICAgICAgICAgIHBvc2l0aW9ucykKKworICAgICAgICAgIDs7IFNlY29uZCBs aWtlbHkgcG9pbnQ6ICBpbmRlbnQgZnJvbSBhc3NpZ24tZXhwciBSSFMuICBUaGlzCisgICAgICAg ICAgOzsgaXMganVzdCBhIGNydWRlIGd1ZXNzIGJhc2VkIG9uIGZpbmRpbmcgIiA9ICIgb24gdGhl IHByZXZpb3VzCisgICAgICAgICAgOzsgbGluZSBjb250YWluaW5nIGFjdHVhbCBjb2RlLgorICAg ICAgICAgIChzZXRxIHBvcyAoc2F2ZS1leGN1cnNpb24KKyAgICAgICAgICAgICAgICAgICAgICAo Zm9yd2FyZC1saW5lIC0xKQorICAgICAgICAgICAgICAgICAgICAgIChnb3RvLWNoYXIgKHBvaW50 LWF0LWJvbCkpCisgICAgICAgICAgICAgICAgICAgICAgKHdoZW4gKHJlLXNlYXJjaC1mb3J3YXJk ICJcXHMtK1xcKD1cXClcXHMtKyIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgKHBvaW50LWF0LWVvbCkgdCkKKyAgICAgICAgICAgICAgICAgICAgICAgIChn b3RvLWNoYXIgKG1hdGNoLWVuZCAxKSkKKyAgICAgICAgICAgICAgICAgICAgICAgIChza2lwLWNo YXJzLWZvcndhcmQgIiBcdFxyXG4iKQorICAgICAgICAgICAgICAgICAgICAgICAgKGN1cnJlbnQt Y29sdW1uKSkpKQorICAgICAgICAgICh3aGVuIHBvcworICAgICAgICAgICAgKGNsLWluY2YgcG9z IGpzMi1iYXNpYy1vZmZzZXQpCisgICAgICAgICAgICAocHVzaCBwb3MgcG9zaXRpb25zKSkKKwor ICAgICAgICAgIDs7IFRoaXJkIGxpa2VseSBwb2ludDogIHNhbWUgaW5kZW50IGFzIHByZXZpb3Vz IGxpbmUgb2YgY29kZS4KKyAgICAgICAgICA7OyBNYWtlIGl0IHRoZSBmaXJzdCBsaWtlbHkgcG9p bnQgaWYgd2UncmUgbm90IG9uIGFuCisgICAgICAgICAgOzsgYXJnbGlzdC1jbG9zZSBsaW5lIGFu ZCBwcmV2aW91cyBsaW5lIGVuZHMgaW4gYSBjb21tYSwgb3IKKyAgICAgICAgICA7OyBib3RoIHRo aXMgbGluZSBhbmQgcHJldiBsaW5lIGxvb2sgbGlrZSBvYmplY3QtbGl0ZXJhbAorICAgICAgICAg IDs7IGVsZW1lbnRzLgorICAgICAgICAgIChzZXRxIHBvcyAoc2F2ZS1leGN1cnNpb24KKyAgICAg ICAgICAgICAgICAgICAgICAoZ290by1jaGFyIChwb2ludC1hdC1ib2wpKQorICAgICAgICAgICAg ICAgICAgICAgIChqczItYmFja3dhcmQtc3dzKQorICAgICAgICAgICAgICAgICAgICAgIChiYWNr LXRvLWluZGVudGF0aW9uKQorICAgICAgICAgICAgICAgICAgICAgIChwcm9nMQorICAgICAgICAg ICAgICAgICAgICAgICAgICAoY3VycmVudC1jb2x1bW4pCisgICAgICAgICAgICAgICAgICAgICAg ICA7OyB3aGlsZSB3ZSdyZSBoZXJlLCBsb29rIGZvciB0cmFpbGluZyBjb21tYQorICAgICAgICAg ICAgICAgICAgICAgICAgKGlmIChzYXZlLWV4Y3Vyc2lvbgorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKGdvdG8tY2hhciAocG9pbnQtYXQtZW9sKSkKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIChqczItYmFja3dhcmQtc3dzKQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgKGVxIChjaGFyLWJlZm9yZSkgPywpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIChz ZXRxIGFyZ2xpc3QtY29udCAoMS0gKHBvaW50KSkpKSkpKQorICAgICAgICAgICh3aGVuIHBvcwor ICAgICAgICAgICAgKGlmIChhbmQgKG9yIGFyZ2xpc3QtY29udAorICAgICAgICAgICAgICAgICAg ICAgICAgIChqczItaW5kZW50LWluLW9iamxpdC1wIHBhcnNlLXN0YXR1cykpCisgICAgICAgICAg ICAgICAgICAgICAobm90IChqczItYXJnbGlzdC1jbG9zZSkpKQorICAgICAgICAgICAgICAgIChz ZXRxIHNhbWUtaW5kZW50IHBvcykpCisgICAgICAgICAgICAocHVzaCBwb3MgcG9zaXRpb25zKSkK KworICAgICAgICAgIDs7IEZvdXJ0aCBsaWtlbHkgcG9pbnQ6ICBmaXJzdCBwcmVjZWRpbmcgY29k ZSB3aXRoIGxlc3MgaW5kZW50YXRpb24uCisgICAgICAgICAgOzsgdGhhbiB0aGUgaW1tZWRpYXRl bHkgcHJlY2VkaW5nIGNvZGUgbGluZS4KKyAgICAgICAgICAoc2V0cSBwb3MgKHNhdmUtZXhjdXJz aW9uCisgICAgICAgICAgICAgICAgICAgICAgKGJhY2stdG8taW5kZW50YXRpb24pCisgICAgICAg ICAgICAgICAgICAgICAgKGpzMi1iYWNrd2FyZC1zd3MpCisgICAgICAgICAgICAgICAgICAgICAg KGJhY2stdG8taW5kZW50YXRpb24pCisgICAgICAgICAgICAgICAgICAgICAgKHNldHEgYW5jaG9y IChjdXJyZW50LWNvbHVtbikpCisgICAgICAgICAgICAgICAgICAgICAgKHdoaWxlIChhbmQgKHpl cm9wIChmb3J3YXJkLWxpbmUgLTEpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICg+PSAocHJvZ24KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYmFj ay10by1pbmRlbnRhdGlvbikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAoY3VycmVudC1jb2x1bW4pKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBhbmNob3IpKSkKKyAgICAgICAgICAgICAgICAgICAgICAoc2V0cSBwb3MgKGN1cnJlbnQtY29s dW1uKSkpKQorICAgICAgICAgIChwdXNoIHBvcyBwb3NpdGlvbnMpCisKKyAgICAgICAgICA7OyBu ZXN0aW5nLWhldXJpc3RpYyBwb3NpdGlvbiwgbWFpbiBieSBkZWZhdWx0CisgICAgICAgICAgKHB1 c2ggKHNldHEgbWFpbi1wb3Mgbm9ybWFsLWNvbCkgcG9zaXRpb25zKQorCisgICAgICAgICAgOzsg ZGVsZXRlIGR1cGxpY2F0ZXMgYW5kIHNvcnQgcG9zaXRpb25zIGxpc3QKKyAgICAgICAgICAoc2V0 cSBwb3NpdGlvbnMgKHNvcnQgKGRlbGV0ZS1kdXBzIHBvc2l0aW9ucykgJzwpKQorCisgICAgICAg ICAgOzsgY29tbWEtbGlzdCBjb250aW51YXRpb24gbGluZXM6ICBwcmV2IGxpbmUgaW5kZW50IHRh a2VzIHByZWNlZGVuY2UKKyAgICAgICAgICAoaWYgc2FtZS1pbmRlbnQKKyAgICAgICAgICAgICAg KHNldHEgbWFpbi1wb3Mgc2FtZS1pbmRlbnQpKQorCisgICAgICAgICAgOzsgY29tbW9uIHNwZWNp YWwgY2FzZXMgd2hlcmUgd2Ugd2FudCB0byBpbmRlbnQgaW4gZnJvbSBwcmV2aW91cyBsaW5lCisg ICAgICAgICAgKGlmIChvciAoanMyLWluZGVudC1jYXNlLWJsb2NrLXApCisgICAgICAgICAgICAg ICAgICAoanMyLWluZGVudC1vYmpsaXQtYXJnLXAgcGFyc2Utc3RhdHVzKSkKKyAgICAgICAgICAg ICAgKHNldHEgbWFpbi1wb3MgYmFzaWMtb2Zmc2V0KSkKKworICAgICAgICAgIDs7IGlmIGJvdW5j aW5nIGJhY2t3YXJkcywgcmV2ZXJzZSBwb3NpdGlvbnMgbGlzdAorICAgICAgICAgIChpZiBiYWNr d2FyZHMKKyAgICAgICAgICAgICAgKHNldHEgcG9zaXRpb25zIChyZXZlcnNlIHBvc2l0aW9ucykp KQorCisgICAgICAgICAgOzsgcmVjb3JkIHdoZXRoZXIgd2UncmUgYWxyZWFkeSBzaXR0aW5nIG9u IG9uZSBvZiB0aGUgYWx0ZXJuYXRpdmVzCisgICAgICAgICAgKHNldHEgcG9zIChtZW1iZXIgY3Vy LWluZGVudCBwb3NpdGlvbnMpKQorCisgICAgICAgICAgKGNvbmQKKyAgICAgICAgICAgOzsgY2Fz ZSAwOiAgd2UncmUgb25lIG9uZSBvZiB0aGUgYWx0ZXJuYXRpdmVzIGFuZCB0aGlzIGlzIHRoZQor ICAgICAgICAgICA7OyBmaXJzdCB0aW1lIHRoZXkndmUgcHJlc3NlZCBUQUIgb24gdGhpcyBsaW5l IChiZXN0LWd1ZXNzKS4KKyAgICAgICAgICAgKChhbmQganMyLW1vZGUtaW5kZW50LWlnbm9yZS1m aXJzdC10YWIKKyAgICAgICAgICAgICAgICAgcG9zCisgICAgICAgICAgICAgICAgIDs7IGZpcnN0 IHRpbWUgcHJlc3NpbmcgVEFCIG9uIHRoaXMgbGluZT8KKyAgICAgICAgICAgICAgICAgKG5vdCAo ZXEganMyLW1vZGUtbGFzdC1pbmRlbnRlZC1saW5lIGN1cnJlbnQtbGluZSkpKQorICAgICAgICAg ICAgOzsgZG8gbm90aGluZworICAgICAgICAgICAgKHNldHEgY29tcHV0ZWQtcG9zIG5pbCkpCisg ICAgICAgICAgIDs7IGNhc2UgMTogIG9ubHkgb25lIGNvbXB1dGVkIHBvc2l0aW9uID0+IHVzZSBp dAorICAgICAgICAgICAoKG51bGwgKGNkciBwb3NpdGlvbnMpKQorICAgICAgICAgICAgKHNldHEg Y29tcHV0ZWQtcG9zIDApKQorICAgICAgICAgICA7OyBjYXNlIDI6ICBub3Qgb24gYW55IG9mIHRo ZSBjb21wdXRlZCBzcG90cyA9PiB1c2UgbWFpbiBzcG90CisgICAgICAgICAgICgobm90IHBvcykK KyAgICAgICAgICAgIChzZXRxIGNvbXB1dGVkLXBvcyAoanMyLXBvc2l0aW9uIG1haW4tcG9zIHBv c2l0aW9ucykpKQorICAgICAgICAgICA7OyBjYXNlIDM6ICBvbiBsYXN0IHBvc2l0aW9uOiAgY3lj bGUgdG8gZmlyc3QgcG9zaXRpb24KKyAgICAgICAgICAgKChudWxsIChjZHIgcG9zKSkKKyAgICAg ICAgICAgIChzZXRxIGNvbXB1dGVkLXBvcyAwKSkKKyAgICAgICAgICAgOzsgY2FzZSA0OiAgb24g aW50ZXJtZWRpYXRlIHBvc2l0aW9uOiAgY3ljbGUgdG8gbmV4dCBwb3NpdGlvbgorICAgICAgICAg ICAodAorICAgICAgICAgICAgKHNldHEgY29tcHV0ZWQtcG9zIChqczItcG9zaXRpb24gKGNsLXNl Y29uZCBwb3MpIHBvc2l0aW9ucykpKSkKKworICAgICAgICAgIDs7IHNlZSBpZiBhbnkgaG9va3Mg d2FudCB0byBpbmRlbnQ7IG90aGVyd2lzZSB3ZSBkbyBpdAorICAgICAgICAgIChjbC1sb29wIHdp dGggcmVzdWx0ID0gbmlsCisgICAgICAgICAgICAgICAgICAgZm9yIGhvb2sgaW4ganMyLWluZGVu dC1ob29rCisgICAgICAgICAgICAgICAgICAgd2hpbGUgKG51bGwgcmVzdWx0KQorICAgICAgICAg ICAgICAgICAgIGRvCisgICAgICAgICAgICAgICAgICAgKHNldHEgcmVzdWx0IChmdW5jYWxsIGhv b2sgcG9zaXRpb25zIGNvbXB1dGVkLXBvcykpCisgICAgICAgICAgICAgICAgICAgZmluYWxseSBk bworICAgICAgICAgICAgICAgICAgICh1bmxlc3MgKG9yIHJlc3VsdCAobnVsbCBjb21wdXRlZC1w b3MpKQorICAgICAgICAgICAgICAgICAgICAgKGluZGVudC1saW5lLXRvIChudGggY29tcHV0ZWQt cG9zIHBvc2l0aW9ucykpKSkpCisKKyAgICAgIDs7IGZpbmFsbHkKKyAgICAgIChpZiBqczItbW9k ZS1pbmRlbnQtaW5oaWJpdC11bmRvCisgICAgICAgICAgKHNldHEgYnVmZmVyLXVuZG8tbGlzdCBv bGQtYnVmZmVyLXVuZG8tbGlzdCkpCisgICAgICA7OyBzZWUgY29tbWVudGFyeSBmb3IgYGpzMi1t b2RlLWxhc3QtaW5kZW50ZWQtbGluZScKKyAgICAgIChzZXRxIGpzMi1tb2RlLWxhc3QtaW5kZW50 ZWQtbGluZSBjdXJyZW50LWxpbmUpKSkpCisKKyhkZWZ1biBqczItaW5kZW50LWJvdW5jZS1iYWNr d2FyZHMgKCkKKyAgIkNhbGxzIGBqczItaW5kZW50LWxpbmUnLiAgV2hlbiBganMyLWJvdW5jZS1p bmRlbnQtcCcsCitjeWNsZXMgYmV0d2VlbiB0aGUgY29tcHV0ZWQgaW5kZW50YXRpb24gcG9zaXRp b25zIGluIHJldmVyc2Ugb3JkZXIuIgorICAoaW50ZXJhY3RpdmUpCisgIChqczItaW5kZW50LWxp bmUgdCkpCisKKyhkZWZ1biBqczItMS1saW5lLWNvbW1lbnQtY29udGludWF0aW9uLXAgKCkKKyAg IlJldHVybiB0IGlmIHdlJ3JlIGluIGEgMS1saW5lIGNvbW1lbnQgY29udGludWF0aW9uLgorSWYg c28sIHdlIGRvbid0IGV2ZXIgd2FudCB0byB1c2UgYm91bmNlLWluZGVudC4iCisgIChzYXZlLWV4 Y3Vyc2lvbgorICAgIChhbmQgKHByb2duCisgICAgICAgICAgIChmb3J3YXJkLWxpbmUgMCkKKyAg ICAgICAgICAgKGxvb2tpbmctYXQgIlxccy0qLy8iKSkKKyAgICAgICAgIChwcm9nbgorICAgICAg ICAgICAoZm9yd2FyZC1saW5lIC0xKQorICAgICAgICAgICAoZm9yd2FyZC1saW5lIDApCisgICAg ICAgICAgICh3aGVuIChsb29raW5nLWF0ICJcXHMtKiQiKQorICAgICAgICAgICAgIChqczItYmFj a3dhcmQtc3dzKQorICAgICAgICAgICAgIChmb3J3YXJkLWxpbmUgMCkpCisgICAgICAgICAgIChs b29raW5nLWF0ICJcXHMtKi8vIikpKSkpCisKKyhkZWZ1biBqczItaW5kZW50LWxpbmUgKCZvcHRp b25hbCBib3VuY2UtYmFja3dhcmRzKQorICAiSW5kZW50IHRoZSBjdXJyZW50IGxpbmUgYXMgSmF2 YVNjcmlwdCBzb3VyY2UgdGV4dC4iCisgIChpbnRlcmFjdGl2ZSkKKyAgKGxldCAocGFyc2Utc3Rh dHVzIG9mZnNldCBpbmRlbnQtY29sCisgICAgICAgIDs7IERvbid0IHdoaW5lIGFib3V0IGVycm9y cy93YXJuaW5ncyB3aGVuIHdlJ3JlIGluZGVudGluZy4KKyAgICAgICAgOzsgVGhpcyBoYXMgdG8g YmUgc2V0IGJlZm9yZSBjYWxsaW5nIHBhcnNlLXBhcnRpYWwtc2V4cCBiZWxvdy4KKyAgICAgICAg KGluaGliaXQtcG9pbnQtbW90aW9uLWhvb2tzIHQpKQorICAgIChzZXRxIHBhcnNlLXN0YXR1cyAo c2F2ZS1leGN1cnNpb24KKyAgICAgICAgICAgICAgICAgICAgICAgICAoc3ludGF4LXBwc3MgKHBv aW50LWF0LWJvbCkpKQorICAgICAgICAgIG9mZnNldCAoLSAocG9pbnQpIChzYXZlLWV4Y3Vyc2lv bgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGJhY2stdG8taW5kZW50YXRpb24pCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocG9pbnQpKSkpCisgICAgKGpzMi13aXRoLXVu ZGVyc2NvcmUtYXMtd29yZC1zeW50YXgKKyAgICAgKGlmIChudGggNCBwYXJzZS1zdGF0dXMpCisg ICAgICAgICAoanMyLWxpbmV1cC1jb21tZW50IHBhcnNlLXN0YXR1cykKKyAgICAgICAoc2V0cSBp bmRlbnQtY29sIChqczItcHJvcGVyLWluZGVudGF0aW9uIHBhcnNlLXN0YXR1cykpCisgICAgICAg OzsgU2VlIGNvbW1lbnRzIGJlbG93IGFib3V0IGBqczItbW9kZS1sYXN0LWluZGVudGVkLWxpbmUn LgorICAgICAgIChjb25kCisgICAgICAgIDs7IGJvdW5jZS1pbmRlbnRpbmcgaXMgZGlzYWJsZWQg ZHVyaW5nIGVsZWN0cmljLWtleSBpbmRlbnQuCisgICAgICAgIDs7IEl0IGRvZXNuJ3Qgd29yayB3 ZWxsIG9uIGZpcnN0IGxpbmUgb2YgYnVmZmVyLgorICAgICAgICAoKGFuZCBqczItYm91bmNlLWlu ZGVudC1wCisgICAgICAgICAgICAgIChub3QgKGpzMi1zYW1lLWxpbmUgKHBvaW50LW1pbikpKQor ICAgICAgICAgICAgICAobm90IChqczItMS1saW5lLWNvbW1lbnQtY29udGludWF0aW9uLXApKSkK KyAgICAgICAgIChqczItYm91bmNlLWluZGVudCBpbmRlbnQtY29sIHBhcnNlLXN0YXR1cyBib3Vu Y2UtYmFja3dhcmRzKSkKKyAgICAgICAgOzsganVzdCBpbmRlbnQgdG8gdGhlIGd1ZXNzZXIncyBs aWtlbHkgc3BvdAorICAgICAgICAodCAoaW5kZW50LWxpbmUtdG8gaW5kZW50LWNvbCkpKSkKKyAg ICAgKHdoZW4gKGNsLXBsdXNwIG9mZnNldCkKKyAgICAgICAoZm9yd2FyZC1jaGFyIG9mZnNldCkp KSkpCisKKyhkZWZ1biBqczItaW5kZW50LXJlZ2lvbiAoc3RhcnQgZW5kKQorICAiSW5kZW50IHRo ZSByZWdpb24sIGJ1dCBkb24ndCB1c2UgYm91bmNlIGluZGVudGluZy4iCisgIChsZXQgKChqczIt Ym91bmNlLWluZGVudC1wIG5pbCkKKyAgICAgICAgKGluZGVudC1yZWdpb24tZnVuY3Rpb24gbmls KQorICAgICAgICAoYWZ0ZXItY2hhbmdlLWZ1bmN0aW9ucyAocmVtcSAnanMyLW1vZGUtZWRpdAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZnRlci1jaGFuZ2UtZnVuY3Rp b25zKSkpCisgICAgKGluZGVudC1yZWdpb24gc3RhcnQgZW5kIG5pbCkgOyBuaWwgZm9yIGJ5dGUt Y29tcGlsZXIKKyAgICAoanMy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CB0eXBlKQorICAgICAgICAgICAg ICAgIkFkZCBkaWFnbm9zdGljIFRZUEUgYW5kIGxpbmUgbnVtYmVyIHRvIGVycnMgbGlzdCIKKyAg ICAgICAgICAgICAgIChtYXBjYXIgKGxhbWJkYSAoZXJyKQorICAgICAgICAgICAgICAgICAgICAg ICAgIChsaXN0IGVyciB0eXBlIChsaW5lLW51bWJlci1hdC1wb3MgKG50aCAxIGVycikpKSkKKyAg ICAgICAgICAgICAgICAgICAgICAgbHN0KSkpCisgICAgKGxldCogKChzcmNidWYgKGN1cnJlbnQt YnVmZmVyKSkKKyAgICAgICAgICAgKGVycmJ1ZiAoZ2V0LWJ1ZmZlci1jcmVhdGUgIipqcy1saW50 KiIpKQorICAgICAgICAgICAoZXJyb3JzIChhbm5vdGF0ZS1saXN0CisgICAgICAgICAgICAgICAg ICAgICh3aGVuIGpzMi1tb2RlLWFzdCAoanMyLWFzdC1yb290LWVycm9ycyBqczItbW9kZS1hc3Qp KQorICAgICAgICAgICAgICAgICAgICAnanMyLWVycm9yKSkgIDsgbXVzdCBiZSBhIHZhbGlkIGZh Y2UgbmFtZQorICAgICAgICAgICAod2FybmluZ3MgKGFubm90YXRlLWxpc3QKKyAgICAgICAgICAg ICAgICAgICAgICAod2hlbiBqczItbW9kZS1hc3QgKGpzMi1hc3Qtcm9vdC13YXJuaW5ncyBqczIt bW9kZS1hc3QpKQorICAgICAgICAgICAgICAgICAgICAgICdqczItd2FybmluZykpICA7IG11c3Qg YmUgYSB2YWxpZCBmYWNlIG5hbWUKKyAgICAgICAgICAgKGFsbC1lcnJzIChzb3J0IChhcHBlbmQg ZXJyb3JzIHdhcm5pbmdzKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgKGxhbWJkYSAoZTEg ZTIpICg8IChjbC1jYWRhciBlMSkgKGNsLWNhZGFyIGUyKSkpKSkpCisgICAgICAod2l0aC1jdXJy ZW50LWJ1ZmZlciBlcnJidWYKKyAgICAgICAgKGxldCAoKGluaGliaXQtcmVhZC1vbmx5IHQpKQor ICAgICAgICAgIChlcmFzZS1idWZmZXIpCisgICAgICAgICAgKGRvbGlzdCAoZXJyIGFsbC1lcnJz KQorICAgICAgICAgICAgKGNsLWRlc3RydWN0dXJpbmctYmluZCAoKG1zZy1rZXkgYmVnIF9lbmQg JnJlc3QpIHR5cGUgbGluZSkgZXJyCisgICAgICAgICAgICAgIChpbnNlcnQtdGV4dC1idXR0b24K KyAgICAgICAgICAgICAgIChmb3JtYXQgImxpbmUgJWQ6ICVzIiBsaW5lIChqczItZ2V0LW1zZyBt c2cta2V5KSkKKyAgICAgICAgICAgICAgICdmYWNlIHR5cGUKKyAgICAgICAgICAgICAgICdmb2xs b3ctbGluayAiXEMtbSIKKyAgICAgICAgICAgICAgICdhY3Rpb24gJ2pzMi1lcnJvci1idWZmZXIt anVtcAorICAgICAgICAgICAgICAgJ2pzMi1tc2cgKGpzMi1nZXQtbXNnIG1zZy1rZXkpCisgICAg ICAgICAgICAgICAnanMyLXBvcyBiZWcpCisgICAgICAgICAgICAgIChpbnNlcnQgIlxuIikpKSkK KyAgICAgICAgKGpzMi1lcnJvci1idWZmZXItbW9kZSkKKyAgICAgICAgKHNldHEganMyLXNvdXJj ZS1idWZmZXIgc3JjYnVmKQorICAgICAgICAocG9wLXRvLWJ1ZmZlciBlcnJidWYpCisgICAgICAg IChnb3RvLWNoYXIgKHBvaW50LW1pbikpCisgICAgICAgICh1bmxlc3MgKGVvYnApCisgICAgICAg ICAgKGpzMi1lcnJvci1idWZmZXItdmlldykpKSkpKQorCisoZGVmdmFyIGpzMi1lcnJvci1idWZm ZXItbW9kZS1tYXAKKyAgKGxldCAoKG1hcCAobWFrZS1zcGFyc2Uta2V5bWFwKSkpCisgICAgKGRl ZmluZS1rZXkgbWFwICJuIiAjJ2pzMi1lcnJvci1idWZmZXItbmV4dCkKKyAgICAoZGVmaW5lLWtl eSBtYXAgInAiICMnanMyLWVycm9yLWJ1ZmZlci1wcmV2KQorICAgIChkZWZpbmUta2V5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yBlZGl0ZWQuCitC dWZmZXIgZWRpdCBzcGFucyBmcm9tIEJFRyB0byBFTkQgYW5kIGlzIG9mIGxlbmd0aCBMRU4uIgor ICAoc2V0cSBqczItbW9kZS1idWZmZXItZGlydHktcCB0KQorICAoanMyLW1vZGUtaGlkZS1vdmVy bGF5KQorICAoanMyLW1vZGUtcmVzZXQtdGltZXIpKQorCisoZGVmdW4ganMyLXJlcGFyc2UgKCZv cHRpb25hbCBmb3JjZSkKKyAgIlJlLXBhcnNlIGN1cnJlbnQgYnVmZmVyIGFmdGVyIHVzZXIgZmlu aXNoZXMgc29tZSBkYXRhIGVudHJ5LgorSWYgd2UgZ2V0IGFueSB1c2VyIGlucHV0IHdoaWxlIHBh cnNpbmcsIGluY2x1ZGluZyBjdXJzb3IgbW90aW9uLAord2UgZGlzY2FyZCB0aGUgcGFyc2UgYW5k IHJlc2NoZWR1bGUgaXQuICBJZiBGT1JDRSBpcyBuaWwsIHRoZW4gdGhlCitidWZmZXIgd2lsbCBv bmx5IHJlYnVpbGQgaXRzIGBqczItbW9kZS1hc3QnIGlmIHRoZSBidWZmZXIgaXMgZGlydHkuIgor ICAobGV0ICh0aW1lCisgICAgICAgIGludGVycnVwdGVkLXAKKyAgICAgICAgKGpzMi1jb21waWxl ci1zdHJpY3QtbW9kZSBqczItbW9kZS1zaG93LXN0cmljdC13YXJuaW5ncykpCisgICAgKHVubGVz cyBqczItbW9kZS1wYXJzaW5nCisgICAgICAoc2V0cSBqczItbW9kZS1wYXJzaW5nIHQpCisgICAg ICAodW53aW5kLXByb3RlY3QKKyAgICAgICAgICAod2hlbiAob3IganMyLW1vZGUtYnVmZmVyLWRp cnR5LXAgZm9yY2UpCisgICAgICAgICAgICAoanMyLXJlbW92ZS1vdmVybGF5cykKKyAgICAgICAg ICAgIChzZXRxIGpzMi1tb2RlLWJ1ZmZlci1kaXJ0eS1wIG5pbAorICAgICAgICAgICAgICAgICAg anMyLW1vZGUtZm9udGlmaWNhdGlvbnMgbmlsCisgICAgICAgICAgICAgICAgICBqczItbW9kZS1k ZWZlcnJlZC1wcm9wZXJ0aWVzIG5pbCkKKyAgICAgICAgICAgIChpZiBqczItbW9kZS12ZXJib3Nl LXBhcnNlLXAKKyAgICAgICAgICAgICAgICAobWVzc2FnZSAicGFyc2luZy4uLiIpKQorICAgICAg ICAgICAgKHNldHEgdGltZQorICAgICAgICAgICAgICAgICAgKGpzMi10aW1lCisgICAgICAgICAg ICAgICAgICAgKHNldHEgaW50ZXJydXB0ZWQtcAorICAgICAgICAgICAgICAgICAgICAgICAgIChj YXRjaCAnaW50ZXJydXB0ZWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIChqczItcGFyc2Up CisgICAgICAgICAgICAgICAgICAgICAgICAgICAod2l0aC1zaWxlbnQtbW9kaWZpY2F0aW9ucwor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA7OyBpZiBwYXJzaW5nIGlzIGludGVycnVwdGVk LCBjb21tZW50cyBhbmQgcmVnZXgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOzsgbGl0 ZXJhbHMgc3RheSBpZ25vcmVkIGJ5IGBwYXJzZS1wYXJ0aWFsLXNleHAnCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIChyZW1vdmUtdGV4dC1wcm9wZXJ0aWVzIChwb2ludC1taW4pIChwb2lu dC1tYXgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICcoc3ludGF4LXRhYmxlKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGpzMi1t b2RlLWFwcGx5LWRlZmVycmVkLXByb3BlcnRpZXMpCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIChqczItbW9kZS1yZW1vdmUtc3VwcHJlc3NlZC13YXJuaW5ncykKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKGpzMi1tb2RlLXNob3ctd2FybmluZ3MpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIChqczItbW9kZS1zaG93LWVycm9ycykKKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKGlmICg+PSBqczItaGlnaGxpZ2h0LWxldmVsIDEpCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAoanMyLWhpZ2hsaWdodC1qc2RvYyBqczItbW9kZS1hc3QpKSkKKyAg ICAgICAgICAgICAgICAgICAgICAgICAgIG5pbCkpKSkKKyAgICAgICAgICAgIChpZiBpbnRlcnJ1 cHRlZC1wCisgICAgICAgICAgICAgICAgKHByb2duCisgICAgICAgICAgICAgICAgICA7OyB1bmZp bmlzaGVkIHBhcnNlID0+IHRyeSBhZ2FpbgorICAgICAgICAgICAgICAgICAgKHNldHEganMyLW1v ZGUtYnVmZmVyLWRpcnR5LXAgdCkKKyAgICAgICAgICAgICAgICAgIChqczItbW9kZS1yZXNldC10 aW1lcikpCisgICAgICAgICAgICAgIChpZiBqczItbW9kZS12ZXJib3NlLXBhcnNlLXAKKyAgICAg ICAgICAgICAgICAgIChtZXNzYWdlICJQYXJzZSB0aW1lOiAlcyIgdGltZSkpKSkKKyAgICAgICAg KHNldHEganMyLW1vZGUtcGFyc2luZyBuaWwpCisgICAgICAgICh1bmxlc3MgaW50ZXJydXB0ZWQt cAorICAgICAgICAgIChzZXRxIGpzMi1tb2RlLXBhcnNlLXRpbWVyIG5pbCkpKSkpKQorCisoZGVm dW4ganMyLW1vZGUtc2hvdy1ub2RlIChldmVudCkKKyAgIkRlYnVnZ2luZyBhaWQ6ICBoaWdobGln aHQgc2VsZWN0ZWQgQVNUIG5vZGUgb24gbW91c2UgY2xpY2suIgorICAoaW50ZXJhY3RpdmUgImUi KQorICAobW91c2Utc2V0LXBvaW50IGV2ZW50KQorICAoc2V0cSBkZWFjdGl2YXRlLW1hcmsgdCkK KyAgKHdoZW4ganMyLW1vZGUtc2hvdy1vdmVybGF5CisgICAgKGxldCAoKG5vZGUgKGpzMi1ub2Rl LWF0LXBvaW50KSkKKyAgICAgICAgICBiZWcgZW5kKQorICAgICAgKGlmIChudWxsIG5vZGUpCisg ICAgICAgICAgKG1lc3NhZ2UgIk5vIG5vZGUgZm91bmQgYXQgbG9jYXRpb24gJXMiIChwb2ludCkp CisgICAgICAgIChzZXRxIGJlZyAoanMyLW5vZGUtYWJzLXBvcyBub2RlKQorICAgICAgICAgICAg ICBlbmQgKCsgYmVnIChqczItbm9kZS1sZW4gbm9kZSkpKQorICAgICAgICAoaWYganMyLW1vZGUt bm9kZS1vdmVybGF5CisgICAgICAgICAgICAobW92ZS1vdmVybGF5IGpzMi1tb2RlLW5vZGUtb3Zl cmxheSBiZWcgZW5kKQorICAgICAgICAgIChzZXRxIGpzMi1tb2RlLW5vZGUtb3ZlcmxheSAobWFr ZS1vdmVybGF5IGJlZyBlbmQpKQorICAgICAgICAgIChvdmVybGF5LXB1dCBqczItbW9kZS1ub2Rl LW92ZXJsYXkgJ2ZvbnQtbG9jay1mYWNlICdoaWdobGlnaHQpKQorICAgICAgICAod2l0aC1zaWxl bnQtbW9kaWZpY2F0aW9ucworICAgICAgICAgIChwdXQtdGV4dC1wcm9wZXJ0eSBiZWcgZW5kICdw b2ludC1sZWZ0ICMnanMyLW1vZGUtaGlkZS1vdmVybGF5KSkKKyAgICAgICAgKG1lc3NhZ2UgIiVz LCBwYXJlbnQ6ICVzIgorICAgICAgICAgICAgICAgICAoanMyLW5vZGUtc2hvcnQtbmFtZSBub2Rl KQorICAgICAgICAgICAgICAgICAoaWYgKGpzMi1ub2RlLXBhcmVudCBub2RlKQorICAgICAgICAg ICAgICAgICAgICAgKGpzMi1ub2RlLXNob3J0LW5hbWUgKGpzMi1ub2RlLXBhcmVudCBub2RlKSkK KyAgICAgICAgICAgICAgICAgICAibmlsIikpKSkpKQorCisoZGVmdW4ganMyLW1vZGUtaGlkZS1v dmVybGF5ICgmb3B0aW9uYWwgX3AxIHAyKQorICAiUmVtb3ZlIHRoZSBkZWJ1Z2dpbmcgb3Zlcmxh eSB3aGVuIHRoZSBwb2lud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BpcyBvcHRpb25hbC4g IFdoZW4gcHJlc2VudCwgdXNlIGluc3RlYWQgb2YgRkFDRS4iCisgIChsZXQqICgoa2V5IChjbC1m aXJzdCBlKSkKKyAgICAgICAgIChiZWcgKGNsLXNlY29uZCBlKSkKKyAgICAgICAgIChlbmQgKCsg YmVnIChjbC10aGlyZCBlKSkpCisgICAgICAgICA7OyBEb24ndCBpbmFkdmVydGVudGx5IGdvIG91 dCBvZiBib3VuZHMuCisgICAgICAgICAoYmVnIChtYXggKHBvaW50LW1pbikgKG1pbiBiZWcgKHBv aW50LW1heCkpKSkKKyAgICAgICAgIChlbmQgKG1heCAocG9pbnQtbWluKSAobWluIGVuZCAocG9p bnQtbWF4KSkpKQorICAgICAgICAgKG92bCAobWFrZS1vdmVybGF5IGJlZyBlbmQpKSkKKyAgICAo b3ZlcmxheS1wdXQgb3ZsICdmb250LWxvY2stZmFjZSAob3IgKGNsLWZvdXJ0aCBlKSBmYWNlKSkK KyAgICAob3ZlcmxheS1wdXQgb3ZsICdqczItZXJyb3IgdCkKKyAgICAocHV0LXRleHQtcHJvcGVy dHkgYmVnIGVuZCAnaGVscC1lY2hvIChqczItZ2V0LW1zZyBrZXkpKQorICAgIChwdXQtdGV4dC1w cm9wZXJ0eSBiZWcgZW5kICdwb2ludC1lbnRlcmVkICMnanMyLWVjaG8tZXJyb3IpKSkKKworKGRl ZnVuIGpzMi1yZW1vdmUtb3ZlcmxheXMgKCkKKyAgIlJlbW92ZSBvdmVybGF5cyBmcm9tIGJ1ZmZl ciB0aGF0IGhhdmUgYSBganMyLWVycm9yJyBwcm9wZXJ0eS4iCisgIChsZXQgKChiZWcgKHBvaW50 LW1pbikpCisgICAgICAgIChlbmQgKHBvaW50LW1heCkpKQorICAgIChzYXZlLWV4Y3Vyc2lvbgor ICAgICAgKGRvbGlzdCAobyAob3ZlcmxheXMtaW4gYmVnIGVuZCkpCisgICAgICAgICh3aGVuIChv dmVybGF5LWdldCBvICdqczItZXJyb3IpCisgICAgIC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oaXJk IGYpKSkKKyAgICAoc2V0cSBqczItbW9kZS1mb250aWZpY2F0aW9ucyBuaWwpKQorICAoZG9saXN0 IChwIGpzMi1tb2RlLWRlZmVycmVkLXByb3BlcnRpZXMpCisgICAgKGFwcGx5ICMncHV0LXRleHQt cHJvcGVydHkgcCkpCisgIChzZXRxIGpzMi1tb2RlLWRlZmVycmVkLXByb3BlcnRpZXMgbmlsKSkK KworKGRlZnVuIGpzMi1tb2RlLXNob3ctZXJyb3JzICgpCisgICJIaWdobGlnaHQgc3ludGF4IGVy cm9ycy4iCisgICh3aGVuIGpzMi1tb2RlLXNob3ctcGFyc2UtZXJyb3JzCisgICAgKGRvbGlzdCAo ZSAoanMyLWFzdC1yb290LWVycm9ycyBqczItbW9kZS1hc3QpKQorICAgICAgKGpzMi1tb2RlLXNo b3ctd2Fybi1vci1lcnIgZSAnanMyLWVycm9yKSkpKQorCisoZGVmdW4ganMyLW1vZGUtcmVtb3Zl LXN1cHByZXNzZWQtd2FybmluZ3MgKCkKKyAgIlRha2Ugc3VwcHJlc3NlZCB3YXJuaW5ncyBvdXQg b2YgdGhlIEFTVCB3YXJuaW5ncyBsaXN0LgorVGhpcyBlbnN1cmVzIHRoYXQgdGhlIGNvdW50cyBh bmQgYG5leHQtZXJyb3InIGFyZSBjb3JyZWN0LiIKKyAgKHNldGYgKGpzMi1hc3Qtcm9vdC13YXJu aW5ncyBqczItbW9kZS1hc3QpCisgICAgICAgIChqczItZGVsZXRlLWlmCisgICAgICAgICAobGFt YmRhIChlKQorICAgICAgICAgICAobGV0ICgoa2V5IChjYWFyIGUpKSkKKyAgICAgICAgICAgICAo b3IKKyAgICAgICAgICAgICAgKGFuZCAobm90IGpzMi1zdHJpY3QtdHJhaWxpbmctY29tbWEtd2Fy bmluZykKKyAgICAgICAgICAgICAgICAgICAoc3RyaW5nLW1hdGNoICJ0cmFpbGluZ1xcLmNvbW1h IiBrZXkpKQorICAgICAgICAgICAgICAoYW5kIChub3QganMyLXN0cmljdC1jb25kLWFzc2lnbi13 YXJuaW5nKQorICAgICAgICAgICAgICAgICAgIChzdHJpbmc9IGtleSAibXNnLmVxdWFsLmFzLmFz c2lnbiIpKQorICAgICAgICAgICAgICAoYW5kIGpzMi1taXNzaW5nLXNlbWktb25lLWxpbmUtb3Zl cnJpZGUKKyAgICAgICAgICAgICAgICAgICAoc3RyaW5nPSBrZXkgIm1zZy5taXNzaW5nLnNlbWki KQorICAgICAgICAgICAgICAgICAgIChsZXQqICgoYmVnIChjbC1zZWNvbmQgZSkpCisgICAgICAg ICAgICAgICAgICAgICAgICAgIChub2RlIChqczItbm9kZS1hdC1wb2ludCBiZWcpKQorICAgICAg ICAgICAgICAgICAgICAgICAgICAoZm4gKGpzMi1tb2RlLWZpbmQtcGFyZW50LWZuIG5vZGUpKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAoYm9keSAoYW5kIGZuIChqczItZnVuY3Rpb24tbm9k ZS1ib2R5IGZuKSkpCisgICAgICAgICAgICAgICAgICAgICAgICAgIChsYyAoYW5kIGJvZHkgKGpz Mi1ub2RlLWFicy1wb3MgYm9keSkpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAocmMgKGFu ZCBsYyAoKyBsYyAoanMyLW5vZGUtbGVuIGJvZHkpKSkpKQorICAgICAgICAgICAgICAgICAgICAg KGFuZCBmbgorICAgICAgICAgICAgICAgICAgICAgICAgICAob3IgKG51bGwgYm9keSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChzYXZlLWV4Y3Vyc2lvbgorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAoZ290by1jaGFyIGJlZykKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgKGFuZCAoanMyLXNhbWUtbGluZSBsYykKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAoanMyLXNhbWUtbGluZSByYykpKSkpKSkpKSkKKyAgICAgICAgIChqczIt YXN0LXJvb3Qtd2FybmluZ3MganMyLW1vZGUtYXN0KSkpKQorCisoZGVmdW4ganMyLW1vZGUtc2hv dy13YXJuaW5ncyAoKQorICAiSGlnaGxpZ2h0IHN0cmljdC1tb2RlIHdhcm5pbmdzLiIKKyAgKHdo ZW4ganMyLW1vZGUtc2hvdy1zdHJpY3Qtd2FybmluZ3MKKyAgICAoZG9saXN0IChlIChqczItYXN0 LXJvb3Qtd2FybmluZ3MganMyLW1vZGUtYXN0KSkKKyAgICAgIChqczItbW9kZS1zaG93LXdhcm4t b3ItZXJyIGUgJ2pzMi13YXJuaW5nKSkpKQorCisoZGVmdW4ganMyLWVjaG8tZXJyb3IgKF9vbGQt cG9pbnQgbmV3LXBvaW50KQorICAiQ2FsbGVkIGJ5IHBvaW50LW1vdGlvbiBob29rcy4iCisgIChs ZXQgKChtc2cgKGdldC10ZXh0LXByb3BlcnR5IG5ldy1wb2ludCAnaGVscC1lY2hvKSkpCisgICAg KHdoZW4gKGFuZCAoc3RyaW5ncCBtc2cpCisgICAgICAgICAgICAgICAobm90IChhY3RpdmUtbWlu aWJ1ZmZlci13aW5kb3cpKQorICAgICAgICAgICAgICAgKG5vdCAoY3VycmVudC1tZXNzYWdlKSkp CisgICAgICAobWVzc2FnZSBtc2cpKSkpCisKKyhkZWZhbGlhcyAnanMyLWVjaG8taGVscCAjJ2pz Mi1lY2hvLWVycm9yKQorCisoZGVmdW4ganMyLWxpbmUtYnJlYWsgKCZvcHRpb25hbCBfc29mdCkK KyAgIkJyZWFrIGxpbmUgYXQgcG9pbnQgYW5kIGluZGVudCwgY29udGludWluZyBjb21tZW50IGlm IHdpdGhpbiBvbmUuCitJZiBpbnNpZGUgYSBzdHJpbmcsIGFuZCBganMyLWNvbmNhdC1tdWx0aWxp bmUtc3RyaW5ncycgaXMgbm90CituaWwsIHR1cm4gaXQgaW50byBjb25jYXRlbmF0aW9uLiIKKyAg KGludGVyYWN0aXZlKQorICAobGV0ICgocGFyc2Utc3RhdHVzIChzeW50YXgtcHBzcykpKQorICAg IChjb25kCisgICAg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KSkpCisKKyhk ZWZ1biBqczItbW9kZS1leHRlbmQtY29tbWVudCAoc3RhcnQtcG9zKQorICAiSW5kZW50IHRoZSBs aW5lIGFuZCwgd2hlbiBpbnNpZGUgYSBjb21tZW50IGJsb2NrLCBhZGQgY29tbWVudCBwcmVmaXgu IgorICAobGV0IChzdGFyIHNpbmdsZSBjb2wgZmlyc3QtbGluZSBuZWVkcy1jbG9zZSkKKyAgICAo c2F2ZS1leGN1cnNpb24KKyAgICAgIChiYWNrLXRvLWluZGVudGF0aW9uKQorICAgICAgKHdoZW4g KDwgKHBvaW50KSBzdGFydC1wb3MpCisgICAgICAgIChnb3RvLWNoYXIgc3RhcnQtcG9zKSkKKyAg ICAgIChjb25kCisgICAgICAgKChsb29raW5nLWF0ICJcXCpbXi9dIikKKyAgICAgICAgKHNldHEg c3RhciB0CisgICAgICAgICAgICAgIGNvbCAoY3VycmVudC1jb2x1bW4pKSkKKyAgICAgICAoKGxv b2tpbmctYXQgIi9cXCoiKQorICAgICAgICAoc2V0cSBzdGFyIHQKKyAgICAgICAgICAgICAgZmly c3QtbGluZSB0CisgICAgICAgICAgICAgIGNvbCAoMSsgKGN1cnJlbnQtY29sdW1uKSkpKQorICAg ICAgICgobG9va2luZy1hdCAiLy8iKQorICAgICAgICAoc2V0cSBzaW5nbGUgdAorICAgICAgICAg ICAgICBjb2wgKGN1cnJlbnQtY29sdW1uKSkpKSkKKyAgICA7OyBIZXVyaXN0aWMgZm9yIHdoZXRo ZXIgd2UgbmVlZCB0byBjbG9zZSB0aGUgY29tbWVudDoKKyAgICA7OyBpZiB3ZSd2ZSBnb3QgYSBw YXJzZSBlcnJvciBoZXJlLCBhc3N1bWUgaXQncyBhbiB1bnRlcm1pbmF0ZWQKKyAgICA7OyBjb21t ZW50LgorICAgIChzZXRxIG5lZWRzLWNsb3NlCisgICAgICAgICAgKG9yCisgICAgICAgICAgIChl cSAoZ2V0LXRleHQtcHJvcGVydHkgKDEtIChwb2ludCkpICdwb2ludC1lbnRlcmVkKQorICAgICAg ICAgICAgICAgJ2pzMi1lY2hvLWVycm9yKQorICAgICAgICAgICA7OyBUaGUgaGV1cmlzdGljIGFi b3ZlIGRvZXNuJ3Qgd29yayB3ZWxsIHdoZW4gd2UncmUKKyAgICAgICAgICAgOzsgY3JlYXRpbmcg YSBjb21tZW50IGFuZCB0aGVyZSdzIGFub3RoZXIgb25lIGRvd25zdHJlYW0sCisgICAgICAgICAg IDs7IGFzIG91ciBwYXJzZXIgdGhpbmtzIHRoaXMgb25lIGVuZHMgYXQgdGhlIGVuZCBvZiB0aGUK KyAgICAgICAgICAgOzsgbmV4dCBvbmUuICAoWW91IGNhbiBoYXZlIGEgLyogaW5zaWRlIGEganMg YmxvY2sgY29tbWVudC4pCisgICAgICAgICAgIDs7IFNvIGp1c3QgY2xvc2UgaXQgaWYgdGhlIG5l eHQgbm9uLXdzIGNoYXIgaXNuJ3QgYSAqLgorICAgICAgICAgICAoYW5kIGZpcnN0LWxpbmUKKyAg ICAgICAgICAgICAgICAoZW9scCkKKyAgICAgICAgICAgICAgICAoc2F2ZS1leGN1cnNpb24KKyAg ICAgICAgICAgICAgICAgIChza2lwLWNoYXJzLWZvcndhcmQgIiBcdFxyXG4iKQorICAgICAgICAg ICAgICAgICAgKG5vdCAoZXEgKGNoYXItYWZ0ZXIpID8qKSkpKSkpCisgICAgKGRlbGV0ZS1ob3Jp em9udGFsLXNwYWNlKQorICAgIChpbnNlcnQgIlxuIikKKyAgICAoY29uZAorICAgICAoc3Rhcgor ICAgICAgKGluZGVudC10byBjb2wpCisgICAgICAoaW5zZXJ0ICIqICIpCisgICAgICAoaWYgKGFu ZCBmaXJzdC1saW5lIG5lZWRzLWNsb3NlKQorICAgICAgICAgIChzYXZlLWV4Y3Vyc2lvbgorICAg ICAgICAgICAgKGluc2VydCAiXG4iKQorICAgICAgICAgICAgKGluZGVudC10byBjb2wpCisgICAg ICAgICAgICAoaW5zZXJ0ICIqLyIpKSkpCisgICAgICgoYW5kIHNpbmdsZQorICAgICAgICAgICAo c2F2ZS1leGN1cnNpb24KKyAgICAgICAgICAgICAgKGFuZCAoemVyb3AgKGZvcndhcmQtbGluZSAx KSkKKyAgICAgICAgICAgICAgICAgICAobG9va2luZy1hdCAiXFxzLSovLyIpKSkpCisgICAgICAo aW5kZW50LXRvIGNvbCkKKyAgICAgIChpbnNlcnQgIi8vICIpKSkKKyAgICA7OyBEb24ndCBuZWVk IHRvIGV4dGVuZCB0aGUgY29tbWVudCBhZnRlciBhbGwuCisgICAgKGpzMi1pbmRlbnQtbGluZSkp KQorCisoZGVmdW4ganMyLWJlZ2lubmluZy1vZi1saW5lICgpCisgICJUb2dnbGUgcG9pbnQgYmV0 d2VlbiBib2wgYW5kIGZpcnN0IG5vbi13aGl0ZXNwYWNlIGNoYXIgaW4gbGluZS4KK0Fsc28gbW92 ZXMgcGFzdCBjb21tZW50IGRlbGltaXRlcnMgd2hlbiBpbnNpZGUgY29tbWVudHMuIgorICAoaW50 ZXJhY3RpdmUpCisgIChsZXQgKG5vZGUpCisgICAgKGNvbmQKKyAgICAgKChib2xwKQorICAgICAg KGJhY2stdG8taW5kZW50YXRpb24pKQorICAgICAoKGxvb2tpbmctYXQgIi8vIikKKyAgICAgIChz a2lwLWNoYXJzLWZvcndhcmQgIi8gXHQiKSkKKyAgICAgKChhbmQgKGVxIChjaGFyLWFmdGVyKSA/ KikKKyAgICAgICAgICAgKHNldHEgbm9kZSAoanMyLWNvbW1lbnQtYXQtcG9pbnQpKQorICAgICAg ICAgICAobWVtcSAoanMyLWNvbW1lbnQtbm9kZS1mb3JtYXQgbm9kZSkgJyhqc2RvYyBibG9jaykp CisgICAgICAgICAgIChzYXZlLWV4Y3Vyc2lvbgorICAgICAgICAgICAgIChza2lwLWNoYXJzLWJh Y2t3YXJkICIgXHQiKQorICAgICAgICAgICAgIChib2xwKSkpCisgICAgICAoc2tpcC1jaGFycy1m b3J3YXJkICJcKiBcdCIpKQorICAgICAodAorICAgICAgKGdvdG8tY2hh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N0 aW9uLiIKKyAgKGxldCAoKG5vZGUgKGpzMi1ub2RlLWF0LXBvaW50IHBvcykpKQorICAgICh3aGls ZSAoYW5kIG5vZGUgKG5vdCAoanMyLWZ1bmN0aW9uLW5vZGUtcCBub2RlKSkpCisgICAgICAoc2V0 cSBub2RlIChqczItbm9kZS1wYXJlbnQgbm9kZSkpKQorICAgIChpZiAoanMyLWZ1bmN0aW9uLW5v ZGUtcCBub2RlKQorICAgICAgICBub2RlKSkpCisKKyhkZWZ1biBqczItbW9kZS10b2dnbGUtZWxl bWVudCAoKQorICAiSGlkZSBvciBzaG93IHRoZSBmb2xkYWJsZSBlbGVtZW50IGF0IHRoZSBwb2lu dC4iCisgIChpbnRlcmFjdGl2ZSkKKyAgKGxldCAoY29tbWVudCBmbiBwb3MpCisgICAgKHNhdmUt ZXhjdXJzaW9uCisgICAgICAoY29uZAorICAgICAgIDs7IC8qIC4uLiAqLyBjb21tZW50PworICAg ICAgICgoanMyLWJsb2NrLWNvbW1lbnQtcCAoc2V0cSBjb21tZW50IChqczItY29tbWVudC1hdC1w b2ludCkpKQorICAgICAgICAoaWYgKGpzMi1tb2RlLWludmlzaWJsZS1vdmVybGF5LWJvdW5kcwor ICAgICAgICAgICAgIChzZXRxIHBvcyAoKyAzIChqczItbm9kZS1hYnMtcG9zIGNvbW1lbnQpKSkp CisgICAgICAgICAgICAocHJvZ24KKyAgICAgICAgICAgICAgKGdvdG8tY2hhciBwb3MpCisgICAg ICAgICAgICAgIChqczItbW9kZS1zaG93LWVsZW1lbnQpKQorICAgICAgICAgIChqczItbW9kZS1o aWRlLWVsZW1lbnQpKSkKKyAgICAgICA7OyAvLy1jb21tZW50PworICAgICAgICgoc2F2ZS1leGN1 cnNpb24KKyAgICAgICAgICAoYmFjay10by1pbmRlbnRhdGlvbikKKyAgICAgICAgICAobG9va2lu Zy1hdCBqczItbW9kZS0vLy1jb21tZW50LXJlKSkKKyAgICAgICAgKGpzMi1tb2RlLXRvZ2dsZS0v Ly1jb21tZW50KSkKKyAgICAgICA7OyBmdW5jdGlvbj8KKyAgICAgICAoKHNldHEgZm4gKGpzMi1t b2RlLWZ1bmN0aW9uLWF0LXBvaW50KSkKKyAgICAgICAgKHNldHEgcG9zIChhbmQgKGpzMi1mdW5j dGlvbi1ub2RlLWJvZHkgZm4pCisgICAgICAgICAgICAgICAgICAgICAgIChqczItbm9kZS1hYnMt cG9zIChqczItZnVuY3Rpb24tbm9kZS1ib2R5IGZuKSkpKQorICAgICAgICAoZ290by1jaGFyICgx KyBwb3MpKQorICAgICAgICAoaWYgKGpzMi1tb2RlLWludmlzaWJsZS1vdmVybGF5LWJvdW5kcykK KyAgICAgICAgICAgIChqczItbW9kZS1zaG93LWVsZW1lbnQpCisgICAgICAgICAgKGpzMi1tb2Rl LWhpZGUtZWxlbWVudCkpKQorICAgICAgICh0CisgICAgICAgIChtZXNzYWdlICJOb3RoaW5nIGF0 IHBvaW50IHRvIGhpZGUgb3Igc2hvdyIpKSkpKSkKKworKGRlZnVuIGpzMi1tb2RlLWhpZGUtZWxl bWVudCAoKQorICAiRm9sZC9oaWRlIGNvbnRlbnRzIG9mIGEgYmxvY2ssIHNob3dpbmcgZWxsaXBz ZXMuCitTaG93IHRoZSBoaWRkZW4gdGV4dCB3aXRoIFxcW2pzMi1tb2RlLXNob3ctZWxlbWVudF0u IgorICAoaW50ZXJhY3RpdmUpCisgIChpZiBqczItbW9kZS1idWZmZXItZGlydHktcAorICAgICAg KGpzMi1tb2RlLXdhaXQtZm9yLXBhcnNlICMnanMyLW1vZGUtaGlkZS1lbGVtZW50KSkKKyAgKGxl dCAobm9kZSBib2R5IGJlZyBlbmQpCisgICAgKGNvbmQKKyAgICAgKChqczItbW9kZS1pbnZpc2li bGUtb3ZlcmxheS1ib3VuZHMpCisgICAgICAobWVzc2FnZSAiYWxyZWFkeSBoaWRkZW4iKSkKKyAg ICAgKHQKKyAgICAgIChzZXRxIG5vZGUgKGpzMi1ub2RlLWF0LXBvaW50KSkKKyAgICAgIChjb25k CisgICAgICAgKChqczItYmxvY2stY29tbWVudC1wIG5vZGUpCisgICAgICAgIChqczItbW9kZS1o aWRlLWNvbW1lbnQgbm9kZSkpCisgICAgICAgKHQKKyAgICAgICAgKHdoaWxlIChhbmQgbm9kZSAo bm90IChqczItZnVuY3Rpb24tbm9kZS1wIG5vZGUpKSkKKyAgICAgICAgICAoc2V0cSBub2RlIChq czItbm9kZS1wYXJlbnQgbm9kZSkpKQorICAgICAgICAoaWYgKGFuZCBub2RlCisgICAgICAgICAg ICAgICAgIChzZXRxIGJvZHkgKGpzMi1mdW5jdGlvbi1ub2RlLWJvZHkgbm9kZSkpKQorICAgICAg ICAgICAgKHByb2duCisgICAgICAgICAgICAgIChzZXRxIGJlZyAoanMyLW5vZGUtYWJzLXBvcyBi b2R5KQorICAgICAgICAgICAgICAgICAgICBlbmQgKCsgYmVnIChqczItbm9kZS1sZW4gYm9keSkp KQorICAgICAgICAgICAgICAoanMyLW1vZGUtZmxhZy1yZWdpb24gKDErIGJlZykgKDEtIGVuZCkg J2hpZGUpKQorICAgICAgICAgIChtZXNzYWdlICJObyBjb2xsYXBzYWJsZSBlbGVtZW50IGZvdW5k IGF0IHBvaW50IikpKSkpKSkpCisKKyhkZWZ1biBqczItbW9kZS1zaG93LWVsZW1lbnQgKCkKKyAg IlNob3cgdGhlIGhpZGRlbiBlbGVtZW50IGF0IGN1cnJlbnQgcG9pbnQuIgorICAoaW50ZXJhY3Rp dmUpCisgIChsZXQgKChib3VuZHMgKGpzMi1tb2RlLWludmlzaWJsZS1vdmVybGF5LWJvdW5kcykp KQorICAgIChpZiBib3VuZHMKKyAgICAgICAgKGpzMi1tb2RlLWZsYWctcmVnaW9uIChjYXIgYm91 bmRzKSAoY2RyIGJvdW5kcykgbmlsKQorICAgICAgKG1lc3NhZ2UgIk5vdGhpbmcgdG8gdW4taGlk ZSIpKSkpCisKKyhkZWZ1biBqczItbW9kZS1zaG93LWFsbCAoKQorICAiU2hvdyBhbGwgb2Yg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UtdHlwZSBuKSkKKyAgICAgICAgICBib2R5IGJlZyBlbmQpCisgICAg ICAoY29uZAorICAgICAgICgoYW5kICg9IHR0IGpzMi1GVU5DVElPTikKKyAgICAgICAgICAgICAo c2V0cSBib2R5IChqczItZnVuY3Rpb24tbm9kZS1ib2R5IG4pKSkKKyAgICAgICAgKHNldHEgYmVn IChqczItbm9kZS1hYnMtcG9zIGJvZHkpCisgICAgICAgICAgICAgIGVuZCAoKyBiZWcgKGpzMi1u b2RlLWxlbiBib2R5KSkpCisgICAgICAgIChqczItbW9kZS1mbGFnLXJlZ2lvbiAoMSsgYmVnKSAo MS0gZW5kKSAnaGlkZSkKKyAgICAgICAgbmlsKSAgIDsgZG9uJ3QgcHJvY2VzcyBjaGlsZHJlbiBv ZiBmdW5jdGlvbgorICAgICAgICh0CisgICAgICAgIHQpKSkpKSA7IGtlZXAgcHJvY2Vzc2luZyBv dGhlciBBU1Qgbm9kZXMKKworKGRlZnVuIGpzMi1tb2RlLXNob3ctZnVuY3Rpb25zICgpCisgICJV bi1oaWRlIGFueSBmb2xkZWQgZnVuY3Rpb24gYm9kaWVzIGluIHRoZSBidWZmZXIuIgorICAoaW50 ZXJhY3RpdmUpCisgIChzZXRxIGpzMi1tb2RlLWZ1bmN0aW9ucy1oaWRkZW4gbmlsKQorICAoc2F2 ZS1leGN1cnNpb24KKyAgICAoZ290by1jaGFyIChwb2ludC1taW4pKQorICAgICh3aGlsZSAoLz0g KGdvdG8tY2hhciAobmV4dC1vdmVybGF5LWNoYW5nZSAocG9pbnQpKSkKKyAgICAgICAgICAgICAg IChwb2ludC1tYXgpKQorICAgICAgKGRvbGlzdCAobyAob3ZlcmxheXMtYXQgKHBvaW50KSkpCisg ICAgICAgICh3aGVuIChhbmQgKG92ZXJsYXktZ2V0IG8gJ2ludmlzaWJsZSkKKyAgICAgICAgICAg ICAgICAgICAobm90IChvdmVybGF5LWdldCBvICdjb21tZW50KSkpCisgICAgICAgICAgKGpzMi1t b2RlLWZsYWctcmVnaW9uIChvdmVybGF5LXN0YXJ0IG8pIChvdmVybGF5LWVuZCBvKSBuaWwpKSkp KSkKKworKGRlZnVuIGpzMi1tb2RlLWhpZGUtY29tbWVudCAobikKKyAgKGxldCogKChoZWFkIChp ZiAoZXEgKGpzMi1jb21tZW50LW5vZGUtZm9ybWF0IG4pICdqc2RvYykKKyAgICAgICAgICAgICAg ICAgICAzICA7IC8qKgorICAgICAgICAgICAgICAgICAyKSkgIDsgLyoKKyAgICAgICAgIChiZWcg KCsgKGpzMi1ub2RlLWFicy1wb3MgbikgaGVhZCkpCisgICAgICAgICAoZW5kICgtICgrIGJlZyAo anMyLW5vZGUtbGVuIG4pKSBoZWFkIDIpKQorICAgICAgICAgKG8gKGpzMi1tb2RlLWZsYWctcmVn aW9uIGJlZyBlbmQgJ2hpZGUpKSkKKyAgICAob3ZlcmxheS1wdXQgbyAnY29tbWVudCB0KSkpCisK KyhkZWZ1biBqczItbW9kZS10b2dnbGUtaGlkZS1jb21tZW50cyAoKQorICAiRm9sZHMgYWxsIGJs b2NrIGNvbW1lbnRzIGluIHRoZSBidWZmZXIuCitVc2UgXFxbanMyLW1vZGUtc2hvdy1hbGxdIHRv IHJldmVhbCB0aGVtLCBvciBcXFtqczItbW9kZS1zaG93LWVsZW1lbnRdCit0byBvcGVuIGFuIGlu ZGl2aWR1YWwgZW50cnkuIgorICAoaW50ZXJhY3RpdmUpCisgIChpZiBqczItbW9kZS1jb21tZW50 cy1oaWRkZW4KKyAgICAgIChqczItbW9kZS1zaG93LWNvbW1lbnRzKQorICAgIChqczItbW9kZS1o aWRlLWNvbW1lbnRzKSkpCisKKyhkZWZ1biBqczItbW9kZS1oaWRlLWNvbW1lbnRzICgpCisgIChp bnRlcmFjdGl2ZSkKKyAgKGlmIGpzMi1tb2RlLWJ1ZmZlci1kaXJ0eS1wCisgICAgICAoanMyLW1v ZGUtd2FpdC1mb3ItcGFyc2UgIydqczItbW9kZS1oaWRlLWNvbW1lbnRzKSkKKyAgKG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gIChsb29raW5nLWF0IGpzMi1tb2RlLS8vLWNvbW1lbnQtcmUpCisgICAg ICAgICAgICAgICAgICAoZXEgaW5kZW50IChsZW5ndGggKG1hdGNoLXN0cmluZyAxKSkpKQorICAg ICAgICAoc2V0cSBwb3MgKHBvaW50LWF0LWVvbCkpKQorICAgICAgcG9zKSkpCisKKyhkZWZ1biBq czItbW9kZS1oaWRlLS8vLWNvbW1lbnRzICgpCisgICJGb2xkIGFkamFjZW50IDEtbGluZSBjb21t ZW50cywgc2hvd2luZyBvbmx5IHNuaXBwZXQgb2YgZmlyc3Qgb25lLiIKKyAgKGxldCAoYmVnIGVu ZCkKKyAgICAoc2F2ZS1leGN1cnNpb24KKyAgICAgIChnb3RvLWNoYXIgKHBvaW50LW1pbikpCisg ICAgICAod2hpbGUgKHJlLXNlYXJjaC1mb3J3YXJkIGpzMi1tb2RlLS8vLWNvbW1lbnQtcmUgbmls IHQpCisgICAgICAgIChzZXRxIGJlZyAocG9pbnQpCisgICAgICAgICAgICAgIGVuZCAoanMyLW1v ZGUtZXh0ZW5kLS8vLWNvbW1lbnQgMSkpCisgICAgICAgICh1bmxlc3MgKGVxIGJlZyBlbmQpCisg ICAgICAgICAgKG92ZXJsYXktcHV0IChqczItbW9kZS1mbGFnLXJlZ2lvbiBiZWcgZW5kICdoaWRl KQorICAgICAgICAgICAgICAgICAgICAgICAnY29tbWVudCB0KSkKKyAgICAgICAgKGdvdG8tY2hh ciBlbmQpCisgICAgICAgIChmb3J3YXJkLWNoYXIgMSkpKSkpCisKKyhkZWZ1biBqczItbW9kZS10 b2dnbGUtLy8tY29tbWVudCAoKQorICAiRm9sZCBvciB1bi1mb2xkIGFueSBtdWx0aS1saW5lIC8v LWNvbW1lbnQgYXQgcG9pbnQuCitDYWxsZXIgc2hvdWxkIGhhdmUgZGV0ZXJtaW5lZCB0aGF0IHRo aXMgbGluZSBzdGFydHMgd2l0aCBhIC8vLWNvbW1lbnQuIgorICAobGV0KiAoKGJlZyAocG9pbnQt YXQtZW9sKSkKKyAgICAgICAgIChlbmQgYmVnKSkKKyAgICAoc2F2ZS1leGN1cnNpb24KKyAgICAg IChnb3RvLWNoYXIgZW5kKQorICAgICAgKGlmIChqczItbW9kZS1pbnZpc2libGUtb3ZlcmxheS1i b3VuZHMpCisgICAgICAgICAgKGpzMi1tb2RlLXNob3ctZWxlbWVudCkKKyAgICAgICAgOzsgZWxz ZSBoaWRlIHRoZSBjb21tZW50CisgICAgICAgIChzZXRxIGJlZyAoanMyLW1vZGUtZXh0ZW5kLS8v LWNvbW1lbnQgLTEpCisgICAgICAgICAgICAgIGVuZCAoanMyLW1vZGUtZXh0ZW5kLS8vLWNvbW1l bnQgMSkpCisgICAgICAgICh1bmxlc3MgKGVxIGJlZyBlbmQpCisgICAgICAgICAgKG92ZXJsYXkt cHV0IChqczItbW9kZS1mbGFnLXJlZ2lvbiBiZWcgZW5kICdoaWRlKQorICAgICAgICAgICAgICAg ICAgICAgICAnY29tbWVudCB0KSkpKSkpCisKKyhkZWZ1biBqczItbW9kZS1zaG93LWNvbW1lbnRz ICgpCisgICJVbi1oaWRlIGFueSBoaWRkZW4gY29tbWVudHMsIGxlYXZpbmcgb3RoZXIgaGlkZGVu IGVsZW1lbnRzIGFsb25lLiIKKyAgKGludGVyYWN0aXZlKQorICAoc2V0cSBqczItbW9kZS1jb21t ZW50cy1oaWRkZW4gbmlsKQorICAoc2F2ZS1leGN1cnNpb24KKyAgICAoZ290by1jaGFyIChwb2lu dC1taW4pKQorICAgICh3aGlsZSAoLz0gKGdvdG8tY2hhciAobmV4dC1vdmVybGF5LWNoYW5nZSAo cG9pbnQpKSkKKyAgICAgICAgICAgICAgIChwb2ludC1tYXgpKQorICAgICAgKGRvbGlzdCAobyAo b3ZlcmxheXMtYXQgKHBvaW50KSkpCisgICAgICAgICh3aGVuIChvdmVybGF5LWdldCBvICdjb21t ZW50KQorICAgICAgICAgIChqczItbW9kZS1mbGFnLXJlZ2lvbiAob3ZlcmxheS1zdGFydCB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VseS1wICdhbnkpCisgICAgICAobWVzc2FnZSAid2FybmluZ3Mg YW5kIGVycm9ycyAlcyIKKyAgICAgICAgICAgICAgIChpZiBqczItbW9kZS1zaG93LXBhcnNlLWVy cm9ycworICAgICAgICAgICAgICAgICAgICJlbmFibGVkIgorICAgICAgICAgICAgICAgICAiZGlz YWJsZWQiKSkpCisgIChqczItcmVwYXJzZSAnZm9yY2UpKQorCisoZGVmdW4ganMyLW1vZGUtY3Vz dG9taXplICgpCisgIChpbnRlcmFjdGl2ZSkKKyAgKGN1c3RvbWl6ZS1ncm91cCAnanMyLW1vZGUp KQorCisoZGVmdW4ganMyLW1vZGUtZm9yd2FyZC1zZXhwICgmb3B0aW9uYWwgYXJnKQorICAiTW92 ZSBmb3J3YXJkIGFjcm9zcyBvbmUgc3RhdGVtZW50IG9yIGJhbGFuY2VkIGV4cHJlc3Npb24uCitX aXRoIEFSRywgZG8gaXQgdGhhdCBtYW55IHRpbWVzLiAgTmVnYXRpdmUgYXJnIC1OIG1lYW5zCitt b3ZlIGJhY2t3YXJkIGFjcm9zcyBOIGJhbGFuY2VkIGV4cHJlc3Npb25zLiIKKyAgKGludGVyYWN0 aXZlICJwIikKKyAgKHNldHEgYXJnIChvciBhcmcgMSkpCisgIChzYXZlLXJlc3RyaWN0aW9uCisg ICAgKHdpZGVuKSA7OyBgYmxpbmstbWF0Y2hpbmctb3BlbicgY2FsbHMgYG5hcnJvdy10by1yZWdp b24nCisgICAgKGpzMi1yZXBhcnNlKQorICAgIChsZXQgKGZvcndhcmQtc2V4cC1mdW5jdGlvbgor ICAgICAgICAgIG5vZGUgKHN0YXJ0IChwb2ludCkpIHBvcyBscCBycCBjaGlsZCkKKyAgICAgIChj b25kCisgICAgICAgOzsgYmFja3dhcmQtc2V4cAorICAgICAgIDs7IGNvdWxkIHByb2JhYmx5IG1h a2UgdGhpcyBiZXR0ZXIgZm9yIHNvbWUgY2FzZXM6CisgICAgICAgOzsgIC0gaWYgaW4gc3RhdGVt ZW50IGJsb2NrIChlLmcuIGZ1bmN0aW9uIGJvZHkpLCBnbyB0byBwYXJlbnQKKyAgICAgICA7OyAg LSBpbmZpeCBleHBycyBsaWtlIChmb28gaW4gYmFyKSAtIG1heWJlIGdvIHRvIGJlZ2lubmluZwor ICAgICAgIDs7ICAgIG9mIGluZml4IGV4cHIgaWYgaW4gdGhlIHJpZ2h0LXNpZGUgZXhwcmVzc2lv bj8KKyAgICAgICAoKGFuZCBhcmcgKGNsLW1pbnVzcCBhcmcpKQorICAgICAgICAoZG90aW1lcyAo XyAoLSBhcmcpKQorICAgICAgICAgIChqczItYmFja3dhcmQtc3dzKQorICAgICAgICAgIChmb3J3 YXJkLWNoYXIgLTEpICAgOyBFbnRlciB0aGUgbm9kZSB3ZSBiYWNrZWQgdXAgdG8uCisgICAgICAg ICAgKHdoZW4gKHNldHEgbm9kZSAoanMyLW5vZGUtYXQtcG9pbnQgKHBvaW50KSB0KSkKKyAgICAg ICAgICAgIChzZXRxIHBvcyAoanMyLW5vZGUtYWJzLXBvcyBub2RlKSkKKyAgICAgICAgICAgIChs ZXQgKChwYXJlbnMgKGpzMi1tb2RlLWZvcndhcmQtc2V4cC1wYXJlbnMgbm9kZSBwb3MpKSkKKyAg ICAgICAgICAgICAgKHNldHEgbHAgKGNhciBwYXJlbnMpCisgICAgICAgICAgICAgICAgICAgIHJw IChjZHIgcGFyZW5zKSkpCisgICAgICAgICAgICAod2hlbiAoYW5kIGxwICg+IHN0YXJ0IGxwKSkK KyAgICAgICAgICAgICAgKGlmIChhbmQgcnAgKDw9IHN0YXJ0IHJwKSkKKyAgICAgICAgICAgICAg ICAgIDs7IEJldHdlZW4gcGFyZW5zLCBjaGVjayBpZiB0aGVyZSdzIGEgY2hpbGQgbm9kZSB3ZSBj YW4ganVtcC4KKyAgICAgICAgICAgICAgICAgICh3aGVuIChzZXRxIGNoaWxkIChqczItbm9kZS1j bG9zZXN0LWNoaWxkIG5vZGUgKHBvaW50KSBscCB0KSkKKyAgICAgICAgICAgICAgICAgICAgKHNl dHEgcG9zIChqczItbm9kZS1hYnMtcG9zIGNoaWxkKSkpCisgICAgICAgICAgICAgICAgOzsgQmVm b3JlIGJvdGggcGFyZW5zLgorICAgICAgICAgICAgICAgIChzZXRxIHBvcyBscCkpKQorICAgICAg ICAgICAgKGxldCAoKHN0YXRlIChwYXJzZS1wYXJ0aWFsLXNleHAgc3RhcnQgcG9zKSkpCisgICAg ICAgICAgICAgIChnb3RvLWNoYXIgKGlmIChub3QgKHplcm9wIChjYXIgc3RhdGUpKSkKKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgOzsgU3R1bWJsZSBhdCB0aGUgdW5iYWxhbmNlZCBwYXJl biBpZiA8IDAsIG9yCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDs7IGp1bXAgYSBiaXQg ZnVydGhlciBpZiA+IDAuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzY2FuLXNleHBz IHN0YXJ0IC0xKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zKSkpKQorICAgICAgICAg ICh1bmxlc3MgcG9zIChnb3RvLWNoYXIgKHBvaW50LW1pbikpKSkpCisgICAgICAgKHQKKyAgICAg ICAgOzsgZm9yd2FyZC1zZXhwCisgICAgICAgIChkb3RpbWVzIChfIGFyZykKKyAgICAgICAgICAo anMyLWZvcndhcmQtc3dzKQorICAgICAgICAgICh3aGVuIChzZXRxIG5vZGUgKGpzMi1ub2RlLWF0 LXBvaW50IChwb2ludCkgdCkpCisgICAgICAgICAgICAoc2V0cSBwb3MgKGpzMi1ub2RlLWFicy1w b3Mgbm9kZSkpCisgICAgICAgICAgICAobGV0ICgocGFyZW5zIChqczItbW9kZS1mb3J3YXJkLXNl eHAtcGFyZW5zIG5vZGUgcG9zKSkpCisgICAgICAgICAgICAgIChzZXRxIGxwIChjYXIgcGFyZW5z KQorICAgICAgICAgICAgICAgICAgICBycCAoY2RyIHBhcmVucykpKQorICAgICAgICAgICAgKG9y CisgICAgICAgICAgICAgKHdoZW4gKGFuZCBycCAoPD0gc3RhcnQgcnApKQorICAgICAgICAgICAg ICAgKGlmICg+IHN0YXJ0IGxwKQorICAgICAgICAgICAgICAgICAgICh3aGVuIChzZXRxIGNoaWxk IChqczItbm9kZS1jbG9zZXN0LWNoaWxkIG5vZGUgKHBvaW50KSBycCkpCisgICAgICAgICAgICAg ICAgICAgICAoc2V0cSBwb3MgKGpzMi1ub2RlLWFicy1lbmQgY2hpbGQpKSkKKyAgICAgICAgICAg ICAgICAgKHNldHEgcG9zICgxKyBycCkpKSkKKyAgICAgICAgICAgICA7OyBObyBwYXJlbnMgb3Ig Y2hpbGQgbm9kZXMsIGxvb2tzIGZvciB0aGUgZW5kIG9mIHRoZSBjdXJyZW4gbm9kZS4KKyAgICAg ICAgICAgICAoY2wtaW5jZiBwb3MgKGpzMi1ub2RlLWxlbgorICAgICAgICAgICAgICAgICAgICAg ICAgICAgKGlmIChqczItZXhwci1zdG10LW5vZGUtcCAoanMyLW5vZGUtcGFyZW50IG5vZGUpKQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDs7IFN0b3AgYWZ0ZXIgdGhlIHNlbWljb2xv bi4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoanMyLW5vZGUtcGFyZW50IG5vZGUp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUpKSkpCisgICAgICAgICAgICAobGV0 ICgoc3RhdGUgKHNhdmUtZXhjdXJzaW9uIChwYXJzZS1wYXJ0aWFsLXNleHAgc3RhcnQgcG9zKSkp KQorICAgICAgICAgICAgICAoZ290by1jaGFyIChpZiAobm90ICh6ZXJvcCAoY2FyIHN0YXRlKSkp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzY2FuLXNleHBzIHN0YXJ0IDEpCisgICAg ICAgICAgICAgICAgICAgICAgICAgICBwb3MpKSkpCisgICAgICAgICAgKHVubGVzcyBwb3MgKGdv dG8tY2hhciAocG9pbnQtbWF4KSkpKSkpKSkpCisKKyhkZWZ1biBqczItbW9kZS1mb3J3YXJkLXNl eHAtcGFyZW5zIChub2RlIGFicy1wb3MpCisgICJSZXR1cm4gYSBjb25zIGNlbGwgd2l0aCBwb3Np dGlvbnMgb2YgbWFpbiBwYXJlbnMgaW4gTk9ERS4iCisgIChjb25kCisgICAoKG9yIChqczItYXJy YXktbm9kZS1wIG5vZGUpCisgICAgICAgIChqczItb2JqZWN0LW5vZGUtcCBub2RlKQorICAgICAg ICAoanMyLWNvbXAtbm9kZS1wIG5vZGUpCisgICAgICAgIChtZW1xIChhcmVmIG5vZGUgMCkgJyhj bC1zdHJ1Y3QtanMyLWJsb2NrLW5vZGUgY2wtc3RydWN0LWpzMi1zY29wZSkpKQorICAgIChjb25z IGFicy1wb3MgKCsgYWJzLXBvcyAoanMyLW5vZGUtbGVuIG5vZGUpIC0xKSkpCisgICAoKGpzMi1w YXJlbi1leHByLW5vZGUtcCBub2RlKQorICAgIChsZXQgKChscCAoanMyLW5vZGUtbHAgbm9kZSkp CisgICAgICAgICAgKHJwIChqczItbm9kZS1ycCBub2RlKSkpCisgICAgICAoY29ucyAod2hlbiBs cCAoKyBhYnMtcG9zIGxwKSkKKyAgICAgICAgICAgICh3aGVuIHJwICgrIGFicy1wb3MgcnApKSkp KSkpCisKKyhkZWZ1biBqczItbm9kZS1jbG9zZXN0LWNoaWxkIChwYXJlbnQgcG9pbnQgbGltaXQg Jm9wdGlvbmFsIGJlZm9yZSkKKyAgKGxldCogKChwYXJlbnQtcG9zIChqczItbm9kZS1hYnMtcG9z IHBhcmVudCkpCisgICAgICAgICAocnBvaW50ICgtIHBvaW50IHBhcmVudC1wb3MpKQorICAgICAg ICAgKHJsaW1pdCAoLSBsaW1pdCBwYXJlbnQtcG9zKSkKKyAgICAgICAgIChtaW4gKG1pbiBycG9p bnQgcmxpbWl0KSkKKyAgICAgICAgIChtYXggKG1heCBycG9pbnQgcmxpbWl0KSkKKyAgICAgICAg IGZvdW5kKQorICAgIChjYXRjaCAnZG9uZQorICAgICAgKGpzMi12aXNpdC1hc3QKKyAgICAgICBw YXJlbnQKKyAgICAgICAobGFtYmRhIChub2RlIF9lbmQtcCkKKyAgICAgICAgIChpZiAoZXEgbm9k ZSBwYXJlbnQpCisgICAgICAgICAgICAgdAorICAgICAgICAgICAobGV0ICgocG9zIChqczItbm9k ZS1wb3Mgbm9kZSkpIDs7IEJvdGggcmVsYXRpdmUgdmFsdWVzLgorICAgICAgICAgICAgICAgICAo ZW5kICgrIChqczItbm9kZS1wb3Mgbm9kZSkgKGpzMi1ub2RlLWxlbiBub2RlKSkpKQorICAgICAg ICAgICAgICh3aGVuIChhbmQgKD49IHBvcyBtaW4pICg8PSBlbmQgbWF4KQorICAgICAgICAgICAg ICAgICAgICAgICAgKGlmIGJlZm9yZSAoPCBwb3MgcnBvaW50KSAoPiBlbmQgcnBvaW50KSkpCisg ICAgICAgICAgICAgICAoc2V0cSBmb3VuZCBub2RlKSkKKyAgICAgICAgICAgICAod2hlbiAoPiBl bmQgcnBvaW50KQorICAgICAgICAgICAgICAgKHRocm93ICdkb25lIG5pbCkpKQorICAgICAgICAg ICBuaWwpKSkpCisgICAgZm91bmQpKQorCisoZGVmdW4ganMyLWVycm9ycyAoKQorICAiUmV0dXJu IGEgbGlzdCBvZiBlcnJvcnMgZm91bmQuIgorICAoYW5kIGpzMi1tb2RlLWFzdAorICAgICAgIChq czItYXN0LXJvb3QtZXJyb3JzIGpzMi1tb2RlLWFzdCkpKQorCisoZGVmdW4ganMyLXdhcm5pbmdz ICgpCisgICJSZXR1cm4gYSBsaXN0IG9mIHdhcm5pbmdzIGZvdW5kLiIKKyAgKGFuZCBqczItbW9k ZS1hc3QKKyAgICAgICAoanMyLWFzdC1yb290LXdhcm5pbmdzIGpzMi1tb2RlLWFzdCkpKQorCiso ZGVmdW4ganMyLWhhdmUtZXJyb3JzLXAgKCkKKyAgIlJldHVybiBub24tbmlsIGlmIGFueSBwYXJz ZSBlcnJvcnMgb3Igd2FybmluZ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lIHQpCisgICAgICAg ICAgIChzdGFydCAocG9pbnQpKQorICAgICAgICAgICAoY291bnQgKG9yIGFyZyAxKSkKKyAgICAg ICAgICAgKGJhY2t3YXJkIChjbC1taW51c3AgY291bnQpKQorICAgICAgICAgICAoc29ydGVyIChp ZiBiYWNrd2FyZCAnPiAnPCkpCisgICAgICAgICAgIChzdG9wcGVyIChpZiBiYWNrd2FyZCAnPCAn PikpCisgICAgICAgICAgIChjb3VudCAoYWJzIGNvdW50KSkKKyAgICAgICAgICAgYWxsLWVycnMg ZXJyKQorICAgICAgOzsgU29ydCBieSBzdGFydCBwb3NpdGlvbi4KKyAgICAgIChzZXRxIGVycnMg KHNvcnQgZXJycyAobGFtYmRhIChlMSBlMikKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IChmdW5jYWxsIHNvcnRlciAoY2wtc2Vjb25kIGUxKSAoY2wtc2Vjb25kIGUyKSkpKQorICAgICAg ICAgICAgYWxsLWVycnMgZXJycykKKyAgICAgIDs7IEZpbmQgbnRoIGVycm9yIHdpdGggcG9zID4g c3RhcnQuCisgICAgICAod2hpbGUgKGFuZCBlcnJzIGNvbnRpbnVlKQorICAgICAgICAod2hlbiAo ZnVuY2FsbCBzdG9wcGVyIChjbC1jYWRhciBlcnJzKSBzdGFydCkKKyAgICAgICAgICAoc2V0cSBl cnIgKGNhciBlcnJzKSkKKyAgICAgICAgICAoaWYgKHplcm9wIChjbC1kZWNmIGNvdW50KSkKKyAg ICAgICAgICAgICAgKHNldHEgY29udGludWUgbmlsKSkpCisgICAgICAgIChzZXRxIGVycnMgKGNk ciBlcnJzKSkpCisgICAgICA7OyBDbGVhciBmb3IgYGpzMi1lY2hvLWVycm9yJy4KKyAgICAgICht ZXNzYWdlIG5pbCkKKyAgICAgIChpZiBlcnIKKyAgICAgICAgICAoZ290by1jaGFyIChjbC1zZWNv bmQgZXJyKSkKKyAgICAgICAgOzsgV3JhcCBhcm91bmQgdG8gZmlyc3QgZXJyb3IuCisgICAgICAg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1dCBubyByZWNvcmRlciwgdGhleSdyZSBy ZXF1ZXN0aW5nIGEgcmVzY2FuCisgICAgKHVubGVzcyBqczItaW1lbnUtcmVjb3JkZXIKKyAgICAg IChqczItcmVwYXJzZSAnZm9yY2UpKQorICAgIChwcm9nMQorICAgICAgICAoanMyLWJ1aWxkLWlt ZW51LWluZGV4KQorICAgICAgKHNldHEganMyLWltZW51LXJlY29yZGVyIG5pbAorICAgICAgICAg ICAganMyLWltZW51LWZ1bmN0aW9uLW1hcCBuaWwpKSkpCisKKyhkZWZ1biBqczItbW9kZS1maW5k LXRhZyAoKQorICAiUmVwbGFjZW1lbnQgZm9yIGBmaW5kLXRhZy1kZWZhdWx0Jy4KK2BmaW5kLXRh Zy1kZWZhdWx0JyByZXR1cm5zIGEgcmlkaWN1bG91cyBhbnN3ZXIgaW5zaWRlIGNvbW1lbnRzLiIK KyAgKGxldCAoYmVnIGVuZCkKKyAgICAoanMyLXdpdGgtdW5kZXJzY29yZS1hcy13b3JkLXN5bnRh eAorICAgICAgKHNhdmUtZXhjdXJzaW9uCisgICAgICAgIChpZiAoYW5kIChub3QgKGxvb2tpbmct YXQgIltbOmFsbnVtOl1fJF0iKSkKKyAgICAgICAgICAgICAgICAgKGxvb2tpbmctYmFjayAiW1s6 YWxudW06XV8kXSIpKQorICAgICAgICAgICAgKHNldHEgYmVnIChwcm9nbiAoZm9yd2FyZC13b3Jk IC0xKSAocG9pbnQpKQorICAgICAgICAgICAgICAgICAgZW5kIChwcm9nbiAoZm9yd2FyZC13b3Jk IDEpIChwb2ludCkpKQorICAgICAgICAgIChzZXRxIGJlZyAocHJvZ24gKGZvcndhcmQtd29yZCAx KSAocG9pbnQpKQorICAgICAgICAgICAgICAgIGVuZCAocHJvZ24gKGZvcndhcmQtd29yZCAtMSkg KHBvaW50KSkpKQorICAgICAgICAocmVwbGFjZS1yZWdleHAtaW4tc3RyaW5nCisgICAgICAgICAi W1wiJ10iICIiCisgICAgICAgICAoYnVmZmVyLXN1YnN0cmluZy1uby1wcm9wZXJ0aWVzIGJlZyBl bmQpKSkpKSkKKworKGRlZnVuIGpzMi1tb2RlLWZvcndhcmQtc2libGluZyAoKQorICAiTW92ZSB0 byB0aGUgZW5kIG9mIHRoZSBzaWJsaW5nIGZvbGxvd2luZyBwb2ludCBpbiBwYXJlbnQuCitSZXR1 cm5zIG5vbi1uaWwgaWYgc3VjY2Vzc2Z1bCwgb3IgbmlsIGlmIHRoZXJlIHdhcyBubyBmb2xsb3dp bmcgc2libGluZy4iCisgIChsZXQqICgobm9kZSAoanMyLW5vZGUtYXQtcG9pbnQpKQorICAgICAg ICAgKHBhcmVudCAoanMyLW1vZGUtZmluZC1lbmNsb3NpbmctZm4gbm9kZSkpCisgICAgICAgICBz aWIpCisgICAgKHdoZW4gKHNldHEgc2liIChqczItbm9kZS1maW5kLWNoaWxkLWFmdGVyIChwb2lu dCkgcGFyZW50KSkKKyAgICAgIChnb3RvLWNoYXIgKCsgKGpzMi1ub2RlLWFicy1wb3Mgc2liKQor ICAgICAgICAgICAgICAgICAgICAoanMyLW5vZGUtbGVuIHNpYikpKSkpKQorCisoZGVmdW4ganMy LW1vZGUtYmFja3dhcmQtc2libGluZyAoKQorICAiTW92ZSB0byB0aGUgYmVnaW5uaW5nIG9mIHRo ZSBzaWJsaW5nIG5vZGUgcHJlY2VkaW5nIHBvaW50IGluIHBhcmVudC4KK1BhcmVudCBpcyBkZWZp bmVkIGFzIHRoZSBlbmNsb3Npbmcgc2NyaXB0IG9yIGZ1bmN0aW9uLiIKKyAgKGxldCogKChub2Rl IChqczItbm9kZS1hdC1wb2ludCkpCisgICAgICAgICAocGFyZW50IChqczItbW9kZS1maW5kLWVu Y2xvc2luZy1mbiBub2RlKSkKKyAgICAgICAgIHNpYikKKyAgICAod2hlbiAoc2V0cSBzaWIgKGpz Mi1ub2RlLWZpbmQtY2hpbGQtYmVmb3JlIChwb2ludCkgcGFyZW50KSkKKyAgICAgIChnb3RvLWNo YXIgKGpzMi1ub2Rl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LWRlZnVuICgp CisgICJHbyB0byB0aGUgY2hhciBhZnRlciB0aGUgbGFzdCBwb3NpdGlvbiBvZiB0aGUgY3VycmVu dCBmdW5jdGlvbgorb3Igc2NyaXB0LWxldmVsIGVsZW1lbnQuIgorICAobGV0KiAoKG5vZGUgKGpz Mi1ub2RlLWF0LXBvaW50KSkKKyAgICAgICAgIChwYXJlbnQgKG9yIChhbmQgKGpzMi1mdW5jdGlv bi1ub2RlLXAgbm9kZSkgbm9kZSkKKyAgICAgICAgICAgICAgICAgICAgIChqczItbm9kZS1wYXJl bnQtc2NyaXB0LW9yLWZuIG5vZGUpKSkKKyAgICAgICAgIHNjcmlwdCkKKyAgICAodW5sZXNzIChq czItZnVuY3Rpb24tbm9kZS1wIHBhcmVudCkKKyAgICAgIDs7IFVzZSBjdXJyZW50IHNjcmlwdC1s ZXZlbCBub2RlLCBvciwgaWYgbm9uZSwgdGhlIG5leHQgb25lLgorICAgICAgKHNldHEgc2NyaXB0 IChvciBwYXJlbnQgbm9kZSkKKyAgICAgICAgICAgIHBhcmVudCAoanMyLW5vZGUtZmluZC1jaGls ZC1iZWZvcmUgKHBvaW50KSBzY3JpcHQpKQorICAgICAgKHdoZW4gKG9yIChudWxsIHBhcmVudCkK KyAgICAgICAgICAgICAgICAoPj0gKHBvaW50KSAoKyAoanMyLW5vZGUtYWJzLXBvcyBwYXJlbnQp CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGpzMi1ub2RlLWxlbiBwYXJlbnQpKSkp CisgICAgICAgIChzZXRxIHBhcmVudCAoanMyLW5vZGUtZmluZC1jaGlsZC1hZnRlciAocG9pbnQp IHNjcmlwdCkpKSkKKyAgICAod2hlbiBwYXJlbnQKKyAgICAgIChnb3RvLWNoYXIgKCsgKGpzMi1u b2RlLWFicy1wb3MgcGFyZW50KQorICAgICAgICAgICAgICAgICAgICAoanMyLW5vZGUtbGVuIHBh cmVudCkpKSkpKQorCisoZGVmdW4ganMyLW1hcmstZGVmdW4gKCZvcHRpb25hbCBhbGxvdy1leHRl bmQpCisgICJQdXQgbWFyayBhdCBlbmQgb2YgdGhpcyBmdW5jdGlvbiwgcG9pbnQgYXQgYmVnaW5u aW5nLgorVGhlIGZ1bmN0aW9uIG1hcmtlZCBpcyB0aGUgb25lIHRoYXQgY29udGFpbnMgcG9pbnQu CisKK0ludGVyYWN0aXZlbHksIGlmIHRoaXMgY29tbWFuZCBpcyByZXBlYXRlZCwKK29yIChpbiBU cmFuc2llbnQgTWFyayBtb2RlKSBpZiB0aGUgbWFyayBpcyBhY3RpdmUsCitpdCBtYXJrcyB0aGUg bmV4dCBkZWZ1biBhZnRlciB0aGUgb25lcyBhbHJlYWR5IG1hcmtlZC4iCisgIChpbnRlcmFjdGl2 ZSAicCIpCisgIChsZXQgKGV4dGVuZGVkKQorICAgICh3aGVuIChhbmQgYWxsb3ctZXh0ZW5kCisg ICAgICAgICAgICAgICAob3IgKGFuZCAoZXEgbGFzdC1jb21tYW5kIHRoaXMtY29tbWFuZCkgKG1h cmsgdCkpCisgICAgICAgICAgICAgICAgICAgKGFuZCB0cmFuc2llbnQtbWFyay1tb2RlIG1hcmst YWN0aXZlKSkpCisgICAgICAobGV0ICgoc2liIChzYXZlLWV4Y3Vyc2lvbgorICAgICAgICAgICAg ICAgICAgIChnb3RvLWNoYXIgKG1hcmspKQorICAgICAgICAgICAgICAgICAgIChpZiAoanMyLW1v ZGUtZm9yd2FyZC1zaWJsaW5nKQorICAgICAgICAgICAgICAgICAgICAgICAocG9pbnQpKSkpKQor ICAgICAgICAoaWYgc2liCisgICAgICAgICAgICAocHJvZ24KKyAgICAgICAgICAgICAgKHNldC1t YXJrIHNpYikKKyAgICAgICAgICAgICAgKHNldHEgZXh0ZW5kZWQgdCkpCisgICAgICAgICAgOzsg bm8gbW9yZSBzaWJsaW5ncyAtIHRyeSBleHRlbmRpbmcgdG8gZW5jbG9zaW5nIG5vZGUKKyAgICAg ICAgICAoZ290by1jaGFyIChtYXJrIHQpKSkpKQorICAgKHdoZW4gKG5vdCBleHRlbmRlZCkKKyAg ICAgKGxldCAoKG5vZGUgKGpzMi1ub2RlLWF0LXBvaW50IChwb2ludCkgdCkpIDsgc2tpcCBjb21t ZW50cworICAgICAgICAgICBhc3QgZm4gc3RtdCBwYXJlbnQgYmVnIGVuZCkKKyAgICAgICAod2hl biAoanMyLWFzdC1yb290LXAgbm9kZSkKKyAgICAgICAgIChzZXRxIGFzdCBub2RlCisgICAgICAg ICAgICAgICBub2RlIChvciAoanMyLW5vZGUtZmluZC1jaGlsZC1hZnRlciAocG9pbnQpIG5vZGUp CisgICAgICAgICAgICAgICAgICAgICAgICAoanMyLW5vZGUtZmluZC1jaGlsZC1iZWZvcmUgKHBv aW50KSBub2RlKSkpKQorICAgICAgIDs7IG9ubHkgbWFyayB3aG9sZSBidWZmZXIgaWYgd2UgY2Fu J3QgZmluZCBhbnkgY2hpbGRyZW4KKyAgICAgICAoaWYgKG51bGwgbm9kZSkKKyAgICAgICAgICAg KHNldHEgbm9kZSBhc3QpKQorICAgICAgIChpZiAoanMyLWZ1bmN0aW9uLW5vZGUtcCBub2RlKQor ICAgICAgICAgICAoc2V0cSBwYXJlbnQgbm9kZSkKKyAgICAgICAgIChzZXRxIGZuIChqczItbW9k ZS1maW5kLWVuY2xvc2luZy1mbiBub2RlKQorICAgICAgICAgICAgICAgc3RtdCAoaWYgKG9yIChu dWxsIGZuKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIChqczItYXN0LXJvb3QtcCBmbikp CisgICAgICAgICAgICAgICAgICAgICAgICAoanMyLW1vZGUtZmluZC1maXJzdC1zdG10IG5vZGUp KQorICAgICAgICAgICAgICAgcGFyZW50IChvciBzdG10IGZuKSkpCisgICAgICAgKHNldHEgYmVn IChqczItbm9kZS1hYnMtcG9zIHBhcmVudCkKKyAgICAgICAgICAgICBlbmQgKCsgYmVnIChqczIt bm9kZS1sZW4gcGFyZW50KSkpCisgICAgICAgKHB1c2gtbWFyayBiZWcpCisgICAgICAgK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iIKKyAgKGxl dCAoKHRlc3QtbmFtZSAoaW50ZXJuIChmb3JtYXQgImNvbnRleHQtY29sb3JpbmctdGVzdC1qcy1t b2RlLSVzIiBuYW1lKSkpCisgICAgICAgIChmaXh0dXJlIChmb3JtYXQgIi4vZml4dHVyZXMvJXMu anMiIG5hbWUpKQorICAgICAgICAoZnVuY3Rpb24tbmFtZSAoaW50ZXJuLXNvZnQgKGZvcm1hdCAi Y29udGV4dC1jb2xvcmluZy10ZXN0LWpzLSVzIiBuYW1lKSkpKQorICAgIGAoZXJ0LWRlZnRlc3Qt YXN5bmMgLHRlc3QtbmFtZSAoZG9uZSkKKyAgICAgICAgICAgICAgICAgICAgICAgIChjb250ZXh0 LWNvbG9yaW5nLXRlc3QtanMtbW9kZQorICAgICAgICAgICAgICAgICAgICAgICAgICxmaXh0dXJl CisgICAgICAgICAgICAgICAgICAgICAgICAgKGxhbWJkYSAodGVhcmRvd24pCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAodW53aW5kLXByb3RlY3QKKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAoLGZ1bmN0aW9uLW5hbWUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChm dW5jYWxsIHRlYXJkb3duKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIChmdW5jYWxsIGRv bmUpKSkpKSkKKworKGRlZm1hY3JvIGNvbnRleHQtY29sb3JpbmctdGVzdC1kZWZ0ZXN0LWpzMi1t b2RlIChuYW1lKQorICAgICJEZWZpbmUgYSB0ZXN0IGZvciBganMyLW1vZGUnIGluIHRoZSB0eXBp Y2FsIGZvcm1hdC4iCisgIChsZXQgKCh0ZXN0LW5hbWUgKGludGVybiAoZm9ybWF0ICJjb250ZXh0 LWNvbG9yaW5nLXRlc3QtanMyLW1vZGUtJXMiIG5hbWUpKSkKKyAgICAgICAgKGZpeHR1cmUgKGZv cm1hdCAiLi9maXh0dXJlcy8lcy5qcyIgbmFtZSkpCisgICAgICAgIChmdW5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yb20gYSBmYWNlLiIpCisKKyhkZWZ1biBjb250ZXh0LWNvbG9yaW5n LXRlc3QtYXNzZXJ0LXJlZ2lvbi1sZXZlbCAoc3RhcnQgZW5kIGxldmVsKQorICAiQXNzZXJ0IHRo YXQgYWxsIHBvaW50cyBpbiB0aGUgcmFuZ2UgW1NUQVJULCBFTkQpIGFyZSBvZiBsZXZlbAorTEVW RUwuIgorICAoY29udGV4dC1jb2xvcmluZy10ZXN0LWFzc2VydC1yZWdpb24KKyAgICh3aGVuIChu b3QgKHdoZW4gZmFjZQorICAgICAgICAgICAgICAgIChsZXQqICgoZmFjZS1zdHJpbmcgKHN5bWJv bC1uYW1lIGZhY2UpKQorICAgICAgICAgICAgICAgICAgICAgICAobWF0Y2hlcyAoc3RyaW5nLW1h dGNoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZXh0LWNvbG9yaW5nLXRl c3QtbGV2ZWwtcmVnZXhwCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYWNlLXN0 cmluZykpKQorICAgICAgICAgICAgICAgICAgKHdoZW4gbWF0Y2hlcworICAgICAgICAgICAgICAg ICAgICAoc2V0cSBhY3R1YWwtbGV2ZWwgKHN0cmluZy10by1udW1iZXIKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAoc3Vic3RyaW5nIGZhY2Utc3RyaW5nCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWF0Y2gtYmVnaW5u aW5nIDEpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAobWF0Y2gtZW5kIDEpKSkpCisgICAgICAgICAgICAgICAgICAgICg9IGxldmVsIGFjdHVhbC1s ZXZlbCkpKSkpCisgICAgIChlcnQtZmFpbCAoZm9ybWF0IChjb25jYXQgIkV4cGVjdGVkIGxldmVs IGluIHJlZ2lvbiBbJXMsICVzKSwgIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJ3 aGljaCBpcyBcIiVzXCIsIHRvIGJlICVzOyAiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgImJ1dCBhdCBwb2ludCAlcywgaXQgd2FzICVzIikKKyAgICAgICAgICAgICAgICAgICAgICAg c3RhcnQgZW5kCisgICAgICAgICAgICAgICAgICAgICAgIChidWZmZXItc3Vic3RyaW5nLW5vLXBy b3BlcnRpZXMgc3RhcnQgZW5kKSBsZXZlbAorICAgICAgICAgICAgICAgICAgICAgICBwb2ludCBh Y3R1YWwtbGV2ZWwpKSkpKQorCisoZGVmdW4gY29udGV4dC1jb2xvcmluZy10ZXN0LWFzc2VydC1y ZWdpb24tZmFjZSAoc3RhcnQgZW5kIGV4cGVjdGVkLWZhY2UpCisgICJBc3NlcnQgdGhhdCBhbGwg cG9pbnRzIGluIHRoZSByYW5nZSBbU1RBUlQsIEVORCkgaGF2ZSB0aGUgZmFjZQorRVhQRUNURUQt RkFDRS4iCisgIChjb250ZXh0LWNvbG9yaW5nLXRlc3QtYXNzZXJ0LXJlZ2lvbgorICAgKHdoZW4g KG5vdCAoZXEgZmFjZSBleHBlY3RlZC1mYWNlKSkKKyAgICAgKGVydC1mYWlsIChmb3JtYXQgKGNv bmNhdCAiRXhwZWN0ZWQgZmFjZSBpbiByZWdpb24gWyVzLCAlcyksICIKKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAid2hpY2ggaXMgXCIlc1wiLCB0byBiZSAlczsgIgorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICJidXQgYXQgcG9pbnQgJXMsIGl0IHdhcyAlcyIpCisgICAg ICAgICAgICAgICAgICAgICAgIHN0YXJ0IGVuZAorICAgICAgICAgICAgICAgICAgICAgICAoYnVm ZmVyLXN1YnN0cmluZy1uby1wcm9wZXJ0aWVzIHN0YXJ0IGVuZCkgZXhwZWN0ZWQtZmFjZQorICAg ICAgICAgICAgICAgICAgICAgICBwb2ludCBmYWNlKSkpK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ZXJ0IHRoYXQgdGhl ICpNZXNzYWdlcyogYnVmZmVyIGhhcyBtZXNzYWdlIEVYUEVDVEVELiIKKyAgKHdpdGgtY3VycmVu dC1idWZmZXIgIipNZXNzYWdlcyoiCisgICAgKGxldCAoKG1lc3NhZ2VzIChzcGxpdC1zdHJpbmcK KyAgICAgICAgICAgICAgICAgICAgIChidWZmZXItc3Vic3RyaW5nLW5vLXByb3BlcnRpZXMKKyAg ICAgICAgICAgICAgICAgICAgICAocG9pbnQtbWluKQorICAgICAgICAgICAgICAgICAgICAgIChw b2ludC1tYXgpKQorICAgICAgICAgICAgICAgICAgICAgIlxuIikpKQorICAgICAgKGxldCAoKG1l c3NhZ2UgKGNhciAobnRoY2RyICgtIChsZW5ndGggbWVzc2FnZXMpIDIpIG1lc3NhZ2VzKSkpKQor ICAgICAgICAoc2hvdWxkIChlcXVhbCBtZXNzYWdlIGV4cGVjdGVkKSkpKSkpCisKKyhkZWZ1biBj b250ZXh0LWNvbG9yaW5nLXRlc3QtYXNzZXJ0LWZhY2UgKGxldmVsIGZvcmVncm91bmQpCisgICJB c3NlcnQgdGhhdCBhIGZhY2UgZm9yIExFVkVMIGV4aXN0cyBhbmQgdGhhdCBpdHMgYDpmb3JlZ3Jv dW5kJworaXMgRk9SRUdST1VORC4iCisgIChsZXQqICgoZmFjZSAoY29udGV4dC1jb2xvcmluZy1m YWNlLXN5bWJvbCBsZXZlbCkpCisgICAgICAgICBhY3R1YWwtZm9yZWdyb3VuZCkKKyAgICAod2hl biAobm90IGZhY2UpCisgICAgICAoZXJ0LWZhaWwgKGZvcm1hdCAoY29uY2F0ICJFeHBlY3RlZCBm YWNlIGZvciBsZXZlbCBgJXMnIHRvIGV4aXN0OyAiCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICJidXQgaXQgZGlkbid0IikKKyAgICAgICAgICAgICAgICAgICAgICAgIGxldmVsKSkp CisgICAgKHNldHEgYWN0dWFsLWZvcmVncm91bmQgKGZhY2UtYXR0cm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AgICB2YXIgYTsK KyAgICAoZnVuY3Rpb24gKCkgeworICAgICAgICByZXR1cm4geworICAgICAgICAgICAgYjogYQor ICAgICAgICB9OworICAgIH0oKSk7Cit9KCkpOwpkaWZmIC0tZ2l0IGEvcGFja2FnZXMvY29udGV4 dC1jb2xvcmluZy90ZXN0L2ZpeHR1cmVzL3Byb3BlcnR5LWxvb2t1cC5qcyBiL3BhY2thZ2VzL2Nv bnRleHQtY29sb3JpbmcvdGVzdC9maXh0dXJlcy9wcm9wZXJ0eS1sb29rdXAuanMKbmV3IGZpbGUg bW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uNGVkY2I0MQotLS0gL2Rldi9udWxsCisrKyBiL3Bh Y2thZ2VzL2NvbnRleHQtY29sb3JpbmcvdGVzdC9maXh0dXJlcy9wcm9wZXJ0eS1sb29rdXAuanMK QEAgLTAsMCArMSw1IEBACisoZnVuY3Rpb24gKCkgeworICAgIHdpbmRvdy5mb28oKTsKKyAgICB3 aW5kb3cuIGJhcigpOworICAgIHdpbmRvdy5mb28uYmFyKCk7Cit9KCkpOwotLSAKMS45LjEKCg== --047d7b472912d4afd6050e163250 Content-Type: text/x-patch; charset=US-ASCII; name="0002-context-coloring-Add-metadata-and-exceptions.patch" Content-Disposition: attachment; filename="0002-context-coloring-Add-metadata-and-exceptions.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i5nk0pmr1 RnJvbSAzZjg3MDQxODM5NTA2NjFlMmZkODFmNTMzYmYyMjZlYzAxNGI1ZGQ1IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBKYWNrc29uIFJheSBIYW1pbHRvbiA8amFja3NvbkBqYWNrc29u cmF5aGFtaWx0b24uY29tPgpEYXRlOiBTdW4sIDEgRmViIDIwMTUgMjM6MDc6MTUgLTA4MDAKU3Vi amVjdDogW1BBVENIIDIvMl0gY29udGV4dC1jb2xvcmluZzogQWRkIG1ldGFkYXRhIGFuZCBleGNl cHRpb25zCgotLS0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DcgQEAKICAoImNoZXNzIgkJOmV4dGVybmFsIG5pbCkgOzsgV2Fz IGh0dHBzOi8vZ2l0aHViLmNvbS9qd2llZ2xleS9lbWFjcy1jaGVzcy5naXQKICAoImNvZmZlZS1t b2RlIgkJOnN1YnRyZWUgImh0dHBzOi8vZ2l0aHViLmNvbS9kZWZ1bmt0L2NvZmZlZS1tb2RlIikK ICAoImNvbXBhbnkiCQk6c3VidHJlZSAiaHR0cHM6Ly9naXRodWIuY29tL2NvbXBhbnktbW9kZS9j b21wYW55LW1vZGUuZ2l0IikKKyAoImNvbnRleHQtY29sb3JpbmciCTpzdWJ0cmVlICJodHRwczov L2dpdGh1Yi5jb20vamFja3NvbnJheWhhbWlsdG9uL2NvbnRleHQtY29sb3JpbmcuZ2l0IikKICAo ImRhcmtyb29tIiAgICAgICAgICAgIDpzdWJ0cmVlICJodHRwczovL2dpdGh1Yi5jb20vY2FwaXRh b21vcnRlL2Rhcmtyb29tLmdpdCIpCiAgKCJkaWZmLWhsIgkJOnN1YnRyZWUgImh0dHBzOi8vZ2l0 aHViLmNvbS9kZ3V0b3YvZGlmZi1obC5naXQiKQogICgiZGlzbWFsIgkJOmV4dGVybmFsIG5pbCkK LS0gCjEuOS4xCgo= --047d7b472912d4afd6050e163250 Content-Type: text/x-patch; charset=US-ASCII; name="0001-hydra-test.el-Add-copyright-notice.patch" Content-Disposition: attachment; filename="0001-hydra-test.el-Add-copyright-notice.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i5nk0pn32 RnJvbSBhZTliNTRjOWRkN2I3NGY3YTJkNDc1MTMxZTJlYTY1MTQ0ZTQyMzM1IE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBKYWNrc29uIFJheSBIYW1pbHRvbiA8amFja3NvbkBqYWNrc29u cmF5aGFtaWx0b24uY29tPgpEYXRlOiBTdW4sIDEgRmViIDIwMTUgMjM6MDY6MTUgLTA4MDAKU3Vi amVjdDogW1BBVENIIDEvMl0gaHl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