Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 海阔视界规则分享,当前分享的是:二级页面详情¥page_detail¥全部规则@@eyJkYXRhIjoie1wiYXNzb2NpYXRlZE1vZGVsc01hcEZvckpvaW5UYWJsZVwiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhGS1wiOnt9LFwiYXNzb2NpYXRlZE1vZGVsc01hcFdpdGhvdXRGS1wiOnt9LFwiZmllbGRzVG9TZXRUb0RlZmF1bHRcIjpbXSxcImlkXCI6MCxcImxhc3RfY2hhcHRlcl9ydWxlXCI6XCJcIixcImxpc3RUb0NsZWFyQXNzb2NpYXRlZEZLXCI6W10sXCJsaXN0VG9DbGVhclNlbGZGS1wiOltdLFwicGFnZUxpc3RcIjpbe1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIuW3peWFt1wiLFwicGF0aFwiOlwidXRpbGl5XCIsXCJydWxlXCI6XCJqczpcXG5sZXQgaG9zdCA9IFxcXCJodHRwOi8vaGlrZXIubm9raWEucHJlc3NcXFwiO1xcbi8vbGV0IGhvc3QgPSBcXFwiaHR0cDovLzE5Mi4xNjguMy45NDo4MDc5XFxcIjtcXG5sZXQgaG9tZSA9IGJhc2U2NERlY29kZShcXFwiYUdsclpYSTZMeTlvYjIxbFxcXCIpO1xcbnZhciBhcGkgPSB7XFxuICAgIGhvc3Q6IGhvc3QrXFxcIi9oaWtlcnVsZVxcXCIsXFxuICAgIHVzZXJzVXJsOiBcXFwiL2Rldi91c2Vycz9vcmRlcj1cXFwiLCAvL+eUqOaIt+WIl+ihqFxcbiAgICBydWxlQ291bnRVcmw6IFxcXCIvZGV2L3J1bGVjb3VudFxcXCIsIC8v6I635Y+W6KeE5YiZ5pWw6YePXFxuICAgIHJ1bGVzVXJsOiBcXFwiL2Rldi9nZXRcXFwiLCAvL+eUqOaIt+WvueW6lOeahOinhOWImeWIl+ihqOS7heS7heiOt+WPluWFrOW8gFxcbiAgICBydWxl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gICAgIGxldCBtb250aCA9IGRhdGUuZ2V0TW9udGgoKSArIDE7XFxuICAgICAgICAgICAgbGV0IHN0ckRhdGUgPSBkYXRlLmdldERhdGUoKTtcXG4gICAgICAgICAgICBsZXQgc3RySG91cnMgPSBkYXRlLmdldEhvdXJzKCk7XFxuICAgICAgICAgICAgbGV0IHN0ck1pbnV0ZXMgPSBkYXRlLmdldE1pbnV0ZXMoKTtcXG4gICAgICAgICAgICBsZXQgc3RyU2Vjb25kcyA9IGRhdGUuZ2V0U2Vjb25kcygpKzE7XFxuICAgICAgICAgICAgaWYgKG1vbnRoID49IDEgJiYgbW9udGggPD0gOSkge1xcbiAgICAgICAgICAgICAgICBtb250aCA9IFxcXCIwXFxcIiArIG1vbnRoXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmIChzdHJEYXRlID49IDAgJiYgc3RyRGF0ZSA8PSA5KSB7XFxuICAgICAgICAgICAgICAgIHN0ckRhdGUgPSBcXFwiMFxcXCIgKyBzdHJEYXRlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGlmIChzdHJIb3VycyA+PSAwICYmIHN0ckhvdXJzIDw9IDkpIHtcXG4gICAgICAgICAgICAgICAgc3RySG91cnMgPSBcXFwiMFxcXCIgKyBzdHJIb3Vyc1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAoc3RyTWludXRlcyA+PSAwICYmIHN0ck1pbnV0ZXMgPD0gOSkge1xcbiAgICAgICAgICAgICAgICBzdHJNaW51dGVzID0gXFxcIjBcXFwiICsgc3RyTWludXRlc1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBpZiAoc3RyU2Vjb25kcyA+PSAwICYmIHN0clNlY29uZHMgPD0gOSkge1xcbiAgICAgICAgICAgICAgICBzdHJTZWNvbmRzID0gXFxcIjBcXFwiICsgc3RyU2Vjb25kc1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAvL2xldCBjdXJyZW50ZGF0ZSA9IGRh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3VybDtcXG4gICAgICAgICAgICAgICAgY29weShpbXBvcnRfcnVsZSk7XFxuICAgICAgICAgICAgICAgIGNvbnN0IHBhdGggPSAnaGlrZXI6Ly9maWxlcy9ydWxlcy9kekhvdXNlL3J1bGVDYWNoZS9zdWIuanNvbic7XFxuICAgICAgICAgICAgICAgICQucmMoY29uZmlnLmxpYi5zdWIpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4g6K6i6ZiF5a+85YWlKHBhdGgpXFxuICAgICAgICAgICAgfSxkYXRhSXRlbSxzdWJVcmwpLFxcbiAgICAgICAgICAgIGNvbF90eXBlOiBteV9jb2xfdHlwZVxcbiAgICAgICAgfSk7XFxuICAgIH1cXG59XFxuaWYgKHJ1bGVDb2RlKSB7XFxuICAgIGRhdGEucHVzaCh7XFxuICAgICAgICB0aXRsZTogXFxcIuWIhuS6q+inhOWImVxcXCIsXFxuICAgICAgICB1cmw6IFxcXCJjb3B5Oi8vXFxcIiArIHJ1bGVDb2RlLFxcbiAgICAgICAgY29sX3R5cGU6IG15X2NvbF90eXBlXFxuICAgIH0pO1xcbn1cXG5cXG5mdW5jdGlvbiBzZXRTZXR0aW5nSXRlbShiYXNpYywgcGF0dGVybikge1xcbiAgICBsZXQgdGVtcCA9IHtcXG4gICAgICAgIHRpdGxlOiBiYXNpYy50aXRsZSxcXG4gICAgICAgIGNvbF90eXBlOiBiYXNpYy5jb2xfdHlwZSxcXG4gICAgICAgIHVybDogJChiYXNpYy5jb25maXJtKS5jb25maXJtKCh1cmwsIG1zZywgcGF0dGVybikgPT4ge1xcbiAgICAgICAgICAgIGxldCBiYWNrQSA9IHJlcXVlc3QodXJsKTtcXG4gICAgICAgICAgICBsZXQgcmV0ID0gSlNPTi5wYXJzZShiYWNrQSk7XFxuICAgICAgICAgICAgaWYgKHJldC5zdGF0dXMgPT0gMCkge1xcbiAgICAgICAgICAgICAgICBwYXR0ZXJuID8gYmFjaygpIDogcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAg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ICAgICAgICAgICBsZXQgYmFjayA9IHJlcXVlc3QoaW5wdXQpO1xcbiAgICAgICAgICAgIGxldCByZXQgPSBKU09OLnBhcnNlKGJhY2spO1xcbiAgICAgICAgICAgIGlmIChyZXQuc3RhdHVzID09IDApIHtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5bey55Sf5oiQ6ZqP5py65a+G56CBXFxcXG5cXFwiICsgcmV0LnJlc3VsdFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6ZqP5py65a+G56CB55Sf5oiQ5aSx6LSlXFxcIlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pXFxuICAgIH0pO1xcbiAgICBsZXQgdGltZU92ZXIgPSB7XFxuICAgICAgICBjb2xfdHlwZTogbXlfY29sX3R5cGVcXG4gICAgfTtcXG4gICAgaWYgKGRhdGFJdGVtLnRpbWVfb3Zlcikge1xcbiAgICAgICAgdGltZU92ZXIudGl0bGUgPSBzbWFsbChjb2xvcihcXFwi55+t5pe25a+G6ZKlXFxcIiwgXFxcImdyZWVuXFxcIikgKyBjb2xvcihcXFwiKOKGkuawuOS5hSlcXFwiLCBcXFwicmVkXFxcIikpO1xcbiAgICAgICAgdGltZU92ZXIudXJsID0gZ2V0QXBpKFxcXCJ0aW1lb3ZlclxcXCIpICsgcmVxQnlHZXQgKyBcXFwiJmZsYWc9MVxcXCI7XFxuICAgICAgICB0aW1lT3Zlci5jb25maXJtID0gXFxcIuaYr+WQpuehruiupOS7peWQjueahOengeiXj+inhOWImeWIhuS6q+S4jei/h+acnz9cXFwiO1xcbiAgICAgICAgdGltZU92ZXIubXNnID0gW1xcXCLlt7Lorr7kuLrmsLjkuYVcXFwiLCBcXFwi6K6+5Li65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ly9wYWdlL2luZm9cXFwiLFxcbiAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgIG5hbWU6IGl0ZW0ubmFtZSxcXG4gICAgICAgICAgICAgICAgdHlwZTogXFxcImxvbmdfdGV4dFxcXCIsXFxuICAgICAgICAgICAgICAgIHRleHQ6IGl0ZW0uZGlzY3Vzc190ZXh0XFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBwaWNfdXJsOiBpdGVtLmF2YXRhcl91cmxcXG4gICAgICAgIH0pO1xcbiAgICB9XFxufVxcbmRhdGEucHVzaCh7XFxuICAgIGNvbF90eXBlOiBcXFwibGluZV9ibGFua1xcXCJcXG59KTtcXG5zZXRSZXN1bHQoZGF0YSk7XCJ9LHtcImNvbF90eXBlXCI6XCJpY29uXzJfcm91bmRcIixcIm5hbWVcIjpcIuinhOWImeWIl+ihqFwiLFwicGF0aFwiOlwicnVsZXNcIixcInJ1bGVcIjpcImpzOlxcbiAgICBhZGRMaXN0ZW5lcignb25DbG9zZScsJC50b1N0cmluZygoKT0+e1xcbiAgICAgICAgY2xlYXJWYXIoXFxcIldhcmVob3VzZS5iYWNrXFxcIik7XFxuICAgICAgICBjbGVhclZhcihcXFwiV2FyZWhvdXNlLmZpbHRlclxcXCIpO1xcbiAgICAgICAgY2xlYXJWYXIoXFxcIldhcmVob3VzZS50eXBlXFxcIik7XFxuICAgICAgICBpZihnZXRWYXIoJ1dhcmVob3VzZS5jYW5fdXBsb2FkJywnJykpe1xcbiAgICAgICAgICAgIGxvZygn5pON5L2c6L+H56aB5q2i5LiK5LygOicrZ2V0VmFyKCdXYXJlaG91c2UuY2FuX3VwbG9hZCcpKTtcXG4gICAgICAgICAgICBjbGVhclZhcihcXFwiV2FyZWhvdXNlLmNhbl91cGxvYWRcXFwiKTtcXG4gICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgIH1cXG4gICAgfSkpO1xcblxcbmlmIChnZXRWYXIoXFxcIldhc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KCdXYXJlaG91c2UuY2FuX3VwbG9hZCcpfHx0aXBzKSxcXG4gICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgIHVybDonaGlrZXI6Ly9lbXB0eSdcXG4gICAgfSk7XFxuICAgIGZ1bmN0aW9uIHNldFVwbG9hZChmbGFnLGNhbl91cGxvYWRfYXBpKSB7XFxuICAgICAgICBmbGFnID0gZmxhZyB8fCAnJztcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgbGV0IGNvZGUgPSBmZXRjaChjYW5fdXBsb2FkX2FwaSwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxcIlVzZXItQWdlbnRcXFwiOiBNT0JJTEVfVUF9LFxcbiAgICAgICAgICAgICAgICBib2R5OiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwicGFyYW1zXFxcIjpcXG4gICAgICAgICAgICAgICAgICAgICAgICB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJ1c2VybmFtZVxcXCI6IGdldFZhcignaG91c2UudXNlcm5hbWUnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInBhc3N3b3JkXFxcIjogZ2V0VmFyKCdob3VzZS5wYXNzd29yZCcpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiY2FuX3VwbG9hZFxcXCI6ICEhZmxhZ1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIGNvZGUgPSBKU09OLnBhcnNlKGNvZGUpLnJlc3VsdDtcXG4gICAgICAgICAgICBpZiAoY29kZS5zdGF0dXMgPT09IDApIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvZGUuZGV0YWlsXFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICfmk43kvZzlpLHotKU6JyArIGNvZGUuZGV0YWlsXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIHJldHVybiAn5pON5L2c5aSx6LSlOicgKyBlLm1lc3NhZ2VcXG4gICAgICAgIH1cXG4gICAgfVxcbiAgICBkYXRhLnB1c2goe1xcbiAgICAgICAgdGl0bGU6J/CfmqvnpoHmraLkuIrkvKAnLFxcbiAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgdXJsOiQoJ+emgeatouivpeW8gOWPkeiAheS4iuS8oOinhOWImT/kvaDnmoTmk43kvZzlsIbooqvns7vnu5/orrDlvZUnKS5jb25maXJtKChpZCxjYW5fdXBsb2FkX2FwaSxzZXRVcGxvYWQpPT57XFxuICAgICAgICAgICAgbGV0IHJldCA9IHNldFVwbG9hZChmYWxzZSxjYW5fdXBsb2FkX2FwaSk7XFxuICAgICAgICAgICAgaWYoIS/mk43kvZzlpLHotKUvLnRlc3QocmV0KSl7XFxuICAgICAgICAgICAgICAgIHB1dFZhcignV2FyZWhvdXNlLmNhbl91cGxvYWQnLCflkKYnKTtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8vJytyZXRcXG4gICAgICAgIH0saWQsY2FuX3VwbG9hZF9hcGksc2V0VXBsb2FkKVxcbiAgICB9KTtcXG4gICAgZGF0YS5wdXNoKHtcXG4gICAgICAgIHRpdGxlOifinIXlhYHorrjkuIrkvKAnLFxcbiAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgdXJsOiQoJ+WFgeiuuOivpeW8gOWPkeiAheS4iuS8oOinhOWImT/kvaDnmoTmk43kvZzlsIbooqvns7vnu5/orrDlvZUnKS5jb25maXJtKChpZCxjYW5fdXBsb2FkX2FwaSxzZXRVcGxvYWQpPT57XFxuICAgICAgICA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FwiQEBcXFwiICsgcnVsZUxpc3RKc29uICsgZGF0YUl0ZW0uaWQ7XFxuICAgICAgICBsZXQgc3ViX3VybCA9ICdydWxlOi8vJyArIGJhc2U2NEVuY29kZShzdWJfcnVsZV9jb2RlKTtcXG4gICAgICAgIGRhdGEucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICforqLpmIXlkIjpm4YnLFxcbiAgICAgICAgICAgIHVybDogc3ViX3VybCxcXG4gICAgICAgICAgICBjb2xfdHlwZTogbXlfY29sX3R5cGUyXFxuICAgICAgICB9KTtcXG4gICAgICAgIGRhdGEucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ08c3BhbiBzdHlsZT1cXFwiY29sb3I6ICNmZjcwMDBcXFwiPuWvvOWFpei9u+WQiOmbhjwvc3Bhbj4nLFxcbiAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChkYXRhSXRlbSxzdWJVcmwpPT57XFxuICAgICAgICAgICAgICAgIGNvbnN0IHtnZW5SdWxlfT0kLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS9nZW5BcGlcXFwiKTtcXG4gICAgICAgICAgICAgICAgbGV0IGltcG9ydF9ydWxlPWdlblJ1bGUoZGF0YUl0ZW0ubmFtZStcXFwiLlxcXCIrZGF0YUl0ZW0uYXV0aG9yLHN1YlVybCk7XFxuICAgICAgICAgICAgICAgIC8vY29weShpbXBvcnRfcnVsZSk7XFxuICAgICAgICAgICAgICAgIGxldCBydWxlQ29kZT1wYXJzZVBhc3RlKGltcG9ydF9ydWxlLnNwbGl0KFxcXCJcXFxcblxcXCIpWzBdKTtcXG4gICAgICAgICAgICAgICAgLy9yZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgIGltcG9ydFVybCA9ICdydWxlOi8vJyArIGJhc2U2NEVuY29kZShydWxlQ29kZSk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBpbXBvcnRVcmxcXG4gICAgICAgICAgICB9LGRhdGFJdGVtLHJ1bGVMaXN0SnNvbiArIGRhdGFJdGVtLmlkKSxcXG4gICAgICAgICAgICBjb2xfdHlwZTogbXlfY29sX3R5cGUyXFxuICAgICAgICB9KTtcXG4gICAgICAgIGRhdGEucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICfigJzigJzigJ3igJ08c3BhbiBzdHlsZT1cXFwiY29sb3I6ICNmZjcwMDBcXFwiPuWvvOWFpemBk+W+t+e7jzwvc3Bhbj4nLFxcbiAgICAgICAgICAgIHVybDogJCgpLmxhenlSdWxlKChkYXRhSXRlbSxzdWJVcmwpPT57XFxuICAgICAgICAgICAgICAgIC8vIGxldCB0aXRsZSA9IFxcXCJILVxcXCIrZGF0YUl0ZW0ubmFtZStcXFwiLlxcXCIrZGF0YUl0ZW0uYXV0aG9yO1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBcXFwiSi1cXFwiK2RhdGFJdGVtLm5hbWUuc3BsaXQoJy4nKVswXTtcXG4gICAgICAgICAgICAgICAgbGV0IHN1Yk9iaiA9IHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogc3ViVXJsLFxcbiAgICAgICAgICAgICAgICAgICAgZGVzYzogXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvZHpIb3VzZS9ydWxlQ2FjaGUvXFxcIit0aXRsZStcXFwiLmpzb25cXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgY29kZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgICAgICBhY3RpdmU6IGZhbHNlLC8v56aB55So5bm25Y+R5pu05pawXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgbGV0IHNoYXJlVGV4dCA9IGJhc2U2NEVuY29kZShKU09OLnN0cmluZ2lmeShzdWJPYmopKTtcXG4gICAgICAgICAgICAgICAgdmFyIHBhc3RlcyA9IGdldFBhc3Rl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ZSArIFxcXCJAQFxcXCIgKyBydWxlTGlzdEpzb24gKyBkYXRhSXRlbS5pZCArICcmZGVidWc9dHJ1ZSc7XFxuICAgICAgICBsZXQgc3ViX3VybCA9ICdydWxlOi8vJyArIGJhc2U2NEVuY29kZShzdWJfcnVsZV9jb2RlKTtcXG4gICAgICAgIGRhdGEucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICforqLpmIXop4TliJknLFxcbiAgICAgICAgICAgIHVybDogc3ViX3VybCxcXG4gICAgICAgICAgICBjb2xfdHlwZTogbXlfY29sX3R5cGVcXG4gICAgICAgIH0pXFxuICAgIH1cXG59XFxuaWYgKGRhdGFJdGVtLmlzX2pzb24gJiYgZGF0YUl0ZW0uZGF0YV90eXBlID09PSBcXFwiaG9tZV9ydWxlX3VybFxcXCIgJiYgIWRhdGFJdGVtLmlzX2pzb25fbGlzdCkge1xcbiAgICBkYXRhLnB1c2goe1xcbiAgICAgICAgdGl0bGU6ICfov5vlhaXpopHpgZMnLFxcbiAgICAgICAgdXJsOiAkKCAvKlxcXCIjbm9Mb2FkaW5nI1xcXCIqLyApLmxhenlSdWxlKChuYW1lLGhvbWUpID0+IHtcXG4gICAgICAgICAgICBsZXQgcnVsZUxpc3QgPSBKU09OLnBhcnNlKHJlcXVlc3QoaG9tZSkpO1xcbiAgICAgICAgICAgIGxldCBoYXNSdWxlID0gcnVsZUxpc3Quc29tZShpdGVtID0+IGl0ZW0udGl0bGUgPT09IG5hbWUpO1xcbiAgICAgICAgICAgIGlmIChoYXNSdWxlKSB7XFxuICAgICAgICAgICAgICAgIHB1dFZhcihcXFwiV2FyZWhvdXNlLmJhY2tcXFwiLCBcXFwiMVxcXCIpO1xcbiAgICAgICAgICAgICAgICBiYWNrKCk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBob21lK1xcXCJzQFxcXCIgKyBuYW1lO1xcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/mnKrlronoo4VcXFwiO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIGRhdGFJdGVtLm5hbWUsYXBpLmhvbWUpLFxcbiAgICAgICAgY29sX3R5cGU6IG15X2NvbF90eXBlXFxuICAgIH0pXFxufVxcbmxldCBtYW5fcnVsZV9zYWZlID0gZ2V0QXBpKFxcXCJtYW5SdWxlU2FmZVxcXCIpK2RhdGFJdGVtLmlkO1xcbmxldCBtYW5fcnVsZV9nb29kID0gZ2V0QXBpKFxcXCJtYW5SdWxlR29vZFxcXCIpK2RhdGFJdGVtLmlkO1xcbi8vIGRhdGFJdGVtLmlzX3NhZmU7XFxuaWYoZ2V0VmFyKCdob3VzZS5pc19tYW5hZ2VyJykpe1xcbiAgICBmdW5jdGlvbiBzZXRJc1NhZmUoZmxhZyxtYW5fcnVsZV9zYWZlKSB7XFxuICAgICAgICBmbGFnID0gZmxhZyB8fCAnJztcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgbGV0IGNvZGUgPSBmZXRjaChtYW5fcnVsZV9zYWZlLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFwiVXNlci1BZ2VudFxcXCI6IE1PQklMRV9VQX0sXFxuICAgICAgICAgICAgICAgIGJvZHk6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJwYXJhbXNcXFwiOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInVzZXJuYW1lXFxcIjogZ2V0VmFyKCdob3VzZS51c2VybmFtZScpLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwicGFzc3dvcmRcXFwiOiBnZXRWYXIoJ2hvdXNlLnBhc3N3b3JkJyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJpc19zYWZlXFxcIjogISFmbGFnXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgY29kZSA9IEpTT04ucGFyc2UoY29kZSkucmVzdWx0O1xcbiAgICAgICAgICAgIGlmIChjb2RlLnN0YXR1cyA9PT0gMCkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gY29kZS5kZXRhaWxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ+aTjeS9nOWksei0pTonICsgY29kZS5kZXRhaWxcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgcmV0dXJuICfmk43kvZzlpLHotKU6JyArIGUubWVzc2FnZVxcbiAgICAgICAgfVxcbiAgICB9XFxuICAgIGZ1bmN0aW9uIHNldElzR29vZChmbGFnLG1hbl9ydWxlX2dvb2QpIHtcXG4gICAgICAgIGZsYWcgPSBmbGFnIHx8ICcnO1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBsZXQgY29kZSA9IGZldGNoKG1hbl9ydWxlX2dvb2QsIHtcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcXCJVc2VyLUFnZW50XFxcIjogTU9CSUxFX1VBfSxcXG4gICAgICAgICAgICAgICAgYm9keToge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcInBhcmFtc1xcXCI6XFxuICAgICAgICAgICAgICAgICAgICAgICAge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwidXNlcm5hbWVcXFwiOiBnZXRWYXIoJ2hvdXNlLnVzZXJuYW1lJyksXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJwYXNzd29yZFxcXCI6IGdldFZhcignaG91c2UucGFzc3dvcmQnKSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcImlzX2dvb2RcXFwiOiAhIWZsYWdcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICBjb2RlID0gSlNPTi5wYXJzZShjb2RlKS5yZXN1bHQ7XFxuICAgICAgICAgICAgaWYgKGNvZGUuc3RhdHVzID09PSAwKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBjb2RlLmRldGFpbFxcbiAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAn5pON5L2c5aSx6LSlOicgKyBjb2RlLmRldGFpbFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICByZXR1cm4gJ+aTjeS9nOWksei0pTonICsgZS5tZXNzYWdlXFxuICAgICAgICB9XFxuICAgIH1cXG4gICAgZGF0YS5wdXNoKHtcXG4gICAgICAgIHRpdGxlOifwn5qr6aOO6ZmpJyxcXG4gICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgIHVybDokKCfmoIforrDor6Xop4TliJnkuLrpo47pmak/6aOO6Zmp6KeE5YiZ5peg5rOV6KKr5a+85YWlJykuY29uZmlybSgoaWQsbWFuX3J1bGVfc2FmZSxzZXRJc1NhZmUpPT57XFxuICAgICAgICAgICAgbGV0IHJldCA9IHNldElzU2FmZShmYWxzZSxtYW5fcnVsZV9zYWZlKTtcXG4gICAgICAgICAgICBpZighL+aTjeS9nOWksei0pS8udGVzdChyZXQpKXtcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8vJytyZXRcXG4gICAgICAgIH0sZGF0YUl0ZW0uaWQsbWFuX3J1bGVfc2FmZSxzZXRJc1NhZmUpXFxuICAgIH0pO1xcbiAgICBkYXRhLnB1c2goe1xcbiAgICAgICAgdGl0bGU6J+Kcheato+W4uCcsXFxuICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxuICAgICAgICB1cmw6JCgn5qC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uID0gZ2V0VmFyKCdXYXJlaG91c2UuRGVzY3JpcHRpb24nLCBcXFwiXFxcIiksXFxuICAgICAgICAgICAgbmFtZSA9IGdldFZhcihcXFwiV2FyZWhvdXNlLlVzZXJBZGRyZXNzXFxcIiwgXFxcIlxcXCIpO1xcbiAgICAgICAgaWYgKFt1c2VybmFtZSwgcGFzc3dvcmQsIG5hbWVdLmluY2x1ZGVzKFxcXCJcXFwiKSkge1xcbiAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/otKblj7cs5a+G56CB5ZKM5pi156ew5LiN6IO95Li656m6XFxcIjtcXG4gICAgICAgIH1cXG4gICAgICAgIHNob3dMb2FkaW5nKFxcXCLmraPlnKjmj5DkuqTnlLPor7fooahcXFwiKTtcXG4gICAgICAgIGxldCByZXN1bHQgPSByZXF1ZXN0KGlucHV0LCB7XFxuICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAnY29udGVudC10eXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nXFxuICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgIFxcXCJwYXJhbXNcXFwiOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwicmVhc29uXFxcIjogZGVzY3JpcHRpb24sXFxuICAgICAgICAgICAgICAgICAgICBcXFwibmFtZVxcXCI6IG5hbWUsXFxuICAgICAgICAgICAgICAgICAgICBcXFwicGFzc3dvcmRcXFwiOiBwYXNzd29yZCxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJxcVxcXCI6IHVzZXJuYW1lXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICBtZXRob2Q6ICdwb3N0J1xcbiAgICAgICAgfSk7XFxuICAgICAgICByZXN1bHQgPSBKU09OLnBhcnNlKHJlc3VsdCkucmVzdWx0O1xcbiAgICAgICAgaGlkZUxvYWRpbmcoKTtcXG4gICAgICAgIGlmIChyZXN1bHQuc3RhdHVzICE9PSAwKSB7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL1xcXCIgKyByZXN1bHQuZGV0YWlsO1xcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IGlkcmVzdWx0ID0gSlNPTi5wYXJzZShyZXF1ZXN0KGdldElkICsgXFxcIj9xcT1cXFwiICsgdXNlcm5hbWUpKTtcXG4gICAgICAgIGlmIChpZHJlc3VsdC5zdGF0dXMgIT09IDApIHtcXG4gICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vXFxcIiArIGlkcmVzdWx0LmRldGFpbDtcXG4gICAgICAgIH1cXG4gICAgICAgIFxcbiAgICAgICAgcmV0dXJuICQoXFxcIlxcXCIsIFxcXCLovpPlhaXpgq7nrrHpqozor4HnoIFcXFxcblxcXCIgKyByZXN1bHQuZGV0YWlsKS5pbnB1dCgoY29uZmlybSwgaWQsIGFjY291bnQpID0+IHtcXG4gICAgICAgICAgICBzaG93TG9hZGluZyhcXFwi6K+36ICQ5b+D562J5b6FXFxcIik7XFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgbGV0IHJlc3VsdCA9IHJlcXVlc3QoY29uZmlybSwge1xcbiAgICAgICAgICAgICAgICAgICAgaGVhZGVyczoge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICdjb250ZW50LXR5cGUnOiAnYXBwbGljYXRpb24vanNvbidcXG4gICAgICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcInBhcmFtc1xcXCI6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcInJlZ2lzdF9pZFxcXCI6IGlkLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwieXptXFxcIjogaW5wdXRcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnXFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICByZXN1bHQgPSBKU09OLnBhcnNlKHJlc3VsdCkucmVzdWx0O1xcbiAgICAgICAgICAgICAgICBpZiAocmVzdWx0LnN0YXR1cyAhPT0gMCkge1xcbiAgICAgICAgICAgICAgICAgICAgaGlkZUxvYWRpbmcoKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly9cXFwiICsgcmVzdWx0LmRldGFpbDtcXG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcihcXFwiV2FyZWhvdXNlVXNlcm5hbWVcXFwiLCBhY2NvdW50WzBdKTtcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcihcXFwiV2FyZWhvdXNlUGFzc3dvcmRcXFwiLCBhY2NvdW50WzFdKTtcXG4gICAgICAgICAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxuICAgICAgICAgICAgICAgICAgICBiYWNrKCk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5oiQ5Yqf5o+Q5Lqk5rOo5YaM5rOo5YaMXFxcXG5cXFwiK3Jlc3VsdC5kZXRhaWw7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/lh7rplJnkuoblkZBcXFwiO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIGNvbmZpcm0sIGlkcmVzdWx0LnJlc3VsdCwgW3VzZXJuYW1lLCBwYXNzd29yZF0pO1xcbiAgICB9LCBnZXRBcGkoXFxcIm5ld19nZXRJZF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pJ1xcbiAgICAgICAgfVxcbiAgICB9KTtcXG4gICAgZGF0YS5wdXNoKHtcXG4gICAgICAgIGNvbF90eXBlOiBcXFwibGluZV9ibGFua1xcXCJcXG4gICAgfSk7XFxuICAgIGRhdGEucHVzaCh7XFxuICAgICAgICB0aXRsZTogXFxcIuS/neWtmFxcXCIsXFxuICAgICAgICB1cmw6ICQoZ2V0QXBpKFxcXCJtb2RpZnlfbmFtZVxcXCIpICsgcGF0aCkubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICAgICAgICAgIGxldCBuZXdQZXROYW1lID0gZ2V0VmFyKCdXYXJlaG91c2UubS5wZXROYW1lJywgJycpO1xcbiAgICAgICAgICAgIGlmIChuZXdQZXROYW1lID09IFxcXCJcXFwiKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly/kvaDov5jku4DkuYjpg73msqHloavllYohXFxcIjtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbGV0IHJlc3VsdCA9IHJlcXVlc3QoaW5wdXQgKyBcXFwiJm5hbWU9XFxcIiArIGVuY29kZVVSSUNvbXBvbmVudChuZXdQZXROYW1lKSk7XFxuICAgICAgICAgICAgcmVzdWx0ID0gSlNPTi5wYXJzZShyZXN1bHQpO1xcbiAgICAgICAgICAgIGlmIChyZXN1bHQuc3RhdHVzID09PSAwKSB7XFxuICAgICAgICAgICAgICAgIGJhY2soKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+S/ruaUueaIkOWKn1xcXCI7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL1xcXCIgKyByZXN1bHQuZGV0YWlsO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pLFxcbiAgICAgICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJ1xcbiAgICB9KTtcXG59XFxuXFxuZnVuY3Rpb24gbV9hdmF0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pzb25cXFwiLEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgICAgIHVzZXJuYW1lOnVzZXJuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgcGFzc3dvcmQ6bmV3X3Bhc3N3b3JkXFxuICAgICAgICAgICAgICAgIH0pKTtcXG4gICAgICAgICAgICAgICAgYmFjaygpO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5L+u5pS55oiQ5YqfXFxcIjtcXG4gICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vXFxcIiArIHJlc3VsdC5kZXRhaWw7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSxwYXNzd29yZCx1c2VybmFtZSksXFxuICAgICAgICBjb2xfdHlwZTogJ3RleHRfY2VudGVyXzEnXFxuICAgIH0pO1xcbn1cXG5cXG5zd2l0Y2ggKFBhdHRlcm4pIHtcXG4gICAgY2FzZSAwOlxcbiAgICAgICAgc2V0UGFnZVRpdGxlKFxcXCLkv67mlLnlpLTlg49cXFwiKTtcXG4gICAgICAgIG1fYXZhdGFyKCk7XFxuICAgICAgICBicmVhaztcXG4gICAgY2FzZSAxOlxcbiAgICAgICAgc2V0UGFnZVRpdGxlKFxcXCLkv67mlLnmmLXnp7BcXFwiKTtcXG4gICAgICAgIG1fcGV0TmFtZSgpO1xcbiAgICAgICAgYnJlYWs7XFxuICAgIGNhc2UgMjpcXG4gICAgICAgIHNldFBhZ2VUaXRsZShcXFwi5L+u5pS55a+G56CBXFxcIik7XFxuICAgICAgICBtX3B3ZCgpO1xcbiAgICAgICAgYnJlYWs7XFxufVxcbnNldFJlc3VsdChkYXRhKTtcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIue8lui+keinhOWImeWkh+azqFwiLFwicGF0aFwiOlwic2V0X3J1bGVfbm90ZXNcIixcInJ1bGVcIjpcImpzOlxcbmxld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XFxcInNldF9ydWxlX25vdGVcXFwiKSArIGlkKS5sYXp5UnVsZSgodXNlcm5hbWUsIHBhc3N3b3JkKSA9PiB7XFxuICAgICAgICBsZXQgbm90ZXMgPSBnZXRWYXIoJ1dhcmVob3VzZS5ydWxlLm5vdGVzJywgJycpO1xcbiAgICAgICAgbGV0IHJlc3VsdCA9IHJlcXVlc3QoaW5wdXQsIHtcXG4gICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICdjb250ZW50LXR5cGUnOiAnYXBwbGljYXRpb24vanNvbidcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgXFxcInBhcmFtc1xcXCI6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJxcVxcXCI6IHVzZXJuYW1lLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInBhc3N3b3JkXFxcIjogcGFzc3dvcmQsXFxuICAgICAgICAgICAgICAgICAgICBcXFwibm90ZVxcXCI6bm90ZXNcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnXFxuICAgICAgICB9KTtcXG4gICAgICAgIHJlc3VsdCA9IEpTT04ucGFyc2UocmVzdWx0KS5yZXN1bHQ7XFxuICAgICAgICBpZiAocmVzdWx0LnN0YXR1cyAhPT0gMCkge1xcbiAgICAgICAgICAgIHJldHVybiBcXFwidG9hc3Q6Ly9cXFwiICsgcmVzdWx0LmRldGFpbDtcXG4gICAgICAgIH1cXG4gICAgICAgIGJhY2soZmFsc2UpO1xcbiAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+S/ruaUueaIkOWKn1xcXCI7XFxuICAgIH0sIHVzZXJuYW1lLCBwYXNzd29yZClcXG59KTtcXG5zZXRSZXN1bHQoZGF0YSk7XCJ9LHtcImNvbF90eXBlXCI6XCJsaW5lXCIsX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yBcXFwiJnBhc3N3b3JkPVxcXCIgKyBwYXNzd29yZCtcXFwiI25vTG9hZGluZyNcXFwiKS5sYXp5UnVsZSgoKT0+e1xcbiAgICAgICAgICAgICAgICBsZXQgcmVzdWx0PUpTT04ucGFyc2UocmVxdWVzdChpbnB1dCkpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZShmYWxzZSlcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL1xcXCIrcmVzdWx0LmRldGFpbDtcXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICBjb2xfdHlwZTpcXFwidGV4dF8yXFxcIlxcbiAgICAgICAgfSk7XFxuICAgICAgICBkYXRhLnB1c2goe1xcbiAgICAgICAgICAgIHRpdGxlOlxcXCLliKDpmaTor4TorrpcXFwiLFxcbiAgICAgICAgICAgIHVybDokKFxcXCLnoa7orqTliKDpmaTor6Xor4Torro/XFxcIikuY29uZmlybSgoaW5wdXQpPT57XFxuICAgICAgICAgICAgICAgIGxldCByZXN1bHQ9SlNPTi5wYXJzZShyZXF1ZXN0KGlucHV0KSk7XFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKVxcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8vXFxcIityZXN1bHQuZGV0YWlsO1xcbiAgICAgICAgICAgIH0sYXBpLmRpc19kZXZfY29udHJvbCtwaWQrXFxcIj9xcT1cXFwiICsgdXNlcm5hbWUgKyBcXFwiJnBhc3N3b3JkPVxcXCIgKyBwYXNzd29yZCtcXFwiJmRlbGV0ZT0xXFxcIiksXFxuICAgICAgICAgICAgY29sX3R5cGU6XFxcInRleHRfMlxcXCJcXG4gICAgICAgIH0pO1xcbiAgICAgICAgZGF0YS5wdXNoKHtcXG4gICAgICAgICAgICBjb2xfdHlwZTpcXFwibGluZVxcXCJcXG4gICAgICAgIH0pO1xcbiAgICAgICAgZGF0YS5wdXNoKHtcXG4gICAgICAgICAgICBjb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2NvZGU9YXV0aF9jb2RlfHxcXFwiXFxcIjtcXG4gICAgICAgIGlmKHFxPT1cXFwiXFxcInx8YXV0aF9jb2RlPT1cXFwiXFxcIil7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+acqueZu+W9lei0puWPt1xcXCI7XFxuICAgICAgICB9XFxuICAgICAgICBpZih0ZXh0PT1cXFwiXFxcIil7XFxuICAgICAgICAgICAgcmV0dXJuIFxcXCJ0b2FzdDovL+S9oOi/mOS7gOS5iOmDveayoeWGmeWVilxcXCI7XFxuICAgICAgICB9XFxuICAgICAgICBmdW5jdGlvbiByKHApIHtcXG4gICAgICAgICAgICBsZXQgcmVzdWx0ID0gcmVxdWVzdChpbnB1dCwge1xcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICAgICAnY29udGVudC10eXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nXFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHApLFxcbiAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJ1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKHJlc3VsdCkucmVzdWx0O1xcbiAgICAgICAgfVxcbiAgICAgICAgbGV0IHAgPSB7XFxuICAgICAgICAgICAgXFxcInBhcmFtc1xcXCI6IHtcXG4gICAgICAgICAgICAgICAgXFxcImRpc2N1c3NfdGV4dFxcXCI6IHRleHQsXFxuICAgICAgICAgICAgICAgIFxcXCJxcVxcXCI6IHFxLFxcbiAgICAgICAgICAgICAgICBcXFwiZGlzY3Vzc190eXBlXFxcIjogdHlwZSxcXG4gICAgICAgICAgICAgICAgXFxcImF1dGhfY29kZVxcXCI6IGF1dGhfY29kZVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgICAgIGxldCByZXN1bHQgPSByKHApO1xcbiAgICAg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IFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbn0pO1xcblxcbmRhdGEucHVzaCh7XFxuICAgIHRpdGxlOiBcXFwi6I635Y+WXFxcIixcXG4gICAgY29sX3R5cGU6ICdpbnB1dCcsXFxuICAgIGRlc2M6IFxcXCLor7fovpPlhaVxcVxcXCIsXFxuICAgIHVybDogJC50b1N0cmluZygoYSwgYikgPT4ge1xcbiAgICAgICAgbGV0IHFxID0gaW5wdXQ7XFxuICAgICAgICBpZiAocXEgPT0gXFxcIlxcXCIpIHtcXG4gICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v5L2g6L+Y5LuA5LmI6YO95rKh5aGr5ZWKIVxcXCI7XFxuICAgICAgICB9XFxuICAgICAgICBzaG93TG9hZGluZyhcXFwi6I635Y+W5LitLi4uXFxcIilcXG4gICAgICAgIHJldHVybiAkKFxcXCIjbm9Mb2FkaW5nI1xcXCIpLmxhenlSdWxlKChxcSwgYSwgYikgPT4ge1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBsZXQgcmVzdWx0ID0gcmVxdWVzdChhLCB7XFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAgICAgICAgICdjb250ZW50LXR5cGUnOiAnYXBwbGljYXRpb24vanNvbidcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgICAgICAgICAgXFxcInBhcmFtc1xcXCI6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwicXFcXFwiOiBxcVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCdcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICByZXN1bHQgPSBKU09OLnBhcnNlKHJlc3VsdCkucmVzdWx0O1xcbiAgICAgICAgICAgIGlmIChyZXN1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4sIHtcXG4gICAgICAgICAgICBoZWFkZXJzOiB7XFxuICAgICAgICAgICAgICAgICdjb250ZW50LXR5cGUnOiAnYXBwbGljYXRpb24vanNvbidcXG4gICAgICAgICAgICB9LFxcbiAgICAgICAgICAgIGJvZHk6IEpTT04uc3RyaW5naWZ5KHtcXG4gICAgICAgICAgICAgICAgXFxcInBhcmFtc1xcXCI6IHtcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJxcVxcXCI6IHFxLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcImF1dGhfY29kZVxcXCI6IHl6bVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCdcXG4gICAgICAgIH0pO1xcbiAgICAgICAgcmVzdWx0ID0gSlNPTi5wYXJzZShyZXN1bHQpLnJlc3VsdDtcXG4gICAgICAgIGlmIChyZXN1bHQuc3RhdHVzID09PSAwKSB7XFxuICAgICAgICAgICAgZi51c2VyID0gW3FxLCB5em1dO1xcbiAgICAgICAgICAgIHdyaXRlRmlsZShcXFwiaGlrZXI6Ly9maWxlcy9XYXJlaG91c2VVU0VSLmpzb25cXFwiLCBKU09OLnN0cmluZ2lmeShmKSk7XFxuICAgICAgICAgICAgbGV0IGluZGV4ID0gbC5maW5kSW5kZXgoaXRlbSA9PiBpdGVtWzBdID09PSBxcSk7XFxuICAgICAgICAgICAgaWYgKGluZGV4ID4gLTEpIHtcXG4gICAgICAgICAgICAgICAgbC5zcGxpY2UoaW5kZXgsIDEsIFtxcSwgeXptXSk7XFxuICAgICAgICAgICAgfSBlbHNlIGlmIChsLmxlbmd0aCA8IDYpIHtcXG4gICAgICAgICAgICAgICAgbC5wdXNoKFtxcSwgeXptXSk7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG4gICAgICAgICAgICAgICAgbC5zcGxpY2UoMCwgMSk7XFxuICAgICAgICAgICAgICAgIGwucHVzaChbcXEsIHl6bV0pO1xcbiAgICAgICAgIC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BdO1xcbiAgICAgICAgICAgIGxldCBoZWFkZXJzID0ge1xcbiAgICAgICAgICAgICAgICAnUmVmZXJlcic6J2h0dHBzOi8vYmxvZy5jc2RuLm5ldCcsXFxuICAgICAgICAgICAgICAgICdVc2VyLUFnZW50Jzp1YSxcXG4gICAgICAgICAgICAgICAgJ0FjY2VwdCc6J2FwcGxpY2F0aW9uL2pzb24sIHRleHQvamF2YXNjcmlwdCwgKi8qOyBxPTAuMDEnLFxcbiAgICAgICAgICAgICAgICAnQWNjZXB0LUxhbmd1YWdlJzonemgtQ04nLFxcbiAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgaWYod2ViX3VybF9hcnIubGVuZ3RoPj0zJiZ3ZWJfdXJsX2FyclsyXS5sZW5ndGg+Mil7IC8v6K6+572u57yW56CBXFxuICAgICAgICAgICAgICAgIGhlYWRlcnNbJ2NvbnRlbnQtdHlwZSddID0gJ2NoYXJzZXQ9Jyt3ZWJfdXJsX2FyclsyXS50b1VwcGVyQ2FzZSgpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBsZXQgcGFyYW1zID0ge2hlYWRlcnM6aGVhZGVycyx3aXRoSGVhZGVyczpmYWxzZSxyZWRpcmVjdDpmYWxzZX07XFxuICAgICAgICAgICAgaWYod2ViX3VybF9hcnIubGVuZ3RoPj0yJiZ3ZWJfdXJsX2FyclsxXS5sZW5ndGg+Mil7IC8vIOiuvue9ruivt+axguaWueazlVxcbiAgICAgICAgICAgICAgICBwYXJhbXNbJ21ldGhvZCddID0gd2ViX3VybF9hcnJbMV0udG9VcHBlckNhc2UoKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgbG9nKCflvIDlp4vojrflj5bmupDnoIEnKTtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAvKlxcbiAgICAgICAgICAgICAgICByZXF1ZXN0QXN5bmMod2ViX3VybCxwYXJhbXMsZnVuY3Rpb24gKGtleSxjb2RlKSB7XFxuICAgICAgICAgICAgICAgICAgICBsZXQgYmFja19jb2RlID0gY29kZTtcXG4gICAgICAgICAgICAgICAgICAgIGlmKGJhY2tfY29kZS5sZW5ndGg+MjApe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFZhcignaG91c2UudXBsb2FkX2NvZGUnLGJhY2tfY29kZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+a6kOeggeW3suiOt+WPlizlubbpg6jliIbmj5LlhaXliLDmlofmnKzljLrln58nXFxuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6ZSZ6K+v77yM5pys5qyh6I635Y+W5Yiw56m65paH5pys77yM55aR5Ly85L2g5rKh5pyJ5q2k5paH5Lu2ISc7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICAqL1xcbiAgICAgICAgICAgICAgICBsZXQgYmFja19jb2RlID0gZ2V0SXRlbSgnaG91c2UuZmlsZV91YScpPT09J+eUteiEkSc/ZmV0Y2god2ViX3VybCxwYXJhbXMpOnJlcXVlc3Qod2ViX3VybCxwYXJhbXMpO1xcbiAgICAgICAgICAgICAgICBpZihiYWNrX2NvZGUubGVuZ3RoPjIwKXtcXG4gICAgICAgICAgICAgICAgICAgIHB1dFZhcignaG91c2UudXBsb2FkX2NvZGUnLGJhY2tfY29kZSk7XFxuICAgICAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/mupDnoIHlt7Lojrflj5Ys5bm26YOo5YiG5o+S5YWl5Yiw5paH5pys5Yy65Z+fJ1xcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/plJnor6/vvIzmnKzmrKHojrflj5bliLDnqbrmlofmnKzvvIznlpHkvLzkvaDmsqHmnInmraTmlofku7YhJztcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1jYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICBsb2coZS5tZXNzYWdlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+WPkeeUn+S6humUmeivrzpcXFxcbicrZS5tZXNzYWdlO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1lbHNlIGlmKC/kuLvpopjvv6V85YWD57Sg77+lLy50ZXN0KGlucHV0KSl7XFxuICAgICAgICAgICAgbG9nKCfkuLvpopjpk77mjqUnKTtcXG4gICAgICAgICAgICBsZXQgd2ViX3VybF9hcnIgPSBpbnB1dC5zcGxpdCgn77+lJyk7XFxuICAgICAgICAgICAgbGV0IHdlYl91cmwgPSB3ZWJfdXJsX2Fyclt3ZWJfdXJsX2Fyci5sZW5ndGgtMV07XFxuICAgICAgICAgICAgbGV0IGJhY2tfY29kZSA9IHBhcnNlUGFzdGUod2ViX3VybCk7XFxuICAgICAgICAgICAgaWYoYmFja19jb2RlLmxlbmd0aD4yMCkge1xcbiAgICAgICAgICAgICAgICBwdXRWYXIoJ2hvdXNlLnVwbG9hZF9jb2RlJyxiYWNrX2NvZGUpO1xcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+a6kOeggeW3suiOt+WPlizlubbpg6jliIbmj5LlhaXliLDmlofmnKzljLrln58nXFxuICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/plJnor6/vvIzmnKzmrKHojrflj5bov5Tlm57kuLo6XFxcXG4nK2JhY2tfY29kZTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9ZWxzZXtcXG4gICAgICAgIC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henlSdWxlKChmaWxlX3R5cGUsY29tcGFyZSk9PntcXG4gICAgICAgIGxvZygn5p+l55yL546v5aKD5Y+Y6YePJyk7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIGxldCB1cF9jb2RlID0gZ2V0VmFyKCdob3VzZS51cGxvYWRfY29kZScsJycpO1xcbiAgICAgICAgICAgIGxldCBmdHlwZSA9ICBmaWxlX3R5cGUuZmlsdGVyKGNvbXBhcmUoZ2V0SXRlbSgnaG91c2UuZmlsZV90eXBlJywn6Z2Z5oCB5paH5Lu2JykpKVswXS52YWx1ZTtcXG4gICAgICAgICAgICBsZXQgcmVkaXJlY3QgPSBnZXRJdGVtKCdob3VzZS5maWxlX3JlZGlyZWN0Jywn5pys5ZywJykhPT0n5pys5ZywJztcXG4gICAgICAgICAgICBsZXQgY29kZSA9ICFyZWRpcmVjdD91cF9jb2RlOmlucHV0O1xcbiAgICAgICAgICAgIGxldCBlbnYgPSB7XFxuICAgICAgICAgICAgICAgIHdlYl91cmw6Z2V0VmFyKCdob3VzZS53ZWJfdXJsJywnJyksXFxuICAgICAgICAgICAgICAgIGRldmljZTpnZXRJdGVtKCdob3VzZS5maWxlX3VhJywn55S16ISRJyksXFxuICAgICAgICAgICAgICAgIGZ0eXBlOmZ0eXBlfHxcXFwiXFxcIixcXG4gICAgICAgICAgICAgICAgcmVkaXJlY3Q6cmVkaXJlY3QsXFxuICAgICAgICAgICAgICAgIGNvZGU6Y29kZS5zdWJzdHJpbmcoMCw0MCl8fFxcXCJcXFwiLFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBsb2coZW52KTtcXG4gICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8vJytKU09OLnN0cmluZ2lmeShlbnYpO1xcbiAgICAgICAgICAgIC8vIGFsZXJ0KEpTT04uc3RyaW5naWZ5KGVudikpO1xcbiAgICAgICAgfWNhdGNoIChlKSB7XFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovLycrZS5tZXNz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xcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5LqR5Ymq6LS05p2/5YaF5a655pyJ6K+vJ1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBzd2l0Y2ggKGJrYXJyWzFdKSB7XFxuICAgICAgICAgICAgICAgIGNhc2UgJ215X2hvbWVfdGhlbWUnOlxcbiAgICAgICAgICAgICAgICAgICAgZmlsZU5hbWUgPSB1cF9jb2RlLnNwbGl0KCfjgIwnKVsxXS5zcGxpdCgn44CNJylbMF07XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgY2FzZSAnbXlfaG9tZV9zaW5nbGUnOlxcbiAgICAgICAgICAgICAgICAgICAgZmlsZU5hbWUgPSB1cF9jb2RlLnNwbGl0KCfjgIwnKVsxXS5zcGxpdCgn44CNJylbMF07XFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgY2FzZSAnanNfdXJsJzpcXG4gICAgICAgICAgICAgICAgICAgIGZpbGVOYW1lID0gdXBfY29kZS5zcGxpdCgn77+lJylbMl0uc3BsaXQoJ0AnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/plJnor6/vvIznvZHpobXpk77mjqXml6DlhoXlrrkhJztcXG4gICAgICAgIH1cXG4gICAgICAgIGxldCB1YSA9IGdldEl0ZW0oJ2hvdXNlLmZpbGVfdWEnKT09PSfnlLXohJEnPydNb3ppbGxhLzUuMCAoV2luZG93cyBOVCAxMC4wOyBXaW42NDsgeDY0KSBBcHBsZVdlYktpdC81MzcuMzYgKEtIVE1MLCBsaWtlIEdlY2tvKSBDaHJvbWUvODguMC40MzI0LjE0NiBTYWZhcmkvNTM3LjM2JzonTW96aWxsYS81LjAgKExpbnV4OyBBbmRyb2lkIDk7IE1JIDYpIEFwc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9maWxlcy8oLio/KVxcXFxcXFxcLm0zdTgnKTtcXG4gICAgaWYoY2FjaGVSZWd4LnRlc3QocGxheVVybCkpe1xcbiAgICAgICAgcmV0dXJuIHBsYXlVcmxcXG4gICAgfVxcbiAgICBmdW5jdGlvbiBnZXRIb3N0KHVybCl7XFxuICAgICAgICAvLyBmYmHnmoRwYXJzZUxhennlpKrmhaLkuobljYPkuIfliKvnlKhcXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgcmV0dXJuIHVybC5tYXRjaCgvXmh0dHAocyk/OlxcXFwvXFxcXC8oLio/KVxcXFwvLylbMF0uc2xpY2UoMCwtMSk7XFxuICAgICAgICB9Y2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICByZXR1cm4gZmFsc2VcXG4gICAgICAgIH1cXG4gICAgICAgIC8qXFxuICAgICAgICBpZih0eXBlb2YobG9nKT09PSd1bmRlZmluZWQnKXtcXG4gICAgICAgICAgICByZXR1cm4gIGZiYS5wYXJzZUxhenlSdWxlKCQkJCgpLmxhenlSdWxlKCh1cmwpPT57XFxuICAgICAgICAgICAgICAgIHJldHVybiBnZXRIb21lKHVybClcXG4gICAgICAgICAgICB9LHVybCkpXFxuICAgICAgICB9ZWxzZSB7XFxuICAgICAgICAgICAgcmV0dXJuIGdldEhvbWUodXJsKVxcbiAgICAgICAgfVxcbiAgICAgICAgKi9cXG4gICAgfVxcbiAgICBsZXQgcFVybD1wbGF5VXJsLnNwbGl0KFxcXCI7XFxcIilbMF07Ly/ojrflj5bmiqDmjonmtbfpmJR1YeetieWPguaVsOeahOe9kemhteaSreaUvumTvuaOpVxcbiAgICBsZXQgaG9zdCA9IGdldEhvc3QocFVybCk7IC8vIOiOt+WPluWfn+WQjVxcbiAgICBpZighaG9zdCl7Ly/liKTmlq3ml6Dln5/lkI3nm7TmjqXkuI3mmK/op4bpopFcXG4gICAgICAgIHJldHVybiBmYWxzZVxcbiAgICB9XFxuICAgIGZ1bmN0aW9uIHByaW50KGRhdGEpe1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ckAvLnRlc3QocGxheVVybCkpKXtcXG4gICAgICAgICAgICBpZigvbGVjbG91ZFxcXFwuY29tfGJpbGl2aWRlby8udGVzdChwbGF5VXJsKSl7XFxuICAgICAgICAgICAgICAgIHBsYXlVcmwrPVxcXCI7e1JlZmVyZXJAaHR0cHM6Ly93d3cuYmlsaWJpbGkuY29tLyYmVXNlci1BZ2VudEBNb3ppbGxhLzUuMH1cXFwiO1xcbiAgICAgICAgICAgIH1lbHNlIGlmKC9peGlndWFcXFxcLmNvbS8udGVzdChwbGF5VXJsKSl7XFxuICAgICAgICAgICAgICAgIHBsYXlVcmwrPVxcXCIjaXN2aWRlbz10cnVlIzt7UmVmZXJlckBodHRwczovL3d3dy5peGlndWEuY29tLyYmVXNlci1BZ2VudEBNb3ppbGxhLzUuMH1cXFwiO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBlbHNlIGlmKC9tZ3R2XFxcXC5jb218Ynl0ZWFtb25lLy50ZXN0KHBsYXlVcmwpKXtcXG4gICAgICAgICAgICAgICAgcGxheVVybCs9XFxcIjt7VXNlci1BZ2VudEBNb3ppbGxhLzUuMH1cXFwiO1xcbiAgICAgICAgICAgIH1lbHNlIGlmKC9wdHdvXFxcXC53a2ZpbGVcXFxcLmNvbS8udGVzdChwbGF5VXJsKSYmL3VybD0vLnRlc3QocGxheVVybCkpe1xcbiAgICAgICAgICAgICAgICBwbGF5VXJsPXBsYXlVcmwuc3BsaXQoXFxcInVybD1cXFwiKVsxXStcXFwiO3tSZWZlcmVyQGh0dHBzOi8vZmFudHVhbi50dn1cXFwiXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIC8vIOWkhOeQhuWkp+W4iOWFhOS5i+exu+eahGFwcFxcbiAgICAgICAgICAgIC8vIGVsc2V7XFxuICAgICAgICAgICAgLy8gICAgIHBsYXlVcmwrPVxcXCI7e1VzZXItQWdlbnRATW96aWxsYS81LjB9XFxcIjtcXG4gICAgICAgICAgICAvLyB9XFxuICAgICAgICB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ZhKGdldFJlc0NvZGUoKSx0WzBdKTtcXG4gICAgICAgIGxldCBsaXN0PXBkZmEoaHRtbCx0WzBdKTtcXG4gICAgICAgIGxldCBsYXp5ID0gJCgnJykubGF6eVJ1bGUoKCk9PntcXG4gICAgICAgICAgICBjb25zdCB7bGF6eVBhcnNlfSA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL2dsb2JhbFBhcnNlP3J1bGU96YGT6ZW/5LuT5bqTUHJvJyk7XFxuICAgICAgICAgICAgcmV0dXJuIGxhenlQYXJzZShpbnB1dClcXG4gICAgICAgIH0pO1xcbiAgICAgICAgZm9yKGxldCBpIGluIGxpc3Qpe1xcbiAgICAgICAgICAgIGxldCBfcGljID0gdFsyXT9wZChsaXN0W2ldLHRbMl0pOicnO1xcbiAgICAgICAgICAgIGlmKGlzUGljKF9waWMpJiYhL0BSZWZlcmVyPS8udGVzdChfcGljKSl7XFxuICAgICAgICAgICAgICAgIF9waWMrPSdAUmVmZXJlcj0nXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGxldCBpdD17XFxuICAgICAgICAgICAgICAgIHRpdGxlOnBkZmgobGlzdFtpXSx0WzFdKSxcXG4gICAgICAgICAgICAgICAgcGljX3VybDpfcGljLFxcbiAgICAgICAgICAgICAgICBkZXNjOnBkZmgobGlzdFtpXSx0WzNdKSxcXG4gICAgICAgICAgICAgICAgdXJsOmVqP3BkKGxpc3RbaV0sdFs0XSk6cGQobGlzdFtpXSx0WzRdKStsYXp5XFxuICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICBpZih0Lmxlbmd0aD41KXsvL+WGheWuue+8jOeUqOS6juaQnOe0olxcbiAgICAgICAgICAgICAgICBpdC5jb250ZW50PXBkZmgobGlzdFtpXSx0WzVdKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBkLnB1c2goaXQpO1xcbiAgICAgICAgfVxcbiAgICAgICAgaWYob25seWJhY2spe1xcbiAgICAgICAgICAgIHJldHVybiBkXFxu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AgICAgdHJ5e1xcbiAgICAgICAgICAgIGxldCBydXJsPXJlYWxVcmwuc3BsaXQoXFxcIjtcXFwiKVswXS5zcGxpdChcXFwiI1xcXCIpWzBdO1xcbiAgICAgICAgICAgIHJldHVybiBKU09OLnBhcnNlKHJlcXVlc3QocnVybCx7dGltZW91dDp0bX0pKS51cmxcXG4gICAgICAgIH1jYXRjaChlKXtcXG4gICAgICAgICAgICByZXR1cm4gcmVhbFVybFxcbiAgICAgICAgfVxcbiAgICAgICAgLy9yZXR1cm4gcmVhbFVybFxcbiAgICB9XFxuXFxuICAgIC8vbG9nKFxcXCLorr/pl67otoXml7Y6XFxcIit0bSk7XFxuICAgIGxvZyhcXFwi5bCd6K+V6YGT6ZW/5LuT5bqTeDXlhY3ll4U6XFxcIitwbGF5VXJsKTtcXG4gICAgY2xlYXJWYXIoXFxcIl94NWp4VXJsXFxcIik7XFxuICAgIGxldCBiYWQ9JChcXFwi572R57uc5LiN5L2z5oiW6ICF55aR5Ly85a+55pa5572R56uZ5oyC5LqG77yM5L2g6KaB5p+l55yL5YW2572R6aG15ZCX77yfXFxcIikuY29uZmlybSgocGxheVVybCk9PntcXG4gICAgICAgIGxvZyhcXFwi572R56uZ55yL6LW35p2l5oyC5LqGOlxcXCIrcGxheVVybCk7XFxuICAgICAgICByZXR1cm4gcGxheVVybFxcbiAgICB9LHBsYXlVcmwpO1xcbiAgICB0cnl7XFxuICAgICAgICB2YXIgYmFjaz1yZXF1ZXN0KHBsYXlVcmwse2hlYWRlcnM6IGdldEhlYWRlcnMocGxheVVybCksdGltZW91dDp0bX0pO1xcbiAgICAgICAgLy92YXIgYmFjaz1mZXRjaChwbGF5VXJsLHtoZWFkZXJzOiB7J1VzZXItQWdlbnQnOiBQQ19VQX19KTtcXG4gICAgICAgIGlmKCFiYWNrKXtcXG4gICAgICAgICAgICBsb2coXFxcIue9keermVxcXCIrcGxheVVybCtcXFwi56Gu5a6e5ZWl5Lmf5rKh6L+U5ZueXFxcIik7XFxuIC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cGFyc2VJbnQobG9jYWxfbXMpfHw1MDAwO1xcbiAgICAgICAgbGV0IG1heF9jb3VudD1NYXRoLmNlaWwobXMvMjUwKTtcXG4gICAgICAgIGxvZyhcXFwi5pys5qyh5ZeF5o6i6LaF5pe2OlxcXCIrbXMrXFxcIuWFseiuoeW+heaKk+WMhTpcXFwiK21heF9jb3VudCtcXFwi5qyhXFxcIik7XFxuICAgICAgICBzaG93TG9hZGluZygn5ZeF5o6i5Lit77yM6Iul5aSx6LSl5bCx5YiH5o2id2Vi5ZeF5o6iLi4uJyk7XFxuICAgICAgICBsZXQgX3g1ID0gJC50b1N0cmluZygoaXNWaWRlbyxyZWNoYW5nZSxwbGF5VXJsLG1heF9jb3VudCxQQ19VQSxpc0JhZFZpZGVvKT0+e1xcbiAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgIGlmKHR5cGVvZihmYmEpPT0ndW5kZWZpbmVkJ3x8IWZiYSl7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgZmJhID0gZnlfYnJpZGdlX2FwcDtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgaWYodHlwZW9mKHJlcXVlc3QpPT0ndW5kZWZpbmVkJ3x8IXJlcXVlc3Qpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoZmJhLmdldEludGVybmFsSnMoKSk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1jYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgZmJhLmxvZyhlLm1lc3NhZ2UpO1xcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIGZiYS5wdXRWYXIoXFxcIl94NWp4VXJsXFxcIixwbGF5VXJsKTtcXG4gICAgICAgICAgICAgICAgaWYod2luZG93LmNvdW50ID09IG51bGwpe1xcbiAgICAgICAgICAgICAgICAgICAgd2luZG93LmNvdW50PTE7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgbGV0IHRleHQ9Jyc7XFxuICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICB0ZXh0PWRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoXFxcImJvZHlcXFwiKS5pbm5lclRleHQ7XFxuICAgICAgICAgICAgICAgIH1jYXRjaCAoZSkge2ZiYS5sb2coZS5tZXNzYWdlKX1cXG4gICAgICAgICAgICAgICAgaWYoL+inpuWPkeS6humYsuebl+mTvnzmnKrmjojmnYN85o6l5Y+j6Ziy55uXLy50ZXN0KHRleHQpJiZ3aW5kb3cuY291bnQ9PT0xKXtcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcIuajgOa1i+WIsOacieaOiOadg++8jOW8gOWni+i/h+aOiOadg1xcXCIpO1xcbiAgICAgICAgICAgICAgICAgICAgLy9sb2NhdGlvbi5yZWxvYWQoKTtcXG4gICAgICAgICAgICAgICAgICAgIGxvY2F0aW9uLmhyZWY9ZmJhLmdldFZhcihcXFwiX3g1anhVcmxcXFwiKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB3aW5kb3cuY291bnQrKztcXG4gICAgICAgICAgICAgICAgLy8gZmJhLmxvZygnY291bnQ6Jyt3aW5kb3cuY291bnQrJyxtYXhfY291bnQ6JyttYXhfY291bnQpO1xcbiAgICAgICAgICAgICAgICBpZiggd2luZG93LmNvdW50ID49IG1heF9jb3VudCl7XFxuICAgICAgICAgICAgICAgICAgICBmYmEubG9nKFxcXCLotoXov4dcXFwiK21heF9jb3VudCoyNTArXFxcIuavq+enkuacquiOt+WPluWIsOi1hOa6kOWcsOWdgO+8jOi3s+WIsOa6kOe9kemhtSzku6XkuIvmmK/liqDovb3ov4fnmoTlnLDlnYBcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHRleHQ9ZG9jdW1lbnQucXVlcnlTZWxlY3RvcihcXFwiYm9keVxcXCIpLmlubmVyVGV4dDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBmYmEubG9nKHRleHQpO1xcbiAgICAgICAgICAgICAgICAgICAgfWNhdGNoIChlKSB7ZmJhLmxvZyhlLm1lc3NhZ2UpfVxcbiAgICAgICAgICAgICAgICAgICAgZmJhLmxvZyhKU09OLnN0cmluZ2lmeShfZ2V0VXJscygpKSk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmJhLmdldFZhcihcXFwiX3g1anhVcmxcXFwiKTtcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBtdXRlTWUoZWxlbSkge1xcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBlbGVtLnBhdXNlKCk7XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHZhciB2aWRlb3MgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKFxcXCJ2aWRlb1xcXCIpLCBhdWRpb3MgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKFxcXCJhdWRpb1xcXCIpLCB2MiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoXFxcImVtYmVkXFxcIiksIHYzID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbChcXFwiI3BsYXllclxcXCIpO1xcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKHZpZGVvcywgZnVuY3Rpb24gKHZpZGVvKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbXV0ZU1lKHZpZGVvKTtcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKGF1ZGlvcywgZnVuY3Rpb24gKGF1ZGlvKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbXV0ZU1lKGF1ZGlvKTtcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKHYyLCBmdW5jdGlvbiAodikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG11dGVNZSh2KTtcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKHYzLCBmdW5jdGlvbiAodikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG11dGVNZSh2KTtcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcbiAgICAgICAgICAgICAgICB2YXIgdXJscyA9IF9nZXRVcmxzKCk7XFxuICAgICAgICAgICAgICAgIC8vIGZiYS5sb2coSlNPTi5zdHJpbmdpZnkodXJscykpO1xcbiAgICAgICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBpIGluIHVybHMpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgdT11cmxzW2ldO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeXt1PWRlY29kZVVSSUNvbXBvbmVudCh1KTt9Y2F0Y2goZSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHU9dW5lc2NhcGUodSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoL3VybD1odHRwLy50ZXN0KHUpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdSA9IHUuc3BsaXQoXFxcInVybD1cXFwiKS5zbGljZSgtMSlbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGZiYS5sb2coXFxcInVybOWIhuWJsjpcXFwiK3UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKC91cmw9XFxcXC8vLnRlc3QodSkmJi9cXFxcLm0zdTgvLnRlc3QodSkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaG9zdCA9IHUubWF0Y2goLyguKilcXFxcL1xcXFwvKC4qPylcXFxcLy8pWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ID0gaG9zdCt1LnNwbGl0KFxcXCJ1cmw9XFxcIikuc2xpY2UoLTEpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBmYmEubG9nKFxcXCJ1cmzliIblibI6XFxcIit1KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZigvdmlkPWh0dHAvLnRlc3QodSkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ID0gdS5zcGxpdChcXFwidmlkPVxcXCIpLnNsaWNlKC0xKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmJhLmxvZyhcXFwidmlk5YiG5YmyOlxcXCIrdSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYoL3ZpZD1cXFxcLy8udGVzdCh1KSYmL1xcXFwubTN1OC8udGVzdCh1KSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBob3N0ID0gdS5tYXRjaCgvKC4qKVxcXFwvXFxcXC8oLio/KVxcXFwvLylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUgPSBob3N0K3Uuc3BsaXQoXFxcInZpZD1cXFwiKS5zbGljZSgtMSlbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcInZpZOWIhuWJsjpcXFwiK3UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKC9cXFxcPyguKik9aHR0cC8udGVzdCh1KSYmL1xcXFwubTN1OC8udGVzdCh1KSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUgPSBcXFwiaHR0cFxcXCIrdS5zcGxpdCgvXFxcXD8oLiopPWh0dHAvKS5zbGljZSgtMSlbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcIuWFtuS7luWIhuWJsjpcXFwiK3UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAvL3xpbmRleFxcXFwubTN1OCRcXG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKC9cXFxcLzFcXFxcLm0zdTgvLnRlc3QodSkpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgdT11LnJlcGxhY2UoLyZmcm9tPS4qfCZuZXh0PS4qfCZqdW1wPS4qLywnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHJlYWxVcmwgPSBpc1ZpZGVvKHUscmVjaGFuZ2UpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmKHR5cGVvZihyZWFsVXJsKT09J3N0cmluZycmJiFpc0JhZFZpZGVvKHUpKXsvL+i/h+a7pOWQiuavm+inhumikVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2Z5X2JyaWRnZV9hcHAuc2V0V2ViVWEoUENfVUEpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZih0eXBlb2YoZmJhLmdldEhlYWRlclVybCkhPT0ndW5kZWZpbmVkJyYmdHlwZW9mKHJlY2hhbmdlKSE9PSdmdW5jdGlvbicpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbGV0IGJhY2tVcmwgPSBmYmEuZ2V0SGVhZGVyVXJsKHUucmVwbGFjZShcXFwiO3tcXFwiLFxcXCIjaXNWaWRlbz10cnVlIzt7XFxcIikpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGJhY2tVcmwgPSBmYmEuZ2V0SGVhZGVyVXJsKHVybHNbaV0pLnJlcGxhY2UoJzt7JywnI2lnbm9yZUltZz10cnVlIyNpc1ZpZGVvPXRydWUjO3snKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1MSA9IGJhY2tVcmwuc3BsaXQoJyNpZ25vcmVJbWcnKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1MiA9ICcjaWdub3JlSW1nJytiYWNrVXJsLnNwbGl0KCcjaWdub3JlSW1nJylbMV07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1MSA9IHUxLnJlcGxhY2UoLyZmcm9tPS4qfCZuZXh0PS4qfCZqdW1wPS4qLywnJyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZigvdXJsPWh0dHAvLnRlc3QodTEpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1MSA9IHUxLnNwbGl0KFxcXCJ1cmw9XFxcIikuc2xpY2UoLTEpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYoL3VybD1cXFxcLy8udGVzdCh1MSkmJi9cXFxcLm0zdTgvLnRlc3QodTEpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaG9zdDEgPSB1MS5tYXRjaCgvKC4qKVxcXFwvXFxcXC8oLio/KVxcXFwvLylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdTEgPSBob3N0MSt1MS5zcGxpdChcXFwidXJsPVxcXCIpLnNsaWNlKC0xKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBmYmEubG9nKFxcXCJ1cmzliIblibI6XFxcIit1KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgaWYoL3ZpZD1odHRwLy50ZXN0KHUxKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdTEgPSB1MS5zcGxpdChcXFwidmlkPVxcXCIpLnNsaWNlKC0xKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKC92aWQ9XFxcXC8vLnRlc3QodTEpJiYvXFxcXC5tM3U4Ly50ZXN0KHUxKSl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhvc3QxID0gdTEubWF0Y2goLyguKilcXFxcL1xcXFwvKC4qPylcXFxcLy8pWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUxID0gaG9zdDErdTEuc3BsaXQoXFxcInZpZD1cXFwiKS5zbGljZSgtMSlbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKC9cXFxcPyguKik9aHR0cC8udGVzdCh1MSkmJi9cXFxcLm0zdTgvLnRlc3QodTEpKXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1MSA9IFxcXCJodHRwXFxcIit1MS5zcGxpdCgvXFxcXD8oLiopPWh0dHAvKS5zbGljZSgtMSlbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrVXJsID0gdTEgKyB1MjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGZiYS5sb2coJ+i/lOWbnuiHquWKqOWKoGNvb2tpZemTvuaOpTonK2JhY2tVcmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmJhLmxvZygn6L+U5Zue6ZO+5o6lOicrdSsn5bm26Ieq5Yqo5Yqg5LqGY29va2llLOWFt+S9k2Nvb2tpZeWcqOinhumikeaSreaUvuWkhOafpeeciycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGJhY2tVcmw7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZXtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcIui/lOWbnuS7k+W6k3g15YWN5ZeF57uT5p6cOlxcXCIrcmVhbFVybCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVhbFVybFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9Y2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5sb2coZS5tZXNzYWdlKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfWNhdGNoIChlKSB7XFxuICAgICAgICAgICAgICAgIC8vIGZ5X2JyaWRnZV9hcHAubG9nKCd4NeWkp+iMg+WbtOmUmeivrzonK2UubWVzc2FnZSk7XFxuICAgICAgICAgICAgICAgIGFsZXJ0KCd4NeWkp+iMg+WbtOmUmeivr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ICAgICAgICAgICAgIGV2YWwoZmJhLmdldEludGVybmFsSnMoKSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIGZiYS5sb2coZS5tZXNzYWdlKTtcXG4gICAgICAgIH1cXG4gICAgICAgIC8vLS0tLS0tLS0tLS0tLS0tLS0tXFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIGlmICh3aW5kb3cuY291bnQgPT0gbnVsbCkge1xcbiAgICAgICAgICAgICAgICB3aW5kb3cuY291bnQgPSAxO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBsZXQgdGV4dD0nJztcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICB0ZXh0PWRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoXFxcImJvZHlcXFwiKS5pbm5lclRleHQ7XFxuICAgICAgICAgICAgfWNhdGNoIChlKSB7ZmJhLmxvZyhlLm1lc3NhZ2UpfVxcbiAgICAgICAgICAgIGlmKC/op6blj5HkuobpmLLnm5fpk7585pyq5o6I5p2DfOaOpeWPo+mYsuebly8udGVzdCh0ZXh0KSYmd2luZG93LmNvdW50PT0xKXtcXG4gICAgICAgICAgICAgICAgbG9jYXRpb24ucmVsb2FkKCk7XFxuICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcIuajgOa1i+WIsOacieaOiOadg++8jOW8gOWni+i/h+aOiOadg1xcXCIpO1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB3aW5kb3cuY291bnQrKztcXG4gICAgICAgICAgICAvLyBmYmEubG9nKCdjb3VudDonICsgd2luZG93LmNvdW50ICsgJyxtYXhfY291bnQ6JyArIG1heF9jb3VudCk7XFxuICAgICAgICAgICAgaWYgKHdpbmRvdy5jb3VudCA+PSBtYXhfY291bnQpIHtcXG4gICAgICAgICAgICAgICAgZmJhLmNsZWFyVmFyKCd4NUxpc3QnKTtcXG4gICAgICAgICAgICAgICAgZmJhLmhpZGVMb2FkaW5nKCk7XFxuICAgICAgICAgICAgICAgIGxldCBmbXNnID0gJ+mBk+mVv+S7k+W6k+mAmuWFjeino+aekOWksei0pSzljp/lm6A66LaF5pe2Jyt4NVRpbWVvdXQrJ+avq+enkic7XFxuICAgICAgICAgICAgICAgIGZiYS5sb2coZm1zZyk7XFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly8nK2Ztc2c7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfWNhdGNoIChlKSB7XFxuICAgICAgICAgICAgZmJhLmxvZyhlLm1lc3NhZ2UpO1xcbiAgICAgICAgfVxcblxcbiAgICAgICAgZnVuY3Rpb24gbXV0ZU1lKGVsZW0pIHtcXG4gICAgICAgICAgICB0cnkge1xcbiAgICAgICAgICAgICAgICBlbGVtLnBhdXNlKCk7XFxuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG5cXG4gICAgICAgIHZhciB2aWRlb3MgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKFxcXCJ2aWRlb1xcXCIpLCBhdWRpb3MgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKFxcXCJhdWRpb1xcXCIpLFxcbiAgICAgICAgICAgIHYyID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbChcXFwiZW1iZWRcXFwiKSwgdjMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKFxcXCIjcGxheWVyXFxcIik7XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIFtdLmZvckVhY2guY2FsbCh2aWRlb3MsIGZ1bmN0aW9uICh2aWRlbykge1xcbiAgICAgICAgICAgICAgICBtdXRlTWUodmlkZW8pO1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgfVxcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBbXS5mb3JFYWNoLmNhbGwoYXVkaW9zLCBmdW5jdGlvbiAoYXVkaW8pIHtcXG4gICAgICAgICAgICAgICAgbXV0ZU1lKGF1ZGlvKTtcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXG4gICAgICAgIH1cXG4gICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKHYyLCBmdW5jdGlvbiAodikge1xcbiAgICAgICAgICAgICAgICBtdXRlTWUodik7XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxuICAgICAgICB9XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIFtdLmZvckVhY2guY2FsbCh2MywgZnVuY3Rpb24gKHYpIHtcXG4gICAgICAgICAgICAgICAgbXV0ZU1lKHYpO1xcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgfVxcbiAgICAgICAgdmFyIHVybHMgPSBfZ2V0VXJscygpO1xcbiAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICBmb3IgKGxldCBpIGluIHVybHMpIHtcXG4gICAgICAgICAgICAgICAgbGV0IHU9dXJsc1tpXTtcXG4gICAgICAgICAgICAgICAgLy91PWRlY29kZVVSSUNvbXBvbmVudCh1KTtcXG4gICAgICAgICAgICAgICAgdHJ5e3U9ZGVjb2RlVVJJQ29tcG9uZW50KHUpO31jYXRjaChlKXtcXG4gICAgICAgICAgICAgICAgICAgIHU9dW5lc2NhcGUodSk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgaWYoL3VybD1odHRwLy50ZXN0KHUpKXtcXG4gICAgICAgICAgICAgICAgICAgIHUgPSB1LnNwbGl0KFxcXCJ1cmw9XFxcIikuc2xpY2UoLTEpWzBdO1xcbiAgICAgICAgICAgICAgICB9ZWxzZSBpZigvdmlkPWh0dHAvLnRlc3QodSkpe1xcbiAgICAgICAgICAgICAgICAgICAgdSA9IHUuc3BsaXQoXFxcInZpZD1cXFwiKS5zbGljZSgtMSlbMF07XFxuICAgICAgICAgICAgICAgIH1lbHNlIGlmKC9cXFxcPyguKik9aHR0cC8udGVzdCh1KSl7XFxuICAgICAgICAgICAgICAgICAgICB1ID0gXFxcImh0dHBcXFwiK3Uuc3BsaXQoL1xcXFw/KC4qKT1odHRwLykuc2xpY2UoLTEpWzBdO1xcbiAgICAgICAgICAgICAgICAgICAgLy9mYmEubG9nKFxcXCLlhbbku5bliIblibI6XFxcIit1KTtcXG4gICAgICAgICAgICAgICAgfWVsc2UgaWYoL1xcXFwvMVxcXFwubTN1OCQvLnRlc3QodSkpe1xcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgdT11LnJlcGxhY2UoLyZmcm9tPS4qfCZuZXh0PS4qfCZqdW1wPS4qLywnJyk7XFxuICAgICAgICAgICAgICAgIGxldCByZWFsVXJsID0gaXNWaWRlbyh1KTtcXG4gICAgICAgICAgICAgICAgaWYgKHJlYWxVcmwmJiFpc0JhZFZpZGVvKHUpKSB7Ly/ov4fmu6TlkIrmr5tcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcIuS7k+W6k3g15YWN5ZeF57uT5p6cOlxcXCIgKyByZWFsVXJsKTtcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5jbGVhclZhcigneDVMaXN0Jyk7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmVhbFVybFxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcbiAgICAgICAgICAgIGZiYS5sb2coZS5tZXNzYWdlKVxcbiAgICAgICAgfVxcbiAgICB9LCBpc1ZpZGVvLCBtYXhfY291bnQseDVUaW1lb3V0LGlzQmFkVmlkZW8pO1xcbiAgICBjb25zdCBsc2c9JC5yZXF1aXJlKFxcXCJoaWtlcjovL3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L1xcXCJVc2VyLUFnZW50XFxcIjogXFxcIkRhcnQvMi4xMyAoZGFydDppbylcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcIlVzZXItQWdlbnRcXFwiOlxcXCJNb3ppbGxhLzUuMFxcXCJcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgdGltZW91dDogZ2V0VGltZW91dFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH1cXG4gICAgfSk7XFxuICAgIGxldCBiaHRtbCA9IGJhdGNoRmV0Y2gocGxheVVybHMpO1xcbiAgICBsZXQgdmlkZW9zID0gW107XFxuICAgIGxldCB4NWxpc3QgPSBbXTtcXG4gICAgZm9yKGxldCBpIGluIGJodG1sKXtcXG4gICAgICAgIGxldCBvcmRlciA9IHBhcnNlSW50KGkpKzE7XFxuICAgICAgICBsZXQgdG5hbWU9b3JkZXIrJ+WPt+ino+aekOe9keWdgDonO1xcbiAgICAgICAgLy9sb2codG5hbWUpO1xcbiAgICAgICAgbGV0IHR1cmw9cGxheVVybExpc3RbaV0uc3BsaXQoXFxcIjtcXFwiKVswXTtcXG4gICAgICAgIGxldCBqbmFtZT1wbGF5VXJsTGlzdFtpXS5zcGxpdChcXFwiO1xcXCIpLmxlbmd0aD4xP3BsYXlVcmxMaXN0W2ldLnNwbGl0KFxcXCI7XFxcIilbMV06XFxcIlxcXCI7XFxuICAgICAgICB0bmFtZSs9am5hbWU7XFxuICAgICAgICBsZXQgYmFja2NvZGUgPSBiaHRtbFtpXTtcXG4gICAgICAgIGlmKCghL3VybHxodHRwLy50ZXN0KGJhY2tjb2RlKSkmJighLyNFWFRJTkYvLnRlc3QoYmFja2NvZGUpKSl7XFxuICAgICAgICAgICAgbG9nKHRuYW1lK3R1cmwrJ+aciemXrumimCzlj6/og73liqDlr4bmiJbogIXmjILkuoYnKTtcXG4gICAgICAgICAgICBjb250aW51ZTtcXG4gICAgICAgIH1lbHNlIGlmKC8jRVhUSU5GLy50ZXN0KGJhY2tjb2RlKSl7XFxuICAgICAgICAgICAgLy9sZXQgbGNhY2hlPVxcXCIvc3RvcmFnZS9lbXVsYXRlZC8wL0FuZHJvaWQvZGF0YS9jb20uZXhhbXBsZS5oaWtlcnZpZXcvZmlsZXMvRG9jdW1lbnRzL2NhY2hlL3ZpZGVvX1xcXCIrdG5hbWUrXFxcIi5tM3U4XFxcIjtcXG4gICAgICAgICAgICAvL3dyaXRlRmlsZShsY2FjaGUsYmFja2NvZGUpO1xcbiAgICAgICAgICAgIC8vdmlkZW9zLnB1c2gobGNhY2hlKTtcXG4gICAgICAgICAgICBsZXQgcFVybD1jYWNoZU0zdTgodHVybCk7XFxuICAgICAgICAgICAgdmlkZW9zLnB1c2gocFVybCk7XFxuICAgICAgICAgICAgY29udGludWU7XFxuICAgICAgICB9XFxuICAgICAgICB0cnkge1xcbiAgICAgICAgICAgIGxldCB1cmwgPSBKU09OLnBhcnNlKGJhY2tjb2RlKS51cmw7XFxuICAgICAgICAgICAgaWYoL15odHRwLy50ZXN0KHVybCkpe1xcbiAgICAgICAgICAgICAgICBsZXQgcmVhbFZpZGVvID0gaXNWaWRlbyh1cmwpO1xcbiAgICAgICAgICAgICAgICBpZih0eXBlb2YocmVhbFZpZGVvKT09J3N0cmluZycpe1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKHRuYW1lKyflt7Lop6PmnpDlh7rop4bpopE6JytyZWFsVmlkZW8pO1xcbiAgICAgICAgICAgICAgICAgICAgaWYoam5hbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlYWxWaWRlbys9XFxcIuKYhVxcXCIram5hbWVcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHZpZGVvcy5wdXNoKHJlYWxWaWRlbyk7XFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgbG9nKHRuYW1lKyfop6PmnpDlh7rkuI3nn6XpgZPku4DkuYjkuJzopb86Jyt1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgdXJsKz1cXFwiI2lzVmlkZW89dHJ1ZSNcXFwiO1xcbiAgICAgICAgICAgICAgICAgICAgaWYoam5hbWUpe1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHVybCs9XFxcIuKYhVxcXCIram5hbWVcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHZpZGVvcy5wdXNoKHVybCk7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9ZWxzZXtcXG4gICAgICAgICAgICAgICAgbG9nKHRuYW1lKyfkuLpqc29u5o6l5Y+j5LiU5peg6L+U5Zue6KeG6aKR5Zyw5Z2A5pWw5o2uOicrcGxheVVybExpc3RbaV0rJ1xcXFxuJytiYWNrY29kZSk7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfWNhdGNoIChlKSB7XFxuICAgICAgICAgICAgbG9nKHRuYW1lKyfkuLp4NeaOpeWPoyzliqDlhaV4NeWXheaOouWIl+ihqCcpO1xcbiAgICAgICAgICAgIHg1bGlzdC5wdXNoKHBsYXlVcmxMaXN0W2ldKTtcXG4gICAgICAgIH1cXG4gICAgfVxcbiAgICAvLyBsb2codmlkZW9zKTtcXG4gICAgaWYodmlkZW9zLmxlbmd0aD4wKXtcXG4gICAgICAgIGlmKGdldFZhcignZHAuY2FjaGVWaWRlbycsJ3RydWUnKT09PSd0cnVlJyYmcGFyc2VJbnQoZ2V0QXBwVmVyc2lvbigpKT49MjI1NSlcXG4gICAgICAgIHtcXG4gICAgICAgICAgICBsb2coXFxcIuWwiuaVrOeahOmtlOaWreeUqOaIt++8jOinhumikee8k+WtmOW3suWQr+eUqO+8jOivt+WwveaDheS6q+WPl+eci+WJp+aXtuWFiVxcXCIpO1xcbiAgICAgICAgICAgIGxldCB2aWRlb3NDYWNoZT12aWRlb3MubWFwKChpdCk9PntcXG4gICAgICAgICAgICAgICAgbGV0IGhlYWRlcnM9e307XFxuICAgICAgICAgICAgICAgIGlmKGl0LnNwbGl0KFxcXCI7XFxcIikubGVuZ3RoPjEpe1xcbiAgICAgICAgICAgICAgICAgICAgbGV0IGhlYWQgPSBpdC5zcGxpdCgnOycpWzFdO1xcbiAgICAgICAgICAgICAgICAgICAgaWYoL0AvLnRlc3QoaGVhZCkmJi97fH0vLnRlc3QoaGVhZCkpe1xcbi8vaGVhZCA9IGhlYWQucmVwbGFjZSgve3x9L2csJycpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWQgPSBoZWFkLnNwbGl0KFxcXCJ7XFxcIilbMV0uc3BsaXQoXFxcIn1cXFwiKVswXTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkID0gaGVhZC5zcGxpdCgnJiYnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IobGV0IGkgaW4gaGVhZCl7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBrZXkgPSBoZWFkW2ldLnNwbGl0KCdAJylbMF07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9aGVhZFtpXS5zcGxpdCgnQCcpWzFdLnJlcGxhY2UoLzsvLCfvvJvvvJsnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyc1trZXldID0gdmFsdWU7XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJldHVybiB7XFxuICAgICAgICAgICAgICAgICAgICB1cmw6aXQuc3BsaXQoXFxcIjtcXFwiKVswXS5zcGxpdChcXFwi4piFXFxcIilbMF0sXFxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zOntcXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzOmhlYWRlcnNcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH0pO1xcbiAgICAgICAgICAgIHZhciBkYXRhPWJhdGNoQ2FjaGVNM3U4KHZpZGVvc0NhY2hlKTtcXG4gICAgICAgICAgICBkYXRhPWRhdGEubWFwKChpdCxpZCk9PntcXG4gICAgICAgICAgICAgICAgbGV0IGV4dHJhPVxcXCJcXFwiO1xcbiAgICAgICAgICAgICAgICBpZih2aWRlb3NbaWRdLnNwbGl0KFxcXCI7XFxcIikubGVuZ3RoPjEpe1xcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE9XFxcIjtcXFwiK3ZpZGVvc1tpZF0uc3BsaXQoXFxcIjtcXFwiKVsxXTtcXG4gICAgICAgICAgICAgICAgfWVsc2UgaWYodmlkZW9zW2lkXS5zcGxpdChcXFwi4piFXFxcIikubGVuZ3RoPjEpe1xcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE9XFxcIuKYhVxcXCIrdmlkZW9zW2lkXS5zcGxpdChcXFwi4piFXFxcIilbMV07XFxuICAgICAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICAgICAgaWYoaXQrXFxcIlxcXCIhPVxcXCJudWxsXFxcIil7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXQrZXh0cmFcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdmlkZW9zW2lkXVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgLy9sb2coZGF0YSk7XFxuICAgICAgICAgICAgcmV0dXJuIGRhdGFcXG4gICAgICAgICAgICAvL3JldHVybiB2aWRlb3NcXG4gICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgIHJldHVybiB2aWRlb3NcXG4gICAgICAgIH1cXG4gICAgfVxcbiAgICBsb2coJ+WFseaciScreDVsaXN0Lmxlbmd0aCsn5LiqeDXlnLDlnYDov5vooYzova7mtYHll4XmjqInKTtcXG4gICAgLy/msqHmnInnmoTor53lsLHlvIDlp4vkvp3mrKF4NeWXheaOolxcbiA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ICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xcbiAgICAgICAgICAgIFxcXCJwYXJhbXNcXFwiOiB7XFxuICAgICAgICAgICAgICAgIFxcXCJkYXRhXFxcIjoge1xcbiAgICAgICAgICAgICAgICAgICAgXFxcIm5hbWVcXFwiOiB0YXNrLm5hbWUsXFxuICAgICAgICAgICAgICAgICAgICBcXFwicHljb2RlXFxcIjogdGFzay5weWNvZGUsXFxuICAgICAgICAgICAgICAgICAgICBcXFwibm90ZVxcXCI6IHRhc2subm90ZSxcXG4gICAgICAgICAgICAgICAgICAgIFxcXCJ0ZXN0X2NvZGVcXFwiOiB0YXNrLnRlc3RfY29kZSxcXG4gICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgXFxcImF1dGhcXFwiOiB7XFxuICAgICAgICAgICAgICAgICAgICBcXFwibmFtZVxcXCI6IGhvdXNlX2RhdGEudXNlcm5hbWV8fFxcXCJcXFwiLFxcbiAgICAgICAgICAgICAgICAgICAgXFxcInBhc3N3b3JkXFxcIjogaG91c2VfZGF0YS5wYXNzd29yZHx8XFxcIlxcXCJcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0pLFxcbiAgICAgICAgbWV0aG9kOiAnUE9TVCdcXG4gICAgfSk7XFxuICAgIHJldHVybiBKU09OLnBhcnNlKHJlc3VsdCkucmVzdWx0O1xcbn1cXG5cXG5mdW5jdGlvbiB0YXNrX2NhbGwoaWQsZnVuYyxwYXJhbXMpe1xcbiAgICBjb25zdCB7YXBpfSA9ICQucmVxdWlyZShcXFwiaGlrZXI6Ly9wYWdlL3V0aWxpeT9ydWxlPemBk+mVv+S7k+W6k1Byb1xcXCIpO1xcbiAgICBsZXQgdGFza19hcGkgPSBhcGkuaG9zdCsnL2hpa2VydWxlL3Rhc2svcnVuLycraWQ7XFxuICAgIGxldCB0YXNrID0ge1xcbiAgICAgICAgbW9kZTonY2FsbCcsXFxuICAgICAgICBmdW5j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cXCIsXFxuICAgICAgICBoZWlnaHQ6LTEsXFxuICAgICAgICBvbkNoYW5nZTogJ3B1dE15VmFyKFxcXCJkZXZJbmZvXFxcIixpbnB1dCknXFxuICAgIH1cXG59KTtcXG5kLnB1c2goe1xcbiAgICB0aXRsZTpcXFwi5L+d5a2Y5YWs5ZGKXFxcIixcXG4gICAgY29sX3R5cGU6ICd0ZXh0X2NlbnRlcl8xJyxcXG4gICAgdXJsOiQoJ+ehruiupOS/neWtmOWFrOWRiuWQl++8n+WwhuS8muS4jumBk+mVv+S7k+W6k+acjeWKoeWZqOmAmuiurycpLmNvbmZpcm0oKCk9PntcXG4gICAgICAgIGxldCBkZXZfc2V0X2luZm8gPSBnZXRNeVZhcihcXFwiZGV2X3NldF9pbmZvXFxcIikuc3BsaXQoJyQkJyk7XFxuICAgICAgICBsZXQgaW5wdXRfdGV4dCA9IGdldE15VmFyKCdkZXZJbmZvJywgJycpO1xcbiAgICAgICAgaWYoaW5wdXRfdGV4dC5sZW5ndGggPj0gNCl7XFxuICAgICAgICAgICAgbGV0IGluZm9fc2V0X3VybD0gZGV2X3NldF9pbmZvWzJdO1xcbiAgICAgICAgICAgIGxldCBzZW5kX2RhdGEgPSB7XFxcInBhcmFtc1xcXCI6XFxuICAgICAgICAgICAgICAgICAgICB7XFxcImRhdGFcXFwiOiB7XFxcImluZm9cXFwiOiBpbnB1dF90ZXh0fSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwibmFtZVxcXCI6IGRldl9zZXRfaW5mb1swXSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBcXFwicGFzc3dvcmRcXFwiOiBkZXZfc2V0X2luZm9bMV19XFxuICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICAvLyBsb2coc2VuZF9kYXRhKTtcXG4gICAgICAgICAgICBsZXQgcGFyMiA9IHtoZWFkZXJzOnsnY29udGVudC10eXBlJzonYXBwbGljYXRpb24vanNvbjtjaGFyc2V0PVVURi04JywnVXNlci1BZ2VudCc6ZGV2X3NldF9pbmZvWzNdfSxib2R5OkpTT04uc3RyaW5naWZ5KHNlbmRfZGF0YSksbWV0aG9kOidQT1NUJ307XFxuICAgICAgICAgICAgLy8gcGFyMiA9IEpTT04uc3RyaW5naWZ5KHBhcjIpOyAvL3g16YeM6Z2i6K+35rGC5omN6ZyA6KaB57yW56CBXFxuICAgICAgICAgICAgdHJ5IHtcXG4gICAgICAgICAgICAgICAgbGV0IGJhY2tfcmV0ID0gcmVxdWVzdChpbmZvX3NldF91cmwsIHBhcjIpO1xcbiAgICAgICAgICAgICAgICBiYWNrX3JldCA9IEpTT04ucGFyc2UoYmFja19yZXQpLnJlc3VsdDtcXG4gICAgICAgICAgICAgICAgaWYoYmFja19yZXQuc3RhdHVzPT09MCl7XFxuICAgICAgICAgICAgICAgICAgICAvLyByZWZyZXNoUGFnZSgpO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S/neWtmOaIkOWKn1xcXFxuJytiYWNrX3JldC5kZXRhaWw7XFxuICAgICAgICAgICAgICAgIH1lbHNle1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+S/neWtmOWksei0pVxcXFxuJytiYWNrX3JldC5kZXRhaWw7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9Y2F0Y2ggKGUpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mUmeivr1xcXFxuJytlLm1lc3NhZ2U7XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfWVsc2V7XFxuICAgICAgICAgICAgY29uZmlybSh7dGl0bGU6J+mBk+mVv+aPkOekuicsY29udGVudDon6Jm954S25L2g5b6I5oeS77yM5L2G5piv5YWs5ZGK6Iez5bCR5YaZNOS4quWtl+WQp++8gSd9KTtcXG4gICAgICAgICAgICByZXR1cm4gJ2hpa2VyOi8vZW1wdHknXFxuICAgICAgICB9XFxuICAgIH0pXFxufSk7XFxuXFxuc2V0UmVzdW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ry5qih5p2/5bCP56iL5bqPXFxuICAgICAgICAgICAgY21zOiBcXFwiY21zLmpzXFxcIiwgLy9jbXPmqKHmnb/kvp3otZZcXG4gICAgICAgICAgICBjbXNwcmU6IFxcXCJjbXNwcmUuanNcXFwiLCAvL2Ntc+mihOWkhOeQhlxcbiAgICAgICAgICAgIGNtc206IFxcXCJjbXNtLmpzXFxcIiwgLy9jbXPmqKHmnb/lsI/nqIvluo9cXG4gICAgICAgICAgICBsaWJjaGVjazogXFxcImxpYmNoZWNrLmpzXFxcIiwgLy9kcuajgOa1i+S+nei1llxcbiAgICAgICAgICAgIHJ1bGVFZGl0b3I6IFxcXCJydWxlRWRpdG9yLmpzXFxcIiwgLy/lhpnpobXmupDnpZ7lmajlsI/nqIvluo9cXG4gICAgICAgICAgICBob3VzZUxhenk6IFxcXCJob3VzZUxhenkuanNcXFwiLCAvL+S7k+W6k+mAmuWFjVxcbiAgICAgICAgICAgIGxhenk6IFxcXCJsYXp5LmpzXFxcIiwgLy/pppnlhY1cXG4gICAgICAgICAgICBzdWI6IFxcXCJzdWIuanNcXFwiLCAvL+mBk+W+t+e7j+iuoumYhVxcbiAgICAgICAgICAgIGhpa2VyVWk6IFxcXCJoaWtlclVpLmpzXFxcIiwgLy/mtbfpmJTnu4Tku7bkvp3otZZcXG4gICAgICAgICAgICBoaWtlckxpYnM6IFxcXCJoaWtlckxpYnMuanNcXFwiLCAvL+a1t+mYlOWFqOiDveS+nei1llxcbiAgICAgICAgfSk7XFxuICAgIH1jYXRjaChlKXtcXG4gICAgICAgIC8vdG9hc3QoJ+ivt+WwneivleeCueWHu+S7k+W6k+S4u+mhteeahOWNh+e6p+S7k+W6k+aXgei+ueeahOaMiemSruWNh+e6pyTmianlsZXvvIzlkKbliJnmn5Dkupvlip/og73kuI3og73mraPluLjkvb/nlKgnKTtcXG4gICAgICAgIGNvbmZpcm0oe1xcbiAgICAgICAgICAgIHRpdGxlOiAn5o+Q56S6LeeCueWHu+ehruWumuWPr+S7peWvvOWFpScsXFxuICAgICAgICAgICAgY29udGVudDogJ+ivt+WwneivleeCueWHu+S7k+W6k+S4u+mhteeahOWNh+e6p+S7k+W6k+aXgei+ueeahOaMiemSruWNh+e6pyTmianlsZXvvIzlkKbliJnmn5Dkupvlip/og73kuI3og73mraPluLjkvb/nlKgnLFxcbiAgICAgICAgICAgIGNvbmZpcm06ICQudG9TdHJpbmcoKCk9PntcXG4gICAgICAgICAgICAgICAgY29uc3Qge2dldEFwaX0gPSAkLnJlcXVpcmUoXFxcImhpa2VyOi8vcGFnZS91dGlsaXk/cnVsZT3pgZPplb/ku5PlupNQcm9cXFwiKTtcXG4gICAgICAgICAgICAgICAgbGV0IHJ1bGVIZWFkID0gJ+a1t+mYlOinhueVjO+8jOe9kemhteaPkuS7tu+/pWpzX3VybO+/pSRoaWtlckAnO1xcbiAgICAgICAgICAgICAgICBsZXQgdXJsID0gZ2V0QXBpKCdpbXBvcnRVcmwnKStcXFwiNTExMVxcXCI7XFxuICAgICAgICAgICAgICAgIGxldCBpbXBvcnRVcmwgPSAncnVsZTovLycrYmFzZTY0RW5jb2RlKHJ1bGVIZWFkK3VybCk7XFxuICAgICAgICAgICAgICAgIHJldHVybiBpbXBvcnRVcmxcXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgICAgICBjYW5jZWw6ICQudG9TdHJpbmcoKCk9PntcXG5cXG4gICAgICAgICAgICB9KSxcXG4gICAgICAgIH0pXFxuICAgIH1cXG59XCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCJJbXBvcnTor6bnu4ZcIixcInBhdGhcIjpcInJ1bGVEZXRhaWxJbXBvcnRcIixcInJ1bGVcIjpcImpzOlxcbiQuZXhwb3J0cyA9IFxcXCJoaWtlcjovL3BhZ2UvcnVsZURldGFpbD9ydWxlPemBk+mVv+S7k+W6k1BybyZpZD1cXFwiICsgJC5pbXBvcnRQYXJhbTtcXG5cIn1dLFwic2F2ZWRcIjpmYWxzZSxc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oDonKyhnZXRWYXIoJ1dhcmVob3VzZS5jYW5fdXBsb2FkJyl8fHRpcHMpLFxcXFxuICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxcXG4gICAgICAgIHVybDonaGlrZXI6Ly9lbXB0eSdcXFxcbiAgICB9KTtcXFxcbiAgICBmdW5jdGlvbiBzZXRVcGxvYWQoZmxhZyxjYW5fdXBsb2FkX2FwaSkge1xcXFxuICAgICAgICBmbGFnID0gZmxhZyB8fCAnJztcXFxcbiAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgIGxldCBjb2RlID0gZmV0Y2goY2FuX3VwbG9hZF9hcGksIHtcXFxcbiAgICAgICAgICAgICAgICBoZWFkZXJzOiB7XFxcXFxcXCJVc2VyLUFnZW50XFxcXFxcXCI6IE1PQklMRV9VQX0sXFxcXG4gICAgICAgICAgICAgICAgYm9keToge1xcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInBhcmFtc1xcXFxcXFwiOlxcXFxuICAgICAgICAgICAgICAgICAgICAgICAge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwidXNlcm5hbWVcXFxcXFxcIjogZ2V0VmFyKCdob3VzZS51c2VybmFtZScpLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwicGFzc3dvcmRcXFxcXFxcIjogZ2V0VmFyKCdob3VzZS5wYXNzd29yZCcpLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwiY2FuX3VwbG9hZFxcXFxcXFwiOiAhIWZsYWdcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgIGNvZGUgPSBKU09OLnBhcnNlKGNvZGUpLnJlc3VsdDtcXFxcbiAgICAgICAgICAgIGlmIChjb2RlLnN0YXR1cyA9PT0gMCkge1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiBjb2RlLmRldGFpbFxcXFxuICAgICAgICAgICAgfSBlbHNlIHtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ+aTjeS9nOWksei0pTonICsgY29kZS5kZXRhaWxcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfSBjYXRjaCAoZSkge1xcXFxuICAgICAgICAgICAgcmV0dXJuICfmk43kvZzlpLHotKU6JyArIGUubWVzc2FnZVxcXFxuICAgICAgICB9XFxcXG4gICAgfVxcXFxuICAgIGRhdGEucHVzaCh7XFxcXG4gICAgICAgIHRpdGxlOifwn5qr56aB5q2i5LiK5LygJyxcXFxcbiAgICAgICAgY29sX3R5cGU6J3Njcm9sbF9idXR0b24nLFxcXFxuICAgICAgICB1cmw6JCgn56aB5q2i6K+l5byA5Y+R6ICF5LiK5Lyg6KeE5YiZP+S9oOeahOaTjeS9nOWwhuiiq+ezu+e7n+iusOW9lScpLmNvbmZpcm0oKGlkLGNhbl91cGxvYWRfYXBpLHNldFVwbG9hZCk9PntcXFxcbiAgICAgICAgICAgIGxldCByZXQgPSBzZXRVcGxvYWQoZmFsc2UsY2FuX3VwbG9hZF9hcGkpO1xcXFxuICAgICAgICAgICAgaWYoIS/mk43kvZzlpLHotKUvLnRlc3QocmV0KSl7XFxcXG4gICAgICAgICAgICAgICAgcHV0VmFyKCdXYXJlaG91c2UuY2FuX3VwbG9hZCcsJ+WQpicpO1xcXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKGZhbHNlKTtcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly8nK3JldFxcXFxuICAgICAgICB9LGlkLGNhbl91cGxvYWRfYXBpLHNldFVwbG9hZClcXFxcbiAgICB9KTtcXFxcbiAgICBkYXRhLnB1c2goe1xcXFxuICAgICAgICB0aXRsZTon4pyF5YWB6K645LiK5LygJyxcXFxcbiAgICAgICAgY29sX3R5cGU6J3Njcm9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ICAgICAgICAgICAgIHVybDogc3ViVXJsLFxcXFxuICAgICAgICAgICAgICAgICAgICBkZXNjOiBcXFxcXFxcImhpa2VyOi8vZmlsZXMvcnVsZXMvZHpIb3VzZS9ydWxlQ2FjaGUvXFxcXFxcXCIrdGl0bGUrXFxcXFxcXCIuanNvblxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBjb2RlOiBcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBhY3RpdmU6IGZhbHNlLC8v56aB55So5bm25Y+R5pu05pawXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIGxldCBzaGFyZVRleHQgPSBiYXNlNjRFbmNvZGUoSlNPTi5zdHJpbmdpZnkoc3ViT2JqKSk7XFxcXG4gICAgICAgICAgICAgICAgdmFyIHBhc3RlcyA9IGdldFBhc3RlcygpO1xcXFxuICAgICAgICAgICAgICAgIHZhciB1cmwgPSBzaGFyZVBhc3RlKHNoYXJlVGV4dCxwYXN0ZXMuc2xpY2UoLTEpWzBdKTtcXFxcbiAgICAgICAgICAgICAgICBsZXQgaW1wb3J0X3J1bGU9IFxcXFxcXFwi6L275ZCI6ZuG6K6i6ZiF77yaXFxcXFxcXCIrdGl0bGUrJ1xcXFxcXFxcbicrdXJsO1xcXFxuICAgICAgICAgICAgICAgIGNvcHkoaW1wb3J0X3J1bGUpO1xcXFxuICAgICAgICAgICAgICAgIGNvbnN0IHBhdGggPSAnaGlrZXI6Ly9maWxlcy9ydWxlcy9kekhvdXNlL3J1bGVDYWNoZS9zdWIuanNvbic7XFxcXG4gICAgICAgICAgICAgICAgJC5yYyhjb25maWcubGliLnN1Yik7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuIOiuoumYheWvvOWFpShwYXRoKVxcXFxuICAgICAgICAgICAgfSxkYXRhSXRlbSxydWxlTGlzdEpzb24gKyBkYXRhSXRlbS5pZCksXFxcXG4gICAgICAgICAgICBjb2xfdHlwZ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i8vIGRhdGFJdGVtLmlzX3NhZmU7XFxcXG5pZihnZXRWYXIoJ2hvdXNlLmlzX21hbmFnZXInKSl7XFxcXG4gICAgZnVuY3Rpb24gc2V0SXNTYWZlKGZsYWcsbWFuX3J1bGVfc2FmZSkge1xcXFxuICAgICAgICBmbGFnID0gZmxhZyB8fCAnJztcXFxcbiAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgIGxldCBjb2RlID0gZmV0Y2gobWFuX3J1bGVfc2FmZSwge1xcXFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFxcXFxcIlVzZXItQWdlbnRcXFxcXFxcIjogTU9CSUxFX1VBfSxcXFxcbiAgICAgICAgICAgICAgICBib2R5OiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwicGFyYW1zXFxcXFxcXCI6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJ1c2VybmFtZVxcXFxcXFwiOiBnZXRWYXIoJ2hvdXNlLnVzZXJuYW1lJyksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJwYXNzd29yZFxcXFxcXFwiOiBnZXRWYXIoJ2hvdXNlLnBhc3N3b3JkJyksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJpc19zYWZlXFxcXFxcXCI6ICEhZmxhZ1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgY29kZSA9IEpTT04ucGFyc2UoY29kZSkucmVzdWx0O1xcXFxuICAgICAgICAgICAgaWYgKGNvZGUuc3RhdHVzID09PSAwKSB7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvZGUuZGV0YWlsXFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiAn5pON5L2c5aSx6LSlOicgKyBjb2RlLmRldGFpbFxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgICAgICByZXR1cm4gJ+aTjeS9nOWksei0pTonICsgZS5tZXNzYWdlXFxcXG4gICAgICAgIH1cXFxcbiAgICB9XFxcXG4gICAgZnVuY3Rpb24gc2V0SXNHb29kKGZsYWcsbWFuX3J1bGVfZ29vZCkge1xcXFxuICAgICAgICBmbGFnID0gZmxhZyB8fCAnJztcXFxcbiAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgIGxldCBjb2RlID0gZmV0Y2gobWFuX3J1bGVfZ29vZCwge1xcXFxuICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFxcXFxcIlVzZXItQWdlbnRcXFxcXFxcIjogTU9CSUxFX1VBfSxcXFxcbiAgICAgICAgICAgICAgICBib2R5OiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwicGFyYW1zXFxcXFxcXCI6XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJ1c2VybmFtZVxcXFxcXFwiOiBnZXRWYXIoJ2hvdXNlLnVzZXJuYW1lJyksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJwYXNzd29yZFxcXFxcXFwiOiBnZXRWYXIoJ2hvdXNlLnBhc3N3b3JkJyksXFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJpc19nb29kXFxcXFxcXCI6ICEhZmxhZ1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgY29kZSA9IEpTT04ucGFyc2UoY29kZSkucmVzdWx0O1xcXFxuICAgICAgICAgICAgaWYgKGNvZGUuc3RhdHVzID09PSAwKSB7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvZGUuZGV0YWlsXFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiAn5pON5L2c5aSx6LSlOicgKyBjb2RlLmRldGFpbFxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgICAgICByZXR1cm4gJ+aTjeS9nOWksei0pTonICsgZS5tZXNzYWdlXFxcXG4gICAgICAgIH1cXFxcbiAgICB9XFxcXG4gICAgZGF0YS5wdXNoKHtcXFxcbiAgICAgICAgdGl0bGU6J/Cfmqvpo47pmaknLFxcXFxuICAgICAgICBjb2xfdHlwZTonc2Nyb2xsX2J1dHRvbicsXFxcXG4gICAgICAgIHVybDokKCfmoIforrDor6Xop4TliJnkuLrpo47pmak/6aOO6Zmp6KeE5YiZ5peg5rOV6KKr5a+85YWlJykuY29uZmlybSgoaWQsbWFuX3J1bGVfc2FmZSxzZXRJc1NhZmUpPT57XFxcXG4gICAgICAgICAgICBsZXQgcmV0ID0gc2V0SXNTYWZlKGZhbHNlLG1hbl9ydWxlX3NhZmUpO1xcXFxuICAgICAgICAgICAgaWYoIS/mk43kvZzlpLHotKUvLnRlc3QocmV0KSl7XFxcXG4gICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoZmFsc2UpO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovLycrcmV0XFxcXG4gICAgICAgIH0sZGF0YUl0ZW0uaWQsbWFuX3J1bGVfc2FmZSxzZXRJc1NhZmUpXFxcXG4gICAgfSk7XFxcXG4gICAgZGF0YS5wdXNoKHtcXFxcbiAgICAgICAgdGl0bGU6J+Kcheato+W4uCcsXFxcXG4gICAgICAgIGNvbF90eXBlOidzY3JvbGxfYnV0dG9uJyxcXFxcbiAgICAgICAgdXJsOiQoJ+agh+iusOivpeinhOWIme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FxcXCIsIFxcXFxcXFwi6L6T5YWl6YKu566x6aqM6K+B56CBXFxcXFxcXFxuXFxcXFxcXCIgKyByZXN1bHQuZGV0YWlsKS5pbnB1dCgoY29uZmlybSwgaWQsIGFjY291bnQpID0+IHtcXFxcbiAgICAgICAgICAgIHNob3dMb2FkaW5nKFxcXFxcXFwi6K+36ICQ5b+D562J5b6FXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICBsZXQgcmVzdWx0ID0gcmVxdWVzdChjb25maXJtLCB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICdjb250ZW50LXR5cGUnOiAnYXBwbGljYXRpb24vanNvbidcXFxcbiAgICAgICAgICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgICAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJwYXJhbXNcXFxcXFxcIjoge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwicmVnaXN0X2lkXFxcXFxcXCI6IGlkLFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwieXptXFxcXFxcXCI6IGlucHV0XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgICAgICAgICBtZXRob2Q6ICdQT1NUJ1xcXFxuICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIHJlc3VsdCA9IEpTT04ucGFyc2UocmVzdWx0KS5yZXN1bHQ7XFxcXG4gICAgICAgICAgICAgICAgaWYgKHJlc3VsdC5zdGF0dXMgIT09IDApIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgaGlkZUxvYWRpbmcoKTtcXFxcbiAgICAgICAgICAgICAgICAgIC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cXFxcXFxcIikgKyBpZCkubGF6eVJ1bGUoKHVzZXJuYW1lLCBwYXNzd29yZCkgPT4ge1xcXFxuICAgICAgICBsZXQgbm90ZXMgPSBnZXRWYXIoJ1dhcmVob3VzZS5ydWxlLm5vdGVzJywgJycpO1xcXFxuICAgICAgICBsZXQgcmVzdWx0ID0gcmVxdWVzdChpbnB1dCwge1xcXFxuICAgICAgICAgICAgaGVhZGVyczoge1xcXFxuICAgICAgICAgICAgICAgICdjb250ZW50LXR5cGUnOiAnYXBwbGljYXRpb24vanNvbidcXFxcbiAgICAgICAgICAgIH0sXFxcXG4gICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgXFxcXFxcXCJwYXJhbXNcXFxcXFxcIjoge1xcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInFxXFxcXFxcXCI6IHVzZXJuYW1lLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInBhc3N3b3JkXFxcXFxcXCI6IHBhc3N3b3JkLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIm5vdGVcXFxcXFxcIjpub3Rlc1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgbWV0aG9kOiAnUE9TVCdcXFxcbiAgICAgICAgfSk7XFxcXG4gICAgICAgIHJlc3VsdCA9IEpTT04ucGFyc2UocmVzdWx0KS5yZXN1bHQ7XFxcXG4gICAgICAgIGlmIChyZXN1bHQuc3RhdHVzICE9PSAwKSB7XFxcXG4gICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL1xcXFxcXFwiICsgcmVzdWx0LmRldGFpbDtcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBiYWNrKGZhbHNlKTtcXFxcbiAgICAgICAgcmV0dXJuIFxcXFxcXFwidG9hc3Q6Ly/kv67mlLnmiJDlip9cXFxcXFxcIjtcXFxcbiA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4gICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICBsZXQgcmVzdWx0ID0gcmVxdWVzdChhLCB7XFxcXG4gICAgICAgICAgICAgICAgaGVhZGVyczoge1xcXFxuICAgICAgICAgICAgICAgICAgICAnY29udGVudC10eXBlJzogJ2FwcGxpY2F0aW9uL2pzb24nXFxcXG4gICAgICAgICAgICAgICAgfSxcXFxcbiAgICAgICAgICAgICAgICBib2R5OiBKU09OLnN0cmluZ2lmeSh7XFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwicGFyYW1zXFxcXFxcXCI6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIFxcXFxcXFwicXFcXFxcXFxcIjogcXFcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH0pLFxcXFxuICAgICAgICAgICAgICAgIG1ldGhvZDogJ1BPU1QnXFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgIHJlc3VsdCA9IEpTT04ucGFyc2UocmVzdWx0KS5yZXN1bHQ7XFxcXG4gICAgICAgICAgICBpZiAocmVzdWx0LnN0YXR1cyA9PT0gMCkge1xcXFxuICAgICAgICAgICAgICAgIGhpZGVMb2FkaW5nKCk7XFxcXG4gICAgICAgICAgICAgICAgcmV0dXJuIFxcXFxcXFwidG9hc3Q6Ly9cXFxcXFxcIiArIHJlc3VsdC5kZXRhaWw7XFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIGxldCByZXN1bHQyID0gSlNPTi5wYXJzZShyZXF1ZXN0KGIgKyBcXFxcXFxcIj9xcT1cXFxcXFxcIiArIHFxKSk7XFxcXG4gICAgICAgICAgICAgICAgaGlkZUxvYWRpbmcoKTtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gXFxcXFxcXCJ0b2FzdDovL1xcXFxcXFwiICsgcmVzdWx0Mi5kZXRhaWw7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgIC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FyYW1zXFxcXFxcXCI6IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJxcVxcXFxcXFwiOiBxcSxcXFxcbiAgICAgICAgICAgICAgICAgICAgXFxcXFxcXCJhdXRoX2NvZGVcXFxcXFxcIjogeXptXFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSksXFxcXG4gICAgICAgICAgICBtZXRob2Q6ICdQT1NUJ1xcXFxuICAgICAgICB9KTtcXFxcbiAgICAgICAgcmVzdWx0ID0gSlNPTi5wYXJzZShyZXN1bHQpLnJlc3VsdDtcXFxcbiAgICAgICAgaWYgKHJlc3VsdC5zdGF0dXMgPT09IDApIHtcXFxcbiAgICAgICAgICAgIGYudXNlciA9IFtxcSwgeXptXTtcXFxcbiAgICAgICAgICAgIHdyaXRlRmlsZShcXFxcXFxcImhpa2VyOi8vZmlsZXMvV2FyZWhvdXNlVVNFUi5qc29uXFxcXFxcXCIsIEpTT04uc3RyaW5naWZ5KGYpKTtcXFxcbiAgICAgICAgICAgIGxldCBpbmRleCA9IGwuZmluZEluZGV4KGl0ZW0gPT4gaXRlbVswXSA9PT0gcXEpO1xcXFxuICAgICAgICAgICAgaWYgKGluZGV4ID4gLTEpIHtcXFxcbiAgICAgICAgICAgICAgICBsLnNwbGljZShpbmRleCwgMSwgW3FxLCB5em1dKTtcXFxcbiAgICAgICAgICAgIH0gZWxzZSBpZiAobC5sZW5ndGggPCA2KSB7XFxcXG4gICAgICAgICAgICAgICAgbC5wdXNoKFtxcSwgeXptXSk7XFxcXG4gICAgICAgICAgICB9IGVsc2Uge1xcXFxuICAgICAgICAgICAgICAgIGwuc3BsaWNlKDAsIDEpO1xcXFxuICAgICAgICAgICAgICAgIGwucHVzaChbcXEsIHl6bV0pO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgd3JpdGVGaWxlKFxcXFxcXFwiaGlrZXI6Ly9maWxlcy9XYXJlaG91c2VVU0VSQS5qc29uXFxcXF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Ki8qOyBxPTAuMDEnLFxcXFxuICAgICAgICAgICAgICAgICdBY2NlcHQtTGFuZ3VhZ2UnOid6aC1DTicsXFxcXG4gICAgICAgICAgICB9O1xcXFxuICAgICAgICAgICAgaWYod2ViX3VybF9hcnIubGVuZ3RoPj0zJiZ3ZWJfdXJsX2FyclsyXS5sZW5ndGg+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+/pS8udGVzdChpbnB1dCkpe1xcXFxuICAgICAgICAgICAgbG9nKCfkuLvpopjpk77mjqUnKTtcXFxcbiAgICAgICAgICAgIGxldCB3ZWJfdXJsX2FyciA9IGlucHV0LnNwbGl0KCfvv6UnKTtcXFxcbiAgICAgICAgICAgIGxldCB3ZWJfdXJsID0gd2ViX3VybF9hcnJbd2ViX3VybF9hcnIubGVuZ3RoLTFdO1xcXFxuICAgICAgICAgICAgbGV0IGJhY2tfY29kZSA9IHBhcnNlUGFzdGUod2ViX3VybCk7XFxcXG4gICAgICAgICAgICBpZihiYWNrX2NvZGUubGVuZ3RoPjIwKSB7XFxcXG4gICAgICAgICAgICAgICAgcHV0VmFyKCdob3VzZS51cGxvYWRfY29kZScsYmFja19jb2RlKTtcXFxcbiAgICAgICAgICAgICAgICByZWZyZXNoUGFnZSh0cnVlKTtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5rqQ56CB5bey6I635Y+WLOW5tumDqOWIhuaPkuWFpeWIsOaWh+acrOWMuuWfnydcXFxcbiAgICAgICAgICAgIH1lbHNle1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/plJnor6/vvIzmnKzmrKHojrflj5bov5Tlm57kuLo6XFxcXFxcXFxuJytiYWNrX2NvZGU7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1lbHNle1xcXFxuICAgICAgICAgICAgcmV0dXJuICd0b2FzdDovL+mdnuazlemTvuaOpTpcXFxcXFxcXG4nK2dldFZhcignaG91c2Uud2ViX3VybCcpO1xcXFxuICAg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cnKTtcXFxcbiAgICAgICAgbGV0IHdlYl91cmwgPSBpbnB1dC5zcGxpdCgnOycpWzBdO1xcXFxuICAgICAgICBsZXQgZmlsZU5hbWUgPSAnJztcXFxcbiAgICAgICAgaWYoL15oaWtlcjp8XmZpbGU6fF5odHRwOnxeaHR0cHM6fF5cXFxcXFxcXC9zdG9yYWdlXFxcXFxcXFwvfF5cXFxcXFxcXC9zZGNhcmRcXFxcXFxcXC8vLnRlc3Qod2ViX3VybCkpe1xcXFxuICAgICAgICAgICAgZmlsZU5hbWUgPSB3ZWJfdXJsLnNwbGl0KCcvJylbd2ViX3VybC5zcGxpdCgnLycpLmxlbmd0aC0xXTtcXFxcbiAgICAgICAgfWVsc2UgaWYoL+S4u+mimO+/pXzlhYPntKDvv6UvLnRlc3QoaW5wdXQpKXtcXFxcbiAgICAgICAgICAgIGxldCBia2FyciA9IHVwX2NvZGUuc3BsaXQoJ++/pScpO1xcXFxuICAgICAgICAgICAgaWYoYmthcnIubGVuZ3RoPDMpe1xcXFxuICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kupHliarotLTmnb/lhoXlrrnmnInor68nXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICBzd2l0Y2ggKGJrYXJyWzFdKSB7XFxcXG4gICAgICAgICAgICAgICAgY2FzZSAnbXlfaG9tZV90aGVtZSc6XFxcXG4gICAgICAgICAgICAgICAgICAgIGZpbGVOYW1lID0gdXBfY29kZS5zcGxpdCgn44CMJylbMV0uc3BsaXQoJ+OAjScpWzBdO1xcXFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXFxcbiAgICAgICAgICAgICAgICBjYXNlICdteV9ob21lX3NpbmdsZSc6XFxcXG4gICAgICAgICAgICAgICAgICAgIGZpbGVOYW1lID0gdXBfY29kZS5zcGxpdCgn44CMJylbMV0uc3BsaXQoJ+OAjScpWzBdO1xcXFxuICAgICAgICAgICAgICAgICAgICBicmVhaztcXFxcbiAgICAgICAgICAgICAgIC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GV0IGxpc3Q9cGRmYShodG1sLHRbMF0pO1xcXFxuICAgICAgICBsZXQgbGF6eSA9ICQoJycpLmxhenlSdWxlKCgpPT57XFxcXG4gICAgICAgICAgICBjb25zdCB7bGF6eVBhcnNlfSA9ICQucmVxdWlyZSgnaGlrZXI6Ly9wYWdlL2dsb2JhbFBhcnNlP3J1bGU96YGT6ZW/5LuT5bqTUHJvJyk7XFxcXG4gICAgICAgICAgICByZXR1cm4gbGF6eVBhcnNlKGlucHV0KVxcXFxuICAgICAgICB9KTtcXFxcbiAgICAgICAgZm9yKGxldCBpIGluIGxpc3Qpe1xcXFxuICAgICAgICAgICAgbGV0IF9waWMgPSB0WzJdP3BkKGxpc3RbaV0sdFsyXSk6Jyc7XFxcXG4gICAgICAgICAgICBpZihpc1BpYyhfcGljKSYmIS9AUmVmZXJlcj0vLnRlc3QoX3BpYykpe1xcXFxuICAgICAgICAgICAgICAgIF9waWMrPSdAUmVmZXJlcj0nXFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICBsZXQgaXQ9e1xcXFxuICAgICAgICAgICAgICAgIHRpdGxlOnBkZmgobGlzdFtpXSx0WzFdKSxcXFxcbiAgICAgICAgICAgICAgICBwaWNfdXJsOl9waWMsXFxcXG4gICAgICAgICAgICAgICAgZGVzYzpwZGZoKGxpc3RbaV0sdFszXSksXFxcXG4gICAgICAgICAgICAgICAgdXJsOmVqP3BkKGxpc3RbaV0sdFs0XSk6cGQobGlzdFtpXSx0WzRdKStsYXp5XFxcXG4gICAgICAgICAgICB9O1xcXFxuICAgICAgICAgICAgaWYodC5sZW5ndGg+NSl7Ly/lhoXlrrnvvIznlKjkuo7mkJzntKJcXFxcbiAgICAgICAgICAgICAgICBpdC5jb250ZW50PXBkZmgobGlzdFtpXSx0WzVdKVxcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgZC5wdXNoKGl0KTtcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICBpZihvbmx5YmFjayl7XFxc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YodHlwZW9mKGZiYSk9PSd1bmRlZmluZWQnfHwhZmJhKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgdmFyIGZiYSA9IGZ5X2JyaWRnZV9hcHA7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIGlmKHR5cGVvZihyZXF1ZXN0KT09J3VuZGVmaW5lZCd8fCFyZXF1ZXN0KXtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGV2YWwoZmJhLmdldEludGVybmFsSnMoKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB9Y2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZmJhLmxvZyhlLm1lc3NhZ2UpO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBmYmEucHV0VmFyKFxcXFxcXFwiX3g1anhVcmxcXFxcXFxcIixwbGF5VXJsKTtcXFxcbiAgICAgICAgICAgICAgICBpZih3aW5kb3cuY291bnQgPT0gbnVsbCl7XFxcXG4gICAgICAgICAgICAgICAgICAgIHdpbmRvdy5jb3VudD0xO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICBsZXQgdGV4dD0nJztcXFxcbiAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICB0ZXh0PWRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoXFxcXFxcXCJib2R5XFxcXFxcXCIpLmlubmVyVGV4dDtcXFxcbiAgICAgICAgICAgICAgICB9Y2F0Y2ggKGUpIHtmYmEubG9nKGUubWVzc2FnZSl9XFxcXG4gICAgICAgICAgICAgICAgaWYoL+inpuWPkeS6humYsuebl+mTvnzmnKrmjojmnYN85o6l5Y+j6Ziy55uXLy50ZXN0KHRleHQpJiZ3aW5kb3cuY291bnQ9PT0xKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgZmJhLmxvZyhcXFxcXFxcIuajgOa1i+WIsOacieaOiOadg++8jOW8gOWni+i/h+aOiOadg1xcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgLy9sb2NhdGlvbi5yZWxvYWQoKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgbG9jYXRpb24uaHJlZj1mYmEuZ2V0VmFyKFxcXFxcXFwiX3g1anhVcmxcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIHdpbmRvdy5jb3VudCsrO1xcXFxuICAgICAgICAgICAgICAgIC8vIGZiYS5sb2coJ2NvdW50Oicrd2luZG93LmNvdW50KycsbWF4X2NvdW50OicrbWF4X2NvdW50KTtcXFxcbiAgICAgICAgICAgICAgICBpZiggd2luZG93LmNvdW50ID49IG1heF9jb3VudCl7XFxcXG4gICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcXFxcXCLotoXov4dcXFxcXFxcIittYXhfY291bnQqMjUwK1xcXFxcXFwi5q+r56eS5pyq6I635Y+W5Yiw6LWE5rqQ5Zyw5Z2A77yM6Lez5Yiw5rqQ572R6aG1LOS7peS4i+aYr+WKoOi9vei/h+eahOWcsOWdgFxcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB0ZXh0PWRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoXFxcXFxcXCJib2R5XFxcXFxcXCIpLmlubmVyVGV4dDtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGZiYS5sb2codGV4dCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH1jYXRjaCAoZSkge2ZiYS5sb2coZS5tZXNzYWdlKX1cXFxcbiAgICAgICAgICAgICAgICAgICAgZmJhLmxvZyhKU09OLnN0cmluZ2lmeShfZ2V0VXJscygpKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmYmEuZ2V0VmFyKFxcXFxcXFwiX3g1anhVcmxcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIGZ1bmN0aW9uIG11dGVNZShlbGVtKSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBlbGVtLnBhdXNlKCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgY2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICB2YXIgdmlkZW9zID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbChcXFxcXFxcInZpZGVvXFxcXFxcXCIpLCBhdWRpb3MgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKFxcXFxcXFwiYXVkaW9cXFxcXFxcIiksIHYyID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvckFsbChcXFxcXFxcImVtYmVkXFxcXFxcXCIpLCB2MyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoXFxcXFxcXCIjcGxheWVyXFxcXFxcXCIpO1xcXFxuICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIFtdLmZvckVhY2guY2FsbCh2aWRlb3MsIGZ1bmN0aW9uICh2aWRlbykge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbXV0ZU1lKHZpZGVvKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge31cXFxcbiAgICAgICAgICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgICAgICAgICBbXS5mb3JFYWNoLmNhbGwoYXVkaW9zLCBmdW5jdGlvbiAoYXVkaW8pIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG11dGVNZShhdWRpbyk7XFxcXG4gICAgICAgICAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XFxcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKHYyLCBmdW5jdGlvbiAodikge1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgbXV0ZU1lKHYpO1xcXFxuICAgICAgICAgICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxcXFxuICAgICAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgICAgIFtdLmZvckVhY2guY2FsbCh2MywgZnVuY3Rpb24gKHYpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIG11dGVNZSh2KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge31cXFxcbiAgICAgICAgICAgICAgICB2YXIgdXJscyA9IF9nZXRVcmxzKCk7XFxcXG4gICAgICAgICAgICAgICAgLy8gZmJhLmxvZyhKU09OLnN0cmluZ2lmeSh1cmxzKSk7XFxcXG4gICAgICAgICAgICAgICAgdHJ5IHtcXFxcbiAgICAgICAgICAgICAgICAgICAgZm9yKGxldCBpIGluIHVybHMpIHtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1PXVybHNbaV07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB0cnl7dT1kZWNvZGVVUklDb21wb25lbnQodSk7fWNhdGNoKGUpe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHU9dW5lc2NhcGUodSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAvL1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYoL3VybD1odHRwLy50ZXN0KHUpKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ID0gdS5zcGxpdChcXFxcXFxcInVybD1cXFxcXFxcIikuc2xpY2UoLTEpWzBdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGZiYS5sb2coXFxcXFxcXCJ1cmzliIblibI6XFxcXFxcXCIrdSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZigvdXJsPVxcXFxcXFxcLy8udGVzdCh1KSYmL1xcXFxcXFxcLm0zdTgvLnRlc3QodSkpe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBob3N0ID0gdS5tYXRjaCgvKC4qKVxcXFxcXFxcL1xcXFxcXFxcLyguKj8pXFxcXFxcXFwvLylbMF07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdSA9IGhvc3QrdS5zcGxpdChcXFxcXFxcInVybD1cXFxcXFxcIikuc2xpY2UoLTEpWzBdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGZiYS5sb2coXFxcXFxcXCJ1cmzliIblibI6XFxcXFxcXCIrdSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKC92aWQ9aHR0cC8udGVzdCh1KSl7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdSA9IHUuc3BsaXQoXFxcXFxcXCJ2aWQ9XFxcXFxcXCIpLnNsaWNlKC0xKVswXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYmEubG9nKFxcXFxcXFwidmlk5YiG5YmyOlxcXFxcXFwiK3UpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYoL3ZpZD1cXFxcXFxcXC8vLnRlc3QodSkmJi9cXFxcXFxcXC5tM3U4Ly50ZXN0KHUpKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaG9zdCA9IHUubWF0Y2goLyguKilcXFxcXFxcXC9cXFxcXFxcXC8oLio/KVxcXFxcXFxcLy8pWzBdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUgPSBob3N0K3Uuc3BsaXQoXFxcXFxcXCJ2aWQ9XFxcXFxcXCIpLnNsaWNlKC0xKVswXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYmEubG9nKFxcXFxcXFwidmlk5YiG5YmyOlxcXFxcXFwiK3UpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZigvXFxcXFxcXFw/KC4qKT1odHRwLy50ZXN0KHUpJiYvXFxcXFxcXFwubTN1OC8udGVzdCh1KSl7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdSA9IFxcXFxcXFwiaHR0cFxcXFxcXFwiK3Uuc3BsaXQoL1xcXFxcXFxcPyguKik9aHR0cC8pLnNsaWNlKC0xKVswXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYmEubG9nKFxcXFxcXFwi5YW25LuW5YiG5YmyOlxcXFxcXFwiK3UpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgLy98aW5kZXhcXFxcXFxcXC5tM3U4JFxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZigvXFxcXFxcXFwvMVxcXFxcXFxcLm0zdTgvLnRlc3QodSkpe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgdT11LnJlcGxhY2UoLyZmcm9tPS4qfCZuZXh0PS4qfCZqdW1wPS4qLywnJyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVhbFVybCA9IGlzVmlkZW8odSxyZWNoYW5nZSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZih0eXBlb2YocmVhbFVybCk9PSdzdHJpbmcnJiYhaXNCYWRWaWRlbyh1KSl7Ly/ov4fmu6TlkIrmr5vop4bpopFcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2Z5X2JyaWRnZV9hcHAuc2V0V2ViVWEoUENfVUEpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKHR5cGVvZihmYmEuZ2V0SGVhZGVyVXJsKSE9PSd1bmRlZmluZWQnJiZ0eXBlb2YocmVjaGFuZ2UpIT09J2Z1bmN0aW9uJyl7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxldCBiYWNrVXJsID0gZmJhLmdldEhlYWRlclVybCh1LnJlcGxhY2UoXFxcXFxcXCI7e1xcXFxcXFwiLFxcXFxcXFwiI2lzVmlkZW89dHJ1ZSM7e1xcXFxcXFwiKSk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBiYWNrVXJsID0gZmJhLmdldEhlYWRlclVybCh1cmxzW2ldKS5yZXBsYWNlKCc7eycsJyNpZ25vcmVJbWc9dHJ1ZSMjaXNWaWRlbz10cnVlIzt7Jyk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB1MSA9IGJhY2tVcmwuc3BsaXQoJyNpZ25vcmVJbWcnKVswXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IHUyID0gJyNpZ25vcmVJbWcnK2JhY2tVcmwuc3BsaXQoJyNpZ25vcmVJbWcnKVsxXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdTEgPSB1MS5yZXBsYWNlKC8mZnJvbT0uKnwmbmV4dD0uKnwmanVtcD0uKi8sJycpO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZigvdXJsPWh0dHAvLnRlc3QodTEpKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUxID0gdTEuc3BsaXQoXFxcXFxcXCJ1cmw9XFxcXFxcXCIpLnNsaWNlKC0xKVswXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2UgaWYoL3VybD1cXFxcXFxcXC8vLnRlc3QodTEpJiYvXFxcXFxcXFwubTN1OC8udGVzdCh1MSkpe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhvc3QxID0gdTEubWF0Y2goLyguKilcXFxcXFxcXC9cXFxcXFxcXC8oLio/KVxcXFxcXFxcLy8pWzBdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdTEgPSBob3N0MSt1MS5zcGxpdChcXFxcXFxcInVybD1cXFxcXFxcIikuc2xpY2UoLTEpWzBdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZmJhLmxvZyhcXFxcXFxcInVybOWIhuWJsjpcXFxcXFxcIit1KTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlIGlmKC92aWQ9aHR0cC8udGVzdCh1MSkpe1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdTEgPSB1MS5zcGxpdChcXFxcXFxcInZpZD1cXFxcXFxcIikuc2xpY2UoLTEpWzBdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZigvdmlkPVxcXFxcXFxcLy8udGVzdCh1MSkmJi9cXFxcXFxcXC5tM3U4Ly50ZXN0KHUxKSl7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgaG9zdDEgPSB1MS5tYXRjaCgvKC4qKVxcXFxcXFxcL1xcXFxcXFxcLyguKj8pXFxcXFxcXFwvLylbMF07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1MSA9IGhvc3QxK3UxLnNwbGl0KFxcXFxcXFwidmlkPVxcXFxcXFwiKS5zbGljZSgtMSlbMF07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZigvXFxcXFxcXFw/KC4qKT1odHRwLy50ZXN0KHUxKSYmL1xcXFxcXFxcLm0zdTgvLnRlc3QodTEpKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUxID0gXFxcXFxcXCJodHRwXFxcXFxcXCIrdTEuc3BsaXQoL1xcXFxcXFxcPyguKik9aHR0cC8pLnNsaWNlKC0xKVswXTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWNrVXJsID0gdTEgKyB1MjtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZmJhLmxvZygn6L+U5Zue6Ieq5Yqo5YqgY29va2ll6ZO+5o6lOicrYmFja1VybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5sb2coJ+i/lOWbnumTvuaOpTonK3UrJ+W5tuiHquWKqOWKoOS6hmNvb2tpZSzlhbfkvZNjb29raWXlnKjop4bpopHmkq3mlL7lpITmn6XnnIsnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGJhY2tVcmw7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2V7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5sb2coXFxcXFxcXCLov5Tlm57ku5PlupN4NeWFjeWXhee7k+aenDpcXFxcXFxcIityZWFsVXJsKTtc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nJztcXFxcbiAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgdGV4dD1kb2N1bWVudC5xdWVyeVNlbGVjdG9yKFxcXFxcXFwiYm9keVxcXFxcXFwiKS5pbm5lclRleHQ7XFxcXG4gICAgICAgICAgICB9Y2F0Y2ggKGUpIHtmYmEubG9nKGUubWVzc2FnZSl9XFxcXG4gICAgICAgICAgICBpZigv6Kem5Y+R5LqG6Ziy55uX6ZO+fOacquaOiOadg3zmjqXlj6PpmLLnm5cvLnRlc3QodGV4dCkmJndpbmRvdy5jb3VudD09MSl7XFxcXG4gICAgICAgICAgICAgICAgbG9jYXRpb24ucmVsb2FkKCk7XFxcXG4gICAgICAgICAgICAgICAgZmJhLmxvZyhcXFxcXFxcIuajgOa1i+WIsOacieaOiOadg++8jOW8gOWni+i/h+aOiOadg1xcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIHdpbmRvdy5jb3VudCsrO1xcXFxuICAgICAgICAgICAgLy8gZmJhLmxvZygnY291bnQ6JyArIHdpbmRvdy5jb3VudCArICcsbWF4X2NvdW50OicgKyBtYXhfY291bnQpO1xcXFxuICAgICAgICAgICAgaWYgKHdpbmRvdy5jb3VudCA+PSBtYXhfY291bnQpIHtcXFxcbiAgICAgICAgICAgICAgICBmYmEuY2xlYXJWYXIoJ3g1TGlzdCcpO1xcXFxuICAgICAgICAgICAgICAgIGZiYS5oaWRlTG9hZGluZygpO1xcXFxuICAgICAgICAgICAgICAgIGxldCBmbXNnID0gJ+mBk+mVv+S7k+W6k+mAmuWFjeino+aekOWksei0pSzljp/lm6A66LaF5pe2Jyt4NVRpbWVvdXQrJ+avq+enkic7XFxcXG4gICAgICAgICAgICAgICAgZmJhLmxvZyhmbXNnKTtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8vJytmbXNnO1xcXFxuICAgICAgICAgICAgfVxcXFxuICAgICAgICB9Y2F0Y2ggKGUpIHt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eSB7XFxcXG4gICAgICAgICAgICBbXS5mb3JFYWNoLmNhbGwodjIsIGZ1bmN0aW9uICh2KSB7XFxcXG4gICAgICAgICAgICAgICAgbXV0ZU1lKHYpO1xcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgIH0gY2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgfVxcXFxuICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgW10uZm9yRWFjaC5jYWxsKHYzLCBmdW5jdGlvbiAodikge1xcXFxuICAgICAgICAgICAgICAgIG11dGVNZSh2KTtcXFxcbiAgICAgICAgICAgIH0pO1xcXFxuICAgICAgICB9IGNhdGNoIChlKSB7XFxcXG4gICAgICAgIH1cXFxcbiAgICAgICAgdmFyIHVybHMgPSBfZ2V0VXJscygpO1xcXFxuICAgICAgICB0cnkge1xcXFxuICAgICAgICAgICAgZm9yIChsZXQgaSBpbiB1cmxzKSB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHU9dXJsc1tpXTtcXFxcbiAgICAgICAgICAgICAgICAvL3U9ZGVjb2RlVVJJQ29tcG9uZW50KHUpO1xcXFxuICAgICAgICAgICAgICAgIHRyeXt1PWRlY29kZVVSSUNvbXBvbmVudCh1KTt9Y2F0Y2goZSl7XFxcXG4gICAgICAgICAgICAgICAgICAgIHU9dW5lc2NhcGUodSk7XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIGlmKC91cmw9aHR0cC8udGVzdCh1KSl7XFxcXG4gICAgICAgICAgICAgICAgICAgIHUgPSB1LnNwbGl0KFxcXFxcXFwidXJsPVxcXFxcXFwiKS5zbGljZSgtMSlbMF07XFxcXG4gICAgICAgICAgICAgICAgfWVsc2UgaWYoL3ZpZD1odHRwLy50ZXN0KHUpKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgdSA9IHUuc3BsaXQoXFxcXFxcXCJ2aWQ9XFxcXFxcXCIpLnNsaWNlKC0xKVswXTtcXFxcbiAgICAgICAgICAgIC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Rlbyk9PSdzdHJpbmcnKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgbG9nKHRuYW1lKyflt7Lop6PmnpDlh7rop4bpopE6JytyZWFsVmlkZW8pO1xcXFxuICAgICAgICAgICAgICAgICAgICBpZihqbmFtZSl7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICByZWFsVmlkZW8rPVxcXFxcXFwi4piFXFxcXFxcXCIram5hbWVcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB2aWRlb3MucHVzaChyZWFsVmlkZW8pO1xcXFxuICAgICAgICAgICAgICAgIH1lbHNle1xcXFxuICAgICAgICAgICAgICAgICAgICBsb2codG5hbWUrJ+ino+aekOWHuuS4jeefpemBk+S7gOS5iOS4nOilvzonK3VybCk7XFxcXG4gICAgICAgICAgICAgICAgICAgIHVybCs9XFxcXFxcXCIjaXNWaWRlbz10cnVlI1xcXFxcXFwiO1xcXFxuICAgICAgICAgICAgICAgICAgICBpZihqbmFtZSl7XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICB1cmwrPVxcXFxcXFwi4piFXFxcXFxcXCIram5hbWVcXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgICAgICB2aWRlb3MucHVzaCh1cmwpO1xcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgIH1lbHNle1xcXFxuICAgICAgICAgICAgICAgIGxvZyh0bmFtZSsn5Li6anNvbuaOpeWPo+S4lOaXoOi/lOWbnuinhumikeWcsOWdgOaVsOaNrjonK3BsYXlVcmxMaXN0W2ldKydcXFxcXFxcXG4nK2JhY2tjb2RlKTtcXFxcbiAgICAgICAgICAgIH1cXFxcbiAgICAgICAgfWNhdGNoIChlKSB7XFxcXG4gICAgICAgICAgICBsb2codG5hbWUrJ+S4ung15o6l5Y+jLOWKoOWFpXg15ZeF5o6i5YiX6KGoJyk7XFxcXG4gICAgICAgICAgICB4NWxpc3QucHVzaChwbGF5VXJsTGlzdFtpXSk7XFxcXG4gICAgICAgIH1cXFxcbiAgICB9XFxcXG4gICAgLy8gbG9nKHZpZGVvcyk7XFxcXG4gICAgaWYodmlkZW9zLmxlbmd0aD4wKXtcXFxcbiAgICAgICAgaWYoZ2V0VmFyKCdkcC5jYWNoZVZpZGVvJywndHJ1ZScpPT09J3RydWUnJiZwYXJzZUludChnZXRBcHBWZXJzaW9uKCkpPj0yMjU1KVxcXFxuICAgICAgICB7XFxcXG4gICAgICAgICAgICBsb2coXFxcXFxcXCLlsIrmlaznmoTprZTmlq3nlKjmiLfvvIzop4bpopHnvJPlrZjlt7LlkK/nlKjvvIzor7flsL3mg4Xkuqvlj5fnnIvliafml7blhYlcXFxcXFxcIik7XFxcXG4gICAgICAgICAgICBsZXQgdmlkZW9zQ2FjaGU9dmlkZW9zLm1hcCgoaXQpPT57XFxcXG4gICAgICAgICAgICAgICAgbGV0IGhlYWRlcnM9e307XFxcXG4gICAgICAgICAgICAgICAgaWYoaXQuc3BsaXQoXFxcXFxcXCI7XFxcXFxcXCIpLmxlbmd0aD4xKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgbGV0IGhlYWQgPSBpdC5zcGxpdCgnOycpWzFdO1xcXFxuICAgICAgICAgICAgICAgICAgICBpZigvQC8udGVzdChoZWFkKSYmL3t8fS8udGVzdChoZWFkKSl7XFxcXG4vL2hlYWQgPSBoZWFkLnJlcGxhY2UoL3t8fS9nLCcnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWQgPSBoZWFkLnNwbGl0KFxcXFxcXFwie1xcXFxcXFwiKVsxXS5zcGxpdChcXFxcXFxcIn1cXFxcXFxcIilbMF07XFxcXG4gICAgICAgICAgICAgICAgICAgICAgICBoZWFkID0gaGVhZC5zcGxpdCgnJiYnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvcihsZXQgaSBpbiBoZWFkKXtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQga2V5ID0gaGVhZFtpXS5zcGxpdCgnQCcpWzBdO1xcXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCB2YWx1ZSA9aGVhZFtpXS5zcGxpdCgnQCcpWzFdLnJlcGxhY2UoLzsvLCfvvJvvvJsnKTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJzW2tleV0gPSB2YWx1ZTtcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgICAgIH1cXFxcbiAgICAgICAgICAgICAgICByZXR1cm4ge1xcXFxuICAgICAgICAgICAgICAgICAgICB1cmw6aXQuc3BsaXQoXFxcXFxcXCI7XFxcXFxcXCIpWzBdLnNwbGl0KFxcXFxcXFwi4piFXFxcXFxcXCIpWzBdLFxcXFxuICAgICAgICAgICAgICAgICAgICBvcHRpb25zOntcXFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcnM6aGVhZGVyc1xcXFxuICAgICAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuICAgICAgICAgICAgfSk7XFxcXG4gICAgICAgICAgICB2YXIgZGF0YT1iYXRjaENhY2hlTTN1OCh2aWRlb3NDYWNoZSk7XFxcXG4gICAgICAgICAgICBkYXRhPWRhdGEubWFwKChpdCxpZCk9PntcXFxcbiAgICAgICAgICAgICAgICBsZXQgZXh0cmE9XFxcXFxcXCJcXFxcXFxcIjtcXFxcbiAgICAgICAgICAgICAgICBpZih2aWRlb3NbaWRdLnNwbGl0KFxcXFxcXFwiO1xcXFxcXFwiKS5sZW5ndGg+MSl7XFxcXG4gICAgICAgICAgICAgICAgICAgIGV4dHJhPVxcXFxcXFwiO1xcXFxcXFwiK3ZpZGVvc1tpZF0uc3BsaXQoXFxcXFxcXCI7XFxcXFxcXCIpWzFdO1xcXFxuICAgICAgICAgICAgICAgIH1lbHNlIGlmKHZpZGVvc1tpZF0uc3BsaXQoXFxcXFxcXCLimIVcXFxcXFxcIikubGVuZ3RoPjEpe1xcXFxuICAgICAgICAgICAgICAgICAgICBleHRyYT1cXFxcXFxcIuKYhVxcXFxcXFwiK3ZpZGVvc1tpZF0uc3BsaXQoXFxcXFxcXCLimIVcXFxcXFxcIilbMV07XFxcXG4gICAgICAgICAgICAgICAgfVxcXFxuXFxcXG4gICAgICAgICAgICAgICAgaWYoaXQrXFxcXFxcXCJcXFxcXFxcIiE9XFxcXFxcXCJudWxsXFxcXFxcXCIpe1xcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXQrZXh0cmFcXFxcbiAgICAgICAgICAgICAgICB9ZWxzZXtcXFxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHZpZGVvc1tpZF1cXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9KTtcXFxcbiAgICAgICAgICAgIC8vbG9nKGRhdGEpO1xcXFxuICAgICAgICAgICAgcmV0dXJuIGRhdGFcXFxcbiAgICAgICAgICAgIC8vcmV0dXJuIHZpZGVvc1xcXFxuICAgICAgICB9ZWxzZXtcXFxcbiAgICAgICAgICAgIHJldHVybiB2aWRlb3NcXFxcbiAgICAgICAgfVxcXFxuICAgIH1cXFxcbiAgICBsb2coJ+WFseaciScreDVsaXN0Lmxlbmd0aCsn5LiqeDXlnLDlnYDov5vooYzova7mtYHll4XmjqInKTtcXFxcbiAgICAvL+ayoeacieeahOivneWwseW8gOWni+S+neasoXg15ZeF5o6iXFxcXG4gICAgc2hvd0xvYWRpbmcoJ+WXheaOouS4re+8jOiLpeWksei0peWwseWIh+aNondlYuWXheaOoi4uLicpO1xcXFxuICAgIHJldHVybiB4NVBhcnNlUHJvKHg1bGlzdCx4NVRpbWVvdXQsaXNWaWRlbyk7XFxcXG59XFxcXG52YXIgbGF6eT0kKCcnKS5sYXp5UnVsZSgoKT0+e1xcXFxuICAgIHRyeXtcXFxcbiAgICAgICAgcmVhbFVybD1pbnB1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lfdXJsLCB7XFxcXG4gICAgICAgIGhlYWRlcnM6IHtcXFxcbiAgICAgICAgICAgICdjb250ZW50LXR5cGUnOiAnYXBwbGljYXRpb24vanNvbidcXFxcbiAgICAgICAgfSxcXFxcbiAgICAgICAgYm9keTogSlNPTi5zdHJpbmdpZnkoe1xcXFxuICAgICAgICAgICAgXFxcXFxcXCJwYXJhbXNcXFxcXFxcIjoge1xcXFxuICAgICAgICAgICAgICAgIFxcXFxcXFwiZGF0YVxcXFxcXFwiOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwibmFtZVxcXFxcXFwiOiB0YXNrLm5hbWUsXFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwicHljb2RlXFxcXFxcXCI6IHRhc2sucHljb2RlLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcIm5vdGVcXFxcXFxcIjogdGFzay5ub3RlLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInRlc3RfY29kZVxcXFxcXFwiOiB0YXNrLnRlc3RfY29kZSxcXFxcbiAgICAgICAgICAgICAgICB9LFxcXFxuICAgICAgICAgICAgICAgIFxcXFxcXFwiYXV0aFxcXFxcXFwiOiB7XFxcXG4gICAgICAgICAgICAgICAgICAgIFxcXFxcXFwibmFtZVxcXFxcXFwiOiBob3VzZV9kYXRhLnVzZXJuYW1lfHxcXFxcXFxcIlxcXFxcXFwiLFxcXFxuICAgICAgICAgICAgICAgICAgICBcXFxcXFxcInBhc3N3b3JkXFxcXFxcXCI6IGhvdXNlX2RhdGEucGFzc3dvcmR8fFxcXFxcXFwiXFxcXFxcXCJcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH0pLFxcXFxuICAgICAgICBtZXRob2Q6ICdQT1NUJ1xcXFxuICAgIH0pO1xcXFxuICAgIHJldHVybiBKU09OLnBhcnNlKHJlc3VsdCkucmVzdWx0O1xcXFxufVxcXFxuXFxcX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aGFyc2V0PVVURi04JywnVXNlci1BZ2VudCc6ZGV2X3NldF9pbmZvWzNdfSxib2R5OkpTT04uc3RyaW5naWZ5KHNlbmRfZGF0YSksbWV0aG9kOidQT1NUJ307XFxcXG4gICAgICAgICAgICAvLyBwYXIyID0gSlNPTi5zdHJpbmdpZnkocGFyMik7IC8veDXph4zpnaLor7fmsYLmiY3pnIDopoHnvJbnoIFcXFxcbiAgICAgICAgICAgIHRyeSB7XFxcXG4gICAgICAgICAgICAgICAgbGV0IGJhY2tfcmV0ID0gcmVxdWVzdChpbmZvX3NldF91cmwsIHBhcjIpO1xcXFxuICAgICAgICAgICAgICAgIGJhY2tfcmV0ID0gSlNPTi5wYXJzZShiYWNrX3JldCkucmVzdWx0O1xcXFxuICAgICAgICAgICAgICAgIGlmKGJhY2tfcmV0LnN0YXR1cz09PTApe1xcXFxuICAgICAgICAgICAgICAgICAgICAvLyByZWZyZXNoUGFnZSgpO1xcXFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v5L+d5a2Y5oiQ5YqfXFxcXFxcXFxuJytiYWNrX3JldC5kZXRhaWw7XFxcXG4gICAgICAgICAgICAgICAgfWVsc2V7XFxcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAndG9hc3Q6Ly/kv53lrZjlpLHotKVcXFxcXFxcXG4nK2JhY2tfcmV0LmRldGFpbDtcXFxcbiAgICAgICAgICAgICAgICB9XFxcXG4gICAgICAgICAgICB9Y2F0Y2ggKGUpIHtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gJ3RvYXN0Oi8v6ZSZ6K+vXFxcXFxcXFxuJytlLm1lc3NhZ2U7XFxcXG4gICAgICAgICAgICB9XFxcXG4gICAgICAgIH1lbHNle1xcXFxuICAgICAgICAgICAgY29uZmlybSh7dGl0bGU6J+mBk+mVv+aPkOekuicsY29udGVudDon6Jm954S25L2g5b6I5oeS77yM5L2G5piv5YWs5ZGK6Iez5bCR5YaZNOS4quWtl+WQp++8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iaGlrZXJVaS5qc1xcXFxcXFwiLCAvL+a1t+mYlOe7hOS7tuS+nei1llxcXFxuICAgICAgICAgICAgaGlrZXJMaWJzOiBcXFxcXFxcImhpa2VyTGlicy5qc1xcXFxcXFwiLCAvL+a1t+mYlOWFqOiDveS+nei1llxcXFxuICAgICAgICB9KTtcXFxcbiAgICB9Y2F0Y2goZSl7XFxcXG4gICAgICAgIC8vdG9hc3QoJ+ivt+WwneivleeCueWHu+S7k+W6k+S4u+mhteeahOWNh+e6p+S7k+W6k+aXgei+ueeahOaMiemSruWNh+e6pyTmianlsZXvvIzlkKbliJnmn5Dkupvlip/og73kuI3og73mraPluLjkvb/nlKgnKTtcXFxcbiAgICAgICAgY29uZmlybSh7XFxcXG4gICAgICAgICAgICB0aXRsZTogJ+aPkOekui3ngrnlh7vnoa7lrprlj6/ku6Xlr7zlhaUnLFxcXFxuICAgICAgICAgICAgY29udGVudDogJ+ivt+WwneivleeCueWHu+S7k+W6k+S4u+mhteeahOWNh+e6p+S7k+W6k+aXgei+ueeahOaMiemSruWNh+e6pyTmianlsZXvvIzlkKbliJnmn5Dkupvlip/og73kuI3og73mraPluLjkvb/nlKgnLFxcXFxuICAgICAgICAgICAgY29uZmlybTogJC50b1N0cmluZygoKT0+e1xcXFxuICAgICAgICAgICAgICAgIGNvbnN0IHtnZXRBcGl9ID0gJC5yZXF1aXJlKFxcXFxcXFwiaGlrZXI6Ly9wYWdlL3V0aWxpeT9ydWxlPemBk+mVv+S7k+W6k1Byb1xcXFxcXFwiKTtcXFxcbiAgICAgICAgICAgICAgICBsZXQgcnVsZUhlYWQgPSAn5rW36ZiU6KeG55WM77yM572R6aG15o+S5Lu277+lanNfdXJs77+lJGhpa2VyQCc7XFxcXG4gICAgICAgICAgICAgICAgbGV0IHVybCA9IGdldEFwaSgnaW1wb3J0VXJsJykrXFxcXFxcXCI1MTExXFxcXFxcXCI7XFxcXG4gICAgICAgICAgICAgICAgbGV0IGltcG9ydFVybCA9ICdydWxlOi8vJytiYXNlNjRFbmNvZGUocnVsZUhlYWQrdXJsKTtcXFxcbiAgICAgICAgICAgICAgICByZXR1cm4gaW1wb3J0VXJsXFxcXG4gICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgICAgIGNhbmNlbDogJC50b1N0cmluZygoKT0+e1xcXFxuXFxcXG4gICAgICAgICAgICB9KSxcXFxcbiAgICAgICAgfSlcXFxcbiAgICB9XFxcXG59XFxcIn0se1xcXCJjb2xfdHlwZVxcXCI6XFxcIm1vdmllXzNcXFwiLFxcXCJuYW1lXFxcIjpcXFwiSW1wb3J06K+m57uGXFxcIixcXFwicGF0aFxcXCI6XFxcInJ1bGVEZXRhaWxJbXBvcnRcXFwiLFxcXCJydWxlXFxcIjpcXFwianM6XFxcXG4kLmV4cG9ydHMgPSBcXFxcXFxcImhpa2VyOi8vcGFnZS9ydWxlRGV0YWlsP3J1bGU96YGT6ZW/5LuT5bqTUHJvJmlkPVxcXFxcXFwiICsgJC5pbXBvcnRQYXJhbTtcXFxcblxcXCJ9XVwiLFwicHJveHlcIjpcIlwifSIsInRpdGxlIjoi5YWo6YOo6KeE5YiZIn0=
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement