Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥「T合集」@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuW3peWFt1wiLFwicGF0aFwiOlwidXRpbGl5XCIsXCJydWxlXCI6XCJqczpcXG5sZXQgaG9zdCA9IFxcXCJodHRwOi8vaGlrZXIubm9raWEucHJlc3NcXFwiO1xcbi8vbGV0IGhvc3QgPSBcXFwiaHR0cDovLzE5Mi4xNjguMy45NDo4MDc5XFxcIjtcXG5sZXQgaG9tZSA9IGJhc2U2NERlY29kZShcXFwiYUdsclpYSTZMeTlvYjIxbFxcXCIpO1xcbnZhciBhcGkgPSB7XFxuICAgIGhvc3Q6IGhvc3QrXFxcIi9oaWtlcnVsZVxcXCIsXFxuICAgIHVzZXJzVXJsOiBcXFwiL2Rldi91c2Vycz9vcmRlcj1cXFwiLCAvL+eUqOaIt+WIl+ihqFxcbiAgICBydWxlQ291bnRVcmw6IFxcXCIvZGV2L3J1bGVjb3VudFxcXCIsIC8v6I635Y+W6KeE5YiZ5pWw6YePXFxuICAgIHJ1bGVzVXJsOiBcXFwiL2Rldi9nZXRcXFwiLCAvL+eUqOaIt+WvueW6lOeahOinhOWImeWIl+ihqOS7heS7heiOt+WPluWFrOW8gFxcbiAgICBydWx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cygpKzE7XFxuICAgICAgICAgICAgaWYgKG1vbnRoID49IDEgJiYgbW9udGggPD0gOSkge1xcbiAgICAgICAgICAgICAgICBtb250aCA9IFxcXCIwXFxcIiArIG1vbnRoXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmIChzdHJEYXRlID49IDAgJiYgc3RyRGF0ZSA8PSA5KSB7XFxuICAgICAgICAgICAgICAgIHN0ckRhdGUgPSBcXFwiMFxcXCIgKyBzdHJEYXRlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmIChzdHJIb3VycyA+PSAwICYmIHN0ckhvdXJzIDw9IDkpIHtcXG4gICAgICAgICAgICAgICAgc3RySG91cnMgPSBcXFwiMFxcXCIgKyBzdHJIb3Vyc1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAoc3RyTWludXRlcyA+PSAwICYmIHN0ck1pbnV0ZXMgPD0gOSkge1xcbiAgICAgICAgICAgICAgICBzdHJNaW51dGVzID0gXFxcIjBcXFwiICsgc3RyTWludXRlc1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAoc3RyU2Vjb25kcyA+PSAwICYmIHN0clNlY29uZHMgPD0gOSkge1xcbiAgICAgICAgICAgICAgICBzdHJTZWNvbmRzID0gXFxcIjBcXFwiICsgc3RyU2Vjb25kc1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAvL2xldCBjdXJyZW50ZGF0ZSA9IGRhdGUuZ2V0RnVsbFllYXIoKSArIHNlcGVyYXRvcjEgKyBtb250aCArIHNlcGVyYXRvcjEgKyBzdHJEYXRlICsgXFxcIiBcXFwiICsgc3RySG91cnMgKyBzZXBlcmF0b3IyICsgc3RyTWludXRlcyArIHNlcGVyYXRvcjIgKyBzdHJTZWNvbmRzO1xcbiAgICAgICAgICAgIGxldCBjdXJyZW50ZGF0ZSA9IChkYXRlLmdldEZ1bGxZZWFyKCktMjAyMCkrJycrIG1vbnRoICsnJysgc3RyRGF0ZSArJ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Vob3VzZVVzZXJuYW1lJywgJycpLFxcbiAgICAgICAgICAgIHBhc3N3b3JkID0gZ2V0VmFyKCdXYXJlaG91c2VQYXNzd29yZCcsICcnKTtcXG4gICAgICAgIGlmKHVzZXJuYW1lID09PSBcXFwiXFxcIiAmJiBwYXNzd29yZCA9PT1cXFwiXFxcIil7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+i0puWPt+WSjOWvhueggeS4jeiDveS4uuepulxcXCJcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCBteVVybCA9IHVybCArICc/cXE9JyArIHVzZXJuYW1lICsgJyZwYXNzd29yZD0nICsgcGFzc3dvcmQ7XFxuICAgICAgICBsZXQgY29kZV9zdHIgPSByZXF1ZXN0KG15VXJsKTtcXG4gICAgICAgIGxldCBjb2RlID0gSlNPTi5wYXJzZShjb2RlX3N0cik7XFxuICAgICAgICBpZiAoY29kZS5zdGF0dXMgPT0gMCkge1xcbiAgICAgICAgICAgIGYudXNlcm5hbWU9dXNlcm5hbWU7XFxuICAgICAgICAgICAgZi5wYXNzd29yZD1wYXNzd29yZFxcbiAgICAgICAgICAgIHdyaXRlRmlsZSgnaGlrZXI6Ly9maWxlcy9XYXJlaG91c2VVU0VSLmpzb24nLCBKU09OLnN0cmluZ2lmeShmKSk7XFxuICAgICAgICAgICAgYmFjaygpO1xcbiAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/nmbvlvZXmiJDlip9cXFwiO1xcbiAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+i0puWPt+aIluWvhueggemUmeivr1xcXCI7XFxuICAgICAgICB9XFxuICAgIH0sIGdldEFwaShcXFwicnVsZXNBbGxVcmxcXFwiKSx1c2VyKSxcXG4gICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xcbn0pO1xcbnNldFJlc3VsdChkYXRhKTtcIn0se1wiY29sX3R5cGVcIjpcImljb25fMl9yb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XFxuICAgICAgICB9KSxcXG4gICAgICAgIGNvbF90eXBlOiBteV9jb2xfdHlwZVxcbiAgICB9LCB7XFxuICAgICAgICB0aXRsZTogXFxcIumaj+acuuWvhumSpVxcXCIsXFxuICAgICAgICBjb2xfdHlwZTogbXlfY29sX3R5cGUsXFxuICAgICAgICB1cmw6ICQoZ2V0QXBpKFxcXCJnZW5BdXRoXFxcIikgKyByZXFCeUdldCArIFxcXCIjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKCgpID0+IHtcXG4gICAgICAgICAgICBsZXQgYmFjayA9IHJlcXVlc3QoaW5wdXQpO1xcbiAgICAgICAgICAgIGxldCByZXQgPSBKU09OLnBhcnNlKGJhY2spO1xcbiAgICAgICAgICAgIGlmIChyZXQuc3RhdHVzID09IDApIHtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5bey55Sf5oiQ6ZqP5py65a+G56CBXFxcXG5cXFwiICsgcmV0LnJlc3VsdFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6ZqP5py65a+G56CB55Sf5oiQ5aSx6LSlXFxcIlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgIH0pO1xcbiAgICBsZXQgdGltZU92ZXIgPSB7XFxuICAgICAgICBjb2xfdHlwZTogbXlfY29sX3R5cGVcXG4gICAgfTtcXG4gICAgaWYgKGRhdGFJdGVtLnRpbWVfb3Zlcikge1xcbiAgICAgICAgdGltZU92ZXIudGl0bGUgPSBzbWFsbChjb2xvcihcXFwi55+t5pe25a+G6ZKlXFxcIiwgXFxcImdyZWVuXFxcIikgKyBjb2xvcihcXFwiKOKGkuawuOS5hSlcXFwiLCBcXFwicmVkXFxcIikpO1xcbiAg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onaGlrZXI6Ly9lbXB0eSdcXG4gICAgfSk7XFxuICAgIGZ1bmN0aW9uIHNldFVwbG9hZChmbGFnLGNhbl91cGxvYWRfYXBpKSB7XFxuICAgICAgICBmbGFnID0gZmxhZyB8fCAnJztcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgbGV0IGNvZGUgPSBmZXRjaChjYW5fdXBsb2FkX2FwaSwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxcIlVzZXItQWdlbnRcXFwiOiBNT0JJTEVfVUF9LFxcbiAgICAgICAgICAgICAgICBib2R5OiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwicGFyYW1zXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJ1c2VybmFtZVxcXCI6IGdldFZhcignaG91c2UudXNlcm5hbWUnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInBhc3N3b3JkXFxcIjogZ2V0VmFyKCdob3VzZS5wYXNzd29yZCcpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiY2FuX3VwbG9hZFxcXCI6ICEhZmxhZ1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGNvZGUgPSBKU09OLnBhcnNlKGNvZGUpLnJlc3VsdDtcXG4gICAgICAgICAgICBpZiAoY29kZS5zdGF0dXMgPT09IDApIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvZGUuZGV0YWlsXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICfmk43kvZzlpLHotKU6JyArIGNvZGUuZGV0YWlsXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIHJldHVybiAn5pON5L2c5aSx6LSlOicgKyBlLm1lc3NhZ2VcXG4gICAgICAgIH1cXG4gICAgfVxcbiAgICBkYXRhLnB1c2goe1xcbiAgICAgICAgdGl0bGU6J/CfmqvnpoHmraLkuIrkvKAnLFxcbiAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgdXJsOiQoJ+emgeatouivpeW8gOWPkeiAheS4iuS8oOinhOWImT/kvaDnmoTmk43kvZzlsIbooqvns7vnu5/orrDlvZUnKS5jb25maXJtKChpZCxjYW5fdXBsb2FkX2FwaSxzZXRVcGxvYWQpPT57XFxuICAgICAgICAgICAgbGV0IHJldCA9IHNldFVwbG9hZChmYWxzZSxjYW5fdXBsb2FkX2FwaSk7XFxuICAgICAgICAgICAgaWYoIS/mk43kvZzlpLHotKUvLnRlc3QocmV0KSl7XFxuICAgICAgICAgICAgICAgIHB1dFZhcignV2FyZWhvdXNlLmNhbl91cGxvYWQnLCflkKYnKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8vJytyZXRcXG4gICAgICAgIH0saWQsY2FuX3VwbG9hZF9hcGksc2V0VXBsb2FkKVxcbiAgICB9KTtcXG4gICAgZGF0YS5wdXNoKHtcXG4gICAgICAgIHRpdGxlOifinIXlhYHorrjkuIrkvKAnLFxcbiAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgdXJsOiQoJ+WFgeiuuOivpeW8gOWPkeiAheS4iuS8oOinhOWImT/kvaDnmoTmk43kvZzlsIbooqvns7vnu5/orrDlvZUnKS5jb25maXJtKChpZCxjYW5fdXBsb2FkX2FwaSxzZXRVcGxvYWQpPT57XFxuICAgICAgICAgICAgbGV0IHJldCA9IHNldFVwbG9hZCh0cnVlLGNhbl91cGxvYWRfYXBpKTtcXG4gICAgICAgICAgICBpZighL+aTjeS9nOWksei0pS8udGVzdChyZXQ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NEVuY29kZShzdWJfcnVsZV9jb2RlKTtcXG4gICAgICAgIGRhdGEucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICforqLpmIXop4TliJknLFxcbiAgICAgICAgICAgIHVybDogc3ViX3VybCxcXG4gICAgICAgICAgICBjb2xfdHlwZTogbXlfY29sX3R5cGVcXG4gICAgICAgIH0pXFxuICAgIH1cXG59XFxuaWYgKGRhdGFJdGVtLmlzX2pzb24gJiYgZGF0YUl0ZW0uZGF0YV90eXBlID09PSBcXFwiaG9tZV9ydWxlX3VybFxcXCIgJiYgIWRhdGFJdGVtLmlzX2pzb25fbGlzdCkge1xcbiAgICBkYXRhLnB1c2goe1xcbiAgICAgICAgdGl0bGU6ICfov5vlhaXpopHpgZMnLFxcbiAgICAgICAgdXJsOiAkKCAvKlxcXCIjbm9Mb2FkaW5nI1xcXCIqLyApLmxhenlSdWxlKChuYW1lLGhvbWUpID0+IHtcXG4gICAgICAgICAgICBsZXQgcnVsZUxpc3QgPSBKU09OLnBhcnNlKHJlcXVlc3QoaG9tZSkpO1xcbiAgICAgICAgICAgIGxldCBoYXNSdWxlID0gcnVsZUxpc3Quc29tZShpdGVtID0+IGl0ZW0udGl0bGUgPT09IG5hbWUpO1xcbiAgICAgICAgICAgIGlmIChoYXNSdWxlKSB7XFxuICAgICAgICAgICAgICAgIHB1dFZhcihcXFwiV2FyZWhvdXNlLmJhY2tcXFwiLCBcXFwiMVxcXCIpO1xcbiAgICAgICAgICAgICAgICBiYWNrKCk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBob21lK1xcXCJzQFxcXCIgKyBuYW1lO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/mnKrlronoo4VcXFwiO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIGRhdGFJdGVtLm5hbWUsYXBpLmhvbWUpLFxcbiAgICAgICAgY29sX3R5cGU6IG15X2NvbF90eXBlXFxuICAgIH0pXFxufVxcbmxldCBtYW5fcnVsZV9zYWZlID0gZ2V0QXBpKFxcXCJtYW5SdWxlU2FmZVxcXCIpK2RhdGFJdGVtLmlkO1xcbi8vIGRhdGFJdGVtLmlzX3NhZmU7XFxuaWYoZ2V0VmFyKCdob3VzZS5pc19tYW5hZ2VyJykpe1xcbiAgICBmdW5jdGlvbiBzZXRJc1NhZmUoZmxhZyxtYW5fcnVsZV9zYWZlKSB7XFxuICAgICAgICBmbGFnID0gZmxhZyB8fCAnJztcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgbGV0IGNvZGUgPSBmZXRjaChtYW5fcnVsZV9zYWZlLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFwiVXNlci1BZ2VudFxcXCI6IE1PQklMRV9VQX0sXFxuICAgICAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJwYXJhbXNcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInVzZXJuYW1lXFxcIjogZ2V0VmFyKCdob3VzZS51c2VybmFtZScpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwicGFzc3dvcmRcXFwiOiBnZXRWYXIoJ2hvdXNlLnBhc3N3b3JkJyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJpc19zYWZlXFxcIjogISFmbGFnXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgY29kZSA9IEpTT04ucGFyc2UoY29kZSkucmVzdWx0O1xcbiAgICAgICAgICAgIGlmIChjb2RlLnN0YXR1cyA9PT0gMCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gY29kZS5kZXRhaWxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ+aTjeS9nOWksei0pTonICsgY29kZS5kZXRhaWxcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgcmV0dXJuICfmk43kvZzlpLHotKU6JyArIGUubWVzc2FnZVxcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIGRhdGEucHVzaCh7XFxuICAgICAgICB0aXRsZTon8J+aq+agh+iusOmjjumZqScsXFxuICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICB1cmw6JCgn5qCH6K6w6K+l6KeE5YiZ5Li66aOO6ZmpP+mjjumZqeinhOWImeaXoOazleiiq+WvvOWFpScpLmNvbmZpcm0oKGlkLG1hbl9ydWxlX3NhZmUsc2V0SXNTYWZlKT0+e1xcbiAgICAgICAgICAgIGxldCByZXQgPSBzZXRJc1NhZmUoZmFsc2UsbWFuX3J1bGVfc2FmZSk7XFxuICAgICAgICAgICAgaWYoIS/mk43kvZzlpLHotKUvLnRlc3QocmV0KSl7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovLycrcmV0XFxuICAgICAgICB9LGRhdGFJdGVtLmlkLG1hbl9ydWxlX3NhZmUsc2V0SXNTYWZlKVxcbiAgICB9KTtcXG4gICAgZGF0YS5wdXNoKHtcXG4gICAgICAgIHRpdGxlOifinIXmoIforrDmraPluLgnLFxcbiAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgdXJsOiQoJ+agh+iusOivpeinhOWImeS4uuato+W4uD8nKS5jb25maXJtKChpZCxtYW5fcnVsZV9zYWZlLHNldElzU2FmZSk9PntcXG4gICAgICAgICAgICBsZXQgcmV0ID0gc2V0SXNTYWZlKHRydWUsbWFuX3J1bGVfc2FmZSk7XFxuICAgICAgICAgICAgaWYoIS/mk43kvZzlpLHotKUvLnRl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vYXN0Oi8v6LSm5Y+3LOWvhueggeWSjOaYteensOS4jeiDveS4uuepulxcXCI7XFxuICAgICAgICB9XFxuICAgICAgICBzaG93TG9hZGluZyhcXFwi5q2j5Zyo5o+Q5Lqk55Sz6K+36KGoXFxcIik7XFxuICAgICAgICBsZXQgcmVzdWx0ID0gcmVxdWVzdChpbnB1dCwge1xcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgJ2NvbnRlbnQtdHlwZSc6ICdhcHBsaWNhdGlvbi9qc29uJ1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICBcXFwicGFyYW1zXFxcIjoge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcInJlYXNvblxcXCI6IGRlc2NyaXB0aW9uLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIm5hbWVcXFwiOiBuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInBhc3N3b3JkXFxcIjogcGFzc3dvcmQsXFxuICAgICAgICAgICAgICAgICAgICBcXFwicXFcXFwiOiB1c2VybmFtZVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgbWV0aG9kOiAncG9zdCdcXG4gICAgICAgIH0pO1xcbiAgICAgICAgcmVzdWx0ID0gSlNPTi5wYXJzZShyZXN1bHQpLnJlc3VsdDtcXG4gICAgICAgIGhpZGVMb2FkaW5nKCk7XFxuICAgICAgICBpZiAocmVzdWx0LnN0YXR1cyAhPT0gMCkge1xcbiAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly9cXFwiICsgcmVzdWx0LmRldGFpbDtcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCBpZHJlc3VsdCA9IEpTT04ucGFyc2UocmVxdWVzdChnZXRJZCArIFxcXCI/cXE9XFxcIiArIHVzZXJuYW1lKSk7XFxuICAgICAgICBpZiAoaWRyZXN1bHQuc3RhdHVzICE9PSAwKSB7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL1xcXCIgKyBpZHJlc3VsdC5kZXRhaWw7XFxuICAgICAgICB9XFxuICAgICAgICBcXG4gICAgICAgIHJldHVybiAkKFxcXCJcXFwiLCBcXFwi6L6T5YWl6YKu566x6aqM6K+B56CBXFxcXG5cXFwiICsgcmVzdWx0LmRldGFpbCkuaW5wdXQoKGNvbmZpcm0sIGlkLCBhY2NvdW50KSA9PiB7XFxuICAgICAgICAgICAgc2hvd0xvYWRpbmcoXFxcIuivt+iAkOW/g+etieW+hVxcXCIpO1xcbiAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgIGxldCByZXN1bHQgPSByZXF1ZXN0KGNvbmZpcm0sIHtcXG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAnY29udGVudC10eXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nXFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJwYXJhbXNcXFwiOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJyZWdpc3RfaWRcXFwiOiBpZCxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInl6bVxcXCI6IGlucHV0XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJ1xcbiAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgcmVzdWx0ID0gSlNPTi5wYXJzZShyZXN1bHQpLnJlc3VsdDtcXG4gICAgICAgICAgICAgICAgaWYgKHJlc3VsdC5zdGF0dXMgIT09IDApIHtcXG4gICAgICAgICAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vXFxcIiArIHJlc3VsdC5kZXRhaWw7XFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoXFxcIldhcmVob3VzZVVzZXJuYW1lXFxcIiwgYWNjb3VudFswXSk7XFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoXFxcIldhcmVob3VzZVBhc3N3b3JkXFxcIiwgYWNjb3VudFsxXSk7XFxuICAgICAgICAgICAgICAgICAgICBoaWRlTG9hZGluZygpO1xcbiAgICAgICAgICAgICAgICAgICAgYmFjaygpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+aIkOWKn+aPkOS6pOazqOWGjOazqOWGjFxcXFxuXFxcIityZXN1bHQuZGV0YWlsO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICBoaWRlTG9hZGluZygpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5Ye66ZSZ5LqG5ZGQXFxcIjtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCBjb25maXJtLCBpZHJlc3VsdC5yZXN1bHQsIFt1c2VybmFtZSwgcGFzc3dvcmRdKTtcXG4gICAgfSwgZ2V0QXBpKFxcXCJuZXdfZ2V0SWRcXFwiKSwgZ2V0QXBpKFxcXCJuZXdfY29uZmlybVxcXCIpKSxcXG4gICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xcbn0pO1xcbnNldFJlc3VsdChkYXRhKTtcIn0se1wiY29sX3R5cGVcIjpcInRleHRfMVwiLFwibmFtZVwiOlwi5Liq5Lq66LWE5paZXCIsXCJwYXRoXCI6XCJQZXJzb25hbERhdGFcIixcInJ1bGVcIjpcImpzOlxcbnNld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iKSArIHBhdGgpLmxhenlSdWxlKCgpID0+IHtcXG4gICAgICAgICAgICBsZXQgbmV3UGV0TmFtZSA9IGdldFZhcignV2FyZWhvdXNlLm0ucGV0TmFtZScsICcnKTtcXG4gICAgICAgICAgICBpZiAobmV3UGV0TmFtZSA9PSBcXFwiXFxcIikge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5L2g6L+Y5LuA5LmI6YO95rKh5aGr5ZWKIVxcXCI7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxldCByZXN1bHQgPSByZXF1ZXN0KGlucHV0ICsgXFxcIiZuYW1lPVxcXCIgKyBlbmNvZGVVUklDb21wb25lbnQobmV3UGV0TmFtZSkpO1xcbiAgICAgICAgICAgIHJlc3VsdCA9IEpTT04ucGFyc2UocmVzdWx0KTtcXG4gICAgICAgICAgICBpZiAocmVzdWx0LnN0YXR1cyA9PT0gMCkge1xcbiAgICAgICAgICAgICAgICBiYWNrKCk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/kv67mlLnmiJDlip9cXFwiO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly9cXFwiICsgcmVzdWx0LmRldGFpbDtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9KSxcXG4gICAgICAgIGNvbF90eXBlOiAndGV4dF9jZW50ZXJfMSdcXG4gICAgfSk7XFxufVxcblxcbmZ1bmN0aW9uIG1fYXZhdGFyKCkge1xcbiAgICBkYXRhLnB1c2goe1xcbiAgICAgICAgY29sX3R5cGU6IFxcXCJsaW5lX2JsYW5rXFxcIlxcbiAgICB9KTtcXG4gICAgZGF0YS5wdXNoKHtcXG4gICAgICAgIGNvbF90eXBlOiAnaW5wdXQnLFxcbiAgICAgICAgZGVzYzogXFxcIuivt+i+k+WFpeaWsOeahOWktOWDj+mTvuaOpVxcXCIsXFxuICAgICAgICBleH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S5tLlBhc3N3b3JkLmMnLCAnJyk7XFxuICAgICAgICAgICAgaWYgKG9sZF9wYXNzd29yZCE9PXBhc3N3b3JkKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/ljp/lr4bnoIHplJnor69cXFwiO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZihuZXdfcGFzc3dvcmQ9PT1cXFwiXFxcIil7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/or7fovpPlhaXmlrDlr4bnoIFcXFwiO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZihuZXdfcGFzc3dvcmQhPT1uZXdfcGFzc3dvcmRfYWdhaW4pe1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5Lik5qyh5a+G56CB5LiN5ZCMXFxcIlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBsZXQgcmVzdWx0ID0gcmVxdWVzdChpbnB1dCArIFxcXCImbmV3X3Bhc3N3b3JkPVxcXCIgKyBuZXdfcGFzc3dvcmQrXFxcIiZuZXdfcGFzc3dvcmRfcmU9XFxcIituZXdfcGFzc3dvcmRfYWdhaW4pO1xcbiAgICAgICAgICAgIHJlc3VsdCA9IEpTT04ucGFyc2UocmVzdWx0KTtcXG4gICAgICAgICAgICBpZiAocmVzdWx0LnN0YXR1cyA9PT0gMCkge1xcbiAgICAgICAgICAgICAgICB3cml0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvV2FyZWhvdXNlVVNFUi5qc29uXFxcIixKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICB1c2VybmFtZTp1c2VybmFtZSxcXG4gICAgICAgICAgICAgICAgICAgIHBhc3N3b3JkOm5ld19wYXNzd29yZFxcbiAgICAgICAgICAgICAgICB9KSk7XFxuICAgICAgICAgICAgICAgIGJhY2soKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcX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gaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAnY29udGVudC10eXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nXFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgIFxcXCJwYXJhbXNcXFwiOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwicXFcXFwiOiB1c2VybmFtZSxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJwYXNzd29yZFxcXCI6IHBhc3N3b3JkLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIm5vdGVcXFwiOm5vdGVzXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICBtZXRob2Q6ICdQT1NUJ1xcbiAgICAgICAgfSk7XFxuICAgICAgICByZXN1bHQgPSBKU09OLnBhcnNlKHJlc3VsdCkucmVzdWx0O1xcbiAgICAgICAgaWYgKHJlc3VsdC5zdGF0dXMgIT09IDApIHtcXG4gICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vXFxcIiArIHJlc3VsdC5kZXRhaWw7XFxuICAgICAgICB9XFxuICAgICAgICBiYWNrKGZhbHNlKTtcXG4gICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/kv67mlLnmiJDlip9cXFwiO1xcbiAgICB9LCB1c2VybmFtZSwgcGFzc3dvcmQpXFxufSk7XFxuc2V0UmVzdWx0KGRhdGEpO1wifSx7XCJjb2xfdHlwZVwiOlwibGluZVwiLFwibmFtZVwiOlwi6K+E6K665YiX6KGoXCIsXCJwYXRoXCI6XCJDb21tZW50XCIsXCJydWxlXCI6XCJqczpcXG5zZXRQYWdlVGl0bGUoXFxcIuivhOiuuuWIl+ihqFxcXCIpO1xcbmNvbnN0IHtcXG4gICAgYXBpXFxufSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3V0aWxpeVxcXCIpO1xcbmxldCBkYXRhID0g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ZCxcXG4gICAgICAgICAgICAgICAgbmFtZTogaXRlbS5uYW1lLFxcbiAgICAgICAgICAgICAgICBwYXNzd29yZDogcGFzc3dvcmQsXFxuICAgICAgICAgICAgICAgIHVzZXJuYW1lOiB1c2VybmFtZSxcXG4gICAgICAgICAgICAgICAgcmVwbHlJZDppdGVtLmlkXFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBwaWNfdXJsOiBpdGVtLmF2YXRhcl91cmxcXG4gICAgICAgIH0pO1xcbiAgICAgICAgZGF0YS5wdXNoKHtcXG4gICAgICAgICAgICB0aXRsZTogaXRlbS5kaXNjdXNzX3RleHQsXFxuICAgICAgICAgICAgZGVzYzogUmVwbHkraXRlbS5jcmVhdGVfZGF0ZSArIFxcXCLCt1xcXCIgKyBpY29uW2l0ZW0uZGlzY3Vzc190eXBlXSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogXFxcInRleHRfMVxcXCIsXFxuICAgICAgICAgICAgdXJsOiBcXFwiaGlrZXI6Ly9wYWdlL2luZm9cXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOntcXG4gICAgICAgICAgICAgICAgbmFtZTppdGVtLm5hbWUsXFxuICAgICAgICAgICAgICAgIHR5cGU6XFxcImxvbmdfdGV4dFxcXCIsXFxuICAgICAgICAgICAgICAgIHRleHQ6aXRlbS5kaXNjdXNzX3RleHRcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIHBpY191cmw6IGl0ZW0uYXZhdGFyX3VybFxcbiAgICAgICAgfSk7XFxuICAgICAgICBjb250cm9sKGl0ZW0uaWQsaXRlbS5hY3RpdmUpO1xcbiAgICB9XFxuICAgIGlmIChjb21tZW50TGlzdC5sZW5ndGggPT09IDApIHtcXG4gICAgICAgIGRhdGEucHVzaCh7XFxuICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJsaW5lX2JsYW5rXFxcIlxcbiAgICAgICAgfSk7XFxuICAgIH1cXG59XFxuXFxuc2V0UmVzdWx0KGRhdGEpXCJ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q+WViiFcXFwiO1xcbiAgICAgICAgfVxcbiAgICAgICAgc2hvd0xvYWRpbmcoXFxcIuiOt+WPluS4rS4uLlxcXCIpXFxuICAgICAgICByZXR1cm4gJChcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgocXEsIGEsIGIpID0+IHtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgbGV0IHJlc3VsdCA9IHJlcXVlc3QoYSwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAnY29udGVudC10eXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJwYXJhbXNcXFwiOiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcInFxXFxcIjogcXFcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgcmVzdWx0ID0gSlNPTi5wYXJzZShyZXN1bHQpLnJlc3VsdDtcXG4gICAgICAgICAgICBpZiAocmVzdWx0LnN0YXR1cyA9PT0gMCkge1xcbiAgICAgICAgICAgICAgICBoaWRlTG9hZGluZygpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vXFxcIiArIHJlc3VsdC5kZXRhaWw7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgbGV0IHJlc3VsdDIgPSBKU09OLnBhcnNlKHJlcXVlc3QoYiArIFxcXCI/cXE9XFxcIiArIHFxKSk7XFxuICAgICAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly9cXFw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aqM6K+B56CB5pyJ5pWI5pyf5oyB57ut5LiA5ZGo5bem5Y+zPC9zPijmmoLml7bkuI3kvJrvvIzlv5jorrDpqozor4HnoIHlj6/pgJrov4dRUeWPt+iOt+WPlik8L3NtYWxsPlxcXCJcXG59KTtcXG5cXG5sZXQgdXNlckxpc3QgPSBnZXRVc2VyRGF0ZSgpO1xcbmRhdGEucHVzaCh7XFxuICAgIHRpdGxlOiBcXFwi6aqM6K+BL+eZu+W9lVxcXCIsXFxuICAgIHVybDogJChcXFwi56Gu5a6a5L+d5a2Y77yM6aqM6K+B56CB5aGr6ZSZ77yM5peg5rOV6K+E6K665ZOmXFxcIikuY29uZmlybSgoZiwgbCwgbG9naW4pID0+IHtcXG4gICAgICAgIGxldCBxcSA9IGdldFZhcignV2FyZWhvdXNlLm0ucXEnLCAnJyk7XFxuICAgICAgICBsZXQgeXptID0gZ2V0VmFyKCdXYXJlaG91c2UubS55em0nLCAnJyk7XFxuICAgICAgICBpZiAocXEgPT0gXFxcIlxcXCIgfHwgeXptID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL3Fx5oiW6aqM6K+B56CB5Li656m6XFxcIjtcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCByZXN1bHQgPSByZXF1ZXN0KGxvZ2luLCB7XFxuICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAnY29udGVudC10eXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nXFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgIFxcXCJwYXJhbXNcXFwiOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwicXFcXFwiOiBxcSxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJhdXRoX2NvZGVcXFwiOiB5em1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnXFxuICAgICAgICB9KTtcXG4gICAgICAgIHJlc3VsdCA9IEpTT04ucGFyc2UocmVzdWx0KS5yZXN1bHQ7XFxuICAgICAgICBpZiAocmVzdWx0LnN0YXR1cyA9PT0gMCkge1xcbiAgICAgICAgICAgIGYudXNlciA9IFtxcSwgeXptXTtcXG4gICAgICAgICAgICB3cml0ZUZpbGUoXFxcImhpa2VyOi8vZmlsZXMvV2FyZWhvdXNlVVNFUi5qc29uXFxcIiwgSlNPTi5zdHJpbmdpZnkoZikpO1xcbiAgICAgICAgICAgIGxldCBpbmRleCA9IGwuZmluZEluZGV4KGl0ZW0gPT4gaXRlbVswXSA9PT0gcXEpO1xcbiAgICAgICAgICAgIGlmIChpbmRleCA+IC0xKSB7XFxuICAgICAgICAgICAgICAgIGwuc3BsaWNlKGluZGV4LCAxLCBbcXEsIHl6bV0pO1xcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobC5sZW5ndGggPCA2KSB7XFxuICAgICAgICAgICAgICAgIGwucHVzaChbcXEsIHl6bV0pO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIGwuc3BsaWNlKDAsIDEpO1xcbiAgICAgICAgICAgICAgICBsLnB1c2goW3FxLCB5em1dKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgd3JpdGVGaWxlKFxcXCJoaWtlcjovL2ZpbGVzL1dhcmVob3VzZVVTRVJBLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShsKSk7XFxuICAgICAgICAgICAgYmFjaygpO1xcbiAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/pqozor4HmiJDlip9cXFwiO1xcbiAgICAgICAgfVxcbiAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL1xcXCIgKyByZXN1bHQuZGV0YWlsO1xcbiAgICB9LCB1c2VyLCB1c2VyTGlzdCwgYXBpLmRpc19sb2dpbiksXFxuICAgIGNvbF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sOiAkKGFwaS5kaXNfcmVwbHkgKyBydWxlSWQpLmxhenlSdWxlKChwYXNzd29yZCwgdXNlcm5hbWUsIHJ1bGVJZCkgPT4ge1xcbiAgICAgICAgbGV0IHRleHQgPSBnZXRWYXIoJ1dhcmVob3VzZS5jb21tZW50LnRleHQnLCAnJyk7XFxuICAgICAgICBpZiAocGFzc3dvcmQgPT0gXFxcIlxcXCIgfHwgdXNlcm5hbWUgPT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5pyq55m75b2V6LSm5Y+3XFxcIjtcXG4gICAgICAgIH1cXG4gICAgICAgIGlmICh0ZXh0ID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+S9oOi/mOS7gOS5iOmDveayoeWGmeWVilxcXCI7XFxuICAgICAgICB9XFxuICAgICAgICBsZXQgcmVzdWx0ID0gcmVxdWVzdChpbnB1dCwge1xcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgJ2NvbnRlbnQtdHlwZSc6ICdhcHBsaWNhdGlvbi9qc29uJ1xcbiAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICBcXFwicGFyYW1zXFxcIjoge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcImRpc2N1c3NfdGV4dFxcXCI6IHRleHQsXFxuICAgICAgICAgICAgICAgICAgICBcXFwicXFcXFwiOiB1c2VybmFtZSxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJwYXNzd29yZFxcXCI6IHBhc3N3b3JkLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImRpc2N1c3NfaWRcXFwiOiBydWxlSWRcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnXFxuICAgICAgICB9KTt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hZGVycyx3aXRoSGVhZGVyczpmYWxzZSxyZWRpcmVjdDpmYWxzZX07XFxuICAgICAgICAgICAgaWYod2ViX3VybF9hcnIubGVuZ3RoPj0yJiZ3ZWJfdXJsX2FyclsxXS5sZW5ndGg+Mil7IC8vIOiuvue9ruivt+axguaWueazlVxcbiAgICAgICAgICAgICAgICBwYXJhbXNbJ21ldGhvZCddID0gd2ViX3VybF9hcnJbMV0udG9VcHBlckNhc2UoKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbG9nKCflvIDlp4vojrflj5bmupDnoIEnKTtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAvKlxcbiAgICAgICAgICAgICAgICByZXF1ZXN0QXN5bmMod2ViX3VybCxwYXJhbXMsZnVuY3Rpb24gKGtleSxjb2RlKSB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgYmFja19jb2RlID0gY29kZTtcXG4gICAgICAgICAgICAgICAgICAgIGlmKGJhY2tfY29kZS5sZW5ndGg+MjApe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcignaG91c2UudXBsb2FkX2NvZGUnLGJhY2tfY29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+a6kOeggeW3suiOt+WPlizlubbpg6jliIbmj5LlhaXliLDmlofmnKzljLrln58nXFxuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6ZSZ6K+v77yM5pys5qyh6I635Y+W5Yiw56m65paH5pys77yM55aR5Ly85L2g5rKh5pyJ5q2k5paH5Lu2ISc7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAqL1xcbiAgICAgICAgICAgICAgICBsZXQgYmFja19jb2RlID0gZ2V0SXRlbSgnaG91c2UuZmlsZV91YScpPT09J+eUteiEkSc/ZmV0Y2god2ViX3VybCxwYXJhbXMpOnJlcXVlc3Qod2ViX3VybCxwYXJhbXMpO1xcbiAgICAgICAgICAgICAgICBpZihiYWNrX2NvZGUubGVuZ3RoPjIwKXtcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcignaG91c2UudXBsb2FkX2NvZGUnLGJhY2tfY29kZSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mupDnoIHlt7Lojrflj5Ys5bm26YOo5YiG5o+S5YWl5Yiw5paH5pys5Yy65Z+fJ1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/plJnor6/vvIzmnKzmrKHojrflj5bliLDnqbrmlofmnKzvvIznlpHkvLzkvaDmsqHmnInmraTmlofku7YhJztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1jYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICBsb2coZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WPkeeUn+S6humUmeivrzpcXFxcbicrZS5tZXNzYWdlO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1lbHNlIGlmKC/kuLvpopjvv6V85YWD57Sg77+lLy50ZXN0KGlucHV0KSl7XFxuICAgICAgICAgICAgbG9nKCfkuLvpopjpk77mjqUnKTtcXG4gICAgICAgICAgICBsZXQgd2ViX3VybF9hcnIgPSBpbnB1dC5zcGxpdCgn77+lJyk7XFxuICAgICAgICAgICAgbGV0IHdlYl91cmwgPSB3ZWJfdXJsX2Fyclt3ZWJfdXJsX2Fyci5sZW5ndGgtMV07XFxuICAgICAgICAgICAgbGV0IGJhY2tfY29kZSA9IHBhcnNlUGFzdGU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uKGl0ZW0pIHtcXG4gICAgICAgIHJldHVybiBpdGVtLm5hbWUgPT09IG5hbWU7XFxuICAgIH1cXG59XFxuZC5wdXNoKHtcXG4gICAgdGl0bGU6J/Cfl4TvuI/njq/looMnLFxcbiAgICBjb2xfdHlwZTonZmxleF9idXR0b24nLFxcbiAgICB1cmw6JCgpLmxhenlSdWxlKChmaWxlX3R5cGUsY29tcGFyZSk9PntcXG4gICAgICAgIGxvZygn5p+l55yL546v5aKD5Y+Y6YePJyk7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIGxldCB1cF9jb2RlID0gZ2V0VmFyKCdob3VzZS51cGxvYWRfY29kZScsJycpO1xcbiAgICAgICAgICAgIGxldCBmdHlwZSA9ICBmaWxlX3R5cGUuZmlsdGVyKGNvbXBhcmUoZ2V0SXRlbSgnaG91c2UuZmlsZV90eXBlJywn6Z2Z5oCB5paH5Lu2JykpKVswXS52YWx1ZTtcXG4gICAgICAgICAgICBsZXQgcmVkaXJlY3QgPSBnZXRJdGVtKCdob3VzZS5maWxlX3JlZGlyZWN0Jywn5pys5ZywJykhPT0n5pys5ZywJztcXG4gICAgICAgICAgICBsZXQgY29kZSA9ICFyZWRpcmVjdD91cF9jb2RlOmlucHV0O1xcbiAgICAgICAgICAgIGxldCBlbnYgPSB7XFxuICAgICAgICAgICAgICAgIHdlYl91cmw6Z2V0VmFyKCdob3VzZS53ZWJfdXJsJywnJyksXFxuICAgICAgICAgICAgICAgIGRldmljZTpnZXRJdGVtKCdob3VzZS5maWxlX3VhJywn55S16ISRJyksXFxuICAgICAgICAgICAgICAgIGZ0eXBlOmZ0eXBlfHxcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgcmVkaXJlY3Q6cmVkaXJlY3QsXFxuICAgICAgICAgICAgICAgIGNvZGU6Y29kZS5zdWJzdHJpbmcoMCw0MCl8fFxcXCJcXFwiLFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBsb2coZW52KTtcXG4gICAgICAgICAgIC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zlhYPntKDvv6UvLnRlc3QoaW5wdXQpKXtcXG4gICAgICAgICAgICBsZXQgYmthcnIgPSB1cF9jb2RlLnNwbGl0KCfvv6UnKTtcXG4gICAgICAgICAgICBpZihia2Fyci5sZW5ndGg8Myl7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kupHliarotLTmnb/lhoXlrrnmnInor68nXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHN3aXRjaCAoYmthcnJbMV0pIHtcXG4gICAgICAgICAgICAgICAgY2FzZSAnbXlfaG9tZV90aGVtZSc6XFxuICAgICAgICAgICAgICAgICAgICBmaWxlTmFtZSA9IHVwX2NvZGUuc3BsaXQoJ+OAjCcpWzFdLnNwbGl0KCfjgI0nKVswXTtcXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICBjYXNlICdteV9ob21lX3NpbmdsZSc6XFxuICAgICAgICAgICAgICAgICAgICBmaWxlTmFtZSA9IHVwX2NvZGUuc3BsaXQoJ+OAjCcpWzFdLnNwbGl0KCfjgI0nKVswXTtcXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICBjYXNlICdqc191cmwnOlxcbiAgICAgICAgICAgICAgICAgICAgZmlsZU5hbWUgPSB1cF9jb2RlLnNwbGl0KCfvv6UnKVsyXS5zcGxpdCgnQCcpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mUmeivr++8jOe9kemhtemTvuaOpeaXoOWGheWuuSEnO1xcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IHVhID0gZ2V0SXRlbSgnaG91c2UuZmlsZV91YScpPT09J+eUteiEkSc/J01vemlsbGEvNS4wIChXaW5kb3dzIE5UIDEwLjA7IFdpbjY0OyB4NjQpIEFwcGxlV2ViS2l0LzUz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pZ3VhLmNvbS8mJlVzZXItQWdlbnRATW96aWxsYS81LjB9XFxcIjtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgZWxzZSBpZigvbWd0dlxcXFwuY29tLy50ZXN0KHBsYXlVcmwpKXtcXG4gICAgICAgICAgICAgICAgcGxheVVybCs9XFxcIjt7VXNlci1BZ2VudEBNb3ppbGxhLzUuMH1cXFwiO1xcbiAgICAgICAgICAgIH1lbHNlIGlmKC9wdHdvXFxcXC53a2ZpbGVcXFxcLmNvbS8udGVzdChwbGF5VXJsKSYmL3VybD0vLnRlc3QocGxheVVybCkpe1xcbiAgICAgICAgICAgICAgICBwbGF5VXJsPXBsYXlVcmwuc3BsaXQoXFxcInVybD1cXFwiKVsxXStcXFwiO3tSZWZlcmVyQGh0dHBzOi8vZmFudHVhbi50dn1cXFwiXFxuICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgIHBsYXlVcmw9cmVjaGFuZ2UocGxheVVybCk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIC8vIOWkhOeQhuWkp+W4iOWFhOS5i+exu+eahGFwcFxcbiAgICAgICAgICAgIC8vIGVsc2V7XFxuICAgICAgICAgICAgLy8gICAgIHBsYXlVcmwrPVxcXCI7e1VzZXItQWdlbnRATW96aWxsYS81LjB9XFxcIjtcXG4gICAgICAgICAgICAvLyB9XFxuICAgICAgICB9XFxuICAgICAgICByZXR1cm4gcGxheVVybCtcXFwiI2lzVmlkZW89dHJ1ZSNcXFwiO1xcbiAgICB9ZWxzZXtcXG4gICAgICAgIHJldHVybiBmYWxzZTtcXG4gICAgfVxcbn1cXG5mdW5jdGlvbiBjb21QYXJzZShwYXJTdHIsZWosb25seWJhY2ssaHRtbCl7XFxuICAgIC8v5YiX6KGo77yM5qCH6aKY77yM5Zu+54mH77yM5o+P6L+w77yM6ZO+5o6l77yM5YaF5a65XFxuICAgIGVqID0gZWp8fGZhbHNlOy8v5pyJ5LqM57qnXFxuICAgIG9ubHliYWNrPW9ubHliYWNrfHxmYWxzZTsvL+WPqui/lOWbnuaVsOaNrlxcbiAgICBodG1sID0gaHRtbHx8Z2V0UmVzQ29kZSgpO1xcbiAgICBodG1sID0gdHlwZW9mKGh0bWwpPT09J3N0cmluZyc/aHRtbDpodG1sLmh0bWw7XFxuICAgIHJldHVybiAkLnRvU3RyaW5nKChwYXJTdHIsZWosb25seWJhY2ssaHRtbCxpc1BpYyk9PntcXG4gICAgICAgIGxldCB0PXBhclN0ci5zcGxpdChcXFwiO1xcXCIpO1xcbiAgICAgICAgbGV0IGQ9W107XFxuICAgICAgICAvLyBsZXQgbGlzdD1wZGZhKGdldFJlc0NvZGUoKSx0WzBdKTtcXG4gICAgICAgIGxldCBsaXN0PXBkZmEoaHRtbCx0WzBdKTtcXG4gICAgICAgIGxldCBsYXp5ID0gJCgnJykubGF6eVJ1bGUoKCk9PntcXG4gICAgICAgICAgICBjb25zdCB7bGF6eVBhcnNlfSA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL2dsb2JhbFBhcnNlP3J1bGU96YGT6ZW/5LuT5bqTUHJvJyk7XFxuICAgICAgICAgICAgcmV0dXJuIGxhenlQYXJzZShpbnB1dClcXG4gICAgICAgIH0pO1xcbiAgICAgICAgZm9yKGxldCBpIGluIGxpc3Qpe1xcbiAgICAgICAgICAgIGxldCBfcGljID0gdFsyXT9wZChsaXN0W2ldLHRbMl0pOicnO1xcbiAgICAgICAgICAgIGlmKGlzUGljKF9waWMpJiYhL0BSZWZlcmVyPS8udGVzdChfcGljKSl7XFxuICAgICAgICAgICAgICAgIF9waWMrPSdAUmVmZXJlcj0nXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxldCBpdD17XFxuICAgICAgICAgICAgICAgIHRpdGxlOnBkZmgobGlzdFtpXSx0WzFdKSxcXG4gICAgICAgICAgICAgICAgcGljX3VybDpfcGljLFxcbiAgICAgICAgICAgICAgICBkZXNjOnBkZmgobGlzdFtpXSx0WzNdKSxcX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gICAgcmV0dXJuIEpTT04ucGFyc2UocmVxdWVzdChydXJsLHt0aW1lb3V0OnRtfSkpLnVybFxcbiAgICAgICAgfWNhdGNoKGUpe1xcbiAgICAgICAgICAgIHJldHVybiByZWFsVXJsXFxuICAgICAgICB9XFxuICAgICAgICAvL3JldHVybiByZWFsVXJsXFxuICAgIH1cXG5cXG4gICAgLy9sb2coXFxcIuiuv+mXrui2heaXtjpcXFwiK3RtKTtcXG4gICAgbG9nKFxcXCLlsJ3or5XpgZPplb/ku5PlupN4NeWFjeWXhTpcXFwiK3BsYXlVcmwpO1xcbiAgICBjbGVhclZhcihcXFwiX3g1anhVcmxcXFwiKTtcXG4gICAgbGV0IGJhZD0kKFxcXCLnvZHnu5zkuI3kvbPmiJbogIXnlpHkvLzlr7nmlrnnvZHnq5nmjILkuobvvIzkvaDopoHmn6XnnIvlhbbnvZHpobXlkJfvvJ9cXFwiKS5jb25maXJtKChwbGF5VXJsKT0+e1xcbiAgICAgICAgbG9nKFxcXCLnvZHnq5nnnIvotbfmnaXmjILkuoY6XFxcIitwbGF5VXJsKTtcXG4gICAgICAgIHJldHVybiBwbGF5VXJsXFxuICAgIH0scGxheVVybCk7XFxuICAgIHRyeXtcXG4gICAgICAgIC8vIHZhciBiYWNrPXJlcXVlc3QocGxheVVybCx7aGVhZGVyczogZ2V0SGVhZGVycyhwbGF5VXJsKSx0aW1lb3V0OnRtfSk7XFxuICAgICAgICB2YXIgYmFjaz1mZXRjaChwbGF5VXJsLFxcbiAgICAgICAgICAgIHtoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAnVXNlci1BZ2VudCc6IFBDX1VBXFxuICAgICAgICAgICAgICAgIH19KTtcXG4gICAgICAgIGlmKCFiYWNrKXtcXG4gICAgICAgICAgICBsb2coXFxcIue9keermVxcXCIrcGxheVVybCtcXFwi56Gu5a6e5ZWl5Lmf5rKh6L+U5ZueXFxcIik7XFxuICAgICAgICAgICAgcmV0dXJuIGJhZFxcbiAgICAgICA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vZihmYmEpPT0ndW5kZWZpbmVkJ3x8IWZiYSl7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgZmJhID0gZnlfYnJpZGdlX2FwcDtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgaWYodHlwZW9mKHJlcXVlc3QpPT0ndW5kZWZpbmVkJ3x8IXJlcXVlc3Qpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoZmJhLmdldEludGVybmFsSnMoKSk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1jYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgZmJhLmxvZyhlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGZiYS5wdXRWYXIoXFxcIl94NWp4VXJsXFxcIixwbGF5VXJsKTtcXG4gICAgICAgICAgICAgICAgaWYod2luZG93LmNvdW50ID09IG51bGwpe1xcbiAgICAgICAgICAgICAgICAgICAgd2luZG93LmNvdW50PTE7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgbGV0IHRleHQ9ZG9jdW1lbnQucXVlcnlTZWxlY3RvcihcXFwiYm9keVxcXCIpLmlubmVyVGV4dDtcXG4gICAgICAgICAgICAgICAgaWYoL+inpuWPkeS6humYsuebl+mTvnzmnKrmjojmnYN85o6l5Y+j6Ziy55uXLy50ZXN0KHRleHQpJiZ3aW5kb3cuY291bnQ9PT0xKXtcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcIuajgOa1i+WIsOacieaOiOadg++8jOW8gOWni+i/h+aOiOadg1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgLy9sb2NhdGlvbi5yZWxvYWQoKTtcXG4gICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLmhyZWY9ZmJhLmdldFZhcihcXFwiX3g1anhVcmxcXFwiKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB3aW5kb3cuY291bnQrKztcXG4gICAgICAgICAgICAgICAgLy8gZmJhLmxvZygnY291bnQ6Jyt3aW5kb3cuY291bnQrJyxtYXhfY291bnQ6JyttYXhfY291bnQpO1xcbiAgICAgICAgICAgICAgICBpZiggd2luZG93LmNvdW50ID49IG1heF9jb3VudCl7XFxuICAgICAgICAgICAgICAgICAgICBmYmEubG9nKFxcXCLotoXov4dcXFwiK21heF9jb3VudCoyNTArXFxcIuavq+enkuacquiOt+WPluWIsOi1hOa6kOWcsOWdgO+8jOi3s+WIsOa6kOe9kemhtSzku6XkuIvmmK/liqDovb3ov4fnmoTlnLDlnYBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIGxldCB0ZXh0PWRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoXFxcImJvZHlcXFwiKS5pbm5lclRleHQ7XFxuICAgICAgICAgICAgICAgICAgICAvLyBmYmEubG9nKHRleHQpO1xcbiAgICAgICAgICAgICAgICAgICAgZmJhLmxvZyhKU09OLnN0cmluZ2lmeShfZ2V0VXJscygpKSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmJhLmdldFZhcihcXFwiX3g1anhVcmxcXFwiKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBtdXRlTWUoZWxlbSkge1xcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBlbGVtLnBhdXNlKCk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHZhciB2aWRlb3MgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKFxcXCJ2aWRlb1xcXCIpLCBhdWRpb3MgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKFxcXCJhdWRpb1xcXCIpLCB2MiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoXFxcImVtYmVkXFxcIiksIHYzID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbChcXFwiI3BsYXllclxcXCIpO1xcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKHZpZGVvcywgZnVuY3Rpb24gKHZpZGVvKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbXV0ZU1lKHZpZGVvKTtcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKGF1ZGlvcywgZnVuY3Rpb24gKGF1ZGlvKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbXV0ZU1lKGF1ZGlvKTtcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKHYyLCBmdW5jdGlvbiAodikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG11dGVNZSh2KTtcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKHYzLCBmdW5jdGlvbiAodikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG11dGVNZSh2KTtcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcbiAgICAgICAgICAgICAgICB2YXIgdXJscyA9IF9nZXRVcmxzKCk7XFxuICAgICAgICAgICAgICAgIC8vIGZiYS5sb2coSlNPTi5zdHJpbmdpZnkodXJscykpO1xcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBpIGluIHVybHMpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdT11cmxzW2ldO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeXt1PWRlY29kZVVSSUNvbXBvbmVudCh1KTt9Y2F0Y2goZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHU9dW5lc2NhcGUodSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoL3VybD1odHRwLy50ZXN0KHUpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdSA9IHUuc3BsaXQoXFxcInVybD1cXFwiKS5zbGljZSgtMSlbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcInVybOWIhuWJsjpcXFwiK3UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKC91cmw9XFxcXC8vLnRlc3QodSkmJi9cXFxcLm0zdTgvLnRlc3QodSkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaG9zdCA9IHUubWF0Y2goLyguKilcXFxcL1xcXFwvKC4qPylcXFxcLy8pWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ID0gaG9zdCt1LnNwbGl0KFxcXCJ1cmw9XFxcIikuc2xpY2UoLTEpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYmEubG9nKFxcXCJ1cmzliIblibI6XFxcIit1KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZigvdmlkPWh0dHAvLnRlc3QodSkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ID0gdS5zcGxpdChcXFwidmlkPVxcXCIpLnNsaWNlKC0xKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmJhLmxvZyhcXFwidmlk5YiG5YmyOlxcXCIrdSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYoL3ZpZD1cXFxcLy8udGVzdCh1KSYmL1xcXFwubTN1OC8udGVzdCh1KSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBob3N0ID0gdS5tYXRjaCgvKC4qKVxcXFwvXFxcXC8oLio/KVxcXFwvLylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUgPSBob3N0K3Uuc3BsaXQoXFxcInZpZD1cXFwiKS5zbGljZSgtMSlbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcInZpZOWIhuWJsjpcXFwiK3UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKC9cXFxcPyguKik9aHR0cC8udGVzdCh1KSYmL1xcXFwubTN1OC8udGVzdCh1KSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUgPSBcXFwiaHR0cFxcXCIrdS5zcGxpdCgvXFxcXD8oLiopPWh0dHAvKS5zbGljZSgtMSlbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcIuWFtuS7luWIhuWJsjpcXFwiK3UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAvL3xpbmRleFxcXFwubTN1OCRcXG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKC9cXFxcLzFcXFxcLm0zdTgvLnRlc3QodSkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlYWxVcmwgPSBpc1ZpZGVvKHUscmVjaGFuZ2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHR5cGVvZihyZWFsVXJsKT09J3N0cmluZycpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYmEubG9nKFxcXCLku5PlupN4NeWFjeWXhee7k+aenDpcXFwiK3JlYWxVcmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2Z5X2JyaWRnZV9hcHAuc2V0V2ViVWEoUENfVUEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVhbFVybFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfWNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgICAgICBmYmEubG9nKGUubWVzc2FnZSlcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1jYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAvLyBmeV9icmlkZ2VfYXBwLmxvZygneDXlpKfojIPlm7TplJnor686JytlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgICAgICBhbGVydCgneDXlpKfojIPlm7TplJnor686JytlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5oql6ZSZ57uT5p2feDUnXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSxpc1ZpZGVvLHJlY2hhbmdlLHBsYXlVcmwsbWF4X2NvdW50LFBDX1VBKTtcXG4gICAgICAgIGNvbnN0IGxzZz0kLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9sb2NhbFN0b3JhZ2U/cnVsZT3pgZPplb/ku5PlupNQcm9cXFwiKTtcXG4gICAgICAgIGxldCB1c2VXZWI9bHNnL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Ziy55uXLy50ZXN0KHRleHQpJiZ3aW5kb3cuY291bnQ9PTEpe1xcbiAgICAgICAgICAgICAgICBsb2NhdGlvbi5yZWxvYWQoKTtcXG4gICAgICAgICAgICAgICAgZmJhLmxvZyhcXFwi5qOA5rWL5Yiw5pyJ5o6I5p2D77yM5byA5aeL6L+H5o6I5p2DXFxcIik7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHdpbmRvdy5jb3VudCsrO1xcbiAgICAgICAgICAgIC8vIGZiYS5sb2coJ2NvdW50OicgKyB3aW5kb3cuY291bnQgKyAnLG1heF9jb3VudDonICsgbWF4X2NvdW50KTtcXG4gICAgICAgICAgICBpZiAod2luZG93LmNvdW50ID49IG1heF9jb3VudCkge1xcbiAgICAgICAgICAgICAgICBmYmEuY2xlYXJWYXIoJ3g1TGlzdCcpO1xcbiAgICAgICAgICAgICAgICBmYmEuaGlkZUxvYWRpbmcoKTtcXG4gICAgICAgICAgICAgICAgbGV0IGZtc2cgPSAn6YGT6ZW/5LuT5bqT6YCa5YWN6Kej5p6Q5aSx6LSlLOWOn+WboDrotoXml7YnK3g1VGltZW91dCsn5q+r56eSJztcXG4gICAgICAgICAgICAgICAgZmJhLmxvZyhmbXNnKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovLycrZm1zZztcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9Y2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICBmYmEubG9nKGUubWVzc2FnZSk7XFxuICAgICAgICB9XFxuXFxuICAgICAgICBmdW5jdGlvbiBtdXRlTWUoZWxlbSkge1xcbiAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgIGVsZW0ucGF1c2UoKTtcXG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfVxcblxcbiAgICAgICAgdmFyIHZpZGVvcyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoXFxcInZpZGVvXFxcIiksIGF1ZGlvcyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoXFxcImF1ZGlvXFxcIiksXFxuICAgICAgICAgICAgdjIgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKFxcXCJlbWJlZFxcXCIpLCB2MyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoXFxcIiNwbGF5ZXJcXFwiKTtcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKHZpZGVvcywgZnVuY3Rpb24gKHZpZGVvKSB7XFxuICAgICAgICAgICAgICAgIG11dGVNZSh2aWRlbyk7XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICB9XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIFtdLmZvckVhY2guY2FsbChhdWRpb3MsIGZ1bmN0aW9uIChhdWRpbykge1xcbiAgICAgICAgICAgICAgICBtdXRlTWUoYXVkaW8pO1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgfVxcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBbXS5mb3JFYWNoLmNhbGwodjIsIGZ1bmN0aW9uICh2KSB7XFxuICAgICAgICAgICAgICAgIG11dGVNZSh2KTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgIH1cXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKHYzLCBmdW5jdGlvbiAodikge1xcbiAgICAgICAgICAgICAgICBtdXRlTWUodik7XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICB9XFxuICAgICAgICB2YXIgdXJscyA9IF9nZXRVcmxzKCk7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIGZvciAobGV0IGkgaW4gdXJscykge1xcbiAgICAgICAgICAgICAgICBsZXQgdT11cmxzW2ldO1xcbiAgICAgICAgICAgICAgICAvL3U9ZGVjb2RlVVJJQ29tcG9uZW50KHUpO1xcbiAgICAgICAgICAgICAgICB0cnl7dT1kZWNvZGVVUklDb21wb25lbnQodSk7fWNhdGNoKGUpe1xcbiAgICAgICAgICAgICAgICAgICAgdT11bmVzY2FwZSh1KTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBpZigvdXJsPWh0dHAvLnRlc3QodSkpe1xcbiAgICAgICAgICAgICAgICAgICAgdSA9IHUuc3BsaXQoXFxcInVybD1cXFwiKS5zbGljZSgtMSlbMF07XFxuICAgICAgICAgICAgICAgIH1lbHNlIGlmKC92aWQ9aHR0cC8udGVzdCh1KSl7XFxuICAgICAgICAgICAgICAgICAgICB1ID0gdS5zcGxpdChcXFwidmlkPVxcXCIpLnNsaWNlKC0xKVswXTtcXG4gICAgICAgICAgICAgICAgfWVsc2UgaWYoL1xcXFw/KC4qKT1odHRwLy50ZXN0KHUpKXtcXG4gICAgICAgICAgICAgICAgICAgIHUgPSBcXFwiaHR0cFxcXCIrdS5zcGxpdCgvXFxcXD8oLiopPWh0dHAvKS5zbGljZSgtMSlbMF07XFxuICAgICAgICAgICAgICAgICAgICAvL2ZiYS5sb2coXFxcIuWFtuS7luWIhuWJsjpcXFwiK3UpO1xcbiAgICAgICAgICAgICAgICB9ZWxzZSBpZigvXFxcXC8xXFxcXC5tM3U4JC8udGVzdCh1KSl7XFxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICBsZXQgcmVhbFVybCA9IGlzVmlkZW8odSk7XFxuICAgICAgICAgICAgICAgIGlmIChyZWFsVXJsKSB7XFxuICAgICAgICAgICAgICAgICAgICBmYmEubG9nKFxcXCLku5PlupN4NeWFjeWXhee7k+aenDpcXFwiICsgcmVhb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ICAgICAgICAgICAgICBsb2codG5hbWUrJ+W3suino+aekOWHuuinhumikTonK3JlYWxWaWRlbyk7XFxuICAgICAgICAgICAgICAgICAgICBpZihqbmFtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVhbFZpZGVvKz1cXFwi4piFXFxcIitqbmFtZVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgdmlkZW9zLnB1c2gocmVhbFZpZGVvKTtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICBsb2codG5hbWUrJ+ino+aekOWHuuS4jeefpemBk+S7gOS5iOS4nOilvzonK3VybCk7XFxuICAgICAgICAgICAgICAgICAgICB1cmwrPVxcXCIjaXNWaWRlbz10cnVlI1xcXCI7XFxuICAgICAgICAgICAgICAgICAgICBpZihqbmFtZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsKz1cXFwi4piFXFxcIitqbmFtZVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgdmlkZW9zLnB1c2godXJsKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICBsb2codG5hbWUrJ+S4umpzb27mjqXlj6PkuJTml6Dov5Tlm57op4bpopHlnLDlnYDmlbDmja46JytwbGF5VXJsTGlzdFtpXSsnXFxcXG4nK2JhY2tjb2RlKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9Y2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICBsb2codG5hbWUrJ+S4ung15o6l5Y+jLOWKoOWFpXg15ZeF5o6i5YiX6KGoJyk7XFxuICAgICAgICAgICAgeDVsaXN0LnB1c2gocGxheVVybExpc3RbaV0pO1xcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIC8vIGxvZyh2aWRlb3MpO1xcbiAgICBpZih2aWRlb3MubGVuZ3RoPjApe1xcbiAgICAgICAgaWYoZ2V0VmFyKCdkcC5jYWNoZVZpZGVvJywndHJ1ZScpPT09J3RydWUnJiZwYXJzZUludChnZXRBcHBWZXJzaW9uKCkpPj0yMjU1KVxcbiAgICAgICAge1xcbiAgICAgICAgICAgIGxvZyhcXFwi5bCK5pWs55qE6a2U5pat55So5oi377yM6KeG6aKR57yT5a2Y5bey5ZCv55So77yM6K+35bC95oOF5Lqr5Y+X55yL5Ymn5pe25YWJXFxcIik7XFxuICAgICAgICAgICAgbGV0IHZpZGVvc0NhY2hlPXZpZGVvcy5tYXAoKGl0KT0+e1xcbiAgICAgICAgICAgICAgICBsZXQgaGVhZGVycz17fTtcXG4gICAgICAgICAgICAgICAgaWYoaXQuc3BsaXQoXFxcIjtcXFwiKS5sZW5ndGg+MSl7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgaGVhZCA9IGl0LnNwbGl0KCc7JylbMV07XFxuICAgICAgICAgICAgICAgICAgICBpZigvQC8udGVzdChoZWFkKSYmL3t8fS8udGVzdChoZWFkKSl7XFxuLy9oZWFkID0gaGVhZC5yZXBsYWNlKC97fH0vZywnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZCA9IGhlYWQuc3BsaXQoXFxcIntcXFwiKVsxXS5zcGxpdChcXFwifVxcXCIpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWQgPSBoZWFkLnNwbGl0KCcmJicpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaSBpbiBoZWFkKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGtleSA9IGhlYWRbaV0uc3BsaXQoJ0AnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHZhbHVlID1oZWFkW2ldLnNwbGl0KCdAJylbMV0ucmVwbGFjZSgvOy8sJ++8m++8mycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzW2tleV0gPSB2YWx1ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcXG4gICAgICAgICAgICAgICAgICAgIHVybDppdC5zcGxpdChcXFwiO1xcXCIpWzBdLnNwbGl0KFxcXCLimIVcXFwiKVswXSxcXG4gICAgICAgICAgICAgICAgICAgIG9wdGlvbnM6e1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6aGVhZGVyc1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgdmFyIGRhdGE9YmF0Y2hDYWNoZU0zdTgodmlkZW9zQ2FjaGUpO1xcbiAgICAgICAgICAgIGRhdGE9ZGF0YS5tYXAoKGl0LGlkKT0+e1xcbiAgICAgICAgICAgICAgICBsZXQgZXh0cmE9XFxcIlxcXCI7XFxuICAgICAgICAgICAgICAgIGlmKHZpZGVvc1tpZF0uc3BsaXQoXFxcIjtcXFwiKS5sZW5ndGg+MSl7XFxuICAgICAgICAgICAgICAgICAgICBleHRyYT1cXFwiO1xcXCIrdmlkZW9zW2lkXS5zcGxpdChcXFwiO1xcXCIpWzFdO1xcbiAgICAgICAgICAgICAgICB9ZWxzZSBpZih2aWRlb3NbaWRdLnNwbGl0KFxcXCLimIVcXFwiKS5sZW5ndGg+MSl7XFxuICAgICAgICAgICAgICAgICAgICBleHRyYT1cXFwi4piFXFxcIit2aWRlb3NbaWRdLnNwbGl0KFxcXCLimIVcXFwiKVsxXTtcXG4gICAgICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgICAgICBpZihpdCtcXFwiXFxcIiE9XFxcIm51bGxcXFwiKXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBpdCtleHRyYVxcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2aWRlb3NbaWRdXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAvL2xvZyhkYXRhKTtcXG4gICAgICAgICAgICByZXR1cm4gZGF0YVxcbiAgICAgICAgICAgIC8vcmV0dXJuIHZpZGVvc1xcbiAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgcmV0dXJuIHZpZGVvc1xcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIGxvZygn5YWx5pyJJyt4NWxpc3QubGVuZ3RoKyfkuKp4NeWcsOWdgOi/m+ihjOi9rua1geWXheaOoicpO1xcbiAgICAvL+ayoeacieeahOivneWwseW8gOWni+S+neasoXg15ZeF5o6iXFxuICAgIHNob3dMb2FkaW5nKCfll4XmjqLkuK3vvIzoi6XlpLHotKXlsLHph43oo4V4NS4uLicpO1xcbiAgICByZXR1cm4geDVQYXJzZVBybyh4NWxpc3QseDVUaW1lb3V0LGlzVmlkZW8pO1xcbn1cXG52YXIgbGF6eT0kKCcnKS5sYXp5UnVsZSgoKT0+e1xcbiAgICB0cnl7XFxuICAgICAgICByZWFsVXJsPWlucHV0O1xcbiAgICAgICAgZXZhbChcXFwidmFyIGNvbmZpZyA9XFxcIiArIGZldGNoKFxcXCJoaWtlcjovL2ZpbGVzL2NhY2hlL015UGFyc2VTZXQuanNvblxcXCIpKTtcXG4gICAgICAgIGV2YWwoZmV0Y2goY29uZmlnLmNqKSk7XFxuICAgICAgICBsb2coaW5wdXQrJy0+5q2j5Zyo5pat5o+S6a2U5pS554mI6Kej5p6QLi4uJyk7XFxuICAgICAgICAvLyDliqDlhaXotoXml7borr7nva7vvIzlu7rorq7lnKjpppbpobXorr7nva5cXG4gICAgICAgIHJldHVybiBheXRtUGFyc2UocmVhbFVybClcXG4gICAgfWNhdGNoKGUpe1xcbiAgICAgICAgcmV0dXJuIGlucHV0XFxuICAgIH1cXG59KTtcXG4kLmV4cG9ydHMuaXNQaWM9aXNQaWM7XFxuJC5leHBvcnRzLmlzVmlkZW89aX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k7XFxuICAgIH1cXG4gICAgbGV0IGFwaV91cmwgPSBhcGkuaG9zdCsnL2hpa2VydWxlL3Rhc2svYWRkJztcXG4gICAgbGV0IGhvdXNlX2RhdGEgPSBob3VzZUZpbGUoKTtcXG4gICAgbGV0IHJlc3VsdCA9IHJlcXVlc3QoYXBpX3VybCwge1xcbiAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICdjb250ZW50LXR5cGUnOiAnYXBwbGljYXRpb24vanNvbidcXG4gICAgICAgIH0sXFxuICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgXFxcInBhcmFtc1xcXCI6IHtcXG4gICAgICAgICAgICAgICAgXFxcImRhdGFcXFwiOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwibmFtZVxcXCI6IHRhc2submFtZSxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJweWNvZGVcXFwiOiB0YXNrLnB5Y29kZSxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJub3RlXFxcIjogdGFzay5ub3RlLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInRlc3RfY29kZVxcXCI6IHRhc2sudGVzdF9jb2RlLFxcbiAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICBcXFwiYXV0aFxcXCI6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJuYW1lXFxcIjogaG91c2VfZGF0YS51c2VybmFtZXx8XFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBcXFwicGFzc3dvcmRcXFwiOiBob3VzZV9kYXRhLnBhc3N3b3JkfHxcXFwiXFxcIlxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSksXFxuICAgICAgICBtZXRob2Q6ICdQT1NUJ1xcbiAgICB9KTtcXG4gICAgcmV0dXJuIEpTT04ucGFyc2UocmVzdWx0KS5yZXN1bHQ7XFxufVxcblxcbmZ1bmN0aW9uIHRhc2tfY2F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6J3RleHRfMScsXFxuICAgIHVybDonaHR0cHM6Ly93d3cucnVub29iLmNvbS9tYXJrZG93bi9tZC10dXRvcmlhbC5odG1sJ1xcbn0pO1xcbmQucHVzaCh7XFxuICAgIHRpdGxlOifov5Tlm54nLFxcbiAgICBjb2xfdHlwZTondGV4dF8yJyxcXG4gICAgdXJsOiQoJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKCk9PntcXG4gICAgICAgIGJhY2soZmFsc2UpO1xcbiAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICB9KVxcbn0pO1xcbmlmKCFnZXRNeVZhcignZGV2SW5mbycpKXtcXG4gICAgYmVmb3JlX3JlZnJlc2goKTtcXG59XFxubGV0IGVtcHR5ID0gJ2hpa2VyOi8vZW1wdHknO1xcbmQucHVzaCh7XFxuICAgIHRpdGxlOifpmIXop4jmn6XpmIUnLFxcbiAgICBjb2xfdHlwZTondGV4dF8yJyxcXG4gICAgLy8gdXJsOiQoZ2V0TXlWYXIoJ2RldkluZm8nKSkuY29uZmlybSgpXFxuICAgIHVybDokKGVtcHR5KS5ydWxlKCgpPT57XFxuICAgICAgICByZXF1aXJlKFxcXCJodHRwczovL2dpdGxhYi5jb20vaGpkaG54L2hpa2VyLy0vcmF3L21haW4vanMvbWFya2VkLm1pbi5qc1xcXCIpO1xcbiAgICAgICBsZXQgZGV2SW5mbz1cXFwiXFxcIjtcXG4gICAgICAgdHJ5e1xcbiAgICAgICAgICBkZXZJbmZvPW1hcmtlZC5wYXJzZShnZXRNeVZhcignZGV2SW5mbycpKTtcXG4gICAgICAgfWNhdGNoKGUpe31cXG4gICAgICAgIHNldFJlc3VsdChbXFxuICAgICAgICAgICAge1xcbiAgICAgICAgICAgICAgICB0aXRsZTpkZXZJbmZvLFxcbiAgICAgICAgICAgICAgICBjb2xfdHlwZToncmljaF90ZXh0JyxcXG4gICAgICAgICAgICB9XFxuICAgICAgICBdKTtcXG4gICAgfSlcXG59KTtcXG5kLnB1c2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FxcXCJuYW1lXFxcIjogZGV2X3NldF9pbmZvWzBdLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJwYXNzd29yZFxcXCI6IGRldl9zZXRfaW5mb1sxXX1cXG4gICAgICAgICAgICB9O1xcbiAgICAgICAgICAgIC8vIGxvZyhzZW5kX2RhdGEpO1xcbiAgICAgICAgICAgIGxldCBwYXIyID0ge2hlYWRlcnM6eydjb250ZW50LXR5cGUnOidhcHBsaWNhdGlvbi9qc29uO2NoYXJzZXQ9VVRGLTgnLCdVc2VyLUFnZW50JzpkZXZfc2V0X2luZm9bM119LGJvZHk6SlNPTi5zdHJpbmdpZnkoc2VuZF9kYXRhKSxtZXRob2Q6J1BPU1QnfTtcXG4gICAgICAgICAgICAvLyBwYXIyID0gSlNPTi5zdHJpbmdpZnkocGFyMik7IC8veDXph4zpnaLor7fmsYLmiY3pnIDopoHnvJbnoIFcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBsZXQgYmFja19yZXQgPSByZXF1ZXN0KGluZm9fc2V0X3VybCwgcGFyMik7XFxuICAgICAgICAgICAgICAgIGJhY2tfcmV0ID0gSlNPTi5wYXJzZShiYWNrX3JldCkucmVzdWx0O1xcbiAgICAgICAgICAgICAgICBpZihiYWNrX3JldC5zdGF0dXM9PT0wKXtcXG4gICAgICAgICAgICAgICAgICAgIC8vIHJlZnJlc2hQYWdlKCk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L+d5a2Y5oiQ5YqfXFxcXG4nK2JhY2tfcmV0LmRldGFpbDtcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L+d5a2Y5aSx6LSlXFxcXG4nK2JhY2tfcmV0LmRldGFpbDtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1jYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ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1lO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/mnKrlronoo4VcXFwiO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIGRhdGFJdGVtLm5hbWUsYXBpLmhvbWUpLFxcbiAgICAgICAgY29sX3R5cGU6IG15X2NvbF90eXBlXFxuICAgIH0pXFxufVxcbmxldCBtYW5fcnVsZV9zYWZlID0gZ2V0QXBpKFxcXCJtYW5SdWxlU2FmZVxcXCIpK2RhdGFJdGVtLmlkO1xcbi8vIGRhdGFJdGVtLmlzX3NhZmU7XFxuaWYoZ2V0VmFyKCdob3VzZS5pc19tYW5hZ2VyJykpe1xcbiAgICBmdW5jdGlvbiBzZXRJc1NhZmUoZmxhZyxtYW5fcnVsZV9zYWZlKSB7XFxuICAgICAgICBmbGFnID0gZmxhZyB8fCAnJztcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgbGV0IGNvZGUgPSBmZXRjaChtYW5fcnVsZV9zYWZlLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFwiVXNlci1BZ2VudFxcXCI6IE1PQklMRV9VQX0sXFxuICAgICAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJwYXJhbXNcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInVzZXJuYW1lXFxcIjogZ2V0VmFyKCdob3VzZS51c2VybmFtZScpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwicGFzc3dvcmRcXFwiOiBnZXRWYXIoJ2hvdXNlLnBhc3N3b3JkJyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJpc19zYWZlXFxcIjogISFmbGFnXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgY29kZSA9IEpTT04ucGFyc2UoY29kZSkucmVzdWx0O1xcbiAgICAgICAgICAgIGlmIChjb2RlLnN0YXR1cyA9PT0gMCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gY29kZS5kZXRhaWxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ+aTjeS9nOWksei0pTonICsgY29kZS5kZXRhaWxcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgcmV0dXJuICfmk43kvZzlpLHotKU6JyArIGUubWVzc2FnZVxcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIGRhdGEucHVzaCh7XFxuICAgICAgICB0aXRsZTon8J+aq+agh+iusOmjjumZqScsXFxuICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICB1cmw6JCgn5qCH6K6w6K+l6KeE5YiZ5Li66aOO6ZmpP+mjjumZqeinhOWImeaXoOazleiiq+WvvOWFpScpLmNvbmZpcm0oKGlkLG1hbl9ydWxlX3NhZmUsc2V0SXNTYWZlKT0+e1xcbiAgICAgICAgICAgIGxldCByZXQgPSBzZXRJc1NhZmUoZmFsc2UsbWFuX3J1bGVfc2FmZSk7XFxuICAgICAgICAgICAgaWYoIS/mk43kvZzlpLHotKUvLnRlc3QocmV0KSl7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovLycrcmV0XFxuICAgICAgICB9LGRhdGFJdGVtLmlkLG1hbl9ydWxlX3NhZmUsc2V0SXNTYWZlKVxcbiAgICB9KTtcXG4gICAgZGF0YS5wdXNoKHtcXG4gICAgICAgIHRpdGxlOifinIXmoIforrDmraPluLgnLFxcbiAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgIC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hbl91cGxvYWRfYXBpLCB7XFxcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcXFxcXFwiVXNlci1BZ2VudFxcXFxcXFwiOiBNT0JJTEVfVUF9LFxcXFxuICAgICAgICAgICAgICAgIGJvZHk6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJwYXJhbXNcXFxcXFxcIjpcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInVzZXJuYW1lXFxcXFxcXCI6IGdldFZhcignaG91c2UudXNlcm5hbWUnKSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInBhc3N3b3JkXFxcXFxcXCI6IGdldFZhcignaG91c2UucGFzc3dvcmQnKSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcImNhbl91cGxvYWRcXFxcXFxcIjogISFmbGFnXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICBjb2RlID0gSlNPTi5wYXJzZShjb2RlKS5yZXN1bHQ7XFxcXG4gICAgICAgICAgICBpZiAoY29kZS5zdGF0dXMgPT09IDApIHtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gY29kZS5kZXRhaWxcXFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuICfmk43kvZzlpLHotKU6JyArIGNvZGUuZGV0YWlsXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgIHJldHVybiAn5pON5L2c5aSx6LSlOicgKyBlLm1lc3NhZ2VcXFxcbiAgICAgICAgfVxcXFxuICAgIH1cXFxcbiAgICBkYXRhLnB1c2goe1xcXFxuICAgICAgICB0aXRsZTon8J+aq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ncnVsZTovLycgKyBiYXNlNjRFbmNvZGUoc3ViX3J1bGVfY29kZSk7XFxcXG4gICAgICAgIGRhdGEucHVzaCh7XFxcXG4gICAgICAgICAgICB0aXRsZTogJ+iuoumYheinhOWImScsXFxcXG4gICAgICAgICAgICB1cmw6IHN1Yl91cmwsXFxcXG4gICAgICAgICAgICBjb2xfdHlwZTogbXlfY29sX3R5cGVcXFxcbiAgICAgICAgfSlcXFxcbiAgICB9XFxcXG59XFxcXG5pZiAoZGF0YUl0ZW0uaXNfanNvbiAmJiBkYXRhSXRlbS5kYXRhX3R5cGUgPT09IFxcXFxcXFwiaG9tZV9ydWxlX3VybFxcXFxcXFwiICYmICFkYXRhSXRlbS5pc19qc29uX2xpc3QpIHtcXFxcbiAgICBkYXRhLnB1c2goe1xcXFxuICAgICAgICB0aXRsZTogJ+i/m+WFpemikemBkycsXFxcXG4gICAgICAgIHVybDogJCggLypcXFxcXFxcIiNub0xvYWRpbmcjXFxcXFxcXCIqLyApLmxhenlSdWxlKChuYW1lLGhvbWUpID0+IHtcXFxcbiAgICAgICAgICAgIGxldCBydWxlTGlzdCA9IEpTT04ucGFyc2UocmVxdWVzdChob21lKSk7XFxcXG4gICAgICAgICAgICBsZXQgaGFzUnVsZSA9IHJ1bGVMaXN0LnNvbWUoaXRlbSA9PiBpdGVtLnRpdGxlID09PSBuYW1lKTtcXFxcbiAgICAgICAgICAgIGlmIChoYXNSdWxlKSB7XFxcXG4gICAgICAgICAgICAgICAgcHV0VmFyKFxcXFxcXFwiV2FyZWhvdXNlLmJhY2tcXFxcXFxcIiwgXFxcXFxcXCIxXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgIGJhY2soKTtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gaG9tZStcXFxcXFxcInNAXFxcXFxcXCIgKyBuYW1lO1xcXFxuICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL+acquWuieijhVxcXFxcXFwiO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9LCBkYXRhSXRlbS5uYW1lLGFwaS5ob21lKSxcXFxcbiAgICAgICAgY29sX3R5cGU6IG15X2NvbF90eXBlXFxcXG4gICAgfSlcXFxcbn1cXFxcbmxldCBtYW5fcnVsZV9zYWZlID0gZ2V0QXBpKFxcXFxcXFwibWFuUnVsZVNhZmVcXFxcXFxcIikrZGF0YUl0ZW0uaWQ7XFxcXG4vLyBkYXRhSXRlbS5pc19zYWZlO1xcXFxuaWYoZ2V0VmFyKCdob3VzZS5pc19tYW5hZ2VyJykpe1xcXFxuICAgIGZ1bmN0aW9uIHNldElzU2FmZShmbGFnLG1hbl9ydWxlX3NhZmUpIHtcXFxcbiAgICAgICAgZmxhZyA9IGZsYWcgfHwgJyc7XFxcXG4gICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICBsZXQgY29kZSA9IGZldGNoKG1hbl9ydWxlX3NhZmUsIHtcXFxcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxcXFxcXCJVc2VyLUFnZW50XFxcXFxcXCI6IE1PQklMRV9VQX0sXFxcXG4gICAgICAgICAgICAgICAgYm9keToge1xcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInBhcmFtc1xcXFxcXFwiOlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwidXNlcm5hbWVcXFxcXFxcIjogZ2V0VmFyKCdob3VzZS51c2VybmFtZScpLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwicGFzc3dvcmRcXFxcXFxcIjogZ2V0VmFyKCdob3VzZS5wYXNzd29yZCcpLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiaXNfc2FmZVxcXFxcXFwiOiAhIWZsYWdcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgIGNvZGUgPSBKU09OLnBhcnNlKGNvZGUpLnJlc3VsdDtcXFxcbiAgICAgICAgICAgIGlmIChjb2RlLnN0YXR1cyA9PT0gMCkge1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiBjb2RlLmRldGFpbFxcXFxuICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ+aTjeS9nOWksei0pTonICsgY29kZS5kZXRhaWxcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgcmV0dXJuICfmk43kvZzlpLHotKU6JyArIGUubWVzc2FnZVxcXFxuICAgICAgICB9XFxcXG4gICAgfVxcXFxuICAgIGRhdGEucHVzaCh7XFxcXG4gICAgICAgIHRpdGxlOifwn5qr5qCH6K6w6aOO6ZmpJyxcXFxcbiAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcXFxuICAgICAgICB1cmw6JCgn5qCH6K6w6K+l6KeE5YiZ5Li66aOO6ZmpP+mjjumZqeinhOWImeaXoOazleiiq+WvvOWFpScpLmNvbmZpcm0oKGlkLG1hbl9ydWxlX3NhZmUsc2V0SXNTYWZlKT0+e1xcXFxuICAgICAgICAgICAgbGV0IHJldCA9IHNldElzU2FmZShmYWxzZSxtYW5fcnVsZV9zYWZlKTtcXFxcbiAgICAgICAgICAgIGlmKCEv5pON5L2c5aSx6LSlLy50ZXN0KHJldCkpe1xcXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly8nK3JldFxcXFxuICAgICAgICB9LGRhdGFJdGVtLmlkLG1hbl9ydWxlX3NhZmUsc2V0SXNTYWZlKVxcXFxuICAgIH0pO1xcXFxuIC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ICsgcmVzdWx0LmRldGFpbCkuaW5wdXQoKGNvbmZpcm0sIGlkLCBhY2NvdW50KSA9PiB7XFxcXG4gICAgICAgICAgICBzaG93TG9hZGluZyhcXFxcXFxcIuivt+iAkOW/g+etieW+hVxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHJlc3VsdCA9IHJlcXVlc3QoY29uZmlybSwge1xcXFxuICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAnY29udGVudC10eXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nXFxcXG4gICAgICAgICAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwicGFyYW1zXFxcXFxcXCI6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInJlZ2lzdF9pZFxcXFxcXFwiOiBpZCxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInl6bVxcXFxcXFwiOiBpbnB1dFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCdcXFxcbiAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBKU09OLnBhcnNlKHJlc3VsdCkucmVzdWx0O1xcXFxuICAgICAgICAgICAgICAgIGlmIChyZXN1bHQuc3RhdHVzICE9PSAwKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFxcXFxcInRvYXN0Oi8vXFxcXFxcXCIgKyByZXN1bHQuZGV0YWlsO1x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U09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwicGFyYW1zXFxcXFxcXCI6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwicXFcXFxcXFxcIjogcXFcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnXFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgIHJlc3VsdCA9IEpTT04ucGFyc2UocmVzdWx0KS5yZXN1bHQ7XFxcXG4gICAgICAgICAgICBpZiAocmVzdWx0LnN0YXR1cyA9PT0gMCkge1xcXFxuICAgICAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwidG9hc3Q6Ly9cXFxcXFxcIiArIHJlc3VsdC5kZXRhaWw7XFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIGxldCByZXN1bHQyID0gSlNPTi5wYXJzZShyZXF1ZXN0KGIgKyBcXFxcXFxcIj9xcT1cXFxcXFxcIiArIHFxKSk7XFxcXG4gICAgICAgICAgICAgICAgaGlkZUxvYWRpbmcoKTtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL1xcXFxcXFwiICsgcmVzdWx0Mi5kZXRhaWw7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxcXG4gICAgICAgICAgICB0aHJvdyBlO1xcXFxuICAgICAgICB9XFxcXG4gICAgICAgIH0sIHFxLCBhLCBiKTtcXFxcblxcXFxuICAgIH0sIGFwaS5kaXNfbmV3X3VzZXIsIGFwaS5kaXNfdmVyaWZ5KSxcXFxcbiAgICBleHRyYToge1x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aXN0ID0gZ2V0VXNlckRhdGUoKTtcXFxcbmRhdGEucHVzaCh7XFxcXG4gICAgdGl0bGU6IFxcXFxcXFwi6aqM6K+BL+eZu+W9lVxcXFxcXFwiLFxcXFxuICAgIHVybDogJChcXFxcXFxcIuehruWumuS/neWtmO+8jOmqjOivgeeggeWhq+mUme+8jOaXoOazleivhOiuuuWTplxcXFxcXFwiKS5jb25maXJtKChmLCBsLCBsb2dpbikgPT4ge1xcXFxuICAgICAgICBsZXQgcXEgPSBnZXRWYXIoJ1dhcmVob3VzZS5tLnFxJywgJycpO1xcXFxuICAgICAgICBsZXQgeXptID0gZ2V0VmFyKCdXYXJlaG91c2UubS55em0nLCAnJyk7XFxcXG4gICAgICAgIGlmIChxcSA9PSBcXFxcXFxcIlxcXFxcXFwiIHx8IHl6bSA9PSBcXFxcXFxcIlxcXFxcXFwiKSB7XFxcXG4gICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL3Fx5oiW6aqM6K+B56CB5Li656m6XFxcXFxcXCI7XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgbGV0IHJlc3VsdCA9IHJlcXVlc3QobG9naW4sIHtcXFxcbiAgICAgICAgICAgIGhlYWRlcnM6IHtcXFxcbiAgICAgICAgICAgICAgICAnY29udGVudC10eXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nXFxcXG4gICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xcXFxuICAgICAgICAgICAgICAgIFxcXFxcXFwicGFyYW1zXFxcXFxcXCI6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJxcVxcXFxcXFwiOiBxcSxcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJhdXRoX2NvZGVcXFxcXFxcIjogeXptXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSksXFxcXG4gICAgICAgICAgICBtZXRob2Q6ICdQT1N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gICBsZXQgd2ViX3VybF9hcnIgPSBpbnB1dC5zcGxpdCgnOycpO1xcXFxuICAgICAgICAgICAgbGV0IHdlYl91cmwgPSB3ZWJfdXJsX2FyclswXTtcXFxcbiAgICAgICAgICAgIGxldCBoZWFkZXJzID0ge1xcXFxuICAgICAgICAgICAgICAgICdSZWZlcmVyJzonaHR0cHM6Ly9ibG9nLmNzZG4ubmV0JyxcXFxcbiAgICAgICAgICAgICAgICAnVXNlci1BZ2VudCc6dWEsXFxcXG4gICAgICAgICAgICAgICAgJ0FjY2VwdCc6J2FwcGxpY2F0aW9uL2pzb24sIHRleHQvamF2YXNjcmlwdCwgKi8qOyBxPTAuMDEnLFxcXFxuICAgICAgICAgICAgICAgICdBY2NlcHQtTGFuZ3VhZ2UnOid6aC1DTicsXFxcXG4gICAgICAgICAgICB9O1xcXFxuICAgICAgICAgICAgaWYod2ViX3VybF9hcnIubGVuZ3RoPj0zJiZ3ZWJfdXJsX2FyclsyXS5sZW5ndGg+Mil7IC8v6K6+572u57yW56CBXFxcXG4gICAgICAgICAgICAgICAgaGVhZGVyc1snY29udGVudC10eXBlJ10gPSAnY2hhcnNldD0nK3dlYl91cmxfYXJyWzJdLnRvVXBwZXJDYXNlKCk7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICBsZXQgcGFyYW1zID0ge2hlYWRlcnM6aGVhZGVycyx3aXRoSGVhZGVyczpmYWxzZSxyZWRpcmVjdDpmYWxzZX07XFxcXG4gICAgICAgICAgICBpZih3ZWJfdXJsX2Fyci5sZW5ndGg+PTImJndlYl91cmxfYXJyWzFdLmxlbmd0aD4yKXsgLy8g6K6+572u6K+35rGC5pa55rOVXFxcXG4gICAgICAgICAgICAgICAgcGFyYW1zWydtZXRob2QnXSA9IHdlYl91cmxfYXJyWzFdLnRvVXBwZXJDYXNlKCk7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICBsb2coJ+W8gOWni+iOt+WPlua6kOeggScpO1xcXFxuICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAvKlxcXFxuICAgICAgICAgICAgICAgIHJlcXVlc3RBc3luYyh3ZWJfdXJsLHBhcmFtcyxmdW5jdGlvbiAoa2V5LGNvZGUpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IGJhY2tfY29kZSA9IGNvZGU7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmKGJhY2tfY29kZS5sZW5ndGg+MjApe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKCdob3VzZS51cGxvYWRfY29kZScsYmFja19jb2RlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+a6kOeggeW3suiOt+WPlizlubbpg6jliIbmj5LlhaXliLDmlofmnKzljLrln58nXFxcXG4gICAgICAgICAgICAgICAgICAgIH1lbHNle1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mUmeivr++8jOacrOasoeiOt+WPluWIsOepuuaWh+acrO+8jOeWkeS8vOS9oOayoeacieatpOaWh+S7tiEnO1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgKi9cXFxcbiAgICAgICAgICAgICAgICBsZXQgYmFja19jb2RlID0gZ2V0SXRlbSgnaG91c2UuZmlsZV91YScpPT09J+eUteiEkSc/ZmV0Y2god2ViX3VybCxwYXJhbXMpOnJlcXVlc3Qod2ViX3VybCxwYXJhbXMpO1xcXFxuICAgICAgICAgICAgICAgIGlmKGJhY2tfY29kZS5sZW5ndGg+MjApe1xcXFxuICAgICAgICAgICAgICAgICAgICBwdXRWYXIoJ2hvdXNlLnVwbG9hZF9jb2RlJyxiYWNrX2NvZGUpO1xcXFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+a6kOeggeW3suiOt+WPlizlubbpg6jliIbmj5LlhaXliLDmlofmnKzljLrln58nXFxcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/plJnor6/vvIzmnKzmrKHojrflj5bliLDnqbrmlofmnKzvvIznlpHkvLzkvaDmsqHmnInmraTmlofku7YhJztcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9Y2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgICAgICBsb2coZS5tZXNzYWdlKTtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5Y+R55Sf5LqG6ZSZ6K+vOlxcXFxcXFxcbicrZS5tZXNzYWdlO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9ZWxzZSBpZigv5Li76aKY77+lfOWFg+e0oO+/pS8udGVzdChpbnB1dCkpe1xcXFxuICAgICAgICAgICAgbG9nKCfkuLvpopjpk77mjqUnKTtcXFxcbiAgICAgICAgICAgIGxldCB3ZWJfdXJsX2FyciA9IGlucHV0LnNwbGl0KCfvv6UnKTtcXFxcbiAgICAgICAgICAgIGxldCB3ZWJfdXJsID0gd2ViX3VybF9hcnJbd2ViX3VybF9hcnIubGVuZ3RoLTFdO1xcXFxuICAgICAgICAgICAgbGV0IGJhY2tfY29kZSA9IHBhcnNlUGFzdGUod2ViX3VybCk7XFxcXG4gICAgICAgICAgICBpZihiYWNrX2NvZGUubGVuZ3RoPjIwKSB7XFxcXG4gICAgICAgICAgICAgICAgcHV0VmFyKCdob3VzZS51cGxvYWRfY29kZScsYmFja19jb2RlKTtcXFxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5rqQ56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ufVxcXFxuZC5wdXNoKHtcXFxcbiAgICB0aXRsZTon8J+XhO+4j+eOr+WigycsXFxcXG4gICAgY29sX3R5cGU6J2ZsZXhfYnV0dG9uJyxcXFxcbiAgICB1cmw6JCgpLmxhenlSdWxlKChmaWxlX3R5cGUsY29tcGFyZSk9PntcXFxcbiAgICAgICAgbG9nKCfmn6XnnIvnjq/looPlj5jph48nKTtcXFxcbiAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgIGxldCB1cF9jb2RlID0gZ2V0VmFyKCdob3VzZS51cGxvYWRfY29kZScsJycpO1xcXFxuICAgICAgICAgICAgbGV0IGZ0eXBlID0gIGZpbGVfdHlwZS5maWx0ZXIoY29tcGFyZShnZXRJdGVtKCdob3VzZS5maWxlX3R5cGUnLCfpnZnmgIHmlofku7YnKSkpWzBdLnZhbHVlO1xcXFxuICAgICAgICAgICAgbGV0IHJlZGlyZWN0ID0gZ2V0SXRlbSgnaG91c2UuZmlsZV9yZWRpcmVjdCcsJ+acrOWcsCcpIT09J+acrOWcsCc7XFxcXG4gICAgICAgICAgICBsZXQgY29kZSA9ICFyZWRpcmVjdD91cF9jb2RlOmlucHV0O1xcXFxuICAgICAgICAgICAgbGV0IGVudiA9IHtcXFxcbiAgICAgICAgICAgICAgICB3ZWJfdXJsOmdldFZhcignaG91c2Uud2ViX3VybCcsJycpLFxcXFxuICAgICAgICAgICAgICAgIGRldmljZTpnZXRJdGVtKCdob3VzZS5maWxlX3VhJywn55S16ISRJyksXFxcXG4gICAgICAgICAgICAgICAgZnR5cGU6ZnR5cGV8fFxcXFxcXFwiXFxcXFxcXCIsXFxcXG4gICAgICAgICAgICAgICAgcmVkaXJlY3Q6cmVkaXJlY3QsXFxcXG4gICAgICAgICAgICAgICAgY29kZTpjb2RlLnN1YnN0cmluZygwLDQwKXx8XFxcXFxcXCJcXFxcXFxcIixcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIGxvZyhlbnYpO1xcXFxuICAgICAgICA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TtcXFxcblxcXFxuZC5wdXNoKHtcXFxcbiAgICB0aXRsZTon8J+TpOS4iuS8oCcsXFxcXG4gICAgY29sX3R5cGU6J2ZsZXhfYnV0dG9uJyxcXFxcbiAgICB1cmw6JCgpLmxhenlSdWxlKChjYW51cCxob3VzZV9kYXRhLHB1dF91cmwsZmlsZV90eXBlKSA9PntcXFxcbiAgICAgICAgZnVuY3Rpb24gY29tcGFyZShuYW1lKSB7XFxcXG4gICAgICAgICAgICByZXR1cm4gZnVuY3Rpb24oaXRlbSkge1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiBpdGVtLm5hbWUgPT09IG5hbWU7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgY29uc3Qge2dldE5vd0Zvcm1hdERhdGV9PSQucmVxdWlyZShcXFxcXFxcImhpa2VyOi8vcGFnZS91dGlsaXlcXFxcXFxcIik7XFxcXG4gICAgICAgIGxldCB1cF9jb2RlID0gZ2V0VmFyKCdob3VzZS51cGxvYWRfY29kZScsJycpO1xcXFxuICAgICAgICBpZih1cF9jb2RlLmxlbmd0aCA8IDIpe1xcXFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+a6kOeggeWMuuaXoOWGheWuue+8jOivt+WFiOiuv+mXruS4gOS4qumdmeaAgemhtemdoidcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBpZighY2FudXApe1xcXFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S9oOS4jeaYr+W8gOWPkeiAhe+8jOayoeacieaPkOS6pOWIsOS7k+W6k+eahOadg+WIqSEnXFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgbGV0IGlucHV0ID0gZ2V0VmFyKCdob3VzZS53ZWJfdXJsJywnJyk7XFxcXG4gICAgICAgIGxldCB3ZWJfdXJsID0gaW5wdXQuc3BsaXQoJzsnKVswXTtcXFxcbiAgICAgICAgbGV0IGZpbGVOYW1lID0gJyc7XFxcXG4gICAgICAgIGlmKC9eaGlrZXI6fF5maWxlOnxeaHR0cDp8Xmh0dHBzOi8udGVzdCh3ZWJfdXJsKSl7XFxcXG4gICAgICAgICAgICBmaWxlTmFtZSA9IHdlYl91cmwuc3BsaXQoJy8nKVt3ZWJfdXJsLnNwbGl0KCcvJykubGVuZ3RoLTFdO1xcXFxuICAgICAgICB9ZWxzZSBpZigv5Li76aKY77+lfOWFg+e0oO+/pS8udGVzdChpbnB1dCkpe1xcXFxuICAgICAgICAgICAgbGV0IGJrYXJyID0gdXBfY29kZS5zcGxpdCgn77+lJyk7XFxcXG4gICAgICAgICAgICBpZihia2Fyci5sZW5ndGg8Myl7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S6keWJqui0tOadv+WGheWuueacieivrydcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIHN3aXRjaCAoYmthcnJbMV0pIHtcXFxcbiAgICAgICAgICAgICAgICBjYXNlICdteV9ob21lX3RoZW1lJzpcXFxcbiAgICAgICAgICAgICAgICAgICAgZmlsZU5hbWUgPSB1cF9jb2RlLnNwbGl0KCfjgIwnKVsxXS5zcGxpdCgn44CNJylbMF07XFxcXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcXFxuICAgICAgICAgICAgICAgIGNhc2UgJ215X2hvbWVfc2luZ2xlJzpcXFxcbiAgICAgICAgICAgICAgICAgICAgZmlsZU5hbWUgPSB1cF9jb2RlLnNwbGl0KCfjgIwnKVsxXS5zcGxpdCgn44CNJylbMF07XFxcXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcXFxuICAgICAgICAgICAgICAgIGNhc2UgJ2pzX3VybCc6XFxcXG4gICAgICAgICAgICAgICAgICAgIGZpbGVOYW1lID0gdXBfY29kZS5zcGxpdCgn77+lJylbMl0uc3BsaXQoJ0AnKVswXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1lbHN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Ly9wYWdlL2dsb2JhbFBhcnNlP3J1bGU96YGT6ZW/5LuT5bqTUHJvJyk7XFxcXG4gICAgICAgICAgICByZXR1cm4gbGF6eVBhcnNlKGlucHV0KVxcXFxuICAgICAgICB9KTtcXFxcbiAgICAgICAgZm9yKGxldCBpIGluIGxpc3Qpe1xcXFxuICAgICAgICAgICAgbGV0IF9waWMgPSB0WzJdP3BkKGxpc3RbaV0sdFsyXSk6Jyc7XFxcXG4gICAgICAgICAgICBpZihpc1BpYyhfcGljKSYmIS9AUmVmZXJlcj0vLnRlc3QoX3BpYykpe1xcXFxuICAgICAgICAgICAgICAgIF9waWMrPSdAUmVmZXJlcj0nXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICBsZXQgaXQ9e1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOnBkZmgobGlzdFtpXSx0WzFdKSxcXFxcbiAgICAgICAgICAgICAgICBwaWNfdXJsOl9waWMsXFxcXG4gICAgICAgICAgICAgICAgZGVzYzpwZGZoKGxpc3RbaV0sdFszXSksXFxcXG4gICAgICAgICAgICAgICAgdXJsOmVqP3BkKGxpc3RbaV0sdFs0XSk6cGQobGlzdFtpXSx0WzRdKStsYXp5XFxcXG4gICAgICAgICAgICB9O1xcXFxuICAgICAgICAgICAgaWYodC5sZW5ndGg+NSl7Ly/lhoXlrrnvvIznlKjkuo7mkJzntKJcXFxcbiAgICAgICAgICAgICAgICBpdC5jb250ZW50PXBkZmgobGlzdFtpXSx0WzVdKVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgZC5wdXNoKGl0KTtcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBpZihvbmx5YmFjayl7XFxcXG4gICAgICAgICAgICByZXR1cm4gZFxcXFxuICAgICAgICB9ZWxzZXtcXFxcbiAgICAgICAgICAgIHNldFJlc3VsdChkKVxcXFxuICAgICAgICB9XFxcXG4gICAgfSxwYXJTdHIsZWosb25seWJhY2ssaHRtbCxpc1BpYylcXF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LGJhY2spO1xcXFxuICAgICAgICAgICAgLy9yZXR1cm4gbGNhY2hlK1xcXFxcXFwiIyNcXFxcXFxcIitwbGF5VXJsK1xcXFxcXFwiI2lzVmlkZW89dHJ1ZSNcXFxcXFxcIlxcXFxuICAgICAgICAgICAgcGxheVVybD1jYWNoZU0zdTgocGxheVVybCk7XFxcXG4gICAgICAgICAgICByZXR1cm4gcGxheVVybFxcXFxuICAgICAgICB9ZWxzZSBpZigoIS/op6blj5HkuobpmLLnm5fpk7585pyq5o6I5p2DfOaOpeWPo+mYsuebly8udGVzdChiYWNrKSkmJighL2h0dHB8dXJsLy50ZXN0KGJhY2spKSYmKCEvbXNnfGNvZGV8aHRtbC8udGVzdChiYWNrKSkpe1xcXFxuICAgICAgICAgICAgbG9nKGJhY2spO1xcXFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+eWkeS8vOWvueaWueaVsOaNruWKoOWvhuS6hu+8jOWFt+S9k+aVsOaNrueci+aXpeW/lydcXFxcbiAgICAgICAgfVxcXFxuICAgIH1jYXRjaChlKXtcXFxcbiAgICAgICAgbG9nKGUubWVzc2FnZSk7XFxcXG4gICAgICAgIHJldHVybiBiYWRcXFxcbiAgICB9XFxcXG4gICAgdHJ5IHtcXFxcbiAgICAgICAgYmFjaz1KU09OLnBhcnNlKGJhY2spO1xcXFxuICAgICAgICBsZXQgcmVhbFVybD1iYWNrLnVybDtcXFxcbiAgICAgICAgaWYodHlwZW9mKHJlYWxVcmwpPT1cXFxcXFxcInVuZGVmaW5lZFxcXFxcXFwifHwhcmVhbFVybCl7XFxcXG4gICAgICAgICAgICBsb2coYmFjayk7XFxcXG4gICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL+mBk+mVv+S7k+W6k+ino+aekOWksei0pe+8gei/lOWbnuaSreaUvuWcsOWdgOS4uuepulxcXFxcXFwiXFxcXG4gICAgICAgIH0gZWxzZSBpZih0eXBlb2YoaXNWaWRlbyhyZWFsVXJsLHJlY2hh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ICAgICAgdmFyIGZiYSA9IGZ5X2JyaWRnZV9hcHA7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmKHR5cGVvZihyZXF1ZXN0KT09J3VuZGVmaW5lZCd8fCFyZXF1ZXN0KXtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoZmJhLmdldEludGVybmFsSnMoKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9Y2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZmJhLmxvZyhlLm1lc3NhZ2UpO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBmYmEucHV0VmFyKFxcXFxcXFwiX3g1anhVcmxcXFxcXFxcIixwbGF5VXJsKTtcXFxcbiAgICAgICAgICAgICAgICBpZih3aW5kb3cuY291bnQgPT0gbnVsbCl7XFxcXG4gICAgICAgICAgICAgICAgICAgIHdpbmRvdy5jb3VudD0xO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBsZXQgdGV4dD1kb2N1bWVudC5xdWVyeVNlbGVjdG9yKFxcXFxcXFwiYm9keVxcXFxcXFwiKS5pbm5lclRleHQ7XFxcXG4gICAgICAgICAgICAgICAgaWYoL+inpuWPkeS6humYsuebl+mTvnzmnKrmjojmnYN85o6l5Y+j6Ziy55uXLy50ZXN0KHRleHQpJiZ3aW5kb3cuY291bnQ9PT0xKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgZmJhLmxvZyhcXFxcXFxcIuajgOa1i+WIsOacieaOiOadg++8jOW8gOWni+i/h+aOiOadg1xcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgLy9sb2NhdGlvbi5yZWxvYWQoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZj1mYmEuZ2V0VmFyKFxcXFxcXFwiX3g1anhVcmxcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIHdpbmRvdy5jb3VudCsrO1xcXFxuICAgICAgICAgICAgICAgIC8vIGZiYS5sb2coJ2NvdW50Oicrd2luZG93LmNvdW50KycsbWF4X2NvdW50OicrbWF4X2NvdW50KTtcXFxcbiAgICAgICAgICAgICAgICBpZiggd2luZG93LmNvdW50ID49IG1heF9jb3VudCl7XFxcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcXFxcXCLotoXov4dcXFxcXFxcIittYXhfY291bnQqMjUwK1xcXFxcXFwi5q+r56eS5pyq6I635Y+W5Yiw6LWE5rqQ5Zyw5Z2A77yM6Lez5Yiw5rqQ572R6aG1LOS7peS4i+aYr+WKoOi9vei/h+eahOWcsOWdgFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IHRleHQ9ZG9jdW1lbnQucXVlcnlTZWxlY3RvcihcXFxcXFxcImJvZHlcXFxcXFxcIikuaW5uZXJUZXh0O1xcXFxuICAgICAgICAgICAgICAgICAgICAvLyBmYmEubG9nKHRleHQpO1xcXFxuICAgICAgICAgICAgICAgICAgICBmYmEubG9nKEpTT04uc3RyaW5naWZ5KF9nZXRVcmxzKCkpKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZiYS5nZXRWYXIoXFxcXFxcXCJfeDVqeFVybFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gbXV0ZU1lKGVsZW0pIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsZW0ucGF1c2UoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIHZhciB2aWRlb3MgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKFxcXFxcXFwidmlkZW9cXFxcXFxcIiksIGF1ZGlvcyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoXFxcXFxcXCJhdWRpb1xcXFxcXFwiKSwgdjIgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKFxcXFxcXFwiZW1iZWRcXFxcXFxcIiksIHYzID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbChcXFxcXFxcIiNwbGF5ZXJcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKHZpZGVvcywgZnVuY3Rpb24gKHZpZGVvKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBtdXRlTWUodmlkZW8pO1xcXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcXFxuICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIFtdLmZvckVhY2guY2FsbChhdWRpb3MsIGZ1bmN0aW9uIChhdWRpbykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbXV0ZU1lKGF1ZGlvKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge31cXFxcbiAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICBbXS5mb3JFYWNoLmNhbGwodjIsIGZ1bmN0aW9uICh2KSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBtdXRlTWUodik7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XFxcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKHYzLCBmdW5jdGlvbiAodikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbXV0ZU1lKHYpO1xcXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcXFxuICAgICAgICAgICAgICAgIHZhciB1cmxzID0gX2dldFVybHMoKTtcXFxcbiAgICAgICAgICAgICAgICAvLyBmYmEubG9nKEpTT04uc3RyaW5naWZ5KHVybHMpKTtcXFxcbiAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGkgaW4gdXJscykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHU9dXJsc1tpXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeXt1PWRlY29kZVVSSUNvbXBvbmVudCh1KTt9Y2F0Y2goZSl7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdT11bmVzY2FwZSh1KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZigvdXJsPWh0dHAvLnRlc3QodSkpe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUgPSB1LnNwbGl0KFxcXFxcXFwidXJsPVxcXFxcXFwiKS5zbGljZSgtMSlbMF07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmJhLmxvZyhcXFxcXFxcInVybOWIhuWJsjpcXFxcXFxcIit1KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKC91cmw9XFxcXFxcXFwvLy50ZXN0KHUpJiYvXFxcXFxcXFwubTN1OC8udGVzdCh1KSl7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhvc3QgPSB1Lm1hdGNoKC8oLiopXFxcXFxcXFwvXFxcXFxcXFwvKC4qPylcXFxcXFxcXC8vKVswXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ID0gaG9zdCt1LnNwbGl0KFxcXFxcXFwidXJsPVxcXFxcXFwiKS5zbGljZSgtMSlbMF07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmJhLmxvZyhcXFxcXFxcInVybOWIhuWJsjpcXFxcXFxcIit1KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYoL3ZpZD1odHRwLy50ZXN0KHUpKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ID0gdS5zcGxpdChcXFxcXFxcInZpZD1cXFxcXFxcIikuc2xpY2UoLTEpWzBdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcXFxcXCJ2aWTliIblibI6XFxcXFxcXCIrdSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZigvdmlkPVxcXFxcXFxcLy8udGVzdCh1KSYmL1xcXFxcXFxcLm0zdTgvLnRlc3QodSkpe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBob3N0ID0gdS5tYXRjaCgvKC4qKVxcXFxcXFxcL1xcXFxcXFxcLyguKj8pXFxcXFxcXFwvLylbMF07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdSA9IGhvc3QrdS5zcGxpdChcXFxcXFxcInZpZD1cXFxcXFxcIikuc2xpY2UoLTEpWzBdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcXFxcXCJ2aWTliIblibI6XFxcXFxcXCIrdSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKC9cXFxcXFxcXD8oLiopPWh0dHAvLnRlc3QodSkmJi9cXFxcXFxcXC5tM3U4Ly50ZXN0KHUpKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ID0gXFxcXFxcXCJodHRwXFxcXFxcXCIrdS5zcGxpdCgvXFxcXFxcXFw/KC4qKT1odHRwLykuc2xpY2UoLTEpWzBdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcXFxcXCLlhbbku5bliIblibI6XFxcXFxcXCIrdSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL3xpbmRleFxcXFxcXFxcLm0zdTgkXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKC9cXFxcXFxcXC8xXFxcXFxcXFwubTN1OC8udGVzdCh1KSl7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG5cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZWFsVXJsID0gaXNWaWRlbyh1LHJlY2hhbmdlKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHR5cGVvZihyZWFsVXJsKT09J3N0cmluZycpe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcXFxcXCLku5PlupN4NeWFjeWXhee7k+aenDpcXFxcXFxcIityZWFsVXJsKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2Z5X2JyaWRnZV9hcHAuc2V0V2ViVWEoUENfVUEpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZWFsVXJsXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9Y2F0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cXFxcbiAgICAgICAgICAgIC8vIGZiYS5sb2coJ2NvdW50OicgKyB3aW5kb3cuY291bnQgKyAnLG1heF9jb3VudDonICsgbWF4X2NvdW50KTtcXFxcbiAgICAgICAgICAgIGlmICh3aW5kb3cuY291bnQgPj0gbWF4X2NvdW50KSB7XFxcXG4gICAgICAgICAgICAgICAgZmJhLmNsZWFyVmFyKCd4NUxpc3QnKTtcXFxcbiAgICAgICAgICAgICAgICBmYmEuaGlkZUxvYWRpbmcoKTtcXFxcbiAgICAgICAgICAgICAgICBsZXQgZm1zZyA9ICfpgZPplb/ku5PlupPpgJrlhY3op6PmnpDlpLHotKUs5Y6f5ZugOui2heaXticreDVUaW1lb3V0Kyfmr6vnp5InO1xcXFxuICAgICAgICAgICAgICAgIGZiYS5sb2coZm1zZyk7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovLycrZm1zZztcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfWNhdGNoIChlKSB7XFxcXG4gICAgICAgICAgICBmYmEubG9nKGUubWVzc2FnZSk7XFxcXG4gICAgICAgIH1cXFxcblxcXFxuICAgICAgICBmdW5jdGlvbiBtdXRlTWUoZWxlbSkge1xcXFxuICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICBlbGVtLnBhdXNlKCk7XFxcXG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1cXFxcblxcXFxuICAgICAgICB2YXIgdmlkZW9zID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbChcXFxcXFxcInZpZGVvXFxcXFxcXCIpLCBhdWRpb3MgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKFxcXFxcXFwiYXVkaW9cXFxcXFxcIiksXFxcXG4gICAgICAgICAgICB2MiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoXFxcXFxcXCJlbWJlZFxcXFxcXFwiKSwgdjMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKFxcXFxcXFwiI3BsYXllclxcXFxcXFwiKTtcXFxcbiAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgIFtdLmZvckVhY2guY2FsbCh2aWRlb3MsIGZ1bmN0aW9uICh2aWRlbykge1xcXFxuICAgICAgICAgICAgICAgIG11dGVNZSh2aWRlbyk7XFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICB9XFxcXG4gICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICBbXS5mb3JFYWNoLmNhbGwoYXVkaW9zLCBmdW5jdGlvbiAoYXVkaW8pIHtcXFxcbiAgICAgICAgICAgICAgICBtdXRlTWUoYXVkaW8pO1xcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKHYyLCBmdW5jdGlvbiAodikge1xcXFxuICAgICAgICAgICAgICAgIG11dGVNZSh2KTtcXFxcbiAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgIFtdLmZvckVhY2guY2FsbCh2MywgZnVuY3Rpb24gKHYpIHtcXFxcbiAgICAgICAgICAgICAgICBtdXRlTWUodik7XFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICB9XFxcXG4gICAgICAgIHZhciB1cmxzID0gX2dldFVybHMoKTtcXFxcbiAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgIGZvciAobGV0IGkgaW4gdXJscykge1xcXFxuICAgICAgICAgICAgICAgIGxldCB1PXVybHNbaV07XFxcXG4gICAgICAgICAgICAgICAgLy91PWRlY29kZVVSSUNvbXBvbmVudCh1KTtcXFxcbiAgICAgICAgICAgICAgICB0cnl7dT1kZWNvZGVVUklDb21wb25lbnQodSk7fWNhdGNoKGUpe1xcXFxuICAgICAgICAgICAgICAgICAgICB1PXVuZXNjYXBlKHUpO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBpZigvdXJsPWh0dHAvLnRlc3QodSkpe1xcXFxuICAgICAgICAgICAgICAgICAgICB1ID0gdS5zcGxpdChcXFxcXFxcInVybD1cXFxcXFxcIikuc2xpY2UoLTEpWzBdO1xcXFxuICAgICAgICAgICAgICAgIH1lbHNlIGlmKC92aWQ9aHR0cC8udGVzdCh1KSl7XFxcXG4gICAgICAgICAgICAgICAgICAgIHUgPSB1LnNwbGl0KFxcXFxcXFwidmlkPVxcXFxcXFwiKS5zbGljZSgtMSlbMF07XFxcXG4gICAgICAgICAgICAgICAgfWVsc2UgaWYoL1xcXFxcXFxcPyguKik9aHR0cC8udGVzdCh1KSl7XFxcXG4gICAgICAgICAgICAgICAgICAgIHUgPSBcXFxcXFxcImh0dHBcXFxcXFxcIit1LnNwbGl0KC9cXFxcXFxcXD8oLiopPWh0dHAvKS5zbGljZSgtMSlbMF07XFxcXG4gICAgICAgICAgICAgICAgICAgIC8vZmJhLmxvZyhcXFxcXFxcIuWFtuS7luWIhuWJsjpcXFxcXFxcIit1KTtcXFxcbiAgICAgICAgICAgICAgICB9ZWxzZSBpZigvXFxcXFxcXFwvMVxcXFxcXFxcLm0zdTgkLy50ZXN0KHUpKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuXFxcXG4gICAgICAgICAgICAgICAgbGV0IHJlYWxVcmwgPSBpc1ZpZGVvKHUpO1xcXFxuICAgICAgICAgICAgICAgIGlmIChyZWFsVXJsKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcX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ICAgbGV0IHBVcmw9Y2FjaGVNM3U4KHR1cmwpO1xcXFxuICAgICAgICAgICAgdmlkZW9zLnB1c2gocFVybCk7XFxcXG4gICAgICAgICAgICBjb250aW51ZTtcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgbGV0IHVybCA9IEpTT04ucGFyc2UoYmFja2NvZGUpLnVybDtcXFxcbiAgICAgICAgICAgIGlmKC9eaHR0cC8udGVzdCh1cmwpKXtcXFxcbiAgICAgICAgICAgICAgICBsZXQgcmVhbFZpZGVvID0gaXNWaWRlbyh1cmwpO1xcXFxuICAgICAgICAgICAgICAgIGlmKHR5cGVvZihyZWFsVmlkZW8pPT0nc3RyaW5nJyl7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxvZyh0bmFtZSsn5bey6Kej5p6Q5Ye66KeG6aKROicrcmVhbFZpZGVvKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYoam5hbWUpe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVhbFZpZGVvKz1cXFxcXFxcIuKYhVxcXFxcXFwiK2puYW1lXFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgdmlkZW9zLnB1c2gocmVhbFZpZGVvKTtcXFxcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXFxcbiAgICAgICAgICAgICAgICAgICAgbG9nKHRuYW1lKyfop6PmnpDlh7rkuI3nn6XpgZPku4DkuYjkuJzopb86Jyt1cmwpO1xcXFxuICAgICAgICAgICAgICAgICAgICB1cmwrPVxcXFxcXFwiI2lzVmlkZW89dHJ1ZSNcXFxcXFxcIjtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYoam5hbWUpe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdXJsKz1cXFxcXFxcIuKYhVxcXFxcXFwiK2puYW1lXFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgdmlkZW9zLnB1c2godXJsKTtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9ZWxzZXtcXFxcbiAgICAgICAgICAgICAgICBsb2codG5hbWUrJ+S4umpzb27mjqXlj6PkuJTml6Dov5Tlm57op4bpopHlnLDlnYDmlbDmja46JytwbGF5VXJsTGlzdFtpXSsnXFxcXFxcXFxuJytiYWNrY29kZSk7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1jYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgbG9nKHRuYW1lKyfkuLp4NeaOpeWPoyzliqDlhaV4NeWXheaOouWIl+ihqCcpO1xcXFxuICAgICAgICAgICAgeDVsaXN0LnB1c2gocGxheVVybExpc3RbaV0pO1xcXFxuICAgICAgICB9XFxcXG4gICAgfVxcXFxuICAgIC8vIGxvZyh2aWRlb3MpO1xcXFxuICAgIGlmKHZpZGVvcy5sZW5ndGg+MCl7XFxcXG4gICAgICAgIGlmKGdldFZhcignZHAuY2FjaGVWaWRlbycsJ3RydWUnKT09PSd0cnVlJyYmcGFyc2VJbnQoZ2V0QXBwVmVyc2lvbigpKT49MjI1NSlcXFxcbiAgICAgICAge1xcXFxuICAgICAgICAgICAgbG9nKFxcXFxcXFwi5bCK5pWs55qE6a2U5pat55So5oi377yM6KeG6aKR57yT5a2Y5bey5ZCv55So77yM6K+35bC95oOF5Lqr5Y+X55yL5Ymn5pe25YWJXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgbGV0IHZpZGVvc0NhY2hlPXZpZGVvcy5tYXAoKGl0KT0+e1xcXFxuICAgICAgICAgICAgICAgIGxldCBoZWFkZXJzPXt9O1xcXFxuICAgICAgICAgICAgICAgIGlmKGl0LnNwbGl0KFxcXFxcXFwiO1xcXFxcXFwiKS5sZW5ndGg+MSl7XFxcXG4gICAgICAgICAgICAgICAgICAgIGxldCBoZWFkID0gaXQuc3BsaXQoJzsnKVsxXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgaWYoL0AvLnRlc3QoaGVhZCkmJi97fH0vLnRlc3QoaGVhZCkpe1xcXFxuLy9oZWFkID0gaGVhZC5yZXBsYWNlKC97fH0vZywnJyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkID0gaGVhZC5zcGxpdChcXFxcXFxcIntcXFxcXFxcIilbMV0uc3BsaXQoXFxcXFxcXCJ9XFxcXFxcXCIpWzBdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaGVhZCA9IGhlYWQuc3BsaXQoJyYmJyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGkgaW4gaGVhZCl7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGtleSA9IGhlYWRbaV0uc3BsaXQoJ0AnKVswXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgdmFsdWUgPWhlYWRbaV0uc3BsaXQoJ0AnKVsxXS5yZXBsYWNlKC87Lywn77yb77ybJyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyc1trZXldID0gdmFsdWU7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOml0LnNwbGl0KFxcXFxcXFwiO1xcXFxcXFwiKVswXS5zcGxpdChcXFxcXFxcIuKYhVxcXFxcXFwiKVswXSxcXFxcbiAgICAgICAgICAgICAgICAgICAgb3B0aW9uczp7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOmhlYWRlcnNcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgdmFyIGRhdGE9YmF0Y2hDYWNoZU0zdTgodmlkZW9zQ2FjaGUpO1xcXFxuICAgICAgICAgICAgZGF0YT1kYXRhLm1hcCgoaXQsaWQpPT57XFxcXG4gICAgICAgICAgICAgICAgbGV0IGV4dHJhPVxcXFxcXFwiXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgaWYodmlkZW9zW2lkXS5zcGxpdChcXFxcXFxcIjtcXFxcXFxcIikubGVuZ3RoPjEpe1xcXFxuICAgICAgICAgICAgICAgICAgICBleHRyYT1cXFxcXFxcIjtcXFxcXFxcIit2aWRlb3NbaWRdLnNwbGl0KFxcXFxcXFwiO1xcXFxcXFwiKVsxXTtcXFxcbiAgICAgICAgICAgICAgICB9ZWxzZSBpZih2aWRlb3NbaWRdLnNwbGl0KFxcXFxcXFwi4piFXFxcXFxcXCIpLmxlbmd0aD4xKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE9XFxcXFxcXCLimIVcXFxcXFxcIit2aWRlb3NbaWRdLnNwbGl0KFxcXFxcXFwi4piFXFxcXFxcXCIpWzFdO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcblxcXFxuICAgICAgICAgICAgICAgIGlmKGl0K1xcXFxcXFwiXFxcXFxcXCIhPVxcXFxcXFwibnVsbFxcXFxcXFwiKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGl0K2V4dHJhXFxcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2aWRlb3NbaWRdXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAvL2xvZyhkYXRhKTtcXFxcbiAgICAgICAgICAgIHJldHVybiBkYXRhXFxcXG4gICAgICAgICAgICAvL3JldHVybiB2aWRlb3NcXFxcbiAgICAgICAgfWVsc2V7XFxcXG4gICAgICAgICAgICByZXR1cm4gdmlkZW9zXFxcXG4gICAgICAgIH1cXFxcbiAgICB9XFxcXG4gICAgbG9nK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1xcXFxcXFwiOiBpbnB1dF90ZXh0fSxcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwibmFtZVxcXFxcXFwiOiBkZXZfc2V0X2luZm9bMF0sXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInBhc3N3b3JkXFxcXFxcXCI6IGRldl9zZXRfaW5mb1sxXX1cXFxcbiAgICAgICAgICAgIH07XFxcXG4gICAgICAgICAgICAvLyBsb2coc2VuZF9kYXRhKTtcXFxcbiAgICAgICAgICAgIGxldCBwYXIyID0ge2hlYWRlcnM6eydjb250ZW50LXR5cGUnOidhcHBsaWNhdGlvbi9qc29uO2NoYXJzZXQ9VVRGLTgnLCdVc2VyLUFnZW50JzpkZXZfc2V0X2luZm9bM119LGJvZHk6SlNPTi5zdHJpbmdpZnkoc2VuZF9kYXRhKSxtZXRob2Q6J1BPU1QnfTtcXFxcbiAgICAgICAgICAgIC8vIHBhcjIgPSBKU09OLnN0cmluZ2lmeShwYXIyKTsgLy94NemHjOmdouivt+axguaJjemcgOimgee8lueggVxcXFxuICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgYmFja19yZXQgPSByZXF1ZXN0KGluZm9fc2V0X3VybCwgcGFyMik7XFxcXG4gICAgICAgICAgICAgICAgYmFja19yZXQgPSBKU09OLnBhcnNlKGJhY2tfcmV0KS5yZXN1bHQ7XFxcXG4gICAgICAgICAgICAgICAgaWYoYmFja19yZXQuc3RhdHVzPT09MCl7XFxcXG4gICAgICAgICAgICAgICAgICAgIC8vIHJlZnJlc2hQYWdlKCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kv53lrZjmiJDlip9cXFxcXFxcXG4nK2JhY2tfcmV0LmRldGFpbDtcXFxcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S/neWtmOWksei0pVxcXFxcXFxcbicrYmFja19yZXQuZGV0YWlsO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH1jYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/plJnor69cXFxcXFxcXG4nK2UubWVzc2FnZTtcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfWVsc2V7XFxcXG4gICAgICAgICAgICBjb25maXJtKHt0aXRsZTon6YGT6ZW/5o+Q56S6Jyxjb250ZW50Oifomb3nhLbkvaDlvojmh5LvvIzkvYbmmK/lhazlkYroh7PlsJHlhpk05Liq5a2X5ZCn77yBJ30pO1xcXFxuICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcXFxuICAgICAgICB9XFxcXG4gICAgfSlcXFxcbn0pO1xcXFxuXFxcXG5zZXRSZXN1bHQoZCk7XFxcIn1dXCJ9IiwicGljVXJsIjoiaHR0cHM6Ly9jZi1pcGZzLmNvbS9pcGZzL1FtWHhnRFZBWkxXaEZ4aWtyQUZWUFJaUXVKMnVGYWU3c3lYaEZ1YlB3TXdVaVUiLCJ0aXRsZSI6IuOAjFTlkIjpm4bjgI0ifQ==
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement