diff --git a/bin/game.js b/bin/game.js index 473a511..8ef105b 100644 --- a/bin/game.js +++ b/bin/game.js @@ -32472,12 +32472,12 @@ var Color32; })(Color32 || (Color32 = {})); // src/definitions.ts -var BeerType = /* @__PURE__ */ ((BeerType4) => { - BeerType4[BeerType4["NONE"] = 0] = "NONE"; - BeerType4[BeerType4["RED"] = 1] = "RED"; - BeerType4[BeerType4["YELLOW"] = 2] = "YELLOW"; - BeerType4[BeerType4["GREEN"] = 3] = "GREEN"; - return BeerType4; +var BeerType = /* @__PURE__ */ ((BeerType3) => { + BeerType3[BeerType3["NONE"] = 0] = "NONE"; + BeerType3[BeerType3["RED"] = 1] = "RED"; + BeerType3[BeerType3["YELLOW"] = 2] = "YELLOW"; + BeerType3[BeerType3["GREEN"] = 3] = "GREEN"; + return BeerType3; })(BeerType || {}); var SoupState = /* @__PURE__ */ ((SoupState2) => { SoupState2[SoupState2["Empty"] = 0] = "Empty"; @@ -32493,6 +32493,9 @@ var IngredientType = /* @__PURE__ */ ((IngredientType2) => { IngredientType2[IngredientType2["SlicedSushi"] = 3] = "SlicedSushi"; IngredientType2[IngredientType2["Trash"] = 4] = "Trash"; IngredientType2[IngredientType2["BeerGlass"] = 5] = "BeerGlass"; + IngredientType2[IngredientType2["YellowBeer"] = 6] = "YellowBeer"; + IngredientType2[IngredientType2["RedBeer"] = 7] = "RedBeer"; + IngredientType2[IngredientType2["GreenBeer"] = 8] = "GreenBeer"; return IngredientType2; })(IngredientType || {}); var TAP_DATA = { @@ -32516,7 +32519,7 @@ function getTapData(tapBeerType) { return TAP_DATA[tapBeerType]; } var BeerGlass = engine.defineComponent("BeerGlass", { - beingFilled: Schemas.Boolean, + //beingFilled: Schemas.Boolean, filled: Schemas.Boolean, beerType: Schemas.EnumNumber(BeerType, 0 /* NONE */), drinking: Schemas.Boolean @@ -34598,10 +34601,25 @@ var customerTrashMessages = [ "They say you sell garbage for food, I'd like some", "Garbage, don't care what kind" ]; -var customerBeerMessages = [ - "I want a cold beer!", - "I heard you do craft beer, gimme!", - "Beer! A nice cold one!" +var customerEmptyBeerMessages = [ + "An empty beer glass. So it looks like I was waiting long", + "Just a glass, nothing in it. Feeling existential.", + "Empty glass. All I can afford." +]; +var customerYellowBeerMessages = [ + "I want a cold regular beer!", + "I heard you do craft beer, gimme a yellow!", + "Beer! A nice cold normal one!" +]; +var customerRedBeerMessages = [ + "I want a RED beer!", + "Red beer. Im a bit of a hipster!", + "Beer red like the blood of my enemies! lol" +]; +var customerGreenBeerMessages = [ + "I like weird stuff, green beer!", + "Green Beer. Dont care about the taste, want a cool pic for insagram", + "Beer! A nice cold green one!" ]; var customerLookingMessage = [ "Im just here to watch", @@ -34702,7 +34720,16 @@ function CreateCustomer() { messages = customerTrashMessages; break; case 5: - messages = customerBeerMessages; + messages = customerEmptyBeerMessages; + break; + case 6: + messages = customerYellowBeerMessages; + break; + case 7: + messages = customerRedBeerMessages; + break; + case 8: + messages = customerGreenBeerMessages; break; default: messages = customerLookingMessage; @@ -34741,6 +34768,7 @@ function CustomerSystem(dt) { customerData.waitingTimer -= dt; if (customerData.waitingTimer <= 0) { engine.removeEntityWithChildren(entity); + CreateCustomer(); } } } @@ -34843,12 +34871,6 @@ function pickingGlassSystem() { if (grabbable.beingProcessed) { return; } - if (grabbable.type === 5 /* BeerGlass */) { - const glass = BeerGlass.get(entity); - if (glass.beingFilled) { - return; - } - } pickUpItem(entity); } } @@ -34931,8 +34953,9 @@ function tapPumpSystem(dt) { if (glassEntity) { const glass = BeerGlass.getMutable(glassEntity); glass.beerType = tap.beerType; - glass.beingFilled = false; glass.filled = true; + const grabbable = GrabableObjectComponent.getMutable(glassEntity); + grabbable.beingProcessed = false; } } } else if (inputSystem.isTriggered(InputAction.IA_PRIMARY, PointerEventType.PET_DOWN, entity)) { @@ -34947,8 +34970,21 @@ function tapPumpSystem(dt) { const tap = TapComponent.getMutable(entity); tap.pouring = true; tap.pouringTime = 0; - glass.beingFilled = true; glass.beerType = tap.beerType; + const grabbable = GrabableObjectComponent.getMutable(glassEntity); + grabbable.beingProcessed = true; + switch (tap.beerType) { + case 2 /* YELLOW */: + grabbable.type = 6 /* YellowBeer */; + break; + case 1 /* RED */: + grabbable.type = 7 /* RedBeer */; + break; + case 3 /* GREEN */: + grabbable.type = 8 /* GreenBeer */; + break; + } + grabbable.type; } } } @@ -37937,4 +37973,4 @@ long/index.js: * SPDX-License-Identifier: Apache-2.0 *) */ -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vbm9kZV9tb2R1bGVzL0Bwcm90b2J1ZmpzL2FzcHJvbWlzZS9pbmRleC5qcyIsICIuLi9ub2RlX21vZHVsZXMvQHByb3RvYnVmanMvYmFzZTY0L2luZGV4LmpzIiwgIi4uL25vZGVfbW9kdWxlcy9AcHJvdG9idWZqcy9ldmVudGVtaXR0ZXIvaW5kZXguanMiLCAiLi4vbm9kZV9tb2R1bGVzL0Bwcm90b2J1ZmpzL2Zsb2F0L2luZGV4LmpzIiwgIi4uL25vZGVfbW9kdWxlcy9AcHJvdG9idWZqcy9pbnF1aXJlL2luZGV4LmpzIiwgIi4uL25vZGVfbW9kdWxlcy9AcHJvdG9idWZqcy91dGY4L2luZGV4LmpzIiwgIi4uL25vZGVfbW9kdWxlcy9AcHJvdG9idWZqcy9wb29sL2luZGV4LmpzIiwgIi4uL25vZGVfbW9kdWxlcy9wcm90b2J1ZmpzL3NyYy91dGlsL2xvbmdiaXRzLmpzIiwgIi4uL25vZGVfbW9kdWxlcy9wcm90b2J1ZmpzL3NyYy91dGlsL21pbmltYWwuanMiLCAiLi4vbm9kZV9tb2R1bGVzL3Byb3RvYnVmanMvc3JjL3dyaXRlci5qcyIsICIuLi9ub2RlX21vZHVsZXMvcHJvdG9idWZqcy9zcmMvd3JpdGVyX2J1ZmZlci5qcyIsICIuLi9ub2RlX21vZHVsZXMvcHJvdG9idWZqcy9zcmMvcmVhZGVyLmpzIiwgIi4uL25vZGVfbW9kdWxl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Y3Rpb24gZXhlY3V0b3IocmVzb2x2ZSwgcmVqZWN0KSB7XHJcbiAgICAgICAgcGFyYW1zW29mZnNldF0gPSBmdW5jdGlvbiBjYWxsYmFjayhlcnIvKiwgdmFyYXJncyAqLykge1xyXG4gICAgICAgICAgICBpZiAocGVuZGluZykge1xyXG4gICAgICAgICAgICAgICAgcGVuZGluZyA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgaWYgKGVycilcclxuICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyKTtcclxuICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBwYXJhbXMgPSBuZXcgQXJyYXkoYXJndW1lbnRzLmxlbmd0aCAtIDEpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBvZmZzZXQgPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIHdoaWxlIChvZmZzZXQgPCBwYXJhbXMubGVuZ3RoKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXNbb2Zmc2V0KytdID0gYXJndW1lbnRzW29mZnNldF07XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZS5hcHBseShudWxsLCBwYXJhbXMpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfTtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICBmbi5hcHBseShjdHggfHwgbnVsbCwgcGFyYW1zKTtcclxuICAgICAgICB9IGNhdGNoIChlcnIpIHtcclxuICAgICAgICAgICAgaWYgKHBlbmRpbmcpIHtcclxuICAgICAgICAgICAgICAgIHBlbmRpbmcgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgIHJlamVjdChlcnIpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcbn1cclxuIiwgIlwidXNlIHN0cmljdFwiO1xyXG5cclxuLyoqXHJcbiAqIEEgbWluaW1hbCBiYXNlNjQg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cclxuICogRW5jb2RlcyBhIGJ1ZmZlciB0byBhIGJhc2U2NCBlbmNvZGVkIHN0cmluZy5cclxuICogQHBhcmFtIHtVaW50OEFycmF5fSBidWZmZXIgU291cmNlIGJ1ZmZlclxyXG4gKiBAcGFyYW0ge251bWJlcn0gc3RhcnQgU291cmNlIHN0YXJ0XHJcbiAqIEBwYXJhbSB7bnVtYmVyfSBlbmQgU291cmNlIGVuZFxyXG4gKiBAcmV0dXJucyB7c3RyaW5nfSBCYXNlNjQgZW5jb2RlZCBzdHJpbmdcclxuICovXHJcbmJhc2U2NC5lbmNvZGUgPSBmdW5jdGlvbiBlbmNvZGUoYnVmZmVyLCBzdGFydCwgZW5kKSB7XHJcbiAgICB2YXIgcGFydHMgPSBudWxsLFxyXG4gICAgICAgIGNodW5rID0gW107XHJcbiAgICB2YXIgaSA9IDAsIC8vIG91dHB1dCBpbmRleFxyXG4gICAgICAgIGogPSAwLCAvLyBnb3RvIGluZGV4XHJcbiAgICAgICAgdDsgICAgIC8vIHRlbXBvcmFyeVxyXG4gICAgd2hpbGUgKHN0YXJ0IDwgZW5kKSB7XHJcbiAgICAgICAgdmFyIGIgPSBidWZmZXJbc3RhcnQrK107XHJcbiAgICAgICAgc3dpdGNoIChqKSB7XHJcbiAgICAgICAgICAgIGNhc2UgMDpcclxuICAgICAgICAgICAgICAgIGNodW5rW2krK10gPSBiNjRbYiA+PiAyXTtcclxuICAgICAgICAgICAgICAgIHQgPSAoYiAmIDMpIDw8IDQ7XHJcbiAgICAgICAgICAgICAgICBqID0gMTtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIDE6XHJcbiAgICAgICAgICAgICAgICBjaHVua1tpKytdID0gYjY0W3QgfCBiID4+IDRdO1xyXG4gICAgICAgICAgICAgICAgdCA9IChiICYgMTUpIDw8IDI7XHJcbiAgICAgICAgICAgICAgICBqID0gMjtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIDI6XHJcbiAgICAgICAgICAgICAgICBjaHVua1tpKytdID0gYjY0W3QgfCBiID4+IDZdO1xyXG4gICAgICAgICAgICAgICAgY2h1bmtbaSsrXSA9IGI2NFtiICYgNjNdO1xyXG4gICAgICAgICAgICAgICAgaiA9IDA7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKGkgPiA4MTkxKSB7XHJcbiAgICAgICAgICAgIChwYXJ0cyB8fCAocGFydHMgPSBbXSkpLnB1c2goU3RyaW5nLmZyb21DaGFyQ29kZS5hcHBseShTdHJpbmcsIGNodW5rKSk7XHJcbiAgICAgICAgICAgIGkgPSAwO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIGlmIChqKSB7XHJcbiAgICAgICAgY2h1bmtbaSsrXSA9IGI2NFt0XTtcclxuICAgICAgICBjaHVua1tpKytdID0gNjE7XHJcbiAgICAgICAgaWYgKGogPT09IDEpXHJcbiAgICAgICAgICAgIGNodW5rW2krK10gPSA2MTtcclxuICAgIH1cclxuICAgIGlmIChwYXJ0cykge1xyXG4gICAgICAgIGlmIChpKVxyXG4gICAgICAgICAgICBwYXJ0cy5wdXNoKFN0cmluZy5mcm9tQ2hhckNvZGUuYXBwbHkoU3RyaW5nLCBjaHVuay5zbGljZSgwLCBpKSkpO1xyXG4gICAgICAgIHJldHVybiBwYXJ0cy5qb2luKFwiXCIpO1xyXG4gICAgfVxyXG4gICAgcmV0dXJuIFN0cmluZy5mcm9tQ2hhckNvZGUuYXBwbHkoU3RyaW5nLCBjaHVuay5zbGljZSgwLCBpKSk7XHJcbn07XHJcblxyXG52YXIgaW52YWxpZEVuY29kaW5nID0gXCJpbnZhbGlkIGVuY29kaW5nXCI7XHJcblxyXG4vKipcclxuICogRGVjb2RlcyBhIGJhc2U2NCBlbmNvZGVkIHN0cmluZyB0byBhIGJ1ZmZlci5cclxuICogQHBhcmFtIHtzdHJpbmd9IHN0cmluZyBTb3VyY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5MTjIpLFxyXG4gICAgICAgICAgICAgICAgICAgIG1hbnRpc3NhID0gTWF0aC5yb3VuZCh2YWwgKiBNYXRoLnBvdygyLCAtZXhwb25lbnQpICogODM4ODYwOCkgJiA4Mzg4NjA3O1xyXG4gICAgICAgICAgICAgICAgd3JpdGVVaW50KChzaWduIDw8IDMxIHwgZXhwb25lbnQgKyAxMjcgPDwgMjMgfCBtYW50aXNzYSkgPj4+IDAsIGJ1ZiwgcG9zKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZXhwb3J0cy53cml0ZUZsb2F0TEUgPSB3cml0ZUZsb2F0X2llZWU3NTQuYmluZChudWxsLCB3cml0ZVVpbnRMRSk7XHJcbiAgICAgICAgZXhwb3J0cy53cml0ZUZsb2F0QkUgPSB3cml0ZUZsb2F0X2llZWU3NTQuYmluZChudWxsLCB3cml0ZVVpbnRCRSk7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHJlYWRGbG9hdF9pZWVlNzU0KHJlYWRVaW50LCBidWYsIHBvcykge1xyXG4gICAgICAgICAgICB2YXIgdWludCA9IHJlYWRVaW50KGJ1ZiwgcG9zKSxcclxuICAgICAgICAgICAgICAgIHNpZ24gPSAodWludCA+PiAzMSkgKiAyICsgMSxcclxuICAgICAgICAgICAgICAgIGV4cG9uZW50ID0gdWludCA+Pj4gMjMgJiAyNTUsXHJcbiAgICAgICAgICAgICAgICBtYW50aXNzYSA9IHVpbnQgJiA4Mzg4NjA3O1xyXG4gICAgICAgICAgICByZXR1cm4gZXhwb25lbnQgPT09IDI1NVxyXG4gICAgICAgICAgICAgICAgPyBtYW50aXNzYVxyXG4gICAgICAgICAgICAgICAgPyBOYU5cclxuICAgICAgICAgICAgICAgIDogc2lnbiAqIEluZmluaXR5XHJcbiAgICAgICAgICAgICAgICA6IGV4cG9uZW50ID09PSAwIC8vIGRlbm9ybWFsXHJcbiAgICAgICAgICAgICAgICA/IHNpZ24gKiAxLjQwMTI5ODQ2NDMyNDgxN2UtNDUgKiBtYW50aXNzYVxyXG4gICAgICAgICAgICAgICAgOiBzaWduICogTWF0aC5wb3coMiwgZXhwb25lbnQgLSAxNTApICogKG1hbnRpc3NhICsgODM4ODYwOCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBleHBvcnRzLnJlYWRGbG9hdExFID0gcmVhZEZsb2F0X2llZWU3NTQuYmluZChudWxsLCByZWFkVWludExFKTtcclxuICAgICAgICBleHBvcnRzLnJlYWRGbG9hdEJFID0gcmVhZEZsb2F0X2llZWU3NTQuYmluZChudWxsLCByZWFkVWludEJFKTtcclxuXHJcbiAgICB9KSgpO1xyXG5cclxuICAgIC8vIGRvdWJsZTogdHlwZWQgYXJyYXlcclxuICAgIGlmICh0eXBlb2YgRmxvYXQ2NEFycmF5ICE9PSBcInVuZGVmaW5lZFwiKSAoZnVuY3Rpb24oKSB7XHJcblxyXG4gICAgICAgIHZhciBmNjQgPSBuZXcgRmxvYXQ2NEFycmF5KFstMF0pLFxyXG4gICAgICAgICAgICBmOGIgPSBuZXcgVWludDhBcnJheShmNjQuYnVmZmVyKSxcclxuICAgICAgICAgICAgbGUgID0gZjhiWzddID09PSAxMjg7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHdyaXRlRG91YmxlX2Y2NF9jcHkodmFsLCBidWYsIHBvcykge1xyXG4gICAgICAgICAgICBmNjRbMF0gPSB2YWw7XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgICAgXSA9IGY4YlswXTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDFdID0gZjhiWzFdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgMl0gPSBmOGJbMl07XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyAzXSA9IGY4YlszXTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDRdID0gZjhiWzRdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgNV0gPSBmOGJbNV07XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyA2XSA9IGY4Yls2XTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDddID0gZjhiWzddO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gd3JpdGVEb3VibGVfZjY0X3Jldih2YWwsIGJ1ZiwgcG9zKSB7XHJcbiAgICAgICAgICAgIGY2NFswXSA9IHZhbDtcclxuICAgICAgICAgICAgYnVmW3BvcyAgICBdID0gZjhiWzddO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgMV0gPSBmOGJbNl07XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyAyXSA9IGY4Yls1XTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDNdID0gZjhiWzRdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgNF0gPSBmOGJbM107XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyA1XSA9IGY4YlsyXTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDZdID0gZjhiWzFdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgN10gPSBmOGJbMF07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xyXG4gICAgICAgIGV4cG9ydHMud3JpdGVEb3VibGVMRSA9IGxlID8gd3JpdGVEb3VibGVfZjY0X2NweSA6IHdyaXRlRG91YmxlX2Y2NF9yZXY7XHJcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cclxuICAgICAgICBleHBvcnRzLndyaXRlRG91YmxlQkUgPSBsZSA/IHdyaXRlRG91YmxlX2Y2NF9yZXYgOiB3cml0ZURvdWJsZV9mNjRfY3B5O1xyXG5cclxuICAgICAgICBmdW5jdGlvbiByZWFkRG91YmxlX2Y2NF9jcHkoYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgZjhiWzBdID0gYnVmW3BvcyAgICBdO1xyXG4gICAgICAgICAgICBmOGJbMV0gPSBidWZbcG9zICsgMV07XHJcbiAgICAgICAgICAgIGY4YlsyXSA9IGJ1Zltwb3MgKyAyXTtcclxuICAgICAgICAgICAgZjhiWzNdID0gYnVmW3BvcyArIDNdO1xyXG4gICAgICAgICAgICBmOGJbNF0gPSBidWZbcG9zICsgNF07XHJcbiAgICAgICAgICAgIGY4Yls1XSA9IGJ1Zltwb3MgKyA1XTtcclxuICAgICAgICAgICAgZjhiWzZdID0gYnVmW3BvcyArIDZdO1xyXG4gICAgICAgICAgICBmOGJbN10gPSBidWZbcG9zICsgN107XHJcbiAgICAgICAgICAgIHJldHVybiBmNjRbMF07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiByZWFkRG91YmxlX2Y2NF9yZXYoYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgZjhiWzddID0gYnVmW3BvcyAgICBdO1xyXG4gICAgICAgICAgICBmOGJbNl0gPSBidWZbcG9zICsgMV07XHJcbiAgICAgICAgICAgIGY4Yls1XSA9IGJ1Zltwb3MgKyAyXTtcclxuICAgICAgICAgICAgZjhiWzRdID0gYnVmW3BvcyArIDNdO1xyXG4gICAgICAgICAgICBmOGJbM10gPSBidWZbcG9zICsgNF07XHJcbiAgICAgICAgICAgIGY4YlsyXSA9IGJ1Zltwb3MgKyA1XTtcclxuICAgICAgICAgICAgZjhiWzFdID0gYnVmW3BvcyArIDZdO1xyXG4gICAgICAgICAgICBmOGJbMF0gPSBidWZbcG9zICsgN107XHJcbiAgICAgICAgICAgIHJldHVybiBmNjRbMF07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xyXG4gICAgICAgIGV4cG9ydHMucmVhZERvdWJsZUxFID0gbGUgPyByZWFkRG91YmxlX2Y2NF9jcHkgOiByZWFkRG91YmxlX2Y2NF9yZXY7XHJcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cclxuICAgICAgICBleHBvcnRzLnJlYWREb3VibG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AgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgbWFudGlzc2E7XHJcbiAgICAgICAgICAgICAgICBpZiAodmFsIDwgMi4yMjUwNzM4NTg1MDcyMDE0ZS0zMDgpIHsgLy8gZGVub3JtYWxcclxuICAgICAgICAgICAgICAgICAgICBtYW50aXNzYSA9IHZhbCAvIDVlLTMyNDtcclxuICAgICAgICAgICAgICAgICAgICB3cml0ZVVpbnQobWFudGlzc2EgPj4+IDAsIGJ1ZiwgcG9zICsgb2ZmMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVVaW50KChzaWduIDw8IDMxIHwgbWFudGlzc2EgLyA0Mjk0OTY3Mjk2KSA+Pj4gMCwgYnVmLCBwb3MgKyBvZmYxKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGV4cG9uZW50ID0gTWF0aC5mbG9vcihNYXRoLmxvZyh2YWwpIC8gTWF0aC5MTjIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChleHBvbmVudCA9PT0gMTAyNClcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXhwb25lbnQgPSAxMDIzO1xyXG4gICAgICAgICAgICAgICAgICAgIG1hbnRpc3NhID0gdmFsICogTWF0aC5wb3coMiwgLWV4cG9uZW50KTtcclxuICAgICAgICAgICAgICAgICAgICB3cml0ZVVpbnQobWFudGlzc2EgKiA0NTAzNTk5NjI3MzcwNDk2ID4+PiAwLCBidWYsIHBvcyArIG9mZjApO1xyXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlVWludCgoc2lnbiA8PCAzMSB8IGV4cG9uZW50ICsgMTAyMyA8PCAyMCB8IG1hbnRpc3NhICogMTA0ODU3NiAmIDEwNDg1NzUpID4+PiAwLCBidWYsIHBvcyArIG9mZjEpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBleHBvcnRzLndyaXRlRG91YmxlTEUgPSB3cml0ZURvdWJsZV9pZWVlNzU0LmJpbmQobnVsbCwgd3JpdGVVaW50TEUsIDAsIDQpO1xyXG4gICAgICAgIGV4cG9ydHMud3JpdGVEb3VibGVCRSA9IHdyaXRlRG91YmxlX2llZWU3NTQuYmluZChudWxsLCB3cml0ZVVpbnRCRSwgNCwgMCk7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHJlYWREb3VibGVfaWVlZTc1NChyZWFkVWludCwgb2ZmMCwgb2ZmMSwgYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgdmFyIGxvID0gcmVhZFVpbnQoYnVmLCBwb3MgKyBvZmYwKSxcclxuICAgICAgICAgICAgICAgIGhpID0gcmVhZFVpbnQoYnVmLCBwb3MgKyBvZmYxKTtcclxuICAgICAgICAgICAgdmFyIHNpZ24gPSAoaGkgPj4gMzEpICogMiArIDEsXHJcbiAgICAgICAgICAgICAgICBleHBvbmVudCA9IGhpID4+PiAyMCAmIDIwNDcsXHJcbiAgICAgICAgICAgICAgICBtYW50aXNzYSA9IDQyOTQ5NjcyOTYgKiAoaGkgJiAxMDQ4NTc1KSArIGxvO1xyXG4gICAgICAgICAgICByZXR1cm4gZXhwb25lbnQgPT09IDIwNDdcclxuICAgICAgICAgICAgICAgID8gbWFudGlzc2FcclxuICAgICAgICAgICAgICAgID8gTmFOXHJcbiAgICAgICAgICAgICAgICA6IHNpZ24gKiBJbmZpbml0eVxyXG4gICAgICAgICAgICAgICAgOiBleHBvbmVudCA9PT0gMCAvLyBkZW5vcm1hbFxyXG4gICAgICAgICAgICAgICAgPyBzaWduICogNWUtMzI0ICogbWFudGlzc2FcclxuICAgICAgICAgICAgICAgIDogc2lnbiAqIE1hdGgucG93KDIsIGV4cG9uZW50IC0gMTA3NSkgKiAobWFudGlzc2EgKyA0NTAzNTk5NjI3MzcwNDk2KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGV4cG9ydHMucmV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c3RhcnQgPSBvZmZzZXQsXHJcbiAgICAgICAgYzEsIC8vIGNoYXJhY3RlciAxXHJcbiAgICAgICAgYzI7IC8vIGNoYXJhY3RlciAyXHJcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHN0cmluZy5sZW5ndGg7ICsraSkge1xyXG4gICAgICAgIGMxID0gc3RyaW5nLmNoYXJDb2RlQXQoaSk7XHJcbiAgICAgICAgaWYgKGMxIDwgMTI4KSB7XHJcbiAgICAgICAgICAgIGJ1ZmZlcltvZmZzZXQrK10gPSBjMTtcclxuICAgICAgICB9IGVsc2UgaWYgKGMxIDwgMjA0OCkge1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgPj4gNiAgICAgICB8IDE5MjtcclxuICAgICAgICAgICAgYnVmZmVyW29mZnNldCsrXSA9IGMxICAgICAgICYgNjMgfCAxMjg7XHJcbiAgICAgICAgfSBlbHNlIGlmICgoYzEgJiAweEZDMDApID09PSAweEQ4MDAgJiYgKChjMiA9IHN0cmluZy5jaGFyQ29kZUF0KGkgKyAxKSkgJiAweEZDMDApID09PSAweERDMDApIHtcclxuICAgICAgICAgICAgYzEgPSAweDEwMDAwICsgKChjMSAmIDB4MDNGRikgPDwgMTApICsgKGMyICYgMHgwM0ZGKTtcclxuICAgICAgICAgICAgKytpO1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgPj4gMTggICAgICB8IDI0MDtcclxuICAgICAgICAgICAgYnVmZmVyW29mZnNldCsrXSA9IGMxID4+IDEyICYgNjMgfCAxMjg7XHJcbiAgICAgICAgICAgIGJ1ZmZlcltvZmZzZXQrK10gPSBjMSA+PiA2ICAmIDYzIHwgMTI4O1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgICAgICAgJiA2MyB8IDEyODtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgPj4gMTIgICAgIC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vKVxuICAgICAgICBmb3IgKDsgaSA8IDQ7ICsraSkge1xuICAgICAgICAgICAgLy8gMXN0Li40dGhcbiAgICAgICAgICAgIGJpdHMubG8gPSAoYml0cy5sbyB8ICh0aGlzLmJ1Zlt0aGlzLnBvc10gJiAxMjcpIDw8IGkgKiA3KSA+Pj4gMDtcbiAgICAgICAgICAgIGlmICh0aGlzLmJ1Zlt0aGlzLnBvcysrXSA8IDEyOClcbiAgICAgICAgICAgICAgICByZXR1cm4gYml0cztcbiAgICAgICAgfVxuICAgICAgICAvLyA1dGhcbiAgICAgICAgYml0cy5sbyA9IChiaXRzLmxvIHwgKHRoaXMuYnVmW3RoaXMucG9zXSAmIDEyNykgPDwgMjgpID4+PiAwO1xuICAgICAgICBiaXRzLmhpID0gKGJpdHMuaGkgfCAodGhpcy5idWZbdGhpcy5wb3NdICYgMTI3KSA+PiAgNCkgPj4+IDA7XG4gICAgICAgIGlmICh0aGlzLmJ1Zlt0aGlzLnBvcysrXSA8IDEyOClcbiAgICAgICAgICAgIHJldHVybiBiaXRzO1xuICAgICAgICBpID0gMDtcbiAgICB9IGVsc2Uge1xuICAgICAgICBmb3IgKDsgaSA8IDM7ICsraSkge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGlmICovXG4gICAgICAgICAgICBpZiAodGhpcy5wb3MgPj0gdGhpcy5sZW4pXG4gICAgICAgICAgICAgICAgdGhyb3cgaW5kZXhPdXRPZlJhbmdlKHRoaXMpO1xuICAgICAgICAgICAgLy8gMXN0Li4zdGhcbiAgICAgICAgICAgIGJpdHMubG8gPSAoYml0cy5sbyB8ICh0aGlzLmJ1Zlt0aGlzLnBvc10gJiAxMjcpIDw8IGkgKiA3KSA+Pj4gMDtcbiAgICAgICAgICAgIGlmICh0aGlzLmJ1Zlt0aGlzLnBvcysrXSA8IDEyOClcbiAgICAgICAgICAgICAgICByZXR1cm4gYml0cztcbiAgICAgICAgfVxuICAgICAgICAvLyA0dGhcbiAgICAgICAgYml0cy5sbyA9IChiaXRzLmxvIHwgKHRoaXMuYnVmW3RoaXMucG9zKytdICYgMTI3KSA8PCBpICogNykgPj4+IDA7XG4gICAgICAgIHJldHVybiBiaXRzO1xuICAgIH1cbiAgICBpZiAodGhpcy5sZW4gLSB0aGlzLnBvcyA+IDQpIHsgLy8gZmFzdCByb3V0ZSAoaGkpXG4gICAgICAgIGZvciAoOyBpIDwgNTsgKytpKSB7XG4gICAgICAgICAgICAvLyA2dGguLjEwdGhcbiAgICAgICAgICAgIGJpdHMuaGkgPSAoYml0cy5oaSB8ICh0aGlzLmJ1Zlt0aGlzLnBvc10gJiAxMjcpIDw8IGkgKiA3ICsgMykgPj4+IDA7XG4gICAgICAgICAgICBpZiAodGhpcy5idWZbdGhpcy5wb3MrK10gPCAxMjgpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGJpdHM7XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICBmb3IgKDsgaSA8IDU7ICsraSkge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGlmICovXG4gICAgICAgICAgICBpZiAodGhpcy5wb3MgPj0gdGhpcy5sZW4pXG4gICAgICAgICAgICAgICAgdGhyb3cgaW5kZXhPdXRPZlJhbmdlKHRoaXMpO1xuICAgICAgICAgICAgLy8gNnRoLi4xMHRoXG4gICAgICAgICAgICBiaXRzLmhpID0gKGJpdHMuaGkgfCAodGhpcy5idWZbdGhpcy5wb3NdICYgMTI3KSA8PCBpICogNyArIDMpID4+PiAwO1xuICAgICAgICAgICAgaWYgKHRoaXMuYnVmW3RoaXMucG9zKytdIDwgMTI4KVxuICAgICAgICAgICAgICAgIHJldHVybiBiaXRzO1xuICAgICAgICB9XG4gICAgfVxuICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgdGhyb3cgRXJyb3IoXCJpbnZhbGlkIHZhcmludCBlbmNvZGluZ1wiKTtcbn1cblxuLyogZXNsaW50LWVuYWJsZSBuby1pbnZhbG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7XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBpZiAqL1xuICAgICAgICBpZiAodGhpcy5wb3MgKyBsZW5ndGggPiB0aGlzLmxlbilcbiAgICAgICAgICAgIHRocm93IGluZGV4T3V0T2ZSYW5nZSh0aGlzLCBsZW5ndGgpO1xuICAgICAgICB0aGlzLnBvcyArPSBsZW5ndGg7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgZG8ge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGlmICovXG4gICAgICAgICAgICBpZiAodGhpcy5wb3MgPj0gdGhpcy5sZW4pXG4gICAgICAgICAgICAgICAgdGhyb3cgaW5kZXhPdXRPZlJhbmdlKHRoaXMpO1xuICAgICAgICB9IHdoaWxlICh0aGlzLmJ1Zlt0aGlzLnBvcysrXSAmIDEyOCk7XG4gICAgfVxuICAgIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBTa2lwcyB0aGUgbmV4dCBlbGVtZW50IG9mIHRoZSBzcGVjaWZpZWQgd2lyZSB0eXBlLlxuICogQHBhcmFtIHtudW1iZXJ9IHdpcmVUeXBlIFdpcmUgdHlwZSByZWNlaXZlZFxuICogQHJldHVybnMge1JlYWRlcn0gYHRoaXNgXG4gKi9cblJlYWRlci5wcm90b3R5cGUuc2tpcFR5cGUgPSBmdW5jdGlvbih3aXJlVHlwZSkge1xuICAgIHN3aXRjaCAod2lyZVR5cGUpIHtcbiAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgdGhpcy5za2lwKCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgdGhpcy5za2lwKDgpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgIHRoaXMuc2tpcCh0aGlzLnVpbnQzMigpKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICB3aGlsZSAoKHd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XG5cbiAgICBpZiAoIXNlbGYucnBjSW1wbCkge1xuICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkgeyBjYWxsYmFjayhFcnJvcihcImFscmVhZHkgZW5kZWRcIikpOyB9LCAwKTtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9XG5cbiAgICB0cnkge1xuICAgICAgICByZXR1cm4gc2VsZi5ycGNJbXBsKFxuICAgICAgICAgICAgbWV0aG9kLFxuICAgICAgICAgICAgcmVxdWVzdEN0b3Jbc2VsZi5yZXF1ZXN0RGVsaW1pdGVkID8gXCJlbmNvZGVEZWxpbWl0ZWRcIiA6IFwiZW5jb2RlXCJdKHJlcXVlc3QpLmZpbmlzaCgpLFxuICAgICAgICAgICAgZnVuY3Rpb24gcnBjQ2FsbGJhY2soZXJyLCByZXNwb25zZSkge1xuXG4gICAgICAgICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmVtaXQoXCJlcnJvclwiLCBlcnIsIG1ldGhvZCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhlcnIpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmVuZCgvKiBlbmRlZEJ5UlBDICovIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICghKHJlc3BvbnNlIGluc3RhbmNlb2YgcmVzcG9uc2VDdG9yKSkge1xuICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2UgPSByZXNwb25zZUN0b3Jbc2VsZi5yZXNwb25zZURlbGltaXRlZCA/IFwiZGVjb2RlRGVsaW1pdGVkXCIgOiBcImRlY29kZVwiXShyZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5lbWl0KFwiZXJyb3JcIiwgZXJyLCBtZXRob2QpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNhbGxiYWNrKGVycik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBzZWxmLmVtaXQoXCJkYXRhXCIsIHJlc3BvbnNlLCBtZXRob2QpO1xuICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhudWxsLCByZXNwb25zZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICk7XG4gICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgIHNlbGYuZW1pdChcImVycm9yXCIsIGVyciwgbWV0aG9kKTtcbiAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpIHsgY2FsbGJhY2soZXJyKTsgfSwgMCk7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgfVxufTtcblxuLyoqXG4gKiBFbmRzIHRoaXMgc2VydmljZSBhbmQgZW1pdHMgdGhlIGBlbmRgIGV2ZW50LlxuICogQHBhcmFtIHtib29sZWFufSBbZW5kZWRCeVJQQz1mYWxzZV0gV2hldGhlciB0aGUgc2VydmljZSBoYXMgYmVlbiBlbmRlZCBieSB0aGUgUlBDIGltcGxlbWVudGF0aW9uLlxuICogQHJldHVybnMge3JwYy5TZXJ2aWNlfSBgdGhpc2BcbiAqL1xuU2VydmljZS5wcm90b3R5cGUuZW5kID0gZnVuY3Rpb24gZW5kKGVuZGVkQnlSUEMpIHtcbiAgICBpZiAodGhpcy5ycGNJbXBsKSB7XG4gICAgICAgIGlmICghZW5kZWRCeVJQQykgLy8gc2lnbmFsIGVuZCB0byBycGNJbXBsXG4gICAgICAgICAgICB0aGlzLnJwY0ltcGwobnVsbCwgbnVsbCwgbnVsbCk7XG4gICA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B9LFxuICAgICAgX2N1cnJlbnRWYWx1ZToge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICByZXR1cm4gY29udGV4dC5fY3VycmVudFZhbHVlO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uIChfY3VycmVudFZhbHVlKSB7XG4gICAgICAgICAgY29udGV4dC5fY3VycmVudFZhbHVlID0gX2N1cnJlbnRWYWx1ZTtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIF9jdXJyZW50VmFsdWUyOiB7XG4gICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgIHJldHVybiBjb250ZXh0Ll9jdXJyZW50VmFsdWUyO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uIChfY3VycmVudFZhbHVlMikge1xuICAgICAgICAgIGNvbnRleHQuX2N1cnJlbnRWYWx1ZTIgPSBfY3VycmVudFZhbHVlMjtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIF90aHJlYWRDb3VudDoge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICByZXR1cm4gY29udGV4dC5fdGhyZWFkQ291bnQ7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKF90aHJlYWRDb3VudCkge1xuICAgICAgICAgIGNvbnRleHQuX3RocmVhZENvdW50ID0gX3RocmVhZENvdW50O1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgQ29uc3VtZXI6IHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgaWYgKCFoYXNXYXJuZWRBYm91dFVzaW5nTmVzdGVkQ29udGV4dENvbnN1bWVycykge1xuICAgICAgICAgICAgaGFzV2FybmVkQWJvdXRVc2luZ05lc3RlZENvbnRleHRDb25zdW1lcnMgPSB0cnVlO1xuXG4gICAgICAgICAgICBlcnJvcignUmVuZGVyaW5nIDxDb250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nRlcm5hbC9uby1wcm9kdWN0aW9uLWxvZ2dpbmcgKi9cbiAgICAgIHZhciBwcm9wcyA9IHtcbiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICBlbnVtZXJhYmxlOiB0cnVlLFxuICAgICAgICB3cml0YWJsZTogdHJ1ZVxuICAgICAgfTsgLy8gJEZsb3dGaXhNZSBGbG93IHRoaW5rcyBjb25zb2xlIGlzIGltbXV0YWJsZS5cblxuICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnRpZXMoY29uc29sZSwge1xuICAgICAgICBsb2c6IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkxvZ1xuICAgICAgICB9KSxcbiAgICAgICAgaW5mbzogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2SW5mb1xuICAgICAgICB9KSxcbiAgICAgICAgd2FybjogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2V2FyblxuICAgICAgICB9KSxcbiAgICAgICAgZXJyb3I6IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkVycm9yXG4gICAgICAgIH0pLFxuICAgICAgICBncm91cDogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2R3JvdXBcbiAgICAgICAgfSksXG4gICAgICAgIGdyb3VwQ29sbGFwc2VkOiBhc3NpZ24oe30sIHByb3BzLCB7XG4gICAgICAgICAgdmFsdWU6IHByZXZHcm91cENvbGxhcHNlZFxuICAgICAgICB9KSxcbiAgICAgICAgZ3JvdXBFbmQ6IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkdyb3VwRW5kXG4gICAgICAgIH0pXG4gICAgICB9KTtcbiAgICAgIC8qIGVzbGludC1lbmFibGUgcmVhY3QtaW50ZXJuYWwvbm8tcHJvZHVjdGlvb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ZSBpdCBwcmV0dGllci5cbiAgICAgICAgICAgICAgICB2YXIgX2ZyYW1lID0gJ1xcbicgKyBzYW1wbGVMaW5lc1tzXS5yZXBsYWNlKCcgYXQgbmV3ICcsICcgYXQgJyk7IC8vIElmIG91ciBjb21wb25lbnQgZnJhbWUgaXMgbGFiZWxlZCBcIjxhbm9ueW1vdXM+XCJcbiAgICAgICAgICAgICAgICAvLyBidXQgd2UgaGF2ZSBhIHVzZXItcHJvdmlkZWQgXCJkaXNwbGF5TmFtZVwiXG4gICAgICAgICAgICAgICAgLy8gc3BsaWNlIGl0IGluIHRvIG1ha2UgdGhlIHN0YWNrIG1vcmUgcmVhZGFibGUuXG5cblxuICAgICAgICAgICAgICAgIGlmIChmbi5kaXNwbGF5TmFtZSAmJiBfZnJhbWUuaW5jbHVkZXMoJzxhbm9ueW1vdXM+JykpIHtcbiAgICAgICAgICAgICAgICAgIF9mcmFtZSA9IF9mcmFtZS5yZXBsYWNlKCc8YW5vbnltb3VzPicsIGZuLmRpc3BsYXlOYW1lKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGZuID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudEZyYW1lQ2FjaGUuc2V0KGZuLCBfZnJhbWUpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gLy8gUmV0dXJuIHRoZSBsaW5lIHdlIGZvdW5kLlxuXG5cbiAgICAgICAgICAgICAgICByZXR1cm4gX2ZyYW1lO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IHdoaWxlIChzID49IDEgJiYgYyA+PSAwKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfSBmaW5hbGx5IHtcbiAgICByZWVudHJ5ID0gZmFsc2U7XG5cbiAgICB7X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bnZhciBQbGFjZW1lbnQgPVxuLyogICAgICAgICAgICAgICAgICAgICovXG4yO1xudmFyIFVwZGF0ZSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjQ7XG52YXIgQ2hpbGREZWxldGlvbiA9XG4vKiAgICAgICAgICAgICAgICAqL1xuMTY7XG52YXIgQ29udGVudFJlc2V0ID1cbi8qICAgICAgICAgICAgICAgICAqL1xuMzI7XG52YXIgQ2FsbGJhY2sgPVxuLyogICAgICAgICAgICAgICAgICAgICAqL1xuNjQ7XG52YXIgRGlkQ2FwdHVyZSA9XG4vKiAgICAgICAgICAgICAgICAgICAqL1xuMTI4O1xudmFyIEZvcmNlQ2xpZW50UmVuZGVyID1cbi8qICAgICAgICAgICAgKi9cbjI1NjtcbnZhciBSZWYgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAgICovXG41MTI7XG52YXIgU25hcHNob3QgPVxuLyogICAgICAgICAgICAgICAgICAgICAqL1xuMTAyNDtcbnZhciBQYXNzaXZlID1cbi8qICAgICAgICAgICAgICAgICAgICAgICovXG4yMDQ4O1xudmFyIEh5ZHJhdGluZyA9XG4vKiAgICAgICAgICAgICAgICAgICAgKi9cbjQwOTY7XG52YXIgVmlzaWJpbGl0eSA9XG4vKiAgICAgICAgICAgICAgICAgICAqL1xuODE5MjtcbnZhciBTdG9yZUNvbnNpc3RlbmN5ID1cbi8qICAgICAgICAgICAgICovXG4xNjM4NDtcbnZhciBMaWZlY3ljbGVFZmZlY3RNYXNrID0gUGFzc2l2ZSB8IFVwZGF0ZSB8IENhbGxiYWNrIHwgUmVmIHwgU25hcHNob3QgfCBTdG9yZUNvbnNpc3RlbmN5OyAvLyBVbmlvbiBvZiBhbGwgY29tbWl0IGZsYWdzIChmbGFncyB3aXRoIHRoZSBsaWZldGltZSBvZiBhIHBhcnRpY3VsYXIgY29tbWl0KVxuXG52YXIgSG9zdEVmZmVjdE1hc2sgPVxuLyogICAgICAgICAgICAgICAqL1xuMzI3Njc7IC8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pbGQgPSB0cnVlO1xuICAgICAgICAgIGIgPSBwYXJlbnRBO1xuICAgICAgICAgIGEgPSBwYXJlbnRCO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgX2NoaWxkID0gX2NoaWxkLnNpYmxpbmc7XG4gICAgICB9XG5cbiAgICAgIGlmICghZGlkRmluZENoaWxkKSB7XG4gICAgICAgIC8vIFNlYXJjaCBwYXJlbnQgQidzIGNoaWxkIHNldFxuICAgICAgICBfY2hpbGQgPSBwYXJlbnRCLmNoaWxkO1xuXG4gICAgICAgIHdoaWxlIChfY2hpbGQpIHtcbiAgICAgICAgICBpZiAoX2NoaWxkID09PSBhKSB7XG4gICAgICAgICAgICBkaWRGaW5kQ2hpbGQgPSB0cnVlO1xuICAgICAgICAgICAgYSA9IHBhcmVudEI7XG4gICAgICAgICAgICBiID0gcGFyZW50QTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChfY2hpbGQgPT09IGIpIHtcbiAgICAgICAgICAgIGRpZEZpbmRDaGlsZCA9IHRydWU7XG4gICAgICAgICAgICBiID0gcGFyZW50QjtcbiAgICAgICAgICAgIGEgPSBwYXJlbnRBO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX2NoaWxkID0gX2NoaWxkLnNpYmxpbmc7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIWRpZEZpbmRDaGlsZCkge1xuICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQ2hpbGQgd2FzIG5vdCBmb3VuZCBpbiBlaXRoZXIgcGFyZW50IHNldC4gVGhpcyBpbmRpY2F0ZXMgYSBidWcgJyArICdpbiBSZWFjdCByZWxhdGVkIHRvIHRoZSByZXR1cm4gcG9pbnRlci4gUGxlYXNlIGZpbGUgYW4gaXNzdWUuJyk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoYS5hbHR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FtZSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBmbiA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRGcmFtZUNhY2hlLnNldChmbiwgX2ZyYW1lKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IC8vIFJldHVybiB0aGUgbGluZSB3ZSBmb3VuZC5cblxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIF9mcmFtZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSB3aGlsZSAocyA+PSAxICYmIGMgPj0gMCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0gZmluYWxseSB7XG4gICAgcmVlbnRyeSA9IGZhbHNlO1xuXG4gICAge1xuICAgICAgUmVhY3RDdXJyZW50RGlzcGF0Y2hlci5jdXJyZW50ID0gcHJldmlvdXNEaXNwYXRjaGVyO1xuICAgICAgcmVlbmFibGVMb2dzKCk7XG4gICAgfVxuXG4gICAgRXJyb3IucHJlcGFyZVN0YWNrVHJhY2UgPSBwcmV2aW91c1ByZXBhcmVTdGFja1RyYWNlO1xuICB9IC8vIEZhbGxiYWNrIHRvIGp1c3QgdXNpbmcgdGhlIG5hbWUgaWYgd2UgY291bGRuJ3QgbWFrZSBpdCB0aHJvdy5cblxuXG4gIHZhciBuYW1lID0gZm4gPyBmbi5kaXNwbGF5TmFtZSB8fCBmbi5uYW1lIDogJyc7XG4gIHZhciBzeW50aGV0aWNGcmFtZSA9IG5hbWUgPyBkZXNjcmliZUJ1aWx0SW5Db21wb25lbnRGcmFtZShuYW1lKSA6ICcnO1xuXG4gIHtcbiAgICBpZiAodHlwZW9mIGZuID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICBjb21wb25lbnRGcmFtZUNhY2hlLnNld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jA7XG52YXIgTm9MYW5lID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAqL1xuMDtcbnZhciBTeW5jTGFuZSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG4xO1xudmFyIElucHV0Q29udGludW91c0h5ZHJhdGlvbkxhbmUgPVxuLyogICAgKi9cbjI7XG52YXIgSW5wdXRDb250aW51b3VzTGFuZSA9XG4vKiAgICAgICAgICAgICAqL1xuNDtcbnZhciBEZWZhdWx0SHlkcmF0aW9uTGFuZSA9XG4vKiAgICAgICAgICAgICovXG44O1xudmFyIERlZmF1bHRMYW5lID1cbi8qICAgICAgICAgICAgICAgICAgICAgKi9cbjE2O1xudmFyIFRyYW5zaXRpb25IeWRyYXRpb25MYW5lID1cbi8qICAgICAgICAgICAgICAgICovXG4zMjtcbnZhciBUcmFuc2l0aW9uTGFuZXMgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG40MTk0MjQwO1xudmFyIFRyYW5zaXRpb25MYW5lMSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG42NDtcbnZhciBUcmFuc2l0aW9uTGFuZTIgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTI4O1xudmFyIFRyYW5zaXRpb25MYW5lMyA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG4yNTY7XG52YXIgVHJhbnNpdGlvbkxhbmU0ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjUxMjtcbnZhciBUcmFuc2l0aW9uTGFuZTUgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTAyNDtcbnZhciBUcmFuc2l0aW9uTGFuZTYgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMjA0ODtcbnZhciBUcmFuc2l0aW9uTGFuZTcgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuNDA5NjtcbnZhciBUcmFuc2l0aW9uTGFuZTggPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuODE5MjtcbnZhciBUcmFuc2l0aW9uTGFuZTkgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTYzODQ7XG52YXIgVHJhbnNpdGlvbkxhbmUxMCA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjMyNzY4O1xudmFyIFRyYW5zaXRpb25MYW5lMTEgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG42NTUzNjtcbnZhciBUcmFuc2l0aW9uTGFuZTEyID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTMxMDcyO1xudmFyIFRyYW5zaXRpb25MYW5lMTMgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG4yNjIxNDQ7XG52YXIgVHJhbnNpdGlvbkxhbmUxNCA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjUyNDI4ODtcbnZhciBUcmFuc2l0aW9uTGFuZTE1ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTA0ODU3NjtcbnZhciBUcmFuc2l0aW9uTGFuZTE2ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMjA5NzE1MjtcbnZhciBSZXRyeUxhbmVzID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICovXG4xMzAwMjM0MjQ7XG52YXIgUmV0cnlMYW5lMSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjQxOTQzMDQ7XG52YXIgUmV0cnlMYW5lMiA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjgzODg2MDg7XG52YXIgUmV0cnlMYW5lMyA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjE2Nzc3MjE2O1xudmFyIFJldHJ5TGFuZTQgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICovXG4zMzU1NDQzMjtcbnZhciBSZXRyeUxhbmU1ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqL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UHJpb3JpdHkpIHtcbiAgICAgICAgICBjYXNlIERpc2NyZXRlRXZlbnRQcmlvcml0eTpcbiAgICAgICAgICAgIHNjaGVkdWxlclByaW9yaXR5ID0gSW1tZWRpYXRlUHJpb3JpdHk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgQ29udGludW91c0V2ZW50UHJpb3JpdHk6XG4gICAgICAgICAgICBzY2hlZHVsZXJQcmlvcml0eSA9IFVzZXJCbG9ja2luZ1ByaW9yaXR5O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlIERlZmF1bHRFdmVudFByaW9yaXR5OlxuICAgICAgICAgICAgc2NoZWR1bGVyUHJpb3JpdHkgPSBOb3JtYWxQcmlvcml0eTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSBJZGxlRXZlbnRQcmlvcml0eTpcbiAgICAgICAgICAgIHNjaGVkdWxlclByaW9yaXR5ID0gSWRsZVByaW9yaXR5O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgc2NoZWR1bGVyUHJpb3JpdHkgPSBOb3JtYWxQcmlvcml0eTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgaW5qZWN0ZWRIb29rLm9uQ29tbWl0RmliZXJSb290KHJlbmRlcmVySUQsIHJvb3QsIHNjaGVkdWxlclByaW9yaXR5LCBkaWRFcnJvcik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpbmplY3RlZEhvb2sub25Db21taXRGaWJlclJvb3QocmVuZGVyZXJJRCwgcm9vdCwgdW5kZWZpbmVkLCBkaWRFcnJvcik7XG4gICAgICB9XG4gICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICB7XG4gICAgICAgIGlmICghaGFzTG9nZ2VkRXJyb3IpIHtcbiAgICAgICAgICBoYXNMb2dnZWRFcnJvciA9IHRydWU7XG5cbi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GRlbGV0aW9ucy5wdXNoKGNoaWxkVG9EZWxldGUpO1xuICB9XG59XG5cbmZ1bmN0aW9uIHdhcm5Ob25oeWRyYXRlZEluc3RhbmNlKHJldHVybkZpYmVyLCBmaWJlcikge1xuICB7XG4gICAgaWYgKGRpZFN1c3BlbmRPckVycm9yREVWKSB7XG4gICAgICAvLyBJbnNpZGUgYSBib3VuZGFyeSB0aGF0IGFscmVhZHkgc3VzcGVuZGVkLiBXZSdyZSBjdXJyZW50bHkgcmVuZGVyaW5nIHRoZVxuICAgICAgLy8gc2libGluZ3Mgb2YgYSBzdXNwZW5kZWQgbm9kZS4gVGhlIG1pc21hdGNoIG1heSBiZSBkdWUgdG8gdGhlIG1pc3NpbmdcbiAgICAgIC8vIGRhdGEsIHNvIGl0J3MgcHJvYmFibHkgYSBmYWxzZSBwb3NpdGl2ZS5cbiAgICAgIHJldHVybjtcbiAgICB9XG5cbiAgICBzd2l0Y2ggKHJldHVybkZpYmVyLnRhZykge1xuICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBwYXJlbnRDb250YWluZXIgPSByZXR1cm5GaWJlci5zdGF0ZU5vZGUuY29udGFpbmVySW5mbztcblxuICAgICAgICAgIHN3aXRjaCAoZmliZXIudGFnKSB7XG4gICAgICAgICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgICAgICAgIHZhciB0eXBlID0gZmliZXIudHlwZTtcbiAgICAgICAgICAgICAgdmFyIHByb3BzID0gZmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZUluc3RhbmNlV2l0aGluQ29udGFpbmVyKHBhcmVudENvbnRhaW5lciwgdHlwZSwgcHJvcHMpO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgICAgICAgICAgdmFyIHRleHQgPSBmaWJlci5wZW5kaW5nUHJvcHM7XG4gICAgICAgICAgICAgIGRpZE5vdEZpbmRIeWRyYXRhYmxlVGV4dEluc3RhbmNlV2l0aGluQ29udGFpbmVyKHBhcmVudENvbnRhaW5lciwgdGV4dCk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVN1c3BlbnNlSW5zdGFuY2VXaXRoaW5Db250YWluZXIocGFyZW50Q29udGFpbmVyKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIHBhcmVudFR5cGUgPSByZXR1cm5GaWJlci50eXBlO1xuICAgICAgICAgIHZhciBwYXJlbnRQcm9wcyA9IHJldHVybkZpYmVyLm1lbW9pemVkUHJvcHM7XG4gICAgICAgICAgdmFyIHBhcmVudEluc3RhbmNlID0gcmV0dXJuRmliZXIuc3RhdGVOb2RlO1xuXG4gICAgICAgICAgc3dpdGNoIChmaWJlci50YWcpIHtcbiAgICAgICAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHZhciBfdHlwZSA9IGZpYmVyLnR5cGU7XG4gICAgICAgICAgICAgICAgdmFyIF9wcm9wcyA9IGZpYmVyLnBlbmRpbmdQcm9wcztcbiAgICAgICAgICAgICAgICB2YXIgaXNDb25jdXJyZW50TW9kZSA9IChyZXR1cm5GaWJlci5tb2RlICYgQ29uY3VycmVudE1vZGUpICE9PSBOb01vZGU7XG4gICAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVJbnN0YW5jZShwYXJlbnRUeXBlLCBwYXJlbnRQcm9wcywgcGFyZW50SW5zdGFuY2UsIF90eXBlLCBfcHJvcHMsIC8vIFRPRE86IERlbGV0ZSB0aGlzIGFyZ3VtZW50IHdoZW4gd2UgcmVtb3ZlIHRoZSBsZWdhY3kgcm9vdCBBUEkuXG4gICAgICAgICAgICAgICAgaXNDb25jdXJyZW50TW9kZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHZhciBfdGV4dCA9IGZpYmVyLnBlbmRpbmdQcm9wcztcblxuICAgICAgICAgICAgICAgIHZhciBfaXNDb25jdXJyZW50TW9kZSA9IChyZXR1cm5GaWJlci5tb2RlICYgQ29uY3VycmVudE1vZGUpICE9PSBOb01vZGU7XG5cbiAgICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVRleHRJbnN0YW5jZShwYXJlbnRUeXBlLCBwYXJlbnRQcm9wcywgcGFyZW50SW5zdGFuY2UsIF90ZXh0LCAvLyBUT0RPOiBEZWxldGUgdGhpcyBhcmd1bWVudCB3aGVuIHdlIHJlbW92ZSB0aGUgbGVnYWN5IHJvb3QgQVBJLlxuICAgICAgICAgICAgICAgIF9pc0NvbmN1cnJlbnRNb2RlKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVTdXNwZW5zZUluc3RhbmNlKHBhcmVudFR5cGUsIHBhcmVudFByb3BzLCBwYXJlbnRJbnN0YW5jZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIHN1c3BlbnNlU3RhdGUgPSByZXR1cm5GaWJlci5tZW1vaXplZFN0YXRlO1xuICAgICAgICAgIHZhciBfcGFyZW50SW5zdGFuY2UgPSBzdXNwZW5zZVN0YXRlLmRlaHlkcmF0ZWQ7XG4gICAgICAgICAgaWYgKF9wYXJlbnRJbnN0YW5jZSAhPT0gbnVsbCkgc3dpdGNoIChmaWJlci50YWcpIHtcbiAgICAgICAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAgICAgICAgdmFyIF90eXBlMiA9IGZpYmVyLnR5cGU7XG4gICAgICAgICAgICAgIHZhciBfcHJvcHMyID0gZmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZUluc3RhbmNlV2l0aGluU3VzcGVuc2VJbnN0YW5jZShfcGFyZW50SW5zdGFuY2UsIF90eXBlMiwgX3Byb3BzMik7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIEhvc3RUZXh0OlxuICAgICAgICAgICAgICB2YXIgX3RleHQyID0gZmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVRleHRJbnN0YW5jZVdpdGhpblN1c3BlbnNlSW5zdGFuY2UoX3BhcmVudEluc3RhbmNlLCBfdGV4dDIpO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSBTdXNwZW5zZUNvbXBvbmVudDpcbiAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVTdXNwZW5zZUluc3RhbmNlV2l0aGluU3VzcGVuc2VJbnN0YW5jZShfcGFyZW50SW5zdGFuY2UpO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgZGVmYXVsdDpcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cbiAgf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GxlZCBpbiBhIGNvbnRleHQgd2hlcmUgdGhlXG4gICAgLy8gaHlkcmF0aW9uIHBhcmVudCBpcyB0aGUgcGFyZW50IGhvc3QgY29tcG9uZW50IG9mIHRoaXMgaG9zdCB0ZXh0LlxuICAgIHZhciByZXR1cm5GaWJlciA9IGh5ZHJhdGlvblBhcmVudEZpYmVyO1xuXG4gICAgaWYgKHJldHVybkZpYmVyICE9PSBudWxsKSB7XG4gICAgICBzd2l0Y2ggKHJldHVybkZpYmVyLnRhZykge1xuICAgICAgICBjYXNlIEhvc3RSb290OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHZhciBwYXJlbnRDb250YWluZXIgPSByZXR1cm5GaWJlci5zdGF0ZU5vZGUuY29udGFpbmVySW5mbztcbiAgICAgICAgICAgIHZhciBpc0NvbmN1cnJlbnRNb2RlID0gKHJldHVybkZpYmVyLm1vZGUgJiBDb25jdXJyZW50TW9kZSkgIT09IE5vTW9kZTtcbiAgICAgICAgICAgIGRpZE5vdE1hdGNoSHlkcmF0ZWRDb250YWluZXJUZXh0SW5zdGFuY2UocGFyZW50Q29udGFpbmVyLCB0ZXh0SW5zdGFuY2UsIHRleHRDb250ZW50LCAvLyBUT0RPOiBEZWxldGUgdGhpcyBhcmd1bWVudCB3aGVuIHdlIHJlbW92ZSB0aGUgbGVnYWN5IHJvb3QgQVBJLlxuICAgICAgICAgICAgaXNDb25jdXJyZW50TW9kZSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG5cbiAgICAgICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHZhciBwYXJlbnRUeXBlID0gcmV0dXJuRmliZXIudHlwZTtcbiAgICAgICAgICAgIHZhciBwYXJlbnRQcm9wcyA9IHJldHVybkZpYmVyLm1lbW9pemVkUHJvcHM7XG4gICAgICAgICAgICB2YXIgcGFyZW50SW5zdGFuY2UgPSByZXR1cm5GaWJlci5zdGF0ZU5vZGU7XG5c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VwZGF0ZXIgZnVuY3Rpb25cbiAgICAgICAgICB7XG4gICAgICAgICAgICBlbnRlckRpc2FsbG93ZWRDb250ZXh0UmVhZEluREVWKCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdmFyIG5leHRTdGF0ZSA9IHBheWxvYWQuY2FsbChpbnN0YW5jZSwgcHJldlN0YXRlLCBuZXh0UHJvcHMpO1xuXG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKCB3b3JrSW5Qcm9ncmVzcy5tb2RlICYgU3RyaWN0TGVnYWN5TW9kZSkge1xuICAgICAgICAgICAgICBzZXRJc1N0cmljdE1vZGVGb3JEZXZ0b29scyh0cnVlKTtcblxuICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHBheWxvYWQuY2FsbChpbnN0YW5jZSwgcHJldlN0YXRlLCBuZXh0UHJvcHMpO1xuICAgICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICAgIHNldElzU3RyaWN0TW9kZUZvckRldnRvb2xzKGZhbHNlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBleGl0RGlzYWxsb3dlZENvbnRleHRSZWFkSW5ERVYoKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gbmV4dFN0YXRlO1xuICAgICAgICB9IC8vIFN0YXRlIG9iamVjdFxuXG5cbiAgICAgICAgcmV0dXJuIHBheWxvYWQ7XG4gICAgICB9XG5cbiAgICBjYXNlIENhcHR1cmVVcGRhdGU6XG4gICAgICB7XG4gICAgICAgIHdvcmtJblByb2dyZXNzLmZsYWdzID0gd29ya0luUHJvZ3Jlc3MuZmxhZ3MgJiB+U2hvdWxkQ2FwdHVyZSB8IERpZENhcHR1cmU7XG4gICAgICB9XG4gICAgLy8gSW50ZW50aW9uYWwgZmFsbHRocm91Z2hcblxuICAgIGNhc2UgVXBkYXRlU3RhdGU6XG4gICAgICB7XG4gICAgICAgIHZhciBfcG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cGRhdGVFbGVtZW50KHJldHVybkZpYmVyLCBvbGRGaWJlciwgbmV3Q2hpbGQsIGxhbmVzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIFJFQUNUX1BPUlRBTF9UWVBFOlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmIChuZXdDaGlsZC5rZXkgPT09IGtleSkge1xuICAgICAgICAgICAgICByZXR1cm4gdXBkYXRlUG9ydGFsKHJldHVybkZpYmVyLCBvbGRGaWJlciwgbmV3Q2hpbGQsIGxhbmVzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIFJFQUNUX0xBWllfVFlQRTpcbiAgICAgICAgICB7XG4gICAgICAgICAgICB2YXIgcGF5bG9hZCA9IG5ld0NoaWxkLl9wYXlsb2FkO1xuICAgICAgICAgICAgdmFyIGluaXQgPSBuZXdDaGlsZC5faW5pdDtcbiAgICAgICAgICAgIHJldHVybiB1cGRhdGVTbG90KHJldHVybkZpYmVyLCBvbGRGaWJlciwgaW5pdChwYXlsb2FkKSwgbGFuZXMpO1xuICAgICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGlzQXJyYXkobmV3Q2hpbGQpIHx8IGdldEl0ZXJhdG9yRm4obmV3Q2hpbGQpKSB7XG4gICAgICAgIGlmIChrZXkgIT09IG51bGwpIHtcbiAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB1cGRhdGVGcmFnbWVudChyZXR1cm5GaWJlciwgb2xkRmliZXIsIG5ld0NoaWxkLCBsYW5lcywgbnVsbCk7XG4gICAgICB9XG5cbiAgICAgIHRocm93T25JbnZhbGlkT2JqZWN0VHlwZShyZXR1c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HJldHVybkZpYmVyLCBfbWF0Y2hlZEZpYmVyMywgbmV3Q2hpbGQsIGxhbmVzLCBudWxsKTtcbiAgICAgIH1cblxuICAgICAgdGhyb3dPbkludmFsaWRPYmplY3RUeXBlKHJldHVybkZpYmVyLCBuZXdDaGlsZCk7XG4gICAgfVxuXG4gICAge1xuICAgICAgaWYgKHR5cGVvZiBuZXdDaGlsZCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICB3YXJuT25GdW5jdGlvblR5cGUocmV0dXJuRmliZXIpO1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBudWxsO1xuICB9XG4gIC8qKlxuICAgKiBXYXJucyBpZiB0aGVyZSBpcyBhIGR1cGxpY2F0ZSBvciBtaXNzaW5nIGtleVxuICAgKi9cblxuXG4gIGZ1bmN0aW9uIHdhcm5PbkludmFsaWRLZXkoY2hpbGQsIGtub3duS2V5cywgcmV0dXJuRmliZXIpIHtcbiAgICB7XG4gICAgICBpZiAodHlwZW9mIGNoaWxkICE9PSAnb2JqZWN0JyB8fCBjaGlsZCA9PT0gbnVsbCkge1xuICAgICAgICByZXR1cm4ga25vd25LZXlzO1xuICAgICAgfVxuXG4gICAgICBzd2l0Y2ggKGNoaWxkLiQkdHlwZW9mKSB7XG4gICAgICAgIGNhc2UgUkVBQ1RfRUxFTUVOVF9UWVBFOlxuICAgICAgICBjYXNlIFJFQUNUX1BPUlRBTF9UWVBFOlxuICAgICAgICAgIHdhcm5Gb3JNaXNzaW5nS2V5KGNoaWxkLCByZXR1cm5GaWJlcik7XG4gICAgICAgICAgdmFyIGtleSA9IGNoaWxkLmtleTtcblxuICAgICAgICAgIGlmICh0eXBlb2Yga2V5ICE9PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGtub3duS2V5cyA9PT0gbnVsbCkge1xuICAgICAgICAgICAga25vd25LZXlzID0gbmV3IFNldCgpO1xuICAgICAgICAgICAga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hciBjaGlsZCA9IGN1cnJlbnRGaXJzdENoaWxkO1xuXG4gICAgd2hpbGUgKGNoaWxkICE9PSBudWxsKSB7XG4gICAgICAvLyBUT0RPOiBJZiBrZXkgPT09IG51bGwgYW5kIGNoaWxkLmtleSA9PT0gbnVsbCwgdGhlbiB0aGlzIG9ubHkgYXBwbGllcyB0b1xuICAgICAgLy8gdGhlIGZpcnN0IGl0ZW0gaW4gdGhlIGxpc3QuXG4gICAgICBpZiAoY2hpbGQua2V5ID09PSBrZXkpIHtcbiAgICAgICAgdmFyIGVsZW1lbnRUeXBlID0gZWxlbWVudC50eXBlO1xuXG4gICAgICAgIGlmIChlbGVtZW50VHlwZSA9PT0gUkVBQ1RfRlJBR01FTlRfVFlQRSkge1xuICAgICAgICAgIGlmIChjaGlsZC50YWcgPT09IEZyYWdtZW50KSB7XG4gICAgICAgICAgICBkZWxldGVSZW1haW5pbmdDaGlsZHJlbihyZXR1cm5GaWJlciwgY2hpbGQuc2libGluZyk7XG4gICAgICAgICAgICB2YXIgZXhpc3RpbmcgPSB1c2VGaWJlcihjaGlsZCwgZWxlbWVudC5wcm9wcy5jaGlsZHJlbik7XG4gICAgICAgICAgICBleGlzdGluZy5yZXR1cm4gPSByZXR1cm5GaWJlcjtcblxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdGluZy5fZGVidWdTb3VyY2UgPSBlbGVtZW50Ll9zb3VyY2U7XG4gICAgICAgICAgICAgIGV4aXN0aW5nLl9kZWJ1Z093bmVyID0gZWxlbWVudC5fb3duZXI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBleGlzdGluZztcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaWYgKGNoaWxkLmVsZW1lbnRUeXBlID09PSBlbGVtZW50VHlwZSB8fCAoIC8vIEtlZXAgdGhpcyBjaGVjayBpbmxpbmUgc28gaXQgb25seSBydW5zIG9uIHRoZSBmYWxzZSBwYXRoOl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gdG8gcmVhZClcblxuICAgIHZhciBwYXJlbnRGaWJlciA9IGZpYmVyLnJldHVybjtcblxuICAgIHdoaWxlIChwYXJlbnRGaWJlciAhPT0gbnVsbCkge1xuICAgICAgc3dpdGNoIChwYXJlbnRGaWJlci50YWcpIHtcbiAgICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAgICB2YXIgcm9vdCA9IHBhcmVudEZpYmVyLnN0YXRlTm9kZTtcblxuICAgICAgICAgIGlmIChyb290ICE9PSBudWxsKSB7XG4gICAgICAgICAgICByb290LnBhc3NpdmVFZmZlY3REdXJhdGlvbiArPSBlbGFwc2VkVGltZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgY2FzZSBQcm9maWxlcjpcbiAgICAgICAgICB2YXIgcGFyZW50U3RhdGVOb2RlID0gcGFyZW50RmliZXIuc3RhdGVOb2RlO1xuXG4gICAgICAgICAgaWYgKHBhcmVudFN0YXRlTm9kZSAhPT0gbnVsbCkge1xuICAgICAgICAgICAgLy8gRGV0YWNoZWQgZmliZXJzIGhhdmUgdGhlaXIgc3RhdGUgbm9kZSBjbGVhcmVkIG91dC5cbiAgICAgICAgICAgIC8vIEluIHRoaXMgY2FzZSwgdGhlIHJldHVybiBwb2ludGVyIGlzIGFsc28gY2xlYXJlZCBvdXQsXG4gICAgICAgICAgICAvLyBzbyB3ZSB3b24ndCBiZSBhYmxlIHRvIHJlcG9ydCB0aGUgdGltZSBzcGVudCBpbiB0aGlzIFByb2ZpbGVyJ3Mgc3VidHJlZS5cbiAgICAgICAgICAgIHBhcmVudFN0YXRlTm9kZS5wYXNzaXZlRWZmZWN0RHVyYXRpb24gKz0gZWxhcHNlZFRpbWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgICBwYXJlbnRGaWJlciA9IHBhcmVudEZpYmVyLnJldHVybjtcbiAgICB9XG4gIH1cbn1cblxuZnVuY3Rpb24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Um93KSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAvLyBUaGlzIGlzIHRoZSBiZWdpbm5pbmcgb2YgdGhlIG1haW4gY29udGVudC5cbiAgICAgICAgICAgICAgd29ya0luUHJvZ3Jlc3MuY2hpbGQgPSByb3c7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgbmV4dFJvdyA9IHJvdy5zaWJsaW5nO1xuICAgICAgICAgICAgcm93LnNpYmxpbmcgPSBfdGFpbDtcbiAgICAgICAgICAgIF90YWlsID0gcm93O1xuICAgICAgICAgICAgcm93ID0gbmV4dFJvdztcbiAgICAgICAgICB9IC8vIFRPRE86IElmIHdvcmtJblByb2dyZXNzLmNoaWxkIGlzIG51bGwsIHdlIGNhbiBjb250aW51ZSBvbiB0aGUgdGFpbCBpbW1lZGlhdGVseS5cblxuXG4gICAgICAgICAgaW5pdFN1c3BlbnNlTGlzdFJlbmRlclN0YXRlKHdvcmtJblByb2dyZXNzLCB0cnVlLCAvLyBpc0JhY2t3YXJkc1xuICAgICAgICAgIF90YWlsLCBudWxsLCAvLyBsYXN0XG4gICAgICAgICAgdGFpbE1vZGUpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgJ3RvZ2V0aGVyJzpcbiAgICAgICAge1xuICAgICAgICAgIGluaXRTdXNwZW5zZUxpc3RSZW5kZXJTdGF0ZSh3b3JrSW5Qcm9ncmVzcywgZmFsc2UsIC8vIGlzQmFja3dhcmRzXG4gICAgICAgICAgbnVsbCwgLy8gdGFpbFxuICAgICAgICAgIG51bGwsIC8vIGxhc3RcbiAgICAgICAgICB1bmRlZmluZWQpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGRlZmF1bHQ6XG4gICAgICAgIHtcbiAgICAgICAgICAvLyBUaGUgZGVmYXVsdCByZXZlYWwgb3JkZXIgaXMgdGhlIHNhbWUgYXMgbm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AgICAgICAgIC8vIElmIHRoaXMgd2FzIGluIGFuIGludmlzaWJsZSB0cmVlIG9yIGEgbmV3IHJlbmRlciwgdGhlbiBzaG93aW5nXG4gICAgICAgICAgICAgICAgLy8gdGhpcyBib3VuZGFyeSBpcyBvay5cbiAgICAgICAgICAgICAgICByZW5kZXJEaWRTdXNwZW5kKCk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gT3RoZXJ3aXNlLCB3ZSdyZSBnb2luZyB0byBoYXZlIHRvIGhpZGUgY29udGVudCBzbyB3ZSBzaG91bGRcbiAgICAgICAgICAgICAgICAvLyBzdXNwZW5kIGZvciBsb25nZXIgaWYgcG9zc2libGUuXG4gICAgICAgICAgICAgICAgcmVuZGVyRGlkU3VzcGVuZERlbGF5SWZQb3NzaWJsZSgpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHdha2VhYmxlcyA9IHdvcmtJblByb2dyZXNzLnVwZGF0ZVF1ZXVlO1xuXG4gICAgICAgIGlmICh3YWtlYWJsZXMgIT09IG51bGwpIHtcbiAgICAgICAgICAvLyBTY2hlZHVsZSBhbiBlZmZlY3QgdG8gYXR0YWNoIGEgcmV0cnkgbGlzdGVuZXIgdG8gdGhlIHByb21pc2UuXG4gICAgICAgICAgLy8gVE9ETzogTW92ZSB0byBwYXNzaXZlIHBoYXNlXG4gICAgICAgICAgd29ya0luUHJvZ3Jlc3MuZmxhZ3MgfD0gVXBkYXRlO1xuICAgICAgICB9XG5cbiAgICAgICAgYnViYmxlUHJvcGVydGllcyh3b3JrSW5Qcm9ncmVzcyk7XG5cbiAgICAgICAge1xuICAgICAgICAgIGlmICgod29ya0luUHJvZ3Jlc3MubW9kZSAmIFByb2ZpbGVNb2RlKSAhPT0gTm9Nb2RlKSB7XG4gICAgICAgICAgICBpZiAobmV4dERpZFRpbWVvdXQpIHtcbiAgICAgICAg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KGludGVycnVwdGVkV29yay50YWcpIHtcbiAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAge1xuICAgICAgICB2YXIgY2hpbGRDb250ZXh0VHlwZXMgPSBpbnRlcnJ1cHRlZFdvcmsudHlwZS5jaGlsZENvbnRleHRUeXBlcztcblxuICAgICAgICBpZiAoY2hpbGRDb250ZXh0VHlwZXMgIT09IG51bGwgJiYgY2hpbGRDb250ZXh0VHlwZXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIHBvcENvbnRleHQoaW50ZXJydXB0ZWRXb3JrKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgIHtcbiAgICAgICAgdmFyIHJvb3QgPSBpbnRlcnJ1cHRlZFdvcmsuc3RhdGVOb2RlO1xuICAgICAgICBwb3BIb3N0Q29udGFpbmVyKGludGVycnVwdGVkV29yayk7XG4gICAgICAgIHBvcFRvcExldmVsQ29udGV4dE9iamVjdChpbnRlcnJ1cHRlZFdvcmspO1xuICAgICAgICByZXNldFdvcmtJblByb2dyZXNzVmVyc2lvbnMoKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICB9XG5cbiAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICB7XG4gICAgICAgIHBvcEhvc3RDb250ZXh0KGludGVycnVwdGVkV29yayk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAgcG9wSG9zdENvbnRhaW5lcihpbnRlcnJ1cHRlZFdvcmspO1xuICAgICAgYnJlYWs7XG5cbiAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgcG9wU3VzcGVuc2VDb250ZXh0KGludGVycnVwdGVkV29yayk7XG4gICAgICBicmVhaztcblxuICAgIGNhc2UgU3VzcGVuc2VMaXN0Q29tcG9uZW50OlxuICAgICAgcG9wU3VzcGVu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gICAgICAgICAgICAgIHZhciBkaWRXYXJuU2V0ID0gZGlkV2FybkFib3V0VW5kZWZpbmVkU25hcHNob3RCZWZvcmVVcGRhdGU7XG5cbiAgICAgICAgICAgICAgaWYgKHNuYXBzaG90ID09PSB1bmRlZmluZWQgJiYgIWRpZFdhcm5TZXQuaGFzKGZpbmlzaGVkV29yay50eXBlKSkge1xuICAgICAgICAgICAgICAgIGRpZFdhcm5TZXQuYWRkKGZpbmlzaGVkV29yay50eXBlKTtcblxuICAgICAgICAgICAgICAgIGVycm9yKCclcy5nZXRTbmFwc2hvdEJlZm9yZVVwZGF0ZSgpOiBBIHNuYXBzaG90IHZhbHVlIChvciBudWxsKSAnICsgJ211c3QgYmUgcmV0dXJuZWQuIFlvdSBoYXZlIHJldHVybmVkIHVuZGVmaW5lZC4nLCBnZXRDb21wb25lbnROYW1lRnJvbUZpYmVyKGZpbmlzaGVkV29yaykpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGluc3RhbmNlLl9fcmVhY3RJbnRlcm5hbFNuYXBzaG90QmVmb3JlVXBkYXRlID0gc25hcHNob3Q7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAge1xuICAgICAgICAgIGlmIChzdXBwb3J0c011dGF0aW9uKSB7XG4gICAgICAgICAgICB2YXIgcm9vdCA9IGZpbmlzaGVkV29yay5zdGF0ZU5vZGU7XG4gICAgICAgICAgICBjbGVhckNvbnRhaW5lcihyb290LmNvbnRhaW5lckluZm8pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgIGNhc2UgSG9zdFRleHQ6XG4gICAgICBjYXNlIEhvc3RQb3J0YWw6XG4gICAgICBjYXNlIEluY29tcGxldGVDbGFzc0NvbXBvbmV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ICAgIHtcbiAgICAgICAgICAgIGlmICgoZmxhZ3MgJiBQYXNzaXZlJDEpICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICAgICAgbWFya0NvbXBvbmVudFBhc3NpdmVFZmZlY3RVbm1vdW50U3RhcnRlZChmaW5pc2hlZFdvcmspO1xuICAgICAgICAgICAgfSBlbHNlIGlmICgoZmxhZ3MgJiBMYXlvdXQpICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICAgICAgbWFya0NvbXBvbmVudExheW91dEVmZmVjdFVubW91bnRTdGFydGVkKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKChmbGFncyAmIEluc2VydGlvbikgIT09IE5vRmxhZ3MkMSkge1xuICAgICAgICAgICAgICBzZXRJc1J1bm5pbmdJbnNlcnRpb25FZmZlY3QodHJ1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgc2FmZWx5Q2FsbERlc3Ryb3koZmluaXNoZWRXb3JrLCBuZWFyZXN0TW91bnRlZEFuY2VzdG9yLCBkZXN0cm95KTtcblxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmICgoZmxhZ3MgJiBJbnNlcnRpb24pICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICAgICAgc2V0SXNSdW5uaW5nSW5zZXJ0aW9uRWZmZWN0KGZhbHNlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICB7XG4gICAgICAgICAgICBpZiAoKGZsYWdzICYgUGFzc2l2ZSQxKSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICAgIG1hcmtDb21wb25lbnRQYXNzaXZlRWZmZWN0VW5tb3VudFN0b3BwZWQoKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoKGZsYWdzICYgTGF5b3V0KSAhPT0gTm9GbGFncyQxKSB7XG4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G5leHQgbmVhcmVzdCBhbmNlc3RvciBQcm9maWxlci5cbiAgICAgICAgICAgIC8vIEFmdGVyIHdlIHByb2Nlc3MgdGhhdCBQcm9maWxlciwgd2UnbGwgYnViYmxlIGZ1cnRoZXIgdXAuXG5cblxuICAgICAgICAgICAgdmFyIHBhcmVudEZpYmVyID0gZmluaXNoZWRXb3JrLnJldHVybjtcblxuICAgICAgICAgICAgb3V0ZXI6IHdoaWxlIChwYXJlbnRGaWJlciAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBzd2l0Y2ggKHBhcmVudEZpYmVyLnRhZykge1xuICAgICAgICAgICAgICAgIGNhc2UgSG9zdFJvb3Q6XG4gICAgICAgICAgICAgICAgICB2YXIgcm9vdCA9IHBhcmVudEZpYmVyLnN0YXRlTm9kZTtcbiAgICAgICAgICAgICAgICAgIHJvb3QucGFzc2l2ZUVmZmVjdER1cmF0aW9uICs9IHBhc3NpdmVFZmZlY3REdXJhdGlvbjtcbiAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuXG4gICAgICAgICAgICAgICAgY2FzZSBQcm9maWxlcjpcbiAgICAgICAgICAgICAgICAgIHZhciBwYXJlbnRTdGF0ZU5vZGUgPSBwYXJlbnRGaWJlci5zdGF0ZU5vZGU7XG4gICAgICAgICAgICAgICAgICBwYXJlbnRTdGF0ZU5vZGUucGFzc2l2ZUVmZmVjdER1cmF0aW9uICs9IHBhc3NpdmVFZmZlY3REdXJhdGlvbjtcbiAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgcGFyZW50RmliZXIgPSBwYXJlbnRGaWJlci5yZXR1cm47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cbn1cblxuZnVuY3Rpb24gY29tbWl0TGF5b3V0RWZmZWN0T25GaWJlcihmaW5pc2hlZFJvb3QsI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KTtcbiAgICAgICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgICByZWNvcmRMYXlvdXRFZmZlY3REdXJhdGlvbihmaW5pc2hlZFdvcmspO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBjb21taXRIb29rRWZmZWN0TGlzdE1vdW50KExheW91dCB8IEhhc0VmZmVjdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIGluc3RhbmNlID0gZmluaXNoZWRXb3JrLnN0YXRlTm9kZTtcblxuICAgICAgICAgIGlmIChmaW5pc2hlZFdvcmsuZmxhZ3MgJiBVcGRhdGUpIHtcbiAgICAgICAgICAgIGlmICghb2Zmc2NyZWVuU3VidHJlZVdhc0hpZGRlbikge1xuICAgICAgICAgICAgICBpZiAoY3VycmVudCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIC8vIFdlIGNvdWxkIHVwZGF0ZSBpbnN0YW5jZSBwcm9wcyBhbmQgc3RhdGUgaGVyZSxcbiAgICAgICAgICAgICAgICAvLyBidXQgaW5zdGVhZCB3ZSByZWx5IG9uIHRoZW0gYmVpbmcgc2V0IGR1cmluZyBsYXN0IHJlbmRlci5cbiAgICAgICAgICAgICAgICAvLyBUT0RPOiByZXZpc2l0IHRoaXMgd2hlbiB3ZSBpbXBsZW1lbnQgcmVzdW1pbmcuXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgaWYgKGZpbmlzaGVkV29yay50eXBlID09PSBmaW5pc2hlZFdvcmsuZWxlbWVudFR5cGUgJiYgIWRpZFdhcm5BYm91dFJlYXNzaWduaW5nUHJvcHMpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGluc3RhbmNlLnByb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ay5tb2RlICYgUHJvZmlsZU1vZGUpIHtcbiAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgaW5zdGFuY2UuY29tcG9uZW50RGlkTW91bnQoKTtcbiAgICAgICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGluc3RhbmNlLmNvbXBvbmVudERpZE1vdW50KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBwcmV2UHJvcHMgPSBmaW5pc2hlZFdvcmsuZWxlbWVudFR5cGUgPT09IGZpbmlzaGVkV29yay50eXBlID8gY3VycmVudC5tZW1vaXplZFByb3BzIDogcmVzb2x2ZURlZmF1bHRQcm9wcyhmaW5pc2hlZFdvcmsudHlwZSwgY3VycmVudC5tZW1vaXplZFByb3BzKTtcbiAgICAgICAgICAgICAgICB2YXIgcHJldlN0YXRlID0gY3VycmVudC5tZW1vaXplZFN0YXRlOyAvLyBXZSBjb3VsZCB1cGRhdGUgaW5zdGFuY2UgcHJvcHMgYW5kIHN0YXRlIGhlcmUsXG4gICAgICAgICAgICAgICAgLy8gYnV0IGluc3RlYWQgd2UgcmVseSBvbiB0aGVtIGJlaW5nIHNldCBkdXJpbmcgbGFzdCByZW5kZXIuXG4gICAgICAgICAgICAgICAgLy8gVE9ETzogcmV2aXNpdCB0aGlzIHdoZW4gd2UgaW1wbGVtZW50IHJlc3VtaW5nLlxuXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgaWYgKGZpbmlzaGVkV29yay50eXBlID09PSBmaW5pc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UnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICggZmluaXNoZWRXb3JrLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgc3RhcnRMYXlvdXRFZmZlY3RUaW1lcigpO1xuICAgICAgICAgICAgICAgICAgICBpbnN0YW5jZS5jb21wb25lbnREaWRVcGRhdGUocHJldlByb3BzLCBwcmV2U3RhdGUsIGluc3RhbmNlLl9fcmVhY3RJbnRlcm5hbFNuYXBzaG90QmVmb3JlVXBkYXRlKTtcbiAgICAgICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGluc3RhbmNlLmNvbXBvbmVudERpZFVwZGF0ZShwcmV2UHJvcHMsIHByZXZTdGF0ZSwgaW5zdGFuY2UuX19yZWFjdEludGVybmFsU25hcHNob3RCZWZvcmVVcGRhdGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gLy8gVE9ETzogSSB0aGluayB0aGlzIGlzIG5vdyBhbHdheXMgbm9uLW51bGwgYnkgdGhlIHRpbWUgaXQgcmVhY2hlcyB0aGVcbiAgICAgICAgICAvLyBjb21taXQgcGhhc2UuIENvbnNpZGVyIHJlbW92aW5nIHRoZSB0eXBlIGNoZWNrLlxuXG5cbiAgICAgICAgICB2YXIgdXBkYXRlUXVldWUgPSBmaW5pc2hlZFdvcmsudXBkYXRlUXVldWU7XG5cbiAgICAgICAgICBpZiAodXBkYXRlUXVldWUgIT09IG51bGwpIHtcbiA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gICAgICAgICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgICAgICAgICAgICBfaW5zdGFuY2UgPSBnZXRQdWJsaWNJbnN0YW5jZShmaW5pc2hlZFdvcmsuY2hpbGQuc3RhdGVOb2RlKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSBDbGFzc0NvbXBvbmVudDpcbiAgICAgICAgICAgICAgICAgIF9pbnN0YW5jZSA9IGZpbmlzaGVkV29yay5jaGlsZC5zdGF0ZU5vZGU7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb21taXRVcGRhdGVRdWV1ZShmaW5pc2hlZFdvcmssIF91cGRhdGVRdWV1ZSwgX2luc3RhbmNlKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICB2YXIgX2luc3RhbmNlMiA9IGZpbmlzaGVkV29yay5zdGF0ZU5vZGU7IC8vIFJlbmRlcmVycyBtYXkgc2NoZWR1bGUgd29yayB0byBiZSBkb25lIGFmdGVyIGhvc3QgY29tcG9uZW50cyBhcmUgbW91bnRlZFxuICAgICAgICAgIC8vIChlZyBET00gcmVuZGVyZXIgbWF5IHNjaGVkdWxlIGF1dG8tZm9jdXMgZm9yIGlucHV0cyBhbmQgZm9ybSBjb250cm9scykuXG4gICAgICAgICAgLy8gVGhlc2UgZWZmZWN0cyBzaG91bGQgb25seSBiZSBjb21taXR0ZWQgd2hlbiBjb21wb25lbnRzIGFyZSBmaXJzdCBtb3VudGVkLFxuICAgICAgICAgIC8vIGFrYSB3aGVuIHRoZXJlIGlzIG5vIGN1cnJlbnQvYWx0ZXJuYXRlLlxuXG4gICAgICAgICAgaWYgKGN1cnJlbnQgPT09IG51bGwgJiYgZmluaXNoZWRXb3JrLmZsYWdzICYgVXBkYXRlKSB7XG4gICAgICAgICAgICB2YXIgdHlwZSA9IGZpbmlzaGVkV29yay50eXBlO1xuICAgICAgICAgICAgdmFyIHByb3BzID0gZmluaXNoZWRXb3JrLm1lbW9pemVkUHJvcHM7XG4gICAgICAgICAgICBjb21taXRNb3VudChfaW5zdGFuY2UyLCB0eXBlLCBwcm9wcywgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RUZXh0OlxuICAgICAgICB7XG4gICAgICAgICAgLy8gV2UgaGF2ZSBubyBsaWZlLWN5Y2xlcyBhc3NvY2lhdGVkIHdpdGggdGV4dC5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RQb3J0YWw6XG4gICAgICAgIHtcbiAgICAgICAgICAvLyBXZSBoYXZlIG5vIGxpZmUtY3ljbGVzIGFzc29jaWF0ZWQgd2l0aCBwb3J0YWxzLlxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgUHJvZmlsZXI6XG4gICAgICAgIHtcbiAgICAgICAgICB7XG4gICAgICAgICAgICB2YXIgX2ZpbmlzaGVkV29yayRtZW1vaXplMiA9IGZpbmlzaGVkV29yay5tZW1vaXplZFByb3BzLFxuICAgICAgICAgICAgICAgIG9uQ29tbWl0ID0gX2ZpbmlzaGVkV29yayRtZW1vaXplMi5vbkNvbW1pdCxcbiAgICAgICAgICAgICAgICBvblJlbmRlciA9IF9maW5pc2hlZFdvcmskbWVtb2l6ZTIub25SZW5kZXI7XG4gICAgICAgICAgICB2YXIgZWZmZWN0RHVyYXRpb24gPSBmaW5pc2hlZFdvcmsuc3RhdGVOb2RlLmVmZmVjdER1cmF0aW9uO1xuICAgICAgICAgICAgdmFyIGNvbW1pdFRpbWUgPSBnZXRDb21taXRUaW1lKCk7XG4gICAgICAgICAgICB2YXIgcGhhc2UgPSBjdXJyZW50ID09PSBudWxsID8gJ21vdW50JyA6ICd1cGRhdGUnO1xuXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGlmIChpc0N1cnJlbnRVcGRhdGVOZXN0ZWQoKSkge1xuICAgICAgICAgICAgICAgIHBoYXNlID0gJ25lc3RlZC11cGRhdGUnO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2Ygb25SZW5kZXIgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgICAgb25SZW5kZXIoZmluaXNoZWRXb3JrLm1lbW9pemVkUHJvcHMuaWQsIHBoYXNlLCBmaW5pc2hlZFdvcmsuYWN0dWFsRHVyYXRpb24sIGZpbmlzaGVkV29yay50cmVlQmFzZUR1cmF0aW9uLCBmaW5pc2hlZFdvcmsuYWN0dWFsU3RhcnRUaW1lLCBjb21taXRUaW1lKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBpZiAodHlwZW9mIG9uQ29tbWl0ID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgb25Db21taXQoZmluaXNoZWRXb3JrLm1lbW9pemVkUHJvcHMuaWQsIHBoYXNlLCBlZmZlY3REdXJhdGlvbiwgY29tbWl0VGltZSk7XG4gICAgICAgICAgICAgIH0gLy8gU2NoZWR1bGUgYSBwYXNzaXZlIGVmZmVjdCBmb3IgdGhpcyBQcm9maWxlciB0byBjYWxsIG9uUG9zdENvbW1pdCBob29rcy5cbiAgICAgICAgICAgICAgLy8gVGhpcyBlZmZlY3Qgc2hvdWxkIGJlIHNjaGVkdWxlZCBldmVuIGlmIHRoZXJlIGlzIG5vIG9uUG9zdENvbW1pdCBjYWxsYmFjayBmb3IgdGhpcyBQcm9maWxlcixcbiAgICAgICAgICAgICAgLy8gYmVjYXVzZSB0aGUgZWZmZWN0IGlzIGFsc28gd2hlcmUgdGltZXMgYnViYmxlIHRvIHBhcmVudCBQcm9maWxlcnMuXG5cblxuICAgICAgICAgICAgICBlbnF1ZXVlUGVuZGluZ1Bhc3NpdmVQcm9maWxlckVmZmVjdChmaW5pc2hlZFdvcmspOyAvLyBQcm9wYWdhdGUgbGF5b3V0IGVmZmVjdCBkdXJhdGlvbnMgdG8gdGhlIG5leHQgbmVhcmVzdCBQcm9maWxlciBhbmNlc3Rvci5cbiAgICAgICAgICAgICAgLy8gRG8gbm90IHJlc2V0IHRoZXNlIHZhbHVlcyB1bnRpbCB0aGUgbmV4dCByZW5kZXIgc28gRGV2VG9vbHMgaGFzIGEgY2hhbmNlIHRvIHJlYWQgdGhlbSBmaXJzdC5cblxuICAgICAgICAgICAgICB2YXIgcGFyZW50RmliZXIgPSBmaW5pc2hlZFdvcmsucmV0dXJuO1xuXG4gICAgICAgICAgICAgIG91dGVyOiB3aGlsZSAocGFyZW50RmliZXIgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKHBhcmVudEZpYmVyLnRhZykge1xuICAgICAgICAgICAgICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJvb3QgPSBwYXJlbnRGaWJlci5zdGF0ZU5vZGU7XG4gICAgICAgICAgICAgICAgICAgIHJvb3QuZWZmZWN0RHVyYXRpb24gKz0gZWZmZWN0RHVyYXRpb247XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuXG4gICAgICAgICAgICAgICAgICBjYXNlIFByb2ZpbGVyOlxuICAgICAgICAgICAgICAgICAgICB2YXIgcGFyZW50U3RhdGVOb2RlID0gcGFyZW50RmliZXIuc3RhdGVOb2RlO1xuICAgICAgICAgICAgICAgICAgICBwYXJlbnRTdGF0ZU5vZGUuZWZmZWN0RHVyYXRpb24gKz0gZWZmZWN0RHVyYXRpb247XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuICAgICAgICAgICAgICAgIH1cbl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biAgICAgICAgICAgICAgaGlkZUluc3RhbmNlKGluc3RhbmNlKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHVuaGlkZUluc3RhbmNlKG5vZGUuc3RhdGVOb2RlLCBub2RlLm1lbW9pemVkUHJvcHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAobm9kZS50YWcgPT09IEhvc3RUZXh0KSB7XG4gICAgICAgIGlmIChob3N0U3VidHJlZVJvb3QgPT09IG51bGwpIHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgdmFyIF9pbnN0YW5jZTMgPSBub2RlLnN0YXRlTm9kZTtcblxuICAgICAgICAgICAgaWYgKGlzSGlkZGVuKSB7XG4gICAgICAgICAgICAgIGhpZGVUZXh0SW5zdGFuY2UoX2luc3RhbmNlMyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB1bmhpZGVUZXh0SW5zdGFuY2UoX2luc3RhbmNlMywgbm9kZS5tZW1vaXplZFByb3BzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKChub2RlLnRhZyA9PT0gT2Zmc2NyZWVuQ29tcG9uZW50IHx8IG5vZGUudGFnID09PSBMZWdhY3lIaWRkZW5Db21wb25lbnQpICYmIG5vZGUubWVtb2l6ZWRTdGF0ZSAhPT0gbnVsbCAmJiBub2RlICE9PSBmaW5pc2hlZFdvcmspIDsgZWxzZSBpZiAobm9kZS5jaGlsZCAhPT0gbnVsbCkge1xuICAgICAgICBub2RlLmNoaWxkLnJldHVybiA9IG5vZGU7XG4gICAgICAgIG5vZGUgPSBub2RlLmNoaWxkO1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cblxuICAgICAgaWYgKG5vZGUgPT09IGZpbmlzaGVkV29yaykge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHdoaWxlIChub2RlLnNpYmxpbmcgPT09IG51bGwpIHtcbiAgICAgICAgaWYgKG5vZGUucmV0dXJuID09PSBudWxsIHx8IG5vZGUucmV0dXJuID09PSBmaW5pc2hlZFdvcmspIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaG9zdFN1YnRyZWVSb290ID09PSBub2RlKSB7XG4gICAgICAgICAgaG9zdFN1YnRyZWVSb290ID0gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIG5vZGUgPSBub2RlLnJldHVybjtcbiAgICAgIH1cblxuICAgICAgaWYgKGhvc3RTdWJ0cmVlUm9vdCA9PT0gbm9kZSkge1xuICAgICAgICBob3N0U3VidHJlZVJvb3QgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICBub2RlLnNpYmxpbmcucmV0dXJuID0gbm9kZS5yZXR1cm47XG4gICAgICBub2RlID0gbm9kZS5zaWJsaW5nO1xuICAgIH1cbiAgfVxufVxuXG5mdW5jdGlvbiBjb21taXRBdHRhY2hSZWYoZmluaXNoZWRXb3JrKSB7XG4gIHZhciByZWYgPSBmaW5pc2hlZFdvcmsucmVmO1xuXG4gIGlmIChyZWYgIT09IG51bGwpIHtcbiAgICB2YXIgaW5zdGFuY2UgPSBmaW5pc2hlZFdvcmsuc3RhdGVOb2RlO1xuICAgIHZhciBpbnN0YW5jZVRvVXNlO1xuXG4gICAgc3dpdGNoIChmaW5pc2hlZFdvc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biAgICAvLyB0cmVlIGR1cmluZyB0aGUgY29tbWl0IHBoYXNlLiBUaGlzIHdvdWxkIG1ha2UgaW5zZXJ0aW9ucyBmYXN0ZXIsIHRvby5cbiAgICB2YXIgcGFyZW50ID0gcmV0dXJuRmliZXI7XG5cbiAgICBmaW5kUGFyZW50OiB3aGlsZSAocGFyZW50ICE9PSBudWxsKSB7XG4gICAgICBzd2l0Y2ggKHBhcmVudC50YWcpIHtcbiAgICAgICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGhvc3RQYXJlbnQgPSBwYXJlbnQuc3RhdGVOb2RlO1xuICAgICAgICAgICAgaG9zdFBhcmVudElzQ29udGFpbmVyID0gZmFsc2U7XG4gICAgICAgICAgICBicmVhayBmaW5kUGFyZW50O1xuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIEhvc3RSb290OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGhvc3RQYXJlbnQgPSBwYXJlbnQuc3RhdGVOb2RlLmNvbnRhaW5lckluZm87XG4gICAgICAgICAgICBob3N0UGFyZW50SXNDb250YWluZXIgPSB0cnVlO1xuICAgICAgICAgICAgYnJlYWsgZmluZFBhcmVudDtcbiAgICAgICAgICB9XG5cbiAgICAgICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGhvc3RQYXJlbnQgPSBwYXJlbnQuc3RhdGVOb2RlLmNvbnRhaW5lckluZm87XG4gICAgICAgICAgICBob3N0UGFyZW50SXNDb250YWluZXIgPSB0cnVlO1xuICAgICAgICAgICAgYnJlYWsgZmluZFBhcmVudDtcbiAgICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHBhcmVudCA9IHBhcmVudC5yZXR1cm47XG4gICAgfVxuXG4gICAgaWYgKGhvc3RQYXJlbnQgPT09IG51bGwpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcignRXhwZWN0ZWQgdG8gZmluZCBhIGhvc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G4gICAgICAgIH1cblxuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICBjYXNlIERlaHlkcmF0ZWRGcmFnbWVudDpcbiAgICAgIHtcbiAgICAgICAgLy8gRGVsZXRlIHRoZSBkZWh5ZHJhdGVkIHN1c3BlbnNlIGJvdW5kYXJ5IGFuZCBhbGwgb2YgaXRzIGNvbnRlbnQuXG5cblxuICAgICAgICBpZiAoc3VwcG9ydHNNdXRhdGlvbikge1xuICAgICAgICAgIGlmIChob3N0UGFyZW50ICE9PSBudWxsKSB7XG4gICAgICAgICAgICBpZiAoaG9zdFBhcmVudElzQ29udGFpbmVyKSB7XG4gICAgICAgICAgICAgIGNsZWFyU3VzcGVuc2VCb3VuZGFyeUZyb21Db250YWluZXIoaG9zdFBhcmVudCwgZGVsZXRlZEZpYmVyLnN0YXRlTm9kZSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBjbGVhclN1c3BlbnNlQm91bmRhcnkoaG9zdFBhcmVudCwgZGVsZXRlZEZpYmVyLnN0YXRlTm9kZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAge1xuICAgICAgICBpZiAoc3VwcG9ydHNNdXRhdGlvbikge1xuICAgICAgICAgIC8vIFdoZW4gd2UgZ28gaW50byBhIHBvcnRhbCwgaXQgYmVjb21lcyB0aGUgcGFyZW50IHRvIHJlbW92ZSBmcm9tLlxuICAgICAgICAgIHZhciBfcHJldkhvc3RQYXJlbnQgPSBob3N0UGFyZW50O1xuICAgICAgICAgIHZhciBfcHJldkhvc3RQYXJlbnRJc0NvbnRhaW5lciA9IGhvc3RQYXJlbnRJc0NvbnRhaW5lcjtcbiAgICAgICAgICBob3N0UGFyZW50ID0gZGVsZXRlZEZpYmVyLnN0YXRlTm9kZS5jb250YWluZXJJbmZvO1xuICAgICAg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mVjdCA9IGxhc3RFZmZlY3QubmV4dDtcbiAgICAgICAgICAgICAgdmFyIGVmZmVjdCA9IGZpcnN0RWZmZWN0O1xuXG4gICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICB2YXIgX2VmZmVjdCA9IGVmZmVjdCxcbiAgICAgICAgICAgICAgICAgICAgZGVzdHJveSA9IF9lZmZlY3QuZGVzdHJveSxcbiAgICAgICAgICAgICAgICAgICAgdGFnID0gX2VmZmVjdC50YWc7XG5cbiAgICAgICAgICAgICAgICBpZiAoZGVzdHJveSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoKHRhZyAmIEluc2VydGlvbikgIT09IE5vRmxhZ3MkMSkge1xuICAgICAgICAgICAgICAgICAgICBzYWZlbHlDYWxsRGVzdHJveShkZWxldGVkRmliZXIsIG5lYXJlc3RNb3VudGVkQW5jZXN0b3IsIGRlc3Ryb3kpO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgodGFnICYgTGF5b3V0KSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBtYXJrQ29tcG9uZW50TGF5b3V0RWZmZWN0VW5tb3VudFN0YXJ0ZWQoZGVsZXRlZEZpYmVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmICggZGVsZXRlZEZpYmVyLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgICBzYWZlbHlDYWxsRGVzdHJveShkZWxldGVkRmliZXIsIG5lYXJlc3RNb3VudGVkQW5jZXN0b3IsIGRlc3Ryb3kpO1xuICAgICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGRlbGV0ZWRGaWJlcik7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgc2FmZWx5Q2FsbERlc3Ryb3koZGVsZXRlZEZpYmVyLCBuZWFyZXN0TW91bnRlZEFuY2VzdG9yLCBkZXN0cm95KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBtYXJrQ29tcG9uZW50TGF5b3V0RWZmZWN0VW5tb3VudFN0b3BwZWQoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGVmZmVjdCA9IGVmZmVjdC5uZXh0O1xuICAgICAgICAgICAgICB9IHdoaWxlIChlZmZlY3QgIT09IGZpcnN0RWZmZWN0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZWN1cnNpdmVseVRyYXZlcnNlRGVsZXRpb25FZmZlY3RzKGZpbmlzaGVkUm9vdCwgbmVhcmVzdE1vdW50ZWRBbmNlc3RvciwgZGVsZXRlZEZpYmVyKTtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBDbGFzc0NvbXBvbmVudDpcbiAgICAgIHtcbiAgICAgICAgaWYgKCFvZmZzY3JlZW5TdWJ0cmVlV2FzSGlkZGVuKSB7XG4gICAgICAgICAgc2FmZWx5RGV0YWNoUmVmKGRlbGV0ZWRGaWJlciwgbmVhcmVzdE1vdW50ZWRBbmNlc3Rvcik7XG4gICAgICAgICAgdmFyIGluc3RhbmNlID0gZGVsZXRlZEZpYmVyLnN0YXRlTm9kZTtcblxuICAgICAgICAgIGlmICh0eXBlb2YgaW5zdGFuY2UuY29tcG9uZW50V2lsbFVubW91bnQgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIHNhZmVseUNhbGxDb21wb25lbnRXaWxsVW5tb3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Bjb21taXQuXG5cblxuICAgICAgICAgIGlmICggZmluaXNoZWRXb3JrLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgc3RhcnRMYXlvdXRFZmZlY3RUaW1lcigpO1xuICAgICAgICAgICAgICBjb21taXRIb29rRWZmZWN0TGlzdFVubW91bnQoTGF5b3V0IHwgSGFzRWZmZWN0LCBmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4pO1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIGNvbW1pdEhvb2tFZmZlY3RMaXN0VW5tb3VudChMYXlvdXQgfCBIYXNFZmZlY3QsIGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybik7XG4gICAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAge1xuICAgICAgICByZWN1cnNpdmVseVRyYXZlcnNlTXV0YXRpb25FZmZlY3RzKHJvb3QsIGZpbmlzaGVkV29yayk7XG4gICAgICAgIGNvbW1pdFJlY29uY2lsaWF0aW9uRWZmZWN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ICAgICAgICAvLyB0aGlzIGNhc2UuXG5cbiAgICAgICAgICAgICAgdmFyIG9sZFByb3BzID0gY3VycmVudCAhPT0gbnVsbCA/IGN1cnJlbnQubWVtb2l6ZWRQcm9wcyA6IG5ld1Byb3BzO1xuICAgICAgICAgICAgICB2YXIgdHlwZSA9IGZpbmlzaGVkV29yay50eXBlOyAvLyBUT0RPOiBUeXBlIHRoZSB1cGRhdGVRdWV1ZSB0byBiZSBzcGVjaWZpYyB0byBob3N0IGNvbXBvbmVudHMuXG5cbiAgICAgICAgICAgICAgdmFyIHVwZGF0ZVBheWxvYWQgPSBmaW5pc2hlZFdvcmsudXBkYXRlUXVldWU7XG4gICAgICAgICAgICAgIGZpbmlzaGVkV29yay51cGRhdGVRdWV1ZSA9IG51bGw7XG5cbiAgICAgICAgICAgICAgaWYgKHVwZGF0ZVBheWxvYWQgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgY29tbWl0VXBkYXRlKF9pbnN0YW5jZTQsIHVwZGF0ZVBheWxvYWQsIHR5cGUsIG9sZFByb3BzLCBuZXdQcm9wcywgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgIHtcbiAgICAgICAgcmVjdXJzaXZlbHlUcmF2ZXJzZU11dGF0aW9uRWZmZWN0cyhyb290LCBmaW5pc2hlZFdvcmspO1xuICAgICAgICBjb21taXRSZWNvbmNpbGlhdGlvbkVmZm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QaGFzZUVycm9yKGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybiwgZXJyb3IpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgSG9zdFJvb3Q6XG4gICAgICB7XG4gICAgICAgIHJlY3Vyc2l2ZWx5VHJhdmVyc2VNdXRhdGlvbkVmZmVjdHMocm9vdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgY29tbWl0UmVjb25jaWxpYXRpb25FZmZlY3RzKGZpbmlzaGVkV29yayk7XG5cbiAgICAgICAgaWYgKGZsYWdzICYgVXBkYXRlKSB7XG4gICAgICAgICAgaWYgKHN1cHBvcnRzTXV0YXRpb24gJiYgc3VwcG9ydHNIeWRyYXRpb24pIHtcbiAgICAgICAgICAgIGlmIChjdXJyZW50ICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIHZhciBwcmV2Um9vdFN0YXRlID0gY3VycmVudC5tZW1vaXplZFN0YXRlO1xuXG4gICAgICAgICAgICAgIGlmIChwcmV2Um9vdFN0YXRlLmlzRGVoeWRyYXRlZCkge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICBjb21taXRIeWRyYXRlZENvbnRhaW5lcihyb290LmNvbnRhaW5lckluZm8pO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoc3VwcG9ydHNQZXJzaXN0ZW5jZSkge1xuICAgICAgICAgICAgdmFyIGNvbnRhaW5lckluZm8gPSByb290LmNvbnRhaW5lckluZm87XG4gICAgICAgICAgICB2YXIgcGVuZGluZ0NoaWxkcmVuID0gcm9vdC5wZW5kaW5nQ2hpbGRyZW47XG5cbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIHJlcGxhY2VDb250YWluZXJDaGlsZHJlbihjb250YWluZXJJbmZvLCBwZW5kaW5nQ2hpbGRyZW4pO1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAge1xuICAgICAgICByZWN1cnNpdmVseVRyYXZlcnNlTXV0YXRpb25FZmZlY3RzKHJvb3QsIGZpbmlzaGVkV29yayk7XG4gICAgICAgIGNvbW1pdFJlY29uY2lsaWF0aW9uRWZmZWN0cyhmaW5pc2hlZFdvcmspO1xuXG4gICAgICAgIGlmIChmbGFncyAmIFVwZGF0ZSkge1xuICAgICAgICAgIGlmIChzdXBwb3J0c1BlcnNpc3RlbmNlKSB7XG4gICAgICAgICAgICB2YXIgcG9ydGFsID0gZmluaXNoZWRXb3JrLnN0YXRlTm9kZTtcbiAgICAgICAgICAgIHZhciBfY29udGFpbmVySW5mbyA9IHBvcnRhbC5jb250YWluZXJJbmZvO1xuICAgICAgICAgICAgdmFyIF9wZW5kaW5nQ2hpbGRyZW4gPSBwb3J0YWwucGVuZGluZ0NoaWxkcmVuO1xuXG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICByZXBsYWNlQ29udGFpbmVyQ2hpbGRyZW4oX2NvbnRhaW5lckluZm8sIF9wZW5kaW5nQ2hpbGRyZW4pO1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJy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uIHRoZSBPZmZzY3JlZW4gaW5zdGFuY2Ugc28gd2UgY2FuXG4gICAgICAgICAgLy8gcmVhZCBpdCBkdXJpbmcgYW4gZXZlbnRcblxuICAgICAgICAgIF9vZmZzY3JlZW5JbnN0YW5jZS5pc0hpZGRlbiA9IF9pc0hpZGRlbjtcblxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmIChfaXNIaWRkZW4pIHtcbiAgICAgICAgICAgICAgaWYgKCFfd2FzSGlkZGVuKSB7XG4gICAgICAgICAgICAgICAgaWYgKChvZmZzY3JlZW5Cb3VuZGFyeS5tb2RlICYgQ29uY3VycmVudE1vZGUpICE9PSBOb01vZGUpIHtcbiAgICAgICAgICAgICAgICAgIG5leHRFZmZlY3QgPSBvZmZzY3JlZW5Cb3VuZGFyeTtcbiAgICAgICAgICAgICAgICAgIHZhciBvZmZzY3JlZW5DaGlsZCA9IG9mZnNjcmVlbkJvdW5kYXJ5LmNoaWxkO1xuXG4gICAgICAgICAgICAgICAgICB3aGlsZSAob2Zmc2NyZWVuQ2hpbGQgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICAgICAgbmV4dEVmZmVjdCA9IG9mZnNjcmVlbkNoaWxkO1xuICAgICAgICAgICAgICAgICAgICBkaXNhcHBlYXJMYXlvdXRFZmZlY3RzX2JlZ2luKG9mZnNjcmVlbkNoaWxkKTtcbiAgICAgICAgICAgICAgICAgICAgb2Zmc2NyZWVuQ2hpbGQgPSBvZmZzY3JlZW5DaGlsZC5zaWJsaW5nO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChzdXBwb3J0c011dGF0aW9uKSB7XG4gICAgICAgICAgICAvLyBUT0RPOiBUaGlzIG5lZWRzIHRvIHJ1biB3aGVuZXZlciB0aGVyZSdzIGFuIGluc2VydGlvbiBvciB1cGRhdGVcbiAgICAgICAgIC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ZW50RmliZXIoKTtcbiAgICB9XG5cbiAgICBpZiAoZmliZXIgPT09IHN1YnRyZWVSb290KSB7XG4gICAgICBuZXh0RWZmZWN0ID0gbnVsbDtcbiAgICAgIHJldHVybjtcbiAgICB9XG5cbiAgICB2YXIgc2libGluZyA9IGZpYmVyLnNpYmxpbmc7XG5cbiAgICBpZiAoc2libGluZyAhPT0gbnVsbCkge1xuICAgICAgc2libGluZy5yZXR1cm4gPSBmaWJlci5yZXR1cm47XG4gICAgICBuZXh0RWZmZWN0ID0gc2libGluZztcbiAgICAgIHJldHVybjtcbiAgICB9XG5cbiAgICBuZXh0RWZmZWN0ID0gZmliZXIucmV0dXJuO1xuICB9XG59XG5cbmZ1bmN0aW9uIGRpc2FwcGVhckxheW91dEVmZmVjdHNfYmVnaW4oc3VidHJlZVJvb3QpIHtcbiAgd2hpbGUgKG5leHRFZmZlY3QgIT09IG51bGwpIHtcbiAgICB2YXIgZmliZXIgPSBuZXh0RWZmZWN0O1xuICAgIHZhciBmaXJzdENoaWxkID0gZmliZXIuY2hpbGQ7IC8vIFRPRE8gKE9mZnNjcmVlbikgQ2hlY2s6IGZsYWdzICYgKFJlZlN0YXRpYyB8IExheW91dFN0YXRpYylcblxuICAgIHN3aXRjaCAoZmliZXIudGFnKSB7XG4gICAgICBjYXNlIEZ1bmN0aW9uQ29tcG9uZW50OlxuICAgICAgY2FzZSBGb3J3YXJkUmVmOlxuICAgICAgY2FzZSBNZW1vQ29tcG9uZW50OlxuICAgICAgY2FzZSBTaW1wbGVNZW1vQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgaWYgKCBmaWJlci5tb2RlICYgUHJvZmlsZU1vZGUpIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgY29tbWl0SG9va0VmZmVjdExpc3RVbm1vdW50KExheW91dCwgZmliZXIsIGZpYmVyLnJldHVybik7XG4gICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICByZWNvcmRMYXlvdXRFZmZlY3REdXJhdGlvbihmaWJlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvbW1pdEhvb2tFZmZlY3RMaXN0VW5tb3VudChMYXlvdXQsIGZpYmVyLCBmaWJlci5yZXR1cm4pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgQ2xhc3NDb21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICAvLyBUT0RPIChPZmZzY3JlZW4pIENoZWNrOiBmbGFncyAmIFJlZlN0YXRpY1xuICAgICAgICAgIHNhZmVseURldGFjaFJlZihmaWJlciwgZmliZXIucmV0dXJuKTtcbiAgICAgICAgICB2YXIgaW5zdGFuY2UgPSBmaWJlci5zdGF0ZU5vZGU7XG5cbiAgICAgICAgICBpZiAodHlwZW9mIGluc3RhbmNlLmNvbXBvbmVudFdpbGxVbm1vdW50ID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICBzYWZlbHlDYWxsQ29tcG9uZW50V2lsbFVubW91bnQoZmliZXIsIGZpYmVyLnJldHVybiwgaW5zdGFuY2UpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAge1xuICAgICAgICAgIHNhZmVseURldGFjaFJlZihmaWJlciwgZmliZXIucmV0dXJuKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIE9mZnNjcmVlbkNvbXBvbmVudDpcbiAgICAgICAge1xuICAgICAgICAgIC8vIENoZWNrIGlmIHRoaXMgaXMgYVxuICAgICAgICAgIHZhciBpc0hpZGRlbiA9IGZpYmVyLm1lbW9pemVkU3RhdGUgIT09IG51bGw7XG5cbiAgIC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W5tb3VudChMYXlvdXQgfCBIYXNFZmZlY3QsIGZpYmVyLCBmaWJlci5yZXR1cm4pO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaWJlciwgZmliZXIucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBDbGFzc0NvbXBvbmVudDpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBpbnN0YW5jZSA9IGZpYmVyLnN0YXRlTm9kZTtcblxuICAgICAgICAgIGlmICh0eXBlb2YgaW5zdGFuY2UuY29tcG9uZW50V2lsbFVubW91bnQgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIHNhZmVseUNhbGxDb21wb25lbnRXaWxsVW5tb3VudChmaWJlciwgZmliZXIucmV0dXJuLCBpbnN0YW5jZSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9XG4gIH1cbn1cblxuZnVuY3Rpb24gaW52b2tlUGFzc2l2ZUVmZmVjdFVubW91bnRJbkRFVihmaWJlcikge1xuICB7XG4gICAgLy8gV2UgZG9uJ3QgbmVlZCB0byByZS1jaGVjayBTdHJpY3RFZmZlY3RzTW9kZSBoZXJlLlxuICAgIC8vIFRoaXMgZnVuY3Rpb24gaXMgb25seSBjYWxsZWQgaWYgdGhhdCBjaGVjayBoYXMgYWxyZWFkeSBwYXNzZWQuXG4gICAgc3dpdGNoIChmaWJlci50YWcpIHtcbiAgICAgIGNhc2UgRnVuY3Rpb25Db21wb25lbnQ6XG4gICAgICBjYXNlIEZvcndhcmRSZWY6XG4gICAgICBjYXNlIFNpbXBsZU1lbW9Db21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29tbWl0SG9va0VmZmVjdExpc3RVbm1vd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x0aHJvdWdoXG5cbiAgICAgIGNhc2UgUkVBQ1RfVFJBQ0lOR19NQVJLRVJfVFlQRTpcblxuICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLWZhbGx0aHJvdWdoXG5cbiAgICAgIGNhc2UgUkVBQ1RfREVCVUdfVFJBQ0lOR19NT0RFX1RZUEU6XG5cbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1mYWxsdGhyb3VnaFxuXG4gICAgICBkZWZhdWx0OlxuICAgICAgICB7XG4gICAgICAgICAgaWYgKHR5cGVvZiB0eXBlID09PSAnb2JqZWN0JyAmJiB0eXBlICE9PSBudWxsKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKHR5cGUuJCR0eXBlb2YpIHtcbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9QUk9WSURFUl9UWVBFOlxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gQ29udGV4dFByb3ZpZGVyO1xuICAgICAgICAgICAgICAgIGJyZWFrIGdldFRhZztcblxuICAgICAgICAgICAgICBjYXNlIFJFQUNUX0NPTlRFWFRfVFlQRTpcbiAgICAgICAgICAgICAgICAvLyBUaGlzIGlzIGEgY29uc3VtZXJcbiAgICAgICAgICAgICAgICBmaWJlclRhZyA9IENvbnRleHRDb25zdW1lcjtcbiAgICAgICAgICAgICAgICBicmVhayBnZXRUYWc7XG5cbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9GT1JXQVJEX1JFRl9UWVBFOlxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gRm9yd2FyZFJlZjtcblxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgIHJlc29sdmVkVHlwZSA9IHJlc29sdmVGb3J3YXJkUmVmRm9ySG90UmVsb2FkaW5nKHJlc29sdmVkVHlwZSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgYnJlYWsgZ2V0VGFnO1xuXG4gICAgICAgICAgICAgIGNhc2UgUkVBQ1RfTUVNT19UWVBFOlxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gTWVtb0NvbXBvbmVudDtcbiAgICAgICAgICAgICAgICBicmVhayBnZXRUYWc7XG5cbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9MQVpZX1RZUEU6XG4gICAgICAgICAgICAgICAgZmliZXJUYWcgPSBMYXp5Q29tcG9uZW50O1xuICAgICAgICAgICAgICAgIHJlc29sdmVkVHlwZSA9IG51bGw7XG4gICAgICAgICAgICAgICAgYnJlYWsgZ2V0VGFnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIHZhciBpbmZvID0gJyc7XG5cbiAgICAgICAgICB7XG4gICAgICAgICAgICBpZiAodHlwZSA9PT0gdW5kZWZpbmVkIHx8IHR5cGVvZiB0eXBlID09PSAnb2JqZWN0JyAmJiB0eXBlICE9PSBudWxsICYmIE9iamVjdC5rZXlzKHR5cGUpLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICBpbmZvICs9ICcgWW91IGxpa2VseSBmb3Jnb3QgdG8gZXhwb3J0IHlvdXIgY29tcG9uZW50IGZyb20gdGhlIGZpbGUgJyArIFwiaXQncyBkZWZpbmVkIGluLCBvciB5b3UgbWlnaHQgaGF2ZSBtaXhlZCB1cCBkZWZhdWx0IGFuZCBcIiArICduYW1lZCBpbXBvcnRzLic7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBvd25lck5hbWUgPSBvd25lciA/IGdldENvbXBvbmVudE5hbWVGcm9tRmliZXIob3duZXIpIDogbnVsbDtcblxuICAgICAgICAgICAgaWYgKG93bmVyTmFtZSkge1xuICAgICAgICAgICAgICBpbmZvICs9ICdcXG5cXG5DaGVjayB0aGUgcmVuZGVyIG1ldGhvZCBvZiBgJyArIG93bmVyTmFtZSArICdgLic7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdGhyb3cgbmV3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ICAgaWYgKGZpYmVyID09PSB1bmRlZmluZWQpIHtcbiAgICAgIGlmICh0eXBlb2YgY29tcG9uZW50LnJlbmRlciA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1VuYWJsZSB0byBmaW5kIG5vZGUgb24gYW4gdW5tb3VudGVkIGNvbXBvbmVudC4nKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHZhciBrZXlzID0gT2JqZWN0LmtleXMoY29tcG9uZW50KS5qb2luKCcsJyk7XG4gICAgICAgIHRocm93IG5ldyBFcnJvcihcIkFyZ3VtZW50IGFwcGVhcnMgdG8gbm90IGJlIGEgUmVhY3RDb21wb25lbnQuIEtleXM6IFwiICsga2V5cyk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgdmFyIGhvc3RGaWJlciA9IGZpbmRDdXJyZW50SG9zdEZpYmVyKGZpYmVyKTtcblxuICAgIGlmIChob3N0RmliZXIgPT09IG51bGwpIHtcbiAgICAgIHJldHVybiBudWxsO1xuICAgIH1cblxuICAgIGlmIChob3N0RmliZXIubW9kZSAmIFN0cmljdExlZ2FjeU1vZGUpIHtcbiAgICAgIHZhciBjb21wb25lbnROYW1lID0gZ2V0Q29tcG9uZW50TmFtZUZyb21GaWJlcihmaWJlcikgfHwgJ0NvbXBvbmVudCc7XG5cbiAgICAgIGlmICghZGlkV2FybkFib3V0RmluZE5vZGVJblN0cmljdE1vZGVbY29tcG9uZW50TmFtZV0pIHtcbiAgICAgICAgZGlkV2FybkFib3V0RmluZE5vZGVJblN0cmljdE1vZGVbY29tcG9uZW50TmFtZV0gPSB0cnVlO1xuICAgICAgICB2YXIgcHJldmlvdXNGaWJlciA9IGN1cnJlbnQ7XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBzZXRDdXJyZW50RmliZXIoaG9zdEZpYmVyKTtcblxuICAgICAgICAgIGlmIChmaWJlci5tb2RlICYgU3RyaWN0TGVnYWN5TW9kZSkge1xuICA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lLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGZvciAoY29uc3QgdiBvZiBtZXNzYWdlLnN0YXRlcykge1xuICAgICAgICAgICAgUEJBbmltYXRpb25TdGF0ZS5lbmNvZGUodiwgd3JpdGVyLnVpbnQzMigxMCkuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQkFuaW1hdG9yLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJBbmltYXRvcigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnN0YXRlcy5wdXNoKFBCQW5pbWF0aW9uU3RhdGUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgIC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AgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNsaXAgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGxheWluZyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2VpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc3BlZWQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5sb29wID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaG91bGRSZXNldCA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJBbmltYXRpb25TdGF0ZS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQkFuaW1hdGlvblN0YXRlIHx8IChQQkFuaW1hdGlvblN0YXRlID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQkFuaW1hdG9yIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvYW5pbWF0b3IuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBBbmltYXRvclNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6IDEwNDIsXG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGNvbnN0IHdyaXRlciA9IFBCQW5pbWF0b3IuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QX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sZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQkF1ZGlvU291cmNlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wbGF5aW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52b2x1bWUgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5sb29wID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5waXRjaCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmF1ZGlvQ2xpcFVybCA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkF1ZGlvU291cmNlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQXVkaW9Tb3VyY2UgfHwgKFBCQXVkaW9Tb3VyY2UgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCQXVkaW9Tb3VyY2UgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9hdWRpb19zb3VyY2UuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBBdWRpb1NvdXJjZVNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6IDEwMjAsXG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGNvbnN0IHdyaXRlciA9IFBCQXVkaW9Tb3VyY2UuZW5jb2RlKHZh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dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGxheWluZyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uudm9sdW1lID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudXJsID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCQXVkaW9TdHJlYW0uZGVjb2RlID0gZGVjb2RlO1xufSkoUEJBdWRpb1N0cmVhbSB8fCAoUEJBdWRpb1N0cmVhbSA9IH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c2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYXZhdGFySWQgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYW5jaG9yUG9pbnRJZCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCQXZhdGFyQXR0YWNoLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQXZhdGFyQXR0YWNoIHx8IChQQkF2YXRhckF0dGFjaCA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJBdmF0YXJBdHRhY2ggfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9hdmF0YXJfYXR0YWNoLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgQXZhdGFyQXR0YWNoU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA3MyxcbiAgICBzZXJpYWxpemUodmFsdWUsIG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KSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hcmVhID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmV4Y2x1ZGVJZHMucHVzaChyZWFkZXIuc3RyaW5nKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgPT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1vZGlmaWVycy5wdXNoKHJlYWRlci5pbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgPT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBlbmQyID0gcmVhZGVyLnVpbnQzMigpICsgcmVhZGVyLnBvcztcbiAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubW9kaWZpZXJzLnB1c2gocmVhZGVyLmludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkF2YXRhck1vZGlmaWVyQXJlYS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQkF2YXRhck1vZGlmaWVyQXJlYSB8fCAoUEJBdmF0YXJNb2RpZmllckFyZWEgPSB7fSkpO1xuIiwgIi8qIGVzbGludC1kaXNhYmxlICovXG5pbXBvcnQgX20wIGZyb20gXCJwcm90b2J1ZmpzL21pbmltYWxcIjtcbmNvbnN0IHByb3RvYnVmUGFja2FnZVNhcmFzYSA9IFwiZGVjZW50cmFsYW5kLmNvbW1vblwiO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVBvc2l0aW9uKCkge1xuICAgIHJldHVybiB7IHg6IDAsIHk6IDAsIHo6IDAgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFBvc2l0aW9uO1xuKGZ1bmN0aW9uIChQb3NpdGlvbikge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGlmIChtZXNzYWdlLnggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTMpLmZsb2F0KG1lc3NhZ2UueCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UueSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyMSkuZmxvYXQobWVzc2FnZS55KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS56ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI5KS5mbG9hdChtZXNzYWdlLnopO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBvc2l0aW9uLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUG9zaXRpb24oKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS54ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnogPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQb3NpdGlvbi5kZWNvZGUgPSBkZWNvZGU7XG59KShQb3NpdGlvbiB8fCAoUG9zaXRpb24gPSB7fSkpO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVZlY3RvcjMoKSB7XG4gICAgcmV0dXJuIHsgeDogMCwgeTogMCwgejogMCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgVmVjdG9yMztcbihmdW5jdGlvbiAoVmVjdG9yMykge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGlmIChtZXNzYWdlLnggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTMpLmZsb2F0KG1lc3NhZ2UueCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UueSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyMSkuZmxvYXQobWVzc2FnZS55KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS56ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI5KS5mbG9hdChtZXNzYWdlLnopO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFZlY3RvcjMuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VWZWN0b3IzKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS56ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgVmVjdG9yMy5kZWNvZGUgPSBkZWNvZGU7XG59KShWZWN0b3IzIHx8IChWZWN0b3IzID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VWZWN0b3IyKCkge1xuICAgIHJldHVybiB7IHg6IDAsIHk6IDAgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFZlY3RvcjI7XG4oZnVuY3Rpb24gKFZlY3RvcjIpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS54ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzKS5mbG9hdChtZXNzYWdlLngpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnkgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UueSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgVmVjdG9yMi5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVZlY3RvcjIoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS54ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgP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IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUXVhdGVybmlvbigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS55ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueiA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLncgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBRdWF0ZXJuaW9uLmRlY29kZSA9IGRlY29kZTtcbn0pKFF1YXRlcm5pb24gfHwgKFF1YXRlcm5pb24gPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCQXZhdGFyTW9kaWZpZXJBcmVhIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvYXZhdGFyX21vZGlmaWVyX2FyZWEuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBBdmF0YXJNb2RpZmllckFyZWFTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDcwLFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdCB3cml0ZXIgPSBQQkF2YXRhck1vZGlmaWVyQXJlYS5lbmNvZGUodmFsdWUpO1xuICAgICAgICBjb25zdCBidWZmZXIgPSBuZXcgV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JhYmxlcykge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4Mikuc3RyaW5nKHYpO1xuICAgICAgICB9XG4gICAgICAgIGZvciAoY29uc3QgdiBvZiBtZXNzYWdlLmVtb3Rlcykge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig5MCkuc3RyaW5nKHYpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCQXZhdGFyU2hhcGUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQkF2YXRhclNoYXBlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuaWQgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubmFtZSA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ib2R5U2hhcGUgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc2tpbkNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuaGFpckNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZXllQ29sb3IgPSBDb2xvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5leHByZXNzaW9uVHJpZ2dlcklkID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDg6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDY0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmV4cHJlc3Npb25UcmlnZ2VyVGltZXN0YW1wID0gbG9uZ1RvTnVtYmVyKHJlYWRlci5pbnQ2NCgpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA5OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA3Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50YWxraW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gODIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2VhcmFibGVzLnB1c2gocmVhZGVyLnN0cmluZygpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW1vdGVzLnB1c2gocmVhZGVyLnN0cmluZygpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkF2YXRhclNoYXBlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQXZhdGFyU2hhcGUgfHwgKFBCQXZhdGFyU2hhcGUgPSB7fSkpO1xuY29uc3QgdHNQcm90b0dsb2JhbFRoaXMgPSAoKCkgPT4ge1xuICAgIGlmICh0eXBlb2YgZ2xvYmFsVGhpcyAhPT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICByZXR1cm4gZ2xvYmFsVGhpcztcbiAgICB9XG4gICAgaWYgKHR5cGVvZiBzZWxmICE9PSBcInVuZGVmaW5lZFwiKSB7XG4gICAgICAgIHJldHVybiBzZWxmO1xuICAgIH1cbiAgICBpZiAodHlwZW9mIHdpbmRvdyAhPT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICByZXR1cm4gd2luZG93O1xuICAgIH1cbiAgICBpZiAodHlwZW9mIGdsb2JhbCAhPT0gXCJ1bm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7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDIxKS5mbG9hdChtZXNzYWdlLmcpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmIgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjkpLmZsb2F0KG1lc3NhZ2UuYik7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgQ29sb3IzLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlQ29sb3IzKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuciA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmcgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5iID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgQ29sb3IzLmRlY29kZSA9IGRlY29kZTtcbn0pKENvbG9yMyB8fCAoQ29sb3IzID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VDb2xvcjQoKSB7XG4gICAgcmV0dXJuIHsgcjogMCwgZzogMCwgYjogMCwgYTogMCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgQ29sb3I0O1xuKGZ1bmN0aW9uIChDb2xvcjQpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS5yICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzKS5mbG9hdChtZXNzYWdlLnIpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmcgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UuZyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuYiAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyOSkuZmxvYXQobWVzc2FnZS5iKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5hICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDM3KS5mbG9hdChtZXNzYWdlLmEpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIENvbG9yNC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbG9yNCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnIgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5nID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYiA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmEgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBDb2xvcjQuZGVjb2RlID0gZGVjb2RlO1xufSkoQ29sb3I0IHx8IChDb2xvcjQgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCQXZhdGFyU2hhcGUgfSBmcm9tICcuL3BiL2RlY2VudH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ipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBQQkJpbGxib2FyZDtcbihmdW5jdGlvbiAoUEJCaWxsYm9hcmQpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS5iaWxsYm9hcmRNb2RlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoOCkuaW50MzIobWVzc2FnZS5iaWxsYm9hcmRNb2RlKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQkJpbGxib2FyZC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCQmlsbGJvYXJkKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5iaWxsYm9hcmRNb2Rl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tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJDYW1lcmFNb2RlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJDYW1lcmFNb2RlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQ2FtZXJhTW9kZSB8fCAoUEJDYW1lcmFNb2RlID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQkNhbWVyYU1vZGUgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9jYW1lcmFfbW9kZS5nZW4nO1xuLyoqXG4gKiBAaW50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2FtZXJhTW9kZUFyZWEoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hcmVhID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1vZGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkNhbWVyYU1vZGVBcmVhLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQ2FtZXJhTW9kZUFyZWEgfHwgKFBCQ2FtZXJhTW9kZUFyZWEgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCQ2FtZXJhTW9kZUFyZWEgfSBmcm9tICcuL3BiL2RlY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lucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJFbmdpbmVJbmZvKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mcmFtZU51bWJlciA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50b3RhbFJ1bnRpbWUgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50aWNrTnVtYmVyID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAg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nZpc2libGVNZXNoZXNDb2xsaXNpb25NYXNrKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5pbnZpc2libGVNZXNoZXNDb2xsaXNpb25NYXNrICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDApLnVpbnQzMihtZXNzYWdlLmludmlzaWJsZU1lc2hlc0NvbGxpc2lvbk1hc2spO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCR2x0ZkNvbnRhaW5lci5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCR2x0ZkNvbnRhaW5lcigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNyYyA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52aXNpYmxlTWVzaGVzQ29sbGlzaW9uTWFzayA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5pbnZpc2libGVNZXNoZXNDb2xsaXNpb25NYXNrID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCR2x0ZkNvbnRhaW5lci5kZWNvZGUgPSBkZWNvZGU7XG59KShQQkdsdGZDb250YWluZXIgfHwgKFBCR2x0ZkNvbnRhaW5lciA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJHbHRmQ29udGFpbmVyIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvZ2x0Zl9jb250YWluZXIuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBHbHRmQ29udGFpbmVyU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA0MSxcbiAg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AgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jdXJyZW50U3RhdGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkdsdGZDb250YWluZXJMb2FkaW5nU3RhdGUuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJHbHRmQ29udGFpbmVyTG9hZGluZ1N0YXRlIHx8IChQQkdsdGZDb250YWluZXJMb2FkaW5nU3RhdGUgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCR2x0ZkNvbnRhaW5lckxvYWRpbmdTdGF0ZSB9IGZyb20gJy4vcGIvZGVjZW50cmFsYW5kL3Nkay9jb21wb25lbnRzL2dsdGZfY29udGFpbmVyX2xvYWRpbmdfc3RhdGUuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBHbHRmQ29udGFpbmVyTG9hZGluZ1N0YXRlU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA0OSxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJHbHRmQ29udGFpbmVyTG9hZGluZ1N0YXRlLmVuY29kZSh2YWx1ZSk7XG4gICAgICAgIGNvbnN0IGJ1ZmZlciA9IG5ldyBVaW50OEFycmF5KHdyaXRlci5maW5pc2goKSwgMCwgd3JpdGVyLmxlbik7XG4gICAgICAgIGJ1a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ICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWF0ZXJpYWwgPSB7ICRjYXNlOiBcInVubGl0XCIsIHVubGl0OiBQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hdGVyaWFsID0geyAkY2FzZTogXCJwYnJcIiwgcGJyOiBQQk1hdGVyaWFsX1Bick1hdGVyaWFsLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQk1hdGVyaWFsLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCTWF0ZXJpYWwgfHwgKFBCTWF0ZXJpYWwgPSB7fSkpO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVBCTWF0ZXJpYWxfVW5saXRNYXRlcmlhbCgpIHtcbiAgICByZXR1cm4geyB0ZXh0dXJ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WF0ZXJpYWwuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50ZXh0dXJlID0gVGV4dHVyZVVuaW9uLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYWxwaGFUZXN0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY2FzdFNoYWRvd3MgPSByZWFkZXIuYm9vbCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpZmZ1c2VDb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCTWF0ZXJpYWxfVW5saXRNYXRlcmlhbC5kZWNvZGUgPSBkZWNvZGU7XG59KShQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwgfHwgKFBCTWF0ZXJpYWxfVW5saXRNYXRlcmlhbCA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlUEJNYXRlcmlhbF9QYnJNYXRlcmlhbCgpIHtcbiAgICByZXR1cm4ge1xuICAgICAgICB0ZXh0dXJlOiB1bmRlZmluZWQsXG4gICAgICAgIGFscGhhVGVzdDogdW5kZWZpbmVkLFxuICAgICAgICBjYXN0U2hhZG93czogdW5kZWZ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lbnNpdHkpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmRpcmVjdEludGVuc2l0eSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzMykuZmxvYXQobWVzc2FnZS5kaXJlY3RJbnRlbnNpdHkpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCTWF0ZXJpYWxfUGJyTWF0ZXJpYWwuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1hdGVyaWFsX1Bick1hdGVyaWFsKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dHVyZSA9IFRleHR1cmVVbmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFscGhhVGVzdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNhc3RTaGFkb3dzID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hbHBoYVRleHR1cmUgPSBUZXh0dXJlVW5pb24uZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5lbWlzc2l2ZVRleHR1cmUgPSBUZXh0dXJlVW5pb24uZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5idW1wVGV4dHVyZSA9IFRleHR1cmVVbmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDU4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFsYmVkb0NvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW1pc3NpdmVDb2xvciA9IENvbG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDk6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDc0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJlZmxlY3Rpdml0eUNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRyYW5zcGFyZW5jeU1vZGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWV0YWxsaWMgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJvdWdobmVzcyA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDE0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMTcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc3BlY3VsYXJJbnRlbnNpdHkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTI1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmVtaXNzaXZlSW50ZW5zaXR5ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kaXJlY3RJbnRlbnNpdHkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQk1hdGVyaWFsX1Bick1hdGVyaWFsLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCTWF0ZXJpYWxfUGJyTWF0ZXJpYWwgfHwgKFBCTWF0ZXJpYWxfUGJyTWF0ZXJpYWwgPSB7fSkpO1xuIiwgIi8qIGVzbGludC1kaXNhYmxlICovXG5pbXBvcnQgX20wIGZyb20gXCJwcm90b2J1ZmpzL21pbmltYWxcIjtcbmNvbnN0IHByb3RvYnVmUGFja2FnZVNhcmFzYSA9IFwiZGVjZW50cmFsYW5kLmNvbW1vblwiO1xuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgVGV4dHVyZVdyYXBNb2RlO1xuKGZ1bmN0aW9uIChUZXh0dXJlV3JhcE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ICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNyYyA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS53cmFwTW9kZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZpbHRlck1vZGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBUZXh0dXJlLmRlY29kZSA9IGRlY29kZTtcbn0pKFRleHR1cmUgfHwgKFRleHR1cmUgPSB7fSkpO1xuZnVuY3Rpb24gY3J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ArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VBdmF0YXJUZXh0dXJlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudXNlcklkID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLndyYXBNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmlsdGVyTW9kZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4g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2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VWaWRlb1RleHR1cmUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZpZGVvUGxheWVyRW50aXR5ID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLndyYXBNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmlsdGVyTW9kZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFZpZGVvVGV4dHVyZS5kZWNvZGUgPSBkZWNvZGU7XG59KShWaWRlb1RleHR1cmUgfHwgKFZpZGVvVGV4dHVyZSA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlVGV4dHVyZVVuaW9uKCkge1xuICAgIHJldHVybiB7IHRleDogdW5kZWZpbmVkIH07XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBUZXh0dXJlVW5pb247XG4oZnVuY3Rpb24gKFRleHR1cmVVbmlvbikge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIHN3aXRjaCAobWVzc2FnZS50ZXg/LiRjYXNlKSB7XG4gICAgICAgICAgICBjYXNlIFwidGV4dHVyZVwiOlxuICAgICAgICAgICAgICAgIFRleHR1cmUuZW5jb2RlKG1lc3NhZ2UudGV4LnRleHR1cmUsIHdyaXRlci51aW50MzIoMTApLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwiYXZhdGFyVGV4dHVyZVwiOlxuICAgICAgICAgICAgICAgIEF2YXRhclRleHR1cmUuZW5jb2RlKG1lc3NhZ2UudGV4LmF2YXRhclRleHR1cmUsIHdyaXRlci51aW50MzIoMTgpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwidmlkZW9UZXh0dXJlXCI6XG4gICAgICAgICAgICAgICAgVmlkZW9UZXh0dXJlLmVuY29kZShtZXNzYWdlLnRleC52aWRlb1RleHR1cmUsIHdyaXRlci51aW50MzIoMjYpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgVGV4dHVyZVVuaW9uLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlVGV4dHVyZVVuaW9uKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4ID0geyAkY2FzZTogXCJ0ZXh0dXJlXCIsIHRleHR1cmU6IFRleHR1cmUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleCA9IHsgJGNhc2U6IFwiYXZhdGFyVGV4dHVyZVwiLCBhdmF0YXJUZXh0dXJlOiBBdmF0YXJUZXh0dXJlLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50ZXggPSB7ICRjYXNlOiBcInZpZGVvVGV4dHVyZVwiLCB2aWRlb1RleHR1cmU6IFZpZGVvVGV4dHVyZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgVGV4dHVyZVVuaW9uLmRlY29kZSA9IGRlY29kZTtcbn0pKFRleHR1cm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KCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jb2xsaXNpb25NYXNrID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcImJveFwiLCBib3g6IFBCTWVzaENvbGxpZGVyX0JveE1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcInNwaGVyZVwiLCBzcGhlcmU6IFBCTWVzaENvbGxpZGVyX1NwaGVyZU1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcImN5bGluZGVyXCIsIGN5bGluZGVyOiBQQk1lc2hDb2xsaWRlcl9DeWxpbmRlck1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcInBsYW5lXCIsIHBsYW5lOiBQQk1lc2hDb2xsaWRlcl9QbGFuZU1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCTWVzaENvbGxpZGVyLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCTWVzaENvbGxpZGVyIHx8IChQQk1lc2hDb2xsaWRlciA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlUEJNZXNoQ29sbGlkZXJfQm94TWVzaCgpIHtcbiAgICByZXR1cm4ge307XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBQQk1lc2hDb2xsaWRlcl9Cb3hNZXNoO1xuKGZ1bmN0aW9uIChQQk1lc2hDb2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lYXRlQmFzZVBCTWVzaENvbGxpZGVyX0N5bGluZGVyTWVzaCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJhZGl1c1RvcCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJhZGl1c0JvdHRvbSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCTWVzaENvbGxpZGVyX0N5bGluZGVyTWVzaC5kZWNvZGUgPSBkZWNvZGU7XG59KShQQk1lc2hDb2xsaWRlcl9DeWxpbmRlck1lc2ggfHwgKFBCTWVzaENvbGxpZGVyX0N5bGluZGVyTWVzaCA9IHt9KSk7XG5mdW5jdGl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wgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwiYm94XCIsIGJveDogUEJNZXNoUmVuZGVyZXJfQm94TWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwic3BoZXJlXCIsIHNwaGVyZTogUEJNZXNoUmVuZGVyZXJfU3BoZXJlTWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwiY3lsaW5kZXJcIiwgY3lsaW5kZXI6IFBCTWVzaFJlbmRlcmVyX0N5bGluZGVyTWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwicGxhbmVcIiwgcGxhbmU6IFBCTWVzaFJlbmRlcmVyX1BsYW5lTWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJNZXNoUmVuZGVyZXIuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJNZXNoUmVuZGVyZXIgfHwgKFBCTWVzaFJlbmRlcmVyID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9Cb3hNZXNoKCkge1xuICAgIHJldHVybiB7IHV2czogW10gfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFBCTWVzaFJlbmRlcmVyX0JveE1lc2g7XG4oZnVuY3Rpb24gKFBCTWVzaFJlbmRlcmVyX0JveE1lc2gpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICB3cml0ZXIudWludDMyKDEwKS5mb3JrKCk7XG4gICAgICAgIGZvciAoY29uc3QgdiBvZiBtZXNzYWdlLnV2cykge1xuICAgICAgICAgICAgd3JpdGVyLmZsb2F0KHYpO1xuICAgICAgICB9XG4gICAgICAgIHdyaXRlci5sZGVsaW0oKTtcbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUEJNZXNoUmVuZGVyZXJfQm94TWVzaC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCTWVzaFJlbmRlcmVyX0JveE1lc2goKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS51dnMucHVzaChyZWFkZXIuZmxvYXQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5kMiA9IHJlYWRlci51aW50MzIoKSArIHJlYWRlci5wb3M7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSA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cml0ZXIudWludDMyKDEzKS5mbG9hdChtZXNzYWdlLnJhZGl1c1RvcCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucmFkaXVzQm90dG9tICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UucmFkaXVzQm90dG9tKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2guZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2goKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5yYWRpdXNUb3AgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5yYWRpdXNCb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2guZGVjb2RlID0gZGVjb2RlO1xufSkoUEJNZXNoUmVuZGVyZXJfQ3lsaW5kZXJNZXNoIHx8IChQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2ggPSB7fSkpO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVBCTWVzaFJlbmRlcmVyX1BsYW5lTWVzaCgpIHtcbiAgICByZXR1cm4geyB1dnM6IFtdIH07XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBQQk1lc2hSZW5kZXJlcl9QbGFuZU1lc2g7XG4oZnVuY3Rpb24gKFBCTWVzaFJlbmRlcmVyX1BsYW5lTWVzaCkge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIHdyaXRlci51aW50MzIoMTApLmZvcmsoKTtcbiAgICAgICAgZm9yIChjb25zdCB2IG9mIG1lc3NhZ2UudXZzKSB7XG4gICAgICAgICAgICB3cml0ZXIuZmxvYXQodik7XG4gICAgICAgIH1cbiAgICAgICAgd3JpdGVyLmxkZWxpbSgpO1xuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQk1lc2hSZW5kZXJlcl9QbGFuZU1lc2guZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9QbGFuZU1lc2goKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS51dnMucHVzaChyZWFkZXIuZmxvYXQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5kMiA9IHJlYWRlci51aW50MzIoKSArIHJlYWRlci5wb3M7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnV2c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S5jb2xvciwgd3JpdGVyLnVpbnQzMigyNikuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQk5mdFNoYXBlLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJOZnRTaGFwZSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnVybiA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdHlsZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJOZnRTaGFwZS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQk5mdFNoYXBlIHx8IChQQk5mdFNoYXBlID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQk5mdFNoYXBlIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvbmZ0X3NoYXBlLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgTmZ0U2hhcGVTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDQwLFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdCB3cml0ZXIgPSBQQk5mdFNoYXBlLmVuY29kZSh2YWx1ZSk7XG4gICAgICAgIGNvbnN0IGJ1ZmZlciA9IG5ldyBVaW50OEFycmF5KHdyaXRlci5maW5pc2goKSwgMCwgd3JpdGVyLmxlbik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVCdWZmZXIoYnV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AgICAgICAgICAgUEJQb2ludGVyRXZlbnRzX0VudHJ5LmVuY29kZSh2LCB3cml0ZXIudWludDMyKDEwKS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCUG9pbnRlckV2ZW50cy5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCUG9pbnRlckV2ZW50cygpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvaW50ZXJFdmVudHMucHVzaChQQlBvaW50ZXJFdmVudHNfRW50cnkuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgIC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4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uuc2hvd0ZlZWRiYWNrICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMzIpLmJvb2wobWVzc2FnZS5zaG93RmVlZGJhY2spO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCUG9pbnRlckV2ZW50c19JbmZvLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJQb2ludGVyRXZlbnRzX0luZm8oKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmJ1dHRvbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhvdmVyVGV4dCA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhEaXN0YW5jZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNob3dGZWVkYmFjayA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJQb2ludGVyRXZlbnRzX0luZm8uZGVjb2RlID0gZGVjb2RlO1xufSkoUEJQb2ludGVyRXZlbnRzX0luZm8gfHwgKFBCUG9pbnRlckV2ZW50c19JbmZvID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VQQlBvaW50ZXJFdmVudHNfRW50cnkoKSB7XG4gICAgcmV0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IDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ldmVudFR5cGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ldmVudEluZm8gPSBQQlBvaW50ZXJFdmVudHNfSW5mby5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCUG9pbnRlckV2ZW50c19FbnRyeS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQlBvaW50ZXJFdmVudHNfRW50cnkgfHwgKFBCUG9pbnRlckV2ZW50c19FbnRyeSA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJQb2ludGVyRXZlbnRzIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2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NzYWdlLnRpbWVzdGFtcCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuYW5hbG9nICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNTMpLmZsb2F0KG1lc3NhZ2UuYW5hbG9nKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS50aWNrTnVtYmVyICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDU2KS51aW50MzIobWVzc2FnZS50aWNrTnVtYmVyKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlBvaW50ZXJFdmVudHNSZXN1bHQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlBvaW50ZXJFdmVudHNSZXN1bHQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmJ1dHRvbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhpdCA9IFJheWNhc3RIaXQuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdGF0ZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hbmFsb2cgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50aWNrTnVtYmVyID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCUG9pbnRlckV2ZW50c1Jlc3VsdC5kZWNvZGUgPSBkZWNvZGU7XG59KShQQlBvaW50ZXJFdmVudHNSZXN1bHQgfHwgKFBCUG9pbnRlckV2ZW50c1Jlc3VsdCA9IHt9KSk7XG4iLCAiLyogZXNsaW50LWRpc2FibGUgKi9cbmltcG9ydCBfbTAgZnJvbSBcInByb3RvYnVmanMvbWluaW1hbFwiO1xuaW1wb3J0IHsgVmVjdG9yMyB9IGZyb20gXCIuLi8uLi8uLi9jb21tb24vdmVjdG9ycy5nZW5cIjtcbmNvbnN0IHByb3RvYnVmUGFja2FnZVNhcmFzYSA9IFwiZGVjZW50cmFsYW5kLnNkay5jb21wb25lbnRzLmNvbW1vblwiO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVJheWNhc3RIaXQoKSB7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgcG9zaXRpb246IHVuZGVmaW5lZCxcbiAgICAgICAgZ2xvYmFsT3JpZ2luOiB1bmRlZmluZWQsXG4gICAgICAgIGRpcmVjdGlvbjogdW5kZWZpbmVkLFxuICAgICAgICBub3JtYWxIaXQ6IHVuZGVmaW5lZCxcbiAgICAgICAgbGVuZ3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AgICAgIHdyaXRlci51aW50MzIoNDUpLmZsb2F0KG1lc3NhZ2UubGVuZ3RoKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tZXNoTmFtZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDUwKS5zdHJpbmcobWVzc2FnZS5tZXNoTmFtZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZW50aXR5SWQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig1NikudWludDMyKG1lc3NhZ2UuZW50aXR5SWQpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFJheWNhc3RIaXQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VSYXljYXN0SGl0KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb24gPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZ2xvYmFsT3JpZ2luID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpcmVjdGlvbiA9IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ub3JtYWxIaXQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubGVuZ3RoID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaE5hbWUgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW50aXR5SWQgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUmF5Y2FzdEhpdC5kZWNvZGUgPSBkZWNvZGU7XG59KShSYXljYXN0SGl0IHx8IChSYXljYXN0SGl0ID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlBvaW50ZXJFdmVudHNSZXN1bHQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9wb2ludGVyX2V2ZW50c19yZXN1bHQuZ2VuJztcbi8q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zZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmlzUG9pbnRlckxvY2tlZCA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJQb2ludGVyTG9jay5kZWNvZGUgPSBkZWNvZGU7XG59KShQQlBvaW50ZXJMb2NrIHx8IChQQlBvaW50ZXJMb2NrID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlBvaW50ZXJMb2NrIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvcG9pbnRlcl9sb2NrLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgUG9pbnRlckxvY2tTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDc0LFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdCB3cml0ZXIgPSBQQlBvaW50ZXJMb2NrLmVuY29kZSh2YWx1ZSk7XG4gICAgICAgIGNvbnN0IGJ1ZmZlciA9IG5ldyBVaW50OEFycmF5KHdyaXRlci5maW5pc2goKSwgMCwgd3JpdGVyLmxlbik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVCdWZmZXIoYnVmZmVyLCBmYWxzZSk7XG4gICAgfSxcbiAgICBkZX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zMig1OCkuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJ0YXJnZXRFbnRpdHlcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDgwKS51aW50MzIobWVzc2FnZS5kaXJlY3Rpb24udGFyZ2V0RW50aXR5KTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhEaXN0YW5jZSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzNykuZmxvYXQobWVzc2FnZS5tYXhEaXN0YW5jZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucXVlcnlUeXBlICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDQwKS5pbnQzMihtZXNzYWdlLnF1ZXJ5VHlwZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuY29udGludW91cyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDY0KS5ib29sKG1lc3NhZ2UuY29udGludW91cyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuY29sbGlzaW9uTWFzayAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDcyKS51aW50MzIobWVzc2FnZS5jb2xsaXNpb25NYXNrKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlJheWNhc3QuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlJheWNhc3QoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vcmlnaW5PZmZzZXQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlyZWN0aW9uID0geyAkY2FzZTogXCJsb2NhbERpcmVjdGlvblwiLCBsb2NhbERpcmVjdGlvbjogVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlyZWN0aW9uID0geyAkY2FzZTogXCJnbG9iYWxEaXJlY3Rpb25cIiwgZ2xvYmFsRGlyZWN0aW9uOiBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kaXJlY3Rpb24gPSB7ICRjYXNlOiBcImdsb2JhbFRhcmdldFwiLCBnbG9iYWxUYXJnZXQ6IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDEwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kaXJlY3Rpb24gPSB7ICRjYXNlOiBcInRhcmdldEVudGl0eVwiLCB0YXJnZXRFbnRpdHk6IHJlYWRlci51aW50MzIoKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1heERpc3RhbmNlID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucXVlcnlUeXBlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY29udGludW91cyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNzIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY29sbGlzaW9uTWFzayA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAg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cbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5nbG9iYWxPcmlnaW4gPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlyZWN0aW9uID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhpdHMucHVzaChSYXljYXN0SGl0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpY2tOdW1iZXIgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJSYXljYXN0UmVzdWx0LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCUmF5Y2FzdFJlc3VsdCB8fCAoUEJSYXljYXN0UmVzdWx0ID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlJheWNhc3RSZXN1bHQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9yYXljYXN0X3Jlc3VsdC5nZW4nO1xuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFJheWNhc3RSZXN1bHRTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDY4LFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdCB3cml0ZXIgPSBQQlJheWNhc3RSZXN1bHQuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTt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GluZ1JpZ2h0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5wYWRkaW5nQm90dG9tICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoODUpLmZsb2F0KG1lc3NhZ2UucGFkZGluZ0JvdHRvbSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucGFkZGluZ0xlZnQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig5MykuZmxvYXQobWVzc2FnZS5wYWRkaW5nTGVmdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubGluZVNwYWNpbmcgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMDEpLmZsb2F0KG1lc3NhZ2UubGluZVNwYWNpbmcpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmxpbmVDb3VudCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEwNCkuaW50MzIobWVzc2FnZS5saW5lQ291bnQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnRleHRXcmFwcGluZyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDExMikuYm9vbChtZXNzYWdlLnRleHRXcmFwcGluZyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uuc2hhZG93Qmx1ciAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEyNSkuZmxvYXQobWVzc2FnZS5zaGFkb3dCbHVyKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5zaGFkb3dPZmZzZXRYICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTMzKS5mbG9hdChtZXNzYWdlLnNoY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dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJUZXh0U2hhcGUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50ZXh0ID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mb250U2l6ZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnRBdXRvU2l6ZSA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dEFsaWduID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2lkdGggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2MSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5oZWlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA4OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2OSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wYWRkaW5nVG9wID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNzcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ1JpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDg1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdCb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ0xlZnQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmxpbmVTcGFjaW5nID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5saW5lQ291bnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTEyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRXcmFwcGluZyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEyNSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaGFkb3dCbHVyID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaGFkb3dPZmZzZXRYID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE0MSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaGFkb3dPZmZzZXRZID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTg6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE0OSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vdXRsaW5lV2lkdGggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTU0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNoYWRvd0NvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vdXRsaW5lQ29sb3IgPSBDb2xvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTcwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRDb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCVGV4dFNoYXBlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVGV4dFNoYXBlIHx8IChQQlRleHRTaGFwZSA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJUZXh0U2hhcGUgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy90ZXh0X3NoYXBlLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVGV4dFNoYXBlU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTAzMCxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJUZXh0U2hhcGUuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUJ1ZmZlcih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DE2KS5pbnQzMihtZXNzYWdlLmVhc2luZ0Z1bmN0aW9uKTtcbiAgICAgICAgfVxuICAgICAgICBzd2l0Y2ggKG1lc3NhZ2UubW9kZT8uJGNhc2UpIHtcbiAgICAgICAgICAgIGNhc2UgXCJtb3ZlXCI6XG4gICAgICAgICAgICAgICAgTW92ZS5lbmNvZGUobWVzc2FnZS5tb2RlLm1vdmUsIHdyaXRlci51aW50MzIoMjYpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwicm90YXRlXCI6XG4gICAgICAgICAgICAgICAgUm90YXRlLmVuY29kZShtZXNzYWdlLm1vZGUucm90YXRlLCB3cml0ZXIudWludDMyKDM0KS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcInNjYWxlXCI6XG4gICAgICAgICAgICAgICAgU2NhbGUuZW5jb2RlKG1lc3NhZ2UubW9kZS5zY2FsZSwgd3JpdGVyLnVpbnQzMig0MikuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5wbGF5aW5nICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDgpLmJvb2wobWVzc2FnZS5wbGF5aW5nKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5jdXJyZW50VGltZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDYxKS5mbG9hdChtZXNzYWdlLmN1cnJlbnRUaW1lKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlR3ZWVuLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJUd2VlbigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmR1cmF0aW9uID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZWFzaW5nRnVuY3Rpb24gPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tb2RlID0geyAkY2FzZTogXCJtb3ZlXCIsIG1vdmU6IE1vdmUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1vZGUgPSB7ICRjYXNlOiBcInJvdGF0ZVwiLCByb3RhdGU6IFJvdGF0ZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubW9kZSA9IHsgJGNhc2U6IFwic2NhbGVcIiwgc2NhbGU6IFNjYWxlLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wbGF5aW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2MSkge1xuICAgICAgICAgICAg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gpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmFjZURpcmVjdGlvbiAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI0KS5ib29sKG1lc3NhZ2UuZmFjZURpcmVjdGlvbik7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgTW92ZS5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZU1vdmUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdGFydCA9IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5lbmQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmFjZURpcmVjdGlvbiA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgTW92ZS5kZWNvZGUgPSBkZWNvZGU7XG59KShNb3ZlIHx8IChNb3ZlID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VSb3RhdGUoKSB7XG4gICAgcmV0dXJuIHsgc3RhcnQ6IHVuZGVmaW5lZCwgZW5kOiB1bmRlZmluZWQgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFJvdGF0ZTtcbihmdW5jdGlvbiAoUm90YXRlKSB7XG4gICAgZnVuY3Rpb24gZW5jb2RlKG1lc3NhZ2UsIHdyaXRlciA9IF9tMC5Xcml0ZXIuY3JlYXRlKCkpIHtcbiAgICAgICAgaWYgKG1lc3NhZ2Uuc3RhcnQ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IHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW5kID0gUXVhdGVybmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFJvdGF0ZS5kZWNvZGUgPSBkZWNvZGU7XG59KShSb3RhdGUgfHwgKFJvdGF0ZSA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlU2NhbGUoKSB7XG4gICAgcmV0dXJuIHsgc3RhcnQ6IHVuZGVmaW5lZCwgZW5kOiB1bmRlZmluZWQgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFNjYWxlO1xuKGZ1bmN0aW9uIChTY2FsZSkge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGlmIChtZXNzYWdlLnN0YXJ0ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIFZlY3RvcjMuZW5jb2RlKG1lc3NhZ2Uuc3RhcnQsIHdyaXRlci51aW50MzIoMTApLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZW5kICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIFZlY3RvcjMuZW5jb2RlKG1lc3NhZ2UuZW5kLCB3cml0ZXIudWludDMyKDE4KS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFNjYWxlLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlU2NhbGUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdGFydCA9IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5lbmQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgU2NhbGUuZGVjb2RlID0gZGVjb2RlO1xufSkoU2NhbGUgfHwgKFNjYWxlID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlR3ZWVuIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvdHdlZW4uZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBUd2VlblNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6IDExMDIsXG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGNvbnN0IHdyaXRlciA9IFBCVHdlZW4uZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUJ1ZmZlcihidWZmZXIsIGZhbHNlKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gUEJUd2Vlbi5kZWNvZGUocmVhZGVyLmJ1ZmZlcigpLCByZWFkZ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cbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc2VxdWVuY2UucHVzaChQQlR3ZWVuLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmxvb3AgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQlR3ZWVuU2VxdWVuY2UuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJUd2VlblNlcXVlbmNlIHx8IChQQlR3ZWVuU2VxdWVuY2UgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCVHdlZW5TZXF1ZW5jZSB9IGZyb20gJy4vcGIvZGVjZW50cmFsYW5kL3Nkay9jb21wb25lbnRzL3R3ZWVuX3NlcXVlbmNlLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVHdlZW5TZXF1ZW5jZVNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6IDExMDQsXG4gICAgc2Vy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dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlR3ZWVuU3RhdGUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnN0YXRlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY3VycmVudFRpbWUgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUe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YWdlLnV2cykge1xuICAgICAgICAgICAgd3JpdGVyLmZsb2F0KHYpO1xuICAgICAgICB9XG4gICAgICAgIHdyaXRlci5sZGVsaW0oKTtcbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUEJVaUJhY2tncm91bmQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlVpQmFja2dyb3VuZCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dHVyZSA9IFRleHR1cmVVbmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHR1cmVNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dHVyZVNsaWNlcyA9IEJvcmRlclJlY3QuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSA0NSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS51dnMucHVzaChyZWFkZXIuZmxvYXQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSA0Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5kMiA9IHJlYWRlci51aW50MzIoKSArIHJlYWRlci5wb3M7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZDIpIHtcbiAgICAgICAgICAgICAgICA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YXQobWVzc2FnZS50b3ApO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmxlZnQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UubGVmdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucmlnaHQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjkpLmZsb2F0KG1lc3NhZ2UucmlnaHQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmJvdHRvbSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzNykuZmxvYXQobWVzc2FnZS5ib3R0b20pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIEJvcmRlclJlY3QuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VCb3JkZXJSZWN0KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudG9wID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubGVmdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYm90dG9tID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9X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5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VSZWN0KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS53aWR0aCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhlaWdodCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFJlY3QuZGVjb2RlID0gZGVjb2RlO1xufSkoUmVjdCB8fCAoUmVjdCA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJVaUJhY2tncm91bmQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy91aV9iYWNrZ3JvdW5kLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVWlCYWNrZ3JvdW5kU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA1MyxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJVaUJhY2tncm91bmQuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUJ1ZmZlcihidWZmZXIsIGZhbHNlKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gUEJVaUJhY2tncm91bmQuZGVjb2RlKHJlYWRlci5idWZmZXIoKSwgcmV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cbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kZXZpY2VQaXhlbFJhdGlvID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2lkdGggPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5oZWlnaHQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5pbnRlcmFjdGFibGVBcmVhID0gQm9yZGVyUmVjdC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO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ICAgaWYgKG1lc3NhZ2UudGV4dEFsaWduICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoODApLmludDMyKG1lc3NhZ2UudGV4dEFsaWduKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5mb250ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoODgpLmludDMyKG1lc3NhZ2UuZm9udCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZm9udFNpemUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig5NikuaW50MzIobWVzc2FnZS5mb250U2l6ZSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUEJVaURyb3Bkb3duLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJVaURyb3Bkb3duKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hY2NlcHRFbXB0eSA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW1wdHlMYWJlbCA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vcHRpb25zLnB1c2gocmVhZGVyLnN0cmluZygpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zZWxlY3RlZEluZGV4ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlzYWJsZWQgPSByZWFkZXIuYm9vbCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDUwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRBbGlnbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDExOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mb250ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDk2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnRTaXplID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKC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gICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlVpRHJvcGRvd25SZXN1bHQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJVaURyb3Bkb3duUmVzdWx0LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVWlEcm9wZG93blJlc3VsdCB8fCAoUEJVaURyb3Bkb3duUmVzdWx0ID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlVpRHJvcGRvd25SZXN1bHQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy91aV9kcm9wZG93bl9yZXN1bHQuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBVaURyb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zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCVWlJbnB1dCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBsYWNlaG9sZGVyID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGxhY2Vob2xkZXJDb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpc2FibGVkID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gODApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dEFsaWduID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDg4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZm9udFNpemUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTA2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhb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iB3cml0ZXI7XG4gICAgfVxuICAgIFBCVWlJbnB1dFJlc3VsdC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCVWlJbnB1dFJlc3VsdCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmlzU3VibWl0ID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PS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AgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52YWx1ZSA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRBbGlnbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mb250U2l6ZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCVWlUZXh0LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVWlUZXh0IHx8IChQQlVpVGV4dCA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJVaVRleHQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy91aV90ZXh0Lmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVWlUZXh0U2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA1MixcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJVaVRleHQuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUJ1ZmZlcihidWZmZXIsIGZhbHNlKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gUEJVaVRleHQuZGVjb2RlKHJlYWRlci5idWZmZXIoKSwgcmVhZGVyLnJlbWFpbmluZ0J5dGVzKCkpO1xuICAgIH0sXG4gICAgY3JlYXRlK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biAgICAgICAgICAgIHdyaXRlci51aW50MzIoNTMpLmZsb2F0KG1lc3NhZ2UuZmxleFNocmluayk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25UeXBlICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDU2KS5pbnQzMihtZXNzYWdlLnBvc2l0aW9uVHlwZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuYWxpZ25TZWxmICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDY0KS5pbnQzMihtZXNzYWdlLmFsaWduU2VsZik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmxleERpcmVjdGlvbiAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig3MikuaW50MzIobWVzc2FnZS5mbGV4RGlyZWN0aW9uKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5qdXN0aWZ5Q29udGVudCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4MCkuaW50MzIobWVzc2FnZS5qdXN0aWZ5Q29udGVudCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uub3ZlcmZsb3cgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoODgpLmludDMyKG1lc3NhZ2Uub3ZlcmZsb3cpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmRpc3BsYXkgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoOTYpLmludDMyKG1lc3NhZ2UuZGlzcGxheSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmxleEJhc2lzVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMDQpLmludDMyKG1lc3NhZ2UuZmxleEJhc2lzVW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmxleEJhc2lzICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDExNykuZmxvYXQobWVzc2FnZS5mbGV4QmFzaXMpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmZsZXhHcm93ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEyNSkuZmxvYXQobWVzc2FnZS5mbGV4R3Jvdyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uud2lkdGhVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEyOCkuaW50MzIobWVzc2FnZS53aWR0aFVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLndpZHRoICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDE0MSkuZmxvYXQobWVzc2FnZS53aWR0aCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuaGVpZ2h0VW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNDQpLmludDMyKG1lc3NhZ2UuaGVpZ2h0VW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuaGVpZ2h0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDE1NykuZmxvYXQobWVzc2FnZS5oZWlnaHQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1pbldpZHRoVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNjApLmludDMyKG1lc3NhZ2UubWluV2lkdGhVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5taW5XaWR0aCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNzMpLmZsb2F0KG1lc3NhZ2UubWluV2lkdGgpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1pbkhlaWdodFVuaXQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTc2KS5pbnQzMihtZXNzYWdlLm1pbkhlaWdodFVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1pbkhlaWdodCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxODkpLmZsb2F0KG1lc3NhZ2UubWluSGVpZ2h0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhXaWR0aFVuaXQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTkyKS5pbnQzMihtZXNzYWdlLm1heFdpZHRoVW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWF4V2lkdGggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjA1KS5mbG9hdChtZXNzYWdlLm1heFdpZHRoKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhIZWlnaHRVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDIwOCkuaW50MzIobWVzc2FnZS5tYXhIZWlnaHRVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhIZWlnaHQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjIxKS5mbG9hdChtZXNzYWdlLm1heEhlaWdodCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25MZWZ0VW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyMjQpLmludDMyKG1lc3NhZ2UucG9zaXRpb25MZWZ0VW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25MZWZ0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDIzNykuZmxvYXQobWVzc2FnZS5wb3NpdGlvbkxlZnQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnBvc2l0aW9uVG9wVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNDApLmludDMyKG1lc3NhZ2UucG9zaXRpb25Ub3BVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5wb3NpdGlvblRvcCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNTMpLmZsb2F0KG1lc3NhZ2UucG9zaXRpb25Ub3ApO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnBvc2l0aW9uUmlnaHRVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI1NikuaW50MzIobWVzc2FnZS5wb3NpdGlvblJpZ2h0VW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25SaWdodCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNjkpLmZsb2F0KG1lc3NhZ2UucG9zaXRpb25SaWdodCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25Cb3R0b21Vbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI3MikuaW50MzIobWVzc2FnZS5wb3NpdGlvbkJvdHRvbVVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnBvc2l0aW9uQm90dG9tICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI4NSkuZmxvYXQobWVzc2FnZS5wb3NpdGlvbkJvdHRvbSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luTGVmdFVuaXQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjg4KS5pbnQzMihtZXNzYWdlLm1hcmdpbkxlZnRVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXJnaW5MZWZ0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMwMSkuZmxvYXQobWVzc2FnZS5tYXJnaW5MZWZ0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXJnaW5Ub3BVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMwNCkuaW50MzIobWVzc2FnZS5tYXJnaW5Ub3BVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXJnaW5Ub3AgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMzE3KS5mbG9hdChtZXNzYWdlLm1hcmdpblRvcCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luUmlnaHRVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMyMCkuaW50MzIobWVzc2FnZS5tYXJnaW5SaWdodFVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1hcmdpblJpZ2h0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMzMykuZmxvYXQobWVzc2FnZS5tYXJnaW5SaWdodCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luQm90dG9tVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzMzYpLmludDMyKG1lc3NhZ2UubWFyZ2luQm90dG9tVW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luQm90dG9tICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDM0OSkuZmxvYXQobWVzc2Fn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W50ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucmlnaHRPZiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFsaWduQ29udGVudCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFsaWduSXRlbXMgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mbGV4V3JhcCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDUzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZsZXhTaHJpbmsgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wb3NpdGlvblR5cGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA4OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2NCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hbGlnblNlbGYgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA5OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA3Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mbGV4RGlyZWN0aW9uID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmp1c3RpZnlDb250ZW50ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDg4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm92ZXJmbG93ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDk2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpc3BsYXkgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTA0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZsZXhCYXNpc1VuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTE3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZsZXhCYXNpcyA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDE1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMjUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmxleEdyb3cgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTI4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLndpZHRoVW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDE3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2lkdGggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTQ0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhlaWdodFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTU3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhlaWdodCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDIwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNjApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWluV2lkdGhVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE3Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5taW5XaWR0aCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDIyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNzYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWluSGVpZ2h0VW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDIzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxODkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWluSGVpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE5Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhXaWR0aFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjA1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1heFdpZHRoID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIwOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhIZWlnaHRVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhIZWlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uTGVmdFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uTGVmdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDMwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb25Ub3BVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI1Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wb3NpdGlvblRvcCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDMyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb25SaWdodFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjY5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uUmlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjcyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uQm90dG9tVW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyODUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb25Cb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjg4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpbkxlZnRVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMwMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXJnaW5MZWZ0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzg6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMwNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXJnaW5Ub3BVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzk6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMxNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXJnaW5Ub3AgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0MDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzIwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpblJpZ2h0VW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMzMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWFyZ2luUmlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0MjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzM2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpbkJvdHRvbVVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0MzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQ5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpbkJvdHRvbSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNTIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ0xlZnRVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM2NSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wYWRkaW5nTGVmdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNjgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ1RvcFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0NzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdUb3AgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0ODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzg0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdSaWdodFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzk3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdSaWdodCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDUwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ0JvdHRvbVVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1MTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdCb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1MjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvaW50ZXJGaWx0ZXIgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xu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bnQzMihtZXNzYWdlLnN0YXRlKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlZpZGVvRXZlbnQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlZpZGVvRXZlbnQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50aWNrTnVtYmVyID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmN1cnJlbnRPZmZzZXQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52aWRlb0xlbmd0aCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnN0YXRlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJWaWRlb0V2ZW50LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVmlkZW9FdmVudCB8fCAoUEJWaWRlb0V2ZW50ID0ge30pKTtcbiIsICJpbXBvcnQgeyB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ZXIudWludDMyKDM3KS5mbG9hdChtZXNzYWdlLnZvbHVtZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucGxheWJhY2tSYXRlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDUpLmZsb2F0KG1lc3NhZ2UucGxheWJhY2tSYXRlKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5sb29wICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDgpLmJvb2wobWVzc2FnZS5sb29wKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlZpZGVvUGxheWVyLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJWaWRlb1BsYXllcigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNyYyA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wbGF5aW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wb3NpdGlvbiA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZvbHVtZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQ1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBsYXliYWNrUmF0ZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQ4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmxvb3AgPSByZWFkZXIuYm9vbCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCVmlkZW9QbGF5ZXIuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJWaWRlb1BsYXllciB8fCAoUEJWaWRlb1BsYXllciA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJWaWRlb1BsYXllciB9IGZyb20gJy4vcGIvZGVjZW50cmFsYW5kL3Nkay9jb21wb25lbnRzL3ZpZGVvX3BsYXllci5nZW4nO1xuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFZpZGVvUGxheWVyU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA0MyxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJWaWRlb1BsYXllci5lbmNvZGUodmFsdWUpO1xuICAgICAgICBjb25zdCBidWZmZXIgPSBuZXcgVWludDhBcnJheSh3cml0ZXIuZmluaXNoKCksIDAsIHdyaXRlci5sZW4pO1xuICAgICAgICBidWlsZGVyLndyaXRlQnVmZmVyKGJ1ZmZlciwgZmFsc2UpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiBQQlZpZGVvUGxheWVyLmRlY29kZShyZWFkZXIuYnVmZmVyKCksIHJlYWRlci5yZW1haW5pbmdCeXRlcygpKTtcbiAgICB9LFxuICAgIGNyZWF0ZSgpIHtcbiAgICAgICAgLy8gVE9ETzogdGhpcyBpcyBhIGhhY2suXG4gICAgICAgIHJldHVybiBQQlZpZGVvUGxheWVyLmRlY29kZShuZXcgVWludDhBcnJheSgpKTtcbiAgICB9LFxuICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgdHlwZTogXCJvYmplY3RcIixcbiAgICAgICAgcHJvcGVydGllczoge30sXG4gICAgICAgIHNlcmlhbGl6YXRpb25UeXBlOiBcInByb3RvY29sLWJ1ZmZlclwiLFxuICAgICAgICBwcm90b2NvbEJ1ZmZlcjogXCJQQlZpZGVvUGxheWVyXCJcbiAgICB9XG59O1xuIiwgIi8qIGVzbGludC1kaXNhYmxlICovXG5pbXBvcnQgX20wIGZyb20gXCJwcm90b2J1ZmpzL21pbmltYWxcIjtcbmNvbnN0IHByb3RvYnVmUGFja2FnZVNhcmFzYSA9IFwiZGVjZW50cmFsYW5kLnNkay5jb21wb25lbnRzXCI7XG5mdW5jdGlvbiBjcmVhdGVCYXNlUEJWaXNpYmlsaXR5Q29tcG9uZW50KCkge1xuICAgIHJldHVybiB7IHZpc2libGU6IHVuZGVmaW5lZCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgUEJWaXNpYmlsaXR5Q29tcG9uZW50O1xuKGZ1bmN0aW9uIChQQlZpc2liaWxpdHlDb21wb25lbnQpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS52aXNpYmxlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoOCkuYm9vbChtZXNzYWdlLnZpc2libGUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCVmlzaWJpbGl0eUNvbXBvbmVudC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCVmlzaWJpbGl0eUNvbXBvbmVudCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudmlzaWJsZSA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJWaXNpYmlsaXR5Q29tcG9uZW50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tcbiAgICAgICAgaWYgKCFhbmltKVxuICAgICAgICAgICAgcmV0dXJuIFtudWxsLCBudWxsXTtcbiAgICAgICAgY29uc3Qgc3RhdGUgPSBhbmltLnN0YXRlcy5maW5kKChpdGVtKSA9PiBpdGVtLmNsaXAgPT09IGNsaXBOYW1lKTtcbiAgICAgICAgaWYgKCFzdGF0ZSlcbiAgICAgICAgICAgIHJldHVybiBbYW5pbSwgbnVsbF07XG4gICAgICAgIHJldHVybiBbYW5pbSwgc3RhdGVdO1xuICAgIH1cbiAgICByZXR1cm4ge1xuICAgICAgICAuLi50aGVDb21wb25lbnQsXG4gICAgICAgIGdldENsaXBPck51bGwoZW50aXR5LCBjbGlwTmFtZSkge1xuICAgICAgICAgICAgY29uc3QgW18sIHN0YXRlXSA9IGdldENsaXBBbmRBbmltYXRvcihlbnRpdHksIGNsaXBOYW1lKTtcbiAgICAgICAgICAgIHJldHVybiBzdGF0ZTtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0Q2xpcChlbnRpdHksIGNsaXBOYW1lKSB7XG4gICAgICAgICAgICBjb25zdCBbYW5pbWF0b3IsIHN0YXRlXSA9IGdldENsaXBBbmRBbmltYXRvcihlbnRpdHksIGNsaXBOYW1lKTtcbiAgICAgICAgICAgIGlmICghYW5pbWF0b3IpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFRoZXJlIGlzIG5vIEFuaW1hdG9yIGZvdW5kIGluIHRoZSBlbnRpdHkgJHtlbnRpdHl9YCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIXN0YXRlKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBUaGUgQW5pbWF0b3IgY29tcG9uZW50IG9mICR7ZW50aXR5fSBoYXMgbm8gdGhlIHN0YXRlICR7Y2xpcE5hbWV9YCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gc3RhdGU7XG4gICAgICAgIH0sXG4gICAgICAgIHBsYXlTaW5nbGVBbmltYXRpb24oZW50aXR5LCBjbGlwTmFtZSwgc2hvdWxkUmVzZXQgPSB0cnVlKSB7XG4gICAgICAgICAgICBjb25zdCBbYW5pbWF0b3IsIHN0YXRlXSA9IGdldENsaXBBbmRBbmltYXRvcihlbnRpdHksIGNsaXBOYW1lKTtcbiAgICAgICAgICAgIGlmICghYW5pbWF0b3IgfHwgIXN0YXRlKVxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIC8vIFJlc2V0IGFsbCBvdGhlciBhbmltYXRpb25zXG4gICAgICAgICAgICBmb3IgKGNvbnN0IHN0YXRlIG9mIGFuaW1hdG9yLnN0YXRlcykge1xuICAgICAgICAgICAgICAgIHN0YXRlLnBsYXlpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBzdGF0ZS5zaG91bGRSZXNldCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzdGF0ZS5wbGF5aW5nID0gdHJ1ZTtcbiAgICAgICAgICAgIHN0YXRlLnNob3VsZFJlc2V0ID0gc2hvdWxkUmVzZXQ7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfSxcbiAgICAgICAgc3RvcEFsbEFuaW1hdGlvbnMoZW50aXR5LCByZXNldEN1cnNvciA9IHRydWUpIHtcbiAgICAgICAgICAgIC8vIEdldCB0aGUgbXV0YWJsZSB0byBtb2RpZnlpbmdcbiAgICAgICAgICAgIGNvbnN0IGFuaW1hdG9yID0gdGhlQ29tcG9uZW50LmdldE11dGFibGVPck51bGwoZW50aXR5KTtcbiAgICAgICAgICAgIGlmICghYW5pbWF0b3IpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgLy8gUmVzZXQgYWxsIG90aGVyIGFuaW1hdGlvbnNcbiAgICAgICAgICAgIGZvciAoY29uc3Qgc3RhdGUgb2YgYW5pbWF0b3Iuc3RhdGVzKSB7XG4gICAgICAgICAgICAgICAgc3RhdGUucGxheWluZyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHN0YXRlLnNob3VsZFJlc2V0ID0gcmVzZXRDdXJzb3I7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgTWF0ZXJpYWwgfSBmcm9tICcuLi9nZW5lcmF0ZWQvaW5kZXguZ2VuJztcbmNvbnN0IFRleHR1cmVIZWxwZXIgPSB7XG4gICAgQ29tbW9uKHRleHR1cmUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHRleDoge1xuICAgICAgICAgICAgICAgICRjYXNlOiAndGV4dHVyZScsXG4gICAgICAgICAgICAgICAgdGV4dHVyZVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgQXZhdGFyKGF2YXRhclRleHR1cmUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHRleDoge1xuICAgICAgICAgICAgICAgICRjYXNlOiAnYXZhdGFyVGV4dHVyZScsXG4gICAgICAgICAgICAgICAgYXZhdGFyVGV4dHVyZVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgVmlkZW8odmlkZW9UZXh0dXJlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0ZXg6IHtcbiAgICAgICAgICAgICAgICAkY2FzZTogJ3ZpZGVvVGV4dHVyZScsXG4gICAgICAgICAgICAgICAgdmlkZW9UZXh0dXJlXG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfVxufTtcbmV4cG9ydCBmdW5jdGlvbiBkZWZpbmVNYXRlcmlhbENvbXBvbmVudChlbmdpbmUpIHtcbiAgICBjb25zdCB0aGVDb21wb25lbnQgPSBNYXRlcmlhbChlbmdpbmUpO1xuICAgIHJldHVybiB7XG4gICAgICAgIC4uLnRoZUNvbXBvbmVudCxcbiAgICAgICAgVGV4dHVyZTogVGV4dHVyZUhlbHBlcixcbiAgICAgICAgc2V0QmFzaWNNYXRlcmlhbChlbnRpdHksIG1hdGVyaWFsKSB7XG4gICAgICAgICAgICB0aGVDb21wb25lbnQuY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwge1xuICAgICAgICAgICAgICAgIG1hdGVyaWFsOiB7XG4gICAgICAgICAgICAgICAgICAgICRjYXNlOiAndW5saXQnLFxuICAgICAgICAgICAgICAgICAgICB1bmxpdDogbWF0ZXJpYWxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0UGJyTWF0ZXJpYWwoZW50aXR5LCBtYXRlcmlhbCkge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtYXRlcmlhbDoge1xuICAgICAgICAgICAgICAgICAgICAkY2FzZTogJ3BicicsXG4gICAgICAgICAgICAgICAgICAgIHBicjogbWF0ZXJpYWxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgTWVzaENvbGxpZGVyIH0gZnJvbSAnLi4vZ2VuZXJhdGVkL2luZGV4Lmdlbic7XG5leHBvcnQgZnVuY3Rpb24gZGVmaW5lTWVzaENvbGxpZGVyQ29tcG9uZW50KGVuZ2luZSkge1xuICAgIGNvbnN0IHRoZUNvbXBvbmVudCA9IE1lc2hDb2xsaWRlcihlbmdpbmUpO1xuICAgIGZ1bmN0aW9uIGdldENvbGxpc2lvbk1hc2sobGF5ZXJzKSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KGxheWVycykpIHtcbiAgICAgICAgICAgIHJldHVybiBsYXllcnMubWFwKChpdGVtKSA9PiBpdGVtKS5yZWR1Y2UoKHByZXYsIGl0ZW0pID0+IHByZXYgfCBpdGVtLCAwKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChsYXllcnMpIHtcbiAgICAgICAgICAgIHJldHVybiBsYXllcnM7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHtcbiAgICAgICAgLi4udGhlQ29tcG9uZW50LFxuICAgICAgICBzZXRCb3goZW50aXR5LCBjb2xsaWRlckxheWVycykge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtZXNoOiB7ICRjYXNlOiAnYm94JywgYm94OiB7fSB9LFxuICAgICAgICAgICAgICAgIGNvbGxpc2lvbk1hc2s6IGdldENvbGxpc2lvbk1hc2soY29sbGlkZXJMYXllcnMpXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0UGxhbmUoZW50aXR5LCBjb2xsaWRlckxheWVycykge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtZXNoOiB7ICRjYXNlOiAncGxhbmUnLCBwbGFuZToge30gfSxcbiAgICAgICAgICAgICAgICBjb2xsaXNpb25NYXNrOiBnZXRDb2xsaXNpb25NYXNrKGNvbGxpZGVyTGF5ZXJzKVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIHNldEN5bGluZGVyKGVudGl0eSwgcmFkaXVzQm90dG9tLCByYWRpdXNUb3AsIGNvbGxpZGVyTGF5ZXJzKSB7XG4gICAgICAgICAgICB0aGVDb21wb25lbnQuY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwge1xuICAgICAgICAgICAgICAgIG1lc2g6IHsgJGNhc2U6ICdjeWxpbmRlcicsIGN5bGluZGVyOiB7IHJhZGl1c0JvdHRvbSwgcmFkaXVzVG9wIH0gfSxcbiAgICAgICAgICAgICAgICBjb2xsaXNpb25NYXNrOiB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fCBbXSB9IH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICBzZXRDeWxpbmRlcihlbnRpdHksIHJhZGl1c0JvdHRvbSwgcmFkaXVzVG9wKSB7XG4gICAgICAgICAgICB0aGVDb21wb25lbnQuY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwge1xuICAgICAgICAgICAgICAgIG1lc2g6IHsgJGNhc2U6ICdjeWxpbmRlcicsIGN5bGluZGVyOiB7IHJhZGl1c0JvdHRvbSwgcmFkaXVzVG9wIH0gfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIHNldFNwaGVyZShlbnRpdHkpIHtcbiAgICAgICAgICAgIHRoZUNvbXBvbmVudC5jcmVhdGVPclJlcGxhY2UoZW50aXR5LCB7XG4gICAgICAgICAgICAgICAgbWVzaDogeyAkY2FzZTogJ3NwaGVyZScsIHNwaGVyZToge30gfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFR3ZWVuIH0gZnJvbSAnLi4vZ2VuZXJhdGVkL2luZGV4Lmdlbic7XG5jb25zdCBUd2VlbkhlbHBlciA9IHtcbiAgICBNb3ZlKG1vdmUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICRjYXNlOiAnbW92ZScsXG4gICAgICAgICAgICBtb3ZlXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBSb3RhdGUocm90YXRlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAkY2FzZTogJ3JvdGF0ZScsXG4gICAgICAgICAgICByb3RhdGVcbiAgICAgICAgfTtcbiAgICB9LFxuICAgIFNjYWxlKHNjYWxlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAkY2FzZTogJ3NjYWxlJyxcbiAgICAgICAgICAgIHNjYWxlXG4gICAgICAgIH07XG4gICAgfVxufTtcbmV4cG9ydCBmdW5jdGlvbiBkZWZpbmVUd2VlbkNvbXBvbmVudChlbmdpbmUpIHtcbiAgICBjb25zdCB0aGVDb21wb25lbnQgPSBUd2VlbihlbmdpbmUpO1xuICAgIHJldHVybiB7XG4gICAgICAgIC4uLnRoZUNvbXBvbmVudCxcbiAgICAgICAgTW9kZTogVHdlZW5IZWxwZXJcbiAgICB9O1xufVxuIiwgIi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBJQXJyYXkgPSAodHlwZSkgPT4ge1xuICAgIHJldHVybiB7XG4gICAgICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICAgICAgYnVpbGRlci53cml0ZVVpbnQzMih2YWx1ZS5sZW5ndGgpO1xuICAgICAgICAgICAgZm9yIChjb25zdCBpdGVtIG9mIHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgdHlwZS5zZXJpYWxpemUoaXRlbSwgYnVpbGRlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICAgICAgY29uc3QgbmV3QXJyYXkgPSBbXTtcbiAgICAgICAgICAgIGNvbnN0IGxlbmd0aCA9IHJlYWRlci5yZWFkVWludDMyKCk7XG4gICAgICAgICAgICBmb3IgKGxldCBpbmRleCA9IDA7IGluZGV4IDwgbGVuZ3RoOyBpbmRleCsrKSB7XG4gICAgICAgICAgICAgICAgbmV3QXJyYXkucHVzaCh0eXBlLmRlc2VyaWFsaXplKHJlYWRlcikpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG5ld0FycmF5O1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoKSB7XG4gICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgIH0sXG4gICAgICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgICAgIHR5cGU6ICdhcnJheScsXG4gICAgICAgICAgICBpdGVtczogdHlwZS5qc29uU2NoZW1hLFxuICAgICAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdhcnJheSdcbiAgICAgICAgfVxuICAgIH07XG59O1xuIiwgIi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBCb29sID0ge1xuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBidWlsZGVyLndyaXRlSW50OCh2YWx1ZSA/IDEgOiAwKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gcmVhZGVyLnJlYWRJbnQ4KCkgPT09IDE7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9LFxuICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgdHlwZTogJ2Jvb2xlYW4nLFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ2Jvb2xlYW4nXG4gICAgfVxufTtcbiIsICIvKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgSW50NjQgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVJbnQ2NChCaWdJbnQodmFsdWUpKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gTnVtYmVyKHJlYWRlci5yZWFkSW50NjQoKSk7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiAwO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnaW50ZWdlcicsXG4gICAgICAgIHNlcmlhbGl6YXRpb25UeXBlOiAnaW50NjQnXG4gICAgfVxufTtcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBJbnQzMiA9IHtcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgYnVpbGRlci53cml0ZUludDMyKHZhbHVlKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gcmVhZGVyLnJlYWRJbnQzMigpO1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4gMDtcbiAgICB9LFxuICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgdHlwZTogJ2ludGVnZXInLFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ2ludDMyJ1xuICAgIH1cbn07XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IGNvbnN0IEludDE2ID0ge1xuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBidWlsZGVyLndyaXRlSW50MTYodmFsdWUpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiByZWFkZXIucmVhZEludDE2KCk7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiAwO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnaW50ZWdlcicsXG4gICAgICAgIHNlcmlhbGl6YXRpb25UeXBlOiAnaW50MTYnXG4gICAgfVxufTtcbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgY29uc3QgSW50OCA9IHtcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgYnVpbGRlci53cml0ZUludDgodmFsdWUpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiByZWFkZXIucmVhZEludDgoKTtcbiAgICB9LFxuICAgIGNyZWF0ZSgpIHtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdpbnRlZ2VyJyxcbiAg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cm4gMC4wO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnbnVtYmVyJyxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdmbG9hdDY0J1xuICAgIH1cbn07XG4iLCAiLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IENvbG9yM1NjaGVtYSA9IHtcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUucik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLmcpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS5iKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcjogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICBnOiByZWFkZXIucmVhZEZsb2F0MzIoKSxcbiAgICAgICAgICAgIGI6IHJlYWRlci5yZWFkRmxvYXQzMigpXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiB7IHI6IDAsIGc6IDAsIGI6IDAgfTtcbiAgICB9LFxuICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgdHlwZTogJ29iamVjdCcsXG4gICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgIHI6IHsgdHlwZTogJ251bWJlcicgfSxcbiAgICAgICAgICAgIGc6IHsgdHlwZTogJ251bWJlcicgfSxcbiAgICAgICAgICAgIGI6IHsgdHlwZTogJ251bWJlcicgfVxuICAgICAgICB9LFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ2NvbG9yMydcbiAgICB9XG59O1xuIiwgIi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBDb2xvcjRTY2hlbWEgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLnIpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS5nKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUuYik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLmEpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICByOiByZWFkZXIucmVhZEZsb2F0MzIoKSxcbiAgICAgICAgICAgIGc6IHJlYWRlci5yZWFkRmxvYXQzMigpLFxuICAgICAgICAgICAgYjogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICBhOiByZWFkZXIucmVhZEZsb2F0MzIoKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4geyByOiAwLCBnOiAwLCBiOiAwLCBhOiAwIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICByOiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICBnOiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICBiOiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICBhOiB7IHR5cGU6ICdudW1iZXInIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdjb2xvcjQnXG4gICAgfVxufTtcbiIsICIvKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgRW50aXR5U2NoZW1hID0ge1xuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBidWlsZGVyLndyaXRlSW50MzIodmFsdWUpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiByZWFkZXIucmVhZEludDMyKCk7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiAwO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnaW50ZWdlcicsXG4gICAgICAgIHNlcmlhbGl6YXRpb25UeXBlOiAnZW50aXR5J1xuICAgIH1cbn07XG4iLCAiLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFF1YXRlcm5pb25TY2hlbWEgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLngpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS55KTtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUueik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLncpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB4OiByZWFkZXIucmVhZEZsb2F0MzIoKSxcbiAgICAgICAgICAgIHk6IHJlYWRlci5yZWFkRmxvYXQzMigpLFxuICAgICAgICAgICAgejogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICB3OiByZWFkZXIucmVhZEZsb2F0MzIoKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4geyB4OiAwLCB5OiAwLCB6OiAwLCB3OiAwIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICB4OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB6OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB3OiB7IHR5cGU6ICdudW1iZXInIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdxdWF0ZXJuaW9uJ1xuICAgIH1cbn07XG4iLCAiLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFZlY3RvcjNTY2hlbWEgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLngpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS55KTtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUueik7XG4gICAgfSxcbiAgICBkZXNlcmlhbGl6ZShyZWFkZXIpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHg6IHJlYWRlci5yZWFkRmxvYXQzMigpLFxuICAgICAgICAgICAgeTogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICB6OiByZWFkZXIucmVhZEZsb2F0MzIoKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4geyB4OiAwLCB5OiAwLCB6OiAwIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICB4OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB6OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB3OiB7IHR5cGU6ICdudW1iZXInIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICd2ZWN0b3IzJ1xuICAgIH1cbn07XG4iLCAiLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IElNYXAgPSAoc3BlYywgZGVmYXVsdFZhbHVlKSA9PiB7XG4gICAgY29uc3Qgc3BlY1JlZmxlY3Rpb24gPSBPYmplY3Qua2V5cyhzcGVjKS5yZWR1Y2UoKHNwZWNSZWZsZWN0aW9uLCBjdXJyZW50S2V5KSA9PiB7XG4gICAgICAgIHNwZWNSZWZsZWN0aW9uW2N1cnJlbnRLZXldID0gc3BlY1tjdXJyZW50S2V5XS5qc29uU2NoZW1hO1xuICAgICAgICByZXR1cm4gc3BlY1JlZmxlY3Rpb247XG4gICAgfSwge30pO1xuICAgIHJldHVybiB7XG4gICAgICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gc3BlYykge1xuICAgICAgICAgICAgICAgIHNwZWNba2V5XS5zZXJpYWxpemUodmFsdWVba2V5XSwgYnVpbGRlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICAgICAgY29uc3QgbmV3VmFsdWUgPSB7fTtcbiAgICAgICAgICAgIGZvciAoY29uc3Qga2V5IGluIHNwZWMpIHtcbiAgICAgICAgICAgICAgICA7XG4gICAgICAgICAgICAgICAgbmV3VmFsdWVba2V5XSA9IHNwZWNba2V5XS5kZXNlcmlhbGl6ZShyZWFkZXIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG5ld1ZhbHVlO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoKSB7XG4gICAgICAgICAgICBjb25zdCBuZXdWYWx1ZSA9IHt9O1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gc3BlYykge1xuICAgICAgICAgICAgICAgIDtcbiAgICAgICAgICAgICAgICBuZXdWYWx1ZVtrZXldID0gc3BlY1trZXldLmNyZWF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHsgLi4ubmV3VmFsdWUsIC4uLmRlZmF1bHRWYWx1ZSB9O1xuICAgICAgICB9LFxuICAgICAgICBleHRlbmQ6IChiYXNlKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBuZXdWYWx1ZSA9IHt9O1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gc3BlYykge1xuICAgICAgICAgICAgICAgIDtcbiAgICAgICAgICAgICAgICBuZXdWYWx1ZVtrZXldID0gc3BlY1trZXldLmNyZWF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHsgLi4ubmV3VmFsdWUsIC4uLmRlZmF1bHRWYWx1ZSwgLi4uYmFzZSB9O1xuICAgICAgICB9LFxuICAgICAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgICAgICB0eXBlOiAnb2JqZWN0JyxcbiAgICAgICAgICAgIHByb3BlcnRpZXM6IHNwZWNSZWZsZWN0aW9uLFxuICAgICAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdtYXAnXG4gICAgICAgIH1cbiAgICB9O1xufTtcbiIsICIvKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgSU9wdGlvbmFsID0gKHNwZWMpID0+IHtcbiAgICByZXR1cm4ge1xuICAgICAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgICAgIGlmICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgIGJ1aWxkZXIud3JpdGVJbnQ4KDEpO1xuICAgICAgICAgICAgICAgIHNwZWMuc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGJ1aWxkZXIud3JpdGVJbnQ4KDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBkZXNlcmlhbGl6ZShyZWFkZXIpIHtcbiAgICAgICAgICAgIGNvbnN0IGV4aXN0cyA9IHJlYWRlci5yZWFkSW50OCgpO1xuICAgICAgICAgICAgaWYgKGV4aXN0cykge1xuICAgICAgICAgICAgICAgIHJldHVybiBzcGVjLmRlc2VyaWFsaXplKHJlYWRlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGNyZWF0ZSgpIHtcbiAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgIH0sXG4gICAgICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgICAgIHR5cGU6IHNwZWMuanNvblNjaGVtYS50eXBlLFxuICAgICAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdvcHRpb25hbCcsXG4gICAgICAgICAgICBvcHRpb25hbEpzb25TY2hlbWE6IHNwZWMuanNvblNjaGVtYVxuICAgICAgICB9XG4gICAgfTtcbn07XG4iLCAiZXhwb3J0IGNvbnN0IElPbmVPZiA9IChzcGVjcykgPT4ge1xuICAgIGNvbnN0IHNwZWNLZXlzID0gT2JqZWN0LmtleXMoc3BlY3MpO1xuICAgIGNvbnN0IGtleVRvSW5kZXggPSBzcGVjS2V5cy5yZWR1Y2UoKGRpY3QsIGtleSwgaW5kZXgpID0+IHtcbiAgICAgICAgZGljdFtrZXldID0gaW5kZXg7XG4gICAgICAgIHJldHVybiBkaWN0O1xuICAgIH0sIHt9KTtcbiAgICBjb25zdCBzcGVjUmVmbGVjdGlvbiA9IHNwZWNLZXlzLnJlZHVjZSgoc3BlY1JlZmxlY3Rpb24sIGN1cnJlbnRLZXkpID0+IHtcbiAgICAgICAgc3BlY1JlZmxlY3Rpb25bY3VycmVudEtleV0gPSBzcGVjc1tjdXJyZW50S2V5XS5qc29uU2NoZW1hO1xuICAgICAgICByZXR1cm4gc3BlY1JlZmxlY3Rpb247XG4gICAgfSwge30pO1xuICAgIHJldHVybiB7XG4gICAgICAgIHNlcmlhbGl6ZSh7ICRjYXNlLCB2YWx1ZSB9LCBidWlsZGVyKSB7XG4gICAgICAgICAgICBjb25zdCBfdmFsdWUgPSBrZXlUb0luZGV4WyRjYXNlLnRvU3RyaW5nKCldICsgMTtcbiAgICAgICAgICAgIGJ1aWxkZXIud3JpdGVVaW50OChfdmFsdWUpO1xuICAgICAgICAgICAgc3BlY3NbJGNhc2VdLnNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcik7XG4gICAgICAgIH0sXG4gICAgICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICAgICAgY29uc3QgJGNhc2UgPSBzcGVjS2V5c1tyZWFkZXIucmVhZEludDgoKSAtIDFdO1xuICAgICAgICAgICAgY29uc3QgdmFsdWUgPSBzcGVjc1skY2FzZV0uZGVzZXJpYWxpemUocmVhZGVyKTtcbiAgICAgICAgICAgIHJldHVybiB7ICRjYXNlLCB2YWx1ZSB9O1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgIH0sXG4gICAgICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgcHJvcGVydGllczogc3BlY1JlZmxlY3Rpb24sXG4gICAgICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ29uZS1vZidcbiAgICAgICAgfVxuICAgIH07XG59O1xuIiwgImV4cG9ydCBjb25zdCBpc1NjaGVtYVR5cGUgPSAodmFsdWUsIHR5cGVzKSA9PiB0eXBlcy5pbmNsdWRlcyh2YWx1ZS5zZXJpYWxpemF0aW9uVHlwZSk7XG5leHBvcnQgY29uc3QgaXNPbmVPZkpzb25TY2hlbWEgPSAodHlwZSkgPT4gaXN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oSXRlbXNKc29uU2NoZW1hID0ganNvblNjaGVtYTtcbiAgICAgICAgcmV0dXJuIElBcnJheShqc29uU2NoZW1hVG9TY2hlbWEod2l0aEl0ZW1zSnNvblNjaGVtYS5pdGVtcykpO1xuICAgIH1cbiAgICBpZiAoanNvblNjaGVtYS5zZXJpYWxpemF0aW9uVHlwZSA9PT0gJ2VudW0taW50Jykge1xuICAgICAgICBjb25zdCBlbnVtSnNvblNjaGVtYSA9IGpzb25TY2hlbWE7XG4gICAgICAgIHJldHVybiBJbnRFbnVtKGVudW1Kc29uU2NoZW1hLmVudW1PYmplY3QsIGVudW1Kc29uU2NoZW1hLmRlZmF1bHQpO1xuICAgIH1cbiAgICBpZiAoanNvblNjaGVtYS5zZXJpYWxpemF0aW9uVHlwZSA9PT0gJ2VudW0tc3RyaW5nJykge1xuICAgICAgICBjb25zdCBlbnVtSnNvblNjaGVtYSA9IGpzb25TY2hlbWE7XG4gICAgICAgIHJldHVybiBTdHJpbmdFbnVtKGVudW1Kc29uU2NoZW1hLmVudW1PYmplY3QsIGVudW1Kc29uU2NoZW1hLmRlZmF1bHQpO1xuICAgIH1cbiAgICBpZiAoanNvblNjaGVtYS5zZXJpYWxpemF0aW9uVHlwZSA9PT0gJ29uZS1vZicpIHtcbiAgICAgICAgY29uc3Qgb25lT2ZKc29uU2NoZW1hID0ganNvblNjaGVtYTtcbiAgICAgICAgY29uc3Qgc3BlYyA9IHt9O1xuICAgICAgICBmb3IgKGNvbnN0IGtleSBpbiBvbmVPZkpzb25TY2hlbWEucHJvcGVydGllcykge1xuICAgICAgICAgICAgc3BlY1trZXldID0ganNvblNjaGVtYVRvU2NoZW1hKG9uZU9mSnNvblNjaGVtYS5wcm9wZXJ0aWVzW2tleV0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBJT25lT2Yoc3BlYyk7XG4gICAgfVxuICAgIHRocm93IG5ldyBFcnJvcihgJHtqc29uU2NoZW1hLnNlcmlhbGl6YXRpb25UeXBlfSBpcyBub3Qgc3VwcG9ydGVkIGFzIHJldmVyc2Ugc2NoZW1hIGdlbmVyYXRpb24uYCk7XG59XG5leHBvcnQgZnVuY3Rpb24gbXV0YXRlVmFsdWVzKGpzb25TY2hlbWEsIHZhbHVlLCBtdXRhdGVGbikge1xuICAgIGlmIChqc29uU2NoZW1hLnNlcmlhbGl6YXRpb25UeXBlID09PSAnbWFwJykge1xuICAgICAgICBjb25zdCB7IHByb3BlcnRpZXMgfSA9IGpzb25TY2hlbWE7XG4gICAgICAgIGNvbnN0IHR5cGVkVmFsdWUgPSB2YWx1ZTtcbiAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gcHJvcGVydGllcykge1xuICAgICAgICAgICAgY29uc3QgeyB0eXBlLCB2YWx1ZTogbWFwVmFsdWUgfSA9IGdldFR5cGVBbmRWYWx1ZShwcm9wZXJ0aWVzLCB0eXBlZFZhbHVlLCBrZXkpO1xuICAgICAgICAgICAgaWYgKHR5cGUuc2VyaWFsaXphdGlvblR5cGUgPT09ICd1bmtub3duJylcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGlmIChpc0NvbXBvdW5kVHlwZSh0eXBlKSkge1xuICAgICAgICAgICAgICAgIG11dGF0ZVZhbHVlcyh0eXBlLCBtYXBWYWx1ZSwgbXV0YXRlRm4pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgY29uc3QgbmV3VmFsdWUgPSBtdXRhdGVGbihtYXBWYWx1ZSwgdHlwZSk7XG4gICAgICAgICAgICAgICAgaWYgKG5ld1ZhbHVlLmNoYW5nZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZWRWYWx1ZVtrZXldID0gbmV3VmFsdWUudmFsdWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIGVsc2UgaWYgKGpzb25TY2hlbWEuc2VyaWFsaXphdGlvblR5cGUgPT09IC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nQzMihwdHIgKyA0MCwgdmFsdWUucGFyZW50IHx8IDApO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIGNvbnN0IHB0ciA9IHJlYWRlci5pbmNyZW1lbnRSZWFkT2Zmc2V0KFRSQU5TRk9STV9MRU5HVEgpO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgICB4OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIpLFxuICAgICAgICAgICAgICAgIHk6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDQpLFxuICAgICAgICAgICAgICAgIHo6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDgpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcm90YXRpb246IHtcbiAgICAgICAgICAgICAgICB4OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIgKyAxMiksXG4gICAgICAgICAgICAgICAgeTogcmVhZGVyLmdldEZsb2F0MzIocHRyICsgMTYpLFxuICAgICAgICAgICAgICAgIHo6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDIwKSxcbiAgICAgICAgICAgICAgICB3OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIgKyAyNClcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzY2FsZToge1xuICAgICAgICAgICAgICAgIHg6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDI4KSxcbiAgICAgICAgICAgICAgICB5OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIgKyAzMiksXG4gICAgICAgICAgICAgICAgejogcmVhZGVyLmdldEZsb2F0MzIocHRyICsgMzYpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcGFyZW50OiByZWFkZXIuZ2V0VWludDMyKHB0ciArIDQwKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcG9zaXRpb246IHsgeDogMCwgeTogMCwgejogMCB9LFxuICAgICAgICAgICAgc2NhbGU6IHsgeDogMSwgeTogMSwgejogMSB9LFxuICAgICAgICAgICAgcm90YXRpb246IHsgeDogMCwgeTogMCwgejogMCwgdzogMSB9LFxuICAgICAgICAgICAgcGFyZW50OiAwXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBleHRlbmQodmFsdWUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHBvc2l0aW9uOiB7IHg6IDAsIHk6IDAsIHo6IDAgfSxcbiAgICAgICAgICAgIHNjYWxlOiB7IHg6IDEsIHk6IDEsIHo6IDEgfSxcbiAgICAgICAgICAgIHJvdGF0aW9uOiB7IHg6IDAsIHk6IDAsIHo6IDAsIHc6IDEgfSxcbiAgICAgICAgICAgIHBhcmVudDogMCxcbiAgICAgICAgICAgIC4uLnZhbHVlXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgICAgICAgeDogeyB0eXBlOiAnbnVtYmVyJyB9LFxuICAgICAgICAgICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICAgICAgICAgIHo6IHsgdHlwZTogJ251bWJlcicgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzY2FsZToge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgICAgICAgeDogeyB0eXBlOiAnbnVtYmVyJyB9LFxuICAgICAgICAgICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICAgICAgICAgIHo6IHsgdHlwZTogJ251bWJlcicgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICByb3RhdGlvbjoge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgICAgICAgeDogeyB0eXBlOiAnbnVtYmVyJyB9LFxuICAgICAgICAgICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICAgICAgICAgIHo6IHsgdHlwZTogJ251bWJlcicgfSxcbiAgICAgICAgICAgICAgICAgICAgdzogeyB0eXBlOiAnbnVtYmVyJyB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHBhcmVudDogeyB0eXBlOiAnaW50ZWdlcicgfVxuICAgICAgICB9LFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ3RyYW5zZm9ybSdcbiAgICB9XG59O1xuZXhwb3J0IGZ1bmN0aW9uIGRlZmluZVRyYW5zZm9ybUNvbXBvbmVudChlbmdpbmUpIHtcbiAgICBjb25zdCB0cmFuc2Zvcm1EZWYgPSBlbmdpbmUuZGVmaW5lQ29tcG9uZW50RnJvbVNjaGVtYSgnY29yZTo6VHJhbnNmb3JtJywgVHJhbnNmb3JtU2NoZW1hKTtcbiAgICByZXR1cm4ge1xuICAgICAgICAuLi50cmFuc2Zvcm1EZWYsXG4gICAgICAgIGNyZWF0ZShlbnRpdHksIHZhbCkge1xuICAgICAgICAgICAgcmV0dXJuIHRyYW5zZm9ybURlZi5jcmVhdGUoZW50aXR5LCBUcmFuc2Zvcm1TY2hlbWEuZXh0ZW5kKHZhbCkpO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGVPclJlcGxhY2UoZW50aXR5LCB2YWwpIHtcbiAgICAgIC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YmxlKHQsIGVycm9yKSB7XG4gICAgaWYgKF9fREVWX18pIHtcbiAgICAgICAgaWYgKHQgJiYgdHlwZW9mIHQgPT09ICdvYmplY3QnICYmIHR5cGVvZiB0LnRoZW4gPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihlcnJvcik7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHQ7XG59XG4iLCAiLyoqXG4gKlxuICogQHJldHVybnMgYSBuZXcgR1NldFxuICovXG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlVmVyc2lvbkdTZXQoKSB7XG4gICAgY29uc3QgbGFzdFZlcnNpb24gPSBuZXcgTWFwKCk7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgLyoqXG4gICAgICAgICAqXG4gICAgICAgICAqIEBwYXJhbSBudW1iZXJcbiAgICAgICAgICogQHBhcmFtIHZlcnNpb25cbiAgICAgICAgICogQHJldHVybnNcbiAgICAgICAgICovXG4gICAgICAgIGFkZFRvKG51bWJlciwgdmVyc2lvbikge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgICAgIGlmICh2ZXJzaW9uIDwgMCkge1xuICAgICAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgY3VycmVudFZhbHVlID0gbGFzdFZlcnNpb24uZ2V0KG51bWJlcik7XG4gICAgICAgICAgICAvLyBJZiB0aGUgdmVyc2lvbiBpcyA+PSwgaXQgbWVhbnMgdGhlIHZhbHVlIGl0J3MgYWxyZWFkeSBpbiB0aGUgc2V0XG4gICAgICAgICAgICBpZiAoY3VycmVudFZhbHVlICE9PSB1bmRlZmluZWQgJiYgY3VycmVudFZhbHVlID49IHZlcnNpb24pIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxhc3RWZXJzaW9uLnNldChudW1iZXIsIHZlcnNpb24pO1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH0sXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBAcmV0dXJucyB0aGUgc2V0IHdpdGggW251bWJlciwgdmVyc2lvbl0gb2YgZWFjaCB2YWx1ZVxuICAgICAgICAgKi9cbiAgICAgICAgaGFzKG4sIHYpIHtcbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRWYWx1ZSA9IGxhc3RWZXJzaW9uLmdldChuKTtcbiAgICAgICAgICAgIC8vIElmIHRoZSB2ZXJzaW9uIGlzID49LCBpdCBtZWFucyB0aGUgdmFsdWUgaXQncyBhbHJlYWR5IGluIHRoZSBzZXRcbiAgICAgICAgICAgIGlmIChjdXJyZW50VmFsdWUgIT09IHVuZGVmaW5lZCAmJiBjdXJyZW50VmFsdWUgPj0gdikge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9LFxuICAgICAgICAvKipcbiAgICAgICAgICogV2FybmluZzogdGhpcyBmdW5jdGlvbiByZXR1cm5zIHRoZSByZWZlcmVuY2UgdG8gdGhlIGludGVybmFsIG1hcCxcbiAgICAgICAgICogIGlmIHlvdSBuZWVkIHRvIG11dGF0ZSBzb21lIHZhbHVlLCBtYWtlIGEgY29weS5cbiAgICAgICAgICogRm9yIG9wdGltaXphdGlvbiBwdXJwb3NlIHRoZSBjb3B5IGlzbid0IG1hZGUgaGVyZS5cbiAgICAgICAgICpcbiAgICAgICAgICogQHJldHVybnMgdGhlIG1hcCBvZiBudW1iZXIgdG8gdmVyc2lvblxuICAgICAgICAgKi9cbiAgICAgICAgZ2V0TWFwKCkge1xuICAgICAgICAgICAgcmV0dXJuIGxhc3RWZXJzaW9uO1xuICAgICAgICB9X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gID8gcmVtb3ZlZEVudGl0aWVzLmdldE1hcCgpLmdldChlbnRpdHlOdW1iZXIpICsgMVxuICAgICAgICAgICAgOiAwO1xuICAgICAgICBjb25zdCBlbnRpdHkgPSBFbnRpdHlVdGlscy50b0VudGl0eUlkKGVudGl0eU51bWJlciwgZW50aXR5VmVyc2lvbik7XG4gICAgICAgIGlmICh1c2VkRW50aXRpZXMuaGFzKGVudGl0eSkpIHtcbiAgICAgICAgICAgIHJldHVybiBnZW5lcmF0ZU5ld0VudGl0eSgpO1xuICAgICAgICB9XG4gICAgICAgIHVzZWRFbnRpdGllcy5hZGQoZW50aXR5KTtcbiAgICAgICAgcmV0dXJuIGVudGl0eTtcbiAgICB9XG4gICAgZnVuY3Rpb24gZ2VuZXJhdGVFbnRpdHkobmV0d29ya2VkKSB7XG4gICAgICAgIGlmIChuZXR3b3JrZWQgJiYgIW5ldHdvcmtlZEVudGl0aWVzUmFuZ2UpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignTmV0d29yayBlbnRpdGllcyByYW5nZWQgbm90IGluaXRpYWxpemVkLiBDb25uZWN0IHRvIGEgQ1JEVCBTZXJ2ZXInKTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCB1c2VkTmV0d29ya1NpemUgPSAobmV0d29ya2VkRW50aXRpZXNSYW5nZSAmJlxuICAgICAgICAgICAgWy4uLnVzZWRFbnRpdGllcy52YWx1ZXMoKV0uZmlsdGVyKCgkKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgW2VudGl0eUlkXSA9IEVudGl0eVV0aWxzLmZyb21FbnRpdHlJZCgkKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gZW50aXR5SWQgPj0gbmV0d29ya2VkRW50aXRpZXNSYW5nZVswXSAmJiBlbnRpdHlJZCA8PSBuZXR3b3JrZWRFbnRpdGllc1JhbmdlWzFdO1xuICAgICAgICAgICAgfSkubGVuZ3RoKSA/P1xuICAgICAgICAgICAgMDtcbiAgICAgICAgY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kICYmIG51bWJlciA+PSBsb2NhbEVudGl0aWVzQXZhaWxhYmxlKVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjb25zdCBlbnRpdHkgPSBFbnRpdHlVdGlscy50b0VudGl0eUlkKG51bWJlciwgdmVyc2lvbiArIDEpO1xuICAgICAgICAgICAgICAgIC8vIElmIHRoZSBlbnRpdHkgaXMgbm90IGJlaW5nIHVzZWQsIHdlIGNhbiByZS11c2UgaXRcbiAgICAgICAgICAgICAgICAvLyBJZiB0aGUgZW50aXR5IHdhcyByZW1vdmVkIGluIHRoaXMgdGljaywgd2UncmUgbm90IGNvdW50aW5nIGZvciB0aGUgdXNlZEVudGl0aWVzLCBidXQgd2UgaGF2ZSBpdCBpbiB0aGUgdG9SZW1vdmVFbnRpdHlBcnJheVxuICAgICAgICAgICAgICAgIGlmICghdXNlZEVudGl0aWVzLmhhcyhlbnRpdHkpICYmICF0b1JlbW92ZUVudGl0aWVzLmluY2x1ZGVzKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdXNlZEVudGl0aWVzLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZW50aXR5O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZ2VuZXJhdGVOZXdFbnRpdHkobmV0d29ya2VkKTtcbiAgICB9XG4gICAgZnVuY3Rpb24gcmVtb3ZlRW50aXR5KGVudGl0eSkge1xuICAgICAgICBpZiAoZW50aXR5IDwgUkVTRVJWRURfU1RBVElDX0VOVElUSUVTKVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICBpZiAodXNlZEVudGl0aWVzLmhhcyhlbnRpdHkpKSB7XG4gICAgICAgICAgICB1c2VkRW50aXRpZXMuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgICAgICB0b1JlbW92ZUVudGl0aWVzLnB1c2goZW50aXR5KTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHVwZGF0ZVJlbW92ZWRFbnRpdHkoZW50aXR5KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG4gICAgZnVuY3Rpb24gcmVsZWFzZVJlbW92ZWRFbnRpdGllcygpIHtcbiAgICAgICAgY29uc3QgYXJyID0gdG9SZW1vdmVFbnRpdGllcztcbiAgICAgICAgaWYgKGFyci5sZW5ndGgpIHtcbiAgICAgICAgICAgIHRvUmVtb3ZlRW50aXRpZXMgPSBbXTtcbiAgICAgICAgICAgIGZvciAoY29uc3QgZW50aXR5IG9mIGFycikge1xuICAgICAgICAgICAgICAgIGNvbnN0IFtuLCB2XSA9IEVudGl0eVV0aWxzLmZyb21FbnRpdHlJZChlbnRpdHkpO1xuICAgICAgICAgICAgICAgIHJlbW92ZWRFbnRpdGllcy5hZGRUbyhuLCB2KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gYXJyO1xuICAgIH1cbiAgICBmdW5jdGlvbiB1cGRhdGVSZW1vdmVkRW50aXR5KGVudGl0eSkge1xuICAgICAgICBjb25zdCBbbiwgdl0gPSBFbnRpdHlVdGlscy5mcm9tRW50aXR5SWQoZW50aXR5KTtcbiAgICAgICAgLy8gVXBkYXRlIHRoZSByZW1vdmVkIGVudGl0aWVzIG1hcFxuICAgICAgICByZW1vdmVkRW50aXRpZXMuYWRkVG8obiwgdik7XG4gICAgICAgIC8vIFJlbW92ZSB0aGUgdXNlZEVudGl0aWVzIGlmIGV4aXN0XG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDw9IHY7IGkrKykge1xuICAgICAgICAgICAgdXNlZEVudGl0aWVzLmRlbGV0ZShFbnRpdHlVdGlscy50b0VudGl0eUlkKG4sIGkpKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG4gICAgZnVuY3R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ZGVyLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfQ09NUE9ORU5UKSB7XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSBEZWxldGVDb21wb25lbnQucmVhZChidWZmZXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChoZWFkZXIudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9DT01QT05FTlRfTkVUV09SSykge1xuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlID0gRGVsZXRlQ29tcG9uZW50TmV0d29yay5yZWFkKGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhlYWRlci50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVCkge1xuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlID0gUHV0Q29tcG9uZW50T3BlcmF0aW9uLnJlYWQoYnVmZmVyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoaGVhZGVyLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5UX05FVFdPUkspIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IFB1dE5ldHdvcmtDb21wb25lbnRPcGVyYXRpb24ucmVhZChidWZmZXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChoZWFkZXIudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9FTlRJVFkpIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IERlbGV0ZUVudGl0eS5yZWFkKGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhlYWRlci50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuREVMRVRFX0VOVElUWV9ORVRXT1JLKSB7XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSBEZWxldGVFbnRpdHlOZXR3b3JrLnJlYWQoYnVmZmVyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoaGVhZGVyLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5BUFBFTkRfVkFMVUUpIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IEFwcGVuZFZhbHVlT3BlcmF0aW9uLnJlYWQoYnVmZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gVW5rbm93biBtZXNzYWdlLCB3ZSBza2lwIGl0XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBjb25zdW1lIHRoZSBtZXNzYWdlXG4gICAgICAgICAgICAgICAgICAgIGJ1ZmZlci5pbmNyZW1lbnRSZWFkT2Zmc2V0KGhlYWRlci5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAobWVzc2FnZSkge1xuICAgICAgICAgICAgICAgICAgICByZWNlaXZlZE1lc3NhZ2VzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgLi4ubWVzc2FnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zcG9ydElkLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZUJ1ZmZlcjogYnVmZmVyLmJ1ZmZlcigpLnN1YmFycmF5KG9mZnNldCwgYnVmZmVyLmN1cnJlbnRSZWFkT2Zmc2V0KCkpXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICB9XG4gICAgLyoqXG4gICAgICogUmV0dXJuIGFuZCBjbGVhciB0aGUgbWVzc2FlcyBxdWV1ZVxuICAgICAqIEByZXR1cm5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ICAgIH1cbiAgICAgICAgICAgIGlmIChtc2cudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9FTlRJVFkgfHwgbXNnLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfRU5USVRZX05FVFdPUkspIHtcbiAgICAgICAgICAgICAgICBlbnRpdGllc1Nob3VsZEJlQ2xlYW5lZC5wdXNoKGVudGl0eUlkKTtcbiAgICAgICAgICAgICAgICBicm9hZGNhc3RNZXNzYWdlcy5wdXNoKG1zZyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBjb25zdCBlbnRpdHlTdGF0ZSA9IGVuZ2luZS5lbnRpdHlDb250YWluZXIuZ2V0RW50aXR5U3RhdGUoZW50aXR5SWQpO1xuICAgICAgICAgICAgICAgIC8vIFNraXAgdXBkYXRlcyBmcm9tIHJlbW92ZWQgZW50aXR5ZXNcbiAgICAgICAgICAgICAgICBpZiAoZW50aXR5U3RhdGUgPT09IEVudGl0eVN0YXRlLlJlbW92ZWQpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIC8vIEVudGl0aWVzIHdpdGggdW5rbm93biBlbnRpdGllcyBzaG91bGQgdXBkYXRlIGl0cyBlbnRpdHkgc3RhdGVcbiAgICAgICAgICAgICAgICBpZiAoZW50aXR5U3RhdGUgPT09IEVudGl0eVN0YXRlLlVua25vd24pIHtcbiAgICAgICAgICAgICAgICAgICAgZW5naW5lLmVudGl0eUNvbnRhaW5lci51cGRhdGVVc2VkRW50aXR5KGVudGl0eUlkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZW5naW5lLmdldENvbXBvbmVudE9yTnVsbChtc2cuY29tcG9uZW50SWQpO1xuICAgICAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBlbHNlICovXG4gICAgICAgICAgICAgICAgaWYgKGNvbXBvbmVudCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAobXNnLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5UICYmXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQuY29tcG9uZW50SWQgPT09IFRyYW5zZm9ybS5jb21wb25lbnRJZCAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgTmV0d29ya0VudGl0eS5oYXMoZW50aXR5SWQpICYmXG4gICAgICAgICAgICAgICAgICAgICAgICBOZXR3b3JrUGFyZW50LmhhcyhlbnRpdHlJZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1zZy5kYXRhID0gbmV0d29ya1V0aWxzLmZpeFRyYW5zZm9ybVBhcmVudChtc2cpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IFtjb25mbGljdE1lc3NhZ2UsIHZhbHVlXSA9IGNvbXBvbmVudC51cGRhdGVGcm9tQ3JkdCh7IC4uLm1zZywgZW50aXR5SWQgfSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghY29uZmxpY3RNZXNzYWdlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBBZGQgbWVzc2FnZSB0byB0cmFuc3BvcnQgcXVldWUgdG8gYmUgcHJvY2Vzc2VkIGJ5IG90aGVycyB0cmFuc3BvcnRzXG4gICAgICAgICAgICAgICAgICAgICAgICBicm9hZGNhc3RNZXNzYWdlcy5wdXNoKG1zZyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBvblByb2Nlc3NFbnRpdHlDb21wb25lbnRDaGFuZ2UgJiYgb25Qcm9jZXNzRW50aXR5Q29tcG9uZW50Q2hhbmdlKG1zZy5lbnRpdHlJZCwgbXNnLnR5cGUsIGNvbXBvbmVudCwgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2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fVxuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChtZXNzYWdlLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfQ09NUE9ORU5UKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBEZWxldGVDb21wb25lbnQud3JpdGUobWVzc2FnZS5lbnRpdHlJZCwgY29tcG9uZW50LmNvbXBvbmVudElkLCBtZXNzYWdlLnRpbWVzdGFtcCwgYnVmZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChtZXNzYWdlLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5BUFBFTkRfVkFMVUUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIEFwcGVuZFZhbHVlT3BlcmF0aW9uLndyaXRlKG1lc3NhZ2UuZW50aXR5SWQsIG1lc3NhZ2UudGltZXN0YW1wLCBtZXNzYWdlLmNvbXBvbmVudElkLCBtZXNzYWdlLmRhdGEsIGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY3JkdE1lc3NhZ2VzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgLi4ubWVzc2FnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2VCdWZmZXI6IGJ1ZmZlci5idWZmZXIoKS5zdWJhcnJheShvZmZzZXQsIGJ1ZmZlci5jdXJyZW50V3JpdGVPZmZzZXQoKSlcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChvblByb2Nlc3NFbnRpdHlDb21wb25lbnRDaGFuZ2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHJhd1ZhbHVlID0gbWVzc2FnZS50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVCB8fCBtZXNzYWdlLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5BUFBFTkRfVkFMVUVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGNvbXBvbmVudC5nZXQobWVzc2FnZS5lbnRpdHlJZClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uUHJvY2Vzc0VudGl0eUNvbXBvbmVudENoYW5nZShtZXNzYWdlLmVudGl0eUlkLCBtZXNzYWdlLnR5cGUsIGNvbXBvbmVudCwgcmF3VmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8vIEFmdGVyIGFsbCB1cGRhdGVzLCBJIGV4ZWN1dGUgdGhlIERlbGV0ZWRFbnRpdHkgbWVzc2FnZXNcbiAgICAgICAgZm9yIChjb25zdCBlbnRpdHlJZCBvZiBlbnRpdGllc0RlbGV0ZWRUaGlzVGljaykge1xuICAgICAgICAgICAgY29uc3Qgb2Zmc2V0ID0gYnVmZmVyLmN1cnJlbnRXcml0ZU9mZnNldCgpO1xuICAgICAgICAgICAgRGVsZXRlRW50aXR5LndyaXRlKGVudGl0eUlkLCBidWZmZXIpO1xuICAgICAgICAgICAgY3JkdE1lc3NhZ2VzLnB1c2goe1xuICAgICAgICAgICAgICAgIHR5cGU6IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfRU5USVRZLFxuICAgICAgICAgICAgICAgIGVudGl0eUlkLFxuICAgICAgICAgICAgICAgIG1lc3NhZ2VCdWZmZXI6IGJ1ZmZlci5idWZmZXIoKS5zdWJhcnJheShvZmZzZXQsIGJ1ZmZlci5jdXJyZW50V3JpdGVPZmZzZXQoKSlcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgb25Qcm9jZXNzRW50aXR5Q29tcG9uZW50Q2hhbmdlICYmIG9uUHJvY2Vzc0VudGl0eUNvbXBvbmVudENoYW5nZShlbnRpdHlJZCwgQ3JkdE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09NUE9ORU5UIHx8IG1zZy50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVF9ORVRXT1JLKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGJ1ZiA9IG5ldyBSZWFkV3JpdGVCeXRlQnVmZmVyKG1zZy5kYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5zZXQoZW50aXR5LCBzY2hlbWEuZGVzZXJpYWxpemUoYnVmKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBkYXRhLmRlbGV0ZShlbnRpdHkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gW251bGwsIGRhdGEuZ2V0KGVudGl0eSldO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBQcm9jZXNzTWVzc2FnZVJlc3VsdFR5cGUuU3RhdGVPdXRkYXRlZFRpbWVzdGFtcDpcbiAgICAgICAgICAgIGNhc2UgUHJvY2Vzc01lc3NhZ2VSZXN1bHRUeXBlLlN0YXRlT3V0ZGF0ZWREYXRhOiB7XG4gICAgICAgICAgICAgICAgaWYgKGRhdGEuaGFzKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgd3JpdGVCdWZmZXIgPSBuZXcgUmVhZFdyaXRlQnl0ZUJ1ZmZlcigpO1xuICAgICAgICAgICAgICAgICAgICBzY2hlbWEuc2VyaWFsaXplKGRhdGEuZ2V0KGVudGl0eSksIHdyaXRlQnVmZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiB3cml0ZUJ1ZmZlci50b0JpbmFyeSgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudGl0eUlkOiBlbnRpdHksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGltZXN0YW1wOiB0aW1lc3RhbXBzLmdldChlbnRpdHkpXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5nZXQoZW50aXR5KVxuICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBDcmR0TWVzc2FnZVR5cGUuREVMRVRFX0NPTVBPTkVOVCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnRpdHlJZDogZW50aXR5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpbWVzdGFtcDogdGltZXN0YW1wcy5nZXQoZW50aXR5KVxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gW251bGwsIGRhdGEuZ2V0KGVudGl0eSldO1xuICAgIH07XG59XG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlR2V0Q3JkdE1lc3NhZ2VzRm9yTHd3KGNvbXBvbmVudElkLCB0aW1lc3RhbXBzLCBkaXJ0eUl0ZXJhdG9yLCBzY2hlbWEsIGRhdGEpIHtcbiAgICByZXR1cm4gZnVuY3Rpb24qICgpIHtcbiAgICAgICAgZm9yIChjb25zdCBlbnRpdHkgb2YgZGlydHlJdGVyYXRvcikge1xuICAgICAgICAgICAgY29uc3QgbmV3VGltZXN0YW1wID0gaW5jcmVtZW50VGltZXN0YW1wKGVudGl0eSwgdGltZXN0YW1wcyk7XG4gICAgICAgICAgICBpZiAoZGF0YS5oYXMoZW50aXR5KSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHdyaXRlQnVmZmVyID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoKTtcbiAgICAgICAgICAgICAgICBzY2hlbWEuc2VyaWFsaXplKGRhdGEuZ2V0KGVudGl0eSksIHdyaXRlQnVmZmVyKTtcbiAgICAgICAgICAgICAgICBjb25zdCBtc2cgPSB7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5ULFxuICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICAgICAgZW50aXR5SWQ6IGVudGl0eSxcbiAgICAgICAgICAgICAgICAgICAgZGF0YTogd3JpdGVCdWZmZXIudG9CaW5hcnkoKSxcbiAgICAgICAgICAgICAgICAgICAgdGltZXN0YW1wOiBuZXdUaW1lc3RhbXBcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHlpZWxkIG1zZztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGNvbnN0IG1zZyA9IHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9DT01QT05FTlQsXG4gICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudElkLFxuICAgICAgICAgICAgICAgICAgICBlbnRpdHlJZDogZW50aXR5LFxuICAgICAgICAgICAgICAgICAgICB0aW1lc3RhbXA6IG5ld1RpbWVzdGFtcFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgeWllbG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ZiAoZGF0YS5kZWxldGUoZW50aXR5KSAmJiBtYXJrQXNEaXJ0eSkge1xuICAgICAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuYWRkKGVudGl0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50IHx8IG51bGw7XG4gICAgICAgIH0sXG4gICAgICAgIGVudGl0eURlbGV0ZWQoZW50aXR5LCBtYXJrQXNEaXJ0eSkge1xuICAgICAgICAgICAgaWYgKGRhdGEuZGVsZXRlKGVudGl0eSkgJiYgbWFya0FzRGlydHkpIHtcbiAgICAgICAgICAgICAgICBkaXJ0eUl0ZXJhdG9yLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBnZXRPck51bGwoZW50aXR5KSB7XG4gICAgICAgICAgICBjb25zdCBjb21wb25lbnQgPSBkYXRhLmdldChlbnRpdHkpO1xuICAgICAgICAgICAgcmV0dXJuIGNvbXBvbmVudCA/IGRlZXBSZWFkb25seShjb21wb25lbnQpIDogbnVsbDtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0KGVudGl0eSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgICAgIGlmICghY29tcG9uZW50KSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBbZ2V0RnJvbV0gQ29tcG9uZW50ICR7Y29tcG9uZW50TmFtZX0gZm9yIGVudGl0eSAjJHtlbnRpdHl9IG5vdCBmb3VuZGApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGRlZXBSZWFkb25seShjb21wb25lbnQpO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoZW50aXR5LCB2YWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgICAgIGlmIChjb21wb25lbnQpI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7XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50O1xuICAgICAgICB9LFxuICAgICAgICBnZXRPckNyZWF0ZU11dGFibGUoZW50aXR5LCB2YWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgICAgIGlmICghY29tcG9uZW50KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY3JlYXRlKGVudGl0eSwgdmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgZGlydHlJdGVyYXRvci5hZGQoZW50aXR5KTtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29tcG9uZW50O1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBnZXRNdXRhYmxlKGVudGl0eSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gdGhpcy5nZXRNdXRhYmxlT3JOdWxsKGVudGl0eSk7XG4gICAgICAgICAgICBpZiAoY29tcG9uZW50ID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBbbXV0YWJsZV0gQ29tcG9uZW50ICR7Y29tcG9uZW50TmFtZX0gZm9yICR7ZW50aXR5fSBub3QgZm91bmRgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBjb21wb25lbnQ7XG4gICAgICAgIH0sXG4gICAgICAgICppdGVyYXRvcigpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3QgW2VudGl0eSwgY29tcG9uZW50XSBvZiBkYXRhKSB7XG4gICAgICAgICAgICAgICAgeWllbGQgW2VudGl0eSwgY29tcG9uZW50XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgKmRpcnR5SXRlcmF0b3IoKSB7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IGVudGl0eSBvZiBkaXJ0eUl0ZXJhdG9yKS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mbi5uYW1lO1xuICAgICAgICBpZiAoc3lzdGVtcy5maW5kKChpdGVtKSA9PiBpdGVtLmZuID09PSBmbikpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgU3lzdGVtICR7SlNPTi5zdHJpbmdpZnkoc3lzdGVtTmFtZSl9IGFscmVhZHkgYWRkZWQgdG8gdGhlIGVuZ2luZWApO1xuICAgICAgICB9XG4gICAgICAgIHN5c3RlbXMucHVzaCh7XG4gICAgICAgICAgICBmbixcbiAgICAgICAgICAgIHByaW9yaXR5LFxuICAgICAgICAgICAgbmFtZTogc3lzdGVtTmFtZVxuICAgICAgICB9KTtcbiAgICAgICAgLy8gVE9ETzogcmVwbGFjZSB0aGlzIHNvcnQgYnkgYW4gaW5zZXJ0aW9uIGluIHRoZSByaWdodCBwbGFjZVxuICAgICAgICBzb3J0KCk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJlbW92ZShzZWxlY3Rvcikge1xuICAgICAgICBsZXQgaW5kZXggPSAtMTtcbiAgICAgICAgaWYgKHR5cGVvZiBzZWxlY3RvciA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGluZGV4ID0gc3lzdGVtcy5maW5kSW5kZXgoKGl0ZW0pID0+IGl0ZW0ubmFtZSA9PT0gc2VsZWN0b3IpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgaW5kZXggPSBzeXN0ZW1zLmZpbmRJbmRleCgoaXRlbSkgPT4gaXRlbS5mbiA9PT0gc2VsZWN0b3IpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChpbmRleCA9PT0gLTEpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICBzeXN0ZW1zLnNwbGljZShpbmRleCwgMSk7XG4gICAgICAgIHNvcnQoKTtcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgfVxuICAgIHJldHVybiB7XG4gICAgICAgIGFkZCxcbiAgICAgICAg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1hbmRzID0gW107XG4gICAgLy8gb25seSBzb3J0IHRoZSBhcnJheSBpZiB0aGUgbGF0ZXN0IChOKSBlbGVtZW50IGhhcyBhIHRpbWVzdGFtcCA8PSBOLTFcbiAgICBmdW5jdGlvbiBzaG91bGRTb3J0KHJvdykge1xuICAgICAgICBjb25zdCBsZW4gPSByb3cucmF3Lmxlbmd0aDtcbiAgICAgICAgaWYgKGxlbiA+IDEgJiYgcm93LnJhd1tsZW4gLSAxXS50aW1lc3RhbXAgPD0gcm93LnJhd1tsZW4gLSAyXS50aW1lc3RhbXApIHtcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG4gICAgZnVuY3Rpb24gZ290VXBkYXRlZChlbnRpdHkpIHtcbiAgICAgICAgY29uc3Qgcm93ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGVsc2UgKi9cbiAgICAgICAgaWYgKHJvdykge1xuICAgICAgICAgICAgaWYgKHNob3VsZFNvcnQocm93KSkge1xuICAgICAgICAgICAgICAgIHJvdy5yYXcuc29ydChzb3J0QnlUaW1lc3RhbXApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgd2hpbGUgKHJvdy5yYXcubGVuZ3RoID4gb3B0aW9ucy5tYXhFbGVtZW50cykge1xuICAgICAgICAgICAgICAgIHJvdy5yYXcuc2hpZnQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IGZyb3plblNldCA9IGZyZWV6ZVNldChuZXcgU2V0KHJvdz8ucmF3Lm1hcCgoJCkgPT4gJC52YWx1ZSkpKTtcbiAgICAgICAgICAgIHJvdy5mcm96ZW5TZXQgPSBmcm96ZW5TZXQ7XG4gICAgICAgICAgICByZXR1cm4gZnJvemVuU2V0O1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub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V0IGNvbXBvbmVudE5hbWUoKSB7XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50TmFtZTtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0IGNvbXBvbmVudFR5cGUoKSB7XG4gICAgICAgICAgICAvLyBhIGdldHRlciBpcyB1c2VkIGhlcmUgdG8gcHJldmVudCBhY2NpZGVudGFsIGNoYW5nZXNcbiAgICAgICAgICAgIHJldHVybiAxIC8qIENvbXBvbmVudFR5cGUuR3Jvd09ubHlWYWx1ZVNldCAqLztcbiAgICAgICAgfSxcbiAgICAgICAgc2NoZW1hLFxuICAgICAgICBoYXMoZW50aXR5KSB7XG4gICAgICAgICAgICByZXR1cm4gZGF0YS5oYXMoZW50aXR5KTtcbiAgICAgICAgfSxcbiAgICAgICAgZW50aXR5RGVsZXRlZChlbnRpdHkpIHtcbiAgICAgICAgICAgIGRhdGEuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgIH0sXG4gICAgICAgIGdldChlbnRpdHkpIHtcbiAgICAgICAgICAgIGNvbnN0IHZhbHVlcyA9IGRhdGEuZ2V0KGVudGl0eSk7XG4gICAgICAgICAgICBpZiAodmFsdWVzKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlcy5mcm96ZW5TZXQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZW1wdHlSZWFkb25seVNldDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgYWRkVmFsdWUoZW50aXR5LCByYXdWYWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgeyBzZXQsIHZhbHVlIH0gPSBhcHBlbmQoZW50aXR5LCByYXdWYWx1ZSk7XG4gICAgICAgICAgICBkaXJ0eUl0ZXJhdG9yLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgY29uc3QgYnVmID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoKTtcbiAgICAgICAgICAgIHNjaGVtYS5zZXJpYWxpemUodmFsdWUsIGJ1Zik7XG4gICAgICAgICAgICBxdWV1ZWRDb21tYW5kcy5wdXNoKHtcbiAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICBkYXRhOiBidWYudG9CaW5hcnkoKSxcbiAgICAgICAgICAgICAgICBlbnRpdHlJZDogZW50aXR5LFxuICAgICAgICAgICAgICAgIHRpbWVzdGFtcDogMCxcbiAgICAgICAgICAgICAgICB0eXBlOiBDcmR0TWVzc2FnZVR5cGUuQVBQRU5EX1ZBTFVFXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJldHVybiBzZXQ7XG4gICAgICAgIH0sXG4gICAgICAgICppdGVyYXRvcigpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3QgW2VudGl0eSwgY29tcG9uZW50XSBvZiBkYXRhKSB7XG4gICAgICAgICAgICAgICAgeWllbGQgW2VudGl0eSwgY29tcG9uZW50LmZyb3plblNldF07XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgICpkaXJ0eUl0ZXJhdG9yKCkge1xuICAgICAgICAgICAgZm9yIChjb25zdCBlbnRpdHkgb2YgZGlydHlJdGVyYXRvcikge1xuICAgICAgICAgICAgICAgIHlpZWxkIGVudGl0eTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgZ2V0Q3JkdFVwZGF0ZXMoKSB7XG4gICAgICAgICAgICAvLyByZXR1cm4gYSBjb3B5IG9mIHRoZSBjb21tYW5kcywgYW5kIHRoZW4gY2xlYXIgdGhlIGxvY2FsIGNvcHlcbiAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuY2xlYXIoKTtcbiAgICAgICAgICAgIHJldHVybiBxdWV1ZWRDb21tYW5kcy5zcGxpY2UoMCwgcXVldWVkQ29tbWFuZHMubGVuZ3RoKTtcbiAgICAgICAgfSxcbiAgICAgICAgdXBkYXRlRnJvbUNyZHQoX2JvZHkpIHtcbiAgICAgICAgICAgIGlmIChfYm9keS50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuQVBQRU5EX1ZBTFVFKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgYnVmID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoX2JvZHkuZGF0YSk7XG4gICAgICAgICAgICAgICAgYXBwZW5kKF9ib2R5LmVudGl0eUlkLCBzY2hlbWEuZGVzZXJpYWxpemUoYnVmKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gW251bGwsIHVuZGVmaW5lZF07XG4gICAgICAgIH0sXG4gICAgICAgIGR1bXBDcmR0U3RhdGVUb0J1ZmZlcjogZnVuY3Rpb24gKGJ1ZmZlciwgZmlsdGVyRW50aXR5KSB7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IFtlbnRpdHksIHsgcmF3IH1dIG9mIGRhdGEpIHtcbiAgICAgICAgICAgICAgICBpZiAoZmlsdGVyRW50aXR5ICYmICFmaWx0ZXJFbnRpdHkoZW50aXR5KSlcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBpdCBvZiByYXcpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgYnVmID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgc2NoZW1hLnNlcmlhbGl6ZShpdC52YWx1ZSwgYnVmKTtcbiAgICAgICAgICAgICAgICAgICAgQXBwZW5kVmFsdWVPcGVyYXRpb24ud3JpdGUoZW50aXR5LCAwLCBjb21wb25lbnRJZCwgYnVmLnRvQmluYXJ5KCksIGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcbiAgICByZXR1cm4gcmV0O1xufVxuIiwgImltcG9ydCAqIGFzIGNvbXBvbmVudHMgZnJvbSAnLi4vLi4vY29tcG9uZW50cyc7X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Db21tYW5kc1tpXTtcbiAgICAgICAgICAgICAgICBpZiAoY29tbWFuZC50aW1lc3RhbXAgPiBtYXhUaW1lc3RhbXApIHtcbiAgICAgICAgICAgICAgICAgICAgbWF4VGltZXN0YW1wID0gY29tbWFuZC50aW1lc3RhbXA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChjb21tYW5kLnRpbWVzdGFtcCA+IGdsb2JhbFN0YXRlLnByZXZpb3VzRnJhbWVNYXhUaW1lc3RhbXApIHtcbiAgICAgICAgICAgICAgICAgICAgZ2xvYmFsU3RhdGUudGhpc0ZyYW1lQ29tbWFuZHMucHVzaChjb21tYW5kKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGNvbW1hbmQuc3RhdGUgPT09IDAgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfVVAgKi8gfHwgY29tbWFuZC5zdGF0ZSA9PT0gMSAvKiBQb2ludGVyRXZlbnRUeXBlLlBFVF9ET1dOICovKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHByZXZDb21tYW5kID0gZ2xvYmFsU3RhdGUuYnV0dG9uU3RhdGUuZ2V0KGNvbW1hbmQuYnV0dG9uKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFwcmV2Q29tbWFuZCB8fCBjb21tYW5kLnRpbWVzdGFtcCA+IHByZXZDb21tYW5kLnRpbWVzdGFtcCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZ2xvYmFsU3RhdGUuYnV0dG9uU3RhdGUuc2V0KGNvbW1hbmQuYnV0dG9uLCBjb21tYW5kKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNpbmNlIHdlIGFyZSBpdGVyYXRpbmcgYSBkZXNjZW5kaW5nIGFycmF5LCB3ZSBjYW4gZWFybHkgZmluaXNoIHRoZVxuICAgICAgICAgICA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uc3QgY21kID0gZmluZENsaWNrKGlucHV0LCBlbnRpdHkpO1xuICAgICAgICAgICAgaWYgKGNtZClcbiAgICAgICAgICAgICAgICByZXR1cm4gY21kO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH1cbiAgICBmdW5jdGlvbiBmaW5kQ2xpY2soaW5wdXRBY3Rpb24sIGVudGl0eSkge1xuICAgICAgICBsZXQgZG93biA9IG51bGw7XG4gICAgICAgIGxldCB1cCA9IG51bGw7XG4gICAgICAgIC8vIFdlIHNlYXJjaCB0aGUgbGFzdCBVUCAmIERPV04gY29tbWFuZCBzb3J0ZWQgYnkgdGltZXN0YW1wIGRlc2NlbmRpbmdcbiAgICAgICAgZm9yIChjb25zdCBpdCBvZiBmaW5kQ29tbWFuZHNCeUFjdGlvbkRlc2NlbmRpbmcoaW5wdXRBY3Rpb24sIGVudGl0eSkpIHtcbiAgICAgICAgICAgIGlmICghdXApIHtcbiAgICAgICAgICAgICAgICBpZiAoaXQuc3RhdGUgPT09IDAgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfVVAgKi8pIHtcbiAgICAgICAgICAgICAgICAgICAgdXAgPSBpdDtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoIWRvd24pIHtcbiAgICAgICAgICAgICAgICBpZiAoaXQuc3RhdGUgPT09IDEgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfRE9XTiAqLykge1xuICAgICAgICAgICAgICAgICAgICBkb3duID0gaXQ7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoIXVwIHx8ICFkb3duKVxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIC8vIElmIHRoZSBET1dOIGNvbW1hbmQgaGFzIGhhcHB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nRpdHkpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgZm9yIChjb25zdCBjb21tYW5kIG9mIGdsb2JhbFN0YXRlLnRoaXNGcmFtZUNvbW1hbmRzKSB7XG4gICAgICAgICAgICAgICAgaWYgKChjb21tYW5kLmJ1dHRvbiA9PT0gaW5wdXRBY3Rpb24gfHwgaW5wdXRBY3Rpb24gPT09IDMgLyogSW5wdXRBY3Rpb24uSUFfQU5ZICovKSAmJlxuICAgICAgICAgICAgICAgICAgICBjb21tYW5kLnN0YXRlID09PSBwb2ludGVyRXZlbnRUeXBlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjb21tYW5kO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG4gICAgfVxuICAgIGZ1bmN0aW9uIGZpbmRJbnB1dENvbW1hbmQoaW5wdXRBY3Rpb24sIHBvaW50ZXJFdmVudFR5cGUsIGVudGl0eSkge1xuICAgICAgICAvLyBXZSBzZWFyY2ggdGhlIGxhc3QgcG9pbnRlciBFdmVudCBjb21tYW5kIHNvcnRlZCBieSB0aW1lc3RhbXBcbiAgICAgICAgY29uc3QgY29tbWFuZCA9IGZpbmRMYXN0QWN0aW9uKHBvaW50ZXJFdmVudFR5cGUsIGlucHV0QWN0aW9uLCBlbnRpdHkpO1xuICAgICAgICBpZiAoIWNvbW1hbmQpXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgaWYgKHRpbWVzdGFtcElzQ3VycmVudEZyYW1lKGNvbW1hbmQudGltZXN0YW1wKSkge1xuICAgICAgICAgICAgcmV0dXJuIGNvbW1hbmQ7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuICAgIH1cbiAgICAvLyByZXR1cm5zIHRydWUgaWYgdGhlcmUgd2FzIGEgRE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mApO1xuICAgICAgICB9XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgIGlmIChjb21wb25lbnQuY29tcG9uZW50TmFtZSAhPT0gY29tcG9uZW50TmFtZSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBDb21wb25lbnQgbmFtZSBkb2Vzbid0IG1hdGNoIGNvbXBvbmVudERlZmluaXRpb24uY29tcG9uZW50TmFtZSAke2NvbXBvbmVudE5hbWV9ICE9ICR7Y29tcG9uZW50LmNvbXBvbmVudE5hbWV9YCk7XG4gICAgICAgIH1cbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgaWYgKGNvbXBvbmVudC5jb21wb25lbnRJZCAhPT0gY29tcG9uZW50SWQpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ29tcG9uZW50IG51bWJlciBkb2Vzbid0IG1hdGNoIGNvbXBvbmVudERlZmluaXRpb24uY29tcG9uZW50SWQgJHtjb21wb25lbnRJZH0gIT0gJHtjb21wb25lbnQuY29tcG9uZW50SWR9YCk7XG4gICAgICAgIH1cbiAgICAgICAgY29tcG9uZW50c0RlZmluaXRpb24uc2V0KGNvbXBvbmVudElkLCBjb21wb25lbnQpO1xuICAgICAgICByZXR1cm4gY29tcG9uZW50O1xuICAgIH1cbiAgICBmdW5jdGlvbiBkZWZpbmVDb21wb25lbnRGcm9tU2NoZW1hKGNvbXBvbmVudE5hbWUsIHNjaGVtYSkge1xuICAgICAgICBjb25zdCBjb21wb25lbnRJZCA9IGNvbXBvbmVudE51bWJlckZyb21OYW1lKGNvbXBvbmVudE5hbWUpO1xuICAgICAgICBjb25zdCBwcmV2ID0gY29tcG9uZW50c0RlZmluaXRpb24uZ2V0KGNvbXBvbmVudElkKTtcbiAgICAgICAgaWYgKHByZXYpIHtcbiAgICAgICAgICAgIC8vIFRPRE86IGFzc2VydCBzcGVjID09PSBwcmV2LnNwZWNcbiAgICAgICAgICAgIHJldHVybiBwcmV2O1xuICAgICAgICB9XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgIGlmIChzZWFsZWQpXG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0VuZ2luZSBpcyBhbHJlYWR5IHNlYWxlZC4gTm8gY29tcG9uZW50cyBjYW4gYmUgYWRkZWQgYXQgdGhpcyBzdGFnZScpO1xuICAgICAgICBjb25zdCBuZXdDb21wb25lbnQgPSBjcmVhdGVDb21wb25lbnREZWZpbml0aW9uRnJvbVNjaGVtYShjb21wb25lbnROYW1lLCBjb21wb25lbnRJZCwgc2NoZW1hKTtcbiAgICAgICAgY29tcG9uZW50c0RlZmluaXRpb24uc2V0KGNvbXBvbmVudElkLCBuZXdDb21wb25lbnQpO1xuICAgICAgICByZXR1cm4gbmV3Q29tcG9uZW50O1xuICAgIH1cbiAgICBmdW5jdGlvbiBkZWZpbmVWYWx1ZVNldENvbXBvbmVudEZyb21TY2hlbWEoY29tcG9uZW50TmFtZSwgc2NoZW1hLCBvcHRpb25zKSB7XG4gICAgICAgIGNvbnN0IGNvbXBvbmVudElkID0gY29tcG9uZW50TnVtYmVyRnJvbU5hbWUoY29tcG9uZW50TmFtZSk7XG4gICAgICAgIGNvbnN0IHByZXYgPSBjb21wb25lbnRzRGVmaW5pdGlvbi5nZXQoY29tcG9uZW50SWQpO1xuICAgICAgICBpZiAocHJldikge1xuICAgICAgICAgICAgLy8gVE9ETzogYXNzZXJ0IHNwZWMgPT09IHByZXYuc3BlY1xuICAgICAgICAgICAgcmV0dXJuIHByZXY7XG4gICAgICAgIH1cbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgaWYgKHNlYWxlZClcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRW5naW5lIGlzIGFscmVhZHkgc2VhbGVkLiBObyBjb21wb25lbnRzIGNhbiBiZSBhZGRlZCBhd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ICAgICAgICBjb25zdCBuZXdDb21wb25lbnQgPSB7XG4gICAgICAgICAgICAuLi5kZWYsXG4gICAgICAgICAgICBjcmVhdGUoZW50aXR5LCB2YWwpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZGVmLmNyZWF0ZShlbnRpdHksIHZhbCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwgdmFsKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGRlZi5jcmVhdGVPclJlcGxhY2UoZW50aXR5LCB2YWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICBjb21wb25lbnRzRGVmaW5pdGlvbi5zZXQoY29tcG9uZW50SWQsIG5ld0NvbXBvbmVudCk7XG4gICAgICAgIHJldHVybiBuZXdDb21wb25lbnQ7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGdldENvbXBvbmVudChjb21wb25lbnRJZE9yTmFtZSkge1xuICAgICAgICBjb25zdCBjb21wb25lbnRJZCA9IHR5cGVvZiBjb21wb25lbnRJZE9yTmFtZSA9PT0gJ251bWJlcicgPyBjb21wb25lbnRJZE9yTmFtZSA6IGNvbXBvbmVudE51bWJlckZyb21OYW1lKGNvbXBvbmVudElkT3JOYW1lKTtcbiAgICAgICAgY29uc3QgY29tcG9uZW50ID0gY29tcG9uZW50c0RlZmluaXRpb24uZ2V0KGNvbXBvbmVudElkKTtcbiAgICAgICAgaWYgKCFjb21wb25lbnQpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ29tcG9uZW50ICR7Y29tcG9uZW50SWRPck5hbWV9IG5vdCBmb3VuZC4gWW91IG5lZWQgdG8gZGVjbGFyZSB0aGUgY29tcG9uZW50cyBhdCB0aGUgYmVnaW5uaWcgb2YgdGhlIGVuZ2luZSBkZWNsYXJhdGlvbmApO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBjb21wb25lbnQ7XG4gICAgfVxuICAgIGZ1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21wb25lbnREZWZHcm91cCguLi5hcmdzKSB7XG4gICAgICAgIGNvbnN0IFtmaXJzdENvbXBvbmVudERlZiwgLi4uY29tcG9uZW50RGVmaW5pdGlvbnNdID0gYXJncztcbiAgICAgICAgZm9yIChjb25zdCBbZW50aXR5XSBvZiBmaXJzdENvbXBvbmVudERlZi5pdGVyYXRvcigpKSB7XG4gICAgICAgICAgICBsZXQgbWF0Y2hlcyA9IHRydWU7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IGNvbXBvbmVudERlZiBvZiBjb21wb25lbnREZWZpbml0aW9ucykge1xuICAgICAgICAgICAgICAgIGlmICghY29tcG9uZW50RGVmLmhhcyhlbnRpdHkpKSB7XG4gICAgICAgICAgICAgICAgICAgIG1hdGNoZXMgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG1hdGNoZXMpIHtcbiAgICAgICAgICAgICAgICB5aWVsZCBbZW50aXR5LCAuLi5hcmdzXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBmdW5jdGlvbiBnZXRTeXN0ZW1zKCkge1xuICAgICAgICByZXR1cm4gc3lzdGVtcy5nZXRTeXN0ZW1zKCk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGNvbXBvbmVudHNJdGVyKCkge1xuICAgICAgICByZXR1cm4gY29tcG9uZW50c0RlZmluaXRpb24udmFsdWVzKCk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJlbW92ZUNvbXBvbmVudERlZmluaXRpb24oY29tcG9uZW50SWRPck5hbWUpIHtcbiAgICAgICAgaWYgKHNlYWxlZClcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRW5naW5lIGlzIGFscmVhZHkgc2VhbGVkLiBObyBjb21wb25lbnRzIGNhbiBiZSByZW1vdmVkIGF0IHRoaXMgc3RhZ2UnKTtcbiAgICAgICAgY29uc3QgY29tcG9uZW50SWQgPSB0eXBlb2YgY29tcG9uZW50SWRPck5hbWUgPT09ICdudW1iZXInID8gY29tcG9uZW50SWRPck5hbWUgOiBjb21wb25lbnROdW1iZXJGcm9tTmFtZShjb21wb25lbnRJZE9yTmFtZSk7XG4gICAgICAgIGNvbXBvbmVudHNEZWZpbml0aW9uLmRlbGV0ZShjb21wb25lbnRJZCk7XG4gICAgfVxuICAgIGNvbXBvbmVudHMuVHJhbnNmb3JtKHsgZGVmaW5lQ29tcG9uZW50RnJvbVNjaGVtYSB9KTtcbiAgICBmdW5jdGlvbiBzZWFsKCkge1xuICAgICAgICBpZiAoIXNlYWxlZCkge1xuICAgICAgICAgICAgc2VhbGVkID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4ge1xuICAgICAgICBhZGRFbnRpdHksXG4gICAgICAgIHJlbW92ZUVudGl0eSxcbiAgICAgICAgcmVtb3ZlRW50aXR5V2l0aENoaWxkcmVuLFxuICAgICAgICBhZGRTeXN0ZW0sXG4gICAgICAgIGdldFN5c3RlbXMsXG4gICAgICAgIHJlbW92ZVN5c3RlbSxcbiAgICAgICAgZGVmaW5lQ29tcG9uZW50LFxuICAgICAgICBkZWZpbmVDb21wb25lbnRGcm9tU2NoZW1hLFxuICAgICAgICBkZWZpbmVWYWx1ZVNldENvbXBvbmVudEZyb21TY2hlbWEsXG4gICAgICAgIGdldEVudGl0aWVzV2l0aCxcbiAgICAgICAgZ2V0Q29tcG9uZW50LFxuICAgICAgICBnZXRDb21wb25lbnRPck51bGw6IGdldENvbXBvbmVudE9yTnVsbCxcbiAgICAgICAgZ2V0RW50aXR5T3JOdWxsQnlOYW1lLFxuICAgICAgICByZW1vdmVDb21wb25lbnREZWZpbml0aW9uLFxuICAgICAgICByZWdpc3RlckNvbXBvbmVudERlZmluaXRpb24sXG4gICAgICAgIGVudGl0eUNvbnRhaW5lcixcbiAgICAgICAgY29tcG9uZW50c0l0ZXIsXG4gICAgIC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RlckV2ZW50ID0gZXZlbnQuZ2V0KHR5cGUpO1xuICAgICAgICBpZiAocG9pbnRlckV2ZW50Py5vcHRzLmhvdmVyVGV4dCkge1xuICAgICAgICAgICAgcmVtb3ZlUG9pbnRlckV2ZW50KGVudGl0eSwgZ2V0UG9pbnRlckV2ZW50KHR5cGUpLCBwb2ludGVyRXZlbnQub3B0cy5idXR0b24pO1xuICAgICAgICB9XG4gICAgICAgIGV2ZW50LmRlbGV0ZSh0eXBlKTtcbiAgICB9XG4gICAgLy8gQGludGVybmFsXG4gICAgZW5naW5lLmFkZFN5c3RlbShmdW5jdGlvbiBFdmVudFN5c3RlbSgpIHtcbiAgICAgICAgZm9yIChjb25zdCBbZW50aXR5LCBldmVudF0gb2YgZXZlbnRzTWFwKSB7XG4gICAgICAgICAgICBpZiAoZW5naW5lLmdldEVudGl0eVN0YXRlKGVudGl0eSkgPT09IEVudGl0eVN0YXRlLlJlbW92ZWQpIHtcbiAgICAgICAgICAgICAgICBldmVudHNNYXAuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmb3IgKGNvbnN0IFtldmVudFR5cGUsIHsgY2IsIG9wdHMgfV0gb2YgZXZlbnQpIHtcbiAgICAgICAgICAgICAgICBpZiAoZXZlbnRUeXBlID09PSBFdmVudFR5cGUuQ2xpY2spIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgY29tbWFuZCA9IGlucHV0U3lzdGVtLmdldENsaWNrKG9wdHMuYnV0dG9uLCBlbnRpdHkpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29tbWFuZClcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrTm90VGhlbmFibGUoY2IoY29tbWFuZC51cCksICdDbGljayBldmVudCByZXR1cm5lZCBhIHRoZW5hYmxlLiBPbmx5IHN5bmNocm9ub3VzIGZ1bmN0aW9ucyBhcmUgYWxsb3dlZCcpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoZXZlbnRUeXBlID09PSBFdmVudFR5cGUuRG93biB8fCBldmVudFR5cGUgPT09IEV2ZW50VHlwZS5VcCkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjb21tYW5kID0gaW5wdXRTeXN0ZW0uZ2V0SW5wdXRDb21tYW5kKG9wdHMuYnV0dG9uLCBnZXRQb2ludGVyRXZlbnQoZXZlbnRUeXBlKSwgZW50aXR5KTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbW1hbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrTm90VGhlbmFibGUoY2IoY29tbWFuZCksICdFdmVudCBoYW5kbGVyIHJldHVybmVkIGEgdGhlbmFibGUuIE9ubHkgc3luY2hyb25vdXMgZnVuY3Rpb25zIGFyZSBhbGxvd2VkJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KTtcbiAgICBjb25zdCBvblBvaW50ZXJEb3duID0gKC4uLmFyZ3MpID0+IHtcbiAgICAgICAgY29uc3QgW2RhdGEsIGNiLCBtYXliZU9wdHNdID0gYXJncztcbiAgICAgICAgaWYgKHR5cGVvZiBkYXRhID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgcmV0dXJuIG9uUG9pbnRlckRvd24oeyBlbnRpdHk6IGRhdGEsIG9wdHM6IG1heWJlT3B0cyA/PyB7fSB9LCBjYik7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgeyBlbnRpdHksIG9wdHMgfSA9IGRhdGE7XG4gICAgICAgIGNvbnN0IG9wdGlvbnMgPSBnZXREZWZhdWx0T3B0cyhvcHRzKTtcbiAgICAgICAgcmVtb3ZlRXZlbnQoZW50aXR5LCBFdmVudFR5cGUuRG93bik7XG4gICAgICAgIGdldEV2ZW50KGVudGl0eSkuc2V0KEV2ZW50VHlwZS5Eb3duLCB7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fVxuICAgICAgICByZXN0YXJ0VHdlZW5zLmxlbmd0aCA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgW2VudGl0eSwgdHdlZW5dIG9mIGVuZ2luZS5nZXRFbnRpdGllc1dpdGgoVHdlZW4pKSB7XG4gICAgICAgICAgICBpZiAodHdlZW5DaGFuZ2VkKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBidWZmZXIgPSBuZXcgUmVhZFdyaXRlQnl0ZUJ1ZmZlcigpO1xuICAgICAgICAgICAgICAgIFR3ZWVuLnNjaGVtYS5zZXJpYWxpemUodHdlZW4sIGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgY2FjaGUuc2V0KGVudGl0eSwge1xuICAgICAgICAgICAgICAgICAgICB0d2VlbjogYnVmZmVyLnRvQmluYXJ5KCksXG4gICAgICAgICAgICAgICAgICAgIGZyYW1lczogMCxcbiAgICAgICAgICAgICAgICAgICAgY29tcGxldGVkOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgY2hhbmdlZDogdHJ1ZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgdHdlZW5DYWNoZSA9IGNhY2hlLmdldChlbnRpdHkpO1xuICAgICAgICAgICAgdHdlZW5DYWNoZS5mcmFtZXMgKz0gMTtcbiAgICAgICAgICAgIHR3ZWVuQ2FjaGUuY2hhbmdlZCA9IGZhbHNlO1xuICAgICAgICAgICAgaWYgKGlzQ29tcGxldGVkKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICAvLyBSZXNldCB0d2VlbiBmcmFtZXMuXG4gICAgICAgICAgICAgICAgdHdlZW5DYWNoZS5mcmFtZXMgPSAwO1xuICAgICAgICAgICAgICAgIC8vIHNldCB0aGUgdHdlZW4gY29tcGxldGVkIHRvIGF2b2lkIGNhbGxpbmcgdGhpcyBhZ2FpbiBmb3IgdGhlIHNhbWUgdHdlZW5cbiAgICAgICAgICAgICAgICB0d2VlbkNhY2hlLmNvbXBsZXRlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgY29uc3QgdHdlZW5TZXF1ZW5jZSA9IFR3ZWVuU2VxdWVuY2UuZ2V0T3JOdWxsKGVudGl0eSk7XG4gICAgICAgICAgICAgICAgaWYgKCF0d2VlblNlcXVlbmNlKVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjb25zdCB7IHNlcXVlbmNlIH0gPSB0d2VlblNlcXVlbmNlO1xuICAgICAgICAgICAgICAgIGlmIChzZXF1ZW5jZSAmJiBzZXF1ZW5jZS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgW25leHRUd2VlblNlcXVlbmNlLCAuLi5vdGhlclR3ZWVuc10gPSBzZXF1ZW5jZTtcbiAgICAgICAgICAgICAgICAgICAgVHdlZW4uY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwgbmV4dFR3ZWVuU2VxdWVuY2UpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBtdXRhYmxlVHdlZW5IZWxwZXIgPSBUd2VlblNlcXVlbmNlLmdldE11dGFibGUoZW50aXR5KTtcbiAgICAgICAgICAgICAgICAgICAgbXV0YWJsZVR3ZWVuSGVscGVyLnNlcXVlbmNlID0gb3RoZXJUd2VlbnM7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0d2VlblNlcXVlbmNlLmxvb3AgPT09IDAgLyogVHdlZW5Mb29wLlRMX1JFU1RBUlQgKi8pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG11dGFibGVUd2VlbkhlbHBlci5zZXF1ZW5jZS5wdXNoKHR3ZWVuKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmICh0d2VlblNlcXVlbmNlLmxvb3AgPT09IDEgLyogVHdlZW5Mb29wLlRMX1lPWU8gKi8pIHtcbiAgICAgICAgICAgICAgICAgICAgVHdlZW4uY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwgYmFja3dhcmRzVHdlZW4odHdlZW4pKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAodHdlZW5TZXF1ZW5jZS5sb29wID09PSAwIC8qIFR3ZWVuTG9vcC5UTF9SRVNUQVJUICovKSB7XG4gICAgICAgICAgICAgICAgICAgIFR3ZWVuLmRlbGV0ZUZyb20oZW50aXR5KTtcbiAgICAgICAgICAgICAgICAgICAgY2FjaGUuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgICAgICAgICAgICAgIHJlc3RhcnRUd2VlbnMucHVzaCgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBUd2Vlbi5jcmVhdGVPclJlcGxhY2UoZW50aXR5LCB0d2Vlbik7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0sIE51bWJlci5ORUdBVElWRV9JTkZJTklUWSk7XG4gICAgZnVuY3Rpb24gYmFja3dhcmRzVHdlZW4odHdlZW4pIHtcbiAgICAgICAgaWYgKHR3ZWVuLm1vZGU/LiRjYXNlID09PSAnbW92ZScgJiYgdHdlZW4ubW9kZS5tb3ZlKSB7XG4gICAgICAgICAgICByZXR1cm4geyAuLi50d2VlbiwgbW9kZTogeyAuLi50d2Vlbi5tb2RlLCBtb3ZlOiB7IHN0YXJ0OiB0d2Vlbi5tb2RlLm1vdmUuZW5kLCBlbmQ6IHR3ZWVuLm1vZGUubW92ZS5zdGFydCB9IH0gfTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodHdlZW4ubW9kZT8uJGNhc2UgPT09ICdyb3RhdGUnICYmIHR3ZWVuLm1vZGUucm90YXRlKSB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIC4uLnR3ZWVuLFxuICAg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cGF0aFxuICovXG4vKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xuZnVuY3Rpb24gbm9ybWFsaXplU3RyaW5nUG9zaXgocGF0aCwgYWxsb3dBYm92ZVJvb3QgPSBmYWxzZSkge1xuICAgIGxldCByZXMgPSAnJztcbiAgICBsZXQgbGFzdFNlZ21lbnRMZW5ndGggPSAwO1xuICAgIGxldCBsYXN0U2xhc2ggPSAtMTtcbiAgICBsZXQgZG90cyA9IDA7XG4gICAgbGV0IGNvZGU7XG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPD0gcGF0aC5sZW5ndGg7ICsraSkge1xuICAgICAgICBpZiAoaSA8IHBhdGgubGVuZ3RoKVxuICAgICAgICAgICAgY29kZSA9IHBhdGguY2hhckNvZGVBdChpKTtcbiAgICAgICAgZWxzZSBpZiAoY29kZSA9PT0gNDcgLyovKi8pXG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgZWxzZVxuICAgICAgICAgICAgY29kZSA9IDQ3OyAvKi8qL1xuICAgICAgICBpZiAoY29kZSA9PT0gNDcgLyovKi8pIHtcbiAgICAgICAgICAgIGlmIChsYXN0U2xhc2ggPT09IGkgLSAxIHx8IGRvdHMgPT09IDEpIHtcbiAgICAgICAgICAgICAgICAvLyBOT09QXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChsYXN0U2xhc2ggIT09IGkgLSAxICYmIGRvdHMgPT09IDIpIHtcbiAgICAgICAgICAgICAgICBpZiAocmVzLmxlbmd0aCA8IDIgfHxcbiAgICAgICAgICAgICAgICAgICAgbGFzdFNlZ21lbnRMZW5ndGggIT09IDIgfHxcbiAgICAgICAgICAgICAgICAgICAgcmVzLmNoYXJDb2RlQXQocmVzLmxlbmd0aCAtIDEpICE9PSA0NiAvKi4qLyB8fFxuICAgICAgICAgICAgICAgICAgICByZXMuY2hhckNvZGVBdChyZXMubGVuZ3RoIC0gMikgIT09IDQ2IC8qLiovKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXMubGVuZ3RoID4gMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbGFzdFNsYXNoSW5kZXggPSByZXMubGFzdEluZGV4T2YoJy8nKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsYXN0U2xhc2hJbmRleCAhPT0gcmVzLmxlbmd0aCAtIDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobGFzdFNsYXNoSW5kZXggPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcyA9ICcnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0U2VnbWVudExlbmd0aCA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXMgPSByZXMuc2xpY2UoMCwgbGFzdFNsYXNoSW5kZXgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0U2VnbWVudExlbmd0aCA9IHJlcy5sZW5ndGggLSAxIC0gcmVzLmxhc3RJbmRleE9mKCcvJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RTbGFzaCA9IGk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG90cyA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAocmVzLmxlbmd0aCA9PT0gMiB8fCByZXMubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXMgPSAnJztcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RTZWdtZW50TGVuZ3RoID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RTbGFzaCA9IGk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkb3RzID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChhbGxvd0Fib3ZlUm9vdCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAocmVzLmxlbmd0aCA+IDApXG4gICAgICAgICAgICAgICAgICAgICAgICByZXMgKz0gJy8uLic7XG4gICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlcyA9ICcuLic7XG4gICAgICAgICAgICAgICAgICAgIGxhc3RTZWdtZW50TGVuZ3RoID0gMjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAocmVzLmxlbmd0aCA+IDApXG4gICAgICAgICAgICAgICAgICAgIHJlcyArPSAnLycgKyBwYXRoLnNsaWNlKGxhc3RTbGFzaCArIDEsIGkpO1xuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgcmVzID0gcGF0aC5zbGljZShsYXN0U2xhc2ggKyAxLCBpKTtcbiAgICAgICAgICAgICAgICBsYXN0U2VnbWVudExlbmd0aCA9IGkgLSBsYXN0U2xhc2ggLSAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbGFzdFNsYXNoID0gaTtcbiAgICAgICAgICAgIGRvdHMgPSAwO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGNvZGUgPT09IDQ2IC8qLiovICYmIGRvdHMgIT09IC0xKSB7XG4gICAgICAgICAgICArK2RvdHM7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBkb3RzID0gLTE7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIH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wgY29tcG9uZW50KSB7XG4gICAgY29uc3QgZXhpc3RpbmdDb21wb25lbnREZWZpbml0aW9uID0gZW5naW5lLmdldENvbXBvbmVudE9yTnVsbChjb21wb25lbnQubmFtZSk7XG4gICAgaWYgKCFleGlzdGluZ0NvbXBvbmVudERlZmluaXRpb24pIHtcbiAgICAgICAgaWYgKGNvbXBvbmVudC5uYW1lLnN0YXJ0c1dpdGgoJ2NvcmU6OicpKSB7XG4gICAgICAgICAgICBpZiAoY29tcG9uZW50Lm5hbWUgaW4gY29tcG9uZW50RGVmaW5pdGlvbkJ5TmFtZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjb21wb25lbnREZWZpbml0aW9uQnlOYW1lW2NvbXBvbmVudC5uYW1lXShlbmdpbmUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBUaGUgY29yZSBjb21wb25lbnQgJHtjb21wb25lbnQubmFtZX0gd2FzIG5vdCBmb3VuZC5gKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChjb21wb25lbnQuanNvblNjaGVtYSkge1xuICAgICAgICAgICAgcmV0dXJuIGVuZ2luZS5kZWZpbmVDb21wb25lbnRGcm9tU2NoZW1hKGNvbXBvbmVudC5uYW1lLCBTY2hlbWFzLmZyb21Kc29uKGNvbXBvbmVudC5qc29uU2NoZW1hKSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYCR7Y29tcG9uZW50Lm5hbWV9IGlzIG5vdCBkZWZpbmVkIGFuZCB0aGVyZSBpcyBubyBzY2hlbWEgdG8gZGVmaW5lIGl0LmApO1xuICAgICAgICB9XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgICByZXR1cm4gZXhpc3RpbmdDb21wb25lbnREZWZpbml0aW9uO1xuICAgIH1cbn1cbi8qKlx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cm9iYWJseSBoYXMgYSBkaWZmZXJlbnQgcmVzb2x2ZWQgRW50aXR5TnVtYmVyXG4gICAgICAgICAgICAvLyBXZSdsbCBrbm93IHdpdGggdGhlIG1hcHBlZEVudGl0eWVzXG4gICAgICAgICAgICBpZiAoY29tcG9uZW50RGVmaW5pdGlvbi5jb21wb25lbnRJZCA9PT0gVHJhbnNmb3JtQ29tcG9uZW50TnVtYmVyKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgdHJhbnNmb3JtID0gY29tcG9uZW50VmFsdWU7XG4gICAgICAgICAgICAgICAgaWYgKHRyYW5zZm9ybS5wYXJlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgdHJhbnNmb3JtLnBhcmVudCA9IGdldENvbXBvc2l0ZUVudGl0eSh0cmFuc2Zvcm0ucGFyZW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRyYW5zZm9ybS5wYXJlbnQgPSBnZXRDb21wb3NpdGVFbnRpdHkoMCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIFRPRE86IGlzIGl0IGdvaW5nIHRvIGJlIG5lY2Vzc2FyeSB0byByZW1hcCBhc3NldHM/IGUuZy4gc3JjIHBhcmFtIGZyb20gQXVkaW9Tb3VyY2UgYW5kIEdsdGZDb250YWluZXJcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIFNjaGVtYXMubXV0YXRlTmVzdGVkVmFsdWVzKGNvbXBvbmVudERlZmluaXRpb24uc2NoZW1hLmpzb25TY2hlbWEsIGNvbXBvbmVudFZhbHVlLCAodmFsdWUsIHZhbHVlVHlwZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAodmFsdWVUeXBlLnNlcmlhbGl6YXRpb25UeXBlID09PSAnZW50aXR5Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgY2hhbmdlZDogdHJ1ZSwgdmFsdWU6IGdldENvbXBvc2l0ZUVudGl0eSh2YWx1ZSkgfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7IGNoYW5nZWQ6IGZhbHNlIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBjb25zdCBjb21wb3NpdGUgPSBDb21wb3NpdGVSb290Q29tcG9uZW50LmdldE11dGFibGVPck51bGwoY29tcG9zaXRlUm9vdEVudGl0eSkgfHwgQ29tcG9zaXRlUm9vdENvbXBvbmVudC5jcmVhdGUoY29tcG9zaXRlUm9vdEVudGl0eSk7XG4gICAgZm9yIChjb25zdCBbZW50aXR5U291cmNlLCB0YXJnZXRFbnRpdHldIG9mIG1hcHBlZEVudGl0aWVzKSB7XG4gICAgICAgIGNvbXBvc2l0ZS5lbnRpdGllcy5wdXNoKHtcbiAgICAgICAgICAgIHNyYzogZW50aXR5U291cmNlLFxuICAgICAgICAgICAgZGVzdDogdGFyZ2V0RW50aXR5XG4gICAgICAgIH0pO1xuICAgIH1cbiAgICBjb21wb3NpdGUuc3JjID0gY29tcG9zaXRlUmVzb3VyY2Uuc3JjO1xuICAgIHJldHVybiBjb21wb3NpdGVSb290RW50aXR5O1xufVxuIiwgIi8qIGVzbGludC1kaXNhYmxlICovXG5pbXBvcnQgX20wIGZyb20gXCJwcm90b2J1ZmpzL21pbmltYWxcIjtcbmltcG9ydCB7IFZhbHVlIH0gZnJvbSBcIi4vZ29vZ2xlL3Byb3RvYnVmL3N0cnVjdC5nZW5cIjtcbmNvbnN0IHByb3RvYnVmUGFja2FnZVNhcmFzYSA9IFwiXCI7XG5mdW5jdGlvbiBjcmVhdGVCYXNlQ29tcG9uZW50RGF0YSgpIHtcbiAgICByZXR1cm4geyBkYXRhOiB1bmRlZmluZWQgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIENvbXBvbmVudERhdGE7XG4oZnVuY3Rpb24gKENvbXBvbmVudERhdGEpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBzd2l0Y2ggKG1lc3NhZ2UuZGF0YT8uJGNhc2UpIHtcbiAgICAgICAgICAgIGNhc2UgXCJqc29uXCI6XG4gICAgICAgICAgICAgICAgVmFsdWUuZW5jb2RlKFZhbHVlLndyYXAobWVzc2FnZS5kYXRhLmpzb24pLCB3cml0ZXIudWludDMyKDEwKS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcImJpbmFyeVwiOlxuICAgICAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTgpLmJ5dGVzKG1lc3NhZ2UuZGF0YS5iaW5hcnkpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIENvbXBvbmVudERhdGEuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VDb21wb25lbnREYXRhKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGF0YSA9IHsgJGNhc2U6IFwianNvblwiLCBqc29uOiBWYWx1ZS51bndyYXAoVmFsdWUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kYXRhID0geyAkY2FzZTogXCJiaW5hcnlcIiwgYmluYXJ5OiByZWFkZXIuYnl0ZXMoKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvbmVudERhdGEuZGVjb2RlID0gZGVjb2RlO1xuICAgIGZ1bmN0aW9uIGZyb21KU09OKG9iamVjdCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgZGF0YTogaXNTZXQob2JqZWN0Lmpzb24pXG4gICAgICAgICA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NvbXBvc2l0ZUNvbXBvbmVudCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm5hbWUgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuanNvblNjaGVtYSA9IFZhbHVlLnVud3JhcChWYWx1ZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZW50cnkzID0gQ29tcG9zaXRlQ29tcG9uZW50X0RhdGFFbnRyeS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZW50cnkzLnZhbHVlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGF0YS5zZXQoZW50cnkzLmtleSwgZW50cnkzLnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvc2l0ZUNvbXBvbmVudC5kZWNvZGUgPSBkZWNvZGU7XG4gICAgZnVuY3Rpb24gZnJvbUpTT04ob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBuYW1lOiBpc1NldChvYmplY3QubmFtZSkgPyBTdHJpbmcob2JqZWN0Lm5hbWUpIDogXCJcIixcbiAgICAgICAgICAgIGpzb25TY2hlbWE6IGlzU2V0KG9iamVjdD8uanNvblNjaGVtYSkgPyBvYmplY3QuanNvblNjaGVtYSA6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGRhdGE6IGlzT2JqZWN0KG9iamVjdC5kYXRhKVxuICAgICAgICAgICAgICAgID8gT2JqZWN0LmVudHJpZXMob2JqZWN0LmRhdGEpLnJlZHVjZSgoYWNjLCBba2V5LCB2YWx1ZV0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgYWNjLnNldChOdW1iZXIoa2V5KSwgQ29tcG9uZW50RGF0YS5mcm9tSlNPTih2YWx1ZSkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICAgICAgICAgIH0sIG5ldyBNYXAoKSlcbiAgICAgICAgICAgICAgICA6IG5ldyBNYXAoKSxcbiAgICAgICAgfTtcbiAgICB9XG4gICAgQ29tcG9zaXRlQ29tcG9uZW50LmZyb21KU09OID0gZnJvbUpTT047XG4g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kuaW50MzIobWVzc2FnZS5rZXkpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnZhbHVlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIENvbXBvbmVudERhdGEuZW5jb2RlKG1lc3NhZ2UudmFsdWUsIHdyaXRlci51aW50MzIoMTgpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgQ29tcG9zaXRlQ29tcG9uZW50X0RhdGFFbnRyeS5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbXBvc2l0ZUNvbXBvbmVudF9EYXRhRW50cnkoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmtleSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gQ29tcG9uZW50RGF0YS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvc2l0ZUNvbXBvbmVudF9EYXRhRW50cnkuZGVjb2RlID0gZGVjb2RlO1xuICAgIGZ1bmN0aW9uIGZyb21KU09OKG9iamVjdCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAga2V5OiBpc1NldChvYmplY3Qua2V5KSA/IE51bWJlcihvYmplY3Qua2V5KSA6IDAsXG4gICAgICAgICAgICB2YWx1ZTogaXNTZXQob2JqZWN0LnZhbHVlKSA/IENvbXBvbmVudERhdGEuZnJvbUpTT04ob2JqZWN0LnZhbHVlKSA6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICB9XG4gICAgQ29tcG9zaXRlQ29tcG9uZW50X0RhdGFFbnRyeS5mcm9tSlNPTiA9IGZyb21KU09OO1xuICAgIGZ1bmN0aW9uIHRvSlNPTihtZXNzYWdlKSB7XG4gICAgICAgIGNvbnN0IG9iaiA9IHt9O1xuICAgICAgICBtZXNzYWdlLmtleSAhPT0gdW5kZWZpbmVkICYmIChvYmoua2V5ID0gTWF0aC5yb3VuZChtZXNzYWdlLmtleSkpO1xuICAgICAg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gZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbXBvc2l0ZURlZmluaXRpb24oKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZlcnNpb24gPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jb21wb25lbnRzLnB1c2goQ29tcG9zaXRlQ29tcG9uZW50LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvc2l0ZURlZmluaXRpb24uZGVjb2RlID0gZGVjb2RlO1xuICAgIGZ1bmN0aW9uIGZyb21KU09OKG9iamVjdCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdmVyc2lvbjogaXNTZXQob2JqZWN0LnZlcnNpb24pID8gTnVtYmVyKG9iamVjdC52ZXJzaW9uKSA6IDAsXG4gICAgICAgICAgICBjb21wb25lbnRzOiBBcnJheS5pc0FycmF5KG9iamVjdD8uY29tcG9uZW50cylcbiAgICAgICAgICAgICAgICA/IG9iamVjdC5jb21wb25lbnRzLm1hcCgoZSkgPT4gQ29tcG9zaXRlQ29tcG9uZW50LmZyb21KU09OKGUpKVxuICAgICAgICAgICAgICAgIDogW10sXG4gICAgICAgIH07XG4gICAgfVxuICAgIENvbXBvc2l0ZURlZmluaXRpb24uZnJvbUpTT04gPSBmcm9tSlNPTjtcbiAgICBmdW5jdGlvbiB0b0pTT04obWVzc2FnZSkge1xuICAgICAgICBjb25zdCBvYmogPSB7fTtcbiAgICAgICAgbWVzc2FnZS52ZXJzaW9uICE9PSB1bmRlZmluZWQgJiYgKG9iai52ZXJzaW9uID0gTWF0aC5yb3VuZChtZXNzYWdlLnZlcnNpb24pKTtcbiAgICAgICAgaWYgKG1lc3NhZ2UuY29tcG9uZW50cykge1xuICAgICAgICAgICAgb2JqLmNvbXBvbmVudHMgPSBtZXNzYWdlLmNvbXBvbmVudHMubWFwKChlKSA9PiBlID8gQ29tcG9zaXRlQ29tcG9uZW50LnRvSlNPTihlKSA6IHVuZGVmaW5lZCk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBvYmouY29tcG9uZW50cyA9IFt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dCBtZXNzYWdlID0gY3JlYXRlQmFzZVN0cnVjdCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBlbnRyeTEgPSBTdHJ1Y3RfRmllbGRzRW50cnkuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVudHJ5MS52YWx1ZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZpZWxkcy5zZXQoZW50cnkxLmtleSwgZW50cnkxLnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFN0cnVjdC5kZWNvZGUgPSBkZWNvZGU7XG4gICAgZnVuY3Rpb24gZnJvbUpTT04ob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBmaWVsZHM6IGlzT2JqZWN0KG9iamVjdC5maWVsZHMpXG4gICAgICAgICAgICAgICAgPyBPYmplY3QuZW50cmllcyhvYmplY3QuZmllbGRzKS5yZWR1Y2UoKGFjYywgW2tleSwgdmFsdWVdKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGFjYy5zZXQoa2V5LCB2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgICAgICAgICAgfSwgbmV3IE1hcCgpKVxuICAgICAgICAgICAgICAgIDogbmV3IE1hcCgpLFxuICAgICAgICB9O1xuICAgIH1cbiAgICBTdHJ1Y3QuZnJvbUpTT04gPSBmcm9tSlNPTjtcbiAgICBmdW5jdGlvbiB0b0pTT04obWVzc2FnZSkge1xuICAgICAgICBjb25zdCBvYmogPSB7fTtcbiAgICAgICAgb2JqLmZpZWxkcyA9IHt9O1xuICAgICAgICBpZiAobWVzc2FnZS5maWVsZHMpIHtcbiAgICAgICAgICAgIG1lc3NhZ2UuZmllbGRzLmZvckVhY2goKHYsIGspID0+IHtcbiAgICAgICAgICAgICAgICBvYmouZmllbGRzW2tdID0gdjtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIFN0cnVjdC50b0pTT04gPSB0b0pTT047XG4gICAgZnVuY3Rpb24gd3JhcChvYmplY3QpIHtcbiAgICAgICAgY29uc3Qgc3RydWN0ID0gY3JlYXRlQmFzZVN0cnVjdCgpO1xuICAgICAgICBpZiAob2JqZWN0ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIE9iamVjdC5rZXlzKG9iamVjdCkuZm9yRWFjaCgoa2V5KSA9PiB7XG4gICAgICAgICAgICAgICAgc3RydWN0LmZpZWxkcy5zZXQoa2V5LCBvYmplY3Rba2V5XSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc3RydWN0O1xuICAgIH1cbiAgICBTdHJ1Y3Qud3JhcCA9IHdyYXA7XG4gICAgZnVuY3Rpb24gdW53cmFwKG1lc3NhZ2UpIHtcbiAg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ICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlU3RydWN0X0ZpZWxkc0VudHJ5KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uua2V5ID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gVmFsdWUudW53cmFwKFZhbHVlLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9X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ci5jcmVhdGUoKSkge1xuICAgICAgICBzd2l0Y2ggKG1lc3NhZ2Uua2luZD8uJGNhc2UpIHtcbiAgICAgICAgICAgIGNhc2UgXCJudWxsVmFsdWVcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDgpLmludDMyKG1lc3NhZ2Uua2luZC5udWxsVmFsdWUpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcIm51bWJlclZhbHVlXCI6XG4gICAgICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNykuZG91YmxlKG1lc3NhZ2Uua2luZC5udW1iZXJWYWx1ZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwic3RyaW5nVmFsdWVcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDI2KS5zdHJpbmcobWVzc2FnZS5raW5kLnN0cmluZ1ZhbHVlKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJib29sVmFsdWVcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDMyKS5ib29sKG1lc3NhZ2Uua2luZC5ib29sVmFsdWUpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcInN0cnVjdFZhbHVlXCI6XG4gICAgICAgICAgICAgICAgU3RydWN0LmVuY29kZShTdHJ1Y3Qud3JhcChtZXNzYWdlLmtpbmQuc3RydWN0VmFsdWUpLCB3cml0ZXIudWludDMyKDQyKS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcImxpc3RWYWx1ZVwiOlxuICAgICAgICAgICAgICAgIExpc3RWYWx1ZS5lbmNvZGUoTGlzdFZhbHVlLndyYXAobWVzc2FnZS5raW5kLmxpc3RWYWx1ZSksIHdyaXRlci51aW50MzIoNTApLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgVmFsdWUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VWYWx1ZSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uua2luZCA9IHsgJGNhc2U6IFwibnVsbFZhbHVlXCIsIG51bGxWYWx1ZTogcmVhZGVyLmludDMyKCkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5raW5kID0geyAkY2FzZTogXCJudW1iZXJWYWx1ZVwiLCBudW1iZXJWYWx1ZTogcmVhZGVyLmRvdWJsZSgpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uua2luZCA9IHsgJGNhc2U6IFwic3RyaW5nVmFsdWVcIiwgc3RyaW5nVmFsdWU6IHJlYWRlci5zdHJpbmcoKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmtpbmQgPSB7ICRjYXNlOiBcImJvb2xWYWx1ZVwiLCBib29sVmFsdWU6IHJlYWRlci5ib29sKCkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5raW5kID0geyAkY2FzZTogXCJzdHJ1Y3RWYWx1ZVwiLCBzdHJ1Y3RWYWx1ZTogU3RydWN0LnVud3JhcChTdHJ1Y3QuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5raW5kID0geyAkY2FzZTogXCJsaXN0VmFsdWVcIiwgbGlzdFZhbHVlOiBMaXN0VmFsdWUudW53cmFwKExpc3RWYWx1ZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFZhbHVlLmRlY29kZSA9IGRlY29kZTtcbiAgICBmdW5jdGlvbiBmcm9tSlNPTihvYmplY3QpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGtpbmQ6IGlzU2V0KG9iamVjdC5udWxsVmFsdWUpXG4gICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcIm51bGxWYWx1ZVwiLCBudWxsVmFsdWU6IG51bGxWYWx1ZUZyb21KU09OKG9iamVjdC5udWxsVmFsdWUpIH1cbiAgICAgICAgICAgICAgICA6IGlzU2V0KG9iamVjdC5udW1iZXJWYWx1ZSlcbiAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcIm51bWJlclZhbHVlXCIsIG51bWJlclZhbHVlOiBOdW1iZXIob2JqZWN0Lm51bWJlclZhbHVlKSB9XG4gICAgICAgICAgICAgICAgICAgIDogaXNTZXQob2JqZWN0LnN0cmluZ1ZhbHVlKVxuICAgICAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcInN0cmluZ1ZhbHVlXCIsIHN0cmluZ1ZhbHVlOiBTdHJpbmcob2JqZWN0LnN0cmluZ1ZhbHVlKSB9XG4gICAgICAgICAgICAgICAgICAgICAgICA6IGlzU2V0KG9iamVjdC5ib29sVmFsdWUpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcImJvb2xWYWx1ZVwiLCBib29sVmFsdWU6IEJvb2xlYW4ob2JqZWN0LmJvb2xWYWx1ZSkgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogaXNTZXQob2JqZWN0LnN0cnVjdFZhbHVlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHsgJGNhc2U6IFwic3RydWN0VmFsdWVcIiwgc3RydWN0VmFsdWU6IG9iamVjdC5zdHJ1Y3RWYWx1ZSB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogaXNTZXQob2JqZWN0Lmxpc3RWYWx1ZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8geyAkY2FzZTogXCJsaXN0VmFsdWVcIiwgbGlzdFZhbHVlOiBbLi4ub2JqZWN0Lmxpc3RWYWx1ZV0gfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgfVxuICAgIFZhbHVlLmZyb21KU09OID0gZnJvbUpTT047XG4gICAgZnVuY3Rpb24gdG9KU09OKG1lc3NhZ2UpIHtcbiAgICAgICAgY29uc3Qgb2JqID0ge307XG4gICAgICAgIG1lc3NhZ2Uua2luZD8uJGNhc2UgPT09IFwibnVsbFZhbHVlXCIgJiZcbiAgICAgICAgICAgIChvYmoubnVsbFZhbHVlID0gbWVzc2FnZS5raW5kPy5udWxsVmFsdWUgIT09IHVuZGVmaW5lZCA/IG51bGxWYWx1ZVRvSlNPTihtZXNzYWdlLmtpbmQ/Lm51bGxWYWx1ZSkgOiB1bmRlZmluZWQpO1xuICAgICAgICBtZXNzYWdlLmtpbmQ/LiR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ChWYWx1ZS51bndyYXAoVmFsdWUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIExpc3RWYWx1ZS5kZWNvZGUgPSBkZWNvZGU7XG4gICAgZnVuY3Rpb24gZnJvbUpTT04ob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiB7IHZhbHVlczogQXJyYXkuaXNBcnJheShvYmplY3Q/LnZhbHVlcykgPyBbLi4ub2JqZWN0LnZhbHVlc10gOiBbXSB9O1xuICAgIH1cbiAgICBMaXN0VmFsdWUuZnJvbUpTT04gPSBmcm9tSlNPTjtcbiAgICBmdW5jdGlvbiB0b0pTT04obWVzc2FnZSkge1xuICAgICAgICBjb25zdCBvYmogPSB7fTtcbiAgICAgICAgaWYgKG1lc3NhZ2UudmFsdWVzKSB7XG4gICAgICAgICAgICBvYmoudmFsdWVzID0gbWVzc2FnZS52YWx1ZXMubWFwKChlKSA9PiBlKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIG9iai52YWx1ZXMgPSBbXTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gb2JqO1xuICAgIH1cbiAgICBMaXN0VmFsdWUudG9KU09OID0gdG9KU09OO1xuICAgIGZ1bmN0aW9uIHdyYXAoYXJyYXkpIHtcbiAgICAgICAgY29uc3QgcmVzdWx0ID0gY3JlYXRlQmFzZUxpc3RWYWx1ZSgpO1xuICAgICAgICByZXN1bHQudmFsdWVzID0gYXJyYXkgPz8gW107XG4gIC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cmVkO1xuICAgICAgICBjb25zdCB4ID0gMC41ICpcbiAgICAgICAgICAgICgyLjAgKiB2YWx1ZTIueCArXG4gICAgICAgICAgICAgICAgKC12YWx1ZTEueCArIHZhbHVlMy54KSAqIGFtb3VudCArXG4gICAgICAgICAgICAgICAgKDIuMCAqIHZhbHVlMS54IC0gNS4wICogdmFsdWUyLnggKyA0LjAgKiB2YWx1ZTMueCAtIHZhbHVlNC54KSAqXG4gICAgICAgICAgICAgICAgICAgIHNxdWFyZWQgK1xuICAgICAgICAgICAgICAgICgtdmFsdWUxLnggKyAzLjAgKiB2YWx1ZTIueCAtIDMuMCAqIHZhbHVlMy54ICsgdmFsdWU0LngpICogY3ViZWQpO1xuICAgICAgICBjb25zdCB5ID0gMC41ICpcbiAgICAgICAgICAgICgyLjAgKiB2YWx1ZTIueSArXG4gICAgICAgICAgICAgICAgKC12YWx1ZTEueSArIHZhbHVlMy55KSAqIGFtb3VudCArXG4gICAgICAgICAgICAgICAgKDIuMCAqIHZhbHVlMS55IC0gNS4wICogdmFsdWUyLnkgKyA0LjAgKiB2YWx1ZTMueSAtIHZhbHVlNC55KSAqXG4gICAgICAgICAgICAgICAgICAgIHNxdWFyZWQgK1xuICAgICAgICAgICAgICAgICgtdmFsdWUxLnkgKyAzLjAgKiB2YWx1ZTIueSAtIDMuMCAqIHZhbHVlMy55ICsgdmFsdWU0LnkpICogY3ViZWQpO1xuICAgICAgICBjb25zdCB6ID0gMC41ICpcbiAgICAgICAgICAgICgyLjAgKiB2YWx1ZTIueiArXG4gICAgICAgICAgICAgICAgKC12YWx1ZTEueiArIHZhbHVlMy56KSAqIGFtb3VudCArXG4gICAgICAgICAgICAgICAgKDIuMCAqIHZhbHVlMS56IC0gNS4wICogdmFsdWUyLnogKyA0LjAgKiB2YWx1ZTMueiAtIHZhbHVlNC56KSAqXG4gICAgICAgICAgICAgICAgICAgIHNxdWFyZWQgK1xuICAgICAgICAgICAgICAgICgtdmFsdWUxLnogKyAzLjAgKiB2YW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G9pbnQzKSB7XG4gICAgICAgIGNvbnN0IHgxID0gcG9pbnQyLnggLSBwb2ludDEueDtcbiAgICAgICAgY29uc3QgeTEgPSBwb2ludDIueSAtIHBvaW50MS55O1xuICAgICAgICBjb25zdCB6MSA9IHBvaW50Mi56IC0gcG9pbnQxLno7XG4gICAgICAgIGNvbnN0IHgyID0gcG9pbnQzLnggLSBwb2ludDEueDtcbiAgICAgICAgY29uc3QgeTIgPSBwb2ludDMueSAtIHBvaW50MS55O1xuICAgICAgICBjb25zdCB6MiA9IHBvaW50My56IC0gcG9pbnQxLno7XG4gICAgICAgIGNvbnN0IHl6ID0geTEgKiB6MiAtIHoxICogeTI7XG4gICAgICAgIGNvbnN0IHh6ID0gejEgKiB4MiAtIHgxICogejI7XG4gICAgICAgIGNvbnN0IHh5ID0geDEgKiB5MiAtIHkxICogeDI7XG4gICAgICAgIGNvbnN0IHB5dGggPSBNYXRoLnNxcnQoeXogKiB5eiArIHh6ICogeHogKyB4eSAqIHh5KTtcbiAgICAgICAgbGV0IGludlB5dGg7XG4gICAgICAgIGlmIChweXRoICE9PSAwKSB7XG4gICAgICAgICAgICBpbnZQeXRoID0gMS4wIC8gcHl0aDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGludlB5dGggPSAwLjA7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3Qgbm9ybWFsID0gVmVjdG9yMy5jcmVhdGUoeXogKiBpbnZQeXRoLCB4eiAqIGludlB5dGgsIHh5ICogaW52UHl0aCk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBub3JtYWwsXG4gICAgICAgICAgICBkOiAtKG5vcm1hbC54ICogcG9pbnQxLnggKyBub3JtYWwueSAqIHBvaW50MS55ICsgbm9ybWFsLnogKiBwb2ludDEueilcbiAgICAgICAgfTtcbiAgICB9XG4gICAgUGxhbmUuY29weUZyb21Qb2ludHMgPSBjb3B5RnJvbVBvaW50cztcbiAgICAvKipcbiAgICAgKiB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byB1c2VcbiAgICAgKiBAcGFyYW0gYW5nbGUgLSBkZWZpbmVzIHRoZSBhbmdsZSAoaW4gcmFkaWFucykgdG8gdXNlXG4gICAgICogQHBhcmFtIHJlc3VsdCAtIGRlZmluZXMgdGhlIHRhcmdldCBtYXRyaXhcbiAgICAgKi9cbiAgICBmdW5jdGlvbiByb3RhdGlvbkF4aXNUb1JlZihfYXhpcywgYW5nbGUsIHJlc3VsdCkge1xuICAgICAgICBjb25zdCBzID0gTWF0aC5zaW4oLWFuZ2xlKTtcbiAgICAgICAgY29uc3QgYyA9IE1hdGguY29zKC1hbmdsZSk7XG4gICAgICAgIGNvbnN0IGMxID0gMSAtIGM7XG4gICAgICAgIGNvbnN0IGF4aXMgPSBWZWN0b3IzLm5vcm1hbGl6ZShfYXhpcyk7XG4gICAgICAgIGNvbnN0IG0gPSByZXN1bHQuX207XG4gICAgICAgIG1bMF0gPSBheGlzLnggKiBheGlzLnggKiBjMSArIGM7XG4gICAgICAgIG1bMV0gPSBheGlzLnggKiBheGlzLnkgKiBjMSAtIGF4aXMueiAqIHM7XG4gICAgICAgIG1bMl0gPSBheGlzLnggKiBheGlzLnogKiBjMSArIGF4aXMueSAqIHM7XG4gICAgICAgIG1bM10gPSAwLjA7XG4gICAgICAgIG1bNF0gPSBheGlzLnkgKiBheGlzLnggKiBjMSArIGF4aXMueiAqIHM7XG4gICAgICAgIG1bNV0gPSBheGlzLnkgKiBheGlzLnkgKiBjMSArIGM7XG4gICAgICAgIG1bNl0gPSBheGlzLnkgKiBheGlzLnogKiBjMSAtIGF4aXMueCAqIHM7XG4gICAgICAgIG1bN10gPSAwLjA7XG4gICAgICAgIG1bOF0gPSBheGlzLnogKiBheGlzLnggKiBjMSAtIGF4aXMueSAqIHM7XG4gICAgICAgIG1bOV0gPSBheGlzLnogKiBheGlzLnkgKiBjMSArIGF4aXMueCAqIHM7XG4gICAgICAgIG1bMTBdID0gYXhpcy56ICogYXhpcy56ICogYzEgKyBjO1xuICAgICAgICB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mYWxzZTtcbiAgICAgICAgc2VsZi5pc0lkZW50aXR5M3gyID0gZmFsc2U7XG4gICAgICAgIHNlbGYuX2lzSWRlbnRpdHlEaXJ0eSA9IHRydWU7XG4gICAgICAgIHNlbGYuX2lzSWRlbnRpdHkzeDJEaXJ0eSA9IHRydWU7XG4gICAgfVxuICAgIC8vIFByb3BlcnRpZXNcbiAgICAvKipcbiAgICAgKiBDaGVjayBpZiB0aGUgY3VycmVudCBtYXRyaXggaXMgaWRlbnRpdHlcbiAgICAgKiBAcmV0dXJucyB0cnVlIGlzIHRoZSBtYXRyaXggaXMgdGhlIGlkZW50aXR5IG1hdHJpeFxuICAgICAqL1xuICAgIGZ1bmN0aW9uIGlzSWRlbnRpdHlVcGRhdGUoc2VsZikge1xuICAgICAgICBpZiAoc2VsZi5faXNJZGVudGl0eURpcnR5KSB7XG4gICAgICAgICAgICBzZWxmLl9pc0lkZW50aXR5RGlydHkgPSBmYWxzZTtcbiAgICAgICAgICAgIGNvbnN0IG0gPSBzZWxmLl9tO1xuICAgICAgICAgICAgc2VsZi5pc0lkZW50aXR5ID1cbiAgICAgICAgICAgICAgICBtWzBdID09PSAxLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVsxXSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bMl0gPT09IDAuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzNdID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVs0XSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bNV0gPT09IDEuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzZdID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVs3XSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bOF0gPT09IDAuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzldID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVsxMF0gPT09IDEuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzExXSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bMTJdID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVsxM10gPT09IDAuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzE0XSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bMTVdID09PSAxLjA7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHNlbGYuaXNJZGVudGl0eTtcbiAgICB9XG4gICAgTWF0cml4LmlzSWRlbnRpdHlVcGRhdGUgPSBpc0lkZW50aXR5VXBkYXRlO1xuICAgIC8qKlxuICAgICAqIENoZWNrIGlmIHRoZSBjdXJyZW50IG1hdHJpeCBpcyBpZGVudGl0eSBhcyBhIHRleHR1cmUgbWF0cml4ICgzeDIgc3RvcmUgaW4gNHg0KVxuICAgICAqIEByZXR1cm5zIHRydWUgaXMgdGhlIG1hdHJpeCBpcyB0aGUgaWRlbnRpdHkgbWF0cml4XG4gICAgICovXG4gICAgZnVuY3Rpb24gaXNJZGVudGl0eUFzM3gyVXBkYXRlKHNlbGYpIHtcbiAgICAgICAgaWYgKHNlbGYuX2lzSWRlbnRpdHkzeDJEaXJ0eSkge1xuICAgICAgICAgICAgc2VsZi5faXNJZGVudGl0eTN4MkRpcnR5ID0gZmFsc2U7XG4gICAgICAgICAgICBpZiAoc2VsZi5fbVswXSAhPT0gMS4wIHx8IHNlbGYuX21bNV0gIT09IDEuMCB8fCBzZWxmLl9tWzE1XSAhPT0gMS4wKSB7XG4gICAgICAgICAgICAgICAgc2VsZi5pc0lkZW50aXR5M3gyID0gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChzZWxmLl9tWzFdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzJdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzNdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzRdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzZdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzddICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzhdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzldICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzEwXSAhPT0gMC4wIHx8XG4gICAgICAgICAgICAgICAgc2VsZi5fbVsxMV0gIT09IDAuMCB8fFxuICAgICAgICAgICAgICAgIHNlbGYuX21bMTJdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzEzXSAhPT0gMC4wIHx8XG4gICAgICAgICAgICAgICAgc2VsZi5fbVsxNF0gIT09IDAuMCkge1xuICAgICAgICAgICAgICAgIHNlbGYuaXNJZGVudGl0eTN4MiA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgc2VsZi5pc0lkZW50aXR5M3gyID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc2VsZi5pc0lkZW50aXR5M3gyO1xuICAgIH1cbiAgICBNYXRyaXguaXNJZGVudGl0eUFzM3gyVXBkYXRlID0gaXNJZGVudGl0eUFzM3gyVXBkYXRlO1xuICAgIC8qKlxuICAgICAqIEdldHMgdGhlIGRldGVybWluYW50IG9mIHRoZSBtYXRyaXhcbiAgICAgKiBAcmV0dXJucyB0aGUgbWF0cml4IGRldGVybWluYW50XG4gICAgICovXG4gICAgZnVuY3Rpb24gZGV0ZXJtaW5hbnQoc2VsZikge1xuICAgICAgICBpZiAoc2VsZi5pc0lkZW50aXR5ID09PSB0cnVlKSB7XG4gICAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdC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uc3QgZGV0ID0gbTAwICogY29mYWN0XzAwICsgbTAxICogY29mYWN0XzAxICsgbTAyICogY29mYWN0XzAyICsgbTAzICogY29mYWN0XzAzO1xuICAgICAgICBpZiAoZGV0ID09PSAwKSB7XG4gICAgICAgICAgICBjb3B5KHNvdXJjZSwgcmVzdWx0KTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBkZXRJbnYgPSAxIC8gZGV0O1xuICAgICAgICBjb25zdCBkZXRfMTJfMzMgPSBtMTIgKiBtMzMgLSBtMzIgKiBtMTM7XG4gICAgICAgIGNvbnN0IGRldF8xMV8zMyA9IG0xMSAqIG0zMyAtIG0zMSAqIG0xMztcbiAgICAgICAgY29uc3QgZGV0XzExXzMyID0gbTExICogbTMyIC0gbTMxICogbTEyO1xuICAgICAgICBjb25zdCBkZXRfMTBfMzMgPSBtMTAgKiBtMzMgLSBtMzAgKiBtMTM7XG4gICAgICAgIGNvbnN0IGRldF8xMF8zMiA9IG0xMCAqIG0zMiAtIG0zMCAqIG0xMjtcbiAgICAgICAgY29uc3QgZGV0XzEwXzMxID0gbTEwICogbTMxIC0gbTMwICogbTExO1xuICAgICAgICBjb25zdCBkZXRfMTJfMjMgPSBtMTIgKiBtMjMgLSBtMjIgKiBtMTM7XG4gICAgICAgIGNvbnN0IGRldF8xMV8yMyA9IG0xMSAqIG0yMyAtIG0yMSAqIG0xMztcbiAgICAgICAgY29uc3QgZGV0XzExXzIyID0gbTExICogbTIyIC0gbTIxICogbTEyO1xuICAgICAgICBjb25zdCBkZXRfMTBfMjMgPSBtMTAgKiBtMjMgLSBtMjAgKiBtMTM7XG4gICAgICAgIGNvbnN0IGRldF8xMF8yMiA9IG0xMCAqIG0yMiAtIG0yMCAqIG0xMjtcbiAgICAgICAgY29uc3QgZGV0XzEwXzIxID0gbTEwICogbTIxIC0gbTIwICogbTExO1xuICAgICAgICBjb25zdCBjb2ZhY3RfMTAgPSAtKG0wMSAqIGRldF8yM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9IG90aGVyTVs5XSwgb20xMCA9IG90aGVyTVsxMF0sIG9tMTEgPSBvdGhlck1bMTFdO1xuICAgICAgICBjb25zdCBvbTEyID0gb3RoZXJNWzEyXSwgb20xMyA9IG90aGVyTVsxM10sIG9tMTQgPSBvdGhlck1bMTRdLCBvbTE1ID0gb3RoZXJNWzE1XTtcbiAgICAgICAgLy8gdHNsaW50OmVuYWJsZTpvbmUtdmFyaWFibGUtcGVyLWRlY2xhcmF0aW9uXG4gICAgICAgIHJlc3VsdFtvZmZzZXRdID0gdG0wICogb20wICsgdG0xICogb200ICsgdG0yICogb204ICsgdG0zICogb20xMjtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDFdID0gdG0wICogb20xICsgdG0xICogb201ICsgdG0yICogb205ICsgdG0zICogb20xMztcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDJdID0gdG0wICogb20yICsgdG0xICogb202ICsgdG0yICogb20xMCArIHRtMyAqIG9tMTQ7XG4gICAgICAgIHJlc3VsdFtvZmZzZXQgKyAzXSA9IHRtMCAqIG9tMyArIHRtMSAqIG9tNyArIHRtMiAqIG9tMTEgKyB0bTMgKiBvbTE1O1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgNF0gPSB0bTQgKiBvbTAgKyB0bTUgKiBvbTQgKyB0bTYgKiBvbTggKyB0bTcgKiBvbTEyO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgNV0gPSB0bTQgKiBvbTEgKyB0bTUgKiBvbTUgKyB0bTYgKiBvbTkgKyB0bTcgKiBvbTEzO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgNl0gPSB0bTQgKiBvbTIgKyB0bTUgKiBvbTYgKyB0bTYgKiBvbTEwICsgdG03ICogb20xNDtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDddID0gdG00ICogb20zICsgdG01ICogb203ICsgdG02ICogb20xMSArIHRtNyAqIG9tMTU7XG4gICAgICAgIHJlc3VsdFtvZmZzZXQgKyA4XSA9IHRtOCAqIG9tMCArIHRtOSAqIG9tNCArIHRtMTAgKiBvbTggKyB0bTExICogb20xMjtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDldID0gdG04ICogb20xICsgdG05ICogb201ICsgdG0xMCAqIG9tOSArIHRtMTEgKiBvbTEzO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgMTBdID0gdG04ICogb20yICsgdG05ICogb202ICsgdG0xMCAqIG9tMTAgKyB0bTExICogb20xNDtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDExXSA9IHRtOCAqIG9tMyArIHRtOSAqIG9tNyArIHRtMTAgKiBvbTExICsgdG0xMSAqIG9tMTU7XG4gICAgICAgIHJlc3VsdFtvZmZzZXQgKyAxMl0gPSB0bTEyICogb20wICsgdG0xMyAqIG9tNCArIHRtMTQgKiBvbTggKyB0bTE1ICogb20xMjtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDEzXSA9IHRtMTIgKiBvbTEgKyB0bTEzICogb201ICsgdG0xNCAqIG9tOSArIHRtMTUgKiBvbTEzO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgMTRdID0gdG0xMiAqIG9tMiArIHRtMTMgKiBvbTYgKyB0bTE0ICogb20xMCArIHRtMTUgKiBvbTE0O1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgMTVdID0gdG0xMiAqIG9tMyArIHRtMTMgKiBvbTcgKyB0bTE0ICogb20xMSArIHRtMTUgKiBvbTE1O1xuICAgIH1cbiAgICBNYXRyaXgubXVsdGlwbHlUb0FycmF5ID0gbXVsdGlwbHlUb0FycmF5O1xuICAgIC8qKlxuICAgICAqIENoZWNrIGVxdWFsaXR5IGJldHdlZW4gc2VsZiBtYXRyaXggYW5kIGEgc2Vjb25kIG9uZVxuICAgICAqIEBwYXJhbSB2YWx1ZSAtIGRlZmluZXMgdGhlIHNlY29uZCBtYXRyaXggdG8gY29tcGFyZVxuICAgICAqIEByZXR1cm5zIHRydWUgaXMgdGhlIGN1cnJlbnQgbWF0cml4IGFuZCB0aGUgZ2l2ZW4gb25lIHZhbHVlcyBhcmUgc3RyaWN0bHkgZXF1YWxcbiAgICAgKi9cbiAgICBmdW5jdGlvbiBlcXVhbHMoc2VsZiwgdmFsdWUpIHtcbiAgICAgICAgY29uc3Qgb3RoZXIgPSB2YWx1ZTtcbiAgICAgICAgaWYgKCFvdGhlcikge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIGlmIChzZWxmLmlzSWRlbnRpdHkgfHwgb3RoZXIuaXNJZGVudGl0eSkge1xuICAgICAgICAgICAgaWYgKCFzZWxmLl9pc0lkZW50aXR5RGlydHkgJiYgIW90aGVyLl9pc0lkZW50aXR5RGlydHkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gc2VsZi5pc0lkZW50aXR5ICYmIG90aGVyLmlzSWRlbnRpdHk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgbSA9IHNlbGYuX207XG4gICAgICAgIGNvbnN0IG9tID0gb3RoZXIuX207XG4gICAgICAgIHJldHVybiAobVswXSA9PT0gb21bMF0gJiZcbiAgICAgICAgICAgIG1bMV0gPT09IG9tWzFdICYmXG4gICAgICAgICAgICBtWzJdID09PSBvbVsyXSAmJlxuICAgICAgICAgICAgbVszXSA9PT0gb21bM10gJiZcbiAgICAgICAgICAgIG1bNF0gPT09IG9tWzRdICYmXG4gICAgICAgICAgICBtWzVdID09PSBvbVs1XSAmJlxuICAgICAgICAgICAgbVs2XSA9PT0gb21bNl0gJiZcbiAgICAgICAgICAgIG1bN10gPT09IG9tWzddICYmXG4gICAgICAgICAgICBtWzhdID09PSBvbVs4XSAmJlxuICAgICAgICAgICAgbVs5XSA9PT0gb21bOV0gJiZcbiAgICAgICAgICAgIG1bMTBdID09PSBvbVsxMF0gJiZcbiAgICAgICAgICAgIG1bMTFdID09PSBvbVsxMV0gJiZcbiAgICAgICAgICAgIG1bMTJdID09PSBvbVsxMl0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24ueiA9IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBtID0gc2VsZi5fbTtcbiAgICAgICAgaWYgKHRyYW5zbGF0aW9uKSB7XG4gICAgICAgICAgICB0cmFuc2xhdGlvbi54ID0gbVsxMl07XG4gICAgICAgICAgICB0cmFuc2xhdGlvbi55ID0gbVsxM107XG4gICAgICAgICAgICB0cmFuc2xhdGlvbi56ID0gbVsxNF07XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgdXNlZFNjYWxlID0gc2NhbGUgfHwgVmVjdG9yMy5aZXJvKCk7XG4gICAgICAgIHVzZWRTY2FsZS54ID0gTWF0aC5zcXJ0KG1bMF0gKiBtWzBdICsgbVsxXSAqIG1bMV0gKyBtWzJdICogbVsyXSk7XG4gICAgICAgIHVzZWRTY2FsZS55ID0gTWF0aC5zcXJ0KG1bNF0gKiBtWzRdICsgbVs1XSAqIG1bNV0gKyBtWzZdICogbVs2XSk7XG4gICAgICAgIHVzZWRTY2FsZS56ID0gTWF0aC5zcXJ0KG1bOF0gKiBtWzhdICsgbVs5XSAqIG1bOV0gKyBtWzEwXSAqIG1bMTBdKTtcbiAgICAgICAgaWYgKGRldGVybWluYW50KHNlbGYpIDw9IDApIHtcbiAgICAgICAgICAgIHVzZWRTY2FsZS55ICo9IC0xO1xuICAgICAgICB9XG4gICAgICAgIGlmICh1c2VkU2NhbGUueCA9PT0gMCB8fCB1c2VkU2NhbGUueSA9PT0gMCB8fCB1c2VkU2NhbGUueiA9PT0gMCkge1xuICAgICAgICAgICAgaWYgKHJvdGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgcm90YXRpb24udyA9IDE7XG4gICAgICAgICAgICAgICAgcm90YXRpb24ueCA9IDA7XG4gICAgICAgICAgICAgICAgcm90YXRpb24ueSA9IDA7XG4gICAgICAgICAgICAgICAgcm90YXRpb24ueiA9IDA7XG4gICAgICAgICAgICB9XG4gICA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ICAgICAgICBjb25zdCByaWdodCA9IFZlY3RvcjMubm9ybWFsaXplKFZlY3RvcjMuY3Jvc3ModXAsIGZvcndhcmROZXcpKTtcbiAgICAgICAgY29uc3QgdXBOZXcgPSBWZWN0b3IzLmNyb3NzKGZvcndhcmROZXcsIHJpZ2h0KTtcbiAgICAgICAgY29uc3QgbTAwID0gcmlnaHQueDtcbiAgICAgICAgY29uc3QgbTAxID0gcmlnaHQueTtcbiAgICAgICAgY29uc3QgbTAyID0gcmlnaHQuejtcbiAgICAgICAgY29uc3QgbTEwID0gdXBOZXcueDtcbiAgICAgICAgY29uc3QgbTExID0gdXBOZXcueTtcbiAgICAgICAgY29uc3QgbTEyID0gdXBOZXcuejtcbiAgICAgICAgY29uc3QgbTIwID0gZm9yd2FyZE5ldy54O1xuICAgICAgICBjb25zdCBtMjEgPSBmb3J3YXJkTmV3Lnk7XG4gICAgICAgIGNvbnN0IG0yMiA9IGZvcndhcmROZXcuejtcbiAgICAgICAgY29uc3QgbnVtOCA9IG0wMCArIG0xMSArIG0yMjtcbiAgICAgICAgY29uc3QgcXVhdGVybmlvbiA9IGNyZWF0ZSgpO1xuICAgICAgICBpZiAobnVtOCA+IDApIHtcbiAgICAgICAgICAgIGxldCBudW0gPSBNYXRoLnNxcnQobnVtOCArIDEpO1xuICAgICAgICAgICAgcXVhdGVybmlvbi53ID0gbnVtICogMC41O1xuICAgICAgICAgICAgbnVtID0gMC41IC8gbnVtO1xuICAgICAgICAgICAgcXVhdGVybmlvbi54ID0gKG0xMiAtIG0yMSkgKiBudW07XG4gICAgICAgICAgICBxdWF0ZXJuaW9uLnkgPSAobTIwIC0gbTAyKSAqIG51bTtcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueiA9IChtMDEgLSBtMTApICogbnVtO1xuICAgICAgICAgICAgcmV0dXJuIHF1YXRlcm5pb247XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG0wMCA+PSBtMTEgJiYgbTAwID49IG0yMikge1xuICAgICAgICAgICAgY29uc3QgbnVtNyA9IE1hdGguc3FydCgxICsgbTAwIC0gbTExIC0gbTIyKTtcbiAgICAgICAgICAgIGNvbnN0IG51bTQgPSAwLjUgLyBudW03O1xuICAgICAgICAgICAgcXVhdGVybmlvbi54ID0gMC41ICogbnVtNztcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueSA9IChtMDEgKyBtMTApICogbnVtNDtcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueiA9IChtMDIgKyBtMjApICogbnVtNDtcbiAgICAgICAgICAgIHF1YXRlcm5pb24udyA9IChtMTIgLSBtMjEpICogbnVtNDtcbiAgICAgICAgICAgIHJldHVybiBxdWF0ZXJuaW9uO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtMTEgPiBtMjIpIHtcbiAgICAgICAgICAgIGNvbnN0IG51bTYgPSBNYXRoLnNxcnQoMSArIG0xMSAtIG0wMCAtIG0yMik7XG4gICAgICAgICAgICBjb25zdCBudW0zID0gMC41IC8gbnVtNjtcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueCA9IChtMTAgKyBtMDEpICogbnVtMztcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueSA9IDAuNSAqIG51bTY7XG4gICAgICAgICAgICBxdWF0ZXJuaW9uLnogPSAobTIxICsgbTEyKSAqIG51bTM7XG4gICAgICAgICAgICBxdWF0ZXJuaW9uLncgPSAobTIwIC0gbTAyKSAqIG51bTM7XG4gICAgICAgICAgICByZXR1cm4gcXVhdGVybmlvbjtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBudW01ID0gTWF0aC5zcXJ0KDEgKyBtMjIgLSBtMDAgLSBtMTEpO1xuICAgICAgICBjb25zdCBudW0yID0gMC41IC8gbnVtNTtcbiAgICAgICAgcXVhdGVybmlvbi54ID0gKG0yMCArIG0wMikgKiBudW0yO1xuICAgICAgICBxdWF0ZXJuaW9uLnkgPSAobTIxICsgbTEyKSAqIG51bTI7XG4gICAgICAgIHF1YXRlcm5pb24ueiA9IDAuNSAqI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AgICAvLyBxIHdpbGwgaGF2ZSBhIG1hZ25pdHVkZSBvZiAwLjUgb3IgZ3JlYXRlciBpZiBhbmQgb25seSBpZiBxIGlzIGEgc2luZ3VsYXJpdHkgY2FzZVxuICAgICAgICBjb25zdCB0ZXN0ID0gcS54ICogcS53IC0gcS55ICogcS56O1xuICAgICAgICBpZiAodGVzdCA+IDAuNDk5NSAqIHVuaXQpIHtcbiAgICAgICAgICAgIC8vIHNpbmd1bGFyaXR5IGF0IG5vcnRoIHBvbGVcbiAgICAgICAgICAgIG91dC54ID0gTWF0aC5QSSAvIDI7XG4gICAgICAgICAgICBvdXQueSA9IDIgKiBNYXRoLmF0YW4yKHEueSwgcS54KTtcbiAgICAgICAgICAgIG91dC56ID0gMDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICh0ZXN0IDwgLTAuNDk5NSAqIHVuaXQpIHtcbiAgICAgICAgICAgIC8vIHNpbmd1bGFyaXR5IGF0IHNvdXRoIHBvbGVcbiAgICAgICAgICAgIG91dC54ID0gLU1hdGguUEkgLyAyO1xuICAgICAgICAgICAgb3V0LnkgPSAtMiAqIE1hdGguYXRhbjIocS55LCBxLngpO1xuICAgICAgICAgICAgb3V0LnogPSAwO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgLy8gbm8gc2luZ3VsYXJpdHkgLSBxIGlzIHRoZSBtYWpvcml0eSBvZiBjYXNlc1xuICAgICAgICAgICAgb3V0LnggPSBNYXRoLmFzaW4oMiAqIChxLncgKiBxLnggLSBxLnkgKiBxLnopKTtcbiAgICAgICAgICAgIG91dC55ID0gTWF0aC5hdGFuMigyICogcS53ICogcS55ICsgMiAqIHEueiAqIHEueCwgMSAtIDIgKiAocS54ICogcS54ICsgcS55ICogcS55KSk7XG4gICAgICAgICAgICBvdXQueiA9IE1hdGguYXRhbjIoMiAqIHEudyAqIHEueiArIDIgKiBxLnggKiBxLnksIDEgLSAyICogKHEueiAqIHEueiArIHEueCAqIHEue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ExIC0gbTIyIC0gbTMzKTtcbiAgICAgICAgICAgIHJlc3VsdC53ID0gKG0zMiAtIG0yMykgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnggPSAwLjI1ICogcztcbiAgICAgICAgICAgIHJlc3VsdC55ID0gKG0xMiArIG0yMSkgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnogPSAobTEzICsgbTMxKSAvIHM7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAobTIyID4gbTMzKSB7XG4gICAgICAgICAgICBzID0gMi4wICogTWF0aC5zcXJ0KDEuMCArIG0yMiAtIG0xMSAtIG0zMyk7XG4gICAgICAgICAgICByZXN1bHQudyA9IChtMTMgLSBtMzEpIC8gcztcbiAgICAgICAgICAgIHJlc3VsdC54ID0gKG0xMiArIG0yMSkgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnkgPSAwLjI1ICogcztcbiAgICAgICAgICAgIHJlc3VsdC56ID0gKG0yMyArIG0zMikgLyBzO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgcyA9IDIuMCAqIE1hdGguc3FydCgxLjAgKyBtMzMgLSBtMTEgLSBtMjIpO1xuICAgICAgICAgICAgcmVzdWx0LncgPSAobTIxIC0gbTEyKSAvIHM7XG4gICAgICAgICAgICByZXN1bHQueCA9IChtMTMgKyBtMzEpIC8gcztcbiAgICAgICAgICAgIHJlc3VsdC55ID0gKG0yMyArIG0zMikgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnogPSAwLjI1ICogcztcbiAgICAgICAgfVxuICAgIH1cbiAgICBRdWF0ZXJuaW9uLmZyb21Sb3RhdGlvbk1hdHJpeFRvUmVmID0gZnJvbVJvdGF0aW9uTWF0cml4VG9SZWY7XG4gICAgLyoqXG4gICAgICogSW50ZXJwb2xhdGVzIGJldHdlZW4gdHdvIHF1YXRlcm5pb25zXG4gICAgICogQHBhcmFtIGxlZnQgLSBkZWZpbmVzIGZpcnN0IHF1YXRlcm5pb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WdodC55ICsgbGVmdC56ICogcmlnaHQueiArIGxlZnQudyAqIHJpZ2h0Lnc7XG4gICAgICAgIGxldCBmbGFnID0gZmFsc2U7XG4gICAgICAgIGlmIChudW00IDwgMCkge1xuICAgICAgICAgICAgZmxhZyA9IHRydWU7XG4gICAgICAgICAgICBudW00ID0gLW51bTQ7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG51bTQgPiAwLjk5OTk5OSkge1xuICAgICAgICAgICAgbnVtMyA9IDEgLSBhbW91bnQ7XG4gICAgICAgICAgICBudW0yID0gZmxhZyA/IC1hbW91bnQgOiBhbW91bnQ7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBjb25zdCBudW01ID0gTWF0aC5hY29zKG51bTQpO1xuICAgICAgICAgICAgY29uc3QgbnVtNiA9IDEuMCAvIE1hdGguc2luKG51bTUpO1xuICAgICAgICAgICAgbnVtMyA9IE1hdGguc2luKCgxLjAgLSBhbW91bnQpICogbnVtNSkgKiBudW02O1xuICAgICAgICAgICAgbnVtMiA9IGZsYWdcbiAgICAgICAgICAgICAgICA/IC1NYXRoLnNpbihhbW91bnQgKiBudW01KSAqIG51bTZcbiAgICAgICAgICAgICAgICA6IE1hdGguc2luKGFtb3VudCAqIG51bTUpICogbnVtNjtcbiAgICAgICAgfVxuICAgICAgICByZXN1bHQueCA9IG51bTMgKiBsZWZ0LnggKyBudW0yICogcmlnaHQueDtcbiAgICAgICAgcmVzdWx0LnkgPSBudW0zICogbGVmdC55ICsgbnVtMiAqIHJpZ2h0Lnk7XG4gICAgICAgIHJlc3VsdC56ID0gbnVtMyAqIGxlZnQueiArIG51bTIgKiByaWdodC56O1xuICAgICAgICByZXN1bHQudyA9IG51bTMgKiBsZWZ0LncgKyBudW0yICogcmlnaHQudztcbiAgICB9XG4gICAgUXVhdGVybmlvbi5zbGVycFRvUmVmID0gc2xlcnBUb1JlZjtcbiAgICAvKipcbiAgICAgKiBNdWx0aXBsaWVzIHR3byBxdW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ICBpZiAoY2FsbGJhY2spXG4gICAgICAgICAgICBjYWxsYmFjaygpO1xuICAgICAgICByZXR1cm47XG4gICAgfVxuICAgIGZ1bmN0aW9uIHVwZGF0ZVRyZWUoaW5zdGFuY2UsIHByb3BzKSB7XG4gICAgICAgIHVwc2VydENvbXBvbmVudChpbnN0YW5jZSwgcHJvcHMsICd1aVRyYW5zZm9ybScpO1xuICAgIH1cbiAgICBmdW5jdGlvbiB1cHNlcnRMaXN0ZW5lcihpbnN0YW5jZSwgdXBkYXRlKSB7XG4gICAgICAgIGlmICh1cGRhdGUudHlwZSA9PT0gJ2RlbGV0ZScgfHwgIXVwZGF0ZS5wcm9wcykge1xuICAgICAgICAgICAgY2xpY2tFdmVudHMuZ2V0KGluc3RhbmNlLmVudGl0eSk/LmRlbGV0ZShnZXRQb2ludGVyRW51bSh1cGRhdGUuY29tcG9uZW50KSk7XG4gICAgICAgICAgICBpZiAodXBkYXRlLmNvbXBvbmVudCA9PT0gJ29uTW91c2VEb3duJykge1xuICAgICAgICAgICAgICAgIHBvaW50ZXJFdmVudHMucmVtb3ZlT25Qb2ludGVyRG93bihpbnN0YW5jZS5lbnRpdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAodXBkYXRlLmNvbXBvbmVudCA9PT0gJ29uTW91c2VVcCcpIHtcbiAgICAgICAgICAgICAgICBwb2ludGVyRXZlbnRzLnJlbW92ZU9uUG9pbnRlclVwKGluc3RhbmNlLmVudGl0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cbiAgICAgICAgaWYgKHVwZGF0ZS5wcm9wcykge1xuICAgICAgICAgICAgY29uc3QgcG9pbnRlckV2ZW50ID0gZ2V0UG9pbnRlckVudW0odXBkYXRlLmNvbXBvbmVudCk7XG4gICAgICAgICAgICBjb25zdCBlbnRpdHlFdmVudCA9IGNsaWNrRXZlbnRzLmdldChpbnN0YW5jZS5lbnRpdHkpIHx8IGNs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ICAgIH1cbiAgICBmdW5jdGlvbiByZW1vdmVDb21wb25lbnQoaW5zdGFuY2UsIGNvbXBvbmVudCkge1xuICAgICAgICBjb25zdCBjb21wb25lbnRJZCA9IGdldENvbXBvbmVudElkW2NvbXBvbmVudF07XG4gICAgICAgIGNvbnN0IENvbXBvbmVudCA9IGVuZ2luZS5nZXRDb21wb25lbnQoY29tcG9uZW50SWQpO1xuICAgICAgICBDb21wb25lbnQuZGVsZXRlRnJvbShpbnN0YW5jZS5lbnRpdHkpO1xuICAgIH1cbiAgICBmdW5jdGlvbiB1cHNlcnRDb21wb25lbnQoaW5zdGFuY2UsIHByb3BzID0ge30sIGNvbXBvbmVudE5hbWUpIHtcbiAgICAgICAgY29uc3QgY29tcG9uZW50SWQgPSBnZXRDb21wb25lbnRJZFtjb21wb25lbnROYW1lXTtcbiAgICAgICAgY29uc3Qgb25DaGFuZ2VFeGlzdHMgPSAnb25DaGFuZ2UnIGluIHByb3BzO1xuICAgICAgICBjb25zdCBvblN1Ym1pdEV4aXN0cyA9ICdvblN1Ym1pdCcgaW4gcHJvcHM7XG4gICAgICAgIGNvbnN0IGVudGl0eVN0YXRlID0gY2hhbmdlRXZlbnRzLmdldChpbnN0YW5jZS5lbnRpdHkpPy5nZXQoY29tcG9uZW50SWQpO1xuICAgICAgICBjb25zdCBvbkNoYW5nZSA9IG9uQ2hhbmdlRXhpc3RzXG4gICAgICAgICAgICA/IHByb3BzWydvbkNoYW5nZSddXG4gICAgICAgICAgICA6IGVudGl0eVN0YXRlPy5vbkNoYW5nZUNhbGxiYWNrO1xuICAgICAgICBjb25zdCBvblN1Ym1pdCA9IG9uU3VibWl0RXhpc3RzXG4gICAgICAgICAgICA/IHByb3BzWydvblN1Ym1pdCddXG4gICAgICAgICAgICA6IGVudGl0eVN0YXRlPy5vblN1Ym1pdENhbGxiYWNrO1xuICAgICAgICBpZiAob25DaGFuZ2VFeGlzdHMgfHwgb25TdWJtaXRFeGlzdHMpIHtcbiAgICAgICAgICAgIHVwZGF0ZU9uQ2hhbmdlKGluc3RhbmNlLmVudGl0eSwgY29tcG9uZW50SWQsIHtcbiAgICAgICAgICAgICAgICBvbkNoYW5nZUNhbGxiYWNrOiBvbkNoYW5nZSxcbiAgICAgICAgICAgICAgICBvblN1Ym1pdENhbGxiYWNrOiBvblN1Ym1pdFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICBkZWxldGUgcHJvcHMub25DaGFuZ2U7XG4gICAgICAgICAgICBkZWxldGUgcHJvcHMub25TdWJtaXQ7XG4gICAgICAgIH1cbiAgICAgICAgLy8gV2UgY2hlY2sgaWYgdGhlcmUgaXMgYW55IGtleSBwZW5kaW5nIHRvIGJlIGNoYW5nZWQgdG8gYXZvaWQgdXBkYXRpbmcgdGhlIGV4aXN0aW5nIGNvbXBvbmVudFxuICAgICAgICBpZiAoIU9iamVjdC5rZXlzKHByb3BzKS5sZW5ndGgpIHtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBDb21wb25lbnREZWYgPSBlbmdpbmUuZ2V0Q29tcG9uZW50KGNvbXBvbmVudElkKTtcbiAgICAgICAgY29uc3QgY29tcG9uZW50ID0gQ29tcG9uZW50RGVmLmdldE11dGFibGVPck51bGwoaW5zdGFuY2UuZW50aXR5KSB8fCBDb21wb25lbnREZWYuY3JlYXRlKGluc3RhbmNlLmVudGl0eSk7XG4gICAgICAgIGZvciAoY29uc3Qga2V5IGluIHByb3BzKSB7XG4gICAgICAgICAgICBjb25zdCBrZXlQcm9wID0ga2V5O1xuICAgICAgICAgICAgY29tcG9uZW50W2tleVByb3BdID0gcHJvcHNba2V5UHJvcF07XG4gICAgICAgIH1cbiAgICB9XG4gICAgZnVuY3Rpb24gcmVtb3ZlQ2hpbGRFbnRpdHkoaW5zdGFuY2UpIHtcbiAgICAgICAgY2hhbmdlRXZlbnRzLmRlbGV0ZShpbnN0YW5jZS5lbnRpdHkpO1xuICAgICAgICBlbmdpbmUucmVtb3Zl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0Q2FsbGJhY2s7XG4gICAgICAgIGNvbnN0IHZhbHVlID0gc3RhdGU/LnZhbHVlID8/IG9sZFN0YXRlPy52YWx1ZTtcbiAgICAgICAgY29uc3QgaXNTdWJtaXQgPSBzdGF0ZT8uaXNTdWJtaXQgPz8gb2xkU3RhdGU/LmlzU3VibWl0O1xuICAgICAgICBldmVudC5zZXQoY29tcG9uZW50SWQsIHsgb25DaGFuZ2VDYWxsYmFjaywgb25TdWJtaXRDYWxsYmFjaywgdmFsdWUsIGlzU3VibWl0IH0pO1xuICAgIH1cbiAgICBjb25zdCBob3N0Q29uZmlnID0ge1xuICAgICAgICAuLi5ub29wQ29uZmlnLFxuICAgICAgICBjcmVhdGVJbnN0YW5jZSh0eXBlLCBwcm9wcykge1xuICAgICAgICAgICAgY29uc3QgZW50aXR5ID0gZW5naW5lLmFkZEVudGl0eSgpO1xuICAgICAgICAgICAgZW50aXRpZXMuYWRkKGVudGl0eSk7XG4gICAgICAgICAgICBjb25zdCBpbnN0YW5jZSA9IHtcbiAgICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgICAgX2NoaWxkOiBbXSxcbiAgICAgICAgICAgICAgICBwYXJlbnQ6IENBTlZBU19ST09UX0VOVElUWSxcbiAgICAgICAgICAgICAgICByaWdodE9mOiB1bmRlZmluZWRcbiAgICAgICAgICAgIH07XG4gICAgICAgICAgICBmb3IgKGNvbnN0IGtleSBpbiBwcm9wcykge1xuICAgICAgICAgICAgICAgIGNvbnN0IGtleVR5cGVkID0ga2V5O1xuICAgICAgICAgICAgICAgIGlmIChrZXlUeXBlZCA9PT0gJ2NoaWxkcmVuJyB8fCBrZXlUeXBlZCA9PT0gJ2tleScpIHtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChpc0xpc3RlbmVyKGtleVR5cGVkKSkge1xuICAgICAgICAgICAgICAgICAgICB1cHNlcnRMaXN0ZW5lcihpbnN0YW5jZSwge1xuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZTogJ2FkZCcsXG4gICAgICAgICAgICAgICAgICAgICAgICBwcm9wczogcHJvcHNba2V5VHlwZWRdLFxuICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50OiBrZXlUeXBlZFxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHVwc2VydENvbXBvbmVudChpbnN0YW5jZSwgcHJvcHNba2V5VHlwZWRdLCBrZXlUeXBlZCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGluc3RhbmNlO1xuICAgICAgICB9LFxuICAgICAgICBhcHBlbmRDaGlsZCxcbiAgICAgICAgYXBwZW5kQ2hpbGRUb0NvbnRhaW5lcjogYXBwZW5kQ2hpbGQsXG4gICAgICAgIGFwcGVuZEluaXRpYWxDaGlsZDogYXBwZW5kQ2hpbGQsXG4gICAgICAgIHJlbW92ZUNoaWxkOiByZW1vdmVDaGlsZCxcbiAgICAgICAgcHJlcGFyZVVwZGF0ZShfaW5zdGFuY2UsIF90eXBlLCBvbGRQcm9wcywgbmV3UHJvcHMpIHtcbiAgICAgICAgICAgIHJldHVybiBjb21wb25lbnRLZXlzXG4gICAgICAgICAgICAgICAgLm1hcCgoY29tcG9uZW50KSA9PiBwcm9wc0NoYW5nZWQoY29tcG9uZW50LCBvbGRQcm9wc1tjb21wb25lbnRdLCBuZXdQcm9wc1tjb21wb25lbnRdKSlcbiAgICAgICAgICAgICAgICAuZmlsdGVyKGlzTm90VW5kZWZpbmVkKTtcbiAgICAgICAgfSxcbiAgICAgICAgY29tbWl0VXBkYXRlKGluc3RhbmNlLCB1cGRhdGVQYXlsb2FkLCBfdHlwZSwgX3ByZXZQcm9wcywgX25leHRQcm9wcywgX2ludGVybmFsSGFuZGxlKSB7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IHVwZGF0ZSBvZiB1cGRhdGVQYXlsb2FkKSB7XG4gICAgICAgICAgICAgICAgaWYgKGlzTGlzdGVuZXIodXBkYXRlLmNvbXBvbmVudCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdXBzZXJ0TGlzdGVuZXIoaW5zdGFuY2UsIHVwZGF0ZSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAodXBkYXRlLnR5cGUgPT09ICdkZWxldGUnKSB7XG4gICAgICAgICAgICAgICAgICAgIHJlbW92ZUNvbXBvbmVudChpbnN0YW5jZSwgdXBkYXRlLmNvbXBvbmVudCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHVwZGF0ZS5wcm9wcykge1xuICAgICAgICAgICAgICAgICAgICB1cHNlcnRDb21wb25lbnQoaW5zdGFuY2UsIHVwZGF0ZS5wcm9wcywgdXBkYXRlLmNvbXBvbmVudCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBpbnNlcnRCZWZvcmUocGFyZW50SW5zdGFuY2UsIGNoaWxkLCBiZWZvcmVDaGlsZCkge1xuICAgICAgICAgICAgY29uc3QgYmVmb3JlQ2hpbGRJbmRleCA9IHBhcmVudEluc3RhbmNlLl9jaGlsZC5maW5kSW5kZXgoKGMpID0+IGMuZW50aXR5ID09PSBiZWZvcmVDaGlsZC5lbnRpdHkpO1xuICAgICAgICAgICAgcGFyZW50SW5zdGFuY2UuX2NoaWxkID0gW1xuICAgICAgICAgICAgICAgIC4uLnBhcmVudEluc3RhbmNlLl9jaGlsZC5zbGljZSgwLCBiZWZvcmVDaGlsZEluZGV4KSxcbiAgICAgICAgICAgICAgICBjaGlsZCxcbiAgICAgICAgICAgICAgICAuLi5wYXJlbnRJbnN0YW5jZS5fY2hpbGQuc2xpY2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GVybmFsXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBnZXRUZXh0dXJlTW9kZShtb2RlKSB7XG4gICAgY29uc3QgdmFsdWUgPSBtb2RlID8gcGFyc2VUZXh0dXJlTW9kZVttb2RlXSA6IDEgLyogQmFja2dyb3VuZFRleHR1cmVNb2RlLkNFTlRFUiAqLztcbiAgICByZXR1cm4geyB0ZXh0dXJlTW9kZTogdmFsdWUgfTtcbn1cbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBnZXRUZXh0dXJlKHByb3BzKSB7XG4gICAgaWYgKHByb3BzLnRleHR1cmUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHRleDoge1xuICAgICAgICAgICAgICAgICRjYXNlOiAndGV4dHVyZScsXG4gICAgICAgICAgICAgICAgdGV4dHVyZTogcGFyc2VUZXh0dXJlKHByb3BzLnRleHR1cmUpXG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfVxuICAgIGlmIChwcm9wcy5hdmF0YXJUZXh0dXJlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0ZXg6IHtcbiAgICAgICAgICAgICAgICAkY2FzZTogJ2F2YXRhclRleHR1cmUnLFxuICAgICAgICAgICAgICAgIGF2YXRhclRleHR1cmU6IHBhcnNlVGV4dHVyZShwcm9wcy5hdmF0YXJUZXh0dXJlKVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH1cbiAgICByZXR1cm4gdW5kZWZpbmVkO1xufVxuZnVuY3Rpb24gcGFyc2VUZXh0dXJlKHRleHR1cmUpIHtcbiAgICByZXR1cm4ge1xuICAgICAgICAuLi50ZXh0dXJlLFxuICAgICAgICB3cmFwTW9kZTogdGV4dHVyZS53cmFwTW9kZSA/IHBhcnNlV3JhcFt0ZXh0dXJlLndyYXBNb2RlXSA6IHVuZGVmaW5lZCxcbiAgICAgICAgZmlsdGVyTW9kZTogdGV4dHVyZS5maWx0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uZW50TmFtZS5UUklHR0VSUywge1xuICAgIHZhbHVlOiBTY2hlbWFzLkFycmF5KFxuICAgICAgU2NoZW1hcy5NYXAoe1xuICAgICAgICB0eXBlOiBTY2hlbWFzLkVudW1TdHJpbmc8VHJpZ2dlclR5cGU+KFxuICAgICAgICAgIFRyaWdnZXJUeXBlLFxuICAgICAgICAgIFRyaWdnZXJUeXBlLk9OX0NMSUNLLFxuICAgICAgICApLFxuICAgICAgICBjb25kaXRpb25zOiBTY2hlbWFzLk9wdGlvbmFsKFxuICAgICAgICAgIFNjaGVtYXMuQXJyYXkoXG4gICAgICAgICAgICBTY2hlbWFzLk1hcCh7XG4gICAgICAgICAgICAgIGlkOiBTY2hlbWFzLk9wdGlvbmFsKFNjaGVtYXMuSW50KSxcbiAgICAgICAgICAgICAgdHlwZTogU2NoZW1hcy5FbnVtU3RyaW5nPFRyaWdnZXJDb25kaXRpb25UeXBlPihcbiAgICAgICAgICAgICAgICBUcmlnZ2VyQ29uZGl0aW9uVHlwZSxcbiAgICAgICAgICAgICAgICBUcmlnZ2VyQ29uZGl0aW9uVHlwZS5XSEVOX1NUQVRFX0lTLFxuICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICB2YWx1ZTogU2NoZW1hcy5TdHJpbmcsXG4gICAgICAgICAgICB9KSxcbiAgICAgICAgICApLFxuICAgICAgICApLFxuICAgICAgICBvcGVyYXRpb246IFNjaGVtYXMuT3B0aW9uYWwoXG4gICAgICAgICAgU2NoZW1hcy5FbnVtU3RyaW5nPFRyaWdnZXJDb25kaXRpb25PcGVyYXRpb24+KFxuICAgICAgICAgICAgVHJpZ2dlckNvbmRpdGlvbk9wZXJhdGlvbixcbiAgICAgICAgICAgIFRyaWdnZXJDb25kaXRpb25PcGVyYXRpb24uQU5ELFxuICAgICAgICAgICksXG4gICAgICAgICksXG4gICAgICAgIGFjdGlvbnM6IFNjaGVtYXMuQXJyYXkoXG4gICAgICAgICAgU2NoZW1hcy5NYXAoe1xuICAgICAgICAg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dGlhbGl6ZSBhY3Rpb25zIGZvciBnaXZlbiBlbnRpdHlcbiAgICBjb25zdCB0eXBlcyA9IGFjdGlvbnMudmFsdWUucmVkdWNlKFxuICAgICAgKHR5cGVzLCBhY3Rpb24pID0+IHR5cGVzLmFkZChhY3Rpb24udHlwZSksXG4gICAgICBuZXcgU2V0PFN0cmluZz4oKSxcbiAgICApXG5cbiAgICBmb3IgKGNvbnN0IHR5cGUgb2YgdHlwZXMpIHtcbiAgICAgIHN3aXRjaCAodHlwZSkge1xuICAgICAgICBjYXNlIEFjdGlvblR5cGUuUExBWV9BTklNQVRJT046IHtcbiAgICAgICAgICBpbml0UGxheUFuaW1hdGlvbihlbnRpdHkpXG4gICAgICAgICAgYnJlYWtcbiAgICAgICAgfVxuICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgIGJyZWFrXG4gICAgICB9XG4gICAgfVxuXG4gICAgLy8gYmluZCBhY3Rpb25zXG4gICAgY29uc3QgYWN0aW9uRXZlbnRzID0gZ2V0QWN0aW9uRXZlbnRzKGVudGl0eSlcbiAgICBmb3IgKGNvbnN0IGFjdGlvbiBvZiBhY3Rpb25zLnZhbHVlKSB7XG4gICAgICBhY3Rpb25FdmVudHMub24oYWN0aW9uLm5hbWUsICgpID0+IHtcbiAgICAgICAgc3dpdGNoIChhY3Rpb24udHlwZSkge1xuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5QTEFZX0FOSU1BVElPTjoge1xuICAgICAgICAgICAgaGFuZGxlUGxheUFuaW1hdGlvbihcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuUExBWV9BTklNQVRJT04+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU1RPUF9BTklNQVRJT046IHtcbiAgICAgICAgICAgIGhhbmRsZVN0b3BBbmltYXRpb24oXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlNUT1BfQU5JTUFUSU9OPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNFVF9TVEFURToge1xuICAgICAgICAgICAgaGFuZGxlU2V0U3RhdGUoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU0VUX1NUQVRFPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNUQVJUX1RXRUVOOiB7XG4gICAgICAgICAgICBoYW5kbGVTdGFydFR3ZWVuKGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlNUQVJUX1RXRUVOPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNFVF9DT1VOVEVSOiB7XG4gICAgICAgICAgICBoYW5kbGVTZXRDb3VudGVyKGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlNFVF9DT1VOVEVSPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLklOQ1JFTUVOVF9DT1VOVEVSOiB7XG4gICAgICAgICAgICBoYW5kbGVJbmNyZW1lbnRDb3VudGVyKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5JTkNSRU1FTlRfQ09VTlRFUj4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5ERUNSRUFTRV9DT1VOVEVSOiB7XG4gICAgICAgICAgICBoYW5kbGVEZWNyZWFzZUNvdW50ZXIoXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLkRFQ1JFQVNFX0NPVU5URVI+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuUExBWV9TT1VORDoge1xuICAgICAgICAgICAgaGFuZGxlUGxheVNvdW5kKGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlBMQVlfU09VTkQ+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU1RPUF9TT1VORDoge1xuICAgICAgICAgICAgaGFuZGxlU3RvcFNvdW5kKGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlNUT1BfU09VTkQ+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU0VUX1ZJU0lCSUxJVFk6IHtcbiAgICAgICAgICAgIGhhbmRsZVNldFZpc2liaWxpdHkoXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlNFVF9WSVNJQklMSVRZPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLkFUVEFDSF9UT19QTEFZRVI6IHtcbiAgICAgICAgICAgIGhhbmRsZUF0dGFjaFRvUGxheWVyKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5BVFRBQ0hfVE9fUExBWUVSPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLkRFVEFDSF9GUk9NX1BMQVlFUjoge1xuICAgICAgICAgICAgaGFuZGxlRGV0YWNoRnJvbVBsYXllcihcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuREVUQUNIX0ZST01fUExBWUVSPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlBMQVlfVklERU9fU1RSRUFNOiB7XG4gICAgICAgICAgICBoYW5kbGVQbGF5VmlkZW8oXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlBMQVlfVklERU9fU1RSRUFNPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNUT1BfVklERU9fU1RSRUFNOiB7XG4gICAgICAgICAgICBoYW5kbGVTdG9wVmlkZW8oXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlNUT1BfVklERU9fU1RSRUFNPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlBMQVlfQVVESU9fU1RSRUFNOiB7XG4gICAgICAgICAgICBoYW5kbGVQbGF5QXVkaW9TdHJlYW0oXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlBMQVlfQVV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GJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TVE9QX0RFTEFZOiB7XG4gICAgICAgICAgICBoYW5kbGVTdG9wRGVsYXkoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RPUF9ERUxBWT4oYWN0aW9uKSlcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TVEFSVF9MT09QOiB7XG4gICAgICAgICAgICBoYW5kbGVTdGFydExvb3AoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RBUlRfTE9PUD4oYWN0aW9uKSlcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TVE9QX0xPT1A6IHtcbiAgICAgICAgICAgIGhhbmRsZVN0b3BMb29wKGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlNUT1BfTE9PUD4oYWN0aW9uKSlcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5DTE9ORV9FTlRJVFk6IHtcbiAgICAgICAgICAgIGhhbmRsZUNsb25lRW50aXR5KFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5DTE9ORV9FTlRJVFk+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuUkVNT1ZFX0VOVElUWToge1xuICAgICAgICAgICAgaGFuZGxlUmVtb3ZlRW50aXR5KFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5SRU1PVkVfRU5USVRZPihhY3Rpb24pLFxuICAgICAgIC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CBzdGF0ZXMgPSBTdGF0ZXMuZ2V0T3JOdWxsKGVudGl0eSlcbiAgICAgICAgICAgIGlmIChzdGF0ZXMgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgY29uc3QgY3VycmVudFZhbHVlID0gZ2V0Q3VycmVudFZhbHVlKHN0YXRlcylcbiAgICAgICAgICAgICAgcmV0dXJuIGN1cnJlbnRWYWx1ZSAhPT0gY29uZGl0aW9uLnZhbHVlXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIFRyaWdnZXJDb25kaXRpb25UeXBlLldIRU5fQ09VTlRFUl9FUVVBTFM6IHtcbiAgICAgICAgICAgIGNvbnN0IGNvdW50ZXIgPSBDb3VudGVyLmdldE9yTnVsbChlbnRpdHkpXG4gICAgICAgICAgICBpZiAoY291bnRlciAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBjb25zdCBudW1lcmljID0gTnVtYmVyKGNvbmRpdGlvbi52YWx1ZSlcbiAgICAgICAgICAgICAgaWYgKCFpc05hTihudW1lcmljKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjb3VudGVyLnZhbHVlID09PSBudW1lcmljXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgVHJpZ2dlckNvbmRpdGlvblR5cGUuV0hFTl9DT1VOVEVSX0lTX0dSRUFURVJfVEhBTjoge1xuICAgICAgICAgICAgY29uc3QgY291bnRlciA9IENvdW50ZXIuZ2V0T3JOdWxsKGVudGl0eSlcbiAgICAgICAgICAgIGlmIChjb3VudGVyICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIGNvbnN0IG51bWVyaWMgPSBOdW1iZXIoY29uZGl0aW9uLnZhbHVlKVxuICAgICAgICAgICAgICBpZiAoIWlzTmFOKG51bWVyaWMpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvdW50ZXIudmFsdWUgPiBudW1lcmljXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgVHJpZ2dlckNvbmRpdGlvblR5cGUuV0hFTl9DT1VOVEVSX0lTX0xFU1NfVEhBTjoge1xuICAgICAgICAgICAgY29uc3QgY291bnRlciA9IENvdW50ZXIuZ2V0T3JOdWxsKGVudGl0eSlcbiAgICAgICAgICAgIGlmIChjb3VudGVyICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIGNvbnN0IG51bWVyaWMgPSBOdW1iZXIoY29uZGl0aW9uLnZhbHVlKVxuICAgICAgICAgICAgICBpZiAoIWlzTmFOKG51bWVyaWMpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvdW50ZXIudmFsdWUgPCBudW1lcmljXG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICBjb25zb2xlLmVycm9yKCdFcnJvciBpbiBjb25kaXRpb24nLCBjb25kaXRpb24pXG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBmYWxzZVxuICB9XG5cbiAgZnVuY3Rpb24gZ2V0RW50aXR5QnlJZDxUIGV4dGVuZHMgeyBpZDogbnVtYmVyIH0+KFxuICAgIGNvbXBvbmVudE5hbWU6IHN0cmluZyxcbiAgICBpZDogbnVtYmVyLFxuICApIHtcbiAgICBjb25zdCBDb21wb25lbnQgPSBlbmdpbmUuZ2V0Q29tcG9uZW50KFxuICAgICAgY29tcG9uZW50TmFtZSxcbiAgICApIGFzIExhc3RXcml0ZVdpbkVsZW1lbnRTZXRDb21wb25lbnREZWZpbml0aW9uPFQ+XG4gICAgY29uc3QgZW50aXRpZXMgPSBBcnJheS5mcm9tKGVuZ2luZS5nZXRFb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xuICAgIHRoaXMuX29ic2VydmVycy5mb3JFYWNoKChvYnMpID0+IHtcbiAgICAgIGlmIChzdGF0ZS5za2lwTmV4dE9ic2VydmVycykge1xuICAgICAgICByZXR1cm5cbiAgICAgIH1cbiAgICAgIGlmIChvYnMuX3dpbGxCZVVucmVnaXN0ZXJlZCkge1xuICAgICAgICByZXR1cm5cbiAgICAgIH1cbiAgICAgIGlmIChvYnMubWFzayAmIG1hc2spIHtcbiAgICAgICAgaWYgKG9icy5zY29wZSkge1xuICAgICAgICAgIHAgPSBwLnRoZW4oKGxhc3RSZXR1cm5lZFZhbHVlKSA9PiB7XG4gICAgICAgICAgICBzdGF0ZS5sYXN0UmV0dXJuVmFsdWUgPSBsYXN0UmV0dXJuZWRWYWx1ZVxuICAgICAgICAgICAgcmV0dXJuIG9icy5jYWxsYmFjay5hcHBseShvYnMuc2NvcGUsIFtldmVudERhdGEsIHN0YXRlXSlcbiAgICAgICAgICB9KVxuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHAgPSBwLnRoZW4oKGxhc3RSZXR1cm5lZFZhbHVlKSA9PiB7XG4gICAgICAgICAgICBzdGF0ZS5sYXN0UmV0dXJuVmFsdWUgPSBsYXN0UmV0dXJuZWRWYWx1ZVxuICAgICAgICAgICAgcmV0dXJuIG9icy5jYWxsYmFjayhldmVudERhdGEsIHN0YXRlKVxuICAgICAgICAgIH0pXG4gICAgICAgIH1cbiAgICAgICAgaWYgKG9icy51bnJlZ2lzdGVyT25OZXh0Q2FsbCkge1xuICAgICAgICAgIHRoaXMuX2RlZmVyVW5yZWdpc3RlcihvYnMpXG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9KVxuXG4gICAgLy8gcmV0dXJuIHRoZSBldmVudERhdGFcbiAgICByZXR1cm4gcC50aGVuKCgpID0+IHtcbiAgICAgIHJldHVybiBldmVudERhdGFcbiAgICB9KVxuICB9XG5cbiAgLyoqXG4gICAqIE5vdGlmeSBhIHNwZWNpZmljIG9ic2VydmVyX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AgcGFyYW1zW29mZnNldF0gPSBmdW5jdGlvbiBjYWxsYmFjayhlcnIvKiwgdmFyYXJncyAqLykge1xyXG4gICAgICAgICAgICBpZiAocGVuZGluZykge1xyXG4gICAgICAgICAgICAgICAgcGVuZGluZyA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgaWYgKGVycilcclxuICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyKTtcclxuICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBwYXJhbXMgPSBuZXcgQXJyYXkoYXJndW1lbnRzLmxlbmd0aCAtIDEpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBvZmZzZXQgPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIHdoaWxlIChvZmZzZXQgPCBwYXJhbXMubGVuZ3RoKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXNbb2Zmc2V0KytdID0gYXJndW1lbnRzW29mZnNldF07XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZS5hcHBseShudWxsLCBwYXJhbXMpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfTtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICBmbi5hcHBseShjdHggfHwgbnVsbCwgcGFyYW1zKTtcclxuICAgICAgICB9IGNhdGNoIChlcnIpIHtcclxuICAgICAgICAgICAgaWYgKHBlbmRpbmcpIHtcclxuICAgICAgICAgICAgICAgIHBlbmRpbmcgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgIHJlamVjdChlcnIpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcbn1cclxuIiwgIlwidXNlIHN0cmljdFwiO1xyXG5cclxuLyoqXHJcbiAqIEEgbWluaW1hbCBiYXNlNjQgaW1wbGVtZW50YXRpb24gZm9yIG51bWJlciBhcnJheXMuXHJcbiAqIEBtZW1iZ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N0cmluZy5cclxuICogQHBhcmFtIHtVaW50OEFycmF5fSBidWZmZXIgU291cmNlIGJ1ZmZlclxyXG4gKiBAcGFyYW0ge251bWJlcn0gc3RhcnQgU291cmNlIHN0YXJ0XHJcbiAqIEBwYXJhbSB7bnVtYmVyfSBlbmQgU291cmNlIGVuZFxyXG4gKiBAcmV0dXJucyB7c3RyaW5nfSBCYXNlNjQgZW5jb2RlZCBzdHJpbmdcclxuICovXHJcbmJhc2U2NC5lbmNvZGUgPSBmdW5jdGlvbiBlbmNvZGUoYnVmZmVyLCBzdGFydCwgZW5kKSB7XHJcbiAgICB2YXIgcGFydHMgPSBudWxsLFxyXG4gICAgICAgIGNodW5rID0gW107XHJcbiAgICB2YXIgaSA9IDAsIC8vIG91dHB1dCBpbmRleFxyXG4gICAgICAgIGogPSAwLCAvLyBnb3RvIGluZGV4XHJcbiAgICAgICAgdDsgICAgIC8vIHRlbXBvcmFyeVxyXG4gICAgd2hpbGUgKHN0YXJ0IDwgZW5kKSB7XHJcbiAgICAgICAgdmFyIGIgPSBidWZmZXJbc3RhcnQrK107XHJcbiAgICAgICAgc3dpdGNoIChqKSB7XHJcbiAgICAgICAgICAgIGNhc2UgMDpcclxuICAgICAgICAgICAgICAgIGNodW5rW2krK10gPSBiNjRbYiA+PiAyXTtcclxuICAgICAgICAgICAgICAgIHQgPSAoYiAmIDMpIDw8IDQ7XHJcbiAgICAgICAgICAgICAgICBqID0gMTtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIDE6XHJcbiAgICAgICAgICAgICAgICBjaHVua1tpKytdID0gYjY0W3QgfCBiID4+IDRdO1xyXG4gICAgICAgICAgICAgICAgdCA9IChiICYgMTUpIDw8IDI7XHJcbiAgICAgICAgICAgICAgICBqID0gMjtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIDI6XHJcbiAgICAgICAgICAgICAgICBjaHVua1tpKytdID0gYjY0W3QgfCBiID4+IDZdO1xyXG4gICAgICAgICAgICAgICAgY2h1bmtbaSsrXSA9IGI2NFtiICYgNjNdO1xyXG4gICAgICAgICAgICAgICAgaiA9IDA7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKGkgPiA4MTkxKSB7XHJcbiAgICAgICAgICAgIChwYXJ0cyB8fCAocGFydHMgPSBbXSkpLnB1c2goU3RyaW5nLmZyb21DaGFyQ29kZS5hcHBseShTdHJpbmcsIGNodW5rKSk7XHJcbiAgICAgICAgICAgIGkgPSAwO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIGlmIChqKSB7XHJcbiAgICAgICAgY2h1bmtbaSsrXSA9IGI2NFt0XTtcclxuICAgICAgICBjaHVua1tpKytdID0gNjE7XHJcbiAgICAgICAgaWYgKGogPT09IDEpXHJcbiAgICAgICAgICAgIGNodW5rW2krK10gPSA2MTtcclxuICAgIH1cclxuICAgIGlmIChwYXJ0cykge1xyXG4gICAgICAgIGlmIChpKVxyXG4gICAgICAgICAgICBwYXJ0cy5wdXNoKFN0cmluZy5mcm9tQ2hhckNvZGUuYXBwbHkoU3RyaW5nLCBjaHVuay5zbGljZSgwLCBpKSkpO1xyXG4gICAgICAgIHJldHVybiBwYXJ0cy5qb2luKFwiXCIpO1xyXG4gICAgfVxyXG4gICAgcmV0dXJuIFN0cmluZy5mcm9tQ2hhckNvZGUuYXBwbHkoU3RyaW5nLCBjaHVuay5zbGljZSgwLCBpKSk7XHJcbn07XHJcblxyXG52YXIgaW52YWxpZEVuY29kaW5nID0gXCJpbnZhbGlkIGVuY29kaW5nXCI7XHJcblxyXG4vKipcclxuICogRGVjb2RlcyBhIGJhc2U2NCBlbmNvZGVkIHN0cmluZyB0byBhIGJ1ZmZlci5cclxuICogQHBhcmFtIHtzdHJpbmd9IHN0cmluZyBTb3VyY2Ugc3RyaW5nXHJcbiAqIEBwYXJhbSB7VWludDhBcnJheX0gYnVmZmVyIERl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3VuZCh2YWwgKiBNYXRoLnBvdygyLCAtZXhwb25lbnQpICogODM4ODYwOCkgJiA4Mzg4NjA3O1xyXG4gICAgICAgICAgICAgICAgd3JpdGVVaW50KChzaWduIDw8IDMxIHwgZXhwb25lbnQgKyAxMjcgPDwgMjMgfCBtYW50aXNzYSkgPj4+IDAsIGJ1ZiwgcG9zKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZXhwb3J0cy53cml0ZUZsb2F0TEUgPSB3cml0ZUZsb2F0X2llZWU3NTQuYmluZChudWxsLCB3cml0ZVVpbnRMRSk7XHJcbiAgICAgICAgZXhwb3J0cy53cml0ZUZsb2F0QkUgPSB3cml0ZUZsb2F0X2llZWU3NTQuYmluZChudWxsLCB3cml0ZVVpbnRCRSk7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHJlYWRGbG9hdF9pZWVlNzU0KHJlYWRVaW50LCBidWYsIHBvcykge1xyXG4gICAgICAgICAgICB2YXIgdWludCA9IHJlYWRVaW50KGJ1ZiwgcG9zKSxcclxuICAgICAgICAgICAgICAgIHNpZ24gPSAodWludCA+PiAzMSkgKiAyICsgMSxcclxuICAgICAgICAgICAgICAgIGV4cG9uZW50ID0gdWludCA+Pj4gMjMgJiAyNTUsXHJcbiAgICAgICAgICAgICAgICBtYW50aXNzYSA9IHVpbnQgJiA4Mzg4NjA3O1xyXG4gICAgICAgICAgICByZXR1cm4gZXhwb25lbnQgPT09IDI1NVxyXG4gICAgICAgICAgICAgICAgPyBtYW50aXNzYVxyXG4gICAgICAgICAgICAgICAgPyBOYU5cclxuICAgICAgICAgICAgICAgIDogc2lnbiAqIEluZmluaXR5XHJcbiAgICAgICAgICAgICAgICA6IGV4cG9uZW50ID09PSAwIC8vIGRlbm9ybWFsXHJcbiAgICAgICAgICAgICAgICA/IHNpZ24gKiAxLjQwMTI5ODQ2NDMyNDgxN2UtNDUgKiBtYW50aXNzYVxyXG4gICAgICAgICAgICAgICAgOiBzaWduICogTWF0aC5wb3coMiwgZXhwb25lbnQgLSAxNTApICogKG1hbnRpc3NhICsgODM4ODYwOCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBleHBvcnRzLnJlYWRGbG9hdExFID0gcmVhZEZsb2F0X2llZWU3NTQuYmluZChudWxsLCByZWFkVWludExFKTtcclxuICAgICAgICBleHBvcnRzLnJlYWRGbG9hdEJFID0gcmVhZEZsb2F0X2llZWU3NTQuYmluZChudWxsLCByZWFkVWludEJFKTtcclxuXHJcbiAgICB9KSgpO1xyXG5cclxuICAgIC8vIGRvdWJsZTogdHlwZWQgYXJyYXlcclxuICAgIGlmICh0eXBlb2YgRmxvYXQ2NEFycmF5ICE9PSBcInVuZGVmaW5lZFwiKSAoZnVuY3Rpb24oKSB7XHJcblxyXG4gICAgICAgIHZhciBmNjQgPSBuZXcgRmxvYXQ2NEFycmF5KFstMF0pLFxyXG4gICAgICAgICAgICBmOGIgPSBuZXcgVWludDhBcnJheShmNjQuYnVmZmVyKSxcclxuICAgICAgICAgICAgbGUgID0gZjhiWzddID09PSAxMjg7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHdyaXRlRG91YmxlX2Y2NF9jcHkodmFsLCBidWYsIHBvcykge1xyXG4gICAgICAgICAgICBmNjRbMF0gPSB2YWw7XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgICAgXSA9IGY4YlswXTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDFdID0gZjhiWzFdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgMl0gPSBmOGJbMl07XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyAzXSA9IGY4YlszXTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDRdID0gZjhiWzRdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgNV0gPSBmOGJbNV07XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyA2XSA9IGY4Yls2XTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDddID0gZjhiWzddO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gd3JpdGVEb3VibGVfZjY0X3Jldih2YWwsIGJ1ZiwgcG9zKSB7XHJcbiAgICAgICAgICAgIGY2NFswXSA9IHZhbDtcclxuICAgICAgICAgICAgYnVmW3BvcyAgICBdID0gZjhiWzddO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgMV0gPSBmOGJbNl07XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyAyXSA9IGY4Yls1XTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDNdID0gZjhiWzRdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgNF0gPSBmOGJbM107XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyA1XSA9IGY4YlsyXTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDZdID0gZjhiWzFdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgN10gPSBmOGJbMF07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xyXG4gICAgICAgIGV4cG9ydHMud3JpdGVEb3VibGVMRSA9IGxlID8gd3JpdGVEb3VibGVfZjY0X2NweSA6IHdyaXRlRG91YmxlX2Y2NF9yZXY7XHJcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cclxuICAgICAgICBleHBvcnRzLndyaXRlRG91YmxlQkUgPSBsZSA/IHdyaXRlRG91YmxlX2Y2NF9yZXYgOiB3cml0ZURvdWJsZV9mNjRfY3B5O1xyXG5cclxuICAgICAgICBmdW5jdGlvbiByZWFkRG91YmxlX2Y2NF9jcHkoYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgZjhiWzBdID0gYnVmW3BvcyAgICBdO1xyXG4gICAgICAgICAgICBmOGJbMV0gPSBidWZbcG9zICsgMV07XHJcbiAgICAgICAgICAgIGY4YlsyXSA9IGJ1Zltwb3MgKyAyXTtcclxuICAgICAgICAgICAgZjhiWzNdID0gYnVmW3BvcyArIDNdO1xyXG4gICAgICAgICAgICBmOGJbNF0gPSBidWZbcG9zICsgNF07XHJcbiAgICAgICAgICAgIGY4Yls1XSA9IGJ1Zltwb3MgKyA1XTtcclxuICAgICAgICAgICAgZjhiWzZdID0gYnVmW3BvcyArIDZdO1xyXG4gICAgICAgICAgICBmOGJbN10gPSBidWZbcG9zICsgN107XHJcbiAgICAgICAgICAgIHJldHVybiBmNjRbMF07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiByZWFkRG91YmxlX2Y2NF9yZXYoYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgZjhiWzddID0gYnVmW3BvcyAgICBdO1xyXG4gICAgICAgICAgICBmOGJbNl0gPSBidWZbcG9zICsgMV07XHJcbiAgICAgICAgICAgIGY4Yls1XSA9IGJ1Zltwb3MgKyAyXTtcclxuICAgICAgICAgICAgZjhiWzRdID0gYnVmW3BvcyArIDNdO1xyXG4gICAgICAgICAgICBmOGJbM10gPSBidWZbcG9zICsgNF07XHJcbiAgICAgICAgICAgIGY4YlsyXSA9IGJ1Zltwb3MgKyA1XTtcclxuICAgICAgICAgICAgZjhiWzFdID0gYnVmW3BvcyArIDZdO1xyXG4gICAgICAgICAgICBmOGJbMF0gPSBidWZbcG9zICsgN107XHJcbiAgICAgICAgICAgIHJldHVybiBmNjRbMF07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xyXG4gICAgICAgIGV4cG9ydHMucmVhZERvdWJsZUxFID0gbGUgPyByZWFkRG91YmxlX2Y2NF9jcHkgOiByZWFkRG91YmxlX2Y2NF9yZXY7XHJcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cclxuICAgICAgICBleHBvcnRzLnJlYWREb3VibGVCRSA9IGxlID8gcmVhZERvdWJsZV9mNjRfcmV2IDogcmVhZERvdWJsZV9mNjRfY3B5O1xyXG5cclxuICAgIC8vIGRvdWJsZTogaWVlZTc1NFxyXG4gICAgfSkoKTsgZWxzZSAoZnVuY3Rpb24oKSB7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHdyaXRlRG91YmxlX2llZWU3NTQod3JpdGVVaW50LCBvZmYwLCBvZmYxLCB2YWwsIGJ1ZiwgcG9zKSB7XHJcbiAgICAgICAgICAgIHZhciBzaWduID0gdmFsIDwgMCA/IDEgOiAwO1xyXG4gICAgICAgICAgICBpZiAoc2lnbilcclxuICAgICAgICAgICAgICAgIHZhbCA9IC12YWw7XHJcbiAgICAgICAgICAgIGlmICh2YWwgPT09IDApIHtcclxuICAgICAgICAgICAgICAgIHdyaXRlVWludCgwLCBidWYsIHBvcyArIG9mZjApO1xyXG4gICAgICAgICAgICAgICAgd3JpdGVVaW50KDEgLyB2YWwgPiAwID8gLyogcG9zaXRpdmUgKi8gMCA6IC8qIG5lZ2F0aXZlIDAgKi8gMjE0NzQ4MzY0OCwgYnVmLCBwb3MgKyBvZmYxKTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChpc05hTih2YWwpKSB7XHJcbiAgICAgICAgICAgICAgICB3cml0ZVVpbnQoMCwgYnVmLCBwb3MgKyBvZmYwKTtcclxuICAgICAgICAgICAgICAgIHdyaXRlVWludCgyMTQ2OTU5MzYwLCBidWYsIHBvcyArIG9mZjEpO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHZhbCA+IDEuNzk3NjkzMTM0ODYyMzE1N2UrMzA4KSB7IC8vICstSW5maW5pdHlcclxuICAgICAgICAgICAgICAgIHdyaXRlVWludCgwLCBidWYsIHBvcyArIG9mZjApO1xyXG4gICAgICAgICAgICAgICAgd3JpdGVVaW50KChzaWduIDw8IDMxIHwgMjE0NjQzNTA3MikgPj4+IDAsIGJ1ZiwgcG9zICsgb2ZmMSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgbWFudGlzc2E7XHJcbiAgICAgICAgICAgICAgICBpZiAodmFsIDwgMi4yMjUwNzM4NTg1MDcyMDE0ZS0zMDgpIHsgLy8gZGVub3JtYWxcclxuICAgICAgICAgICAgICAgICAgICBtYW50aXNzYSA9IHZhbCAvIDVlLTMyNDtcclxuICAgICAgICAgICAgICAgICAgICB3cml0ZVVpbnQobWFudGlzc2EgPj4+IDAsIGJ1ZiwgcG9zICsgb2ZmMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVVaW50KChzaWduIDw8IDMxIHwgbWFudGlzc2EgLyA0Mjk0OTY3Mjk2KSA+Pj4gMCwgYnVmLCBwb3MgKyBvZmYxKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGV4cG9uZW50ID0gTWF0aC5mbG9vcihNYXRoLmxvZyh2YWwpIC8gTWF0aC5MTjIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChleHBvbmVudCA9PT0gMTAyNClcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXhwb25lbnQgPSAxMDIzO1xyXG4gICAgICAgICAgICAgICAgICAgIG1hbnRpc3NhID0gdmFsICogTWF0aC5wb3coMiwgLWV4cG9uZW50KTtcclxuICAgICAgICAgICAgICAgICAgICB3cml0ZVVpbnQobWFudGlzc2EgKiA0NTAzNTk5NjI3MzcwNDk2ID4+PiAwLCBidWYsIHBvcyArIG9mZjApO1xyXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlVWludCgoc2lnbiA8PCAzMSB8IGV4cG9uZW50ICsgMTAyMyA8PCAyMCB8IG1hbnRpc3NhICogMTA0ODU3NiAmIDEwNDg1NzUpID4+PiAwLCBidWYsIHBvcyArIG9mZjEpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBleHBvcnRzLndyaXRlRG91YmxlTEUgPSB3cml0ZURvdWJsZV9pZWVlNzU0LmJpbmQobnVsbCwgd3JpdGVVaW50TEUsIDAsIDQpO1xyXG4gICAgICAgIGV4cG9ydHMud3JpdGVEb3VibGVCRSA9IHdyaXRlRG91YmxlX2llZWU3NTQuYmluZChudWxsLCB3cml0ZVVpbnRCRSwgNCwgMCk7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHJlYWREb3VibGVfaWVlZTc1NChyZWFkVWludCwgb2ZmMCwgb2ZmMSwgYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgdmFyIGxvID0gcmVhZFVpbnQoYnVmLCBwb3MgKyBvZmYwKSxcclxuICAgICAgICAgICAgICAgIGhpID0gcmVhZFVpbnQoYnVmLCBwb3MgKyBvZmYxKTtcclxuICAgICAgICAgICAgdmFyIHNpZ24gPSAoaGkgPj4gMzEpICogMiArIDEsXHJcbiAgICAgICAgICAgICAgICBleHBvbmVudCA9IGhpID4+PiAyMCAmIDIwNDcsXHJcbiAgICAgICAgICAgICAgICBtYW50aXNzYSA9IDQyOTQ5NjcyOTYgKiAoaGkgJiAxMDQ4NTc1KSArIGxvO1xyXG4gICAgICAgICAgICByZXR1cm4gZXhwb25lbnQgPT09IDIwNDdcclxuICAgICAgICAgICAgICAgID8gbWFudGlzc2FcclxuICAgICAgICAgICAgICAgID8gTmFOXHJcbiAgICAgICAgICAgICAgICA6IHNpZ24gKiBJbmZpbml0eVxyXG4gICAgICAgICAgICAgICAgOiBleHBvbmVudCA9PT0gMCAvLyBkZW5vcm1hbFxyXG4gICAgICAgICAgICAgICAgPyBzaWduICogNWUtMzI0ICogbWFudGlzc2FcclxuICAgICAgICAgICAgICAgIDogc2lnbiAqIE1hdGgucG93KDIsIGV4cG9uZW50IC0gMTA3NSkgKiAobWFudGlzc2EgKyA0NTAzNTk5NjI3MzcwNDk2KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGV4cG9ydHMucmVhZERvdWJsZUxFID0gcmVhZERvdWJsZV9pZWVlNzU0LmJpbmQobnVsbCwgcmV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ge251bWJlcn0gZW5kIFNvdXJjZSBlbmRcclxuICogQHJldHVybnMge3N0cmluZ30gU3RyaW5nIHJlYWRcclxuICovXHJcbnV0ZjgucmVhZCA9IGZ1bmN0aW9uIHV0ZjhfcmVhZChidWZmZXIsIHN0YXJ0LCBlbmQpIHtcclxuICAgIHZhciBsZW4gPSBlbmQgLSBzdGFydDtcclxuICAgIGlmIChsZW4gPCAxKVxyXG4gICAgICAgIHJldHVybiBcIlwiO1xyXG4gICAgdmFyIHBhcnRzID0gbnVsbCxcclxuICAgICAgICBjaHVuayA9IFtdLFxyXG4gICAgICAgIGkgPSAwLCAvLyBjaGFyIG9mZnNldFxyXG4gICAgICAgIHQ7ICAgICAvLyB0ZW1wb3JhcnlcclxuICAgIHdoaWxlIChzdGFydCA8IGVuZCkge1xyXG4gICAgICAgIHQgPSBidWZmZXJbc3RhcnQrK107XHJcbiAgICAgICAgaWYgKHQgPCAxMjgpXHJcbiAgICAgICAgICAgIGNodW5rW2krK10gPSB0O1xyXG4gICAgICAgIGVsc2UgaWYgKHQgPiAxOTEgJiYgdCA8IDIyNClcclxuICAgICAgICAgICAgY2h1bmtbaSsrXSA9ICh0ICYgMzEpIDw8IDYgfCBidWZmZXJbc3RhcnQrK10gJiA2MztcclxuICAgICAgICBlbHNlIGlmICh0ID4gMjM5ICYmIHQgPCAzNjUpIHtcclxuICAgICAgICAgICAgdCA9ICgodCAmIDcpIDw8IDE4IHwgKGJ1ZmZlcltzdGFydCsrXSAmIDYzKSA8PCAxMiB8IChidWZmZXJbc3RhcnQrK10gJiA2MykgPDwgNiB8IGJ1ZmZlcltzdGFydCsrXSAmIDYzKSAtIDB4MTAwMDA7XHJcbiAgICAgICAgICAgIGNodW5rW2krK10gPSAweEQ4MDAgKyAodCA+PiAxMCk7XHJcbiAgICAgICAgICAgIGNodW5rW2krK10gPSAweERDMDAgKyAodCAmIDEwMjMpO1xyXG4gICAgICAgIH0gZWxzZVxyXG4gICAgICAgICAgICBjaHVua1tpKytdID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xXHJcbiAgICAgICAgYzI7IC8vIGNoYXJhY3RlciAyXHJcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHN0cmluZy5sZW5ndGg7ICsraSkge1xyXG4gICAgICAgIGMxID0gc3RyaW5nLmNoYXJDb2RlQXQoaSk7XHJcbiAgICAgICAgaWYgKGMxIDwgMTI4KSB7XHJcbiAgICAgICAgICAgIGJ1ZmZlcltvZmZzZXQrK10gPSBjMTtcclxuICAgICAgICB9IGVsc2UgaWYgKGMxIDwgMjA0OCkge1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgPj4gNiAgICAgICB8IDE5MjtcclxuICAgICAgICAgICAgYnVmZmVyW29mZnNldCsrXSA9IGMxICAgICAgICYgNjMgfCAxMjg7XHJcbiAgICAgICAgfSBlbHNlIGlmICgoYzEgJiAweEZDMDApID09PSAweEQ4MDAgJiYgKChjMiA9IHN0cmluZy5jaGFyQ29kZUF0KGkgKyAxKSkgJiAweEZDMDApID09PSAweERDMDApIHtcclxuICAgICAgICAgICAgYzEgPSAweDEwMDAwICsgKChjMSAmIDB4MDNGRikgPDwgMTApICsgKGMyICYgMHgwM0ZGKTtcclxuICAgICAgICAgICAgKytpO1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgPj4gMTggICAgICB8IDI0MDtcclxuICAgICAgICAgICAgYnVmZmVyW29mZnNldCsrXSA9IGMxID4+IDEyICYgNjMgfCAxMjg7XHJcbiAgICAgICAgICAgIGJ1ZmZlcltvZmZzZXQrK10gPSBjMSA+PiA2ICAmIDYzIHwgMTI4O1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgICAgICAgJiA2MyB8IDEyODtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgPj4gMTIgICAgICB8IDIyNDtcclxuICAgICAgICAgICAgYnVmZmVyW29mZnNldCsrXSA9IGMxID4+ID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gMXN0Li40dGhcbiAgICAgICAgICAgIGJpdHMubG8gPSAoYml0cy5sbyB8ICh0aGlzLmJ1Zlt0aGlzLnBvc10gJiAxMjcpIDw8IGkgKiA3KSA+Pj4gMDtcbiAgICAgICAgICAgIGlmICh0aGlzLmJ1Zlt0aGlzLnBvcysrXSA8IDEyOClcbiAgICAgICAgICAgICAgICByZXR1cm4gYml0cztcbiAgICAgICAgfVxuICAgICAgICAvLyA1dGhcbiAgICAgICAgYml0cy5sbyA9IChiaXRzLmxvIHwgKHRoaXMuYnVmW3RoaXMucG9zXSAmIDEyNykgPDwgMjgpID4+PiAwO1xuICAgICAgICBiaXRzLmhpID0gKGJpdHMuaGkgfCAodGhpcy5idWZbdGhpcy5wb3NdICYgMTI3KSA+PiAgNCkgPj4+IDA7XG4gICAgICAgIGlmICh0aGlzLmJ1Zlt0aGlzLnBvcysrXSA8IDEyOClcbiAgICAgICAgICAgIHJldHVybiBiaXRzO1xuICAgICAgICBpID0gMDtcbiAgICB9IGVsc2Uge1xuICAgICAgICBmb3IgKDsgaSA8IDM7ICsraSkge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGlmICovXG4gICAgICAgICAgICBpZiAodGhpcy5wb3MgPj0gdGhpcy5sZW4pXG4gICAgICAgICAgICAgICAgdGhyb3cgaW5kZXhPdXRPZlJhbmdlKHRoaXMpO1xuICAgICAgICAgICAgLy8gMXN0Li4zdGhcbiAgICAgICAgICAgIGJpdHMubG8gPSAoYml0cy5sbyB8ICh0aGlzLmJ1Zlt0aGlzLnBvc10gJiAxMjcpIDw8IGkgKiA3KSA+Pj4gMDtcbiAgICAgICAgICAgIGlmICh0aGlzLmJ1Zlt0aGlzLnBvcysrXSA8IDEyOClcbiAgICAgICAgICAgICAgICByZXR1cm4gYml0cztcbiAgICAgICAgfVxuICAgICAgICAvLyA0dGhcbiAgICAgICAgYml0cy5sbyA9IChiaXRzLmxvIHwgKHRoaXMuYnVmW3RoaXMucG9zKytdICYgMTI3KSA8PCBpICogNykgPj4+IDA7XG4gICAgICAgIHJldHVybiBiaXRzO1xuICAgIH1cbiAgICBpZiAodGhpcy5sZW4gLSB0aGlzLnBvcyA+IDQpIHsgLy8gZmFzdCByb3V0ZSAoaGkpXG4gICAgICAgIGZvciAoOyBpIDwgNTsgKytpKSB7XG4gICAgICAgICAgICAvLyA2dGguLjEwdGhcbiAgICAgICAgICAgIGJpdHMuaGkgPSAoYml0cy5oaSB8ICh0aGlzLmJ1Zlt0aGlzLnBvc10gJiAxMjcpIDw8IGkgKiA3ICsgMykgPj4+IDA7XG4gICAgICAgICAgICBpZiAodGhpcy5idWZbdGhpcy5wb3MrK10gPCAxMjgpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGJpdHM7XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICBmb3IgKDsgaSA8IDU7ICsraSkge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGlmICovXG4gICAgICAgICAgICBpZiAodGhpcy5wb3MgPj0gdGhpcy5sZW4pXG4gICAgICAgICAgICAgICAgdGhyb3cgaW5kZXhPdXRPZlJhbmdlKHRoaXMpO1xuICAgICAgICAgICAgLy8gNnRoLi4xMHRoXG4gICAgICAgICAgICBiaXRzLmhpID0gKGJpdHMuaGkgfCAodGhpcy5idWZbdGhpcy5wb3NdICYgMTI3KSA8PCBpICogNyArIDMpID4+PiAwO1xuICAgICAgICAgICAgaWYgKHRoaXMuYnVmW3RoaXMucG9zKytdIDwgMTI4KVxuICAgICAgICAgICAgICAgIHJldHVybiBiaXRzO1xuICAgICAgICB9XG4gICAgfVxuICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgdGhyb3cgRXJyb3IoXCJpbnZhbGlkIHZhcmludCBlbmNvZGluZ1wiKTtcbn1cblxuLyogZXNsaW50LWVuYWJsZSBuby1pbnZhbGlkLXRoaXMgKi9cblxuLyoqXG4gKiBSZWFkcyBhIHZhcmludCBhcyBhIHNpZ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ZiAodGhpcy5wb3MgKyBsZW5ndGggPiB0aGlzLmxlbilcbiAgICAgICAgICAgIHRocm93IGluZGV4T3V0T2ZSYW5nZSh0aGlzLCBsZW5ndGgpO1xuICAgICAgICB0aGlzLnBvcyArPSBsZW5ndGg7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgZG8ge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGlmICovXG4gICAgICAgICAgICBpZiAodGhpcy5wb3MgPj0gdGhpcy5sZW4pXG4gICAgICAgICAgICAgICAgdGhyb3cgaW5kZXhPdXRPZlJhbmdlKHRoaXMpO1xuICAgICAgICB9IHdoaWxlICh0aGlzLmJ1Zlt0aGlzLnBvcysrXSAmIDEyOCk7XG4gICAgfVxuICAgIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBTa2lwcyB0aGUgbmV4dCBlbGVtZW50IG9mIHRoZSBzcGVjaWZpZWQgd2lyZSB0eXBlLlxuICogQHBhcmFtIHtudW1iZXJ9IHdpcmVUeXBlIFdpcmUgdHlwZSByZWNlaXZlZFxuICogQHJldHVybnMge1JlYWRlcn0gYHRoaXNgXG4gKi9cblJlYWRlci5wcm90b3R5cGUuc2tpcFR5cGUgPSBmdW5jdGlvbih3aXJlVHlwZSkge1xuICAgIHN3aXRjaCAod2lyZVR5cGUpIHtcbiAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgdGhpcy5za2lwKCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgdGhpcy5za2lwKDgpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgIHRoaXMuc2tpcCh0aGlzLnVpbnQzMigpKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICB3aGlsZSAoKHdpcmVUeXBlID0gdGhpcy51aW50MzIoKSAmIDcpICE9PSA0KSB7XG4gICAgICAgIC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V0KGZ1bmN0aW9uKCkgeyBjYWxsYmFjayhFcnJvcihcImFscmVhZHkgZW5kZWRcIikpOyB9LCAwKTtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9XG5cbiAgICB0cnkge1xuICAgICAgICByZXR1cm4gc2VsZi5ycGNJbXBsKFxuICAgICAgICAgICAgbWV0aG9kLFxuICAgICAgICAgICAgcmVxdWVzdEN0b3Jbc2VsZi5yZXF1ZXN0RGVsaW1pdGVkID8gXCJlbmNvZGVEZWxpbWl0ZWRcIiA6IFwiZW5jb2RlXCJdKHJlcXVlc3QpLmZpbmlzaCgpLFxuICAgICAgICAgICAgZnVuY3Rpb24gcnBjQ2FsbGJhY2soZXJyLCByZXNwb25zZSkge1xuXG4gICAgICAgICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmVtaXQoXCJlcnJvclwiLCBlcnIsIG1ldGhvZCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhlcnIpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmVuZCgvKiBlbmRlZEJ5UlBDICovIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICghKHJlc3BvbnNlIGluc3RhbmNlb2YgcmVzcG9uc2VDdG9yKSkge1xuICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2UgPSByZXNwb25zZUN0b3Jbc2VsZi5yZXNwb25zZURlbGltaXRlZCA/IFwiZGVjb2RlRGVsaW1pdGVkXCIgOiBcImRlY29kZVwiXShyZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5lbWl0KFwiZXJyb3JcIiwgZXJyLCBtZXRob2QpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNhbGxiYWNrKGVycik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBzZWxmLmVtaXQoXCJkYXRhXCIsIHJlc3BvbnNlLCBtZXRob2QpO1xuICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhudWxsLCByZXNwb25zZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICk7XG4gICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgIHNlbGYuZW1pdChcImVycm9yXCIsIGVyciwgbWV0aG9kKTtcbiAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpIHsgY2FsbGJhY2soZXJyKTsgfSwgMCk7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgfVxufTtcblxuLyoqXG4gKiBFbmRzIHRoaXMgc2VydmljZSBhbmQgZW1pdHMgdGhlIGBlbmRgIGV2ZW50LlxuICogQHBhcmFtIHtib29sZWFufSBbZW5kZWRCeVJQQz1mYWxzZV0gV2hldGhlciB0aGUgc2VydmljZSBoYXMgYmVlbiBlbmRlZCBieSB0aGUgUlBDIGltcGxlbWVudGF0aW9uLlxuICogQHJldHVybnMge3JwYy5TZXJ2aWNlfSBgdGhpc2BcbiAqL1xuU2VydmljZS5wcm90b3R5cGUuZW5kID0gZnVuY3Rpb24gZW5kKGVuZGVkQnlSUEMpIHtcbiAgICBpZiAodGhpcy5ycGNJbXBsKSB7XG4gICAgICAgIGlmICghZW5kZWRCeVJQQykgLy8gc2lnbmFsIGVuZCB0byBycGNJbXBsXG4gICAgICAgICAgICB0aGlzLnJwY0ltcGwobnVsbCwgbnVsbCwgbnVsbCk7XG4gICAgICAgIHRoaXMucnBjSW1wbCA9IG51bGw7XG4gICAgICAgIHRoaXMuZW1pdChcIm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N0aW9uICgpIHtcbiAgICAgICAgICByZXR1cm4gY29udGV4dC5fY3VycmVudFZhbHVlO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uIChfY3VycmVudFZhbHVlKSB7XG4gICAgICAgICAgY29udGV4dC5fY3VycmVudFZhbHVlID0gX2N1cnJlbnRWYWx1ZTtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIF9jdXJyZW50VmFsdWUyOiB7XG4gICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgIHJldHVybiBjb250ZXh0Ll9jdXJyZW50VmFsdWUyO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uIChfY3VycmVudFZhbHVlMikge1xuICAgICAgICAgIGNvbnRleHQuX2N1cnJlbnRWYWx1ZTIgPSBfY3VycmVudFZhbHVlMjtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIF90aHJlYWRDb3VudDoge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICByZXR1cm4gY29udGV4dC5fdGhyZWFkQ291bnQ7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKF90aHJlYWRDb3VudCkge1xuICAgICAgICAgIGNvbnRleHQuX3RocmVhZENvdW50ID0gX3RocmVhZENvdW50O1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgQ29uc3VtZXI6IHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgaWYgKCFoYXNXYXJuZWRBYm91dFVzaW5nTmVzdGVkQ29udGV4dENvbnN1bWVycykge1xuICAgICAgICAgICAgaGFzV2FybmVkQWJvdXRVc2luZ05lc3RlZENvbnRleHRDb25zdW1lcnMgPSB0cnVlO1xuXG4gICAgICAgICAgICBlcnJvcignUmVuZGVyaW5nIDxDb250ZXh0LkNvbnN1bWVyLkNvbnN1bWVyPiBpcyBub3Qgc3VwcG9ydGVkIGFu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wcm9wcyA9IHtcbiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICBlbnVtZXJhYmxlOiB0cnVlLFxuICAgICAgICB3cml0YWJsZTogdHJ1ZVxuICAgICAgfTsgLy8gJEZsb3dGaXhNZSBGbG93IHRoaW5rcyBjb25zb2xlIGlzIGltbXV0YWJsZS5cblxuICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnRpZXMoY29uc29sZSwge1xuICAgICAgICBsb2c6IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkxvZ1xuICAgICAgICB9KSxcbiAgICAgICAgaW5mbzogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2SW5mb1xuICAgICAgICB9KSxcbiAgICAgICAgd2FybjogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2V2FyblxuICAgICAgICB9KSxcbiAgICAgICAgZXJyb3I6IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkVycm9yXG4gICAgICAgIH0pLFxuICAgICAgICBncm91cDogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2R3JvdXBcbiAgICAgICAgfSksXG4gICAgICAgIGdyb3VwQ29sbGFwc2VkOiBhc3NpZ24oe30sIHByb3BzLCB7XG4gICAgICAgICAgdmFsdWU6IHByZXZHcm91cENvbGxhcHNlZFxuICAgICAgICB9KSxcbiAgICAgICAgZ3JvdXBFbmQ6IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkdyb3VwRW5kXG4gICAgICAgIH0pXG4gICAgICB9KTtcbiAgICAgIC8qIGVzbGludC1lbmFibGUgcmVhY3QtaW50ZXJuYWwvbm8tcHJvZHVjdGlvbi1sb2dnaW5nICovXG4gICAgfVxuXG4gICAgaWYgKGRpc2FibGVkRGVwdGggPCA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xcbicgKyBzYW1wbGVMaW5lc1tzXS5yZXBsYWNlKCcgYXQgbmV3ICcsICcgYXQgJyk7IC8vIElmIG91ciBjb21wb25lbnQgZnJhbWUgaXMgbGFiZWxlZCBcIjxhbm9ueW1vdXM+XCJcbiAgICAgICAgICAgICAgICAvLyBidXQgd2UgaGF2ZSBhIHVzZXItcHJvdmlkZWQgXCJkaXNwbGF5TmFtZVwiXG4gICAgICAgICAgICAgICAgLy8gc3BsaWNlIGl0IGluIHRvIG1ha2UgdGhlIHN0YWNrIG1vcmUgcmVhZGFibGUuXG5cblxuICAgICAgICAgICAgICAgIGlmIChmbi5kaXNwbGF5TmFtZSAmJiBfZnJhbWUuaW5jbHVkZXMoJzxhbm9ueW1vdXM+JykpIHtcbiAgICAgICAgICAgICAgICAgIF9mcmFtZSA9IF9mcmFtZS5yZXBsYWNlKCc8YW5vbnltb3VzPicsIGZuLmRpc3BsYXlOYW1lKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGZuID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudEZyYW1lQ2FjaGUuc2V0KGZuLCBfZnJhbWUpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gLy8gUmV0dXJuIHRoZSBsaW5lIHdlIGZvdW5kLlxuXG5cbiAgICAgICAgICAgICAgICByZXR1cm4gX2ZyYW1lO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IHdoaWxlIChzID49IDEgJiYgYyA+PSAwKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfSBmaW5hbGx5IHtcbiAgICByZWVudHJ5ID0gZmFsc2U7XG5cbiAgICB7XG4gICAgICBSZWFjdEN1cnJlbnREaXNwYXRjaGVyJDEuY3VycmVudCA9IHByZXZ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yIFVwZGF0ZSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjQ7XG52YXIgQ2hpbGREZWxldGlvbiA9XG4vKiAgICAgICAgICAgICAgICAqL1xuMTY7XG52YXIgQ29udGVudFJlc2V0ID1cbi8qICAgICAgICAgICAgICAgICAqL1xuMzI7XG52YXIgQ2FsbGJhY2sgPVxuLyogICAgICAgICAgICAgICAgICAgICAqL1xuNjQ7XG52YXIgRGlkQ2FwdHVyZSA9XG4vKiAgICAgICAgICAgICAgICAgICAqL1xuMTI4O1xudmFyIEZvcmNlQ2xpZW50UmVuZGVyID1cbi8qICAgICAgICAgICAgKi9cbjI1NjtcbnZhciBSZWYgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAgICovXG41MTI7XG52YXIgU25hcHNob3QgPVxuLyogICAgICAgICAgICAgICAgICAgICAqL1xuMTAyNDtcbnZhciBQYXNzaXZlID1cbi8qICAgICAgICAgICAgICAgICAgICAgICovXG4yMDQ4O1xudmFyIEh5ZHJhdGluZyA9XG4vKiAgICAgICAgICAgICAgICAgICAgKi9cbjQwOTY7XG52YXIgVmlzaWJpbGl0eSA9XG4vKiAgICAgICAgICAgICAgICAgICAqL1xuODE5MjtcbnZhciBTdG9yZUNvbnNpc3RlbmN5ID1cbi8qICAgICAgICAgICAgICovXG4xNjM4NDtcbnZhciBMaWZlY3ljbGVFZmZlY3RNYXNrID0gUGFzc2l2ZSB8IFVwZGF0ZSB8IENhbGxiYWNrIHwgUmVmIHwgU25hcHNob3QgfCBTdG9yZUNvbnNpc3RlbmN5OyAvLyBVbmlvbiBvZiBhbGwgY29tbWl0IGZsYWdzIChmbGFncyB3aXRoIHRoZSBsaWZldGltZSBvZiBhIHBhcnRpY3VsYXIgY29tbWl0KVxuXG52YXIgSG9zdEVmZmVjdE1hc2sgPVxuLyogICAgICAgICAgICAgICAqL1xuMzI3Njc7IC8vIFRoZXNlIGFyZSBub3QgcmVhbGx5IHNpZGUgZWZmZWN0cywgYnV0IHdlI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GEgPSBwYXJlbnRCO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgX2NoaWxkID0gX2NoaWxkLnNpYmxpbmc7XG4gICAgICB9XG5cbiAgICAgIGlmICghZGlkRmluZENoaWxkKSB7XG4gICAgICAgIC8vIFNlYXJjaCBwYXJlbnQgQidzIGNoaWxkIHNldFxuICAgICAgICBfY2hpbGQgPSBwYXJlbnRCLmNoaWxkO1xuXG4gICAgICAgIHdoaWxlIChfY2hpbGQpIHtcbiAgICAgICAgICBpZiAoX2NoaWxkID09PSBhKSB7XG4gICAgICAgICAgICBkaWRGaW5kQ2hpbGQgPSB0cnVlO1xuICAgICAgICAgICAgYSA9IHBhcmVudEI7XG4gICAgICAgICAgICBiID0gcGFyZW50QTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChfY2hpbGQgPT09IGIpIHtcbiAgICAgICAgICAgIGRpZEZpbmRDaGlsZCA9IHRydWU7XG4gICAgICAgICAgICBiID0gcGFyZW50QjtcbiAgICAgICAgICAgIGEgPSBwYXJlbnRBO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX2NoaWxkID0gX2NoaWxkLnNpYmxpbmc7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIWRpZEZpbmRDaGlsZCkge1xuICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQ2hpbGQgd2FzIG5vdCBmb3VuZCBpbiBlaXRoZXIgcGFyZW50IHNldC4gVGhpcyBpbmRpY2F0ZXMgYSBidWcgJyArICdpbiBSZWFjdCByZWxhdGVkIHRvIHRoZSByZXR1cm4gcG9pbnRlci4gUGxlYXNlIGZpbGUgYW4gaXNzdWUuJyk7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG5cbiAgICBpZiAoYS5hbHRlcm5hdGUgIT09IGIpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihcIlJldHVybi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AgICAgICAgKi9cbjA7XG52YXIgTm9MYW5lID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAqL1xuMDtcbnZhciBTeW5jTGFuZSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG4xO1xudmFyIElucHV0Q29udGludW91c0h5ZHJhdGlvbkxhbmUgPVxuLyogICAgKi9cbjI7XG52YXIgSW5wdXRDb250aW51b3VzTGFuZSA9XG4vKiAgICAgICAgICAgICAqL1xuNDtcbnZhciBEZWZhdWx0SHlkcmF0aW9uTGFuZSA9XG4vKiAgICAgICAgICAgICovXG44O1xudmFyIERlZmF1bHRMYW5lID1cbi8qICAgICAgICAgICAgICAgICAgICAgKi9cbjE2O1xudmFyIFRyYW5zaXRpb25IeWRyYXRpb25MYW5lID1cbi8qICAgICAgICAgICAgICAgICovXG4zMjtcbnZhciBUcmFuc2l0aW9uTGFuZXMgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG40MTk0MjQwO1xudmFyIFRyYW5zaXRpb25MYW5lMSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG42NDtcbnZhciBUcmFuc2l0aW9uTGFuZTIgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTI4O1xudmFyIFRyYW5zaXRpb25MYW5lMyA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG4yNTY7XG52YXIgVHJhbnNpdGlvbkxhbmU0ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjUxMjtcbnZhciBUcmFuc2l0aW9uTGFuZTUgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTAyNDtcbnZhciBUcmFuc2l0aW9uTGFuZTYgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMjA0ODtcbnZhciBUcmFuc2l0aW9uTGFuZTcgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuNDA5NjtcbnZhciBUcmFuc2l0aW9uTGFuZTggPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuODE5MjtcbnZhciBUcmFuc2l0aW9uTGFuZTkgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTYzODQ7XG52YXIgVHJhbnNpdGlvbkxhbmUxMCA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjMyNzY4O1xudmFyIFRyYW5zaXRpb25MYW5lMTEgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG42NTUzNjtcbnZhciBUcmFuc2l0aW9uTGFuZTEyID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTMxMDcyO1xudmFyIFRyYW5zaXRpb25MYW5lMTMgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG4yNjIxNDQ7XG52YXIgVHJhbnNpdGlvbkxhbmUxNCA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjUyNDI4ODtcbnZhciBUcmFuc2l0aW9uTGFuZTE1ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTA0ODU3NjtcbnZhciBUcmFuc2l0aW9uTGFuZTE2ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMjA5NzE1MjtcbnZhciBSZXRyeUxhbmVzID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICovXG4xMzAwMjM0MjQ7XG52YXIgUmV0cnlMYW5lMSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjQxOTQzMDQ7XG52YXIgUmV0cnlMYW5lMiA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjgzODg2MDg7XG52YXIgUmV0cnlMYW5lMyA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjE2Nzc3MjE2O1xudmFyIFJldHJ5TGFuZTQgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICovXG4zMzU1NDQzMjtcbnZhciBSZXRyeUxhbmU1ID1cbi8qICAgICAgICAgICAgICAgICAg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Y2ggKGV2ZW50UHJpb3JpdHkpIHtcbiAgICAgICAgICBjYXNlIERpc2NyZXRlRXZlbnRQcmlvcml0eTpcbiAgICAgICAgICAgIHNjaGVkdWxlclByaW9yaXR5ID0gSW1tZWRpYXRlUHJpb3JpdHk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgQ29udGludW91c0V2ZW50UHJpb3JpdHk6XG4gICAgICAgICAgICBzY2hlZHVsZXJQcmlvcml0eSA9IFVzZXJCbG9ja2luZ1ByaW9yaXR5O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlIERlZmF1bHRFdmVudFByaW9yaXR5OlxuICAgICAgICAgICAgc2NoZWR1bGVyUHJpb3JpdHkgPSBOb3JtYWxQcmlvcml0eTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSBJZGxlRXZlbnRQcmlvcml0eTpcbiAgICAgICAgICAgIHNjaGVkdWxlclByaW9yaXR5ID0gSWRsZVByaW9yaXR5O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgc2NoZWR1bGVyUHJpb3JpdHkgPSBOb3JtYWxQcmlvcml0eTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgaW5qZWN0ZWRIb29rLm9uQ29tbWl0RmliZXJSb290KHJlbmRlcmVySUQsIHJvb3QsIHNjaGVkdWxlclByaW9yaXR5LCBkaWRFcnJvcik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpbmplY3RlZEhvb2sub25Db21taXRGaWJlclJvb3QocmVuZGVyZXJJRCwgcm9vdCwgdW5kZWZpbmVkLCBkaWRFcnJvcik7XG4gICAgICB9XG4gICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICB7XG4gICAgICAgIGlmICghaGFzTG9nZ2VkRXJyb3IpIHtcbiAgICAgICAgICBoYXNMb2dnZWRFcnJvciA9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sc2Uge1xuICAgIGRlbGV0aW9ucy5wdXNoKGNoaWxkVG9EZWxldGUpO1xuICB9XG59XG5cbmZ1bmN0aW9uIHdhcm5Ob25oeWRyYXRlZEluc3RhbmNlKHJldHVybkZpYmVyLCBmaWJlcikge1xuICB7XG4gICAgaWYgKGRpZFN1c3BlbmRPckVycm9yREVWKSB7XG4gICAgICAvLyBJbnNpZGUgYSBib3VuZGFyeSB0aGF0IGFscmVhZHkgc3VzcGVuZGVkLiBXZSdyZSBjdXJyZW50bHkgcmVuZGVyaW5nIHRoZVxuICAgICAgLy8gc2libGluZ3Mgb2YgYSBzdXNwZW5kZWQgbm9kZS4gVGhlIG1pc21hdGNoIG1heSBiZSBkdWUgdG8gdGhlIG1pc3NpbmdcbiAgICAgIC8vIGRhdGEsIHNvIGl0J3MgcHJvYmFibHkgYSBmYWxzZSBwb3NpdGl2ZS5cbiAgICAgIHJldHVybjtcbiAgICB9XG5cbiAgICBzd2l0Y2ggKHJldHVybkZpYmVyLnRhZykge1xuICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBwYXJlbnRDb250YWluZXIgPSByZXR1cm5GaWJlci5zdGF0ZU5vZGUuY29udGFpbmVySW5mbztcblxuICAgICAgICAgIHN3aXRjaCAoZmliZXIudGFnKSB7XG4gICAgICAgICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgICAgICAgIHZhciB0eXBlID0gZmliZXIudHlwZTtcbiAgICAgICAgICAgICAgdmFyIHByb3BzID0gZmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZUluc3RhbmNlV2l0aGluQ29udGFpbmVyKHBhcmVudENvbnRhaW5lciwgdHlwZSwgcHJvcHMpO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgICAgICAgICAgdmFyIHRleHQgPSBmaWJlci5wZW5kaW5nUHJvcHM7XG4gICAgICAgICAgICAgIGRpZE5vdEZpbmRIeWRyYXRhYmxlVGV4dEluc3RhbmNlV2l0aGluQ29udGFpbmVyKHBhcmVudENvbnRhaW5lciwgdGV4dCk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVN1c3BlbnNlSW5zdGFuY2VXaXRoaW5Db250YWluZXIocGFyZW50Q29udGFpbmVyKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIHBhcmVudFR5cGUgPSByZXR1cm5GaWJlci50eXBlO1xuICAgICAgICAgIHZhciBwYXJlbnRQcm9wcyA9IHJldHVybkZpYmVyLm1lbW9pemVkUHJvcHM7XG4gICAgICAgICAgdmFyIHBhcmVudEluc3RhbmNlID0gcmV0dXJuRmliZXIuc3RhdGVOb2RlO1xuXG4gICAgICAgICAgc3dpdGNoIChmaWJlci50YWcpIHtcbiAgICAgICAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHZhciBfdHlwZSA9IGZpYmVyLnR5cGU7XG4gICAgICAgICAgICAgICAgdmFyIF9wcm9wcyA9IGZpYmVyLnBlbmRpbmdQcm9wcztcbiAgICAgICAgICAgICAgICB2YXIgaXNDb25jdXJyZW50TW9kZSA9IChyZXR1cm5GaWJlci5tb2RlICYgQ29uY3VycmVudE1vZGUpICE9PSBOb01vZGU7XG4gICAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVJbnN0YW5jZShwYXJlbnRUeXBlLCBwYXJlbnRQcm9wcywgcGFyZW50SW5zdGFuY2UsIF90eXBlLCBfcHJvcHMsIC8vIFRPRE86IERlbGV0ZSB0aGlzIGFyZ3VtZW50IHdoZW4gd2UgcmVtb3ZlIHRoZSBsZWdhY3kgcm9vdCBBUEkuXG4gICAgICAgICAgICAgICAgaXNDb25jdXJyZW50TW9kZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHZhciBfdGV4dCA9IGZpYmVyLnBlbmRpbmdQcm9wcztcblxuICAgICAgICAgICAgICAgIHZhciBfaXNDb25jdXJyZW50TW9kZSA9IChyZXR1cm5GaWJlci5tb2RlICYgQ29uY3VycmVudE1vZGUpICE9PSBOb01vZGU7XG5cbiAgICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVRleHRJbnN0YW5jZShwYXJlbnRUeXBlLCBwYXJlbnRQcm9wcywgcGFyZW50SW5zdGFuY2UsIF90ZXh0LCAvLyBUT0RPOiBEZWxldGUgdGhpcyBhcmd1bWVudCB3aGVuIHdlIHJlbW92ZSB0aGUgbGVnYWN5IHJvb3QgQVBJLlxuICAgICAgICAgICAgICAgIF9pc0NvbmN1cnJlbnRNb2RlKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVTdXNwZW5zZUluc3RhbmNlKHBhcmVudFR5cGUsIHBhcmVudFByb3BzLCBwYXJlbnRJbnN0YW5jZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIHN1c3BlbnNlU3RhdGUgPSByZXR1cm5GaWJlci5tZW1vaXplZFN0YXRlO1xuICAgICAgICAgIHZhciBfcGFyZW50SW5zdGFuY2UgPSBzdXNwZW5zZVN0YXRlLmRlaHlkcmF0ZWQ7XG4gICAgICAgICAgaWYgKF9wYXJlbnRJbnN0YW5jZSAhPT0gbnVsbCkgc3dpdGNoIChmaWJlci50YWcpIHtcbiAgICAgICAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAgICAgICAgdmFyIF90eXBlMiA9IGZpYmVyLnR5cGU7XG4gICAgICAgICAgICAgIHZhciBfcHJvcHMyID0gZmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZUluc3RhbmNlV2l0aGluU3VzcGVuc2VJbnN0YW5jZShfcGFyZW50SW5zdGFuY2UsIF90eXBlMiwgX3Byb3BzMik7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIEhvc3RUZXh0OlxuICAgICAgICAgICAgICB2YXIgX3RleHQyID0gZmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVRleHRJbnN0YW5jZVdpdGhpblN1c3BlbnNlSW5zdGFuY2UoX3BhcmVudEluc3RhbmNlLCBfdGV4dDIpO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSBTdXNwZW5zZUNvbXBvbmVudDpcbiAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVTdXNwZW5zZUluc3RhbmNlV2l0aGluU3VzcGVuc2VJbnN0YW5jZShfcGFyZW50SW5zdGFuY2UpO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgZGVmYXVsdDpcbiAgICAgICAgcmV0dXJuO1x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bmNlIGlzIGNhbGxlZCBpbiBhIGNvbnRleHQgd2hlcmUgdGhlXG4gICAgLy8gaHlkcmF0aW9uIHBhcmVudCBpcyB0aGUgcGFyZW50IGhvc3QgY29tcG9uZW50IG9mIHRoaXMgaG9zdCB0ZXh0LlxuICAgIHZhciByZXR1cm5GaWJlciA9IGh5ZHJhdGlvblBhcmVudEZpYmVyO1xuXG4gICAgaWYgKHJldHVybkZpYmVyICE9PSBudWxsKSB7XG4gICAgICBzd2l0Y2ggKHJldHVybkZpYmVyLnRhZykge1xuICAgICAgICBjYXNlIEhvc3RSb290OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHZhciBwYXJlbnRDb250YWluZXIgPSByZXR1cm5GaWJlci5zdGF0ZU5vZGUuY29udGFpbmVySW5mbztcbiAgICAgICAgICAgIHZhciBpc0NvbmN1cnJlbnRNb2RlID0gKHJldHVybkZpYmVyLm1vZGUgJiBDb25jdXJyZW50TW9kZSkgIT09IE5vTW9kZTtcbiAgICAgICAgICAgIGRpZE5vdE1hdGNoSHlkcmF0ZWRDb250YWluZXJUZXh0SW5zdGFuY2UocGFyZW50Q29udGFpbmVyLCB0ZXh0SW5zdGFuY2UsIHRleHRDb250ZW50LCAvLyBUT0RPOiBEZWxldGUgdGhpcyBhcmd1bWVudCB3aGVuIHdlIHJlbW92ZSB0aGUgbGVnYWN5IHJvb3QgQVBJLlxuICAgICAgICAgICAgaXNDb25jdXJyZW50TW9kZSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG5cbiAgICAgICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHZhciBwYXJlbnRUeXBlID0gcmV0dXJuRmliZXIudHlwZTtcbiAgICAgICAgICAgIHZhciBwYXJlbnRQcm9wcyA9IHJldHVybkZpYmVyLm1lbW9pemVkUHJvcHM7XG4gICAgICAgICAgICB2YXIgcGFyZW50SW5zdGFuY2UgPSByZXR1cm5GaWJlci5zdGF0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gICAgICAgIC8vIFVwZGF0ZXIgZnVuY3Rpb25cbiAgICAgICAgICB7XG4gICAgICAgICAgICBlbnRlckRpc2FsbG93ZWRDb250ZXh0UmVhZEluREVWKCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdmFyIG5leHRTdGF0ZSA9IHBheWxvYWQuY2FsbChpbnN0YW5jZSwgcHJldlN0YXRlLCBuZXh0UHJvcHMpO1xuXG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKCB3b3JrSW5Qcm9ncmVzcy5tb2RlICYgU3RyaWN0TGVnYWN5TW9kZSkge1xuICAgICAgICAgICAgICBzZXRJc1N0cmljdE1vZGVGb3JEZXZ0b29scyh0cnVlKTtcblxuICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHBheWxvYWQuY2FsbChpbnN0YW5jZSwgcHJldlN0YXRlLCBuZXh0UHJvcHMpO1xuICAgICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICAgIHNldElzU3RyaWN0TW9kZUZvckRldnRvb2xzKGZhbHNlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBleGl0RGlzYWxsb3dlZENvbnRleHRSZWFkSW5ERVYoKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gbmV4dFN0YXRlO1xuICAgICAgICB9IC8vIFN0YXRlIG9iamVjdFxuXG5cbiAgICAgICAgcmV0dXJuIHBheWxvYWQ7XG4gICAgICB9XG5cbiAgICBjYXNlIENhcHR1cmVVcGRhdGU6XG4gICAgICB7XG4gICAgICAgIHdvcmtJblByb2dyZXNzLmZsYWdzID0gd29ya0luUHJvZ3Jlc3MuZmxhZ3MgJiB+U2hvdWxkQ2FwdHVyZSB8IERpZENhcHR1cmU7XG4gICAgICB9XG4gICAgLy8gSW50ZW50aW9uYWwgZmFsbHRocm91Z2hcblxuICAgIGNhc2UgVXBkYXRlU3RhdGU6XG4gICAgICB7XG4gICA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ICAgIHJldHVybiB1cGRhdGVFbGVtZW50KHJldHVybkZpYmVyLCBvbGRGaWJlciwgbmV3Q2hpbGQsIGxhbmVzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIFJFQUNUX1BPUlRBTF9UWVBFOlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmIChuZXdDaGlsZC5rZXkgPT09IGtleSkge1xuICAgICAgICAgICAgICByZXR1cm4gdXBkYXRlUG9ydGFsKHJldHVybkZpYmVyLCBvbGRGaWJlciwgbmV3Q2hpbGQsIGxhbmVzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIFJFQUNUX0xBWllfVFlQRTpcbiAgICAgICAgICB7XG4gICAgICAgICAgICB2YXIgcGF5bG9hZCA9IG5ld0NoaWxkLl9wYXlsb2FkO1xuICAgICAgICAgICAgdmFyIGluaXQgPSBuZXdDaGlsZC5faW5pdDtcbiAgICAgICAgICAgIHJldHVybiB1cGRhdGVTbG90KHJldHVybkZpYmVyLCBvbGRGaWJlciwgaW5pdChwYXlsb2FkKSwgbGFuZXMpO1xuICAgICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGlzQXJyYXkobmV3Q2hpbGQpIHx8IGdldEl0ZXJhdG9yRm4obmV3Q2hpbGQpKSB7XG4gICAgICAgIGlmIChrZXkgIT09IG51bGwpIHtcbiAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB1cGRhdGVGcmFnbWVudChyZXR1cm5GaWJlciwgb2xkRmliZXIsIG5ld0NoaWxkLCBsYW5lcywgbnVsbCk7XG4gICAgICB9XG5cbiAgICAgIHRocm93T25JbnZhbGlkT2JqZWN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2V5O1xuICAgIHZhciBjaGlsZCA9IGN1cnJlbnRGaXJzdENoaWxkO1xuXG4gICAgd2hpbGUgKGNoaWxkICE9PSBudWxsKSB7XG4gICAgICAvLyBUT0RPOiBJZiBrZXkgPT09IG51bGwgYW5kIGNoaWxkLmtleSA9PT0gbnVsbCwgdGhlbiB0aGlzIG9ubHkgYXBwbGllcyB0b1xuICAgICAgLy8gdGhlIGZpcnN0IGl0ZW0gaW4gdGhlIGxpc3QuXG4gICAgICBpZiAoY2hpbGQua2V5ID09PSBrZXkpIHtcbiAgICAgICAgdmFyIGVsZW1lbnRUeXBlID0gZWxlbWVudC50eXBlO1xuXG4gICAgICAgIGlmIChlbGVtZW50VHlwZSA9PT0gUkVBQ1RfRlJBR01FTlRfVFlQRSkge1xuICAgICAgICAgIGlmIChjaGlsZC50YWcgPT09IEZyYWdtZW50KSB7XG4gICAgICAgICAgICBkZWxldGVSZW1haW5pbmdDaGlsZHJlbihyZXR1cm5GaWJlciwgY2hpbGQuc2libGluZyk7XG4gICAgICAgICAgICB2YXIgZXhpc3RpbmcgPSB1c2VGaWJlcihjaGlsZCwgZWxlbWVudC5wcm9wcy5jaGlsZHJlbik7XG4gICAgICAgICAgICBleGlzdGluZy5yZXR1cm4gPSByZXR1cm5GaWJlcjtcblxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdGluZy5fZGVidWdTb3VyY2UgPSBlbGVtZW50Ll9zb3VyY2U7XG4gICAgICAgICAgICAgIGV4aXN0aW5nLl9kZWJ1Z093bmVyID0gZWxlbWVudC5fb3duZXI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBleGlzdGluZztcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaWYgKGNoaWxkLmVsZW1lbnRUeXBlID09PSBlbGVtZW50VHlwZSB8fCAoIC8vIEtlZXAgdGhpcyBjaGVjayBpbmxpbmUgc28gaXQgb25seSBydW5zIG9uIHRoZSBmY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MgUHJvZmlsZXIgdG8gcmVhZClcblxuICAgIHZhciBwYXJlbnRGaWJlciA9IGZpYmVyLnJldHVybjtcblxuICAgIHdoaWxlIChwYXJlbnRGaWJlciAhPT0gbnVsbCkge1xuICAgICAgc3dpdGNoIChwYXJlbnRGaWJlci50YWcpIHtcbiAgICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAgICB2YXIgcm9vdCA9IHBhcmVudEZpYmVyLnN0YXRlTm9kZTtcblxuICAgICAgICAgIGlmIChyb290ICE9PSBudWxsKSB7XG4gICAgICAgICAgICByb290LnBhc3NpdmVFZmZlY3REdXJhdGlvbiArPSBlbGFwc2VkVGltZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgY2FzZSBQcm9maWxlcjpcbiAgICAgICAgICB2YXIgcGFyZW50U3RhdGVOb2RlID0gcGFyZW50RmliZXIuc3RhdGVOb2RlO1xuXG4gICAgICAgICAgaWYgKHBhcmVudFN0YXRlTm9kZSAhPT0gbnVsbCkge1xuICAgICAgICAgICAgLy8gRGV0YWNoZWQgZmliZXJzIGhhdmUgdGhlaXIgc3RhdGUgbm9kZSBjbGVhcmVkIG91dC5cbiAgICAgICAgICAgIC8vIEluIHRoaXMgY2FzZSwgdGhlIHJldHVybiBwb2ludGVyIGlzIGFsc28gY2xlYXJlZCBvdXQsXG4gICAgICAgICAgICAvLyBzbyB3ZSB3b24ndCBiZSBhYmxlIHRvIHJlcG9ydCB0aGUgdGltZSBzcGVudCBpbiB0aGlzIFByb2ZpbGVyJ3Mgc3VidHJlZS5cbiAgICAgICAgICAgIHBhcmVudFN0YXRlTm9kZS5wYXNzaXZlRWZmZWN0RHVyYXRpb24gKz0gZWxhcHNlZFRpbWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgICBwYXJlbnRGaWJlciA9IHBhcmVudEZpYmVyLnJldHVybjtcbiAgICB9XG4gIH1cbn1cbl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mRlZChjdXJyZW50Um93KSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAvLyBUaGlzIGlzIHRoZSBiZWdpbm5pbmcgb2YgdGhlIG1haW4gY29udGVudC5cbiAgICAgICAgICAgICAgd29ya0luUHJvZ3Jlc3MuY2hpbGQgPSByb3c7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgbmV4dFJvdyA9IHJvdy5zaWJsaW5nO1xuICAgICAgICAgICAgcm93LnNpYmxpbmcgPSBfdGFpbDtcbiAgICAgICAgICAgIF90YWlsID0gcm93O1xuICAgICAgICAgICAgcm93ID0gbmV4dFJvdztcbiAgICAgICAgICB9IC8vIFRPRE86IElmIHdvcmtJblByb2dyZXNzLmNoaWxkIGlzIG51bGwsIHdlIGNhbiBjb250aW51ZSBvbiB0aGUgdGFpbCBpbW1lZGlhdGVseS5cblxuXG4gICAgICAgICAgaW5pdFN1c3BlbnNlTGlzdFJlbmRlclN0YXRlKHdvcmtJblByb2dyZXNzLCB0cnVlLCAvLyBpc0JhY2t3YXJkc1xuICAgICAgICAgIF90YWlsLCBudWxsLCAvLyBsYXN0XG4gICAgICAgICAgdGFpbE1vZGUpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgJ3RvZ2V0aGVyJzpcbiAgICAgICAge1xuICAgICAgICAgIGluaXRTdXNwZW5zZUxpc3RSZW5kZXJTdGF0ZSh3b3JrSW5Qcm9ncmVzcywgZmFsc2UsIC8vIGlzQmFja3dhcmRzXG4gICAgICAgICAgbnVsbCwgLy8gdGFpbFxuICAgICAgICAgIG51bGwsIC8vIGxhc3RcbiAgICAgICAgICB1bmRlZmluZWQpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGRlZmF1bHQ6XG4gICAgICAgIHtcbiAgICAgICAgICAvLyBUaGUgZGVmYXVsdCByZXZlYWwgb3JkZXIgaXMgdGhlI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Skge1xuICAgICAgICAgICAgICAgIC8vIElmIHRoaXMgd2FzIGluIGFuIGludmlzaWJsZSB0cmVlIG9yIGEgbmV3IHJlbmRlciwgdGhlbiBzaG93aW5nXG4gICAgICAgICAgICAgICAgLy8gdGhpcyBib3VuZGFyeSBpcyBvay5cbiAgICAgICAgICAgICAgICByZW5kZXJEaWRTdXNwZW5kKCk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gT3RoZXJ3aXNlLCB3ZSdyZSBnb2luZyB0byBoYXZlIHRvIGhpZGUgY29udGVudCBzbyB3ZSBzaG91bGRcbiAgICAgICAgICAgICAgICAvLyBzdXNwZW5kIGZvciBsb25nZXIgaWYgcG9zc2libGUuXG4gICAgICAgICAgICAgICAgcmVuZGVyRGlkU3VzcGVuZERlbGF5SWZQb3NzaWJsZSgpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHdha2VhYmxlcyA9IHdvcmtJblByb2dyZXNzLnVwZGF0ZVF1ZXVlO1xuXG4gICAgICAgIGlmICh3YWtlYWJsZXMgIT09IG51bGwpIHtcbiAgICAgICAgICAvLyBTY2hlZHVsZSBhbiBlZmZlY3QgdG8gYXR0YWNoIGEgcmV0cnkgbGlzdGVuZXIgdG8gdGhlIHByb21pc2UuXG4gICAgICAgICAgLy8gVE9ETzogTW92ZSB0byBwYXNzaXZlIHBoYXNlXG4gICAgICAgICAgd29ya0luUHJvZ3Jlc3MuZmxhZ3MgfD0gVXBkYXRlO1xuICAgICAgICB9XG5cbiAgICAgICAgYnViYmxlUHJvcGVydGllcyh3b3JrSW5Qcm9ncmVzcyk7XG5cbiAgICAgICAge1xuICAgICAgICAgIGlmICgod29ya0luUHJvZ3Jlc3MubW9kZSAmIFByb2ZpbGVNb2RlKSAhPT0gTm9Nb2RlKSB7XG4gICAgICAgICAgICBpZiAobmV4dERpZFRpbWVvdXQpI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uICBzd2l0Y2ggKGludGVycnVwdGVkV29yay50YWcpIHtcbiAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAge1xuICAgICAgICB2YXIgY2hpbGRDb250ZXh0VHlwZXMgPSBpbnRlcnJ1cHRlZFdvcmsudHlwZS5jaGlsZENvbnRleHRUeXBlcztcblxuICAgICAgICBpZiAoY2hpbGRDb250ZXh0VHlwZXMgIT09IG51bGwgJiYgY2hpbGRDb250ZXh0VHlwZXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIHBvcENvbnRleHQoaW50ZXJydXB0ZWRXb3JrKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgIHtcbiAgICAgICAgdmFyIHJvb3QgPSBpbnRlcnJ1cHRlZFdvcmsuc3RhdGVOb2RlO1xuICAgICAgICBwb3BIb3N0Q29udGFpbmVyKGludGVycnVwdGVkV29yayk7XG4gICAgICAgIHBvcFRvcExldmVsQ29udGV4dE9iamVjdChpbnRlcnJ1cHRlZFdvcmspO1xuICAgICAgICByZXNldFdvcmtJblByb2dyZXNzVmVyc2lvbnMoKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICB9XG5cbiAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICB7XG4gICAgICAgIHBvcEhvc3RDb250ZXh0KGludGVycnVwdGVkV29yayk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAgcG9wSG9zdENvbnRhaW5lcihpbnRlcnJ1cHRlZFdvcmspO1xuICAgICAgYnJlYWs7XG5cbiAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgcG9wU3VzcGVuc2VDb250ZXh0KGludGVycnVwdGVkV29yayk7XG4gICAgICBicmVhaztcblxuICAgIGNhc2UgU3VzcGVuc2VMaXN0Q29tcG9uZW50OlxuICAgICA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gICAgICAgICB7XG4gICAgICAgICAgICAgIHZhciBkaWRXYXJuU2V0ID0gZGlkV2FybkFib3V0VW5kZWZpbmVkU25hcHNob3RCZWZvcmVVcGRhdGU7XG5cbiAgICAgICAgICAgICAgaWYgKHNuYXBzaG90ID09PSB1bmRlZmluZWQgJiYgIWRpZFdhcm5TZXQuaGFzKGZpbmlzaGVkV29yay50eXBlKSkge1xuICAgICAgICAgICAgICAgIGRpZFdhcm5TZXQuYWRkKGZpbmlzaGVkV29yay50eXBlKTtcblxuICAgICAgICAgICAgICAgIGVycm9yKCclcy5nZXRTbmFwc2hvdEJlZm9yZVVwZGF0ZSgpOiBBIHNuYXBzaG90IHZhbHVlIChvciBudWxsKSAnICsgJ211c3QgYmUgcmV0dXJuZWQuIFlvdSBoYXZlIHJldHVybmVkIHVuZGVmaW5lZC4nLCBnZXRDb21wb25lbnROYW1lRnJvbUZpYmVyKGZpbmlzaGVkV29yaykpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGluc3RhbmNlLl9fcmVhY3RJbnRlcm5hbFNuYXBzaG90QmVmb3JlVXBkYXRlID0gc25hcHNob3Q7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAge1xuICAgICAgICAgIGlmIChzdXBwb3J0c011dGF0aW9uKSB7XG4gICAgICAgICAgICB2YXIgcm9vdCA9IGZpbmlzaGVkV29yay5zdGF0ZU5vZGU7XG4gICAgICAgICAgICBjbGVhckNvbnRhaW5lcihyb290LmNvbnRhaW5lckluZm8pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgIGNhc2UgSG9zdFRleHQ6XG4gICAgICBjYXNlIEhvc3RQb3J0YWw6XG4gICAgICBjYXNlIEluY29tcGxldGVDbG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ZCkge1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmICgoZmxhZ3MgJiBQYXNzaXZlJDEpICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICAgICAgbWFya0NvbXBvbmVudFBhc3NpdmVFZmZlY3RVbm1vdW50U3RhcnRlZChmaW5pc2hlZFdvcmspO1xuICAgICAgICAgICAgfSBlbHNlIGlmICgoZmxhZ3MgJiBMYXlvdXQpICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICAgICAgbWFya0NvbXBvbmVudExheW91dEVmZmVjdFVubW91bnRTdGFydGVkKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKChmbGFncyAmIEluc2VydGlvbikgIT09IE5vRmxhZ3MkMSkge1xuICAgICAgICAgICAgICBzZXRJc1J1bm5pbmdJbnNlcnRpb25FZmZlY3QodHJ1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgc2FmZWx5Q2FsbERlc3Ryb3koZmluaXNoZWRXb3JrLCBuZWFyZXN0TW91bnRlZEFuY2VzdG9yLCBkZXN0cm95KTtcblxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmICgoZmxhZ3MgJiBJbnNlcnRpb24pICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICAgICAgc2V0SXNSdW5uaW5nSW5zZXJ0aW9uRWZmZWN0KGZhbHNlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICB7XG4gICAgICAgICAgICBpZiAoKGZsYWdzICYgUGFzc2l2ZSQxKSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICAgIG1hcmtDb21wb25lbnRQYXNzaXZlRWZmZWN0VW5tb3VudFN0b3BwZWQoKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoKGZsYWdzICYgTGF5b3V0KSAhPT0gTm9Gb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ICAgICAgIHtcbiAgICAgICAgICAgIHZhciBwYXNzaXZlRWZmZWN0RHVyYXRpb24gPSBmaW5pc2hlZFdvcmsuc3RhdGVOb2RlLnBhc3NpdmVFZmZlY3REdXJhdGlvbjtcbiAgICAgICAgICAgIHZhciBfZmluaXNoZWRXb3JrJG1lbW9pemUgPSBmaW5pc2hlZFdvcmsubWVtb2l6ZWRQcm9wcyxcbiAgICAgICAgICAgICAgICBpZCA9IF9maW5pc2hlZFdvcmskbWVtb2l6ZS5pZCxcbiAgICAgICAgICAgICAgICBvblBvc3RDb21taXQgPSBfZmluaXNoZWRXb3JrJG1lbW9pemUub25Qb3N0Q29tbWl0OyAvLyBUaGlzIHZhbHVlIHdpbGwgc3RpbGwgcmVmbGVjdCB0aGUgcHJldmlvdXMgY29tbWl0IHBoYXNlLlxuICAgICAgICAgICAgLy8gSXQgZG9lcyBub3QgZ2V0IHJlc2V0IHVudGlsIHRoZSBzdGFydCBvZiB0aGUgbmV4dCBjb21taXQgcGhhc2UuXG5cbiAgICAgICAgICAgIHZhciBjb21taXRUaW1lID0gZ2V0Q29tbWl0VGltZSgpO1xuICAgICAgICAgICAgdmFyIHBoYXNlID0gZmluaXNoZWRXb3JrLmFsdGVybmF0ZSA9PT0gbnVsbCA/ICdtb3VudCcgOiAndXBkYXRlJztcblxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBpZiAoaXNDdXJyZW50VXBkYXRlTmVzdGVkKCkpIHtcbiAgICAgICAgICAgICAgICBwaGFzZSA9ICduZXN0ZWQtdXBkYXRlJztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodHlwZW9mIG9uUG9zdENvbW1pdCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICBvblBvc3RDb21taXQoaWQsIHBoYXNlLCBwYXNzaXZlRWZmZWN0RHVyYXRpb24sIGNvbW1pdFRpbWUpO1xuICAgICAgICAgICAgfSAvLyBCdWJibGUgdGltZXMgdG8gdGhlIG5leHQgbmVhcmVzdCBhbmNlc3RvciBQcm9maWxlci5cbiAgICAgICAgICAgIC8vIEFmdGVyIHdlIHByb2Nlc3MgdGhhdCBQcm9maWxlciwgd2UnbGwgYnViYmxlIGZ1cnRoZXIgdXAuXG5cblxuICAgICAgICAgICAgdmFyIHBhcmVudEZpYmVyID0gZmluaXNoZWRXb3JrLnJldHVybjtcblxuICAgICAgICAgICAgb3V0ZXI6IHdoaWxlIChwYXJlbnRGaWJlciAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBzd2l0Y2ggKHBhcmVudEZpYmVyLnRhZykge1xuICAgICAgICAgICAgICAgIGNhc2UgSG9zdFJvb3Q6XG4gICAgICAgICAgICAgICAgICB2YXIgcm9vdCA9IHBhcmVudEZpYmVyLnN0YXRlTm9kZTtcbiAgICAgICAgICAgICAgICAgIHJvb3QucGFzc2l2ZUVmZmVjdER1cmF0aW9uICs9IHBhc3NpdmVFZmZlY3REdXJhdGlvbjtcbiAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuXG4gICAgICAgICAgICAgICAgY2FzZSBQcm9maWxlcjpcbiAgICAgICAgICAgICAgICAgIHZhciBwYXJlbnRTdGF0ZU5vZGUgPSBwYXJlbnRGaWJlci5zdGF0ZU5vZGU7XG4gICAgICAgICAgICAgICAgICBwYXJlbnRTdGF0ZU5vZGUucGFzc2l2ZUVmZmVjdER1cmF0aW9uICs9IHBhc3NpdmVFZmZlY3REdXJhdGlvbjtcbiAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgcGFyZW50RmliZXIgPSBwYXJlbnRGaWJlci5yZXR1cm47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cbn1cblxuZnVuY3Rpb24gY29tbWl0TGF5b3V0RWZmZWN0T25GaWJlcihmaW5p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luaXNoZWRXb3JrKTtcbiAgICAgICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgICByZWNvcmRMYXlvdXRFZmZlY3REdXJhdGlvbihmaW5pc2hlZFdvcmspO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBjb21taXRIb29rRWZmZWN0TGlzdE1vdW50KExheW91dCB8IEhhc0VmZmVjdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIGluc3RhbmNlID0gZmluaXNoZWRXb3JrLnN0YXRlTm9kZTtcblxuICAgICAgICAgIGlmIChmaW5pc2hlZFdvcmsuZmxhZ3MgJiBVcGRhdGUpIHtcbiAgICAgICAgICAgIGlmICghb2Zmc2NyZWVuU3VidHJlZVdhc0hpZGRlbikge1xuICAgICAgICAgICAgICBpZiAoY3VycmVudCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIC8vIFdlIGNvdWxkIHVwZGF0ZSBpbnN0YW5jZSBwcm9wcyBhbmQgc3RhdGUgaGVyZSxcbiAgICAgICAgICAgICAgICAvLyBidXQgaW5zdGVhZCB3ZSByZWx5IG9uIHRoZW0gYmVpbmcgc2V0IGR1cmluZyBsYXN0IHJlbmRlci5cbiAgICAgICAgICAgICAgICAvLyBUT0RPOiByZXZpc2l0IHRoaXMgd2hlbiB3ZSBpbXBsZW1lbnQgcmVzdW1pbmcuXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgaWYgKGZpbmlzaGVkV29yay50eXBlID09PSBmaW5pc2hlZFdvcmsuZWxlbWVudFR5cGUgJiYgIWRpZFdhcm5BYm91dFJlYXNzaWduaW5nUHJvcHMpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG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ZpbmlzaGVkV29yay5tb2RlICYgUHJvZmlsZU1vZGUpIHtcbiAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgaW5zdGFuY2UuY29tcG9uZW50RGlkTW91bnQoKTtcbiAgICAgICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGluc3RhbmNlLmNvbXBvbmVudERpZE1vdW50KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBwcmV2UHJvcHMgPSBmaW5pc2hlZFdvcmsuZWxlbWVudFR5cGUgPT09IGZpbmlzaGVkV29yay50eXBlID8gY3VycmVudC5tZW1vaXplZFByb3BzIDogcmVzb2x2ZURlZmF1bHRQcm9wcyhmaW5pc2hlZFdvcmsudHlwZSwgY3VycmVudC5tZW1vaXplZFByb3BzKTtcbiAgICAgICAgICAgICAgICB2YXIgcHJldlN0YXRlID0gY3VycmVudC5tZW1vaXplZFN0YXRlOyAvLyBXZSBjb3VsZCB1cGRhdGUgaW5zdGFuY2UgcHJvcHMgYW5kIHN0YXRlIGhlcmUsXG4gICAgICAgICAgICAgICAgLy8gYnV0IGluc3RlYWQgd2UgcmVseSBvbiB0aGVtIGJlaW5nIHNldCBkdXJpbmcgbGFzdCByZW5kZXIuXG4gICAgICAgICAgICAgICAgLy8gVE9ETzogcmV2aXNpdCB0aGlzIHdoZW4gd2UgaW1wbGVtZW50IHJlc3VtaW5nLlxuXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgaWYgKGZpbmlzaGVkV29yay50eX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CAnaW5zdGFuY2UnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICggZmluaXNoZWRXb3JrLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgc3RhcnRMYXlvdXRFZmZlY3RUaW1lcigpO1xuICAgICAgICAgICAgICAgICAgICBpbnN0YW5jZS5jb21wb25lbnREaWRVcGRhdGUocHJldlByb3BzLCBwcmV2U3RhdGUsIGluc3RhbmNlLl9fcmVhY3RJbnRlcm5hbFNuYXBzaG90QmVmb3JlVXBkYXRlKTtcbiAgICAgICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGluc3RhbmNlLmNvbXBvbmVudERpZFVwZGF0ZShwcmV2UHJvcHMsIHByZXZTdGF0ZSwgaW5zdGFuY2UuX19yZWFjdEludGVybmFsU25hcHNob3RCZWZvcmVVcGRhdGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gLy8gVE9ETzogSSB0aGluayB0aGlzIGlzIG5vdyBhbHdheXMgbm9uLW51bGwgYnkgdGhlIHRpbWUgaXQgcmVhY2hlcyB0aGVcbiAgICAgICAgICAvLyBjb21taXQgcGhhc2UuIENvbnNpZGVyIHJlbW92aW5nIHRoZSB0eXBlIGNoZWNrLlxuXG5cbiAgICAgICAgICB2YXIgdXBkYXRlUXVldWUgPSBmaW5pc2hlZFdvcmsudXBkYXRlUXVldWU7XG5cbiAgICAgICAgICBpZiAodXBkYXRlUXVldWUgIT09I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WcpIHtcbiAgICAgICAgICAgICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgICAgICAgICAgICBfaW5zdGFuY2UgPSBnZXRQdWJsaWNJbnN0YW5jZShmaW5pc2hlZFdvcmsuY2hpbGQuc3RhdGVOb2RlKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSBDbGFzc0NvbXBvbmVudDpcbiAgICAgICAgICAgICAgICAgIF9pbnN0YW5jZSA9IGZpbmlzaGVkV29yay5jaGlsZC5zdGF0ZU5vZGU7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb21taXRVcGRhdGVRdWV1ZShmaW5pc2hlZFdvcmssIF91cGRhdGVRdWV1ZSwgX2luc3RhbmNlKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICB2YXIgX2luc3RhbmNlMiA9IGZpbmlzaGVkV29yay5zdGF0ZU5vZGU7IC8vIFJlbmRlcmVycyBtYXkgc2NoZWR1bGUgd29yayB0byBiZSBkb25lIGFmdGVyIGhvc3QgY29tcG9uZW50cyBhcmUgbW91bnRlZFxuICAgICAgICAgIC8vIChlZyBET00gcmVuZGVyZXIgbWF5IHNjaGVkdWxlIGF1dG8tZm9jdXMgZm9yIGlucHV0cyBhbmQgZm9ybSBjb250cm9scykuXG4gICAgICAgICAgLy8gVGhlc2UgZWZmZWN0cyBzaG91bGQgb25seSBiZSBjb21taXR0ZWQgd2hlbiBjb21wb25lbnRzIGFyZSBmaXJzdCBtb3VudGVkLFxuICAgICAgICAgIC8vIGFrYSB3aGVuIHRoZXJlIGlzIG5vIGN1cnJlbnQvYWx0ZXJuYXRlLlxuXG4gICAgICAgICAgaWYgKGN1cnJlbnQgPT09IG51bGwgJiYgZmluaXNoZWRXb3JrLmZsYWdzICYgVXBkYXRlKSB7XG4gICAgICAgICAgICB2YXIgdHlwZSA9IGZpbmlzaGVkV29yay50eXBlO1xuICAgICAgICAgICAgdmFyIHByb3BzID0gZmluaXNoZWRXb3JrLm1lbW9pemVkUHJvcHM7XG4gICAgICAgICAgICBjb21taXRNb3VudChfaW5zdGFuY2UyLCB0eXBlLCBwcm9wcywgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RUZXh0OlxuICAgICAgICB7XG4gICAgICAgICAgLy8gV2UgaGF2ZSBubyBsaWZlLWN5Y2xlcyBhc3NvY2lhdGVkIHdpdGggdGV4dC5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RQb3J0YWw6XG4gICAgICAgIHtcbiAgICAgICAgICAvLyBXZSBoYXZlIG5vIGxpZmUtY3ljbGVzIGFzc29jaWF0ZWQgd2l0aCBwb3J0YWxzLlxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgUHJvZmlsZXI6XG4gICAgICAgIHtcbiAgICAgICAgICB7XG4gICAgICAgICAgICB2YXIgX2ZpbmlzaGVkV29yayRtZW1vaXplMiA9IGZpbmlzaGVkV29yay5tZW1vaXplZFByb3BzLFxuICAgICAgICAgICAgICAgIG9uQ29tbWl0ID0gX2ZpbmlzaGVkV29yayRtZW1vaXplMi5vbkNvbW1pdCxcbiAgICAgICAgICAgICAgICBvblJlbmRlciA9IF9maW5pc2hlZFdvcmskbWVtb2l6ZTIub25SZW5kZXI7XG4gICAgICAgICAgICB2YXIgZWZmZWN0RHVyYXRpb24gPSBmaW5pc2hlZFdvcmsuc3RhdGVOb2RlLmVmZmVjdER1cmF0aW9uO1xuICAgICAgICAgICAgdmFyIGNvbW1pdFRpbWUgPSBnZXRDb21taXRUaW1lKCk7XG4gICAgICAgICAgICB2YXIgcGhhc2UgPSBjdXJyZW50ID09PSBudWxsID8gJ21vdW50JyA6ICd1cGRhdGUnO1xuXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGlmIChpc0N1cnJlbnRVcGRhdGVOZXN0ZWQoKSkge1xuICAgICAgICAgICAgICAgIHBoYXNlID0gJ25lc3RlZC11cGRhdGUnO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2Ygb25SZW5kZXIgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgICAgb25SZW5kZXIoZmluaXNoZWRXb3JrLm1lbW9pemVkUHJvcHMuaWQsIHBoYXNlLCBmaW5pc2hlZFdvcmsuYWN0dWFsRHVyYXRpb24sIGZpbmlzaGVkV29yay50cmVlQmFzZUR1cmF0aW9uLCBmaW5pc2hlZFdvcmsuYWN0dWFsU3RhcnRUaW1lLCBjb21taXRUaW1lKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBpZiAodHlwZW9mIG9uQ29tbWl0ID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgb25Db21taXQoZmluaXNoZWRXb3JrLm1lbW9pemVkUHJvcHMuaWQsIHBoYXNlLCBlZmZlY3REdXJhdGlvbiwgY29tbWl0VGltZSk7XG4gICAgICAgICAgICAgIH0gLy8gU2NoZWR1bGUgYSBwYXNzaXZlIGVmZmVjdCBmb3IgdGhpcyBQcm9maWxlciB0byBjYWxsIG9uUG9zdENvbW1pdCBob29rcy5cbiAgICAgICAgICAgICAgLy8gVGhpcyBlZmZlY3Qgc2hvdWxkIGJlIHNjaGVkdWxlZCBldmVuIGlmIHRoZXJlIGlzIG5vIG9uUG9zdENvbW1pdCBjYWxsYmFjayBmb3IgdGhpcyBQcm9maWxlcixcbiAgICAgICAgICAgICAgLy8gYmVjYXVzZSB0aGUgZWZmZWN0IGlzIGFsc28gd2hlcmUgdGltZXMgYnViYmxlIHRvIHBhcmVudCBQcm9maWxlcnMuXG5cblxuICAgICAgICAgICAgICBlbnF1ZXVlUGVuZGluZ1Bhc3NpdmVQcm9maWxlckVmZmVjdChmaW5pc2hlZFdvcmspOyAvLyBQcm9wYWdhdGUgbGF5b3V0IGVmZmVjdCBkdXJhdGlvbnMgdG8gdGhlIG5leHQgbmVhcmVzdCBQcm9maWxlciBhbmNlc3Rvci5cbiAgICAgICAgICAgICAgLy8gRG8gbm90IHJlc2V0IHRoZXNlIHZhbHVlcyB1bnRpbCB0aGUgbmV4dCByZW5kZXIgc28gRGV2VG9vbHMgaGFzIGEgY2hhbmNlIHRvIHJlYWQgdGhlbSBmaXJzdC5cblxuICAgICAgICAgICAgICB2YXIgcGFyZW50RmliZXIgPSBmaW5pc2hlZFdvcmsucmV0dXJuO1xuXG4gICAgICAgICAgICAgIG91dGVyOiB3aGlsZSAocGFyZW50RmliZXIgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKHBhcmVudEZpYmVyLnRhZykge1xuICAgICAgICAgICAgICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJvb3QgPSBwYXJlbnRGaWJlci5zdGF0ZU5vZGU7XG4gICAgICAgICAgICAgICAgICAgIHJvb3QuZWZmZWN0RHVyYXRpb24gKz0gZWZmZWN0RHVyYXRpb247XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuXG4gICAgICAgICAgICAgICAgICBjYXNlIFByb2ZpbGVyOlxuICAgICAgICAgICAgICAgICAgICB2YXIgcGFyZW50U3RhdGVOb2RlID0gcGFyZW50RmliZXIuc3RhdGVOb2RlO1xuICAgICAgICAgICAgICAgICAgICBwYXJlbnRTdGF0ZU5vZGUuZWZmZWN0RHVyYXRpb24gKz0gZWZmZWN0RHVyYXRpb247XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuICAgICAgIC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IaWRkZW4pIHtcbiAgICAgICAgICAgICAgaGlkZUluc3RhbmNlKGluc3RhbmNlKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHVuaGlkZUluc3RhbmNlKG5vZGUuc3RhdGVOb2RlLCBub2RlLm1lbW9pemVkUHJvcHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAobm9kZS50YWcgPT09IEhvc3RUZXh0KSB7XG4gICAgICAgIGlmIChob3N0U3VidHJlZVJvb3QgPT09IG51bGwpIHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgdmFyIF9pbnN0YW5jZTMgPSBub2RlLnN0YXRlTm9kZTtcblxuICAgICAgICAgICAgaWYgKGlzSGlkZGVuKSB7XG4gICAgICAgICAgICAgIGhpZGVUZXh0SW5zdGFuY2UoX2luc3RhbmNlMyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB1bmhpZGVUZXh0SW5zdGFuY2UoX2luc3RhbmNlMywgbm9kZS5tZW1vaXplZFByb3BzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKChub2RlLnRhZyA9PT0gT2Zmc2NyZWVuQ29tcG9uZW50IHx8IG5vZGUudGFnID09PSBMZWdhY3lIaWRkZW5Db21wb25lbnQpICYmIG5vZGUubWVtb2l6ZWRTdGF0ZSAhPT0gbnVsbCAmJiBub2RlICE9PSBmaW5pc2hlZFdvcmspIDsgZWxzZSBpZiAobm9kZS5jaGlsZCAhPT0gbnVsbCkge1xuICAgICAgICBub2RlLmNoaWxkLnJldHVybiA9IG5vZGU7XG4gICAgICAgIG5vZGUgPSBub2RlLmNoaWxkO1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cblxuICAgICAgaWYgKG5vZGUgPT09IGZpbmlzaGVkV29yaykge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHdoaWxlIChub2RlLnNpYmxpbmcgPT09IG51bGwpIHtcbiAgICAgICAgaWYgKG5vZGUucmV0dXJuID09PSBudWxsIHx8IG5vZGUucmV0dXJuID09PSBmaW5pc2hlZFdvcmspIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaG9zdFN1YnRyZWVSb290ID09PSBub2RlKSB7XG4gICAgICAgICAgaG9zdFN1YnRyZWVSb290ID0gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIG5vZGUgPSBub2RlLnJldHVybjtcbiAgICAgIH1cblxuICAgICAgaWYgKGhvc3RTdWJ0cmVlUm9vdCA9PT0gbm9kZSkge1xuICAgICAgICBob3N0U3VidHJlZVJvb3QgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICBub2RlLnNpYmxpbmcucmV0dXJuID0gbm9kZS5yZXR1cm47XG4gICAgICBub2RlID0gbm9kZS5zaWJsaW5nO1xuICAgIH1cbiAgfVxufVxuXG5mdW5jdGlvbiBjb21taXRBdHRhY2hSZWYoZmluaXNoZWRXb3JrKSB7XG4gIHZhciByZWYgPSBmaW5pc2hlZFdvcmsucmVmO1xuXG4gIGlmIChyZWYgIT09IG51bGwpIHtcbiAgICB2YXIgaW5zdGFuY2UgPSBmaW5pc2hlZFdvcmsuc3RhdGVOb2RlO1xuICAgIHZhciBpbnN0YW5jZVRvVXNlO1xuXG4gICAgc3dpdGNoIChm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ZXJzZSB0aGVcbiAgICAvLyB0cmVlIGR1cmluZyB0aGUgY29tbWl0IHBoYXNlLiBUaGlzIHdvdWxkIG1ha2UgaW5zZXJ0aW9ucyBmYXN0ZXIsIHRvby5cbiAgICB2YXIgcGFyZW50ID0gcmV0dXJuRmliZXI7XG5cbiAgICBmaW5kUGFyZW50OiB3aGlsZSAocGFyZW50ICE9PSBudWxsKSB7XG4gICAgICBzd2l0Y2ggKHBhcmVudC50YWcpIHtcbiAgICAgICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGhvc3RQYXJlbnQgPSBwYXJlbnQuc3RhdGVOb2RlO1xuICAgICAgICAgICAgaG9zdFBhcmVudElzQ29udGFpbmVyID0gZmFsc2U7XG4gICAgICAgICAgICBicmVhayBmaW5kUGFyZW50O1xuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIEhvc3RSb290OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGhvc3RQYXJlbnQgPSBwYXJlbnQuc3RhdGVOb2RlLmNvbnRhaW5lckluZm87XG4gICAgICAgICAgICBob3N0UGFyZW50SXNDb250YWluZXIgPSB0cnVlO1xuICAgICAgICAgICAgYnJlYWsgZmluZFBhcmVudDtcbiAgICAgICAgICB9XG5cbiAgICAgICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGhvc3RQYXJlbnQgPSBwYXJlbnQuc3RhdGVOb2RlLmNvbnRhaW5lckluZm87XG4gICAgICAgICAgICBob3N0UGFyZW50SXNDb250YWluZXIgPSB0cnVlO1xuICAgICAgICAgICAgYnJlYWsgZmluZFBhcmVudDtcbiAgICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHBhcmVudCA9IHBhcmVudC5yZXR1cm47XG4gICAgfVxuXG4gICAgaWYgKGhvc3RQYXJlbnQgPT09IG51bGwpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcignRXhwZWN0ZWQgdG8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ZWRGaWJlcik7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICBjYXNlIERlaHlkcmF0ZWRGcmFnbWVudDpcbiAgICAgIHtcbiAgICAgICAgLy8gRGVsZXRlIHRoZSBkZWh5ZHJhdGVkIHN1c3BlbnNlIGJvdW5kYXJ5IGFuZCBhbGwgb2YgaXRzIGNvbnRlbnQuXG5cblxuICAgICAgICBpZiAoc3VwcG9ydHNNdXRhdGlvbikge1xuICAgICAgICAgIGlmIChob3N0UGFyZW50ICE9PSBudWxsKSB7XG4gICAgICAgICAgICBpZiAoaG9zdFBhcmVudElzQ29udGFpbmVyKSB7XG4gICAgICAgICAgICAgIGNsZWFyU3VzcGVuc2VCb3VuZGFyeUZyb21Db250YWluZXIoaG9zdFBhcmVudCwgZGVsZXRlZEZpYmVyLnN0YXRlTm9kZSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBjbGVhclN1c3BlbnNlQm91bmRhcnkoaG9zdFBhcmVudCwgZGVsZXRlZEZpYmVyLnN0YXRlTm9kZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAge1xuICAgICAgICBpZiAoc3VwcG9ydHNNdXRhdGlvbikge1xuICAgICAgICAgIC8vIFdoZW4gd2UgZ28gaW50byBhIHBvcnRhbCwgaXQgYmVjb21lcyB0aGUgcGFyZW50IHRvIHJlbW92ZSBmcm9tLlxuICAgICAgICAgIHZhciBfcHJldkhvc3RQYXJlbnQgPSBob3N0UGFyZW50O1xuICAgICAgICAgIHZhciBfcHJldkhvc3RQYXJlbnRJc0NvbnRhaW5lciA9IGhvc3RQYXJlbnRJc0NvbnRhaW5lcjtcbiAgICAgICAgICBob3N0UGFyZW50ID0gZGVsZXRlZEZpYmVyLnN0YXRlTm9kZS5jb250YWluZXJJb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hciBmaXJzdEVmZmVjdCA9IGxhc3RFZmZlY3QubmV4dDtcbiAgICAgICAgICAgICAgdmFyIGVmZmVjdCA9IGZpcnN0RWZmZWN0O1xuXG4gICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICB2YXIgX2VmZmVjdCA9IGVmZmVjdCxcbiAgICAgICAgICAgICAgICAgICAgZGVzdHJveSA9IF9lZmZlY3QuZGVzdHJveSxcbiAgICAgICAgICAgICAgICAgICAgdGFnID0gX2VmZmVjdC50YWc7XG5cbiAgICAgICAgICAgICAgICBpZiAoZGVzdHJveSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoKHRhZyAmIEluc2VydGlvbikgIT09IE5vRmxhZ3MkMSkge1xuICAgICAgICAgICAgICAgICAgICBzYWZlbHlDYWxsRGVzdHJveShkZWxldGVkRmliZXIsIG5lYXJlc3RNb3VudGVkQW5jZXN0b3IsIGRlc3Ryb3kpO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgodGFnICYgTGF5b3V0KSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBtYXJrQ29tcG9uZW50TGF5b3V0RWZmZWN0VW5tb3VudFN0YXJ0ZWQoZGVsZXRlZEZpYmVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmICggZGVsZXRlZEZpYmVyLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgICBzYWZlbHlDYWxsRGVzdHJveShkZWxldGVkRmliZXIsIG5lYXJlc3RNb3VudGVkQW5jZXN0b3IsIGRlc3Ryb3kpO1xuICAgICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGRlbGV0ZWRGaWJlcik7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgc2FmZWx5Q2FsbERlc3Ryb3koZGVsZXRlZEZpYmVyLCBuZWFyZXN0TW91bnRlZEFuY2VzdG9yLCBkZXN0cm95KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBtYXJrQ29tcG9uZW50TGF5b3V0RWZmZWN0VW5tb3VudFN0b3BwZWQoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGVmZmVjdCA9IGVmZmVjdC5uZXh0O1xuICAgICAgICAgICAgICB9IHdoaWxlIChlZmZlY3QgIT09IGZpcnN0RWZmZWN0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZWN1cnNpdmVseVRyYXZlcnNlRGVsZXRpb25FZmZlY3RzKGZpbmlzaGVkUm9vdCwgbmVhcmVzdE1vdW50ZWRBbmNlc3RvciwgZGVsZXRlZEZpYmVyKTtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBDbGFzc0NvbXBvbmVudDpcbiAgICAgIHtcbiAgICAgICAgaWYgKCFvZmZzY3JlZW5TdWJ0cmVlV2FzSGlkZGVuKSB7XG4gICAgICAgICAgc2FmZWx5RGV0YWNoUmVmKGRlbGV0ZWRGaWJlciwgbmVhcmVzdE1vdW50ZWRBbmNlc3Rvcik7XG4gICAgICAgICAgdmFyIGluc3RhbmNlID0gZGVsZXRlZEZpYmVyLnN0YXRlTm9kZTtcblxuICAgICAgICAgIGlmICh0eXBlb2YgaW5zdGFuY2UuY29tcG9uZW50V2lsbFVubW91bnQgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIHNhZmVseUNhbGxDb21wb25lb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yB0aGUgc2FtZSBjb21taXQuXG5cblxuICAgICAgICAgIGlmICggZmluaXNoZWRXb3JrLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgc3RhcnRMYXlvdXRFZmZlY3RUaW1lcigpO1xuICAgICAgICAgICAgICBjb21taXRIb29rRWZmZWN0TGlzdFVubW91bnQoTGF5b3V0IHwgSGFzRWZmZWN0LCBmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4pO1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIGNvbW1pdEhvb2tFZmZlY3RMaXN0VW5tb3VudChMYXlvdXQgfCBIYXNFZmZlY3QsIGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybik7XG4gICAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAge1xuICAgICAgICByZWN1cnNpdmVseVRyYXZlcnNlTXV0YXRpb25FZmZlY3RzKHJvb3QsIGZpbmlzaGVkV29yayk7XG4gICAgICAgIGNvbW1pdFJlY29uY2lsaW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ZSBpblxuICAgICAgICAgICAgICAvLyB0aGlzIGNhc2UuXG5cbiAgICAgICAgICAgICAgdmFyIG9sZFByb3BzID0gY3VycmVudCAhPT0gbnVsbCA/IGN1cnJlbnQubWVtb2l6ZWRQcm9wcyA6IG5ld1Byb3BzO1xuICAgICAgICAgICAgICB2YXIgdHlwZSA9IGZpbmlzaGVkV29yay50eXBlOyAvLyBUT0RPOiBUeXBlIHRoZSB1cGRhdGVRdWV1ZSB0byBiZSBzcGVjaWZpYyB0byBob3N0IGNvbXBvbmVudHMuXG5cbiAgICAgICAgICAgICAgdmFyIHVwZGF0ZVBheWxvYWQgPSBmaW5pc2hlZFdvcmsudXBkYXRlUXVldWU7XG4gICAgICAgICAgICAgIGZpbmlzaGVkV29yay51cGRhdGVRdWV1ZSA9IG51bGw7XG5cbiAgICAgICAgICAgICAgaWYgKHVwZGF0ZVBheWxvYWQgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgY29tbWl0VXBkYXRlKF9pbnN0YW5jZTQsIHVwZGF0ZVBheWxvYWQsIHR5cGUsIG9sZFByb3BzLCBuZXdQcm9wcywgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgIHtcbiAgICAgICAgcmVjdXJzaXZlbHlUcmF2ZXJzZU11dGF0aW9uRWZmZWN0cyhyb290LCBmaW5pc2hlZFdvcmspO1xuICAgICAgICBjb21taXRSZWNvbmNpb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cHR1cmVDb21taXRQaGFzZUVycm9yKGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybiwgZXJyb3IpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgSG9zdFJvb3Q6XG4gICAgICB7XG4gICAgICAgIHJlY3Vyc2l2ZWx5VHJhdmVyc2VNdXRhdGlvbkVmZmVjdHMocm9vdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgY29tbWl0UmVjb25jaWxpYXRpb25FZmZlY3RzKGZpbmlzaGVkV29yayk7XG5cbiAgICAgICAgaWYgKGZsYWdzICYgVXBkYXRlKSB7XG4gICAgICAgICAgaWYgKHN1cHBvcnRzTXV0YXRpb24gJiYgc3VwcG9ydHNIeWRyYXRpb24pIHtcbiAgICAgICAgICAgIGlmIChjdXJyZW50ICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIHZhciBwcmV2Um9vdFN0YXRlID0gY3VycmVudC5tZW1vaXplZFN0YXRlO1xuXG4gICAgICAgICAgICAgIGlmIChwcmV2Um9vdFN0YXRlLmlzRGVoeWRyYXRlZCkge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICBjb21taXRIeWRyYXRlZENvbnRhaW5lcihyb290LmNvbnRhaW5lckluZm8pO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoc3VwcG9ydHNQZXJzaXN0ZW5jZSkge1xuICAgICAgICAgICAgdmFyIGNvbnRhaW5lckluZm8gPSByb290LmNvbnRhaW5lckluZm87XG4gICAgICAgICAgICB2YXIgcGVuZGluZ0NoaWxkcmVuID0gcm9vdC5wZW5kaW5nQ2hpbGRyZW47XG5cbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIHJlcGxhY2VDb250YWluZXJDaGlsZHJlbihjb250YWluZXJJbmZvLCBwZW5kaW5nQ2hpbGRyZW4pO1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAge1xuICAgICAgICByZWN1cnNpdmVseVRyYXZlcnNlTXV0YXRpb25FZmZlY3RzKHJvb3QsIGZpbmlzaGVkV29yayk7XG4gICAgICAgIGNvbW1pdFJlY29uY2lsaWF0aW9uRWZmZWN0cyhmaW5pc2hlZFdvcmspO1xuXG4gICAgICAgIGlmIChmbGFncyAmIFVwZGF0ZSkge1xuICAgICAgICAgIGlmIChzdXBwb3J0c1BlcnNpc3RlbmNlKSB7XG4gICAgICAgICAgICB2YXIgcG9ydGFsID0gZmluaXNoZWRXb3JrLnN0YXRlTm9kZTtcbiAgICAgICAgICAgIHZhciBfY29udGFpbmVySW5mbyA9IHBvcnRhbC5jb250YWluZXJJbmZvO1xuICAgICAgICAgICAgdmFyIF9wZW5kaW5nQ2hpbGRyZW4gPSBwb3J0YWwucGVuZGluZ0NoaWxkcmVuO1xuXG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICByZXBsYWNlQ29udGFpbmVyQ2hpbGRyZW4oX2NvbnRhaW5lckluZm8sIF9wZW5kaW5nQ2hpbGRyZW4pO1xuICAgICAgICAgICAgfSB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gcmVzZXRDdXJyZW50RmliZXIoKTtcbiAgICB9XG5cbiAgICBpZiAoZmliZXIgPT09IHN1YnRyZWVSb290KSB7XG4gICAgICBuZXh0RWZmZWN0ID0gbnVsbDtcbiAgICAgIHJldHVybjtcbiAgICB9XG5cbiAgICB2YXIgc2libGluZyA9IGZpYmVyLnNpYmxpbmc7XG5cbiAgICBpZiAoc2libGluZyAhPT0gbnVsbCkge1xuICAgICAgc2libGluZy5yZXR1cm4gPSBmaWJlci5yZXR1cm47XG4gICAgICBuZXh0RWZmZWN0ID0gc2libGluZztcbiAgICAgIHJldHVybjtcbiAgICB9XG5cbiAgICBuZXh0RWZmZWN0ID0gZmliZXIucmV0dXJuO1xuICB9XG59XG5cbmZ1bmN0aW9uIGRpc2FwcGVhckxheW91dEVmZmVjdHNfYmVnaW4oc3VidHJlZVJvb3QpIHtcbiAgd2hpbGUgKG5leHRFZmZlY3QgIT09IG51bGwpIHtcbiAgICB2YXIgZmliZXIgPSBuZXh0RWZmZWN0O1xuICAgIHZhciBmaXJzdENoaWxkID0gZmliZXIuY2hpbGQ7IC8vIFRPRE8gKE9mZnNjcmVlbikgQ2hlY2s6IGZsYWdzICYgKFJlZlN0YXRpYyB8IExheW91dFN0YXRpYylcblxuICAgIHN3aXRjaCAoZmliZXIudGFnKSB7XG4gICAgICBjYXNlIEZ1bmN0aW9uQ29tcG9uZW50OlxuICAgICAgY2FzZSBGb3J3YXJkUmVmOlxuICAgICAgY2FzZSBNZW1vQ29tcG9uZW50OlxuICAgICAgY2FzZSBTaW1wbGVNZW1vQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgaWYgKCBmaWJlci5tb2RlICYgUHJvZmlsZU1vZGUpIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgY29tbWl0SG9va0VmZmVjdExpc3RVbm1vdW50KExheW91dCwgZmliZXIsIGZpYmVyLnJldHVybik7XG4gICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICByZWNvcmRMYXlvdXRFZmZlY3REdXJhdGlvbihmaWJlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvbW1pdEhvb2tFZmZlY3RMaXN0VW5tb3VudChMYXlvdXQsIGZpYmVyLCBmaWJlci5yZXR1cm4pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgQ2xhc3NDb21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICAvLyBUT0RPIChPZmZzY3JlZW4pIENoZWNrOiBmbGFncyAmIFJlZlN0YXRpY1xuICAgICAgICAgIHNhZmVseURldGFjaFJlZihmaWJlciwgZmliZXIucmV0dXJuKTtcbiAgICAgICAgICB2YXIgaW5zdGFuY2UgPSBmaWJlci5zdGF0ZU5vZGU7XG5cbiAgICAgICAgICBpZiAodHlwZW9mIGluc3RhbmNlLmNvbXBvbmVudFdpbGxVbm1vdW50ID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICBzYWZlbHlDYWxsQ29tcG9uZW50V2lsbFVubW91bnQoZmliZXIsIGZpYmVyLnJldHVybiwgaW5zdGFuY2UpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAge1xuICAgICAgICAgIHNhZmVseURldGFjaFJlZihmaWJlciwgZmliZXIucmV0dXJuKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIE9mZnNjcmVlbkNvbXBvbmVudDpcbiAgICAgICAge1xuICAgICAgICAgIC8vIENoZWNrIGlmIHRoaXMgaXMgYVxuICAgICAgICAgIHZhciBpc0hpZGRlbiA9IGZpYmVyLm1lbW9pemVkU3RhdGUgIT09IG51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RcbiAgICAgICAgICAvLyB5ZXQsIGJ1dCB3ZSBjYW4gZGlzY29ubmVjdCB0aGUgYHNpYmxpbmdgIGFuZCBgY2hpbGRgIHBvaW50ZXJzLlxuICAgICAgICAgIHZhciBwcmV2aW91c0ZpYmVyID0gZmliZXIuYWx0ZXJuYXRlO1xuXG4gICAgICAgICAgaWYgKHByZXZpb3VzRmliZXIgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHZhciBkZXRhY2hlZENoaWxkID0gcHJldmlvdXNGaWJlci5jaGlsZDtcblxuICAgICAgICAgICAgaWYgKGRldGFjaGVkQ2hpbGQgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgcHJldmlvdXNGaWJlci5jaGlsZCA9IG51bGw7XG5cbiAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgIHZhciBkZXRhY2hlZFNpYmxpbmcgPSBkZXRhY2hlZENoaWxkLnNpYmxpbmc7XG4gICAgICAgICAgICAgICAgZGV0YWNoZWRDaGlsZC5zaWJsaW5nID0gbnVsbDtcbiAgICAgICAgICAgICAgICBkZXRhY2hlZENoaWxkID0gZGV0YWNoZWRTaWJsaW5nO1xuICAgICAgICAgICAgICB9IHdoaWxlIChkZXRhY2hlZENoaWxkICE9PSBudWxsKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBuZXh0RWZmZWN0ID0gZmliZXI7XG4gICAgICB9XG4gICAgfVxuXG4gICAgaWYgKChmaWJlci5zdWJ0cmVlRmxhZ3MgJiBQYXNzaXZlTWFzaykgIT09IE5vRmxhZ3MgJiYgY2hpbGQgIT09IG51bGwpIHtcbiAgICAgIGNoaWxkLnJldHVybiA9IGZpYmVyO1xuICAgICAgbmV4dEVmZmVjdCA9IGNoaWxkO1xuICAgIH0gZWxzZSB7XG4gICAgICBjb21taXRQYXNzaXZlVW5tb3VudEVmZmVjdHNfY29tcGxldGUoKTtcbiAgICB9XG4gIH1cbn1cblxuZnVuY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ZmZlY3RMaXN0VW5tb3VudChMYXlvdXQgfCBIYXNFZmZlY3QsIGZpYmVyLCBmaWJlci5yZXR1cm4pO1xuICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaWJlciwgZmliZXIucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBDbGFzc0NvbXBvbmVudDpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBpbnN0YW5jZSA9IGZpYmVyLnN0YXRlTm9kZTtcblxuICAgICAgICAgIGlmICh0eXBlb2YgaW5zdGFuY2UuY29tcG9uZW50V2lsbFVubW91bnQgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIHNhZmVseUNhbGxDb21wb25lbnRXaWxsVW5tb3VudChmaWJlciwgZmliZXIucmV0dXJuLCBpbnN0YW5jZSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9XG4gIH1cbn1cblxuZnVuY3Rpb24gaW52b2tlUGFzc2l2ZUVmZmVjdFVubW91bnRJbkRFVihmaWJlcikge1xuICB7XG4gICAgLy8gV2UgZG9uJ3QgbmVlZCB0byByZS1jaGVjayBTdHJpY3RFZmZlY3RzTW9kZSBoZXJlLlxuICAgIC8vIFRoaXMgZnVuY3Rpb24gaXMgb25seSBjYWxsZWQgaWYgdGhhdCBjaGVjayBoYXMgYWxyZWFkeSBwYXNzZWQuXG4gICAgc3dpdGNoIChmaWJlci50YWcpIHtcbiAgICAgIGNhc2UgRnVuY3Rpb25Db21wb25lbnQ6XG4gICAgICBjYXNlIEZvcndhcmRSZWY6XG4gICAgICBjYXNlIFNpbXBsZU1lbW9Db21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29tbWl0SG9va0VmZmV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W5lIG5vLWZhbGx0aHJvdWdoXG5cbiAgICAgIGNhc2UgUkVBQ1RfVFJBQ0lOR19NQVJLRVJfVFlQRTpcblxuICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLWZhbGx0aHJvdWdoXG5cbiAgICAgIGNhc2UgUkVBQ1RfREVCVUdfVFJBQ0lOR19NT0RFX1RZUEU6XG5cbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1mYWxsdGhyb3VnaFxuXG4gICAgICBkZWZhdWx0OlxuICAgICAgICB7XG4gICAgICAgICAgaWYgKHR5cGVvZiB0eXBlID09PSAnb2JqZWN0JyAmJiB0eXBlICE9PSBudWxsKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKHR5cGUuJCR0eXBlb2YpIHtcbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9QUk9WSURFUl9UWVBFOlxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gQ29udGV4dFByb3ZpZGVyO1xuICAgICAgICAgICAgICAgIGJyZWFrIGdldFRhZztcblxuICAgICAgICAgICAgICBjYXNlIFJFQUNUX0NPTlRFWFRfVFlQRTpcbiAgICAgICAgICAgICAgICAvLyBUaGlzIGlzIGEgY29uc3VtZXJcbiAgICAgICAgICAgICAgICBmaWJlclRhZyA9IENvbnRleHRDb25zdW1lcjtcbiAgICAgICAgICAgICAgICBicmVhayBnZXRUYWc7XG5cbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9GT1JXQVJEX1JFRl9UWVBFOlxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gRm9yd2FyZFJlZjtcblxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgIHJlc29sdmVkVHlwZSA9IHJlc29sdmVGb3J3YXJkUmVmRm9ySG90UmVsb2FkaW5nKHJlc29sdmVkVHlwZSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgYnJlYWsgZ2V0VGFnO1xuXG4gICAgICAgICAgICAgIGNhc2UgUkVBQ1RfTUVNT19UWVBFOlxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gTWVtb0NvbXBvbmVudDtcbiAgICAgICAgICAgICAgICBicmVhayBnZXRUYWc7XG5cbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9MQVpZX1RZUEU6XG4gICAgICAgICAgICAgICAgZmliZXJUYWcgPSBMYXp5Q29tcG9uZW50O1xuICAgICAgICAgICAgICAgIHJlc29sdmVkVHlwZSA9IG51bGw7XG4gICAgICAgICAgICAgICAgYnJlYWsgZ2V0VGFnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIHZhciBpbmZvID0gJyc7XG5cbiAgICAgICAgICB7XG4gICAgICAgICAgICBpZiAodHlwZSA9PT0gdW5kZWZpbmVkIHx8IHR5cGVvZiB0eXBlID09PSAnb2JqZWN0JyAmJiB0eXBlICE9PSBudWxsICYmIE9iamVjdC5rZXlzKHR5cGUpLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICBpbmZvICs9ICcgWW91IGxpa2VseSBmb3Jnb3QgdG8gZXhwb3J0IHlvdXIgY29tcG9uZW50IGZyb20gdGhlIGZpbGUgJyArIFwiaXQncyBkZWZpbmVkIGluLCBvciB5b3UgbWlnaHQgaGF2ZSBtaXhlZCB1cCBkZWZhdWx0IGFuZCBcIiArICduYW1lZCBpbXBvcnRzLic7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBvd25lck5hbWUgPSBvd25lciA/IGdldENvbXBvbmVudE5hbWVGcm9tRmliZXIob3duZXIpIDogbnVsbDtcblxuICAgICAgICAgICAgaWYgKG93bmVyTmFtZSkge1xuICAgICAgICAgICAgICBpbmZvICs9ICdcXG5cXG5DaGVjayB0aGUgcmVuZGVyIG1ldGhvZCBvZiBgJyArIG93bmVyTmFtZSArICdgLic7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICA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lbnQpO1xuXG4gICAgaWYgKGZpYmVyID09PSB1bmRlZmluZWQpIHtcbiAgICAgIGlmICh0eXBlb2YgY29tcG9uZW50LnJlbmRlciA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1VuYWJsZSB0byBmaW5kIG5vZGUgb24gYW4gdW5tb3VudGVkIGNvbXBvbmVudC4nKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHZhciBrZXlzID0gT2JqZWN0LmtleXMoY29tcG9uZW50KS5qb2luKCcsJyk7XG4gICAgICAgIHRocm93IG5ldyBFcnJvcihcIkFyZ3VtZW50IGFwcGVhcnMgdG8gbm90IGJlIGEgUmVhY3RDb21wb25lbnQuIEtleXM6IFwiICsga2V5cyk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgdmFyIGhvc3RGaWJlciA9IGZpbmRDdXJyZW50SG9zdEZpYmVyKGZpYmVyKTtcblxuICAgIGlmIChob3N0RmliZXIgPT09IG51bGwpIHtcbiAgICAgIHJldHVybiBudWxsO1xuICAgIH1cblxuICAgIGlmIChob3N0RmliZXIubW9kZSAmIFN0cmljdExlZ2FjeU1vZGUpIHtcbiAgICAgIHZhciBjb21wb25lbnROYW1lID0gZ2V0Q29tcG9uZW50TmFtZUZyb21GaWJlcihmaWJlcikgfHwgJ0NvbXBvbmVudCc7XG5cbiAgICAgIGlmICghZGlkV2FybkFib3V0RmluZE5vZGVJblN0cmljdE1vZGVbY29tcG9uZW50TmFtZV0pIHtcbiAgICAgICAgZGlkV2FybkFib3V0RmluZE5vZGVJblN0cmljdE1vZGVbY29tcG9uZW50TmFtZV0gPSB0cnVlO1xuICAgICAgICB2YXIgcHJldmlvdXNGaWJlciA9IGN1cnJlbnQ7XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBzZXRDdXJyZW50RmliZXIoaG9zdEZpYmVyKTtcblxuICAgICAgICAgIGlmIChmaWJlci5tb2RlICYgU3RyaWN0TGVnYWN5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pIHtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNsaXAgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGxheWluZyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2VpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc3BlZWQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5sb29wID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaG91bGRSZXNldCA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJBbmltYXRpb25TdGF0ZS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQkFuaW1hdGlvblN0YXRlIHx8IChQQkFuaW1hdGlvblN0YXRlID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQkFuaW1hdG9yIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvYW5pbWF0b3IuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBBbmltYXRvclNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6IDEwNDIsXG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGNvbnN0IHdyaXRlciA9IFBCQW5pbWF0b3IuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbm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pO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQkF1ZGlvU291cmNlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wbGF5aW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52b2x1bWUgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5sb29wID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5waXRjaCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmF1ZGlvQ2xpcFVybCA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkF1ZGlvU291cmNlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQXVkaW9Tb3VyY2UgfHwgKFBCQXVkaW9Tb3VyY2UgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCQXVkaW9Tb3VyY2UgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9hdWRpb19zb3VyY2UuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBBdWRpb1NvdXJjZVNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6IDEwMjAsXG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGNvbnN0IHdyaXRlciA9IFBCQXVkaW9Tb3VyY2U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AgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGxheWluZyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uudm9sdW1lID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudXJsID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCQXVkaW9TdHJlYW0uZGVjb2RlID0gZGVjb2RlO1xufSkoUEJBdWRpb1N0cmVhbSB8fCAoUEJBdWRpb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ICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYXZhdGFySWQgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYW5jaG9yUG9pbnRJZCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCQXZhdGFyQXR0YWNoLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQXZhdGFyQXR0YWNoIHx8IChQQkF2YXRhckF0dGFjaCA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJBdmF0YXJBdHRhY2ggfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9hdmF0YXJfYXR0YWNoLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgQXZhdGFyQXR0YWNoU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA3MyxcbiAgICBzZXJpYWx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CAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hcmVhID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmV4Y2x1ZGVJZHMucHVzaChyZWFkZXIuc3RyaW5nKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgPT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1vZGlmaWVycy5wdXNoKHJlYWRlci5pbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgPT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBlbmQyID0gcmVhZGVyLnVpbnQzMigpICsgcmVhZGVyLnBvcztcbiAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubW9kaWZpZXJzLnB1c2gocmVhZGVyLmludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkF2YXRhck1vZGlmaWVyQXJlYS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQkF2YXRhck1vZGlmaWVyQXJlYSB8fCAoUEJBdmF0YXJNb2RpZmllckFyZWEgPSB7fSkpO1xuIiwgIi8qIGVzbGludC1kaXNhYmxlICovXG5pbXBvcnQgX20wIGZyb20gXCJwcm90b2J1ZmpzL21pbmltYWxcIjtcbmNvbnN0IHByb3RvYnVmUGFja2FnZVNhcmFzYSA9IFwiZGVjZW50cmFsYW5kLmNvbW1vblwiO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVBvc2l0aW9uKCkge1xuICAgIHJldHVybiB7IHg6IDAsIHk6IDAsIHo6IDAgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFBvc2l0aW9uO1xuKGZ1bmN0aW9uIChQb3NpdGlvbikge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGlmIChtZXNzYWdlLnggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTMpLmZsb2F0KG1lc3NhZ2UueCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UueSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyMSkuZmxvYXQobWVzc2FnZS55KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS56ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI5KS5mbG9hdChtZXNzYWdlLnopO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBvc2l0aW9uLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUG9zaXRpb24oKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS54ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnogPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQb3NpdGlvbi5kZWNvZGUgPSBkZWNvZGU7XG59KShQb3NpdGlvbiB8fCAoUG9zaXRpb24gPSB7fSkpO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVZlY3RvcjMoKSB7XG4gICAgcmV0dXJuIHsgeDogMCwgeTogMCwgejogMCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgVmVjdG9yMztcbihmdW5jdGlvbiAoVmVjdG9yMykge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGlmIChtZXNzYWdlLnggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTMpLmZsb2F0KG1lc3NhZ2UueCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UueSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyMSkuZmxvYXQobWVzc2FnZS55KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS56ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI5KS5mbG9hdChtZXNzYWdlLnopO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFZlY3RvcjMuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VWZWN0b3IzKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS56ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgVmVjdG9yMy5kZWNvZGUgPSBkZWNvZGU7XG59KShWZWN0b3IzIHx8IChWZWN0b3IzID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VWZWN0b3IyKCkge1xuICAgIHJldHVybiB7IHg6IDAsIHk6IDAgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFZlY3RvcjI7XG4oZnVuY3Rpb24gKFZlY3RvcjIpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS54ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzKS5mbG9hdChtZXNzYWdlLngpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnkgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UueSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgVmVjdG9yMi5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVZlY3RvcjIoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS54ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlm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9uLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUXVhdGVybmlvbigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS55ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueiA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLncgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBRdWF0ZXJuaW9uLmRlY29kZSA9IGRlY29kZTtcbn0pKFF1YXRlcm5pb24gfHwgKFF1YXRlcm5pb24gPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCQXZhdGFyTW9kaWZpZXJBcmVhIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvYXZhdGFyX21vZGlmaWVyX2FyZWEuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBBdmF0YXJNb2RpZmllckFyZWFTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDcwLFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdCB3cml0ZXIgPSBQQkF2YXRhck1vZGlmaWVyQXJlYS5lbmNvZGUodmFsdWUpO1xuICAgICAgICBjb25zdCBidWZm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ZXNzYWdlLndlYXJhYmxlcykge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4Mikuc3RyaW5nKHYpO1xuICAgICAgICB9XG4gICAgICAgIGZvciAoY29uc3QgdiBvZiBtZXNzYWdlLmVtb3Rlcykge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig5MCkuc3RyaW5nKHYpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCQXZhdGFyU2hhcGUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQkF2YXRhclNoYXBlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuaWQgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubmFtZSA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ib2R5U2hhcGUgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc2tpbkNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuaGFpckNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZXllQ29sb3IgPSBDb2xvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5leHByZXNzaW9uVHJpZ2dlcklkID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDg6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDY0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmV4cHJlc3Npb25UcmlnZ2VyVGltZXN0YW1wID0gbG9uZ1RvTnVtYmVyKHJlYWRlci5pbnQ2NCgpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA5OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA3Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50YWxraW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gODIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2VhcmFibGVzLnB1c2gocmVhZGVyLnN0cmluZygpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW1vdGVzLnB1c2gocmVhZGVyLnN0cmluZygpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkF2YXRhclNoYXBlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQXZhdGFyU2hhcGUgfHwgKFBCQXZhdGFyU2hhcGUgPSB7fSkpO1xuY29uc3QgdHNQcm90b0dsb2JhbFRoaXMgPSAoKCkgPT4ge1xuICAgIGlmICh0eXBlb2YgZ2xvYmFsVGhpcyAhPT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICByZXR1cm4gZ2xvYmFsVGhpcztcbiAgICB9XG4gICAgaWYgKHR5cGVvZiBzZWxmICE9PSBcInVuZGVmaW5lZFwiKSB7XG4gICAgICAgIHJldHVybiBzZWxmO1xuICAgIH1cbiAgICBpZiAodHlwZW9mIHdpbmRvdyAhPT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICByZXR1cm4gd2luZG93O1xuICAgIH1cbiAgICBpZiAodHlwZW9mIGdsb2JhbC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S5nICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDIxKS5mbG9hdChtZXNzYWdlLmcpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmIgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjkpLmZsb2F0KG1lc3NhZ2UuYik7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgQ29sb3IzLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlQ29sb3IzKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuciA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmcgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5iID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgQ29sb3IzLmRlY29kZSA9IGRlY29kZTtcbn0pKENvbG9yMyB8fCAoQ29sb3IzID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VDb2xvcjQoKSB7XG4gICAgcmV0dXJuIHsgcjogMCwgZzogMCwgYjogMCwgYTogMCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgQ29sb3I0O1xuKGZ1bmN0aW9uIChDb2xvcjQpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS5yICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzKS5mbG9hdChtZXNzYWdlLnIpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmcgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UuZyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuYiAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyOSkuZmxvYXQobWVzc2FnZS5iKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5hICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDM3KS5mbG9hdChtZXNzYWdlLmEpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIENvbG9yNC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbG9yNCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnIgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5nID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYiA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmEgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBDb2xvcjQuZGVjb2RlID0gZGVjb2RlO1xufSkoQ29sb3I0IHx8IChDb2xvcjQgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCQXZhdGFyU2hhcGUgfSBmcm9tICcu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VkIH07XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBQQkJpbGxib2FyZDtcbihmdW5jdGlvbiAoUEJCaWxsYm9hcmQpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS5iaWxsYm9hcmRNb2RlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoOCkuaW50MzIobWVzc2FnZS5iaWxsYm9hcmRNb2RlKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQkJpbGxib2FyZC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCQmlsbGJvYXJkKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5iaWx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N0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJDYW1lcmFNb2RlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJDYW1lcmFNb2RlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQ2FtZXJhTW9kZSB8fCAoUEJDYW1lcmFNb2RlID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQkNhbWVyYU1vZGUgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9jYW1lcmFfbW9kZS5nZW4nO1xuLyo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XRlQmFzZVBCQ2FtZXJhTW9kZUFyZWEoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hcmVhID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1vZGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkNhbWVyYU1vZGVBcmVhLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQ2FtZXJhTW9kZUFyZWEgfHwgKFBCQ2FtZXJhTW9kZUFyZWEgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCQ2FtZXJhTW9kZUFyZWEgfSBmcm9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XIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJFbmdpbmVJbmZvKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mcmFtZU51bWJlciA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50b3RhbFJ1bnRpbWUgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50aWNrTnVtYmVyID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgIC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zMihtZXNzYWdlLnZpc2libGVNZXNoZXNDb2xsaXNpb25NYXNrKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5pbnZpc2libGVNZXNoZXNDb2xsaXNpb25NYXNrICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDApLnVpbnQzMihtZXNzYWdlLmludmlzaWJsZU1lc2hlc0NvbGxpc2lvbk1hc2spO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCR2x0ZkNvbnRhaW5lci5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCR2x0ZkNvbnRhaW5lcigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNyYyA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52aXNpYmxlTWVzaGVzQ29sbGlzaW9uTWFzayA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5pbnZpc2libGVNZXNoZXNDb2xsaXNpb25NYXNrID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCR2x0ZkNvbnRhaW5lci5kZWNvZGUgPSBkZWNvZGU7XG59KShQQkdsdGZDb250YWluZXIgfHwgKFBCR2x0ZkNvbnRhaW5lciA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJHbHRmQ29udGFpbmVyIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvZ2x0Zl9jb250YWluZXIuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBHbHRmQ29udGFpbmVyU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRD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0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jdXJyZW50U3RhdGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkdsdGZDb250YWluZXJMb2FkaW5nU3RhdGUuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJHbHRmQ29udGFpbmVyTG9hZGluZ1N0YXRlIHx8IChQQkdsdGZDb250YWluZXJMb2FkaW5nU3RhdGUgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCR2x0ZkNvbnRhaW5lckxvYWRpbmdTdGF0ZSB9IGZyb20gJy4vcGIvZGVjZW50cmFsYW5kL3Nkay9jb21wb25lbnRzL2dsdGZfY29udGFpbmVyX2xvYWRpbmdfc3RhdGUuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBHbHRmQ29udGFpbmVyTG9hZGluZ1N0YXRlU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA0OSxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJHbHRmQ29udGFpbmVyTG9hZGluZ1N0YXRlLmVuY29kZSh2YWx1ZSk7XG4gICAgICAgIGNvbnN0IGJ1ZmZlciA9IG5ldyBVaW50OEFycmF5KHdyaXRlci5maW5pc2goKSwgMCwgd3JpdGVyLmxlbik7XG4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pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWF0ZXJpYWwgPSB7ICRjYXNlOiBcInVubGl0XCIsIHVubGl0OiBQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hdGVyaWFsID0geyAkY2FzZTogXCJwYnJcIiwgcGJyOiBQQk1hdGVyaWFsX1Bick1hdGVyaWFsLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQk1hdGVyaWFsLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCTWF0ZXJpYWwgfHwgKFBCTWF0ZXJpYWwgPSB7fSkpO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVBCTWF0ZXJpYWxfVW5saXRNYXRlcmlhbCgpIHtcbiAgICByZXR1cm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yaWFsX1VubGl0TWF0ZXJpYWwuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50ZXh0dXJlID0gVGV4dHVyZVVuaW9uLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYWxwaGFUZXN0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY2FzdFNoYWRvd3MgPSByZWFkZXIuYm9vbCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpZmZ1c2VDb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCTWF0ZXJpYWxfVW5saXRNYXRlcmlhbC5kZWNvZGUgPSBkZWNvZGU7XG59KShQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwgfHwgKFBCTWF0ZXJpYWxfVW5saXRNYXRlcmlhbCA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlUEJNYXRlcmlhbF9QYnJNYXRlcmlhbCgpIHtcbiAgICByZXR1cm4ge1xuICAgICAgICB0ZXh0dXJlOiB1bmRlZmluZWQsXG4gICAgICAgIGFscGhhVGVzdDogdW5kZWZpbmVkLFxuICAgICAgICBjYXN0U2h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1pc3NpdmVJbnRlbnNpdHkpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmRpcmVjdEludGVuc2l0eSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzMykuZmxvYXQobWVzc2FnZS5kaXJlY3RJbnRlbnNpdHkpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCTWF0ZXJpYWxfUGJyTWF0ZXJpYWwuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1hdGVyaWFsX1Bick1hdGVyaWFsKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dHVyZSA9IFRleHR1cmVVbmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFscGhhVGVzdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNhc3RTaGFkb3dzID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hbHBoYVRleHR1cmUgPSBUZXh0dXJlVW5pb24uZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5lbWlzc2l2ZVRleHR1cmUgPSBUZXh0dXJlVW5pb24uZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5idW1wVGV4dHVyZSA9IFRleHR1cmVVbmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDU4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFsYmVkb0NvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW1pc3NpdmVDb2xvciA9IENvbG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDk6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDc0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJlZmxlY3Rpdml0eUNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRyYW5zcGFyZW5jeU1vZGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWV0YWxsaWMgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJvdWdobmVzcyA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDE0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMTcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc3BlY3VsYXJJbnRlbnNpdHkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTI1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmVtaXNzaXZlSW50ZW5zaXR5ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kaXJlY3RJbnRlbnNpdHkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQk1hdGVyaWFsX1Bick1hdGVyaWFsLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCTWF0ZXJpYWxfUGJyTWF0ZXJpYWwgfHwgKFBCTWF0ZXJpYWxfUGJyTWF0ZXJpYWwgPSB7fSkpO1xuIiwgIi8qIGVzbGludC1kaXNhYmxlICovXG5pbXBvcnQgX20wIGZyb20gXCJwcm90b2J1ZmpzL21pbmltYWxcIjtcbmNvbnN0IHByb3RvYnVmUGFja2FnZVNhcmFzYSA9IFwiZGVjZW50cmFsYW5kLmNvbW1vblwiO1xuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgVGV4dHVyZVdyYXBNb2RlO1xuKGZ1bmN0aW9uIChUZ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VpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNyYyA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS53cmFwTW9kZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZpbHRlck1vZGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBUZXh0dXJlLmRlY29kZSA9IGRlY29kZTtcbn0pKFRleHR1cmUgfHwgKFRleHR1cmUgPSB7fSkpO1xuZn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mVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VBdmF0YXJUZXh0dXJlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudXNlcklkID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLndyYXBNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmlsdGVyTW9kZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAg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leHR1cmUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VWaWRlb1RleHR1cmUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZpZGVvUGxheWVyRW50aXR5ID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLndyYXBNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmlsdGVyTW9kZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFZpZGVvVGV4dHVyZS5kZWNvZGUgPSBkZWNvZGU7XG59KShWaWRlb1RleHR1cmUgfHwgKFZpZGVvVGV4dHVyZSA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlVGV4dHVyZVVuaW9uKCkge1xuICAgIHJldHVybiB7IHRleDogdW5kZWZpbmVkIH07XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBUZXh0dXJlVW5pb247XG4oZnVuY3Rpb24gKFRleHR1cmVVbmlvbikge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIHN3aXRjaCAobWVzc2FnZS50ZXg/LiRjYXNlKSB7XG4gICAgICAgICAgICBjYXNlIFwidGV4dHVyZVwiOlxuICAgICAgICAgICAgICAgIFRleHR1cmUuZW5jb2RlKG1lc3NhZ2UudGV4LnRleHR1cmUsIHdyaXRlci51aW50MzIoMTApLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwiYXZhdGFyVGV4dHVyZVwiOlxuICAgICAgICAgICAgICAgIEF2YXRhclRleHR1cmUuZW5jb2RlKG1lc3NhZ2UudGV4LmF2YXRhclRleHR1cmUsIHdyaXRlci51aW50MzIoMTgpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwidmlkZW9UZXh0dXJlXCI6XG4gICAgICAgICAgICAgICAgVmlkZW9UZXh0dXJlLmVuY29kZShtZXNzYWdlLnRleC52aWRlb1RleHR1cmUsIHdyaXRlci51aW50MzIoMjYpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgVGV4dHVyZVVuaW9uLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlVGV4dHVyZVVuaW9uKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4ID0geyAkY2FzZTogXCJ0ZXh0dXJlXCIsIHRleHR1cmU6IFRleHR1cmUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleCA9IHsgJGNhc2U6IFwiYXZhdGFyVGV4dHVyZVwiLCBhdmF0YXJUZXh0dXJlOiBBdmF0YXJUZXh0dXJlLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50ZXggPSB7ICRjYXNlOiBcInZpZGVvVGV4dHVyZVwiLCB2aWRlb1RleHR1cmU6IFZpZGVvVGV4dHVyZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgVGV4dHVyZVVuaW9uLmRlY29kZSA9IGRlY29kZTtc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ZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jb2xsaXNpb25NYXNrID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcImJveFwiLCBib3g6IFBCTWVzaENvbGxpZGVyX0JveE1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcInNwaGVyZVwiLCBzcGhlcmU6IFBCTWVzaENvbGxpZGVyX1NwaGVyZU1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcImN5bGluZGVyXCIsIGN5bGluZGVyOiBQQk1lc2hDb2xsaWRlcl9DeWxpbmRlck1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcInBsYW5lXCIsIHBsYW5lOiBQQk1lc2hDb2xsaWRlcl9QbGFuZU1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCTWVzaENvbGxpZGVyLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCTWVzaENvbGxpZGVyIHx8IChQQk1lc2hDb2xsaWRlciA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlUEJNZXNoQ29sbGlkZXJfQm94TWVzaCgpIHtcbiAgICByZXR1cm4ge307XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBQQk1lc2hDb2xsaWRlcl9Cb3hNZXNoO1xuKGZ1bmN0aW9u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XNzYWdlID0gY3JlYXRlQmFzZVBCTWVzaENvbGxpZGVyX0N5bGluZGVyTWVzaCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJhZGl1c1RvcCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJhZGl1c0JvdHRvbSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCTWVzaENvbGxpZGVyX0N5bGluZGVyTWVzaC5kZWNvZGUgPSBkZWNvZGU7XG59KShQQk1lc2hDb2xsaWRlcl9DeWxpbmRlck1lc2ggfHwgKFBCTWVzaENvbGxpZGVyX0N5bGluZGVyTWVzaCA9IHt9KS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ZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwiYm94XCIsIGJveDogUEJNZXNoUmVuZGVyZXJfQm94TWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwic3BoZXJlXCIsIHNwaGVyZTogUEJNZXNoUmVuZGVyZXJfU3BoZXJlTWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwiY3lsaW5kZXJcIiwgY3lsaW5kZXI6IFBCTWVzaFJlbmRlcmVyX0N5bGluZGVyTWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwicGxhbmVcIiwgcGxhbmU6IFBCTWVzaFJlbmRlcmVyX1BsYW5lTWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJNZXNoUmVuZGVyZXIuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJNZXNoUmVuZGVyZXIgfHwgKFBCTWVzaFJlbmRlcmVyID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9Cb3hNZXNoKCkge1xuICAgIHJldHVybiB7IHV2czogW10gfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFBCTWVzaFJlbmRlcmVyX0JveE1lc2g7XG4oZnVuY3Rpb24gKFBCTWVzaFJlbmRlcmVyX0JveE1lc2gpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICB3cml0ZXIudWludDMyKDEwKS5mb3JrKCk7XG4gICAgICAgIGZvciAoY29uc3QgdiBvZiBtZXNzYWdlLnV2cykge1xuICAgICAgICAgICAgd3JpdGVyLmZsb2F0KHYpO1xuICAgICAgICB9XG4gICAgICAgIHdyaXRlci5sZGVsaW0oKTtcbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUEJNZXNoUmVuZGVyZXJfQm94TWVzaC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCTWVzaFJlbmRlcmVyX0JveE1lc2goKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS51dnMucHVzaChyZWFkZXIuZmxvYXQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5kMiA9IHJlYWRlci51aW50MzIoKSArIHJlYWRlci5wb3M7XG4gICAgICAgICAgICAgICAgICAg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gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzKS5mbG9hdChtZXNzYWdlLnJhZGl1c1RvcCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucmFkaXVzQm90dG9tICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UucmFkaXVzQm90dG9tKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2guZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2goKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5yYWRpdXNUb3AgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5yYWRpdXNCb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2guZGVjb2RlID0gZGVjb2RlO1xufSkoUEJNZXNoUmVuZGVyZXJfQ3lsaW5kZXJNZXNoIHx8IChQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2ggPSB7fSkpO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVBCTWVzaFJlbmRlcmVyX1BsYW5lTWVzaCgpIHtcbiAgICByZXR1cm4geyB1dnM6IFtdIH07XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBQQk1lc2hSZW5kZXJlcl9QbGFuZU1lc2g7XG4oZnVuY3Rpb24gKFBCTWVzaFJlbmRlcmVyX1BsYW5lTWVzaCkge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIHdyaXRlci51aW50MzIoMTApLmZvcmsoKTtcbiAgICAgICAgZm9yIChjb25zdCB2IG9mIG1lc3NhZ2UudXZzKSB7XG4gICAgICAgICAgICB3cml0ZXIuZmxvYXQodik7XG4gICAgICAgIH1cbiAgICAgICAgd3JpdGVyLmxkZWxpbSgpO1xuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQk1lc2hSZW5kZXJlcl9QbGFuZU1lc2guZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9QbGFuZU1lc2goKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS51dnMucHVzaChyZWFkZXIuZmxvYXQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5kMiA9IHJlYWRlci51aW50MzIoKSArIHJlYWRlci5wb3M7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBt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vZGUobWVzc2FnZS5jb2xvciwgd3JpdGVyLnVpbnQzMigyNikuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQk5mdFNoYXBlLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJOZnRTaGFwZSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnVybiA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdHlsZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJOZnRTaGFwZS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQk5mdFNoYXBlIHx8IChQQk5mdFNoYXBlID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQk5mdFNoYXBlIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvbmZ0X3NoYXBlLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgTmZ0U2hhcGVTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDQwLFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdCB3cml0ZXIgPSBQQk5mdFNoYXBlLmVuY29kZSh2YWx1ZSk7XG4gICAgICAgIGNvbnN0IGJ1ZmZlciA9IG5ldyBVaW50OEFycmF5KHdyaXRlci5maW5pc2goKSwgMCwgd3JpdGVyLmxlbik7XG4gICAgICAgIGJ1aWxkZXIud3JpdG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V2ZW50cykge1xuICAgICAgICAgICAgUEJQb2ludGVyRXZlbnRzX0VudHJ5LmVuY29kZSh2LCB3cml0ZXIudWludDMyKDEwKS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCUG9pbnRlckV2ZW50cy5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCUG9pbnRlckV2ZW50cygpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvaW50ZXJFdmVudHMucHVzaChQQlBvaW50ZXJFdmVudHNfRW50cnkuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcb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XN0YW5jZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uuc2hvd0ZlZWRiYWNrICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMzIpLmJvb2wobWVzc2FnZS5zaG93RmVlZGJhY2spO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCUG9pbnRlckV2ZW50c19JbmZvLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJQb2ludGVyRXZlbnRzX0luZm8oKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmJ1dHRvbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhvdmVyVGV4dCA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhEaXN0YW5jZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNob3dGZWVkYmFjayA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJQb2ludGVyRXZlbnRzX0luZm8uZGVjb2RlID0gZGVjb2RlO1xufSkoUEJQb2ludGVyRXZlbnRzX0luZm8gfHwgKFBCUG9pbnRlckV2ZW50c19JbmZvID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VQQlBvaW50ZXJFdmVudHNfRW50cnkoKS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ChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ldmVudFR5cGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ldmVudEluZm8gPSBQQlBvaW50ZXJFdmVudHNfSW5mby5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCUG9pbnRlckV2ZW50c19FbnRyeS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQlBvaW50ZXJFdmVudHNfRW50cnkgfHwgKFBCUG9pbnRlckV2ZW50c19FbnRyeSA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJQb2ludGVyRXZlbnRzIH0gZnJvbSAnLi9wYi9kZWNlb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LnVpbnQzMihtZXNzYWdlLnRpbWVzdGFtcCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuYW5hbG9nICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNTMpLmZsb2F0KG1lc3NhZ2UuYW5hbG9nKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS50aWNrTnVtYmVyICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDU2KS51aW50MzIobWVzc2FnZS50aWNrTnVtYmVyKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlBvaW50ZXJFdmVudHNSZXN1bHQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlBvaW50ZXJFdmVudHNSZXN1bHQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmJ1dHRvbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhpdCA9IFJheWNhc3RIaXQuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdGF0ZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hbmFsb2cgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50aWNrTnVtYmVyID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCUG9pbnRlckV2ZW50c1Jlc3VsdC5kZWNvZGUgPSBkZWNvZGU7XG59KShQQlBvaW50ZXJFdmVudHNSZXN1bHQgfHwgKFBCUG9pbnRlckV2ZW50c1Jlc3VsdCA9IHt9KSk7XG4iLCAiLyogZXNsaW50LWRpc2FibGUgKi9cbmltcG9ydCBfbTAgZnJvbSBcInByb3RvYnVmanMvbWluaW1hbFwiO1xuaW1wb3J0IHsgVmVjdG9yMyB9IGZyb20gXCIuLi8uLi8uLi9jb21tb24vdmVjdG9ycy5nZW5cIjtcbmNvbnN0IHByb3RvYnVmUGFja2FnZVNhcmFzYSA9IFwiZGVjZW50cmFsYW5kLnNkay5jb21wb25lbnRzLmNvbW1vblwiO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVJheWNhc3RIaXQoKSB7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgcG9zaXRpb246IHVuZGVmaW5lZCxcbiAgICAgICAgZ2xvYmFsT3JpZ2luOiB1bmRlZmluZWQsXG4gICAgICAgIGRpcmVjdGlvbjogdW5kZWZpbmVkLFxuICAgICAgICBub3JtYWxIaXQ6IHVuZGVmaW5lZCxcbiAg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ApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDUpLmZsb2F0KG1lc3NhZ2UubGVuZ3RoKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tZXNoTmFtZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDUwKS5zdHJpbmcobWVzc2FnZS5tZXNoTmFtZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZW50aXR5SWQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig1NikudWludDMyKG1lc3NhZ2UuZW50aXR5SWQpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFJheWNhc3RIaXQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VSYXljYXN0SGl0KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb24gPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZ2xvYmFsT3JpZ2luID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpcmVjdGlvbiA9IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ub3JtYWxIaXQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubGVuZ3RoID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaE5hbWUgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW50aXR5SWQgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUmF5Y2FzdEhpdC5kZWNvZGUgPSBkZWNvZGU7XG59KShSYXljYXN0SGl0IHx8IChSYXljYXN0SGl0ID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlBvaW50ZXJFdmVudHNSZXN1bHQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9wb2ludGVyX2V2ZW50c19yZXN1bHQ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gICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmlzUG9pbnRlckxvY2tlZCA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJQb2ludGVyTG9jay5kZWNvZGUgPSBkZWNvZGU7XG59KShQQlBvaW50ZXJMb2NrIHx8IChQQlBvaW50ZXJMb2NrID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlBvaW50ZXJMb2NrIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvcG9pbnRlcl9sb2NrLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgUG9pbnRlckxvY2tTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDc0LFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdCB3cml0ZXIgPSBQQlBvaW50ZXJMb2NrLmVuY29kZSh2YWx1ZSk7XG4gICAgICAgIGNvbnN0IGJ1ZmZlciA9IG5ldyBVaW50OEFycmF5KHdyaXRlci5maW5pc2goKSwgMCwgd3JpdGVyLmxlbik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVCdWZmZXIoYnVmZmVyLCBmYWxzZSk7XG4gICAg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JpdGVyLnVpbnQzMig1OCkuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJ0YXJnZXRFbnRpdHlcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDgwKS51aW50MzIobWVzc2FnZS5kaXJlY3Rpb24udGFyZ2V0RW50aXR5KTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhEaXN0YW5jZSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzNykuZmxvYXQobWVzc2FnZS5tYXhEaXN0YW5jZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucXVlcnlUeXBlICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDQwKS5pbnQzMihtZXNzYWdlLnF1ZXJ5VHlwZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuY29udGludW91cyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDY0KS5ib29sKG1lc3NhZ2UuY29udGludW91cyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuY29sbGlzaW9uTWFzayAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDcyKS51aW50MzIobWVzc2FnZS5jb2xsaXNpb25NYXNrKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlJheWNhc3QuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlJheWNhc3QoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vcmlnaW5PZmZzZXQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlyZWN0aW9uID0geyAkY2FzZTogXCJsb2NhbERpcmVjdGlvblwiLCBsb2NhbERpcmVjdGlvbjogVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlyZWN0aW9uID0geyAkY2FzZTogXCJnbG9iYWxEaXJlY3Rpb25cIiwgZ2xvYmFsRGlyZWN0aW9uOiBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kaXJlY3Rpb24gPSB7ICRjYXNlOiBcImdsb2JhbFRhcmdldFwiLCBnbG9iYWxUYXJnZXQ6IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDEwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kaXJlY3Rpb24gPSB7ICRjYXNlOiBcInRhcmdldEVudGl0eVwiLCB0YXJnZXRFbnRpdHk6IHJlYWRlci51aW50MzIoKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1heERpc3RhbmNlID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucXVlcnlUeXBlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY29udGludW91cyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNzIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY29sbGlzaW9uTWFzayA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIG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lci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5nbG9iYWxPcmlnaW4gPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlyZWN0aW9uID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhpdHMucHVzaChSYXljYXN0SGl0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpY2tOdW1iZXIgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJSYXljYXN0UmVzdWx0LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCUmF5Y2FzdFJlc3VsdCB8fCAoUEJSYXljYXN0UmVzdWx0ID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlJheWNhc3RSZXN1bHQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9yYXljYXN0X3Jlc3VsdC5nZW4nO1xuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFJheWNhc3RSZXN1bHRTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDY4LFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdCB3cml0ZXIgPSBQQlJheWNhc3RSZXN1bHQuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3c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c3NhZ2UucGFkZGluZ1JpZ2h0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5wYWRkaW5nQm90dG9tICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoODUpLmZsb2F0KG1lc3NhZ2UucGFkZGluZ0JvdHRvbSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucGFkZGluZ0xlZnQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig5MykuZmxvYXQobWVzc2FnZS5wYWRkaW5nTGVmdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubGluZVNwYWNpbmcgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMDEpLmZsb2F0KG1lc3NhZ2UubGluZVNwYWNpbmcpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmxpbmVDb3VudCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEwNCkuaW50MzIobWVzc2FnZS5saW5lQ291bnQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnRleHRXcmFwcGluZyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDExMikuYm9vbChtZXNzYWdlLnRleHRXcmFwcGluZyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uuc2hhZG93Qmx1ciAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEyNSkuZmxvYXQobWVzc2FnZS5zaGFkb3dCbHVyKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5zaGFkb3dPZmZzZXRYICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTMzKS5mbG9hdCht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kZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJUZXh0U2hhcGUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50ZXh0ID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mb250U2l6ZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnRBdXRvU2l6ZSA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dEFsaWduID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2lkdGggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2MSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5oZWlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA4OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2OSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wYWRkaW5nVG9wID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNzcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ1JpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDg1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdCb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ0xlZnQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmxpbmVTcGFjaW5nID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5saW5lQ291bnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTEyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRXcmFwcGluZyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEyNSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaGFkb3dCbHVyID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaGFkb3dPZmZzZXRYID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE0MSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaGFkb3dPZmZzZXRZID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTg6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE0OSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vdXRsaW5lV2lkdGggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTU0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNoYWRvd0NvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vdXRsaW5lQ29sb3IgPSBDb2xvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTcwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRDb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCVGV4dFNoYXBlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVGV4dFNoYXBlIHx8IChQQlRleHRTaGFwZSA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJUZXh0U2hhcGUgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy90ZXh0X3NoYXBlLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVGV4dFNoYXBlU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTAzMCxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJUZXh0U2hhcGUuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICAgICAgYnVpbGRlci53cml0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ml0ZXIudWludDMyKDE2KS5pbnQzMihtZXNzYWdlLmVhc2luZ0Z1bmN0aW9uKTtcbiAgICAgICAgfVxuICAgICAgICBzd2l0Y2ggKG1lc3NhZ2UubW9kZT8uJGNhc2UpIHtcbiAgICAgICAgICAgIGNhc2UgXCJtb3ZlXCI6XG4gICAgICAgICAgICAgICAgTW92ZS5lbmNvZGUobWVzc2FnZS5tb2RlLm1vdmUsIHdyaXRlci51aW50MzIoMjYpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwicm90YXRlXCI6XG4gICAgICAgICAgICAgICAgUm90YXRlLmVuY29kZShtZXNzYWdlLm1vZGUucm90YXRlLCB3cml0ZXIudWludDMyKDM0KS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcInNjYWxlXCI6XG4gICAgICAgICAgICAgICAgU2NhbGUuZW5jb2RlKG1lc3NhZ2UubW9kZS5zY2FsZSwgd3JpdGVyLnVpbnQzMig0MikuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5wbGF5aW5nICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDgpLmJvb2wobWVzc2FnZS5wbGF5aW5nKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5jdXJyZW50VGltZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDYxKS5mbG9hdChtZXNzYWdlLmN1cnJlbnRUaW1lKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlR3ZWVuLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJUd2VlbigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmR1cmF0aW9uID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZWFzaW5nRnVuY3Rpb24gPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tb2RlID0geyAkY2FzZTogXCJtb3ZlXCIsIG1vdmU6IE1vdmUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1vZGUgPSB7ICRjYXNlOiBcInJvdGF0ZVwiLCByb3RhdGU6IFJvdGF0ZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubW9kZSA9IHsgJGNhc2U6IFwic2NhbGVcIiwgc2NhbGU6IFNjYWxlLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wbGF5aW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2MSkge1x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Rlci51aW50MzIoMTgpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmFjZURpcmVjdGlvbiAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI0KS5ib29sKG1lc3NhZ2UuZmFjZURpcmVjdGlvbik7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgTW92ZS5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZU1vdmUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdGFydCA9IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5lbmQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmFjZURpcmVjdGlvbiA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgTW92ZS5kZWNvZGUgPSBkZWNvZGU7XG59KShNb3ZlIHx8IChNb3ZlID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VSb3RhdGUoKSB7XG4gICAgcmV0dXJuIHsgc3RhcnQ6IHVuZGVmaW5lZCwgZW5kOiB1bmRlZmluZWQgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFJvdGF0ZTtcbihmdW5jdGlvbiAoUm90YXRlKSB7XG4gICAgZnVuY3Rpb24gZW5jb2RlKG1lc3NhZ2UsIHdyaXRlciA9IF9tMC5Xcml0ZXIuY3JlYXRlKCkpIHtcbiAgICAgICAgaWYgKG1lc3Nh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29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW5kID0gUXVhdGVybmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFJvdGF0ZS5kZWNvZGUgPSBkZWNvZGU7XG59KShSb3RhdGUgfHwgKFJvdGF0ZSA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlU2NhbGUoKSB7XG4gICAgcmV0dXJuIHsgc3RhcnQ6IHVuZGVmaW5lZCwgZW5kOiB1bmRlZmluZWQgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFNjYWxlO1xuKGZ1bmN0aW9uIChTY2FsZSkge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGlmIChtZXNzYWdlLnN0YXJ0ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIFZlY3RvcjMuZW5jb2RlKG1lc3NhZ2Uuc3RhcnQsIHdyaXRlci51aW50MzIoMTApLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZW5kICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIFZlY3RvcjMuZW5jb2RlKG1lc3NhZ2UuZW5kLCB3cml0ZXIudWludDMyKDE4KS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFNjYWxlLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlU2NhbGUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdGFydCA9IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5lbmQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgU2NhbGUuZGVjb2RlID0gZGVjb2RlO1xufSkoU2NhbGUgfHwgKFNjYWxlID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlR3ZWVuIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvdHdlZW4uZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBUd2VlblNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6IDExMDIsXG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGNvbnN0IHdyaXRlciA9IFBCVHdlZW4uZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUJ1ZmZlcihidWZmZXIsIGZhbHNlKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gUEJUd2Vlbi5kZWNvZGUocmVhZGVyLmJ1Zm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AgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc2VxdWVuY2UucHVzaChQQlR3ZWVuLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmxvb3AgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQlR3ZWVuU2VxdWVuY2UuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJUd2VlblNlcXVlbmNlIHx8IChQQlR3ZWVuU2VxdWVuY2UgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCVHdlZW5TZXF1ZW5jZSB9IGZyb20gJy4vcGIvZGVjZW50cmFsYW5kL3Nkay9jb21wb25lbnRzL3R3ZWVuX3NlcXVlbmNlLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVHdlZW5TZXF1ZW5jZVNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6IDExMD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GRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlR3ZWVuU3RhdGUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnN0YXRlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY3VycmVudFRpbWUgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV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gdiBvZiBtZXNzYWdlLnV2cykge1xuICAgICAgICAgICAgd3JpdGVyLmZsb2F0KHYpO1xuICAgICAgICB9XG4gICAgICAgIHdyaXRlci5sZGVsaW0oKTtcbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUEJVaUJhY2tncm91bmQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlVpQmFja2dyb3VuZCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dHVyZSA9IFRleHR1cmVVbmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHR1cmVNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dHVyZVNsaWNlcyA9IEJvcmRlclJlY3QuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSA0NSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS51dnMucHVzaChyZWFkZXIuZmxvYXQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSA0Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5kMiA9IHJlYWRlci51aW50MzIoKSArIHJlYWRlci5wb3M7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnV2cy5wdXNoKHJlYWRlci5mbG9hdCgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJVaUJhY2tncm91bmQuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJVaUJhY2tncm91bmQgfHwgKFBCVWlCYWNrZ3JvdW5kID0ge30pKTtcbiIsICIvKiBlc2xpbnQtZGlzYWJsZSAqL1xuaW1wb3J0IF9tMCBmcm9tIFwicHJvdG9idWZqcy9taW5pbWFsXCI7XG5jb25zdCBwcm90b2J1ZlBhY2thZ2VTYXJhc2EgPSBcImRlY2VudHJhbGFuZC5jb21tb25cIjtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VCb3JkZXJSZWN0KCkge1xuICAgIHJldHVybiB7IHRvcDogMCwgbGVmdDogMCwgcmlnaHQ6IDAsIGJvdHRvbTogMCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgQm9yZGVyUmVjdDtcbihmdW5jdGlvbiAoQm9yZGVyUmVjdCkge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGlmIChtZXNzYWdlLnRvcCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMykuZmxvYXQobWVzc2FnZS50b3ApO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmxlZnQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UubGVmdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucmlnaHQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjkpLmZsb2F0KG1lc3NhZ2UucmlnaHQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmJvdHRvbSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzNykuZmxvYXQobWVzc2FnZS5ib3R0b20pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIEJvcmRlclJlY3QuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VCb3JkZXJSZWN0KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudG9wID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubGVmdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYm90dG9tID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2F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ci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VSZWN0KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS53aWR0aCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhlaWdodCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFJlY3QuZGVjb2RlID0gZGVjb2RlO1xufSkoUmVjdCB8fCAoUmVjdCA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJVaUJhY2tncm91bmQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy91aV9iYWNrZ3JvdW5kLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVWlCYWNrZ3JvdW5kU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA1MyxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJVaUJhY2tncm91bmQuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUJ1ZmZlcihidWZmZXIsIGZhbHNlKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gUEJVaUJhY2tncm91bmQuZGVjb2RlKHJlYWRlci5idW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MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kZXZpY2VQaXhlbFJhdGlvID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2lkdGggPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5oZWlnaHQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5pbnRlcmFjdGFibGVBcmVhID0gQm9yZGVyUmVjdC5kZWNvZGUocmVhZGVyLCByZWFkZ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AgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UudGV4dEFsaWduICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoODApLmludDMyKG1lc3NhZ2UudGV4dEFsaWduKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5mb250ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoODgpLmludDMyKG1lc3NhZ2UuZm9udCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZm9udFNpemUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig5NikuaW50MzIobWVzc2FnZS5mb250U2l6ZSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUEJVaURyb3Bkb3duLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJVaURyb3Bkb3duKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hY2NlcHRFbXB0eSA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW1wdHlMYWJlbCA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vcHRpb25zLnB1c2gocmVhZGVyLnN0cmluZygpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zZWxlY3RlZEluZGV4ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlzYWJsZWQgPSByZWFkZXIuYm9vbCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDUwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRBbGlnbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDExOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mb250ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDk2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnRTaXplID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICA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dXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlVpRHJvcGRvd25SZXN1bHQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJVaURyb3Bkb3duUmVzdWx0LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVWlEcm9wZG93blJlc3VsdCB8fCAoUEJVaURyb3Bkb3duUmVzdWx0ID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlVpRHJvcGRvd25SZXN1bHQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy91aV9kcm9wZG93bl9yZXN1bHQuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydC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OiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCVWlJbnB1dCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBsYWNlaG9sZGVyID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGxhY2Vob2xkZXJDb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpc2FibGVkID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gODApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dEFsaWduID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDg4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZm9udFNpemUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTA2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBt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ICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCVWlJbnB1dFJlc3VsdC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCVWlJbnB1dFJlc3VsdCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmlzU3VibWl0ID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHR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zKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52YWx1ZSA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRBbGlnbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mb250U2l6ZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCVWlUZXh0LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVWlUZXh0IHx8IChQQlVpVGV4dCA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJVaVRleHQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy91aV90ZXh0Lmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVWlUZXh0U2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA1MixcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJVaVRleHQuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUJ1ZmZlcihidWZmZXIsIGZhbHNlKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gUEJVaVRleHQuZGVjb2RlKHJlYWRlci5idWZmZXIoKSwgcmVhZGVyLnJlbWFpbmluZ0J5dGVzKCkpO1xuICAgIH0sXG4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RlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNTMpLmZsb2F0KG1lc3NhZ2UuZmxleFNocmluayk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25UeXBlICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDU2KS5pbnQzMihtZXNzYWdlLnBvc2l0aW9uVHlwZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuYWxpZ25TZWxmICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDY0KS5pbnQzMihtZXNzYWdlLmFsaWduU2VsZik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmxleERpcmVjdGlvbiAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig3MikuaW50MzIobWVzc2FnZS5mbGV4RGlyZWN0aW9uKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5qdXN0aWZ5Q29udGVudCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4MCkuaW50MzIobWVzc2FnZS5qdXN0aWZ5Q29udGVudCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uub3ZlcmZsb3cgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoODgpLmludDMyKG1lc3NhZ2Uub3ZlcmZsb3cpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmRpc3BsYXkgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoOTYpLmludDMyKG1lc3NhZ2UuZGlzcGxheSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmxleEJhc2lzVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMDQpLmludDMyKG1lc3NhZ2UuZmxleEJhc2lzVW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmxleEJhc2lzICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDExNykuZmxvYXQobWVzc2FnZS5mbGV4QmFzaXMpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmZsZXhHcm93ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEyNSkuZmxvYXQobWVzc2FnZS5mbGV4R3Jvdyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uud2lkdGhVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEyOCkuaW50MzIobWVzc2FnZS53aWR0aFVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLndpZHRoICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDE0MSkuZmxvYXQobWVzc2FnZS53aWR0aCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuaGVpZ2h0VW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNDQpLmludDMyKG1lc3NhZ2UuaGVpZ2h0VW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuaGVpZ2h0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDE1NykuZmxvYXQobWVzc2FnZS5oZWlnaHQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1pbldpZHRoVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNjApLmludDMyKG1lc3NhZ2UubWluV2lkdGhVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5taW5XaWR0aCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNzMpLmZsb2F0KG1lc3NhZ2UubWluV2lkdGgpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1pbkhlaWdodFVuaXQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTc2KS5pbnQzMihtZXNzYWdlLm1pbkhlaWdodFVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1pbkhlaWdodCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxODkpLmZsb2F0KG1lc3NhZ2UubWluSGVpZ2h0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhXaWR0aFVuaXQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTkyKS5pbnQzMihtZXNzYWdlLm1heFdpZHRoVW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWF4V2lkdGggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjA1KS5mbG9hdChtZXNzYWdlLm1heFdpZHRoKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhIZWlnaHRVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDIwOCkuaW50MzIobWVzc2FnZS5tYXhIZWlnaHRVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhIZWlnaHQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjIxKS5mbG9hdChtZXNzYWdlLm1heEhlaWdodCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25MZWZ0VW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyMjQpLmludDMyKG1lc3NhZ2UucG9zaXRpb25MZWZ0VW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25MZWZ0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDIzNykuZmxvYXQobWVzc2FnZS5wb3NpdGlvbkxlZnQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnBvc2l0aW9uVG9wVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNDApLmludDMyKG1lc3NhZ2UucG9zaXRpb25Ub3BVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5wb3NpdGlvblRvcCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNTMpLmZsb2F0KG1lc3NhZ2UucG9zaXRpb25Ub3ApO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnBvc2l0aW9uUmlnaHRVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI1NikuaW50MzIobWVzc2FnZS5wb3NpdGlvblJpZ2h0VW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25SaWdodCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNjkpLmZsb2F0KG1lc3NhZ2UucG9zaXRpb25SaWdodCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25Cb3R0b21Vbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI3MikuaW50MzIobWVzc2FnZS5wb3NpdGlvbkJvdHRvbVVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnBvc2l0aW9uQm90dG9tICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI4NSkuZmxvYXQobWVzc2FnZS5wb3NpdGlvbkJvdHRvbSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luTGVmdFVuaXQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjg4KS5pbnQzMihtZXNzYWdlLm1hcmdpbkxlZnRVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXJnaW5MZWZ0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMwMSkuZmxvYXQobWVzc2FnZS5tYXJnaW5MZWZ0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXJnaW5Ub3BVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMwNCkuaW50MzIobWVzc2FnZS5tYXJnaW5Ub3BVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXJnaW5Ub3AgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMzE3KS5mbG9hdChtZXNzYWdlLm1hcmdpblRvcCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luUmlnaHRVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMyMCkuaW50MzIobWVzc2FnZS5tYXJnaW5SaWdodFVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1hcmdpblJpZ2h0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMzMykuZmxvYXQobWVzc2FnZS5tYXJnaW5SaWdodCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luQm90dG9tVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzMzYpLmludDMyKG1lc3NhZ2UubWFyZ2luQm90dG9tVW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luQm90dG9tICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDM0OSkuZm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c3NhZ2UucGFyZW50ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucmlnaHRPZiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFsaWduQ29udGVudCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFsaWduSXRlbXMgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mbGV4V3JhcCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDUzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZsZXhTaHJpbmsgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wb3NpdGlvblR5cGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA4OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2NCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hbGlnblNlbGYgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA5OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA3Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mbGV4RGlyZWN0aW9uID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmp1c3RpZnlDb250ZW50ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDg4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm92ZXJmbG93ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDk2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpc3BsYXkgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTA0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZsZXhCYXNpc1VuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTE3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZsZXhCYXNpcyA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDE1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMjUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmxleEdyb3cgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTI4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLndpZHRoVW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDE3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2lkdGggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTQ0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhlaWdodFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTU3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhlaWdodCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDIwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNjApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWluV2lkdGhVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE3Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5taW5XaWR0aCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDIyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNzYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWluSGVpZ2h0VW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDIzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxODkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWluSGVpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE5Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhXaWR0aFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjA1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1heFdpZHRoID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIwOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhIZWlnaHRVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhIZWlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uTGVmdFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uTGVmdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDMwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb25Ub3BVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI1Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wb3NpdGlvblRvcCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDMyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb25SaWdodFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjY5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uUmlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjcyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uQm90dG9tVW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyODUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb25Cb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjg4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpbkxlZnRVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMwMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXJnaW5MZWZ0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzg6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMwNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXJnaW5Ub3BVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzk6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMxNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXJnaW5Ub3AgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0MDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzIwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpblJpZ2h0VW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMzMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWFyZ2luUmlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0MjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzM2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpbkJvdHRvbVVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0MzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQ5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpbkJvdHRvbSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNTIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ0xlZnRVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM2NSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wYWRkaW5nTGVmdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNjgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ1RvcFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0NzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdUb3AgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0ODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzg0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdSaWdodFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzk3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdSaWdodCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDUwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ0JvdHRvbVVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1MTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdCb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1MjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvaW50ZXJGaWx0ZXIgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHR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WludDMyKDQwKS5pbnQzMihtZXNzYWdlLnN0YXRlKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlZpZGVvRXZlbnQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlZpZGVvRXZlbnQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50aWNrTnVtYmVyID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmN1cnJlbnRPZmZzZXQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52aWRlb0xlbmd0aCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnN0YXRlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJWaWRlb0V2ZW50LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVmlkZW9FdmVudCB8fCAoUEJWaWRlb0V2ZW50ID0ge30pKTtcbiIsIC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gICAgICAgICB3cml0ZXIudWludDMyKDM3KS5mbG9hdChtZXNzYWdlLnZvbHVtZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucGxheWJhY2tSYXRlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDUpLmZsb2F0KG1lc3NhZ2UucGxheWJhY2tSYXRlKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5sb29wICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDgpLmJvb2wobWVzc2FnZS5sb29wKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlZpZGVvUGxheWVyLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJWaWRlb1BsYXllcigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNyYyA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wbGF5aW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wb3NpdGlvbiA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZvbHVtZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQ1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBsYXliYWNrUmF0ZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQ4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmxvb3AgPSByZWFkZXIuYm9vbCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCVmlkZW9QbGF5ZXIuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJWaWRlb1BsYXllciB8fCAoUEJWaWRlb1BsYXllciA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJWaWRlb1BsYXllciB9IGZyb20gJy4vcGIvZGVjZW50cmFsYW5kL3Nkay9jb21wb25lbnRzL3ZpZGVvX3BsYXllci5nZW4nO1xuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFZpZGVvUGxheWVyU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA0MyxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJWaWRlb1BsYXllci5lbmNvZGUodmFsdWUpO1xuICAgICAgICBjb25zdCBidWZmZXIgPSBuZXcgVWludDhBcnJheSh3cml0ZXIuZmluaXNoKCksIDAsIHdyaXRlci5sZW4pO1xuICAgICAgICBidWlsZGVyLndyaXRlQnVmZmVyKGJ1ZmZlciwgZmFsc2UpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiBQQlZpZGVvUGxheWVyLmRlY29kZShyZWFkZXIuYnVmZmVyKCksIHJlYWRlci5yZW1haW5pbmdCeXRlcygpKTtcbiAgICB9LFxuICAgIGNyZWF0ZSgpIHtcbiAgICAgICAgLy8gVE9ETzogdGhpcyBpcyBhIGhhY2suXG4gICAgICAgIHJldHVybiBQQlZpZGVvUGxheWVyLmRlY29kZShuZXcgVWludDhBcnJheSgpKTtcbiAgICB9LFxuICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgdHlwZTogXCJvYmplY3RcIixcbiAgICAgICAgcHJvcGVydGllczoge30sXG4gICAgICAgIHNlcmlhbGl6YXRpb25UeXBlOiBcInByb3RvY29sLWJ1ZmZlclwiLFxuICAgICAgICBwcm90b2NvbEJ1ZmZlcjogXCJQQlZpZGVvUGxheWVyXCJcbiAgICB9XG59O1xuIiwgIi8qIGVzbGludC1kaXNhYmxlICovXG5pbXBvcnQgX20wIGZyb20gXCJwcm90b2J1ZmpzL21pbmltYWxcIjtcbmNvbnN0IHByb3RvYnVmUGFja2FnZVNhcmFzYSA9IFwiZGVjZW50cmFsYW5kLnNkay5jb21wb25lbnRzXCI7XG5mdW5jdGlvbiBjcmVhdGVCYXNlUEJWaXNpYmlsaXR5Q29tcG9uZW50KCkge1xuICAgIHJldHVybiB7IHZpc2libGU6IHVuZGVmaW5lZCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgUEJWaXNpYmlsaXR5Q29tcG9uZW50O1xuKGZ1bmN0aW9uIChQQlZpc2liaWxpdHlDb21wb25lbnQpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS52aXNpYmxlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoOCkuYm9vbChtZXNzYWdlLnZpc2libGUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCVmlzaWJpbGl0eUNvbXBvbmVudC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCVmlzaWJpbGl0eUNvbXBvbmVudCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudmlzaWJsZSA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJWaXNpYmlsaX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bGwoZW50aXR5KTtcbiAgICAgICAgaWYgKCFhbmltKVxuICAgICAgICAgICAgcmV0dXJuIFtudWxsLCBudWxsXTtcbiAgICAgICAgY29uc3Qgc3RhdGUgPSBhbmltLnN0YXRlcy5maW5kKChpdGVtKSA9PiBpdGVtLmNsaXAgPT09IGNsaXBOYW1lKTtcbiAgICAgICAgaWYgKCFzdGF0ZSlcbiAgICAgICAgICAgIHJldHVybiBbYW5pbSwgbnVsbF07XG4gICAgICAgIHJldHVybiBbYW5pbSwgc3RhdGVdO1xuICAgIH1cbiAgICByZXR1cm4ge1xuICAgICAgICAuLi50aGVDb21wb25lbnQsXG4gICAgICAgIGdldENsaXBPck51bGwoZW50aXR5LCBjbGlwTmFtZSkge1xuICAgICAgICAgICAgY29uc3QgW18sIHN0YXRlXSA9IGdldENsaXBBbmRBbmltYXRvcihlbnRpdHksIGNsaXBOYW1lKTtcbiAgICAgICAgICAgIHJldHVybiBzdGF0ZTtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0Q2xpcChlbnRpdHksIGNsaXBOYW1lKSB7XG4gICAgICAgICAgICBjb25zdCBbYW5pbWF0b3IsIHN0YXRlXSA9IGdldENsaXBBbmRBbmltYXRvcihlbnRpdHksIGNsaXBOYW1lKTtcbiAgICAgICAgICAgIGlmICghYW5pbWF0b3IpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFRoZXJlIGlzIG5vIEFuaW1hdG9yIGZvdW5kIGluIHRoZSBlbnRpdHkgJHtlbnRpdHl9YCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIXN0YXRlKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBUaGUgQW5pbWF0b3IgY29tcG9uZW50IG9mICR7ZW50aXR5fSBoYXMgbm8gdGhlIHN0YXRlICR7Y2xpcE5hbWV9YCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gc3RhdGU7XG4gICAgICAgIH0sXG4gICAgICAgIHBsYXlTaW5nbGVBbmltYXRpb24oZW50aXR5LCBjbGlwTmFtZSwgc2hvdWxkUmVzZXQgPSB0cnVlKSB7XG4gICAgICAgICAgICBjb25zdCBbYW5pbWF0b3IsIHN0YXRlXSA9IGdldENsaXBBbmRBbmltYXRvcihlbnRpdHksIGNsaXBOYW1lKTtcbiAgICAgICAgICAgIGlmICghYW5pbWF0b3IgfHwgIXN0YXRlKVxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIC8vIFJlc2V0IGFsbCBvdGhlciBhbmltYXRpb25zXG4gICAgICAgICAgICBmb3IgKGNvbnN0IHN0YXRlIG9mIGFuaW1hdG9yLnN0YXRlcykge1xuICAgICAgICAgICAgICAgIHN0YXRlLnBsYXlpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBzdGF0ZS5zaG91bGRSZXNldCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzdGF0ZS5wbGF5aW5nID0gdHJ1ZTtcbiAgICAgICAgICAgIHN0YXRlLnNob3VsZFJlc2V0ID0gc2hvdWxkUmVzZXQ7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfSxcbiAgICAgICAgc3RvcEFsbEFuaW1hdGlvbnMoZW50aXR5LCByZXNldEN1cnNvciA9IHRydWUpIHtcbiAgICAgICAgICAgIC8vIEdldCB0aGUgbXV0YWJsZSB0byBtb2RpZnlpbmdcbiAgICAgICAgICAgIGNvbnN0IGFuaW1hdG9yID0gdGhlQ29tcG9uZW50LmdldE11dGFibGVPck51bGwoZW50aXR5KTtcbiAgICAgICAgICAgIGlmICghYW5pbWF0b3IpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgLy8gUmVzZXQgYWxsIG90aGVyIGFuaW1hdGlvbnNcbiAgICAgICAgICAgIGZvciAoY29uc3Qgc3RhdGUgb2YgYW5pbWF0b3Iuc3RhdGVzKSB7XG4gICAgICAgICAgICAgICAgc3RhdGUucGxheWluZyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHN0YXRlLnNob3VsZFJlc2V0ID0gcmVzZXRDdXJzb3I7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgTWF0ZXJpYWwgfSBmcm9tICcuLi9nZW5lcmF0ZWQvaW5kZXguZ2VuJztcbmNvbnN0IFRleHR1cmVIZWxwZXIgPSB7XG4gICAgQ29tbW9uKHRleHR1cmUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHRleDoge1xuICAgICAgICAgICAgICAgICRjYXNlOiAndGV4dHVyZScsXG4gICAgICAgICAgICAgICAgdGV4dHVyZVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgQXZhdGFyKGF2YXRhclRleHR1cmUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHRleDoge1xuICAgICAgICAgICAgICAgICRjYXNlOiAnYXZhdGFyVGV4dHVyZScsXG4gICAgICAgICAgICAgICAgYXZhdGFyVGV4dHVyZVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgVmlkZW8odmlkZW9UZXh0dXJlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0ZXg6IHtcbiAgICAgICAgICAgICAgICAkY2FzZTogJ3ZpZGVvVGV4dHVyZScsXG4gICAgICAgICAgICAgICAgdmlkZW9UZXh0dXJlXG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfVxufTtcbmV4cG9ydCBmdW5jdGlvbiBkZWZpbmVNYXRlcmlhbENvbXBvbmVudChlbmdpbmUpIHtcbiAgICBjb25zdCB0aGVDb21wb25lbnQgPSBNYXRlcmlhbChlbmdpbmUpO1xuICAgIHJldHVybiB7XG4gICAgICAgIC4uLnRoZUNvbXBvbmVudCxcbiAgICAgICAgVGV4dHVyZTogVGV4dHVyZUhlbHBlcixcbiAgICAgICAgc2V0QmFzaWNNYXRlcmlhbChlbnRpdHksIG1hdGVyaWFsKSB7XG4gICAgICAgICAgICB0aGVDb21wb25lbnQuY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwge1xuICAgICAgICAgICAgICAgIG1hdGVyaWFsOiB7XG4gICAgICAgICAgICAgICAgICAgICRjYXNlOiAndW5saXQnLFxuICAgICAgICAgICAgICAgICAgICB1bmxpdDogbWF0ZXJpYWxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0UGJyTWF0ZXJpYWwoZW50aXR5LCBtYXRlcmlhbCkge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtYXRlcmlhbDoge1xuICAgICAgICAgICAgICAgICAgICAkY2FzZTogJ3BicicsXG4gICAgICAgICAgICAgICAgICAgIHBicjogbWF0ZXJpYWxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgTWVzaENvbGxpZGVyIH0gZnJvbSAnLi4vZ2VuZXJhdGVkL2luZGV4Lmdlbic7XG5leHBvcnQgZnVuY3Rpb24gZGVmaW5lTWVzaENvbGxpZGVyQ29tcG9uZW50KGVuZ2luZSkge1xuICAgIGNvbnN0IHRoZUNvbXBvbmVudCA9IE1lc2hDb2xsaWRlcihlbmdpbmUpO1xuICAgIGZ1bmN0aW9uIGdldENvbGxpc2lvbk1hc2sobGF5ZXJzKSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KGxheWVycykpIHtcbiAgICAgICAgICAgIHJldHVybiBsYXllcnMubWFwKChpdGVtKSA9PiBpdGVtKS5yZWR1Y2UoKHByZXYsIGl0ZW0pID0+IHByZXYgfCBpdGVtLCAwKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChsYXllcnMpIHtcbiAgICAgICAgICAgIHJldHVybiBsYXllcnM7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHtcbiAgICAgICAgLi4udGhlQ29tcG9uZW50LFxuICAgICAgICBzZXRCb3goZW50aXR5LCBjb2xsaWRlckxheWVycykge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtZXNoOiB7ICRjYXNlOiAnYm94JywgYm94OiB7fSB9LFxuICAgICAgICAgICAgICAgIGNvbGxpc2lvbk1hc2s6IGdldENvbGxpc2lvbk1hc2soY29sbGlkZXJMYXllcnMpXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0UGxhbmUoZW50aXR5LCBjb2xsaWRlckxheWVycykge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtZXNoOiB7ICRjYXNlOiAncGxhbmUnLCBwbGFuZToge30gfSxcbiAgICAgICAgICAgICAgICBjb2xsaXNpb25NYXNrOiBnZXRDb2xsaXNpb25NYXNrKGNvbGxpZGVyTGF5ZXJzKVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIHNldEN5bGluZGVyKGVudGl0eSwgcmFkaXVzQm90dG9tLCByYWRpdXNUb3AsIGNvbGxpZGVyTGF5ZXJzKSB7XG4gICAgICAgICAgICB0aGVDb21wb25lbnQuY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwge1xuICAgICAgICAgICAgICAgIG1lc2g6IHsgJGNhc2U6ICdjeWxpbmRlcicsIGN5bGluZGVyOiB7IHJhZGl1c0JvdHRvbSwgcmFkaXVzVG9wIH0gfSxcbiAgICAgICAgICAgICAgICBjb2xsa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1dnM6IHV2cyB8fCBbXSB9IH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICBzZXRDeWxpbmRlcihlbnRpdHksIHJhZGl1c0JvdHRvbSwgcmFkaXVzVG9wKSB7XG4gICAgICAgICAgICB0aGVDb21wb25lbnQuY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwge1xuICAgICAgICAgICAgICAgIG1lc2g6IHsgJGNhc2U6ICdjeWxpbmRlcicsIGN5bGluZGVyOiB7IHJhZGl1c0JvdHRvbSwgcmFkaXVzVG9wIH0gfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIHNldFNwaGVyZShlbnRpdHkpIHtcbiAgICAgICAgICAgIHRoZUNvbXBvbmVudC5jcmVhdGVPclJlcGxhY2UoZW50aXR5LCB7XG4gICAgICAgICAgICAgICAgbWVzaDogeyAkY2FzZTogJ3NwaGVyZScsIHNwaGVyZToge30gfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFR3ZWVuIH0gZnJvbSAnLi4vZ2VuZXJhdGVkL2luZGV4Lmdlbic7XG5jb25zdCBUd2VlbkhlbHBlciA9IHtcbiAgICBNb3ZlKG1vdmUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICRjYXNlOiAnbW92ZScsXG4gICAgICAgICAgICBtb3ZlXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBSb3RhdGUocm90YXRlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAkY2FzZTogJ3JvdGF0ZScsXG4gICAgICAgICAgICByb3RhdGVcbiAgICAgICAgfTtcbiAgICB9LFxuICAgIFNjYWxlKHNjYWxlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAkY2FzZTogJ3NjYWxlJyxcbiAgICAgICAgICAgIHNjYWxlXG4gICAgICAgIH07XG4gICAgfVxufTtcbmV4cG9ydCBmdW5jdGlvbiBkZWZpbmVUd2VlbkNvbXBvbmVudChlbmdpbmUpIHtcbiAgICBjb25zdCB0aGVDb21wb25lbnQgPSBUd2VlbihlbmdpbmUpO1xuICAgIHJldHVybiB7XG4gICAgICAgIC4uLnRoZUNvbXBvbmVudCxcbiAgICAgICAgTW9kZTogVHdlZW5IZWxwZXJcbiAgICB9O1xufVxuIiwgIi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBJQXJyYXkgPSAodHlwZSkgPT4ge1xuICAgIHJldHVybiB7XG4gICAgICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICAgICAgYnVpbGRlci53cml0ZVVpbnQzMih2YWx1ZS5sZW5ndGgpO1xuICAgICAgICAgICAgZm9yIChjb25zdCBpdGVtIG9mIHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgdHlwZS5zZXJpYWxpemUoaXRlbSwgYnVpbGRlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICAgICAgY29uc3QgbmV3QXJyYXkgPSBbXTtcbiAgICAgICAgICAgIGNvbnN0IGxlbmd0aCA9IHJlYWRlci5yZWFkVWludDMyKCk7XG4gICAgICAgICAgICBmb3IgKGxldCBpbmRleCA9IDA7IGluZGV4IDwgbGVuZ3RoOyBpbmRleCsrKSB7XG4gICAgICAgICAgICAgICAgbmV3QXJyYXkucHVzaCh0eXBlLmRlc2VyaWFsaXplKHJlYWRlcikpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG5ld0FycmF5O1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoKSB7XG4gICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgIH0sXG4gICAgICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgICAgIHR5cGU6ICdhcnJheScsXG4gICAgICAgICAgICBpdGVtczogdHlwZS5qc29uU2NoZW1hLFxuICAgICAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdhcnJheSdcbiAgICAgICAgfVxuICAgIH07XG59O1xuIiwgIi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBCb29sID0ge1xuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBidWlsZGVyLndyaXRlSW50OCh2YWx1ZSA/IDEgOiAwKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gcmVhZGVyLnJlYWRJbnQ4KCkgPT09IDE7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9LFxuICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgdHlwZTogJ2Jvb2xlYW4nLFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ2Jvb2xlYW4nXG4gICAgfVxufTtcbiIsICIvKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgSW50NjQgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVJbnQ2NChCaWdJbnQodmFsdWUpKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gTnVtYmVyKHJlYWRlci5yZWFkSW50NjQoKSk7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiAwO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnaW50ZWdlcicsXG4gICAgICAgIHNlcmlhbGl6YXRpb25UeXBlOiAnaW50NjQnXG4gICAgfVxufTtcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBJbnQzMiA9IHtcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgYnVpbGRlci53cml0ZUludDMyKHZhbHVlKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gcmVhZGVyLnJlYWRJbnQzMigpO1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4gMDtcbiAgICB9LFxuICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgdHlwZTogJ2ludGVnZXInLFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ2ludDMyJ1xuICAgIH1cbn07XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IGNvbnN0IEludDE2ID0ge1xuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBidWlsZGVyLndyaXRlSW50MTYodmFsdWUpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiByZWFkZXIucmVhZEludDE2KCk7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiAwO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnaW50ZWdlcicsXG4gICAgICAgIHNlcmlhbGl6YXRpb25UeXBlOiAnaW50MTYnXG4gICAgfVxufTtcbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgY29uc3QgSW50OCA9IHtcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgYnVpbGRlci53cml0ZUludDgodmFsdWUpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiByZWFkZXIucmVhZEludDgoKTtcbiAgICB9LFxuICAgIGNyZWF0ZSgpIHtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdpbnRl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uICAgICAgICByZXR1cm4gMC4wO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnbnVtYmVyJyxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdmbG9hdDY0J1xuICAgIH1cbn07XG4iLCAiLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IENvbG9yM1NjaGVtYSA9IHtcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUucik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLmcpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS5iKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcjogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICBnOiByZWFkZXIucmVhZEZsb2F0MzIoKSxcbiAgICAgICAgICAgIGI6IHJlYWRlci5yZWFkRmxvYXQzMigpXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiB7IHI6IDAsIGc6IDAsIGI6IDAgfTtcbiAgICB9LFxuICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgdHlwZTogJ29iamVjdCcsXG4gICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgIHI6IHsgdHlwZTogJ251bWJlcicgfSxcbiAgICAgICAgICAgIGc6IHsgdHlwZTogJ251bWJlcicgfSxcbiAgICAgICAgICAgIGI6IHsgdHlwZTogJ251bWJlcicgfVxuICAgICAgICB9LFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ2NvbG9yMydcbiAgICB9XG59O1xuIiwgIi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBDb2xvcjRTY2hlbWEgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLnIpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS5nKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUuYik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLmEpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICByOiByZWFkZXIucmVhZEZsb2F0MzIoKSxcbiAgICAgICAgICAgIGc6IHJlYWRlci5yZWFkRmxvYXQzMigpLFxuICAgICAgICAgICAgYjogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICBhOiByZWFkZXIucmVhZEZsb2F0MzIoKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4geyByOiAwLCBnOiAwLCBiOiAwLCBhOiAwIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICByOiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICBnOiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICBiOiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICBhOiB7IHR5cGU6ICdudW1iZXInIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdjb2xvcjQnXG4gICAgfVxufTtcbiIsICIvKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgRW50aXR5U2NoZW1hID0ge1xuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBidWlsZGVyLndyaXRlSW50MzIodmFsdWUpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiByZWFkZXIucmVhZEludDMyKCk7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiAwO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnaW50ZWdlcicsXG4gICAgICAgIHNlcmlhbGl6YXRpb25UeXBlOiAnZW50aXR5J1xuICAgIH1cbn07XG4iLCAiLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFF1YXRlcm5pb25TY2hlbWEgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLngpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS55KTtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUueik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLncpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB4OiByZWFkZXIucmVhZEZsb2F0MzIoKSxcbiAgICAgICAgICAgIHk6IHJlYWRlci5yZWFkRmxvYXQzMigpLFxuICAgICAgICAgICAgejogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICB3OiByZWFkZXIucmVhZEZsb2F0MzIoKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4geyB4OiAwLCB5OiAwLCB6OiAwLCB3OiAwIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICB4OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB6OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB3OiB7IHR5cGU6ICdudW1iZXInIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdxdWF0ZXJuaW9uJ1xuICAgIH1cbn07XG4iLCAiLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFZlY3RvcjNTY2hlbWEgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLngpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS55KTtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUueik7XG4gICAgfSxcbiAgICBkZXNlcmlhbGl6ZShyZWFkZXIpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHg6IHJlYWRlci5yZWFkRmxvYXQzMigpLFxuICAgICAgICAgICAgeTogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICB6OiByZWFkZXIucmVhZEZsb2F0MzIoKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4geyB4OiAwLCB5OiAwLCB6OiAwIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICB4OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB6OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB3OiB7IHR5cGU6ICdudW1iZXInIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICd2ZWN0b3IzJ1xuICAgIH1cbn07XG4iLCAiLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IElNYXAgPSAoc3BlYywgZGVmYXVsdFZhbHVlKSA9PiB7XG4gICAgY29uc3Qgc3BlY1JlZmxlY3Rpb24gPSBPYmplY3Qua2V5cyhzcGVjKS5yZWR1Y2UoKHNwZWNSZWZsZWN0aW9uLCBjdXJyZW50S2V5KSA9PiB7XG4gICAgICAgIHNwZWNSZWZsZWN0aW9uW2N1cnJlbnRLZXldID0gc3BlY1tjdXJyZW50S2V5XS5qc29uU2NoZW1hO1xuICAgICAgICByZXR1cm4gc3BlY1JlZmxlY3Rpb247XG4gICAgfSwge30pO1xuICAgIHJldHVybiB7XG4gICAgICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gc3BlYykge1xuICAgICAgICAgICAgICAgIHNwZWNba2V5XS5zZXJpYWxpemUodmFsdWVba2V5XSwgYnVpbGRlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICAgICAgY29uc3QgbmV3VmFsdWUgPSB7fTtcbiAgICAgICAgICAgIGZvciAoY29uc3Qga2V5IGluIHNwZWMpIHtcbiAgICAgICAgICAgICAgICA7XG4gICAgICAgICAgICAgICAgbmV3VmFsdWVba2V5XSA9IHNwZWNba2V5XS5kZXNlcmlhbGl6ZShyZWFkZXIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG5ld1ZhbHVlO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoKSB7XG4gICAgICAgICAgICBjb25zdCBuZXdWYWx1ZSA9IHt9O1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gc3BlYykge1xuICAgICAgICAgICAgICAgIDtcbiAgICAgICAgICAgICAgICBuZXdWYWx1ZVtrZXldID0gc3BlY1trZXldLmNyZWF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHsgLi4ubmV3VmFsdWUsIC4uLmRlZmF1bHRWYWx1ZSB9O1xuICAgICAgICB9LFxuICAgICAgICBleHRlbmQ6IChiYXNlKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBuZXdWYWx1ZSA9IHt9O1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gc3BlYykge1xuICAgICAgICAgICAgICAgIDtcbiAgICAgICAgICAgICAgICBuZXdWYWx1ZVtrZXldID0gc3BlY1trZXldLmNyZWF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHsgLi4ubmV3VmFsdWUsIC4uLmRlZmF1bHRWYWx1ZSwgLi4uYmFzZSB9O1xuICAgICAgICB9LFxuICAgICAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgICAgICB0eXBlOiAnb2JqZWN0JyxcbiAgICAgICAgICAgIHByb3BlcnRpZXM6IHNwZWNSZWZsZWN0aW9uLFxuICAgICAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdtYXAnXG4gICAgICAgIH1cbiAgICB9O1xufTtcbiIsICIvKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgSU9wdGlvbmFsID0gKHNwZWMpID0+IHtcbiAgICByZXR1cm4ge1xuICAgICAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgICAgIGlmICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgIGJ1aWxkZXIud3JpdGVJbnQ4KDEpO1xuICAgICAgICAgICAgICAgIHNwZWMuc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGJ1aWxkZXIud3JpdGVJbnQ4KDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBkZXNlcmlhbGl6ZShyZWFkZXIpIHtcbiAgICAgICAgICAgIGNvbnN0IGV4aXN0cyA9IHJlYWRlci5yZWFkSW50OCgpO1xuICAgICAgICAgICAgaWYgKGV4aXN0cykge1xuICAgICAgICAgICAgICAgIHJldHVybiBzcGVjLmRlc2VyaWFsaXplKHJlYWRlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGNyZWF0ZSgpIHtcbiAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgIH0sXG4gICAgICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgICAgIHR5cGU6IHNwZWMuanNvblNjaGVtYS50eXBlLFxuICAgICAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdvcHRpb25hbCcsXG4gICAgICAgICAgICBvcHRpb25hbEpzb25TY2hlbWE6IHNwZWMuanNvblNjaGVtYVxuICAgICAgICB9XG4gICAgfTtcbn07XG4iLCAiZXhwb3J0IGNvbnN0IElPbmVPZiA9IChzcGVjcykgPT4ge1xuICAgIGNvbnN0IHNwZWNLZXlzID0gT2JqZWN0LmtleXMoc3BlY3MpO1xuICAgIGNvbnN0IGtleVRvSW5kZXggPSBzcGVjS2V5cy5yZWR1Y2UoKGRpY3QsIGtleSwgaW5kZXgpID0+IHtcbiAgICAgICAgZGljdFtrZXldID0gaW5kZXg7XG4gICAgICAgIHJldHVybiBkaWN0O1xuICAgIH0sIHt9KTtcbiAgICBjb25zdCBzcGVjUmVmbGVjdGlvbiA9IHNwZWNLZXlzLnJlZHVjZSgoc3BlY1JlZmxlY3Rpb24sIGN1cnJlbnRLZXkpID0+IHtcbiAgICAgICAgc3BlY1JlZmxlY3Rpb25bY3VycmVudEtleV0gPSBzcGVjc1tjdXJyZW50S2V5XS5qc29uU2NoZW1hO1xuICAgICAgICByZXR1cm4gc3BlY1JlZmxlY3Rpb247XG4gICAgfSwge30pO1xuICAgIHJldHVybiB7XG4gICAgICAgIHNlcmlhbGl6ZSh7ICRjYXNlLCB2YWx1ZSB9LCBidWlsZGVyKSB7XG4gICAgICAgICAgICBjb25zdCBfdmFsdWUgPSBrZXlUb0luZGV4WyRjYXNlLnRvU3RyaW5nKCldICsgMTtcbiAgICAgICAgICAgIGJ1aWxkZXIud3JpdGVVaW50OChfdmFsdWUpO1xuICAgICAgICAgICAgc3BlY3NbJGNhc2VdLnNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcik7XG4gICAgICAgIH0sXG4gICAgICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICAgICAgY29uc3QgJGNhc2UgPSBzcGVjS2V5c1tyZWFkZXIucmVhZEludDgoKSAtIDFdO1xuICAgICAgICAgICAgY29uc3QgdmFsdWUgPSBzcGVjc1skY2FzZV0uZGVzZXJpYWxpemUocmVhZGVyKTtcbiAgICAgICAgICAgIHJldHVybiB7ICRjYXNlLCB2YWx1ZSB9O1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgIH0sXG4gICAgICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgcHJvcGVydGllczogc3BlY1JlZmxlY3Rpb24sXG4gICAgICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ29uZS1vZidcbiAgICAgICAgfVxuICAgIH07XG59O1xuIiwgImV4cG9ydCBjb25zdCBpc1NjaGVtYVR5cGUgPSAodmFsdWUsIHR5cGVzKSA9PiB0eXBlcy5pbmNsdWRlcyh2YWx1ZS5zZXJpYWxpemF0aW9uVHlwZSk7XG5leHBvcnQgY29uc3QgaXNPbmVPZkpzb25TY2hlbWEgPSAodH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ICBjb25zdCB3aXRoSXRlbXNKc29uU2NoZW1hID0ganNvblNjaGVtYTtcbiAgICAgICAgcmV0dXJuIElBcnJheShqc29uU2NoZW1hVG9TY2hlbWEod2l0aEl0ZW1zSnNvblNjaGVtYS5pdGVtcykpO1xuICAgIH1cbiAgICBpZiAoanNvblNjaGVtYS5zZXJpYWxpemF0aW9uVHlwZSA9PT0gJ2VudW0taW50Jykge1xuICAgICAgICBjb25zdCBlbnVtSnNvblNjaGVtYSA9IGpzb25TY2hlbWE7XG4gICAgICAgIHJldHVybiBJbnRFbnVtKGVudW1Kc29uU2NoZW1hLmVudW1PYmplY3QsIGVudW1Kc29uU2NoZW1hLmRlZmF1bHQpO1xuICAgIH1cbiAgICBpZiAoanNvblNjaGVtYS5zZXJpYWxpemF0aW9uVHlwZSA9PT0gJ2VudW0tc3RyaW5nJykge1xuICAgICAgICBjb25zdCBlbnVtSnNvblNjaGVtYSA9IGpzb25TY2hlbWE7XG4gICAgICAgIHJldHVybiBTdHJpbmdFbnVtKGVudW1Kc29uU2NoZW1hLmVudW1PYmplY3QsIGVudW1Kc29uU2NoZW1hLmRlZmF1bHQpO1xuICAgIH1cbiAgICBpZiAoanNvblNjaGVtYS5zZXJpYWxpemF0aW9uVHlwZSA9PT0gJ29uZS1vZicpIHtcbiAgICAgICAgY29uc3Qgb25lT2ZKc29uU2NoZW1hID0ganNvblNjaGVtYTtcbiAgICAgICAgY29uc3Qgc3BlYyA9IHt9O1xuICAgICAgICBmb3IgKGNvbnN0IGtleSBpbiBvbmVPZkpzb25TY2hlbWEucHJvcGVydGllcykge1xuICAgICAgICAgICAgc3BlY1trZXldID0ganNvblNjaGVtYVRvU2NoZW1hKG9uZU9mSnNvblNjaGVtYS5wcm9wZXJ0aWVzW2tleV0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBJT25lT2Yoc3BlYyk7XG4gICAgfVxuICAgIHRocm93IG5ldyBFcnJvcihgJHtqc29uU2NoZW1hLnNlcmlhbGl6YXRpb25UeXBlfSBpcyBub3Qgc3VwcG9ydGVkIGFzIHJldmVyc2Ugc2NoZW1hIGdlbmVyYXRpb24uYCk7XG59XG5leHBvcnQgZnVuY3Rpb24gbXV0YXRlVmFsdWVzKGpzb25TY2hlbWEsIHZhbHVlLCBtdXRhdGVGbikge1xuICAgIGlmIChqc29uU2NoZW1hLnNlcmlhbGl6YXRpb25UeXBlID09PSAnbWFwJykge1xuICAgICAgICBjb25zdCB7IHByb3BlcnRpZXMgfSA9IGpzb25TY2hlbWE7XG4gICAgICAgIGNvbnN0IHR5cGVkVmFsdWUgPSB2YWx1ZTtcbiAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gcHJvcGVydGllcykge1xuICAgICAgICAgICAgY29uc3QgeyB0eXBlLCB2YWx1ZTogbWFwVmFsdWUgfSA9IGdldFR5cGVBbmRWYWx1ZShwcm9wZXJ0aWVzLCB0eXBlZFZhbHVlLCBrZXkpO1xuICAgICAgICAgICAgaWYgKHR5cGUuc2VyaWFsaXphdGlvblR5cGUgPT09ICd1bmtub3duJylcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGlmIChpc0NvbXBvdW5kVHlwZSh0eXBlKSkge1xuICAgICAgICAgICAgICAgIG11dGF0ZVZhbHVlcyh0eXBlLCBtYXBWYWx1ZSwgbXV0YXRlRm4pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgY29uc3QgbmV3VmFsdWUgPSBtdXRhdGVGbihtYXBWYWx1ZSwgdHlwZSk7XG4gICAgICAgICAgICAgICAgaWYgKG5ld1ZhbHVlLmNoYW5nZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZWRWYWx1ZVtrZXldID0gbmV3VmFsdWUudmFsdWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIGVsc2UgaWYgKGpzb25TY2hlbWEuc2VyaWFsaXphdGl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sZGVyLnNldFVpbnQzMihwdHIgKyA0MCwgdmFsdWUucGFyZW50IHx8IDApO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIGNvbnN0IHB0ciA9IHJlYWRlci5pbmNyZW1lbnRSZWFkT2Zmc2V0KFRSQU5TRk9STV9MRU5HVEgpO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgICB4OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIpLFxuICAgICAgICAgICAgICAgIHk6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDQpLFxuICAgICAgICAgICAgICAgIHo6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDgpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcm90YXRpb246IHtcbiAgICAgICAgICAgICAgICB4OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIgKyAxMiksXG4gICAgICAgICAgICAgICAgeTogcmVhZGVyLmdldEZsb2F0MzIocHRyICsgMTYpLFxuICAgICAgICAgICAgICAgIHo6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDIwKSxcbiAgICAgICAgICAgICAgICB3OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIgKyAyNClcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzY2FsZToge1xuICAgICAgICAgICAgICAgIHg6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDI4KSxcbiAgICAgICAgICAgICAgICB5OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIgKyAzMiksXG4gICAgICAgICAgICAgICAgejogcmVhZGVyLmdldEZsb2F0MzIocHRyICsgMzYpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcGFyZW50OiByZWFkZXIuZ2V0VWludDMyKHB0ciArIDQwKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcG9zaXRpb246IHsgeDogMCwgeTogMCwgejogMCB9LFxuICAgICAgICAgICAgc2NhbGU6IHsgeDogMSwgeTogMSwgejogMSB9LFxuICAgICAgICAgICAgcm90YXRpb246IHsgeDogMCwgeTogMCwgejogMCwgdzogMSB9LFxuICAgICAgICAgICAgcGFyZW50OiAwXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBleHRlbmQodmFsdWUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHBvc2l0aW9uOiB7IHg6IDAsIHk6IDAsIHo6IDAgfSxcbiAgICAgICAgICAgIHNjYWxlOiB7IHg6IDEsIHk6IDEsIHo6IDEgfSxcbiAgICAgICAgICAgIHJvdGF0aW9uOiB7IHg6IDAsIHk6IDAsIHo6IDAsIHc6IDEgfSxcbiAgICAgICAgICAgIHBhcmVudDogMCxcbiAgICAgICAgICAgIC4uLnZhbHVlXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgICAgICAgeDogeyB0eXBlOiAnbnVtYmVyJyB9LFxuICAgICAgICAgICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICAgICAgICAgIHo6IHsgdHlwZTogJ251bWJlcicgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzY2FsZToge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgICAgICAgeDogeyB0eXBlOiAnbnVtYmVyJyB9LFxuICAgICAgICAgICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICAgICAgICAgIHo6IHsgdHlwZTogJ251bWJlcicgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICByb3RhdGlvbjoge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgICAgICAgeDogeyB0eXBlOiAnbnVtYmVyJyB9LFxuICAgICAgICAgICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICAgICAgICAgIHo6IHsgdHlwZTogJ251bWJlcicgfSxcbiAgICAgICAgICAgICAgICAgICAgdzogeyB0eXBlOiAnbnVtYmVyJyB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHBhcmVudDogeyB0eXBlOiAnaW50ZWdlcicgfVxuICAgICAgICB9LFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ3RyYW5zZm9ybSdcbiAgICB9XG59O1xuZXhwb3J0IGZ1bmN0aW9uIGRlZmluZVRyYW5zZm9ybUNvbXBvbmVudChlbmdpbmUpIHtcbiAgICBjb25zdCB0cmFuc2Zvcm1EZWYgPSBlbmdpbmUuZGVmaW5lQ29tcG9uZW50RnJvbVNjaGVtYSgnY29yZTo6VHJhbnNmb3JtJywgVHJhbnNmb3JtU2NoZW1hKTtcbiAgICByZXR1cm4ge1xuICAgICAgICAuLi50cmFuc2Zvcm1EZWYsXG4gICAgICAgIGNyZWF0ZShlbnRpdHksIHZhbCkge1xuICAgICAgICAgICAgcmV0dXJuIHRyYW5zZm9ybURlZi5jcmVhdGUoZW50aXR5LCBUcmFuc2Zvcm1TY2hlbWEuZXh0ZW5kKHZhbCkpO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGVPclJlcGxhY2UoZW50aXR5LCB2YWw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GVja05vdFRoZW5hYmxlKHQsIGVycm9yKSB7XG4gICAgaWYgKF9fREVWX18pIHtcbiAgICAgICAgaWYgKHQgJiYgdHlwZW9mIHQgPT09ICdvYmplY3QnICYmIHR5cGVvZiB0LnRoZW4gPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihlcnJvcik7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHQ7XG59XG4iLCAiLyoqXG4gKlxuICogQHJldHVybnMgYSBuZXcgR1NldFxuICovXG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlVmVyc2lvbkdTZXQoKSB7XG4gICAgY29uc3QgbGFzdFZlcnNpb24gPSBuZXcgTWFwKCk7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgLyoqXG4gICAgICAgICAqXG4gICAgICAgICAqIEBwYXJhbSBudW1iZXJcbiAgICAgICAgICogQHBhcmFtIHZlcnNpb25cbiAgICAgICAgICogQHJldHVybnNcbiAgICAgICAgICovXG4gICAgICAgIGFkZFRvKG51bWJlciwgdmVyc2lvbikge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgICAgIGlmICh2ZXJzaW9uIDwgMCkge1xuICAgICAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgY3VycmVudFZhbHVlID0gbGFzdFZlcnNpb24uZ2V0KG51bWJlcik7XG4gICAgICAgICAgICAvLyBJZiB0aGUgdmVyc2lvbiBpcyA+PSwgaXQgbWVhbnMgdGhlIHZhbHVlIGl0J3MgYWxyZWFkeSBpbiB0aGUgc2V0XG4gICAgICAgICAgICBpZiAoY3VycmVudFZhbHVlICE9PSB1bmRlZmluZWQgJiYgY3VycmVudFZhbHVlID49IHZlcnNpb24pIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxhc3RWZXJzaW9uLnNldChudW1iZXIsIHZlcnNpb24pO1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH0sXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBAcmV0dXJucyB0aGUgc2V0IHdpdGggW251bWJlciwgdmVyc2lvbl0gb2YgZWFjaCB2YWx1ZVxuICAgICAgICAgKi9cbiAgICAgICAgaGFzKG4sIHYpIHtcbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRWYWx1ZSA9IGxhc3RWZXJzaW9uLmdldChuKTtcbiAgICAgICAgICAgIC8vIElmIHRoZSB2ZXJzaW9uIGlzID49LCBpdCBtZWFucyB0aGUgdmFsdWUgaXQncyBhbHJlYWR5IGluIHRoZSBzZXRcbiAgICAgICAgICAgIGlmIChjdXJyZW50VmFsdWUgIT09IHVuZGVmaW5lZCAmJiBjdXJyZW50VmFsdWUgPj0gdikge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9LFxuICAgICAgICAvKipcbiAgICAgICAgICogV2FybmluZzogdGhpcyBmdW5jdGlvbiByZXR1cm5zIHRoZSByZWZlcmVuY2UgdG8gdGhlIGludGVybmFsIG1hcCxcbiAgICAgICAgICogIGlmIHlvdSBuZWVkIHRvIG11dGF0ZSBzb21lIHZhbHVlLCBtYWtlIGEgY29weS5cbiAgICAgICAgICogRm9yIG9wdGltaXphdGlvbiBwdXJwb3NlIHRoZSBjb3B5IGlzbid0IG1hZGUgaGVyZS5cbiAgICAgICAgICpcbiAgICAgICAgICogQHJldHVybnMgdGhlIG1hcCBvZiBudW1iZXIgdG8gdmVyc2lvblxuICAgICAgICAgKi9cbiAgICAgICAgZ2V0TWFwKCkge1xuICAgICAgICAgICAgcmV0dXJuIGxhc3RWZXJzaW9uO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cbiAgICAgICAgICAgID8gcmVtb3ZlZEVudGl0aWVzLmdldE1hcCgpLmdldChlbnRpdHlOdW1iZXIpICsgMVxuICAgICAgICAgICAgOiAwO1xuICAgICAgICBjb25zdCBlbnRpdHkgPSBFbnRpdHlVdGlscy50b0VudGl0eUlkKGVudGl0eU51bWJlciwgZW50aXR5VmVyc2lvbik7XG4gICAgICAgIGlmICh1c2VkRW50aXRpZXMuaGFzKGVudGl0eSkpIHtcbiAgICAgICAgICAgIHJldHVybiBnZW5lcmF0ZU5ld0VudGl0eSgpO1xuICAgICAgICB9XG4gICAgICAgIHVzZWRFbnRpdGllcy5hZGQoZW50aXR5KTtcbiAgICAgICAgcmV0dXJuIGVudGl0eTtcbiAgICB9XG4gICAgZnVuY3Rpb24gZ2VuZXJhdGVFbnRpdHkobmV0d29ya2VkKSB7XG4gICAgICAgIGlmIChuZXR3b3JrZWQgJiYgIW5ldHdvcmtlZEVudGl0aWVzUmFuZ2UpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignTmV0d29yayBlbnRpdGllcyByYW5nZWQgbm90IGluaXRpYWxpemVkLiBDb25uZWN0IHRvIGEgQ1JEVCBTZXJ2ZXInKTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCB1c2VkTmV0d29ya1NpemUgPSAobmV0d29ya2VkRW50aXRpZXNSYW5nZSAmJlxuICAgICAgICAgICAgWy4uLnVzZWRFbnRpdGllcy52YWx1ZXMoKV0uZmlsdGVyKCgkKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgW2VudGl0eUlkXSA9IEVudGl0eVV0aWxzLmZyb21FbnRpdHlJZCgkKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gZW50aXR5SWQgPj0gbmV0d29ya2VkRW50aXRpZXNSYW5nZVswXSAmJiBlbnRpdHlJZCA8PSBuZXR3b3JrZWRFbnRpdGllc1JhbmdlWzFdO1xuICAgICAgICAgICAgfSkubGVuZ3RoKSA/P1xuICAgICAgICAgICAgMD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mICghbmV0d29ya2VkICYmIG51bWJlciA+PSBsb2NhbEVudGl0aWVzQXZhaWxhYmxlKVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjb25zdCBlbnRpdHkgPSBFbnRpdHlVdGlscy50b0VudGl0eUlkKG51bWJlciwgdmVyc2lvbiArIDEpO1xuICAgICAgICAgICAgICAgIC8vIElmIHRoZSBlbnRpdHkgaXMgbm90IGJlaW5nIHVzZWQsIHdlIGNhbiByZS11c2UgaXRcbiAgICAgICAgICAgICAgICAvLyBJZiB0aGUgZW50aXR5IHdhcyByZW1vdmVkIGluIHRoaXMgdGljaywgd2UncmUgbm90IGNvdW50aW5nIGZvciB0aGUgdXNlZEVudGl0aWVzLCBidXQgd2UgaGF2ZSBpdCBpbiB0aGUgdG9SZW1vdmVFbnRpdHlBcnJheVxuICAgICAgICAgICAgICAgIGlmICghdXNlZEVudGl0aWVzLmhhcyhlbnRpdHkpICYmICF0b1JlbW92ZUVudGl0aWVzLmluY2x1ZGVzKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdXNlZEVudGl0aWVzLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZW50aXR5O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZ2VuZXJhdGVOZXdFbnRpdHkobmV0d29ya2VkKTtcbiAgICB9XG4gICAgZnVuY3Rpb24gcmVtb3ZlRW50aXR5KGVudGl0eSkge1xuICAgICAgICBpZiAoZW50aXR5IDwgUkVTRVJWRURfU1RBVElDX0VOVElUSUVTKVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICBpZiAodXNlZEVudGl0aWVzLmhhcyhlbnRpdHkpKSB7XG4gICAgICAgICAgICB1c2VkRW50aXRpZXMuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgICAgICB0b1JlbW92ZUVudGl0aWVzLnB1c2goZW50aXR5KTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHVwZGF0ZVJlbW92ZWRFbnRpdHkoZW50aXR5KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG4gICAgZnVuY3Rpb24gcmVsZWFzZVJlbW92ZWRFbnRpdGllcygpIHtcbiAgICAgICAgY29uc3QgYXJyID0gdG9SZW1vdmVFbnRpdGllcztcbiAgICAgICAgaWYgKGFyci5sZW5ndGgpIHtcbiAgICAgICAgICAgIHRvUmVtb3ZlRW50aXRpZXMgPSBbXTtcbiAgICAgICAgICAgIGZvciAoY29uc3QgZW50aXR5IG9mIGFycikge1xuICAgICAgICAgICAgICAgIGNvbnN0IFtuLCB2XSA9IEVudGl0eVV0aWxzLmZyb21FbnRpdHlJZChlbnRpdHkpO1xuICAgICAgICAgICAgICAgIHJlbW92ZWRFbnRpdGllcy5hZGRUbyhuLCB2KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gYXJyO1xuICAgIH1cbiAgICBmdW5jdGlvbiB1cGRhdGVSZW1vdmVkRW50aXR5KGVudGl0eSkge1xuICAgICAgICBjb25zdCBbbiwgdl0gPSBFbnRpdHlVdGlscy5mcm9tRW50aXR5SWQoZW50aXR5KTtcbiAgICAgICAgLy8gVXBkYXRlIHRoZSByZW1vdmVkIGVudGl0aWVzIG1hcFxuICAgICAgICByZW1vdmVkRW50aXRpZXMuYWRkVG8obiwgdik7XG4gICAgICAgIC8vIFJlbW92ZSB0aGUgdXNlZEVudGl0aWVzIGlmIGV4aXN0XG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDw9IHY7IGkrKykge1xuICAgICAgICAgICAgdXNlZEVudGl0aWVzLmRlbGV0ZShFbnRpdHlVdGlscy50b0VudGl0eUlkKG4sIGkpKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG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XG4gICAgICAgIGJ1Zi5zZXRVaW50MzIoc3RhcnRNZXNzYWdlT2Zmc2V0ICsgMTIsIGNvbXBvbmVudElkKTtcbiAgICAgICAgYnVmLnNldFVpbnQzMihzdGFydE1lc3NhZ2VPZmZzZXQgKyAxNiwgdGltZXN0YW1wKTtcbiAgICAgICAgYnVmLnNldFVpbnQzMihzdGFydE1lc3NhZ2VPZmZzZXQgKyAyMCwgbmV0d29ya0lkKTtcbiAgICB9XG4gICAgRGVsZXRlQ29tcG9uZW50TmV0d29yay53cml0ZSA9IHdyaXRlO1xuICAgIGZ1bmN0aW9uIHJlYWQoYnVmKSB7XG4gICAgICAgIGNvbnN0IGhlYWRlciA9IENyZHRNZXNzYWdlUHJvdG9jb2wucmVhZEhlYWRlcihidWYpO1xuICAgICAgICBpZiAoIWhlYWRlcikge1xuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKGhlYWRlci50eXBlICE9PSBDcmR0TWVzc2FnZVR5cGUuREVMRVRFX0NPTVBPTkVOVF9ORVRXT1JLKSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0RlbGV0ZUNvbXBvbmVudE9wZXJhdGlvbiB0cmllZCB0byByZWFkIGFub3RoZXIgbWVzc2FnZSB0eXBlLicpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAuLi5oZWFkZXIsXG4gICAgICAgICAgICBlbnRpdHlJZDogYnVmLnJlYWRVaW50MzIoKSxcbiAgICAgICAgICAgIGNvbXBvbmVudElkOiBidWYucmVhZFVpbnQzMigpLFxuICAgICAgICAgICAgdGltZXN0YW1wOiBidWYucmVhZFVpbnQzMigpLFxuICAgICAgICAgICAgbmV0d29ya0lkOiBidWYucmVhZFVpbnQzMigpXG4gICAgICAgIH07XG4gICAgfVxuICAgIERlbGV0ZUNvbXBvbmVudE5ldHdvcmsucmVhZCA9IHJlYWQ7XG59KShEZWxldGVDb21wb25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AgICBpZiAoaGVhZGVyLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfQ09NUE9ORU5UKSB7XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSBEZWxldGVDb21wb25lbnQucmVhZChidWZmZXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChoZWFkZXIudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9DT01QT05FTlRfTkVUV09SSykge1xuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlID0gRGVsZXRlQ29tcG9uZW50TmV0d29yay5yZWFkKGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhlYWRlci50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVCkge1xuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlID0gUHV0Q29tcG9uZW50T3BlcmF0aW9uLnJlYWQoYnVmZmVyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoaGVhZGVyLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5UX05FVFdPUkspIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IFB1dE5ldHdvcmtDb21wb25lbnRPcGVyYXRpb24ucmVhZChidWZmZXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChoZWFkZXIudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9FTlRJVFkpIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IERlbGV0ZUVudGl0eS5yZWFkKGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhlYWRlci50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuREVMRVRFX0VOVElUWV9ORVRXT1JLKSB7XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSBEZWxldGVFbnRpdHlOZXR3b3JrLnJlYWQoYnVmZmVyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoaGVhZGVyLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5BUFBFTkRfVkFMVUUpIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IEFwcGVuZFZhbHVlT3BlcmF0aW9uLnJlYWQoYnVmZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gVW5rbm93biBtZXNzYWdlLCB3ZSBza2lwIGl0XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBjb25zdW1lIHRoZSBtZXNzYWdlXG4gICAgICAgICAgICAgICAgICAgIGJ1ZmZlci5pbmNyZW1lbnRSZWFkT2Zmc2V0KGhlYWRlci5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAobWVzc2FnZSkge1xuICAgICAgICAgICAgICAgICAgICByZWNlaXZlZE1lc3NhZ2VzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgLi4ubWVzc2FnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zcG9ydElkLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZUJ1ZmZlcjogYnVmZmVyLmJ1ZmZlcigpLnN1YmFycmF5KG9mZnNldCwgYnVmZmVyLmN1cnJlbnRSZWFkT2Zmc2V0KCkpXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICB9XG4gICAgLyoqXG4gICAgICogUmV0dXJuIGFuZCBjbGVhciB0aGUgbWVzc2FlcyBxdWV1ZVxuICAg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TtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChtc2cudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9FTlRJVFkgfHwgbXNnLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfRU5USVRZX05FVFdPUkspIHtcbiAgICAgICAgICAgICAgICBlbnRpdGllc1Nob3VsZEJlQ2xlYW5lZC5wdXNoKGVudGl0eUlkKTtcbiAgICAgICAgICAgICAgICBicm9hZGNhc3RNZXNzYWdlcy5wdXNoKG1zZyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBjb25zdCBlbnRpdHlTdGF0ZSA9IGVuZ2luZS5lbnRpdHlDb250YWluZXIuZ2V0RW50aXR5U3RhdGUoZW50aXR5SWQpO1xuICAgICAgICAgICAgICAgIC8vIFNraXAgdXBkYXRlcyBmcm9tIHJlbW92ZWQgZW50aXR5ZXNcbiAgICAgICAgICAgICAgICBpZiAoZW50aXR5U3RhdGUgPT09IEVudGl0eVN0YXRlLlJlbW92ZWQpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIC8vIEVudGl0aWVzIHdpdGggdW5rbm93biBlbnRpdGllcyBzaG91bGQgdXBkYXRlIGl0cyBlbnRpdHkgc3RhdGVcbiAgICAgICAgICAgICAgICBpZiAoZW50aXR5U3RhdGUgPT09IEVudGl0eVN0YXRlLlVua25vd24pIHtcbiAgICAgICAgICAgICAgICAgICAgZW5naW5lLmVudGl0eUNvbnRhaW5lci51cGRhdGVVc2VkRW50aXR5KGVudGl0eUlkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZW5naW5lLmdldENvbXBvbmVudE9yTnVsbChtc2cuY29tcG9uZW50SWQpO1xuICAgICAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBlbHNlICovXG4gICAgICAgICAgICAgICAgaWYgKGNvbXBvbmVudCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAobXNnLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5UICYmXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQuY29tcG9uZW50SWQgPT09IFRyYW5zZm9ybS5jb21wb25lbnRJZCAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgTmV0d29ya0VudGl0eS5oYXMoZW50aXR5SWQpICYmXG4gICAgICAgICAgICAgICAgICAgICAgICBOZXR3b3JrUGFyZW50LmhhcyhlbnRpdHlJZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1zZy5kYXRhID0gbmV0d29ya1V0aWxzLmZpeFRyYW5zZm9ybVBhcmVudChtc2cpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IFtjb25mbGljdE1lc3NhZ2UsIHZhbHVlXSA9IGNvbXBvbmVudC51cGRhdGVGcm9tQ3JkdCh7IC4uLm1zZywgZW50aXR5SWQgfSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghY29uZmxpY3RNZXNzYWdlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBBZGQgbWVzc2FnZSB0byB0cmFuc3BvcnQgcXVldWUgdG8gYmUgcHJvY2Vzc2VkIGJ5IG90aGVycyB0cmFuc3BvcnRzXG4gICAgICAgICAgICAgICAgICAgICAgICBicm9hZGNhc3RNZXNzYWdlcy5wdXNoKG1zZyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBvblByb2Nlc3NFbnRpdHlDb21wb25lbnRDaGFuZ2UgJiYgb25Qcm9jZXNzRW50aXR5Q29tcG9uZW50Q2hhbmdlKG1zZy5lbnRpdHlJZCwgbXNnLnR5cGUsIGNvbXBvbmVudCwgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAg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gICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChtZXNzYWdlLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfQ09NUE9ORU5UKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBEZWxldGVDb21wb25lbnQud3JpdGUobWVzc2FnZS5lbnRpdHlJZCwgY29tcG9uZW50LmNvbXBvbmVudElkLCBtZXNzYWdlLnRpbWVzdGFtcCwgYnVmZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChtZXNzYWdlLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5BUFBFTkRfVkFMVUUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIEFwcGVuZFZhbHVlT3BlcmF0aW9uLndyaXRlKG1lc3NhZ2UuZW50aXR5SWQsIG1lc3NhZ2UudGltZXN0YW1wLCBtZXNzYWdlLmNvbXBvbmVudElkLCBtZXNzYWdlLmRhdGEsIGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY3JkdE1lc3NhZ2VzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgLi4ubWVzc2FnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2VCdWZmZXI6IGJ1ZmZlci5idWZmZXIoKS5zdWJhcnJheShvZmZzZXQsIGJ1ZmZlci5jdXJyZW50V3JpdGVPZmZzZXQoKSlcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChvblByb2Nlc3NFbnRpdHlDb21wb25lbnRDaGFuZ2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHJhd1ZhbHVlID0gbWVzc2FnZS50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVCB8fCBtZXNzYWdlLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5BUFBFTkRfVkFMVUVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGNvbXBvbmVudC5nZXQobWVzc2FnZS5lbnRpdHlJZClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uUHJvY2Vzc0VudGl0eUNvbXBvbmVudENoYW5nZShtZXNzYWdlLmVudGl0eUlkLCBtZXNzYWdlLnR5cGUsIGNvbXBvbmVudCwgcmF3VmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8vIEFmdGVyIGFsbCB1cGRhdGVzLCBJIGV4ZWN1dGUgdGhlIERlbGV0ZWRFbnRpdHkgbWVzc2FnZXNcbiAgICAgICAgZm9yIChjb25zdCBlbnRpdHlJZCBvZiBlbnRpdGllc0RlbGV0ZWRUaGlzVGljaykge1xuICAgICAgICAgICAgY29uc3Qgb2Zmc2V0ID0gYnVmZmVyLmN1cnJlbnRXcml0ZU9mZnNldCgpO1xuICAgICAgICAgICAgRGVsZXRlRW50aXR5LndyaXRlKGVudGl0eUlkLCBidWZmZXIpO1xuICAgICAgICAgICAgY3JkdE1lc3NhZ2VzLnB1c2goe1xuICAgICAgICAgICAgICAgIHR5cGU6IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfRU5USVRZLFxuICAgICAgICAgICAgICAgIGVudGl0eUlkLFxuICAgICAgICAgICAgICAgIG1lc3NhZ2VCdWZmZXI6IGJ1ZmZlci5idWZmZXIoKS5zdWJhcnJheShvZmZzZXQsIGJ1ZmZlci5jdXJyZW50V3JpdGVPZmZzZXQoKSlcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgb25Qcm9jZXNzRW50aXR5Q29tcG9uZW50Q2hhbmdlICYmIG9uUHJvY2Vzc0VudGl0eUNvbXBvbmVudENoYW5nZShlbnRpdH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gICAgICAgICAgIC8vIFJlZHVuZGFudCBtZXNzYWdlIGZvciB0aGUgdHJhbnNwb3J0XG4gICAgICAgICAgICAgICAgaWYgKCF0cmFuc3BvcnQuZmlsdGVyKG1lc3NhZ2UpKVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjb25zdCB7IGVudGl0eUlkIH0gPSBmaW5kTmV0d29ya0lkKG1lc3NhZ2UpO1xuICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zZm9ybU5lZWRzRml4ID0gJ2NvbXBvbmVudElkJyBpbiBtZXNzYWdlICYmXG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY29tcG9uZW50SWQgPT09IFRyYW5zZm9ybS5jb21wb25lbnRJZCAmJlxuICAgICAgICAgICAgICAgICAgICBUcmFuc2Zvcm0uaGFzKGVudGl0eUlkKSAmJlxuICAgICAgICAgICAgICAgICAgICBOZXR3b3JrUGFyZW50LmhhcyhlbnRpdHlJZCkgJiZcbiAgICAgICAgICAgICAgICAgICAgTmV0d29ya0VudGl0eS5oYXMoZW50aXR5SWQpO1xuICAgICAgICAgICAgICAgIC8vIElmIHRoZXJlIHdhcyBhIExPQ0FMIGNoYW5nZSBpbiB0aGUgdHJhbnNmb3JtLiBBZGQgdGhlIHBhcmVudCB0byB0aGF0IHRyYW5zZm9ybVxuICAgICAgICAgICAgICAgIGlmIChpc1JlbmRlcmVyVHJhbnNwb3J0ICYmIG1lc3NhZ2UudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLlBVVF9DT01QT05FTlQgJiYgdHJhbnNmb3JtTmVlZHNGaXgpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGFyZW50ID0gZmluZE5ldHdvcmtJZChOZXR3b3JrUGFyZW50LmdldChlbnRpdHlJZCkpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB0cmFuc2Zvcm1EYXRhID0gbmV0d29ya1V0aWxzLmZpeFRyYW5zZm9ybV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HlwZS5QVVRfQ09NUE9ORU5UIHx8IG1zZy50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVF9ORVRXT1JLKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGJ1ZiA9IG5ldyBSZWFkV3JpdGVCeXRlQnVmZmVyKG1zZy5kYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5zZXQoZW50aXR5LCBzY2hlbWEuZGVzZXJpYWxpemUoYnVmKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBkYXRhLmRlbGV0ZShlbnRpdHkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gW251bGwsIGRhdGEuZ2V0KGVudGl0eSldO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBQcm9jZXNzTWVzc2FnZVJlc3VsdFR5cGUuU3RhdGVPdXRkYXRlZFRpbWVzdGFtcDpcbiAgICAgICAgICAgIGNhc2UgUHJvY2Vzc01lc3NhZ2VSZXN1bHRUeXBlLlN0YXRlT3V0ZGF0ZWREYXRhOiB7XG4gICAgICAgICAgICAgICAgaWYgKGRhdGEuaGFzKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgd3JpdGVCdWZmZXIgPSBuZXcgUmVhZFdyaXRlQnl0ZUJ1ZmZlcigpO1xuICAgICAgICAgICAgICAgICAgICBzY2hlbWEuc2VyaWFsaXplKGRhdGEuZ2V0KGVudGl0eSksIHdyaXRlQnVmZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiB3cml0ZUJ1ZmZlci50b0JpbmFyeSgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudGl0eUlkOiBlbnRpdHksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGltZXN0YW1wOiB0aW1lc3RhbXBzLmdldChlbnRpdHkpXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5nZXQoZW50aXR5KVxuICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBDcmR0TWVzc2FnZVR5cGUuREVMRVRFX0NPTVBPTkVOVCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnRpdHlJZDogZW50aXR5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpbWVzdGFtcDogdGltZXN0YW1wcy5nZXQoZW50aXR5KVxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gW251bGwsIGRhdGEuZ2V0KGVudGl0eSldO1xuICAgIH07XG59XG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlR2V0Q3JkdE1lc3NhZ2VzRm9yTHd3KGNvbXBvbmVudElkLCB0aW1lc3RhbXBzLCBkaXJ0eUl0ZXJhdG9yLCBzY2hlbWEsIGRhdGEpIHtcbiAgICByZXR1cm4gZnVuY3Rpb24qICgpIHtcbiAgICAgICAgZm9yIChjb25zdCBlbnRpdHkgb2YgZGlydHlJdGVyYXRvcikge1xuICAgICAgICAgICAgY29uc3QgbmV3VGltZXN0YW1wID0gaW5jcmVtZW50VGltZXN0YW1wKGVudGl0eSwgdGltZXN0YW1wcyk7XG4gICAgICAgICAgICBpZiAoZGF0YS5oYXMoZW50aXR5KSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHdyaXRlQnVmZmVyID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoKTtcbiAgICAgICAgICAgICAgICBzY2hlbWEuc2VyaWFsaXplKGRhdGEuZ2V0KGVudGl0eSksIHdyaXRlQnVmZmVyKTtcbiAgICAgICAgICAgICAgICBjb25zdCBtc2cgPSB7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5ULFxuICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICAgICAgZW50aXR5SWQ6IGVudGl0eSxcbiAgICAgICAgICAgICAgICAgICAgZGF0YTogd3JpdGVCdWZmZXIudG9CaW5hcnkoKSxcbiAgICAgICAgICAgICAgICAgICAgdGltZXN0YW1wOiBuZXdUaW1lc3RhbXBcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHlpZWxkIG1zZztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGNvbnN0IG1zZyA9IHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9DT01QT05FTlQsXG4gICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudElkLFxuICAgICAgICAgICAgICAgICAgICBlbnRpdHlJZDogZW50aXR5LFxuICAgICAgICAgICAgICAgICAgICB0aW1lc3RhbXA6IG5ld1RpbWVzdGFtcFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgIC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gICAgICAgICAgICBpZiAoZGF0YS5kZWxldGUoZW50aXR5KSAmJiBtYXJrQXNEaXJ0eSkge1xuICAgICAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuYWRkKGVudGl0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50IHx8IG51bGw7XG4gICAgICAgIH0sXG4gICAgICAgIGVudGl0eURlbGV0ZWQoZW50aXR5LCBtYXJrQXNEaXJ0eSkge1xuICAgICAgICAgICAgaWYgKGRhdGEuZGVsZXRlKGVudGl0eSkgJiYgbWFya0FzRGlydHkpIHtcbiAgICAgICAgICAgICAgICBkaXJ0eUl0ZXJhdG9yLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBnZXRPck51bGwoZW50aXR5KSB7XG4gICAgICAgICAgICBjb25zdCBjb21wb25lbnQgPSBkYXRhLmdldChlbnRpdHkpO1xuICAgICAgICAgICAgcmV0dXJuIGNvbXBvbmVudCA/IGRlZXBSZWFkb25seShjb21wb25lbnQpIDogbnVsbDtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0KGVudGl0eSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgICAgIGlmICghY29tcG9uZW50KSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBbZ2V0RnJvbV0gQ29tcG9uZW50ICR7Y29tcG9uZW50TmFtZX0gZm9yIGVudGl0eSAjJHtlbnRpdHl9IG5vdCBmb3VuZGApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGRlZXBSZWFkb25seShjb21wb25lbnQpO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoZW50aXR5LCB2YWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgICAgIGlmIChjb21wb25lbnQpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFtjcmVhdGVdIENvbXBvbmVudCAke2NvbXBvbmVudE5hbWV9IGZvciAke2VudGl0eX0gYWxyZWFkeSBleGlzdHNgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IHVzZWRWYWx1ZSA9IHZhbHVlID09PSB1bmRlZmluZWQgPyBzY2hlbWEuY3JlYXRlKCkgOiBzY2hlbWEuZXh0ZW5kID8gc2NoZW1hLmV4dGVuZCh2YWx1ZSkgOiB2YWx1ZTtcbiAgICAgICAgICAgIGRhdGEuc2V0KGVudGl0eSwgdXNlZFZhbHVlKTtcbiAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuYWRkKGVudGl0eSk7XG4gICAgICAgICAgICByZXR1cm4gdXNlZFZhbHVlO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGVPclJlcGxhY2UoZW50aXR5LCB2YWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgdXNlZFZhbHVlID0gdmFsdWUgPT09IHVuZGVmaW5lZCA/IHNjaGVtYS5jcmVhdGUoKSA6IHNjaGVtYS5leHRlbmQgPyBzY2hlbWEuZXh0ZW5kKHZhbHVlKSA6IHZhbHVlO1xuICAgICAgICAgICAgZGF0YS5zZXQoZW50aXR5LCB1c2VkVmFsdWUpO1xuICAgICAgICAgICAgZGlydHlJdGVyYXRvci5hZGQoZW50aXR5KTtcbiAgICAgICAgICAgIHJldHVybiB1c2VkVmFsdWU7XG4gICAgICAgIH0sXG4gICAgICAgIGdldE11dGFibGVPck51bGwoZW50aXR5KSB7XG4gICAgICAgICAgICBjb25zdCBjb21wb25lbnQgPSBkYXRhLmdldChlbnRpdHkpO1xuICAgICAgICAgICAgaWYgKCFjb21wb25lbnQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuYWRkKGVudGl0eSk7XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50O1xuICAgICAgICB9LFxuICAgICAgICBnZXRPckNyZWF0ZU11dGFibGUoZW50aXR5LCB2YWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgICAgIGlmICghY29tcG9uZW50KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY3JlYXRlKGVudGl0eSwgdmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgZGlydHlJdGVyYXRvci5hZGQoZW50aXR5KTtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29tcG9uZW50O1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBnZXRNdXRhYmxlKGVudGl0eSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gdGhpcy5nZXRNdXRhYmxlT3JOdWxsKGVudGl0eSk7XG4gICAgICAgICAgICBpZiAoY29tcG9uZW50ID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBbbXV0YWJsZV0gQ29tcG9uZW50ICR7Y29tcG9uZW50TmFtZX0gZm9yICR7ZW50aXR5fSBub3QgZm91bmRgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBjb21wb25lbnQ7XG4gICAgICAgIH0sXG4gICAgICAgICppdGVyYXRvcigpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3QgW2VudGl0eSwgY29tcG9uZW50XSBvZiBkYXRhKSB7XG4gICAgICAgICAgICAgICAgeWllbGQgW2VudGl0eSwgY29tcG9uZW50XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgKmRpcnR5SXRlcmF0b3IoKSB7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IGVudGl0eSBvZiBkaXJ0eU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0gbmFtZSA/PyBmbi5uYW1lO1xuICAgICAgICBpZiAoc3lzdGVtcy5maW5kKChpdGVtKSA9PiBpdGVtLmZuID09PSBmbikpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgU3lzdGVtICR7SlNPTi5zdHJpbmdpZnkoc3lzdGVtTmFtZSl9IGFscmVhZHkgYWRkZWQgdG8gdGhlIGVuZ2luZWApO1xuICAgICAgICB9XG4gICAgICAgIHN5c3RlbXMucHVzaCh7XG4gICAgICAgICAgICBmbixcbiAgICAgICAgICAgIHByaW9yaXR5LFxuICAgICAgICAgICAgbmFtZTogc3lzdGVtTmFtZVxuICAgICAgICB9KTtcbiAgICAgICAgLy8gVE9ETzogcmVwbGFjZSB0aGlzIHNvcnQgYnkgYW4gaW5zZXJ0aW9uIGluIHRoZSByaWdodCBwbGFjZVxuICAgICAgICBzb3J0KCk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJlbW92ZShzZWxlY3Rvcikge1xuICAgICAgICBsZXQgaW5kZXggPSAtMTtcbiAgICAgICAgaWYgKHR5cGVvZiBzZWxlY3RvciA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgIGluZGV4ID0gc3lzdGVtcy5maW5kSW5kZXgoKGl0ZW0pID0+IGl0ZW0ubmFtZSA9PT0gc2VsZWN0b3IpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgaW5kZXggPSBzeXN0ZW1zLmZpbmRJbmRleCgoaXRlbSkgPT4gaXRlbS5mbiA9PT0gc2VsZWN0b3IpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChpbmRleCA9PT0gLTEpIHtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgICAgICBzeXN0ZW1zLnNwbGljZShpbmRleCwgMSk7XG4gICAgICAgIHNvcnQoKTtcbiAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgfVxuICAgIHJldHVybiB7XG4gICAgICAgIGFkZ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HF1ZXVlZENvbW1hbmRzID0gW107XG4gICAgLy8gb25seSBzb3J0IHRoZSBhcnJheSBpZiB0aGUgbGF0ZXN0IChOKSBlbGVtZW50IGhhcyBhIHRpbWVzdGFtcCA8PSBOLTFcbiAgICBmdW5jdGlvbiBzaG91bGRTb3J0KHJvdykge1xuICAgICAgICBjb25zdCBsZW4gPSByb3cucmF3Lmxlbmd0aDtcbiAgICAgICAgaWYgKGxlbiA+IDEgJiYgcm93LnJhd1tsZW4gLSAxXS50aW1lc3RhbXAgPD0gcm93LnJhd1tsZW4gLSAyXS50aW1lc3RhbXApIHtcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG4gICAgZnVuY3Rpb24gZ290VXBkYXRlZChlbnRpdHkpIHtcbiAgICAgICAgY29uc3Qgcm93ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGVsc2UgKi9cbiAgICAgICAgaWYgKHJvdykge1xuICAgICAgICAgICAgaWYgKHNob3VsZFNvcnQocm93KSkge1xuICAgICAgICAgICAgICAgIHJvdy5yYXcuc29ydChzb3J0QnlUaW1lc3RhbXApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgd2hpbGUgKHJvdy5yYXcubGVuZ3RoID4gb3B0aW9ucy5tYXhFbGVtZW50cykge1xuICAgICAgICAgICAgICAgIHJvdy5yYXcuc2hpZnQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IGZyb3plblNldCA9IGZyZWV6ZVNldChuZXcgU2V0KHJvdz8ucmF3Lm1hcCgoJCkgPT4gJC52YWx1ZSkpKTtcbiAgICAgICAgICAgIHJvdy5mcm96ZW5TZXQgPSBmcm96ZW5TZXQ7XG4gICAgICAgICAgICByZXR1cm4gZnJvemVuU2V0O1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgLyogaX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biAgICAgICAgZ2V0IGNvbXBvbmVudE5hbWUoKSB7XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50TmFtZTtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0IGNvbXBvbmVudFR5cGUoKSB7XG4gICAgICAgICAgICAvLyBhIGdldHRlciBpcyB1c2VkIGhlcmUgdG8gcHJldmVudCBhY2NpZGVudGFsIGNoYW5nZXNcbiAgICAgICAgICAgIHJldHVybiAxIC8qIENvbXBvbmVudFR5cGUuR3Jvd09ubHlWYWx1ZVNldCAqLztcbiAgICAgICAgfSxcbiAgICAgICAgc2NoZW1hLFxuICAgICAgICBoYXMoZW50aXR5KSB7XG4gICAgICAgICAgICByZXR1cm4gZGF0YS5oYXMoZW50aXR5KTtcbiAgICAgICAgfSxcbiAgICAgICAgZW50aXR5RGVsZXRlZChlbnRpdHkpIHtcbiAgICAgICAgICAgIGRhdGEuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgIH0sXG4gICAgICAgIGdldChlbnRpdHkpIHtcbiAgICAgICAgICAgIGNvbnN0IHZhbHVlcyA9IGRhdGEuZ2V0KGVudGl0eSk7XG4gICAgICAgICAgICBpZiAodmFsdWVzKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlcy5mcm96ZW5TZXQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZW1wdHlSZWFkb25seVNldDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgYWRkVmFsdWUoZW50aXR5LCByYXdWYWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgeyBzZXQsIHZhbHVlIH0gPSBhcHBlbmQoZW50aXR5LCByYXdWYWx1ZSk7XG4gICAgICAgICAgICBkaXJ0eUl0ZXJhdG9yLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgY29uc3QgYnVmID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoKTtcbiAgICAgICAgICAgIHNjaGVtYS5zZXJpYWxpemUodmFsdWUsIGJ1Zik7XG4gICAgICAgICAgICBxdWV1ZWRDb21tYW5kcy5wdXNoKHtcbiAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICBkYXRhOiBidWYudG9CaW5hcnkoKSxcbiAgICAgICAgICAgICAgICBlbnRpdHlJZDogZW50aXR5LFxuICAgICAgICAgICAgICAgIHRpbWVzdGFtcDogMCxcbiAgICAgICAgICAgICAgICB0eXBlOiBDcmR0TWVzc2FnZVR5cGUuQVBQRU5EX1ZBTFVFXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJldHVybiBzZXQ7XG4gICAgICAgIH0sXG4gICAgICAgICppdGVyYXRvcigpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3QgW2VudGl0eSwgY29tcG9uZW50XSBvZiBkYXRhKSB7XG4gICAgICAgICAgICAgICAgeWllbGQgW2VudGl0eSwgY29tcG9uZW50LmZyb3plblNldF07XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgICpkaXJ0eUl0ZXJhdG9yKCkge1xuICAgICAgICAgICAgZm9yIChjb25zdCBlbnRpdHkgb2YgZGlydHlJdGVyYXRvcikge1xuICAgICAgICAgICAgICAgIHlpZWxkIGVudGl0eTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgZ2V0Q3JkdFVwZGF0ZXMoKSB7XG4gICAgICAgICAgICAvLyByZXR1cm4gYSBjb3B5IG9mIHRoZSBjb21tYW5kcywgYW5kIHRoZW4gY2xlYXIgdGhlIGxvY2FsIGNvcHlcbiAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuY2xlYXIoKTtcbiAgICAgICAgICAgIHJldHVybiBxdWV1ZWRDb21tYW5kcy5zcGxpY2UoMCwgcXVldWVkQ29tbWFuZHMubGVuZ3RoKTtcbiAgICAgICAgfSxcbiAgICAgICAgdXBkYXRlRnJvbUNyZHQoX2JvZHkpIHtcbiAgICAgICAgICAgIGlmIChfYm9keS50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuQVBQRU5EX1ZBTFVFKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgYnVmID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoX2JvZHkuZGF0YSk7XG4gICAgICAgICAgICAgICAgYXBwZW5kKF9ib2R5LmVudGl0eUlkLCBzY2hlbWEuZGVzZXJpYWxpemUoYnVmKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gW251bGwsIHVuZGVmaW5lZF07XG4gICAgICAgIH0sXG4gICAgICAgIGR1bXBDcmR0U3RhdGVUb0J1ZmZlcjogZnVuY3Rpb24gKGJ1ZmZlciwgZmlsdGVyRW50aXR5KSB7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IFtlbnRpdHksIHsgcmF3IH1dIG9mIGRhdGEpIHtcbiAgICAgICAgICAgICAgICBpZiAoZmlsdGVyRW50aXR5ICYmICFmaWx0ZXJFbnRpdHkoZW50aXR5KSlcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBpdCBvZiByYXcpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgYnVmID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgc2NoZW1hLnNlcmlhbGl6ZShpdC52YWx1ZSwgYnVmKTtcbiAgICAgICAgICAgICAgICAgICAgQXBwZW5kVmFsdWVPcGVyYXRpb24ud3JpdGUoZW50aXR5LCAwLCBjb21wb25lbnRJZCwgYnVmLnRvQmluYXJ5KCksIGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcbiAgICByZXR1cm4gcmV0O1xufVxuIiwgImltcG9ydCAqIGFzIGNvbXBvbmVudHMgZnJvbSAnLi4vLi4vY29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W5kID0gYXJyYXlDb21tYW5kc1tpXTtcbiAgICAgICAgICAgICAgICBpZiAoY29tbWFuZC50aW1lc3RhbXAgPiBtYXhUaW1lc3RhbXApIHtcbiAgICAgICAgICAgICAgICAgICAgbWF4VGltZXN0YW1wID0gY29tbWFuZC50aW1lc3RhbXA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChjb21tYW5kLnRpbWVzdGFtcCA+IGdsb2JhbFN0YXRlLnByZXZpb3VzRnJhbWVNYXhUaW1lc3RhbXApIHtcbiAgICAgICAgICAgICAgICAgICAgZ2xvYmFsU3RhdGUudGhpc0ZyYW1lQ29tbWFuZHMucHVzaChjb21tYW5kKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGNvbW1hbmQuc3RhdGUgPT09IDAgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfVVAgKi8gfHwgY29tbWFuZC5zdGF0ZSA9PT0gMSAvKiBQb2ludGVyRXZlbnRUeXBlLlBFVF9ET1dOICovKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHByZXZDb21tYW5kID0gZ2xvYmFsU3RhdGUuYnV0dG9uU3RhdGUuZ2V0KGNvbW1hbmQuYnV0dG9uKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFwcmV2Q29tbWFuZCB8fCBjb21tYW5kLnRpbWVzdGFtcCA+IHByZXZDb21tYW5kLnRpbWVzdGFtcCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZ2xvYmFsU3RhdGUuYnV0dG9uU3RhdGUuc2V0KGNvbW1hbmQuYnV0dG9uLCBjb21tYW5kKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNpbmNlIHdlIGFyZSBpdGVyYXRpbmcgYSBkZXNjZW5kaW5nIGFycmF5LCB3ZSBjYW4gZWFybHkgZmluaXNoIHRoZV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AgICAgICAgICAgY29uc3QgY21kID0gZmluZENsaWNrKGlucHV0LCBlbnRpdHkpO1xuICAgICAgICAgICAgaWYgKGNtZClcbiAgICAgICAgICAgICAgICByZXR1cm4gY21kO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH1cbiAgICBmdW5jdGlvbiBmaW5kQ2xpY2soaW5wdXRBY3Rpb24sIGVudGl0eSkge1xuICAgICAgICBsZXQgZG93biA9IG51bGw7XG4gICAgICAgIGxldCB1cCA9IG51bGw7XG4gICAgICAgIC8vIFdlIHNlYXJjaCB0aGUgbGFzdCBVUCAmIERPV04gY29tbWFuZCBzb3J0ZWQgYnkgdGltZXN0YW1wIGRlc2NlbmRpbmdcbiAgICAgICAgZm9yIChjb25zdCBpdCBvZiBmaW5kQ29tbWFuZHNCeUFjdGlvbkRlc2NlbmRpbmcoaW5wdXRBY3Rpb24sIGVudGl0eSkpIHtcbiAgICAgICAgICAgIGlmICghdXApIHtcbiAgICAgICAgICAgICAgICBpZiAoaXQuc3RhdGUgPT09IDAgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfVVAgKi8pIHtcbiAgICAgICAgICAgICAgICAgICAgdXAgPSBpdDtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoIWRvd24pIHtcbiAgICAgICAgICAgICAgICBpZiAoaXQuc3RhdGUgPT09IDEgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfRE9XTiAqLykge1xuICAgICAgICAgICAgICAgICAgICBkb3duID0gaXQ7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoIXVwIHx8ICFkb3duKVxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIC8vIElmIHRoZSBET1dOIGNvbW1hbm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bnRUeXBlLCBlbnRpdHkpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgZm9yIChjb25zdCBjb21tYW5kIG9mIGdsb2JhbFN0YXRlLnRoaXNGcmFtZUNvbW1hbmRzKSB7XG4gICAgICAgICAgICAgICAgaWYgKChjb21tYW5kLmJ1dHRvbiA9PT0gaW5wdXRBY3Rpb24gfHwgaW5wdXRBY3Rpb24gPT09IDMgLyogSW5wdXRBY3Rpb24uSUFfQU5ZICovKSAmJlxuICAgICAgICAgICAgICAgICAgICBjb21tYW5kLnN0YXRlID09PSBwb2ludGVyRXZlbnRUeXBlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjb21tYW5kO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG4gICAgfVxuICAgIGZ1bmN0aW9uIGZpbmRJbnB1dENvbW1hbmQoaW5wdXRBY3Rpb24sIHBvaW50ZXJFdmVudFR5cGUsIGVudGl0eSkge1xuICAgICAgICAvLyBXZSBzZWFyY2ggdGhlIGxhc3QgcG9pbnRlciBFdmVudCBjb21tYW5kIHNvcnRlZCBieSB0aW1lc3RhbXBcbiAgICAgICAgY29uc3QgY29tbWFuZCA9IGZpbmRMYXN0QWN0aW9uKHBvaW50ZXJFdmVudFR5cGUsIGlucHV0QWN0aW9uLCBlbnRpdHkpO1xuICAgICAgICBpZiAoIWNvbW1hbmQpXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgaWYgKHRpbWVzdGFtcElzQ3VycmVudEZyYW1lKGNvbW1hbmQudGltZXN0YW1wKSkge1xuICAgICAgICAgICAgcmV0dXJuIGNvbW1hbmQ7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuICAgIH1cbiAgICAvLyByZXR1cm5zIHRydWUgaWYgdGhlc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ZWdpc3RlcmVkLmApO1xuICAgICAgICB9XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgIGlmIChjb21wb25lbnQuY29tcG9uZW50TmFtZSAhPT0gY29tcG9uZW50TmFtZSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBDb21wb25lbnQgbmFtZSBkb2Vzbid0IG1hdGNoIGNvbXBvbmVudERlZmluaXRpb24uY29tcG9uZW50TmFtZSAke2NvbXBvbmVudE5hbWV9ICE9ICR7Y29tcG9uZW50LmNvbXBvbmVudE5hbWV9YCk7XG4gICAgICAgIH1cbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgaWYgKGNvbXBvbmVudC5jb21wb25lbnRJZCAhPT0gY29tcG9uZW50SWQpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ29tcG9uZW50IG51bWJlciBkb2Vzbid0IG1hdGNoIGNvbXBvbmVudERlZmluaXRpb24uY29tcG9uZW50SWQgJHtjb21wb25lbnRJZH0gIT0gJHtjb21wb25lbnQuY29tcG9uZW50SWR9YCk7XG4gICAgICAgIH1cbiAgICAgICAgY29tcG9uZW50c0RlZmluaXRpb24uc2V0KGNvbXBvbmVudElkLCBjb21wb25lbnQpO1xuICAgICAgICByZXR1cm4gY29tcG9uZW50O1xuICAgIH1cbiAgICBmdW5jdGlvbiBkZWZpbmVDb21wb25lbnRGcm9tU2NoZW1hKGNvbXBvbmVudE5hbWUsIHNjaGVtYSkge1xuICAgICAgICBjb25zdCBjb21wb25lbnRJZCA9IGNvbXBvbmVudE51bWJlckZyb21OYW1lKGNvbXBvbmVudE5hbWUpO1xuICAgICAgICBjb25zdCBwcmV2ID0gY29tcG9uZW50c0RlZmluaXRpb24uZ2V0KGNvbXBvbmVudElkKTtcbiAgICAgICAgaWYgKHByZXYpIHtcbiAgICAgICAgICAgIC8vIFRPRE86IGFzc2VydCBzcGVjID09PSBwcmV2LnNwZWNcbiAgICAgICAgICAgIHJldHVybiBwcmV2O1xuICAgICAgICB9XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgIGlmIChzZWFsZWQpXG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0VuZ2luZSBpcyBhbHJlYWR5IHNlYWxlZC4gTm8gY29tcG9uZW50cyBjYW4gYmUgYWRkZWQgYXQgdGhpcyBzdGFnZScpO1xuICAgICAgICBjb25zdCBuZXdDb21wb25lbnQgPSBjcmVhdGVDb21wb25lbnREZWZpbml0aW9uRnJvbVNjaGVtYShjb21wb25lbnROYW1lLCBjb21wb25lbnRJZCwgc2NoZW1hKTtcbiAgICAgICAgY29tcG9uZW50c0RlZmluaXRpb24uc2V0KGNvbXBvbmVudElkLCBuZXdDb21wb25lbnQpO1xuICAgICAgICByZXR1cm4gbmV3Q29tcG9uZW50O1xuICAgIH1cbiAgICBmdW5jdGlvbiBkZWZpbmVWYWx1ZVNldENvbXBvbmVudEZyb21TY2hlbWEoY29tcG9uZW50TmFtZSwgc2NoZW1hLCBvcHRpb25zKSB7XG4gICAgICAgIGNvbnN0IGNvbXBvbmVudElkID0gY29tcG9uZW50TnVtYmVyRnJvbU5hbWUoY29tcG9uZW50TmFtZSk7XG4gICAgICAgIGNvbnN0IHByZXYgPSBjb21wb25lbnRzRGVmaW5pdGlvbi5nZXQoY29tcG9uZW50SWQpO1xuICAgICAgICBpZiAocHJldikge1xuICAgICAgICAgICAgLy8gVE9ETzogYXNzZXJ0IHNwZWMgPT09IHByZXYuc3BlY1xuICAgICAgICAgICAgcmV0dXJuIHByZXY7XG4gICAgICAgIH1cbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgaWYgKHNlYWxlZClcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRW5naW5lIGlzIGFscmVhZHkgc2VhbGVkLiBObyBjb21wb25lbnRzIGNhbiBi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tYVNwZWMpO1xuICAgICAgICBjb25zdCBuZXdDb21wb25lbnQgPSB7XG4gICAgICAgICAgICAuLi5kZWYsXG4gICAgICAgICAgICBjcmVhdGUoZW50aXR5LCB2YWwpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZGVmLmNyZWF0ZShlbnRpdHksIHZhbCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwgdmFsKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGRlZi5jcmVhdGVPclJlcGxhY2UoZW50aXR5LCB2YWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICBjb21wb25lbnRzRGVmaW5pdGlvbi5zZXQoY29tcG9uZW50SWQsIG5ld0NvbXBvbmVudCk7XG4gICAgICAgIHJldHVybiBuZXdDb21wb25lbnQ7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGdldENvbXBvbmVudChjb21wb25lbnRJZE9yTmFtZSkge1xuICAgICAgICBjb25zdCBjb21wb25lbnRJZCA9IHR5cGVvZiBjb21wb25lbnRJZE9yTmFtZSA9PT0gJ251bWJlcicgPyBjb21wb25lbnRJZE9yTmFtZSA6IGNvbXBvbmVudE51bWJlckZyb21OYW1lKGNvbXBvbmVudElkT3JOYW1lKTtcbiAgICAgICAgY29uc3QgY29tcG9uZW50ID0gY29tcG9uZW50c0RlZmluaXRpb24uZ2V0KGNvbXBvbmVudElkKTtcbiAgICAgICAgaWYgKCFjb21wb25lbnQpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ29tcG9uZW50ICR7Y29tcG9uZW50SWRPck5hbWV9IG5vdCBmb3VuZC4gWW91IG5lZWQgdG8gZGVjbGFyZSB0aGUgY29tcG9uZW50cyBhdCB0aGUgYmVnaW5uaWcgb2YgdGhlIGVuZ2luZSBkZWNsYXJhdGlvbmApO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBjb21wb25lbnQ7XG4gICA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aW9uKiBnZXRDb21wb25lbnREZWZHcm91cCguLi5hcmdzKSB7XG4gICAgICAgIGNvbnN0IFtmaXJzdENvbXBvbmVudERlZiwgLi4uY29tcG9uZW50RGVmaW5pdGlvbnNdID0gYXJncztcbiAgICAgICAgZm9yIChjb25zdCBbZW50aXR5XSBvZiBmaXJzdENvbXBvbmVudERlZi5pdGVyYXRvcigpKSB7XG4gICAgICAgICAgICBsZXQgbWF0Y2hlcyA9IHRydWU7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IGNvbXBvbmVudERlZiBvZiBjb21wb25lbnREZWZpbml0aW9ucykge1xuICAgICAgICAgICAgICAgIGlmICghY29tcG9uZW50RGVmLmhhcyhlbnRpdHkpKSB7XG4gICAgICAgICAgICAgICAgICAgIG1hdGNoZXMgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG1hdGNoZXMpIHtcbiAgICAgICAgICAgICAgICB5aWVsZCBbZW50aXR5LCAuLi5hcmdzXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBmdW5jdGlvbiBnZXRTeXN0ZW1zKCkge1xuICAgICAgICByZXR1cm4gc3lzdGVtcy5nZXRTeXN0ZW1zKCk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGNvbXBvbmVudHNJdGVyKCkge1xuICAgICAgICByZXR1cm4gY29tcG9uZW50c0RlZmluaXRpb24udmFsdWVzKCk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJlbW92ZUNvbXBvbmVudERlZmluaXRpb24oY29tcG9uZW50SWRPck5hbWUpIHtcbiAgICAgICAgaWYgKHNlYWxlZClcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRW5naW5lIGlzIGFscmVhZHkgc2VhbGVkLiBObyBjb21wb25lbnRzIGNhbiBiZSByZW1vdmVkIGF0IHRoaXMgc3RhZ2UnKTtcbiAgICAgICAgY29uc3QgY29tcG9uZW50SWQgPSB0eXBlb2YgY29tcG9uZW50SWRPck5hbWUgPT09ICdudW1iZXInID8gY29tcG9uZW50SWRPck5hbWUgOiBjb21wb25lbnROdW1iZXJGcm9tTmFtZShjb21wb25lbnRJZE9yTmFtZSk7XG4gICAgICAgIGNvbXBvbmVudHNEZWZpbml0aW9uLmRlbGV0ZShjb21wb25lbnRJZCk7XG4gICAgfVxuICAgIGNvbXBvbmVudHMuVHJhbnNmb3JtKHsgZGVmaW5lQ29tcG9uZW50RnJvbVNjaGVtYSB9KTtcbiAgICBmdW5jdGlvbiBzZWFsKCkge1xuICAgICAgICBpZiAoIXNlYWxlZCkge1xuICAgICAgICAgICAgc2VhbGVkID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4ge1xuICAgICAgICBhZGRFbnRpdHksXG4gICAgICAgIHJlbW92ZUVudGl0eSxcbiAgICAgICAgcmVtb3ZlRW50aXR5V2l0aENoaWxkcmVuLFxuICAgICAgICBhZGRTeXN0ZW0sXG4gICAgICAgIGdldFN5c3RlbXMsXG4gICAgICAgIHJlbW92ZVN5c3RlbSxcbiAgICAgICAgZGVmaW5lQ29tcG9uZW50LFxuICAgICAgICBkZWZpbmVDb21wb25lbnRGcm9tU2NoZW1hLFxuICAgICAgICBkZWZpbmVWYWx1ZVNldENvbXBvbmVudEZyb21TY2hlbWEsXG4gICAgICAgIGdldEVudGl0aWVzV2l0aCxcbiAgICAgICAgZ2V0Q29tcG9uZW50LFxuICAgICAgICBnZXRDb21wb25lbnRPck51bGw6IGdldENvbXBvbmVudE9yTnVsbCxcbiAgICAgICAgZ2V0RW50aXR5T3JOdWxsQnlOYW1lLFxuICAgICAgICByZW1vdmVDb21wb25lbnREZWZpbml0aW9uLFxuICAgICAgICByZWdpc3RlckNvbXBvbmVudERlZmluaXRpb24sXG4gICAgICAgIGVudGl0eUNvbnRhaW5lcixcbiAgICAgICAgY29tcG9uZW50c0l0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Y29uc3QgcG9pbnRlckV2ZW50ID0gZXZlbnQuZ2V0KHR5cGUpO1xuICAgICAgICBpZiAocG9pbnRlckV2ZW50Py5vcHRzLmhvdmVyVGV4dCkge1xuICAgICAgICAgICAgcmVtb3ZlUG9pbnRlckV2ZW50KGVudGl0eSwgZ2V0UG9pbnRlckV2ZW50KHR5cGUpLCBwb2ludGVyRXZlbnQub3B0cy5idXR0b24pO1xuICAgICAgICB9XG4gICAgICAgIGV2ZW50LmRlbGV0ZSh0eXBlKTtcbiAgICB9XG4gICAgLy8gQGludGVybmFsXG4gICAgZW5naW5lLmFkZFN5c3RlbShmdW5jdGlvbiBFdmVudFN5c3RlbSgpIHtcbiAgICAgICAgZm9yIChjb25zdCBbZW50aXR5LCBldmVudF0gb2YgZXZlbnRzTWFwKSB7XG4gICAgICAgICAgICBpZiAoZW5naW5lLmdldEVudGl0eVN0YXRlKGVudGl0eSkgPT09IEVudGl0eVN0YXRlLlJlbW92ZWQpIHtcbiAgICAgICAgICAgICAgICBldmVudHNNYXAuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmb3IgKGNvbnN0IFtldmVudFR5cGUsIHsgY2IsIG9wdHMgfV0gb2YgZXZlbnQpIHtcbiAgICAgICAgICAgICAgICBpZiAoZXZlbnRUeXBlID09PSBFdmVudFR5cGUuQ2xpY2spIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgY29tbWFuZCA9IGlucHV0U3lzdGVtLmdldENsaWNrKG9wdHMuYnV0dG9uLCBlbnRpdHkpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29tbWFuZClcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrTm90VGhlbmFibGUoY2IoY29tbWFuZC51cCksICdDbGljayBldmVudCByZXR1cm5lZCBhIHRoZW5hYmxlLiBPbmx5IHN5bmNocm9ub3VzIGZ1bmN0aW9ucyBhcmUgYWxsb3dlZCcpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoZXZlbnRUeXBlID09PSBFdmVudFR5cGUuRG93biB8fCBldmVudFR5cGUgPT09IEV2ZW50VHlwZS5VcCkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjb21tYW5kID0gaW5wdXRTeXN0ZW0uZ2V0SW5wdXRDb21tYW5kKG9wdHMuYnV0dG9uLCBnZXRQb2ludGVyRXZlbnQoZXZlbnRUeXBlKSwgZW50aXR5KTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbW1hbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrTm90VGhlbmFibGUoY2IoY29tbWFuZCksICdFdmVudCBoYW5kbGVyIHJldHVybmVkIGEgdGhlbmFibGUuIE9ubHkgc3luY2hyb25vdXMgZnVuY3Rpb25zIGFyZSBhbGxvd2VkJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KTtcbiAgICBjb25zdCBvblBvaW50ZXJEb3duID0gKC4uLmFyZ3MpID0+IHtcbiAgICAgICAgY29uc3QgW2RhdGEsIGNiLCBtYXliZU9wdHNdID0gYXJncztcbiAgICAgICAgaWYgKHR5cGVvZiBkYXRhID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgcmV0dXJuIG9uUG9pbnRlckRvd24oeyBlbnRpdHk6IGRhdGEsIG9wdHM6IG1heWJlT3B0cyA/PyB7fSB9LCBjYik7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgeyBlbnRpdHksIG9wdHMgfSA9IGRhdGE7XG4gICAgICAgIGNvbnN0IG9wdGlvbnMgPSBnZXREZWZhdWx0T3B0cyhvcHRzKTtcbiAgICAgICAgcmVtb3ZlRXZlbnQoZW50aXR5LCBFdmVudFR5cGUuRG93bik7XG4gICAgICAgIGdldEV2ZW50KGVudGl0eSkuc2V0KEV2ZW50VHl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TtcbiAgICAgICAgfVxuICAgICAgICByZXN0YXJ0VHdlZW5zLmxlbmd0aCA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgW2VudGl0eSwgdHdlZW5dIG9mIGVuZ2luZS5nZXRFbnRpdGllc1dpdGgoVHdlZW4pKSB7XG4gICAgICAgICAgICBpZiAodHdlZW5DaGFuZ2VkKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBidWZmZXIgPSBuZXcgUmVhZFdyaXRlQnl0ZUJ1ZmZlcigpO1xuICAgICAgICAgICAgICAgIFR3ZWVuLnNjaGVtYS5zZXJpYWxpemUodHdlZW4sIGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgY2FjaGUuc2V0KGVudGl0eSwge1xuICAgICAgICAgICAgICAgICAgICB0d2VlbjogYnVmZmVyLnRvQmluYXJ5KCksXG4gICAgICAgICAgICAgICAgICAgIGZyYW1lczogMCxcbiAgICAgICAgICAgICAgICAgICAgY29tcGxldGVkOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgY2hhbmdlZDogdHJ1ZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgdHdlZW5DYWNoZSA9IGNhY2hlLmdldChlbnRpdHkpO1xuICAgICAgICAgICAgdHdlZW5DYWNoZS5mcmFtZXMgKz0gMTtcbiAgICAgICAgICAgIHR3ZWVuQ2FjaGUuY2hhbmdlZCA9IGZhbHNlO1xuICAgICAgICAgICAgaWYgKGlzQ29tcGxldGVkKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICAvLyBSZXNldCB0d2VlbiBmcmFtZXMuXG4gICAgICAgICAgICAgICAgdHdlZW5DYWNoZS5mcmFtZXMgPSAwO1xuICAgICAgICAgICAgICAgIC8vIHNldCB0aGUgdHdlZW4gY29tcGxldGVkIHRvIGF2b2lkIGNhbGxpbmcgdGhpcyBhZ2FpbiBmb3IgdGhlIHNhbWUgdHdlZW5cbiAgICAgICAgICAgICAgICB0d2VlbkNhY2hlLmNvbXBsZXRlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgY29uc3QgdHdlZW5TZXF1ZW5jZSA9IFR3ZWVuU2VxdWVuY2UuZ2V0T3JOdWxsKGVudGl0eSk7XG4gICAgICAgICAgICAgICAgaWYgKCF0d2VlblNlcXVlbmNlKVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjb25zdCB7IHNlcXVlbmNlIH0gPSB0d2VlblNlcXVlbmNlO1xuICAgICAgICAgICAgICAgIGlmIChzZXF1ZW5jZSAmJiBzZXF1ZW5jZS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgW25leHRUd2VlblNlcXVlbmNlLCAuLi5vdGhlclR3ZWVuc10gPSBzZXF1ZW5jZTtcbiAgICAgICAgICAgICAgICAgICAgVHdlZW4uY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwgbmV4dFR3ZWVuU2VxdWVuY2UpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBtdXRhYmxlVHdlZW5IZWxwZXIgPSBUd2VlblNlcXVlbmNlLmdldE11dGFibGUoZW50aXR5KTtcbiAgICAgICAgICAgICAgICAgICAgbXV0YWJsZVR3ZWVuSGVscGVyLnNlcXVlbmNlID0gb3RoZXJUd2VlbnM7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0d2VlblNlcXVlbmNlLmxvb3AgPT09IDAgLyogVHdlZW5Mb29wLlRMX1JFU1RBUlQgKi8pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG11dGFibGVUd2VlbkhlbHBlci5zZXF1ZW5jZS5wdXNoKHR3ZWVuKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmICh0d2VlblNlcXVlbmNlLmxvb3AgPT09IDEgLyogVHdlZW5Mb29wLlRMX1lPWU8gKi8pIHtcbiAgICAgICAgICAgICAgICAgICAgVHdlZW4uY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwgYmFja3dhcmRzVHdlZW4odHdlZW4pKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAodHdlZW5TZXF1ZW5jZS5sb29wID09PSAwIC8qIFR3ZWVuTG9vcC5UTF9SRVNUQVJUICovKSB7XG4gICAgICAgICAgICAgICAgICAgIFR3ZWVuLmRlbGV0ZUZyb20oZW50aXR5KTtcbiAgICAgICAgICAgICAgICAgICAgY2FjaGUuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgICAgICAgICAgICAgIHJlc3RhcnRUd2VlbnMucHVzaCgoKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBUd2Vlbi5jcmVhdGVPclJlcGxhY2UoZW50aXR5LCB0d2Vlbik7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH0sIE51bWJlci5ORUdBVElWRV9JTkZJTklUWSk7XG4gICAgZnVuY3Rpb24gYmFja3dhcmRzVHdlZW4odHdlZW4pIHtcbiAgICAgICAgaWYgKHR3ZWVuLm1vZGU/LiRjYXNlID09PSAnbW92ZScgJiYgdHdlZW4ubW9kZS5tb3ZlKSB7XG4gICAgICAgICAgICByZXR1cm4geyAuLi50d2VlbiwgbW9kZTogeyAuLi50d2Vlbi5tb2RlLCBtb3ZlOiB7IHN0YXJ0OiB0d2Vlbi5tb2RlLm1vdmUuZW5kLCBlbmQ6IHR3ZWVuLm1vZGUubW92ZS5zdGFydCB9IH0gfTtcbiAgICAgICAgfVxuICAgICAgICBpZiAodHdlZW4ubW9kZT8uJGNhc2UgPT09ICdyb3RhdGUnICYmIHR3ZWVuLm1vZGUucm90YXRlKSB7XG4gICAgICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgICAgIC4uLnR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yb3dzZXJpZnkvcGF0aFxuICovXG4vKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xuZnVuY3Rpb24gbm9ybWFsaXplU3RyaW5nUG9zaXgocGF0aCwgYWxsb3dBYm92ZVJvb3QgPSBmYWxzZSkge1xuICAgIGxldCByZXMgPSAnJztcbiAgICBsZXQgbGFzdFNlZ21lbnRMZW5ndGggPSAwO1xuICAgIGxldCBsYXN0U2xhc2ggPSAtMTtcbiAgICBsZXQgZG90cyA9IDA7XG4gICAgbGV0IGNvZGU7XG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPD0gcGF0aC5sZW5ndGg7ICsraSkge1xuICAgICAgICBpZiAoaSA8IHBhdGgubGVuZ3RoKVxuICAgICAgICAgICAgY29kZSA9IHBhdGguY2hhckNvZGVBdChpKTtcbiAgICAgICAgZWxzZSBpZiAoY29kZSA9PT0gNDcgLyovKi8pXG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgZWxzZVxuICAgICAgICAgICAgY29kZSA9IDQ3OyAvKi8qL1xuICAgICAgICBpZiAoY29kZSA9PT0gNDcgLyovKi8pIHtcbiAgICAgICAgICAgIGlmIChsYXN0U2xhc2ggPT09IGkgLSAxIHx8IGRvdHMgPT09IDEpIHtcbiAgICAgICAgICAgICAgICAvLyBOT09QXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChsYXN0U2xhc2ggIT09IGkgLSAxICYmIGRvdHMgPT09IDIpIHtcbiAgICAgICAgICAgICAgICBpZiAocmVzLmxlbmd0aCA8IDIgfHxcbiAgICAgICAgICAgICAgICAgICAgbGFzdFNlZ21lbnRMZW5ndGggIT09IDIgfHxcbiAgICAgICAgICAgICAgICAgICAgcmVzLmNoYXJDb2RlQXQocmVzLmxlbmd0aCAtIDEpICE9PSA0NiAvKi4qLyB8fFxuICAgICAgICAgICAgICAgICAgICByZXMuY2hhckNvZGVBdChyZXMubGVuZ3RoIC0gMikgIT09IDQ2IC8qLiovKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXMubGVuZ3RoID4gMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbGFzdFNsYXNoSW5kZXggPSByZXMubGFzdEluZGV4T2YoJy8nKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsYXN0U2xhc2hJbmRleCAhPT0gcmVzLmxlbmd0aCAtIDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobGFzdFNsYXNoSW5kZXggPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcyA9ICcnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0U2VnbWVudExlbmd0aCA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXMgPSByZXMuc2xpY2UoMCwgbGFzdFNsYXNoSW5kZXgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0U2VnbWVudExlbmd0aCA9IHJlcy5sZW5ndGggLSAxIC0gcmVzLmxhc3RJbmRleE9mKCcvJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RTbGFzaCA9IGk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG90cyA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAocmVzLmxlbmd0aCA9PT0gMiB8fCByZXMubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXMgPSAnJztcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RTZWdtZW50TGVuZ3RoID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RTbGFzaCA9IGk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkb3RzID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChhbGxvd0Fib3ZlUm9vdCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAocmVzLmxlbmd0aCA+IDApXG4gICAgICAgICAgICAgICAgICAgICAgICByZXMgKz0gJy8uLic7XG4gICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlcyA9ICcuLic7XG4gICAgICAgICAgICAgICAgICAgIGxhc3RTZWdtZW50TGVuZ3RoID0gMjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAocmVzLmxlbmd0aCA+IDApXG4gICAgICAgICAgICAgICAgICAgIHJlcyArPSAnLycgKyBwYXRoLnNsaWNlKGxhc3RTbGFzaCArIDEsIGkpO1xuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgcmVzID0gcGF0aC5zbGljZShsYXN0U2xhc2ggKyAxLCBpKTtcbiAgICAgICAgICAgICAgICBsYXN0U2VnbWVudExlbmd0aCA9IGkgLSBsYXN0U2xhc2ggLSAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbGFzdFNsYXNoID0gaTtcbiAgICAgICAgICAgIGRvdHMgPSAwO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGNvZGUgPT09IDQ2IC8qLiovICYmIGRvdHMgIT09IC0xKSB7XG4gICAgICAgICAgICArK2RvdHM7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBkb3RzID0gLTE7XG4gICAgICAgIH1cbiAgICB9XG4g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W9uKGVuZ2luZSwgY29tcG9uZW50KSB7XG4gICAgY29uc3QgZXhpc3RpbmdDb21wb25lbnREZWZpbml0aW9uID0gZW5naW5lLmdldENvbXBvbmVudE9yTnVsbChjb21wb25lbnQubmFtZSk7XG4gICAgaWYgKCFleGlzdGluZ0NvbXBvbmVudERlZmluaXRpb24pIHtcbiAgICAgICAgaWYgKGNvbXBvbmVudC5uYW1lLnN0YXJ0c1dpdGgoJ2NvcmU6OicpKSB7XG4gICAgICAgICAgICBpZiAoY29tcG9uZW50Lm5hbWUgaW4gY29tcG9uZW50RGVmaW5pdGlvbkJ5TmFtZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjb21wb25lbnREZWZpbml0aW9uQnlOYW1lW2NvbXBvbmVudC5uYW1lXShlbmdpbmUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBUaGUgY29yZSBjb21wb25lbnQgJHtjb21wb25lbnQubmFtZX0gd2FzIG5vdCBmb3VuZC5gKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChjb21wb25lbnQuanNvblNjaGVtYSkge1xuICAgICAgICAgICAgcmV0dXJuIGVuZ2luZS5kZWZpbmVDb21wb25lbnRGcm9tU2NoZW1hKGNvbXBvbmVudC5uYW1lLCBTY2hlbWFzLmZyb21Kc29uKGNvbXBvbmVudC5qc29uU2NoZW1hKSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYCR7Y29tcG9uZW50Lm5hbWV9IGlzIG5vdCBkZWZpbmVkIGFuZCB0aGVyZSBpcyBubyBzY2hlbWEgdG8gZGVmaW5lIGl0LmApO1xuICAgICAgICB9XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgICByZXR1cm4gZXhpc3RpbmdDb21wb25lbnREZWZpbml0aW9uO1xuICAgIH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bXBvc2l0ZSBwcm9iYWJseSBoYXMgYSBkaWZmZXJlbnQgcmVzb2x2ZWQgRW50aXR5TnVtYmVyXG4gICAgICAgICAgICAvLyBXZSdsbCBrbm93IHdpdGggdGhlIG1hcHBlZEVudGl0eWVzXG4gICAgICAgICAgICBpZiAoY29tcG9uZW50RGVmaW5pdGlvbi5jb21wb25lbnRJZCA9PT0gVHJhbnNmb3JtQ29tcG9uZW50TnVtYmVyKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgdHJhbnNmb3JtID0gY29tcG9uZW50VmFsdWU7XG4gICAgICAgICAgICAgICAgaWYgKHRyYW5zZm9ybS5wYXJlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgdHJhbnNmb3JtLnBhcmVudCA9IGdldENvbXBvc2l0ZUVudGl0eSh0cmFuc2Zvcm0ucGFyZW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRyYW5zZm9ybS5wYXJlbnQgPSBnZXRDb21wb3NpdGVFbnRpdHkoMCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIFRPRE86IGlzIGl0IGdvaW5nIHRvIGJlIG5lY2Vzc2FyeSB0byByZW1hcCBhc3NldHM/IGUuZy4gc3JjIHBhcmFtIGZyb20gQXVkaW9Tb3VyY2UgYW5kIEdsdGZDb250YWluZXJcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIFNjaGVtYXMubXV0YXRlTmVzdGVkVmFsdWVzKGNvbXBvbmVudERlZmluaXRpb24uc2NoZW1hLmpzb25TY2hlbWEsIGNvbXBvbmVudFZhbHVlLCAodmFsdWUsIHZhbHVlVHlwZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAodmFsdWVUeXBlLnNlcmlhbGl6YXRpb25UeXBlID09PSAnZW50aXR5Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgY2hhbmdlZDogdHJ1ZSwgdmFsdWU6IGdldENvbXBvc2l0ZUVudGl0eSh2YWx1ZSkgfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7IGNoYW5nZWQ6IGZhbHNlIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBjb25zdCBjb21wb3NpdGUgPSBDb21wb3NpdGVSb290Q29tcG9uZW50LmdldE11dGFibGVPck51bGwoY29tcG9zaXRlUm9vdEVudGl0eSkgfHwgQ29tcG9zaXRlUm9vdENvbXBvbmVudC5jcmVhdGUoY29tcG9zaXRlUm9vdEVudGl0eSk7XG4gICAgZm9yIChjb25zdCBbZW50aXR5U291cmNlLCB0YXJnZXRFbnRpdHldIG9mIG1hcHBlZEVudGl0aWVzKSB7XG4gICAgICAgIGNvbXBvc2l0ZS5lbnRpdGllcy5wdXNoKHtcbiAgICAgICAgICAgIHNyYzogZW50aXR5U291cmNlLFxuICAgICAgICAgICAgZGVzdDogdGFyZ2V0RW50aXR5XG4gICAgICAgIH0pO1xuICAgIH1cbiAgICBjb21wb3NpdGUuc3JjID0gY29tcG9zaXRlUmVzb3VyY2Uuc3JjO1xuICAgIHJldHVybiBjb21wb3NpdGVSb290RW50aXR5O1xufVxuIiwgIi8qIGVzbGludC1kaXNhYmxlICovXG5pbXBvcnQgX20wIGZyb20gXCJwcm90b2J1ZmpzL21pbmltYWxcIjtcbmltcG9ydCB7IFZhbHVlIH0gZnJvbSBcIi4vZ29vZ2xlL3Byb3RvYnVmL3N0cnVjdC5nZW5cIjtcbmNvbnN0IHByb3RvYnVmUGFja2FnZVNhcmFzYSA9IFwiXCI7XG5mdW5jdGlvbiBjcmVhdGVCYXNlQ29tcG9uZW50RGF0YSgpIHtcbiAgICByZXR1cm4geyBkYXRhOiB1bmRlZmluZWQgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIENvbXBvbmVudERhdGE7XG4oZnVuY3Rpb24gKENvbXBvbmVudERhdGEpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBzd2l0Y2ggKG1lc3NhZ2UuZGF0YT8uJGNhc2UpIHtcbiAgICAgICAgICAgIGNhc2UgXCJqc29uXCI6XG4gICAgICAgICAgICAgICAgVmFsdWUuZW5jb2RlKFZhbHVlLndyYXAobWVzc2FnZS5kYXRhLmpzb24pLCB3cml0ZXIudWludDMyKDEwKS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcImJpbmFyeVwiOlxuICAgICAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTgpLmJ5dGVzKG1lc3NhZ2UuZGF0YS5iaW5hcnkpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIENvbXBvbmVudERhdGEuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VDb21wb25lbnREYXRhKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGF0YSA9IHsgJGNhc2U6IFwianNvblwiLCBqc29uOiBWYWx1ZS51bndyYXAoVmFsdWUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kYXRhID0geyAkY2FzZTogXCJiaW5hcnlcIiwgYmluYXJ5OiByZWFkZXIuYnl0ZXMoKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvbmVudERhdGEuZGVjb2RlID0gZGVjb2RlO1xuICAgIGZ1bmN0aW9uIGZyb21KU09OKG9iamVjdCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgZGF0YTogaXNTZXQob2JqZWN0Lmpzb24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3JlYXRlQmFzZUNvbXBvc2l0ZUNvbXBvbmVudCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm5hbWUgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuanNvblNjaGVtYSA9IFZhbHVlLnVud3JhcChWYWx1ZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZW50cnkzID0gQ29tcG9zaXRlQ29tcG9uZW50X0RhdGFFbnRyeS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZW50cnkzLnZhbHVlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGF0YS5zZXQoZW50cnkzLmtleSwgZW50cnkzLnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvc2l0ZUNvbXBvbmVudC5kZWNvZGUgPSBkZWNvZGU7XG4gICAgZnVuY3Rpb24gZnJvbUpTT04ob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBuYW1lOiBpc1NldChvYmplY3QubmFtZSkgPyBTdHJpbmcob2JqZWN0Lm5hbWUpIDogXCJcIixcbiAgICAgICAgICAgIGpzb25TY2hlbWE6IGlzU2V0KG9iamVjdD8uanNvblNjaGVtYSkgPyBvYmplY3QuanNvblNjaGVtYSA6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGRhdGE6IGlzT2JqZWN0KG9iamVjdC5kYXRhKVxuICAgICAgICAgICAgICAgID8gT2JqZWN0LmVudHJpZXMob2JqZWN0LmRhdGEpLnJlZHVjZSgoYWNjLCBba2V5LCB2YWx1ZV0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgYWNjLnNldChOdW1iZXIoa2V5KSwgQ29tcG9uZW50RGF0YS5mcm9tSlNPTih2YWx1ZSkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICAgICAgICAgIH0sIG5ldyBNYXAoKSlcbiAgICAgICAgICAgICAgICA6IG5ldyBNYXAoKSxcbiAgICAgICAgfTtcbiAgICB9XG4gICAgQ29tcG9zaXRlQ29tcG9uZW50LmZyb21KU09OID0gZ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Rlci51aW50MzIoOCkuaW50MzIobWVzc2FnZS5rZXkpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnZhbHVlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIENvbXBvbmVudERhdGEuZW5jb2RlKG1lc3NhZ2UudmFsdWUsIHdyaXRlci51aW50MzIoMTgpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgQ29tcG9zaXRlQ29tcG9uZW50X0RhdGFFbnRyeS5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbXBvc2l0ZUNvbXBvbmVudF9EYXRhRW50cnkoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmtleSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gQ29tcG9uZW50RGF0YS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvc2l0ZUNvbXBvbmVudF9EYXRhRW50cnkuZGVjb2RlID0gZGVjb2RlO1xuICAgIGZ1bmN0aW9uIGZyb21KU09OKG9iamVjdCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAga2V5OiBpc1NldChvYmplY3Qua2V5KSA/IE51bWJlcihvYmplY3Qua2V5KSA6IDAsXG4gICAgICAgICAgICB2YWx1ZTogaXNTZXQob2JqZWN0LnZhbHVlKSA/IENvbXBvbmVudERhdGEuZnJvbUpTT04ob2JqZWN0LnZhbHVlKSA6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICB9XG4gICAgQ29tcG9zaXRlQ29tcG9uZW50X0RhdGFFbnRyeS5mcm9tSlNPTiA9IGZyb21KU09OO1xuICAgIGZ1bmN0aW9uIHRvSlNPTihtZXNzYWdlKSB7XG4gICAgICAgIGNvbnN0IG9iaiA9IHt9O1xuICAgICAgICBtZXNzYWdlLmtleSAhPT0gdW5kZWZpbmVkICYmIChvYmoua2V5ID0gTWF0aC5yb3VuZChtZXNzYWdlLmtle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mNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbXBvc2l0ZURlZmluaXRpb24oKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZlcnNpb24gPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jb21wb25lbnRzLnB1c2goQ29tcG9zaXRlQ29tcG9uZW50LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvc2l0ZURlZmluaXRpb24uZGVjb2RlID0gZGVjb2RlO1xuICAgIGZ1bmN0aW9uIGZyb21KU09OKG9iamVjdCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdmVyc2lvbjogaXNTZXQob2JqZWN0LnZlcnNpb24pID8gTnVtYmVyKG9iamVjdC52ZXJzaW9uKSA6IDAsXG4gICAgICAgICAgICBjb21wb25lbnRzOiBBcnJheS5pc0FycmF5KG9iamVjdD8uY29tcG9uZW50cylcbiAgICAgICAgICAgICAgICA/IG9iamVjdC5jb21wb25lbnRzLm1hcCgoZSkgPT4gQ29tcG9zaXRlQ29tcG9uZW50LmZyb21KU09OKGUpKVxuICAgICAgICAgICAgICAgIDogW10sXG4gICAgICAgIH07XG4gICAgfVxuICAgIENvbXBvc2l0ZURlZmluaXRpb24uZnJvbUpTT04gPSBmcm9tSlNPTjtcbiAgICBmdW5jdGlvbiB0b0pTT04obWVzc2FnZSkge1xuICAgICAgICBjb25zdCBvYmogPSB7fTtcbiAgICAgICAgbWVzc2FnZS52ZXJzaW9uICE9PSB1bmRlZmluZWQgJiYgKG9iai52ZXJzaW9uID0gTWF0aC5yb3VuZChtZXNzYWdlLnZlcnNpb24pKTtcbiAgICAgICAgaWYgKG1lc3NhZ2UuY29tcG9uZW50cykge1xuICAgICAgICAgICAgb2JqLmNvbXBvbmVudHMgPSBtZXNzYWdlLmNvbXBvbmVudHMubWFwKChlKSA9PiBlID8gQ29tcG9zaXRlQ29tcG9uZW50LnRvSlNPTihlKSA6IHVuZGVmaW5lZCk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBvYmouY29tc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uICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVN0cnVjdCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBlbnRyeTEgPSBTdHJ1Y3RfRmllbGRzRW50cnkuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVudHJ5MS52YWx1ZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZpZWxkcy5zZXQoZW50cnkxLmtleSwgZW50cnkxLnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFN0cnVjdC5kZWNvZGUgPSBkZWNvZGU7XG4gICAgZnVuY3Rpb24gZnJvbUpTT04ob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBmaWVsZHM6IGlzT2JqZWN0KG9iamVjdC5maWVsZHMpXG4gICAgICAgICAgICAgICAgPyBPYmplY3QuZW50cmllcyhvYmplY3QuZmllbGRzKS5yZWR1Y2UoKGFjYywgW2tleSwgdmFsdWVdKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGFjYy5zZXQoa2V5LCB2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgICAgICAgICAgfSwgbmV3IE1hcCgpKVxuICAgICAgICAgICAgICAgIDogbmV3IE1hcCgpLFxuICAgICAgICB9O1xuICAgIH1cbiAgICBTdHJ1Y3QuZnJvbUpTT04gPSBmcm9tSlNPTjtcbiAgICBmdW5jdGlvbiB0b0pTT04obWVzc2FnZSkge1xuICAgICAgICBjb25zdCBvYmogPSB7fTtcbiAgICAgICAgb2JqLmZpZWxkcyA9IHt9O1xuICAgICAgICBpZiAobWVzc2FnZS5maWVsZHMpIHtcbiAgICAgICAgICAgIG1lc3NhZ2UuZmllbGRzLmZvckVhY2goKHYsIGspID0+IHtcbiAgICAgICAgICAgICAgICBvYmouZmllbGRzW2tdID0gdjtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIFN0cnVjdC50b0pTT04gPSB0b0pTT047XG4gICAgZnVuY3Rpb24gd3JhcChvYmplY3QpIHtcbiAgICAgICAgY29uc3Qgc3RydWN0ID0gY3JlYXRlQmFzZVN0cnVjdCgpO1xuICAgICAgICBpZiAob2JqZWN0ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIE9iamVjdC5rZXlzKG9iamVjdCkuZm9yRWFjaCgoa2V5KSA9PiB7XG4gICAgICAgICAgICAgICAgc3RydWN0LmZpZWxkcy5zZXQoa2V5LCBvYmplY3Rba2V5XSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc3RydWN0O1xuICAgIH1cbiAgICBTdHJ1Y3Qud3JhcCA9IHdyYXA7XG4gICAgZnVuY3Rpb24gdW53cmFwKG1lc3Nh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xlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlU3RydWN0X0ZpZWxkc0VudHJ5KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uua2V5ID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gVmFsdWUudW53cmFwKFZhbHVlLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4g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ID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBzd2l0Y2ggKG1lc3NhZ2Uua2luZD8uJGNhc2UpIHtcbiAgICAgICAgICAgIGNhc2UgXCJudWxsVmFsdWVcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDgpLmludDMyKG1lc3NhZ2Uua2luZC5udWxsVmFsdWUpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcIm51bWJlclZhbHVlXCI6XG4gICAgICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNykuZG91YmxlKG1lc3NhZ2Uua2luZC5udW1iZXJWYWx1ZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwic3RyaW5nVmFsdWVcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDI2KS5zdHJpbmcobWVzc2FnZS5raW5kLnN0cmluZ1ZhbHVlKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJib29sVmFsdWVcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDMyKS5ib29sKG1lc3NhZ2Uua2luZC5ib29sVmFsdWUpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcInN0cnVjdFZhbHVlXCI6XG4gICAgICAgICAgICAgICAgU3RydWN0LmVuY29kZShTdHJ1Y3Qud3JhcChtZXNzYWdlLmtpbmQuc3RydWN0VmFsdWUpLCB3cml0ZXIudWludDMyKDQyKS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcImxpc3RWYWx1ZVwiOlxuICAgICAgICAgICAgICAgIExpc3RWYWx1ZS5lbmNvZGUoTGlzdFZhbHVlLndyYXAobWVzc2FnZS5raW5kLmxpc3RWYWx1ZSksIHdyaXRlci51aW50MzIoNTApLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgVmFsdWUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VWYWx1ZSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uua2luZCA9IHsgJGNhc2U6IFwibnVsbFZhbHVlXCIsIG51bGxWYWx1ZTogcmVhZGVyLmludDMyKCkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5raW5kID0geyAkY2FzZTogXCJudW1iZXJWYWx1ZVwiLCBudW1iZXJWYWx1ZTogcmVhZGVyLmRvdWJsZSgpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uua2luZCA9IHsgJGNhc2U6IFwic3RyaW5nVmFsdWVcIiwgc3RyaW5nVmFsdWU6IHJlYWRlci5zdHJpbmcoKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmtpbmQgPSB7ICRjYXNlOiBcImJvb2xWYWx1ZVwiLCBib29sVmFsdWU6IHJlYWRlci5ib29sKCkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5raW5kID0geyAkY2FzZTogXCJzdHJ1Y3RWYWx1ZVwiLCBzdHJ1Y3RWYWx1ZTogU3RydWN0LnVud3JhcChTdHJ1Y3QuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5raW5kID0geyAkY2FzZTogXCJsaXN0VmFsdWVcIiwgbGlzdFZhbHVlOiBMaXN0VmFsdWUudW53cmFwKExpc3RWYWx1ZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFZhbHVlLmRlY29kZSA9IGRlY29kZTtcbiAgICBmdW5jdGlvbiBmcm9tSlNPTihvYmplY3QpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGtpbmQ6IGlzU2V0KG9iamVjdC5udWxsVmFsdWUpXG4gICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcIm51bGxWYWx1ZVwiLCBudWxsVmFsdWU6IG51bGxWYWx1ZUZyb21KU09OKG9iamVjdC5udWxsVmFsdWUpIH1cbiAgICAgICAgICAgICAgICA6IGlzU2V0KG9iamVjdC5udW1iZXJWYWx1ZSlcbiAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcIm51bWJlclZhbHVlXCIsIG51bWJlclZhbHVlOiBOdW1iZXIob2JqZWN0Lm51bWJlclZhbHVlKSB9XG4gICAgICAgICAgICAgICAgICAgIDogaXNTZXQob2JqZWN0LnN0cmluZ1ZhbHVlKVxuICAgICAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcInN0cmluZ1ZhbHVlXCIsIHN0cmluZ1ZhbHVlOiBTdHJpbmcob2JqZWN0LnN0cmluZ1ZhbHVlKSB9XG4gICAgICAgICAgICAgICAgICAgICAgICA6IGlzU2V0KG9iamVjdC5ib29sVmFsdWUpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcImJvb2xWYWx1ZVwiLCBib29sVmFsdWU6IEJvb2xlYW4ob2JqZWN0LmJvb2xWYWx1ZSkgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogaXNTZXQob2JqZWN0LnN0cnVjdFZhbHVlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHsgJGNhc2U6IFwic3RydWN0VmFsdWVcIiwgc3RydWN0VmFsdWU6IG9iamVjdC5zdHJ1Y3RWYWx1ZSB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogaXNTZXQob2JqZWN0Lmxpc3RWYWx1ZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8geyAkY2FzZTogXCJsaXN0VmFsdWVcIiwgbGlzdFZhbHVlOiBbLi4ub2JqZWN0Lmxpc3RWYWx1ZV0gfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgfVxuICAgIFZhbHVlLmZyb21KU09OID0gZnJvbUpTT047XG4gICAgZnVuY3Rpb24gdG9KU09OKG1lc3NhZ2UpIHtcbiAgICAgICAgY29uc3Qgb2JqID0ge307XG4gICAgICAgIG1lc3NhZ2Uua2luZD8uJGNhc2UgPT09IFwibnVsbFZhbHVlXCIgJiZcbiAgICAgICAgICAgIChvYmoubnVsbFZhbHVlID0gbWVzc2FnZS5raW5kPy5udWxsVmFsdWUgIT09IHVuZGVmaW5lZCA/IG51bGxWYWx1ZVRvSlNPTihtZXNzYWdlLmtpbmQ/Lm51bGxWYWx1ZSkgOiB1bmRlZmluZWQpO1xuICAgICAgICBtZXNzYWd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YWx1ZXMucHVzaChWYWx1ZS51bndyYXAoVmFsdWUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIExpc3RWYWx1ZS5kZWNvZGUgPSBkZWNvZGU7XG4gICAgZnVuY3Rpb24gZnJvbUpTT04ob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiB7IHZhbHVlczogQXJyYXkuaXNBcnJheShvYmplY3Q/LnZhbHVlcykgPyBbLi4ub2JqZWN0LnZhbHVlc10gOiBbXSB9O1xuICAgIH1cbiAgICBMaXN0VmFsdWUuZnJvbUpTT04gPSBmcm9tSlNPTjtcbiAgICBmdW5jdGlvbiB0b0pTT04obWVzc2FnZSkge1xuICAgICAgICBjb25zdCBvYmogPSB7fTtcbiAgICAgICAgaWYgKG1lc3NhZ2UudmFsdWVzKSB7XG4gICAgICAgICAgICBvYmoudmFsdWVzID0gbWVzc2FnZS52YWx1ZXMubWFwKChlKSA9PiBlKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIG9iai52YWx1ZXMgPSBbXTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gb2JqO1xuICAgIH1cbiAgICBMaXN0VmFsdWUudG9KU09OID0gdG9KU09OO1xuICAgIGZ1bmN0aW9uIHdyYXAoYXJyYXkpIHtcbiAgICAgICAgY29uc3QgcmVzdWx0ID0gY3JlYXRlQmFzZUxpc3RWYWx1ZSgpO1xuICAgICAgICByZXN1bHQudmFsdWVzID0gYXJyYX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91bnQgKiBzcXVhcmVkO1xuICAgICAgICBjb25zdCB4ID0gMC41ICpcbiAgICAgICAgICAgICgyLjAgKiB2YWx1ZTIueCArXG4gICAgICAgICAgICAgICAgKC12YWx1ZTEueCArIHZhbHVlMy54KSAqIGFtb3VudCArXG4gICAgICAgICAgICAgICAgKDIuMCAqIHZhbHVlMS54IC0gNS4wICogdmFsdWUyLnggKyA0LjAgKiB2YWx1ZTMueCAtIHZhbHVlNC54KSAqXG4gICAgICAgICAgICAgICAgICAgIHNxdWFyZWQgK1xuICAgICAgICAgICAgICAgICgtdmFsdWUxLnggKyAzLjAgKiB2YWx1ZTIueCAtIDMuMCAqIHZhbHVlMy54ICsgdmFsdWU0LngpICogY3ViZWQpO1xuICAgICAgICBjb25zdCB5ID0gMC41ICpcbiAgICAgICAgICAgICgyLjAgKiB2YWx1ZTIueSArXG4gICAgICAgICAgICAgICAgKC12YWx1ZTEueSArIHZhbHVlMy55KSAqIGFtb3VudCArXG4gICAgICAgICAgICAgICAgKDIuMCAqIHZhbHVlMS55IC0gNS4wICogdmFsdWUyLnkgKyA0LjAgKiB2YWx1ZTMueSAtIHZhbHVlNC55KSAqXG4gICAgICAgICAgICAgICAgICAgIHNxdWFyZWQgK1xuICAgICAgICAgICAgICAgICgtdmFsdWUxLnkgKyAzLjAgKiB2YWx1ZTIueSAtIDMuMCAqIHZhbHVlMy55ICsgdmFsdWU0LnkpICogY3ViZWQpO1xuICAgICAgICBjb25zdCB6ID0gMC41ICpcbiAgICAgICAgICAgICgyLjAgKiB2YWx1ZTIueiArXG4gICAgICAgICAgICAgICAgKC12YWx1ZTEueiArIHZhbHVlMy56KSAqIGFtb3VudCArXG4gICAgICAgICAgICAgICAgKDIuMCAqIHZhbHVlMS56IC0gNS4wICogdmFsdWUyLnogKyA0LjAgKiB2YWx1ZTMueiAtIHZhbHVlNC56KSAqXG4gICAgICAgICAgICAgICAgICAgIHNxdWFyZWQgK1xuICAgICAgICAgICAgICAgICgtdmFsdWUxLnogK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sIHBvaW50MiwgcG9pbnQzKSB7XG4gICAgICAgIGNvbnN0IHgxID0gcG9pbnQyLnggLSBwb2ludDEueDtcbiAgICAgICAgY29uc3QgeTEgPSBwb2ludDIueSAtIHBvaW50MS55O1xuICAgICAgICBjb25zdCB6MSA9IHBvaW50Mi56IC0gcG9pbnQxLno7XG4gICAgICAgIGNvbnN0IHgyID0gcG9pbnQzLnggLSBwb2ludDEueDtcbiAgICAgICAgY29uc3QgeTIgPSBwb2ludDMueSAtIHBvaW50MS55O1xuICAgICAgICBjb25zdCB6MiA9IHBvaW50My56IC0gcG9pbnQxLno7XG4gICAgICAgIGNvbnN0IHl6ID0geTEgKiB6MiAtIHoxICogeTI7XG4gICAgICAgIGNvbnN0IHh6ID0gejEgKiB4MiAtIHgxICogejI7XG4gICAgICAgIGNvbnN0IHh5ID0geDEgKiB5MiAtIHkxICogeDI7XG4gICAgICAgIGNvbnN0IHB5dGggPSBNYXRoLnNxcnQoeXogKiB5eiArIHh6ICogeHogKyB4eSAqIHh5KTtcbiAgICAgICAgbGV0IGludlB5dGg7XG4gICAgICAgIGlmIChweXRoICE9PSAwKSB7XG4gICAgICAgICAgICBpbnZQeXRoID0gMS4wIC8gcHl0aDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGludlB5dGggPSAwLjA7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3Qgbm9ybWFsID0gVmVjdG9yMy5jcmVhdGUoeXogKiBpbnZQeXRoLCB4eiAqIGludlB5dGgsIHh5ICogaW52UHl0aCk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBub3JtYWwsXG4gICAgICAgICAgICBkOiAtKG5vcm1hbC54ICogcG9pbnQxLnggKyBub3JtYWwueSAqIHBvaW50MS55ICsgbm9ybWFsLnogKiBwb2ludDEueilcbiAgICAgICAgfTtcbiAgICB9XG4gICAgUGxhbmUuY29weUZyb21Qb2ludHMgPSBjb3B5RnJvbVBvaW50cztcbiAgICAv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RlbnRpdHkgPSBmYWxzZTtcbiAgICAgICAgc2VsZi5pc0lkZW50aXR5M3gyID0gZmFsc2U7XG4gICAgICAgIHNlbGYuX2lzSWRlbnRpdHlEaXJ0eSA9IHRydWU7XG4gICAgICAgIHNlbGYuX2lzSWRlbnRpdHkzeDJEaXJ0eSA9IHRydWU7XG4gICAgfVxuICAgIC8vIFByb3BlcnRpZXNcbiAgICAvKipcbiAgICAgKiBDaGVjayBpZiB0aGUgY3VycmVudCBtYXRyaXggaXMgaWRlbnRpdHlcbiAgICAgKiBAcmV0dXJucyB0cnVlIGlzIHRoZSBtYXRyaXggaXMgdGhlIGlkZW50aXR5IG1hdHJpeFxuICAgICAqL1xuICAgIGZ1bmN0aW9uIGlzSWRlbnRpdHlVcGRhdGUoc2VsZikge1xuICAgICAgICBpZiAoc2VsZi5faXNJZGVudGl0eURpcnR5KSB7XG4gICAgICAgICAgICBzZWxmLl9pc0lkZW50aXR5RGlydHkgPSBmYWxzZTtcbiAgICAgICAgICAgIGNvbnN0IG0gPSBzZWxmLl9tO1xuICAgICAgICAgICAgc2VsZi5pc0lkZW50aXR5ID1cbiAgICAgICAgICAgICAgICBtWzBdID09PSAxLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVsxXSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bMl0gPT09IDAuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzNdID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVs0XSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bNV0gPT09IDEuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzZdID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVs3XSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bOF0gPT09IDAuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzldID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVsxMF0gPT09IDEuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzExXSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bMTJdID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVsxM10gPT09IDAuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzE0XSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bMTVdID09PSAxLjA7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHNlbGYuaXNJZGVudGl0eTtcbiAgICB9XG4gICAgTWF0cml4LmlzSWRlbnRpdHlVcGRhdGUgPSBpc0lkZW50aXR5VXBkYXRlO1xuICAgIC8qKlxuICAgICAqIENoZWNrIGlmIHRoZSBjdXJyZW50IG1hdHJpeCBpcyBpZGVudGl0eSBhcyBhIHRleHR1cmUgbWF0cml4ICgzeDIgc3RvcmUgaW4gNHg0KVxuICAgICAqIEByZXR1cm5zIHRydWUgaXMgdGhlIG1hdHJpeCBpcyB0aGUgaWRlbnRpdHkgbWF0cml4XG4gICAgICovXG4gICAgZnVuY3Rpb24gaXNJZGVudGl0eUFzM3gyVXBkYXRlKHNlbGYpIHtcbiAgICAgICAgaWYgKHNlbGYuX2lzSWRlbnRpdHkzeDJEaXJ0eSkge1xuICAgICAgICAgICAgc2VsZi5faXNJZGVudGl0eTN4MkRpcnR5ID0gZmFsc2U7XG4gICAgICAgICAgICBpZiAoc2VsZi5fbVswXSAhPT0gMS4wIHx8IHNlbGYuX21bNV0gIT09IDEuMCB8fCBzZWxmLl9tWzE1XSAhPT0gMS4wKSB7XG4gICAgICAgICAgICAgICAgc2VsZi5pc0lkZW50aXR5M3gyID0gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChzZWxmLl9tWzFdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzJdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzNdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzRdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzZdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzddICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzhdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzldICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzEwXSAhPT0gMC4wIHx8XG4gICAgICAgICAgICAgICAgc2VsZi5fbVsxMV0gIT09IDAuMCB8fFxuICAgICAgICAgICAgICAgIHNlbGYuX21bMTJdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzEzXSAhPT0gMC4wIHx8XG4gICAgICAgICAgICAgICAgc2VsZi5fbVsxNF0gIT09IDAuMCkge1xuICAgICAgICAgICAgICAgIHNlbGYuaXNJZGVudGl0eTN4MiA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgc2VsZi5pc0lkZW50aXR5M3gyID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc2VsZi5pc0lkZW50aXR5M3gyO1xuICAgIH1cbiAgICBNYXRyaXguaXNJZGVudGl0eUFzM3gyVXBkYXRlID0gaXNJZGVudGl0eUFzM3gyVXBkYXRlO1xuICAgIC8qKlxuICAgICAqIEdldHMgdGhlIGRldGVybWluYW50IG9mIHRoZSBtYXRyaXhcbiAgICAgKiBAcmV0dXJucyB0aGUgbWF0cml4IGRldGVybWluYW50XG4gICAgICovXG4gICAgZnVuY3Rpb24gZGV0ZXJtaW5hbnQoc2VsZikge1xuICAgICAgICBpZiAoc2VsZi5pc0lkZW50aXR5ID09PSB0cnVlKSB7XG4gICAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgfVxuIC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cbiAgICAgICAgY29uc3QgZGV0ID0gbTAwICogY29mYWN0XzAwICsgbTAxICogY29mYWN0XzAxICsgbTAyICogY29mYWN0XzAyICsgbTAzICogY29mYWN0XzAzO1xuICAgICAgICBpZiAoZGV0ID09PSAwKSB7XG4gICAgICAgICAgICBjb3B5KHNvdXJjZSwgcmVzdWx0KTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBkZXRJbnYgPSAxIC8gZGV0O1xuICAgICAgICBjb25zdCBkZXRfMTJfMzMgPSBtMTIgKiBtMzMgLSBtMzIgKiBtMTM7XG4gICAgICAgIGNvbnN0IGRldF8xMV8zMyA9IG0xMSAqIG0zMyAtIG0zMSAqIG0xMztcbiAgICAgICAgY29uc3QgZGV0XzExXzMyID0gbTExICogbTMyIC0gbTMxICogbTEyO1xuICAgICAgICBjb25zdCBkZXRfMTBfMzMgPSBtMTAgKiBtMzMgLSBtMzAgKiBtMTM7XG4gICAgICAgIGNvbnN0IGRldF8xMF8zMiA9IG0xMCAqIG0zMiAtIG0zMCAqIG0xMjtcbiAgICAgICAgY29uc3QgZGV0XzEwXzMxID0gbTEwICogbTMxIC0gbTMwICogbTExO1xuICAgICAgICBjb25zdCBkZXRfMTJfMjMgPSBtMTIgKiBtMjMgLSBtMjIgKiBtMTM7XG4gICAgICAgIGNvbnN0IGRldF8xMV8yMyA9IG0xMSAqIG0yMyAtIG0yMSAqIG0xMztcbiAgICAgICAgY29uc3QgZGV0XzExXzIyID0gbTExICogbTIyIC0gbTIxICogbTEyO1xuICAgICAgICBjb25zdCBkZXRfMTBfMjMgPSBtMTAgKiBtMjMgLSBtMjAgKiBtMTM7XG4gICAgICAgIGNvbnN0IGRldF8xMF8yMiA9IG0xMCAqIG0yMiAtIG0yMCAqIG0xMjtcbiAgICAgICAgY29uc3QgZGV0XzEwXzIxID0gbTEwICogbTIxIC0gbTIwICogbTExO1xuICAgICAgICBjb25zdCBjb2ZhY3RfMTAgPSAtKG0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1bOF0sIG9tOSA9IG90aGVyTVs5XSwgb20xMCA9IG90aGVyTVsxMF0sIG9tMTEgPSBvdGhlck1bMTFdO1xuICAgICAgICBjb25zdCBvbTEyID0gb3RoZXJNWzEyXSwgb20xMyA9IG90aGVyTVsxM10sIG9tMTQgPSBvdGhlck1bMTRdLCBvbTE1ID0gb3RoZXJNWzE1XTtcbiAgICAgICAgLy8gdHNsaW50OmVuYWJsZTpvbmUtdmFyaWFibGUtcGVyLWRlY2xhcmF0aW9uXG4gICAgICAgIHJlc3VsdFtvZmZzZXRdID0gdG0wICogb20wICsgdG0xICogb200ICsgdG0yICogb204ICsgdG0zICogb20xMjtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDFdID0gdG0wICogb20xICsgdG0xICogb201ICsgdG0yICogb205ICsgdG0zICogb20xMztcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDJdID0gdG0wICogb20yICsgdG0xICogb202ICsgdG0yICogb20xMCArIHRtMyAqIG9tMTQ7XG4gICAgICAgIHJlc3VsdFtvZmZzZXQgKyAzXSA9IHRtMCAqIG9tMyArIHRtMSAqIG9tNyArIHRtMiAqIG9tMTEgKyB0bTMgKiBvbTE1O1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgNF0gPSB0bTQgKiBvbTAgKyB0bTUgKiBvbTQgKyB0bTYgKiBvbTggKyB0bTcgKiBvbTEyO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgNV0gPSB0bTQgKiBvbTEgKyB0bTUgKiBvbTUgKyB0bTYgKiBvbTkgKyB0bTcgKiBvbTEzO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgNl0gPSB0bTQgKiBvbTIgKyB0bTUgKiBvbTYgKyB0bTYgKiBvbTEwICsgdG03ICogb20xNDtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDddID0gdG00ICogb20zICsgdG01ICogb203ICsgdG02ICogb20xMSArIHRtNyAqIG9tMTU7XG4gICAgICAgIHJlc3VsdFtvZmZzZXQgKyA4XSA9IHRtOCAqIG9tMCArIHRtOSAqIG9tNCArIHRtMTAgKiBvbTggKyB0bTExICogb20xMjtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDldID0gdG04ICogb20xICsgdG05ICogb201ICsgdG0xMCAqIG9tOSArIHRtMTEgKiBvbTEzO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgMTBdID0gdG04ICogb20yICsgdG05ICogb202ICsgdG0xMCAqIG9tMTAgKyB0bTExICogb20xNDtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDExXSA9IHRtOCAqIG9tMyArIHRtOSAqIG9tNyArIHRtMTAgKiBvbTExICsgdG0xMSAqIG9tMTU7XG4gICAgICAgIHJlc3VsdFtvZmZzZXQgKyAxMl0gPSB0bTEyICogb20wICsgdG0xMyAqIG9tNCArIHRtMTQgKiBvbTggKyB0bTE1ICogb20xMjtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDEzXSA9IHRtMTIgKiBvbTEgKyB0bTEzICogb201ICsgdG0xNCAqIG9tOSArIHRtMTUgKiBvbTEzO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgMTRdID0gdG0xMiAqIG9tMiArIHRtMTMgKiBvbTYgKyB0bTE0ICogb20xMCArIHRtMTUgKiBvbTE0O1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgMTVdID0gdG0xMiAqIG9tMyArIHRtMTMgKiBvbTcgKyB0bTE0ICogb20xMSArIHRtMTUgKiBvbTE1O1xuICAgIH1cbiAgICBNYXRyaXgubXVsdGlwbHlUb0FycmF5ID0gbXVsdGlwbHlUb0FycmF5O1xuICAgIC8qKlxuICAgICAqIENoZWNrIGVxdWFsaXR5IGJldHdlZW4gc2VsZiBtYXRyaXggYW5kIGEgc2Vjb25kIG9uZVxuICAgICAqIEBwYXJhbSB2YWx1ZSAtIGRlZmluZXMgdGhlIHNlY29uZCBtYXRyaXggdG8gY29tcGFyZVxuICAgICAqIEByZXR1cm5zIHRydWUgaXMgdGhlIGN1cnJlbnQgbWF0cml4IGFuZCB0aGUgZ2l2ZW4gb25lIHZhbHVlcyBhcmUgc3RyaWN0bHkgZXF1YWxcbiAgICAgKi9cbiAgICBmdW5jdGlvbiBlcXVhbHMoc2VsZiwgdmFsdWUpIHtcbiAgICAgICAgY29uc3Qgb3RoZXIgPSB2YWx1ZTtcbiAgICAgICAgaWYgKCFvdGhlcikge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIGlmIChzZWxmLmlzSWRlbnRpdHkgfHwgb3RoZXIuaXNJZGVudGl0eSkge1xuICAgICAgICAgICAgaWYgKCFzZWxmLl9pc0lkZW50aXR5RGlydHkgJiYgIW90aGVyLl9pc0lkZW50aXR5RGlydHkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gc2VsZi5pc0lkZW50aXR5ICYmIG90aGVyLmlzSWRlbnRpdHk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgbSA9IHNlbGYuX207XG4gICAgICAgIGNvbnN0IG9tID0gb3RoZXIuX207XG4gICAgICAgIHJldHVybiAobVswXSA9PT0gb21bMF0gJiZcbiAgICAgICAgICAgIG1bMV0gPT09IG9tWzFdICYmXG4gICAgICAgICAgICBtWzJdID09PSBvbVsyXSAmJlxuICAgICAgICAgICAgbVszXSA9PT0gb21bM10gJiZcbiAgICAgICAgICAgIG1bNF0gPT09IG9tWzRdICYmXG4gICAgICAgICAgICBtWzVdID09PSBvbVs1XSAmJlxuICAgICAgICAgICAgbVs2XSA9PT0gb21bNl0gJiZcbiAgICAgICAgICAgIG1bN10gPT09IG9tWzddICYmXG4gICAgICAgICAgICBtWzhdID09PSBvbVs4XSAmJlxuICAgICAgICAgICAgbVs5XSA9PT0gb21bOV0gJiZcbiAgICAgICAgICAgIG1bMTBdID09PSBvbVsxMF0gJiZcbiAgICAgICAgICAgIG1bMTFdID09PSBvbVsxMV0gJiZcbiAgICAgICAgICAgIG1bMTJd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AgICAgcm90YXRpb24ueiA9IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBtID0gc2VsZi5fbTtcbiAgICAgICAgaWYgKHRyYW5zbGF0aW9uKSB7XG4gICAgICAgICAgICB0cmFuc2xhdGlvbi54ID0gbVsxMl07XG4gICAgICAgICAgICB0cmFuc2xhdGlvbi55ID0gbVsxM107XG4gICAgICAgICAgICB0cmFuc2xhdGlvbi56ID0gbVsxNF07XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgdXNlZFNjYWxlID0gc2NhbGUgfHwgVmVjdG9yMy5aZXJvKCk7XG4gICAgICAgIHVzZWRTY2FsZS54ID0gTWF0aC5zcXJ0KG1bMF0gKiBtWzBdICsgbVsxXSAqIG1bMV0gKyBtWzJdICogbVsyXSk7XG4gICAgICAgIHVzZWRTY2FsZS55ID0gTWF0aC5zcXJ0KG1bNF0gKiBtWzRdICsgbVs1XSAqIG1bNV0gKyBtWzZdICogbVs2XSk7XG4gICAgICAgIHVzZWRTY2FsZS56ID0gTWF0aC5zcXJ0KG1bOF0gKiBtWzhdICsgbVs5XSAqIG1bOV0gKyBtWzEwXSAqIG1bMTBdKTtcbiAgICAgICAgaWYgKGRldGVybWluYW50KHNlbGYpIDw9IDApIHtcbiAgICAgICAgICAgIHVzZWRTY2FsZS55ICo9IC0xO1xuICAgICAgICB9XG4gICAgICAgIGlmICh1c2VkU2NhbGUueCA9PT0gMCB8fCB1c2VkU2NhbGUueSA9PT0gMCB8fCB1c2VkU2NhbGUueiA9PT0gMCkge1xuICAgICAgICAgICAgaWYgKHJvdGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgcm90YXRpb24udyA9IDE7XG4gICAgICAgICAgICAgICAgcm90YXRpb24ueCA9IDA7XG4gICAgICAgICAgICAgICAgcm90YXRpb24ueSA9IDA7XG4gICAgICAgICAgICAgICAgcm90YXRpb24ueiA9IDA7XG4gICAgICA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ZvcndhcmQpO1xuICAgICAgICBjb25zdCByaWdodCA9IFZlY3RvcjMubm9ybWFsaXplKFZlY3RvcjMuY3Jvc3ModXAsIGZvcndhcmROZXcpKTtcbiAgICAgICAgY29uc3QgdXBOZXcgPSBWZWN0b3IzLmNyb3NzKGZvcndhcmROZXcsIHJpZ2h0KTtcbiAgICAgICAgY29uc3QgbTAwID0gcmlnaHQueDtcbiAgICAgICAgY29uc3QgbTAxID0gcmlnaHQueTtcbiAgICAgICAgY29uc3QgbTAyID0gcmlnaHQuejtcbiAgICAgICAgY29uc3QgbTEwID0gdXBOZXcueDtcbiAgICAgICAgY29uc3QgbTExID0gdXBOZXcueTtcbiAgICAgICAgY29uc3QgbTEyID0gdXBOZXcuejtcbiAgICAgICAgY29uc3QgbTIwID0gZm9yd2FyZE5ldy54O1xuICAgICAgICBjb25zdCBtMjEgPSBmb3J3YXJkTmV3Lnk7XG4gICAgICAgIGNvbnN0IG0yMiA9IGZvcndhcmROZXcuejtcbiAgICAgICAgY29uc3QgbnVtOCA9IG0wMCArIG0xMSArIG0yMjtcbiAgICAgICAgY29uc3QgcXVhdGVybmlvbiA9IGNyZWF0ZSgpO1xuICAgICAgICBpZiAobnVtOCA+IDApIHtcbiAgICAgICAgICAgIGxldCBudW0gPSBNYXRoLnNxcnQobnVtOCArIDEpO1xuICAgICAgICAgICAgcXVhdGVybmlvbi53ID0gbnVtICogMC41O1xuICAgICAgICAgICAgbnVtID0gMC41IC8gbnVtO1xuICAgICAgICAgICAgcXVhdGVybmlvbi54ID0gKG0xMiAtIG0yMSkgKiBudW07XG4gICAgICAgICAgICBxdWF0ZXJuaW9uLnkgPSAobTIwIC0gbTAyKSAqIG51bTtcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueiA9IChtMDEgLSBtMTApICogbnVtO1xuICAgICAgICAgICAgcmV0dXJuIHF1YXRlcm5pb247XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG0wMCA+PSBtMTEgJiYgbTAwID49IG0yMikge1xuICAgICAgICAgICAgY29uc3QgbnVtNyA9IE1hdGguc3FydCgxICsgbTAwIC0gbTExIC0gbTIyKTtcbiAgICAgICAgICAgIGNvbnN0IG51bTQgPSAwLjUgLyBudW03O1xuICAgICAgICAgICAgcXVhdGVybmlvbi54ID0gMC41ICogbnVtNztcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueSA9IChtMDEgKyBtMTApICogbnVtNDtcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueiA9IChtMDIgKyBtMjApICogbnVtNDtcbiAgICAgICAgICAgIHF1YXRlcm5pb24udyA9IChtMTIgLSBtMjEpICogbnVtNDtcbiAgICAgICAgICAgIHJldHVybiBxdWF0ZXJuaW9uO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtMTEgPiBtMjIpIHtcbiAgICAgICAgICAgIGNvbnN0IG51bTYgPSBNYXRoLnNxcnQoMSArIG0xMSAtIG0wMCAtIG0yMik7XG4gICAgICAgICAgICBjb25zdCBudW0zID0gMC41IC8gbnVtNjtcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueCA9IChtMTAgKyBtMDEpICogbnVtMztcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueSA9IDAuNSAqIG51bTY7XG4gICAgICAgICAgICBxdWF0ZXJuaW9uLnogPSAobTIxICsgbTEyKSAqIG51bTM7XG4gICAgICAgICAgICBxdWF0ZXJuaW9uLncgPSAobTIwIC0gbTAyKSAqIG51bTM7XG4gICAgICAgICAgICByZXR1cm4gcXVhdGVybmlvbjtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBudW01ID0gTWF0aC5zcXJ0KDEgKyBtMjIgLSBtMDAgLSBtMTEpO1xuICAgICAgICBjb25zdCBudW0yID0gMC41IC8gbnVtNTtcbiAgICAgICAgcXVhdGVybmlvbi54ID0gKG0yMCArIG0wMikgKiBudW0yO1xuICAgICAgICBxdWF0ZXJuaW9uLnkgPSAobTIxICsgbTEyKSAqIG51bTI7XG4gICAgICAgIHF1YXRlcm5pb24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ICogcS53O1xuICAgICAgICAvLyBxIHdpbGwgaGF2ZSBhIG1hZ25pdHVkZSBvZiAwLjUgb3IgZ3JlYXRlciBpZiBhbmQgb25seSBpZiBxIGlzIGEgc2luZ3VsYXJpdHkgY2FzZVxuICAgICAgICBjb25zdCB0ZXN0ID0gcS54ICogcS53IC0gcS55ICogcS56O1xuICAgICAgICBpZiAodGVzdCA+IDAuNDk5NSAqIHVuaXQpIHtcbiAgICAgICAgICAgIC8vIHNpbmd1bGFyaXR5IGF0IG5vcnRoIHBvbGVcbiAgICAgICAgICAgIG91dC54ID0gTWF0aC5QSSAvIDI7XG4gICAgICAgICAgICBvdXQueSA9IDIgKiBNYXRoLmF0YW4yKHEueSwgcS54KTtcbiAgICAgICAgICAgIG91dC56ID0gMDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICh0ZXN0IDwgLTAuNDk5NSAqIHVuaXQpIHtcbiAgICAgICAgICAgIC8vIHNpbmd1bGFyaXR5IGF0IHNvdXRoIHBvbGVcbiAgICAgICAgICAgIG91dC54ID0gLU1hdGguUEkgLyAyO1xuICAgICAgICAgICAgb3V0LnkgPSAtMiAqIE1hdGguYXRhbjIocS55LCBxLngpO1xuICAgICAgICAgICAgb3V0LnogPSAwO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgLy8gbm8gc2luZ3VsYXJpdHkgLSBxIGlzIHRoZSBtYWpvcml0eSBvZiBjYXNlc1xuICAgICAgICAgICAgb3V0LnggPSBNYXRoLmFzaW4oMiAqIChxLncgKiBxLnggLSBxLnkgKiBxLnopKTtcbiAgICAgICAgICAgIG91dC55ID0gTWF0aC5hdGFuMigyICogcS53ICogcS55ICsgMiAqIHEueiAqIHEueCwgMSAtIDIgKiAocS54ICogcS54ICsgcS55ICogcS55KSk7XG4gICAgICAgICAgICBvdXQueiA9IE1hdGguYXRhbjIoMiAqIHEudyAqIHEueiArIDIgKiBxLnggKiBxLnksIDEgLSAyICogKHEueiAqIHEue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cnQoMS4wICsgbTExIC0gbTIyIC0gbTMzKTtcbiAgICAgICAgICAgIHJlc3VsdC53ID0gKG0zMiAtIG0yMykgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnggPSAwLjI1ICogcztcbiAgICAgICAgICAgIHJlc3VsdC55ID0gKG0xMiArIG0yMSkgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnogPSAobTEzICsgbTMxKSAvIHM7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAobTIyID4gbTMzKSB7XG4gICAgICAgICAgICBzID0gMi4wICogTWF0aC5zcXJ0KDEuMCArIG0yMiAtIG0xMSAtIG0zMyk7XG4gICAgICAgICAgICByZXN1bHQudyA9IChtMTMgLSBtMzEpIC8gcztcbiAgICAgICAgICAgIHJlc3VsdC54ID0gKG0xMiArIG0yMSkgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnkgPSAwLjI1ICogcztcbiAgICAgICAgICAgIHJlc3VsdC56ID0gKG0yMyArIG0zMikgLyBzO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgcyA9IDIuMCAqIE1hdGguc3FydCgxLjAgKyBtMzMgLSBtMTEgLSBtMjIpO1xuICAgICAgICAgICAgcmVzdWx0LncgPSAobTIxIC0gbTEyKSAvIHM7XG4gICAgICAgICAgICByZXN1bHQueCA9IChtMTMgKyBtMzEpIC8gcztcbiAgICAgICAgICAgIHJlc3VsdC55ID0gKG0yMyArIG0zMikgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnogPSAwLjI1ICogcztcbiAgICAgICAgfVxuICAgIH1cbiAgICBRdWF0ZXJuaW9uLmZyb21Sb3RhdGlvbk1hdHJpeFRvUmVmID0gZnJvbVJvdGF0aW9uTWF0cml4VG9SZWY7XG4gICAgLyoqXG4gICAgICogSW50ZXJwb2xhdGVzIGJldHdlZW4gdHdvIHF1YXRlcm5pb25zXG4gICAgICogQHBhcmFtIGxlZnQgLSBkZWZpbmVzIGZpcnN0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ZWZ0LnkgKiByaWdodC55ICsgbGVmdC56ICogcmlnaHQueiArIGxlZnQudyAqIHJpZ2h0Lnc7XG4gICAgICAgIGxldCBmbGFnID0gZmFsc2U7XG4gICAgICAgIGlmIChudW00IDwgMCkge1xuICAgICAgICAgICAgZmxhZyA9IHRydWU7XG4gICAgICAgICAgICBudW00ID0gLW51bTQ7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG51bTQgPiAwLjk5OTk5OSkge1xuICAgICAgICAgICAgbnVtMyA9IDEgLSBhbW91bnQ7XG4gICAgICAgICAgICBudW0yID0gZmxhZyA/IC1hbW91bnQgOiBhbW91bnQ7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBjb25zdCBudW01ID0gTWF0aC5hY29zKG51bTQpO1xuICAgICAgICAgICAgY29uc3QgbnVtNiA9IDEuMCAvIE1hdGguc2luKG51bTUpO1xuICAgICAgICAgICAgbnVtMyA9IE1hdGguc2luKCgxLjAgLSBhbW91bnQpICogbnVtNSkgKiBudW02O1xuICAgICAgICAgICAgbnVtMiA9IGZsYWdcbiAgICAgICAgICAgICAgICA/IC1NYXRoLnNpbihhbW91bnQgKiBudW01KSAqIG51bTZcbiAgICAgICAgICAgICAgICA6IE1hdGguc2luKGFtb3VudCAqIG51bTUpICogbnVtNjtcbiAgICAgICAgfVxuICAgICAgICByZXN1bHQueCA9IG51bTMgKiBsZWZ0LnggKyBudW0yICogcmlnaHQueDtcbiAgICAgICAgcmVzdWx0LnkgPSBudW0zICogbGVmdC55ICsgbnVtMiAqIHJpZ2h0Lnk7XG4gICAgICAgIHJlc3VsdC56ID0gbnVtMyAqIGxlZnQueiArIG51bTIgKiByaWdodC56O1xuICAgICAgICByZXN1bHQudyA9IG51bTMgKiBsZWZ0LncgKyBudW0yICogcmlnaHQudztcbiAgICB9XG4gICAgUXVhdGVybmlvbi5zbGVycFRvUmVmID0gc2xlcnBUb1JlZjtcbiAgICAvKipcbiAgICAgKiBNdWx0aXBs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HtcbiAgICAgICAgY29uc3QgaW50UiA9ICh2YWx1ZS5yICogMjU1KSB8IDA7XG4gICAgICAgIGNvbnN0IGludEcgPSAodmFsdWUuZyAqIDI1NSkgfCAwO1xuICAgICAgICBjb25zdCBpbnRCID0gKHZhbHVlLmIgKiAyNTUpIHwgMDtcbiAgICAgICAgY29uc3QgaW50QSA9ICh2YWx1ZS5hICogMjU1KSB8IDA7XG4gICAgICAgIHJldHVybiAoJyMnICtcbiAgICAgICAgICAgIFNjYWxhci50b0hleChpbnRSKSArXG4gICAgICAgICAgICBTY2FsYXIudG9IZXgoaW50RykgK1xuICAgICAgICAgICAgU2NhbGFyLnRvSGV4KGludEIpICtcbiAgICAgICAgICAgIFNjYWxhci50b0hleChpbnRBKSk7XG4gICAgfVxuICAgIENvbG9yNC50b0hleFN0cmluZyA9IHRvSGV4U3RyaW5nO1xuICAgIC8qKlxuICAgICAqIENvbXB1dGVzIGEgQ29sb3I0IGNvbnZlcnRlZCBmcm9tIHRoZSBjdXJyZW50IG9uZSB0byBsaW5lYXIgc3BhY2VcbiAgICAgKiBAcmV0dXJucyBjcmVhdGUgbXV0YWJsZSBDb2xvcjRcbiAgICAgKi9cbiAgICBmdW5jdGlvbiB0b0xpbmVhclNwYWNlKHZhbHVlKSB7XG4gICAgICAgIGNvbnN0IGNvbnZlcnRlZENvbG9yID0gY3JlYXRlKCk7XG4gICAgICAgIHRvTGluZWFyU3BhY2VUb1JlZih2YWx1ZSwgY29udmVydGVkQ29sb3IpO1xuICAgICAgICByZXR1cm4gY29udmVydGVkQ29sb3I7XG4gICAgfVxuICAgIENvbG9yNC50b0xpbmVhclNwYWNlID0gdG9MaW5lYXJTcGFjZTtcbiAgICAvKipcbiAgICAgKiBDb252ZXJ0cyB0aGUgQ29sb3I0IHZhbHVlcyB0byBsaW5lYXIgc3BhY2UgYW5kIHN0b3JlcyB0aGUgcmVzdWx0IGluIFwiY29udmVydGVkQ29sb3JcIlxuICAgICAqIEBwYXJhbSBjb252ZX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ICBjb25zdCBwYXRoID0gRm9sbG93UGF0aC5nZXRNdXRhYmxlKGVudGl0eSlcbiAgICAgIHBhdGgubm9ybWFsaXplZFRpbWUgPSBTY2FsYXIuY2xhbXAocGF0aC5ub3JtYWxpemVkVGltZSArIGR0ICogcGF0aC5zcGVlZCwgMCwgMSlcbiAgICAgIGlmIChwYXRoLm5vcm1hbGl6ZWRUaW1lID49IDEpXG4gICAgICAgIGRlYWRQYXRocy5wdXNoKGVudGl0eSlcblxuICAgICAgd2hpbGUgKFxuICAgICAgICBwYXRoLm5vcm1hbGl6ZWRUaW1lID49IHBhdGguc2VnbWVudFRpbWVzW3BhdGguY3VycmVudEluZGV4XSAmJlxuICAgICAgICBwYXRoLmN1cnJlbnRJbmRleCA8IHBhdGgucG9pbnRzLmxlbmd0aCAtIDFcbiAgICAgICkge1xuICAgICAgICBpZiAocGF0aC5mYWNlRGlyZWN0aW9uKSB7XG4gICAgICAgICAgY29uc3QgZGlyZWN0aW9uID0gVmVjdG9yMy5zdWJ0cmFjdChwYXRoLnBvaW50c1twYXRoLmN1cnJlbnRJbmRleCArIDFdLCBwYXRoLnBvaW50c1twYXRoLmN1cnJlbnRJbmRleF0pXG4gICAgICAgICAgdHJhbnNmb3JtLnJvdGF0aW9uID0gUXVhdGVybmlvbi5sb29rUm90YXRpb24oZGlyZWN0aW9uKVxuICAgICAgICB9XG4gICAgICAgIGlmIChwYXRoLmN1cnJlbnRJbmRleCA+IDAgJiYgcGF0aC5jdXJyZW50SW5kZXggJSBwYXRoLmN1cnZlU2VnbWVudENvdW50ID09IDApIHtcbiAgICAgICAgICBjb25zdCBwb2ludEluZGV4ID0gcGF0aC5jdXJyZW50SW5kZXggLyBwYXRoLmN1cnZlU2VnbWVudENvdW50XG4gICAgICAgICAgY29uc3QgcG9pbnRDb29yZHMgPSBwYXRoLnBvaW50c1twYXRoLmN1cnJlbnRJbmRleF1cbiAgICAgICAgICBjb25zdCBuZXh0UG9pbnRDb29yZHMgPSBwYXRoLnB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1cGRhdGUpIHtcbiAgICAgICAgaWYgKHVwZGF0ZS50eXBlID09PSAnZGVsZXRlJyB8fCAhdXBkYXRlLnByb3BzKSB7XG4gICAgICAgICAgICBjbGlja0V2ZW50cy5nZXQoaW5zdGFuY2UuZW50aXR5KT8uZGVsZXRlKGdldFBvaW50ZXJFbnVtKHVwZGF0ZS5jb21wb25lbnQpKTtcbiAgICAgICAgICAgIGlmICh1cGRhdGUuY29tcG9uZW50ID09PSAnb25Nb3VzZURvd24nKSB7XG4gICAgICAgICAgICAgICAgcG9pbnRlckV2ZW50cy5yZW1vdmVPblBvaW50ZXJEb3duKGluc3RhbmNlLmVudGl0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmICh1cGRhdGUuY29tcG9uZW50ID09PSAnb25Nb3VzZVVwJykge1xuICAgICAgICAgICAgICAgIHBvaW50ZXJFdmVudHMucmVtb3ZlT25Qb2ludGVyVXAoaW5zdGFuY2UuZW50aXR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBpZiAodXBkYXRlLnByb3BzKSB7XG4gICAgICAgICAgICBjb25zdCBwb2ludGVyRXZlbnQgPSBnZXRQb2ludGVyRW51bSh1cGRhdGUuY29tcG9uZW50KTtcbiAgICAgICAgICAgIGNvbnN0IGVudGl0eUV2ZW50ID0gY2xpY2tFdmVudHMuZ2V0KGluc3RhbmNlLmVudGl0eSkgfHwgY2xpY2tFdmVudHMuc2V0KGluc3RhbmNlLmVudGl0eSwgbmV3IE1hcCgpKS5nZXQoaW5zdGFuY2UuZW50aXR5KTtcbiAgICAgICAgICAgIGNvbnN0IGFscmVhZHlIYXNQb2ludGVyRXZlbnQgPSBlbnRpdHlFdmVudC5nZXQocG9pbnRlckV2ZW50KTtcbiAgICAgICAgICAgIGVudGl0eUV2ZW50LnNldChwb2ludGVyRXZlbnQsIHVwZGF0ZS5wcm9wcyk7XG4gICAgICAgICAgICBpZiAoYWxyZWFkeUhhc1BvaW50ZXJFdmVudClcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICBjb25zdCBwb2ludGVyRXZlbnRTeXN0ZW0gPSB1cGRhdGUuY29tcG9uZW50ID09PSAnb25Nb3VzZURvd24nID8gcG9pbnRlckV2ZW50cy5vblBvaW50ZXJEb3duIDogcG9pbnRlckV2ZW50cy5vblBvaW50ZXJVcDtcbiAgICAgICAgICAgIHBvaW50ZXJFdmVudFN5c3RlbShpbnN0YW5jZS5lbnRpdHksICgpID0+IHBvaW50ZXJFdmVudENhbGxiYWNrKGluc3RhbmNlLmVudGl0eSwgcG9pbnRlckV2ZW50KSwge1xuICAgICAgICAgICAgICAgIGJ1dHRvbjogMCAvKiBJbnB1dEFjdGlvbi5JQV9QT0lOVEVSICovLFxuICAgICAgICAgICAgICAgIC8vIFdlIGFkZCB0aGlzIHNob3dGZWVkQmFjayBzbyB0aGUgcG9pbnRlckV2ZW50U3lzdGVtIGNyZWF0ZXMgYSBQb2ludGVyRXZlbnQgY29tcG9uZW50IHdpdGggb3VyIGVudGl0eVxuICAgICAgICAgICAgICAgIC8vIFRoaXMgaXMgbmVlZGVkIGZvciB0aGUgcmVuZGVyZXIgdG8ga25vdyB3aGljaCBlbnRpdGllcyBhcmUgY2xpY2tlYWJsZXNcbiAgICAgICAgICAgICAgICBzaG93RmVlZGJhY2s6IHRydWVcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJlbW92ZUNvbXBvbmVudChpbnN0YW5jZSwgY29tcG9uZW50KSB7XG4gICAgICAgIGNvbnN0IGNvbXBvbmVudElkID0gZ2V0Q29tcG9uZW50SWRbY29tcG9uZW50XTtcbiAgICAgICAgY29uc3QgQ29tcG9uZW50ID0gZW5naW5lLmdldENvbXBvbmVudChjb21wb25lbnRJZCk7XG4gICAgICAgIENvbXBvbmVudC5kZWxldGVGcm9tKGluc3RhbmNlLmVudGl0eSk7X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XQgfSk7XG4gICAgfVxuICAgIGNvbnN0IGhvc3RDb25maWcgPSB7XG4gICAgICAgIC4uLm5vb3BDb25maWcsXG4gICAgICAgIGNyZWF0ZUluc3RhbmNlKHR5cGUsIHByb3BzKSB7XG4gICAgICAgICAgICBjb25zdCBlbnRpdHkgPSBlbmdpbmUuYWRkRW50aXR5KCk7XG4gICAgICAgICAgICBlbnRpdGllcy5hZGQoZW50aXR5KTtcbiAgICAgICAgICAgIGNvbnN0IGluc3RhbmNlID0ge1xuICAgICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgICBfY2hpbGQ6IFtdLFxuICAgICAgICAgICAgICAgIHBhcmVudDogQ0FOVkFTX1JPT1RfRU5USVRZLFxuICAgICAgICAgICAgICAgIHJpZ2h0T2Y6IHVuZGVmaW5lZFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGZvciAoY29uc3Qga2V5IGluIHByb3BzKSB7XG4gICAgICAgICAgICAgICAgY29uc3Qga2V5VHlwZWQgPSBrZXk7XG4gICAgICAgICAgICAgICAgaWYgKGtleVR5cGVkID09PSAnY2hpbGRyZW4nIHx8IGtleVR5cGVkID09PSAna2V5Jykge1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGlzTGlzdGVuZXIoa2V5VHlwZWQpKSB7XG4gICAgICAgICAgICAgICAgICAgIHVwc2VydExpc3RlbmVyKGluc3RhbmNlLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAnYWRkJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb3BzOiBwcm9wc1trZXlUeXBlZF0sXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQ6IGtleVR5cGVkXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdXBzZXJ0Q29tcG9uZW50KGluc3RhbmNlLCBwcm9wc1trZXlUeXBlZF0sIGtleVR5cGVkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gaW5zdGFuY2U7XG4gICAgICAgIH0sXG4gICAgICAgIGFwcGVuZENoaWxkLFxuICAgICAgICBhcHBlbmRDaGlsZFRvQ29udGFpbmVyOiBhcHBlbmRDaGlsZCxcbiAgICAgICAgYXBwZW5kSW5pdGlhbENoaWxkOiBhcHBlbmRDaGlsZCxcbiAgICAgICAgcmVtb3ZlQ2hpbGQ6IHJlbW92ZUNoaWxkLFxuICAgICAgICBwcmVwYXJlVXBkYXRlKF9pbnN0YW5jZSwgX3R5cGUsIG9sZFByb3BzLCBuZXdQcm9wcykge1xuICAgICAgICAgICAgcmV0dXJuIGNvbXBvbmVudEtleXNcbiAgICAgICAgICAgICAgICAubWFwKChjb21wb25lbnQpID0+IHByb3BzQ2hhbmdlZChjb21wb25lbnQsIG9sZFByb3BzW2NvbXBvbmVudF0sIG5ld1Byb3BzW2NvbXBvbmVudF0pKVxuICAgICAgICAgICAgICAgIC5maWx0ZXIoaXNOb3RVbmRlZmluZWQpO1xuICAgICAgICB9LFxuICAgICAgICBjb21taXRVcGRhdGUoaW5zdGFuY2UsIHVwZGF0ZVBheWxvYWQsIF90eXBlLCBfcHJldlByb3BzLCBfbmV4dFByb3BzLCBfaW50ZXJuYWxIYW5kbGUpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3QgdXBkYXRlIG9mIHVwZGF0ZVBheWxvYWQpIHtcbiAgICAgICAgICAgICAgICBpZiAoaXNMaXN0ZW5lcih1cGRhdGUuY29tcG9uZW50KSkge1xuICAgICAgICAgICAgICAgICAgICB1cHNlcnRMaXN0ZW5lcihpbnN0YW5jZSwgdXBkYXRlKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh1cGRhdGUudHlwZSA9PT0gJ2RlbGV0ZScpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVtb3ZlQ29tcG9uZW50KGluc3RhbmNlLCB1cGRhdGUuY29tcG9uZW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAodXBkYXRlLnByb3BzKSB7XG4gICAgICAgICAgICAgICAgICAgIHVwc2VydENvbXBvbmVudChpbnN0YW5jZSwgdXBkYXRlLnByb3BzLCB1cGRhdGUuY29tcG9uZW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGluc2VydEJlZm9yZShwYXJlbnRJbnN0YW5jZSwgY2hpbGQsIGJlZm9yZUNoaWxkKSB7XG4gICAgICAgICAgICBjb25zdCBiZWZvcmVDaGlsZEluZGV4ID0gcGFyZW50SW5zdGFuY2UuX2NoaWxkLmZpbmRJbmRleCgoYykgPT4gYy5lbnRpdHkgPT09IGJlZm9yZUNoaWxkLmVudGl0eSk7XG4gICAgICAgICAgICBwYXJlbnRJbnN0YW5jZS5fY2hpbGQgPSBbXG4gICAgICAgICAgICAgICAgLi4ucGFyZW50SW5zdGFuY2UuX2NoaWxkLnNsaWNlKDAsIGJlZm9yZUNoaWxkSW5kZXgpLFxuICAgICAgICAgICAgICAgIGNoaWxkLFxuICAgICAgICAgICAgICAgIC4uLnBhcmVudEluc3RhbmNlLl9jaGlsZC5zbGljZShiZWZvcmVDaGlsZEluZGV4KVxuICAgICAgICAgICAgXTtcbiAgICAgICAgICAgIGNoaWxkLnJpZ2h0T2YgPSBiZWZvcmVDaGlsZC5yaWdodE9mO1xuICAgICAgICAgICAgYmVmb3JlQ2hpbGQucmlnaHRPZiA9IGNoaWxkLmVudGl0eTtcbiAgICAgICAgICAgIGNoaWxkLnBhcmVudCA9IHBhcmVudEluc3RhbmNlLmVudGl0eTtcbiAgICAgICAgICAgIHVwZGF0ZVRyZWUoY2hpbGQsIH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h0LnRleHRBbGlnbilcbiAgICAgICAgfVxuICAgIH07XG4gICAgcmV0dXJuIFJlYWN0RWNzLmNyZWF0ZUVsZW1lbnQoXCJlbnRpdHlcIiwgeyAuLi5wYXJzZVByb3BzKHByb3BzKSwgLi4udWlUZXh0IH0pO1xufVxuIiwgImltcG9ydCB7IGlzTGlzdGVuZXIgfSBmcm9tICcuLi9jb21wb25lbnRzJztcbmV4cG9ydCBmdW5jdGlvbiBwcm9wc0NoYW5nZWQoY29tcG9uZW50LCBwcmV2UHJvcHMsIG5leHRQcm9wcykge1xuICAgIGlmIChwcmV2UHJvcHMgJiYgIW5leHRQcm9wcykge1xuICAgICAgICByZXR1cm4geyB0eXBlOiAnZGVsZXRlJywgY29tcG9uZW50IH07XG4gICAgfVxuICAgIGlmICghbmV4dFByb3BzKSB7XG4gICAgICAgIHJldHVybjtcbiAgICB9XG4gICAgaWYgKCFwcmV2UHJvcHMgJiYgbmV4dFByb3BzKSB7XG4gICAgICAgIHJldHVybiB7IHR5cGU6ICdhZGQnLCBwcm9wczogbmV4dFByb3BzLCBjb21wb25lbnQgfTtcbiAgICB9XG4gICAgaWYgKGlzTGlzdGVuZXIoY29tcG9uZW50KSkge1xuICAgICAgICBpZiAoIWlzRXF1YWwocHJldlByb3BzLCBuZXh0UHJvcHMpKSB7XG4gICAgICAgICAgICByZXR1cm4geyB0eXBlOiAncHV0JywgY29tcG9uZW50LCBwcm9wczogbmV4dFByb3BzIH07XG4gICAgICAgIH1cbiAgICB9XG4gICAgY29uc3QgY2hhbmdlcyA9IHt9O1xuICAgIGZvciAoY29uc3QgayBpbiBwcmV2UHJvcHMpIHtcbiAgICAgICAgY29uc3QgcHJvcEtleSA9IGs7XG4gICAgICAgIGlmICghaXNFcXVhbChwcmV2UHJvcHNbcHJvcEtleV0sIG5leHRQcm9wc1twcm9wS2V5XSkpIHtcbiAgICAgICAgICAgIGNoYW5nZXNbcHJvcEtleV0gPSBuZXh0UHJvcHNbcHJvcEtleV07XG4gICA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NjaGVtYXMuT3B0aW9uYWwoU2NoZW1hcy5JbnQpLFxuICAgICAgICAgICAgICB0eXBlOiBTY2hlbWFzLkVudW1TdHJpbmc8VHJpZ2dlckNvbmRpdGlvblR5cGU+KFxuICAgICAgICAgICAgICAgIFRyaWdnZXJDb25kaXRpb25UeXBlLFxuICAgICAgICAgICAgICAgIFRyaWdnZXJDb25kaXRpb25UeXBlLldIRU5fU1RBVEVfSVMsXG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgIHZhbHVlOiBTY2hlbWFzLlN0cmluZyxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICksXG4gICAgICAgICksXG4gICAgICAgIG9wZXJhdGlvbjogU2NoZW1hcy5PcHRpb25hbChcbiAgICAgICAgICBTY2hlbWFzLkVudW1TdHJpbmc8VHJpZ2dlckNvbmRpdGlvbk9wZXJhdGlvbj4oXG4gICAgICAgICAgICBUcmlnZ2VyQ29uZGl0aW9uT3BlcmF0aW9uLFxuICAgICAgICAgICAgVHJpZ2dlckNvbmRpdGlvbk9wZXJhdGlvbi5BTkQsXG4gICAgICAgICAgKSxcbiAgICAgICAgKSxcbiAgICAgICAgYWN0aW9uczogU2NoZW1hcy5BcnJheShcbiAgICAgICAgICBTY2hlbWFzLk1hcCh7XG4gICAgICAgICAgICBpZDogU2NoZW1hcy5PcHRpb25hbChTY2hlbWFzLkludCksXG4gICAgICAgICAgICBuYW1lOiBTY2hlbWFzLk9wdGlvbmFsKFNjaGVtYXMuU3RyaW5nKSxcbiAgICAgICAgICB9KSxcbiAgICAgICAgKSxcbiAgICAgIH0pLFxuICAgICksXG4gIH0pXG5cbiAgY29uc3QgU3RhdGVzID0gZW5naW5lLmRlZmluZUNvbXBvbmVudChDb21wb25lbnROYW1lLlNUQVRFUywge1xuICAgIGlkOiBTY2hlbWFzLk51bWJlcixcbiAgICB2YWx1ZTogU2NoZW1hcy5BcnJheShTY2hlbWFzLlN0cmluZyksXG4gICAgZGVmYXVsdFZhbHVlOiBT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icmVha1xuICAgICAgICB9XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgYnJlYWtcbiAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBiaW5kIGFjdGlvbnNcbiAgICBjb25zdCBhY3Rpb25FdmVudHMgPSBnZXRBY3Rpb25FdmVudHMoZW50aXR5KVxuICAgIGZvciAoY29uc3QgYWN0aW9uIG9mIGFjdGlvbnMudmFsdWUpIHtcbiAgICAgIGFjdGlvbkV2ZW50cy5vbihhY3Rpb24ubmFtZSwgKCkgPT4ge1xuICAgICAgICBzd2l0Y2ggKGFjdGlvbi50eXBlKSB7XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlBMQVlfQU5JTUFUSU9OOiB7XG4gICAgICAgICAgICBoYW5kbGVQbGF5QW5pbWF0aW9uKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5QTEFZX0FOSU1BVElPTj4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TVE9QX0FOSU1BVElPTjoge1xuICAgICAgICAgICAgaGFuZGxlU3RvcEFuaW1hdGlvbihcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RPUF9BTklNQVRJT04+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU0VUX1NUQVRFOiB7XG4gICAgICAgICAgICBoYW5kbGVTZXRTdGF0ZShlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TRVRfU1RBVEU+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU1RBUlRfVFdFRU46IHtcbiAgICAgICAgICAgIGhhbmRsZVN0YXJ0VHdlZW4oZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RBUlRfVFdFRU4+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU0VUX0NPVU5URVI6IHtcbiAgICAgICAgICAgIGhhbmRsZVNldENvdW50ZXIoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU0VUX0NPVU5URVI+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuSU5DUkVNRU5UX0NPVU5URVI6IHtcbiAgICAgICAgICAgIGhhbmRsZUluY3JlbWVudENvdW50ZXIoXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLklOQ1JFTUVOVF9DT1VOVEVSPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLkRFQ1JFQVNFX0NPVU5URVI6IHtcbiAgICAgICAgICAgIGhhbmRsZURlY3JlYXNlQ291bnRlcihcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuREVDUkVBU0VfQ09VTlRFUj4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5QTEFZX1NPVU5EOiB7XG4gICAgICAgICAgICBoYW5kbGVQbGF5U291bmQoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuUExBWV9TT1VORD4oYWN0aW9uKSlcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TVE9QX1NPVU5EOiB7XG4gICAgICAgICAgICBoYW5kbGVTdG9wU291bmQoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RPUF9TT1VORD4oYWN0aW9uKSlcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TRVRfVklTSUJJTElUWToge1xuICAgICAgICAgICAgaGFuZGxlU2V0VmlzaWJpbGl0eShcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU0VUX1ZJU0lCSUxJVFk+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuQVRUQUNIX1RPX1BMQVlFUjoge1xuICAgICAgICAgICAgaGFuZGxlQXR0YWNoVG9QbGF5ZXIoXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLkFUVEFDSF9UT19QTEFZRVI+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuREVUQUNIX0ZST01fUExBWUVSOiB7XG4gICAgICAgICAgICBoYW5kbGVEZXRhY2hGcm9tUGxheWVyKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5ERVRBQ0hfRlJPTV9QTEFZRVI+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuUExBWV9WSURFT19TVFJFQU06IHtcbiAgICAgICAgICAgIGhhbmRsZVBsYXlWaWRlbyhcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuUExBWV9WSURFT19TVFJFQU0+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU1RPUF9WSURFT19TVFJFQU06IHtcbiAgICAgICAgICAgIGhhbmRsZVN0b3BWaWRlbyhcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RPUF9WSURFT19TVFJFQU0+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuUExBWV9BVURJT19TVFJFQU06IHtcbiAgICAgICAgICAgIGhhbmRsZVBsYXlBdWRpb1N0cmVhbShcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuUExBWV9BVURJT19TVFJFQU0+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU1RPUF9BVURJT19TVFJFQU06IHtcbiAgICAgICAgICAgIGhhbmRsZVN0b3BBdWRpb1N0cmVhbShcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RPUF9BVURJT19TVFJFQU0+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuVEVMRVBPUlRfUExBWUVSOiB7XG4gICAgICAgICAgICBoYW5kbGVUZWxlcG9ydFBsYXllcihcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuVEVMRVBPUlRfUExBWUVSPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLk1PVkVfUExBWUVSOiB7XG4gICAgICAgICAgICBoYW5kbGVNb3ZlUGxheWVyKGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLk1PVkVfUExBWUVSPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlBMQVlfREVGQVVMVF9FTU9URToge1xuICAgICAgICAgICAgaGFuZGxlUGxheURlZmF1bHRFbW90ZShcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuUExBWV9ERUZBVUxUX0VNT1RFPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlBMQVlfQ1VTVE9NX0VNT1RFOiB7XG4gICAgICAgICAgICBoYW5kbGVQbGF5Q3VzdG9tRW1vdGUoXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlBMQVlfQ1VTVE9NX0VNT1RFPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLk9QRU5fTElOSzoge1xuICAgICAgICAgICAgaGFuZGxlT3BlbkxpbmsoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuT1BFTl9MSU5LPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNIT1dfVEVYVDoge1xuICAgICAgICAgICAgaGFuZGxlU2hvd1RleHQoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU0hPV19URVhUPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLkhJREVfVEVYVDoge1xuICAgICAgICAgICAgaGFuZGxlSGlkZVRleHQoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuSElERV9URVhUPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNUQVJUX0RFTEFZOiB7XG4gICAgICAgICAgICBoYW5kbGVTdGFydERlbGF5KGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlNUQVJUX0RFTEFZPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNUT1BfREVMQVk6IHtcbiAgICAgICAgICAgIGhhbmRsZVN0b3BEZWxheShlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TVE9QX0RFTEFZPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNUQVJUX0xPT1A6IHtcbiAgICAgICAgICAgIGhhbmRsZVN0YXJ0TG9vcChlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TVEFSVF9MT09QPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNUT1BfTE9PUDoge1xuICAgICAgICAgICAgaGFuZGxlU3RvcExvb3AoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RPUF9MT09QPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLkNMT05FX0VOVElUWToge1xuICAgICAgICAgICAgaGFuZGxlQ2xvbmVFbnRpdHkoXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLkNMT05FX0VOVElUWT4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5SRU1PVkVfRU5USVRZOiB7XG4gICAgICAgICAgICBoYW5kbGVSZW1vdmVFbnRpdHkoXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlJFTU9WRV9FTlRJVFk+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU0hPV19JTUFHRToge1xuICAgICAgICAgICAgaGFuZGxlU2hvd0ltYWdlKGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlNIT1dfSU1BR0U+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuSElERV9JTUFHRToge1xuICAgICAgICAgICAgaGFuZGxlSGlkZUltYWdlKGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLkhJREVfSU1BR0U+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgYnJlYWtcbiAgICAgIC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HtcbiAgICAgICAgICAgICAgICBjb25zdCBhY3Rpb25zID0gQWN0aW9ucy5nZXRPck51bGwoZW50aXR5KVxuICAgICAgICAgICAgICAgIGlmIChhY3Rpb25zKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdCBhY3Rpb24gPSBhY3Rpb25zLnZhbHVlLmZpbmQoXG4gICAgICAgICAgICAgICAgICAgICgkKSA9PiAkLm5hbWUgPT09IHRyaWdnZXJBY3Rpb24ubmFtZSxcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgIGlmIChhY3Rpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gYWN0aW9ucyBhcmUgZW5xdWV1ZWQgdG8gYmUgZXhlY3V0ZWQgb24gdGhlIG5leHQgdGljayBhZnRlciBhbGwgdGhlIHRyaWdnZXJzIGhhdmUgYmVlbiBwcm9jZXNzZWQsXG4gICAgICAgICAgICAgICAgICAgIC8vIHRoaXMgaXMgdG8gYXZvaWQgb25lIHRyaWdnZXIgbWVzc2luZyB3aXRoIG90aGVyIHRyaWdnZXIncyBjb25kaXRpb25zXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvblF1ZXVlLnB1c2goeyBlbnRpdHksIGFjdGlvbiB9KVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSlcbiAgICB9XG4gICAgdHJpZ2dlckV2ZW50cy5lbWl0KFRyaWdnZXJUeXBlLk9OX1NQQVdOKVxuXG4gICAgaW5pdGVkRW50aXRpZXMuYWRkKGVudGl0eSlcbiAgfVxuXG4gIGZ1bmN0aW9uIGlzVmFsaWRBY3Rpb24oYWN0aW9uOiBUcmlnZ2VyQWN0aW9uKSB7XG4gICAgY29uc3QgeyBpZCwgbmFtZSB9ID0gYWN0aW9uXG4gICAgcmV0dXJuICEhaWQgJiYgISFuYW1lXG4gIH1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GUpIHtcbiAgICAgICAgICBjYXNlIFRyaWdnZXJDb25kaXRpb25UeXBlLldIRU5fU1RBVEVfSVM6IHtcbiAgICAgICAgICAgIGNvbnN0IHN0YXRlcyA9IFN0YXRlcy5nZXRPck51bGwoZW50aXR5KVxuICAgICAgICAgICAgaWYgKHN0YXRlcyAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBjb25zdCBjdXJyZW50VmFsdWUgPSBnZXRDdXJyZW50VmFsdWUoc3RhdGVzKVxuICAgICAgICAgICAgICByZXR1cm4gY3VycmVudFZhbHVlID09PSBjb25kaXRpb24udmFsdWVcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgVHJpZ2dlckNvbmRpdGlvblR5cGUuV0hFTl9TVEFURV9JU19OT1Q6IHtcbiAgICAgICAgICAgIGNvbnN0IHN0YXRlcyA9IFN0YXRlcy5nZXRPck51bGwoZW50aXR5KVxuICAgICAgICAgICAgaWYgKHN0YXRlcyAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBjb25zdCBjdXJyZW50VmFsdWUgPSBnZXRDdXJyZW50VmFsdWUoc3RhdGVzKVxuICAgICAgICAgICAgICByZXR1cm4gY3VycmVudFZhbHVlICE9PSBjb25kaXRpb24udmFsdWVcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgVHJpZ2dlckNvbmRpdGlvblR5cGUuV0hFTl9DT1VOVEVSX0VRVUFMUzoge1xuICAgICAgICAgICAgY29uc3QgY291bnRlciA9IENvdW50ZXIuZ2V0T3JOdWxsKGVudGl0eSlcbiAgICAgICAgICAgIGlmIChjb3VudGVyICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIGNvbnN0IG51bWVyaWMgPSBOdW1iZXIoY29uZGl0aW9uLnZhbHVlKVxuICAgICAgICAgICAgICBpZiAoIWlzTmFOKG51bWVyaWMpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvdW50ZXIudmFsdWUgPT09IG51bWVyaWNcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBUcmlnZ2VyQ29uZGl0aW9uVHlwZS5XSEVOX0NPVU5URVJfSVNfR1JFQVRFUl9USEFOOiB7XG4gICAgICAgICAgICBjb25zdCBjb3VudGVyID0gQ291bnRlci5nZXRPck51bGwoZW50aXR5KVxuICAgICAgICAgICAgaWYgKGNvdW50ZXIgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgY29uc3QgbnVtZXJpYyA9IE51bWJlcihjb25kaXRpb24udmFsdWUpXG4gICAgICAgICAgICAgIGlmICghaXNOYU4obnVtZXJpYykpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY291bnRlci52YWx1ZSA+IG51bWVyaWNcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBUcmlnZ2VyQ29uZGl0aW9uVHlwZS5XSEVOX0NPVU5URVJfSVNfTEVTU19USEFOOiB7XG4gICAgICAgICAgICBjb25zdCBjb3VudGVyID0gQ291bnRlci5nZXRPck51bGwoZW50aXR5KVxuICAgICAgICAgICAgaWYgKGNvdW50ZXIgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgY29uc3QgbnVtZXJpYyA9IE51bWJlcihjb25kaXRpb24udmFsdWUpXG4gICAgICAgICAgICAgIGlmICghaXNOYU4obnVtZXJpYykpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY291bnRlci52YWx1ZSA8IG51bWVyaWNcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAg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7XG4gICAgY29uc3QgY29tcG9uZW50TmFtZSA9IE9iamVjdC52YWx1ZXMoQ29tcG9uZW50TmFtZSlcbiAgICAgIC5tYXAoKGNvbXBvbmVudE5hbWUpID0+ICh7XG4gICAgICAgIGNvbXBvbmVudE5hbWUsXG4gICAgICAgIGNvbmRpdGlvblR5cGVzOiBnZXRDb25kaXRpb25UeXBlc0J5Q29tcG9uZW50TmFtZShjb21wb25lbnROYW1lKSxcbiAgICAgIH0pKVxuICAgICAgLnJlZHVjZTxDb21wb25lbnROYW1lIHwgbnVsbD4oXG4gICAgICAgIChyZXN1bHQsIHsgY29tcG9uZW50TmFtZSwgY29uZGl0aW9uVHlwZXMgfSkgPT5cbiAgICAgICAgICBjb25kaXRpb25UeXBlcy5pbmNsdWRlcyhjb25kaXRpb24udHlwZSkgPyBjb21wb25lbnROYW1lIDogcmVzdWx0LFxuICAgICAgICBudWxsLFxuICAgICAgKVxuICAgIGlmIChjb21wb25lbnROYW1lICYmIGNvbmRpdGlvbi5pZCkge1xuICAgICAgY29uc3QgZW50aXR5ID0gZ2V0RW50aXR5QnlJZChjb21wb25lbnROYW1lLCBjb25kaXRpb24uaWQpXG4gICAgICBpZiAoZW50aXR5KSB7XG4gICAgICAgIHJldHVybiBlbnRpdHlcbiAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIG51bGxcbiAgfVxuXG4gIC8vIE9OX0NMSUNLXG4gIGZ1bmN0aW9uIGluaXRPbkNsaWNrVHJpZ2dlcihlbnRpdHk6IEVudGl0eSkge1xuICAgIHBvaW50ZXJFdmVudHNTeXN0ZW0ub25Qb2ludGVyRG93bihcbiAgICAgIHtcbiAgICAgICAgZW50aXR5LFxuICAgICAgICBvcHRzOiB7XG4gICAgICAgICAgYnV0dG9uOiBJbnB1dEFjdGlvbi5JQV9QT0lOVEVSLFxuICAgICAgICAgIGhvdmVyVGV4dDogJ0NsaWNrJyxcbiAgICAgICAgfSxcbiAgICAgIH0sXG4gICAgICAoKSA9PiB7XG4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CJzZXJpYWxpemF0aW9uVHlwZVwiOlwibWFwXCJ9LFwiZGF0YVwiOntcIjBcIjp7XCJqc29uXCI6e1widmFsdWVcIjpbe1wiZW50aXR5XCI6NTEyLFwib3BlblwiOnRydWUsXCJjaGlsZHJlblwiOls1MTMsNTE0LDUxNSw1MTYsNTE3LDUxOCw1MTksNTIwLDUyMSw1MjIsNTIzLDUyNCw1MjUsNTI2LDUyNyw1MjgsNTI5LDUzMF19LHtcImVudGl0eVwiOjUxMyxcImNoaWxkcmVuXCI6W119LHtcImVudGl0eVwiOjUxNCxcImNoaWxkcmVuXCI6W119LHtcImVudGl0eVwiOjUxNSxcImNoaWxkcmVuXCI6W119LHtcImVudGl0eVwiOjUxNixcImNoaWxkcmVuXCI6W119LHtcImVudGl0eVwiOjUxNyxcImNoaWxkcmVuXCI6W119LHtcImVudGl0eVwiOjUxOCxcImNoaWxkcmVuXCI6W119LHtcImVudGl0eVwiOjUxOSxcImNoaWxkcmVuXCI6W119LHtcImVudGl0eVwiOjUyMCxcImNoaWxkcmVuXCI6W119LHtcImVudGl0eVwiOjUyMSxcImNoaWxkcmVuXCI6W119LHtcImVudGl0eVwiOjUyMixcImNoaWxkcmVuXCI6W119LHtcImVudGl0eVwiOjUyMyxcImNoaWxkcmVuXCI6W119LHtcImVudGl0eVwiOjUyNCxcImNoaWxkcmVuXCI6W119LHtcImVudGl0eVwiOjUyNSxcImNoaWxkcmVuXCI6W119LHtcImVudGl0eVwiOjUyNixcImNoaWxkcmVuXCI6W119LHtcImVudGl0eVwiOjUyNyxcImNoaWxkcmVuXCI6W119LHtcImVudGl0eVwiOjUyOCxcImNoaWxkcmVuXCI6W119LHtcImVudGl0eVwiOjUyOSxcImNoaWxkcmVuXCI6W119LHtcImVudGl0eVwiOjUzMCxcImNoaWxkcmVuXCI6W119XX19fX0se1wibmFtZVwiOlwiYXNzZXQtcGFja3M6OkFjdGlvblR5cGVzXCIsXCJqc29uU2NoZW1hXCI6e1widHlwZVwiOlwib2Jq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..932bfed 100644 --- a/src/definitions.ts +++ b/src/definitions.ts @@ -65,6 +65,9 @@ export enum IngredientType { SlicedSushi, Trash, BeerGlass, + YellowBeer, + RedBeer, + GreenBeer, } export enum SpeechBubbleType { @@ -103,7 +106,7 @@ export function getTapData(tapBeerType: BeerType) { */ export const BeerGlass = engine.defineComponent('BeerGlass', { - beingFilled: Schemas.Boolean, + //beingFilled: Schemas.Boolean, filled: Schemas.Boolean, beerType: Schemas.EnumNumber(BeerType, BeerType.NONE), drinking: Schemas.Boolean diff --git a/src/modules/customers.ts b/src/modules/customers.ts index 7dfe276..3cdd809 100644 --- a/src/modules/customers.ts +++ b/src/modules/customers.ts @@ -43,12 +43,32 @@ const customerTrashMessages = [ "Garbage, don't care what kind" ] -const customerBeerMessages = [ - 'I want a cold beer!', - 'I heard you do craft beer, gimme!', - 'Beer! A nice cold one!', +const customerEmptyBeerMessages = [ + 'An empty beer glass. So it looks like I was waiting long', + 'Just a glass, nothing in it. Feeling existential.', + 'Empty glass. All I can afford.', ] +const customerYellowBeerMessages = [ + 'I want a cold regular beer!', + 'I heard you do craft beer, gimme a yellow!', + 'Beer! A nice cold normal one!', +] + +const customerRedBeerMessages = [ + 'I want a RED beer!', + 'Red beer. Im a bit of a hipster!', + 'Beer red like the blood of my enemies! lol', +] + + +const customerGreenBeerMessages = [ + 'I like weird stuff, green beer!', + 'Green Beer. Dont care about the taste, want a cool pic for insagram', + 'Beer! A nice cold green one!', +] + + const customerLookingMessage = [ 'Im just here to watch', 'I dont want anything. Just here to make you feel uncomfortable.', @@ -167,7 +187,16 @@ export function CreateCustomer() { messages = customerTrashMessages break case 5: - messages = customerBeerMessages + messages = customerEmptyBeerMessages + break + case 6: + messages = customerYellowBeerMessages + break + case 7: + messages = customerRedBeerMessages + break + case 8: + messages = customerGreenBeerMessages break default: messages = customerLookingMessage @@ -217,7 +246,6 @@ export function CustomerSystem(dt: number) { RemoveProgressBar(customerData.progressBar) } - } if (customerData.receivedDish && customerData.waitingTimer > 0) { @@ -227,7 +255,7 @@ export function CustomerSystem(dt: number) { engine.removeEntityWithChildren(entity) - + CreateCustomer() } diff --git a/src/modules/pickAndDrop.ts b/src/modules/pickAndDrop.ts index 6f52f91..0a61a51 100644 --- a/src/modules/pickAndDrop.ts +++ b/src/modules/pickAndDrop.ts @@ -134,10 +134,6 @@ export function pickingGlassSystem() { if (grabbable.beingProcessed) { return } - if (grabbable.type === IngredientType.BeerGlass) { - const glass = BeerGlass.get(entity) - if (glass.beingFilled) { return } - } pickUpItem(entity) diff --git a/src/modules/tap.ts b/src/modules/tap.ts index 7cfea21..24ec0d2 100644 --- a/src/modules/tap.ts +++ b/src/modules/tap.ts @@ -1,6 +1,6 @@ import { Animator, engine, InputAction, inputSystem, PointerEventType, Transform } from '@dcl/sdk/ecs' import { Scalar } from '@dcl/sdk/math' -import { BeerGlass, BeerType, getTapData, TapBase, TapComponent } from '../definitions' +import { BeerGlass, BeerType, getTapData, GrabableObjectComponent, IngredientType, TapBase, TapComponent } from '../definitions' import { playSound } from './factory' import { getPlayerPosition } from './helpers' import { getParent } from '@dcl/sdk/network' @@ -38,8 +38,10 @@ export function tapPumpSystem(dt: number) { if (glassEntity) { const glass = BeerGlass.getMutable(glassEntity) glass.beerType = tap.beerType - glass.beingFilled = false + //glass.beingFilled = false glass.filled = true + const grabbable = GrabableObjectComponent.getMutable(glassEntity) + grabbable.beingProcessed = false } } @@ -61,8 +63,24 @@ export function tapPumpSystem(dt: number) { tap.pouring = true tap.pouringTime = 0 - glass.beingFilled = true + //glass.beingFilled = true glass.beerType = tap.beerType + const grabbable = GrabableObjectComponent.getMutable(glassEntity) + grabbable.beingProcessed = true + switch (tap.beerType) { + case BeerType.YELLOW: + grabbable.type = IngredientType.YellowBeer + break + case BeerType.RED: + grabbable.type = IngredientType.RedBeer + break + case BeerType.GREEN: + grabbable.type = IngredientType.GreenBeer + break + + } + + grabbable.type } } }