diff --git a/assets/scene/main.composite b/assets/scene/main.composite index 57f151f..11a43a3 100644 --- a/assets/scene/main.composite +++ b/assets/scene/main.composite @@ -1130,6 +1130,21 @@ "protocolBuffer": "PBPointerEvents" }, "data": { + "513": { + "json": { + "pointerEvents": [ + { + "eventType": 1, + "eventInfo": { + "button": 3, + "hoverText": "Interact", + "maxDistance": 10, + "showFeedback": false + } + } + ] + } + }, "522": { "json": { "pointerEvents": [ @@ -1280,7 +1295,7 @@ "serializationType": "map" }, "data": { - "530": { + "513": { "json": { "gizmo": 0 } diff --git a/bin/game.js b/bin/game.js index 7a0edab..b6e3aa5 100644 --- a/bin/game.js +++ b/bin/game.js @@ -28866,13 +28866,13 @@ function createPointerEventsSystem(engine2, inputSystem2) { // node_modules/@dcl/ecs/dist/systems/tween.js function createTweenSystem(engine2) { - const Tween3 = Tween2(engine2); + const Tween5 = Tween2(engine2); const TweenState2 = TweenState(engine2); const TweenSequence2 = TweenSequence(engine2); const cache = /* @__PURE__ */ new Map(); function isCompleted(entity) { const tweenState = TweenState2.getOrNull(entity); - const tween = Tween3.getOrNull(entity); + const tween = Tween5.getOrNull(entity); const tweenCache = cache.get(entity); if (!tweenState || !tween) return false; @@ -28887,13 +28887,13 @@ function createTweenSystem(engine2) { return false; } function tweenChanged(entity) { - const currentTween = Tween3.getOrNull(entity); + const currentTween = Tween5.getOrNull(entity); const prevTween = cache.get(entity)?.tween; if (currentTween && !prevTween || !currentTween && prevTween) { return true; } const currentBuff = new ReadWriteByteBuffer(); - Tween3.schema.serialize(currentTween, currentBuff); + Tween5.schema.serialize(currentTween, currentBuff); const equal = dataCompare(currentBuff.toBinary(), prevTween); return equal; } @@ -28903,10 +28903,10 @@ function createTweenSystem(engine2) { restart(); } restartTweens.length = 0; - for (const [entity, tween] of engine2.getEntitiesWith(Tween3)) { + for (const [entity, tween] of engine2.getEntitiesWith(Tween5)) { if (tweenChanged(entity)) { const buffer = new ReadWriteByteBuffer(); - Tween3.schema.serialize(tween, buffer); + Tween5.schema.serialize(tween, buffer); cache.set(entity, { tween: buffer.toBinary(), frames: 0, @@ -28927,19 +28927,19 @@ function createTweenSystem(engine2) { const { sequence } = tweenSequence; if (sequence && sequence.length) { const [nextTweenSequence, ...otherTweens] = sequence; - Tween3.createOrReplace(entity, nextTweenSequence); + Tween5.createOrReplace(entity, nextTweenSequence); const mutableTweenHelper = TweenSequence2.getMutable(entity); mutableTweenHelper.sequence = otherTweens; if (tweenSequence.loop === 0) { mutableTweenHelper.sequence.push(tween); } } else if (tweenSequence.loop === 1) { - Tween3.createOrReplace(entity, backwardsTween(tween)); + Tween5.createOrReplace(entity, backwardsTween(tween)); } else if (tweenSequence.loop === 0) { - Tween3.deleteFrom(entity); + Tween5.deleteFrom(entity); cache.delete(entity); restartTweens.push(() => { - Tween3.createOrReplace(entity, tween); + Tween5.createOrReplace(entity, tween); }); } } @@ -30036,6 +30036,7 @@ var Material3 = /* @__PURE__ */ Material2(engine); var MeshRenderer3 = /* @__PURE__ */ MeshRenderer2(engine); var MeshCollider3 = /* @__PURE__ */ MeshCollider2(engine); var Name2 = Name(engine); +var Tween3 = /* @__PURE__ */ Tween2(engine); var SyncComponents2 = /* @__PURE__ */ SyncComponents(engine); var NetworkEntity2 = /* @__PURE__ */ NetworkEntity(engine); var NetworkParent2 = /* @__PURE__ */ NetworkParent(engine); @@ -34163,7 +34164,7 @@ function instanceBeer(entity, id) { id ); } -function createIngredient(ingredient, position) { +function createIngredient(ingredient, position, fall) { const entity = engine.addEntity(); let model = ""; switch (ingredient) { @@ -34202,6 +34203,22 @@ function createIngredient(ingredient, position) { } ] }); + if (fall) { + Tween3.create(entity, { + mode: Tween3.Mode.Move({ + start: position, + end: Vector32.add(position, Vector32.create(0, -0.7, 0)) + }), + duration: 1e3, + easingFunction: EasingFunction.EF_LINEAR + }); + } + syncEntity( + entity, + [AudioSource2.componentId, Transform2.componentId, GrabableObjectComponent.componentId, Tween3.componentId] + // id + ); + return ingredient; } function createTap(tapBeerType, dispenseEntity, id) { const tapEntity = engine.addEntity(); @@ -34277,7 +34294,8 @@ function createTap(tapBeerType, dispenseEntity, id) { function createCuttingBoard(position, id) { const CutterParent = engine.addEntity(); Transform2.create(CutterParent, { - position + position, + rotation: Quaternion2.fromEulerDegrees(0, 0, 0) }); syncEntity(CutterParent, [], id + 100); const boardModel = engine.addEntity(); @@ -34380,14 +34398,12 @@ function pickingGlassSystem() { const hitParentEntity = getParent(hitEntity); if (hitParentEntity && TapBase.getOrNull(hitParentEntity)) { console.log("DROPPED ON TAP"); - removeParent(pickedUpChild); parentEntity(pickedUpChild, hitParentEntity); drop = true; } else if (hitParentEntity && CuttingBoard.has(hitParentEntity)) { console.log("DROPPED ON CUTTING BOARD"); const board = CuttingBoard.getMutable(hitParentEntity); if (!board || !board.hasRoll || !board.modelEntity) { - removeParent(pickedUpChild); parentEntity(pickedUpChild, hitParentEntity); drop = true; board.hasRoll = true; @@ -34400,7 +34416,6 @@ function pickingGlassSystem() { console.log("DROPPED ON POT"); const pot = PotData.getMutable(hitEntity); if (pot && !pot.hasIngredient) { - removeParent(pickedUpChild); parentEntity(pickedUpChild, hitEntity); pot.hasIngredient = true; pot.attachedEntity = pickedUpChild; @@ -37008,6 +37023,20 @@ function main() { const roll_expender = engine.getEntityOrNullByName("ExpenderRolls"); const noodles_button = engine.getEntityOrNullByName("Noodle Button"); const roll_button = engine.getEntityOrNullByName("Roll Button"); + if (noodles_expender && roll_expender && noodles_button && roll_button) { + const noodles_button_events = getTriggerEvents(noodles_button); + noodles_button_events.on(TriggerType.ON_CLICK, () => { + console.log("BUTTON WAS PRESSED!!"); + const startPosition = Vector32.add(Transform2.get(noodles_expender).position, Vector32.create(0, 0.7, 0)); + createIngredient(0 /* Noodles */, startPosition, true); + }); + const roll_button_events = getTriggerEvents(roll_button); + roll_button_events.on(TriggerType.ON_CLICK, () => { + console.log("BUTTON WAS PRESSED!!"); + const startPosition = Vector32.add(Transform2.get(roll_expender).position, Vector32.create(0, 0.7, 0)); + createIngredient(1 /* SushiRoll */, startPosition, true); + }); + } const pot1 = engine.getEntityOrNullByName("Pot1"); const pot2 = engine.getEntityOrNullByName("Pot2"); const pot1_button = engine.getEntityOrNullByName("Pot1 Button"); @@ -37365,7 +37394,7 @@ async function pollEvents(sendBatch2) { } // sdk-composite:all-composites -var compositeFromLoader = { "assets/scene/main.composite": { "version": 1, "components": [{ "name": "composite::root", "jsonSchema": { "type": "object", "properties": { "src": { "type": "string", "serializationType": "utf8-string" }, "entities": { "type": "array", "items": { "type": "object", "properties": { "src": { "type": "integer", "serializationType": "entity" }, "dest": { "type": "integer", "serializationType": "entity" } }, "serializationType": "map" }, "serializationType": "array" } }, "serializationType": "map" }, "data": {} }, { "name": "core::Transform", "jsonSchema": { "type": "object", "properties": { "position": { "type": "object", "properties": { "x": { "type": "number" }, "y": { "type": "number" }, "z": { "type": "number" } } }, "scale": { "type": "object", "properties": { "x": { "type": "number" }, "y": { "type": "number" }, "z": { "type": "number" } } }, "rotation": { "type": "object", "properties": { "x": { "type": "number" }, "y": { "type": "number" }, "z": { "type": "number" }, "w": { "type": "number" } } }, "parent": { "type": "integer" } }, "serializationType": "transform" }, "data": { "513": { "json": { "position": { "x": 11, "y": 0, "z": 11 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 1, "z": 0, "w": 6123234262925839e-32 }, "parent": 0 } }, "514": { "json": { "position": { "x": 19.462968826293945, "y": 1.0224852561950684, "z": 10.496221542358398 }, "scale": { "x": 0.9999999403953552, "y": 1, "z": 0.9999999403953552 }, "rotation": { "x": 0, "y": -0.7071067690849304, "z": 0, "w": 0.7071067690849304 }, "parent": 0 } }, "515": { "json": { "position": { "x": 19.35105323791504, "y": 1.0425816774368286, "z": 12.364835739135742 }, "scale": { "x": 0.9999999403953552, "y": 1, "z": 0.9999999403953552 }, "rotation": { "x": 0, "y": -0.7071067690849304, "z": 0, "w": 0.7071067690849304 }, "parent": 0 } }, "516": { "json": { "position": { "x": 18.50518035888672, "y": 1.0139946937561035, "z": 14.542533874511719 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0, "z": 0, "w": 1 }, "parent": 0 } }, "517": { "json": { "position": { "x": 16.47962760925293, "y": 1.0149178504943848, "z": 14.529610633850098 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0, "z": 0, "w": 1 }, "parent": 0 } }, "518": { "json": { "position": { "x": 19.096506118774414, "y": 0.7099999785423279, "z": 12.5 }, "scale": { "x": 0.9999999403953552, "y": 0.9999999403953552, "z": 1 }, "rotation": { "x": 0, "y": 0, "z": 0.7071067690849304, "w": 0.7071067690849304 }, "parent": 0 } }, "519": { "json": { "position": { "x": 19.096506118774414, "y": 0.7099999785423279, "z": 10.548395156860352 }, "scale": { "x": 0.9999998807907104, "y": 0.9999998807907104, "z": 1 }, "rotation": { "x": 0, "y": 0, "z": 0.7071067690849304, "w": 0.7071067690849304 }, "parent": 0 } }, "520": { "json": { "position": { "x": 18.341995239257812, "y": 0.7099999785423279, "z": 14.05458927154541 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": -0.5, "y": -0.5, "z": 0.5, "w": 0.5 }, "parent": 0 } }, "521": { "json": { "position": { "x": 16.390798568725586, "y": 0.7099999785423279, "z": 14.05458927154541 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": -0.5, "y": -0.5, "z": 0.5, "w": 0.5 }, "parent": 0 } }, "522": { "json": { "position": { "x": 14.706628799438477, "y": 1.012992262840271, "z": 9.178457260131836 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.6473962068557739, "z": 0, "w": 0.7621536254882812 }, "parent": 0 } }, "523": { "json": { "position": { "x": 14.002402305603027, "y": 1.012992262840271, "z": 9.178457260131836 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.6473961472511292, "z": 0, "w": 0.762153685092926 }, "parent": 0 } }, "524": { "json": { "position": { "x": 19.233787536621094, "y": 1.012992262840271, "z": 11.185989379882812 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.6473961472511292, "z": 0, "w": 0.762153685092926 }, "parent": 0 } }, "525": { "json": { "position": { "x": 19.233787536621094, "y": 1.012992262840271, "z": 13.173835754394531 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.6473961472511292, "z": 0, "w": 0.762153685092926 }, "parent": 0 } }, "526": { "json": { "position": { "x": 18.64331817626953, "y": 0.029041828587651253, "z": 7.3249101638793945 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.6473961472511292, "z": 0, "w": 0.762153685092926 }, "parent": 0 } }, "527": { "json": { "position": { "x": 12.185543060302734, "y": 0.07731946557760239, "z": 1.911895751953125 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.6473961472511292, "z": 0, "w": 0.762153685092926 }, "parent": 0 } }, "528": { "json": { "position": { "x": 13.326274871826172, "y": 0.07731946557760239, "z": 11.485663414001465 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.17769677937030792, "z": 0, "w": 0.9840852618217468 }, "parent": 0 } }, "529": { "json": { "position": { "x": 14.002402305603027, "y": 1.012992262840271, "z": 14.68221664428711 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.6473961472511292, "z": 0, "w": 0.762153685092926 }, "parent": 0 } }, "530": { "json": { "position": { "x": 14.407966613769531, "y": 1.012992262840271, "z": 14.085762977600098 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.6473961472511292, "z": 0, "w": 0.762153685092926 }, "parent": 0 } } } }, { "name": "core::GltfContainer", "jsonSchema": { "type": "object", "properties": {}, "serializationType": "protocol-buffer", "protocolBuffer": "PBGltfContainer" }, "data": { "513": { "json": { "src": "assets/models/Environment.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "514": { "json": { "src": "assets/models/ExpenderNoodles.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "515": { "json": { "src": "assets/models/ExpenderRolls.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "516": { "json": { "src": "assets/models/CookingPotClean.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "517": { "json": { "src": "assets/models/CookingPotClean.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "518": { "json": { "src": "assets/builder/red_button/red_button.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "519": { "json": { "src": "assets/builder/red_button/red_button.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "520": { "json": { "src": "assets/builder/red_button/red_button.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "521": { "json": { "src": "assets/builder/red_button/red_button.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "522": { "json": { "src": "assets/models/beerGlass.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "523": { "json": { "src": "assets/models/beerGlass.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "524": { "json": { "src": "assets/models/beerGlass.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "525": { "json": { "src": "assets/models/beerGlass.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "526": { "json": { "src": "assets/models/beerGlass.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "527": { "json": { "src": "assets/models/beerGlass.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "528": { "json": { "src": "assets/models/beerGlass.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "529": { "json": { "src": "assets/models/beerGlass.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "530": { "json": { "src": "assets/models/beerGlass.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } } } }, { "name": "core-schema::Name", "jsonSchema": { "type": "object", "properties": { "value": { "type": "string", "serializationType": "utf8-string" } }, "serializationType": "map" }, "data": { "513": { "json": { "value": "Environment.glb" } }, "514": { "json": { "value": "ExpenderNoodles" } }, "515": { "json": { "value": "ExpenderRolls" } }, "516": { "json": { "value": "Pot1" } }, "517": { "json": { "value": "Pot2" } }, "518": { "json": { "value": "Roll Button" } }, "519": { "json": { "value": "Noodle Button" } }, "520": { "json": { "value": "Pot1 Button" } }, "521": { "json": { "value": "Pot2 Button" } }, "522": { "json": { "value": "Beer1" } }, "523": { "json": { "value": "Beer2" } }, "524": { "json": { "value": "Beer3" } }, "525": { "json": { "value": "Beer4" } }, "526": { "json": { "value": "Beer5" } }, "527": { "json": { "value": "Beer6" } }, "528": { "json": { "value": "Beer7" } }, "529": { "json": { "value": "Beer8" } }, "530": { "json": { "value": "Beer9" } } } }, { "name": "core::Animator", "jsonSchema": { "type": "object", "properties": {}, "serializationType": "protocol-buffer", "protocolBuffer": "PBAnimator" }, "data": { "518": { "json": { "states": [{ "clip": "trigger", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "519": { "json": { "states": [{ "clip": "trigger", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "520": { "json": { "states": [{ "clip": "trigger", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "521": { "json": { "states": [{ "clip": "trigger", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "522": { "json": { "states": [{ "clip": "PourRed", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "Blank", "playing": true, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourYellow", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourGreen", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "523": { "json": { "states": [{ "clip": "PourRed", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "Blank", "playing": true, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourYellow", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourGreen", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "524": { "json": { "states": [{ "clip": "PourRed", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "Blank", "playing": true, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourYellow", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourGreen", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "525": { "json": { "states": [{ "clip": "PourRed", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "Blank", "playing": true, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourYellow", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourGreen", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "526": { "json": { "states": [{ "clip": "PourRed", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "Blank", "playing": true, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourYellow", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourGreen", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "527": { "json": { "states": [{ "clip": "PourRed", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "Blank", "playing": true, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourYellow", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourGreen", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "528": { "json": { "states": [{ "clip": "PourRed", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "Blank", "playing": true, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourYellow", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourGreen", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "529": { "json": { "states": [{ "clip": "PourRed", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "Blank", "playing": true, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourYellow", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourGreen", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "530": { "json": { "states": [{ "clip": "PourRed", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "Blank", "playing": true, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourYellow", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourGreen", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } } } }, { "name": "core::PointerEvents", "jsonSchema": { "type": "object", "properties": {}, "serializationType": "protocol-buffer", "protocolBuffer": "PBPointerEvents" }, "data": { "522": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 1, "hoverText": "Pick Up", "maxDistance": 5, "showFeedback": true } }] } }, "523": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 1, "hoverText": "Pick Up", "maxDistance": 5, "showFeedback": true } }] } }, "524": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 1, "hoverText": "Pick Up", "maxDistance": 5, "showFeedback": true } }] } }, "525": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 1, "hoverText": "Pick Up", "maxDistance": 5, "showFeedback": true } }] } }, "526": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 1, "hoverText": "Pick Up", "maxDistance": 5, "showFeedback": true } }] } }, "527": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 1, "hoverText": "Pick Up", "maxDistance": 5, "showFeedback": true } }] } }, "528": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 1, "hoverText": "Pick Up", "maxDistance": 5, "showFeedback": true } }] } }, "529": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 1, "hoverText": "Pick Up", "maxDistance": 5, "showFeedback": true } }] } }, "530": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 1, "hoverText": "Pick Up", "maxDistance": 5, "showFeedback": true } }] } } } }, { "name": "inspector::Selection", "jsonSchema": { "type": "object", "properties": { "gizmo": { "type": "integer", "serializationType": "int32" } }, "serializationType": "map" }, "data": { "530": { "json": { "gizmo": 0 } } } }, { "name": "inspector::Scene", "jsonSchema": { "type": "object", "properties": { "layout": { "type": "object", "properties": { "base": { "type": "object", "properties": { "x": { "type": "integer", "serializationType": "int32" }, "y": { "type": "integer", "serializationType": "int32" } }, "serializationType": "map" }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "x": { "type": "integer", "serializationType": "int32" }, "y": { "type": "integer", "serializationType": "int32" } }, "serializationType": "map" }, "serializationType": "array" } }, "serializationType": "map" } }, "serializationType": "map" }, "data": { "0": { "json": { "layout": { "base": { "x": 0, "y": 0 }, "parcels": [{ "x": 0, "y": 0 }, { "x": 0, "y": 1 }, { "x": 1, "y": 0 }, { "x": 1, "y": 1 }] } } } } }, { "name": "inspector::Nodes", "jsonSchema": { "type": "object", "properties": { "value": { "type": "array", "items": { "type": "object", "properties": { "entity": { "type": "integer", "serializationType": "entity" }, "open": { "type": "boolean", "serializationType": "optional", "optionalJsonSchema": { "type": "boolean", "serializationType": "boolean" } }, "children": { "type": "array", "items": { "type": "integer", "serializationType": "entity" }, "serializationType": "array" } }, "serializationType": "map" }, "serializationType": "array" } }, "serializationType": "map" }, "data": { "0": { "json": { "value": [{ "entity": 512, "open": true, "children": [513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530] }, { "entity": 513, "children": [] }, { "entity": 514, "children": [] }, { "entity": 515, "children": [] }, { "entity": 516, "children": [] }, { "entity": 517, "children": [] }, { "entity": 518, "children": [] }, { "entity": 519, "children": [] }, { "entity": 520, "children": [] }, { "entity": 521, "children": [] }, { "entity": 522, "children": [] }, { "entity": 523, "children": [] }, { "entity": 524, "children": [] }, { "entity": 525, "children": [] }, { "entity": 526, "children": [] }, { "entity": 527, "children": [] }, { "entity": 528, "children": [] }, { "entity": 529, "children": [] }, { "entity": 530, "children": [] }] } } } }, { "name": "asset-packs::ActionTypes", "jsonSchema": { "type": "object", "properties": { "value": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "serializationType": "utf8-string" }, "jsonSchema": { "type": "string", "serializationType": "utf8-string" } }, "serializationType": "map" }, "serializationType": "array" } }, "serializationType": "map" }, "data": { "0": { "json": { "value": [{ "type": "play_animation", "jsonSchema": '{"type":"object","properties":{"animation":{"type":"string","serializationType":"utf8-string"},"loop":{"type":"boolean","serializationType":"optional","optionalJsonSchema":{"type":"boolean","serializationType":"boolean"}}},"serializationType":"map"}' }, { "type": "stop_animation", "jsonSchema": '{"type":"object","properties":{},"serializationType":"map"}' }, { "type": "set_state", "jsonSchema": '{"type":"object","properties":{"state":{"type":"string","serializationType":"utf8-string"}},"serializationType":"map"}' }, { "type": "start_tween", "jsonSchema": '{"type":"object","properties":{"type":{"type":"string","enum":["move_item","rotate_item","scale_item"],"default":"move_item","serializationType":"enum-string","enumObject":{"MOVE_ITEM":"move_item","ROTATE_ITEM":"rotate_item","SCALE_ITEM":"scale_item"}},"end":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"z":{"type":"number"},"w":{"type":"number"}},"serializationType":"vector3"},"interpolationType":{"type":"string","enum":["linear","easeinquad","easeoutquad","easequad","easeinsine","easeoutsine","easeinoutsine","easeinexpo","easeoutexpo","easeinoutexpo","easeinelastic","easeoutelastic","easeinoutelastic","easeinbounce","easeoutbounce","easeinoutbounce"],"default":"linear","serializationType":"enum-string","enumObject":{"LINEAR":"linear","EASEINQUAD":"easeinquad","EASEOUTQUAD":"easeoutquad","EASEQUAD":"easequad","EASEINSINE":"easeinsine","EASEOUTSINE":"easeoutsine","EASESINE":"easeinoutsine","EASEINEXPO":"easeinexpo","EASEOUTEXPO":"easeoutexpo","EASEEXPO":"easeinoutexpo","EASEINELASTIC":"easeinelastic","EASEOUTELASTIC":"easeoutelastic","EASEELASTIC":"easeinoutelastic","EASEINBOUNCE":"easeinbounce","EASEOUTEBOUNCE":"easeoutbounce","EASEBOUNCE":"easeinoutbounce"}},"duration":{"type":"number","serializationType":"float32"},"relative":{"type":"boolean","serializationType":"boolean"}},"serializationType":"map"}' }, { "type": "set_counter", "jsonSchema": '{"type":"object","properties":{"counter":{"type":"integer","serializationType":"int32"}},"serializationType":"map"}' }, { "type": "increment_counter", "jsonSchema": '{"type":"object","properties":{},"serializationType":"map"}' }, { "type": "decrease_counter", "jsonSchema": '{"type":"object","properties":{},"serializationType":"map"}' }, { "type": "play_sound", "jsonSchema": '{"type":"object","properties":{"src":{"type":"string","serializationType":"utf8-string"},"loop":{"type":"boolean","serializationType":"optional","optionalJsonSchema":{"type":"boolean","serializationType":"boolean"}},"volume":{"type":"number","serializationType":"optional","optionalJsonSchema":{"type":"number","serializationType":"float32"}}},"serializationType":"map"}' }, { "type": "stop_sound", "jsonSchema": '{"type":"object","properties":{},"serializationType":"map"}' }, { "type": "set_visibility", "jsonSchema": '{"type":"object","properties":{"visible":{"type":"boolean","serializationType":"boolean"},"physicsCollider":{"type":"boolean","serializationType":"optional","optionalJsonSchema":{"type":"boolean","serializationType":"boolean"}},"collider":{"type":"integer","serializationType":"optional","optionalJsonSchema":{"type":"integer","enum":[0,1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768],"default":1,"serializationType":"enum-int","enumObject":{"0":"CL_NONE","1":"CL_POINTER","2":"CL_PHYSICS","4":"CL_RESERVED1","8":"CL_RESERVED2","16":"CL_RESERVED3","32":"CL_RESERVED4","64":"CL_RESERVED5","128":"CL_RESERVED6","256":"CL_CUSTOM1","512":"CL_CUSTOM2","1024":"CL_CUSTOM3","2048":"CL_CUSTOM4","4096":"CL_CUSTOM5","8192":"CL_CUSTOM6","16384":"CL_CUSTOM7","32768":"CL_CUSTOM8","CL_NONE":0,"CL_POINTER":1,"CL_PHYSICS":2,"CL_RESERVED1":4,"CL_RESERVED2":8,"CL_RESERVED3":16,"CL_RESERVED4":32,"CL_RESERVED5":64,"CL_RESERVED6":128,"CL_CUSTOM1":256,"CL_CUSTOM2":512,"CL_CUSTOM3":1024,"CL_CUSTOM4":2048,"CL_CUSTOM5":4096,"CL_CUSTOM6":8192,"CL_CUSTOM7":16384,"CL_CUSTOM8":32768}}}},"serializationType":"map"}' }, { "type": "attach_to_player", "jsonSchema": '{"type":"object","properties":{"anchorPointId":{"type":"integer","serializationType":"int32"}},"serializationType":"map"}' }, { "type": "detach_from_player", "jsonSchema": '{"type":"object","properties":{},"serializationType":"map"}' }, { "type": "play_video_stream", "jsonSchema": '{"type":"object","properties":{"src":{"type":"string","serializationType":"optional","optionalJsonSchema":{"type":"string","serializationType":"utf8-string"}},"loop":{"type":"boolean","serializationType":"optional","optionalJsonSchema":{"type":"boolean","serializationType":"boolean"}},"volume":{"type":"number","serializationType":"optional","optionalJsonSchema":{"type":"number","serializationType":"float32"}},"dclCast":{"type":"boolean","serializationType":"optional","optionalJsonSchema":{"type":"boolean","serializationType":"boolean"}}},"serializationType":"map"}' }, { "type": "stop_video_stream", "jsonSchema": '{"type":"object","properties":{},"serializationType":"map"}' }, { "type": "play_audio_stream", "jsonSchema": '{"type":"object","properties":{"url":{"type":"string","serializationType":"utf8-string"},"volume":{"type":"number","serializationType":"optional","optionalJsonSchema":{"type":"number","serializationType":"float32"}}},"serializationType":"map"}' }, { "type": "stop_audio_stream", "jsonSchema": '{"type":"object","properties":{},"serializationType":"map"}' }, { "type": "teleport_player", "jsonSchema": '{"type":"object","properties":{"x":{"type":"integer","serializationType":"int32"},"y":{"type":"integer","serializationType":"int32"}},"serializationType":"map"}' }, { "type": "move_player", "jsonSchema": '{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"z":{"type":"number"},"w":{"type":"number"}},"serializationType":"vector3"},"cameraTarget":{"type":"object","serializationType":"optional","optionalJsonSchema":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"z":{"type":"number"},"w":{"type":"number"}},"serializationType":"vector3"}}},"serializationType":"map"}' }, { "type": "play_default_emote", "jsonSchema": '{"type":"object","properties":{"emote":{"type":"string","serializationType":"utf8-string"}},"serializationType":"map"}' }, { "type": "play_custom_emote", "jsonSchema": '{"type":"object","properties":{"src":{"type":"string","serializationType":"utf8-string"},"loop":{"type":"boolean","serializationType":"optional","optionalJsonSchema":{"type":"boolean","serializationType":"boolean"}}},"serializationType":"map"}' }, { "type": "open_link", "jsonSchema": '{"type":"object","properties":{"url":{"type":"string","serializationType":"utf8-string"}},"serializationType":"map"}' }, { "type": "show_text", "jsonSchema": '{"type":"object","properties":{"text":{"type":"string","serializationType":"utf8-string"},"hideAfterSeconds":{"type":"number","serializationType":"float32"},"font":{"type":"integer","enum":[0,1,2],"default":0,"serializationType":"enum-int","enumObject":{"0":"F_SANS_SERIF","1":"F_SERIF","2":"F_MONOSPACE","F_SANS_SERIF":0,"F_SERIF":1,"F_MONOSPACE":2}},"fontSize":{"type":"number","serializationType":"optional","optionalJsonSchema":{"type":"number","serializationType":"float32"}},"textAlign":{"type":"integer","enum":[0,1,2,3,4,5,6,7,8],"default":4,"serializationType":"enum-int","enumObject":{"0":"TAM_TOP_LEFT","1":"TAM_TOP_CENTER","2":"TAM_TOP_RIGHT","3":"TAM_MIDDLE_LEFT","4":"TAM_MIDDLE_CENTER","5":"TAM_MIDDLE_RIGHT","6":"TAM_BOTTOM_LEFT","7":"TAM_BOTTOM_CENTER","8":"TAM_BOTTOM_RIGHT","TAM_TOP_LEFT":0,"TAM_TOP_CENTER":1,"TAM_TOP_RIGHT":2,"TAM_MIDDLE_LEFT":3,"TAM_MIDDLE_CENTER":4,"TAM_MIDDLE_RIGHT":5,"TAM_BOTTOM_LEFT":6,"TAM_BOTTOM_CENTER":7,"TAM_BOTTOM_RIGHT":8}}},"serializationType":"map"}' }, { "type": "hide_text", "jsonSchema": '{"type":"object","properties":{},"serializationType":"map"}' }, { "type": "start_delay", "jsonSchema": '{"type":"object","properties":{"actions":{"type":"array","items":{"type":"string","serializationType":"utf8-string"},"serializationType":"array"},"timeout":{"type":"number","serializationType":"float32"}},"serializationType":"map"}' }, { "type": "stop_delay", "jsonSchema": '{"type":"object","properties":{"action":{"type":"string","serializationType":"utf8-string"}},"serializationType":"map"}' }, { "type": "start_loop", "jsonSchema": '{"type":"object","properties":{"actions":{"type":"array","items":{"type":"string","serializationType":"utf8-string"},"serializationType":"array"},"interval":{"type":"number","serializationType":"float32"}},"serializationType":"map"}' }, { "type": "stop_loop", "jsonSchema": '{"type":"object","properties":{"action":{"type":"string","serializationType":"utf8-string"}},"serializationType":"map"}' }, { "type": "clone_entity", "jsonSchema": '{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"z":{"type":"number"},"w":{"type":"number"}},"serializationType":"vector3"}},"serializationType":"map"}' }, { "type": "remove_entity", "jsonSchema": '{"type":"object","properties":{},"serializationType":"map"}' }, { "type": "show_image", "jsonSchema": '{"type":"object","properties":{"src":{"type":"string","serializationType":"utf8-string"},"align":{"type":"integer","enum":[0,1,2,3,4,5,6,7,8],"default":4,"serializationType":"enum-int","enumObject":{"0":"TAM_TOP_LEFT","1":"TAM_TOP_CENTER","2":"TAM_TOP_RIGHT","3":"TAM_MIDDLE_LEFT","4":"TAM_MIDDLE_CENTER","5":"TAM_MIDDLE_RIGHT","6":"TAM_BOTTOM_LEFT","7":"TAM_BOTTOM_CENTER","8":"TAM_BOTTOM_RIGHT","TAM_TOP_LEFT":0,"TAM_TOP_CENTER":1,"TAM_TOP_RIGHT":2,"TAM_MIDDLE_LEFT":3,"TAM_MIDDLE_CENTER":4,"TAM_MIDDLE_RIGHT":5,"TAM_BOTTOM_LEFT":6,"TAM_BOTTOM_CENTER":7,"TAM_BOTTOM_RIGHT":8}},"height":{"type":"number","serializationType":"float32"},"width":{"type":"number","serializationType":"float32"},"hideAfterSeconds":{"type":"number","serializationType":"optional","optionalJsonSchema":{"type":"number","serializationType":"float32"}},"text":{"type":"string","serializationType":"optional","optionalJsonSchema":{"type":"string","serializationType":"utf8-string"}},"fontSize":{"type":"number","serializationType":"optional","optionalJsonSchema":{"type":"number","serializationType":"float32"}}},"serializationType":"map"}' }, { "type": "hide_image", "jsonSchema": '{"type":"object","properties":{"imageEntity":{"type":"integer","serializationType":"optional","optionalJsonSchema":{"type":"integer","serializationType":"int32"}}},"serializationType":"map"}' }] } } } }, { "name": "asset-packs::Actions", "jsonSchema": { "type": "object", "properties": { "id": { "type": "integer", "serializationType": "int32" }, "value": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "serializationType": "utf8-string" }, "type": { "type": "string", "serializationType": "utf8-string" }, "jsonPayload": { "type": "string", "serializationType": "utf8-string" } }, "serializationType": "map" }, "serializationType": "array" } }, "serializationType": "map" }, "data": { "518": { "json": { "id": 1, "value": [{ "name": "Play Activate Animation", "type": "play_animation", "jsonPayload": '{ "animation": "trigger" }' }, { "name": "Play Sound", "type": "play_sound", "jsonPayload": '{"src":"assets/builder/red_button/sound.mp3"}' }] } }, "519": { "json": { "id": 2, "value": [{ "name": "Play Activate Animation", "type": "play_animation", "jsonPayload": '{ "animation": "trigger" }' }, { "name": "Play Sound", "type": "play_sound", "jsonPayload": '{"src":"assets/builder/red_button/sound.mp3"}' }] } }, "520": { "json": { "id": 3, "value": [{ "name": "Play Activate Animation", "type": "play_animation", "jsonPayload": '{ "animation": "trigger" }' }, { "name": "Play Sound", "type": "play_sound", "jsonPayload": '{"src":"assets/builder/red_button/sound.mp3"}' }] } }, "521": { "json": { "id": 4, "value": [{ "name": "Play Activate Animation", "type": "play_animation", "jsonPayload": '{ "animation": "trigger" }' }, { "name": "Play Sound", "type": "play_sound", "jsonPayload": '{"src":"assets/builder/red_button/sound.mp3"}' }] } } } }, { "name": "asset-packs::Counter", "jsonSchema": { "type": "object", "properties": { "id": { "type": "number", "serializationType": "float32" }, "value": { "type": "integer", "serializationType": "int32" } }, "serializationType": "map" }, "data": { "0": { "json": { "id": 0, "value": 4 } } } }, { "name": "asset-packs::Triggers", "jsonSchema": { "type": "object", "properties": { "value": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": ["on_click", "on_state_change", "on_spawn", "on_tween_end", "on_counter_change", "on_player_enters_area", "on_player_leaves_area", "on_delay", "on_loop", "on_clone", "on_click_image"], "default": "on_click", "serializationType": "enum-string", "enumObject": { "ON_CLICK": "on_click", "ON_STATE_CHANGE": "on_state_change", "ON_SPAWN": "on_spawn", "ON_TWEEN_END": "on_tween_end", "ON_COUNTER_CHANGE": "on_counter_change", "ON_PLAYER_ENTERS_AREA": "on_player_enters_area", "ON_PLAYER_LEAVES_AREA": "on_player_leaves_area", "ON_DELAY": "on_delay", "ON_LOOP": "on_loop", "ON_CLONE": "on_clone", "ON_CLICK_IMAGE": "on_click_image" } }, "conditions": { "type": "array", "serializationType": "optional", "optionalJsonSchema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "serializationType": "optional", "optionalJsonSchema": { "type": "integer", "serializationType": "int32" } }, "type": { "type": "string", "enum": ["when_state_is", "when_state_is_not", "when_counter_equals", "when_counter_is_greater_than", "when_counter_is_less_than"], "default": "when_state_is", "serializationType": "enum-string", "enumObject": { "WHEN_STATE_IS": "when_state_is", "WHEN_STATE_IS_NOT": "when_state_is_not", "WHEN_COUNTER_EQUALS": "when_counter_equals", "WHEN_COUNTER_IS_GREATER_THAN": "when_counter_is_greater_than", "WHEN_COUNTER_IS_LESS_THAN": "when_counter_is_less_than" } }, "value": { "type": "string", "serializationType": "utf8-string" } }, "serializationType": "map" }, "serializationType": "array" } }, "operation": { "type": "string", "serializationType": "optional", "optionalJsonSchema": { "type": "string", "enum": ["and", "or"], "default": "and", "serializationType": "enum-string", "enumObject": { "AND": "and", "OR": "or" } } }, "actions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "serializationType": "optional", "optionalJsonSchema": { "type": "integer", "serializationType": "int32" } }, "name": { "type": "string", "serializationType": "optional", "optionalJsonSchema": { "type": "string", "serializationType": "utf8-string" } } }, "serializationType": "map" }, "serializationType": "array" } }, "serializationType": "map" }, "serializationType": "array" } }, "serializationType": "map" }, "data": { "518": { "json": { "value": [{ "type": "on_click", "conditions": [], "actions": [{ "id": 1, "name": "Play Activate Animation" }, { "id": 1, "name": "Play Sound" }] }] } }, "519": { "json": { "value": [{ "type": "on_click", "conditions": [], "actions": [{ "id": 2, "name": "Play Activate Animation" }, { "id": 2, "name": "Play Sound" }] }] } }, "520": { "json": { "value": [{ "type": "on_click", "conditions": [], "actions": [{ "id": 3, "name": "Play Activate Animation" }, { "id": 3, "name": "Play Sound" }] }] } }, "521": { "json": { "value": [{ "type": "on_click", "conditions": [], "actions": [{ "id": 4, "name": "Play Activate Animation" }, { "id": 4, "name": "Play Sound" }] }] } } } }, { "name": "inspector::TransformConfig", "jsonSchema": { "type": "object", "properties": { "porportionalScaling": { "type": "boolean", "serializationType": "optional", "optionalJsonSchema": { "type": "boolean", "serializationType": "boolean" } } }, "serializationType": "map" }, "data": { "513": { "json": {} }, "514": { "json": {} }, "515": { "json": {} }, "516": { "json": {} }, "517": { "json": {} }, "518": { "json": {} }, "519": { "json": {} }, "520": { "json": {} }, "521": { "json": {} }, "522": { "json": {} }, "523": { "json": {} }, "524": { "json": {} }, "525": { "json": {} }, "526": { "json": {} }, "527": { "json": {} }, "528": { "json": {} }, "529": { "json": {} }, "530": { "json": {} } } }, { "name": "cube-id", "jsonSchema": { "type": "object", "properties": {}, "serializationType": "map" }, "data": { "512": { "json": {} } } }] } }; +var compositeFromLoader = { "assets/scene/main.composite": { "version": 1, "components": [{ "name": "composite::root", "jsonSchema": { "type": "object", "properties": { "src": { "type": "string", "serializationType": "utf8-string" }, "entities": { "type": "array", "items": { "type": "object", "properties": { "src": { "type": "integer", "serializationType": "entity" }, "dest": { "type": "integer", "serializationType": "entity" } }, "serializationType": "map" }, "serializationType": "array" } }, "serializationType": "map" }, "data": {} }, { "name": "core::Transform", "jsonSchema": { "type": "object", "properties": { "position": { "type": "object", "properties": { "x": { "type": "number" }, "y": { "type": "number" }, "z": { "type": "number" } } }, "scale": { "type": "object", "properties": { "x": { "type": "number" }, "y": { "type": "number" }, "z": { "type": "number" } } }, "rotation": { "type": "object", "properties": { "x": { "type": "number" }, "y": { "type": "number" }, "z": { "type": "number" }, "w": { "type": "number" } } }, "parent": { "type": "integer" } }, "serializationType": "transform" }, "data": { "513": { "json": { "position": { "x": 11, "y": 0, "z": 11 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 1, "z": 0, "w": 6123234262925839e-32 }, "parent": 0 } }, "514": { "json": { "position": { "x": 19.462968826293945, "y": 1.0224852561950684, "z": 10.496221542358398 }, "scale": { "x": 0.9999999403953552, "y": 1, "z": 0.9999999403953552 }, "rotation": { "x": 0, "y": -0.7071067690849304, "z": 0, "w": 0.7071067690849304 }, "parent": 0 } }, "515": { "json": { "position": { "x": 19.35105323791504, "y": 1.0425816774368286, "z": 12.364835739135742 }, "scale": { "x": 0.9999999403953552, "y": 1, "z": 0.9999999403953552 }, "rotation": { "x": 0, "y": -0.7071067690849304, "z": 0, "w": 0.7071067690849304 }, "parent": 0 } }, "516": { "json": { "position": { "x": 18.50518035888672, "y": 1.0139946937561035, "z": 14.542533874511719 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0, "z": 0, "w": 1 }, "parent": 0 } }, "517": { "json": { "position": { "x": 16.47962760925293, "y": 1.0149178504943848, "z": 14.529610633850098 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0, "z": 0, "w": 1 }, "parent": 0 } }, "518": { "json": { "position": { "x": 19.096506118774414, "y": 0.7099999785423279, "z": 12.5 }, "scale": { "x": 0.9999999403953552, "y": 0.9999999403953552, "z": 1 }, "rotation": { "x": 0, "y": 0, "z": 0.7071067690849304, "w": 0.7071067690849304 }, "parent": 0 } }, "519": { "json": { "position": { "x": 19.096506118774414, "y": 0.7099999785423279, "z": 10.548395156860352 }, "scale": { "x": 0.9999998807907104, "y": 0.9999998807907104, "z": 1 }, "rotation": { "x": 0, "y": 0, "z": 0.7071067690849304, "w": 0.7071067690849304 }, "parent": 0 } }, "520": { "json": { "position": { "x": 18.341995239257812, "y": 0.7099999785423279, "z": 14.05458927154541 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": -0.5, "y": -0.5, "z": 0.5, "w": 0.5 }, "parent": 0 } }, "521": { "json": { "position": { "x": 16.390798568725586, "y": 0.7099999785423279, "z": 14.05458927154541 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": -0.5, "y": -0.5, "z": 0.5, "w": 0.5 }, "parent": 0 } }, "522": { "json": { "position": { "x": 14.706628799438477, "y": 1.012992262840271, "z": 9.178457260131836 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.6473962068557739, "z": 0, "w": 0.7621536254882812 }, "parent": 0 } }, "523": { "json": { "position": { "x": 14.002402305603027, "y": 1.012992262840271, "z": 9.178457260131836 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.6473961472511292, "z": 0, "w": 0.762153685092926 }, "parent": 0 } }, "524": { "json": { "position": { "x": 19.233787536621094, "y": 1.012992262840271, "z": 11.185989379882812 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.6473961472511292, "z": 0, "w": 0.762153685092926 }, "parent": 0 } }, "525": { "json": { "position": { "x": 19.233787536621094, "y": 1.012992262840271, "z": 13.173835754394531 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.6473961472511292, "z": 0, "w": 0.762153685092926 }, "parent": 0 } }, "526": { "json": { "position": { "x": 18.64331817626953, "y": 0.029041828587651253, "z": 7.3249101638793945 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.6473961472511292, "z": 0, "w": 0.762153685092926 }, "parent": 0 } }, "527": { "json": { "position": { "x": 12.185543060302734, "y": 0.07731946557760239, "z": 1.911895751953125 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.6473961472511292, "z": 0, "w": 0.762153685092926 }, "parent": 0 } }, "528": { "json": { "position": { "x": 13.326274871826172, "y": 0.07731946557760239, "z": 11.485663414001465 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.17769677937030792, "z": 0, "w": 0.9840852618217468 }, "parent": 0 } }, "529": { "json": { "position": { "x": 14.002402305603027, "y": 1.012992262840271, "z": 14.68221664428711 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.6473961472511292, "z": 0, "w": 0.762153685092926 }, "parent": 0 } }, "530": { "json": { "position": { "x": 14.407966613769531, "y": 1.012992262840271, "z": 14.085762977600098 }, "scale": { "x": 1, "y": 1, "z": 1 }, "rotation": { "x": 0, "y": 0.6473961472511292, "z": 0, "w": 0.762153685092926 }, "parent": 0 } } } }, { "name": "core::GltfContainer", "jsonSchema": { "type": "object", "properties": {}, "serializationType": "protocol-buffer", "protocolBuffer": "PBGltfContainer" }, "data": { "513": { "json": { "src": "assets/models/Environment.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "514": { "json": { "src": "assets/models/ExpenderNoodles.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "515": { "json": { "src": "assets/models/ExpenderRolls.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "516": { "json": { "src": "assets/models/CookingPotClean.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "517": { "json": { "src": "assets/models/CookingPotClean.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "518": { "json": { "src": "assets/builder/red_button/red_button.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "519": { "json": { "src": "assets/builder/red_button/red_button.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "520": { "json": { "src": "assets/builder/red_button/red_button.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "521": { "json": { "src": "assets/builder/red_button/red_button.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "522": { "json": { "src": "assets/models/beerGlass.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "523": { "json": { "src": "assets/models/beerGlass.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "524": { "json": { "src": "assets/models/beerGlass.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "525": { "json": { "src": "assets/models/beerGlass.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "526": { "json": { "src": "assets/models/beerGlass.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "527": { "json": { "src": "assets/models/beerGlass.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "528": { "json": { "src": "assets/models/beerGlass.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "529": { "json": { "src": "assets/models/beerGlass.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } }, "530": { "json": { "src": "assets/models/beerGlass.glb", "visibleMeshesCollisionMask": 1, "invisibleMeshesCollisionMask": 2 } } } }, { "name": "core-schema::Name", "jsonSchema": { "type": "object", "properties": { "value": { "type": "string", "serializationType": "utf8-string" } }, "serializationType": "map" }, "data": { "513": { "json": { "value": "Environment.glb" } }, "514": { "json": { "value": "ExpenderNoodles" } }, "515": { "json": { "value": "ExpenderRolls" } }, "516": { "json": { "value": "Pot1" } }, "517": { "json": { "value": "Pot2" } }, "518": { "json": { "value": "Roll Button" } }, "519": { "json": { "value": "Noodle Button" } }, "520": { "json": { "value": "Pot1 Button" } }, "521": { "json": { "value": "Pot2 Button" } }, "522": { "json": { "value": "Beer1" } }, "523": { "json": { "value": "Beer2" } }, "524": { "json": { "value": "Beer3" } }, "525": { "json": { "value": "Beer4" } }, "526": { "json": { "value": "Beer5" } }, "527": { "json": { "value": "Beer6" } }, "528": { "json": { "value": "Beer7" } }, "529": { "json": { "value": "Beer8" } }, "530": { "json": { "value": "Beer9" } } } }, { "name": "core::Animator", "jsonSchema": { "type": "object", "properties": {}, "serializationType": "protocol-buffer", "protocolBuffer": "PBAnimator" }, "data": { "518": { "json": { "states": [{ "clip": "trigger", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "519": { "json": { "states": [{ "clip": "trigger", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "520": { "json": { "states": [{ "clip": "trigger", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "521": { "json": { "states": [{ "clip": "trigger", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "522": { "json": { "states": [{ "clip": "PourRed", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "Blank", "playing": true, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourYellow", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourGreen", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "523": { "json": { "states": [{ "clip": "PourRed", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "Blank", "playing": true, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourYellow", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourGreen", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "524": { "json": { "states": [{ "clip": "PourRed", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "Blank", "playing": true, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourYellow", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourGreen", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "525": { "json": { "states": [{ "clip": "PourRed", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "Blank", "playing": true, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourYellow", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourGreen", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "526": { "json": { "states": [{ "clip": "PourRed", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "Blank", "playing": true, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourYellow", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourGreen", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "527": { "json": { "states": [{ "clip": "PourRed", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "Blank", "playing": true, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourYellow", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourGreen", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "528": { "json": { "states": [{ "clip": "PourRed", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "Blank", "playing": true, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourYellow", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourGreen", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "529": { "json": { "states": [{ "clip": "PourRed", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "Blank", "playing": true, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourYellow", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourGreen", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } }, "530": { "json": { "states": [{ "clip": "PourRed", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "Blank", "playing": true, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourYellow", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }, { "clip": "PourGreen", "playing": false, "weight": 1, "speed": 1, "loop": false, "shouldReset": false }] } } } }, { "name": "core::PointerEvents", "jsonSchema": { "type": "object", "properties": {}, "serializationType": "protocol-buffer", "protocolBuffer": "PBPointerEvents" }, "data": { "513": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 3, "hoverText": "Interact", "maxDistance": 10, "showFeedback": false } }] } }, "522": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 1, "hoverText": "Pick Up", "maxDistance": 5, "showFeedback": true } }] } }, "523": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 1, "hoverText": "Pick Up", "maxDistance": 5, "showFeedback": true } }] } }, "524": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 1, "hoverText": "Pick Up", "maxDistance": 5, "showFeedback": true } }] } }, "525": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 1, "hoverText": "Pick Up", "maxDistance": 5, "showFeedback": true } }] } }, "526": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 1, "hoverText": "Pick Up", "maxDistance": 5, "showFeedback": true } }] } }, "527": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 1, "hoverText": "Pick Up", "maxDistance": 5, "showFeedback": true } }] } }, "528": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 1, "hoverText": "Pick Up", "maxDistance": 5, "showFeedback": true } }] } }, "529": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 1, "hoverText": "Pick Up", "maxDistance": 5, "showFeedback": true } }] } }, "530": { "json": { "pointerEvents": [{ "eventType": 1, "eventInfo": { "button": 1, "hoverText": "Pick Up", "maxDistance": 5, "showFeedback": true } }] } } } }, { "name": "inspector::Selection", "jsonSchema": { "type": "object", "properties": { "gizmo": { "type": "integer", "serializationType": "int32" } }, "serializationType": "map" }, "data": { "513": { "json": { "gizmo": 0 } } } }, { "name": "inspector::Scene", "jsonSchema": { "type": "object", "properties": { "layout": { "type": "object", "properties": { "base": { "type": "object", "properties": { "x": { "type": "integer", "serializationType": "int32" }, "y": { "type": "integer", "serializationType": "int32" } }, "serializationType": "map" }, "parcels": { "type": "array", "items": { "type": "object", "properties": { "x": { "type": "integer", "serializationType": "int32" }, "y": { "type": "integer", "serializationType": "int32" } }, "serializationType": "map" }, "serializationType": "array" } }, "serializationType": "map" } }, "serializationType": "map" }, "data": { "0": { "json": { "layout": { "base": { "x": 0, "y": 0 }, "parcels": [{ "x": 0, "y": 0 }, { "x": 0, "y": 1 }, { "x": 1, "y": 0 }, { "x": 1, "y": 1 }] } } } } }, { "name": "inspector::Nodes", "jsonSchema": { "type": "object", "properties": { "value": { "type": "array", "items": { "type": "object", "properties": { "entity": { "type": "integer", "serializationType": "entity" }, "open": { "type": "boolean", "serializationType": "optional", "optionalJsonSchema": { "type": "boolean", "serializationType": "boolean" } }, "children": { "type": "array", "items": { "type": "integer", "serializationType": "entity" }, "serializationType": "array" } }, "serializationType": "map" }, "serializationType": "array" } }, "serializationType": "map" }, "data": { "0": { "json": { "value": [{ "entity": 512, "open": true, "children": [513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530] }, { "entity": 513, "children": [] }, { "entity": 514, "children": [] }, { "entity": 515, "children": [] }, { "entity": 516, "children": [] }, { "entity": 517, "children": [] }, { "entity": 518, "children": [] }, { "entity": 519, "children": [] }, { "entity": 520, "children": [] }, { "entity": 521, "children": [] }, { "entity": 522, "children": [] }, { "entity": 523, "children": [] }, { "entity": 524, "children": [] }, { "entity": 525, "children": [] }, { "entity": 526, "children": [] }, { "entity": 527, "children": [] }, { "entity": 528, "children": [] }, { "entity": 529, "children": [] }, { "entity": 530, "children": [] }] } } } }, { "name": "asset-packs::ActionTypes", "jsonSchema": { "type": "object", "properties": { "value": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "serializationType": "utf8-string" }, "jsonSchema": { "type": "string", "serializationType": "utf8-string" } }, "serializationType": "map" }, "serializationType": "array" } }, "serializationType": "map" }, "data": { "0": { "json": { "value": [{ "type": "play_animation", "jsonSchema": '{"type":"object","properties":{"animation":{"type":"string","serializationType":"utf8-string"},"loop":{"type":"boolean","serializationType":"optional","optionalJsonSchema":{"type":"boolean","serializationType":"boolean"}}},"serializationType":"map"}' }, { "type": "stop_animation", "jsonSchema": '{"type":"object","properties":{},"serializationType":"map"}' }, { "type": "set_state", "jsonSchema": '{"type":"object","properties":{"state":{"type":"string","serializationType":"utf8-string"}},"serializationType":"map"}' }, { "type": "start_tween", "jsonSchema": '{"type":"object","properties":{"type":{"type":"string","enum":["move_item","rotate_item","scale_item"],"default":"move_item","serializationType":"enum-string","enumObject":{"MOVE_ITEM":"move_item","ROTATE_ITEM":"rotate_item","SCALE_ITEM":"scale_item"}},"end":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"z":{"type":"number"},"w":{"type":"number"}},"serializationType":"vector3"},"interpolationType":{"type":"string","enum":["linear","easeinquad","easeoutquad","easequad","easeinsine","easeoutsine","easeinoutsine","easeinexpo","easeoutexpo","easeinoutexpo","easeinelastic","easeoutelastic","easeinoutelastic","easeinbounce","easeoutbounce","easeinoutbounce"],"default":"linear","serializationType":"enum-string","enumObject":{"LINEAR":"linear","EASEINQUAD":"easeinquad","EASEOUTQUAD":"easeoutquad","EASEQUAD":"easequad","EASEINSINE":"easeinsine","EASEOUTSINE":"easeoutsine","EASESINE":"easeinoutsine","EASEINEXPO":"easeinexpo","EASEOUTEXPO":"easeoutexpo","EASEEXPO":"easeinoutexpo","EASEINELASTIC":"easeinelastic","EASEOUTELASTIC":"easeoutelastic","EASEELASTIC":"easeinoutelastic","EASEINBOUNCE":"easeinbounce","EASEOUTEBOUNCE":"easeoutbounce","EASEBOUNCE":"easeinoutbounce"}},"duration":{"type":"number","serializationType":"float32"},"relative":{"type":"boolean","serializationType":"boolean"}},"serializationType":"map"}' }, { "type": "set_counter", "jsonSchema": '{"type":"object","properties":{"counter":{"type":"integer","serializationType":"int32"}},"serializationType":"map"}' }, { "type": "increment_counter", "jsonSchema": '{"type":"object","properties":{},"serializationType":"map"}' }, { "type": "decrease_counter", "jsonSchema": '{"type":"object","properties":{},"serializationType":"map"}' }, { "type": "play_sound", "jsonSchema": '{"type":"object","properties":{"src":{"type":"string","serializationType":"utf8-string"},"loop":{"type":"boolean","serializationType":"optional","optionalJsonSchema":{"type":"boolean","serializationType":"boolean"}},"volume":{"type":"number","serializationType":"optional","optionalJsonSchema":{"type":"number","serializationType":"float32"}}},"serializationType":"map"}' }, { "type": "stop_sound", "jsonSchema": '{"type":"object","properties":{},"serializationType":"map"}' }, { "type": "set_visibility", "jsonSchema": '{"type":"object","properties":{"visible":{"type":"boolean","serializationType":"boolean"},"physicsCollider":{"type":"boolean","serializationType":"optional","optionalJsonSchema":{"type":"boolean","serializationType":"boolean"}},"collider":{"type":"integer","serializationType":"optional","optionalJsonSchema":{"type":"integer","enum":[0,1,2,4,8,16,32,64,128,256,512,1024,2048,4096,8192,16384,32768],"default":1,"serializationType":"enum-int","enumObject":{"0":"CL_NONE","1":"CL_POINTER","2":"CL_PHYSICS","4":"CL_RESERVED1","8":"CL_RESERVED2","16":"CL_RESERVED3","32":"CL_RESERVED4","64":"CL_RESERVED5","128":"CL_RESERVED6","256":"CL_CUSTOM1","512":"CL_CUSTOM2","1024":"CL_CUSTOM3","2048":"CL_CUSTOM4","4096":"CL_CUSTOM5","8192":"CL_CUSTOM6","16384":"CL_CUSTOM7","32768":"CL_CUSTOM8","CL_NONE":0,"CL_POINTER":1,"CL_PHYSICS":2,"CL_RESERVED1":4,"CL_RESERVED2":8,"CL_RESERVED3":16,"CL_RESERVED4":32,"CL_RESERVED5":64,"CL_RESERVED6":128,"CL_CUSTOM1":256,"CL_CUSTOM2":512,"CL_CUSTOM3":1024,"CL_CUSTOM4":2048,"CL_CUSTOM5":4096,"CL_CUSTOM6":8192,"CL_CUSTOM7":16384,"CL_CUSTOM8":32768}}}},"serializationType":"map"}' }, { "type": "attach_to_player", "jsonSchema": '{"type":"object","properties":{"anchorPointId":{"type":"integer","serializationType":"int32"}},"serializationType":"map"}' }, { "type": "detach_from_player", "jsonSchema": '{"type":"object","properties":{},"serializationType":"map"}' }, { "type": "play_video_stream", "jsonSchema": '{"type":"object","properties":{"src":{"type":"string","serializationType":"optional","optionalJsonSchema":{"type":"string","serializationType":"utf8-string"}},"loop":{"type":"boolean","serializationType":"optional","optionalJsonSchema":{"type":"boolean","serializationType":"boolean"}},"volume":{"type":"number","serializationType":"optional","optionalJsonSchema":{"type":"number","serializationType":"float32"}},"dclCast":{"type":"boolean","serializationType":"optional","optionalJsonSchema":{"type":"boolean","serializationType":"boolean"}}},"serializationType":"map"}' }, { "type": "stop_video_stream", "jsonSchema": '{"type":"object","properties":{},"serializationType":"map"}' }, { "type": "play_audio_stream", "jsonSchema": '{"type":"object","properties":{"url":{"type":"string","serializationType":"utf8-string"},"volume":{"type":"number","serializationType":"optional","optionalJsonSchema":{"type":"number","serializationType":"float32"}}},"serializationType":"map"}' }, { "type": "stop_audio_stream", "jsonSchema": '{"type":"object","properties":{},"serializationType":"map"}' }, { "type": "teleport_player", "jsonSchema": '{"type":"object","properties":{"x":{"type":"integer","serializationType":"int32"},"y":{"type":"integer","serializationType":"int32"}},"serializationType":"map"}' }, { "type": "move_player", "jsonSchema": '{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"z":{"type":"number"},"w":{"type":"number"}},"serializationType":"vector3"},"cameraTarget":{"type":"object","serializationType":"optional","optionalJsonSchema":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"z":{"type":"number"},"w":{"type":"number"}},"serializationType":"vector3"}}},"serializationType":"map"}' }, { "type": "play_default_emote", "jsonSchema": '{"type":"object","properties":{"emote":{"type":"string","serializationType":"utf8-string"}},"serializationType":"map"}' }, { "type": "play_custom_emote", "jsonSchema": '{"type":"object","properties":{"src":{"type":"string","serializationType":"utf8-string"},"loop":{"type":"boolean","serializationType":"optional","optionalJsonSchema":{"type":"boolean","serializationType":"boolean"}}},"serializationType":"map"}' }, { "type": "open_link", "jsonSchema": '{"type":"object","properties":{"url":{"type":"string","serializationType":"utf8-string"}},"serializationType":"map"}' }, { "type": "show_text", "jsonSchema": '{"type":"object","properties":{"text":{"type":"string","serializationType":"utf8-string"},"hideAfterSeconds":{"type":"number","serializationType":"float32"},"font":{"type":"integer","enum":[0,1,2],"default":0,"serializationType":"enum-int","enumObject":{"0":"F_SANS_SERIF","1":"F_SERIF","2":"F_MONOSPACE","F_SANS_SERIF":0,"F_SERIF":1,"F_MONOSPACE":2}},"fontSize":{"type":"number","serializationType":"optional","optionalJsonSchema":{"type":"number","serializationType":"float32"}},"textAlign":{"type":"integer","enum":[0,1,2,3,4,5,6,7,8],"default":4,"serializationType":"enum-int","enumObject":{"0":"TAM_TOP_LEFT","1":"TAM_TOP_CENTER","2":"TAM_TOP_RIGHT","3":"TAM_MIDDLE_LEFT","4":"TAM_MIDDLE_CENTER","5":"TAM_MIDDLE_RIGHT","6":"TAM_BOTTOM_LEFT","7":"TAM_BOTTOM_CENTER","8":"TAM_BOTTOM_RIGHT","TAM_TOP_LEFT":0,"TAM_TOP_CENTER":1,"TAM_TOP_RIGHT":2,"TAM_MIDDLE_LEFT":3,"TAM_MIDDLE_CENTER":4,"TAM_MIDDLE_RIGHT":5,"TAM_BOTTOM_LEFT":6,"TAM_BOTTOM_CENTER":7,"TAM_BOTTOM_RIGHT":8}}},"serializationType":"map"}' }, { "type": "hide_text", "jsonSchema": '{"type":"object","properties":{},"serializationType":"map"}' }, { "type": "start_delay", "jsonSchema": '{"type":"object","properties":{"actions":{"type":"array","items":{"type":"string","serializationType":"utf8-string"},"serializationType":"array"},"timeout":{"type":"number","serializationType":"float32"}},"serializationType":"map"}' }, { "type": "stop_delay", "jsonSchema": '{"type":"object","properties":{"action":{"type":"string","serializationType":"utf8-string"}},"serializationType":"map"}' }, { "type": "start_loop", "jsonSchema": '{"type":"object","properties":{"actions":{"type":"array","items":{"type":"string","serializationType":"utf8-string"},"serializationType":"array"},"interval":{"type":"number","serializationType":"float32"}},"serializationType":"map"}' }, { "type": "stop_loop", "jsonSchema": '{"type":"object","properties":{"action":{"type":"string","serializationType":"utf8-string"}},"serializationType":"map"}' }, { "type": "clone_entity", "jsonSchema": '{"type":"object","properties":{"position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"z":{"type":"number"},"w":{"type":"number"}},"serializationType":"vector3"}},"serializationType":"map"}' }, { "type": "remove_entity", "jsonSchema": '{"type":"object","properties":{},"serializationType":"map"}' }, { "type": "show_image", "jsonSchema": '{"type":"object","properties":{"src":{"type":"string","serializationType":"utf8-string"},"align":{"type":"integer","enum":[0,1,2,3,4,5,6,7,8],"default":4,"serializationType":"enum-int","enumObject":{"0":"TAM_TOP_LEFT","1":"TAM_TOP_CENTER","2":"TAM_TOP_RIGHT","3":"TAM_MIDDLE_LEFT","4":"TAM_MIDDLE_CENTER","5":"TAM_MIDDLE_RIGHT","6":"TAM_BOTTOM_LEFT","7":"TAM_BOTTOM_CENTER","8":"TAM_BOTTOM_RIGHT","TAM_TOP_LEFT":0,"TAM_TOP_CENTER":1,"TAM_TOP_RIGHT":2,"TAM_MIDDLE_LEFT":3,"TAM_MIDDLE_CENTER":4,"TAM_MIDDLE_RIGHT":5,"TAM_BOTTOM_LEFT":6,"TAM_BOTTOM_CENTER":7,"TAM_BOTTOM_RIGHT":8}},"height":{"type":"number","serializationType":"float32"},"width":{"type":"number","serializationType":"float32"},"hideAfterSeconds":{"type":"number","serializationType":"optional","optionalJsonSchema":{"type":"number","serializationType":"float32"}},"text":{"type":"string","serializationType":"optional","optionalJsonSchema":{"type":"string","serializationType":"utf8-string"}},"fontSize":{"type":"number","serializationType":"optional","optionalJsonSchema":{"type":"number","serializationType":"float32"}}},"serializationType":"map"}' }, { "type": "hide_image", "jsonSchema": '{"type":"object","properties":{"imageEntity":{"type":"integer","serializationType":"optional","optionalJsonSchema":{"type":"integer","serializationType":"int32"}}},"serializationType":"map"}' }] } } } }, { "name": "asset-packs::Actions", "jsonSchema": { "type": "object", "properties": { "id": { "type": "integer", "serializationType": "int32" }, "value": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string", "serializationType": "utf8-string" }, "type": { "type": "string", "serializationType": "utf8-string" }, "jsonPayload": { "type": "string", "serializationType": "utf8-string" } }, "serializationType": "map" }, "serializationType": "array" } }, "serializationType": "map" }, "data": { "518": { "json": { "id": 1, "value": [{ "name": "Play Activate Animation", "type": "play_animation", "jsonPayload": '{ "animation": "trigger" }' }, { "name": "Play Sound", "type": "play_sound", "jsonPayload": '{"src":"assets/builder/red_button/sound.mp3"}' }] } }, "519": { "json": { "id": 2, "value": [{ "name": "Play Activate Animation", "type": "play_animation", "jsonPayload": '{ "animation": "trigger" }' }, { "name": "Play Sound", "type": "play_sound", "jsonPayload": '{"src":"assets/builder/red_button/sound.mp3"}' }] } }, "520": { "json": { "id": 3, "value": [{ "name": "Play Activate Animation", "type": "play_animation", "jsonPayload": '{ "animation": "trigger" }' }, { "name": "Play Sound", "type": "play_sound", "jsonPayload": '{"src":"assets/builder/red_button/sound.mp3"}' }] } }, "521": { "json": { "id": 4, "value": [{ "name": "Play Activate Animation", "type": "play_animation", "jsonPayload": '{ "animation": "trigger" }' }, { "name": "Play Sound", "type": "play_sound", "jsonPayload": '{"src":"assets/builder/red_button/sound.mp3"}' }] } } } }, { "name": "asset-packs::Counter", "jsonSchema": { "type": "object", "properties": { "id": { "type": "number", "serializationType": "float32" }, "value": { "type": "integer", "serializationType": "int32" } }, "serializationType": "map" }, "data": { "0": { "json": { "id": 0, "value": 4 } } } }, { "name": "asset-packs::Triggers", "jsonSchema": { "type": "object", "properties": { "value": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "enum": ["on_click", "on_state_change", "on_spawn", "on_tween_end", "on_counter_change", "on_player_enters_area", "on_player_leaves_area", "on_delay", "on_loop", "on_clone", "on_click_image"], "default": "on_click", "serializationType": "enum-string", "enumObject": { "ON_CLICK": "on_click", "ON_STATE_CHANGE": "on_state_change", "ON_SPAWN": "on_spawn", "ON_TWEEN_END": "on_tween_end", "ON_COUNTER_CHANGE": "on_counter_change", "ON_PLAYER_ENTERS_AREA": "on_player_enters_area", "ON_PLAYER_LEAVES_AREA": "on_player_leaves_area", "ON_DELAY": "on_delay", "ON_LOOP": "on_loop", "ON_CLONE": "on_clone", "ON_CLICK_IMAGE": "on_click_image" } }, "conditions": { "type": "array", "serializationType": "optional", "optionalJsonSchema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "serializationType": "optional", "optionalJsonSchema": { "type": "integer", "serializationType": "int32" } }, "type": { "type": "string", "enum": ["when_state_is", "when_state_is_not", "when_counter_equals", "when_counter_is_greater_than", "when_counter_is_less_than"], "default": "when_state_is", "serializationType": "enum-string", "enumObject": { "WHEN_STATE_IS": "when_state_is", "WHEN_STATE_IS_NOT": "when_state_is_not", "WHEN_COUNTER_EQUALS": "when_counter_equals", "WHEN_COUNTER_IS_GREATER_THAN": "when_counter_is_greater_than", "WHEN_COUNTER_IS_LESS_THAN": "when_counter_is_less_than" } }, "value": { "type": "string", "serializationType": "utf8-string" } }, "serializationType": "map" }, "serializationType": "array" } }, "operation": { "type": "string", "serializationType": "optional", "optionalJsonSchema": { "type": "string", "enum": ["and", "or"], "default": "and", "serializationType": "enum-string", "enumObject": { "AND": "and", "OR": "or" } } }, "actions": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer", "serializationType": "optional", "optionalJsonSchema": { "type": "integer", "serializationType": "int32" } }, "name": { "type": "string", "serializationType": "optional", "optionalJsonSchema": { "type": "string", "serializationType": "utf8-string" } } }, "serializationType": "map" }, "serializationType": "array" } }, "serializationType": "map" }, "serializationType": "array" } }, "serializationType": "map" }, "data": { "518": { "json": { "value": [{ "type": "on_click", "conditions": [], "actions": [{ "id": 1, "name": "Play Activate Animation" }, { "id": 1, "name": "Play Sound" }] }] } }, "519": { "json": { "value": [{ "type": "on_click", "conditions": [], "actions": [{ "id": 2, "name": "Play Activate Animation" }, { "id": 2, "name": "Play Sound" }] }] } }, "520": { "json": { "value": [{ "type": "on_click", "conditions": [], "actions": [{ "id": 3, "name": "Play Activate Animation" }, { "id": 3, "name": "Play Sound" }] }] } }, "521": { "json": { "value": [{ "type": "on_click", "conditions": [], "actions": [{ "id": 4, "name": "Play Activate Animation" }, { "id": 4, "name": "Play Sound" }] }] } } } }, { "name": "inspector::TransformConfig", "jsonSchema": { "type": "object", "properties": { "porportionalScaling": { "type": "boolean", "serializationType": "optional", "optionalJsonSchema": { "type": "boolean", "serializationType": "boolean" } } }, "serializationType": "map" }, "data": { "513": { "json": {} }, "514": { "json": {} }, "515": { "json": {} }, "516": { "json": {} }, "517": { "json": {} }, "518": { "json": {} }, "519": { "json": {} }, "520": { "json": {} }, "521": { "json": {} }, "522": { "json": {} }, "523": { "json": {} }, "524": { "json": {} }, "525": { "json": {} }, "526": { "json": {} }, "527": { "json": {} }, "528": { "json": {} }, "529": { "json": {} }, "530": { "json": {} } } }, { "name": "cube-id", "jsonSchema": { "type": "object", "properties": {}, "serializationType": "map" }, "data": { "512": { "json": {} } } }] } }; // node_modules/@dcl/sdk/composite-provider.js var composites = []; @@ -37490,4 +37519,4 @@ long/index.js: * SPDX-License-Identifier: Apache-2.0 *) */ -//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vbm9kZV9tb2R1bGVzL0Bwcm90b2J1ZmpzL2FzcHJvbWlzZS9pbmRleC5qcyIsICIuLi9ub2RlX21vZHVsZXMvQHByb3RvYnVmanMvYmFzZTY0L2luZGV4LmpzIiwgIi4uL25vZGVfbW9kdWxlcy9AcHJvdG9idWZqcy9ldmVudGVtaXR0ZXIvaW5kZXguanMiLCAiLi4vbm9kZV9tb2R1bGVzL0Bwcm90b2J1ZmpzL2Zsb2F0L2luZGV4LmpzIiwgIi4uL25vZGVfbW9kdWxlcy9AcHJvdG9idWZqcy9pbnF1aXJlL2luZGV4LmpzIiwgIi4uL25vZGVfbW9kdWxlcy9AcHJvdG9idWZqcy91dGY4L2luZGV4LmpzIiwgIi4uL25vZGVfbW9kdWxlcy9AcHJvdG9idWZqcy9wb29sL2luZGV4LmpzIiwgIi4uL25vZGVfbW9kdWxlcy9wcm90b2J1ZmpzL3NyYy91dGlsL2xvbmdiaXRzLmpzIiwgIi4uL25vZGVfbW9kdWxlcy9wcm90b2J1ZmpzL3NyYy91dGlsL21pbmltYWwuanMiLCAiLi4vbm9kZV9tb2R1bGVzL3Byb3RvYnVmanMv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AgICByZXR1cm4gbmV3IFByb21pc2UoZnVuY3Rpb24gZXhlY3V0b3IocmVzb2x2ZSwgcmVqZWN0KSB7XHJcbiAgICAgICAgcGFyYW1zW29mZnNldF0gPSBmdW5jdGlvbiBjYWxsYmFjayhlcnIvKiwgdmFyYXJncyAqLykge1xyXG4gICAgICAgICAgICBpZiAocGVuZGluZykge1xyXG4gICAgICAgICAgICAgICAgcGVuZGluZyA9IGZhbHNlO1xyXG4gICAgICAgICAgICAgICAgaWYgKGVycilcclxuICAgICAgICAgICAgICAgICAgICByZWplY3QoZXJyKTtcclxuICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHZhciBwYXJhbXMgPSBuZXcgQXJyYXkoYXJndW1lbnRzLmxlbmd0aCAtIDEpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBvZmZzZXQgPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIHdoaWxlIChvZmZzZXQgPCBwYXJhbXMubGVuZ3RoKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXNbb2Zmc2V0KytdID0gYXJndW1lbnRzW29mZnNldF07XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZS5hcHBseShudWxsLCBwYXJhbXMpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfTtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICBmbi5hcHBseShjdHggfHwgbnVsbCwgcGFyYW1zKTtcclxuICAgICAgICB9IGNhdGNoIChlcnIpIHtcclxuICAgICAgICAgICAgaWYgKHBlbmRpbmcpIHtcclxuICAgICAgICAgICAgICAgIHBlbmRpbmcgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgIHJlamVjdChlcnIpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcbn1cclxuIiwgIlwidXNlIHN0cmljdFwiO1xyXG5cclxuLyoqX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TkgfCA0M10gPSBpKys7XHJcblxyXG4vKipcclxuICogRW5jb2RlcyBhIGJ1ZmZlciB0byBhIGJhc2U2NCBlbmNvZGVkIHN0cmluZy5cclxuICogQHBhcmFtIHtVaW50OEFycmF5fSBidWZmZXIgU291cmNlIGJ1ZmZlclxyXG4gKiBAcGFyYW0ge251bWJlcn0gc3RhcnQgU291cmNlIHN0YXJ0XHJcbiAqIEBwYXJhbSB7bnVtYmVyfSBlbmQgU291cmNlIGVuZFxyXG4gKiBAcmV0dXJucyB7c3RyaW5nfSBCYXNlNjQgZW5jb2RlZCBzdHJpbmdcclxuICovXHJcbmJhc2U2NC5lbmNvZGUgPSBmdW5jdGlvbiBlbmNvZGUoYnVmZmVyLCBzdGFydCwgZW5kKSB7XHJcbiAgICB2YXIgcGFydHMgPSBudWxsLFxyXG4gICAgICAgIGNodW5rID0gW107XHJcbiAgICB2YXIgaSA9IDAsIC8vIG91dHB1dCBpbmRleFxyXG4gICAgICAgIGogPSAwLCAvLyBnb3RvIGluZGV4XHJcbiAgICAgICAgdDsgICAgIC8vIHRlbXBvcmFyeVxyXG4gICAgd2hpbGUgKHN0YXJ0IDwgZW5kKSB7XHJcbiAgICAgICAgdmFyIGIgPSBidWZmZXJbc3RhcnQrK107XHJcbiAgICAgICAgc3dpdGNoIChqKSB7XHJcbiAgICAgICAgICAgIGNhc2UgMDpcclxuICAgICAgICAgICAgICAgIGNodW5rW2krK10gPSBiNjRbYiA+PiAyXTtcclxuICAgICAgICAgICAgICAgIHQgPSAoYiAmIDMpIDw8IDQ7XHJcbiAgICAgICAgICAgICAgICBqID0gMTtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIDE6XHJcbiAgICAgICAgICAgICAgICBjaHVua1tpKytdID0gYjY0W3QgfCBiID4+IDRdO1xyXG4gICAgICAgICAgICAgICAgdCA9IChiICYgMTUpIDw8IDI7XHJcbiAgICAgICAgICAgICAgICBqID0gMjtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIDI6XHJcbiAgICAgICAgICAgICAgICBjaHVua1tpKytdID0gYjY0W3QgfCBiID4+IDZdO1xyXG4gICAgICAgICAgICAgICAgY2h1bmtbaSsrXSA9IGI2NFtiICYgNjNdO1xyXG4gICAgICAgICAgICAgICAgaiA9IDA7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKGkgPiA4MTkxKSB7XHJcbiAgICAgICAgICAgIChwYXJ0cyB8fCAocGFydHMgPSBbXSkpLnB1c2goU3RyaW5nLmZyb21DaGFyQ29kZS5hcHBseShTdHJpbmcsIGNodW5rKSk7XHJcbiAgICAgICAgICAgIGkgPSAwO1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIGlmIChqKSB7XHJcbiAgICAgICAgY2h1bmtbaSsrXSA9IGI2NFt0XTtcclxuICAgICAgICBjaHVua1tpKytdID0gNjE7XHJcbiAgICAgICAgaWYgKGogPT09IDEpXHJcbiAgICAgICAgICAgIGNodW5rW2krK10gPSA2MTtcclxuICAgIH1cclxuICAgIGlmIChwYXJ0cykge1xyXG4gICAgICAgIGlmIChpKVxyXG4gICAgICAgICAgICBwYXJ0cy5wdXNoKFN0cmluZy5mcm9tQ2hhckNvZGUuYXBwbHkoU3RyaW5nLCBjaHVuay5zbGljZSgwLCBpKSkpO1xyXG4gICAgICAgIHJldHVybiBwYXJ0cy5qb2luKFwiXCIpO1xyXG4gICAgfVxyXG4gICAgcmV0dXJuIFN0cmluZy5mcm9tQ2hhckNvZGUuYXBwbHkoU3RyaW5nLCBjaHVuay5zbGljZSgwLCBpKSk7XHJcbn07XHJcblxyXG52YXIgaW52YWxpZEVuY29kaW5nID0gXCJpbnZhbGlkIGVuY29kaW5nXCI7XHJcblxyXG4vKipcclxuICogRGVjb2RlcyBhIGJhc2U2NCBlbmNvZGVkIHN0cmluZyB0byBhIGJ1ZmZlci5cclxuICogQHBhcm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XG4gICAgICAgICAgICAgICAgdCA9IGM7XHJcbiAgICAgICAgICAgICAgICBqID0gMjtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIDI6XHJcbiAgICAgICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gKHQgJiAxNSkgPDwgNCB8IChjICYgNjApID4+IDI7XHJcbiAgICAgICAgICAgICAgICB0ID0gYztcclxuICAgICAgICAgICAgICAgIGogPSAzO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2UgMzpcclxuICAgICAgICAgICAgICAgIGJ1ZmZlcltvZmZzZXQrK10gPSAodCAmIDMpIDw8IDYgfCBjO1xyXG4gICAgICAgICAgICAgICAgaiA9IDA7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICB9XHJcbiAgICB9XHJcbiAgICBpZiAoaiA9PT0gMSlcclxuICAgICAgICB0aHJvdyBFcnJvcihpbnZhbGlkRW5jb2RpbmcpO1xyXG4gICAgcmV0dXJuIG9mZnNldCAtIHN0YXJ0O1xyXG59O1xyXG5cclxuLyoqXHJcbiAqIFRlc3RzIGlmIHRoZSBzcGVjaWZpZWQgc3RyaW5nIGFwcGVhcnMgdG8gYmUgYmFzZTY0IGVuY29kZWQuXHJcbiAqIEBwYXJhbSB7c3RyaW5nfSBzdHJpbmcgU3RyaW5nIHRvIHRlc3RcclxuICogQHJldHVybnMge2Jvb2xlYW59IGB0cnVlYCBpZiBwcm9iYWJseSBiYXNlNjQgZW5jb2RlZCwgb3RoZXJ3aXNlIGZhbHNlXHJcbiAqL1xyXG5iYXNlNjQudGVzdCA9IGZ1bmN0aW9uIHRlc3Qoc3RyaW5nKSB7XHJcbiAgICByZXR1cm4gL14oPzpbQS1aYS16MC05Ky9dezR9KSooPzpbQS1aYS16MC05Ky9dezJ9PT18W0EtWmEtejAtOSsvXXszfT0pPyQvLnRlc3Qoc3RyaW5nKTtcclxufTtcclxu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vcihNYXRoLmxvZyh2YWwpIC8gTWF0aC5MTjIpLFxyXG4gICAgICAgICAgICAgICAgICAgIG1hbnRpc3NhID0gTWF0aC5yb3VuZCh2YWwgKiBNYXRoLnBvdygyLCAtZXhwb25lbnQpICogODM4ODYwOCkgJiA4Mzg4NjA3O1xyXG4gICAgICAgICAgICAgICAgd3JpdGVVaW50KChzaWduIDw8IDMxIHwgZXhwb25lbnQgKyAxMjcgPDwgMjMgfCBtYW50aXNzYSkgPj4+IDAsIGJ1ZiwgcG9zKTtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZXhwb3J0cy53cml0ZUZsb2F0TEUgPSB3cml0ZUZsb2F0X2llZWU3NTQuYmluZChudWxsLCB3cml0ZVVpbnRMRSk7XHJcbiAgICAgICAgZXhwb3J0cy53cml0ZUZsb2F0QkUgPSB3cml0ZUZsb2F0X2llZWU3NTQuYmluZChudWxsLCB3cml0ZVVpbnRCRSk7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHJlYWRGbG9hdF9pZWVlNzU0KHJlYWRVaW50LCBidWYsIHBvcykge1xyXG4gICAgICAgICAgICB2YXIgdWludCA9IHJlYWRVaW50KGJ1ZiwgcG9zKSxcclxuICAgICAgICAgICAgICAgIHNpZ24gPSAodWludCA+PiAzMSkgKiAyICsgMSxcclxuICAgICAgICAgICAgICAgIGV4cG9uZW50ID0gdWludCA+Pj4gMjMgJiAyNTUsXHJcbiAgICAgICAgICAgICAgICBtYW50aXNzYSA9IHVpbnQgJiA4Mzg4NjA3O1xyXG4gICAgICAgICAgICByZXR1cm4gZXhwb25lbnQgPT09IDI1NVxyXG4gICAgICAgICAgICAgICAgPyBtYW50aXNzYVxyXG4gICAgICAgICAgICAgICAgPyBOYU5cclxuICAgICAgICAgICAgICAgIDogc2lnbiAqIEluZmluaXR5XHJcbiAgICAgICAgICAgICAgICA6IGV4cG9uZW50ID09PSAwIC8vIGRlbm9ybWFsXHJcbiAgICAgICAgICAgICAgICA/IHNpZ24gKiAxLjQwMTI5ODQ2NDMyNDgxN2UtNDUgKiBtYW50aXNzYVxyXG4gICAgICAgICAgICAgICAgOiBzaWduICogTWF0aC5wb3coMiwgZXhwb25lbnQgLSAxNTApICogKG1hbnRpc3NhICsgODM4ODYwOCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBleHBvcnRzLnJlYWRGbG9hdExFID0gcmVhZEZsb2F0X2llZWU3NTQuYmluZChudWxsLCByZWFkVWludExFKTtcclxuICAgICAgICBleHBvcnRzLnJlYWRGbG9hdEJFID0gcmVhZEZsb2F0X2llZWU3NTQuYmluZChudWxsLCByZWFkVWludEJFKTtcclxuXHJcbiAgICB9KSgpO1xyXG5cclxuICAgIC8vIGRvdWJsZTogdHlwZWQgYXJyYXlcclxuICAgIGlmICh0eXBlb2YgRmxvYXQ2NEFycmF5ICE9PSBcInVuZGVmaW5lZFwiKSAoZnVuY3Rpb24oKSB7XHJcblxyXG4gICAgICAgIHZhciBmNjQgPSBuZXcgRmxvYXQ2NEFycmF5KFstMF0pLFxyXG4gICAgICAgICAgICBmOGIgPSBuZXcgVWludDhBcnJheShmNjQuYnVmZmVyKSxcclxuICAgICAgICAgICAgbGUgID0gZjhiWzddID09PSAxMjg7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHdyaXRlRG91YmxlX2Y2NF9jcHkodmFsLCBidWYsIHBvcykge1xyXG4gICAgICAgICAgICBmNjRbMF0gPSB2YWw7XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgICAgXSA9IGY4YlswXTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDFdID0gZjhiWzFdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgMl0gPSBmOGJbMl07XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyAzXSA9IGY4YlszXTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDRdID0gZjhiWzRdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgNV0gPSBmOGJbNV07XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyA2XSA9IGY4Yls2XTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDddID0gZjhiWzddO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gd3JpdGVEb3VibGVfZjY0X3Jldih2YWwsIGJ1ZiwgcG9zKSB7XHJcbiAgICAgICAgICAgIGY2NFswXSA9IHZhbDtcclxuICAgICAgICAgICAgYnVmW3BvcyAgICBdID0gZjhiWzddO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgMV0gPSBmOGJbNl07XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyAyXSA9IGY4Yls1XTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDNdID0gZjhiWzRdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgNF0gPSBmOGJbM107XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyA1XSA9IGY4YlsyXTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDZdID0gZjhiWzFdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgN10gPSBmOGJbMF07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xyXG4gICAgICAgIGV4cG9ydHMud3JpdGVEb3VibGVMRSA9IGxlID8gd3JpdGVEb3VibGVfZjY0X2NweSA6IHdyaXRlRG91YmxlX2Y2NF9yZXY7XHJcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cclxuICAgICAgICBleHBvcnRzLndyaXRlRG91YmxlQkUgPSBsZSA/IHdyaXRlRG91YmxlX2Y2NF9yZXYgOiB3cml0ZURvdWJsZV9mNjRfY3B5O1xyXG5cclxuICAgICAgICBmdW5jdGlvbiByZWFkRG91YmxlX2Y2NF9jcHkoYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgZjhiWzBdID0gYnVmW3BvcyAgICBdO1xyXG4gICAgICAgICAgICBmOGJbMV0gPSBidWZbcG9zICsgMV07XHJcbiAgICAgICAgICAgIGY4YlsyXSA9IGJ1Zltwb3MgKyAyXTtcclxuICAgICAgICAgICAgZjhiWzNdID0gYnVmW3BvcyArIDNdO1xyXG4gICAgICAgICAgICBmOGJbNF0gPSBidWZbcG9zICsgNF07XHJcbiAgICAgICAgICAgIGY4Yls1XSA9IGJ1Zltwb3MgKyA1XTtcclxuICAgICAgICAgICAgZjhiWzZdID0gYnVmW3BvcyArIDZdO1xyXG4gICAgICAgICAgICBmOGJbN10gPSBidWZbcG9zICsgN107XHJcbiAgICAgICAgICAgIHJldHVybiBmNjRbMF07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiByZWFkRG91YmxlX2Y2NF9yZXYoYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgZjhiWzddID0gYnVmW3BvcyAgICBdO1xyXG4gICAgICAgICAgICBmOGJbNl0gPSBidWZbcG9zICsgMV07XHJcbiAgICAgICAgICAgIGY4Yls1XSA9IGJ1Zltwb3MgKyAyXTtcclxuICAgICAgICAgICAgZjhiWzRdID0gYnVmW3BvcyArIDNdO1xyXG4gICAgICAgICAgICBmOGJbM10gPSBidWZbcG9zICsgNF07XHJcbiAgICAgICAgICAgIGY4YlsyXSA9IGJ1Zltwb3MgKyA1XTtcclxuICAgICAgICAgICAgZjhiWzFdID0gYnVmW3BvcyArIDZdO1xyXG4gICAgICAgICAgICBmOGJbMF0gPSBidWZbcG9zICsgN107XHJcbiAgICAgICAgICAgIHJldHVybiBmNjRbMF07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xyXG4gICAgICAgIGV4cG9ydHMucmVhZERvdWJsZUxFID0gbGUgPyByZWFkRG91YmxlX2Y2NF9jcHkgOiByZWFkRG91YmxlX2Y2NF9yZXY7XHJcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cclxuICAgICAgICBleHBvcnRzLnJlYWREb3VibGVCRSA9IGxlID8gcmVhZERvdWJsZV9mNjRfcmV2IDogcmVhZERvdWJsZV9mNjRfY3B5O1xyXG5cclxuICAgIC8vIGRvdWJsZTogaWVlZTc1NFxyXG4gICAgfSkoKTsgZWxzZSAoZnVuY3Rpb24oKSB7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHdyaXRlRG91YmxlX2llZWU3NTQod3JpdGVVaW50LCBvZmYwLCBvZmYxLCB2YWwsIGJ1ZiwgcG9zKSB7XHJcbiAgICAgICAgICAgIHZhciBzaWduID0gdmFsIDwgMCA/IDEgOiAwO1xyXG4gICAgICAgICAgICBpZiAoc2lnbilcclxuICAgICAgICAgICAgICAgIHZhbCA9IC12YWw7XHJcbiAgICAgICAgICAgIGlmICh2YWwgPT09IDApIHtcclxuICAgICAgICAgICAgICAgIHdyaXRlVWludCgwLCBidWYsIHBvcyArIG9mZjApO1xyXG4gICAgICAgICAgICAgICAgd3JpdGVVaW50KDEgLyB2YWwgPiAwID8gLyogcG9zaXRpdmUgKi8gMCA6IC8qIG5lZ2F0aXZlIDAgKi8gMjE0NzQ4MzY0OCwgYnVmLCBwb3MgKyBvZmYxKTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChpc05hTih2YWwpKSB7XHJcbiAgICAgICAgICAgICAgICB3cml0ZVVpbnQoMCwgYnVmLCBwb3MgKyBvZmYwKTtcclxuICAgICAgICAgICAgICAgIHdyaXRlVWludCgyMTQ2OTU5MzYwLCBidWYsIHBvcyArIG9mZjEpO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHZhbCA+IDEuNzk3NjkzMTM0ODYyMzE1N2UrMzA4KSB7IC8vICstSW5maW5pdHlcclxuICAgICAgICAgICAgICAgIHdyaXRlVWludCgwLCBidWYsIHBvcyArIG9mZjApO1xyXG4gICAgICAgICAgICAgICAgd3JpdGVVaW50KChzaWduIDw8IDMxIHwgMjE0NjQzNTA3MikgPj4+IDAsIGJ1ZiwgcG9zICsgb2ZmMSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgbWFudGlzc2E7XHJcbiAgICAgICAgICAgICAgICBpZiAodmFsIDwgMi4yMjUwNzM4NTg1MDcyMDE0ZS0zMDgpIHsgLy8gZGVub3JtYWxcclxuICAgICAgICAgICAgICAgICAgICBtYW50aXNzYSA9IHZhbCAvIDVlLTMyNDtcclxuICAgICAgICAgICAgICAgICAgICB3cml0ZVVpbnQobWFudGlzc2EgPj4+IDAsIGJ1ZiwgcG9zICsgb2ZmMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVVaW50KChzaWduIDw8IDMxIHwgbWFudGlzc2EgLyA0Mjk0OTY3Mjk2KSA+Pj4gMCwgYnVmLCBwb3MgKyBvZmYxKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGV4cG9uZW50ID0gTWF0aC5mbG9vcihNYXRoLmxvZyh2YWwpIC8gTWF0aC5MTjIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChleHBvbmVudCA9PT0gMTAyNClcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXhwb25lbnQgPSAxMDIzO1xyXG4gICAgICAgICAgICAgICAgICAgIG1hbnRpc3NhID0gdmFsICogTWF0aC5wb3coMiwgLWV4cG9uZW50KTtcclxuICAgICAgICAgICAgICAgICAgICB3cml0ZVVpbnQobWFudGlzc2EgKiA0NTAzNTk5NjI3MzcwNDk2ID4+PiAwLCBidWYsIHBvcyArIG9mZjApO1xyXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlVWludCgoc2lnbiA8PCAzMSB8IGV4cG9uZW50ICsgMTAyMyA8PCAyMCB8IG1hbnRpc3NhICogMTA0ODU3NiAmIDEwNDg1NzUpID4+PiAwLCBidWYsIHBvcyArIG9mZjEpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBleHBvcnRzLndyaXRlRG91YmxlTEUgPSB3cml0ZURvdWJsZV9pZWVlNzU0LmJpbmQobnVsbCwgd3JpdGVVaW50TEUsIDAsIDQpO1xyXG4gICAgICAgIGV4cG9ydHMud3JpdGVEb3VibGVCRSA9IHdyaXRlRG91YmxlX2llZWU3NTQuYmluZChudWxsLCB3cml0ZVVpbnRCRSwgNCwgMCk7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHJlYWREb3VibGVfaWVlZTc1NChyZWFkVWludCwgb2ZmMCwgb2ZmMSwgYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgdmFyIGxvID0gcmVhZFVpbnQoYnVmLCBwb3MgKyBvZmYwKSxcclxuICAgICAgICAgICAgICAgIGhpID0gcmVhZFVpbnQoYnVmLCBwb3MgKyBvZmYxKTtcclxuICAgICAgICAgICAgdmFyIHNpZ24gPSAoaGkgPj4gMzEpICogMiArIDEsXHJcbiAgICAgICAgICAgICAgICBleHBvbmVudCA9IGhpID4+PiAyMCAmIDIwNDcsXHJcbiAgICAgICAgICAgICAgICBtYW50aXNzYSA9IDQyOTQ5NjcyOTYgKiAoaGkgJiAxMDQ4NTc1KSArIGxvO1xyXG4gICAgICAgICAgICByZXR1cm4gZXhwb25lbnQgPT09IDIwNDdcclxuICAgICAgICAgICAgICAgID8gbWFudGlzc2FcclxuICAgICAgICAgICAgICAgID8gTmFOXHJcbiAgICAgICAgICAgICAgICA6IHNpZ24gKiBJbmZpbml0eVxyXG4gICAgICAgICAgICAgICAgOiBleHBvbmVudCA9PT0gMCAvLyBkZW5vcm1hbFxyXG4gICAgICAgICAgICAgICAgPyBzaWduICogNWUtMzI0ICogbWFudGlzc2FcclxuICAgICAgICAgICAgICAgIDogc2lnbiAqIE1hdGgucG93KDIsIGV4cG9uZW50IC0gMTA3NSkgKiAobWFudGlzc2EgKyA0NTAzNTk5NjI3MzcwNDk2KTtcclxuICAgICAgICB9X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wgb2Zmc2V0KSB7XHJcbiAgICB2YXIgc3RhcnQgPSBvZmZzZXQsXHJcbiAgICAgICAgYzEsIC8vIGNoYXJhY3RlciAxXHJcbiAgICAgICAgYzI7IC8vIGNoYXJhY3RlciAyXHJcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHN0cmluZy5sZW5ndGg7ICsraSkge1xyXG4gICAgICAgIGMxID0gc3RyaW5nLmNoYXJDb2RlQXQoaSk7XHJcbiAgICAgICAgaWYgKGMxIDwgMTI4KSB7XHJcbiAgICAgICAgICAgIGJ1ZmZlcltvZmZzZXQrK10gPSBjMTtcclxuICAgICAgICB9IGVsc2UgaWYgKGMxIDwgMjA0OCkge1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgPj4gNiAgICAgICB8IDE5MjtcclxuICAgICAgICAgICAgYnVmZmVyW29mZnNldCsrXSA9IGMxICAgICAgICYgNjMgfCAxMjg7XHJcbiAgICAgICAgfSBlbHNlIGlmICgoYzEgJiAweEZDMDApID09PSAweEQ4MDAgJiYgKChjMiA9IHN0cmluZy5jaGFyQ29kZUF0KGkgKyAxKSkgJiAweEZDMDApID09PSAweERDMDApIHtcclxuICAgICAgICAgICAgYzEgPSAweDEwMDAwICsgKChjMSAmIDB4MDNGRikgPDwgMTApICsgKGMyICYgMHgwM0ZGKTtcclxuICAgICAgICAgICAgKytpO1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgPj4gMTggICAgICB8IDI0MDtcclxuICAgICAgICAgICAgYnVmZmVyW29mZnNldCsrXSA9IGMxID4+IDEyICYgNjMgfCAxMjg7XHJcbiAgICAgICAgICAgIGJ1ZmZlcltvZmZzZXQrK10gPSBjMSA+PiA2ICAmIDYzIHwgMTI4O1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgICAgICAgJiA2MyB8IDEyODtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBidWZmZXJbb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gICAgICAvLyA0dGhcbiAgICAgICAgYml0cy5sbyA9IChiaXRzLmxvIHwgKHRoaXMuYnVmW3RoaXMucG9zKytdICYgMTI3KSA8PCBpICogNykgPj4+IDA7XG4gICAgICAgIHJldHVybiBiaXRzO1xuICAgIH1cbiAgICBpZiAodGhpcy5sZW4gLSB0aGlzLnBvcyA+IDQpIHsgLy8gZmFzdCByb3V0ZSAoaGkpXG4gICAgICAgIGZvciAoOyBpIDwgNTsgKytpKSB7XG4gICAgICAgICAgICAvLyA2dGguLjEwdGhcbiAgICAgICAgICAgIGJpdHMuaGkgPSAoYml0cy5oaSB8ICh0aGlzLmJ1Zlt0aGlzLnBvc10gJiAxMjcpIDw8IGkgKiA3ICsgMykgPj4+IDA7XG4gICAgICAgICAgICBpZiAodGhpcy5idWZbdGhpcy5wb3MrK10gPCAxMjgpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGJpdHM7XG4gICAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgICBmb3IgKDsgaSA8IDU7ICsraSkge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGlmICovXG4gICAgICAgICAgICBpZiAodGhpcy5wb3MgPj0gdGhpcy5sZW4pXG4gICAgICAgICAgICAgICAgdGhyb3cgaW5kZXhPdXRPZlJhbmdlKHRoaXMpO1xuICAgICAgICAgICAgLy8gNnRoLi4xMHRoXG4gICAgICAgICAgICBiaXRzLmhpID0gKGJpdHMuaGkgfCAodGhpcy5idWZbdGhpcy5wb3NdICYgMTI3KSA8PCBpICogNyArIDMpID4+PiAwO1xuICAgICAgICAgICAgaWYgKHRoaXMuYnVmW3RoaXMucG9zKytdIDwgMTI4KVxuICAgICAgICAgICAgICAgIHJldHVybiBiaXRzO1xuICAgICAgICB9XG4gICAgfVxuICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgdGhyb3cgRXJyb3IoXCJpbnZhbGlkIHZhcmludCBlbmNvZGluZ1wiKTtcbn1cblxuL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YgbGVuZ3RoID09PSBcIm51bWJlclwiKSB7XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBpZiAqL1xuICAgICAgICBpZiAodGhpcy5wb3MgKyBsZW5ndGggPiB0aGlzLmxlbilcbiAgICAgICAgICAgIHRocm93IGluZGV4T3V0T2ZSYW5nZSh0aGlzLCBsZW5ndGgpO1xuICAgICAgICB0aGlzLnBvcyArPSBsZW5ndGg7XG4gICAgfSBlbHNlIHtcbiAgICAgICAgZG8ge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGlmICovXG4gICAgICAgICAgICBpZiAodGhpcy5wb3MgPj0gdGhpcy5sZW4pXG4gICAgICAgICAgICAgICAgdGhyb3cgaW5kZXhPdXRPZlJhbmdlKHRoaXMpO1xuICAgICAgICB9IHdoaWxlICh0aGlzLmJ1Zlt0aGlzLnBvcysrXSAmIDEyOCk7XG4gICAgfVxuICAgIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBTa2lwcyB0aGUgbmV4dCBlbGVtZW50IG9mIHRoZSBzcGVjaWZpZWQgd2lyZSB0eXBlLlxuICogQHBhcmFtIHtudW1iZXJ9IHdpcmVUeXBlIFdpcmUgdHlwZSByZWNlaXZlZFxuICogQHJldHVybnMge1JlYWRlcn0gYHRoaXNgXG4gKi9cblJlYWRlci5wcm90b3R5cGUuc2tpcFR5cGUgPSBmdW5jdGlvbih3aXJlVHlwZSkge1xuICAgIHN3aXRjaCAod2lyZVR5cGUpIHtcbiAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgdGhpcy5za2lwKCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgdGhpcy5za2lwKDgpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgIHRoaXMuc2tpcCh0aGlzLnVpbnQzMigpKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlI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Jlc3BvbnNlQ3RvciwgcmVxdWVzdCk7XG5cbiAgICBpZiAoIXNlbGYucnBjSW1wbCkge1xuICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkgeyBjYWxsYmFjayhFcnJvcihcImFscmVhZHkgZW5kZWRcIikpOyB9LCAwKTtcbiAgICAgICAgcmV0dXJuIHVuZGVmaW5lZDtcbiAgICB9XG5cbiAgICB0cnkge1xuICAgICAgICByZXR1cm4gc2VsZi5ycGNJbXBsKFxuICAgICAgICAgICAgbWV0aG9kLFxuICAgICAgICAgICAgcmVxdWVzdEN0b3Jbc2VsZi5yZXF1ZXN0RGVsaW1pdGVkID8gXCJlbmNvZGVEZWxpbWl0ZWRcIiA6IFwiZW5jb2RlXCJdKHJlcXVlc3QpLmZpbmlzaCgpLFxuICAgICAgICAgICAgZnVuY3Rpb24gcnBjQ2FsbGJhY2soZXJyLCByZXNwb25zZSkge1xuXG4gICAgICAgICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmVtaXQoXCJlcnJvclwiLCBlcnIsIG1ldGhvZCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhlcnIpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmVuZCgvKiBlbmRlZEJ5UlBDICovIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICghKHJlc3BvbnNlIGluc3RhbmNlb2YgcmVzcG9uc2VDdG9yKSkge1xuICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2UgPSByZXNwb25zZUN0b3Jbc2VsZi5yZXNwb25zZURlbGltaXRlZCA/IFwiZGVjb2RlRGVsaW1pdGVkXCIgOiBcImRlY29kZVwiXShyZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5lbWl0KFwiZXJyb3JcIiwgZXJyLCBtZXRob2QpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNhbGxiYWNrKGVycik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBzZWxmLmVtaXQoXCJkYXRhXCIsIHJlc3BvbnNlLCBtZXRob2QpO1xuICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhudWxsLCByZXNwb25zZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICk7XG4gICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICAgIHNlbGYuZW1pdChcImVycm9yXCIsIGVyciwgbWV0aG9kKTtcbiAgICAgICAgc2V0VGltZW91dChmdW5jdGlvbigpIHsgY2FsbGJhY2soZXJyKTsgfSwgMCk7XG4gICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgfVxufTtcblxuLyoqXG4gKiBFbmRzIHRoaXMgc2VydmljZSBhbmQgZW1pdHMgdGhlIGBlbmRgIGV2ZW50LlxuICogQHBhcmFtIHtib29sZWFufSBbZW5kZWRCeVJQQz1mYWxzZV0gV2hldGhlciB0aGUgc2VydmljZSBoYXMgYmVlbiBlbmRlZCBieSB0aGUgUlBDIGltcGxlbWVudGF0aW9uLlxuICogQHJldHVybnMge3JwYy5TZXJ2aWNlfSBgdGhpc2BcbiAqL1xuU2VydmljZS5wcm90b3R5cGUuZW5kID0gZnVuY3Rpb24gZW5kKGVuZGVkQnlSUEMpIHtcbiAgICBpZiAodGhpcy5ycGNJbXBsKSB7XG4gICAgICAgIGlmICghZW5kZWRCeVJQQykgLy8gc2lnbmFsIGVuZCB0byBycGNJbXBsXG4gICAgICAgICAgICB0aGlzLnJwY0ltcGw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b3ZpZGVyO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgX2N1cnJlbnRWYWx1ZToge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICByZXR1cm4gY29udGV4dC5fY3VycmVudFZhbHVlO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uIChfY3VycmVudFZhbHVlKSB7XG4gICAgICAgICAgY29udGV4dC5fY3VycmVudFZhbHVlID0gX2N1cnJlbnRWYWx1ZTtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIF9jdXJyZW50VmFsdWUyOiB7XG4gICAgICAgIGdldDogZnVuY3Rpb24gKCkge1xuICAgICAgICAgIHJldHVybiBjb250ZXh0Ll9jdXJyZW50VmFsdWUyO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uIChfY3VycmVudFZhbHVlMikge1xuICAgICAgICAgIGNvbnRleHQuX2N1cnJlbnRWYWx1ZTIgPSBfY3VycmVudFZhbHVlMjtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIF90aHJlYWRDb3VudDoge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICByZXR1cm4gY29udGV4dC5fdGhyZWFkQ291bnQ7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKF90aHJlYWRDb3VudCkge1xuICAgICAgICAgIGNvbnRleHQuX3RocmVhZENvdW50ID0gX3RocmVhZENvdW50O1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgQ29uc3VtZXI6IHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgaWYgKCFoYXNXYXJuZWRBYm91dFVzaW5nTmVzdGVkQ29udGV4dENvbnN1bWVycykge1xuICAgICAgICAgICAgaGFzV2FybmVkQWJvdXRVc2luZ05lc3RlZENvbnRleHRDb25zdW1lcnMgPSB0cnVlO1xuXG4gICAgICAgIC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Blc2xpbnQtZGlzYWJsZSByZWFjdC1pbnRlcm5hbC9uby1wcm9kdWN0aW9uLWxvZ2dpbmcgKi9cbiAgICAgIHZhciBwcm9wcyA9IHtcbiAgICAgICAgY29uZmlndXJhYmxlOiB0cnVlLFxuICAgICAgICBlbnVtZXJhYmxlOiB0cnVlLFxuICAgICAgICB3cml0YWJsZTogdHJ1ZVxuICAgICAgfTsgLy8gJEZsb3dGaXhNZSBGbG93IHRoaW5rcyBjb25zb2xlIGlzIGltbXV0YWJsZS5cblxuICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnRpZXMoY29uc29sZSwge1xuICAgICAgICBsb2c6IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkxvZ1xuICAgICAgICB9KSxcbiAgICAgICAgaW5mbzogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2SW5mb1xuICAgICAgICB9KSxcbiAgICAgICAgd2FybjogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2V2FyblxuICAgICAgICB9KSxcbiAgICAgICAgZXJyb3I6IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkVycm9yXG4gICAgICAgIH0pLFxuICAgICAgICBncm91cDogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2R3JvdXBcbiAgICAgICAgfSksXG4gICAgICAgIGdyb3VwQ29sbGFwc2VkOiBhc3NpZ24oe30sIHByb3BzLCB7XG4gICAgICAgICAgdmFsdWU6IHByZXZHcm91cENvbGxhcHNlZFxuICAgICAgICB9KSxcbiAgICAgICAgZ3JvdXBFbmQ6IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkdyb3VwRW5kXG4gICAgICAgIH0pXG4gICAgICB9KTtcbiAgICAgIC8qIGVzbGludC1lbmFibGUgcmVhY3Q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LiBMZXQncyByZW1vdmUgaXQgdG8gbWFrZSBpdCBwcmV0dGllci5cbiAgICAgICAgICAgICAgICB2YXIgX2ZyYW1lID0gJ1xcbicgKyBzYW1wbGVMaW5lc1tzXS5yZXBsYWNlKCcgYXQgbmV3ICcsICcgYXQgJyk7IC8vIElmIG91ciBjb21wb25lbnQgZnJhbWUgaXMgbGFiZWxlZCBcIjxhbm9ueW1vdXM+XCJcbiAgICAgICAgICAgICAgICAvLyBidXQgd2UgaGF2ZSBhIHVzZXItcHJvdmlkZWQgXCJkaXNwbGF5TmFtZVwiXG4gICAgICAgICAgICAgICAgLy8gc3BsaWNlIGl0IGluIHRvIG1ha2UgdGhlIHN0YWNrIG1vcmUgcmVhZGFibGUuXG5cblxuICAgICAgICAgICAgICAgIGlmIChmbi5kaXNwbGF5TmFtZSAmJiBfZnJhbWUuaW5jbHVkZXMoJzxhbm9ueW1vdXM+JykpIHtcbiAgICAgICAgICAgICAgICAgIF9mcmFtZSA9IF9mcmFtZS5yZXBsYWNlKCc8YW5vbnltb3VzPicsIGZuLmRpc3BsYXlOYW1lKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGZuID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudEZyYW1lQ2FjaGUuc2V0KGZuLCBfZnJhbWUpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gLy8gUmV0dXJuIHRoZSBsaW5lIHdlIGZvdW5kLlxuXG5cbiAgICAgICAgICAgICAgICByZXR1cm4gX2ZyYW1lO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IHdoaWxlIChzID49IDEgJiYgYyA+PSAwKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfSBmaW5hbGx5IHtcbiAgICByZW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Jlc3QgKGFuZCBhZGQgbW9yZSkuXG5cbnZhciBQbGFjZW1lbnQgPVxuLyogICAgICAgICAgICAgICAgICAgICovXG4yO1xudmFyIFVwZGF0ZSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjQ7XG52YXIgQ2hpbGREZWxldGlvbiA9XG4vKiAgICAgICAgICAgICAgICAqL1xuMTY7XG52YXIgQ29udGVudFJlc2V0ID1cbi8qICAgICAgICAgICAgICAgICAqL1xuMzI7XG52YXIgQ2FsbGJhY2sgPVxuLyogICAgICAgICAgICAgICAgICAgICAqL1xuNjQ7XG52YXIgRGlkQ2FwdHVyZSA9XG4vKiAgICAgICAgICAgICAgICAgICAqL1xuMTI4O1xudmFyIEZvcmNlQ2xpZW50UmVuZGVyID1cbi8qICAgICAgICAgICAgKi9cbjI1NjtcbnZhciBSZWYgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAgICovXG41MTI7XG52YXIgU25hcHNob3QgPVxuLyogICAgICAgICAgICAgICAgICAgICAqL1xuMTAyNDtcbnZhciBQYXNzaXZlID1cbi8qICAgICAgICAgICAgICAgICAgICAgICovXG4yMDQ4O1xudmFyIEh5ZHJhdGluZyA9XG4vKiAgICAgICAgICAgICAgICAgICAgKi9cbjQwOTY7XG52YXIgVmlzaWJpbGl0eSA9XG4vKiAgICAgICAgICAgICAgICAgICAqL1xuODE5MjtcbnZhciBTdG9yZUNvbnNpc3RlbmN5ID1cbi8qICAgICAgICAgICAgICovXG4xNjM4NDtcbnZhciBMaWZlY3ljbGVFZmZlY3RNYXNrID0gUGFzc2l2ZSB8IFVwZGF0ZSB8IENhbGxiYWNrIHwgUmVmIHwgU25hcHNob3QgfCBTdG9yZUNvbnNpc3RlbmN5OyAvLyBVbmlvbiBvZiBhbGwgY29tbWl0IGZsYWdzIChmbGFncyB3aXRoIHRoZSBsaWZldGltZSBvZiBhIHBhcnRpY3VsYXIgY29tbWl0KVxuXG52YXIgSG9zdEVmZmVjdE1hc2sgPVxuLyog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pIHtcbiAgICAgICAgICBkaWRGaW5kQ2hpbGQgPSB0cnVlO1xuICAgICAgICAgIGIgPSBwYXJlbnRBO1xuICAgICAgICAgIGEgPSBwYXJlbnRCO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgX2NoaWxkID0gX2NoaWxkLnNpYmxpbmc7XG4gICAgICB9XG5cbiAgICAgIGlmICghZGlkRmluZENoaWxkKSB7XG4gICAgICAgIC8vIFNlYXJjaCBwYXJlbnQgQidzIGNoaWxkIHNldFxuICAgICAgICBfY2hpbGQgPSBwYXJlbnRCLmNoaWxkO1xuXG4gICAgICAgIHdoaWxlIChfY2hpbGQpIHtcbiAgICAgICAgICBpZiAoX2NoaWxkID09PSBhKSB7XG4gICAgICAgICAgICBkaWRGaW5kQ2hpbGQgPSB0cnVlO1xuICAgICAgICAgICAgYSA9IHBhcmVudEI7XG4gICAgICAgICAgICBiID0gcGFyZW50QTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGlmIChfY2hpbGQgPT09IGIpIHtcbiAgICAgICAgICAgIGRpZEZpbmRDaGlsZCA9IHRydWU7XG4gICAgICAgICAgICBiID0gcGFyZW50QjtcbiAgICAgICAgICAgIGEgPSBwYXJlbnRBO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgX2NoaWxkID0gX2NoaWxkLnNpYmxpbmc7XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoIWRpZEZpbmRDaGlsZCkge1xuICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQ2hpbGQgd2FzIG5vdCBmb3VuZCBpbiBlaXRoZXIgcGFyZW50IHNldC4gVGhpcyBpbmRpY2F0ZXMgYSBidWcgJyArICdpbiBSZWFjdCByZWxhdGVkIHRvIHRoZSByZXR1cm4gcG9pbnRlci4gUGxlYXNlIGZpbGUgYW4gaXNzdWUuJyk7XG4gICAgICAgIH1cbiAgICAgIH1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PGFub255bW91cz4nLCBmbi5kaXNwbGF5TmFtZSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBmbiA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRGcmFtZUNhY2hlLnNldChmbiwgX2ZyYW1lKTtcbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IC8vIFJldHVybiB0aGUgbGluZSB3ZSBmb3VuZC5cblxuXG4gICAgICAgICAgICAgICAgcmV0dXJuIF9mcmFtZTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSB3aGlsZSAocyA+PSAxICYmIGMgPj0gMCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH0gZmluYWxseSB7XG4gICAgcmVlbnRyeSA9IGZhbHNlO1xuXG4gICAge1xuICAgICAgUmVhY3RDdXJyZW50RGlzcGF0Y2hlci5jdXJyZW50ID0gcHJldmlvdXNEaXNwYXRjaGVyO1xuICAgICAgcmVlbmFibGVMb2dzKCk7XG4gICAgfVxuXG4gICAgRXJyb3IucHJlcGFyZVN0YWNrVHJhY2UgPSBwcmV2aW91c1ByZXBhcmVTdGFja1RyYWNlO1xuICB9IC8vIEZhbGxiYWNrIHRvIGp1c3QgdXNpbmcgdGhlIG5hbWUgaWYgd2UgY291bGRuJ3QgbWFrZSBpdCB0aHJvdy5cblxuXG4gIHZhciBuYW1lID0gZm4gPyBmbi5kaXNwbGF5TmFtZSB8fCBmbi5uYW1lIDogJyc7XG4gIHZhciBzeW50aGV0aWNGcmFtZSA9IG5hbWUgPyBkZXNjcmliZUJ1aWx0SW5Db21wb25lbnRGcmFtZShuYW1lKSA6ICcnO1xuXG4gIHtcbiAgICBpZiAodHlwZW9mIGZuID09PSAnZnVuY3Rpb24nKSB7XG4gICA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qICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjA7XG52YXIgTm9MYW5lID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAqL1xuMDtcbnZhciBTeW5jTGFuZSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG4xO1xudmFyIElucHV0Q29udGludW91c0h5ZHJhdGlvbkxhbmUgPVxuLyogICAgKi9cbjI7XG52YXIgSW5wdXRDb250aW51b3VzTGFuZSA9XG4vKiAgICAgICAgICAgICAqL1xuNDtcbnZhciBEZWZhdWx0SHlkcmF0aW9uTGFuZSA9XG4vKiAgICAgICAgICAgICovXG44O1xudmFyIERlZmF1bHRMYW5lID1cbi8qICAgICAgICAgICAgICAgICAgICAgKi9cbjE2O1xudmFyIFRyYW5zaXRpb25IeWRyYXRpb25MYW5lID1cbi8qICAgICAgICAgICAgICAgICovXG4zMjtcbnZhciBUcmFuc2l0aW9uTGFuZXMgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG40MTk0MjQwO1xudmFyIFRyYW5zaXRpb25MYW5lMSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG42NDtcbnZhciBUcmFuc2l0aW9uTGFuZTIgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTI4O1xudmFyIFRyYW5zaXRpb25MYW5lMyA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG4yNTY7XG52YXIgVHJhbnNpdGlvbkxhbmU0ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjUxMjtcbnZhciBUcmFuc2l0aW9uTGFuZTUgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTAyNDtcbnZhciBUcmFuc2l0aW9uTGFuZTYgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMjA0ODtcbnZhciBUcmFuc2l0aW9uTGFuZTcgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuNDA5NjtcbnZhciBUcmFuc2l0aW9uTGFuZTggPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuODE5MjtcbnZhciBUcmFuc2l0aW9uTGFuZTkgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTYzODQ7XG52YXIgVHJhbnNpdGlvbkxhbmUxMCA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjMyNzY4O1xudmFyIFRyYW5zaXRpb25MYW5lMTEgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG42NTUzNjtcbnZhciBUcmFuc2l0aW9uTGFuZTEyID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTMxMDcyO1xudmFyIFRyYW5zaXRpb25MYW5lMTMgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG4yNjIxNDQ7XG52YXIgVHJhbnNpdGlvbkxhbmUxNCA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjUyNDI4ODtcbnZhciBUcmFuc2l0aW9uTGFuZTE1ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTA0ODU3NjtcbnZhciBUcmFuc2l0aW9uTGFuZTE2ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMjA5NzE1MjtcbnZhciBSZXRyeUxhbmVzID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICovXG4xMzAwMjM0MjQ7XG52YXIgUmV0cnlMYW5lMSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjQxOTQzMDQ7XG52YXIgUmV0cnlMYW5lMiA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjgzODg2MDg7XG52YXIgUmV0cnlMYW5lMyA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjE2Nzc3MjE2O1xudmFyIFJldHJ5TGFuZTQgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICovXG4zMzU1NDQzMjtcbnZhciBSZXRyeUxhbmU1ID1cbi8qIC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cblxuICAgICAgICBzd2l0Y2ggKGV2ZW50UHJpb3JpdHkpIHtcbiAgICAgICAgICBjYXNlIERpc2NyZXRlRXZlbnRQcmlvcml0eTpcbiAgICAgICAgICAgIHNjaGVkdWxlclByaW9yaXR5ID0gSW1tZWRpYXRlUHJpb3JpdHk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgQ29udGludW91c0V2ZW50UHJpb3JpdHk6XG4gICAgICAgICAgICBzY2hlZHVsZXJQcmlvcml0eSA9IFVzZXJCbG9ja2luZ1ByaW9yaXR5O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBjYXNlIERlZmF1bHRFdmVudFByaW9yaXR5OlxuICAgICAgICAgICAgc2NoZWR1bGVyUHJpb3JpdHkgPSBOb3JtYWxQcmlvcml0eTtcbiAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgY2FzZSBJZGxlRXZlbnRQcmlvcml0eTpcbiAgICAgICAgICAgIHNjaGVkdWxlclByaW9yaXR5ID0gSWRsZVByaW9yaXR5O1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgc2NoZWR1bGVyUHJpb3JpdHkgPSBOb3JtYWxQcmlvcml0eTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgaW5qZWN0ZWRIb29rLm9uQ29tbWl0RmliZXJSb290KHJlbmRlcmVySUQsIHJvb3QsIHNjaGVkdWxlclByaW9yaXR5LCBkaWRFcnJvcik7XG4gICAgICB9IGVsc2Uge1xuICAgICAgICBpbmplY3RlZEhvb2sub25Db21taXRGaWJlclJvb3QocmVuZGVyZXJJRCwgcm9vdCwgdW5kZWZpbmVkLCBkaWRFcnJvcik7XG4gICAgICB9XG4gICAgfSBjYXRjaCAoZXJyKSB7XG4gICAgICB7XG4gICAgICAgIGlmICghaGFzTG9nZ2VkRXJyb3IpIHtcbiAgICAgICAgICBoYX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GV0aW9uO1xuICB9IGVsc2Uge1xuICAgIGRlbGV0aW9ucy5wdXNoKGNoaWxkVG9EZWxldGUpO1xuICB9XG59XG5cbmZ1bmN0aW9uIHdhcm5Ob25oeWRyYXRlZEluc3RhbmNlKHJldHVybkZpYmVyLCBmaWJlcikge1xuICB7XG4gICAgaWYgKGRpZFN1c3BlbmRPckVycm9yREVWKSB7XG4gICAgICAvLyBJbnNpZGUgYSBib3VuZGFyeSB0aGF0IGFscmVhZHkgc3VzcGVuZGVkLiBXZSdyZSBjdXJyZW50bHkgcmVuZGVyaW5nIHRoZVxuICAgICAgLy8gc2libGluZ3Mgb2YgYSBzdXNwZW5kZWQgbm9kZS4gVGhlIG1pc21hdGNoIG1heSBiZSBkdWUgdG8gdGhlIG1pc3NpbmdcbiAgICAgIC8vIGRhdGEsIHNvIGl0J3MgcHJvYmFibHkgYSBmYWxzZSBwb3NpdGl2ZS5cbiAgICAgIHJldHVybjtcbiAgICB9XG5cbiAgICBzd2l0Y2ggKHJldHVybkZpYmVyLnRhZykge1xuICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBwYXJlbnRDb250YWluZXIgPSByZXR1cm5GaWJlci5zdGF0ZU5vZGUuY29udGFpbmVySW5mbztcblxuICAgICAgICAgIHN3aXRjaCAoZmliZXIudGFnKSB7XG4gICAgICAgICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgICAgICAgIHZhciB0eXBlID0gZmliZXIudHlwZTtcbiAgICAgICAgICAgICAgdmFyIHByb3BzID0gZmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZUluc3RhbmNlV2l0aGluQ29udGFpbmVyKHBhcmVudENvbnRhaW5lciwgdHlwZSwgcHJvcHMpO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgICAgICAgICAgdmFyIHRleHQgPSBmaWJlci5wZW5kaW5nUHJvcHM7XG4gICAgICAgICAgICAgIGRpZE5vdEZpbmRIeWRyYXRhYmxlVGV4dEluc3RhbmNlV2l0aGluQ29udGFpbmVyKHBhcmVudENvbnRhaW5lciwgdGV4dCk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVN1c3BlbnNlSW5zdGFuY2VXaXRoaW5Db250YWluZXIocGFyZW50Q29udGFpbmVyKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIHBhcmVudFR5cGUgPSByZXR1cm5GaWJlci50eXBlO1xuICAgICAgICAgIHZhciBwYXJlbnRQcm9wcyA9IHJldHVybkZpYmVyLm1lbW9pemVkUHJvcHM7XG4gICAgICAgICAgdmFyIHBhcmVudEluc3RhbmNlID0gcmV0dXJuRmliZXIuc3RhdGVOb2RlO1xuXG4gICAgICAgICAgc3dpdGNoIChmaWJlci50YWcpIHtcbiAgICAgICAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHZhciBfdHlwZSA9IGZpYmVyLnR5cGU7XG4gICAgICAgICAgICAgICAgdmFyIF9wcm9wcyA9IGZpYmVyLnBlbmRpbmdQcm9wcztcbiAgICAgICAgICAgICAgICB2YXIgaXNDb25jdXJyZW50TW9kZSA9IChyZXR1cm5GaWJlci5tb2RlICYgQ29uY3VycmVudE1vZGUpICE9PSBOb01vZGU7XG4gICAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVJbnN0YW5jZShwYXJlbnRUeXBlLCBwYXJlbnRQcm9wcywgcGFyZW50SW5zdGFuY2UsIF90eXBlLCBfcHJvcHMsIC8vIFRPRE86IERlbGV0ZSB0aGlzIGFyZ3VtZW50IHdoZW4gd2UgcmVtb3ZlIHRoZSBsZWdhY3kgcm9vdCBBUEkuXG4gICAgICAgICAgICAgICAgaXNDb25jdXJyZW50TW9kZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHZhciBfdGV4dCA9IGZpYmVyLnBlbmRpbmdQcm9wcztcblxuICAgICAgICAgICAgICAgIHZhciBfaXNDb25jdXJyZW50TW9kZSA9IChyZXR1cm5GaWJlci5tb2RlICYgQ29uY3VycmVudE1vZGUpICE9PSBOb01vZGU7XG5cbiAgICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVRleHRJbnN0YW5jZShwYXJlbnRUeXBlLCBwYXJlbnRQcm9wcywgcGFyZW50SW5zdGFuY2UsIF90ZXh0LCAvLyBUT0RPOiBEZWxldGUgdGhpcyBhcmd1bWVudCB3aGVuIHdlIHJlbW92ZSB0aGUgbGVnYWN5IHJvb3QgQVBJLlxuICAgICAgICAgICAgICAgIF9pc0NvbmN1cnJlbnRNb2RlKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVTdXNwZW5zZUluc3RhbmNlKHBhcmVudFR5cGUsIHBhcmVudFByb3BzLCBwYXJlbnRJbnN0YW5jZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIHN1c3BlbnNlU3RhdGUgPSByZXR1cm5GaWJlci5tZW1vaXplZFN0YXRlO1xuICAgICAgICAgIHZhciBfcGFyZW50SW5zdGFuY2UgPSBzdXNwZW5zZVN0YXRlLmRlaHlkcmF0ZWQ7XG4gICAgICAgICAgaWYgKF9wYXJlbnRJbnN0YW5jZSAhPT0gbnVsbCkgc3dpdGNoIChmaWJlci50YWcpIHtcbiAgICAgICAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAgICAgICAgdmFyIF90eXBlMiA9IGZpYmVyLnR5cGU7XG4gICAgICAgICAgICAgIHZhciBfcHJvcHMyID0gZmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZUluc3RhbmNlV2l0aGluU3VzcGVuc2VJbnN0YW5jZShfcGFyZW50SW5zdGFuY2UsIF90eXBlMiwgX3Byb3BzMik7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIEhvc3RUZXh0OlxuICAgICAgICAgICAgICB2YXIgX3RleHQyID0gZmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVRleHRJbnN0YW5jZVdpdGhpblN1c3BlbnNlSW5zdGFuY2UoX3BhcmVudEluc3RhbmNlLCBfdGV4dDIpO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSBTdXNwZW5zZUNvbXBvbmVudDpcbiAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVTdXNwZW5zZUluc3RhbmNlV2l0aGluU3VzcGVuc2VJbnN0YW5jZShfcGFyZW50SW5zdGFuY2UpO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgZGVmYXVsdDpcbiAg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VIb3N0VGV4dEluc3RhbmNlIGlzIGNhbGxlZCBpbiBhIGNvbnRleHQgd2hlcmUgdGhlXG4gICAgLy8gaHlkcmF0aW9uIHBhcmVudCBpcyB0aGUgcGFyZW50IGhvc3QgY29tcG9uZW50IG9mIHRoaXMgaG9zdCB0ZXh0LlxuICAgIHZhciByZXR1cm5GaWJlciA9IGh5ZHJhdGlvblBhcmVudEZpYmVyO1xuXG4gICAgaWYgKHJldHVybkZpYmVyICE9PSBudWxsKSB7XG4gICAgICBzd2l0Y2ggKHJldHVybkZpYmVyLnRhZykge1xuICAgICAgICBjYXNlIEhvc3RSb290OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHZhciBwYXJlbnRDb250YWluZXIgPSByZXR1cm5GaWJlci5zdGF0ZU5vZGUuY29udGFpbmVySW5mbztcbiAgICAgICAgICAgIHZhciBpc0NvbmN1cnJlbnRNb2RlID0gKHJldHVybkZpYmVyLm1vZGUgJiBDb25jdXJyZW50TW9kZSkgIT09IE5vTW9kZTtcbiAgICAgICAgICAgIGRpZE5vdE1hdGNoSHlkcmF0ZWRDb250YWluZXJUZXh0SW5zdGFuY2UocGFyZW50Q29udGFpbmVyLCB0ZXh0SW5zdGFuY2UsIHRleHRDb250ZW50LCAvLyBUT0RPOiBEZWxldGUgdGhpcyBhcmd1bWVudCB3aGVuIHdlIHJlbW92ZSB0aGUgbGVnYWN5IHJvb3QgQVBJLlxuICAgICAgICAgICAgaXNDb25jdXJyZW50TW9kZSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG5cbiAgICAgICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHZhciBwYXJlbnRUeXBlID0gcmV0dXJuRmliZXIudHlwZTtcbiAgICAgICAgICAgIHZhciBwYXJlbnRQcm9wcyA9IHJldHVybkZpYmVyLm1lbW9pemVkUHJvcHM7XG4gICAgICAgICAgICB2YXIgcGFyZW50SW5zdGFuY2UgPSByZX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1bmN0aW9uJykge1xuICAgICAgICAgIC8vIFVwZGF0ZXIgZnVuY3Rpb25cbiAgICAgICAgICB7XG4gICAgICAgICAgICBlbnRlckRpc2FsbG93ZWRDb250ZXh0UmVhZEluREVWKCk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdmFyIG5leHRTdGF0ZSA9IHBheWxvYWQuY2FsbChpbnN0YW5jZSwgcHJldlN0YXRlLCBuZXh0UHJvcHMpO1xuXG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKCB3b3JrSW5Qcm9ncmVzcy5tb2RlICYgU3RyaWN0TGVnYWN5TW9kZSkge1xuICAgICAgICAgICAgICBzZXRJc1N0cmljdE1vZGVGb3JEZXZ0b29scyh0cnVlKTtcblxuICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHBheWxvYWQuY2FsbChpbnN0YW5jZSwgcHJldlN0YXRlLCBuZXh0UHJvcHMpO1xuICAgICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICAgIHNldElzU3RyaWN0TW9kZUZvckRldnRvb2xzKGZhbHNlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBleGl0RGlzYWxsb3dlZENvbnRleHRSZWFkSW5ERVYoKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gbmV4dFN0YXRlO1xuICAgICAgICB9IC8vIFN0YXRlIG9iamVjdFxuXG5cbiAgICAgICAgcmV0dXJuIHBheWxvYWQ7XG4gICAgICB9XG5cbiAgICBjYXNlIENhcHR1cmVVcGRhdGU6XG4gICAgICB7XG4gICAgICAgIHdvcmtJblByb2dyZXNzLmZsYWdzID0gd29ya0luUHJvZ3Jlc3MuZmxhZ3MgJiB+U2hvdWxkQ2FwdHVyZSB8IERpZENhcHR1cmU7XG4gICAgICB9XG4gICAgLy8gSW50ZW50aW9uYWwgZmFsbHRocm91Z2hcblxuICAgIGNhc2UgVXBkYXRlU3RhdGU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KSB7XG4gICAgICAgICAgICAgIHJldHVybiB1cGRhdGVFbGVtZW50KHJldHVybkZpYmVyLCBvbGRGaWJlciwgbmV3Q2hpbGQsIGxhbmVzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIFJFQUNUX1BPUlRBTF9UWVBFOlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmIChuZXdDaGlsZC5rZXkgPT09IGtleSkge1xuICAgICAgICAgICAgICByZXR1cm4gdXBkYXRlUG9ydGFsKHJldHVybkZpYmVyLCBvbGRGaWJlciwgbmV3Q2hpbGQsIGxhbmVzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIFJFQUNUX0xBWllfVFlQRTpcbiAgICAgICAgICB7XG4gICAgICAgICAgICB2YXIgcGF5bG9hZCA9IG5ld0NoaWxkLl9wYXlsb2FkO1xuICAgICAgICAgICAgdmFyIGluaXQgPSBuZXdDaGlsZC5faW5pdDtcbiAgICAgICAgICAgIHJldHVybiB1cGRhdGVTbG90KHJldHVybkZpYmVyLCBvbGRGaWJlciwgaW5pdChwYXlsb2FkKSwgbGFuZXMpO1xuICAgICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGlzQXJyYXkobmV3Q2hpbGQpIHx8IGdldEl0ZXJhdG9yRm4obmV3Q2hpbGQpKSB7XG4gICAgICAgIGlmIChrZXkgIT09IG51bGwpIHtcbiAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB1cGRhdGVGcmFnbWVudChyZXR1cm5GaWJlciwgb2xkRmliZXIsIG5ld0NoaWxkLCBsYW5lcywgbnVsbCk7XG4gICAgICB9XG5cbiAgICAgIHRocm93T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tleSA9IGVsZW1lbnQua2V5O1xuICAgIHZhciBjaGlsZCA9IGN1cnJlbnRGaXJzdENoaWxkO1xuXG4gICAgd2hpbGUgKGNoaWxkICE9PSBudWxsKSB7XG4gICAgICAvLyBUT0RPOiBJZiBrZXkgPT09IG51bGwgYW5kIGNoaWxkLmtleSA9PT0gbnVsbCwgdGhlbiB0aGlzIG9ubHkgYXBwbGllcyB0b1xuICAgICAgLy8gdGhlIGZpcnN0IGl0ZW0gaW4gdGhlIGxpc3QuXG4gICAgICBpZiAoY2hpbGQua2V5ID09PSBrZXkpIHtcbiAgICAgICAgdmFyIGVsZW1lbnRUeXBlID0gZWxlbWVudC50eXBlO1xuXG4gICAgICAgIGlmIChlbGVtZW50VHlwZSA9PT0gUkVBQ1RfRlJBR01FTlRfVFlQRSkge1xuICAgICAgICAgIGlmIChjaGlsZC50YWcgPT09IEZyYWdtZW50KSB7XG4gICAgICAgICAgICBkZWxldGVSZW1haW5pbmdDaGlsZHJlbihyZXR1cm5GaWJlciwgY2hpbGQuc2libGluZyk7XG4gICAgICAgICAgICB2YXIgZXhpc3RpbmcgPSB1c2VGaWJlcihjaGlsZCwgZWxlbWVudC5wcm9wcy5jaGlsZHJlbik7XG4gICAgICAgICAgICBleGlzdGluZy5yZXR1cm4gPSByZXR1cm5GaWJlcjtcblxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdGluZy5fZGVidWdTb3VyY2UgPSBlbGVtZW50Ll9zb3VyY2U7XG4gICAgICAgICAgICAgIGV4aXN0aW5nLl9kZWJ1Z093bmVyID0gZWxlbWVudC5fb3duZXI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBleGlzdGluZztcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaWYgKGNoaWxkLmVsZW1lbnRUeXBlID09PSBlbGVtZW50VHlwZSB8fCAoIC8vIEtlZXAgdGhpcyBjaGVjayBpbmxpbmUgc28gaXQgb25seSB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ciB0aGUgRGV2VG9vbHMgUHJvZmlsZXIgdG8gcmVhZClcblxuICAgIHZhciBwYXJlbnRGaWJlciA9IGZpYmVyLnJldHVybjtcblxuICAgIHdoaWxlIChwYXJlbnRGaWJlciAhPT0gbnVsbCkge1xuICAgICAgc3dpdGNoIChwYXJlbnRGaWJlci50YWcpIHtcbiAgICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAgICB2YXIgcm9vdCA9IHBhcmVudEZpYmVyLnN0YXRlTm9kZTtcblxuICAgICAgICAgIGlmIChyb290ICE9PSBudWxsKSB7XG4gICAgICAgICAgICByb290LnBhc3NpdmVFZmZlY3REdXJhdGlvbiArPSBlbGFwc2VkVGltZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm47XG5cbiAgICAgICAgY2FzZSBQcm9maWxlcjpcbiAgICAgICAgICB2YXIgcGFyZW50U3RhdGVOb2RlID0gcGFyZW50RmliZXIuc3RhdGVOb2RlO1xuXG4gICAgICAgICAgaWYgKHBhcmVudFN0YXRlTm9kZSAhPT0gbnVsbCkge1xuICAgICAgICAgICAgLy8gRGV0YWNoZWQgZmliZXJzIGhhdmUgdGhlaXIgc3RhdGUgbm9kZSBjbGVhcmVkIG91dC5cbiAgICAgICAgICAgIC8vIEluIHRoaXMgY2FzZSwgdGhlIHJldHVybiBwb2ludGVyIGlzIGFsc28gY2xlYXJlZCBvdXQsXG4gICAgICAgICAgICAvLyBzbyB3ZSB3b24ndCBiZSBhYmxlIHRvIHJlcG9ydCB0aGUgdGltZSBzcGVudCBpbiB0aGlzIFByb2ZpbGVyJ3Mgc3VidHJlZS5cbiAgICAgICAgICAgIHBhcmVudFN0YXRlTm9kZS5wYXNzaXZlRWZmZWN0RHVyYXRpb24gKz0gZWxhcHNlZFRpbWU7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgICBwYXJlbnRGaWJlciA9IHBhcmVudEZpYmVyLnJldHVybjtcbiA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bmRGaXJzdFN1c3BlbmRlZChjdXJyZW50Um93KSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAvLyBUaGlzIGlzIHRoZSBiZWdpbm5pbmcgb2YgdGhlIG1haW4gY29udGVudC5cbiAgICAgICAgICAgICAgd29ya0luUHJvZ3Jlc3MuY2hpbGQgPSByb3c7XG4gICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB2YXIgbmV4dFJvdyA9IHJvdy5zaWJsaW5nO1xuICAgICAgICAgICAgcm93LnNpYmxpbmcgPSBfdGFpbDtcbiAgICAgICAgICAgIF90YWlsID0gcm93O1xuICAgICAgICAgICAgcm93ID0gbmV4dFJvdztcbiAgICAgICAgICB9IC8vIFRPRE86IElmIHdvcmtJblByb2dyZXNzLmNoaWxkIGlzIG51bGwsIHdlIGNhbiBjb250aW51ZSBvbiB0aGUgdGFpbCBpbW1lZGlhdGVseS5cblxuXG4gICAgICAgICAgaW5pdFN1c3BlbnNlTGlzdFJlbmRlclN0YXRlKHdvcmtJblByb2dyZXNzLCB0cnVlLCAvLyBpc0JhY2t3YXJkc1xuICAgICAgICAgIF90YWlsLCBudWxsLCAvLyBsYXN0XG4gICAgICAgICAgdGFpbE1vZGUpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgJ3RvZ2V0aGVyJzpcbiAgICAgICAge1xuICAgICAgICAgIGluaXRTdXNwZW5zZUxpc3RSZW5kZXJTdGF0ZSh3b3JrSW5Qcm9ncmVzcywgZmFsc2UsIC8vIGlzQmFja3dhcmRzXG4gICAgICAgICAgbnVsbCwgLy8gdGFpbFxuICAgICAgICAgIG51bGwsIC8vIGxhc3RcbiAgICAgICAgICB1bmRlZmluZWQpO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGRlZmF1bHQ6XG4gICAgICAgIHtcbiAgICAgICAgICAvLyBUaGUgZGVmYXVsdCByZXZlYWwg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zcGVuc2VDb250ZXh0KSkge1xuICAgICAgICAgICAgICAgIC8vIElmIHRoaXMgd2FzIGluIGFuIGludmlzaWJsZSB0cmVlIG9yIGEgbmV3IHJlbmRlciwgdGhlbiBzaG93aW5nXG4gICAgICAgICAgICAgICAgLy8gdGhpcyBib3VuZGFyeSBpcyBvay5cbiAgICAgICAgICAgICAgICByZW5kZXJEaWRTdXNwZW5kKCk7XG4gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgLy8gT3RoZXJ3aXNlLCB3ZSdyZSBnb2luZyB0byBoYXZlIHRvIGhpZGUgY29udGVudCBzbyB3ZSBzaG91bGRcbiAgICAgICAgICAgICAgICAvLyBzdXNwZW5kIGZvciBsb25nZXIgaWYgcG9zc2libGUuXG4gICAgICAgICAgICAgICAgcmVuZGVyRGlkU3VzcGVuZERlbGF5SWZQb3NzaWJsZSgpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgdmFyIHdha2VhYmxlcyA9IHdvcmtJblByb2dyZXNzLnVwZGF0ZVF1ZXVlO1xuXG4gICAgICAgIGlmICh3YWtlYWJsZXMgIT09IG51bGwpIHtcbiAgICAgICAgICAvLyBTY2hlZHVsZSBhbiBlZmZlY3QgdG8gYXR0YWNoIGEgcmV0cnkgbGlzdGVuZXIgdG8gdGhlIHByb21pc2UuXG4gICAgICAgICAgLy8gVE9ETzogTW92ZSB0byBwYXNzaXZlIHBoYXNlXG4gICAgICAgICAgd29ya0luUHJvZ3Jlc3MuZmxhZ3MgfD0gVXBkYXRlO1xuICAgICAgICB9XG5cbiAgICAgICAgYnViYmxlUHJvcGVydGllcyh3b3JrSW5Qcm9ncmVzcyk7XG5cbiAgICAgICAge1xuICAgICAgICAgIGlmICgod29ya0luUHJvZ3Jlc3MubW9kZSAmIFByb2ZpbGVNb2RlKSAhPT0gTm9Nb2RlKSB7XG4gICAgICAgICAgICBpZiAobmV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B0ZWRXb3JrKTtcblxuICBzd2l0Y2ggKGludGVycnVwdGVkV29yay50YWcpIHtcbiAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAge1xuICAgICAgICB2YXIgY2hpbGRDb250ZXh0VHlwZXMgPSBpbnRlcnJ1cHRlZFdvcmsudHlwZS5jaGlsZENvbnRleHRUeXBlcztcblxuICAgICAgICBpZiAoY2hpbGRDb250ZXh0VHlwZXMgIT09IG51bGwgJiYgY2hpbGRDb250ZXh0VHlwZXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIHBvcENvbnRleHQoaW50ZXJydXB0ZWRXb3JrKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgIHtcbiAgICAgICAgdmFyIHJvb3QgPSBpbnRlcnJ1cHRlZFdvcmsuc3RhdGVOb2RlO1xuICAgICAgICBwb3BIb3N0Q29udGFpbmVyKGludGVycnVwdGVkV29yayk7XG4gICAgICAgIHBvcFRvcExldmVsQ29udGV4dE9iamVjdChpbnRlcnJ1cHRlZFdvcmspO1xuICAgICAgICByZXNldFdvcmtJblByb2dyZXNzVmVyc2lvbnMoKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICB9XG5cbiAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICB7XG4gICAgICAgIHBvcEhvc3RDb250ZXh0KGludGVycnVwdGVkV29yayk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAgcG9wSG9zdENvbnRhaW5lcihpbnRlcnJ1cHRlZFdvcmspO1xuICAgICAgYnJlYWs7XG5cbiAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgcG9wU3VzcGVuc2VDb250ZXh0KGludGVycnVwdGVkV29yayk7XG4gICAgICBicmVhaztcblxuICAgIGNhc2UgU3VzcGVuc2VMaXN0Q29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3RhdGUpO1xuXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIHZhciBkaWRXYXJuU2V0ID0gZGlkV2FybkFib3V0VW5kZWZpbmVkU25hcHNob3RCZWZvcmVVcGRhdGU7XG5cbiAgICAgICAgICAgICAgaWYgKHNuYXBzaG90ID09PSB1bmRlZmluZWQgJiYgIWRpZFdhcm5TZXQuaGFzKGZpbmlzaGVkV29yay50eXBlKSkge1xuICAgICAgICAgICAgICAgIGRpZFdhcm5TZXQuYWRkKGZpbmlzaGVkV29yay50eXBlKTtcblxuICAgICAgICAgICAgICAgIGVycm9yKCclcy5nZXRTbmFwc2hvdEJlZm9yZVVwZGF0ZSgpOiBBIHNuYXBzaG90IHZhbHVlIChvciBudWxsKSAnICsgJ211c3QgYmUgcmV0dXJuZWQuIFlvdSBoYXZlIHJldHVybmVkIHVuZGVmaW5lZC4nLCBnZXRDb21wb25lbnROYW1lRnJvbUZpYmVyKGZpbmlzaGVkV29yaykpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGluc3RhbmNlLl9fcmVhY3RJbnRlcm5hbFNuYXBzaG90QmVmb3JlVXBkYXRlID0gc25hcHNob3Q7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAge1xuICAgICAgICAgIGlmIChzdXBwb3J0c011dGF0aW9uKSB7XG4gICAgICAgICAgICB2YXIgcm9vdCA9IGZpbmlzaGVkV29yay5zdGF0ZU5vZGU7XG4gICAgICAgICAgICBjbGVhckNvbnRhaW5lcihyb290LmNvbnRhaW5lckluZm8pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgIGNhc2UgSG9zdFRleHQ6XG4gICAgICBjYXNlIEhvc3RQb3J0YWw6XG4gICAgICBjYX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kgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmICgoZmxhZ3MgJiBQYXNzaXZlJDEpICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICAgICAgbWFya0NvbXBvbmVudFBhc3NpdmVFZmZlY3RVbm1vdW50U3RhcnRlZChmaW5pc2hlZFdvcmspO1xuICAgICAgICAgICAgfSBlbHNlIGlmICgoZmxhZ3MgJiBMYXlvdXQpICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICAgICAgbWFya0NvbXBvbmVudExheW91dEVmZmVjdFVubW91bnRTdGFydGVkKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKChmbGFncyAmIEluc2VydGlvbikgIT09IE5vRmxhZ3MkMSkge1xuICAgICAgICAgICAgICBzZXRJc1J1bm5pbmdJbnNlcnRpb25FZmZlY3QodHJ1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgc2FmZWx5Q2FsbERlc3Ryb3koZmluaXNoZWRXb3JrLCBuZWFyZXN0TW91bnRlZEFuY2VzdG9yLCBkZXN0cm95KTtcblxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmICgoZmxhZ3MgJiBJbnNlcnRpb24pICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICAgICAgc2V0SXNSdW5uaW5nSW5zZXJ0aW9uRWZmZWN0KGZhbHNlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICB7XG4gICAgICAgICAgICBpZiAoKGZsYWdzICYgUGFzc2l2ZSQxKSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICAgIG1hcmtDb21wb25lbnRQYXNzaXZlRWZmZWN0VW5tb3VudFN0b3BwZWQoKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoKGZsYWdzICYgTGF5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Byb2ZpbGVyOlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHZhciBwYXNzaXZlRWZmZWN0RHVyYXRpb24gPSBmaW5pc2hlZFdvcmsuc3RhdGVOb2RlLnBhc3NpdmVFZmZlY3REdXJhdGlvbjtcbiAgICAgICAgICAgIHZhciBfZmluaXNoZWRXb3JrJG1lbW9pemUgPSBmaW5pc2hlZFdvcmsubWVtb2l6ZWRQcm9wcyxcbiAgICAgICAgICAgICAgICBpZCA9IF9maW5pc2hlZFdvcmskbWVtb2l6ZS5pZCxcbiAgICAgICAgICAgICAgICBvblBvc3RDb21taXQgPSBfZmluaXNoZWRXb3JrJG1lbW9pemUub25Qb3N0Q29tbWl0OyAvLyBUaGlzIHZhbHVlIHdpbGwgc3RpbGwgcmVmbGVjdCB0aGUgcHJldmlvdXMgY29tbWl0IHBoYXNlLlxuICAgICAgICAgICAgLy8gSXQgZG9lcyBub3QgZ2V0IHJlc2V0IHVudGlsIHRoZSBzdGFydCBvZiB0aGUgbmV4dCBjb21taXQgcGhhc2UuXG5cbiAgICAgICAgICAgIHZhciBjb21taXRUaW1lID0gZ2V0Q29tbWl0VGltZSgpO1xuICAgICAgICAgICAgdmFyIHBoYXNlID0gZmluaXNoZWRXb3JrLmFsdGVybmF0ZSA9PT0gbnVsbCA/ICdtb3VudCcgOiAndXBkYXRlJztcblxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBpZiAoaXNDdXJyZW50VXBkYXRlTmVzdGVkKCkpIHtcbiAgICAgICAgICAgICAgICBwaGFzZSA9ICduZXN0ZWQtdXBkYXRlJztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodHlwZW9mIG9uUG9zdENvbW1pdCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICBvblBvc3RDb21taXQoaWQsIHBoYXNlLCBwYXNzaXZlRWZmZWN0RHVyYXRpb24sIGNvbW1pdFRpbWUpO1xuICAgICAgICAgICAgfSAvLyBCdWJibGUgdGltZXMgdG8gdGhlIG5leHQgbmVhcmVzdCBhbmNlc3RvciBQcm9maWxlci5cbiAgICAgICAgICAgIC8vIEFmdGVyIHdlIHByb2Nlc3MgdGhhdCBQcm9maWxlciwgd2UnbGwgYnViYmxlIGZ1cnRoZXIgdXAuXG5cblxuICAgICAgICAgICAgdmFyIHBhcmVudEZpYmVyID0gZmluaXNoZWRXb3JrLnJldHVybjtcblxuICAgICAgICAgICAgb3V0ZXI6IHdoaWxlIChwYXJlbnRGaWJlciAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBzd2l0Y2ggKHBhcmVudEZpYmVyLnRhZykge1xuICAgICAgICAgICAgICAgIGNhc2UgSG9zdFJvb3Q6XG4gICAgICAgICAgICAgICAgICB2YXIgcm9vdCA9IHBhcmVudEZpYmVyLnN0YXRlTm9kZTtcbiAgICAgICAgICAgICAgICAgIHJvb3QucGFzc2l2ZUVmZmVjdER1cmF0aW9uICs9IHBhc3NpdmVFZmZlY3REdXJhdGlvbjtcbiAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuXG4gICAgICAgICAgICAgICAgY2FzZSBQcm9maWxlcjpcbiAgICAgICAgICAgICAgICAgIHZhciBwYXJlbnRTdGF0ZU5vZGUgPSBwYXJlbnRGaWJlci5zdGF0ZU5vZGU7XG4gICAgICAgICAgICAgICAgICBwYXJlbnRTdGF0ZU5vZGUucGFzc2l2ZUVmZmVjdER1cmF0aW9uICs9IHBhc3NpdmVFZmZlY3REdXJhdGlvbjtcbiAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgcGFyZW50RmliZXIgPSBwYXJlbnRGaWJlci5yZXR1cm47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cbn1cblxuZnVuY3Rpb24gY29tbWl0TGF5b3V0RWZmZ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Ehhc0VmZmVjdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgICByZWNvcmRMYXlvdXRFZmZlY3REdXJhdGlvbihmaW5pc2hlZFdvcmspO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBjb21taXRIb29rRWZmZWN0TGlzdE1vdW50KExheW91dCB8IEhhc0VmZmVjdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIGluc3RhbmNlID0gZmluaXNoZWRXb3JrLnN0YXRlTm9kZTtcblxuICAgICAgICAgIGlmIChmaW5pc2hlZFdvcmsuZmxhZ3MgJiBVcGRhdGUpIHtcbiAgICAgICAgICAgIGlmICghb2Zmc2NyZWVuU3VidHJlZVdhc0hpZGRlbikge1xuICAgICAgICAgICAgICBpZiAoY3VycmVudCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIC8vIFdlIGNvdWxkIHVwZGF0ZSBpbnN0YW5jZSBwcm9wcyBhbmQgc3RhdGUgaGVyZSxcbiAgICAgICAgICAgICAgICAvLyBidXQgaW5zdGVhZCB3ZSByZWx5IG9uIHRoZW0gYmVpbmcgc2V0IGR1cmluZyBsYXN0IHJlbmRlci5cbiAgICAgICAgICAgICAgICAvLyBUT0RPOiByZXZpc2l0IHRoaXMgd2hlbiB3ZSBpbXBsZW1lbnQgcmVzdW1pbmcuXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgaWYgKGZpbmlzaGVkV29yay50eXBlID09PSBmaW5pc2hlZFdvcmsuZWxlbWVudFR5cGUgJiYgIWRpZFdhcm5BYm91dFJlYXNzaWduaW5nUHJvcHMpIHtcbiAgICAgICAgIC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AgICAgICAgICBpZiAoIGZpbmlzaGVkV29yay5tb2RlICYgUHJvZmlsZU1vZGUpIHtcbiAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgaW5zdGFuY2UuY29tcG9uZW50RGlkTW91bnQoKTtcbiAgICAgICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGluc3RhbmNlLmNvbXBvbmVudERpZE1vdW50KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBwcmV2UHJvcHMgPSBmaW5pc2hlZFdvcmsuZWxlbWVudFR5cGUgPT09IGZpbmlzaGVkV29yay50eXBlID8gY3VycmVudC5tZW1vaXplZFByb3BzIDogcmVzb2x2ZURlZmF1bHRQcm9wcyhmaW5pc2hlZFdvcmsudHlwZSwgY3VycmVudC5tZW1vaXplZFByb3BzKTtcbiAgICAgICAgICAgICAgICB2YXIgcHJldlN0YXRlID0gY3VycmVudC5tZW1vaXplZFN0YXRlOyAvLyBXZSBjb3VsZCB1cGRhdGUgaW5zdGFuY2UgcHJvcHMgYW5kIHN0YXRlIGhlcmUsXG4gICAgICAgICAgICAgICAgLy8gYnV0IGluc3RlYWQgd2UgcmVseSBvbiB0aGVtIGJlaW5nIHNldCBkdXJpbmcgbGFzdCByZW5kZXIuXG4gICAgICAgICAgICAgICAgLy8gVE9ETzogcmV2aXNpdCB0aGlzIHdoZW4gd2UgaW1wbGVtZW50IHJlc3VtaW5nLlxuXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgaWYgKG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aXNoZWRXb3JrKSB8fCAnaW5zdGFuY2UnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICggZmluaXNoZWRXb3JrLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgc3RhcnRMYXlvdXRFZmZlY3RUaW1lcigpO1xuICAgICAgICAgICAgICAgICAgICBpbnN0YW5jZS5jb21wb25lbnREaWRVcGRhdGUocHJldlByb3BzLCBwcmV2U3RhdGUsIGluc3RhbmNlLl9fcmVhY3RJbnRlcm5hbFNuYXBzaG90QmVmb3JlVXBkYXRlKTtcbiAgICAgICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGluc3RhbmNlLmNvbXBvbmVudERpZFVwZGF0ZShwcmV2UHJvcHMsIHByZXZTdGF0ZSwgaW5zdGFuY2UuX19yZWFjdEludGVybmFsU25hcHNob3RCZWZvcmVVcGRhdGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gLy8gVE9ETzogSSB0aGluayB0aGlzIGlzIG5vdyBhbHdheXMgbm9uLW51bGwgYnkgdGhlIHRpbWUgaXQgcmVhY2hlcyB0aGVcbiAgICAgICAgICAvLyBjb21taXQgcGhhc2UuIENvbnNpZGVyIHJlbW92aW5nIHRoZSB0eXBlIGNoZWNrLlxuXG5cbiAgICAgICAgICB2YXIgdXBkYXRlUXVldWUgPSBmaW5pc2hlZFdvcmsudXBkYXRlUXVldWU7XG5cbiAgICAgICAgICBpZiAodX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GVkV29yay5jaGlsZC50YWcpIHtcbiAgICAgICAgICAgICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgICAgICAgICAgICBfaW5zdGFuY2UgPSBnZXRQdWJsaWNJbnN0YW5jZShmaW5pc2hlZFdvcmsuY2hpbGQuc3RhdGVOb2RlKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSBDbGFzc0NvbXBvbmVudDpcbiAgICAgICAgICAgICAgICAgIF9pbnN0YW5jZSA9IGZpbmlzaGVkV29yay5jaGlsZC5zdGF0ZU5vZGU7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb21taXRVcGRhdGVRdWV1ZShmaW5pc2hlZFdvcmssIF91cGRhdGVRdWV1ZSwgX2luc3RhbmNlKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICB2YXIgX2luc3RhbmNlMiA9IGZpbmlzaGVkV29yay5zdGF0ZU5vZGU7IC8vIFJlbmRlcmVycyBtYXkgc2NoZWR1bGUgd29yayB0byBiZSBkb25lIGFmdGVyIGhvc3QgY29tcG9uZW50cyBhcmUgbW91bnRlZFxuICAgICAgICAgIC8vIChlZyBET00gcmVuZGVyZXIgbWF5IHNjaGVkdWxlIGF1dG8tZm9jdXMgZm9yIGlucHV0cyBhbmQgZm9ybSBjb250cm9scykuXG4gICAgICAgICAgLy8gVGhlc2UgZWZmZWN0cyBzaG91bGQgb25seSBiZSBjb21taXR0ZWQgd2hlbiBjb21wb25lbnRzIGFyZSBmaXJzdCBtb3VudGVkLFxuICAgICAgICAgIC8vIGFrYSB3aGVuIHRoZXJlIGlzIG5vIGN1cnJlbnQvYWx0ZXJuYXRlLlxuXG4gICAgICAgICAgaWYgKGN1cnJlbnQgPT09IG51bGwgJiYgZmluaXNoZWRXb3JrLmZsYWdzICYgVXBkYXRlKSB7XG4gICAgICAgICAgICB2YXIgdHlwZSA9IGZpbmlzaGVkV29yay50eXBlO1xuICAgICAgICAgICAgdmFyIHByb3BzID0gZmluaXNoZWRXb3JrLm1lbW9pemVkUHJvcHM7XG4gICAgICAgICAgICBjb21taXRNb3VudChfaW5zdGFuY2UyLCB0eXBlLCBwcm9wcywgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RUZXh0OlxuICAgICAgICB7XG4gICAgICAgICAgLy8gV2UgaGF2ZSBubyBsaWZlLWN5Y2xlcyBhc3NvY2lhdGVkIHdpdGggdGV4dC5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RQb3J0YWw6XG4gICAgICAgIHtcbiAgICAgICAgICAvLyBXZSBoYXZlIG5vIGxpZmUtY3ljbGVzIGFzc29jaWF0ZWQgd2l0aCBwb3J0YWxzLlxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgUHJvZmlsZXI6XG4gICAgICAgIHtcbiAgICAgICAgICB7XG4gICAgICAgICAgICB2YXIgX2ZpbmlzaGVkV29yayRtZW1vaXplMiA9IGZpbmlzaGVkV29yay5tZW1vaXplZFByb3BzLFxuICAgICAgICAgICAgICAgIG9uQ29tbWl0ID0gX2ZpbmlzaGVkV29yayRtZW1vaXplMi5vbkNvbW1pdCxcbiAgICAgICAgICAgICAgICBvblJlbmRlciA9IF9maW5pc2hlZFdvcmskbWVtb2l6ZTIub25SZW5kZXI7XG4gICAgICAgICAgICB2YXIgZWZmZWN0RHVyYXRpb24gPSBmaW5pc2hlZFdvcmsuc3RhdGVOb2RlLmVmZmVjdER1cmF0aW9uO1xuICAgICAgICAgICAgdmFyIGNvbW1pdFRpbWUgPSBnZXRDb21taXRUaW1lKCk7XG4gICAgICAgICAgICB2YXIgcGhhc2UgPSBjdXJyZW50ID09PSBudWxsID8gJ21vdW50JyA6ICd1cGRhdGUnO1xuXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGlmIChpc0N1cnJlbnRVcGRhdGVOZXN0ZWQoKSkge1xuICAgICAgICAgICAgICAgIHBoYXNlID0gJ25lc3RlZC11cGRhdGUnO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmICh0eXBlb2Ygb25SZW5kZXIgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgICAgb25SZW5kZXIoZmluaXNoZWRXb3JrLm1lbW9pemVkUHJvcHMuaWQsIHBoYXNlLCBmaW5pc2hlZFdvcmsuYWN0dWFsRHVyYXRpb24sIGZpbmlzaGVkV29yay50cmVlQmFzZUR1cmF0aW9uLCBmaW5pc2hlZFdvcmsuYWN0dWFsU3RhcnRUaW1lLCBjb21taXRUaW1lKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBpZiAodHlwZW9mIG9uQ29tbWl0ID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgb25Db21taXQoZmluaXNoZWRXb3JrLm1lbW9pemVkUHJvcHMuaWQsIHBoYXNlLCBlZmZlY3REdXJhdGlvbiwgY29tbWl0VGltZSk7XG4gICAgICAgICAgICAgIH0gLy8gU2NoZWR1bGUgYSBwYXNzaXZlIGVmZmVjdCBmb3IgdGhpcyBQcm9maWxlciB0byBjYWxsIG9uUG9zdENvbW1pdCBob29rcy5cbiAgICAgICAgICAgICAgLy8gVGhpcyBlZmZlY3Qgc2hvdWxkIGJlIHNjaGVkdWxlZCBldmVuIGlmIHRoZXJlIGlzIG5vIG9uUG9zdENvbW1pdCBjYWxsYmFjayBmb3IgdGhpcyBQcm9maWxlcixcbiAgICAgICAgICAgICAgLy8gYmVjYXVzZSB0aGUgZWZmZWN0IGlzIGFsc28gd2hlcmUgdGltZXMgYnViYmxlIHRvIHBhcmVudCBQcm9maWxlcnMuXG5cblxuICAgICAgICAgICAgICBlbnF1ZXVlUGVuZGluZ1Bhc3NpdmVQcm9maWxlckVmZmVjdChmaW5pc2hlZFdvcmspOyAvLyBQcm9wYWdhdGUgbGF5b3V0IGVmZmVjdCBkdXJhdGlvbnMgdG8gdGhlIG5leHQgbmVhcmVzdCBQcm9maWxlciBhbmNlc3Rvci5cbiAgICAgICAgICAgICAgLy8gRG8gbm90IHJlc2V0IHRoZXNlIHZhbHVlcyB1bnRpbCB0aGUgbmV4dCByZW5kZXIgc28gRGV2VG9vbHMgaGFzIGEgY2hhbmNlIHRvIHJlYWQgdGhlbSBmaXJzdC5cblxuICAgICAgICAgICAgICB2YXIgcGFyZW50RmliZXIgPSBmaW5pc2hlZFdvcmsucmV0dXJuO1xuXG4gICAgICAgICAgICAgIG91dGVyOiB3aGlsZSAocGFyZW50RmliZXIgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKHBhcmVudEZpYmVyLnRhZykge1xuICAgICAgICAgICAgICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJvb3QgPSBwYXJlbnRGaWJlci5zdGF0ZU5vZGU7XG4gICAgICAgICAgICAgICAgICAgIHJvb3QuZWZmZWN0RHVyYXRpb24gKz0gZWZmZWN0RHVyYXRpb247XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuXG4gICAgICAgICAgICAgICAgICBjYXNlIFByb2ZpbGVyOlxuICAgICAgICAgICAgICAgICAgICB2YXIgcGFyZW50U3RhdGVOb2RlID0gcGFyZW50RmliZXIuc3RhdGVOb2RlO1xuICAgICAgICAgICAgICAgICAgICBwYXJlbnRTdGF0ZU5vZGUuZWZmZWN0RHVyYXRpb24gKz0gZWZmZWN0RHVyYXRpb247XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrI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gICAgICAgICBpZiAoaXNIaWRkZW4pIHtcbiAgICAgICAgICAgICAgaGlkZUluc3RhbmNlKGluc3RhbmNlKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHVuaGlkZUluc3RhbmNlKG5vZGUuc3RhdGVOb2RlLCBub2RlLm1lbW9pemVkUHJvcHMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAobm9kZS50YWcgPT09IEhvc3RUZXh0KSB7XG4gICAgICAgIGlmIChob3N0U3VidHJlZVJvb3QgPT09IG51bGwpIHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgdmFyIF9pbnN0YW5jZTMgPSBub2RlLnN0YXRlTm9kZTtcblxuICAgICAgICAgICAgaWYgKGlzSGlkZGVuKSB7XG4gICAgICAgICAgICAgIGhpZGVUZXh0SW5zdGFuY2UoX2luc3RhbmNlMyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB1bmhpZGVUZXh0SW5zdGFuY2UoX2luc3RhbmNlMywgbm9kZS5tZW1vaXplZFByb3BzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKChub2RlLnRhZyA9PT0gT2Zmc2NyZWVuQ29tcG9uZW50IHx8IG5vZGUudGFnID09PSBMZWdhY3lIaWRkZW5Db21wb25lbnQpICYmIG5vZGUubWVtb2l6ZWRTdGF0ZSAhPT0gbnVsbCAmJiBub2RlICE9PSBmaW5pc2hlZFdvcmspIDsgZWxzZSBpZiAobm9kZS5jaGlsZCAhPT0gbnVsbCkge1xuICAgICAgICBub2RlLmNoaWxkLnJldHVybiA9IG5vZGU7XG4gICAgICAgIG5vZGUgPSBub2RlLmNoaWxkO1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cblxuICAgICAgaWYgKG5vZGUgPT09IGZpbmlzaGVkV29yaykge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHdoaWxlIChub2RlLnNpYmxpbmcgPT09IG51bGwpIHtcbiAgICAgICAgaWYgKG5vZGUucmV0dXJuID09PSBudWxsIHx8IG5vZGUucmV0dXJuID09PSBmaW5pc2hlZFdvcmspIHtcbiAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICBpZiAoaG9zdFN1YnRyZWVSb290ID09PSBub2RlKSB7XG4gICAgICAgICAgaG9zdFN1YnRyZWVSb290ID0gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIG5vZGUgPSBub2RlLnJldHVybjtcbiAgICAgIH1cblxuICAgICAgaWYgKGhvc3RTdWJ0cmVlUm9vdCA9PT0gbm9kZSkge1xuICAgICAgICBob3N0U3VidHJlZVJvb3QgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICBub2RlLnNpYmxpbmcucmV0dXJuID0gbm9kZS5yZXR1cm47XG4gICAgICBub2RlID0gbm9kZS5zaWJsaW5nO1xuICAgIH1cbiAgfVxufVxuXG5mdW5jdGlvbiBjb21taXRBdHRhY2hSZWYoZmluaXNoZWRXb3JrKSB7XG4gIHZhciByZWYgPSBmaW5pc2hlZFdvcmsucmVmO1xuXG4gIGlmIChyZWYgIT09IG51bGwpIHtcbiAgICB2YXIgaW5zdGFuY2UgPSBmaW5pc2hlZFdvcmsuc3RhdGVOb2RlO1xuICAgIHZhciBpbnN0YW5jZVRvVXNlO1xuX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jayBhcyB3ZSB0cmF2ZXJzZSB0aGVcbiAgICAvLyB0cmVlIGR1cmluZyB0aGUgY29tbWl0IHBoYXNlLiBUaGlzIHdvdWxkIG1ha2UgaW5zZXJ0aW9ucyBmYXN0ZXIsIHRvby5cbiAgICB2YXIgcGFyZW50ID0gcmV0dXJuRmliZXI7XG5cbiAgICBmaW5kUGFyZW50OiB3aGlsZSAocGFyZW50ICE9PSBudWxsKSB7XG4gICAgICBzd2l0Y2ggKHBhcmVudC50YWcpIHtcbiAgICAgICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGhvc3RQYXJlbnQgPSBwYXJlbnQuc3RhdGVOb2RlO1xuICAgICAgICAgICAgaG9zdFBhcmVudElzQ29udGFpbmVyID0gZmFsc2U7XG4gICAgICAgICAgICBicmVhayBmaW5kUGFyZW50O1xuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIEhvc3RSb290OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGhvc3RQYXJlbnQgPSBwYXJlbnQuc3RhdGVOb2RlLmNvbnRhaW5lckluZm87XG4gICAgICAgICAgICBob3N0UGFyZW50SXNDb250YWluZXIgPSB0cnVlO1xuICAgICAgICAgICAgYnJlYWsgZmluZFBhcmVudDtcbiAgICAgICAgICB9XG5cbiAgICAgICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGhvc3RQYXJlbnQgPSBwYXJlbnQuc3RhdGVOb2RlLmNvbnRhaW5lckluZm87XG4gICAgICAgICAgICBob3N0UGFyZW50SXNDb250YWluZXIgPSB0cnVlO1xuICAgICAgICAgICAgYnJlYWsgZmluZFBhcmVudDtcbiAgICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHBhcmVudCA9IHBhcmVudC5yZXR1cm47XG4gICAgfVxuXG4gICAgaWYgKGhvc3RQYXJlbnQgPT09IG51bGwpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvc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4gICAgICAgICAgICAgIHZhciBmaXJzdEVmZmVjdCA9IGxhc3RFZmZlY3QubmV4dDtcbiAgICAgICAgICAgICAgdmFyIGVmZmVjdCA9IGZpcnN0RWZmZWN0O1xuXG4gICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICB2YXIgX2VmZmVjdCA9IGVmZmVjdCxcbiAgICAgICAgICAgICAgICAgICAgZGVzdHJveSA9IF9lZmZlY3QuZGVzdHJveSxcbiAgICAgICAgICAgICAgICAgICAgdGFnID0gX2VmZmVjdC50YWc7XG5cbiAgICAgICAgICAgICAgICBpZiAoZGVzdHJveSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoKHRhZyAmIEluc2VydGlvbikgIT09IE5vRmxhZ3MkMSkge1xuICAgICAgICAgICAgICAgICAgICBzYWZlbHlDYWxsRGVzdHJveShkZWxldGVkRmliZXIsIG5lYXJlc3RNb3VudGVkQW5jZXN0b3IsIGRlc3Ryb3kpO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgodGFnICYgTGF5b3V0KSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBtYXJrQ29tcG9uZW50TGF5b3V0RWZmZWN0VW5tb3VudFN0YXJ0ZWQoZGVsZXRlZEZpYmVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmICggZGVsZXRlZEZpYmVyLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgICBzYWZlbHlDYWxsRGVzdHJveShkZWxldGVkRmliZXIsIG5lYXJlc3RNb3VudGVkQW5jZXN0b3IsIGRlc3Ryb3kpO1xuICAgICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGRlbGV0ZWRGaWJlcik7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgc2FmZWx5Q2FsbERlc3Ryb3koZGVsZXRlZEZpYmVyLCBuZWFyZXN0TW91bnRlZEFuY2VzdG9yLCBkZXN0cm95KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBtYXJrQ29tcG9uZW50TGF5b3V0RWZmZWN0VW5tb3VudFN0b3BwZWQoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGVmZmVjdCA9IGVmZmVjdC5uZXh0O1xuICAgICAgICAgICAgICB9IHdoaWxlIChlZmZlY3QgIT09IGZpcnN0RWZmZWN0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZWN1cnNpdmVseVRyYXZlcnNlRGVsZXRpb25FZmZlY3RzKGZpbmlzaGVkUm9vdCwgbmVhcmVzdE1vdW50ZWRBbmNlc3RvciwgZGVsZXRlZEZpYmVyKTtcbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBDbGFzc0NvbXBvbmVudDpcbiAgICAgIHtcbiAgICAgICAgaWYgKCFvZmZzY3JlZW5TdWJ0cmVlV2FzSGlkZGVuKSB7XG4gICAgICAgICAgc2FmZWx5RGV0YWNoUmVmKGRlbGV0ZWRGaWJlciwgbmVhcmVzdE1vdW50ZWRBbmNlc3Rvcik7XG4gICAgICAgICAgdmFyIGluc3RhbmNlID0gZGVsZXRlZEZpYmVyLnN0YXRlTm9kZTtcblxuICAgICAgICAgIGlmICh0eXBlb2YgaW5zdGFuY2UuY29tcG9uZW50V2lsbFVubW91bnQgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIHNhZ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29tcG9uZW50IGR1cmluZyB0aGUgc2FtZSBjb21taXQuXG5cblxuICAgICAgICAgIGlmICggZmluaXNoZWRXb3JrLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgc3RhcnRMYXlvdXRFZmZlY3RUaW1lcigpO1xuICAgICAgICAgICAgICBjb21taXRIb29rRWZmZWN0TGlzdFVubW91bnQoTGF5b3V0IHwgSGFzRWZmZWN0LCBmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4pO1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIGNvbW1pdEhvb2tFZmZlY3RMaXN0VW5tb3VudChMYXlvdXQgfCBIYXNFZmZlY3QsIGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybik7XG4gICAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAge1xuICAgICAgICByZWN1cnNpdmVseVRyYXZlcnNlTXV0YXRpb25FZmZlY3RzKHJvb3QsIGZpbmlzaGVkV29yayk7XG4gICAgICAgIGNv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RoZSByZWFsIGNoYW5nZSBpblxuICAgICAgICAgICAgICAvLyB0aGlzIGNhc2UuXG5cbiAgICAgICAgICAgICAgdmFyIG9sZFByb3BzID0gY3VycmVudCAhPT0gbnVsbCA/IGN1cnJlbnQubWVtb2l6ZWRQcm9wcyA6IG5ld1Byb3BzO1xuICAgICAgICAgICAgICB2YXIgdHlwZSA9IGZpbmlzaGVkV29yay50eXBlOyAvLyBUT0RPOiBUeXBlIHRoZSB1cGRhdGVRdWV1ZSB0byBiZSBzcGVjaWZpYyB0byBob3N0IGNvbXBvbmVudHMuXG5cbiAgICAgICAgICAgICAgdmFyIHVwZGF0ZVBheWxvYWQgPSBmaW5pc2hlZFdvcmsudXBkYXRlUXVldWU7XG4gICAgICAgICAgICAgIGZpbmlzaGVkV29yay51cGRhdGVRdWV1ZSA9IG51bGw7XG5cbiAgICAgICAgICAgICAgaWYgKHVwZGF0ZVBheWxvYWQgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgY29tbWl0VXBkYXRlKF9pbnN0YW5jZTQsIHVwZGF0ZVBheWxvYWQsIHR5cGUsIG9sZFByb3BzLCBuZXdQcm9wcywgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgIHtcbiAgICAgICAgcmVjdXJzaXZlbHlUcmF2ZXJzZU11dGF0aW9uRWZmZWN0cyhyb290LCBmaW5pc2hlZFdvcmspO1xuICAgICAgIC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gICAgICAgICAgICAgIGNhcHR1cmVDb21taXRQaGFzZUVycm9yKGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybiwgZXJyb3IpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGNhc2UgSG9zdFJvb3Q6XG4gICAgICB7XG4gICAgICAgIHJlY3Vyc2l2ZWx5VHJhdmVyc2VNdXRhdGlvbkVmZmVjdHMocm9vdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgY29tbWl0UmVjb25jaWxpYXRpb25FZmZlY3RzKGZpbmlzaGVkV29yayk7XG5cbiAgICAgICAgaWYgKGZsYWdzICYgVXBkYXRlKSB7XG4gICAgICAgICAgaWYgKHN1cHBvcnRzTXV0YXRpb24gJiYgc3VwcG9ydHNIeWRyYXRpb24pIHtcbiAgICAgICAgICAgIGlmIChjdXJyZW50ICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIHZhciBwcmV2Um9vdFN0YXRlID0gY3VycmVudC5tZW1vaXplZFN0YXRlO1xuXG4gICAgICAgICAgICAgIGlmIChwcmV2Um9vdFN0YXRlLmlzRGVoeWRyYXRlZCkge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICBjb21taXRIeWRyYXRlZENvbnRhaW5lcihyb290LmNvbnRhaW5lckluZm8pO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoc3VwcG9ydHNQZXJzaXN0ZW5jZSkge1xuICAgICAgICAgICAgdmFyIGNvbnRhaW5lckluZm8gPSByb290LmNvbnRhaW5lckluZm87XG4gICAgICAgICAgICB2YXIgcGVuZGluZ0NoaWxkcmVuID0gcm9vdC5wZW5kaW5nQ2hpbGRyZW47XG5cbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIHJlcGxhY2VDb250YWluZXJDaGlsZHJlbihjb250YWluZXJJbmZvLCBwZW5kaW5nQ2hpbGRyZW4pO1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAge1xuICAgICAgICByZWN1cnNpdmVseVRyYXZlcnNlTXV0YXRpb25FZmZlY3RzKHJvb3QsIGZpbmlzaGVkV29yayk7XG4gICAgICAgIGNvbW1pdFJlY29uY2lsaWF0aW9uRWZmZWN0cyhmaW5pc2hlZFdvcmspO1xuXG4gICAgICAgIGlmIChmbGFncyAmIFVwZGF0ZSkge1xuICAgICAgICAgIGlmIChzdXBwb3J0c1BlcnNpc3RlbmNlKSB7XG4gICAgICAgICAgICB2YXIgcG9ydGFsID0gZmluaXNoZWRXb3JrLnN0YXRlTm9kZTtcbiAgICAgICAgICAgIHZhciBfY29udGFpbmVySW5mbyA9IHBvcnRhbC5jb250YWluZXJJbmZvO1xuICAgICAgICAgICAgdmFyIF9wZW5kaW5nQ2hpbGRyZW4gPSBwb3J0YWwucGVuZGluZ0NoaWxkcmVuO1xuXG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICByZXBsYWNlQ29udGFpbmVyQ2hpbGRyZW4oX2NvbnRhaW5lckluZm8sIF9wZW5kaW5nQ2hpbGRyZW4pO1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AgICAgIH1cblxuICAgICAgcmVzZXRDdXJyZW50RmliZXIoKTtcbiAgICB9XG5cbiAgICBpZiAoZmliZXIgPT09IHN1YnRyZWVSb290KSB7XG4gICAgICBuZXh0RWZmZWN0ID0gbnVsbDtcbiAgICAgIHJldHVybjtcbiAgICB9XG5cbiAgICB2YXIgc2libGluZyA9IGZpYmVyLnNpYmxpbmc7XG5cbiAgICBpZiAoc2libGluZyAhPT0gbnVsbCkge1xuICAgICAgc2libGluZy5yZXR1cm4gPSBmaWJlci5yZXR1cm47XG4gICAgICBuZXh0RWZmZWN0ID0gc2libGluZztcbiAgICAgIHJldHVybjtcbiAgICB9XG5cbiAgICBuZXh0RWZmZWN0ID0gZmliZXIucmV0dXJuO1xuICB9XG59XG5cbmZ1bmN0aW9uIGRpc2FwcGVhckxheW91dEVmZmVjdHNfYmVnaW4oc3VidHJlZVJvb3QpIHtcbiAgd2hpbGUgKG5leHRFZmZlY3QgIT09IG51bGwpIHtcbiAgICB2YXIgZmliZXIgPSBuZXh0RWZmZWN0O1xuICAgIHZhciBmaXJzdENoaWxkID0gZmliZXIuY2hpbGQ7IC8vIFRPRE8gKE9mZnNjcmVlbikgQ2hlY2s6IGZsYWdzICYgKFJlZlN0YXRpYyB8IExheW91dFN0YXRpYylcblxuICAgIHN3aXRjaCAoZmliZXIudGFnKSB7XG4gICAgICBjYXNlIEZ1bmN0aW9uQ29tcG9uZW50OlxuICAgICAgY2FzZSBGb3J3YXJkUmVmOlxuICAgICAgY2FzZSBNZW1vQ29tcG9uZW50OlxuICAgICAgY2FzZSBTaW1wbGVNZW1vQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgaWYgKCBmaWJlci5tb2RlICYgUHJvZmlsZU1vZGUpIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgY29tbWl0SG9va0VmZmVjdExpc3RVbm1vdW50KExheW91dCwgZmliZXIsIGZpYmVyLnJldHVybik7XG4gICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICByZWNvcmRMYXlvdXRFZmZlY3REdXJhdGlvbihmaWJlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvbW1pdEhvb2tFZmZlY3RMaXN0VW5tb3VudChMYXlvdXQsIGZpYmVyLCBmaWJlci5yZXR1cm4pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgQ2xhc3NDb21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICAvLyBUT0RPIChPZmZzY3JlZW4pIENoZWNrOiBmbGFncyAmIFJlZlN0YXRpY1xuICAgICAgICAgIHNhZmVseURldGFjaFJlZihmaWJlciwgZmliZXIucmV0dXJuKTtcbiAgICAgICAgICB2YXIgaW5zdGFuY2UgPSBmaWJlci5zdGF0ZU5vZGU7XG5cbiAgICAgICAgICBpZiAodHlwZW9mIGluc3RhbmNlLmNvbXBvbmVudFdpbGxVbm1vdW50ID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICBzYWZlbHlDYWxsQ29tcG9uZW50V2lsbFVubW91bnQoZmliZXIsIGZpYmVyLnJldHVybiwgaW5zdGFuY2UpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAge1xuICAgICAgICAgIHNhZmVseURldGFjaFJlZihmaWJlciwgZmliZXIucmV0dXJuKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIE9mZnNjcmVlbkNvbXBvbmVudDpcbiAgICAgICAge1xuICAgICAgICAgIC8vIENoZWNrIGlmIHRoaXMgaXMgYVxuICAgICAgICAgIHZhciBpc0hpZGRlbiA9IGZpYmVyLm1lbW9p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Rpc2FibGUtbmV4dC1saW5lIG5vLWZhbGx0aHJvdWdoXG5cbiAgICAgIGNhc2UgUkVBQ1RfVFJBQ0lOR19NQVJLRVJfVFlQRTpcblxuICAgICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lIG5vLWZhbGx0aHJvdWdoXG5cbiAgICAgIGNhc2UgUkVBQ1RfREVCVUdfVFJBQ0lOR19NT0RFX1RZUEU6XG5cbiAgICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBuby1mYWxsdGhyb3VnaFxuXG4gICAgICBkZWZhdWx0OlxuICAgICAgICB7XG4gICAgICAgICAgaWYgKHR5cGVvZiB0eXBlID09PSAnb2JqZWN0JyAmJiB0eXBlICE9PSBudWxsKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKHR5cGUuJCR0eXBlb2YpIHtcbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9QUk9WSURFUl9UWVBFOlxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gQ29udGV4dFByb3ZpZGVyO1xuICAgICAgICAgICAgICAgIGJyZWFrIGdldFRhZztcblxuICAgICAgICAgICAgICBjYXNlIFJFQUNUX0NPTlRFWFRfVFlQRTpcbiAgICAgICAgICAgICAgICAvLyBUaGlzIGlzIGEgY29uc3VtZXJcbiAgICAgICAgICAgICAgICBmaWJlclRhZyA9IENvbnRleHRDb25zdW1lcjtcbiAgICAgICAgICAgICAgICBicmVhayBnZXRUYWc7XG5cbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9GT1JXQVJEX1JFRl9UWVBFOlxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gRm9yd2FyZFJlZjtcblxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgIHJlc29sdmVkVHlwZSA9IHJlc29sdmVGb3J3YXJkUmVmRm9ySG90UmVsb2FkaW5nKHJlc29sdmVkVHlwZSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgYnJlYWsgZ2V0VGFnO1xuXG4gICAgICAgICAgICAgIGNhc2UgUkVBQ1RfTUVNT19UWVBFOlxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gTWVtb0NvbXBvbmVudDtcbiAgICAgICAgICAgICAgICBicmVhayBnZXRUYWc7XG5cbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9MQVpZX1RZUEU6XG4gICAgICAgICAgICAgICAgZmliZXJUYWcgPSBMYXp5Q29tcG9uZW50O1xuICAgICAgICAgICAgICAgIHJlc29sdmVkVHlwZSA9IG51bGw7XG4gICAgICAgICAgICAgICAgYnJlYWsgZ2V0VGFnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIHZhciBpbmZvID0gJyc7XG5cbiAgICAgICAgICB7XG4gICAgICAgICAgICBpZiAodHlwZSA9PT0gdW5kZWZpbmVkIHx8IHR5cGVvZiB0eXBlID09PSAnb2JqZWN0JyAmJiB0eXBlICE9PSBudWxsICYmIE9iamVjdC5rZXlzKHR5cGUpLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICBpbmZvICs9ICcgWW91IGxpa2VseSBmb3Jnb3QgdG8gZXhwb3J0IHlvdXIgY29tcG9uZW50IGZyb20gdGhlIGZpbGUgJyArIFwiaXQncyBkZWZpbmVkIGluLCBvciB5b3UgbWlnaHQgaGF2ZSBtaXhlZCB1cCBkZWZhdWx0IGFuZCBcIiArICduYW1lZCBpbXBvcnRzLic7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBvd25lck5hbWUgPSBvd25lciA/IGdldENvbXBvbmVudE5hbWVGcm9tRmliZXIob3duZXIpIDogbnVsbDtcblxuICAgICAgICAgICAgaWYgKG93bmVyTmFtZSkge1xuICAgICAgICAgICAgICBpbmZvICs9ICdcXG5cXG5DaGVjayB0aGUgcmVuZGVyIG1ldGhvZCBvZiBgJyArIG93bmVyTmFtZSArICdgLic7XG4gICAgICAgICAgICB9XG4gICAgICAgICA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WJlciA9IGdldChjb21wb25lbnQpO1xuXG4gICAgaWYgKGZpYmVyID09PSB1bmRlZmluZWQpIHtcbiAgICAgIGlmICh0eXBlb2YgY29tcG9uZW50LnJlbmRlciA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1VuYWJsZSB0byBmaW5kIG5vZGUgb24gYW4gdW5tb3VudGVkIGNvbXBvbmVudC4nKTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIHZhciBrZXlzID0gT2JqZWN0LmtleXMoY29tcG9uZW50KS5qb2luKCcsJyk7XG4gICAgICAgIHRocm93IG5ldyBFcnJvcihcIkFyZ3VtZW50IGFwcGVhcnMgdG8gbm90IGJlIGEgUmVhY3RDb21wb25lbnQuIEtleXM6IFwiICsga2V5cyk7XG4gICAgICB9XG4gICAgfVxuXG4gICAgdmFyIGhvc3RGaWJlciA9IGZpbmRDdXJyZW50SG9zdEZpYmVyKGZpYmVyKTtcblxuICAgIGlmIChob3N0RmliZXIgPT09IG51bGwpIHtcbiAgICAgIHJldHVybiBudWxsO1xuICAgIH1cblxuICAgIGlmIChob3N0RmliZXIubW9kZSAmIFN0cmljdExlZ2FjeU1vZGUpIHtcbiAgICAgIHZhciBjb21wb25lbnROYW1lID0gZ2V0Q29tcG9uZW50TmFtZUZyb21GaWJlcihmaWJlcikgfHwgJ0NvbXBvbmVudCc7XG5cbiAgICAgIGlmICghZGlkV2FybkFib3V0RmluZE5vZGVJblN0cmljdE1vZGVbY29tcG9uZW50TmFtZV0pIHtcbiAgICAgICAgZGlkV2FybkFib3V0RmluZE5vZGVJblN0cmljdE1vZGVbY29tcG9uZW50TmFtZV0gPSB0cnVlO1xuICAgICAgICB2YXIgcHJldmlvdXNGaWJlciA9IGN1cnJlbnQ7XG5cbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICBzZXRDdXJyZW50RmliZXIoaG9zdEZpYmVyKTtcblxuICAgICAgICAgIGlmIChmaWJlci5tb2RlICY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GNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNsaXAgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGxheWluZyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2VpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc3BlZWQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5sb29wID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaG91bGRSZXNldCA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJBbmltYXRpb25TdGF0ZS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQkFuaW1hdGlvblN0YXRlIHx8IChQQkFuaW1hdGlvblN0YXRlID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQkFuaW1hdG9yIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvYW5pbWF0b3IuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBBbmltYXRvclNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6IDEwNDIsXG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGNvbnN0IHdyaXRlciA9IFBCQW5pbWF0b3IuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29u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5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQkF1ZGlvU291cmNlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wbGF5aW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52b2x1bWUgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5sb29wID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5waXRjaCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmF1ZGlvQ2xpcFVybCA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkF1ZGlvU291cmNlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQXVkaW9Tb3VyY2UgfHwgKFBCQXVkaW9Tb3VyY2UgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCQXVkaW9Tb3VyY2UgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9hdWRpb19zb3VyY2UuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBBdWRpb1NvdXJjZVNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6IDEwMjAsXG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGNvbnN0IHdyaXRlciA9IFB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yLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGxheWluZyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uudm9sdW1lID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudXJsID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCQXVkaW9TdHJlYW0uZGVjb2RlID0gZGVjb2RlO1xufSkoUEJBdWRpb1N0cmVh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Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYXZhdGFySWQgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYW5jaG9yUG9pbnRJZCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCQXZhdGFyQXR0YWNoLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQXZhdGFyQXR0YWNoIHx8IChQQkF2YXRhckF0dGFjaCA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJBdmF0YXJBdHRhY2ggfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9hdmF0YXJfYXR0YWNoLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgQXZhdGFyQXR0YWNoU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA3M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AgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hcmVhID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmV4Y2x1ZGVJZHMucHVzaChyZWFkZXIuc3RyaW5nKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgPT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1vZGlmaWVycy5wdXNoKHJlYWRlci5pbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgPT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBlbmQyID0gcmVhZGVyLnVpbnQzMigpICsgcmVhZGVyLnBvcztcbiAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubW9kaWZpZXJzLnB1c2gocmVhZGVyLmludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkF2YXRhck1vZGlmaWVyQXJlYS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQkF2YXRhck1vZGlmaWVyQXJlYSB8fCAoUEJBdmF0YXJNb2RpZmllckFyZWEgPSB7fSkpO1xuIiwgIi8qIGVzbGludC1kaXNhYmxlICovXG5pbXBvcnQgX20wIGZyb20gXCJwcm90b2J1ZmpzL21pbmltYWxcIjtcbmNvbnN0IHByb3RvYnVmUGFja2FnZVNhcmFzYSA9IFwiZGVjZW50cmFsYW5kLmNvbW1vblwiO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVBvc2l0aW9uKCkge1xuICAgIHJldHVybiB7IHg6IDAsIHk6IDAsIHo6IDAgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFBvc2l0aW9uO1xuKGZ1bmN0aW9uIChQb3NpdGlvbikge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGlmIChtZXNzYWdlLnggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTMpLmZsb2F0KG1lc3NhZ2UueCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UueSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyMSkuZmxvYXQobWVzc2FnZS55KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS56ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI5KS5mbG9hdChtZXNzYWdlLnopO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBvc2l0aW9uLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUG9zaXRpb24oKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS54ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnogPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQb3NpdGlvbi5kZWNvZGUgPSBkZWNvZGU7XG59KShQb3NpdGlvbiB8fCAoUG9zaXRpb24gPSB7fSkpO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVZlY3RvcjMoKSB7XG4gICAgcmV0dXJuIHsgeDogMCwgeTogMCwgejogMCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgVmVjdG9yMztcbihmdW5jdGlvbiAoVmVjdG9yMykge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGlmIChtZXNzYWdlLnggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTMpLmZsb2F0KG1lc3NhZ2UueCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UueSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyMSkuZmxvYXQobWVzc2FnZS55KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS56ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI5KS5mbG9hdChtZXNzYWdlLnopO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFZlY3RvcjMuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VWZWN0b3IzKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS56ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgVmVjdG9yMy5kZWNvZGUgPSBkZWNvZGU7XG59KShWZWN0b3IzIHx8IChWZWN0b3IzID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VWZWN0b3IyKCkge1xuICAgIHJldHVybiB7IHg6IDAsIHk6IDAgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFZlY3RvcjI7XG4oZnVuY3Rpb24gKFZlY3RvcjIpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS54ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzKS5mbG9hdChtZXNzYWdlLngpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnkgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UueSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgVmVjdG9yMi5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVZlY3RvcjIoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS54ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1c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iAgICBRdWF0ZXJuaW9uLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUXVhdGVybmlvbigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS55ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueiA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLncgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBRdWF0ZXJuaW9uLmRlY29kZSA9IGRlY29kZTtcbn0pKFF1YXRlcm5pb24gfHwgKFF1YXRlcm5pb24gPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCQXZhdGFyTW9kaWZpZXJBcmVhIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvYXZhdGFyX21vZGlmaWVyX2FyZWEuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBBdmF0YXJNb2RpZmllckFyZWFTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDcwLFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdCB3cml0ZXIgPSBQQkF2YXRhck1vZGlmaWVyQXJlYS5lbmNvZGUodmFsdWUpO1xuICA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AoY29uc3QgdiBvZiBtZXNzYWdlLndlYXJhYmxlcykge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4Mikuc3RyaW5nKHYpO1xuICAgICAgICB9XG4gICAgICAgIGZvciAoY29uc3QgdiBvZiBtZXNzYWdlLmVtb3Rlcykge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig5MCkuc3RyaW5nKHYpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCQXZhdGFyU2hhcGUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQkF2YXRhclNoYXBlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuaWQgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubmFtZSA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ib2R5U2hhcGUgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc2tpbkNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuaGFpckNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZXllQ29sb3IgPSBDb2xvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5leHByZXNzaW9uVHJpZ2dlcklkID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDg6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDY0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmV4cHJlc3Npb25UcmlnZ2VyVGltZXN0YW1wID0gbG9uZ1RvTnVtYmVyKHJlYWRlci5pbnQ2NCgpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA5OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA3Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50YWxraW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gODIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2VhcmFibGVzLnB1c2gocmVhZGVyLnN0cmluZygpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW1vdGVzLnB1c2gocmVhZGVyLnN0cmluZygpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkF2YXRhclNoYXBlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQXZhdGFyU2hhcGUgfHwgKFBCQXZhdGFyU2hhcGUgPSB7fSkpO1xuY29uc3QgdHNQcm90b0dsb2JhbFRoaXMgPSAoKCkgPT4ge1xuICAgIGlmICh0eXBlb2YgZ2xvYmFsVGhpcyAhPT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICByZXR1cm4gZ2xvYmFsVGhpcztcbiAgICB9XG4gICAgaWYgKHR5cGVvZiBzZWxmICE9PSBcInVuZGVmaW5lZFwiKSB7XG4gICAgICAgIHJldHVybiBzZWxmO1xuICAgIH1cbiAgICBpZiAodHlwZW9mIHdpbmRvdyAhPT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICByZXR1cm4gd2luZG93O1xuICAgIH1cbiAgICBpZiAod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AgICBpZiAobWVzc2FnZS5nICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDIxKS5mbG9hdChtZXNzYWdlLmcpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmIgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjkpLmZsb2F0KG1lc3NhZ2UuYik7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgQ29sb3IzLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlQ29sb3IzKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuciA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmcgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5iID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgQ29sb3IzLmRlY29kZSA9IGRlY29kZTtcbn0pKENvbG9yMyB8fCAoQ29sb3IzID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VDb2xvcjQoKSB7XG4gICAgcmV0dXJuIHsgcjogMCwgZzogMCwgYjogMCwgYTogMCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgQ29sb3I0O1xuKGZ1bmN0aW9uIChDb2xvcjQpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS5yICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzKS5mbG9hdChtZXNzYWdlLnIpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmcgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UuZyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuYiAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyOSkuZmxvYXQobWVzc2FnZS5iKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5hICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDM3KS5mbG9hdChtZXNzYWdlLmEpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIENvbG9yNC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbG9yNCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnIgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5nID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYiA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmEgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBDb2xvcjQuZGVjb2RlID0gZGVjb2RlO1xufSkoQ29sb3I0IHx8IChDb2xvcjQgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCQXZhdGFyU2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TW9kZTogdW5kZWZpbmVkIH07XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBQQkJpbGxib2FyZDtcbihmdW5jdGlvbiAoUEJCaWxsYm9hcmQpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS5iaWxsYm9hcmRNb2RlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoOCkuaW50MzIobWVzc2FnZS5iaWxsYm9hcmRNb2RlKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQkJpbGxib2FyZC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCQmlsbGJvYXJkKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIC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XIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJDYW1lcmFNb2RlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJDYW1lcmFNb2RlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQ2FtZXJhTW9kZSB8fCAoUEJDYW1lcmFNb2RlID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQkNhbWVyYU1vZGUgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9jYW1lcmFfbW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tZXNzYWdlID0gY3JlYXRlQmFzZVBCQ2FtZXJhTW9kZUFyZWEoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hcmVhID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1vZGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkNhbWVyYU1vZGVBcmVhLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQ2FtZXJhTW9kZUFyZWEgfHwgKFBCQ2FtZXJhTW9kZUFyZWEgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCQ2FtZXJhTW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dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJFbmdpbmVJbmZvKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mcmFtZU51bWJlciA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50b3RhbFJ1bnRpbWUgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50aWNrTnVtYmVyID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb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W50MzIoMzIpLnVpbnQzMihtZXNzYWdlLnZpc2libGVNZXNoZXNDb2xsaXNpb25NYXNrKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5pbnZpc2libGVNZXNoZXNDb2xsaXNpb25NYXNrICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDApLnVpbnQzMihtZXNzYWdlLmludmlzaWJsZU1lc2hlc0NvbGxpc2lvbk1hc2spO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCR2x0ZkNvbnRhaW5lci5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCR2x0ZkNvbnRhaW5lcigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNyYyA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52aXNpYmxlTWVzaGVzQ29sbGlzaW9uTWFzayA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5pbnZpc2libGVNZXNoZXNDb2xsaXNpb25NYXNrID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCR2x0ZkNvbnRhaW5lci5kZWNvZGUgPSBkZWNvZGU7XG59KShQQkdsdGZDb250YWluZXIgfHwgKFBCR2x0ZkNvbnRhaW5lciA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJHbHRmQ29udGFpbmVyIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvZ2x0Zl9jb250YWluZXIuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBHbHRmQ29udGFpbmVyU2NoZW1hID0ge1xuICAg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ICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jdXJyZW50U3RhdGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkdsdGZDb250YWluZXJMb2FkaW5nU3RhdGUuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJHbHRmQ29udGFpbmVyTG9hZGluZ1N0YXRlIHx8IChQQkdsdGZDb250YWluZXJMb2FkaW5nU3RhdGUgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCR2x0ZkNvbnRhaW5lckxvYWRpbmdTdGF0ZSB9IGZyb20gJy4vcGIvZGVjZW50cmFsYW5kL3Nkay9jb21wb25lbnRzL2dsdGZfY29udGFpbmVyX2xvYWRpbmdfc3RhdGUuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBHbHRmQ29udGFpbmVyTG9hZGluZ1N0YXRlU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA0OSxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJHbHRmQ29udGFpbmVyTG9hZGluZ1N0YXRlLmVuY29kZSh2YWx1ZSk7XG4gICAgICAgIGNvbnN0IGJ1ZmZlciA9IG5ldyBVaW50OEFycmF5KHdyaXRlci5maW5pc2goKSwgMCwgd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2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWF0ZXJpYWwgPSB7ICRjYXNlOiBcInVubGl0XCIsIHVubGl0OiBQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hdGVyaWFsID0geyAkY2FzZTogXCJwYnJcIiwgcGJyOiBQQk1hdGVyaWFsX1Bick1hdGVyaWFsLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQk1hdGVyaWFsLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCTWF0ZXJpYWwgfHwgKFBCTWF0ZXJpYWwgPSB7fSkpO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVBCTWF0ZXJpYWxfVW5saXRNYXRlcmlhbCg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H1cbiAgICBQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50ZXh0dXJlID0gVGV4dHVyZVVuaW9uLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYWxwaGFUZXN0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY2FzdFNoYWRvd3MgPSByZWFkZXIuYm9vbCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpZmZ1c2VDb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCTWF0ZXJpYWxfVW5saXRNYXRlcmlhbC5kZWNvZGUgPSBkZWNvZGU7XG59KShQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwgfHwgKFBCTWF0ZXJpYWxfVW5saXRNYXRlcmlhbCA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlUEJNYXRlcmlhbF9QYnJNYXRlcmlhbCgpIHtcbiAgICByZXR1cm4ge1xuICAgICAgICB0ZXh0dXJlOiB1bmRlZmluZWQsXG4gICAgICAgIGFscGhhVGVzdDogdW5kZWZpbmVkLFx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lZCkge1xuICAgICAgICAgICAgQ29sb3IzLmVuY29kZShtZXNzYWdlLmVtaXNzaXZlQ29sb3IsIHdyaXRlci51aW50MzIoNjYpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucmVmbGVjdGl2aXR5Q29sb3IgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgQ29sb3IzLmVuY29kZShtZXNzYWdlLnJlZmxlY3Rpdml0eUNvbG9yLCB3cml0ZXIudWludDMyKDc0KS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnRyYW5zcGFyZW5jeU1vZGUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4MCkuaW50MzIobWVzc2FnZS50cmFuc3BhcmVuY3lNb2RlKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tZXRhbGxpYyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDkzKS5mbG9hdChtZXNzYWdlLm1ldGFsbGljKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5yb3VnaG5lc3MgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMDEpLmZsb2F0KG1lc3NhZ2Uucm91Z2huZXNzKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5zcGVjdWxhckludGVuc2l0eSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDExNykuZmxvYXQobWVzc2FnZS5zcGVjdWxhckludGVuc2l0eSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZW1pc3NpdmVJbnRlbnNpdHkgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMjUpLmZsb2F0KG1lc3NhZ2UuZW1pc3NpdmVJbnRlbnNpdHkpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmRpcmVjdEludGVuc2l0eSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzMykuZmxvYXQobWVzc2FnZS5kaXJlY3RJbnRlbnNpdHkpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCTWF0ZXJpYWxfUGJyTWF0ZXJpYWwuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1hdGVyaWFsX1Bick1hdGVyaWFsKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dHVyZSA9IFRleHR1cmVVbmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFscGhhVGVzdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNhc3RTaGFkb3dzID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hbHBoYVRleHR1cmUgPSBUZXh0dXJlVW5pb24uZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5lbWlzc2l2ZVRleHR1cmUgPSBUZXh0dXJlVW5pb24uZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5idW1wVGV4dHVyZSA9IFRleHR1cmVVbmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDU4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFsYmVkb0NvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW1pc3NpdmVDb2xvciA9IENvbG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDk6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDc0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJlZmxlY3Rpdml0eUNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRyYW5zcGFyZW5jeU1vZGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWV0YWxsaWMgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJvdWdobmVzcyA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDE0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMTcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc3BlY3VsYXJJbnRlbnNpdHkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTI1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmVtaXNzaXZlSW50ZW5zaXR5ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kaXJlY3RJbnRlbnNpdHkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQk1hdGVyaWFsX1Bick1hdGVyaWFsLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCTWF0ZXJpYWxfUGJyTWF0ZXJpYWwgfHwgKFBCTWF0ZXJpYWxfUGJyTWF0ZXJpYWwgPSB7fSkpO1xuIiwgIi8qIGVzbGludC1kaXNhYmxlICovXG5pbXBvcnQgX20wIGZyb20gXCJwcm90b2J1ZmpzL21pbmltYWxcIjtcbmNvbnN0IHByb3RvYnVmUGFja2FnZVNhcmFzYSA9IFwiZGVjZW50cmFsYW5kLmNvbW1vblwiO1xuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgVGV4dHVyZVdyYXBNb2RlO1xu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dGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNyYyA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS53cmFwTW9kZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZpbHRlck1vZGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBUZXh0dXJlLmRlY29kZSA9IGRlY29kZTtcbn0pKFRleHR1cmUgfHwgKFRleHR1c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yByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VBdmF0YXJUZXh0dXJlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudXNlcklkID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLndyYXBNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmlsdGVyTW9kZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgIC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H1cbiAgICBWaWRlb1RleHR1cmUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VWaWRlb1RleHR1cmUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZpZGVvUGxheWVyRW50aXR5ID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLndyYXBNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmlsdGVyTW9kZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFZpZGVvVGV4dHVyZS5kZWNvZGUgPSBkZWNvZGU7XG59KShWaWRlb1RleHR1cmUgfHwgKFZpZGVvVGV4dHVyZSA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlVGV4dHVyZVVuaW9uKCkge1xuICAgIHJldHVybiB7IHRleDogdW5kZWZpbmVkIH07XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBUZXh0dXJlVW5pb247XG4oZnVuY3Rpb24gKFRleHR1cmVVbmlvbikge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIHN3aXRjaCAobWVzc2FnZS50ZXg/LiRjYXNlKSB7XG4gICAgICAgICAgICBjYXNlIFwidGV4dHVyZVwiOlxuICAgICAgICAgICAgICAgIFRleHR1cmUuZW5jb2RlKG1lc3NhZ2UudGV4LnRleHR1cmUsIHdyaXRlci51aW50MzIoMTApLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwiYXZhdGFyVGV4dHVyZVwiOlxuICAgICAgICAgICAgICAgIEF2YXRhclRleHR1cmUuZW5jb2RlKG1lc3NhZ2UudGV4LmF2YXRhclRleHR1cmUsIHdyaXRlci51aW50MzIoMTgpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwidmlkZW9UZXh0dXJlXCI6XG4gICAgICAgICAgICAgICAgVmlkZW9UZXh0dXJlLmVuY29kZShtZXNzYWdlLnRleC52aWRlb1RleHR1cmUsIHdyaXRlci51aW50MzIoMjYpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgVGV4dHVyZVVuaW9uLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlVGV4dHVyZVVuaW9uKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4ID0geyAkY2FzZTogXCJ0ZXh0dXJlXCIsIHRleHR1cmU6IFRleHR1cmUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleCA9IHsgJGNhc2U6IFwiYXZhdGFyVGV4dHVyZVwiLCBhdmF0YXJUZXh0dXJlOiBBdmF0YXJUZXh0dXJlLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50ZXggPSB7ICRjYXNlOiBcInZpZGVvVGV4dHVyZVwiLCB2aWRlb1RleHR1cmU6IFZpZGVvVGV4dHVyZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgVGV4dHVyZVVuaW9uLmRlY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ICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jb2xsaXNpb25NYXNrID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcImJveFwiLCBib3g6IFBCTWVzaENvbGxpZGVyX0JveE1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcInNwaGVyZVwiLCBzcGhlcmU6IFBCTWVzaENvbGxpZGVyX1NwaGVyZU1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcImN5bGluZGVyXCIsIGN5bGluZGVyOiBQQk1lc2hDb2xsaWRlcl9DeWxpbmRlck1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcInBsYW5lXCIsIHBsYW5lOiBQQk1lc2hDb2xsaWRlcl9QbGFuZU1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCTWVzaENvbGxpZGVyLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCTWVzaENvbGxpZGVyIHx8IChQQk1lc2hDb2xsaWRlciA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlUEJNZXNoQ29sbGlkZXJfQm94TWVzaCgpIHtcbiAgICByZXR1cm4ge307XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBQQk1lc2hDb2xsaWRlcl9Cb3hNZXNo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ICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCTWVzaENvbGxpZGVyX0N5bGluZGVyTWVzaCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJhZGl1c1RvcCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJhZGl1c0JvdHRvbSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCTWVzaENvbGxpZGVyX0N5bGluZGVyTWVzaC5kZWNvZGUgPSBkZWNvZGU7XG59KShQQk1lc2hDb2xsaWRlcl9DeWxpbmRlck1lc2ggfHwgKFBCTWVzaENvbGxpZGVyX0N5bGluZ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ICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwiYm94XCIsIGJveDogUEJNZXNoUmVuZGVyZXJfQm94TWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwic3BoZXJlXCIsIHNwaGVyZTogUEJNZXNoUmVuZGVyZXJfU3BoZXJlTWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwiY3lsaW5kZXJcIiwgY3lsaW5kZXI6IFBCTWVzaFJlbmRlcmVyX0N5bGluZGVyTWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwicGxhbmVcIiwgcGxhbmU6IFBCTWVzaFJlbmRlcmVyX1BsYW5lTWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJNZXNoUmVuZGVyZXIuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJNZXNoUmVuZGVyZXIgfHwgKFBCTWVzaFJlbmRlcmVyID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9Cb3hNZXNoKCkge1xuICAgIHJldHVybiB7IHV2czogW10gfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFBCTWVzaFJlbmRlcmVyX0JveE1lc2g7XG4oZnVuY3Rpb24gKFBCTWVzaFJlbmRlcmVyX0JveE1lc2gpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICB3cml0ZXIudWludDMyKDEwKS5mb3JrKCk7XG4gICAgICAgIGZvciAoY29uc3QgdiBvZiBtZXNzYWdlLnV2cykge1xuICAgICAgICAgICAgd3JpdGVyLmZsb2F0KHYpO1xuICAgICAgICB9XG4gICAgICAgIHdyaXRlci5sZGVsaW0oKTtcbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUEJNZXNoUmVuZGVyZXJfQm94TWVzaC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCTWVzaFJlbmRlcmVyX0JveE1lc2goKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS51dnMucHVzaChyZWFkZXIuZmxvYXQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5kMiA9IHJlYWRlci51aW50MzIoKSArIHJlYWRlci5wb3M7XG4gIC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5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzKS5mbG9hdChtZXNzYWdlLnJhZGl1c1RvcCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucmFkaXVzQm90dG9tICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UucmFkaXVzQm90dG9tKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2guZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2goKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5yYWRpdXNUb3AgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5yYWRpdXNCb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2guZGVjb2RlID0gZGVjb2RlO1xufSkoUEJNZXNoUmVuZGVyZXJfQ3lsaW5kZXJNZXNoIHx8IChQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2ggPSB7fSkpO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVBCTWVzaFJlbmRlcmVyX1BsYW5lTWVzaCgpIHtcbiAgICByZXR1cm4geyB1dnM6IFtdIH07XG59XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IHZhciBQQk1lc2hSZW5kZXJlcl9QbGFuZU1lc2g7XG4oZnVuY3Rpb24gKFBCTWVzaFJlbmRlcmVyX1BsYW5lTWVzaCkge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIHdyaXRlci51aW50MzIoMTApLmZvcmsoKTtcbiAgICAgICAgZm9yIChjb25zdCB2IG9mIG1lc3NhZ2UudXZzKSB7XG4gICAgICAgICAgICB3cml0ZXIuZmxvYXQodik7XG4gICAgICAgIH1cbiAgICAgICAgd3JpdGVyLmxkZWxpbSgpO1xuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQk1lc2hSZW5kZXJlcl9QbGFuZU1lc2guZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9QbGFuZU1lc2goKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS51dnMucHVzaChyZWFkZXIuZmxvYXQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5kMiA9IHJlYWRlci51aW50MzIoKSArIHJlYWRlci5wb3M7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZDIpIHtcbiAgICAgICAgICAgIC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ICAgIENvbG9yMy5lbmNvZGUobWVzc2FnZS5jb2xvciwgd3JpdGVyLnVpbnQzMigyNikuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQk5mdFNoYXBlLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJOZnRTaGFwZSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnVybiA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdHlsZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJOZnRTaGFwZS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQk5mdFNoYXBlIHx8IChQQk5mdFNoYXBlID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQk5mdFNoYXBlIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvbmZ0X3NoYXBlLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgTmZ0U2hhcGVTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDQwLFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdCB3cml0ZXIgPSBQQk5mdFNoYXBlLmVuY29kZSh2YWx1ZSk7XG4gICAgICAgIGNvbnN0IGJ1ZmZlciA9IG5ldyBVaW50OEFycmF5KHdyaXRlci5maW5pc2goKSwgMCwgd3JpdGVyLmxlbik7XG4gICAgICAgI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c3NhZ2UucG9pbnRlckV2ZW50cykge1xuICAgICAgICAgICAgUEJQb2ludGVyRXZlbnRzX0VudHJ5LmVuY29kZSh2LCB3cml0ZXIudWludDMyKDEwKS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCUG9pbnRlckV2ZW50cy5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCUG9pbnRlckV2ZW50cygpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvaW50ZXJFdmVudHMucHVzaChQQlBvaW50ZXJFdmVudHNfRW50cnkuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fC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obWVzc2FnZS5tYXhEaXN0YW5jZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uuc2hvd0ZlZWRiYWNrICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMzIpLmJvb2wobWVzc2FnZS5zaG93RmVlZGJhY2spO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCUG9pbnRlckV2ZW50c19JbmZvLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJQb2ludGVyRXZlbnRzX0luZm8oKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmJ1dHRvbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhvdmVyVGV4dCA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhEaXN0YW5jZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNob3dGZWVkYmFjayA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJQb2ludGVyRXZlbnRzX0luZm8uZGVjb2RlID0gZGVjb2RlO1xufSkoUEJQb2ludGVyRXZlbnRzX0luZm8gfHwgKFBCUG9pbnRlckV2ZW50c19JbmZvID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VQQlBvaW50ZXJ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4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ldmVudFR5cGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ldmVudEluZm8gPSBQQlBvaW50ZXJFdmVudHNfSW5mby5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCUG9pbnRlckV2ZW50c19FbnRyeS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQlBvaW50ZXJFdmVudHNfRW50cnkgfHwgKFBCUG9pbnRlckV2ZW50c19FbnRyeSA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJQb2ludGVyRXZlbnRzIH0gZnJv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yaXRlci51aW50MzIoNDApLnVpbnQzMihtZXNzYWdlLnRpbWVzdGFtcCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuYW5hbG9nICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNTMpLmZsb2F0KG1lc3NhZ2UuYW5hbG9nKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS50aWNrTnVtYmVyICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDU2KS51aW50MzIobWVzc2FnZS50aWNrTnVtYmVyKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlBvaW50ZXJFdmVudHNSZXN1bHQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlBvaW50ZXJFdmVudHNSZXN1bHQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmJ1dHRvbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhpdCA9IFJheWNhc3RIaXQuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdGF0ZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hbmFsb2cgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50aWNrTnVtYmVyID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCUG9pbnRlckV2ZW50c1Jlc3VsdC5kZWNvZGUgPSBkZWNvZGU7XG59KShQQlBvaW50ZXJFdmVudHNSZXN1bHQgfHwgKFBCUG9pbnRlckV2ZW50c1Jlc3VsdCA9IHt9KSk7XG4iLCAiLyogZXNsaW50LWRpc2FibGUgKi9cbmltcG9ydCBfbTAgZnJvbSBcInByb3RvYnVmanMvbWluaW1hbFwiO1xuaW1wb3J0IHsgVmVjdG9yMyB9IGZyb20gXCIuLi8uLi8uLi9jb21tb24vdmVjdG9ycy5nZW5cIjtcbmNvbnN0IHByb3RvYnVmUGFja2FnZVNhcmFzYSA9IFwiZGVjZW50cmFsYW5kLnNkay5jb21wb25lbnRzLmNvbW1vblwiO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVJheWNhc3RIaXQoKSB7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgcG9zaXRpb246IHVuZGVmaW5lZCxcbiAgICAgICAgZ2xvYmFsT3JpZ2luOiB1bmRlZmluZWQsXG4gICAgICAgIGRpcmVjdGlvbjogdW5kZWZpbmVkLFxuICAgICAgICBub3JtYWxIaXQ6IHV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nZS5sZW5ndGggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDUpLmZsb2F0KG1lc3NhZ2UubGVuZ3RoKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tZXNoTmFtZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDUwKS5zdHJpbmcobWVzc2FnZS5tZXNoTmFtZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZW50aXR5SWQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig1NikudWludDMyKG1lc3NhZ2UuZW50aXR5SWQpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFJheWNhc3RIaXQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VSYXljYXN0SGl0KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb24gPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZ2xvYmFsT3JpZ2luID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpcmVjdGlvbiA9IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ub3JtYWxIaXQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubGVuZ3RoID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaE5hbWUgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW50aXR5SWQgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUmF5Y2FzdEhpdC5kZWNvZGUgPSBkZWNvZGU7XG59KShSYXljYXN0SGl0IHx8IChSYXljYXN0SGl0ID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlBvaW50ZXJFdmVudHNSZXN1bHQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9wb2ludGVyX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PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmlzUG9pbnRlckxvY2tlZCA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJQb2ludGVyTG9jay5kZWNvZGUgPSBkZWNvZGU7XG59KShQQlBvaW50ZXJMb2NrIHx8IChQQlBvaW50ZXJMb2NrID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlBvaW50ZXJMb2NrIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvcG9pbnRlcl9sb2NrLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgUG9pbnRlckxvY2tTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDc0LFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdCB3cml0ZXIgPSBQQlBvaW50ZXJMb2NrLmVuY29kZSh2YWx1ZSk7XG4gICAgICAgIGNvbnN0IGJ1ZmZlciA9IG5ldyBVaW50OEFycmF5KHdyaXRlci5maW5pc2goKSwgMCwgd3JpdGVyLmxlbik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVCdWZmZXIoYnVmZmVyLC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b2JhbFRhcmdldCwgd3JpdGVyLnVpbnQzMig1OCkuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJ0YXJnZXRFbnRpdHlcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDgwKS51aW50MzIobWVzc2FnZS5kaXJlY3Rpb24udGFyZ2V0RW50aXR5KTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhEaXN0YW5jZSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzNykuZmxvYXQobWVzc2FnZS5tYXhEaXN0YW5jZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucXVlcnlUeXBlICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDQwKS5pbnQzMihtZXNzYWdlLnF1ZXJ5VHlwZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuY29udGludW91cyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDY0KS5ib29sKG1lc3NhZ2UuY29udGludW91cyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuY29sbGlzaW9uTWFzayAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDcyKS51aW50MzIobWVzc2FnZS5jb2xsaXNpb25NYXNrKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlJheWNhc3QuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlJheWNhc3QoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vcmlnaW5PZmZzZXQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlyZWN0aW9uID0geyAkY2FzZTogXCJsb2NhbERpcmVjdGlvblwiLCBsb2NhbERpcmVjdGlvbjogVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlyZWN0aW9uID0geyAkY2FzZTogXCJnbG9iYWxEaXJlY3Rpb25cIiwgZ2xvYmFsRGlyZWN0aW9uOiBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kaXJlY3Rpb24gPSB7ICRjYXNlOiBcImdsb2JhbFRhcmdldFwiLCBnbG9iYWxUYXJnZXQ6IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDEwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kaXJlY3Rpb24gPSB7ICRjYXNlOiBcInRhcmdldEVudGl0eVwiLCB0YXJnZXRFbnRpdHk6IHJlYWRlci51aW50MzIoKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1heERpc3RhbmNlID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucXVlcnlUeXBlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY29udGludW91cyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNzIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY29sbGlzaW9uTWFzayA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xu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N0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5nbG9iYWxPcmlnaW4gPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlyZWN0aW9uID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhpdHMucHVzaChSYXljYXN0SGl0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpY2tOdW1iZXIgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJSYXljYXN0UmVzdWx0LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCUmF5Y2FzdFJlc3VsdCB8fCAoUEJSYXljYXN0UmVzdWx0ID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlJheWNhc3RSZXN1bHQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9yYXljYXN0X3Jlc3VsdC5nZW4nO1xuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFJheWNhc3RSZXN1bHRTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDY4LFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdCB3cml0ZXIgPSBQQlJheWNhc3RSZXN1bHQuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZp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ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTYpLmludDMyKG1lc3NhZ2UuZm9udCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZm9udFNpemUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyOSkuZmxvYXQobWVzc2FnZS5mb250U2l6ZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZm9udEF1dG9TaXplICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMzIpLmJvb2wobWVzc2FnZS5mb250QXV0b1NpemUpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnRleHRBbGlnbiAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDQwKS5pbnQzMihtZXNzYWdlLnRleHRBbGlnbik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uud2lkdGggIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig1MykuZmxvYXQobWVzc2FnZS53aWR0aCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuaGVpZ2h0ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNjEpLmZsb2F0KG1lc3NhZ2UuaGVpZ2h0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5wYWRkaW5nVG9wICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNjkpLmZsb2F0KG1lc3NhZ2UucGFkZGluZ1RvcCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucGFkZGluZ1JpZ2h0ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNzcpLmZsb2F0KG1lc3NhZ2UucGFkZGluZ1JpZ2h0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5wYWRkaW5nQm90dG9tICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoODUpLmZsb2F0KG1lc3NhZ2UucGFkZGluZ0JvdHRvbSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucGFkZGluZ0xlZnQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig5MykuZmxvYXQobWVzc2FnZS5wYWRkaW5nTGVmdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubGluZVNwYWNpbmcgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMDEpLmZsb2F0KG1lc3NhZ2UubGluZVNwYWNpbmcpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmxpbmVDb3VudCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEwNCkuaW50MzIobWVzc2FnZS5saW5lQ291bnQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnRleHRXcmFwcGluZyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDExMikuYm9vbChtZXNzYWdlLnRleHRXcmFwcGluZyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uuc2hhZG93Qmx1ciAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEyNSkuZmxvYXQobWVzc2FnZS5zaGFkb3dCbHVyKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5zaGFkb3dPZmZzZXRYICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50Mz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AgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJUZXh0U2hhcGUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50ZXh0ID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mb250U2l6ZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnRBdXRvU2l6ZSA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dEFsaWduID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2lkdGggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2MSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5oZWlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA4OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2OSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wYWRkaW5nVG9wID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNzcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ1JpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDg1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdCb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ0xlZnQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmxpbmVTcGFjaW5nID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5saW5lQ291bnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTEyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRXcmFwcGluZyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEyNSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaGFkb3dCbHVyID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaGFkb3dPZmZzZXRYID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE0MSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaGFkb3dPZmZzZXRZID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTg6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE0OSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vdXRsaW5lV2lkdGggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTU0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNoYWRvd0NvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vdXRsaW5lQ29sb3IgPSBDb2xvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTcwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRDb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCVGV4dFNoYXBlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVGV4dFNoYXBlIHx8IChQQlRleHRTaGFwZSA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJUZXh0U2hhcGUgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy90ZXh0X3NoYXBlLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVGV4dFNoYXBlU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTAzMCxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJUZXh0U2hhcGUuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICA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XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDE2KS5pbnQzMihtZXNzYWdlLmVhc2luZ0Z1bmN0aW9uKTtcbiAgICAgICAgfVxuICAgICAgICBzd2l0Y2ggKG1lc3NhZ2UubW9kZT8uJGNhc2UpIHtcbiAgICAgICAgICAgIGNhc2UgXCJtb3ZlXCI6XG4gICAgICAgICAgICAgICAgTW92ZS5lbmNvZGUobWVzc2FnZS5tb2RlLm1vdmUsIHdyaXRlci51aW50MzIoMjYpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwicm90YXRlXCI6XG4gICAgICAgICAgICAgICAgUm90YXRlLmVuY29kZShtZXNzYWdlLm1vZGUucm90YXRlLCB3cml0ZXIudWludDMyKDM0KS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcInNjYWxlXCI6XG4gICAgICAgICAgICAgICAgU2NhbGUuZW5jb2RlKG1lc3NhZ2UubW9kZS5zY2FsZSwgd3JpdGVyLnVpbnQzMig0MikuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5wbGF5aW5nICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDgpLmJvb2wobWVzc2FnZS5wbGF5aW5nKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5jdXJyZW50VGltZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDYxKS5mbG9hdChtZXNzYWdlLmN1cnJlbnRUaW1lKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlR3ZWVuLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJUd2VlbigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmR1cmF0aW9uID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZWFzaW5nRnVuY3Rpb24gPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tb2RlID0geyAkY2FzZTogXCJtb3ZlXCIsIG1vdmU6IE1vdmUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1vZGUgPSB7ICRjYXNlOiBcInJvdGF0ZVwiLCByb3RhdGU6IFJvdGF0ZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubW9kZSA9IHsgJGNhc2U6IFwic2NhbGVcIiwgc2NhbGU6IFNjYWxlLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wbGF5aW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiA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2FnZS5lbmQsIHdyaXRlci51aW50MzIoMTgpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmFjZURpcmVjdGlvbiAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI0KS5ib29sKG1lc3NhZ2UuZmFjZURpcmVjdGlvbik7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgTW92ZS5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZU1vdmUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdGFydCA9IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5lbmQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmFjZURpcmVjdGlvbiA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgTW92ZS5kZWNvZGUgPSBkZWNvZGU7XG59KShNb3ZlIHx8IChNb3ZlID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VSb3RhdGUoKSB7XG4gICAgcmV0dXJuIHsgc3RhcnQ6IHVuZGVmaW5lZCwgZW5kOiB1bmRlZmluZWQgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFJvdGF0ZTtcbihmdW5jdGlvbiAoUm90YXRlKSB7XG4gICAgZnVuY3Rpb24gZW5jb2RlKG1lc3NhZ2UsIHdyaXRlciA9IF9tMC5Xcml0ZXIuY3JlYXRlKCkpIHtcbiAgIC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lci51aW50MzIoMTApLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZW5kICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIFZlY3RvcjMuZW5jb2RlKG1lc3NhZ2UuZW5kLCB3cml0ZXIudWludDMyKDE4KS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFNjYWxlLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlU2NhbGUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdGFydCA9IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5lbmQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgU2NhbGUuZGVjb2RlID0gZGVjb2RlO1xufSkoU2NhbGUgfHwgKFNjYWxlID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlR3ZWVuIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvdHdlZW4uZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBUd2VlblNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6IDExMDIsXG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGNvbnN0IHdyaXRlciA9IFBCVHdlZW4uZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUJ1ZmZlcihidWZmZXIsIGZhbHNlKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gUEJUd2Vlbi5kZWNvZG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ge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc2VxdWVuY2UucHVzaChQQlR3ZWVuLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmxvb3AgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQlR3ZWVuU2VxdWVuY2UuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJUd2VlblNlcXVlbmNlIHx8IChQQlR3ZWVuU2VxdWVuY2UgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCVHdlZW5TZXF1ZW5jZSB9IGZyb20gJy4vcGIvZGVjZW50cmFsYW5kL3Nkay9jb21wb25lbnRzL3R3ZWVuX3NlcXVlbmNlLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVHdlZW5TZXF1ZW5jZVNjaGVtYSA9IHtcbiAgICBDT01Q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ICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlR3ZWVuU3RhdGUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnN0YXRlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY3VycmVudFRpbWUgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfV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gICAgIGZvciAoY29uc3QgdiBvZiBtZXNzYWdlLnV2cykge1xuICAgICAgICAgICAgd3JpdGVyLmZsb2F0KHYpO1xuICAgICAgICB9XG4gICAgICAgIHdyaXRlci5sZGVsaW0oKTtcbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUEJVaUJhY2tncm91bmQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlVpQmFja2dyb3VuZCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dHVyZSA9IFRleHR1cmVVbmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHR1cmVNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dHVyZVNsaWNlcyA9IEJvcmRlclJlY3QuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSA0NSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS51dnMucHVzaChyZWFkZXIuZmxvYXQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSA0Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5kMiA9IHJlYWRlci51aW50MzIoKSArIHJlYWRlci5wb3M7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnV2cy5wdXNoKHJlYWRlci5mbG9hdCgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJVaUJhY2tncm91bmQuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJVaUJhY2tncm91bmQgfHwgKFBCVWlCYWNrZ3JvdW5kID0ge30pKTtcbiIsICIvKiBlc2xpbnQtZGlzYWJsZSAqL1xuaW1wb3J0IF9tMCBmcm9tIFwicHJvdG9idWZqcy9taW5pbWFsXCI7XG5jb25zdCBwcm90b2J1ZlBhY2thZ2VTYXJhc2EgPSBcImRlY2VudHJhbGFuZC5jb21tb25cIjtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VCb3JkZXJSZWN0KCkge1xuICAgIHJldHVybiB7IHRvcDogMCwgbGVmdDogMCwgcmlnaHQ6IDAsIGJvdHRvbTogMCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgQm9yZGVyUmVjdDtcbihmdW5jdGlvbiAoQm9yZGVyUmVjdCkge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGlmIChtZXNzYWdlLnRvcCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMykuZmxvYXQobWVzc2FnZS50b3ApO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmxlZnQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UubGVmdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucmlnaHQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjkpLmZsb2F0KG1lc3NhZ2UucmlnaHQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmJvdHRvbSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzNykuZmxvYXQobWVzc2FnZS5ib3R0b20pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIEJvcmRlclJlY3QuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VCb3JkZXJSZWN0KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudG9wID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubGVmdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYm90dG9tID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAg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HV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VSZWN0KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS53aWR0aCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhlaWdodCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFJlY3QuZGVjb2RlID0gZGVjb2RlO1xufSkoUmVjdCB8fCAoUmVjdCA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJVaUJhY2tncm91bmQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy91aV9iYWNrZ3JvdW5kLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVWlCYWNrZ3JvdW5kU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA1MyxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJVaUJhY2tncm91bmQuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUJ1ZmZlcihidWZmZXIsIGZhbHNlKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gUEJVaUJhY2tncm91bmQuZGV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bGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kZXZpY2VQaXhlbFJhdGlvID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2lkdGggPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5oZWlnaHQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5pbnRlcmFjdGFibGVBcmVhID0gQm9yZGVyUmVjdC5kZWNvZG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RlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UudGV4dEFsaWduICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoODApLmludDMyKG1lc3NhZ2UudGV4dEFsaWduKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5mb250ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoODgpLmludDMyKG1lc3NhZ2UuZm9udCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZm9udFNpemUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig5NikuaW50MzIobWVzc2FnZS5mb250U2l6ZSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUEJVaURyb3Bkb3duLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJVaURyb3Bkb3duKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hY2NlcHRFbXB0eSA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW1wdHlMYWJlbCA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vcHRpb25zLnB1c2gocmVhZGVyLnN0cmluZygpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zZWxlY3RlZEluZGV4ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlzYWJsZWQgPSByZWFkZXIuYm9vbCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDUwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRBbGlnbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDExOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mb250ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDk2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnRTaXplID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgIC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Rlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlVpRHJvcGRvd25SZXN1bHQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJVaURyb3Bkb3duUmVzdWx0LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVWlEcm9wZG93blJlc3VsdCB8fCAoUEJVaURyb3Bkb3duUmVzdWx0ID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlVpRHJvcGRvd25SZXN1bHQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy91aV9kcm9wZG93bl9yZXN1bHQuZ2VuJztcbi8qKlxuICogQGludGVybmFsX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A/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCVWlJbnB1dCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBsYWNlaG9sZGVyID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGxhY2Vob2xkZXJDb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpc2FibGVkID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gODApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dEFsaWduID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDg4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZm9udFNpemUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTA2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgIC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O1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCVWlJbnB1dFJlc3VsdC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCVWlJbnB1dFJlc3VsdCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmlzU3VibWl0ID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICA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aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52YWx1ZSA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRBbGlnbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mb250U2l6ZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCVWlUZXh0LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVWlUZXh0IHx8IChQQlVpVGV4dCA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJVaVRleHQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy91aV90ZXh0Lmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVWlUZXh0U2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA1MixcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJVaVRleHQuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUJ1ZmZlcihidWZmZXIsIGZhbHNlKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gUEJVaVRleHQuZGVjb2RlKHJlYWRlci5idWZmZXIoKSwgcmVhZGVyLnJlbWFpbmluZ0J5dGVzK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U2hyaW5rICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNTMpLmZsb2F0KG1lc3NhZ2UuZmxleFNocmluayk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25UeXBlICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDU2KS5pbnQzMihtZXNzYWdlLnBvc2l0aW9uVHlwZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuYWxpZ25TZWxmICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDY0KS5pbnQzMihtZXNzYWdlLmFsaWduU2VsZik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmxleERpcmVjdGlvbiAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig3MikuaW50MzIobWVzc2FnZS5mbGV4RGlyZWN0aW9uKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5qdXN0aWZ5Q29udGVudCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4MCkuaW50MzIobWVzc2FnZS5qdXN0aWZ5Q29udGVudCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uub3ZlcmZsb3cgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoODgpLmludDMyKG1lc3NhZ2Uub3ZlcmZsb3cpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmRpc3BsYXkgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoOTYpLmludDMyKG1lc3NhZ2UuZGlzcGxheSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmxleEJhc2lzVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMDQpLmludDMyKG1lc3NhZ2UuZmxleEJhc2lzVW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmxleEJhc2lzICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDExNykuZmxvYXQobWVzc2FnZS5mbGV4QmFzaXMpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmZsZXhHcm93ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEyNSkuZmxvYXQobWVzc2FnZS5mbGV4R3Jvdyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uud2lkdGhVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEyOCkuaW50MzIobWVzc2FnZS53aWR0aFVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLndpZHRoICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDE0MSkuZmxvYXQobWVzc2FnZS53aWR0aCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuaGVpZ2h0VW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNDQpLmludDMyKG1lc3NhZ2UuaGVpZ2h0VW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuaGVpZ2h0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDE1NykuZmxvYXQobWVzc2FnZS5oZWlnaHQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1pbldpZHRoVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNjApLmludDMyKG1lc3NhZ2UubWluV2lkdGhVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5taW5XaWR0aCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNzMpLmZsb2F0KG1lc3NhZ2UubWluV2lkdGgpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1pbkhlaWdodFVuaXQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTc2KS5pbnQzMihtZXNzYWdlLm1pbkhlaWdodFVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1pbkhlaWdodCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxODkpLmZsb2F0KG1lc3NhZ2UubWluSGVpZ2h0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhXaWR0aFVuaXQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTkyKS5pbnQzMihtZXNzYWdlLm1heFdpZHRoVW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWF4V2lkdGggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjA1KS5mbG9hdChtZXNzYWdlLm1heFdpZHRoKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhIZWlnaHRVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDIwOCkuaW50MzIobWVzc2FnZS5tYXhIZWlnaHRVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhIZWlnaHQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjIxKS5mbG9hdChtZXNzYWdlLm1heEhlaWdodCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25MZWZ0VW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyMjQpLmludDMyKG1lc3NhZ2UucG9zaXRpb25MZWZ0VW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25MZWZ0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDIzNykuZmxvYXQobWVzc2FnZS5wb3NpdGlvbkxlZnQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnBvc2l0aW9uVG9wVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNDApLmludDMyKG1lc3NhZ2UucG9zaXRpb25Ub3BVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5wb3NpdGlvblRvcCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNTMpLmZsb2F0KG1lc3NhZ2UucG9zaXRpb25Ub3ApO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnBvc2l0aW9uUmlnaHRVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI1NikuaW50MzIobWVzc2FnZS5wb3NpdGlvblJpZ2h0VW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25SaWdodCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNjkpLmZsb2F0KG1lc3NhZ2UucG9zaXRpb25SaWdodCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25Cb3R0b21Vbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI3MikuaW50MzIobWVzc2FnZS5wb3NpdGlvbkJvdHRvbVVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnBvc2l0aW9uQm90dG9tICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI4NSkuZmxvYXQobWVzc2FnZS5wb3NpdGlvbkJvdHRvbSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luTGVmdFVuaXQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjg4KS5pbnQzMihtZXNzYWdlLm1hcmdpbkxlZnRVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXJnaW5MZWZ0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMwMSkuZmxvYXQobWVzc2FnZS5tYXJnaW5MZWZ0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXJnaW5Ub3BVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMwNCkuaW50MzIobWVzc2FnZS5tYXJnaW5Ub3BVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXJnaW5Ub3AgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMzE3KS5mbG9hdChtZXNzYWdlLm1hcmdpblRvcCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luUmlnaHRVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMyMCkuaW50MzIobWVzc2FnZS5tYXJnaW5SaWdodFVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1hcmdpblJpZ2h0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMzMykuZmxvYXQobWVzc2FnZS5tYXJnaW5SaWdodCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luQm90dG9tVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzMzYpLmludDMyKG1lc3NhZ2UubWFyZ2luQm90dG9tVW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luQm90dG9tICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZX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gICAgICAgICAgICAgIG1lc3NhZ2UucGFyZW50ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucmlnaHRPZiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFsaWduQ29udGVudCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFsaWduSXRlbXMgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mbGV4V3JhcCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDUzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZsZXhTaHJpbmsgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wb3NpdGlvblR5cGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA4OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2NCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hbGlnblNlbGYgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA5OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA3Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mbGV4RGlyZWN0aW9uID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmp1c3RpZnlDb250ZW50ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDg4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm92ZXJmbG93ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDk2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpc3BsYXkgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTA0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZsZXhCYXNpc1VuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTE3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZsZXhCYXNpcyA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDE1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMjUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmxleEdyb3cgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTI4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLndpZHRoVW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDE3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2lkdGggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTQ0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhlaWdodFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTU3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhlaWdodCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDIwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNjApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWluV2lkdGhVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE3Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5taW5XaWR0aCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDIyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNzYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWluSGVpZ2h0VW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDIzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxODkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWluSGVpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE5Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhXaWR0aFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjA1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1heFdpZHRoID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIwOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhIZWlnaHRVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhIZWlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uTGVmdFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uTGVmdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDMwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb25Ub3BVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI1Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wb3NpdGlvblRvcCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDMyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb25SaWdodFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjY5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uUmlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjcyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uQm90dG9tVW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyODUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb25Cb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjg4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpbkxlZnRVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMwMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXJnaW5MZWZ0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzg6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMwNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXJnaW5Ub3BVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzk6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMxNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXJnaW5Ub3AgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0MDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzIwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpblJpZ2h0VW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMzMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWFyZ2luUmlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0MjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzM2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpbkJvdHRvbVVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0MzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQ5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpbkJvdHRvbSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNTIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ0xlZnRVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM2NSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wYWRkaW5nTGVmdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNjgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ1RvcFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0NzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdUb3AgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0ODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzg0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdSaWdodFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzk3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdSaWdodCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDUwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ0JvdHRvbVVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1MTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdCb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1MjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvaW50ZXJGaWx0ZXIgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZ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ICAgICAgICB3cml0ZXIudWludDMyKDQwKS5pbnQzMihtZXNzYWdlLnN0YXRlKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlZpZGVvRXZlbnQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlZpZGVvRXZlbnQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50aWNrTnVtYmVyID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmN1cnJlbnRPZmZzZXQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52aWRlb0xlbmd0aCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnN0YXRlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJWaWRlb0V2ZW50LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVmlkZW9FdmVudCB8fCAoUEJWaWRlb0V2ZW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WZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDM3KS5mbG9hdChtZXNzYWdlLnZvbHVtZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucGxheWJhY2tSYXRlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDUpLmZsb2F0KG1lc3NhZ2UucGxheWJhY2tSYXRlKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5sb29wICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDgpLmJvb2wobWVzc2FnZS5sb29wKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlZpZGVvUGxheWVyLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJWaWRlb1BsYXllcigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNyYyA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wbGF5aW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wb3NpdGlvbiA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZvbHVtZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQ1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBsYXliYWNrUmF0ZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQ4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmxvb3AgPSByZWFkZXIuYm9vbCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCVmlkZW9QbGF5ZXIuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJWaWRlb1BsYXllciB8fCAoUEJWaWRlb1BsYXllciA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJWaWRlb1BsYXllciB9IGZyb20gJy4vcGIvZGVjZW50cmFsYW5kL3Nkay9jb21wb25lbnRzL3ZpZGVvX3BsYXllci5nZW4nO1xuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFZpZGVvUGxheWVyU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA0MyxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJWaWRlb1BsYXllci5lbmNvZGUodmFsdWUpO1xuICAgICAgICBjb25zdCBidWZmZXIgPSBuZXcgVWludDhBcnJheSh3cml0ZXIuZmluaXNoKCksIDAsIHdyaXRlci5sZW4pO1xuICAgICAgICBidWlsZGVyLndyaXRlQnVmZmVyKGJ1ZmZlciwgZmFsc2UpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVh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nZpc2libGUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCVmlzaWJpbGl0eUNvbXBvbmVudC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCVmlzaWJpbGl0eUNvbXBvbmVudCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudmlzaWJsZSA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4g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W50LmdldE11dGFibGVPck51bGwoZW50aXR5KTtcbiAgICAgICAgaWYgKCFhbmltKVxuICAgICAgICAgICAgcmV0dXJuIFtudWxsLCBudWxsXTtcbiAgICAgICAgY29uc3Qgc3RhdGUgPSBhbmltLnN0YXRlcy5maW5kKChpdGVtKSA9PiBpdGVtLmNsaXAgPT09IGNsaXBOYW1lKTtcbiAgICAgICAgaWYgKCFzdGF0ZSlcbiAgICAgICAgICAgIHJldHVybiBbYW5pbSwgbnVsbF07XG4gICAgICAgIHJldHVybiBbYW5pbSwgc3RhdGVdO1xuICAgIH1cbiAgICByZXR1cm4ge1xuICAgICAgICAuLi50aGVDb21wb25lbnQsXG4gICAgICAgIGdldENsaXBPck51bGwoZW50aXR5LCBjbGlwTmFtZSkge1xuICAgICAgICAgICAgY29uc3QgW18sIHN0YXRlXSA9IGdldENsaXBBbmRBbmltYXRvcihlbnRpdHksIGNsaXBOYW1lKTtcbiAgICAgICAgICAgIHJldHVybiBzdGF0ZTtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0Q2xpcChlbnRpdHksIGNsaXBOYW1lKSB7XG4gICAgICAgICAgICBjb25zdCBbYW5pbWF0b3IsIHN0YXRlXSA9IGdldENsaXBBbmRBbmltYXRvcihlbnRpdHksIGNsaXBOYW1lKTtcbiAgICAgICAgICAgIGlmICghYW5pbWF0b3IpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFRoZXJlIGlzIG5vIEFuaW1hdG9yIGZvdW5kIGluIHRoZSBlbnRpdHkgJHtlbnRpdHl9YCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIXN0YXRlKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBUaGUgQW5pbWF0b3IgY29tcG9uZW50IG9mICR7ZW50aXR5fSBoYXMgbm8gdGhlIHN0YXRlICR7Y2xpcE5hbWV9YCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gc3RhdGU7XG4gICAgICAgIH0sXG4gICAgICAgIHBsYXlTaW5nbGVBbmltYXRpb24oZW50aXR5LCBjbGlwTmFtZSwgc2hvdWxkUmVzZXQgPSB0cnVlKSB7XG4gICAgICAgICAgICBjb25zdCBbYW5pbWF0b3IsIHN0YXRlXSA9IGdldENsaXBBbmRBbmltYXRvcihlbnRpdHksIGNsaXBOYW1lKTtcbiAgICAgICAgICAgIGlmICghYW5pbWF0b3IgfHwgIXN0YXRlKVxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIC8vIFJlc2V0IGFsbCBvdGhlciBhbmltYXRpb25zXG4gICAgICAgICAgICBmb3IgKGNvbnN0IHN0YXRlIG9mIGFuaW1hdG9yLnN0YXRlcykge1xuICAgICAgICAgICAgICAgIHN0YXRlLnBsYXlpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBzdGF0ZS5zaG91bGRSZXNldCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzdGF0ZS5wbGF5aW5nID0gdHJ1ZTtcbiAgICAgICAgICAgIHN0YXRlLnNob3VsZFJlc2V0ID0gc2hvdWxkUmVzZXQ7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfSxcbiAgICAgICAgc3RvcEFsbEFuaW1hdGlvbnMoZW50aXR5LCByZXNldEN1cnNvciA9IHRydWUpIHtcbiAgICAgICAgICAgIC8vIEdldCB0aGUgbXV0YWJsZSB0byBtb2RpZnlpbmdcbiAgICAgICAgICAgIGNvbnN0IGFuaW1hdG9yID0gdGhlQ29tcG9uZW50LmdldE11dGFibGVPck51bGwoZW50aXR5KTtcbiAgICAgICAgICAgIGlmICghYW5pbWF0b3IpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgLy8gUmVzZXQgYWxsIG90aGVyIGFuaW1hdGlvbnNcbiAgICAgICAgICAgIGZvciAoY29uc3Qgc3RhdGUgb2YgYW5pbWF0b3Iuc3RhdGVzKSB7XG4gICAgICAgICAgICAgICAgc3RhdGUucGxheWluZyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHN0YXRlLnNob3VsZFJlc2V0ID0gcmVzZXRDdXJzb3I7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgTWF0ZXJpYWwgfSBmcm9tICcuLi9nZW5lcmF0ZWQvaW5kZXguZ2VuJztcbmNvbnN0IFRleHR1cmVIZWxwZXIgPSB7XG4gICAgQ29tbW9uKHRleHR1cmUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHRleDoge1xuICAgICAgICAgICAgICAgICRjYXNlOiAndGV4dHVyZScsXG4gICAgICAgICAgICAgICAgdGV4dHVyZVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgQXZhdGFyKGF2YXRhclRleHR1cmUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHRleDoge1xuICAgICAgICAgICAgICAgICRjYXNlOiAnYXZhdGFyVGV4dHVyZScsXG4gICAgICAgICAgICAgICAgYXZhdGFyVGV4dHVyZVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgVmlkZW8odmlkZW9UZXh0dXJlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0ZXg6IHtcbiAgICAgICAgICAgICAgICAkY2FzZTogJ3ZpZGVvVGV4dHVyZScsXG4gICAgICAgICAgICAgICAgdmlkZW9UZXh0dXJlXG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfVxufTtcbmV4cG9ydCBmdW5jdGlvbiBkZWZpbmVNYXRlcmlhbENvbXBvbmVudChlbmdpbmUpIHtcbiAgICBjb25zdCB0aGVDb21wb25lbnQgPSBNYXRlcmlhbChlbmdpbmUpO1xuICAgIHJldHVybiB7XG4gICAgICAgIC4uLnRoZUNvbXBvbmVudCxcbiAgICAgICAgVGV4dHVyZTogVGV4dHVyZUhlbHBlcixcbiAgICAgICAgc2V0QmFzaWNNYXRlcmlhbChlbnRpdHksIG1hdGVyaWFsKSB7XG4gICAgICAgICAgICB0aGVDb21wb25lbnQuY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwge1xuICAgICAgICAgICAgICAgIG1hdGVyaWFsOiB7XG4gICAgICAgICAgICAgICAgICAgICRjYXNlOiAndW5saXQnLFxuICAgICAgICAgICAgICAgICAgICB1bmxpdDogbWF0ZXJpYWxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0UGJyTWF0ZXJpYWwoZW50aXR5LCBtYXRlcmlhbCkge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtYXRlcmlhbDoge1xuICAgICAgICAgICAgICAgICAgICAkY2FzZTogJ3BicicsXG4gICAgICAgICAgICAgICAgICAgIHBicjogbWF0ZXJpYWxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgTWVzaENvbGxpZGVyIH0gZnJvbSAnLi4vZ2VuZXJhdGVkL2luZGV4Lmdlbic7XG5leHBvcnQgZnVuY3Rpb24gZGVmaW5lTWVzaENvbGxpZGVyQ29tcG9uZW50KGVuZ2luZSkge1xuICAgIGNvbnN0IHRoZUNvbXBvbmVudCA9IE1lc2hDb2xsaWRlcihlbmdpbmUpO1xuICAgIGZ1bmN0aW9uIGdldENvbGxpc2lvbk1hc2sobGF5ZXJzKSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KGxheWVycykpIHtcbiAgICAgICAgICAgIHJldHVybiBsYXllcnMubWFwKChpdGVtKSA9PiBpdGVtKS5yZWR1Y2UoKHByZXYsIGl0ZW0pID0+IHByZXYgfCBpdGVtLCAwKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChsYXllcnMpIHtcbiAgICAgICAgICAgIHJldHVybiBsYXllcnM7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHtcbiAgICAgICAgLi4udGhlQ29tcG9uZW50LFxuICAgICAgICBzZXRCb3goZW50aXR5LCBjb2xsaWRlckxheWVycykge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtZXNoOiB7ICRjYXNlOiAnYm94JywgYm94OiB7fSB9LFxuICAgICAgICAgICAgICAgIGNvbGxpc2lvbk1hc2s6IGdldENvbGxpc2lvbk1hc2soY29sbGlkZXJMYXllcnMpXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0UGxhbmUoZW50aXR5LCBjb2xsaWRlckxheWVycykge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtZXNoOiB7ICRjYXNlOiAncGxhbmUnLCBwbGFuZToge30gfSxcbiAgICAgICAgICAgICAgICBjb2xsaXNpb25NYXNrOiBnZXRDb2xsaXNpb25NYXNrKGNvbGxpZGVyTGF5ZXJzKVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIHNldEN5bGluZGVyKGVudGl0eSwgcmFkaXVzQm90dG9tLCByYWRpdXNUb3AsIGNvbGxpZGVyTGF5ZXJzKSB7XG4gICAgICAgICAgICB0aGVDb21wb25lbnQuY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwge1xuICAgICAgICAgICAgICAgIG1lc2g6IHsgJGNhc2U6ICdjeWxpbmRlcicsIGN5bGluZGVyOiB7IHJhZGl1c0JvdHRvbSwgcmFkaXVzVG9wIH0gfSxcbiAgICAgICAgICAgICAgICBjb2xsaXNpb25NYXNrOiBnZXRDb2xsaXNpb25NYXNrKGNvbGxpZGVyTGF5ZXJzKVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIHNldFNwaGVyZShlbnRpdHksIGNvbGxpZGVyTGF5ZXJzKSB7XG4gICAgICAgICAgICB0aGVDb21wb25lbnQuY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwge1xuICAgICAgICAgICAgICAgIG1lc2g6IHsgJGNhc2U6ICdzcGhlcmUnLCBzcGhlcmU6IHt9IH0sXG4gICAgICAgICAgICAgICAgY29sbGlzaW9uTWFzazogZ2V0Q29sbGlzaW9uTWFzayhjb2xsaWRlckxheWVycylcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfTtcbn1cbiIsICJpbXBvcnQgeyBNZXNoUmVuZGVyZXIgfSBmcm9tICcuLi9nZW5lcmF0ZWQvaW5kZXguZ2VuJztcbmV4cG9ydCBmdW5jdGlvbiBkZWZpbmVNZXNoUmVuZGVyZXJDb21wb25lbnQoZW5naW5lKSB7XG4gICAgY29uc3QgdGhlQ29tcG9uZW50ID0gTWVzaFJlbmRlcmVyKGVuZ2luZSk7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgLi4udGhlQ29tcG9uZW50LFxuICAgICAgICBzZXRCb3goZW50aXR5LCB1dnMpIHtcbiAgICAgICAgICAgIHRoZUNvbXBvbmVudC5jcmVhdGVPclJlcGxhY2UoZW50aXR5LCB7XG4gICAgICAgICAgICAgICAgbWVzaDogeyAkY2FzZTogJ2JveCcsIGJveDogeyB1dnM6IHV2cyB8fCBbXSB9IH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICBzZXRQbGFuZShlbnRpdHksIHV2cykge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtZXNoOiB7ICRjYXNlOiAncGxhbmUnLCBwbGFuZTogeyB1dnM6IHV2cyB8fCBbXSB9IH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICBzZXRDeWxpbmRlcihlbnRpdHksIHJhZGl1c0JvdHRvbSwgcmFkaXVzVG9wKSB7XG4gICAgICAgICAgICB0aGVDb21wb25lbnQuY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwge1xuICAgICAgICAgICAgICAgIG1lc2g6IHsgJGNhc2U6ICdjeWxpbmRlcicsIGN5bGluZGVyOiB7IHJhZGl1c0JvdHRvbSwgcmFkaXVzVG9wIH0gfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIHNldFNwaGVyZShlbnRpdHkpIHtcbiAgICAgICAgICAgIHRoZUNvbXBvbmVudC5jcmVhdGVPclJlcGxhY2UoZW50aXR5LCB7XG4gICAgICAgICAgICAgICAgbWVzaDogeyAkY2FzZTogJ3NwaGVyZScsIHNwaGVyZToge30gfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFR3ZWVuIH0gZnJvbSAnLi4vZ2VuZXJhdGVkL2luZGV4Lmdlbic7XG5jb25zdCBUd2VlbkhlbHBlciA9IHtcbiAgICBNb3ZlKG1vdmUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICRjYXNlOiAnbW92ZScsXG4gICAgICAgICAgICBtb3ZlXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBSb3RhdGUocm90YXRlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAkY2FzZTogJ3JvdGF0ZScsXG4gICAgICAgICAgICByb3RhdGVcbiAgICAgICAgfTtcbiAgICB9LFxuICAgIFNjYWxlKHNjYWxlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAkY2FzZTogJ3NjYWxlJyxcbiAgICAgICAgICAgIHNjYWxlXG4gICAgICAgIH07XG4gICAgfVxufTtcbmV4cG9ydCBmdW5jdGlvbiBkZWZpbmVUd2VlbkNvbXBvbmVudChlbmdpbmUpIHtcbiAgICBjb25zdCB0aGVDb21wb25lbnQgPSBUd2VlbihlbmdpbmUpO1xuICAgIHJldHVybiB7XG4gICAgICAgIC4uLnRoZUNvbXBvbmVudCxcbiAgICAgICAgTW9kZTogVHdlZW5IZWxwZXJcbiAgICB9O1xufVxuIiwgIi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBJQXJyYXkgPSAodHlwZSkgPT4ge1xuICAgIHJldHVybiB7XG4gICAgICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICAgICAgYnVpbGRlci53cml0ZVVpbnQzMih2YWx1ZS5sZW5ndGgpO1xuICAgICAgICAgICAgZm9yIChjb25zdCBpdGVtIG9mIHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgdHlwZS5zZXJpYWxpemUoaXRlbSwgYnVpbGRlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICAgICAgY29uc3QgbmV3QXJyYXkgPSBbXTtcbiAgICAgICAgICAgIGNvbnN0IGxlbmd0aCA9IHJlYWRlci5yZWFkVWludDMyKCk7XG4gICAgICAgICAgICBmb3IgKGxldCBpbmRleCA9IDA7IGluZGV4IDwgbGVuZ3RoOyBpbmRleCsrKSB7XG4gICAgICAgICAgICAgICAgbmV3QXJyYXkucHVzaCh0eXBlLmRlc2VyaWFsaXplKHJlYWRlcikpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG5ld0FycmF5O1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoKSB7XG4gICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgIH0sXG4gICAgICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgICAgIHR5cGU6ICdhcnJheScsXG4gICAgICAgICAgICBpdGVtczogdHlwZS5qc29uU2NoZW1hLFxuICAgICAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdhcnJheSdcbiAgICAgICAgfVxuICAgIH07XG59O1xuIiwgIi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBCb29sID0ge1xuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBidWlsZGVyLndyaXRlSW50OCh2YWx1ZSA/IDEgOiAwKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gcmVhZGVyLnJlYWRJbnQ4KCkgPT09IDE7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9LFxuICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgdHlwZTogJ2Jvb2xlYW4nLFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ2Jvb2xlYW4nXG4gICAgfVxufTtcbiIsICIvKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgSW50NjQgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVJbnQ2NChCaWdJbnQodmFsdWUpKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gTnVtYmVyKHJlYWRlci5yZWFkSW50NjQoKSk7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiAwO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnaW50ZWdlcicsXG4gICAgICAgIHNlcmlhbGl6YXRpb25UeXBlOiAnaW50NjQnXG4gICAgfVxufTtcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBJbnQzMiA9IHtcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgYnVpbGRlci53cml0ZUludDMyKHZhbHVlKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gcmVhZGVyLnJlYWRJbnQzMigpO1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4gMDtcbiAgICB9LFxuICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgdHlwZTogJ2ludGVnZXInLFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ2ludDMyJ1xuICAgIH1cbn07XG4vKipcbiAqIEBwdWJsaWNcbiAqL1xuZXhwb3J0IGNvbnN0IEludDE2ID0ge1xuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBidWlsZGVyLndyaXRlSW50MTYodmFsdWUpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiByZWFkZXIucmVhZEludDE2KCk7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiAwO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnaW50ZWdlcicsXG4gICAgICAgIHNlcmlhbGl6YXRpb25UeXBlOiAnaW50MTYnXG4gICAgfVxufTtcbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgY29uc3QgSW50OCA9IHtcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgYnVpbGRlci53cml0ZUludDgodmFsdWUpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiByZWFkZXIucmVhZEludDgoKTtcbiAgICB9LFxuICAgIGNyZWF0ZSgpIHtcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICA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ICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4gMC4wO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnbnVtYmVyJyxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdmbG9hdDY0J1xuICAgIH1cbn07XG4iLCAiLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IENvbG9yM1NjaGVtYSA9IHtcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUucik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLmcpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS5iKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcjogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICBnOiByZWFkZXIucmVhZEZsb2F0MzIoKSxcbiAgICAgICAgICAgIGI6IHJlYWRlci5yZWFkRmxvYXQzMigpXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiB7IHI6IDAsIGc6IDAsIGI6IDAgfTtcbiAgICB9LFxuICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgdHlwZTogJ29iamVjdCcsXG4gICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgIHI6IHsgdHlwZTogJ251bWJlcicgfSxcbiAgICAgICAgICAgIGc6IHsgdHlwZTogJ251bWJlcicgfSxcbiAgICAgICAgICAgIGI6IHsgdHlwZTogJ251bWJlcicgfVxuICAgICAgICB9LFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ2NvbG9yMydcbiAgICB9XG59O1xuIiwgIi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBDb2xvcjRTY2hlbWEgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLnIpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS5nKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUuYik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLmEpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICByOiByZWFkZXIucmVhZEZsb2F0MzIoKSxcbiAgICAgICAgICAgIGc6IHJlYWRlci5yZWFkRmxvYXQzMigpLFxuICAgICAgICAgICAgYjogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICBhOiByZWFkZXIucmVhZEZsb2F0MzIoKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4geyByOiAwLCBnOiAwLCBiOiAwLCBhOiAwIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICByOiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICBnOiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICBiOiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICBhOiB7IHR5cGU6ICdudW1iZXInIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdjb2xvcjQnXG4gICAgfVxufTtcbiIsICIvKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgRW50aXR5U2NoZW1hID0ge1xuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBidWlsZGVyLndyaXRlSW50MzIodmFsdWUpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiByZWFkZXIucmVhZEludDMyKCk7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiAwO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnaW50ZWdlcicsXG4gICAgICAgIHNlcmlhbGl6YXRpb25UeXBlOiAnZW50aXR5J1xuICAgIH1cbn07XG4iLCAiLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFF1YXRlcm5pb25TY2hlbWEgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLngpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS55KTtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUueik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLncpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB4OiByZWFkZXIucmVhZEZsb2F0MzIoKSxcbiAgICAgICAgICAgIHk6IHJlYWRlci5yZWFkRmxvYXQzMigpLFxuICAgICAgICAgICAgejogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICB3OiByZWFkZXIucmVhZEZsb2F0MzIoKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4geyB4OiAwLCB5OiAwLCB6OiAwLCB3OiAwIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICB4OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB6OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB3OiB7IHR5cGU6ICdudW1iZXInIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdxdWF0ZXJuaW9uJ1xuICAgIH1cbn07XG4iLCAiLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFZlY3RvcjNTY2hlbWEgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLngpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS55KTtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUueik7XG4gICAgfSxcbiAgICBkZXNlcmlhbGl6ZShyZWFkZXIpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHg6IHJlYWRlci5yZWFkRmxvYXQzMigpLFxuICAgICAgICAgICAgeTogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICB6OiByZWFkZXIucmVhZEZsb2F0MzIoKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4geyB4OiAwLCB5OiAwLCB6OiAwIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICB4OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB6OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB3OiB7IHR5cGU6ICdudW1iZXInIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICd2ZWN0b3IzJ1xuICAgIH1cbn07XG4iLCAiLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IElNYXAgPSAoc3BlYywgZGVmYXVsdFZhbHVlKSA9PiB7XG4gICAgY29uc3Qgc3BlY1JlZmxlY3Rpb24gPSBPYmplY3Qua2V5cyhzcGVjKS5yZWR1Y2UoKHNwZWNSZWZsZWN0aW9uLCBjdXJyZW50S2V5KSA9PiB7XG4gICAgICAgIHNwZWNSZWZsZWN0aW9uW2N1cnJlbnRLZXldID0gc3BlY1tjdXJyZW50S2V5XS5qc29uU2NoZW1hO1xuICAgICAgICByZXR1cm4gc3BlY1JlZmxlY3Rpb247XG4gICAgfSwge30pO1xuICAgIHJldHVybiB7XG4gICAgICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gc3BlYykge1xuICAgICAgICAgICAgICAgIHNwZWNba2V5XS5zZXJpYWxpemUodmFsdWVba2V5XSwgYnVpbGRlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICAgICAgY29uc3QgbmV3VmFsdWUgPSB7fTtcbiAgICAgICAgICAgIGZvciAoY29uc3Qga2V5IGluIHNwZWMpIHtcbiAgICAgICAgICAgICAgICA7XG4gICAgICAgICAgICAgICAgbmV3VmFsdWVba2V5XSA9IHNwZWNba2V5XS5kZXNlcmlhbGl6ZShyZWFkZXIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG5ld1ZhbHVlO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoKSB7XG4gICAgICAgICAgICBjb25zdCBuZXdWYWx1ZSA9IHt9O1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gc3BlYykge1xuICAgICAgICAgICAgICAgIDtcbiAgICAgICAgICAgICAgICBuZXdWYWx1ZVtrZXldID0gc3BlY1trZXldLmNyZWF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHsgLi4ubmV3VmFsdWUsIC4uLmRlZmF1bHRWYWx1ZSB9O1xuICAgICAgICB9LFxuICAgICAgICBleHRlbmQ6IChiYXNlKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBuZXdWYWx1ZSA9IHt9O1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gc3BlYykge1xuICAgICAgICAgICAgICAgIDtcbiAgICAgICAgICAgICAgICBuZXdWYWx1ZVtrZXldID0gc3BlY1trZXldLmNyZWF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHsgLi4ubmV3VmFsdWUsIC4uLmRlZmF1bHRWYWx1ZSwgLi4uYmFzZSB9O1xuICAgICAgICB9LFxuICAgICAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgICAgICB0eXBlOiAnb2JqZWN0JyxcbiAgICAgICAgICAgIHByb3BlcnRpZXM6IHNwZWNSZWZsZWN0aW9uLFxuICAgICAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdtYXAnXG4gICAgICAgIH1cbiAgICB9O1xufTtcbiIsICIvKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgSU9wdGlvbmFsID0gKHNwZWMpID0+IHtcbiAgICByZXR1cm4ge1xuICAgICAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgICAgIGlmICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgIGJ1aWxkZXIud3JpdGVJbnQ4KDEpO1xuICAgICAgICAgICAgICAgIHNwZWMuc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGJ1aWxkZXIud3JpdGVJbnQ4KDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBkZXNlcmlhbGl6ZShyZWFkZXIpIHtcbiAgICAgICAgICAgIGNvbnN0IGV4aXN0cyA9IHJlYWRlci5yZWFkSW50OCgpO1xuICAgICAgICAgICAgaWYgKGV4aXN0cykge1xuICAgICAgICAgICAgICAgIHJldHVybiBzcGVjLmRlc2VyaWFsaXplKHJlYWRlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGNyZWF0ZSgpIHtcbiAgICAgICAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgICAgIH0sXG4gICAgICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgICAgIHR5cGU6IHNwZWMuanNvblNjaGVtYS50eXBlLFxuICAgICAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdvcHRpb25hbCcsXG4gICAgICAgICAgICBvcHRpb25hbEpzb25TY2hlbWE6IHNwZWMuanNvblNjaGVtYVxuICAgICAgICB9XG4gICAgfTtcbn07XG4iLCAiZXhwb3J0IGNvbnN0IElPbmVPZiA9IChzcGVjcykgPT4ge1xuICAgIGNvbnN0IHNwZWNLZXlzID0gT2JqZWN0LmtleXMoc3BlY3MpO1xuICAgIGNvbnN0IGtleVRvSW5kZXggPSBzcGVjS2V5cy5yZWR1Y2UoKGRpY3QsIGtleSwgaW5kZXgpID0+IHtcbiAgICAgICAgZGljdFtrZXldID0gaW5kZXg7XG4gICAgICAgIHJldHVybiBkaWN0O1xuICAgIH0sIHt9KTtcbiAgICBjb25zdCBzcGVjUmVmbGVjdGlvbiA9IHNwZWNLZXlzLnJlZHVjZSgoc3BlY1JlZmxlY3Rpb24sIGN1cnJlbnRLZXkpID0+IHtcbiAgICAgICAgc3BlY1JlZmxlY3Rpb25bY3VycmVudEtleV0gPSBzcGVjc1tjdXJyZW50S2V5XS5qc29uU2NoZW1hO1xuICAgICAgICByZXR1cm4gc3BlY1JlZmxlY3Rpb247XG4gICAgfSwge30pO1xuICAgIHJldHVybiB7XG4gICAgICAgIHNlcmlhbGl6ZSh7ICRjYXNlLCB2YWx1ZSB9LCBidWlsZGVyKSB7XG4gICAgICAgICAgICBjb25zdCBfdmFsdWUgPSBrZXlUb0luZGV4WyRjYXNlLnRvU3RyaW5nKCldICsgMTtcbiAgICAgICAgICAgIGJ1aWxkZXIud3JpdGVVaW50OChfdmFsdWUpO1xuICAgICAgICAgICAgc3BlY3NbJGNhc2VdLnNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcik7XG4gICAgICAgIH0sXG4gICAgICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICAgICAgY29uc3QgJGNhc2UgPSBzcGVjS2V5c1tyZWFkZXIucmVhZEludDgoKSAtIDFdO1xuICAgICAgICAgICAgY29uc3QgdmFsdWUgPSBzcGVjc1skY2FzZV0uZGVzZXJpYWxpemUocmVhZGVyKTtcbiAgICAgICAgICAgIHJldHVybiB7ICRjYXNlLCB2YWx1ZSB9O1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoKSB7XG4gICAgICAgICAgICByZXR1cm4ge307XG4gICAgICAgIH0sXG4gICAgICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgcHJvcGVydGllczogc3BlY1JlZmxlY3Rpb24sXG4gICAgICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ29uZS1vZidcbiAgICAgICAgfVxuICAgIH07XG59O1xuIiwgImV4cG9ydCBjb25zdCBpc1NjaGVtYVR5cGUgPSAodmFsdWUsIHR5cGVzKSA9PiB0eXBlcy5pbmNsdWRlcyh2YWx1ZS5zZXJpYWxpemF0aW9uVHlwZSk7XG5leHBvcnQgY29uc3QgaXNPbmVPZkp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ycmF5Jykge1xuICAgICAgICBjb25zdCB3aXRoSXRlbXNKc29uU2NoZW1hID0ganNvblNjaGVtYTtcbiAgICAgICAgcmV0dXJuIElBcnJheShqc29uU2NoZW1hVG9TY2hlbWEod2l0aEl0ZW1zSnNvblNjaGVtYS5pdGVtcykpO1xuICAgIH1cbiAgICBpZiAoanNvblNjaGVtYS5zZXJpYWxpemF0aW9uVHlwZSA9PT0gJ2VudW0taW50Jykge1xuICAgICAgICBjb25zdCBlbnVtSnNvblNjaGVtYSA9IGpzb25TY2hlbWE7XG4gICAgICAgIHJldHVybiBJbnRFbnVtKGVudW1Kc29uU2NoZW1hLmVudW1PYmplY3QsIGVudW1Kc29uU2NoZW1hLmRlZmF1bHQpO1xuICAgIH1cbiAgICBpZiAoanNvblNjaGVtYS5zZXJpYWxpemF0aW9uVHlwZSA9PT0gJ2VudW0tc3RyaW5nJykge1xuICAgICAgICBjb25zdCBlbnVtSnNvblNjaGVtYSA9IGpzb25TY2hlbWE7XG4gICAgICAgIHJldHVybiBTdHJpbmdFbnVtKGVudW1Kc29uU2NoZW1hLmVudW1PYmplY3QsIGVudW1Kc29uU2NoZW1hLmRlZmF1bHQpO1xuICAgIH1cbiAgICBpZiAoanNvblNjaGVtYS5zZXJpYWxpemF0aW9uVHlwZSA9PT0gJ29uZS1vZicpIHtcbiAgICAgICAgY29uc3Qgb25lT2ZKc29uU2NoZW1hID0ganNvblNjaGVtYTtcbiAgICAgICAgY29uc3Qgc3BlYyA9IHt9O1xuICAgICAgICBmb3IgKGNvbnN0IGtleSBpbiBvbmVPZkpzb25TY2hlbWEucHJvcGVydGllcykge1xuICAgICAgICAgICAgc3BlY1trZXldID0ganNvblNjaGVtYVRvU2NoZW1hKG9uZU9mSnNvblNjaGVtYS5wcm9wZXJ0aWVzW2tleV0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBJT25lT2Yoc3BlYyk7XG4gICAgfVxuICAgIHRocm93IG5ldyBFcnJvcihgJHtqc29uU2NoZW1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nopO1xuICAgICAgICBidWlsZGVyLnNldFVpbnQzMihwdHIgKyA0MCwgdmFsdWUucGFyZW50IHx8IDApO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIGNvbnN0IHB0ciA9IHJlYWRlci5pbmNyZW1lbnRSZWFkT2Zmc2V0KFRSQU5TRk9STV9MRU5HVEgpO1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcG9zaXRpb246IHtcbiAgICAgICAgICAgICAgICB4OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIpLFxuICAgICAgICAgICAgICAgIHk6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDQpLFxuICAgICAgICAgICAgICAgIHo6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDgpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcm90YXRpb246IHtcbiAgICAgICAgICAgICAgICB4OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIgKyAxMiksXG4gICAgICAgICAgICAgICAgeTogcmVhZGVyLmdldEZsb2F0MzIocHRyICsgMTYpLFxuICAgICAgICAgICAgICAgIHo6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDIwKSxcbiAgICAgICAgICAgICAgICB3OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIgKyAyNClcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzY2FsZToge1xuICAgICAgICAgICAgICAgIHg6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDI4KSxcbiAgICAgICAgICAgICAgICB5OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIgKyAzMiksXG4gICAgICAgICAgICAgICAgejogcmVhZGVyLmdldEZsb2F0MzIocHRyICsgMzYpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcGFyZW50OiByZWFkZXIuZ2V0VWludDMyKHB0ciArIDQwKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcG9zaXRpb246IHsgeDogMCwgeTogMCwgejogMCB9LFxuICAgICAgICAgICAgc2NhbGU6IHsgeDogMSwgeTogMSwgejogMSB9LFxuICAgICAgICAgICAgcm90YXRpb246IHsgeDogMCwgeTogMCwgejogMCwgdzogMSB9LFxuICAgICAgICAgICAgcGFyZW50OiAwXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBleHRlbmQodmFsdWUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHBvc2l0aW9uOiB7IHg6IDAsIHk6IDAsIHo6IDAgfSxcbiAgICAgICAgICAgIHNjYWxlOiB7IHg6IDEsIHk6IDEsIHo6IDEgfSxcbiAgICAgICAgICAgIHJvdGF0aW9uOiB7IHg6IDAsIHk6IDAsIHo6IDAsIHc6IDEgfSxcbiAgICAgICAgICAgIHBhcmVudDogMCxcbiAgICAgICAgICAgIC4uLnZhbHVlXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgICAgICAgeDogeyB0eXBlOiAnbnVtYmVyJyB9LFxuICAgICAgICAgICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICAgICAgICAgIHo6IHsgdHlwZTogJ251bWJlcicgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzY2FsZToge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgICAgICAgeDogeyB0eXBlOiAnbnVtYmVyJyB9LFxuICAgICAgICAgICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICAgICAgICAgIHo6IHsgdHlwZTogJ251bWJlcicgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICByb3RhdGlvbjoge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgICAgICAgeDogeyB0eXBlOiAnbnVtYmVyJyB9LFxuICAgICAgICAgICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICAgICAgICAgIHo6IHsgdHlwZTogJ251bWJlcicgfSxcbiAgICAgICAgICAgICAgICAgICAgdzogeyB0eXBlOiAnbnVtYmVyJyB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHBhcmVudDogeyB0eXBlOiAnaW50ZWdlcicgfVxuICAgICAgICB9LFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ3RyYW5zZm9ybSdcbiAgICB9XG59O1xuZXhwb3J0IGZ1bmN0aW9uIGRlZmluZVRyYW5zZm9ybUNvbXBvbmVudChlbmdpbmUpIHtcbiAgICBjb25zdCB0cmFuc2Zvcm1EZWYgPSBlbmdpbmUuZGVmaW5lQ29tcG9uZW50RnJvbVNjaGVtYSgnY29yZTo6VHJhbnNmb3JtJywgVHJhbnNmb3JtU2NoZW1hKTtcbiAgICByZXR1cm4ge1xuICAgICAgICAuLi50cmFuc2Zvcm1EZWYsXG4gICAgICAgIGNyZWF0ZShlbnRpdHksIHZhbCkge1xuICAgICAgICAgICAgcmV0dXJuIHRyYW5zZm9ybURlZi5jcmVhdGUoZW50aXR5LCBUcmFuc2Zvcm1TY2hlbWEuZXh0ZW5kKHZhbCkpO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGVPclJlcGxhY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ydCBmdW5jdGlvbiBjaGVja05vdFRoZW5hYmxlKHQsIGVycm9yKSB7XG4gICAgaWYgKF9fREVWX18pIHtcbiAgICAgICAgaWYgKHQgJiYgdHlwZW9mIHQgPT09ICdvYmplY3QnICYmIHR5cGVvZiB0LnRoZW4gPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihlcnJvcik7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHQ7XG59XG4iLCAiLyoqXG4gKlxuICogQHJldHVybnMgYSBuZXcgR1NldFxuICovXG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlVmVyc2lvbkdTZXQoKSB7XG4gICAgY29uc3QgbGFzdFZlcnNpb24gPSBuZXcgTWFwKCk7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgLyoqXG4gICAgICAgICAqXG4gICAgICAgICAqIEBwYXJhbSBudW1iZXJcbiAgICAgICAgICogQHBhcmFtIHZlcnNpb25cbiAgICAgICAgICogQHJldHVybnNcbiAgICAgICAgICovXG4gICAgICAgIGFkZFRvKG51bWJlciwgdmVyc2lvbikge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgICAgIGlmICh2ZXJzaW9uIDwgMCkge1xuICAgICAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgY3VycmVudFZhbHVlID0gbGFzdFZlcnNpb24uZ2V0KG51bWJlcik7XG4gICAgICAgICAgICAvLyBJZiB0aGUgdmVyc2lvbiBpcyA+PSwgaXQgbWVhbnMgdGhlIHZhbHVlIGl0J3MgYWxyZWFkeSBpbiB0aGUgc2V0XG4gICAgICAgICAgICBpZiAoY3VycmVudFZhbHVlICE9PSB1bmRlZmluZWQgJiYgY3VycmVudFZhbHVlID49IHZlcnNpb24pIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxhc3RWZXJzaW9uLnNldChudW1iZXIsIHZlcnNpb24pO1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH0sXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBAcmV0dXJucyB0aGUgc2V0IHdpdGggW251bWJlciwgdmVyc2lvbl0gb2YgZWFjaCB2YWx1ZVxuICAgICAgICAgKi9cbiAgICAgICAgaGFzKG4sIHYpIHtcbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRWYWx1ZSA9IGxhc3RWZXJzaW9uLmdldChuKTtcbiAgICAgICAgICAgIC8vIElmIHRoZSB2ZXJzaW9uIGlzID49LCBpdCBtZWFucyB0aGUgdmFsdWUgaXQncyBhbHJlYWR5IGluIHRoZSBzZXRcbiAgICAgICAgICAgIGlmIChjdXJyZW50VmFsdWUgIT09IHVuZGVmaW5lZCAmJiBjdXJyZW50VmFsdWUgPj0gdikge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9LFxuICAgICAgICAvKipcbiAgICAgICAgICogV2FybmluZzogdGhpcyBmdW5jdGlvbiByZXR1cm5zIHRoZSByZWZlcmVuY2UgdG8gdGhlIGludGVybmFsIG1hcCxcbiAgICAgICAgICogIGlmIHlvdSBuZWVkIHRvIG11dGF0ZSBzb21lIHZhbHVlLCBtYWtlIGEgY29weS5cbiAgICAgICAgICogRm9yIG9wdGltaXphdGlvbiBwdXJwb3NlIHRoZSBjb3B5IGlzbid0IG1hZGUgaGVyZS5cbiAgICAgICAgICpcbiAgICAgICAgICogQHJldHVybnMgdGhlIG1hcCBvZiBudW1iZXIgdG8gdmVyc2lvblxuICAgICAgICAgKi9cbiAgICAgICAgZ2V0TWFwKCkge1xuICAgICAgICAgICAgcmV0dXJu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zKGVudGl0eU51bWJlcilcbiAgICAgICAgICAgID8gcmVtb3ZlZEVudGl0aWVzLmdldE1hcCgpLmdldChlbnRpdHlOdW1iZXIpICsgMVxuICAgICAgICAgICAgOiAwO1xuICAgICAgICBjb25zdCBlbnRpdHkgPSBFbnRpdHlVdGlscy50b0VudGl0eUlkKGVudGl0eU51bWJlciwgZW50aXR5VmVyc2lvbik7XG4gICAgICAgIGlmICh1c2VkRW50aXRpZXMuaGFzKGVudGl0eSkpIHtcbiAgICAgICAgICAgIHJldHVybiBnZW5lcmF0ZU5ld0VudGl0eSgpO1xuICAgICAgICB9XG4gICAgICAgIHVzZWRFbnRpdGllcy5hZGQoZW50aXR5KTtcbiAgICAgICAgcmV0dXJuIGVudGl0eTtcbiAgICB9XG4gICAgZnVuY3Rpb24gZ2VuZXJhdGVFbnRpdHkobmV0d29ya2VkKSB7XG4gICAgICAgIGlmIChuZXR3b3JrZWQgJiYgIW5ldHdvcmtlZEVudGl0aWVzUmFuZ2UpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignTmV0d29yayBlbnRpdGllcyByYW5nZWQgbm90IGluaXRpYWxpemVkLiBDb25uZWN0IHRvIGEgQ1JEVCBTZXJ2ZXInKTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCB1c2VkTmV0d29ya1NpemUgPSAobmV0d29ya2VkRW50aXRpZXNSYW5nZSAmJlxuICAgICAgICAgICAgWy4uLnVzZWRFbnRpdGllcy52YWx1ZXMoKV0uZmlsdGVyKCgkKSA9PiB7XG4gICAgICAgICAgICAgICAgY29uc3QgW2VudGl0eUlkXSA9IEVudGl0eVV0aWxzLmZyb21FbnRpdHlJZCgkKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gZW50aXR5SWQgPj0gbmV0d29ya2VkRW50aXRpZXNSYW5nZVswXSAmJiBlbnRpdHlJZCA8PSBuZXR3b3JrZWRFbnRpdGllc1JhbmdlWzFdO1xuICAgICAgICAgICAgfSkubGVuZ3RoKSA/P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AgICAgICAgICAgICAgIGlmICghbmV0d29ya2VkICYmIG51bWJlciA+PSBsb2NhbEVudGl0aWVzQXZhaWxhYmxlKVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjb25zdCBlbnRpdHkgPSBFbnRpdHlVdGlscy50b0VudGl0eUlkKG51bWJlciwgdmVyc2lvbiArIDEpO1xuICAgICAgICAgICAgICAgIC8vIElmIHRoZSBlbnRpdHkgaXMgbm90IGJlaW5nIHVzZWQsIHdlIGNhbiByZS11c2UgaXRcbiAgICAgICAgICAgICAgICAvLyBJZiB0aGUgZW50aXR5IHdhcyByZW1vdmVkIGluIHRoaXMgdGljaywgd2UncmUgbm90IGNvdW50aW5nIGZvciB0aGUgdXNlZEVudGl0aWVzLCBidXQgd2UgaGF2ZSBpdCBpbiB0aGUgdG9SZW1vdmVFbnRpdHlBcnJheVxuICAgICAgICAgICAgICAgIGlmICghdXNlZEVudGl0aWVzLmhhcyhlbnRpdHkpICYmICF0b1JlbW92ZUVudGl0aWVzLmluY2x1ZGVzKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdXNlZEVudGl0aWVzLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZW50aXR5O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZ2VuZXJhdGVOZXdFbnRpdHkobmV0d29ya2VkKTtcbiAgICB9XG4gICAgZnVuY3Rpb24gcmVtb3ZlRW50aXR5KGVudGl0eSkge1xuICAgICAgICBpZiAoZW50aXR5IDwgUkVTRVJWRURfU1RBVElDX0VOVElUSUVTKVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICBpZiAodXNlZEVudGl0aWVzLmhhcyhlbnRpdHkpKSB7XG4gICAgICAgICAgICB1c2VkRW50aXRpZXMuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgICAgICB0b1JlbW92ZUVudGl0aWVzLnB1c2goZW50aXR5KTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHVwZGF0ZVJlbW92ZWRFbnRpdHkoZW50aXR5KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG4gICAgZnVuY3Rpb24gcmVsZWFzZVJlbW92ZWRFbnRpdGllcygpIHtcbiAgICAgICAgY29uc3QgYXJyID0gdG9SZW1vdmVFbnRpdGllcztcbiAgICAgICAgaWYgKGFyci5sZW5ndGgpIHtcbiAgICAgICAgICAgIHRvUmVtb3ZlRW50aXRpZXMgPSBbXTtcbiAgICAgICAgICAgIGZvciAoY29uc3QgZW50aXR5IG9mIGFycikge1xuICAgICAgICAgICAgICAgIGNvbnN0IFtuLCB2XSA9IEVudGl0eVV0aWxzLmZyb21FbnRpdHlJZChlbnRpdHkpO1xuICAgICAgICAgICAgICAgIHJlbW92ZWRFbnRpdGllcy5hZGRUbyhuLCB2KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gYXJyO1xuICAgIH1cbiAgICBmdW5jdGlvbiB1cGRhdGVSZW1vdmVkRW50aXR5KGVudGl0eSkge1xuICAgICAgICBjb25zdCBbbiwgdl0gPSBFbnRpdHlVdGlscy5mcm9tRW50aXR5SWQoZW50aXR5KTtcbiAgICAgICAgLy8gVXBkYXRlIHRoZSByZW1vdmVkIGVudGl0aWVzIG1hcFxuICAgICAgICByZW1vdmVkRW50aXRpZXMuYWRkVG8obiwgdik7XG4gICAgICAgIC8vIFJlbW92ZSB0aGUgdXNlZEVudGl0aWVzIGlmIGV4aXN0XG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDw9IHY7IGkrKykge1xuICAgICAgICAgICAgdXNlZEVudGl0aWVzLmRlbGV0ZShFbnRpdHlVdGlscy50b0VudGl0eUlkKG4sIGkpKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdH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DtcbiAgICAgICAgICAgICAgICBpZiAoaGVhZGVyLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfQ09NUE9ORU5UKSB7XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSBEZWxldGVDb21wb25lbnQucmVhZChidWZmZXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChoZWFkZXIudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9DT01QT05FTlRfTkVUV09SSykge1xuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlID0gRGVsZXRlQ29tcG9uZW50TmV0d29yay5yZWFkKGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhlYWRlci50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVCkge1xuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlID0gUHV0Q29tcG9uZW50T3BlcmF0aW9uLnJlYWQoYnVmZmVyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoaGVhZGVyLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5UX05FVFdPUkspIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IFB1dE5ldHdvcmtDb21wb25lbnRPcGVyYXRpb24ucmVhZChidWZmZXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChoZWFkZXIudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9FTlRJVFkpIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IERlbGV0ZUVudGl0eS5yZWFkKGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhlYWRlci50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuREVMRVRFX0VOVElUWV9ORVRXT1JLKSB7XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSBEZWxldGVFbnRpdHlOZXR3b3JrLnJlYWQoYnVmZmVyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoaGVhZGVyLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5BUFBFTkRfVkFMVUUpIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IEFwcGVuZFZhbHVlT3BlcmF0aW9uLnJlYWQoYnVmZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gVW5rbm93biBtZXNzYWdlLCB3ZSBza2lwIGl0XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBjb25zdW1lIHRoZSBtZXNzYWdlXG4gICAgICAgICAgICAgICAgICAgIGJ1ZmZlci5pbmNyZW1lbnRSZWFkT2Zmc2V0KGhlYWRlci5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAobWVzc2FnZSkge1xuICAgICAgICAgICAgICAgICAgICByZWNlaXZlZE1lc3NhZ2VzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgLi4ubWVzc2FnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zcG9ydElkLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZUJ1ZmZlcjogYnVmZmVyLmJ1ZmZlcigpLnN1YmFycmF5KG9mZnNldCwgYnVmZmVyLmN1cnJlbnRSZWFkT2Zmc2V0KCkpXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICB9XG4gICAgLyoqXG4gICAgICogUmV0dXJuIGFuZCBjbGVhciB0aGUgbWVzc2F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eUlkLCBuZXR3b3JrKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChtc2cudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9FTlRJVFkgfHwgbXNnLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfRU5USVRZX05FVFdPUkspIHtcbiAgICAgICAgICAgICAgICBlbnRpdGllc1Nob3VsZEJlQ2xlYW5lZC5wdXNoKGVudGl0eUlkKTtcbiAgICAgICAgICAgICAgICBicm9hZGNhc3RNZXNzYWdlcy5wdXNoKG1zZyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBjb25zdCBlbnRpdHlTdGF0ZSA9IGVuZ2luZS5lbnRpdHlDb250YWluZXIuZ2V0RW50aXR5U3RhdGUoZW50aXR5SWQpO1xuICAgICAgICAgICAgICAgIC8vIFNraXAgdXBkYXRlcyBmcm9tIHJlbW92ZWQgZW50aXR5ZXNcbiAgICAgICAgICAgICAgICBpZiAoZW50aXR5U3RhdGUgPT09IEVudGl0eVN0YXRlLlJlbW92ZWQpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIC8vIEVudGl0aWVzIHdpdGggdW5rbm93biBlbnRpdGllcyBzaG91bGQgdXBkYXRlIGl0cyBlbnRpdHkgc3RhdGVcbiAgICAgICAgICAgICAgICBpZiAoZW50aXR5U3RhdGUgPT09IEVudGl0eVN0YXRlLlVua25vd24pIHtcbiAgICAgICAgICAgICAgICAgICAgZW5naW5lLmVudGl0eUNvbnRhaW5lci51cGRhdGVVc2VkRW50aXR5KGVudGl0eUlkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZW5naW5lLmdldENvbXBvbmVudE9yTnVsbChtc2cuY29tcG9uZW50SWQpO1xuICAgICAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBlbHNlICovXG4gICAgICAgICAgICAgICAgaWYgKGNvbXBvbmVudCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAobXNnLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5UICYmXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQuY29tcG9uZW50SWQgPT09IFRyYW5zZm9ybS5jb21wb25lbnRJZCAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgTmV0d29ya0VudGl0eS5oYXMoZW50aXR5SWQpICYmXG4gICAgICAgICAgICAgICAgICAgICAgICBOZXR3b3JrUGFyZW50LmhhcyhlbnRpdHlJZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1zZy5kYXRhID0gbmV0d29ya1V0aWxzLmZpeFRyYW5zZm9ybVBhcmVudChtc2cpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IFtjb25mbGljdE1lc3NhZ2UsIHZhbHVlXSA9IGNvbXBvbmVudC51cGRhdGVGcm9tQ3JkdCh7IC4uLm1zZywgZW50aXR5SWQgfSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghY29uZmxpY3RNZXNzYWdlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBBZGQgbWVzc2FnZSB0byB0cmFuc3BvcnQgcXVldWUgdG8gYmUgcHJvY2Vzc2VkIGJ5IG90aGVycyB0cmFuc3BvcnRzXG4gICAgICAgICAgICAgICAgICAgICAgICBicm9hZGNhc3RNZXNzYWdlcy5wdXNoKG1zZyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBvblByb2Nlc3NFbnRpdHlDb21wb25lbnRDaGFuZ2UgJiYgb25Qcm9jZXNzRW50aXR5Q29tcG9uZW50Q2hhbmdlKG1zZy5lbnRpdHlJZCwgbXNnLnR5cGUsIGNvbXBvbmVudCwgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICA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ZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChtZXNzYWdlLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfQ09NUE9ORU5UKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBEZWxldGVDb21wb25lbnQud3JpdGUobWVzc2FnZS5lbnRpdHlJZCwgY29tcG9uZW50LmNvbXBvbmVudElkLCBtZXNzYWdlLnRpbWVzdGFtcCwgYnVmZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChtZXNzYWdlLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5BUFBFTkRfVkFMVUUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIEFwcGVuZFZhbHVlT3BlcmF0aW9uLndyaXRlKG1lc3NhZ2UuZW50aXR5SWQsIG1lc3NhZ2UudGltZXN0YW1wLCBtZXNzYWdlLmNvbXBvbmVudElkLCBtZXNzYWdlLmRhdGEsIGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY3JkdE1lc3NhZ2VzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgLi4ubWVzc2FnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2VCdWZmZXI6IGJ1ZmZlci5idWZmZXIoKS5zdWJhcnJheShvZmZzZXQsIGJ1ZmZlci5jdXJyZW50V3JpdGVPZmZzZXQoKSlcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChvblByb2Nlc3NFbnRpdHlDb21wb25lbnRDaGFuZ2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHJhd1ZhbHVlID0gbWVzc2FnZS50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVCB8fCBtZXNzYWdlLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5BUFBFTkRfVkFMVUVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGNvbXBvbmVudC5nZXQobWVzc2FnZS5lbnRpdHlJZClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uUHJvY2Vzc0VudGl0eUNvbXBvbmVudENoYW5nZShtZXNzYWdlLmVudGl0eUlkLCBtZXNzYWdlLnR5cGUsIGNvbXBvbmVudCwgcmF3VmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIC8vIEFmdGVyIGFsbCB1cGRhdGVzLCBJIGV4ZWN1dGUgdGhlIERlbGV0ZWRFbnRpdHkgbWVzc2FnZXNcbiAgICAgICAgZm9yIChjb25zdCBlbnRpdHlJZCBvZiBlbnRpdGllc0RlbGV0ZWRUaGlzVGljaykge1xuICAgICAgICAgICAgY29uc3Qgb2Zmc2V0ID0gYnVmZmVyLmN1cnJlbnRXcml0ZU9mZnNldCgpO1xuICAgICAgICAgICAgRGVsZXRlRW50aXR5LndyaXRlKGVudGl0eUlkLCBidWZmZXIpO1xuICAgICAgICAgICAgY3JkdE1lc3NhZ2VzLnB1c2goe1xuICAgICAgICAgICAgICAgIHR5cGU6IENyZHRNZXNzYWdlVHlwZS5ERUxFVEVfRU5USVRZLFxuICAgICAgICAgICAgICAgIGVudGl0eUlkLFxuICAgICAgICAgICAgICAgIG1lc3NhZ2VCdWZmZXI6IGJ1ZmZlci5idWZmZXIoKS5zdWJhcnJheShvZmZzZXQsIGJ1ZmZlci5jdXJyZW50V3JpdGVPZmZzZXQoKSlcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgb25Qcm9jZXNzRW50aXR5Q29tcG9uZW50Q2hhbmdlICYmIG9uUHJvY2Vzc0VudGl0eUNvbXBvbm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bnRpbnVlO1xuICAgICAgICAgICAgICAgIC8vIFJlZHVuZGFudCBtZXNzYWdlIGZvciB0aGUgdHJhbnNwb3J0XG4gICAgICAgICAgICAgICAgaWYgKCF0cmFuc3BvcnQuZmlsdGVyKG1lc3NhZ2UpKVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjb25zdCB7IGVudGl0eUlkIH0gPSBmaW5kTmV0d29ya0lkKG1lc3NhZ2UpO1xuICAgICAgICAgICAgICAgIGNvbnN0IHRyYW5zZm9ybU5lZWRzRml4ID0gJ2NvbXBvbmVudElkJyBpbiBtZXNzYWdlICYmXG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY29tcG9uZW50SWQgPT09IFRyYW5zZm9ybS5jb21wb25lbnRJZCAmJlxuICAgICAgICAgICAgICAgICAgICBUcmFuc2Zvcm0uaGFzKGVudGl0eUlkKSAmJlxuICAgICAgICAgICAgICAgICAgICBOZXR3b3JrUGFyZW50LmhhcyhlbnRpdHlJZCkgJiZcbiAgICAgICAgICAgICAgICAgICAgTmV0d29ya0VudGl0eS5oYXMoZW50aXR5SWQpO1xuICAgICAgICAgICAgICAgIC8vIElmIHRoZXJlIHdhcyBhIExPQ0FMIGNoYW5nZSBpbiB0aGUgdHJhbnNmb3JtLiBBZGQgdGhlIHBhcmVudCB0byB0aGF0IHRyYW5zZm9ybVxuICAgICAgICAgICAgICAgIGlmIChpc1JlbmRlcmVyVHJhbnNwb3J0ICYmIG1lc3NhZ2UudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLlBVVF9DT01QT05FTlQgJiYgdHJhbnNmb3JtTmVlZHNGaXgpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGFyZW50ID0gZmluZE5ldHdvcmtJZChOZXR3b3JrUGFyZW50LmdldChlbnRpdHlJZCkpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB0cmFuc2Zvcm1EYXRhID0gbmV0d29ya1V0aWxzL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09IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5UIHx8IG1zZy50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVF9ORVRXT1JLKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGJ1ZiA9IG5ldyBSZWFkV3JpdGVCeXRlQnVmZmVyKG1zZy5kYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5zZXQoZW50aXR5LCBzY2hlbWEuZGVzZXJpYWxpemUoYnVmKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBkYXRhLmRlbGV0ZShlbnRpdHkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gW251bGwsIGRhdGEuZ2V0KGVudGl0eSldO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBQcm9jZXNzTWVzc2FnZVJlc3VsdFR5cGUuU3RhdGVPdXRkYXRlZFRpbWVzdGFtcDpcbiAgICAgICAgICAgIGNhc2UgUHJvY2Vzc01lc3NhZ2VSZXN1bHRUeXBlLlN0YXRlT3V0ZGF0ZWREYXRhOiB7XG4gICAgICAgICAgICAgICAgaWYgKGRhdGEuaGFzKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgd3JpdGVCdWZmZXIgPSBuZXcgUmVhZFdyaXRlQnl0ZUJ1ZmZlcigpO1xuICAgICAgICAgICAgICAgICAgICBzY2hlbWEuc2VyaWFsaXplKGRhdGEuZ2V0KGVudGl0eSksIHdyaXRlQnVmZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiB3cml0ZUJ1ZmZlci50b0JpbmFyeSgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudGl0eUlkOiBlbnRpdHksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGltZXN0YW1wOiB0aW1lc3RhbXBzLmdldChlbnRpdHkpXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5nZXQoZW50aXR5KVxuICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBDcmR0TWVzc2FnZVR5cGUuREVMRVRFX0NPTVBPTkVOVCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnRpdHlJZDogZW50aXR5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpbWVzdGFtcDogdGltZXN0YW1wcy5nZXQoZW50aXR5KVxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gW251bGwsIGRhdGEuZ2V0KGVudGl0eSldO1xuICAgIH07XG59XG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlR2V0Q3JkdE1lc3NhZ2VzRm9yTHd3KGNvbXBvbmVudElkLCB0aW1lc3RhbXBzLCBkaXJ0eUl0ZXJhdG9yLCBzY2hlbWEsIGRhdGEpIHtcbiAgICByZXR1cm4gZnVuY3Rpb24qICgpIHtcbiAgICAgICAgZm9yIChjb25zdCBlbnRpdHkgb2YgZGlydHlJdGVyYXRvcikge1xuICAgICAgICAgICAgY29uc3QgbmV3VGltZXN0YW1wID0gaW5jcmVtZW50VGltZXN0YW1wKGVudGl0eSwgdGltZXN0YW1wcyk7XG4gICAgICAgICAgICBpZiAoZGF0YS5oYXMoZW50aXR5KSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHdyaXRlQnVmZmVyID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoKTtcbiAgICAgICAgICAgICAgICBzY2hlbWEuc2VyaWFsaXplKGRhdGEuZ2V0KGVudGl0eSksIHdyaXRlQnVmZmVyKTtcbiAgICAgICAgICAgICAgICBjb25zdCBtc2cgPSB7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5ULFxuICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICAgICAgZW50aXR5SWQ6IGVudGl0eSxcbiAgICAgICAgICAgICAgICAgICAgZGF0YTogd3JpdGVCdWZmZXIudG9CaW5hcnkoKSxcbiAgICAgICAgICAgICAgICAgICAgdGltZXN0YW1wOiBuZXdUaW1lc3RhbXBcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHlpZWxkIG1zZztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGNvbnN0IG1zZyA9IHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9DT01QT05FTlQsXG4gICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudElkLFxuICAgICAgICAgICAgICAgICAgICBlbnRpdHlJZDogZW50aXR5LFxuICAgICAgICAgICAgICAgICAgICB0aW1lc3RhbXA6IG5ld1RpbWVzdGFtcFxuICAgICAgICAgICAg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2V0KGVudGl0eSk7XG4gICAgICAgICAgICBpZiAoZGF0YS5kZWxldGUoZW50aXR5KSAmJiBtYXJrQXNEaXJ0eSkge1xuICAgICAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuYWRkKGVudGl0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50IHx8IG51bGw7XG4gICAgICAgIH0sXG4gICAgICAgIGVudGl0eURlbGV0ZWQoZW50aXR5LCBtYXJrQXNEaXJ0eSkge1xuICAgICAgICAgICAgaWYgKGRhdGEuZGVsZXRlKGVudGl0eSkgJiYgbWFya0FzRGlydHkpIHtcbiAgICAgICAgICAgICAgICBkaXJ0eUl0ZXJhdG9yLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBnZXRPck51bGwoZW50aXR5KSB7XG4gICAgICAgICAgICBjb25zdCBjb21wb25lbnQgPSBkYXRhLmdldChlbnRpdHkpO1xuICAgICAgICAgICAgcmV0dXJuIGNvbXBvbmVudCA/IGRlZXBSZWFkb25seShjb21wb25lbnQpIDogbnVsbDtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0KGVudGl0eSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgICAgIGlmICghY29tcG9uZW50KSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBbZ2V0RnJvbV0gQ29tcG9uZW50ICR7Y29tcG9uZW50TmFtZX0gZm9yIGVudGl0eSAjJHtlbnRpdHl9IG5vdCBmb3VuZGApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGRlZXBSZWFkb25seShjb21wb25lbnQpO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoZW50aXR5LCB2YWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgICAgIGlmIChjb21wb25lbnQpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFtjcmVhdGVdIENvbXBvbmVudCAke2NvbXBvbmVudE5hbWV9IGZvciAke2VudGl0eX0gYWxyZWFkeSBleGlzdHNgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IHVzZWRWYWx1ZSA9IHZhbHVlID09PSB1bmRlZmluZWQgPyBzY2hlbWEuY3JlYXRlKCkgOiBzY2hlbWEuZXh0ZW5kID8gc2NoZW1hLmV4dGVuZCh2YWx1ZSkgOiB2YWx1ZTtcbiAgICAgICAgICAgIGRhdGEuc2V0KGVudGl0eSwgdXNlZFZhbHVlKTtcbiAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuYWRkKGVudGl0eSk7XG4gICAgICAgICAgICByZXR1cm4gdXNlZFZhbHVlO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGVPclJlcGxhY2UoZW50aXR5LCB2YWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgdXNlZFZhbHVlID0gdmFsdWUgPT09IHVuZGVmaW5lZCA/IHNjaGVtYS5jcmVhdGUoKSA6IHNjaGVtYS5leHRlbmQgPyBzY2hlbWEuZXh0ZW5kKHZhbHVlKSA6IHZhbHVlO1xuICAgICAgICAgICAgZGF0YS5zZXQoZW50aXR5LCB1c2VkVmFsdWUpO1xuICAgICAgICAgICAgZGlydHlJdGVyYXRvci5hZGQoZW50aXR5KTtcbiAgICAgICAgICAgIHJldHVybiB1c2VkVmFsdWU7XG4gICAgICAgIH0sXG4gICAgICAgIGdldE11dGFibGVPck51bGwoZW50aXR5KSB7XG4gICAgICAgICAgICBjb25zdCBjb21wb25lbnQgPSBkYXRhLmdldChlbnRpdHkpO1xuICAgICAgICAgICAgaWYgKCFjb21wb25lbnQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuYWRkKGVudGl0eSk7XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50O1xuICAgICAgICB9LFxuICAgICAgICBnZXRPckNyZWF0ZU11dGFibGUoZW50aXR5LCB2YWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgICAgIGlmICghY29tcG9uZW50KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY3JlYXRlKGVudGl0eSwgdmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgZGlydHlJdGVyYXRvci5hZGQoZW50aXR5KTtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29tcG9uZW50O1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBnZXRNdXRhYmxlKGVudGl0eSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gdGhpcy5nZXRNdXRhYmxlT3JOdWxsKGVudGl0eSk7XG4gICAgICAgICAgICBpZiAoY29tcG9uZW50ID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBbbXV0YWJsZV0gQ29tcG9uZW50ICR7Y29tcG9uZW50TmFtZX0gZm9yICR7ZW50aXR5fSBub3QgZm91bmRgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBjb21wb25lbnQ7XG4gICAgICAgIH0sXG4gICAgICAgICppdGVyYXRvcigpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3QgW2VudGl0eSwgY29tcG9uZW50XSBvZiBkYXRhKSB7XG4gICAgICAgICAgICAgICAgeWllbGQgW2VudGl0eSwgY29tcG9uZW50XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgKmRpcnR5SXRlcmF0b3IoKSB7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IGVudG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pO1xuICAgIGNvbnN0IHF1ZXVlZENvbW1hbmRzID0gW107XG4gICAgLy8gb25seSBzb3J0IHRoZSBhcnJheSBpZiB0aGUgbGF0ZXN0IChOKSBlbGVtZW50IGhhcyBhIHRpbWVzdGFtcCA8PSBOLTFcbiAgICBmdW5jdGlvbiBzaG91bGRTb3J0KHJvdykge1xuICAgICAgICBjb25zdCBsZW4gPSByb3cucmF3Lmxlbmd0aDtcbiAgICAgICAgaWYgKGxlbiA+IDEgJiYgcm93LnJhd1tsZW4gLSAxXS50aW1lc3RhbXAgPD0gcm93LnJhd1tsZW4gLSAyXS50aW1lc3RhbXApIHtcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG4gICAgZnVuY3Rpb24gZ290VXBkYXRlZChlbnRpdHkpIHtcbiAgICAgICAgY29uc3Qgcm93ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGVsc2UgKi9cbiAgICAgICAgaWYgKHJvdykge1xuICAgICAgICAgICAgaWYgKHNob3VsZFNvcnQocm93KSkge1xuICAgICAgICAgICAgICAgIHJvdy5yYXcuc29ydChzb3J0QnlUaW1lc3RhbXApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgd2hpbGUgKHJvdy5yYXcubGVuZ3RoID4gb3B0aW9ucy5tYXhFbGVtZW50cykge1xuICAgICAgICAgICAgICAgIHJvdy5yYXcuc2hpZnQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IGZyb3plblNldCA9IGZyZWV6ZVNldChuZXcgU2V0KHJvdz8ucmF3Lm1hcCgoJCkgPT4gJC52YWx1ZSkpKTtcbiAgICAgICAgICAgIHJvdy5mcm96ZW5TZXQgPSBmcm96ZW5TZXQ7XG4gICAgICAgICAgICByZXR1cm4gZnJvemVuU2V0O1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xu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DtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0IGNvbXBvbmVudE5hbWUoKSB7XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50TmFtZTtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0IGNvbXBvbmVudFR5cGUoKSB7XG4gICAgICAgICAgICAvLyBhIGdldHRlciBpcyB1c2VkIGhlcmUgdG8gcHJldmVudCBhY2NpZGVudGFsIGNoYW5nZXNcbiAgICAgICAgICAgIHJldHVybiAxIC8qIENvbXBvbmVudFR5cGUuR3Jvd09ubHlWYWx1ZVNldCAqLztcbiAgICAgICAgfSxcbiAgICAgICAgc2NoZW1hLFxuICAgICAgICBoYXMoZW50aXR5KSB7XG4gICAgICAgICAgICByZXR1cm4gZGF0YS5oYXMoZW50aXR5KTtcbiAgICAgICAgfSxcbiAgICAgICAgZW50aXR5RGVsZXRlZChlbnRpdHkpIHtcbiAgICAgICAgICAgIGRhdGEuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgIH0sXG4gICAgICAgIGdldChlbnRpdHkpIHtcbiAgICAgICAgICAgIGNvbnN0IHZhbHVlcyA9IGRhdGEuZ2V0KGVudGl0eSk7XG4gICAgICAgICAgICBpZiAodmFsdWVzKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlcy5mcm96ZW5TZXQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZW1wdHlSZWFkb25seVNldDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgYWRkVmFsdWUoZW50aXR5LCByYXdWYWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgeyBzZXQsIHZhbHVlIH0gPSBhcHBlbmQoZW50aXR5LCByYXdWYWx1ZSk7XG4gICAgICAgICAgICBkaXJ0eUl0ZXJhdG9yLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgY29uc3QgYnVmID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoKTtcbiAgICAgICAgICAgIHNjaGVtYS5zZXJpYWxpemUodmFsdWUsIGJ1Zik7XG4gICAgICAgICAgICBxdWV1ZWRDb21tYW5kcy5wdXNoKHtcbiAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICBkYXRhOiBidWYudG9CaW5hcnkoKSxcbiAgICAgICAgICAgICAgICBlbnRpdHlJZDogZW50aXR5LFxuICAgICAgICAgICAgICAgIHRpbWVzdGFtcDogMCxcbiAgICAgICAgICAgICAgICB0eXBlOiBDcmR0TWVzc2FnZVR5cGUuQVBQRU5EX1ZBTFVFXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJldHVybiBzZXQ7XG4gICAgICAgIH0sXG4gICAgICAgICppdGVyYXRvcigpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3QgW2VudGl0eSwgY29tcG9uZW50XSBvZiBkYXRhKSB7XG4gICAgICAgICAgICAgICAgeWllbGQgW2VudGl0eSwgY29tcG9uZW50LmZyb3plblNldF07XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgICpkaXJ0eUl0ZXJhdG9yKCkge1xuICAgICAgICAgICAgZm9yIChjb25zdCBlbnRpdHkgb2YgZGlydHlJdGVyYXRvcikge1xuICAgICAgICAgICAgICAgIHlpZWxkIGVudGl0eTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgZ2V0Q3JkdFVwZGF0ZXMoKSB7XG4gICAgICAgICAgICAvLyByZXR1cm4gYSBjb3B5IG9mIHRoZSBjb21tYW5kcywgYW5kIHRoZW4gY2xlYXIgdGhlIGxvY2FsIGNvcHlcbiAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuY2xlYXIoKTtcbiAgICAgICAgICAgIHJldHVybiBxdWV1ZWRDb21tYW5kcy5zcGxpY2UoMCwgcXVldWVkQ29tbWFuZHMubGVuZ3RoKTtcbiAgICAgICAgfSxcbiAgICAgICAgdXBkYXRlRnJvbUNyZHQoX2JvZHkpIHtcbiAgICAgICAgICAgIGlmIChfYm9keS50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuQVBQRU5EX1ZBTFVFKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgYnVmID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoX2JvZHkuZGF0YSk7XG4gICAgICAgICAgICAgICAgYXBwZW5kKF9ib2R5LmVudGl0eUlkLCBzY2hlbWEuZGVzZXJpYWxpemUoYnVmKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gW251bGwsIHVuZGVmaW5lZF07XG4gICAgICAgIH0sXG4gICAgICAgIGR1bXBDcmR0U3RhdGVUb0J1ZmZlcjogZnVuY3Rpb24gKGJ1ZmZlciwgZmlsdGVyRW50aXR5KSB7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IFtlbnRpdHksIHsgcmF3IH1dIG9mIGRhdGEpIHtcbiAgICAgICAgICAgICAgICBpZiAoZmlsdGVyRW50aXR5ICYmICFmaWx0ZXJFbnRpdHkoZW50aXR5KSlcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBpdCBvZiByYXcpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgYnVmID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgc2NoZW1hLnNlcmlhbGl6ZShpdC52YWx1ZSwgYnVmKTtcbiAgICAgICAgICAgICAgICAgICAgQXBwZW5kVmFsdWVPcGVyYXRpb24ud3JpdGUoZW50aXR5LCAwLCBjb21wb25lbnRJZCwgYnVmLnRvQmluYXJ5KCksIGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcbiAgICByZXR1cm4gcmV0O1xufVxuIiwgImltcG9ydCAqIGFzIGNvbXBvbmVudHMgZ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ICAgICBjb25zdCBjb21tYW5kID0gYXJyYXlDb21tYW5kc1tpXTtcbiAgICAgICAgICAgICAgICBpZiAoY29tbWFuZC50aW1lc3RhbXAgPiBtYXhUaW1lc3RhbXApIHtcbiAgICAgICAgICAgICAgICAgICAgbWF4VGltZXN0YW1wID0gY29tbWFuZC50aW1lc3RhbXA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChjb21tYW5kLnRpbWVzdGFtcCA+IGdsb2JhbFN0YXRlLnByZXZpb3VzRnJhbWVNYXhUaW1lc3RhbXApIHtcbiAgICAgICAgICAgICAgICAgICAgZ2xvYmFsU3RhdGUudGhpc0ZyYW1lQ29tbWFuZHMucHVzaChjb21tYW5kKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGNvbW1hbmQuc3RhdGUgPT09IDAgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfVVAgKi8gfHwgY29tbWFuZC5zdGF0ZSA9PT0gMSAvKiBQb2ludGVyRXZlbnRUeXBlLlBFVF9ET1dOICovKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHByZXZDb21tYW5kID0gZ2xvYmFsU3RhdGUuYnV0dG9uU3RhdGUuZ2V0KGNvbW1hbmQuYnV0dG9uKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFwcmV2Q29tbWFuZCB8fCBjb21tYW5kLnRpbWVzdGFtcCA+IHByZXZDb21tYW5kLnRpbWVzdGFtcCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZ2xvYmFsU3RhdGUuYnV0dG9uU3RhdGUuc2V0KGNvbW1hbmQuYnV0dG9uLCBjb21tYW5kKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNpbmNlIHdlIGFyZSBpdGVyYXRpbmcgYSBkZXNjZW5kaW5nIGFycmF5LCB3ZSBjYW4gZWF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XRDb21tYW5kcykge1xuICAgICAgICAgICAgY29uc3QgY21kID0gZmluZENsaWNrKGlucHV0LCBlbnRpdHkpO1xuICAgICAgICAgICAgaWYgKGNtZClcbiAgICAgICAgICAgICAgICByZXR1cm4gY21kO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBudWxsO1xuICAgIH1cbiAgICBmdW5jdGlvbiBmaW5kQ2xpY2soaW5wdXRBY3Rpb24sIGVudGl0eSkge1xuICAgICAgICBsZXQgZG93biA9IG51bGw7XG4gICAgICAgIGxldCB1cCA9IG51bGw7XG4gICAgICAgIC8vIFdlIHNlYXJjaCB0aGUgbGFzdCBVUCAmIERPV04gY29tbWFuZCBzb3J0ZWQgYnkgdGltZXN0YW1wIGRlc2NlbmRpbmdcbiAgICAgICAgZm9yIChjb25zdCBpdCBvZiBmaW5kQ29tbWFuZHNCeUFjdGlvbkRlc2NlbmRpbmcoaW5wdXRBY3Rpb24sIGVudGl0eSkpIHtcbiAgICAgICAgICAgIGlmICghdXApIHtcbiAgICAgICAgICAgICAgICBpZiAoaXQuc3RhdGUgPT09IDAgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfVVAgKi8pIHtcbiAgICAgICAgICAgICAgICAgICAgdXAgPSBpdDtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoIWRvd24pIHtcbiAgICAgICAgICAgICAgICBpZiAoaXQuc3RhdGUgPT09IDEgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfRE9XTiAqLykge1xuICAgICAgICAgICAgICAgICAgICBkb3duID0gaXQ7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoIXVwIHx8ICFkb3duKVxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIC8vIElmIHRo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9uLCBwb2ludGVyRXZlbnRUeXBlLCBlbnRpdHkpO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgZm9yIChjb25zdCBjb21tYW5kIG9mIGdsb2JhbFN0YXRlLnRoaXNGcmFtZUNvbW1hbmRzKSB7XG4gICAgICAgICAgICAgICAgaWYgKChjb21tYW5kLmJ1dHRvbiA9PT0gaW5wdXRBY3Rpb24gfHwgaW5wdXRBY3Rpb24gPT09IDMgLyogSW5wdXRBY3Rpb24uSUFfQU5ZICovKSAmJlxuICAgICAgICAgICAgICAgICAgICBjb21tYW5kLnN0YXRlID09PSBwb2ludGVyRXZlbnRUeXBlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjb21tYW5kO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICB9XG4gICAgfVxuICAgIGZ1bmN0aW9uIGZpbmRJbnB1dENvbW1hbmQoaW5wdXRBY3Rpb24sIHBvaW50ZXJFdmVudFR5cGUsIGVudGl0eSkge1xuICAgICAgICAvLyBXZSBzZWFyY2ggdGhlIGxhc3QgcG9pbnRlciBFdmVudCBjb21tYW5kIHNvcnRlZCBieSB0aW1lc3RhbXBcbiAgICAgICAgY29uc3QgY29tbWFuZCA9IGZpbmRMYXN0QWN0aW9uKHBvaW50ZXJFdmVudFR5cGUsIGlucHV0QWN0aW9uLCBlbnRpdHkpO1xuICAgICAgICBpZiAoIWNvbW1hbmQpXG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgaWYgKHRpbWVzdGFtcElzQ3VycmVudEZyYW1lKGNvbW1hbmQudGltZXN0YW1wKSkge1xuICAgICAgICAgICAgcmV0dXJuIGNvbW1hbmQ7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuICAgIH1cbiAgICAvLyByZXR1cm5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B3YXMgYWxyZWFkeSByZWdpc3RlcmVkLmApO1xuICAgICAgICB9XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgIGlmIChjb21wb25lbnQuY29tcG9uZW50TmFtZSAhPT0gY29tcG9uZW50TmFtZSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBDb21wb25lbnQgbmFtZSBkb2Vzbid0IG1hdGNoIGNvbXBvbmVudERlZmluaXRpb24uY29tcG9uZW50TmFtZSAke2NvbXBvbmVudE5hbWV9ICE9ICR7Y29tcG9uZW50LmNvbXBvbmVudE5hbWV9YCk7XG4gICAgICAgIH1cbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgaWYgKGNvbXBvbmVudC5jb21wb25lbnRJZCAhPT0gY29tcG9uZW50SWQpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ29tcG9uZW50IG51bWJlciBkb2Vzbid0IG1hdGNoIGNvbXBvbmVudERlZmluaXRpb24uY29tcG9uZW50SWQgJHtjb21wb25lbnRJZH0gIT0gJHtjb21wb25lbnQuY29tcG9uZW50SWR9YCk7XG4gICAgICAgIH1cbiAgICAgICAgY29tcG9uZW50c0RlZmluaXRpb24uc2V0KGNvbXBvbmVudElkLCBjb21wb25lbnQpO1xuICAgICAgICByZXR1cm4gY29tcG9uZW50O1xuICAgIH1cbiAgICBmdW5jdGlvbiBkZWZpbmVDb21wb25lbnRGcm9tU2NoZW1hKGNvbXBvbmVudE5hbWUsIHNjaGVtYSkge1xuICAgICAgICBjb25zdCBjb21wb25lbnRJZCA9IGNvbXBvbmVudE51bWJlckZyb21OYW1lKGNvbXBvbmVudE5hbWUpO1xuICAgICAgICBjb25zdCBwcmV2ID0gY29tcG9uZW50c0RlZmluaXRpb24uZ2V0KGNvbXBvbmVudElkKTtcbiAgICAgICAgaWYgKHByZXYpIHtcbiAgICAgICAgICAgIC8vIFRPRE86IGFzc2VydCBzcGVjID09PSBwcmV2LnNwZWNcbiAgICAgICAgICAgIHJldHVybiBwcmV2O1xuICAgICAgICB9XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgIGlmIChzZWFsZWQpXG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0VuZ2luZSBpcyBhbHJlYWR5IHNlYWxlZC4gTm8gY29tcG9uZW50cyBjYW4gYmUgYWRkZWQgYXQgdGhpcyBzdGFnZScpO1xuICAgICAgICBjb25zdCBuZXdDb21wb25lbnQgPSBjcmVhdGVDb21wb25lbnREZWZpbml0aW9uRnJvbVNjaGVtYShjb21wb25lbnROYW1lLCBjb21wb25lbnRJZCwgc2NoZW1hKTtcbiAgICAgICAgY29tcG9uZW50c0RlZmluaXRpb24uc2V0KGNvbXBvbmVudElkLCBuZXdDb21wb25lbnQpO1xuICAgICAgICByZXR1cm4gbmV3Q29tcG9uZW50O1xuICAgIH1cbiAgICBmdW5jdGlvbiBkZWZpbmVWYWx1ZVNldENvbXBvbmVudEZyb21TY2hlbWEoY29tcG9uZW50TmFtZSwgc2NoZW1hLCBvcHRpb25zKSB7XG4gICAgICAgIGNvbnN0IGNvbXBvbmVudElkID0gY29tcG9uZW50TnVtYmVyRnJvbU5hbWUoY29tcG9uZW50TmFtZSk7XG4gICAgICAgIGNvbnN0IHByZXYgPSBjb21wb25lbnRzRGVmaW5pdGlvbi5nZXQoY29tcG9uZW50SWQpO1xuICAgICAgICBpZiAocHJldikge1xuICAgICAgICAgICAgLy8gVE9ETzogYXNzZXJ0IHNwZWMgPT09IHByZXYuc3BlY1xuICAgICAgICAgICAgcmV0dXJuIHByZXY7XG4gICAgICAgIH1cbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgaWYgKHNlYWxlZClcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRW5naW5lIGlzIGFscmVhZHkgc2VhbGVkLiBObyBjb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G9uZW50SWQsIHNjaGVtYVNwZWMpO1xuICAgICAgICBjb25zdCBuZXdDb21wb25lbnQgPSB7XG4gICAgICAgICAgICAuLi5kZWYsXG4gICAgICAgICAgICBjcmVhdGUoZW50aXR5LCB2YWwpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZGVmLmNyZWF0ZShlbnRpdHksIHZhbCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwgdmFsKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGRlZi5jcmVhdGVPclJlcGxhY2UoZW50aXR5LCB2YWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICBjb21wb25lbnRzRGVmaW5pdGlvbi5zZXQoY29tcG9uZW50SWQsIG5ld0NvbXBvbmVudCk7XG4gICAgICAgIHJldHVybiBuZXdDb21wb25lbnQ7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGdldENvbXBvbmVudChjb21wb25lbnRJZE9yTmFtZSkge1xuICAgICAgICBjb25zdCBjb21wb25lbnRJZCA9IHR5cGVvZiBjb21wb25lbnRJZE9yTmFtZSA9PT0gJ251bWJlcicgPyBjb21wb25lbnRJZE9yTmFtZSA6IGNvbXBvbmVudE51bWJlckZyb21OYW1lKGNvbXBvbmVudElkT3JOYW1lKTtcbiAgICAgICAgY29uc3QgY29tcG9uZW50ID0gY29tcG9uZW50c0RlZmluaXRpb24uZ2V0KGNvbXBvbmVudElkKTtcbiAgICAgICAgaWYgKCFjb21wb25lbnQpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ29tcG9uZW50ICR7Y29tcG9uZW50SWRPck5hbWV9IG5vdCBmb3VuZC4gWW91IG5lZWQgdG8gZGVjbGFyZSB0aGUgY29tcG9uZW50cyBhdCB0aGUgYmVnaW5uaWcgb2YgdGhlIGVuZ2luZSBkZWNsYXJhdGlvbmApO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBjb21wb25lbnQ7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGdldENvbXBvbmVudE9yTnVsbChjb21wb25lbnRJZE9yTmFtZSkge1xuICAgICAgICBjb25zdCBjb21wb25lbnRJZCA9IHR5cGVvZiBjb21wb25lbnRJZE9yTmFtZSA9PT0gJ251bWJlcicgPyBjb21wb25lbnRJZE9yTmFtZSA6IGNvbXBvbmVudE51bWJlckZyb21OYW1lKGNvbXBvbmVudElkT3JOYW1lKTtcbiAgICAgICAgcmV0dXJuIChjb21wb25lbnRzRGVmaW5pdGlvbi5nZXQoY29tcG9uZW50SWQpID8/XG4gICAgICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xuICAgICAgICAgICAgbnVsbCk7XG4gICAgfVxuICAgIGZ1bmN0aW9uKiBnZXRFbnRpdGllc1dpdGgoLi4uY29tcG9uZW50cykge1xuICAgICAgICBmb3IgKGNvbnN0IFtlbnRpdHksIC4uLmdyb3VwQ29tcF0gb2YgZ2V0Q29tcG9uZW50RGVmR3JvdXAoLi4uY29tcG9uZW50cykpIHtcbiAgICAgICAgICAgIHlpZWxkIFtlbnRpdHksIC4uLmdyb3VwQ29tcC5tYXAoKGMpID0+IGMuZ2V0KGVudGl0eSkpXTtcbiAgICAgICAgfVxuICAgIH1cbiAgICBmdW5jdGlvbiBnZXRFbnRpdHlPck51bGxCeU5hbWUodmFsdWUpIHtcbiAgICAgICAgY29uc3QgTGFiZWxDb21wb25lbnQgPSBjb21wb25lbnRzLk5hbWUoeyBkZWZpbmVDb21wb25lbnQgfSk7XG4gICAgICAgIGZvciAoY29uc3QgW2VudGl0eSwgbmFtZV0gb2YgZ2V0RW50aXRpZXNXaXRoKExhYmVsQ29tcG9uZW50KSkge1xuICAgICAgICAgICAgaWYgKG5hbWUudmFsdWUgPT09IHZhbHVlKVxuICAgICAgICAgICAgICAgIHJldHVybiBlbnRpdHk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgfVxuICAgIGZ1bmN0aW9uKiBnZXRDb21wb25lbnREZWZHcm91cCguLi5hcmdzKSB7XG4gICAgICAgIGNvbnN0IFtmaXJzdENvbXBvbmVudERlZiwgLi4uY29tcG9uZW50RGVmaW5pdGlvbnNdID0gYXJncztcbiAgICAgICAgZm9yIChjb25zdCBbZW50aXR5XSBvZiBmaXJzdENvbXBvbmVudERlZi5pdGVyYXRvcigpKSB7XG4gICAgICAgICAgICBsZXQgbWF0Y2hlcyA9IHRydWU7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IGNvbXBvbmVudERlZiBvZiBjb21wb25lbnREZWZpbml0aW9ucykge1xuICAgICAgICAgICAgICAgIGlmICghY29tcG9uZW50RGVmLmhhcyhlbnRpdHkpKSB7XG4gICAgICAgICAgICAgICAgICAgIG1hdGNoZXMgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG1hdGNoZXMpIHtcbiAgICAgICAgICAgICAgICB5aWVsZCBbZW50aXR5LCAuLi5hcmdzXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBmdW5jdGlvbiBnZXRTeXN0ZW1zKCkge1xuICAgICAgICByZXR1cm4gc3lzdGVtcy5nZXRTeXN0ZW1zKCk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGNvbXBvbmVudHNJdGVyKCkge1xuICAgICAgICByZXR1cm4gY29tcG9uZW50c0RlZmluaXRpb24udmFsdWVzKCk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJlbW92ZUNvbXBvbmVudERlZmluaXRpb24oY29tcG9uZW50SWRPck5hbWUpIHtcbiAgICAgICAgaWYgKHNlYWxlZClcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRW5naW5lIGlzIGFscmVhZHkgc2VhbGVkLiBObyBjb21wb25lbnRzIGNhbiBiZSByZW1vdmVkIGF0IHRoaXMgc3RhZ2UnKTtcbiAgICAgICAgY29uc3QgY29tcG9uZW50SWQgPSB0eXBlb2YgY29tcG9uZW50SWRPck5hbWUgPT09ICdudW1iZXInID8gY29tcG9uZW50SWRPck5hbWUgOiBjb21wb25lbnROdW1iZXJGcm9tTmFtZShjb21wb25lbnRJZE9yTmFtZSk7XG4gICAgICAgIGNvbXBvbmVudHNEZWZpbml0aW9uLmRlbGV0ZShjb21wb25lbnRJZCk7XG4gICAgfVxuICAgIGNvbXBvbmVudHMuVHJhbnNmb3JtKHsgZGVmaW5lQ29tcG9uZW50RnJvbVNjaGVtYSB9KTtcbiAgICBmdW5jdGlvbiBzZWFsKCkge1xuICAgICAgICBpZiAoIXNlYWxlZCkge1xuICAgICAgICAgICAgc2VhbGVkID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4ge1xuICAgICAgICBhZGRFbnRpdHksXG4gICAgICAgIHJlbW92ZUVudGl0eSxcbiAgICAgICAgcmVtb3ZlRW50aXR5V2l0aENoaWxkcmVuLFxuICAgICAgICBhZGRTeXN0ZW0sXG4gICAgICAgIGdldFN5c3RlbXMsXG4gICAgICAgIHJlbW92ZVN5c3RlbSxcbiAgICAgICAgZGVmaW5lQ29tcG9uZW50LFxuICAgICAgICBkZWZpbmVDb21wb25lbnRGcm9tU2NoZW1hLFxuICAgICAgICBkZWZpbmVWYWx1ZVNldENvbXBvbmVudEZyb21TY2hlbWEsXG4gICAgICAgIGdldEVudGl0aWVzV2l0aCxcbiAgICAgICAgZ2V0Q29tcG9uZW50LFxuICAgICAgICBnZXRDb21wb25lbnRPck51bGw6IGdldENvbXBvbmVudE9yTnVsbCxcbiAgICAgICAgZ2V0RW50aXR5T3JOdWxsQnlOYW1lLFxuICAgICAgICByZW1vdmVDb21wb25lbnREZWZpbml0aW9uLFxuICAgICAgICByZWdpc3RlckNvbXBvbmVudERlZmluaXRpb24sXG4gICAgICAgIGVudGl0eUNvbnRhaW5lcixcbiAgICAg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XR5KTtcbiAgICAgICAgY29uc3QgcG9pbnRlckV2ZW50ID0gZXZlbnQuZ2V0KHR5cGUpO1xuICAgICAgICBpZiAocG9pbnRlckV2ZW50Py5vcHRzLmhvdmVyVGV4dCkge1xuICAgICAgICAgICAgcmVtb3ZlUG9pbnRlckV2ZW50KGVudGl0eSwgZ2V0UG9pbnRlckV2ZW50KHR5cGUpLCBwb2ludGVyRXZlbnQub3B0cy5idXR0b24pO1xuICAgICAgICB9XG4gICAgICAgIGV2ZW50LmRlbGV0ZSh0eXBlKTtcbiAgICB9XG4gICAgLy8gQGludGVybmFsXG4gICAgZW5naW5lLmFkZFN5c3RlbShmdW5jdGlvbiBFdmVudFN5c3RlbSgpIHtcbiAgICAgICAgZm9yIChjb25zdCBbZW50aXR5LCBldmVudF0gb2YgZXZlbnRzTWFwKSB7XG4gICAgICAgICAgICBpZiAoZW5naW5lLmdldEVudGl0eVN0YXRlKGVudGl0eSkgPT09IEVudGl0eVN0YXRlLlJlbW92ZWQpIHtcbiAgICAgICAgICAgICAgICBldmVudHNNYXAuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmb3IgKGNvbnN0IFtldmVudFR5cGUsIHsgY2IsIG9wdHMgfV0gb2YgZXZlbnQpIHtcbiAgICAgICAgICAgICAgICBpZiAoZXZlbnRUeXBlID09PSBFdmVudFR5cGUuQ2xpY2spIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgY29tbWFuZCA9IGlucHV0U3lzdGVtLmdldENsaWNrKG9wdHMuYnV0dG9uLCBlbnRpdHkpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29tbWFuZClcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrTm90VGhlbmFibGUoY2IoY29tbWFuZC51cCksICdDbGljayBldmVudCByZXR1cm5lZCBhIHRoZW5hYmxlLiBPbmx5IHN5bmNocm9ub3VzIGZ1bmN0aW9ucyBhcmUgYWxsb3dlZCcpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoZXZlbnRUeXBlID09PSBFdmVudFR5cGUuRG93biB8fCBldmVudFR5cGUgPT09IEV2ZW50VHlwZS5VcCkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjb21tYW5kID0gaW5wdXRTeXN0ZW0uZ2V0SW5wdXRDb21tYW5kKG9wdHMuYnV0dG9uLCBnZXRQb2ludGVyRXZlbnQoZXZlbnRUeXBlKSwgZW50aXR5KTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbW1hbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrTm90VGhlbmFibGUoY2IoY29tbWFuZCksICdFdmVudCBoYW5kbGVyIHJldHVybmVkIGEgdGhlbmFibGUuIE9ubHkgc3luY2hyb25vdXMgZnVuY3Rpb25zIGFyZSBhbGxvd2VkJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KTtcbiAgICBjb25zdCBvblBvaW50ZXJEb3duID0gKC4uLmFyZ3MpID0+IHtcbiAgICAgICAgY29uc3QgW2RhdGEsIGNiLCBtYXliZU9wdHNdID0gYXJncztcbiAgICAgICAgaWYgKHR5cGVvZiBkYXRhID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgcmV0dXJuIG9uUG9pbnRlckRvd24oeyBlbnRpdHk6IGRhdGEsIG9wdHM6IG1heWJlT3B0cyA/PyB7fSB9LCBjYik7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgeyBlbnRpdHksIG9wdHMgfSA9IGRhdGE7XG4gICAgICAgIGNvbnN0IG9wdGlvbnMgPSBnZXREZWZhdWx0T3B0cyhvcHRzKTtcbiAgICAgICAgcmVtb3ZlRXZlbnQoZW50aXR5LCBFdmVudFR5cGUuRG93bik7XG4gICAgICAgIGdldEV2ZW50KGVudGl0eS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gICAgIHJlc3RhcnQoKTtcbiAgICAgICAgfVxuICAgICAgICByZXN0YXJ0VHdlZW5zLmxlbmd0aCA9IDA7XG4gICAgICAgIGZvciAoY29uc3QgW2VudGl0eSwgdHdlZW5dIG9mIGVuZ2luZS5nZXRFbnRpdGllc1dpdGgoVHdlZW4pKSB7XG4gICAgICAgICAgICBpZiAodHdlZW5DaGFuZ2VkKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBidWZmZXIgPSBuZXcgUmVhZFdyaXRlQnl0ZUJ1ZmZlcigpO1xuICAgICAgICAgICAgICAgIFR3ZWVuLnNjaGVtYS5zZXJpYWxpemUodHdlZW4sIGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgY2FjaGUuc2V0KGVudGl0eSwge1xuICAgICAgICAgICAgICAgICAgICB0d2VlbjogYnVmZmVyLnRvQmluYXJ5KCksXG4gICAgICAgICAgICAgICAgICAgIGZyYW1lczogMCxcbiAgICAgICAgICAgICAgICAgICAgY29tcGxldGVkOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgY2hhbmdlZDogdHJ1ZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgdHdlZW5DYWNoZSA9IGNhY2hlLmdldChlbnRpdHkpO1xuICAgICAgICAgICAgdHdlZW5DYWNoZS5mcmFtZXMgKz0gMTtcbiAgICAgICAgICAgIHR3ZWVuQ2FjaGUuY2hhbmdlZCA9IGZhbHNlO1xuICAgICAgICAgICAgaWYgKGlzQ29tcGxldGVkKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICAvLyBSZXNldCB0d2VlbiBmcmFtZXMuXG4gICAgICAgICAgICAgICAgdHdlZW5DYWNoZS5mcmFtZXMgPSAwO1xuICAgICAgICAgICAgICAgIC8vIHNldCB0aGUgdHdlZW4gY29tcGxldGVkIHRvIGF2b2lkIGNhbGxpbmcgdGhpcyBhZ2FpbiBmb3IgdGhlIHNhbWUgdHdlZW5cbiAgICAgICAgICAgICAgICB0d2VlbkNhY2hlLmNvbXBsZXRlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgY29uc3QgdHdlZW5TZXF1ZW5jZSA9IFR3ZWVuU2VxdWVuY2UuZ2V0T3JOdWxsKGVudGl0eSk7XG4gICAgICAgICAgICAgICAgaWYgKCF0d2VlblNlcXVlbmNlKVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjb25zdCB7IHNlcXVlbmNlIH0gPSB0d2VlblNlcXVlbmNlO1xuICAgICAgICAgICAgICAgIGlmIChzZXF1ZW5jZSAmJiBzZXF1ZW5jZS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgW25leHRUd2VlblNlcXVlbmNlLCAuLi5vdGhlclR3ZWVuc10gPSBzZXF1ZW5jZTtcbiAgICAgICAgICAgICAgICAgICAgVHdlZW4uY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwgbmV4dFR3ZWVuU2VxdWVuY2UpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBtdXRhYmxlVHdlZW5IZWxwZXIgPSBUd2VlblNlcXVlbmNlLmdldE11dGFibGUoZW50aXR5KTtcbiAgICAgICAgICAgICAgICAgICAgbXV0YWJsZVR3ZWVuSGVscGVyLnNlcXVlbmNlID0gb3RoZXJUd2VlbnM7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0d2VlblNlcXVlbmNlLmxvb3AgPT09IDAgLyogVHdlZW5Mb29wLlRMX1JFU1RBUlQgKi8pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG11dGFibGVUd2VlbkhlbHBlci5zZXF1ZW5jZS5wdXNoKHR3ZWVuKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmICh0d2VlblNlcXVlbmNlLmxvb3AgPT09ID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9tIHBhY2thZ2UgQGJyb3dzZXJpZnkvcGF0aFxuICovXG4vKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xuZnVuY3Rpb24gbm9ybWFsaXplU3RyaW5nUG9zaXgocGF0aCwgYWxsb3dBYm92ZVJvb3QgPSBmYWxzZSkge1xuICAgIGxldCByZXMgPSAnJztcbiAgICBsZXQgbGFzdFNlZ21lbnRMZW5ndGggPSAwO1xuICAgIGxldCBsYXN0U2xhc2ggPSAtMTtcbiAgICBsZXQgZG90cyA9IDA7XG4gICAgbGV0IGNvZGU7XG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPD0gcGF0aC5sZW5ndGg7ICsraSkge1xuICAgICAgICBpZiAoaSA8IHBhdGgubGVuZ3RoKVxuICAgICAgICAgICAgY29kZSA9IHBhdGguY2hhckNvZGVBdChpKTtcbiAgICAgICAgZWxzZSBpZiAoY29kZSA9PT0gNDcgLyovKi8pXG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgZWxzZVxuICAgICAgICAgICAgY29kZSA9IDQ3OyAvKi8qL1xuICAgICAgICBpZiAoY29kZSA9PT0gNDcgLyovKi8pIHtcbiAgICAgICAgICAgIGlmIChsYXN0U2xhc2ggPT09IGkgLSAxIHx8IGRvdHMgPT09IDEpIHtcbiAgICAgICAgICAgICAgICAvLyBOT09QXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChsYXN0U2xhc2ggIT09IGkgLSAxICYmIGRvdHMgPT09IDIpIHtcbiAgICAgICAgICAgICAgICBpZiAocmVzLmxlbmd0aCA8IDIgfHxcbiAgICAgICAgICAgICAgICAgICAgbGFzdFNlZ21lbnRMZW5ndGggIT09IDIgfHxcbiAgICAgICAgICAgICAgICAgICAgcmVzLmNoYXJDb2RlQXQocmVzLmxlbmd0aCAtIDEpICE9PSA0NiAvKi4qLyB8fFxuICAgICAgICAgICAgICAgICAgICByZXMuY2hhckNvZGVBdChyZXMubGVuZ3RoIC0gMikgIT09IDQ2IC8qLiovKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXMubGVuZ3RoID4gMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbGFzdFNsYXNoSW5kZXggPSByZXMubGFzdEluZGV4T2YoJy8nKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsYXN0U2xhc2hJbmRleCAhPT0gcmVzLmxlbmd0aCAtIDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobGFzdFNsYXNoSW5kZXggPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcyA9ICcnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0U2VnbWVudExlbmd0aCA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXMgPSByZXMuc2xpY2UoMCwgbGFzdFNsYXNoSW5kZXgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0U2VnbWVudExlbmd0aCA9IHJlcy5sZW5ndGggLSAxIC0gcmVzLmxhc3RJbmRleE9mKCcvJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RTbGFzaCA9IGk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG90cyA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAocmVzLmxlbmd0aCA9PT0gMiB8fCByZXMubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXMgPSAnJztcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RTZWdtZW50TGVuZ3RoID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RTbGFzaCA9IGk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkb3RzID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChhbGxvd0Fib3ZlUm9vdCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAocmVzLmxlbmd0aCA+IDApXG4gICAgICAgICAgICAgICAgICAgICAgICByZXMgKz0gJy8uLic7XG4gICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlcyA9ICcuLic7XG4gICAgICAgICAgICAgICAgICAgIGxhc3RTZWdtZW50TGVuZ3RoID0gMjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAocmVzLmxlbmd0aCA+IDApXG4gICAgICAgICAgICAgICAgICAgIHJlcyArPSAnLycgKyBwYXRoLnNsaWNlKGxhc3RTbGFzaCArIDEsIGkpO1xuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgcmVzID0gcGF0aC5zbGljZShsYXN0U2xhc2ggKyAxLCBpKTtcbiAgICAgICAgICAgICAgICBsYXN0U2VnbWVudExlbmd0aCA9IGkgLSBsYXN0U2xhc2ggLSAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbGFzdFNsYXNoID0gaTtcbiAgICAgICAgICAgIGRvdHMgPSAwO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGNvZGUgPT09IDQ2IC8qLiovICYmIGRvdHMgIT09IC0xKSB7XG4gICAgICAgICAgICArK2RvdHM7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBkb3RzID0gLTE7XG4gICAgIC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b21wb25lbnREZWZpbml0aW9uKGVuZ2luZSwgY29tcG9uZW50KSB7XG4gICAgY29uc3QgZXhpc3RpbmdDb21wb25lbnREZWZpbml0aW9uID0gZW5naW5lLmdldENvbXBvbmVudE9yTnVsbChjb21wb25lbnQubmFtZSk7XG4gICAgaWYgKCFleGlzdGluZ0NvbXBvbmVudERlZmluaXRpb24pIHtcbiAgICAgICAgaWYgKGNvbXBvbmVudC5uYW1lLnN0YXJ0c1dpdGgoJ2NvcmU6OicpKSB7XG4gICAgICAgICAgICBpZiAoY29tcG9uZW50Lm5hbWUgaW4gY29tcG9uZW50RGVmaW5pdGlvbkJ5TmFtZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjb21wb25lbnREZWZpbml0aW9uQnlOYW1lW2NvbXBvbmVudC5uYW1lXShlbmdpbmUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBUaGUgY29yZSBjb21wb25lbnQgJHtjb21wb25lbnQubmFtZX0gd2FzIG5vdCBmb3VuZC5gKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChjb21wb25lbnQuanNvblNjaGVtYSkge1xuICAgICAgICAgICAgcmV0dXJuIGVuZ2luZS5kZWZpbmVDb21wb25lbnRGcm9tU2NoZW1hKGNvbXBvbmVudC5uYW1lLCBTY2hlbWFzLmZyb21Kc29uKGNvbXBvbmVudC5qc29uU2NoZW1hKSk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYCR7Y29tcG9uZW50Lm5hbWV9IGlzIG5vdCBkZWZpbmVkIGFuZCB0aGVyZSBpcyBubyBzY2hlbWEgdG8gZGVmaW5lIGl0LmApO1xuICAgICAgICB9XG4gICAgfVxuICAgIGVsc2Uge1xuICAgICAgICByZXR1cm4gZXhpc3RpbmdDb21wb25lbnREZWZ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ZVJlc291cmNlLmNvbXBvc2l0ZS5jb21wb25lbnRzKSB7XG4gICAgICAgIC8vIFdlIGFscmVhZHkgaW5zdGFuY2VkIHRoZSBjb21wb3NpdGVcbiAgICAgICAgaWYgKGNvbXBvbmVudC5uYW1lID09PSBDb21wb3NpdGVSb290Q29tcG9uZW50LmNvbXBvbmVudE5hbWUpXG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgLy8gIyMgM2EgIyNcbiAgICAgICAgLy8gV2UgZmluZCB0aGUgY29tcG9uZW50IGRlZmluaXRpb25cbiAgICAgICAgY29uc3QgY29tcG9uZW50RGVmaW5pdGlvbiA9IGdldENvbXBvbmVudERlZmluaXRpb24oZW5naW5lLCBjb21wb25lbnQpO1xuICAgICAgICAvLyAjIyAzYiAjI1xuICAgICAgICAvLyBJdGVyYXRpbmcgb3ZlciBhbGwgdGhlIGVudGl0aWVzIHdpdGggdGhpcyBjb21wb25lbnQgYW5kIGNyZWF0ZSB0aGUgcmVwbGljYVxuICAgICAgICBmb3IgKGNvbnN0IFtlbnRpdHksIGNvbXBvc2l0ZUNvbXBvbmVudFZhbHVlXSBvZiBjb21wb25lbnQuZGF0YSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50VmFsdWVEZXNlcmlhbGl6ZWQgPSBnZXRDb21wb25lbnRWYWx1ZShjb21wb25lbnREZWZpbml0aW9uLCBjb21wb3NpdGVDb21wb25lbnRWYWx1ZSk7XG4gICAgICAgICAgICBjb25zdCB0YXJnZXRFbnRpdHkgPSBnZXRDb21wb3NpdGVFbnRpdHkoZW50aXR5KTtcbiAgICAgICAgICAgIGNvbnN0IGNvbXBvbmVudFZhbHVlID0gY29tcG9uZW50RGVmaW5pdGlvbi5jcmVhdGUodGFyZ2V0RW50aXR5LCBjb21wb25lbnRWYWx1ZURlc2VyaWFsaXplZCk7XG4gICAgICAgICAgICAvLyAjIyAzYyAjI1xuICAgICAgICAgICAgLy8gQWxsIGVudGl0aWVzIHJlZmVyZW5jZWQgaW4gdGhlIGNvbXBvc2l0ZSBwcm9iYWJseSBoYXMgYSBkaWZmZXJlbnQgcmVzb2x2ZWQgRW50aXR5TnVtYmVyXG4gICAgICAgICAgICAvLyBXZSdsbCBrbm93IHdpdGggdGhlIG1hcHBlZEVudGl0eWVzXG4gICAgICAgICAgICBpZiAoY29tcG9uZW50RGVmaW5pdGlvbi5jb21wb25lbnRJZCA9PT0gVHJhbnNmb3JtQ29tcG9uZW50TnVtYmVyKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgdHJhbnNmb3JtID0gY29tcG9uZW50VmFsdWU7XG4gICAgICAgICAgICAgICAgaWYgKHRyYW5zZm9ybS5wYXJlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgdHJhbnNmb3JtLnBhcmVudCA9IGdldENvbXBvc2l0ZUVudGl0eSh0cmFuc2Zvcm0ucGFyZW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRyYW5zZm9ybS5wYXJlbnQgPSBnZXRDb21wb3NpdGVFbnRpdHkoMCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIFRPRE86IGlzIGl0IGdvaW5nIHRvIGJlIG5lY2Vzc2FyeSB0byByZW1hcCBhc3NldHM/IGUuZy4gc3JjIHBhcmFtIGZyb20gQXVkaW9Tb3VyY2UgYW5kIEdsdGZDb250YWluZXJcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIFNjaGVtYXMubXV0YXRlTmVzdGVkVmFsdWVzKGNvbXBvbmVudERlZmluaXRpb24uc2NoZW1hLmpzb25TY2hlbWEsIGNvbXBvbmVudFZhbHVlLCAodmFsdWUsIHZhbHVlVHlwZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAodmFsdWVUeXBlLnNlcmlhbGl6YXRpb25UeXBlID09PSAnZW50aXR5Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgY2hhbmdlZDogdHJ1ZSwgdmFsdWU6IGdldENvbXBvc2l0ZUVudGl0eSh2YWx1ZSkgfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7IGNoYW5nZWQ6IGZhbHNlIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBjb25zdCBjb21wb3NpdGUgPSBDb21wb3NpdGVSb290Q29tcG9uZW50LmdldE11dGFibGVPck51bGwoY29tcG9zaXRlUm9vdEVudGl0eSkgfHwgQ29tcG9zaXRlUm9vdENvbXBvbmVudC5jcmVhdGUoY29tcG9zaXRlUm9vdEVudGl0eSk7XG4gICAgZm9yIChjb25zdCBbZW50aXR5U291cmNlLCB0YXJnZXRFbnRpdHldIG9mIG1hcHBlZEVudGl0aWVzKSB7XG4gICAgICAgIGNvbXBvc2l0ZS5lbnRpdGllcy5wdXNoKHtcbiAgICAgICAgICAgIHNyYzogZW50aXR5U291cmNlLFxuICAgICAgICAgICAgZGVzdDogdGFyZ2V0RW50aXR5XG4gICAgICAgIH0pO1xuICAgIH1cbiAgICBjb21wb3NpdGUuc3JjID0gY29tcG9zaXRlUmVzb3VyY2Uuc3JjO1xuICAgIHJldHVybiBjb21wb3NpdGVSb290RW50aXR5O1xufVxuIiwgIi8qIGVzbGludC1kaXNhYmxlICovXG5pbXBvcnQgX20wIGZyb20gXCJwcm90b2J1ZmpzL21pbmltYWxcIjtcbmltcG9ydCB7IFZhbHVlIH0gZnJvbSBcIi4vZ29vZ2xlL3Byb3RvYnVmL3N0cnVjdC5nZW5cIjtcbmNvbnN0IHByb3RvYnVmUGFja2FnZVNhcmFzYSA9IFwiXCI7XG5mdW5jdGlvbiBjcmVhdGVCYXNlQ29tcG9uZW50RGF0YSgpIHtcbiAgICByZXR1cm4geyBkYXRhOiB1bmRlZmluZWQgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIENvbXBvbmVudERhdGE7XG4oZnVuY3Rpb24gKENvbXBvbmVudERhdGEpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBzd2l0Y2ggKG1lc3NhZ2UuZGF0YT8uJGNhc2UpIHtcbiAgICAgICAgICAgIGNhc2UgXCJqc29uXCI6XG4gICAgICAgICAgICAgICAgVmFsdWUuZW5jb2RlKFZhbHVlLndyYXAobWVzc2FnZS5kYXRhLmpzb24pLCB3cml0ZXIudWludDMyKDEwKS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcImJpbmFyeVwiOlxuICAgICAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTgpLmJ5dGVzKG1lc3NhZ2UuZGF0YS5iaW5hcnkpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIENvbXBvbmVudERhdGEuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VDb21wb25lbnREYXRhKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGF0YSA9IHsgJGNhc2U6IFwianNvblwiLCBqc29uOiBWYWx1ZS51bndyYXAoVmFsdWUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kYXRhID0geyAkY2FzZTogXCJiaW5hcnlcIiwgYmluYXJ5OiByZWFkZXIuYnl0ZXMoKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvbmVudERhdGEuZGVjb2RlID0gZGVjb2RlO1xuICAgIGZ1bmN0aW9uIGZyb21KU09OKG9iamVjdCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgZGF0YTogaXNTZ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zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbXBvc2l0ZUNvbXBvbmVudCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm5hbWUgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuanNvblNjaGVtYSA9IFZhbHVlLnVud3JhcChWYWx1ZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZW50cnkzID0gQ29tcG9zaXRlQ29tcG9uZW50X0RhdGFFbnRyeS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZW50cnkzLnZhbHVlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGF0YS5zZXQoZW50cnkzLmtleSwgZW50cnkzLnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvc2l0ZUNvbXBvbmVudC5kZWNvZGUgPSBkZWNvZGU7XG4gICAgZnVuY3Rpb24gZnJvbUpTT04ob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBuYW1lOiBpc1NldChvYmplY3QubmFtZSkgPyBTdHJpbmcob2JqZWN0Lm5hbWUpIDogXCJcIixcbiAgICAgICAgICAgIGpzb25TY2hlbWE6IGlzU2V0KG9iamVjdD8uanNvblNjaGVtYSkgPyBvYmplY3QuanNvblNjaGVtYSA6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGRhdGE6IGlzT2JqZWN0KG9iamVjdC5kYXRhKVxuICAgICAgICAgICAgICAgID8gT2JqZWN0LmVudHJpZXMob2JqZWN0LmRhdGEpLnJlZHVjZSgoYWNjLCBba2V5LCB2YWx1ZV0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgYWNjLnNldChOdW1iZXIoa2V5KSwgQ29tcG9uZW50RGF0YS5mcm9tSlNPTih2YWx1ZSkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICAgICAgICAgIH0sIG5ldyBNYXAoKSlcbiAgICAgICAgICAgICAgICA6IG5ldyBNYXAoKSxcbiAgICAgICAgfTtcbiAgICB9XG4gICAgQ29tcG9zaXRlQ29tcG9u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AgICAgICAgICAgIHdyaXRlci51aW50MzIoOCkuaW50MzIobWVzc2FnZS5rZXkpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnZhbHVlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIENvbXBvbmVudERhdGEuZW5jb2RlKG1lc3NhZ2UudmFsdWUsIHdyaXRlci51aW50MzIoMTgpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgQ29tcG9zaXRlQ29tcG9uZW50X0RhdGFFbnRyeS5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbXBvc2l0ZUNvbXBvbmVudF9EYXRhRW50cnkoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmtleSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gQ29tcG9uZW50RGF0YS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvc2l0ZUNvbXBvbmVudF9EYXRhRW50cnkuZGVjb2RlID0gZGVjb2RlO1xuICAgIGZ1bmN0aW9uIGZyb21KU09OKG9iamVjdCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAga2V5OiBpc1NldChvYmplY3Qua2V5KSA/IE51bWJlcihvYmplY3Qua2V5KSA6IDAsXG4gICAgICAgICAgICB2YWx1ZTogaXNTZXQob2JqZWN0LnZhbHVlKSA/IENvbXBvbmVudERhdGEuZnJvbUpTT04ob2JqZWN0LnZhbHVlKSA6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICB9XG4gICAgQ29tcG9zaXRlQ29tcG9uZW50X0RhdGFFbnRyeS5mcm9tSlNPTiA9IGZyb21KU09OO1xuICAgIGZ1bmN0aW9uIHRvSlNPTihtZXNzYWdlKSB7XG4gICAgICAgIGNvbnN0IG9iaiA9IHt9O1xuICAgICAgICBtZXNzYWdlLmtleSAhPT0gdW5kZWZpbmVkICYmIChvYmoua2V5ID0gTWF0aC5yb3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bi5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbXBvc2l0ZURlZmluaXRpb24oKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZlcnNpb24gPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jb21wb25lbnRzLnB1c2goQ29tcG9zaXRlQ29tcG9uZW50LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvc2l0ZURlZmluaXRpb24uZGVjb2RlID0gZGVjb2RlO1xuICAgIGZ1bmN0aW9uIGZyb21KU09OKG9iamVjdCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdmVyc2lvbjogaXNTZXQob2JqZWN0LnZlcnNpb24pID8gTnVtYmVyKG9iamVjdC52ZXJzaW9uKSA6IDAsXG4gICAgICAgICAgICBjb21wb25lbnRzOiBBcnJheS5pc0FycmF5KG9iamVjdD8uY29tcG9uZW50cylcbiAgICAgICAgICAgICAgICA/IG9iamVjdC5jb21wb25lbnRzLm1hcCgoZSkgPT4gQ29tcG9zaXRlQ29tcG9uZW50LmZyb21KU09OKGUpKVxuICAgICAgICAgICAgICAgIDogW10sXG4gICAgICAgIH07XG4gICAgfVxuICAgIENvbXBvc2l0ZURlZmluaXRpb24uZnJvbUpTT04gPSBmcm9tSlNPTjtcbiAgICBmdW5jdGlvbiB0b0pTT04obWVzc2FnZSkge1xuICAgICAgICBjb25zdCBvYmogPSB7fTtcbiAgICAgICAgbWVzc2FnZS52ZXJzaW9uICE9PSB1bmRlZmluZWQgJiYgKG9iai52ZXJzaW9uID0gTWF0aC5yb3VuZChtZXNzYWdlLnZlcnNpb24pKTtcbiAgICAgICAgaWYgKG1lc3NhZ2UuY29tcG9uZW50cykge1xuICAgICAgICAgICAgb2JqLmNvbXBvbmVudHMgPSBtZXNzYWdlLmNvbXBvbmVudHMubWFwKChlKSA9PiBlID8gQ29tcG9zaXRlQ29tcG9uZW50LnRvSlNPTihlKSA6IHVuZGVmaW5lZCk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICA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9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVN0cnVjdCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBlbnRyeTEgPSBTdHJ1Y3RfRmllbGRzRW50cnkuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVudHJ5MS52YWx1ZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZpZWxkcy5zZXQoZW50cnkxLmtleSwgZW50cnkxLnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFN0cnVjdC5kZWNvZGUgPSBkZWNvZGU7XG4gICAgZnVuY3Rpb24gZnJvbUpTT04ob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBmaWVsZHM6IGlzT2JqZWN0KG9iamVjdC5maWVsZHMpXG4gICAgICAgICAgICAgICAgPyBPYmplY3QuZW50cmllcyhvYmplY3QuZmllbGRzKS5yZWR1Y2UoKGFjYywgW2tleSwgdmFsdWVdKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGFjYy5zZXQoa2V5LCB2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgICAgICAgICAgfSwgbmV3IE1hcCgpKVxuICAgICAgICAgICAgICAgIDogbmV3IE1hcCgpLFxuICAgICAgICB9O1xuICAgIH1cbiAgICBTdHJ1Y3QuZnJvbUpTT04gPSBmcm9tSlNPTjtcbiAgICBmdW5jdGlvbiB0b0pTT04obWVzc2FnZSkge1xuICAgICAgICBjb25zdCBvYmogPSB7fTtcbiAgICAgICAgb2JqLmZpZWxkcyA9IHt9O1xuICAgICAgICBpZiAobWVzc2FnZS5maWVsZHMpIHtcbiAgICAgICAgICAgIG1lc3NhZ2UuZmllbGRzLmZvckVhY2goKHYsIGspID0+IHtcbiAgICAgICAgICAgICAgICBvYmouZmllbGRzW2tdID0gdjtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIFN0cnVjdC50b0pTT04gPSB0b0pTT047XG4gICAgZnVuY3Rpb24gd3JhcChvYmplY3QpIHtcbiAgICAgICAgY29uc3Qgc3RydWN0ID0gY3JlYXRlQmFzZVN0cnVjdCgpO1xuICAgICAgICBpZiAob2JqZWN0ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIE9iamVjdC5rZXlzKG9iamVjdCkuZm9yRWFjaCgoa2V5KSA9PiB7XG4gICAgICAgICAgICAgICAgc3RydWN0LmZpZWxkcy5zZXQoa2V5LCBvYmplY3Rba2V5XSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc3RydWN0O1xuICAgIH1cbiAgICBTdHJ1Y3Qud3JhcCA9IHdyYXA7XG4gICAgZnVuY3Rpb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WNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlU3RydWN0X0ZpZWxkc0VudHJ5KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uua2V5ID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gVmFsdWUudW53cmFwKFZhbHVlLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgIC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zc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBzd2l0Y2ggKG1lc3NhZ2Uua2luZD8uJGNhc2UpIHtcbiAgICAgICAgICAgIGNhc2UgXCJudWxsVmFsdWVcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDgpLmludDMyKG1lc3NhZ2Uua2luZC5udWxsVmFsdWUpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcIm51bWJlclZhbHVlXCI6XG4gICAgICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNykuZG91YmxlKG1lc3NhZ2Uua2luZC5udW1iZXJWYWx1ZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwic3RyaW5nVmFsdWVcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDI2KS5zdHJpbmcobWVzc2FnZS5raW5kLnN0cmluZ1ZhbHVlKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJib29sVmFsdWVcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDMyKS5ib29sKG1lc3NhZ2Uua2luZC5ib29sVmFsdWUpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcInN0cnVjdFZhbHVlXCI6XG4gICAgICAgICAgICAgICAgU3RydWN0LmVuY29kZShTdHJ1Y3Qud3JhcChtZXNzYWdlLmtpbmQuc3RydWN0VmFsdWUpLCB3cml0ZXIudWludDMyKDQyKS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcImxpc3RWYWx1ZVwiOlxuICAgICAgICAgICAgICAgIExpc3RWYWx1ZS5lbmNvZGUoTGlzdFZhbHVlLndyYXAobWVzc2FnZS5raW5kLmxpc3RWYWx1ZSksIHdyaXRlci51aW50MzIoNTApLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgVmFsdWUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VWYWx1ZSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uua2luZCA9IHsgJGNhc2U6IFwibnVsbFZhbHVlXCIsIG51bGxWYWx1ZTogcmVhZGVyLmludDMyKCkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5raW5kID0geyAkY2FzZTogXCJudW1iZXJWYWx1ZVwiLCBudW1iZXJWYWx1ZTogcmVhZGVyLmRvdWJsZSgpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uua2luZCA9IHsgJGNhc2U6IFwic3RyaW5nVmFsdWVcIiwgc3RyaW5nVmFsdWU6IHJlYWRlci5zdHJpbmcoKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmtpbmQgPSB7ICRjYXNlOiBcImJvb2xWYWx1ZVwiLCBib29sVmFsdWU6IHJlYWRlci5ib29sKCkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5raW5kID0geyAkY2FzZTogXCJzdHJ1Y3RWYWx1ZVwiLCBzdHJ1Y3RWYWx1ZTogU3RydWN0LnVud3JhcChTdHJ1Y3QuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5raW5kID0geyAkY2FzZTogXCJsaXN0VmFsdWVcIiwgbGlzdFZhbHVlOiBMaXN0VmFsdWUudW53cmFwKExpc3RWYWx1ZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFZhbHVlLmRlY29kZSA9IGRlY29kZTtcbiAgICBmdW5jdGlvbiBmcm9tSlNPTihvYmplY3QpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGtpbmQ6IGlzU2V0KG9iamVjdC5udWxsVmFsdWUpXG4gICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcIm51bGxWYWx1ZVwiLCBudWxsVmFsdWU6IG51bGxWYWx1ZUZyb21KU09OKG9iamVjdC5udWxsVmFsdWUpIH1cbiAgICAgICAgICAgICAgICA6IGlzU2V0KG9iamVjdC5udW1iZXJWYWx1ZSlcbiAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcIm51bWJlclZhbHVlXCIsIG51bWJlclZhbHVlOiBOdW1iZXIob2JqZWN0Lm51bWJlclZhbHVlKSB9XG4gICAgICAgICAgICAgICAgICAgIDogaXNTZXQob2JqZWN0LnN0cmluZ1ZhbHVlKVxuICAgICAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcInN0cmluZ1ZhbHVlXCIsIHN0cmluZ1ZhbHVlOiBTdHJpbmcob2JqZWN0LnN0cmluZ1ZhbHVlKSB9XG4gICAgICAgICAgICAgICAgICAgICAgICA6IGlzU2V0KG9iamVjdC5ib29sVmFsdWUpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcImJvb2xWYWx1ZVwiLCBib29sVmFsdWU6IEJvb2xlYW4ob2JqZWN0LmJvb2xWYWx1ZSkgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogaXNTZXQob2JqZWN0LnN0cnVjdFZhbHVlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHsgJGNhc2U6IFwic3RydWN0VmFsdWVcIiwgc3RydWN0VmFsdWU6IG9iamVjdC5zdHJ1Y3RWYWx1ZSB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogaXNTZXQob2JqZWN0Lmxpc3RWYWx1ZSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8geyAkY2FzZTogXCJsaXN0VmFsdWVcIiwgbGlzdFZhbHVlOiBbLi4ub2JqZWN0Lmxpc3RWYWx1ZV0gfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiB1bmRlZmluZWQsXG4gICAgICAgIH07XG4gICAgfVxuICAgIFZhbHVlLmZyb21KU09OID0gZnJvbUpTT047XG4gICAgZnVuY3Rpb24gdG9KU09OKG1lc3NhZ2UpIHtcbiAgICAgICAgY29uc3Qgb2JqID0ge307XG4gICAgICAgIG1lc3NhZ2Uua2luZD8uJGNhc2UgPT09IFwibnVsbFZhbHVlXCIgJiZcbiAgICAgICAgICAgIChvYmoubnVsbFZhbHVlID0gbWVzc2FnZS5raW5kPy5udWxsVmFsdWUgIT09IHVuZGVmaW5lZCA/IG51bGxWYWx1ZVRvSlNPTihtZXNzYWdlLmtpbmQ/Lm51bGxWYWx1ZSkgOiB1bmRlZmluZWQpO1x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ICAgICAgbWVzc2FnZS52YWx1ZXMucHVzaChWYWx1ZS51bndyYXAoVmFsdWUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIExpc3RWYWx1ZS5kZWNvZGUgPSBkZWNvZGU7XG4gICAgZnVuY3Rpb24gZnJvbUpTT04ob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiB7IHZhbHVlczogQXJyYXkuaXNBcnJheShvYmplY3Q/LnZhbHVlcykgPyBbLi4ub2JqZWN0LnZhbHVlc10gOiBbXSB9O1xuICAgIH1cbiAgICBMaXN0VmFsdWUuZnJvbUpTT04gPSBmcm9tSlNPTjtcbiAgICBmdW5jdGlvbiB0b0pTT04obWVzc2FnZSkge1xuICAgICAgICBjb25zdCBvYmogPSB7fTtcbiAgICAgICAgaWYgKG1lc3NhZ2UudmFsdWVzKSB7XG4gICAgICAgICAgICBvYmoudmFsdWVzID0gbWVzc2FnZS52YWx1ZXMubWFwKChlKSA9PiBlKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIG9iai52YWx1ZXMgPSBbXTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gb2JqO1xuICAgIH1cbiAgICBMaXN0VmFsdWUudG9KU09OID0gdG9KU09OO1xuICAgIGZ1bmN0aW9uIHdyYXAoYXJyYXkpIHtcbiAgICAgICAgY29uc3QgcmVzdWx0ID0gY3JlYXRlQmFzZUxpc3RWYWx1ZSgpO1xuICAgICAgICByZXN1bHQ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3QgY3ViZWQgPSBhbW91bnQgKiBzcXVhcmVkO1xuICAgICAgICBjb25zdCB4ID0gMC41ICpcbiAgICAgICAgICAgICgyLjAgKiB2YWx1ZTIueCArXG4gICAgICAgICAgICAgICAgKC12YWx1ZTEueCArIHZhbHVlMy54KSAqIGFtb3VudCArXG4gICAgICAgICAgICAgICAgKDIuMCAqIHZhbHVlMS54IC0gNS4wICogdmFsdWUyLnggKyA0LjAgKiB2YWx1ZTMueCAtIHZhbHVlNC54KSAqXG4gICAgICAgICAgICAgICAgICAgIHNxdWFyZWQgK1xuICAgICAgICAgICAgICAgICgtdmFsdWUxLnggKyAzLjAgKiB2YWx1ZTIueCAtIDMuMCAqIHZhbHVlMy54ICsgdmFsdWU0LngpICogY3ViZWQpO1xuICAgICAgICBjb25zdCB5ID0gMC41ICpcbiAgICAgICAgICAgICgyLjAgKiB2YWx1ZTIueSArXG4gICAgICAgICAgICAgICAgKC12YWx1ZTEueSArIHZhbHVlMy55KSAqIGFtb3VudCArXG4gICAgICAgICAgICAgICAgKDIuMCAqIHZhbHVlMS55IC0gNS4wICogdmFsdWUyLnkgKyA0LjAgKiB2YWx1ZTMueSAtIHZhbHVlNC55KSAqXG4gICAgICAgICAgICAgICAgICAgIHNxdWFyZWQgK1xuICAgICAgICAgICAgICAgICgtdmFsdWUxLnkgKyAzLjAgKiB2YWx1ZTIueSAtIDMuMCAqIHZhbHVlMy55ICsgdmFsdWU0LnkpICogY3ViZWQpO1xuICAgICAgICBjb25zdCB6ID0gMC41ICpcbiAgICAgICAgICAgICgyLjAgKiB2YWx1ZTIueiArXG4gICAgICAgICAgICAgICAgKC12YWx1ZTEueiArIHZhbHVlMy56KSAqIGFtb3VudCArXG4gICAgICAgICAgICAgICAgKDIuMCAqIHZhbHVlMS56IC0gNS4wICogdmFsdWUyLnogKyA0LjAgKiB2YWx1ZTMueiAtIHZhbHVlNC56KSAqXG4gICAgICAgICAgICAgICAgICAgIHNxdWFyZWQgK1xuICAgICAgICAgICAgIC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bVBvaW50cyhwb2ludDEsIHBvaW50MiwgcG9pbnQzKSB7XG4gICAgICAgIGNvbnN0IHgxID0gcG9pbnQyLnggLSBwb2ludDEueDtcbiAgICAgICAgY29uc3QgeTEgPSBwb2ludDIueSAtIHBvaW50MS55O1xuICAgICAgICBjb25zdCB6MSA9IHBvaW50Mi56IC0gcG9pbnQxLno7XG4gICAgICAgIGNvbnN0IHgyID0gcG9pbnQzLnggLSBwb2ludDEueDtcbiAgICAgICAgY29uc3QgeTIgPSBwb2ludDMueSAtIHBvaW50MS55O1xuICAgICAgICBjb25zdCB6MiA9IHBvaW50My56IC0gcG9pbnQxLno7XG4gICAgICAgIGNvbnN0IHl6ID0geTEgKiB6MiAtIHoxICogeTI7XG4gICAgICAgIGNvbnN0IHh6ID0gejEgKiB4MiAtIHgxICogejI7XG4gICAgICAgIGNvbnN0IHh5ID0geDEgKiB5MiAtIHkxICogeDI7XG4gICAgICAgIGNvbnN0IHB5dGggPSBNYXRoLnNxcnQoeXogKiB5eiArIHh6ICogeHogKyB4eSAqIHh5KTtcbiAgICAgICAgbGV0IGludlB5dGg7XG4gICAgICAgIGlmIChweXRoICE9PSAwKSB7XG4gICAgICAgICAgICBpbnZQeXRoID0gMS4wIC8gcHl0aDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGludlB5dGggPSAwLjA7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3Qgbm9ybWFsID0gVmVjdG9yMy5jcmVhdGUoeXogKiBpbnZQeXRoLCB4eiAqIGludlB5dGgsIHh5ICogaW52UHl0aCk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBub3JtYWwsXG4gICAgICAgICAgICBkOiAtKG5vcm1hbC54ICogcG9pbnQxLnggKyBub3JtYWwueSAqIHBvaW50MS55ICsgbm9ybWFsLnogKiBwb2ludDEueilcbiAgICAgICAgfTtcbiAgICB9XG4gICAgUGxhbmUuY29weUZyb21Qb2ludHMgPSBjb3B5RnJv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gICAgICBzZWxmLmlzSWRlbnRpdHkgPSBmYWxzZTtcbiAgICAgICAgc2VsZi5pc0lkZW50aXR5M3gyID0gZmFsc2U7XG4gICAgICAgIHNlbGYuX2lzSWRlbnRpdHlEaXJ0eSA9IHRydWU7XG4gICAgICAgIHNlbGYuX2lzSWRlbnRpdHkzeDJEaXJ0eSA9IHRydWU7XG4gICAgfVxuICAgIC8vIFByb3BlcnRpZXNcbiAgICAvKipcbiAgICAgKiBDaGVjayBpZiB0aGUgY3VycmVudCBtYXRyaXggaXMgaWRlbnRpdHlcbiAgICAgKiBAcmV0dXJucyB0cnVlIGlzIHRoZSBtYXRyaXggaXMgdGhlIGlkZW50aXR5IG1hdHJpeFxuICAgICAqL1xuICAgIGZ1bmN0aW9uIGlzSWRlbnRpdHlVcGRhdGUoc2VsZikge1xuICAgICAgICBpZiAoc2VsZi5faXNJZGVudGl0eURpcnR5KSB7XG4gICAgICAgICAgICBzZWxmLl9pc0lkZW50aXR5RGlydHkgPSBmYWxzZTtcbiAgICAgICAgICAgIGNvbnN0IG0gPSBzZWxmLl9tO1xuICAgICAgICAgICAgc2VsZi5pc0lkZW50aXR5ID1cbiAgICAgICAgICAgICAgICBtWzBdID09PSAxLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVsxXSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bMl0gPT09IDAuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzNdID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVs0XSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bNV0gPT09IDEuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzZdID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVs3XSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bOF0gPT09IDAuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzldID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVsxMF0gPT09IDEuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzExXSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bMTJdID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVsxM10gPT09IDAuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzE0XSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bMTVdID09PSAxLjA7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHNlbGYuaXNJZGVudGl0eTtcbiAgICB9XG4gICAgTWF0cml4LmlzSWRlbnRpdHlVcGRhdGUgPSBpc0lkZW50aXR5VXBkYXRlO1xuICAgIC8qKlxuICAgICAqIENoZWNrIGlmIHRoZSBjdXJyZW50IG1hdHJpeCBpcyBpZGVudGl0eSBhcyBhIHRleHR1cmUgbWF0cml4ICgzeDIgc3RvcmUgaW4gNHg0KVxuICAgICAqIEByZXR1cm5zIHRydWUgaXMgdGhlIG1hdHJpeCBpcyB0aGUgaWRlbnRpdHkgbWF0cml4XG4gICAgICovXG4gICAgZnVuY3Rpb24gaXNJZGVudGl0eUFzM3gyVXBkYXRlKHNlbGYpIHtcbiAgICAgICAgaWYgKHNlbGYuX2lzSWRlbnRpdHkzeDJEaXJ0eSkge1xuICAgICAgICAgICAgc2VsZi5faXNJZGVudGl0eTN4MkRpcnR5ID0gZmFsc2U7XG4gICAgICAgICAgICBpZiAoc2VsZi5fbVswXSAhPT0gMS4wIHx8IHNlbGYuX21bNV0gIT09IDEuMCB8fCBzZWxmLl9tWzE1XSAhPT0gMS4wKSB7XG4gICAgICAgICAgICAgICAgc2VsZi5pc0lkZW50aXR5M3gyID0gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChzZWxmLl9tWzFdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzJdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzNdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzRdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzZdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzddICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzhdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzldICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzEwXSAhPT0gMC4wIHx8XG4gICAgICAgICAgICAgICAgc2VsZi5fbVsxMV0gIT09IDAuMCB8fFxuICAgICAgICAgICAgICAgIHNlbGYuX21bMTJdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzEzXSAhPT0gMC4wIHx8XG4gICAgICAgICAgICAgICAgc2VsZi5fbVsxNF0gIT09IDAuMCkge1xuICAgICAgICAgICAgICAgIHNlbGYuaXNJZGVudGl0eTN4MiA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgc2VsZi5pc0lkZW50aXR5M3gyID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc2VsZi5pc0lkZW50aXR5M3gyO1xuICAgIH1cbiAgICBNYXRyaXguaXNJZGVudGl0eUFzM3gyVXBkYXRlID0gaXNJZGVudGl0eUFzM3gyVXBkYXRlO1xuICAgIC8qKlxuICAgICAqIEdldHMgdGhlIGRldGVybWluYW50IG9mIHRoZSBtYXRyaXhcbiAgICAgKiBAcmV0dXJucyB0aGUgbWF0cml4IGRldGVybWluYW50XG4gICAgICovXG4gICAgZnVuY3Rpb24gZGV0ZXJtaW5hbnQoc2VsZikge1xuICAgICAgICBpZiAoc2VsZi5pc0lkZW50aXR5ID09PSB0cnVlKSB7XG4gICAgICAgICAgICByZXR1cm4gMT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ICogZGV0XzIwXzMxKTtcbiAgICAgICAgY29uc3QgZGV0ID0gbTAwICogY29mYWN0XzAwICsgbTAxICogY29mYWN0XzAxICsgbTAyICogY29mYWN0XzAyICsgbTAzICogY29mYWN0XzAzO1xuICAgICAgICBpZiAoZGV0ID09PSAwKSB7XG4gICAgICAgICAgICBjb3B5KHNvdXJjZSwgcmVzdWx0KTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBkZXRJbnYgPSAxIC8gZGV0O1xuICAgICAgICBjb25zdCBkZXRfMTJfMzMgPSBtMTIgKiBtMzMgLSBtMzIgKiBtMTM7XG4gICAgICAgIGNvbnN0IGRldF8xMV8zMyA9IG0xMSAqIG0zMyAtIG0zMSAqIG0xMztcbiAgICAgICAgY29uc3QgZGV0XzExXzMyID0gbTExICogbTMyIC0gbTMxICogbTEyO1xuICAgICAgICBjb25zdCBkZXRfMTBfMzMgPSBtMTAgKiBtMzMgLSBtMzAgKiBtMTM7XG4gICAgICAgIGNvbnN0IGRldF8xMF8zMiA9IG0xMCAqIG0zMiAtIG0zMCAqIG0xMjtcbiAgICAgICAgY29uc3QgZGV0XzEwXzMxID0gbTEwICogbTMxIC0gbTMwICogbTExO1xuICAgICAgICBjb25zdCBkZXRfMTJfMjMgPSBtMTIgKiBtMjMgLSBtMjIgKiBtMTM7XG4gICAgICAgIGNvbnN0IGRldF8xMV8yMyA9IG0xMSAqIG0yMyAtIG0yMSAqIG0xMztcbiAgICAgICAgY29uc3QgZGV0XzExXzIyID0gbTExICogbTIyIC0gbTIxICogbTEyO1xuICAgICAgICBjb25zdCBkZXRfMTBfMjMgPSBtMTAgKiBtMjMgLSBtMjAgKiBtMTM7XG4gICAgICAgIGNvbnN0IGRldF8xMF8yMiA9IG0xMCAqIG0yMiAtIG0yMCAqIG0xMjtcbiAgICAgICAgY29uc3QgZGV0XzEwXzIxID0gbTEwICogbTIxIC0gbTIwICogbTExO1xuICAgICAgICBjb25zdCBjb2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zdCBvbTggPSBvdGhlck1bOF0sIG9tOSA9IG90aGVyTVs5XSwgb20xMCA9IG90aGVyTVsxMF0sIG9tMTEgPSBvdGhlck1bMTFdO1xuICAgICAgICBjb25zdCBvbTEyID0gb3RoZXJNWzEyXSwgb20xMyA9IG90aGVyTVsxM10sIG9tMTQgPSBvdGhlck1bMTRdLCBvbTE1ID0gb3RoZXJNWzE1XTtcbiAgICAgICAgLy8gdHNsaW50OmVuYWJsZTpvbmUtdmFyaWFibGUtcGVyLWRlY2xhcmF0aW9uXG4gICAgICAgIHJlc3VsdFtvZmZzZXRdID0gdG0wICogb20wICsgdG0xICogb200ICsgdG0yICogb204ICsgdG0zICogb20xMjtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDFdID0gdG0wICogb20xICsgdG0xICogb201ICsgdG0yICogb205ICsgdG0zICogb20xMztcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDJdID0gdG0wICogb20yICsgdG0xICogb202ICsgdG0yICogb20xMCArIHRtMyAqIG9tMTQ7XG4gICAgICAgIHJlc3VsdFtvZmZzZXQgKyAzXSA9IHRtMCAqIG9tMyArIHRtMSAqIG9tNyArIHRtMiAqIG9tMTEgKyB0bTMgKiBvbTE1O1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgNF0gPSB0bTQgKiBvbTAgKyB0bTUgKiBvbTQgKyB0bTYgKiBvbTggKyB0bTcgKiBvbTEyO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgNV0gPSB0bTQgKiBvbTEgKyB0bTUgKiBvbTUgKyB0bTYgKiBvbTkgKyB0bTcgKiBvbTEzO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgNl0gPSB0bTQgKiBvbTIgKyB0bTUgKiBvbTYgKyB0bTYgKiBvbTEwICsgdG03ICogb20xNDtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDddID0gdG00ICogb20zICsgdG01ICogb203ICsgdG02ICogb20xMSArIHRtNyAqIG9tMTU7XG4gICAgICAgIHJlc3VsdFtvZmZzZXQgKyA4XSA9IHRtOCAqIG9tMCArIHRtOSAqIG9tNCArIHRtMTAgKiBvbTggKyB0bTExICogb20xMjtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDldID0gdG04ICogb20xICsgdG05ICogb201ICsgdG0xMCAqIG9tOSArIHRtMTEgKiBvbTEzO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgMTBdID0gdG04ICogb20yICsgdG05ICogb202ICsgdG0xMCAqIG9tMTAgKyB0bTExICogb20xNDtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDExXSA9IHRtOCAqIG9tMyArIHRtOSAqIG9tNyArIHRtMTAgKiBvbTExICsgdG0xMSAqIG9tMTU7XG4gICAgICAgIHJlc3VsdFtvZmZzZXQgKyAxMl0gPSB0bTEyICogb20wICsgdG0xMyAqIG9tNCArIHRtMTQgKiBvbTggKyB0bTE1ICogb20xMjtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDEzXSA9IHRtMTIgKiBvbTEgKyB0bTEzICogb201ICsgdG0xNCAqIG9tOSArIHRtMTUgKiBvbTEzO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgMTRdID0gdG0xMiAqIG9tMiArIHRtMTMgKiBvbTYgKyB0bTE0ICogb20xMCArIHRtMTUgKiBvbTE0O1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgMTVdID0gdG0xMiAqIG9tMyArIHRtMTMgKiBvbTcgKyB0bTE0ICogb20xMSArIHRtMTUgKiBvbTE1O1xuICAgIH1cbiAgICBNYXRyaXgubXVsdGlwbHlUb0FycmF5ID0gbXVsdGlwbHlUb0FycmF5O1xuICAgIC8qKlxuICAgICAqIENoZWNrIGVxdWFsaXR5IGJldHdlZW4gc2VsZiBtYXRyaXggYW5kIGEgc2Vjb25kIG9uZVxuICAgICAqIEBwYXJhbSB2YWx1ZSAtIGRlZmluZXMgdGhlIHNlY29uZCBtYXRyaXggdG8gY29tcGFyZVxuICAgICAqIEByZXR1cm5zIHRydWUgaXMgdGhlIGN1cnJlbnQgbWF0cml4IGFuZCB0aGUgZ2l2ZW4gb25lIHZhbHVlcyBhcmUgc3RyaWN0bHkgZXF1YWxcbiAgICAgKi9cbiAgICBmdW5jdGlvbiBlcXVhbHMoc2VsZiwgdmFsdWUpIHtcbiAgICAgICAgY29uc3Qgb3RoZXIgPSB2YWx1ZTtcbiAgICAgICAgaWYgKCFvdGhlcikge1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgICAgIGlmIChzZWxmLmlzSWRlbnRpdHkgfHwgb3RoZXIuaXNJZGVudGl0eSkge1xuICAgICAgICAgICAgaWYgKCFzZWxmLl9pc0lkZW50aXR5RGlydHkgJiYgIW90aGVyLl9pc0lkZW50aXR5RGlydHkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gc2VsZi5pc0lkZW50aXR5ICYmIG90aGVyLmlzSWRlbnRpdHk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgbSA9IHNlbGYuX207XG4gICAgICAgIGNvbnN0IG9tID0gb3RoZXIuX207XG4gICAgICAgIHJldHVybiAobVswXSA9PT0gb21bMF0gJiZcbiAgICAgICAgICAgIG1bMV0gPT09IG9tWzFdICYmXG4gICAgICAgICAgICBtWzJdID09PSBvbVsyXSAmJlxuICAgICAgICAgICAgbVszXSA9PT0gb21bM10gJiZcbiAgICAgICAgICAgIG1bNF0gPT09IG9tWzRdICYmXG4gICAgICAgICAgICBtWzVdID09PSBvbVs1XSAmJlxuICAgICAgICAgICAgbVs2XSA9PT0gb21bNl0gJiZcbiAgICAgICAgICAgIG1bN10gPT09IG9tWzddICYmXG4gICAgICAgICAgICBtWzhdID09PSBvbVs4XSAmJlxuICAgICAgICAgICAgbVs5XSA9PT0gb21bOV0gJiZcbiAgICAgICAgICAgIG1bMTBdID09PSBvbVsxMF0gJiZcbiAgICAgICAgICAgIG1bMTFdID09PSBvbVsxMV0gJiZcbiAg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DA7XG4gICAgICAgICAgICAgICAgcm90YXRpb24ueiA9IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBtID0gc2VsZi5fbTtcbiAgICAgICAgaWYgKHRyYW5zbGF0aW9uKSB7XG4gICAgICAgICAgICB0cmFuc2xhdGlvbi54ID0gbVsxMl07XG4gICAgICAgICAgICB0cmFuc2xhdGlvbi55ID0gbVsxM107XG4gICAgICAgICAgICB0cmFuc2xhdGlvbi56ID0gbVsxNF07XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgdXNlZFNjYWxlID0gc2NhbGUgfHwgVmVjdG9yMy5aZXJvKCk7XG4gICAgICAgIHVzZWRTY2FsZS54ID0gTWF0aC5zcXJ0KG1bMF0gKiBtWzBdICsgbVsxXSAqIG1bMV0gKyBtWzJdICogbVsyXSk7XG4gICAgICAgIHVzZWRTY2FsZS55ID0gTWF0aC5zcXJ0KG1bNF0gKiBtWzRdICsgbVs1XSAqIG1bNV0gKyBtWzZdICogbVs2XSk7XG4gICAgICAgIHVzZWRTY2FsZS56ID0gTWF0aC5zcXJ0KG1bOF0gKiBtWzhdICsgbVs5XSAqIG1bOV0gKyBtWzEwXSAqIG1bMTBdKTtcbiAgICAgICAgaWYgKGRldGVybWluYW50KHNlbGYpIDw9IDApIHtcbiAgICAgICAgICAgIHVzZWRTY2FsZS55ICo9IC0xO1xuICAgICAgICB9XG4gICAgICAgIGlmICh1c2VkU2NhbGUueCA9PT0gMCB8fCB1c2VkU2NhbGUueSA9PT0gMCB8fCB1c2VkU2NhbGUueiA9PT0gMCkge1xuICAgICAgICAgICAgaWYgKHJvdGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgcm90YXRpb24udyA9IDE7XG4gICAgICAgICAgICAgICAgcm90YXRpb24ueCA9IDA7XG4gICAgICAgICAgICAgICAgcm90YXRpb24ueSA9IDA7XG4gICAgICAgICAgICAgICAgcm90YXRpb24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vcjMubm9ybWFsaXplKGZvcndhcmQpO1xuICAgICAgICBjb25zdCByaWdodCA9IFZlY3RvcjMubm9ybWFsaXplKFZlY3RvcjMuY3Jvc3ModXAsIGZvcndhcmROZXcpKTtcbiAgICAgICAgY29uc3QgdXBOZXcgPSBWZWN0b3IzLmNyb3NzKGZvcndhcmROZXcsIHJpZ2h0KTtcbiAgICAgICAgY29uc3QgbTAwID0gcmlnaHQueDtcbiAgICAgICAgY29uc3QgbTAxID0gcmlnaHQueTtcbiAgICAgICAgY29uc3QgbTAyID0gcmlnaHQuejtcbiAgICAgICAgY29uc3QgbTEwID0gdXBOZXcueDtcbiAgICAgICAgY29uc3QgbTExID0gdXBOZXcueTtcbiAgICAgICAgY29uc3QgbTEyID0gdXBOZXcuejtcbiAgICAgICAgY29uc3QgbTIwID0gZm9yd2FyZE5ldy54O1xuICAgICAgICBjb25zdCBtMjEgPSBmb3J3YXJkTmV3Lnk7XG4gICAgICAgIGNvbnN0IG0yMiA9IGZvcndhcmROZXcuejtcbiAgICAgICAgY29uc3QgbnVtOCA9IG0wMCArIG0xMSArIG0yMjtcbiAgICAgICAgY29uc3QgcXVhdGVybmlvbiA9IGNyZWF0ZSgpO1xuICAgICAgICBpZiAobnVtOCA+IDApIHtcbiAgICAgICAgICAgIGxldCBudW0gPSBNYXRoLnNxcnQobnVtOCArIDEpO1xuICAgICAgICAgICAgcXVhdGVybmlvbi53ID0gbnVtICogMC41O1xuICAgICAgICAgICAgbnVtID0gMC41IC8gbnVtO1xuICAgICAgICAgICAgcXVhdGVybmlvbi54ID0gKG0xMiAtIG0yMSkgKiBudW07XG4gICAgICAgICAgICBxdWF0ZXJuaW9uLnkgPSAobTIwIC0gbTAyKSAqIG51bTtcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueiA9IChtMDEgLSBtMTApICogbnVtO1xuICAgICAgICAgICAgcmV0dXJuIHF1YXRlcm5pb247XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG0wMCA+PSBtMTEgJiYgbTAwID49IG0yMikge1xuICAgICAgICAgICAgY29uc3QgbnVtNyA9IE1hdGguc3FydCgxICsgbTAwIC0gbTExIC0gbTIyKTtcbiAgICAgICAgICAgIGNvbnN0IG51bTQgPSAwLjUgLyBudW03O1xuICAgICAgICAgICAgcXVhdGVybmlvbi54ID0gMC41ICogbnVtNztcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueSA9IChtMDEgKyBtMTApICogbnVtNDtcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueiA9IChtMDIgKyBtMjApICogbnVtNDtcbiAgICAgICAgICAgIHF1YXRlcm5pb24udyA9IChtMTIgLSBtMjEpICogbnVtNDtcbiAgICAgICAgICAgIHJldHVybiBxdWF0ZXJuaW9uO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtMTEgPiBtMjIpIHtcbiAgICAgICAgICAgIGNvbnN0IG51bTYgPSBNYXRoLnNxcnQoMSArIG0xMSAtIG0wMCAtIG0yMik7XG4gICAgICAgICAgICBjb25zdCBudW0zID0gMC41IC8gbnVtNjtcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueCA9IChtMTAgKyBtMDEpICogbnVtMztcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueSA9IDAuNSAqIG51bTY7XG4gICAgICAgICAgICBxdWF0ZXJuaW9uLnogPSAobTIxICsgbTEyKSAqIG51bTM7XG4gICAgICAgICAgICBxdWF0ZXJuaW9uLncgPSAobTIwIC0gbTAyKSAqIG51bTM7XG4gICAgICAgICAgICByZXR1cm4gcXVhdGVybmlvbjtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBudW01ID0gTWF0aC5zcXJ0KDEgKyBtMjIgLSBtMDAgLSBtMTEpO1xuICAgICAgICBjb25zdCBudW0yID0gMC41IC8gbnVtNTtcbiAgICAgICAgcXVhdGVybmlvbi54ID0gKG0yMCArIG0wMikgKiBudW0yO1xuICAgICAgICBxdWF0ZXJuaW9uLnkgPSAobTIxICsgbTEyKSAqIG51bTI7XG4gICAgIC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cS56ICogcS56ICsgcS53ICogcS53O1xuICAgICAgICAvLyBxIHdpbGwgaGF2ZSBhIG1hZ25pdHVkZSBvZiAwLjUgb3IgZ3JlYXRlciBpZiBhbmQgb25seSBpZiBxIGlzIGEgc2luZ3VsYXJpdHkgY2FzZVxuICAgICAgICBjb25zdCB0ZXN0ID0gcS54ICogcS53IC0gcS55ICogcS56O1xuICAgICAgICBpZiAodGVzdCA+IDAuNDk5NSAqIHVuaXQpIHtcbiAgICAgICAgICAgIC8vIHNpbmd1bGFyaXR5IGF0IG5vcnRoIHBvbGVcbiAgICAgICAgICAgIG91dC54ID0gTWF0aC5QSSAvIDI7XG4gICAgICAgICAgICBvdXQueSA9IDIgKiBNYXRoLmF0YW4yKHEueSwgcS54KTtcbiAgICAgICAgICAgIG91dC56ID0gMDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICh0ZXN0IDwgLTAuNDk5NSAqIHVuaXQpIHtcbiAgICAgICAgICAgIC8vIHNpbmd1bGFyaXR5IGF0IHNvdXRoIHBvbGVcbiAgICAgICAgICAgIG91dC54ID0gLU1hdGguUEkgLyAyO1xuICAgICAgICAgICAgb3V0LnkgPSAtMiAqIE1hdGguYXRhbjIocS55LCBxLngpO1xuICAgICAgICAgICAgb3V0LnogPSAwO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgLy8gbm8gc2luZ3VsYXJpdHkgLSBxIGlzIHRoZSBtYWpvcml0eSBvZiBjYXNlc1xuICAgICAgICAgICAgb3V0LnggPSBNYXRoLmFzaW4oMiAqIChxLncgKiBxLnggLSBxLnkgKiBxLnopKTtcbiAgICAgICAgICAgIG91dC55ID0gTWF0aC5hdGFuMigyICogcS53ICogcS55ICsgMiAqIHEueiAqIHEueCwgMSAtIDIgKiAocS54ICogcS54ICsgcS55ICogcS55KSk7XG4gICAgICAgICAgICBvdXQueiA9IE1hdGguYXRhbjIoMiAqIHEudyAqIHEueiArIDIgKiBxLnggKiBxLnksIDEg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yLjAgKiBNYXRoLnNxcnQoMS4wICsgbTExIC0gbTIyIC0gbTMzKTtcbiAgICAgICAgICAgIHJlc3VsdC53ID0gKG0zMiAtIG0yMykgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnggPSAwLjI1ICogcztcbiAgICAgICAgICAgIHJlc3VsdC55ID0gKG0xMiArIG0yMSkgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnogPSAobTEzICsgbTMxKSAvIHM7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSBpZiAobTIyID4gbTMzKSB7XG4gICAgICAgICAgICBzID0gMi4wICogTWF0aC5zcXJ0KDEuMCArIG0yMiAtIG0xMSAtIG0zMyk7XG4gICAgICAgICAgICByZXN1bHQudyA9IChtMTMgLSBtMzEpIC8gcztcbiAgICAgICAgICAgIHJlc3VsdC54ID0gKG0xMiArIG0yMSkgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnkgPSAwLjI1ICogcztcbiAgICAgICAgICAgIHJlc3VsdC56ID0gKG0yMyArIG0zMikgLyBzO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgcyA9IDIuMCAqIE1hdGguc3FydCgxLjAgKyBtMzMgLSBtMTEgLSBtMjIpO1xuICAgICAgICAgICAgcmVzdWx0LncgPSAobTIxIC0gbTEyKSAvIHM7XG4gICAgICAgICAgICByZXN1bHQueCA9IChtMTMgKyBtMzEpIC8gcztcbiAgICAgICAgICAgIHJlc3VsdC55ID0gKG0yMyArIG0zMikgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnogPSAwLjI1ICogcztcbiAgICAgICAgfVxuICAgIH1cbiAgICBRdWF0ZXJuaW9uLmZyb21Sb3RhdGlvbk1hdHJpeFRvUmVmID0gZnJvbVJvdGF0aW9uTWF0cml4VG9SZWY7XG4gICAgLyoqXG4gICAgICogSW50ZXJwb2xhdGVzIGJldHdlZW4gdHdvIHF1YXRlcm5pb25zXG4gICAgICogQHBhcmFtIGxlZnQgLSB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qIHJpZ2h0LnggKyBsZWZ0LnkgKiByaWdodC55ICsgbGVmdC56ICogcmlnaHQueiArIGxlZnQudyAqIHJpZ2h0Lnc7XG4gICAgICAgIGxldCBmbGFnID0gZmFsc2U7XG4gICAgICAgIGlmIChudW00IDwgMCkge1xuICAgICAgICAgICAgZmxhZyA9IHRydWU7XG4gICAgICAgICAgICBudW00ID0gLW51bTQ7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG51bTQgPiAwLjk5OTk5OSkge1xuICAgICAgICAgICAgbnVtMyA9IDEgLSBhbW91bnQ7XG4gICAgICAgICAgICBudW0yID0gZmxhZyA/IC1hbW91bnQgOiBhbW91bnQ7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBjb25zdCBudW01ID0gTWF0aC5hY29zKG51bTQpO1xuICAgICAgICAgICAgY29uc3QgbnVtNiA9IDEuMCAvIE1hdGguc2luKG51bTUpO1xuICAgICAgICAgICAgbnVtMyA9IE1hdGguc2luKCgxLjAgLSBhbW91bnQpICogbnVtNSkgKiBudW02O1xuICAgICAgICAgICAgbnVtMiA9IGZsYWdcbiAgICAgICAgICAgICAgICA/IC1NYXRoLnNpbihhbW91bnQgKiBudW01KSAqIG51bTZcbiAgICAgICAgICAgICAgICA6IE1hdGguc2luKGFtb3VudCAqIG51bTUpICogbnVtNjtcbiAgICAgICAgfVxuICAgICAgICByZXN1bHQueCA9IG51bTMgKiBsZWZ0LnggKyBudW0yICogcmlnaHQueDtcbiAgICAgICAgcmVzdWx0LnkgPSBudW0zICogbGVmdC55ICsgbnVtMiAqIHJpZ2h0Lnk7XG4gICAgICAgIHJlc3VsdC56ID0gbnVtMyAqIGxlZnQueiArIG51bTIgKiByaWdodC56O1xuICAgICAgICByZXN1bHQudyA9IG51bTMgKiBsZWZ0LncgKyBudW0yICogcmlnaHQudztcbiAgICB9XG4gICAgUXVhdGVybmlvbi5zbGVycFRvUmVmID0gc2xlcnBUb1JlZjtcbiAgICAvKipcbi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TdHJpbmcodmFsdWUpIHtcbiAgICAgICAgY29uc3QgaW50UiA9ICh2YWx1ZS5yICogMjU1KSB8IDA7XG4gICAgICAgIGNvbnN0IGludEcgPSAodmFsdWUuZyAqIDI1NSkgfCAwO1xuICAgICAgICBjb25zdCBpbnRCID0gKHZhbHVlLmIgKiAyNTUpIHwgMDtcbiAgICAgICAgY29uc3QgaW50QSA9ICh2YWx1ZS5hICogMjU1KSB8IDA7XG4gICAgICAgIHJldHVybiAoJyMnICtcbiAgICAgICAgICAgIFNjYWxhci50b0hleChpbnRSKSArXG4gICAgICAgICAgICBTY2FsYXIudG9IZXgoaW50RykgK1xuICAgICAgICAgICAgU2NhbGFyLnRvSGV4KGludEIpICtcbiAgICAgICAgICAgIFNjYWxhci50b0hleChpbnRBKSk7XG4gICAgfVxuICAgIENvbG9yNC50b0hleFN0cmluZyA9IHRvSGV4U3RyaW5nO1xuICAgIC8qKlxuICAgICAqIENvbXB1dGVzIGEgQ29sb3I0IGNvbnZlcnRlZCBmcm9tIHRoZSBjdXJyZW50IG9uZSB0byBsaW5lYXIgc3BhY2VcbiAgICAgKiBAcmV0dXJucyBjcmVhdGUgbXV0YWJsZSBDb2xvcjRcbiAgICAgKi9cbiAgICBmdW5jdGlvbiB0b0xpbmVhclNwYWNlKHZhbHVlKSB7XG4gICAgICAgIGNvbnN0IGNvbnZlcnRlZENvbG9yID0gY3JlYXRlKCk7XG4gICAgICAgIHRvTGluZWFyU3BhY2VUb1JlZih2YWx1ZSwgY29udmVydGVkQ29sb3IpO1xuICAgICAgICByZXR1cm4gY29udmVydGVkQ29sb3I7XG4gICAgfVxuICAgIENvbG9yNC50b0xpbmVhclNwYWNlID0gdG9MaW5lYXJTcGFjZTtcbiAgICAvKipcbiAgICAgKiBDb252ZXJ0cyB0aGUgQ29sb3I0IHZhbHVlcyB0byBsaW5lYXIgc3BhY2UgYW5kIHN0b3JlcyB0aGUgcmVzdWx0IGluIFwiY29udmVydGVkQ29sb3JcIlxuICAgICAq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gPj0gcGF0aC5zZWdtZW50VGltZXNbcGF0aC5jdXJyZW50SW5kZXhdICYmXG4gICAgICAgIHBhdGguY3VycmVudEluZGV4IDwgcGF0aC5wb2ludHMubGVuZ3RoIC0gMVxuICAgICAgKSB7XG4gICAgICAgIGlmIChwYXRoLmZhY2VEaXJlY3Rpb24pIHtcbiAgICAgICAgICBjb25zdCBkaXJlY3Rpb24gPSBWZWN0b3IzLnN1YnRyYWN0KHBhdGgucG9pbnRzW3BhdGguY3VycmVudEluZGV4ICsgMV0sIHBhdGgucG9pbnRzW3BhdGguY3VycmVudEluZGV4XSlcbiAgICAgICAgICB0cmFuc2Zvcm0ucm90YXRpb24gPSBRdWF0ZXJuaW9uLmxvb2tSb3RhdGlvbihkaXJlY3Rpb24pXG4gICAgICAgIH1cbiAgICAgICAgaWYgKHBhdGguY3VycmVudEluZGV4ID4gMCAmJiBwYXRoLmN1cnJlbnRJbmRleCAlIHBhdGguY3VydmVTZWdtZW50Q291bnQgPT0gMCkge1xuICAgICAgICAgIGNvbnN0IHBvaW50SW5kZXggPSBwYXRoLmN1cnJlbnRJbmRleCAvIHBhdGguY3VydmVTZWdtZW50Q291bnRcbiAgICAgICAgICBjb25zdCBwb2ludENvb3JkcyA9IHBhdGgucG9pbnRzW3BhdGguY3VycmVudEluZGV4XVxuICAgICAgICAgIGNvbnN0IG5leHRQb2ludENvb3JkcyA9IHBhdGgucG9pbnRzW3BhdGguY3VycmVudEluZGV4ICsgcGF0aC5jdXJ2ZVNlZ21lbnRDb3VudF1cbiAgICAgICAgICBwb2ludFJlYWNoZWRQYXRocy5wdXNoKHtlbnRpdHk6IGVudGl0eSwgaW5kZXg6IHBvaW50SW5kZXgsIGNvb3JkczogcG9pbnRDb29yZHMsIG5leHRDb29yZHM6IG5leHRQb2ludENvb3Jkc30pXG4gICAgICAgIH1cbiAgICAgICAgcGF0aC5jdXJyZW50SW5kZXggKz0gMVxuICAgICAgfVxuXG4gICAgICBjb25zdCB0aW1lRGlmZiA9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xldGUnIHx8ICF1cGRhdGUucHJvcHMpIHtcbiAgICAgICAgICAgIGNsaWNrRXZlbnRzLmdldChpbnN0YW5jZS5lbnRpdHkpPy5kZWxldGUoZ2V0UG9pbnRlckVudW0odXBkYXRlLmNvbXBvbmVudCkpO1xuICAgICAgICAgICAgaWYgKHVwZGF0ZS5jb21wb25lbnQgPT09ICdvbk1vdXNlRG93bicpIHtcbiAgICAgICAgICAgICAgICBwb2ludGVyRXZlbnRzLnJlbW92ZU9uUG9pbnRlckRvd24oaW5zdGFuY2UuZW50aXR5KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2UgaWYgKHVwZGF0ZS5jb21wb25lbnQgPT09ICdvbk1vdXNlVXAnKSB7XG4gICAgICAgICAgICAgICAgcG9pbnRlckV2ZW50cy5yZW1vdmVPblBvaW50ZXJVcChpbnN0YW5jZS5lbnRpdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICB9XG4gICAgICAgIGlmICh1cGRhdGUucHJvcHMpIHtcbiAgICAgICAgICAgIGNvbnN0IHBvaW50ZXJFdmVudCA9IGdldFBvaW50ZXJFbnVtKHVwZGF0ZS5jb21wb25lbnQpO1xuICAgICAgICAgICAgY29uc3QgZW50aXR5RXZlbnQgPSBjbGlja0V2ZW50cy5nZXQoaW5zdGFuY2UuZW50aXR5KSB8fCBjbGlja0V2ZW50cy5zZXQoaW5zdGFuY2UuZW50aXR5LCBuZXcgTWFwKCkpLmdldChpbnN0YW5jZS5lbnRpdHkpO1xuICAgICAgICAgICAgY29uc3QgYWxyZWFkeUhhc1BvaW50ZXJFdmVudCA9IGVudGl0eUV2ZW50LmdldChwb2ludGVyRXZlbnQpO1xuICAgICAgICAgICAgZW50aXR5RXZlbnQuc2V0KHBvaW50ZXJFdmVudCwgdXBkYXRlLnByb3BzKTtcbiAgICAgICAgICAgIGlmIChhbHJlYWR5SGFzUG9pbnRlckV2ZW50KVxuICAgICAgICAgICAgIC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KTtcbiAgICB9XG4gICAgY29uc3QgaG9zdENvbmZpZyA9IHtcbiAgICAgICAgLi4ubm9vcENvbmZpZyxcbiAgICAgICAgY3JlYXRlSW5zdGFuY2UodHlwZSwgcHJvcHMpIHtcbiAgICAgICAgICAgIGNvbnN0IGVudGl0eSA9IGVuZ2luZS5hZGRFbnRpdHkoKTtcbiAgICAgICAgICAgIGVudGl0aWVzLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgY29uc3QgaW5zdGFuY2UgPSB7XG4gICAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICAgIF9jaGlsZDogW10sXG4gICAgICAgICAgICAgICAgcGFyZW50OiBDQU5WQVNfUk9PVF9FTlRJVFksXG4gICAgICAgICAgICAgICAgcmlnaHRPZjogdW5kZWZpbmVkXG4gICAgICAgICAgICB9O1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gcHJvcHMpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBrZXlUeXBlZCA9IGtleTtcbiAgICAgICAgICAgICAgICBpZiAoa2V5VHlwZWQgPT09ICdjaGlsZHJlbicgfHwga2V5VHlwZWQgPT09ICdrZXknKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoaXNMaXN0ZW5lcihrZXlUeXBlZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgdXBzZXJ0TGlzdGVuZXIoaW5zdGFuY2UsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGU6ICdhZGQnLFxuICAgICAgICAgICAgICAgICAgICAgICAgcHJvcHM6IHByb3BzW2tleVR5cGVkXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudDoga2V5VHlwZWRcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB1cHNlcnRDb21wb25lbnQoaW5zdGFuY2UsIHByb3BzW2tleVR5cGVkXSwga2V5VHlwZWQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBpbnN0YW5jZTtcbiAgICAgICAgfSxcbiAgICAgICAgYXBwZW5kQ2hpbGQsXG4gICAgICAgIGFwcGVuZENoaWxkVG9Db250YWluZXI6IGFwcGVuZENoaWxkLFxuICAgICAgICBhcHBlbmRJbml0aWFsQ2hpbGQ6IGFwcGVuZENoaWxkLFxuICAgICAgICByZW1vdmVDaGlsZDogcmVtb3ZlQ2hpbGQsXG4gICAgICAgIHByZXBhcmVVcGRhdGUoX2luc3RhbmNlLCBfdHlwZSwgb2xkUHJvcHMsIG5ld1Byb3BzKSB7XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50S2V5c1xuICAgICAgICAgICAgICAgIC5tYXAoKGNvbXBvbmVudCkgPT4gcHJvcHNDaGFuZ2VkKGNvbXBvbmVudCwgb2xkUHJvcHNbY29tcG9uZW50XSwgbmV3UHJvcHNbY29tcG9uZW50XSkpXG4gICAgICAgICAgICAgICAgLmZpbHRlcihpc05vdFVuZGVmaW5lZCk7XG4gICAgICAgIH0sXG4gICAgICAgIGNvbW1pdFVwZGF0ZShpbnN0YW5jZSwgdXBkYXRlUGF5bG9hZCwgX3R5cGUsIF9wcmV2UHJvcHMsIF9uZXh0UHJvcHMsIF9pbnRlcm5hbEhhbmRsZSkge1xuICAgICAgICAgICAgZm9yIChjb25zdCB1cGRhdGUgb2YgdXBkYXRlUGF5bG9hZCkge1xuICAgICAgICAgICAgICAgIGlmIChpc0xpc3RlbmVyKHVwZGF0ZS5jb21wb25lbnQpKSB7XG4gICAgICAgICAgICAgICAgICAgIHVwc2VydExpc3RlbmVyKGluc3RhbmNlLCB1cGRhdGUpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHVwZGF0ZS50eXBlID09PSAnZGVsZXRlJykge1xuICAgICAgICAgICAgICAgICAgICByZW1vdmVDb21wb25lbnQoaW5zdGFuY2UsIHVwZGF0ZS5jb21wb25lbnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmICh1cGRhdGUucHJvcHMpIHtcbiAgICAgICAgICAgICAgICAgICAgdXBzZXJ0Q29tcG9uZW50KGluc3RhbmNlLCB1cGRhdGUucHJvcHMsIHVwZGF0ZS5jb21wb25lbnQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgaW5zZXJ0QmVmb3JlKHBhcmVudEluc3RhbmNlLCBjaGlsZCwgYmVmb3JlQ2hpbGQpIHtcbiAgICAgICAgICAgIGNvbnN0IGJlZm9yZUNoaWxkSW5kZXggPSBwYXJlbnRJbnN0YW5jZS5fY2hpbGQuZmluZEluZGV4KChjKSA9PiBjLmVudGl0eSA9PT0gYmVmb3JlQ2hpbGQuZW50aXR5KTtcbiAgICAgICAgICAgIHBhcmVudEluc3RhbmNlLl9jaGlsZCA9IFtcbiAgICAgICAgICAgICAgICAuLi5wYXJlbnRJbnN0YW5jZS5fY2hpbGQuc2xpY2UoMCwgYmVmb3JlQ2hpbGRJbmRleCksXG4gICAgICAgICAgICAgICAgY2hpbGQsXG4gICAgICAgICAgICAgICAgLi4ucGFyZW50SW5zdGFuY2UuX2NoaWxkLnNsaWNlKGJlZm9yZUNoaWxkSW5kZXgpXG4gICAgICAgICAgICBdO1xuICAgICAgICAgICAgY2hpbGQucmlnaHRPZiA9IGJlZm9yZUNoaWxkLnJpZ2h0T2Y7XG4gICAgICAgICAgICBiZWZvcmVDaGlsZC5yaWdodE9mID0gY2hpbGQuZW50aXR5O1xuICAgICAgICAgICAgY2hpbGQucGFyZW50ID0gcGFyZW50SW5zdGFuY2UuZW50aXR5O1xuICAgICAgICAgICAgdXBkYXRlVHJl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Xh0OiB7XG4gICAgICAgICAgICAuLi5wcm9wcy51aVRleHQsXG4gICAgICAgICAgICAuLi5nZXRGb250KHByb3BzLnVpVGV4dC5mb250KSxcbiAgICAgICAgICAgIC4uLmdldFRleHRBbGlnbihwcm9wcy51aVRleHQudGV4dEFsaWduKVxuICAgICAgICB9XG4gICAgfTtcbiAgICByZXR1cm4gUmVhY3RFY3MuY3JlYXRlRWxlbWVudChcImVudGl0eVwiLCB7IC4uLnBhcnNlUHJvcHMocHJvcHMpLCAuLi51aVRleHQgfSk7XG59XG4iLCAiaW1wb3J0IHsgaXNMaXN0ZW5lciB9IGZyb20gJy4uL2NvbXBvbmVudHMnO1xuZXhwb3J0IGZ1bmN0aW9uIHByb3BzQ2hhbmdlZChjb21wb25lbnQsIHByZXZQcm9wcywgbmV4dFByb3BzKSB7XG4gICAgaWYgKHByZXZQcm9wcyAmJiAhbmV4dFByb3BzKSB7XG4gICAgICAgIHJldHVybiB7IHR5cGU6ICdkZWxldGUnLCBjb21wb25lbnQgfTtcbiAgICB9XG4gICAgaWYgKCFuZXh0UHJvcHMpIHtcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cbiAgICBpZiAoIXByZXZQcm9wcyAmJiBuZXh0UHJvcHMpIHtcbiAgICAgICAgcmV0dXJuIHsgdHlwZTogJ2FkZCcsIHByb3BzOiBuZXh0UHJvcHMsIGNvbXBvbmVudCB9O1xuICAgIH1cbiAgICBpZiAoaXNMaXN0ZW5lcihjb21wb25lbnQpKSB7XG4gICAgICAgIGlmICghaXNFcXVhbChwcmV2UHJvcHMsIG5leHRQcm9wcykpIHtcbiAgICAgICAgICAgIHJldHVybiB7IHR5cGU6ICdwdXQnLCBjb21wb25lbnQsIHByb3BzOiBuZXh0UHJvcHMgfTtcbiAgICAgICAgfVxuICAgIH1cbiAgICBjb25zdCBjaGFuZ2VzID0ge307XG4gICAgZm9yIChjb25zdCBrIGluIHByZXZQcm9wcykge1xuICAgICAgICBjb25zdCBwcm9wS2V5ID0ga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ICAgICAgICAgICAgICBpZDogU2NoZW1hcy5PcHRpb25hbChTY2hlbWFzLkludCksXG4gICAgICAgICAgICAgIHR5cGU6IFNjaGVtYXMuRW51bVN0cmluZzxUcmlnZ2VyQ29uZGl0aW9uVHlwZT4oXG4gICAgICAgICAgICAgICAgVHJpZ2dlckNvbmRpdGlvblR5cGUsXG4gICAgICAgICAgICAgICAgVHJpZ2dlckNvbmRpdGlvblR5cGUuV0hFTl9TVEFURV9JUyxcbiAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgdmFsdWU6IFNjaGVtYXMuU3RyaW5nLFxuICAgICAgICAgICAgfSksXG4gICAgICAgICAgKSxcbiAgICAgICAgKSxcbiAgICAgICAgb3BlcmF0aW9uOiBTY2hlbWFzLk9wdGlvbmFsKFxuICAgICAgICAgIFNjaGVtYXMuRW51bVN0cmluZzxUcmlnZ2VyQ29uZGl0aW9uT3BlcmF0aW9uPihcbiAgICAgICAgICAgIFRyaWdnZXJDb25kaXRpb25PcGVyYXRpb24sXG4gICAgICAgICAgICBUcmlnZ2VyQ29uZGl0aW9uT3BlcmF0aW9uLkFORCxcbiAgICAgICAgICApLFxuICAgICAgICApLFxuICAgICAgICBhY3Rpb25zOiBTY2hlbWFzLkFycmF5KFxuICAgICAgICAgIFNjaGVtYXMuTWFwKHtcbiAgICAgICAgICAgIGlkOiBTY2hlbWFzLk9wdGlvbmFsKFNjaGVtYXMuSW50KSxcbiAgICAgICAgICAgIG5hbWU6IFNjaGVtYXMuT3B0aW9uYWwoU2NoZW1hcy5TdHJpbmcpLFxuICAgICAgICAgIH0pLFxuICAgICAgICApLFxuICAgICAgfSksXG4gICAgKSxcbiAgfSlcblxuICBjb25zdCBTdGF0ZXMgPSBlbmdpbmUuZGVmaW5lQ29tcG9uZW50KENvbXBvbmVudE5hbWUuU1RBVEVTLCB7XG4gICAgaWQ6IFNjaGVtYXMuTnVtYmVyLFxuICAgIHZhbHVlOiBTY2hlbWFzLkFycmF5KFNjaGVtYXMu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bmltYXRpb24oZW50aXR5KVxuICAgICAgICAgIGJyZWFrXG4gICAgICAgIH1cbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICBicmVha1xuICAgICAgfVxuICAgIH1cblxuICAgIC8vIGJpbmQgYWN0aW9uc1xuICAgIGNvbnN0IGFjdGlvbkV2ZW50cyA9IGdldEFjdGlvbkV2ZW50cyhlbnRpdHkpXG4gICAgZm9yIChjb25zdCBhY3Rpb24gb2YgYWN0aW9ucy52YWx1ZSkge1xuICAgICAgYWN0aW9uRXZlbnRzLm9uKGFjdGlvbi5uYW1lLCAoKSA9PiB7XG4gICAgICAgIHN3aXRjaCAoYWN0aW9uLnR5cGUpIHtcbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuUExBWV9BTklNQVRJT046IHtcbiAgICAgICAgICAgIGhhbmRsZVBsYXlBbmltYXRpb24oXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlBMQVlfQU5JTUFUSU9OPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNUT1BfQU5JTUFUSU9OOiB7XG4gICAgICAgICAgICBoYW5kbGVTdG9wQW5pbWF0aW9uKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TVE9QX0FOSU1BVElPTj4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TRVRfU1RBVEU6IHtcbiAgICAgICAgICAgIGhhbmRsZVNldFN0YXRlKGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlNFVF9TVEFURT4oYWN0aW9uKSlcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TVEFSVF9UV0VFTjoge1xuICAgICAgICAgICAgaGFuZGxlU3RhcnRUd2VlbihlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TVEFSVF9UV0VFTj4oYWN0aW9uKSlcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TRVRfQ09VTlRFUjoge1xuICAgICAgICAgICAgaGFuZGxlU2V0Q291bnRlcihlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TRVRfQ09VTlRFUj4oYWN0aW9uKSlcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5JTkNSRU1FTlRfQ09VTlRFUjoge1xuICAgICAgICAgICAgaGFuZGxlSW5jcmVtZW50Q291bnRlcihcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuSU5DUkVNRU5UX0NPVU5URVI+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuREVDUkVBU0VfQ09VTlRFUjoge1xuICAgICAgICAgICAgaGFuZGxlRGVjcmVhc2VDb3VudGVyKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5ERUNSRUFTRV9DT1VOVEVSPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlBMQVlfU09VTkQ6IHtcbiAgICAgICAgICAgIGhhbmRsZVBsYXlTb3VuZChlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5QTEFZX1NPVU5EPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNUT1BfU09VTkQ6IHtcbiAgICAgICAgICAgIGhhbmRsZVN0b3BTb3VuZChlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TVE9QX1NPVU5EPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNFVF9WSVNJQklMSVRZOiB7XG4gICAgICAgICAgICBoYW5kbGVTZXRWaXNpYmlsaXR5KFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TRVRfVklTSUJJTElUWT4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5BVFRBQ0hfVE9fUExBWUVSOiB7XG4gICAgICAgICAgICBoYW5kbGVBdHRhY2hUb1BsYXllcihcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuQVRUQUNIX1RPX1BMQVlFUj4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5ERVRBQ0hfRlJPTV9QTEFZRVI6IHtcbiAgICAgICAgICAgIGhhbmRsZURldGFjaEZyb21QbGF5ZXIoXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLkRFVEFDSF9GUk9NX1BMQVlFUj4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5QTEFZX1ZJREVPX1NUUkVBTToge1xuICAgICAgICAgICAgaGFuZGxlUGxheVZpZGVvKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5QTEFZX1ZJREVPX1NUUkVBTT4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TVE9QX1ZJREVPX1NUUkVBTToge1xuICAgICAgICAgICAgaGFuZGxlU3RvcFZpZGVvKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TVE9QX1ZJREVPX1NUUkVBTT4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5QTEFZX0FVRElPX1NUUkVBTToge1xuICAgICAgICAgICAgaGFuZGxlUGxheUF1ZGlvU3RyZWFtKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5QTEFZX0FVRElPX1NUUkVBTT4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TVE9QX0FVRElPX1NUUkVBTToge1xuICAgICAgICAgICAgaGFuZGxlU3RvcEF1ZGlvU3RyZWFtKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TVE9QX0FVRElPX1NUUkVBTT4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5URUxFUE9SVF9QTEFZRVI6IHtcbiAgICAgICAgICAgIGhhbmRsZVRlbGVwb3J0UGxheWVyKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5URUxFUE9SVF9QTEFZRVI+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuTU9WRV9QTEFZRVI6IHtcbiAgICAgICAgICAgIGhhbmRsZU1vdmVQbGF5ZXIoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuTU9WRV9QTEFZRVI+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuUExBWV9ERUZBVUxUX0VNT1RFOiB7XG4gICAgICAgICAgICBoYW5kbGVQbGF5RGVmYXVsdEVtb3RlKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5QTEFZX0RFRkFVTFRfRU1PVEU+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuUExBWV9DVVNUT01fRU1PVEU6IHtcbiAgICAgICAgICAgIGhhbmRsZVBsYXlDdXN0b21FbW90ZShcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuUExBWV9DVVNUT01fRU1PVEU+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuT1BFTl9MSU5LOiB7XG4gICAgICAgICAgICBoYW5kbGVPcGVuTGluayhlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5PUEVOX0xJTks+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU0hPV19URVhUOiB7XG4gICAgICAgICAgICBoYW5kbGVTaG93VGV4dChlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TSE9XX1RFWFQ+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuSElERV9URVhUOiB7XG4gICAgICAgICAgICBoYW5kbGVIaWRlVGV4dChlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5ISURFX1RFWFQ+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU1RBUlRfREVMQVk6IHtcbiAgICAgICAgICAgIGhhbmRsZVN0YXJ0RGVsYXkoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RBUlRfREVMQVk+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU1RPUF9ERUxBWToge1xuICAgICAgICAgICAgaGFuZGxlU3RvcERlbGF5KGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlNUT1BfREVMQVk+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU1RBUlRfTE9PUDoge1xuICAgICAgICAgICAgaGFuZGxlU3RhcnRMb29wKGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlNUQVJUX0xPT1A+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU1RPUF9MT09QOiB7XG4gICAgICAgICAgICBoYW5kbGVTdG9wTG9vcChlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TVE9QX0xPT1A+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuQ0xPTkVfRU5USVRZOiB7XG4gICAgICAgICAgICBoYW5kbGVDbG9uZUVudGl0eShcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuQ0xPTkVfRU5USVRZPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlJFTU9WRV9FTlRJVFk6IHtcbiAgICAgICAgICAgIGhhbmRsZVJlbW92ZUVudGl0eShcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuUkVNT1ZFX0VOVElUWT4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TSE9XX0lNQUdFOiB7XG4gICAgICAgICAgICBoYW5kbGVTaG93SW1hZ2UoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU0hPV19JTUFHRT4oYWN0aW9uKSlcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5ISURFX0lNQUdFOiB7XG4gICAgICAgICAgICBoYW5kbGVIaWRlSW1hZ2UoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuSElERV9JTUFHRT4oYWN0aW9uKSlcbiAgICAgICAgIC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G4gIGlmICghdGV4dCkgcmV0dXJuICcnXG4gIGlmICh0ZXh0Lmxlbmd0aCA8IGxpbmVMZW4gKyAxKSB7XG4gICAgcmV0dXJuIHRleHRcbiAgfVxuXG4gIHdoaWxlIChjb3VudGVyIDwgdGV4dC5sZW5ndGgpIHtcbiAgICBsaW5lID0gdGV4dC5zdWJzdHJpbmcoY291bnRlciwgY291bnRlciArIGxpbmVMZW4pXG4gICAgYk1hdGNoRm91bmQgPSBmYWxzZVxuICAgIGlmIChsaW5lLmxlbmd0aCA9PSBsaW5lTGVuKSB7XG4gICAgICBmb3IgKGxldCBpID0gbGluZS5sZW5ndGg7IGkgPiAtMTsgaS0tKSB7XG4gICAgICAgIGlmIChsaW5lLnN1YnN0cmluZyhpLCBpICsgMSkgPT0gJyAnKSB7XG4gICAgICAgICAgY291bnRlciArPSBsaW5lLnN1YnN0cmluZygwLCBpKS5sZW5ndGhcbiAgICAgICAgICBsaW5lID0gbGluZS5zdWJzdHJpbmcoMCwgaSkgKyBsaW5lQnJlYWtcbiAgICAgICAgICByZXR1cm5UZXh0ICs9IGxpbmVcbiAgICAgICAgICBiTWF0Y2hGb3VuZCA9IHRydWVcbiAgICAgICAgICBicmVha1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIGlmICghYk1hdGNoRm91bmQpIHtcbiAgICAgICAgY291bnRlciArPSBsaW5lLmxlbmd0aFxuICAgICAgICBsaW5lID0gbGluZSArIGxpbmVCcmVha1xuICAgICAgICByZXR1cm5UZXh0ICs9IGxpbmVcbiAgICAgIH1cbiAgICB9IGVsc2Uge1xuICAgICAgcmV0dXJuVGV4dCArPSBsaW5lXG4gICAgICBicmVhayAvLyBXZSdyZSBicmVha2luZyBvdXQgb2YgdGhlIHRoZSB3aGlsZSgpLCBub3QgdGhlIGZvcigpXG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHJldHVyblRleHRcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGdldFVJVGV4dChcbiAgZW50aXR5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pZ2dlckFjdGlvbikpIHtcbiAgICAgICAgICAgICAgY29uc3QgZW50aXR5ID0gZ2V0RW50aXR5QnlBY3Rpb24odHJpZ2dlckFjdGlvbilcbiAgICAgICAgICAgICAgaWYgKGVudGl0eSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGFjdGlvbnMgPSBBY3Rpb25zLmdldE9yTnVsbChlbnRpdHkpXG4gICAgICAgICAgICAgICAgaWYgKGFjdGlvbnMpIHtcbiAgICAgICAgICAgICAgICAgIGNvbnN0IGFjdGlvbiA9IGFjdGlvbnMudmFsdWUuZmluZChcbiAgICAgICAgICAgICAgICAgICAgKCQpID0+ICQubmFtZSA9PT0gdHJpZ2dlckFjdGlvbi5uYW1lLFxuICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgaWYgKGFjdGlvbikge1xuICAgICAgICAgICAgICAgICAgICAvLyBhY3Rpb25zIGFyZSBlbnF1ZXVlZCB0byBiZSBleGVjdXRlZCBvbiB0aGUgbmV4dCB0aWNrIGFmdGVyIGFsbCB0aGUgdHJpZ2dlcnMgaGF2ZSBiZWVuIHByb2Nlc3NlZCxcbiAgICAgICAgICAgICAgICAgICAgLy8gdGhpcyBpcyB0byBhdm9pZCBvbmUgdHJpZ2dlciBtZXNzaW5nIHdpdGggb3RoZXIgdHJpZ2dlcidzIGNvbmRpdGlvbnNcbiAgICAgICAgICAgICAgICAgICAgYWN0aW9uUXVldWUucHVzaCh7IGVudGl0eSwgYWN0aW9uIH0pXG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9KVxuICAgIH1cbiAgICB0cmlnZ2VyRXZlbnRzLmVtaXQoVHJpZ2dlclR5cGUuT05fU1BBV04pXG5cbiAgICBpbml0ZWRFbnRpdGllcy5hZGQoZW50aXR5KVxuICB9XG5cbiAgZnVuY3Rpb24gaXNWYW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AgICBjb25zdCBlbnRpdHkgPSBnZXRFbnRpdHlCeUNvbmRpdGlvbihjb25kaXRpb24pXG4gICAgaWYgKGVudGl0eSkge1xuICAgICAgdHJ5IHtcbiAgICAgICAgc3dpdGNoIChjb25kaXRpb24udHlwZSkge1xuICAgICAgICAgIGNhc2UgVHJpZ2dlckNvbmRpdGlvblR5cGUuV0hFTl9TVEFURV9JUzoge1xuICAgICAgICAgICAgY29uc3Qgc3RhdGVzID0gU3RhdGVzLmdldE9yTnVsbChlbnRpdHkpXG4gICAgICAgICAgICBpZiAoc3RhdGVzICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRWYWx1ZSA9IGdldEN1cnJlbnRWYWx1ZShzdGF0ZXMpXG4gICAgICAgICAgICAgIHJldHVybiBjdXJyZW50VmFsdWUgPT09IGNvbmRpdGlvbi52YWx1ZVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBUcmlnZ2VyQ29uZGl0aW9uVHlwZS5XSEVOX1NUQVRFX0lTX05PVDoge1xuICAgICAgICAgICAgY29uc3Qgc3RhdGVzID0gU3RhdGVzLmdldE9yTnVsbChlbnRpdHkpXG4gICAgICAgICAgICBpZiAoc3RhdGVzICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRWYWx1ZSA9IGdldEN1cnJlbnRWYWx1ZShzdGF0ZXMpXG4gICAgICAgICAgICAgIHJldHVybiBjdXJyZW50VmFsdWUgIT09IGNvbmRpdGlvbi52YWx1ZVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBUcmlnZ2VyQ29uZGl0aW9uVHlwZS5XSEVOX0NPVU5URVJfRVFVQUxTOiB7XG4gICAgICAgICAgICBjb25zdCBjb3VudGVyID0gQ291bnRlci5nZXRPck51bGwoZW50aXR5KVxuICAgICAgICAgICAgaWYgKGNvdW50ZXIgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgY29uc3QgbnVtZXJpYyA9IE51bWJlcihjb25kaXRpb24udmFsdWUpXG4gICAgICAgICAgICAgIGlmICghaXNOYU4obnVtZXJpYykpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY291bnRlci52YWx1ZSA9PT0gbnVtZXJpY1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIFRyaWdnZXJDb25kaXRpb25UeXBlLldIRU5fQ09VTlRFUl9JU19HUkVBVEVSX1RIQU46IHtcbiAgICAgICAgICAgIGNvbnN0IGNvdW50ZXIgPSBDb3VudGVyLmdldE9yTnVsbChlbnRpdHkpXG4gICAgICAgICAgICBpZiAoY291bnRlciAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBjb25zdCBudW1lcmljID0gTnVtYmVyKGNvbmRpdGlvbi52YWx1ZSlcbiAgICAgICAgICAgICAgaWYgKCFpc05hTihudW1lcmljKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjb3VudGVyLnZhbHVlID4gbnVtZXJpY1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIFRyaWdnZXJDb25kaXRpb25UeXBlLldIRU5fQ09VTlRFUl9JU19MRVNTX1RIQU46IHtcbiAgICAgICAgICAgIGNvbnN0IGNvdW50ZXIgPSBDb3VudGVyLmdldE9yTnVsbChlbnRpdHkpXG4gICAgICAgICAgICBpZiAoY291bnRlciAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBjb25zdCBudW1lcmljID0gTnVtYmVyKGNvbmRpdGlvbi52YWx1ZSlcbiAgICAgICAgICAgICAgaWYgKCFpc05hTihudW1lcmljKSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBjb3VudGVyLnZhbHV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4gZW50aXR5XG4gICAgICB9XG4gICAgfVxuICAgIHJldHVybiBudWxsXG4gIH1cblxuICBmdW5jdGlvbiBnZXRFbnRpdHlCeUNvbmRpdGlvbihjb25kaXRpb246IFRyaWdnZXJDb25kaXRpb24pIHtcbiAgICBjb25zdCBjb21wb25lbnROYW1lID0gT2JqZWN0LnZhbHVlcyhDb21wb25lbnROYW1lKVxuICAgICAgLm1hcCgoY29tcG9uZW50TmFtZSkgPT4gKHtcbiAgICAgICAgY29tcG9uZW50TmFtZSxcbiAgICAgICAgY29uZGl0aW9uVHlwZXM6IGdldENvbmRpdGlvblR5cGVzQnlDb21wb25lbnROYW1lKGNvbXBvbmVudE5hbWUpLFxuICAgICAgfSkpXG4gICAgICAucmVkdWNlPENvbXBvbmVudE5hbWUgfCBudWxsPihcbiAgICAgICAgKHJlc3VsdCwgeyBjb21wb25lbnROYW1lLCBjb25kaXRpb25UeXBlcyB9KSA9PlxuICAgICAgICAgIGNvbmRpdGlvblR5cGVzLmluY2x1ZGVzKGNvbmRpdGlvbi50eXBlKSA/IGNvbXBvbmVudE5hbWUgOiByZXN1bHQsXG4gICAgICAgIG51bGwsXG4gICAgICApXG4gICAgaWYgKGNvbXBvbmVudE5hbWUgJiYgY29uZGl0aW9uLmlkKSB7XG4gICAgICBjb25zdCBlbnRpdHkgPSBnZXRFbnRpdHlCeUlkKGNvbXBvbmVudE5hbWUsIGNvbmRpdGlvbi5pZClcbiAgICAgIGlmIChlbnRpdHkpIHtcbiAgICAgICAgcmV0dXJuIGVudGl0eVxuICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4gbnVsbFxuICB9XG5cbiAgLy8gT05fQ0xJQ0tcbiAgZnVuY3Rpb24gaW5pdE9uQ2xpY2tUcmlnZ2VyKGVudGl0eTogRW50aXR5KSB7XG4gICAgcG9pbnRlckV2ZW50c1N5c3RlbS5vblBvaW50ZXJEb3duKFxuICAgICAge1xuICAgICAgICBlbnRpdHksXG4gICAgICAgIG9wdHM6IHtcbi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xlbmd0aCAtIDEpLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICBvZmZzZXQgPSAwO1xyXG4gICAgICAgICAgICAgICAgICAgIHdoaWxlIChvZmZzZXQgPCBwYXJhbXMubGVuZ3RoKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXNbb2Zmc2V0KytdID0gYXJndW1lbnRzW29mZnNldF07XHJcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZS5hcHBseShudWxsLCBwYXJhbXMpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfTtcclxuICAgICAgICB0cnkge1xyXG4gICAgICAgICAgICBmbi5hcHBseShjdHggfHwgbnVsbCwgcGFyYW1zKTtcclxuICAgICAgICB9IGNhdGNoIChlcnIpIHtcclxuICAgICAgICAgICAgaWYgKHBlbmRpbmcpIHtcclxuICAgICAgICAgICAgICAgIHBlbmRpbmcgPSBmYWxzZTtcclxuICAgICAgICAgICAgICAgIHJlamVjdChlcnIpO1xyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG4gICAgfSk7XHJcbn1cclxuIiwgIlwidXNlIHN0cmljdFwiO1xyXG5cclxuLyoqXHJcbiAqIEEgbWluaW1hbCBiYXNlNjQgaW1wbGVtZW50YXRpb24gZm9yIG51bWJlciBhcnJheXMuXHJcbiAqIEBtZW1iZXJvZiB1dGlsXHJcbiAqIEBuYW1lc3BhY2VcclxuICovXHJcbnZhciBiYXNlNjQgPSBleHBvcnRzO1xyXG5cclxuLyoqXHJcbiAqIENhbGN1bGF0ZXMgdGhlIGJ5dGUgbGVuZ3RoIG9mIGEgYmFzZTY0IGVuY29kZWQgc3RyaW5nLlxyXG4gKiBAcGFyYW0ge3N0cmluZ30gc3RyaW5nIEJhc2U2NCBlbmNvZGVkIHN0cmluZ1xyXG4gKiBAcmV0dXJucyB7bnVtYmVyfSBCeXRlIGxlbmd0aFxyXG4gKi9cclxuYmFzZTY0Lmxlb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iAgICB2YXIgcGFydHMgPSBudWxsLFxyXG4gICAgICAgIGNodW5rID0gW107XHJcbiAgICB2YXIgaSA9IDAsIC8vIG91dHB1dCBpbmRleFxyXG4gICAgICAgIGogPSAwLCAvLyBnb3RvIGluZGV4XHJcbiAgICAgICAgdDsgICAgIC8vIHRlbXBvcmFyeVxyXG4gICAgd2hpbGUgKHN0YXJ0IDwgZW5kKSB7XHJcbiAgICAgICAgdmFyIGIgPSBidWZmZXJbc3RhcnQrK107XHJcbiAgICAgICAgc3dpdGNoIChqKSB7XHJcbiAgICAgICAgICAgIGNhc2UgMDpcclxuICAgICAgICAgICAgICAgIGNodW5rW2krK10gPSBiNjRbYiA+PiAyXTtcclxuICAgICAgICAgICAgICAgIHQgPSAoYiAmIDMpIDw8IDQ7XHJcbiAgICAgICAgICAgICAgICBqID0gMTtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIDE6XHJcbiAgICAgICAgICAgICAgICBjaHVua1tpKytdID0gYjY0W3QgfCBiID4+IDRdO1xyXG4gICAgICAgICAgICAgICAgdCA9IChiICYgMTUpIDw8IDI7XHJcbiAgICAgICAgICAgICAgICBqID0gMjtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIDI6XHJcbiAgICAgICAgICAgICAgICBjaHVua1tpKytdID0gYjY0W3QgfCBiID4+IDZdO1xyXG4gICAgICAgICAgICAgICAgY2h1bmtbaSsrXSA9IGI2NFtiICYgNjNdO1xyXG4gICAgICAgICAgICAgICAgaiA9IDA7XHJcbiAgICAgICAgICAgICAgICBicmVhaztcclxuICAgICAgICB9XHJcbiAgICAgICAgaWYgKGkgPiA4MTkxKSB7XHJcbiAgICAgICAgICAgIChwYXJ0cyB8fCAocGFydHMgPSBbXSkpLnB1c2goU3RyaW5nLmZyb21DaGFyQ29kZS5hcHBseShTdHJpbmcsIGNodW5rKSk7XHJcbiAgICAgICAgICAgIGkgPSAwO1xyXG4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gc3RhcnQgPSBvZmZzZXQ7XHJcbiAgICB2YXIgaiA9IDAsIC8vIGdvdG8gaW5kZXhcclxuICAgICAgICB0OyAgICAgLy8gdGVtcG9yYXJ5XHJcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHN0cmluZy5sZW5ndGg7KSB7XHJcbiAgICAgICAgdmFyIGMgPSBzdHJpbmcuY2hhckNvZGVBdChpKyspO1xyXG4gICAgICAgIGlmIChjID09PSA2MSAmJiBqID4gMSlcclxuICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgaWYgKChjID0gczY0W2NdKSA9PT0gdW5kZWZpbmVkKVxyXG4gICAgICAgICAgICB0aHJvdyBFcnJvcihpbnZhbGlkRW5jb2RpbmcpO1xyXG4gICAgICAgIHN3aXRjaCAoaikge1xyXG4gICAgICAgICAgICBjYXNlIDA6XHJcbiAgICAgICAgICAgICAgICB0ID0gYztcclxuICAgICAgICAgICAgICAgIGogPSAxO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2UgMTpcclxuICAgICAgICAgICAgICAgIGJ1ZmZlcltvZmZzZXQrK10gPSB0IDw8IDIgfCAoYyAmIDQ4KSA+PiA0O1xyXG4gICAgICAgICAgICAgICAgdCA9IGM7XHJcbiAgICAgICAgICAgICAgICBqID0gMjtcclxuICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICBjYXNlIDI6XHJcbiAgICAgICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gKHQgJiAxNSkgPDwgNCB8IChjICYgNjApID4+IDI7XHJcbiAgICAgICAgICAgICAgICB0ID0gYztcclxuICAgICAgICAgICAgICAgIGogPSAzO1xyXG4gICAgICAgICAgICAgICAgYnJlYWs7XHJcbiAgICAgICAgICAgIGNhc2UgMzpcclxuICAgICAgICAgICAgICAgIGJ1ZmZlcltvZmZzZXQrK10gPSAodCAmIDMpIDw8IDYgfCBjO1xyXG4gICAgICAgICAgICAgICAg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VVpbnRMRSk7XHJcbiAgICAgICAgZXhwb3J0cy53cml0ZUZsb2F0QkUgPSB3cml0ZUZsb2F0X2llZWU3NTQuYmluZChudWxsLCB3cml0ZVVpbnRCRSk7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHJlYWRGbG9hdF9pZWVlNzU0KHJlYWRVaW50LCBidWYsIHBvcykge1xyXG4gICAgICAgICAgICB2YXIgdWludCA9IHJlYWRVaW50KGJ1ZiwgcG9zKSxcclxuICAgICAgICAgICAgICAgIHNpZ24gPSAodWludCA+PiAzMSkgKiAyICsgMSxcclxuICAgICAgICAgICAgICAgIGV4cG9uZW50ID0gdWludCA+Pj4gMjMgJiAyNTUsXHJcbiAgICAgICAgICAgICAgICBtYW50aXNzYSA9IHVpbnQgJiA4Mzg4NjA3O1xyXG4gICAgICAgICAgICByZXR1cm4gZXhwb25lbnQgPT09IDI1NVxyXG4gICAgICAgICAgICAgICAgPyBtYW50aXNzYVxyXG4gICAgICAgICAgICAgICAgPyBOYU5cclxuICAgICAgICAgICAgICAgIDogc2lnbiAqIEluZmluaXR5XHJcbiAgICAgICAgICAgICAgICA6IGV4cG9uZW50ID09PSAwIC8vIGRlbm9ybWFsXHJcbiAgICAgICAgICAgICAgICA/IHNpZ24gKiAxLjQwMTI5ODQ2NDMyNDgxN2UtNDUgKiBtYW50aXNzYVxyXG4gICAgICAgICAgICAgICAgOiBzaWduICogTWF0aC5wb3coMiwgZXhwb25lbnQgLSAxNTApICogKG1hbnRpc3NhICsgODM4ODYwOCk7XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBleHBvcnRzLnJlYWRGbG9hdExFID0gcmVhZEZsb2F0X2llZWU3NTQuYmluZChudWxsLCByZWFkVWludExFKTtcclxuICAgICAgICBleHBvcnRzLnJlYWRGbG9hdEJFID0gcmVhZEZsb2F0X2llZWU3NTQuYmluZChudWxsLCByZWFkVWludEJFKTtcclxuXHJcbiAgICB9KSgpO1xyXG5cclxuICAgIC8vIGRvdWJsZTogdHlwZWQgYXJyYXlcclxuICAgIGlmICh0eXBlb2YgRmxvYXQ2NEFycmF5ICE9PSBcInVuZGVmaW5lZFwiKSAoZnVuY3Rpb24oKSB7XHJcblxyXG4gICAgICAgIHZhciBmNjQgPSBuZXcgRmxvYXQ2NEFycmF5KFstMF0pLFxyXG4gICAgICAgICAgICBmOGIgPSBuZXcgVWludDhBcnJheShmNjQuYnVmZmVyKSxcclxuICAgICAgICAgICAgbGUgID0gZjhiWzddID09PSAxMjg7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHdyaXRlRG91YmxlX2Y2NF9jcHkodmFsLCBidWYsIHBvcykge1xyXG4gICAgICAgICAgICBmNjRbMF0gPSB2YWw7XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgICAgXSA9IGY4YlswXTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDFdID0gZjhiWzFdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgMl0gPSBmOGJbMl07XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyAzXSA9IGY4YlszXTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDRdID0gZjhiWzRdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgNV0gPSBmOGJbNV07XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyA2XSA9IGY4Yls2XTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDddID0gZjhiWzddO1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgZnVuY3Rpb24gd3JpdGVEb3VibGVfZjY0X3Jldih2YWwsIGJ1ZiwgcG9zKSB7XHJcbiAgICAgICAgICAgIGY2NFswXSA9IHZhbDtcclxuICAgICAgICAgICAgYnVmW3BvcyAgICBdID0gZjhiWzddO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgMV0gPSBmOGJbNl07XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyAyXSA9IGY4Yls1XTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDNdID0gZjhiWzRdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgNF0gPSBmOGJbM107XHJcbiAgICAgICAgICAgIGJ1Zltwb3MgKyA1XSA9IGY4YlsyXTtcclxuICAgICAgICAgICAgYnVmW3BvcyArIDZdID0gZjhiWzFdO1xyXG4gICAgICAgICAgICBidWZbcG9zICsgN10gPSBmOGJbMF07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xyXG4gICAgICAgIGV4cG9ydHMud3JpdGVEb3VibGVMRSA9IGxlID8gd3JpdGVEb3VibGVfZjY0X2NweSA6IHdyaXRlRG91YmxlX2Y2NF9yZXY7XHJcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cclxuICAgICAgICBleHBvcnRzLndyaXRlRG91YmxlQkUgPSBsZSA/IHdyaXRlRG91YmxlX2Y2NF9yZXYgOiB3cml0ZURvdWJsZV9mNjRfY3B5O1xyXG5cclxuICAgICAgICBmdW5jdGlvbiByZWFkRG91YmxlX2Y2NF9jcHkoYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgZjhiWzBdID0gYnVmW3BvcyAgICBdO1xyXG4gICAgICAgICAgICBmOGJbMV0gPSBidWZbcG9zICsgMV07XHJcbiAgICAgICAgICAgIGY4YlsyXSA9IGJ1Zltwb3MgKyAyXTtcclxuICAgICAgICAgICAgZjhiWzNdID0gYnVmW3BvcyArIDNdO1xyXG4gICAgICAgICAgICBmOGJbNF0gPSBidWZbcG9zICsgNF07XHJcbiAgICAgICAgICAgIGY4Yls1XSA9IGJ1Zltwb3MgKyA1XTtcclxuICAgICAgICAgICAgZjhiWzZdID0gYnVmW3BvcyArIDZdO1xyXG4gICAgICAgICAgICBmOGJbN10gPSBidWZbcG9zICsgN107XHJcbiAgICAgICAgICAgIHJldHVybiBmNjRbMF07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBmdW5jdGlvbiByZWFkRG91YmxlX2Y2NF9yZXYoYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgZjhiWzddID0gYnVmW3BvcyAgICBdO1xyXG4gICAgICAgICAgICBmOGJbNl0gPSBidWZbcG9zICsgMV07XHJcbiAgICAgICAgICAgIGY4Yls1XSA9IGJ1Zltwb3MgKyAyXTtcclxuICAgICAgICAgICAgZjhiWzRdID0gYnVmW3BvcyArIDNdO1xyXG4gICAgICAgICAgICBmOGJbM10gPSBidWZbcG9zICsgNF07XHJcbiAgICAgICAgICAgIGY4YlsyXSA9IGJ1Zltwb3MgKyA1XTtcclxuICAgICAgICAgICAgZjhiWzFdID0gYnVmW3BvcyArIDZdO1xyXG4gICAgICAgICAgICBmOGJbMF0gPSBidWZbcG9zICsgN107XHJcbiAgICAgICAgICAgIHJldHVybiBmNjRbMF07XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqL1xyXG4gICAgICAgIGV4cG9ydHMucmVhZERvdWJsZUxFID0gbGUgPyByZWFkRG91YmxlX2Y2NF9jcHkgOiByZWFkRG91YmxlX2Y2NF9yZXY7XHJcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cclxuICAgICAgICBleHBvcnRzLnJlYWREb3VibGVCRSA9IGxlID8gcmVhZERvdWJsZV9mNjRfcmV2IDogcmVhZERvdWJsZV9mNjRfY3B5O1xyXG5cclxuICAgIC8vIGRvdWJsZTogaWVlZTc1NFxyXG4gICAgfSkoKTsgZWxzZSAoZnVuY3Rpb24oKSB7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHdyaXRlRG91YmxlX2llZWU3NTQod3JpdGVVaW50LCBvZmYwLCBvZmYxLCB2YWwsIGJ1ZiwgcG9zKSB7XHJcbiAgICAgICAgICAgIHZhciBzaWduID0gdmFsIDwgMCA/IDEgOiAwO1xyXG4gICAgICAgICAgICBpZiAoc2lnbilcclxuICAgICAgICAgICAgICAgIHZhbCA9IC12YWw7XHJcbiAgICAgICAgICAgIGlmICh2YWwgPT09IDApIHtcclxuICAgICAgICAgICAgICAgIHdyaXRlVWludCgwLCBidWYsIHBvcyArIG9mZjApO1xyXG4gICAgICAgICAgICAgICAgd3JpdGVVaW50KDEgLyB2YWwgPiAwID8gLyogcG9zaXRpdmUgKi8gMCA6IC8qIG5lZ2F0aXZlIDAgKi8gMjE0NzQ4MzY0OCwgYnVmLCBwb3MgKyBvZmYxKTtcclxuICAgICAgICAgICAgfSBlbHNlIGlmIChpc05hTih2YWwpKSB7XHJcbiAgICAgICAgICAgICAgICB3cml0ZVVpbnQoMCwgYnVmLCBwb3MgKyBvZmYwKTtcclxuICAgICAgICAgICAgICAgIHdyaXRlVWludCgyMTQ2OTU5MzYwLCBidWYsIHBvcyArIG9mZjEpO1xyXG4gICAgICAgICAgICB9IGVsc2UgaWYgKHZhbCA+IDEuNzk3NjkzMTM0ODYyMzE1N2UrMzA4KSB7IC8vICstSW5maW5pdHlcclxuICAgICAgICAgICAgICAgIHdyaXRlVWludCgwLCBidWYsIHBvcyArIG9mZjApO1xyXG4gICAgICAgICAgICAgICAgd3JpdGVVaW50KChzaWduIDw8IDMxIHwgMjE0NjQzNTA3MikgPj4+IDAsIGJ1ZiwgcG9zICsgb2ZmMSk7XHJcbiAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICB2YXIgbWFudGlzc2E7XHJcbiAgICAgICAgICAgICAgICBpZiAodmFsIDwgMi4yMjUwNzM4NTg1MDcyMDE0ZS0zMDgpIHsgLy8gZGVub3JtYWxcclxuICAgICAgICAgICAgICAgICAgICBtYW50aXNzYSA9IHZhbCAvIDVlLTMyNDtcclxuICAgICAgICAgICAgICAgICAgICB3cml0ZVVpbnQobWFudGlzc2EgPj4+IDAsIGJ1ZiwgcG9zICsgb2ZmMCk7XHJcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVVaW50KChzaWduIDw8IDMxIHwgbWFudGlzc2EgLyA0Mjk0OTY3Mjk2KSA+Pj4gMCwgYnVmLCBwb3MgKyBvZmYxKTtcclxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdmFyIGV4cG9uZW50ID0gTWF0aC5mbG9vcihNYXRoLmxvZyh2YWwpIC8gTWF0aC5MTjIpO1xyXG4gICAgICAgICAgICAgICAgICAgIGlmIChleHBvbmVudCA9PT0gMTAyNClcclxuICAgICAgICAgICAgICAgICAgICAgICAgZXhwb25lbnQgPSAxMDIzO1xyXG4gICAgICAgICAgICAgICAgICAgIG1hbnRpc3NhID0gdmFsICogTWF0aC5wb3coMiwgLWV4cG9uZW50KTtcclxuICAgICAgICAgICAgICAgICAgICB3cml0ZVVpbnQobWFudGlzc2EgKiA0NTAzNTk5NjI3MzcwNDk2ID4+PiAwLCBidWYsIHBvcyArIG9mZjApO1xyXG4gICAgICAgICAgICAgICAgICAgIHdyaXRlVWludCgoc2lnbiA8PCAzMSB8IGV4cG9uZW50ICsgMTAyMyA8PCAyMCB8IG1hbnRpc3NhICogMTA0ODU3NiAmIDEwNDg1NzUpID4+PiAwLCBidWYsIHBvcyArIG9mZjEpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICB9XHJcbiAgICAgICAgfVxyXG5cclxuICAgICAgICBleHBvcnRzLndyaXRlRG91YmxlTEUgPSB3cml0ZURvdWJsZV9pZWVlNzU0LmJpbmQobnVsbCwgd3JpdGVVaW50TEUsIDAsIDQpO1xyXG4gICAgICAgIGV4cG9ydHMud3JpdGVEb3VibGVCRSA9IHdyaXRlRG91YmxlX2llZWU3NTQuYmluZChudWxsLCB3cml0ZVVpbnRCRSwgNCwgMCk7XHJcblxyXG4gICAgICAgIGZ1bmN0aW9uIHJlYWREb3VibGVfaWVlZTc1NChyZWFkVWludCwgb2ZmMCwgb2ZmMSwgYnVmLCBwb3MpIHtcclxuICAgICAgICAgICAgdmFyIGxvID0gcmVhZFVpbnQoYnVmLCBwb3MgKyBvZmYwKSxcclxuICAgICAgICAgICAgICAgIGhpID0gcmVhZFVpbnQoYnVmLCBwb3MgKyBvZmYxKTtcclxuICAgICAgICAgICAgdmFyIHNpZ24gPSAoaGkgPj4gMzEpICogMiArIDEsXHJcbiAgICAgICAgICAgICAgICBleHBvbmVudCA9IGhpID4+PiAyMCAmIDIwNDcsXHJcbiAgICAgICAgICAgICAgICBtYW50aXNzYSA9IDQyOTQ5NjcyOTYgKiAoaGkgJiAxMDQ4NTc1KSArIGxvO1xyXG4gICAgICAgICAgICByZXR1cm4gZXhwb25lbnQgPT09IDIwNDdcclxuICAgICAgICAgICAgICAgID8gbWFudGlzc2FcclxuICAgICAgICAgICAgICAgID8gTmFOXHJcbiAgICAgICAgICAgICAgICA6IHNpZ24gKiBJbmZpbml0eVxyXG4gICAgICAgICAgICAgICAgOiBleHBvbmVudCA9PT0gMCAvLyBkZW5vcm1hbFxyXG4gICAgICAgICAgICAgICAgPyBzaWduICogNWUtMzI0ICogbWFudGlzc2FcclxuICAgICAgICAgICAgICAgIDogc2lnbiAqIE1hdGgucG93KDIsIGV4cG9uZW50IC0gMTA3NSkgKiAobWFudGlzc2EgKyA0NTAzNTk5NjI3MzcwNDk2KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGV4cG9ydHMucmVhZERvdWJsZUxFID0gcmVhZERvdWJsZV9pZWVlNzU0LmJpbmQobnVsbCwgcmVhZFVpbnRMRSwgMCwgNCk7XHJcbiAgICAgICAgZXhwb3J0cy5yZWFkRG91YmxlQkUgPSByZWFkRG91YmxlX2llZWU3NTQuYmluZChudWxsLCByZWFkVWludEJFLCA0LCAwKTtcclxuXHJcbiAgICB9KSgpO1xyXG5cclxuICAgIHJldHVybiBleHBvcnRzO1xyXG59XHJcblxyXG4vLyB1aW50IGhlbHBlcnNcclxuXHJcbmZ1bmN0aW9uIHdyaXRlVWludExFKHZhbCwgYnVmLCBwb3MpIHtcclxuICAgIGJ1Zltwb3MgICAgXSA9ICB2YWwgICAgICAgICYgMj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1xyXG4gICAgdmFyIGxlbiA9IDAsXHJcbiAgICAgICAgYyA9IDA7XHJcbiAgICBmb3IgKHZhciBpID0gMDsgaSA8IHN0cmluZy5sZW5ndGg7ICsraSkge1xyXG4gICAgICAgIGMgPSBzdHJpbmcuY2hhckNvZGVBdChpKTtcclxuICAgICAgICBpZiAoYyA8IDEyOClcclxuICAgICAgICAgICAgbGVuICs9IDE7XHJcbiAgICAgICAgZWxzZSBpZiAoYyA8IDIwNDgpXHJcbiAgICAgICAgICAgIGxlbiArPSAyO1xyXG4gICAgICAgIGVsc2UgaWYgKChjICYgMHhGQzAwKSA9PT0gMHhEODAwICYmIChzdHJpbmcuY2hhckNvZGVBdChpICsgMSkgJiAweEZDMDApID09PSAweERDMDApIHtcclxuICAgICAgICAgICAgKytpO1xyXG4gICAgICAgICAgICBsZW4gKz0gNDtcclxuICAgICAgICB9IGVsc2VcclxuICAgICAgICAgICAgbGVuICs9IDM7XHJcbiAgICB9XHJcbiAgICByZXR1cm4gbGVuO1xyXG59O1xyXG5cclxuLyoqXHJcbiAqIFJlYWRzIFVURjggYnl0ZXMgYXMgYSBzdHJpbmcuXHJcbiAqIEBwYXJhbSB7VWludDhBcnJheX0gYnVmZmVyIFNvdXJjZSBidWZmZXJcclxuICogQHBhcmFtIHtudW1iZXJ9IHN0YXJ0IFNvdXJjZSBzdGFydFxyXG4gKiBAcGFyYW0ge251bWJlcn0gZW5kIFNvdXJjZSBlbmRcclxuICogQHJldHVybnMge3N0cmluZ30gU3RyaW5nIHJlYWRcclxuICovXHJcbnV0ZjgucmVhZCA9IGZ1bmN0aW9uIHV0ZjhfcmVhZChidWZmZXIsIHN0YXJ0LCBlbmQpIHtcclxuICAgIHZhciBsZW4gPSBlbmQgLSBzdGFydDtcclxuICAgIGlmIChsZW4gPCAxKVxyXG4gICAgICAgIHJldHVybiBcIlwiO1xyXG4gICAgdmFyIHBhcnRzID0gbnVsbCxcclxuICAgICAgICBjaHVuayA9IFtdLFxyXG4gICAgICAg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YzEgPj4gNiAgICAgICB8IDE5MjtcclxuICAgICAgICAgICAgYnVmZmVyW29mZnNldCsrXSA9IGMxICAgICAgICYgNjMgfCAxMjg7XHJcbiAgICAgICAgfSBlbHNlIGlmICgoYzEgJiAweEZDMDApID09PSAweEQ4MDAgJiYgKChjMiA9IHN0cmluZy5jaGFyQ29kZUF0KGkgKyAxKSkgJiAweEZDMDApID09PSAweERDMDApIHtcclxuICAgICAgICAgICAgYzEgPSAweDEwMDAwICsgKChjMSAmIDB4MDNGRikgPDwgMTApICsgKGMyICYgMHgwM0ZGKTtcclxuICAgICAgICAgICAgKytpO1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgPj4gMTggICAgICB8IDI0MDtcclxuICAgICAgICAgICAgYnVmZmVyW29mZnNldCsrXSA9IGMxID4+IDEyICYgNjMgfCAxMjg7XHJcbiAgICAgICAgICAgIGJ1ZmZlcltvZmZzZXQrK10gPSBjMSA+PiA2ICAmIDYzIHwgMTI4O1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgICAgICAgJiA2MyB8IDEyODtcclxuICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICBidWZmZXJbb2Zmc2V0KytdID0gYzEgPj4gMTIgICAgICB8IDIyNDtcclxuICAgICAgICAgICAgYnVmZmVyW29mZnNldCsrXSA9IGMxID4+IDYgICYgNjMgfCAxMjg7XHJcbiAgICAgICAgICAgIGJ1ZmZlcltvZmZzZXQrK10gPSBjMSAgICAgICAmIDYzIHwgMTI4O1xyXG4gICAgICAgIH1cclxuICAgIH1cclxuICAgIHJldHVybiBvZmZzZXQgLSBzdGFydDtcclxufTtcclxuIiwgIlwidXNlIHN0cmljdFwiO1xyXG5tb2R1bGUuZXhwb3J0cyA9IHBvb2w7XHJcblxyXG4vKipcclxuICogQW4gYWxsb2NhdG9yIGFzIHVzZWQgYnkge0BsaW5rIHV0aWwucG9vbH0uXHJcbiAqIEB0eXBlZGVmIF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pID4+PiAwO1xuICAgICAgICBiaXRzLmhpID0gKGJpdHMuaGkgfCAodGhpcy5idWZbdGhpcy5wb3NdICYgMTI3KSA+PiAgNCkgPj4+IDA7XG4gICAgICAgIGlmICh0aGlzLmJ1Zlt0aGlzLnBvcysrXSA8IDEyOClcbiAgICAgICAgICAgIHJldHVybiBiaXRzO1xuICAgICAgICBpID0gMDtcbiAgICB9IGVsc2Uge1xuICAgICAgICBmb3IgKDsgaSA8IDM7ICsraSkge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGlmICovXG4gICAgICAgICAgICBpZiAodGhpcy5wb3MgPj0gdGhpcy5sZW4pXG4gICAgICAgICAgICAgICAgdGhyb3cgaW5kZXhPdXRPZlJhbmdlKHRoaXMpO1xuICAgICAgICAgICAgLy8gMXN0Li4zdGhcbiAgICAgICAgICAgIGJpdHMubG8gPSAoYml0cy5sbyB8ICh0aGlzLmJ1Zlt0aGlzLnBvc10gJiAxMjcpIDw8IGkgKiA3KSA+Pj4gMDtcbiAgICAgICAgICAgIGlmICh0aGlzLmJ1Zlt0aGlzLnBvcysrXSA8IDEyOClcbiAgICAgICAgICAgICAgICByZXR1cm4gYml0cztcbiAgICAgICAgfVxuICAgICAgICAvLyA0dGhcbiAgICAgICAgYml0cy5sbyA9IChiaXRzLmxvIHwgKHRoaXMuYnVmW3RoaXMucG9zKytdICYgMTI3KSA8PCBpICogNykgPj4+IDA7XG4gICAgICAgIHJldHVybiBiaXRzO1xuICAgIH1cbiAgICBpZiAodGhpcy5sZW4gLSB0aGlzLnBvcyA+IDQpIHsgLy8gZmFzdCByb3V0ZSAoaGkpXG4gICAgICAgIGZvciAoOyBpIDwgNTsgKytpKSB7XG4gICAgICAgICAgICAvLyA2dGguLjEwdGhcbiAgICAgICAgICAgIGJpdHMuaGkgPSAoYml0cy5oaSB8ICh0aGlzLmJ1Zlt0aGlzLnBvc10gJiAxMjcpIDw8IGkgKiA3ICsgMykgPj4+IDA7XG4gICAgICAgICAgIC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oaXMpO1xuICAgICAgICB9IHdoaWxlICh0aGlzLmJ1Zlt0aGlzLnBvcysrXSAmIDEyOCk7XG4gICAgfVxuICAgIHJldHVybiB0aGlzO1xufTtcblxuLyoqXG4gKiBTa2lwcyB0aGUgbmV4dCBlbGVtZW50IG9mIHRoZSBzcGVjaWZpZWQgd2lyZSB0eXBlLlxuICogQHBhcmFtIHtudW1iZXJ9IHdpcmVUeXBlIFdpcmUgdHlwZSByZWNlaXZlZFxuICogQHJldHVybnMge1JlYWRlcn0gYHRoaXNgXG4gKi9cblJlYWRlci5wcm90b3R5cGUuc2tpcFR5cGUgPSBmdW5jdGlvbih3aXJlVHlwZSkge1xuICAgIHN3aXRjaCAod2lyZVR5cGUpIHtcbiAgICAgICAgY2FzZSAwOlxuICAgICAgICAgICAgdGhpcy5za2lwKCk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgdGhpcy5za2lwKDgpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgIHRoaXMuc2tpcCh0aGlzLnVpbnQzMigpKTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICB3aGlsZSAoKHdpcmVUeXBlID0gdGhpcy51aW50MzIoKSAmIDcpICE9PSA0KSB7XG4gICAgICAgICAgICAgICAgdGhpcy5za2lwVHlwZSh3aXJlVHlwZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgdGhpcy5za2lwKDQpO1xuICAgICAgICAgICAgYnJlYWs7XG5cbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgZGVmYXVsdDpcbiAgICAgICAgICAgIHRocm93IEVycm9yKFwiaW52YWxpZCB3aXJlIHR5cGUgXCIgKyB3aXJlVHlwZSArIFwiIGF0IG9mZnNldCBc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QpLmZpbmlzaCgpLFxuICAgICAgICAgICAgZnVuY3Rpb24gcnBjQ2FsbGJhY2soZXJyLCByZXNwb25zZSkge1xuXG4gICAgICAgICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmVtaXQoXCJlcnJvclwiLCBlcnIsIG1ldGhvZCk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhlcnIpO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmIChyZXNwb25zZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBzZWxmLmVuZCgvKiBlbmRlZEJ5UlBDICovIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdW5kZWZpbmVkO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGlmICghKHJlc3BvbnNlIGluc3RhbmNlb2YgcmVzcG9uc2VDdG9yKSkge1xuICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2UgPSByZXNwb25zZUN0b3Jbc2VsZi5yZXNwb25zZURlbGltaXRlZCA/IFwiZGVjb2RlRGVsaW1pdGVkXCIgOiBcImRlY29kZVwiXShyZXNwb25zZSk7XG4gICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycikge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZi5lbWl0KFwiZXJyb3JcIiwgZXJyLCBtZXRob2QpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNhbGxiYWNrKGVycik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBzZWxmLmVtaXQoXCJkYXRhXCIsIHJlc3BvbnNlLCBtZXRob2QpO1xuICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhudWxsLCByZXNwb25zZSk7XG4gICAgICAgICAgICB9XG4gICAg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fVFlQRTpcbiAgICAgICAgdmFyIGNvbnRleHQgPSB0eXBlO1xuICAgICAgICByZXR1cm4gZ2V0Q29udGV4dE5hbWUoY29udGV4dCkgKyAnLkNvbnN1bWVyJztcblxuICAgICAgY2FzZSBSRUFDVF9QUk9WSURFUl9UWVBFOlxuICAgICAgICB2YXIgcHJvdmlkZXIgPSB0eXBlO1xuICAgICAgICByZXR1cm4gZ2V0Q29udGV4dE5hbWUocHJvdmlkZXIuX2NvbnRleHQpICsgJy5Qcm92aWRlcic7XG5cbiAgICAgIGNhc2UgUkVBQ1RfRk9SV0FSRF9SRUZfVFlQRTpcbiAgICAgICAgcmV0dXJuIGdldFdyYXBwZWROYW1lKHR5cGUsIHR5cGUucmVuZGVyLCAnRm9yd2FyZFJlZicpO1xuXG4gICAgICBjYXNlIFJFQUNUX01FTU9fVFlQRTpcbiAgICAgICAgdmFyIG91dGVyTmFtZSA9IHR5cGUuZGlzcGxheU5hbWUgfHwgbnVsbDtcblxuICAgICAgICBpZiAob3V0ZXJOYW1lICE9PSBudWxsKSB7XG4gICAgICAgICAgcmV0dXJuIG91dGVyTmFtZTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiBnZXRDb21wb25lbnROYW1lRnJvbVR5cGUodHlwZS50eXBlKSB8fCAnTWVtbyc7XG5cbiAgICAgIGNhc2UgUkVBQ1RfTEFaWV9UWVBFOlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIGxhenlDb21wb25lbnQgPSB0eXBlO1xuICAgICAgICAgIHZhciBwYXlsb2FkID0gbGF6eUNvbXBvbmVudC5fcGF5bG9hZDtcbiAgICAgICAgICB2YXIgaW5pdCA9IGxhenlDb21wb25lbnQuX2luaXQ7XG5cbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgcmV0dXJuIGdldENvbXBvbmVudE5hbWVGcm9tVHlwZShpbml0KHBheWxvYWQpKTtcbiAgICAgICAgICB9IGNhdGNoICh4KSB7XG4gICAgICAgICAgICByZXR1cm4gbn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50VmFsdWUyO1xuICAgICAgICB9LFxuICAgICAgICBzZXQ6IGZ1bmN0aW9uIChfY3VycmVudFZhbHVlMikge1xuICAgICAgICAgIGNvbnRleHQuX2N1cnJlbnRWYWx1ZTIgPSBfY3VycmVudFZhbHVlMjtcbiAgICAgICAgfVxuICAgICAgfSxcbiAgICAgIF90aHJlYWRDb3VudDoge1xuICAgICAgICBnZXQ6IGZ1bmN0aW9uICgpIHtcbiAgICAgICAgICByZXR1cm4gY29udGV4dC5fdGhyZWFkQ291bnQ7XG4gICAgICAgIH0sXG4gICAgICAgIHNldDogZnVuY3Rpb24gKF90aHJlYWRDb3VudCkge1xuICAgICAgICAgIGNvbnRleHQuX3RocmVhZENvdW50ID0gX3RocmVhZENvdW50O1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgQ29uc3VtZXI6IHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgaWYgKCFoYXNXYXJuZWRBYm91dFVzaW5nTmVzdGVkQ29udGV4dENvbnN1bWVycykge1xuICAgICAgICAgICAgaGFzV2FybmVkQWJvdXRVc2luZ05lc3RlZENvbnRleHRDb25zdW1lcnMgPSB0cnVlO1xuXG4gICAgICAgICAgICBlcnJvcignUmVuZGVyaW5nIDxDb250ZXh0LkNvbnN1bWVyLkNvbnN1bWVyPiBpcyBub3Qgc3VwcG9ydGVkIGFuZCB3aWxsIGJlIHJlbW92ZWQgaW4gJyArICdhIGZ1dHVyZSBtYWpvciByZWxlYXNlLiBEaWQgeW91IG1lYW4gdG8gcmVuZGVyIDxDb250ZXh0LkNvbnN1bWVyPiBpbnN0ZWFkPycpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIHJldHVybiBjb250ZXh0LkNvbnN1bWVyO1xuICAgICAgICB9XG4gICAgICB9LFxuICAgICAgZGlzcGxheU5hbWU6IHtcbiAgICAgICAgZ2V0OiBmdW5jdGlvbiAoKSB7XG4gICAgICAgICAgcmV0dXJuIGNvbnRleHQuZ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gICAgICB9KSxcbiAgICAgICAgaW5mbzogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2SW5mb1xuICAgICAgICB9KSxcbiAgICAgICAgd2FybjogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2V2FyblxuICAgICAgICB9KSxcbiAgICAgICAgZXJyb3I6IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkVycm9yXG4gICAgICAgIH0pLFxuICAgICAgICBncm91cDogYXNzaWduKHt9LCBwcm9wcywge1xuICAgICAgICAgIHZhbHVlOiBwcmV2R3JvdXBcbiAgICAgICAgfSksXG4gICAgICAgIGdyb3VwQ29sbGFwc2VkOiBhc3NpZ24oe30sIHByb3BzLCB7XG4gICAgICAgICAgdmFsdWU6IHByZXZHcm91cENvbGxhcHNlZFxuICAgICAgICB9KSxcbiAgICAgICAgZ3JvdXBFbmQ6IGFzc2lnbih7fSwgcHJvcHMsIHtcbiAgICAgICAgICB2YWx1ZTogcHJldkdyb3VwRW5kXG4gICAgICAgIH0pXG4gICAgICB9KTtcbiAgICAgIC8qIGVzbGludC1lbmFibGUgcmVhY3QtaW50ZXJuYWwvbm8tcHJvZHVjdGlvbi1sb2dnaW5nICovXG4gICAgfVxuXG4gICAgaWYgKGRpc2FibGVkRGVwdGggPCAwKSB7XG4gICAgICBlcnJvcignZGlzYWJsZWREZXB0aCBmZWxsIGJlbG93IHplcm8uICcgKyAnVGhpcyBpcyBhIGJ1ZyBpbiBSZWFjdC4gUGxlYXNlIGZpbGUgYW4gaXNzdWUuJyk7XG4gICAgfVxuICB9XG59XG5cbnZhciBSZWFjdEN1cnJlbnREaXNwYXRjaGVyJDEgPSBSZWFjdFNoYXJlZEludGVybmFscy5SZWFjdEN1cnJlbnREaXNwYXRjaGVyO1xudmFyIHByZWZpeDtcbmZ1bmN0aW9uIGRlc2NyaWJlQnVpbHRJbkNvbXBvbmVudE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gICAgIGlmIChmbi5kaXNwbGF5TmFtZSAmJiBfZnJhbWUuaW5jbHVkZXMoJzxhbm9ueW1vdXM+JykpIHtcbiAgICAgICAgICAgICAgICAgIF9mcmFtZSA9IF9mcmFtZS5yZXBsYWNlKCc8YW5vbnltb3VzPicsIGZuLmRpc3BsYXlOYW1lKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGZuID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudEZyYW1lQ2FjaGUuc2V0KGZuLCBfZnJhbWUpO1xuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gLy8gUmV0dXJuIHRoZSBsaW5lIHdlIGZvdW5kLlxuXG5cbiAgICAgICAgICAgICAgICByZXR1cm4gX2ZyYW1lO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IHdoaWxlIChzID49IDEgJiYgYyA+PSAwKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfSBmaW5hbGx5IHtcbiAgICByZWVudHJ5ID0gZmFsc2U7XG5cbiAgICB7XG4gICAgICBSZWFjdEN1cnJlbnREaXNwYXRjaGVyJDEuY3VycmVudCA9IHByZXZpb3VzRGlzcGF0Y2hlcjtcbiAgICAgIHJlZW5hYmxlTG9ncygpO1xuICAgIH1cblxuICAgIEVycm9yLnByZXBhcmVTdGFja1RyYWNlID0gcHJldmlvdXNQcmVwYXJlU3RhY2tUcmFjZTtcbiAgfSAvLyBGYWxsYmFjayB0byBqdXN0IHVzaW5nIHRoZSBuYW1lIGlmIHdlIGNvdWxkbid0IG1ha2UgaXQgdGhyb3cuXG5cblxuICB2YXIgbmFtZSA9IGZuID8gZm4uZGlzcGxheU5hbWUgfHwgZm4ubmFtZSA6ICcnO1xuICB2YXIgc3ludGhldGlj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yID1cbi8qICAgICAgICAgICAgKi9cbjI1NjtcbnZhciBSZWYgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAgICovXG41MTI7XG52YXIgU25hcHNob3QgPVxuLyogICAgICAgICAgICAgICAgICAgICAqL1xuMTAyNDtcbnZhciBQYXNzaXZlID1cbi8qICAgICAgICAgICAgICAgICAgICAgICovXG4yMDQ4O1xudmFyIEh5ZHJhdGluZyA9XG4vKiAgICAgICAgICAgICAgICAgICAgKi9cbjQwOTY7XG52YXIgVmlzaWJpbGl0eSA9XG4vKiAgICAgICAgICAgICAgICAgICAqL1xuODE5MjtcbnZhciBTdG9yZUNvbnNpc3RlbmN5ID1cbi8qICAgICAgICAgICAgICovXG4xNjM4NDtcbnZhciBMaWZlY3ljbGVFZmZlY3RNYXNrID0gUGFzc2l2ZSB8IFVwZGF0ZSB8IENhbGxiYWNrIHwgUmVmIHwgU25hcHNob3QgfCBTdG9yZUNvbnNpc3RlbmN5OyAvLyBVbmlvbiBvZiBhbGwgY29tbWl0IGZsYWdzIChmbGFncyB3aXRoIHRoZSBsaWZldGltZSBvZiBhIHBhcnRpY3VsYXIgY29tbWl0KVxuXG52YXIgSG9zdEVmZmVjdE1hc2sgPVxuLyogICAgICAgICAgICAgICAqL1xuMzI3Njc7IC8vIFRoZXNlIGFyZSBub3QgcmVhbGx5IHNpZGUgZWZmZWN0cywgYnV0IHdlIHN0aWxsIHJldXNlIHRoaXMgZmllbGQuXG5cbnZhciBJbmNvbXBsZXRlID1cbi8qICAgICAgICAgICAgICAgICAgICovXG4zMjc2ODtcbnZhciBTaG91bGRDYXB0dXJlID1cbi8qICAgICAgICAgICAgICAgICovXG42NTUzNjtcbnZhciBGb3JjZVVwZGF0ZUZvckxlZ2FjeVN1c3BlbnNlID1cbi8qICovXG4xMzEwNzI7XG52YXIgRm9ya2VkID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTA0ODU3NjsgLy8gU3RhdGljIHRhZ3MgZGVzY3JpYmUgYX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yZXR1cm4sIGFuZCBCIG11c3QgYmVsb25nIHRvIHRoZSBjaGlsZFxuICAgICAgLy8gc2V0IG9mIEIucmV0dXJuLlxuICAgICAgYSA9IHBhcmVudEE7XG4gICAgICBiID0gcGFyZW50QjtcbiAgICB9IGVsc2Uge1xuICAgICAgLy8gVGhlIHJldHVybiBwb2ludGVycyBwb2ludCB0byB0aGUgc2FtZSBmaWJlci4gV2UnbGwgaGF2ZSB0byB1c2UgdGhlXG4gICAgICAvLyBkZWZhdWx0LCBzbG93IHBhdGg6IHNjYW4gdGhlIGNoaWxkIHNldHMgb2YgZWFjaCBwYXJlbnQgYWx0ZXJuYXRlIHRvIHNlZVxuICAgICAgLy8gd2hpY2ggY2hpbGQgYmVsb25ncyB0byB3aGljaCBzZXQuXG4gICAgICAvL1xuICAgICAgLy8gU2VhcmNoIHBhcmVudCBBJ3MgY2hpbGQgc2V0XG4gICAgICB2YXIgZGlkRmluZENoaWxkID0gZmFsc2U7XG4gICAgICB2YXIgX2NoaWxkID0gcGFyZW50QS5jaGlsZDtcblxuICAgICAgd2hpbGUgKF9jaGlsZCkge1xuICAgICAgICBpZiAoX2NoaWxkID09PSBhKSB7XG4gICAgICAgICAgZGlkRmluZENoaWxkID0gdHJ1ZTtcbiAgICAgICAgICBhID0gcGFyZW50QTtcbiAgICAgICAgICBiID0gcGFyZW50QjtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICAgIGlmIChfY2hpbGQgPT09IGIpIHtcbiAgICAgICAgICBkaWRGaW5kQ2hpbGQgPSB0cnVlO1xuICAgICAgICAgIGIgPSBwYXJlbnRBO1xuICAgICAgICAgIGEgPSBwYXJlbnRCO1xuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgICAgX2NoaWxkID0gX2NoaWxkLnNpYmxpbmc7XG4gICAgICB9XG5cbiAgICAgIGlmICghZGlkRmluZENoaWxkKSB7XG4gICAgICAgIC8vIFNlYXJjaCBwYXJlbnQgQid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m9kZS5zdGF0ZU5vZGUuY29udGV4dDtcblxuICAgICAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHZhciBDb21wb25lbnQgPSBub2RlLnR5cGU7XG5cbiAgICAgICAgICAgIGlmIChpc0NvbnRleHRQcm92aWRlcihDb21wb25lbnQpKSB7XG4gICAgICAgICAgICAgIHJldHVybiBub2RlLnN0YXRlTm9kZS5fX3JlYWN0SW50ZXJuYWxNZW1vaXplZE1lcmdlZENoaWxkQ29udGV4dDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBub2RlID0gbm9kZS5yZXR1cm47XG4gICAgfSB3aGlsZSAobm9kZSAhPT0gbnVsbCk7XG5cbiAgICB0aHJvdyBuZXcgRXJyb3IoJ0ZvdW5kIHVuZXhwZWN0ZWQgZGV0YWNoZWQgc3VidHJlZSBwYXJlbnQuICcgKyAnVGhpcyBlcnJvciBpcyBsaWtlbHkgY2F1c2VkIGJ5IGEgYnVnIGluIFJlYWN0LiBQbGVhc2UgZmlsZSBhbiBpc3N1ZS4nKTtcbiAgfVxufVxuXG52YXIgTGVnYWN5Um9vdCA9IDA7XG52YXIgQ29uY3VycmVudFJvb3QgPSAxO1xuXG52YXIgTm9Nb2RlID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICovXG4wOyAvLyBUT0RPOiBSZW1vdmUgQ29uY3VycmVudE1vZGUgYnkgcmVhZGluZyBmcm9tIHRoZSByb290IHRhZyBpbnN0ZWFkXG5cbnZhciBDb25jdXJyZW50TW9kZSA9XG4vKiAgICAgICAgICAgICAgICAgKi9cbjE7XG52YXIgUHJvZmlsZU1vZGUgPVxuLyogICAgICAgICAgICAgICAgICAgICovXG4yO1xudmFyIFN0cmljdExlZ2FjeU1vZGUgPVxuLyogICAgICAgICAgICAgICAqL1xuODtcbnZhciBTdHJpY3RFZmZlY3RzTW9kZS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DtcbnZhciBEZWZhdWx0SHlkcmF0aW9uTGFuZSA9XG4vKiAgICAgICAgICAgICovXG44O1xudmFyIERlZmF1bHRMYW5lID1cbi8qICAgICAgICAgICAgICAgICAgICAgKi9cbjE2O1xudmFyIFRyYW5zaXRpb25IeWRyYXRpb25MYW5lID1cbi8qICAgICAgICAgICAgICAgICovXG4zMjtcbnZhciBUcmFuc2l0aW9uTGFuZXMgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG40MTk0MjQwO1xudmFyIFRyYW5zaXRpb25MYW5lMSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG42NDtcbnZhciBUcmFuc2l0aW9uTGFuZTIgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTI4O1xudmFyIFRyYW5zaXRpb25MYW5lMyA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICovXG4yNTY7XG52YXIgVHJhbnNpdGlvbkxhbmU0ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjUxMjtcbnZhciBUcmFuc2l0aW9uTGFuZTUgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTAyNDtcbnZhciBUcmFuc2l0aW9uTGFuZTYgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMjA0ODtcbnZhciBUcmFuc2l0aW9uTGFuZTcgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuNDA5NjtcbnZhciBUcmFuc2l0aW9uTGFuZTggPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuODE5MjtcbnZhciBUcmFuc2l0aW9uTGFuZTkgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTYzODQ7XG52YXIgVHJhbnNpdGlvbkxhbmUxMCA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjMyNzY4O1xudmFyIFRyYW5zaXRpb25MYW5lMTEgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG42NTUzNjtcbnZhciBUcmFuc2l0aW9uTGFuZTEyID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTMxMDcyO1xudmFyIFRyYW5zaXRpb25MYW5lMTMgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICovXG4yNjIxNDQ7XG52YXIgVHJhbnNpdGlvbkxhbmUxNCA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgKi9cbjUyNDI4ODtcbnZhciBUcmFuc2l0aW9uTGFuZTE1ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMTA0ODU3NjtcbnZhciBUcmFuc2l0aW9uTGFuZTE2ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAqL1xuMjA5NzE1MjtcbnZhciBSZXRyeUxhbmVzID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICovXG4xMzAwMjM0MjQ7XG52YXIgUmV0cnlMYW5lMSA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjQxOTQzMDQ7XG52YXIgUmV0cnlMYW5lMiA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjgzODg2MDg7XG52YXIgUmV0cnlMYW5lMyA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjE2Nzc3MjE2O1xudmFyIFJldHJ5TGFuZTQgPVxuLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICovXG4zMzU1NDQzMjtcbnZhciBSZXRyeUxhbmU1ID1cbi8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqL1xuNjcxMDg4NjQ7XG52YXIgU29tZVJldHJ5TGFuZSA9IFJldHJ5TGFuZTE7XG52YXIgU2VsZWN0aXZlSHlkcmF0aW9uTGFuZSA9XG4vKiAgICAgICAgICAqL1xuMTM0MjE3NzI4O1xudmFyIE5vbklkbGVMYW5lcyA9XG4vKiAgICAgICAgICAgICAgICAgICAgICAgICAgKi9cbjI2ODQzNTQ1NTtcbnZhciBJZGxlSHlkcmF0aW9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3RlZEhvb2sgJiYgdHlwZW9mIGluamVjdGVkSG9vay5vblNjaGVkdWxlRmliZXJSb290ID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICB0cnkge1xuICAgICAgICBpbmplY3RlZEhvb2sub25TY2hlZHVsZUZpYmVyUm9vdChyZW5kZXJlcklELCByb290LCBjaGlsZHJlbik7XG4gICAgICB9IGNhdGNoIChlcnIpIHtcbiAgICAgICAgaWYgKCAhaGFzTG9nZ2VkRXJyb3IpIHtcbiAgICAgICAgICBoYXNMb2dnZWRFcnJvciA9IHRydWU7XG5cbiAgICAgICAgICBlcnJvcignUmVhY3QgaW5zdHJ1bWVudGF0aW9uIGVuY291bnRlcmVkIGFuIGVycm9yOiAlcycsIGVycik7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9XG4gIH1cbn1cbmZ1bmN0aW9uIG9uQ29tbWl0Um9vdChyb290LCBldmVudFByaW9yaXR5KSB7XG4gIGlmIChpbmplY3RlZEhvb2sgJiYgdHlwZW9mIGluamVjdGVkSG9vay5vbkNvbW1pdEZpYmVyUm9vdCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgIHRyeSB7XG4gICAgICB2YXIgZGlkRXJyb3IgPSAocm9vdC5jdXJyZW50LmZsYWdzICYgRGlkQ2FwdHVyZSkgPT09IERpZENhcHR1cmU7XG5cbiAgICAgIGlmIChlbmFibGVQcm9maWxlclRpbWVyKSB7XG4gICAgICAgIHZhciBzY2hlZHVsZXJQcmlvcml0eTtcblxuICAgICAgICBzd2l0Y2ggKGV2ZW50UHJpb3JpdHkpIHtcbiAgICAgICAgICBjYXNlIERpc2NyZXRlRXZlbnRQcmlvcml0eTpcbiAgICAgICAgICAgIHNjaGVkdWxlclByaW9yaXR5ID0gSW1tZWRpYXRlUHJpb3JpdHk7XG4gICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgIGNhc2UgQ29udGludW91c0V2ZW50UHJpb3JpdHk6XG4gICAgICAgICAgICBzY2hlZHVsZXJQcmlvcml0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LiBXZSdyZSBjdXJyZW50bHkgcmVuZGVyaW5nIHRoZVxuICAgICAgLy8gc2libGluZ3Mgb2YgYSBzdXNwZW5kZWQgbm9kZS4gVGhlIG1pc21hdGNoIG1heSBiZSBkdWUgdG8gdGhlIG1pc3NpbmdcbiAgICAgIC8vIGRhdGEsIHNvIGl0J3MgcHJvYmFibHkgYSBmYWxzZSBwb3NpdGl2ZS5cbiAgICAgIHJldHVybjtcbiAgICB9XG5cbiAgICBzd2l0Y2ggKHJldHVybkZpYmVyLnRhZykge1xuICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBwYXJlbnRDb250YWluZXIgPSByZXR1cm5GaWJlci5zdGF0ZU5vZGUuY29udGFpbmVySW5mbztcblxuICAgICAgICAgIHN3aXRjaCAoZmliZXIudGFnKSB7XG4gICAgICAgICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgICAgICAgIHZhciB0eXBlID0gZmliZXIudHlwZTtcbiAgICAgICAgICAgICAgdmFyIHByb3BzID0gZmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZUluc3RhbmNlV2l0aGluQ29udGFpbmVyKHBhcmVudENvbnRhaW5lciwgdHlwZSwgcHJvcHMpO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgICAgICAgICAgdmFyIHRleHQgPSBmaWJlci5wZW5kaW5nUHJvcHM7XG4gICAgICAgICAgICAgIGRpZE5vdEZpbmRIeWRyYXRhYmxlVGV4dEluc3RhbmNlV2l0aGluQ29udGFpbmVyKHBhcmVudENvbnRhaW5lciwgdGV4dCk7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVN1c3BlbnNlSW5zdGFuY2VXaXRoaW5Db250YWluZXIocGFyZW50Q29udGFpbmVyKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIHBhcmVudFR5cGUgPSByZXR1cm5GaWJlci50eXBlO1xuICAgICAgICAgIHZhciBwYXJlbnRQcm9wcyA9IHJldHVybkZpYmVyLm1lbW9pemVkUHJvcHM7XG4gICAgICAgICAgdmFyIHBhcmVudEluc3RhbmNlID0gcmV0dXJuRmliZXIuc3RhdGVOb2RlO1xuXG4gICAgICAgICAgc3dpdGNoIChmaWJlci50YWcpIHtcbiAgICAgICAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHZhciBfdHlwZSA9IGZpYmVyLnR5cGU7XG4gICAgICAgICAgICAgICAgdmFyIF9wcm9wcyA9IGZpYmVyLnBlbmRpbmdQcm9wcztcbiAgICAgICAgICAgICAgICB2YXIgaXNDb25jdXJyZW50TW9kZSA9IChyZXR1cm5GaWJlci5tb2RlICYgQ29uY3VycmVudE1vZGUpICE9PSBOb01vZGU7XG4gICAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVJbnN0YW5jZShwYXJlbnRUeXBlLCBwYXJlbnRQcm9wcywgcGFyZW50SW5zdGFuY2UsIF90eXBlLCBfcHJvcHMsIC8vIFRPRE86IERlbGV0ZSB0aGlzIGFyZ3VtZW50IHdoZW4gd2UgcmVtb3ZlIHRoZSBsZWdhY3kgcm9vdCBBUEkuXG4gICAgICAgICAgICAgICAgaXNDb25jdXJyZW50TW9kZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIHZhciBfdGV4dCA9IGZpYmVyLnBlbmRpbmdQcm9wcztcblxuICAgICAgICAgICAgICAgIHZhciBfaXNDb25jdXJyZW50TW9kZSA9IChyZXR1cm5GaWJlci5tb2RlICYgQ29uY3VycmVudE1vZGUpICE9PSBOb01vZGU7XG5cbiAgICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVRleHRJbnN0YW5jZShwYXJlbnRUeXBlLCBwYXJlbnRQcm9wcywgcGFyZW50SW5zdGFuY2UsIF90ZXh0LCAvLyBUT0RPOiBEZWxldGUgdGhpcyBhcmd1bWVudCB3aGVuIHdlIHJlbW92ZSB0aGUgbGVnYWN5IHJvb3QgQVBJLlxuICAgICAgICAgICAgICAgIF9pc0NvbmN1cnJlbnRNb2RlKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVTdXNwZW5zZUluc3RhbmNlKHBhcmVudFR5cGUsIHBhcmVudFByb3BzLCBwYXJlbnRJbnN0YW5jZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIHN1c3BlbnNlU3RhdGUgPSByZXR1cm5GaWJlci5tZW1vaXplZFN0YXRlO1xuICAgICAgICAgIHZhciBfcGFyZW50SW5zdGFuY2UgPSBzdXNwZW5zZVN0YXRlLmRlaHlkcmF0ZWQ7XG4gICAgICAgICAgaWYgKF9wYXJlbnRJbnN0YW5jZSAhPT0gbnVsbCkgc3dpdGNoIChmaWJlci50YWcpIHtcbiAgICAgICAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAgICAgICAgdmFyIF90eXBlMiA9IGZpYmVyLnR5cGU7XG4gICAgICAgICAgICAgIHZhciBfcHJvcHMyID0gZmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZUluc3RhbmNlV2l0aGluU3VzcGVuc2VJbnN0YW5jZShfcGFyZW50SW5zdGFuY2UsIF90eXBlMiwgX3Byb3BzMik7XG4gICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICBjYXNlIEhvc3RUZXh0OlxuICAgICAgICAgICAgICB2YXIgX3RleHQyID0gZmliZXIucGVuZGluZ1Byb3BzO1xuICAgICAgICAgICAgICBkaWROb3RGaW5kSHlkcmF0YWJsZVRleHRJbnN0YW5jZVdpdGhpblN1c3BlbnNlSW5zdGFuY2UoX3BhcmVudEluc3RhbmNlLCBfdGV4dDIpO1xuICAgICAgICAgICAgICBicmVhaztcblxuICAgICAgICAgICAgY2FzZSBTdXNwZW5zZUNvbXBvbmVudDpcbiAgICAgICAgICAgICAgZGlkTm90RmluZEh5ZHJhdGFibGVTdXNwZW5zZUluc3RhbmNlV2l0aGluU3VzcGVuc2VJbnN0YW5jZShfcGFyZW50SW5zdGFuY2UpO1xuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgZGVmYXVsdDpcbiAgICAgICAgcmV0dXJuO1xuICAgIH1cbiAgfVxufVxuXG5mdW5jdGlvbiBpbnNlcnROb25IeWRyYXRlZEluc3RhbmNlKHJldHVybkZpYmVyLCBmaWJlcikge1xuICBmaWJlci5mbGFncyA9IGZpYmVyLmZsYWdzICYgfkh5ZHJhdGluZyB8IFBsYWNlbWVudDtcbiAgd2Fybk5vbmh5ZHJhdGVkSW5zdGFuY2UocmV0dXJuRmliZXIsIGZpYmVyKTtcbn1cblxuZnVuY3Rpb24gdHJ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ICBzd2l0Y2ggKHJldHVybkZpYmVyLnRhZykge1xuICAgICAgICBjYXNlIEhvc3RSb290OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHZhciBwYXJlbnRDb250YWluZXIgPSByZXR1cm5GaWJlci5zdGF0ZU5vZGUuY29udGFpbmVySW5mbztcbiAgICAgICAgICAgIHZhciBpc0NvbmN1cnJlbnRNb2RlID0gKHJldHVybkZpYmVyLm1vZGUgJiBDb25jdXJyZW50TW9kZSkgIT09IE5vTW9kZTtcbiAgICAgICAgICAgIGRpZE5vdE1hdGNoSHlkcmF0ZWRDb250YWluZXJUZXh0SW5zdGFuY2UocGFyZW50Q29udGFpbmVyLCB0ZXh0SW5zdGFuY2UsIHRleHRDb250ZW50LCAvLyBUT0RPOiBEZWxldGUgdGhpcyBhcmd1bWVudCB3aGVuIHdlIHJlbW92ZSB0aGUgbGVnYWN5IHJvb3QgQVBJLlxuICAgICAgICAgICAgaXNDb25jdXJyZW50TW9kZSk7XG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgICB9XG5cbiAgICAgICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIHZhciBwYXJlbnRUeXBlID0gcmV0dXJuRmliZXIudHlwZTtcbiAgICAgICAgICAgIHZhciBwYXJlbnRQcm9wcyA9IHJldHVybkZpYmVyLm1lbW9pemVkUHJvcHM7XG4gICAgICAgICAgICB2YXIgcGFyZW50SW5zdGFuY2UgPSByZXR1cm5GaWJlci5zdGF0ZU5vZGU7XG5cbiAgICAgICAgICAgIHZhciBfaXNDb25jdXJyZW50TW9kZTIgPSAocmV0dXJuRmliZXIubW9kZSAmIENvbmN1cnJlbnRNb2RlKSAhPT0gTm9Nb2RlO1xuXG4gICAgICAgICAgICBkaWROb3RNYXRjaEh5ZHJhdGVkVGV4dEluc3RhbmNlKHBhcmVudFR5cGUsIHBhcmVudFByb3BzLCBwYXJlbnRJbnN0YW5jZSwgdGV4dEluc3RhbmNlL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B3aGljaCBtZWFucyBpdCB3aWxsIHBlcnNpc3QgZXZlbiBpZlxuICAgICAgICAgICAgLy8gdGhpcyByZW5kZXIgaXMgdGhyb3duIGF3YXkuIFNpbmNlIGl0J3MgYSByYWNlIGNvbmRpdGlvbiwgbm90IHN1cmUgaXQnc1xuICAgICAgICAgICAgLy8gd29ydGggZml4aW5nLlxuICAgICAgICAgICAgLy8gSW5saW5lZCBgZW5xdWV1ZVVwZGF0ZWAgdG8gcmVtb3ZlIGludGVybGVhdmVkIHVwZGF0ZSBjaGVja1xuXG4gICAgICAgICAgICB2YXIgdXBkYXRlUXVldWUgPSBmaWJlci51cGRhdGVRdWV1ZTtcblxuICAgICAgICAgICAgaWYgKHVwZGF0ZVF1ZXVlID09PSBudWxsKSA7IGVsc2Uge1xuICAgICAgICAgICAgICB2YXIgc2hhcmVkUXVldWUgPSB1cGRhdGVRdWV1ZS5zaGFyZWQ7XG4gICAgICAgICAgICAgIHZhciBwZW5kaW5nID0gc2hhcmVkUXVldWUucGVuZGluZztcblxuICAgICAgICAgICAgICBpZiAocGVuZGluZyA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIC8vIFRoaXMgaXMgdGhlIGZpcnN0IHVwZGF0ZS4gQ3JlYXRlIGEgY2lyY3VsYXIgbGlzdC5cbiAgICAgICAgICAgICAgICB1cGRhdGUubmV4dCA9IHVwZGF0ZTtcbiAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICB1cGRhdGUubmV4dCA9IHBlbmRpbmcubmV4dDtcbiAgICAgICAgICAgICAgICBwZW5kaW5nLm5leHQgPSB1cGRhdGU7XG4gICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICBzaGFyZWRRdWV1ZS5wZW5kaW5nID0gdXBkYXRlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIGZpYmVyLmxhbmVzID0gbWVyZ2VMYW5lcyhmaWJlci5sYW5lcywgcmVuZGVyTGFuZXM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aWYgKCB3b3JrSW5Qcm9ncmVzcy5tb2RlICYgU3RyaWN0TGVnYWN5TW9kZSkge1xuICAgICAgICAgICAgICBzZXRJc1N0cmljdE1vZGVGb3JEZXZ0b29scyh0cnVlKTtcblxuICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHBheWxvYWQuY2FsbChpbnN0YW5jZSwgcHJldlN0YXRlLCBuZXh0UHJvcHMpO1xuICAgICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICAgIHNldElzU3RyaWN0TW9kZUZvckRldnRvb2xzKGZhbHNlKTtcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBleGl0RGlzYWxsb3dlZENvbnRleHRSZWFkSW5ERVYoKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4gbmV4dFN0YXRlO1xuICAgICAgICB9IC8vIFN0YXRlIG9iamVjdFxuXG5cbiAgICAgICAgcmV0dXJuIHBheWxvYWQ7XG4gICAgICB9XG5cbiAgICBjYXNlIENhcHR1cmVVcGRhdGU6XG4gICAgICB7XG4gICAgICAgIHdvcmtJblByb2dyZXNzLmZsYWdzID0gd29ya0luUHJvZ3Jlc3MuZmxhZ3MgJiB+U2hvdWxkQ2FwdHVyZSB8IERpZENhcHR1cmU7XG4gICAgICB9XG4gICAgLy8gSW50ZW50aW9uYWwgZmFsbHRocm91Z2hcblxuICAgIGNhc2UgVXBkYXRlU3RhdGU6XG4gICAgICB7XG4gICAgICAgIHZhciBfcGF5bG9hZCA9IHVwZGF0ZS5wYXlsb2FkO1xuICAgICAgICB2YXIgcGFydGlhbFN0YXRlO1xuXG4gICAgICAgIGlmICh0eXBlb2YgX3BheWxvYWQgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAvLyBVcGRhdGVyIGZ1bmN0aW9uXG4gICAgICAgICAge1xuICAgICAgICAgICAgZW50ZXJEaXNhbGxvd2VkQ29udGV4dFJlYWRJbkRFV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ChuZXdDaGlsZC5rZXkgPT09IGtleSkge1xuICAgICAgICAgICAgICByZXR1cm4gdXBkYXRlUG9ydGFsKHJldHVybkZpYmVyLCBvbGRGaWJlciwgbmV3Q2hpbGQsIGxhbmVzKTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIFJFQUNUX0xBWllfVFlQRTpcbiAgICAgICAgICB7XG4gICAgICAgICAgICB2YXIgcGF5bG9hZCA9IG5ld0NoaWxkLl9wYXlsb2FkO1xuICAgICAgICAgICAgdmFyIGluaXQgPSBuZXdDaGlsZC5faW5pdDtcbiAgICAgICAgICAgIHJldHVybiB1cGRhdGVTbG90KHJldHVybkZpYmVyLCBvbGRGaWJlciwgaW5pdChwYXlsb2FkKSwgbGFuZXMpO1xuICAgICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGlzQXJyYXkobmV3Q2hpbGQpIHx8IGdldEl0ZXJhdG9yRm4obmV3Q2hpbGQpKSB7XG4gICAgICAgIGlmIChrZXkgIT09IG51bGwpIHtcbiAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB1cGRhdGVGcmFnbWVudChyZXR1cm5GaWJlciwgb2xkRmliZXIsIG5ld0NoaWxkLCBsYW5lcywgbnVsbCk7XG4gICAgICB9XG5cbiAgICAgIHRocm93T25JbnZhbGlkT2JqZWN0VHlwZShyZXR1cm5GaWJlciwgbmV3Q2hpbGQpO1xuICAgIH1cblxuICAgIHtcbiAgICAgIGlmICh0eXBlb2YgbmV3Q2hpbGQgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgd2Fybk9uRnVuY3Rpb25UeXBlKHJldHVybkZpYmVyKTtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gbnVsbDtcbiAgfVxuXG4gIGZ1bmN0aW9uIHVwZGF0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AgICB3YXJuT25GdW5jdGlvblR5cGUocmV0dXJuRmliZXIpO1xuICAgICAgfVxuICAgIH1cblxuICAgIHJldHVybiBudWxsO1xuICB9XG4gIC8qKlxuICAgKiBXYXJucyBpZiB0aGVyZSBpcyBhIGR1cGxpY2F0ZSBvciBtaXNzaW5nIGtleVxuICAgKi9cblxuXG4gIGZ1bmN0aW9uIHdhcm5PbkludmFsaWRLZXkoY2hpbGQsIGtub3duS2V5cywgcmV0dXJuRmliZXIpIHtcbiAgICB7XG4gICAgICBpZiAodHlwZW9mIGNoaWxkICE9PSAnb2JqZWN0JyB8fCBjaGlsZCA9PT0gbnVsbCkge1xuICAgICAgICByZXR1cm4ga25vd25LZXlzO1xuICAgICAgfVxuXG4gICAgICBzd2l0Y2ggKGNoaWxkLiQkdHlwZW9mKSB7XG4gICAgICAgIGNhc2UgUkVBQ1RfRUxFTUVOVF9UWVBFOlxuICAgICAgICBjYXNlIFJFQUNUX1BPUlRBTF9UWVBFOlxuICAgICAgICAgIHdhcm5Gb3JNaXNzaW5nS2V5KGNoaWxkLCByZXR1cm5GaWJlcik7XG4gICAgICAgICAgdmFyIGtleSA9IGNoaWxkLmtleTtcblxuICAgICAgICAgIGlmICh0eXBlb2Yga2V5ICE9PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKGtub3duS2V5cyA9PT0gbnVsbCkge1xuICAgICAgICAgICAga25vd25LZXlzID0gbmV3IFNldCgpO1xuICAgICAgICAgICAga25vd25LZXlzLmFkZChrZXkpO1xuICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgaWYgKCFrbm93bktleXMuaGFzKGtleSkpIHtcbiAgICAgICAgICAgIGtub3duS2V5cy5hZGQoa2V5KTtcbiAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGVycm9yKCdFbmNvdW50ZXJlZCB0d28gY2hpbG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4gICAgICBpZiAoY2hpbGQua2V5ID09PSBrZXkpIHtcbiAgICAgICAgdmFyIGVsZW1lbnRUeXBlID0gZWxlbWVudC50eXBlO1xuXG4gICAgICAgIGlmIChlbGVtZW50VHlwZSA9PT0gUkVBQ1RfRlJBR01FTlRfVFlQRSkge1xuICAgICAgICAgIGlmIChjaGlsZC50YWcgPT09IEZyYWdtZW50KSB7XG4gICAgICAgICAgICBkZWxldGVSZW1haW5pbmdDaGlsZHJlbihyZXR1cm5GaWJlciwgY2hpbGQuc2libGluZyk7XG4gICAgICAgICAgICB2YXIgZXhpc3RpbmcgPSB1c2VGaWJlcihjaGlsZCwgZWxlbWVudC5wcm9wcy5jaGlsZHJlbik7XG4gICAgICAgICAgICBleGlzdGluZy5yZXR1cm4gPSByZXR1cm5GaWJlcjtcblxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBleGlzdGluZy5fZGVidWdTb3VyY2UgPSBlbGVtZW50Ll9zb3VyY2U7XG4gICAgICAgICAgICAgIGV4aXN0aW5nLl9kZWJ1Z093bmVyID0gZWxlbWVudC5fb3duZXI7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJldHVybiBleGlzdGluZztcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaWYgKGNoaWxkLmVsZW1lbnRUeXBlID09PSBlbGVtZW50VHlwZSB8fCAoIC8vIEtlZXAgdGhpcyBjaGVjayBpbmxpbmUgc28gaXQgb25seSBydW5zIG9uIHRoZSBmYWxzZSBwYXRoOlxuICAgICAgICAgICBpc0NvbXBhdGlibGVGYW1pbHlGb3JIb3RSZWxvYWRpbmcoY2hpbGQsIGVsZW1lbnQpICkgfHwgLy8gTGF6eSB0eXBlcyBzaG91bGQgcmVjb25jaWxlIHRoZWlyIHJlc29sdmVkIHR5cGUuXG4gICAgICAgICAgLy8gV2UgbmVlZCB0byBkbyB0aGlzIGFmdGVyIHRoZSBIb3QgUmVsb2FkaW5nIGNoZWNrIG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cyk7XG4gICAgICAgIHJldHVybiBjaGlsZDtcbiAgICAgIH1cblxuICAgIGNhc2UgQ2xhc3NDb21wb25lbnQ6XG4gICAgICB7XG4gICAgICAgIHtcbiAgICAgICAgICB3b3JrSW5Qcm9ncmVzcy50eXBlID0gQ29tcG9uZW50ID0gcmVzb2x2ZUNsYXNzRm9ySG90UmVsb2FkaW5nKENvbXBvbmVudCk7XG4gICAgICAgIH1cblxuICAgICAgICBjaGlsZCA9IHVwZGF0ZUNsYXNzQ29tcG9uZW50KG51bGwsIHdvcmtJblByb2dyZXNzLCBDb21wb25lbnQsIHJlc29sdmVkUHJvcHMsIHJlbmRlckxhbmVzKTtcbiAgICAgICAgcmV0dXJuIGNoaWxkO1xuICAgICAgfVxuXG4gICAgY2FzZSBGb3J3YXJkUmVmOlxuICAgICAge1xuICAgICAgICB7XG4gICAgICAgICAgd29ya0luUHJvZ3Jlc3MudHlwZSA9IENvbXBvbmVudCA9IHJlc29sdmVGb3J3YXJkUmVmRm9ySG90UmVsb2FkaW5nKENvbXBvbmVudCk7XG4gICAgICAgIH1cblxuICAgICAgICBjaGlsZCA9IHVwZGF0ZUZvcndhcmRSZWYobnVsbCwgd29ya0luUHJvZ3Jlc3MsIENvbXBvbmVudCwgcmVzb2x2ZWRQcm9wcywgcmVuZGVyTGFuZXMpO1xuICAgICAgICByZXR1cm4gY2hpbGQ7XG4gICAgICB9XG5cbiAgICBjYXNlIE1lbW9Db21wb25lbnQ6XG4gICAgICB7XG4gICAgICAgIHtcbiAgICAgICAgICBpZiAod29ya0luUHJvZ3Jlc3MudHlwZSAhPT0gd29ya0luUHJvZ3Jlc3MuZWxlbWVudFR5cGUpIHtcbiAgICAgICAgICAgIHZhciBvdXRlclByb3BUeXBlcyA9IENvbXBvbmVudC5wcm9wVHlwZXM7XG5cbiAgICAgICAgICAgIGlmIChvdXRlclByb3BUeXBlcykge1xuICAgICAgICAgICAgICBjaGVja1Byb3BUeXBlcyhvdXRlclByb3BUeXBlcywgcmV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gICAgICAvLyBiZWZvcmUgYXBwZW5kaW5nLlxuICAgICAgICB2YXIgY2hpbGQgPSBub2RlLmNoaWxkO1xuXG4gICAgICAgIGlmIChjaGlsZCAhPT0gbnVsbCkge1xuICAgICAgICAgIGNoaWxkLnJldHVybiA9IG5vZGU7XG4gICAgICAgIH1cblxuICAgICAgICBhcHBlbmRBbGxDaGlsZHJlblRvQ29udGFpbmVyKGNvbnRhaW5lckNoaWxkU2V0LCBub2RlLCB0cnVlLCB0cnVlKTtcbiAgICAgIH0gZWxzZSBpZiAobm9kZS5jaGlsZCAhPT0gbnVsbCkge1xuICAgICAgICBub2RlLmNoaWxkLnJldHVybiA9IG5vZGU7XG4gICAgICAgIG5vZGUgPSBub2RlLmNoaWxkO1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH0gLy8gJEZsb3dGaXhNZSBUaGlzIGlzIGNvcnJlY3QgYnV0IEZsb3cgaXMgY29uZnVzZWQgYnkgdGhlIGxhYmVsZWQgYnJlYWsuXG5cblxuICAgICAgbm9kZSA9IG5vZGU7XG5cbiAgICAgIGlmIChub2RlID09PSB3b3JrSW5Qcm9ncmVzcykge1xuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICAgIHdoaWxlIChub2RlLnNpYmxpbmcgPT09IG51bGwpIHtcbiAgICAgICAgaWYgKG5vZGUucmV0dXJuID09PSBudWxsIHx8IG5vZGUucmV0dXJuID09PSB3b3JrSW5Qcm9ncmVzcykge1xuICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuXG4gICAgICAgIG5vZGUgPSBub2RlLnJldHVybjtcbiAgICAgIH1cblxuICAgICAgbm9kZS5zaWJsaW5nLnJldHVybiA9IG5vZGUucmV0dXJuO1xuICAgICAgbm9kZSA9IG5vZGUuc2libGluZztcbiAgICB9XG4gIH07XG5cbiAgdXBkYXRlSG9zdENvbnRhaW5lciA9IGZ1bmN0aW9uIChjdXJyZW50LCB3b3JrSW5Qcm9ncmVzcykge1xuICAgIHZhciB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yYXRpb25FcnJvcnNUb1JlY292ZXJhYmxlKCk7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICB1cGRhdGVIb3N0Q29udGFpbmVyKGN1cnJlbnQsIHdvcmtJblByb2dyZXNzKTtcbiAgICAgICAgYnViYmxlUHJvcGVydGllcyh3b3JrSW5Qcm9ncmVzcyk7XG5cbiAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICB9XG5cbiAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICB7XG4gICAgICAgIHBvcEhvc3RDb250ZXh0KHdvcmtJblByb2dyZXNzKTtcbiAgICAgICAgdmFyIHJvb3RDb250YWluZXJJbnN0YW5jZSA9IGdldFJvb3RIb3N0Q29udGFpbmVyKCk7XG4gICAgICAgIHZhciB0eXBlID0gd29ya0luUHJvZ3Jlc3MudHlwZTtcblxuICAgICAgICBpZiAoY3VycmVudCAhPT0gbnVsbCAmJiB3b3JrSW5Qcm9ncmVzcy5zdGF0ZU5vZGUgIT0gbnVsbCkge1xuICAgICAgICAgIHVwZGF0ZUhvc3RDb21wb25lbnQkMShjdXJyZW50LCB3b3JrSW5Qcm9ncmVzcywgdHlwZSwgbmV3UHJvcHMsIHJvb3RDb250YWluZXJJbnN0YW5jZSk7XG5cbiAgICAgICAgICBpZiAoY3VycmVudC5yZWYgIT09IHdvcmtJblByb2dyZXNzLnJlZikge1xuICAgICAgICAgICAgbWFya1JlZiQxKHdvcmtJblByb2dyZXNzKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgaWYgKCFuZXdQcm9wcykge1xuICAgICAgICAgICAgaWYgKHdvcmtJblByb2dyZXNzLnN0YXRlTm9kZSA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ1dlIG11c3QgaGF2ZSBuZXcgcHJvcHMgZm9yIG5ldyBtb3VudHMuIFR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MgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgIHBvcENvbnRleHQoaW50ZXJydXB0ZWRXb3JrKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgIHtcbiAgICAgICAgdmFyIHJvb3QgPSBpbnRlcnJ1cHRlZFdvcmsuc3RhdGVOb2RlO1xuICAgICAgICBwb3BIb3N0Q29udGFpbmVyKGludGVycnVwdGVkV29yayk7XG4gICAgICAgIHBvcFRvcExldmVsQ29udGV4dE9iamVjdChpbnRlcnJ1cHRlZFdvcmspO1xuICAgICAgICByZXNldFdvcmtJblByb2dyZXNzVmVyc2lvbnMoKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICB9XG5cbiAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICB7XG4gICAgICAgIHBvcEhvc3RDb250ZXh0KGludGVycnVwdGVkV29yayk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAgcG9wSG9zdENvbnRhaW5lcihpbnRlcnJ1cHRlZFdvcmspO1xuICAgICAgYnJlYWs7XG5cbiAgICBjYXNlIFN1c3BlbnNlQ29tcG9uZW50OlxuICAgICAgcG9wU3VzcGVuc2VDb250ZXh0KGludGVycnVwdGVkV29yayk7XG4gICAgICBicmVhaztcblxuICAgIGNhc2UgU3VzcGVuc2VMaXN0Q29tcG9uZW50OlxuICAgICAgcG9wU3VzcGVuc2VDb250ZXh0KGludGVycnVwdGVkV29yayk7XG4gICAgICBicmVhaztcblxuICAgIGNhc2UgQ29udGV4dFByb3ZpZGVyOlxuICAgICAgdmFyIGNvbnRleHQgPSBpbnRlcnJ1cHRlZFdvcmsudHlwZS5fY29udGV4dDtcbiAgICAgIHBvcFByb3ZpZGVyKGNvbnRleHQsIGludGVycnVwdGVkV29yayk7XG4gICAgICBicmVhaztcblxuICAgIGNhc2UgT2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pbmlzaGVkV29yay50eXBlKTtcblxuICAgICAgICAgICAgICAgIGVycm9yKCclcy5nZXRTbmFwc2hvdEJlZm9yZVVwZGF0ZSgpOiBBIHNuYXBzaG90IHZhbHVlIChvciBudWxsKSAnICsgJ211c3QgYmUgcmV0dXJuZWQuIFlvdSBoYXZlIHJldHVybmVkIHVuZGVmaW5lZC4nLCBnZXRDb21wb25lbnROYW1lRnJvbUZpYmVyKGZpbmlzaGVkV29yaykpO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGluc3RhbmNlLl9fcmVhY3RJbnRlcm5hbFNuYXBzaG90QmVmb3JlVXBkYXRlID0gc25hcHNob3Q7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAge1xuICAgICAgICAgIGlmIChzdXBwb3J0c011dGF0aW9uKSB7XG4gICAgICAgICAgICB2YXIgcm9vdCA9IGZpbmlzaGVkV29yay5zdGF0ZU5vZGU7XG4gICAgICAgICAgICBjbGVhckNvbnRhaW5lcihyb290LmNvbnRhaW5lckluZm8pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgIGNhc2UgSG9zdFRleHQ6XG4gICAgICBjYXNlIEhvc3RQb3J0YWw6XG4gICAgICBjYXNlIEluY29tcGxldGVDbGFzc0NvbXBvbmVudDpcbiAgICAgICAgLy8gTm90aGluZyB0byBkbyBmb3IgdGhlc2UgY29tcG9uZW50IHR5cGVzXG4gICAgICAgIGJyZWFrO1xuXG4gICAgICBkZWZhdWx0OlxuICAgICAgICB7XG4gICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdUaGlzIHVuaXQgb2Ygd29yayB0YWcgc2hvdWxkIG5vdCBoYXZlIHNpZGUtZWZmZWN0cy4gVGhpcyBlcn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IHtcbiAgICAgICAgICAgICAgbWFya0NvbXBvbmVudExheW91dEVmZmVjdFVubW91bnRTdGFydGVkKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAge1xuICAgICAgICAgICAgaWYgKChmbGFncyAmIEluc2VydGlvbikgIT09IE5vRmxhZ3MkMSkge1xuICAgICAgICAgICAgICBzZXRJc1J1bm5pbmdJbnNlcnRpb25FZmZlY3QodHJ1ZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgc2FmZWx5Q2FsbERlc3Ryb3koZmluaXNoZWRXb3JrLCBuZWFyZXN0TW91bnRlZEFuY2VzdG9yLCBkZXN0cm95KTtcblxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGlmICgoZmxhZ3MgJiBJbnNlcnRpb24pICE9PSBOb0ZsYWdzJDEpIHtcbiAgICAgICAgICAgICAgc2V0SXNSdW5uaW5nSW5zZXJ0aW9uRWZmZWN0KGZhbHNlKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICB7XG4gICAgICAgICAgICBpZiAoKGZsYWdzICYgUGFzc2l2ZSQxKSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICAgIG1hcmtDb21wb25lbnRQYXNzaXZlRWZmZWN0VW5tb3VudFN0b3BwZWQoKTtcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoKGZsYWdzICYgTGF5b3V0KSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICAgIG1hcmtDb21wb25lbnRMYXlvdXRFZmZlY3RVbm1vdW50U3RvcHBlZCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBlZmZlY3QgPSBlZmZlY3QubmV4dDtcbiAgICB9IHdoaWxlIChlZmZlY3QgIT09IGZpcnN0RWZmZWN0KTtcbiAgfVxufVxuXG5mdW5jdGl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uXG4gICAgICAgIHtcbiAgICAgICAgICBpZiAoKGZsYWdzICYgSW5zZXJ0aW9uKSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICBzZXRJc1J1bm5pbmdJbnNlcnRpb25FZmZlY3QoZmFsc2UpO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHtcbiAgICAgICAgICBpZiAoKGZsYWdzICYgUGFzc2l2ZSQxKSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICBtYXJrQ29tcG9uZW50UGFzc2l2ZUVmZmVjdE1vdW50U3RvcHBlZCgpO1xuICAgICAgICAgIH0gZWxzZSBpZiAoKGZsYWdzICYgTGF5b3V0KSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICBtYXJrQ29tcG9uZW50TGF5b3V0RWZmZWN0TW91bnRTdG9wcGVkKCk7XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAge1xuICAgICAgICAgIHZhciBkZXN0cm95ID0gZWZmZWN0LmRlc3Ryb3k7XG5cbiAgICAgICAgICBpZiAoZGVzdHJveSAhPT0gdW5kZWZpbmVkICYmIHR5cGVvZiBkZXN0cm95ICE9PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICB2YXIgaG9va05hbWUgPSB2b2lkIDA7XG5cbiAgICAgICAgICAgIGlmICgoZWZmZWN0LnRhZyAmIExheW91dCkgIT09IE5vRmxhZ3MpIHtcbiAgICAgICAgICAgICAgaG9va05hbWUgPSAndXNlTGF5b3V0RWZmZWN0JztcbiAgICAgICAgICAgIH0gZWxzZSBpZiAoKGVmZmVjdC50YWcgJiBJbnNlcnRpb24pICE9PSBOb0ZsYWdzKSB7XG4gICAgICAgICAgICAgIGhvb2tOYW1lID0gJ3VzZUluc2VydGlvbkVmZmVjdCc7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBob29rTmFtZSA9ICd1c2VFZmZlY3QnO1xuICAgICAgICAgICAgfVx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cmskbWVtb2l6ZS5pZCxcbiAgICAgICAgICAgICAgICBvblBvc3RDb21taXQgPSBfZmluaXNoZWRXb3JrJG1lbW9pemUub25Qb3N0Q29tbWl0OyAvLyBUaGlzIHZhbHVlIHdpbGwgc3RpbGwgcmVmbGVjdCB0aGUgcHJldmlvdXMgY29tbWl0IHBoYXNlLlxuICAgICAgICAgICAgLy8gSXQgZG9lcyBub3QgZ2V0IHJlc2V0IHVudGlsIHRoZSBzdGFydCBvZiB0aGUgbmV4dCBjb21taXQgcGhhc2UuXG5cbiAgICAgICAgICAgIHZhciBjb21taXRUaW1lID0gZ2V0Q29tbWl0VGltZSgpO1xuICAgICAgICAgICAgdmFyIHBoYXNlID0gZmluaXNoZWRXb3JrLmFsdGVybmF0ZSA9PT0gbnVsbCA/ICdtb3VudCcgOiAndXBkYXRlJztcblxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICBpZiAoaXNDdXJyZW50VXBkYXRlTmVzdGVkKCkpIHtcbiAgICAgICAgICAgICAgICBwaGFzZSA9ICduZXN0ZWQtdXBkYXRlJztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBpZiAodHlwZW9mIG9uUG9zdENvbW1pdCA9PT0gJ2Z1bmN0aW9uJykge1xuICAgICAgICAgICAgICBvblBvc3RDb21taXQoaWQsIHBoYXNlLCBwYXNzaXZlRWZmZWN0RHVyYXRpb24sIGNvbW1pdFRpbWUpO1xuICAgICAgICAgICAgfSAvLyBCdWJibGUgdGltZXMgdG8gdGhlIG5leHQgbmVhcmVzdCBhbmNlc3RvciBQcm9maWxlci5cbiAgICAgICAgICAgIC8vIEFmdGVyIHdlIHByb2Nlc3MgdGhhdCBQcm9maWxlciwgd2UnbGwgYnViYmxlIGZ1cnRoZXIgdXAuXG5cblxuICAgICAgICAgICAgdmFyIHBhcmVudEZpYmVyID0gZmluaXNoZWRXb3JrLnJldHVybjtcblxuICAgICAgICAgICAgb3V0ZXI6IHdoaWxlIChw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pcbiAgICAgIGNhc2UgU2ltcGxlTWVtb0NvbXBvbmVudDpcbiAgICAgICAge1xuICAgICAgICAgIGlmICggIW9mZnNjcmVlblN1YnRyZWVXYXNIaWRkZW4pIHtcbiAgICAgICAgICAgIC8vIEF0IHRoaXMgcG9pbnQgbGF5b3V0IGVmZmVjdHMgaGF2ZSBhbHJlYWR5IGJlZW4gZGVzdHJveWVkIChkdXJpbmcgbXV0YXRpb24gcGhhc2UpLlxuICAgICAgICAgICAgLy8gVGhpcyBpcyBkb25lIHRvIHByZXZlbnQgc2libGluZyBjb21wb25lbnQgZWZmZWN0cyBmcm9tIGludGVyZmVyaW5nIHdpdGggZWFjaCBvdGhlcixcbiAgICAgICAgICAgIC8vIGUuZy4gYSBkZXN0cm95IGZ1bmN0aW9uIGluIG9uZSBjb21wb25lbnQgc2hvdWxkIG5ldmVyIG92ZXJyaWRlIGEgcmVmIHNldFxuICAgICAgICAgICAgLy8gYnkgYSBjcmVhdGUgZnVuY3Rpb24gaW4gYW5vdGhlciBjb21wb25lbnQgZHVyaW5nIHRoZSBzYW1lIGNvbW1pdC5cbiAgICAgICAgICAgIGlmICggZmluaXNoZWRXb3JrLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgICBjb21taXRIb29rRWZmZWN0TGlzdE1vdW50KExheW91dCB8IEhhc0VmZmVjdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgICAgfSBmaW5hbGx5IHtcbiAgICAgICAgICAgICAgICByZWNvcmRMYXlvdXRFZmZlY3REdXJhdGlvbihmaW5pc2hlZFdvcmspO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBjb21taXRIb29rRWZmZWN0TGlzdE1vdW50KExheW91dCB8IEhhc0VmZmVjdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgdmFyIGluc3RhbmNlID0gZmluaXNoZWRXb3JrLnN0YXRlTm9kZTtcblxuICAgICAgICAgIGlmIChmaW5pc2hlZFdvcmsuZmxhZ3MgJiBVcGRhdGUpIHtcbiAgICAgICAgICAgIGlmICghb2Zmc2NyZWVuU3VidHJlZVdhc0hpZGRlbikge1xuICAgICAgICAgICAgICBpZiAoY3VycmVudCA9PT0gbnVsbCkge1xuICAgICAgICAgICAgICAgIC8vIFdlIGNvdWxkIHVwZGF0ZSBpbnN0YW5jZSBwcm9wcyBhbmQgc3RhdGUgaGVyZSxcbiAgICAgICAgICAgICAgICAvLyBidXQgaW5zdGVhZCB3ZSByZWx5IG9uIHRoZW0gYmVpbmcgc2V0IGR1cmluZyBsYXN0IHJlbmRlci5cbiAgICAgICAgICAgICAgICAvLyBUT0RPOiByZXZpc2l0IHRoaXMgd2hlbiB3ZSBpbXBsZW1lbnQgcmVzdW1pbmcuXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgaWYgKGZpbmlzaGVkV29yay50eXBlID09PSBmaW5pc2hlZFdvcmsuZWxlbWVudFR5cGUgJiYgIWRpZFdhcm5BYm91dFJlYXNzaWduaW5nUHJvcHMpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGluc3RhbmNlLnByb3BzICE9PSBmaW5pc2hlZFdvcmsubWVtb2l6ZWRQcm9wcykge1xuICAgICAgICAgICAgICAgICAgICAgIGVycm9yKCdFeHBlY3RlZCAlcyBwcm9wcyB0byBtYXRjaCBtZW1vaXplZCBwcm9wcyBiZWZvcmUgJyArICdjb21wb25lbnREaWRNb3VudC4gJyArICdUaGlzIG1pZ2h0IGVpdGhlciBiZSBiZWNhdXNlIG9mIGEgYnVnIGluIFJlYWN0LCBvciBiZWNhdXNlICcgKyAnYSBjb21wb25lbnQgcmVhc3NpZ25zIGl0cyBvd24gYHRoaXMucHJvcHNgLiAnICsgJ1BsZWFzZSBmaWxlIGFuIGlzc3VlLicsIGdldENvbXBvbmVudE5hbWVGcm9tRmliZXIoZmluaXNoZWRXb3JrKSB8fCAnaW5zdGFuY2UnKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmIChpbnN0YW5jZS5zdGF0ZSAhPT0gZmluaXNoZWRXb3JrLm1lbW9pemVkU3RhdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICBlcnJvcignRXhwZWN0ZWQgJXMgc3RhdGUgdG8gbWF0Y2ggbWVtb2l6ZWQgc3RhdGUgYmVmb3JlICcgKyAnY29tcG9uZW50RGlkTW91bnQuICcgKyAnVGhpcyBtaWdodCBlaXRoZXIgYmUgYmVjYXVzZSBvZiBhIGJ1ZyBpbiBSZWFjdCwgb3IgYmVjYXVzZSAnICsgJ2EgY29tcG9uZW50IHJlYXNzaWducyBpdHMgb3duIGB0aGlzLnN0YXRlYC4gJyArICdQbGVhc2UgZmlsZSBhbiBpc3N1ZS4nLCBnZXRDb21wb25lbnROYW1lRnJvbUZpYmVyKGZpbmlzaGVkV29yaykgfHwgJ2luc3RhbmNlJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBpZiAoIGZpbmlzaGVkV29yay5tb2RlICYgUHJvZmlsZU1vZGUpIHtcbiAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgaW5zdGFuY2UuY29tcG9uZW50RGlkTW91bnQoKTtcbiAgICAgICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGluc3RhbmNlLmNvbXBvbmVudERpZE1vdW50KCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHZhciBwcmV2UHJvcHMgPSBmaW5pc2hlZFdvcmsuZWxlbWVudFR5cGUgPT09IGZpbmlzaGVkV29yay50eXBlID8gY3VycmVudC5tZW1vaXplZFByb3BzIDogcmVzb2x2ZURlZmF1bHRQcm9wcyhmaW5pc2hlZFdvcmsudHlwZSwgY3VycmVudC5tZW1vaXplZFByb3BzKTtcbiAgICAgICAgICAgICAgICB2YXIgcHJldlN0YXRlID0gY3VycmVudC5tZW1vaXplZFN0YXRlOyAvLyBXZSBjb3VsZCB1cGRhdGUgaW5zdGFuY2UgcHJvcHMgYW5kIHN0YXRlIGhlcmUsXG4gICAgICAgICAgICAgICAgLy8gYnV0IGluc3RlYWQgd2UgcmVseSBvbiB0aGVtIGJlaW5nIHNldCBkdXJpbmcgbGFzdCByZW5kZXIuXG4gICAgICAgICAgICAgICAgLy8gVE9ETzogcmV2aXNpdCB0aGlzIHdoZW4gd2UgaW1wbGVtZW50IHJlc3VtaW5nLlxuXG4gICAgICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgICAgaWYgKGZpbmlzaGVkV29yay50eXBlID09PSBmaW5pc2hlZFdvcmsuZWxlbWVudFR5cGUgJiYgIWRpZFdhcm5BYm91dFJlYXNzaWduaW5nUHJvcHMpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGluc3RhbmNlLnByb3BzICE9PSBmaW5pc2hlZFdvcmsubWVtb2l6ZWRQcm9wcykge1xuICAgICAgICAgICAgICAgICAgICAgIGVycm9yKCdFeHBlY3RlZCAlcyBwcm9wcyB0byBtYXRjaCBtZW1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gICAgICAgICAgICAgICBpbnN0YW5jZS5jb21wb25lbnREaWRVcGRhdGUocHJldlByb3BzLCBwcmV2U3RhdGUsIGluc3RhbmNlLl9fcmVhY3RJbnRlcm5hbFNuYXBzaG90QmVmb3JlVXBkYXRlKTtcbiAgICAgICAgICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgIGluc3RhbmNlLmNvbXBvbmVudERpZFVwZGF0ZShwcmV2UHJvcHMsIHByZXZTdGF0ZSwgaW5zdGFuY2UuX19yZWFjdEludGVybmFsU25hcHNob3RCZWZvcmVVcGRhdGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH0gLy8gVE9ETzogSSB0aGluayB0aGlzIGlzIG5vdyBhbHdheXMgbm9uLW51bGwgYnkgdGhlIHRpbWUgaXQgcmVhY2hlcyB0aGVcbiAgICAgICAgICAvLyBjb21taXQgcGhhc2UuIENvbnNpZGVyIHJlbW92aW5nIHRoZSB0eXBlIGNoZWNrLlxuXG5cbiAgICAgICAgICB2YXIgdXBkYXRlUXVldWUgPSBmaW5pc2hlZFdvcmsudXBkYXRlUXVldWU7XG5cbiAgICAgICAgICBpZiAodXBkYXRlUXVldWUgIT09IG51bGwpIHtcbiAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgaWYgKGZpbmlzaGVkV29yay50eXBlID09PSBmaW5pc2hlZFdvcmsuZWxlbWVudFR5cGUgJiYgIWRpZFdhcm5BYm91dFJlYXNzaWduaW5nUHJvcHMpIHtcbiAgICAgICAgICAgICAgICBpZiAoaW5zdGFuY2UucHJvcHMgIT09IGZpbmlzaGVkV29yay5tZW1vaXplZFByb3BzKSB7XG4gICAgICAgICA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BpbnN0ZWFkIHdlIHJlbHkgb24gdGhlbSBiZWluZyBzZXQgZHVyaW5nIGxhc3QgcmVuZGVyLlxuICAgICAgICAgICAgLy8gVE9ETzogcmV2aXNpdCB0aGlzIHdoZW4gd2UgaW1wbGVtZW50IHJlc3VtaW5nLlxuXG5cbiAgICAgICAgICAgIGNvbW1pdFVwZGF0ZVF1ZXVlKGZpbmlzaGVkV29yaywgdXBkYXRlUXVldWUsIGluc3RhbmNlKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RSb290OlxuICAgICAgICB7XG4gICAgICAgICAgLy8gVE9ETzogSSB0aGluayB0aGlzIGlzIG5vdyBhbHdheXMgbm9uLW51bGwgYnkgdGhlIHRpbWUgaXQgcmVhY2hlcyB0aGVcbiAgICAgICAgICAvLyBjb21taXQgcGhhc2UuIENvbnNpZGVyIHJlbW92aW5nIHRoZSB0eXBlIGNoZWNrLlxuICAgICAgICAgIHZhciBfdXBkYXRlUXVldWUgPSBmaW5pc2hlZFdvcmsudXBkYXRlUXVldWU7XG5cbiAgICAgICAgICBpZiAoX3VwZGF0ZVF1ZXVlICE9PSBudWxsKSB7XG4gICAgICAgICAgICB2YXIgX2luc3RhbmNlID0gbnVsbDtcblxuICAgICAgICAgICAgaWYgKGZpbmlzaGVkV29yay5jaGlsZCAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBzd2l0Y2ggKGZpbmlzaGVkV29yay5jaGlsZC50YWcpIHtcbiAgICAgICAgICAgICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgICAgICAgICAgICBfaW5zdGFuY2UgPSBnZXRQdWJsaWNJbnN0YW5jZShmaW5pc2hlZFdvcmsuY2hpbGQuc3RhdGVOb2RlKTtcbiAgICAgICAgICAgICAgICAgIGJyZWFrO1xuXG4gICAgICAgICAgICAgICAgY2FzZSBDbGFzc0NvbXBvbmVudDpcbiAgICAgICAgICAgICAgICAgIF9pbnN0YW5jZSA9IGZpbmlzaGVkV29yay5jaGlsZC5zdGF0ZU5vZGU7XG4gICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjb21taXRVcGRhdGVRdWV1ZShmaW5pc2hlZFdvcmssIF91cGRhdGVRdWV1ZSwgX2luc3RhbmNlKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RDb21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICB2YXIgX2luc3RhbmNlMiA9IGZpbmlzaGVkV29yay5zdGF0ZU5vZGU7IC8vIFJlbmRlcmVycyBtYXkgc2NoZWR1bGUgd29yayB0byBiZSBkb25lIGFmdGVyIGhvc3QgY29tcG9uZW50cyBhcmUgbW91bnRlZFxuICAgICAgICAgIC8vIChlZyBET00gcmVuZGVyZXIgbWF5IHNjaGVkdWxlIGF1dG8tZm9jdXMgZm9yIGlucHV0cyBhbmQgZm9ybSBjb250cm9scykuXG4gICAgICAgICAgLy8gVGhlc2UgZWZmZWN0cyBzaG91bGQgb25seSBiZSBjb21taXR0ZWQgd2hlbiBjb21wb25lbnRzIGFyZSBmaXJzdCBtb3VudGVkLFxuICAgICAgICAgIC8vIGFrYSB3aGVuIHRoZXJlIGlzIG5vIGN1cnJlbnQvYWx0ZXJuYXRlLlxuXG4gICAgICAgICAgaWYgKGN1cnJlbnQgPT09IG51bGwgJiYgZmluaXNoZWRXb3JrLmZsYWdzICYgVXBkYXRlKSB7XG4gICAgICAgICAgICB2YXIgdHlwZSA9IGZpbmlzaGVkV29yay50eXBlO1xuICAgICAgICAgICAgdmFyIHByb3BzID0gZmluaXNoZWRXb3JrLm1lbW9pemVkUHJvcHM7XG4gICAgICAgICAgICBjb21taXRNb3VudChfaW5zdGFuY2UyLCB0eXBlLCBwcm9wcywgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RUZXh0OlxuICAgICAgICB7XG4gICAgICAgICAgLy8gV2UgaGF2ZSBubyBsaWZlLWN5Y2xlcyBhc3NvY2lhdGVkIHdpdGggdGV4dC5cbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIEhvc3RQb3J0YWw6XG4gICAgICAgIHtcbiAgICAgICAgICAvLyBXZSBoYXZlIG5vIGxpZmUtY3ljbGVzIGFzc29jaWF0ZWQgd2l0aCBwb3J0YWxzLlxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgUHJvZmlsZXI6XG4gICAgICAgIHtcbiAgICAgICAgICB7XG4gICAgICAgICAgICB2YXIgX2ZpbmlzaGVkV29yayRtZW1vaXplMiA9IGZpbmlzaGVkV29yay5tZW1vaXplZFByb3BzLFxuICAgICAgICAgICAgICAgIG9uQ29tbWl0ID0gX2ZpbmlzaGVkV29yayRtZW1vaXplMi5vbkNvbW1pdCxcbiAgICAgICAgICAgICAgICBvblJlbmRlciA9IF9maW5pc2hlZFdvcmskbWVtb2l6ZTIub25SZW5kZXI7XG4gICAgICAgICAgICB2YXIgZWZmZWN0RHVyYXRpb24gPSBmaW5pc2hlZFdvcmsuc3RhdGVOb2RlLmVmZmVjdER1cmF0aW9uO1xuICAgICAgICAgICAgdmFyIGNvbW1pdFRpbWUgPSBnZXRDb21taXRUaW1lKCk7XG4gICAgICAgICAgICB2YXIgcGhhc2UgPSBjdXJyZW50ID09PSBudWxsID8gJ21vdW50JyA6ICd1cGRhdGUnO1xuXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgIGlmIChpc0N1cnJlbnRVcGRhdGVOZXN0ZWQoKSkge1xuICAgICAgICAgICAgICAgIHBoYXNlID0gJ25lc3RlZC11cGRhdGUnO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiA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gICAgICAgLy8gRG8gbm90IHJlc2V0IHRoZXNlIHZhbHVlcyB1bnRpbCB0aGUgbmV4dCByZW5kZXIgc28gRGV2VG9vbHMgaGFzIGEgY2hhbmNlIHRvIHJlYWQgdGhlbSBmaXJzdC5cblxuICAgICAgICAgICAgICB2YXIgcGFyZW50RmliZXIgPSBmaW5pc2hlZFdvcmsucmV0dXJuO1xuXG4gICAgICAgICAgICAgIG91dGVyOiB3aGlsZSAocGFyZW50RmliZXIgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKHBhcmVudEZpYmVyLnRhZykge1xuICAgICAgICAgICAgICAgICAgY2FzZSBIb3N0Um9vdDpcbiAgICAgICAgICAgICAgICAgICAgdmFyIHJvb3QgPSBwYXJlbnRGaWJlci5zdGF0ZU5vZGU7XG4gICAgICAgICAgICAgICAgICAgIHJvb3QuZWZmZWN0RHVyYXRpb24gKz0gZWZmZWN0RHVyYXRpb247XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuXG4gICAgICAgICAgICAgICAgICBjYXNlIFByb2ZpbGVyOlxuICAgICAgICAgICAgICAgICAgICB2YXIgcGFyZW50U3RhdGVOb2RlID0gcGFyZW50RmliZXIuc3RhdGVOb2RlO1xuICAgICAgICAgICAgICAgICAgICBwYXJlbnRTdGF0ZU5vZGUuZWZmZWN0RHVyYXRpb24gKz0gZWZmZWN0RHVyYXRpb247XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrIG91dGVyO1xuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIHBhcmVudEZpYmVyID0gcGFyZW50RmliZXIucmV0dXJuO1xuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cblxuICAgICAgY2FzZSBTdXNwZW5zZUNvbXBvbmVudDpcbiAgICAgICAge1xuICAgICAgICAgIGNvbW1pdFN1c3BlbnNlSHlkcm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hdGljXG4gIHN3aXRjaCAobm9kZS50YWcpIHtcbiAgICBjYXNlIEZ1bmN0aW9uQ29tcG9uZW50OlxuICAgIGNhc2UgRm9yd2FyZFJlZjpcbiAgICBjYXNlIFNpbXBsZU1lbW9Db21wb25lbnQ6XG4gICAgICB7XG4gICAgICAgIGlmICggbm9kZS5tb2RlICYgUHJvZmlsZU1vZGUpIHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgc3RhcnRMYXlvdXRFZmZlY3RUaW1lcigpO1xuICAgICAgICAgICAgc2FmZWx5Q2FsbENvbW1pdEhvb2tMYXlvdXRFZmZlY3RMaXN0TW91bnQobm9kZSwgbm9kZS5yZXR1cm4pO1xuICAgICAgICAgIH0gZmluYWxseSB7XG4gICAgICAgICAgICByZWNvcmRMYXlvdXRFZmZlY3REdXJhdGlvbihub2RlKTtcbiAgICAgICAgICB9XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgc2FmZWx5Q2FsbENvbW1pdEhvb2tMYXlvdXRFZmZlY3RMaXN0TW91bnQobm9kZSwgbm9kZS5yZXR1cm4pO1xuICAgICAgICB9XG5cbiAgICAgICAgYnJlYWs7XG4gICAgICB9XG5cbiAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAge1xuICAgICAgICB2YXIgaW5zdGFuY2UgPSBub2RlLnN0YXRlTm9kZTtcblxuICAgICAgICBpZiAodHlwZW9mIGluc3RhbmNlLmNvbXBvbmVudERpZE1vdW50ID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgc2FmZWx5Q2FsbENvbXBvbmVudERpZE1vdW50KG5vZGUsIG5vZGUucmV0dXJuLCBpbnN0YW5jZSk7XG4gICAgICAgIH1cblxuICAgICAgICBzYWZlbHlBdHRhY2hSZWYobm9kZSwgbm9kZS5yZXR1cm4pO1xuICAgICAgICBicmVhaztcbiAgICAgIH1cblxuICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgIHtcbiAgICAgICAgc2FmZ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29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0gZWxzZSBpZiAobm9kZS50YWcgPT09IEhvc3RUZXh0KSB7XG4gICAgICAgIGlmIChob3N0U3VidHJlZVJvb3QgPT09IG51bGwpIHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgdmFyIF9pbnN0YW5jZTMgPSBub2RlLnN0YXRlTm9kZTtcblxuICAgICAgICAgICAgaWYgKGlzSGlkZGVuKSB7XG4gICAgICAgICAgICAgIGhpZGVUZXh0SW5zdGFuY2UoX2luc3RhbmNlMyk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICB1bmhpZGVUZXh0SW5zdGFuY2UoX2luc3RhbmNlMywgbm9kZS5tZW1vaXplZFByb3BzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9IGVsc2UgaWYgKChub2RlLnRhZyA9PT0gT2Zmc2NyZWVuQ29tcG9uZW50IHx8IG5vZGUudGFnID09PSBMZWdhY3lIaWRkZW5Db21wb25lbnQpICYmIG5vZGUubWVtb2l6ZWRTdGF0ZSAhPT0gbnVsbCAmJiBub2RlICE9PSBmaW5pc2hlZFdvcmspIDsgZWxzZSBpZiAobm9kZS5jaGlsZCAhPT0gbnVsbCkge1xuICAgICAgICBub2RlLmNoaWxkLnJldHVybiA9IG5vZGU7XG4gICAgICAgIG5vZGUgPSBub2RlLmNoaWxkO1xuICAgICAgICBjb250aW51ZTtcbiAgICAgIH1cblxuICAgICAgaWYgKG5vZGUgPT09IGZpbmlzaGVkV29yaykge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biAgICAgICAgY2FzZSBIb3N0Q29tcG9uZW50OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGhvc3RQYXJlbnQgPSBwYXJlbnQuc3RhdGVOb2RlO1xuICAgICAgICAgICAgaG9zdFBhcmVudElzQ29udGFpbmVyID0gZmFsc2U7XG4gICAgICAgICAgICBicmVhayBmaW5kUGFyZW50O1xuICAgICAgICAgIH1cblxuICAgICAgICBjYXNlIEhvc3RSb290OlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGhvc3RQYXJlbnQgPSBwYXJlbnQuc3RhdGVOb2RlLmNvbnRhaW5lckluZm87XG4gICAgICAgICAgICBob3N0UGFyZW50SXNDb250YWluZXIgPSB0cnVlO1xuICAgICAgICAgICAgYnJlYWsgZmluZFBhcmVudDtcbiAgICAgICAgICB9XG5cbiAgICAgICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAgICAgIHtcbiAgICAgICAgICAgIGhvc3RQYXJlbnQgPSBwYXJlbnQuc3RhdGVOb2RlLmNvbnRhaW5lckluZm87XG4gICAgICAgICAgICBob3N0UGFyZW50SXNDb250YWluZXIgPSB0cnVlO1xuICAgICAgICAgICAgYnJlYWsgZmluZFBhcmVudDtcbiAgICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIHBhcmVudCA9IHBhcmVudC5yZXR1cm47XG4gICAgfVxuXG4gICAgaWYgKGhvc3RQYXJlbnQgPT09IG51bGwpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcignRXhwZWN0ZWQgdG8gZmluZCBhIGhvc3QgcGFyZW50LiBUaGlzIGVycm9yIGlzIGxpa2VseSBjYXVzZWQgYnkgJyArICdhIGJ1ZyBpbiBSZWFjdC4gUGxlYXNlIGZpbGUgYW4gaXNzdWUuJyk7XG4gICAgfVxuXG4gICAgY29tbWl0RGVsZXRpb25FZmZlY3RzT25GaWJlcihyb290LCByZXR1cm5GaWJlciwgZGVsZXRlZEZpYmVyKTtcbiAgICBob3N0UGFyZW50ID0gbnVs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Glvbikge1xuICAgICAgICAgIGlmIChob3N0UGFyZW50ICE9PSBudWxsKSB7XG4gICAgICAgICAgICBpZiAoaG9zdFBhcmVudElzQ29udGFpbmVyKSB7XG4gICAgICAgICAgICAgIGNsZWFyU3VzcGVuc2VCb3VuZGFyeUZyb21Db250YWluZXIoaG9zdFBhcmVudCwgZGVsZXRlZEZpYmVyLnN0YXRlTm9kZSk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBjbGVhclN1c3BlbnNlQm91bmRhcnkoaG9zdFBhcmVudCwgZGVsZXRlZEZpYmVyLnN0YXRlTm9kZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAge1xuICAgICAgICBpZiAoc3VwcG9ydHNNdXRhdGlvbikge1xuICAgICAgICAgIC8vIFdoZW4gd2UgZ28gaW50byBhIHBvcnRhbCwgaXQgYmVjb21lcyB0aGUgcGFyZW50IHRvIHJlbW92ZSBmcm9tLlxuICAgICAgICAgIHZhciBfcHJldkhvc3RQYXJlbnQgPSBob3N0UGFyZW50O1xuICAgICAgICAgIHZhciBfcHJldkhvc3RQYXJlbnRJc0NvbnRhaW5lciA9IGhvc3RQYXJlbnRJc0NvbnRhaW5lcjtcbiAgICAgICAgICBob3N0UGFyZW50ID0gZGVsZXRlZEZpYmVyLnN0YXRlTm9kZS5jb250YWluZXJJbmZvO1xuICAgICAgICAgIGhvc3RQYXJlbnRJc0NvbnRhaW5lciA9IHRydWU7XG4gICAgICAgICAgcmVjdXJzaXZlbHlUcmF2ZXJzZURlbGV0aW9uRWZmZWN0cyhmaW5pc2hlZFJvb3QsIG5lYXJlc3RNb3VudGVkQW5jZXN0b3IsIGRlbGV0ZWRGaWJlcik7XG4gICAgICAgICAgaG9zdFBhcmVudCA9IF9wcmV2SG9zdFBhcmVudDtcbiAgICAgICAgIC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dGFnID0gX2VmZmVjdC50YWc7XG5cbiAgICAgICAgICAgICAgICBpZiAoZGVzdHJveSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICBpZiAoKHRhZyAmIEluc2VydGlvbikgIT09IE5vRmxhZ3MkMSkge1xuICAgICAgICAgICAgICAgICAgICBzYWZlbHlDYWxsRGVzdHJveShkZWxldGVkRmliZXIsIG5lYXJlc3RNb3VudGVkQW5jZXN0b3IsIGRlc3Ryb3kpO1xuICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgodGFnICYgTGF5b3V0KSAhPT0gTm9GbGFncyQxKSB7XG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBtYXJrQ29tcG9uZW50TGF5b3V0RWZmZWN0VW5tb3VudFN0YXJ0ZWQoZGVsZXRlZEZpYmVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmICggZGVsZXRlZEZpYmVyLm1vZGUgJiBQcm9maWxlTW9kZSkge1xuICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgICBzYWZlbHlDYWxsRGVzdHJveShkZWxldGVkRmliZXIsIG5lYXJlc3RNb3VudGVkQW5jZXN0b3IsIGRlc3Ryb3kpO1xuICAgICAgICAgICAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGRlbGV0ZWRGaWJlcik7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgc2FmZWx5Q2FsbERlc3Ryb3koZGVsZXRlZEZpYmVyLCBuZWFyZXN0TW91bnRlZEFuY2VzdG9yLCBkZXN0cm95KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICBtYXJrQ29tcG9uZW50T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dvcmssIGZpbmlzaGVkV29yay5yZXR1cm4pO1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHJlY29yZExheW91dEVmZmVjdER1cmF0aW9uKGZpbmlzaGVkV29yayk7XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIGNvbW1pdEhvb2tFZmZlY3RMaXN0VW5tb3VudChMYXlvdXQgfCBIYXNFZmZlY3QsIGZpbmlzaGVkV29yaywgZmluaXNoZWRXb3JrLnJldHVybik7XG4gICAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm47XG4gICAgICB9XG5cbiAgICBjYXNlIENsYXNzQ29tcG9uZW50OlxuICAgICAge1xuICAgICAgICByZWN1cnNpdmVseVRyYXZlcnNlTXV0YXRpb25FZmZlY3RzKHJvb3QsIGZpbmlzaGVkV29yayk7XG4gICAgICAgIGNvbW1pdFJlY29uY2lsaWF0aW9uRWZmZWN0cyhmaW5pc2hlZFdvcmspO1xuXG4gICAgICAgIGlmIChmbGFncyAmIFJlZikge1xuICAgICAgICAgIGlmIChjdXJyZW50ICE9PSBudWxsKSB7XG4gICAgICAgICAgICBzYWZlbHlEZXRhY2hSZWYoY3VycmVudCwgY3VycmVudC5yZXR1cm4pO1xuICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cblxuICAgIGN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BzcGVjaWZpYyB0byBob3N0IGNvbXBvbmVudHMuXG5cbiAgICAgICAgICAgICAgdmFyIHVwZGF0ZVBheWxvYWQgPSBmaW5pc2hlZFdvcmsudXBkYXRlUXVldWU7XG4gICAgICAgICAgICAgIGZpbmlzaGVkV29yay51cGRhdGVRdWV1ZSA9IG51bGw7XG5cbiAgICAgICAgICAgICAgaWYgKHVwZGF0ZVBheWxvYWQgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgY29tbWl0VXBkYXRlKF9pbnN0YW5jZTQsIHVwZGF0ZVBheWxvYWQsIHR5cGUsIG9sZFByb3BzLCBuZXdQcm9wcywgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0VGV4dDpcbiAgICAgIHtcbiAgICAgICAgcmVjdXJzaXZlbHlUcmF2ZXJzZU11dGF0aW9uRWZmZWN0cyhyb290LCBmaW5pc2hlZFdvcmspO1xuICAgICAgICBjb21taXRSZWNvbmNpbGlhdGlvbkVmZmVjdHMoZmluaXNoZWRXb3JrKTtcblxuICAgICAgICBpZiAoZmxhZ3MgJiBVcGRhdGUpIHtcbiAgICAgICAgICBpZiAoc3VwcG9ydHNNdXRhdGlvbikge1xuICAgICAgICAgICAgaWYgKGZpbmlzaGVkV29yay5zdGF0ZU5vZGUgPT09IG51bGwpIHtcbiAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdUaGlzIHNob3VsZCBoYXZlIGE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mVjdHMocm9vdCwgZmluaXNoZWRXb3JrKTtcbiAgICAgICAgY29tbWl0UmVjb25jaWxpYXRpb25FZmZlY3RzKGZpbmlzaGVkV29yayk7XG5cbiAgICAgICAgaWYgKGZsYWdzICYgVXBkYXRlKSB7XG4gICAgICAgICAgaWYgKHN1cHBvcnRzTXV0YXRpb24gJiYgc3VwcG9ydHNIeWRyYXRpb24pIHtcbiAgICAgICAgICAgIGlmIChjdXJyZW50ICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIHZhciBwcmV2Um9vdFN0YXRlID0gY3VycmVudC5tZW1vaXplZFN0YXRlO1xuXG4gICAgICAgICAgICAgIGlmIChwcmV2Um9vdFN0YXRlLmlzRGVoeWRyYXRlZCkge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICBjb21taXRIeWRyYXRlZENvbnRhaW5lcihyb290LmNvbnRhaW5lckluZm8pO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgICBjYXB0dXJlQ29tbWl0UGhhc2VFcnJvcihmaW5pc2hlZFdvcmssIGZpbmlzaGVkV29yay5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG5cbiAgICAgICAgICBpZiAoc3VwcG9ydHNQZXJzaXN0ZW5jZSkge1xuICAgICAgICAgICAgdmFyIGNvbnRhaW5lckluZm8gPSByb290LmNvbnRhaW5lckluZm87XG4gICAgICAgICAgICB2YXIgcGVuZGluZ0NoaWxkcmVuID0gcm9vdC5wZW5kaW5nQ2hpbGRyZW47XG5cbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIHJlcGxhY2VDb250YWluZXJDaGlsZHJlbihjb250YWluZXJJbmZvLCBwZW5kaW5nQ2hpbGRyZW4pO1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBIb3N0UG9ydGFsOlxuICAgICAge1xuICAgICAgICByZWN1cnNpdmVseVRyYXZlcnNlTXV0YXRpb25FZmZlY3RzKHJvb3QsIGZpbmlzaGVkV29yayk7XG4gICAgICAgIGNvbW1pdFJlY29uY2lsaWF0aW9uRWZmZWN0cyhmaW5pc2hlZFdvcmspO1xuXG4gICAgICAgIGlmIChmbGFncyAmIFVwZGF0ZSkge1xuICAgICAgICAgIGlmIChzdXBwb3J0c1BlcnNpc3RlbmNlKSB7XG4gICAgICAgICAgICB2YXIgcG9ydGFsID0gZmluaXNoZWRXb3JrLnN0YXRlTm9kZTtcbiAgICAgICAgICAgIHZhciBfY29udGFpbmVySW5mbyA9IHBvcnRhbC5jb250YWluZXJJbmZvO1xuICAgICAgICAgICAgdmFyIF9wZW5kaW5nQ2hpbGRyZW4gPSBwb3J0YWwucGVuZGluZ0NoaWxkcmVuO1xuXG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICByZXBsYWNlQ29udGFpbmVyQ2hpbGRyZW4oX2NvbnRhaW5lckluZm8sIF9wZW5kaW5nQ2hpbGRyZW4pO1xuICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgY2FwdHVyZUNvbW1pdFBoYXNlRXJyb3IoZmluaXNoZWRXb3JrLCBmaW5pc2hlZFdvcmsucmV0dXJuLCBlcnJvcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgcmV0dXJuO1xuICAgICAgfVxuXG4gICAgY2FzZSBTdXNwZW5zZUNvbXBvbmVudDpcbiAgICA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maWJlci5yZXR1cm47XG4gICAgICBuZXh0RWZmZWN0ID0gc2libGluZztcbiAgICAgIHJldHVybjtcbiAgICB9XG5cbiAgICBuZXh0RWZmZWN0ID0gZmliZXIucmV0dXJuO1xuICB9XG59XG5cbmZ1bmN0aW9uIGRpc2FwcGVhckxheW91dEVmZmVjdHNfYmVnaW4oc3VidHJlZVJvb3QpIHtcbiAgd2hpbGUgKG5leHRFZmZlY3QgIT09IG51bGwpIHtcbiAgICB2YXIgZmliZXIgPSBuZXh0RWZmZWN0O1xuICAgIHZhciBmaXJzdENoaWxkID0gZmliZXIuY2hpbGQ7IC8vIFRPRE8gKE9mZnNjcmVlbikgQ2hlY2s6IGZsYWdzICYgKFJlZlN0YXRpYyB8IExheW91dFN0YXRpYylcblxuICAgIHN3aXRjaCAoZmliZXIudGFnKSB7XG4gICAgICBjYXNlIEZ1bmN0aW9uQ29tcG9uZW50OlxuICAgICAgY2FzZSBGb3J3YXJkUmVmOlxuICAgICAgY2FzZSBNZW1vQ29tcG9uZW50OlxuICAgICAgY2FzZSBTaW1wbGVNZW1vQ29tcG9uZW50OlxuICAgICAgICB7XG4gICAgICAgICAgaWYgKCBmaWJlci5tb2RlICYgUHJvZmlsZU1vZGUpIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgIHN0YXJ0TGF5b3V0RWZmZWN0VGltZXIoKTtcbiAgICAgICAgICAgICAgY29tbWl0SG9va0VmZmVjdExpc3RVbm1vdW50KExheW91dCwgZmliZXIsIGZpYmVyLnJldHVybik7XG4gICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICByZWNvcmRMYXlvdXRFZmZlY3REdXJhdGlvbihmaWJlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvbW1pdEhvb2tFZmZlY3RMaXN0VW5tb3VudChMYXlvdXQsIGZpYmVyLCBmaWJlci5yZXR1cm4pO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgQ2xhc3NDb21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICAvLyBUT0RPIChPZmZzY3JlZW4pIENoZWNrOiBmbGFncyAmIFJlZlN0YXRpY1xuICAgICAgICAgIHNhZmVseURldGFjaFJlZihmaWJlciwgZmliZXIucmV0dXJuKTtcbiAgICAgICAgICB2YXIgaW5zdGFuY2UgPSBmaWJlci5zdGF0ZU5vZGU7XG5cbiAgICAgICAgICBpZiAodHlwZW9mIGluc3RhbmNlLmNvbXBvbmVudFdpbGxVbm1vdW50ID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICBzYWZlbHlDYWxsQ29tcG9uZW50V2lsbFVubW91bnQoZmliZXIsIGZpYmVyLnJldHVybiwgaW5zdGFuY2UpO1xuICAgICAgICAgIH1cblxuICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG5cbiAgICAgIGNhc2UgSG9zdENvbXBvbmVudDpcbiAgICAgICAge1xuICAgICAgICAgIHNhZmVseURldGFjaFJlZihmaWJlciwgZmliZXIucmV0dXJuKTtcbiAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuXG4gICAgICBjYXNlIE9mZnNjcmVlbkNvbXBvbmVudDpcbiAgICAgICAge1xuICAgICAgICAgIC8vIENoZWNrIGlmIHRoaXMgaXMgYVxuICAgICAgICAgIHZhciBpc0hpZGRlbiA9IGZpYmVyLm1lbW9pemVkU3RhdGUgIT09IG51bGw7XG5cbiAgICAgICAgICBpZiAoaXNIaWRkZW4pIHtcbiAgICAgICAgICAgIC8vIE5lc3RlZCBPZmZzY3JlZW4gdHJlZSBpcyBhbHJlYWR5IGhpZGRlbi4gRG9uJ3QgZGlzYXBwZWFyXG4gICAgICAgICAgICAvLyBpdHMgZWZmZWN0cy5cbiAgICAgICAgICAgIGRpc2FwcGVhckxheW91dEVmZmVjdHNfY29tcGxldGUoc3VidHJlZVJvb3QpO1xuICA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ICAgICAgY2FzZSBDbGFzc0NvbXBvbmVudDpcbiAgICAgICAge1xuICAgICAgICAgIHZhciBpbnN0YW5jZSA9IGZpYmVyLnN0YXRlTm9kZTtcblxuICAgICAgICAgIGlmICh0eXBlb2YgaW5zdGFuY2UuY29tcG9uZW50V2lsbFVubW91bnQgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgIHNhZmVseUNhbGxDb21wb25lbnRXaWxsVW5tb3VudChmaWJlciwgZmliZXIucmV0dXJuLCBpbnN0YW5jZSk7XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICB9XG4gIH1cbn1cblxuZnVuY3Rpb24gaW52b2tlUGFzc2l2ZUVmZmVjdFVubW91bnRJbkRFVihmaWJlcikge1xuICB7XG4gICAgLy8gV2UgZG9uJ3QgbmVlZCB0byByZS1jaGVjayBTdHJpY3RFZmZlY3RzTW9kZSBoZXJlLlxuICAgIC8vIFRoaXMgZnVuY3Rpb24gaXMgb25seSBjYWxsZWQgaWYgdGhhdCBjaGVjayBoYXMgYWxyZWFkeSBwYXNzZWQuXG4gICAgc3dpdGNoIChmaWJlci50YWcpIHtcbiAgICAgIGNhc2UgRnVuY3Rpb25Db21wb25lbnQ6XG4gICAgICBjYXNlIEZvcndhcmRSZWY6XG4gICAgICBjYXNlIFNpbXBsZU1lbW9Db21wb25lbnQ6XG4gICAgICAgIHtcbiAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29tbWl0SG9va0VmZmVjdExpc3RVbm1vdW50KFBhc3NpdmUkMSB8IEhhc0VmZmVjdCwgZmliZXIsIGZpYmVyLnJldHVybik7XG4gICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgIGNhcHR1cmVDb21taXRQaGFzZUVycm9yKGZpYmVyLCBmaWJlci5yZXR1cm4sIGVycm9yKTtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9XG4gIH1cbn1cblxudmFyIENPT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GRpdGlvbmFsIHdvcmsgb24gdGhpcyByb290LlxuICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgdmFyIHN1c3BlbmRlZExhbmVzID0gcm9vdC5zdXNwZW5kZWRMYW5lcztcblxuICAgICAgICAgICAgaWYgKCFpc1N1YnNldE9mTGFuZXMoc3VzcGVuZGVkTGFuZXMsIGxhbmVzKSkge1xuICAgICAgICAgICAgICAvLyBXZSBzaG91bGQgcHJlZmVyIHRvIHJlbmRlciB0aGUgZmFsbGJhY2sgb2YgYXQgdGhlIGxhc3RcbiAgICAgICAgICAgICAgLy8gc3VzcGVuZGVkIGxldmVsLiBQaW5nIHRoZSBsYXN0IHN1c3BlbmRlZCBsZXZlbCB0byB0cnlcbiAgICAgICAgICAgICAgLy8gcmVuZGVyaW5nIGl0IGFnYWluLlxuICAgICAgICAgICAgICAvLyBGSVhNRTogV2hhdCBpZiB0aGUgc3VzcGVuZGVkIGxhbmVzIGFyZSBJZGxlPyBTaG91bGQgbm90IHJlc3RhcnQuXG4gICAgICAgICAgICAgIHZhciBldmVudFRpbWUgPSByZXF1ZXN0RXZlbnRUaW1lKCk7XG4gICAgICAgICAgICAgIG1hcmtSb290UGluZ2VkKHJvb3QsIHN1c3BlbmRlZExhbmVzKTtcbiAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9IC8vIFRoZSByZW5kZXIgaXMgc3VzcGVuZGVkLCBpdCBoYXNuJ3QgdGltZWQgb3V0LCBhbmQgdGhlcmUncyBub1xuICAgICAgICAgICAgLy8gbG93ZXIgcHJpb3JpdHkgd29yayB0byBkby4gSW5zdGVhZCBvZiBjb21taXR0aW5nIHRoZSBmYWxsYmFja1xuICAgICAgICAgICAgLy8gaW1tZWRpYXRlbHksIHdhaXQgZm9yIG1vcmUgZGF0YSB0byBhcnJpdmUuXG5cblxuICAgICAgICAgICAgcm9vdC50aW1lb3V0SGFuZGxlID0gc2NoZWR1bGVUaW1lb3V0K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SBuby1mYWxsdGhyb3VnaFxuXG4gICAgICBkZWZhdWx0OlxuICAgICAgICB7XG4gICAgICAgICAgaWYgKHR5cGVvZiB0eXBlID09PSAnb2JqZWN0JyAmJiB0eXBlICE9PSBudWxsKSB7XG4gICAgICAgICAgICBzd2l0Y2ggKHR5cGUuJCR0eXBlb2YpIHtcbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9QUk9WSURFUl9UWVBFOlxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gQ29udGV4dFByb3ZpZGVyO1xuICAgICAgICAgICAgICAgIGJyZWFrIGdldFRhZztcblxuICAgICAgICAgICAgICBjYXNlIFJFQUNUX0NPTlRFWFRfVFlQRTpcbiAgICAgICAgICAgICAgICAvLyBUaGlzIGlzIGEgY29uc3VtZXJcbiAgICAgICAgICAgICAgICBmaWJlclRhZyA9IENvbnRleHRDb25zdW1lcjtcbiAgICAgICAgICAgICAgICBicmVhayBnZXRUYWc7XG5cbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9GT1JXQVJEX1JFRl9UWVBFOlxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gRm9yd2FyZFJlZjtcblxuICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgIHJlc29sdmVkVHlwZSA9IHJlc29sdmVGb3J3YXJkUmVmRm9ySG90UmVsb2FkaW5nKHJlc29sdmVkVHlwZSk7XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgYnJlYWsgZ2V0VGFnO1xuXG4gICAgICAgICAgICAgIGNhc2UgUkVBQ1RfTUVNT19UWVBFOlxuICAgICAgICAgICAgICAgIGZpYmVyVGFnID0gTWVtb0NvbXBvbmVudDtcbiAgICAgICAgICAgICAgICBicmVhayBnZXRUYWc7XG5cbiAgICAgICAgICAgICAgY2FzZSBSRUFDVF9MQVpZX1RZUEU6XG4gICAgICAgICAgICAgICAgZmliZXJUYWcgPSBMYXp5Q29tcG9uZW50O1xuICAgICAgICAgICAgICAgIHJlc29sdmVkVHlwZSA9IG51bGw7XG4gICAgICAgICAgICAgICAgYnJlYWsgZ2V0VGFnO1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cblxuICAgICAgICAgIHZhciBpbmZvID0gJyc7XG5cbiAgICAgICAgICB7XG4gICAgICAgICAgICBpZiAodHlwZSA9PT0gdW5kZWZpbmVkIHx8IHR5cGVvZiB0eXBlID09PSAnb2JqZWN0JyAmJiB0eXBlICE9PSBudWxsICYmIE9iamVjdC5rZXlzKHR5cGUpLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgICAgICBpbmZvICs9ICcgWW91IGxpa2VseSBmb3Jnb3QgdG8gZXhwb3J0IHlvdXIgY29tcG9uZW50IGZyb20gdGhlIGZpbGUgJyArIFwiaXQncyBkZWZpbmVkIGluLCBvciB5b3UgbWlnaHQgaGF2ZSBtaXhlZCB1cCBkZWZhdWx0IGFuZCBcIiArICduYW1lZCBpbXBvcnRzLic7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHZhciBvd25lck5hbWUgPSBvd25lciA/IGdldENvbXBvbmVudE5hbWVGcm9tRmliZXIob3duZXIpIDogbnVsbDtcblxuICAgICAgICAgICAgaWYgKG93bmVyTmFtZSkge1xuICAgICAgICAgICAgICBpbmZvICs9ICdcXG5cXG5DaGVjayB0aGUgcmVuZGVyIG1ldGhvZCBvZiBgJyArIG93bmVyTmFtZSArICdgLic7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdFbGVtZW50IHR5cGUgaXMgaW52YWxpZDogZXhwZWN0ZWQgYSBzdHJpbmcgKGZvciBidWlsdC1pbiAnICsgJ2NvbXBvbmVudHMpIG9yIGEgY2xhc3MvZnVuY3Rpb24gKGZvciBjb21wb3NpdGUgY29tcG9uZW50cykgJyArIChcImJ1dCBnb3Q6IFwiICsgKHR5cGUgPT0gbnVsbCA/IHR5cGUgOiB0eXBlb2YgdHlw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1xuICAgIH1cbiAgICBQQkFuaW1hdG9yLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJBbmltYXRvcigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnN0YXRlcy5wdXNoKFBCQW5pbWF0aW9uU3RhdGUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJBbmltYXRvci5kZWNvZGUg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0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDQ4KS5ib29sKG1lc3NhZ2UubG9vcCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uuc2hvdWxkUmVzZXQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig1NikuYm9vbChtZXNzYWdlLnNob3VsZFJlc2V0KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQkFuaW1hdGlvblN0YXRlLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJBbmltYXRpb25TdGF0ZSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNsaXAgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGxheWluZyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2VpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc3BlZWQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5sb29wID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAg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DMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wbGF5aW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52b2x1bWUgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5sb29wID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5waXRjaCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmF1ZGlvQ2xpcFVybCA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkF1ZGlvU291cmNlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQXVkaW9Tb3VyY2UgfHwgKFBCQXVkaW9Tb3VyY2UgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCQXVkaW9Tb3VyY2UgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9hdWRpb19zb3VyY2UuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBBdWRpb1NvdXJjZVNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6IDEwMjAsXG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGNvbnN0IHdyaXRlciA9IFBCQXVkaW9Tb3VyY2UuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUJ1ZmZlcihidWZmZXIsIGZhbHNlKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gUEJBdWRpb1NvdXJjZ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ZS5wbGF5aW5nKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS52b2x1bWUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyMSkuZmxvYXQobWVzc2FnZS52b2x1bWUpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnVybCAhPT0gXCJcIikge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNikuc3RyaW5nKG1lc3NhZ2UudXJsKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQkF1ZGlvU3RyZWFtLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJBdWRpb1N0cmVhbSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGxheWluZyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uudm9sdW1lID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudXJsID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCQXVkaW9TdHJlYW0uZGVjb2RlID0gZGVjb2RlO1xufSkoUEJBdWRpb1N0cmVhbSB8fCAoUEJBdWRpb1N0cmVhbSA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJBdWRpb1N0cmVhbSB9IGZyb20gJy4vcGIvZGVjZW50cmFsYW5kL3Nkay9jb21wb25lbnRzL2F1ZGlvX3N0cmVhbS5nZW4nO1xuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IEF1ZGlvU3RyZWFtU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTAyMSx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W5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEwKS5zdHJpbmcobWVzc2FnZS5hdmF0YXJJZCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuYW5jaG9yUG9pbnRJZCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNikuaW50MzIobWVzc2FnZS5hbmNob3JQb2ludElkKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQkF2YXRhckF0dGFjaC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCQXZhdGFyQXR0YWNoKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYXZhdGFySWQgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYW5jaG9yUG9pbnRJZCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCQXZhdGFyQXR0YWNoLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQXZhdGFyQXR0YWNoIHx8IChQQkF2YXRhckF0dGFjaCA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJBdmF0YXJBdHRhY2ggfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9hdmF0YXJfYXR0YWNoLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgQXZhdGFyQXR0YWNoU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA3MyxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJBdmF0YXJBdHRhY2guZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbmV3IFVpbnQ4QXJyYXkod3JpdGVyLmZpbmlzaCgpLCAwLCB3cml0ZXIubGVuKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUJ1ZmZlcihidWZmZXIsIGZhbHNlKTtcb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B7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDE4KS5zdHJpbmcodik7XG4gICAgICAgIH1cbiAgICAgICAgd3JpdGVyLnVpbnQzMigyNikuZm9yaygpO1xuICAgICAgICBmb3IgKGNvbnN0IHYgb2YgbWVzc2FnZS5tb2RpZmllcnMpIHtcbiAgICAgICAgICAgIHdyaXRlci5pbnQzMih2KTtcbiAgICAgICAgfVxuICAgICAgICB3cml0ZXIubGRlbGltKCk7XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCQXZhdGFyTW9kaWZpZXJBcmVhLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJBdmF0YXJNb2RpZmllckFyZWEoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hcmVhID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmV4Y2x1ZGVJZHMucHVzaChyZWFkZXIuc3RyaW5nKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgPT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1vZGlmaWVycy5wdXNoKHJlYWRlci5pbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgPT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBlbmQyID0gcmVhZGVyLnVpbnQzMigpICsgcmVhZGVyLnBvcztcbiAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubW9kaWZpZXJzLnB1c2gocmVhZGVyLmludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuIC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aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUG9zaXRpb24oKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS54ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnogPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQb3NpdGlvbi5kZWNvZGUgPSBkZWNvZGU7XG59KShQb3NpdGlvbiB8fCAoUG9zaXRpb24gPSB7fSkpO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVZlY3RvcjMoKSB7XG4gICAgcmV0dXJuIHsgeDogMCwgeTogMCwgejogMCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgVmVjdG9yMztcbihmdW5jdGlvbiAoVmVjdG9yMykge1xuICAgIGZ1bmN0aW9uIGVuY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGlmIChtZXNzYWdlLnggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTMpLmZsb2F0KG1lc3NhZ2UueCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UueSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyMSkuZmxvYXQobWVzc2FnZS55KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS56ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI5KS5mbG9hdChtZXNzYWdlLnopO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFZlY3RvcjMuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VWZWN0b3IzKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS56ID0gcmVh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0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVZlY3RvcjIoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS54ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFZlY3RvcjIuZGVjb2RlID0gZGVjb2RlO1xufSkoVmVjdG9yMiB8fCAoVmVjdG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yLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUXVhdGVybmlvbigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS55ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueiA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICA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Db2xvcjMuZW5jb2RlKG1lc3NhZ2UuaGFpckNvbG9yLCB3cml0ZXIudWludDMyKDQyKS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmV5ZUNvbG9yICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIENvbG9yMy5lbmNvZGUobWVzc2FnZS5leWVDb2xvciwgd3JpdGVyLnVpbnQzMig1MCkuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5leHByZXNzaW9uVHJpZ2dlcklkICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNTgpLnN0cmluZyhtZXNzYWdlLmV4cHJlc3Npb25UcmlnZ2VySWQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmV4cHJlc3Npb25UcmlnZ2VyVGltZXN0YW1wICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNjQpLmludDY0KG1lc3NhZ2UuZXhwcmVzc2lvblRyaWdnZXJUaW1lc3RhbXApO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnRhbGtpbmcgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig3MikuYm9vbChtZXNzYWdlLnRhbGtpbmcpO1xuICAgICAgICB9XG4gICAgICAgIGZvciAoY29uc3QgdiBvZiBtZXNzYWdlLndlYXJhYmxlcykge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4Mikuc3RyaW5nKHYpO1xuICAgICAgICB9XG4gICAgICAgIGZvciAoY29uc3QgdiBvZiBtZXNzYWdlLmVtb3Rlcykge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig5MCkuc3RyaW5nKHYpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCQXZhdGFyU2hhcGUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQkF2YXRhclNoYXBlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuaWQgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubmFtZSA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ib2R5U2hhcGUgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc2tpbkNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuaGFpckNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZXllQ29sb3IgPSBDb2xvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5leHByZXNzaW9uVHJpZ2dlcklkID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDg6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDY0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmV4cHJlc3Npb25UcmlnZ2VyVGltZXN0YW1wID0gbG9uZ1RvTnVtYmVyKHJlYWRlci5pbnQ2NCgpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA5OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA3Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50YWxraW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gODIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2VhcmFibGVzLnB1c2gocmVhZGVyLnN0cmluZygpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW1vdGVzLnB1c2gocmVhZGVyLnN0cmluZygpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkF2YXRhclNoYXBlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQXZhdGFyU2hhcGUgfHwgKFBCQXZhdGFyU2hhcGUgPSB7fSkpO1xuY29uc3QgdHNQcm90b0dsb2JhbFRoaXMgPSAoKCkgPT4ge1xuICAgIGlmICh0eXBlb2YgZ2xvYmFsVGhpcyAhPT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICByZXR1cm4gZ2xvYmFsVGhpcztcbiAgICB9XG4gICAgaWYgKHR5cGVvZiBzZWxmICE9PSBcInVuZGVmaW5lZFwiKSB7XG4gICAgICAgIHJldHVybiBzZWxmO1xuICAgIH1cbiAgICBpZiAodHlwZW9mIHdpbmRvdyAhPT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICByZXR1cm4gd2luZG93O1xuICAgIH1cbiAgICBpZiAodHlwZW9mIGdsb2JhbCAhPT0gXCJ1bmRlZmluZWRcIikge1xuICAgICAgICByZXR1cm4gZ2xvYmFsO1xuICAgIH1cbiAgICB0aHJvdyBcIlVuYWJsZSB0byBsb2NhdGUgZ2xvYmFsIG9iamVjdFwiO1xufSkoKTtcbmZ1bmN0aW9uIGxvbmdUb051bWJlcihsb25nKSB7XG4gICAgaWYgKGxvbmcuZ3QoTnVtYmVyLk1BWF9TQUZFX0lOVEVHRVIpKSB7XG4gICAgICAgIHRoc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IzLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlQ29sb3IzKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuciA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmcgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5iID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgQ29sb3IzLmRlY29kZSA9IGRlY29kZTtcbn0pKENvbG9yMyB8fCAoQ29sb3IzID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VDb2xvcjQoKSB7XG4gICAgcmV0dXJuIHsgcjogMCwgZzogMCwgYjogMCwgYTogMCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgQ29sb3I0O1xuKGZ1bmN0aW9uIChDb2xvcjQpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS5yICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzKS5mbG9hdChtZXNzYWdlLnIpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmcgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UuZyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuYiAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyOSkuZmxvYXQobWVzc2FnZS5iKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5hICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDM3KS5mbG9hdChtZXNzYWdlLmEpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIENvbG9yNC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbG9yNCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnIgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5nID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYiA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmEgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBDb2xvcjQuZGVjb2RlID0gZGVjb2RlO1xufSkoQ29sb3I0IHx8IChDb2xvcjQgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCQXZhdGFyU2hhcGUgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9hdmF0YXJfc2hhcGUuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBBdmF0YXJTaGFwZVNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6IDEwODAsXG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGNvbnN0IHdyaXRlciA9IFBCQX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iAgICAgICAgICAgIHdyaXRlci51aW50MzIoOCkuaW50MzIobWVzc2FnZS5iaWxsYm9hcmRNb2RlKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQkJpbGxib2FyZC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCQmlsbGJvYXJkKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5iaWxsYm9hcmRNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICA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AgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJDYW1lcmFNb2RlLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQ2FtZXJhTW9kZSB8fCAoUEJDYW1lcmFNb2RlID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQkNhbWVyYU1vZGUgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9jYW1lcmFfbW9kZS5nZW4nO1xuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IENhbWVyYU1vZGVTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDcyLFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdCB3cml0ZXIgPSBQQkNhbWVyYU1vZGUuZW5jb2RlKHZhbHVlKTtcbiAgICAgICAgY29uc3QgYnVmZmVyID0gbm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AgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hcmVhID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1vZGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQkNhbWVyYU1vZGVBcmVhLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCQ2FtZXJhTW9kZUFyZWEgfHwgKFBCQ2FtZXJhTW9kZUFyZWEgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCQ2FtZXJhTW9kZUFyZWEgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9jYW1lcmFfbW9kZV9hcmVhLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgQ2FtZXJhTW9kZUFyZWFTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDcxLFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBjb25zdC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jb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mcmFtZU51bWJlciA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50b3RhbFJ1bnRpbWUgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50aWNrTnVtYmVyID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCRW5naW5lSW5mby5kZWNvZGUgPSBkZWNv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XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCR2x0ZkNvbnRhaW5lci5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCR2x0ZkNvbnRhaW5lcigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNyYyA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52aXNpYmxlTWVzaGVzQ29sbGlzaW9uTWFzayA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5pbnZpc2libGVNZXNoZXNDb2xsaXNpb25NYXNrID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCR2x0ZkNvbnRhaW5lci5kZWNvZGUgPSBkZWNvZGU7XG59KShQQkdsdGZDb250YWluZXIgfHwgKFBCR2x0ZkNvbnRhaW5lciA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJHbHRmQ29udGFpbmVyIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvZ2x0Zl9jb250YWluZXIuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBHbHRmQ29udGFpbmVyU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA0MSxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJHbHRmQ29udGFpbmVyLmVuY29kZSh2YWx1ZSk7XG4gICAgICAgIGNvbnN0IGJ1ZmZlciA9IG5ldyBVaW50OEFycmF5KHdyaXRlci5maW5pc2goKSwgMCwgd3JpdGVyLmxlbik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVCdWZmZX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gICAgICAgIGlmIChtZXNzYWdlLmN1cnJlbnRTdGF0ZSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4KS5pbnQzMihtZXNzYWdlLmN1cnJlbnRTdGF0ZSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUEJHbHRmQ29udGFpbmVyTG9hZGluZ1N0YXRlLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJHbHRmQ29udGFpbmVyTG9hZGluZ1N0YXRlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jdXJyZW50U3RhdGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1x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udWludDMyKDEwKS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcInBiclwiOlxuICAgICAgICAgICAgICAgIFBCTWF0ZXJpYWxfUGJyTWF0ZXJpYWwuZW5jb2RlKG1lc3NhZ2UubWF0ZXJpYWwucGJyLCB3cml0ZXIudWludDMyKDE4KS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCTWF0ZXJpYWwuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1hdGVyaWFsKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWF0ZXJpYWwgPSB7ICRjYXNlOiBcInVubGl0XCIsIHVubGl0OiBQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hdGVyaWFsID0geyAkY2FzZTogXCJwYnJcIiwgcGJyOiBQQk1hdGVyaWFsX1Bick1hdGVyaWFsLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQk1hdGVyaWFsLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCTWF0ZXJpYWwgfHwgKFBCTWF0ZXJpYWwgPSB7fSkpO1xuZnVuY3Rpb24gY3JlYXRlQmFzZVBCTWF0ZXJpYWxfVW5saXRNYXRlcmlhbCgpIHtcbiAgICByZXR1cm4geyB0ZXh0dXJlOiB1bmRlZmluZWQsIGFscGhhVGVzdDogdW5kZWZpbmVkLCBjYXN0U2hhZG93czogdW5kZWZpbmVkLCBkaWZmdXNlQ29sb3I6IHVuZGVmaW5lZCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgUEJNYXRlcmlhbF9VbmxpdE1hdGVyaWFsO1xuKGZ1bmN0aW9uIChQQk1hdGVyaWFsX1VubGl0TWF0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mluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50ZXh0dXJlID0gVGV4dHVyZVVuaW9uLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYWxwaGFUZXN0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY2FzdFNoYWRvd3MgPSByZWFkZXIuYm9vbCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpZmZ1c2VDb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCTWF0ZXJpYWxfVW5saXRNYXRlcmlhbC5kZWNvZGUgPSBkZWNvZGU7XG59KShQQk1hdGVyaWFsX1VubGl0TWF0ZXJpYWwgfHwgKFBCTWF0ZXJpYWxfVW5saXRNYXRlcmlhbCA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlUEJNYXRlcmlhbF9QYnJNYXRlcmlhbCgpIHtcbiAgICByZXR1cm4ge1xuICAgICAgICB0ZXh0dXJlOiB1bmRlZmluZWQsXG4gICAgICAgIGFscGhhVGVzdDogdW5kZWZpbmVkLFxuICAgICAgICBjYXN0U2hhZG93czogdW5kZWZpbmVkLFxuICAgICAgICBhbHBoYVRleHR1cmU6IHVuZGVmaW5lZCxcbiAgICAgICAgZW1pc3NpdmVUZXh0dXJlOiB1bmRlZmluZWQsXG4gICAgICAgIGJ1bXBUZXh0dXJlOiB1bmRlZmluZWQsXG4gICAgICAgIGFsYmVkb0NvbG9yOiB1bmRlZmluZWQsXG4gICAgICAgIGVtaXNzaXZlQ29sb3I6IHVuZGVmaW5lZCxcbiAgICAgIC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cml0ZXIudWludDMyKDc0KS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnRyYW5zcGFyZW5jeU1vZGUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4MCkuaW50MzIobWVzc2FnZS50cmFuc3BhcmVuY3lNb2RlKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tZXRhbGxpYyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDkzKS5mbG9hdChtZXNzYWdlLm1ldGFsbGljKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5yb3VnaG5lc3MgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMDEpLmZsb2F0KG1lc3NhZ2Uucm91Z2huZXNzKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5zcGVjdWxhckludGVuc2l0eSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDExNykuZmxvYXQobWVzc2FnZS5zcGVjdWxhckludGVuc2l0eSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZW1pc3NpdmVJbnRlbnNpdHkgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMjUpLmZsb2F0KG1lc3NhZ2UuZW1pc3NpdmVJbnRlbnNpdHkpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmRpcmVjdEludGVuc2l0eSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzMykuZmxvYXQobWVzc2FnZS5kaXJlY3RJbnRlbnNpdHkpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCTWF0ZXJpYWxfUGJyTWF0ZXJpYWwuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1hdGVyaWFsX1Bick1hdGVyaWFsKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dHVyZSA9IFRleHR1cmVVbmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFscGhhVGVzdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNhc3RTaGFkb3dzID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hbHBoYVRleHR1cmUgPSBUZXh0dXJlVW5pb24uZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5lbWlzc2l2ZVRleHR1cmUgPSBUZXh0dXJlVW5pb24uZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5idW1wVGV4dHVyZSA9IFRleHR1cmVVbmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDU4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFsYmVkb0NvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW1pc3NpdmVDb2xvciA9IENvbG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDk6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDc0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJlZmxlY3Rpdml0eUNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRyYW5zcGFyZW5jeU1vZGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWV0YWxsaWMgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJvdWdobmVzcyA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDE0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMTcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc3BlY3VsYXJJbnRlbnNpdHkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTI1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmVtaXNzaXZlSW50ZW5zaXR5ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTY6XG4gICAgICAgICAgICAgICAgICAgIGl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obWVzc2FnZS5zcmMpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLndyYXBNb2RlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTYpLmludDMyKG1lc3NhZ2Uud3JhcE1vZGUpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmZpbHRlck1vZGUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNCkuaW50MzIobWVzc2FnZS5maWx0ZXJNb2RlKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBUZXh0dXJlLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlVGV4dHVyZSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNyYyA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS53cmFwTW9kZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZpbHRlck1vZGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBUZXh0dXJlLmRlY29kZSA9IGRlY29kZTtcbn0pKFRleHR1cmUgfHwgKFRleHR1cmUgPSB7fSkpO1xuZnVuY3Rpb24gY3JlYXRlQmFzZUF2YXRhclRleHR1cmUoKSB7XG4gICAgcmV0dXJuIHsgdXNlcklkOiBcIlwiLCB3cmFwTW9kZTogdW5kZWZpbmVkLCBmaWx0ZXJNb2RlOiB1bmRlZmluZWQgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIEF2YXRhclRleHR1cmU7XG4oZnVuY3Rpb24gKEF2YXRhclRleHR1cmUpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS51c2VySWQgIT09IFwiXCIpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTApLnN0cmluZyhtZXNzYWdlLnVzZXJJZCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uud3JhcE1vZGUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNikuaW50MzIobWVzc2FnZS53cmFwTW9kZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmlsdGVyTW9kZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI0KS5pbnQzMihtZXNzYWdlLmZpbHRlck1vZGUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIEF2YXRhclRleHR1cmUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VBdmF0YXJUZXh0dXJlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudXNlcklkID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLndyYXBNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmlsdGVyTW9kZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIEF2YXRhclRleHR1cmUuZGVjb2RlID0gZGVjb2RlO1xufSkoQXZhdGFyVGV4dHVyZSB8fCAoQXZhdGFyVGV4dHVyZSA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlVmlkZW9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GVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VWaWRlb1RleHR1cmUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZpZGVvUGxheWVyRW50aXR5ID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLndyYXBNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmlsdGVyTW9kZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgIC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51aW50MzIoMjYpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgVGV4dHVyZVVuaW9uLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlVGV4dHVyZVVuaW9uKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4ID0geyAkY2FzZTogXCJ0ZXh0dXJlXCIsIHRleHR1cmU6IFRleHR1cmUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleCA9IHsgJGNhc2U6IFwiYXZhdGFyVGV4dHVyZVwiLCBhdmF0YXJUZXh0dXJlOiBBdmF0YXJUZXh0dXJlLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50ZXggPSB7ICRjYXNlOiBcInZpZGVvVGV4dHVyZVwiLCB2aWRlb1RleHR1cmU6IFZpZGVvVGV4dHVyZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgVGV4dHVyZVVuaW9uLmRlY29kZSA9IGRlY29kZTtcbn0pKFRleHR1cmVVbmlvbiB8fCAoVGV4dHVyZVVuaW9uID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQk1hdGVyaWFsIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvbWF0ZXJpYWwuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBNYXRlcmlhbFNjaGVtYSA9IHtcbiAgICBDT01QT05FT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kZShtZXNzYWdlLm1lc2guY3lsaW5kZXIsIHdyaXRlci51aW50MzIoMzQpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwicGxhbmVcIjpcbiAgICAgICAgICAgICAgICBQQk1lc2hDb2xsaWRlcl9QbGFuZU1lc2guZW5jb2RlKG1lc3NhZ2UubWVzaC5wbGFuZSwgd3JpdGVyLnVpbnQzMig0MikuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQk1lc2hDb2xsaWRlci5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCTWVzaENvbGxpZGVyKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jb2xsaXNpb25NYXNrID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcImJveFwiLCBib3g6IFBCTWVzaENvbGxpZGVyX0JveE1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcInNwaGVyZVwiLCBzcGhlcmU6IFBCTWVzaENvbGxpZGVyX1NwaGVyZU1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1lc2ggPSB7ICRjYXNlOiBcImN5bGluZGVyXCIsIGN5bGluZGVyOiBQQk1lc2hDb2xsaWRlcl9DeWxpbmRlck1lc2guZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlID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IGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJhZGl1c1RvcCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJhZGl1c0JvdHRvbSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCTWVzaENvbGxpZGVyX0N5bGluZGVyTWVzaC5kZWNvZGUgPSBkZWNvZGU7XG59KShQQk1lc2hDb2xsaWRlcl9DeWxpbmRlck1lc2ggfHwgKFBCTWVzaENvbGxpZGVyX0N5bGluZGVyTWVzaCA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlUEJNZXNoQ29sbGlkZXJfUGxhbmVNZXNoKCkge1xuICAgIHJldHVybiB7fTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFBCTWVzaENvbGxpZGVyX1BsYW5lTWVzaDtcbihmdW5jdGlvbiAoUEJNZXNoQ29sbGlkZXJfUGxhbmVNZXNoKSB7XG4gICAgZnVuY3Rpb24gZW5jb2RlKF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AgICAgICAgUEJNZXNoUmVuZGVyZXJfQ3lsaW5kZXJNZXNoLmVuY29kZShtZXNzYWdlLm1lc2guY3lsaW5kZXIsIHdyaXRlci51aW50MzIoMjYpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwicGxhbmVcIjpcbiAgICAgICAgICAgICAgICBQQk1lc2hSZW5kZXJlcl9QbGFuZU1lc2guZW5jb2RlKG1lc3NhZ2UubWVzaC5wbGFuZSwgd3JpdGVyLnVpbnQzMigzNCkuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQk1lc2hSZW5kZXJlci5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCTWVzaFJlbmRlcmVyKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwiYm94XCIsIGJveDogUEJNZXNoUmVuZGVyZXJfQm94TWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwic3BoZXJlXCIsIHNwaGVyZTogUEJNZXNoUmVuZGVyZXJfU3BoZXJlTWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwiY3lsaW5kZXJcIiwgY3lsaW5kZXI6IFBCTWVzaFJlbmRlcmVyX0N5bGluZGVyTWVzaC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaCA9IHsgJGNhc2U6IFwicGx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Vjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCTWVzaFJlbmRlcmVyX0JveE1lc2goKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS51dnMucHVzaChyZWFkZXIuZmxvYXQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5kMiA9IHJlYWRlci51aW50MzIoKSArIHJlYWRlci5wb3M7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnV2cy5wdXNoKHJlYWRlci5mbG9hdCgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgIC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gd3JpdGVyO1xuICAgIH1cbiAgICBQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2guZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9DeWxpbmRlck1lc2goKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5yYWRpdXNUb3AgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5yYWRpdXNCb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgIC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bmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQk1lc2hSZW5kZXJlcl9QbGFuZU1lc2goKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS51dnMucHVzaChyZWFkZXIuZmxvYXQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5kMiA9IHJlYWRlci51aW50MzIoKSArIHJlYWRlci5wb3M7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnV2cy5wdXNoKHJlYWRlci5mbG9hdCgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbi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nN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJOZnRTaGFwZSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnVybiA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdHlsZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50M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W5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCUG9pbnRlckV2ZW50cygpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvaW50ZXJFdmVudHMucHVzaChQQlBvaW50ZXJFdmVudHNfRW50cnkuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJQb2ludGVyRXZlbnRzLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCUG9pbnRlckV2ZW50cyB8fCAoUEJQb2ludGVyRXZlbnRzID0ge30pKTt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Y29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJQb2ludGVyRXZlbnRzX0luZm8oKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmJ1dHRvbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhvdmVyVGV4dCA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhEaXN0YW5jZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNob3dGZWVkYmFjayA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJQb2ludGVyRXZlbnRzX0luZm8uZGVjb2RlID0gZGVjb2RlO1xufSkoUEJQb2ludGVyRXZlbnRzX0luZm8gfHwgKFBCUG9pbnRlckV2ZW50c19JbmZvID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VQQlBvaW50ZXJFdmVudHNfRW50cnkoKSB7XG4gICAgcmV0dXJuIHsgZXZlbnRUeXBlOiAwLCBldmVudEluZm86IHVuZGVmaW5lZCB9O1xufVxuLyoqXG4gKiBAcHVibGljXG4gKi9cbmV4cG9ydCB2YXIgUEJQb2ludGVyRXZlbnRzX0VudHJ5O1xuKGZ1bmN0aW9uIChQQlBvaW50ZXJFdmVudHNfRW50cnkpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS5ldmVudFR5cGUgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoOCkuaW50MzIobWVzc2FnZS5ldmVudFR5cGUpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmV2ZW50SW5mbyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICBQQlBvaW50ZXJFdmVudHNfSW5mby5lbmNvZGUobWVzc2FnZS5ldmVudEluZm8sIHdyaXRlci51aW50MzIoMTgpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUEJQb2ludGVyRXZlbnRzX0VudHJ5LmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJQb2ludGVyRXZlbnRzX0VudHJ5KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ldmVudFR5cGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ldmVudEluZm8gPSBQQlBvaW50ZXJFdmVudHNfSW5mby5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFBCUG9pbnRlckV2ZW50c19FbnRyeS5kZWNvZGUgPSBkZWNvZGU7XG59KShQQlBvaW50ZXJFdmVudHNfRW50cnkgfHwgKFBCUG9pbnRlckV2ZW50c19FbnRyeSA9IHt9KSk7XG4iLCAiaW1wb3J0IHsgUEJQb2ludGVyRXZlbnRzIH0gZnJvbSAnLi9wYi9kZWNlbnRyYWxhbmQvc2RrL2NvbXBvbmVudHMvcG9pbnRlcl9ldmVudHMuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBQb2ludGVyRXZlbnRzU2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA2MixcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJQb2ludGVyR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AgICB3cml0ZXIudWludDMyKDU2KS51aW50MzIobWVzc2FnZS50aWNrTnVtYmVyKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlBvaW50ZXJFdmVudHNSZXN1bHQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlBvaW50ZXJFdmVudHNSZXN1bHQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmJ1dHRvbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhpdCA9IFJheWNhc3RIaXQuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdGF0ZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hbmFsb2cgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50aWNrTnVtYmVyID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIC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NhZ2UuZW50aXR5SWQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig1NikudWludDMyKG1lc3NhZ2UuZW50aXR5SWQpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFJheWNhc3RIaXQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VSYXljYXN0SGl0KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb24gPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZ2xvYmFsT3JpZ2luID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpcmVjdGlvbiA9IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5ub3JtYWxIaXQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubGVuZ3RoID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWVzaE5hbWUgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW50aXR5SWQgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUmF5Y2FzdEhpdC5kZWNvZGUgPSBkZWNvZGU7XG59KShSYXljYXN0SGl0IHx8IChSYXljYXN0SGl0ID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlBvaW50ZXJFdmVudHNSZXN1bHQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy9wb2ludGVyX2V2ZW50c19yZXN1bHQuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBQb2ludGVyRXZlbnRzUmVzdWx0U2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA2MyxcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJQb2ludGVyRXZlbnRzUmVzdWx0LmVuY29kZSh2YWx1ZSk7XG4g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9pbnRlckxvY2spIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS5pc1BvaW50ZXJMb2NrZWQgPT09IHRydWUpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoOCkuYm9vbChtZXNzYWdlLmlzUG9pbnRlckxvY2tlZCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUEJQb2ludGVyTG9jay5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCUG9pbnRlckxvY2soKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmlzUG9pbnRlckxvY2tlZCA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVx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zIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vcmlnaW5PZmZzZXQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlyZWN0aW9uID0geyAkY2FzZTogXCJsb2NhbERpcmVjdGlvblwiLCBsb2NhbERpcmVjdGlvbjogVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlyZWN0aW9uID0geyAkY2FzZTogXCJnbG9iYWxEaXJlY3Rpb25cIiwgZ2xvYmFsRGlyZWN0aW9uOiBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kaXJlY3Rpb24gPSB7ICRjYXNlOiBcImdsb2JhbFRhcmdldFwiLCBnbG9iYWxUYXJnZXQ6IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDEwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kaXJlY3Rpb24gPSB7ICRjYXNlOiBcInRhcmdldEVudGl0eVwiLCB0YXJnZXRFbnRpdHk6IHJlYWRlci51aW50MzIoKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1heERpc3RhbmNlID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucXVlcnlUeXBlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY29udGludW91cyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNzIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY29sbGlzaW9uTWFzayA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQlJheWNhc3QuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJSYXljYXN0IHx8IChQQlJheWNhc3QgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCUmF5Y2FzdCB9IGZyb20g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GltKCk7XG4gICAgICAgIH1cbiAgICAgICAgZm9yIChjb25zdCB2IG9mIG1lc3NhZ2UuaGl0cykge1xuICAgICAgICAgICAgUmF5Y2FzdEhpdC5lbmNvZGUodiwgd3JpdGVyLnVpbnQzMigzNCkuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS50aWNrTnVtYmVyICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDQwKS51aW50MzIobWVzc2FnZS50aWNrTnVtYmVyKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlJheWNhc3RSZXN1bHQuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlJheWNhc3RSZXN1bHQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5nbG9iYWxPcmlnaW4gPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlyZWN0aW9uID0gVmVjdG9yMy5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhpdHMucHVzaChSYXljYXN0SGl0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpY2tOdW1iZXIgPSByZWFkZXIudWludDMyKCk7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aW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig5MykuZmxvYXQobWVzc2FnZS5wYWRkaW5nTGVmdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubGluZVNwYWNpbmcgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMDEpLmZsb2F0KG1lc3NhZ2UubGluZVNwYWNpbmcpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmxpbmVDb3VudCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEwNCkuaW50MzIobWVzc2FnZS5saW5lQ291bnQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnRleHRXcmFwcGluZyAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDExMikuYm9vbChtZXNzYWdlLnRleHRXcmFwcGluZyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uuc2hhZG93Qmx1ciAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEyNSkuZmxvYXQobWVzc2FnZS5zaGFkb3dCbHVyKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5zaGFkb3dPZmZzZXRYICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTMzKS5mbG9hdChtZXNzYWdlLnNoYWRvd09mZnNldFgpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnNoYWRvd09mZnNldFkgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNDEpLmZsb2F0KG1lc3NhZ2Uuc2hhZG93T2Zmc2V0WSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uub3V0bGluZVdpZHRoICE9PSB1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2hhcGUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50ZXh0ID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mb250U2l6ZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnRBdXRvU2l6ZSA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dEFsaWduID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2lkdGggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2MSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5oZWlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA4OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2OSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wYWRkaW5nVG9wID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNzcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ1JpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDg1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdCb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ0xlZnQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmxpbmVTcGFjaW5nID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5saW5lQ291bnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTEyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRXcmFwcGluZyA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEyNSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaGFkb3dCbHVyID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaGFkb3dPZmZzZXRYID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE0MSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zaGFkb3dPZmZzZXRZID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTg6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE0OSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vdXRsaW5lV2lkdGggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTU0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNoYWRvd0NvbG9yID0gQ29sb3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vdXRsaW5lQ29sb3IgPSBDb2xvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTcwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRDb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudW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oKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwicm90YXRlXCI6XG4gICAgICAgICAgICAgICAgUm90YXRlLmVuY29kZShtZXNzYWdlLm1vZGUucm90YXRlLCB3cml0ZXIudWludDMyKDM0KS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcInNjYWxlXCI6XG4gICAgICAgICAgICAgICAgU2NhbGUuZW5jb2RlKG1lc3NhZ2UubW9kZS5zY2FsZSwgd3JpdGVyLnVpbnQzMig0MikuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5wbGF5aW5nICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDgpLmJvb2wobWVzc2FnZS5wbGF5aW5nKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5jdXJyZW50VGltZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDYxKS5mbG9hdChtZXNzYWdlLmN1cnJlbnRUaW1lKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlR3ZWVuLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJUd2VlbigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmR1cmF0aW9uID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZWFzaW5nRnVuY3Rpb24gPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tb2RlID0geyAkY2FzZTogXCJtb3ZlXCIsIG1vdmU6IE1vdmUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1vZGUgPSB7ICRjYXNlOiBcInJvdGF0ZVwiLCByb3RhdGU6IFJvdGF0ZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubW9kZSA9IHsgJGNhc2U6IFwic2NhbGVcIiwgc2NhbGU6IFNjYWxlLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wbGF5aW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2MSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jdXJyZW50VGltZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICA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AgTW92ZS5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZU1vdmUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdGFydCA9IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5lbmQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgIC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lbmQsIHdyaXRlci51aW50MzIoMTgpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUm90YXRlLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUm90YXRlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc3RhcnQgPSBRdWF0ZXJuaW9uLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW5kID0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mVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlU2NhbGUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zdGFydCA9IFZlY3RvcjMuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5lbmQgPSBWZWN0b3IzLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcg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xuICAgICAgICAgICAgUEJUd2Vlbi5lbmNvZGUodiwgd3JpdGVyLnVpbnQzMigxMCkuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5sb29wICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTYpLmludDMyKG1lc3NhZ2UubG9vcCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUEJUd2VlblNlcXVlbmNlLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJUd2VlblNlcXVlbmNlKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uuc2VxdWVuY2UucHVzaChQQlR3ZWVuLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmxvb3AgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQlR3ZWVuU2VxdWVuY2UuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJUd2VlblNlcXVlbmNlIHx8IChQQlR3ZWVuU2VxdWVuY2UgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCVHdlZW5TZXF1ZW5jZSB9IGZyb20gJy4vcGIvZGVjZW50cmFsYW5kL3Nkay9jb21wb25lbnRzL3R3ZWVuX3NlcXVlbmNlLmdlbic7XG4vKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgVHdlZW5TZXF1ZW5jZVNjaGVtYSA9IHtcbiAgICBDT01QT05FTlRfSUQ6IDExMDQsXG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGNvbnN0IHdyaXRlciA9IFBCVHdlZW5TZXF1ZW5jZS5lbmNvZGUodmFsdWUpO1xuICAgICAgICBjb25zdCBidWZmZXIgPSBuZXcgVWludDhBcnJheSh3cml0ZXIuZmluaXNoKCksIDAsIHdyaXRlci5sZW4pO1xuICAgICAgICBidWlsZGVyLndyaXRlQnVmZmVyKGJ1ZmZlciw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QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlR3ZWVuU3RhdGUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnN0YXRlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuY3VycmVudFRpbWUgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQlR3ZWVuU3RhdGUuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJUd2VlblN0YXRlIHx8IChQQlR3ZWVuU3RhdGUgPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCVHdlZW5TdGF0ZSB9IGZyb20gJy4vcGIvZGVjZW50cmFsYW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ICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlVpQmFja2dyb3VuZCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dHVyZSA9IFRleHR1cmVVbmlvbi5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHR1cmVNb2RlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dHVyZVNsaWNlcyA9IEJvcmRlclJlY3QuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSA0NSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS51dnMucHVzaChyZWFkZXIuZmxvYXQoKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnID09PSA0Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZW5kMiA9IHJlYWRlci51aW50MzIoKSArIHJlYWRlci5wb3M7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnV2cy5wdXNoKHJlYWRlci5mbG9hdCgpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT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sb2F0KG1lc3NhZ2UucmlnaHQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmJvdHRvbSAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzNykuZmxvYXQobWVzc2FnZS5ib3R0b20pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIEJvcmRlclJlY3QuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VCb3JkZXJSZWN0KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudG9wID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubGVmdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnJpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuYm90dG9tID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgQm9yZGVyUmVjdC5kZWNvZGUgPSBkZWNvZGU7XG59KShCb3JkZXJSZWN0IHx8IChCb3JkZXJSZWN0ID0ge30pKTtcbmZ1bmN0aW9uIGNyZWF0ZUJhc2VSZWN0KCkge1xuICAgIHJldHVybiB7IHg6IDAsIHk6IDAsIHdpZHRoOiAwLCBoZWlnaHQ6IDAgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIFJlY3Q7XG4oZnVuY3Rpb24gKFJlY3QpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS54ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEzKS5mbG9hdChtZXNzYWdlLngpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnkgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjEpLmZsb2F0KG1lc3NhZ2UueSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uud2lkdGggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjkpLmZsb2F0KG1lc3NhZ2Uud2lkdGgpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmhlaWdodCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzNykuZmxvYXQobWVzc2FnZS5oZWlnaHQpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFJlY3QuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VSZWN0KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UueCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnkgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS53aWR0aCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhlaWdodCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4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biAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5oZWlnaHQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjQpLmludDMyKG1lc3NhZ2UuaGVpZ2h0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5pbnRlcmFjdGFibGVBcmVhICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIEJvcmRlclJlY3QuZW5jb2RlKG1lc3NhZ2UuaW50ZXJhY3RhYmxlQXJlYSwgd3JpdGVyLnVpbnQzMigzNCkuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlVpQ2FudmFzSW5mb3JtYXRpb24uZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlVpQ2FudmFzSW5mb3JtYXRpb24oKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kZXZpY2VQaXhlbFJhdGlvID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2lkdGggPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5oZWlnaHQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5pbnRlcmFjdGFibGVBcmVhID0gQm9yZGVyUmVjdC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3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uICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4KS5ib29sKG1lc3NhZ2UuYWNjZXB0RW1wdHkpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmVtcHR5TGFiZWwgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxOCkuc3RyaW5nKG1lc3NhZ2UuZW1wdHlMYWJlbCk7XG4gICAgICAgIH1cbiAgICAgICAgZm9yIChjb25zdCB2IG9mIG1lc3NhZ2Uub3B0aW9ucykge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNikuc3RyaW5nKHYpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnNlbGVjdGVkSW5kZXggIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzMikuaW50MzIobWVzc2FnZS5zZWxlY3RlZEluZGV4KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5kaXNhYmxlZCA9PT0gdHJ1ZSkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig0MCkuYm9vbChtZXNzYWdlLmRpc2FibGVkKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5jb2xvciAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICBDb2xvcjQuZW5jb2RlKG1lc3NhZ2UuY29sb3IsIHdyaXRlci51aW50MzIoNTApLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UudGV4dEFsaWduICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoODApLmludDMyKG1lc3NhZ2UudGV4dEFsaWduKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5mb250ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoODgpLmludDMyKG1lc3NhZ2UuZm9udCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZm9udFNpemUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig5NikuaW50MzIobWVzc2FnZS5mb250U2l6ZSk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgUEJVaURyb3Bkb3duLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJVaURyb3Bkb3duKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hY2NlcHRFbXB0eSA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZW1wdHlMYWJlbCA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5vcHRpb25zLnB1c2gocmVhZGVyLnN0cmluZygpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5zZWxlY3RlZEluZGV4ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGlzYWJsZWQgPSByZWFkZXIuYm9vbCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDUwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRBbGlnbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDExOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mb250ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDk2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnRTaXplID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJVaURyb3Bkb3duLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCV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9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJVaURyb3Bkb3duUmVzdWx0LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVWlEcm9wZG93blJlc3VsdCB8fCAoUEJVaURyb3Bkb3duUmVzdWx0ID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlVpRHJvcGRvd25SZXN1bHQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy91aV9kcm9wZG93bl9yZXN1bHQuZ2VuJztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBVaURyb3Bkb3duUmVzdWx0U2NoZW1hID0ge1xuICAgIENPTVBPTkVOVF9JRDogMTA5NixcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgY29uc3Qgd3JpdGVyID0gUEJVaURyb3Bkb3duUmVzdWx0LmVuY29kZSh2YWx1ZSk7XG4gICAgICAgIGNvbnN0IGJ1ZmZlciA9IG5ldyBVaW50OEFycmF5KHdyaXRlci5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ge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4MCkuaW50MzIobWVzc2FnZS50ZXh0QWxpZ24pO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmZvbnQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4OCkuaW50MzIobWVzc2FnZS5mb250KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5mb250U2l6ZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDk2KS5pbnQzMihtZXNzYWdlLmZvbnRTaXplKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS52YWx1ZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEwNikuc3RyaW5nKG1lc3NhZ2UudmFsdWUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCVWlJbnB1dC5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCVWlJbnB1dCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBsYWNlaG9sZGVyID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmNvbG9yID0gQ29sb3I0LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGxhY2Vob2xkZXJDb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpc2FibGVkID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gODApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudGV4dEFsaWduID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDg4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gOTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZm9udFNpemUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTA2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1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G4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCVWlJbnB1dFJlc3VsdCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmlzU3VibWl0ID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQlVpSW5wdXRSZXN1bHQuZGVjb2RlID0gZGVjb2RlO1xufSkoUEJVaUlucHV0UmVz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gICAgICAgaWYgKG1lc3NhZ2UuZm9udCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMyKS5pbnQzMihtZXNzYWdlLmZvbnQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmZvbnRTaXplICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDApLmludDMyKG1lc3NhZ2UuZm9udFNpemUpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIFBCVWlUZXh0LmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJVaVRleHQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52YWx1ZSA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jb2xvciA9IENvbG9yNC5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRleHRBbGlnbiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZvbnQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mb250U2l6ZSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgIC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uY29kZShtZXNzYWdlLCB3cml0ZXIgPSBfbTAuV3JpdGVyLmNyZWF0ZSgpKSB7XG4gICAgICAgIGlmIChtZXNzYWdlLnBhcmVudCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4KS5pbnQzMihtZXNzYWdlLnBhcmVudCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucmlnaHRPZiAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNikuaW50MzIobWVzc2FnZS5yaWdodE9mKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5hbGlnbkNvbnRlbnQgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNCkuaW50MzIobWVzc2FnZS5hbGlnbkNvbnRlbnQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmFsaWduSXRlbXMgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzMikuaW50MzIobWVzc2FnZS5hbGlnbkl0ZW1zKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5mbGV4V3JhcCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDQwKS5pbnQzMihtZXNzYWdlLmZsZXhXcmFwKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5mbGV4U2hyaW5rICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNTMpLmZsb2F0KG1lc3NhZ2UuZmxleFNocmluayk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25UeXBlICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDU2KS5pbnQzMihtZXNzYWdlLnBvc2l0aW9uVHlwZSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuYWxpZ25TZWxmICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDY0KS5pbnQzMihtZXNzYWdlLmFsaWduU2VsZik7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmxleERpcmVjdGlvbiAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig3MikuaW50MzIobWVzc2FnZS5mbGV4RGlyZWN0aW9uKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5qdXN0aWZ5Q29udGVudCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMig4MCkuaW50MzIobWVzc2FnZS5qdXN0aWZ5Q29udGVudCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uub3ZlcmZsb3cgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoODgpLmludDMyKG1lc3NhZ2Uub3ZlcmZsb3cpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmRpc3BsYXkgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoOTYpLmludDMyKG1lc3NhZ2UuZGlzcGxheSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmxleEJhc2lzVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxMDQpLmludDMyKG1lc3NhZ2UuZmxleEJhc2lzVW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuZmxleEJhc2lzICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDExNykuZmxvYXQobWVzc2FnZS5mbGV4QmFzaXMpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLmZsZXhHcm93ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEyNSkuZmxvYXQobWVzc2FnZS5mbGV4R3Jvdyk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2Uud2lkdGhVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDEyOCkuaW50MzIobWVzc2FnZS53aWR0aFVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLndpZHRoICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDE0MSkuZmxvYXQobWVzc2FnZS53aWR0aCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuaGVpZ2h0VW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNDQpLmludDMyKG1lc3NhZ2UuaGVpZ2h0VW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UuaGVpZ2h0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDE1NykuZmxvYXQobWVzc2FnZS5oZWlnaHQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1pbldpZHRoVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNjApLmludDMyKG1lc3NhZ2UubWluV2lkdGhVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5taW5XaWR0aCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNzMpLmZsb2F0KG1lc3NhZ2UubWluV2lkdGgpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1pbkhlaWdodFVuaXQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTc2KS5pbnQzMihtZXNzYWdlLm1pbkhlaWdodFVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1pbkhlaWdodCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxODkpLmZsb2F0KG1lc3NhZ2UubWluSGVpZ2h0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhXaWR0aFVuaXQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTkyKS5pbnQzMihtZXNzYWdlLm1heFdpZHRoVW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWF4V2lkdGggIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjA1KS5mbG9hdChtZXNzYWdlLm1heFdpZHRoKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhIZWlnaHRVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDIwOCkuaW50MzIobWVzc2FnZS5tYXhIZWlnaHRVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXhIZWlnaHQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjIxKS5mbG9hdChtZXNzYWdlLm1heEhlaWdodCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25MZWZ0VW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyMjQpLmludDMyKG1lc3NhZ2UucG9zaXRpb25MZWZ0VW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25MZWZ0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDIzNykuZmxvYXQobWVzc2FnZS5wb3NpdGlvbkxlZnQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnBvc2l0aW9uVG9wVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNDApLmludDMyKG1lc3NhZ2UucG9zaXRpb25Ub3BVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5wb3NpdGlvblRvcCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNTMpLmZsb2F0KG1lc3NhZ2UucG9zaXRpb25Ub3ApO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnBvc2l0aW9uUmlnaHRVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI1NikuaW50MzIobWVzc2FnZS5wb3NpdGlvblJpZ2h0VW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25SaWdodCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigyNjkpLmZsb2F0KG1lc3NhZ2UucG9zaXRpb25SaWdodCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UucG9zaXRpb25Cb3R0b21Vbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI3MikuaW50MzIobWVzc2FnZS5wb3NpdGlvbkJvdHRvbVVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnBvc2l0aW9uQm90dG9tICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDI4NSkuZmxvYXQobWVzc2FnZS5wb3NpdGlvbkJvdHRvbSk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luTGVmdFVuaXQgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMjg4KS5pbnQzMihtZXNzYWdlLm1hcmdpbkxlZnRVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXJnaW5MZWZ0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMwMSkuZmxvYXQobWVzc2FnZS5tYXJnaW5MZWZ0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXJnaW5Ub3BVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMwNCkuaW50MzIobWVzc2FnZS5tYXJnaW5Ub3BVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5tYXJnaW5Ub3AgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoMzE3KS5mbG9hdChtZXNzYWdlLm1hcmdpblRvcCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luUmlnaHRVbml0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMyMCkuaW50MzIobWVzc2FnZS5tYXJnaW5SaWdodFVuaXQpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLm1hcmdpblJpZ2h0ICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDMzMykuZmxvYXQobWVzc2FnZS5tYXJnaW5SaWdodCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luQm90dG9tVW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzMzYpLmludDMyKG1lc3NhZ2UubWFyZ2luQm90dG9tVW5pdCk7XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG1lc3NhZ2UubWFyZ2luQm90dG9tICE9PSAwKSB7XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDM0OSkuZmxvYXQobWVzc2FnZS5tYXJnaW5Cb3R0b20pO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnBhZGRpbmdMZWZ0VW5pdCAhPT0gMCkge1xuICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigzNTIpLmludDMyKG1lc3NhZ2UucGFkZGluZ0xlZnRVbml0KTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobWVzc2FnZS5wYWRkaW5nTGVmdCAhPT0gMCk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XG4gICAgICAgICAgICB3cml0ZXIudWludDMyKDQxNikuaW50MzIobWVzc2FnZS5wb2ludGVyRmlsdGVyKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlVpVHJhbnNmb3JtLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJVaVRyYW5zZm9ybSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFyZW50ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucmlnaHRPZiA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFsaWduQ29udGVudCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmFsaWduSXRlbXMgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mbGV4V3JhcCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDUzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZsZXhTaHJpbmsgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wb3NpdGlvblR5cGUgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA4OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA2NCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5hbGlnblNlbGYgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA5OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA3Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5mbGV4RGlyZWN0aW9uID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTA6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmp1c3RpZnlDb250ZW50ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDg4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm92ZXJmbG93ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMTI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDk2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmRpc3BsYXkgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTA0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZsZXhCYXNpc1VuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTE3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZsZXhCYXNpcyA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDE1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMjUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZmxleEdyb3cgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTI4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLndpZHRoVW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDE3OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uud2lkdGggPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTQ0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhlaWdodFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAxOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTU3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmhlaWdodCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDIwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNjApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWluV2lkdGhVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE3Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5taW5XaWR0aCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDIyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNzYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWluSGVpZ2h0VW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDIzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxODkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWluSGVpZ2h0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE5Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhXaWR0aFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyNTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjA1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1heFdpZHRoID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIwOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhIZWlnaHRVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDIyMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXhIZWlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uTGVmdFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uTGVmdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDMwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb25Ub3BVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI1Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wb3NpdGlvblRvcCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDMyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb25SaWdodFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjY5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uUmlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzNDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjcyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvc2l0aW9uQm90dG9tVW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyODUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucG9zaXRpb25Cb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzNjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjg4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpbkxlZnRVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzc6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMwMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXJnaW5MZWZ0ID0gcmVhZGVyLmZsb2F0KCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzg6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMwNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXJnaW5Ub3BVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzk6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMxNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5tYXJnaW5Ub3AgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0MDpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzIwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpblJpZ2h0VW5pdCA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzMzMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UubWFyZ2luUmlnaHQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0MjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzM2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpbkJvdHRvbVVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0MzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzQ5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm1hcmdpbkJvdHRvbSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNTIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ0xlZnRVbml0ID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgNDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM2NSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wYWRkaW5nTGVmdCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNjgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ1RvcFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0NzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdUb3AgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0ODpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzg0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdSaWdodFVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMzk3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdSaWdodCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDUwOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0MDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UucGFkZGluZ0JvdHRvbVVuaXQgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1MTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDEzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBhZGRpbmdCb3R0b20gPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1MjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gNDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBvaW50ZXJGaWx0ZXIgPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoKHRhZyAmIDcpID09PSA0IHx8IHRhZyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmVhZGVyLnNraXBUeXBlKHRhZyAmIDcpO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBtZXNzYWdlO1xuICAgIH1cbiAgICBQQlVpVHJhbnNmb3JtLmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVWlUcmFuc2Zvcm0gfHwgKFBCVWlUcmFuc2Zvcm0gPSB7fSkpO1xuIiwgImltcG9ydCB7IFBCVWlUcmFuc2Zvcm0gfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29t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ciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VQQlZpZGVvRXZlbnQoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnRpbWVzdGFtcCA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS50aWNrTnVtYmVyID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDM6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDI5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmN1cnJlbnRPZmZzZXQgPSByZWFkZXIuZmxvYXQoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA0OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAzNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52aWRlb0xlbmd0aCA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnN0YXRlID0gcmVhZGVyLmludDMyKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJWaWRlb0V2ZW50LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVmlkZW9FdmVudCB8fCAoUEJWaWRlb0V2ZW50ID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlZpZGVvRXZlbnQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy92aWRlb19ldmVudC5nZW4nO1xuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFZpZGVvRXZlbnRTY2hlbWEgPSB7XG4gICAgQ09NUE9ORU5UX0lEOiAxMDQ0LFxuICAgIHNlcmlhbGl6ZSh2YWx1ZSwg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5sb29wICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoNDgpLmJvb2wobWVzc2FnZS5sb29wKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBQQlZpZGVvUGxheWVyLmVuY29kZSA9IGVuY29kZTtcbiAgICBmdW5jdGlvbiBkZWNvZGUoaW5wdXQsIGxlbmd0aCkge1xuICAgICAgICBjb25zdCByZWFkZXIgPSBpbnB1dCBpbnN0YW5jZW9mIF9tMC5SZWFkZXIgPyBpbnB1dCA6IF9tMC5SZWFkZXIuY3JlYXRlKGlucHV0KTtcbiAgICAgICAgbGV0IGVuZCA9IGxlbmd0aCA9PT0gdW5kZWZpbmVkID8gcmVhZGVyLmxlbiA6IHJlYWRlci5wb3MgKyBsZW5ndGg7XG4gICAgICAgIGNvbnN0IG1lc3NhZ2UgPSBjcmVhdGVCYXNlUEJWaWRlb1BsYXllcigpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnNyYyA9IHJlYWRlci5zdHJpbmcoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wbGF5aW5nID0gcmVhZGVyLmJvb2woKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyOSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5wb3NpdGlvbiA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDM3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZvbHVtZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDU6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQ1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnBsYXliYWNrUmF0ZSA9IHJlYWRlci5mbG9hdCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDY6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDQ4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmxvb3AgPSByZWFkZXIuYm9vbCgpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09ID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WF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZVBCVmlzaWJpbGl0eUNvbXBvbmVudCgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UudmlzaWJsZSA9IHJlYWRlci5ib29sKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCh0YWcgJiA3KSA9PT0gNCB8fCB0YWcgPT09IDApIHtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJlYWRlci5za2lwVHlwZSh0YWcgJiA3KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gbWVzc2FnZTtcbiAgICB9XG4gICAgUEJWaXNpYmlsaXR5Q29tcG9uZW50LmRlY29kZSA9IGRlY29kZTtcbn0pKFBCVmlzaWJpbGl0eUNvbXBvbmVudCB8fCAoUEJWaXNpYmlsaXR5Q29tcG9uZW50ID0ge30pKTtcbiIsICJpbXBvcnQgeyBQQlZpc2liaWxpdHlDb21wb25lbnQgfSBmcm9tICcuL3BiL2RlY2VudHJhbGFuZC9zZGsvY29tcG9uZW50cy92aXNpYmlsaXR5X2NvbXBvbmVudC5nZW4nO1xuLy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ICAgIHJldHVybiBbYW5pbSwgc3RhdGVdO1xuICAgIH1cbiAgICByZXR1cm4ge1xuICAgICAgICAuLi50aGVDb21wb25lbnQsXG4gICAgICAgIGdldENsaXBPck51bGwoZW50aXR5LCBjbGlwTmFtZSkge1xuICAgICAgICAgICAgY29uc3QgW18sIHN0YXRlXSA9IGdldENsaXBBbmRBbmltYXRvcihlbnRpdHksIGNsaXBOYW1lKTtcbiAgICAgICAgICAgIHJldHVybiBzdGF0ZTtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0Q2xpcChlbnRpdHksIGNsaXBOYW1lKSB7XG4gICAgICAgICAgICBjb25zdCBbYW5pbWF0b3IsIHN0YXRlXSA9IGdldENsaXBBbmRBbmltYXRvcihlbnRpdHksIGNsaXBOYW1lKTtcbiAgICAgICAgICAgIGlmICghYW5pbWF0b3IpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFRoZXJlIGlzIG5vIEFuaW1hdG9yIGZvdW5kIGluIHRoZSBlbnRpdHkgJHtlbnRpdHl9YCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIXN0YXRlKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBUaGUgQW5pbWF0b3IgY29tcG9uZW50IG9mICR7ZW50aXR5fSBoYXMgbm8gdGhlIHN0YXRlICR7Y2xpcE5hbWV9YCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gc3RhdGU7XG4gICAgICAgIH0sXG4gICAgICAgIHBsYXlTaW5nbGVBbmltYXRpb24oZW50aXR5LCBjbGlwTmFtZSwgc2hvdWxkUmVzZXQgPSB0cnVlKSB7XG4gICAgICAgICAgICBjb25zdCBbYW5pbWF0b3IsIHN0YXRlXSA9IGdldENsaXBBbmRBbmltYXRvcihlbnRpdHksIGNsaXBOYW1lKTtcbiAgICAgICAgICAgIGlmICghYW5pbWF0b3IgfHwgIXN0YXRlKVxuICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgIC8vIFJlc2V0IGFsbCBvdGhlciBhbmltYXRpb25zXG4gICAgICAgICAgICBmb3IgKGNvbnN0IHN0YXRlIG9mIGFuaW1hdG9yLnN0YXRlcykge1xuICAgICAgICAgICAgICAgIHN0YXRlLnBsYXlpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICBzdGF0ZS5zaG91bGRSZXNldCA9IHRydWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzdGF0ZS5wbGF5aW5nID0gdHJ1ZTtcbiAgICAgICAgICAgIHN0YXRlLnNob3VsZFJlc2V0ID0gc2hvdWxkUmVzZXQ7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfSxcbiAgICAgICAgc3RvcEFsbEFuaW1hdGlvbnMoZW50aXR5LCByZXNldEN1cnNvciA9IHRydWUpIHtcbiAgICAgICAgICAgIC8vIEdldCB0aGUgbXV0YWJsZSB0byBtb2RpZnlpbmdcbiAgICAgICAgICAgIGNvbnN0IGFuaW1hdG9yID0gdGhlQ29tcG9uZW50LmdldE11dGFibGVPck51bGwoZW50aXR5KTtcbiAgICAgICAgICAgIGlmICghYW5pbWF0b3IpXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgLy8gUmVzZXQgYWxsIG90aGVyIGFuaW1hdGlvbnNcbiAgICAgICAgICAgIGZvciAoY29uc3Qgc3RhdGUgb2YgYW5pbWF0b3Iuc3RhdGVzKSB7XG4gICAgICAgICAgICAgICAgc3RhdGUucGxheWluZyA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIHN0YXRlLnNob3VsZFJlc2V0ID0gcmVzZXRDdXJzb3I7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgTWF0ZXJpYWwgfSBmcm9tICcuLi9nZW5lcmF0ZWQvaW5kZXguZ2VuJztcbmNvbnN0IFRleHR1cmVIZWxwZXIgPSB7XG4gICAgQ29tbW9uKHRleHR1cmUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHRleDoge1xuICAgICAgICAgICAgICAgICRjYXNlOiAndGV4dHVyZScsXG4gICAgICAgICAgICAgICAgdGV4dHVyZVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgQXZhdGFyKGF2YXRhclRleHR1cmUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHRleDoge1xuICAgICAgICAgICAgICAgICRjYXNlOiAnYXZhdGFyVGV4dHVyZScsXG4gICAgICAgICAgICAgICAgYXZhdGFyVGV4dHVyZVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgVmlkZW8odmlkZW9UZXh0dXJlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB0ZXg6IHtcbiAgICAgICAgICAgICAgICAkY2FzZTogJ3ZpZGVvVGV4dHVyZScsXG4gICAgICAgICAgICAgICAgdmlkZW9UZXh0dXJlXG4gICAgICAgICAgICB9XG4gICAgICAgIH07XG4gICAgfVxufTtcbmV4cG9ydCBmdW5jdGlvbiBkZWZpbmVNYXRlcmlhbENvbXBvbmVudChlbmdpbmUpIHtcbiAgICBjb25zdCB0aGVDb21wb25lbnQgPSBNYXRlcmlhbChlbmdpbmUpO1xuICAgIHJldHVybiB7XG4gICAgICAgIC4uLnRoZUNvbXBvbmVudCxcbiAgICAgICAgVGV4dHVyZTogVGV4dHVyZUhlbHBlcixcbiAgICAgICAgc2V0QmFzaWNNYXRlcmlhbChlbnRpdHksIG1hdGVyaWFsKSB7XG4gICAgICAgICAgICB0aGVDb21wb25lbnQuY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwge1xuICAgICAgICAgICAgICAgIG1hdGVyaWFsOiB7XG4gICAgICAgICAgICAgICAgICAgICRjYXNlOiAndW5saXQnLFxuICAgICAgICAgICAgICAgICAgICB1bmxpdDogbWF0ZXJpYWxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0UGJyTWF0ZXJpYWwoZW50aXR5LCBtYXRlcmlhbCkge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtYXRlcmlhbDoge1xuICAgICAgICAgICAgICAgICAgICAkY2FzZTogJ3BicicsXG4gICAgICAgICAgICAgICAgICAgIHBicjogbWF0ZXJpYWxcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgIH07XG59XG4iLCAiaW1wb3J0IHsgTWVzaENvbGxpZGVyIH0gZnJvbSAnLi4vZ2VuZXJhdGVkL2luZGV4Lmdlbic7XG5leHBvcnQgZnVuY3Rpb24gZGVmaW5lTWVzaENvbGxpZGVyQ29tcG9uZW50KGVuZ2luZSkge1xuICAgIGNvbnN0IHRoZUNvbXBvbmVudCA9IE1lc2hDb2xsaWRlcihlbmdpbmUpO1xuICAgIGZ1bmN0aW9uIGdldENvbGxpc2lvbk1hc2sobGF5ZXJzKSB7XG4gICAgICAgIGlmIChBcnJheS5pc0FycmF5KGxheWVycykpIHtcbiAgICAgICAgICAgIHJldHVybiBsYXllcnMubWFwKChpdGVtKSA9PiBpdGVtKS5yZWR1Y2UoKHByZXYsIGl0ZW0pID0+IHByZXYgfCBpdGVtLCAwKTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmIChsYXllcnMpIHtcbiAgICAgICAgICAgIHJldHVybiBsYXllcnM7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHtcbiAgICAgICAgLi4udGhlQ29tcG9uZW50LFxuICAgICAgICBzZXRCb3goZW50aXR5LCBjb2xsaWRlckxheWVycykge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtZXNoOiB7ICRjYXNlOiAnYm94JywgYm94OiB7fSB9LFxuICAgICAgICAgICAgICAgIGNvbGxpc2lvbk1hc2s6IGdldENvbGxpc2lvbk1hc2soY29sbGlkZXJMYXllcnMpXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfSxcbiAgICAgICAgc2V0UGxhbmUoZW50aXR5LCBjb2xsaWRlckxheWVycykge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtZXNoOiB7ICRjYXNlOiAncGxhbmUnLCBwbGFuZToge30gfSxcbiAgICAgICAgICAgICAgICBjb2xsaXNpb25NYXNrOiBnZXRDb2xsaXNpb25NYXNrKGNvbGxpZGVyTGF5ZXJzKVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIHNldEN5bGluZGVyKGVudGl0eSwgcmFkaXVzQm90dG9tLCByYWRpdXNUb3AsIGNvbGxpZGVyTGF5ZXJzKSB7XG4gICAgICAgICAgICB0aGVDb21wb25lbnQuY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwge1xuICAgICAgICAgICAgICAgIG1lc2g6IHsgJGNhc2U6ICdjeWxpbmRlcicsIGN5bGluZGVyOiB7IHJhZGl1c0JvdHRvbSwgcmFkaXVzVG9wIH0gfSxcbiAgICAgICAgICAgICAgICBjb2xsaXNpb25NYXNrOiBnZXRDb2xsaXNpb25NYXNrKGNvbGxpZGVyTGF5ZXJzKVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIHNldFNwaGVyZShlbnRpdHksIGNvbGxpZGVyTGF5ZXJzKSB7XG4gICAgICAgICAgICB0aGVDb21wb25lbnQuY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwge1xuICAgICAgICAgICAgICAgIG1lc2g6IHsgJGNhc2U6ICdzcGhlcmUnLCBzcGhlcmU6IHt9IH0sXG4gICAgICAgICAgICAgICAgY29sbGlzaW9uTWFzazogZ2V0Q29sbGlzaW9uTWFzayhjb2xsaWRlckxheWVycylcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfTtcbn1cbiIsICJpbXBvcnQgeyBNZXNoUmVuZGVyZXIgfSBmcm9tICcuLi9nZW5lcmF0ZWQvaW5kZXguZ2VuJztcbmV4cG9ydCBmdW5jdGlvbiBkZWZpbmVNZXNoUmVuZGVyZXJDb21wb25lbnQoZW5naW5lKSB7XG4gICAgY29uc3QgdGhlQ29tcG9uZW50ID0gTWVzaFJlbmRlcmVyKGVuZ2luZSk7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgLi4udGhlQ29tcG9uZW50LFxuICAgICAgICBzZXRCb3goZW50aXR5LCB1dnMpIHtcbiAgICAgICAgICAgIHRoZUNvbXBvbmVudC5jcmVhdGVPclJlcGxhY2UoZW50aXR5LCB7XG4gICAgICAgICAgICAgICAgbWVzaDogeyAkY2FzZTogJ2JveCcsIGJveDogeyB1dnM6IHV2cyB8fCBbXSB9IH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICBzZXRQbGFuZShlbnRpdHksIHV2cykge1xuICAgICAgICAgICAgdGhlQ29tcG9uZW50LmNyZWF0ZU9yUmVwbGFjZShlbnRpdHksIHtcbiAgICAgICAgICAgICAgICBtZXNoOiB7ICRjYXNlOiAncGxhbmUnLCBwbGFuZTogeyB1dnM6IHV2cyB8fCBbXSB9IH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9LFxuICAgICAgICBzZXRDeWxpbmRlcihlbnRpdHksIHJhZGl1c0JvdHRvbSwgcmFkaXVzVG9wKSB7XG4gICAgICAgICAgICB0aGVDb21wb25lbnQuY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwge1xuICAgICAgICAgICAgICAgIG1lc2g6IHsgJGNhc2U6ICdjeWxpbmRlcicsIGN5bGluZGVyOiB7IHJhZGl1c0JvdHRvbSwgcmFkaXVzVG9wIH0gfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH0sXG4gICAgICAgIHNldFNwaGVyZShlbnRpdHkpIHtcbiAgICAgICAgICAgIHRoZUNvbXBvbmVudC5jcmVhdGVPclJlcGxhY2UoZW50aXR5LCB7XG4gICAgICAgICAgICAgICAgbWVzaDogeyAkY2FzZTogJ3NwaGVyZScsIHNwaGVyZToge30gfVxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9O1xufVxuIiwgImltcG9ydCB7IFR3ZWVuIH0gZnJvbSAnLi4vZ2VuZXJhdGVkL2luZGV4Lmdlbic7XG5jb25zdCBUd2VlbkhlbHBlciA9IHtcbiAgICBNb3ZlKG1vdmUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgICRjYXNlOiAnbW92ZScsXG4gICAgICAgICAgICBtb3ZlXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBSb3RhdGUocm90YXRlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAkY2FzZTogJ3JvdGF0ZScsXG4gICAgICAgICAgICByb3RhdGVcbiAgICAgICAgfTtcbiAgICB9LFxuICAgIFNjYWxlKHNjYWxlKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAkY2FzZTogJ3NjYWxlJyxcbiAgICAgICAgICAgIHNjYWxlXG4gICAgICAgIH07XG4gICAgfVxufTtcbmV4cG9ydCBmdW5jdGlvbiBkZWZpbmVUd2VlbkNvbXBvbmVudChlbmdpbmUpIHtcbiAgICBjb25zdCB0aGVDb21wb25lbnQgPSBUd2VlbihlbmdpbmUpO1xuICAgIHJldHVybiB7XG4gICAgICAgIC4uLnRoZUNvbXBvbmVudCxcbiAgICAgICAgTW9kZTogVHdlZW5IZWxwZXJcbiAgICB9O1xufVxuIiwgIi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBJQXJyYXkgPSAodHlwZSkgPT4ge1xuICAgIHJldHVybiB7XG4gICAgICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICAgICAgYnVpbGRlci53cml0ZVVpbnQzMih2YWx1ZS5sZW5ndGgpO1xuICAgICAgICAgICAgZm9yIChjb25zdCBpdGVtIG9mIHZhbHVlKSB7XG4gICAgICAgICAgICAgICAgdHlwZS5zZXJpYWxpemUoaXRlbSwgYnVpbGRlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICAgICAgY29uc3QgbmV3QXJyYXkgPSBbXTtcbiAgICAgICAgICAgIGNvbnN0IGxlbmd0aCA9IHJlYWRlci5yZWFkVWludDMyKCk7XG4gICAgICAgICAgICBmb3IgKGxldCBpbmRleCA9IDA7IGluZGV4IDwgbGVuZ3RoOyBpbmRleCsrKSB7XG4gICAgICAgICAgICAgICAgbmV3QXJyYXkucHVzaCh0eXBlLmRlc2VyaWFsaXplKHJlYWRlcikpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG5ld0FycmF5O1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoKSB7XG4gICAgICAgICAgICByZXR1cm4gW107XG4gICAgICAgIH0sXG4gICAgICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgICAgIHR5cGU6ICdhcnJheScsXG4gICAgICAgICAgICBpdGVtczogdHlwZS5qc29uU2NoZW1hLFxuICAgICAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdhcnJheSdcbiAgICAgICAgfVxuICAgIH07XG59O1xuIiwgIi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBCb29sID0ge1xuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBidWlsZGVyLndyaXRlSW50OCh2YWx1ZSA/IDEgOiAwKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gcmVhZGVyLnJlYWRJbnQ4KCkgPT09IDE7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9LFxuICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgdHlwZTogJ2Jvb2xlYW4nLFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ2Jvb2xlYW4nXG4gICAgfVxufTtcbiIsICIvKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgSW50NjQgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVJbnQ2NChCaWdJbnQodmFsdWUpKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gTnVtYmVyKHJlYWRlci5yZWFkSW50NjQoKSk7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiAwO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnaW50ZWdlcicsXG4gICAgICAgIHNlcmlhbGl6YXRpb25UeXBlOiAnaW50NjQnXG4gICAgfVxufTtcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBJbnQzMiA9IHtcbiAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgYnVpbGRlci53cml0ZUludDMyKHZhbHVlKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4gcmVhZGVyLnJlYWRJbnQzMigpO1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4gMDtcbiAgICB9LFxuICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgdHlwZTogJ2ludGVnZXIn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sIGJ1aWxkZXIpIHtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUucik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLmcpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS5iKTtcbiAgICB9LFxuICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcjogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICBnOiByZWFkZXIucmVhZEZsb2F0MzIoKSxcbiAgICAgICAgICAgIGI6IHJlYWRlci5yZWFkRmxvYXQzMigpXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiB7IHI6IDAsIGc6IDAsIGI6IDAgfTtcbiAgICB9LFxuICAgIGpzb25TY2hlbWE6IHtcbiAgICAgICAgdHlwZTogJ29iamVjdCcsXG4gICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgIHI6IHsgdHlwZTogJ251bWJlcicgfSxcbiAgICAgICAgICAgIGc6IHsgdHlwZTogJ251bWJlcicgfSxcbiAgICAgICAgICAgIGI6IHsgdHlwZTogJ251bWJlcicgfVxuICAgICAgICB9LFxuICAgICAgICBzZXJpYWxpemF0aW9uVHlwZTogJ2NvbG9yMydcbiAgICB9XG59O1xuIiwgIi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBDb2xvcjRTY2hlbWEgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLnIpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS5nKTtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUuYik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLmEpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICByOiByZWFkZXIucmVhZEZsb2F0MzIoKSxcbiAgICAgICAgICAgIGc6IHJlYWRlci5yZWFkRmxvYXQzMigpLFxuICAgICAgICAgICAgYjogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICBhOiByZWFkZXIucmVhZEZsb2F0MzIoKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4geyByOiAwLCBnOiAwLCBiOiAwLCBhOiAwIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICByOiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICBnOiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICBiOiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICBhOiB7IHR5cGU6ICdudW1iZXInIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdjb2xvcjQnXG4gICAgfVxufTtcbiIsICIvKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgRW50aXR5U2NoZW1hID0ge1xuICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICBidWlsZGVyLndyaXRlSW50MzIodmFsdWUpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiByZWFkZXIucmVhZEludDMyKCk7XG4gICAgfSxcbiAgICBjcmVhdGUoKSB7XG4gICAgICAgIHJldHVybiAwO1xuICAgIH0sXG4gICAganNvblNjaGVtYToge1xuICAgICAgICB0eXBlOiAnaW50ZWdlcicsXG4gICAgICAgIHNlcmlhbGl6YXRpb25UeXBlOiAnZW50aXR5J1xuICAgIH1cbn07XG4iLCAiLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGNvbnN0IFF1YXRlcm5pb25TY2hlbWEgPSB7XG4gICAgc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKSB7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLngpO1xuICAgICAgICBidWlsZGVyLndyaXRlRmxvYXQzMih2YWx1ZS55KTtcbiAgICAgICAgYnVpbGRlci53cml0ZUZsb2F0MzIodmFsdWUueik7XG4gICAgICAgIGJ1aWxkZXIud3JpdGVGbG9hdDMyKHZhbHVlLncpO1xuICAgIH0sXG4gICAgZGVzZXJpYWxpemUocmVhZGVyKSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICB4OiByZWFkZXIucmVhZEZsb2F0MzIoKSxcbiAgICAgICAgICAgIHk6IHJlYWRlci5yZWFkRmxvYXQzMigpLFxuICAgICAgICAgICAgejogcmVhZGVyLnJlYWRGbG9hdDMyKCksXG4gICAgICAgICAgICB3OiByZWFkZXIucmVhZEZsb2F0MzIoKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4geyB4OiAwLCB5OiAwLCB6OiAwLCB3OiAwIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICB4OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB6OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICB3OiB7IHR5cGU6ICdudW1iZXInIH1cbiAgICAgICAgfSxcbiAgICAgICAgc2VyaWFsaXphdGlvblR5cGU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Y29uc3Qgc3BlY1JlZmxlY3Rpb24gPSBPYmplY3Qua2V5cyhzcGVjKS5yZWR1Y2UoKHNwZWNSZWZsZWN0aW9uLCBjdXJyZW50S2V5KSA9PiB7XG4gICAgICAgIHNwZWNSZWZsZWN0aW9uW2N1cnJlbnRLZXldID0gc3BlY1tjdXJyZW50S2V5XS5qc29uU2NoZW1hO1xuICAgICAgICByZXR1cm4gc3BlY1JlZmxlY3Rpb247XG4gICAgfSwge30pO1xuICAgIHJldHVybiB7XG4gICAgICAgIHNlcmlhbGl6ZSh2YWx1ZSwgYnVpbGRlcikge1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gc3BlYykge1xuICAgICAgICAgICAgICAgIHNwZWNba2V5XS5zZXJpYWxpemUodmFsdWVba2V5XSwgYnVpbGRlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGRlc2VyaWFsaXplKHJlYWRlcikge1xuICAgICAgICAgICAgY29uc3QgbmV3VmFsdWUgPSB7fTtcbiAgICAgICAgICAgIGZvciAoY29uc3Qga2V5IGluIHNwZWMpIHtcbiAgICAgICAgICAgICAgICA7XG4gICAgICAgICAgICAgICAgbmV3VmFsdWVba2V5XSA9IHNwZWNba2V5XS5kZXNlcmlhbGl6ZShyZWFkZXIpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIG5ld1ZhbHVlO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoKSB7XG4gICAgICAgICAgICBjb25zdCBuZXdWYWx1ZSA9IHt9O1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gc3BlYykge1xuICAgICAgICAgICAgICAgIDtcbiAgICAgICAgICAgICAgICBuZXdWYWx1ZVtrZXldID0gc3BlY1trZXldLmNyZWF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHsgLi4ubmV3VmFsdWUsIC4uLmRlZmF1bHRWYWx1ZSB9O1xuICAgICAgICB9LFxuICAgICAgICBleHRlbmQ6IChiYXNlKSA9PiB7XG4gICAgICAgICAgICBjb25zdCBuZXdWYWx1ZSA9IHt9O1xuICAgICAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gc3BlYykge1xuICAgICAgICAgICAgICAgIDtcbiAgICAgICAgICAgICAgICBuZXdWYWx1ZVtrZXldID0gc3BlY1trZXldLmNyZWF0ZSgpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHsgLi4ubmV3VmFsdWUsIC4uLmRlZmF1bHRWYWx1ZSwgLi4uYmFzZSB9O1xuICAgICAgICB9LFxuICAgICAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgICAgICB0eXBlOiAnb2JqZWN0JyxcbiAgICAgICAgICAgIHByb3BlcnRpZXM6IHNwZWNSZWZsZWN0aW9uLFxuICAgICAgICAgICAgc2VyaWFsaXphdGlvblR5cGU6ICdtYXAnXG4gICAgICAgIH1cbiAgICB9O1xufTtcbiIsICIvKipcbiAqIEBpbnRlcm5hbFxuICovXG5leHBvcnQgY29uc3QgSU9wdGlvbmFsID0gKHNwZWMpID0+IHtcbiAgICByZXR1cm4ge1xuICAgICAgICBzZXJpYWxpemUodmFsdWUsIGJ1aWxkZXIpIHtcbiAgICAgICAgICAgIGlmICh2YWx1ZSkge1xuICAgICAgICAgICAgICAgIGJ1aWxkZXIud3JpdGVJbnQ4KDEpO1xuICAgICAgICAgICAgICAgIHNwZWMuc2VyaWFsaXplKHZhbHVlLCBidWlsZGVyKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGJ1aWxkZXIud3JpdGVJbnQ4KDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBkZXNlcmlhbGl6ZShyZWFkZXIpIHtcbiAgICAgICAgICAgIGNvbnN0IGV4aXN0cyA9IHJlYWRlci5yZWFkSW50OCgpO1xuICAgICAgICAgICAgaWYgKGV4aXN0cykge1xu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ZXMgfSA9IGpzb25TY2hlbWE7XG4gICAgICAgIGNvbnN0IHR5cGVkVmFsdWUgPSB2YWx1ZTtcbiAgICAgICAgZm9yIChjb25zdCBrZXkgaW4gcHJvcGVydGllcykge1xuICAgICAgICAgICAgY29uc3QgeyB0eXBlLCB2YWx1ZTogbWFwVmFsdWUgfSA9IGdldFR5cGVBbmRWYWx1ZShwcm9wZXJ0aWVzLCB0eXBlZFZhbHVlLCBrZXkpO1xuICAgICAgICAgICAgaWYgKHR5cGUuc2VyaWFsaXphdGlvblR5cGUgPT09ICd1bmtub3duJylcbiAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIGlmIChpc0NvbXBvdW5kVHlwZSh0eXBlKSkge1xuICAgICAgICAgICAgICAgIG11dGF0ZVZhbHVlcyh0eXBlLCBtYXBWYWx1ZSwgbXV0YXRlRm4pO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgY29uc3QgbmV3VmFsdWUgPSBtdXRhdGVGbihtYXBWYWx1ZSwgdHlwZSk7XG4gICAgICAgICAgICAgICAgaWYgKG5ld1ZhbHVlLmNoYW5nZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZWRWYWx1ZVtrZXldID0gbmV3VmFsdWUudmFsdWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIGVsc2UgaWYgKGpzb25TY2hlbWEuc2VyaWFsaXphdGlvblR5cGUgPT09ICdhcnJheScpIHtcbiAgICAgICAgY29uc3QgeyBpdGVtcyB9ID0ganNvblNjaGVtYTtcbiAgICAgICAgY29uc3QgYXJyYXlWYWx1ZSA9IHZhbHVlO1xuICAgICAgICBmb3IgKGxldCBpID0gMCwgbiA9IGFycmF5VmFsdWUubGVuZ3RoOyBpIDwgbjsgaSsrKSB7XG4gICAgICAgICAgICBjb25zdCB7IHR5cGUsIHZhbHVlIH0gPSBnZXRUe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ICAgICB4OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIpLFxuICAgICAgICAgICAgICAgIHk6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDQpLFxuICAgICAgICAgICAgICAgIHo6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDgpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcm90YXRpb246IHtcbiAgICAgICAgICAgICAgICB4OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIgKyAxMiksXG4gICAgICAgICAgICAgICAgeTogcmVhZGVyLmdldEZsb2F0MzIocHRyICsgMTYpLFxuICAgICAgICAgICAgICAgIHo6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDIwKSxcbiAgICAgICAgICAgICAgICB3OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIgKyAyNClcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzY2FsZToge1xuICAgICAgICAgICAgICAgIHg6IHJlYWRlci5nZXRGbG9hdDMyKHB0ciArIDI4KSxcbiAgICAgICAgICAgICAgICB5OiByZWFkZXIuZ2V0RmxvYXQzMihwdHIgKyAzMiksXG4gICAgICAgICAgICAgICAgejogcmVhZGVyLmdldEZsb2F0MzIocHRyICsgMzYpXG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcGFyZW50OiByZWFkZXIuZ2V0VWludDMyKHB0ciArIDQwKVxuICAgICAgICB9O1xuICAgIH0sXG4gICAgY3JlYXRlKCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgcG9zaXRpb246IHsgeDogMCwgeTogMCwgejogMCB9LFxuICAgICAgICAgICAgc2NhbGU6IHsgeDogMSwgeTogMSwgejogMSB9LFxuICAgICAgICAgICAgcm90YXRpb246IHsgeDogMCwgeTogMCwgejogMCwgdzogMSB9LFxuICAgICAgICAgICAgcGFyZW50OiAwXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBleHRlbmQodmFsdWUpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIHBvc2l0aW9uOiB7IHg6IDAsIHk6IDAsIHo6IDAgfSxcbiAgICAgICAgICAgIHNjYWxlOiB7IHg6IDEsIHk6IDEsIHo6IDEgfSxcbiAgICAgICAgICAgIHJvdGF0aW9uOiB7IHg6IDAsIHk6IDAsIHo6IDAsIHc6IDEgfSxcbiAgICAgICAgICAgIHBhcmVudDogMCxcbiAgICAgICAgICAgIC4uLnZhbHVlXG4gICAgICAgIH07XG4gICAgfSxcbiAgICBqc29uU2NoZW1hOiB7XG4gICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICBwcm9wZXJ0aWVzOiB7XG4gICAgICAgICAgICBwb3NpdGlvbjoge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgICAgICAgeDogeyB0eXBlOiAnbnVtYmVyJyB9LFxuICAgICAgICAgICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICAgICAgICAgIHo6IHsgdHlwZTogJ251bWJlcicgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzY2FsZToge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAgICAgICAgeDogeyB0eXBlOiAnbnVtYmVyJyB9LFxuICAgICAgICAgICAgICAgICAgICB5OiB7IHR5cGU6ICdudW1iZXInIH0sXG4gICAgICAgICAgICAgICAgICAgIHo6IHsgdHlwZTogJ251bWJlcicgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICByb3RhdGlvbjoge1xuICAgICAgICAgICAgICAgIHR5cGU6ICdvYmplY3QnLFxuICAgICAgICAgICAgICAgIHByb3BlcnRpZXM6IHtcbiAgICAgICAgICAgICAg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yoqXG4gKlxuICogQHJldHVybnMgYSBuZXcgR1NldFxuICovXG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlVmVyc2lvbkdTZXQoKSB7XG4gICAgY29uc3QgbGFzdFZlcnNpb24gPSBuZXcgTWFwKCk7XG4gICAgcmV0dXJuIHtcbiAgICAgICAgLyoqXG4gICAgICAgICAqXG4gICAgICAgICAqIEBwYXJhbSBudW1iZXJcbiAgICAgICAgICogQHBhcmFtIHZlcnNpb25cbiAgICAgICAgICogQHJldHVybnNcbiAgICAgICAgICovXG4gICAgICAgIGFkZFRvKG51bWJlciwgdmVyc2lvbikge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgICAgIGlmICh2ZXJzaW9uIDwgMCkge1xuICAgICAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgY3VycmVudFZhbHVlID0gbGFzdFZlcnNpb24uZ2V0KG51bWJlcik7XG4gICAgICAgICAgICAvLyBJZiB0aGUgdmVyc2lvbiBpcyA+PSwgaXQgbWVhbnMgdGhlIHZhbHVlIGl0J3MgYWxyZWFkeSBpbiB0aGUgc2V0XG4gICAgICAgICAgICBpZiAoY3VycmVudFZhbHVlICE9PSB1bmRlZmluZWQgJiYgY3VycmVudFZhbHVlID49IHZlcnNpb24pIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxhc3RWZXJzaW9uLnNldChudW1iZXIsIHZlcnNpb24pO1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH0sXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBAcmV0dXJucyB0aGUgc2V0IHdpdGggW251bWJlciwgdmVyc2lvbl0gb2YgZWFjaCB2YWx1ZVxuICAgICAgICAgKi9cbiAgICAgICAgaGFzKG4sIHYpIHtcbiAgICAgICAgICAgIGNvbnN0IGN1cnJlbnRWYWx1ZSA9IGxhc3RWZXJzaW9uLmdldChuKTtcbiAgICAgICAgICAgIC8vIElmIHRoZSB2ZXJzaW9uIGlzID49LCBpdCBtZWFucyB0aGUgdmFsdWUgaXQncyBhbHJlYWR5IGluIHRoZSBzZXRcbiAgICAgICAgICAgIGlmIChjdXJyZW50VmFsdWUgIT09IHVuZGVmaW5lZCAmJiBjdXJyZW50VmFsdWUgPj0gdikge1xuICAgICAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9LFxuICAgICAgICAvKipcbiAgICAgICAgICogV2FybmluZzogdGhpcyBmdW5jdGlvbiByZXR1cm5zIHRoZSByZWZlcmVuY2UgdG8gdGhlIGludGVybmFsIG1hcCxcbiAgICAgICAgICogIGlmIHlvdSBuZWVkIHRvIG11dGF0ZSBzb21lIHZhbHVlLCBtYWtlIGEgY29weS5cbiAgICAgICAgICogRm9yIG9wdGltaXphdGlvbiBwdXJwb3NlIHRoZSBjb3B5IGlzbid0IG1hZGUgaGVyZS5cbiAgICAgICAgICpcbiAgICAgICAgICogQHJldHVybnMgdGhlIG1hcCBvZiBudW1iZXIgdG8gdmVyc2lvblxuICAgICAgICAgKi9cbiAgICAgICAgZ2V0TWFwKCkge1xuICAgICAgICAgICAgcmV0dXJuIGxhc3RWZXJzaW9uO1xuICAgICAgICB9XG4gICAgfTtcbn1cbiIsICJpbXBvcnQgeyBjcmVhdGVWZXJzaW9uR1NldCB9IGZyb20gJy4uL3N5c3RlbXMvY3JkdC9nc2V0Jztcbi8qKlxuICogQGludGVybmFsXG4gKi9cbmV4cG9ydCBjb25zdCBNQVhfVTE2ID0gMHhmZmZmO1xuY29uc3QgTUFTS19VUFBFUl8xNl9PTl8zMiA9IDB4ZmZmZjAwMDA7XG4vKipcbiAqIEBp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xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBJdCBmYWlscyB0cnlpbmcgdG8gZ2VuZXJhdGUgYW4gZW50aXR5IG91dCBvZiByYW5nZSAke01BWF9FTlRJVFlfTlVNQkVSfS5gKTtcbiAgICAgICAgfVxuICAgICAgICBpZiAobmV0d29ya2VkICYmIG5ldHdvcmtFbnRpdHlDb3VudGVyID4gbmV0d29ya2VkRW50aXRpZXNSYW5nZVsxXSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBNYXggYW1vdW50IG9mIG5ldHdvcmsgZW50aXRpZXMgcmVhY2hlZCAke25ldHdvcmtlZEVudGl0aWVzUmFuZ2VbMV19IGApO1xuICAgICAgICB9XG4gICAgICAgIGlmICghbmV0d29ya2VkICYmIGVudGl0eUNvdW50ZXIgPj0gbG9jYWxFbnRpdGllc0F2YWlsYWJsZSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBNYXggYW1vdW50IG9mIGxvY2FsIGVudGl0aWVzIHJlYWNoZWQgJHtsb2NhbEVudGl0aWVzQXZhaWxhYmxlfWApO1xuICAgICAgICB9XG4gICAgICAgIGNvbnN0IGVudGl0eU51bWJlciA9IG5ldHdvcmtlZCA/IG5ldHdvcmtFbnRpdHlDb3VudGVyKysgOiBlbnRpdHlDb3VudGVyKys7XG4gICAgICAgIGNvbnN0IGVudGl0eVZlcnNpb24gPSByZW1vdmVkRW50aXRpZXMuZ2V0TWFwKCkuaGFzKGVudGl0eU51bWJlcilcbiAgICAgICAgICAgID8gcmVtb3ZlZEVudGl0aWVzLmdldE1hcCgpLmdldChlbnRpdHlOdW1iZXIpICsgMVxuICAgICAgICAgICAgOiAwO1xuICAgICAgICBjb25zdCBlbnRpdHkgPSBFbnRpdHlVdGlscy50b0VudGl0eUlkKGVudGl0eU51bWJlciwgZW50aXR5VmVyc2lvbik7XG4gICAgICAgIGlmICh1c2VkRW50aXRpZXMuaGFzKGVudGl0eSkpIHtcbiAgICAgIC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kU2l6ZSArIFJFU0VSVkVEX1NUQVRJQ19FTlRJVElFUyA+PSBlbnRpdHlDb3VudGVyKSB7XG4gICAgICAgICAgICByZXR1cm4gZ2VuZXJhdGVOZXdFbnRpdHkobmV0d29ya2VkKTtcbiAgICAgICAgfVxuICAgICAgICAvLyBJZiBhbGwgZW50aXRpZXMgdW50aWwgYGVudGl0eUNvdW50ZXJgIGFyZSBiZWluZyB1c2VkLCB3ZSBuZWVkIHRvIGdlbmVyYXRlIGFub3RoZXIgb25lXG4gICAgICAgIGlmIChuZXR3b3JrZWQgJiYgdXNlZE5ldHdvcmtTaXplICsgbmV0d29ya2VkRW50aXRpZXNSYW5nZVswXSA+PSBuZXR3b3JrRW50aXR5Q291bnRlcikge1xuICAgICAgICAgICAgcmV0dXJuIGdlbmVyYXRlTmV3RW50aXR5KG5ldHdvcmtlZCk7XG4gICAgICAgIH1cbiAgICAgICAgZm9yIChjb25zdCBbbnVtYmVyLCB2ZXJzaW9uXSBvZiByZW1vdmVkRW50aXRpZXMuZ2V0TWFwKCkpIHtcbiAgICAgICAgICAgIGlmICh2ZXJzaW9uIDwgTUFYX1UxNikge1xuICAgICAgICAgICAgICAgIGlmIChuZXR3b3JrZWQgJiYgKG51bWJlciA8IG5ldHdvcmtlZEVudGl0aWVzUmFuZ2VbMF0gfHwgbnVtYmVyID4gbmV0d29ya2VkRW50aXRpZXNSYW5nZVsxXSkpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGlmICghbmV0d29ya2VkICYmIG51bWJlciA+PSBsb2NhbEVudGl0aWVzQXZhaWxhYmxlKVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjb25zdCBlbnRpdHkgPSBFbnRpdHlVdGlscy50b0VudGl0eUlkKG51bWJlciwgdmVyc2lvbiArIDEpO1xuICAgICAgICAgICAgICAgIC8vIElmIHRoZSBlbnRpdHkgaXMgbm90IGJlaW5nIHVzZWQsIHdlIGNhbiByZS11c2UgaXRcbiAgICAgICAgICAgICAgICAvLyBJZiB0aGUgZW50aXR5IHdhcyByZW1vdmVkIGluIHRoaXMgdGljaywgd2UncmUgbm90IGNvdW50aW5nIGZvciB0aGUgdXNlZEVudGl0aWVzLCBidXQgd2UgaGF2ZSBpdCBpbiB0aGUgdG9SZW1vdmVFbnRpdHlBcnJheVxuICAgICAgICAgICAgICAgIGlmICghdXNlZEVudGl0aWVzLmhhcyhlbnRpdHkpICYmICF0b1JlbW92ZUVudGl0aWVzLmluY2x1ZGVzKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdXNlZEVudGl0aWVzLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZW50aXR5O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gZ2VuZXJhdGVOZXdFbnRpdHkobmV0d29ya2VkKTtcbiAgICB9XG4gICAgZnVuY3Rpb24gcmVtb3ZlRW50aXR5KGVudGl0eSkge1xuICAgICAgICBpZiAoZW50aXR5IDwgUkVTRVJWRURfU1RBVElDX0VOVElUSUVTKVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICBpZiAodXNlZEVudGl0aWVzLmhhcyhlbnRpdHkpKSB7XG4gICAgICAgICAgICB1c2VkRW50aXRpZXMuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgICAgICB0b1JlbW92ZUVudGl0aWVzLnB1c2goZW50aXR5KTtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIHVwZGF0ZVJlbW92ZWRFbnRpdHkoZW50aXR5KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG4gICAgZnVuY3Rpb24gcmVsZWFzZVJlbW92ZWRFbnRpdGllcygpIHtcbiAgICAgICAgY29uc3QgYXJyID0gdG9SZW1vdmVFbnRpdGllcztcbiAgICAgICAgaWYgKGFyci5sZW5ndGgpIHtcbiAgICAgICAgICAgIHRvUmVtb3ZlRW50aXRpZXMgPSBbXTtcbiAgICAgICAgICAgIGZvciAoY29uc3QgZW50aXR5IG9mIGFycikge1xuICAgICAgICAgICAgICAgIGNvbnN0IFtuLCB2XSA9IEVudGl0eVV0aWxzLmZyb21FbnRpdHlJZChlbnRpdHkpO1xuICAgICAgICAgICAgICAgIHJlbW92ZWRFbnRpdGllcy5hZGRUbyhuLCB2KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gYXJyO1xuICAgIH1cbiAgICBmdW5jdGlvbiB1cGRhdGVSZW1vdmVkRW50aXR5KGVudGl0eSkge1xuICAgICAgICBjb25zdCBbbiwgdl0gPSBFbnRpdHlVdGlscy5mcm9tRW50aXR5SWQoZW50aXR5KTtcbiAgICAgICAgLy8gVXBkYXRlIHRoZSByZW1vdmVkIGVudGl0aWVzIG1hcFxuICAgICAgICByZW1vdmVkRW50aXRpZXMuYWRkVG8obiwgdik7XG4gICAgICAgIC8vIFJlbW92ZSB0aGUgdXNlZEVudGl0aWVzIGlmIGV4aXN0XG4gICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDw9IHY7IGkrKykge1xuICAgICAgICAgICAgdXNlZEVudGl0aWVzLmRlbGV0ZShFbnRpdHlVdGlscy50b0VudGl0eUlkKG4sIGkpKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG4gICAgZnVuY3Rpb24gdXBkYXRlVXNlZEVudGl0eShlbnRpdHkpIHtcbiAgICAgICAgY29uc3QgW24sIHZdID0gRW50aXR5VXRpbHMuZnJvbUVudGl0eUlkKGVudGl0eSk7XG4gICAgICAgIC8vIGlmIHRoZSBlbnRpdHkgd2FzIHJlbW92ZWQgdGhlbiBhYm9ydCBmYXN0XG4gICAgICAgIGlmIChyZW1vdmVkRW50aXRpZXMuaGFzKG4sIHYpKVxuICAg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VURV9DT01QT05FTlRfTkVUV09SSykge1xuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlID0gRGVsZXRlQ29tcG9uZW50TmV0d29yay5yZWFkKGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhlYWRlci50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVCkge1xuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlID0gUHV0Q29tcG9uZW50T3BlcmF0aW9uLnJlYWQoYnVmZmVyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoaGVhZGVyLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5UX05FVFdPUkspIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IFB1dE5ldHdvcmtDb21wb25lbnRPcGVyYXRpb24ucmVhZChidWZmZXIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmIChoZWFkZXIudHlwZSA9PT0gQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9FTlRJVFkpIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IERlbGV0ZUVudGl0eS5yZWFkKGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2UgaWYgKGhlYWRlci50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuREVMRVRFX0VOVElUWV9ORVRXT1JLKSB7XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UgPSBEZWxldGVFbnRpdHlOZXR3b3JrLnJlYWQoYnVmZmVyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAoaGVhZGVyLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5BUFBFTkRfVkFMVUUpIHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZSA9IEFwcGVuZFZhbHVlT3BlcmF0aW9uLnJlYWQoYnVmZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gVW5rbm93biBtZXNzYWdlLCB3ZSBza2lwIGl0XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBjb25zdW1lIHRoZSBtZXNzYWdlXG4gICAgICAgICAgICAgICAgICAgIGJ1ZmZlci5pbmNyZW1lbnRSZWFkT2Zmc2V0KGhlYWRlci5sZW5ndGgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAobWVzc2FnZSkge1xuICAgICAgICAgICAgICAgICAgICByZWNlaXZlZE1lc3NhZ2VzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgLi4ubWVzc2FnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyYW5zcG9ydElkLFxuICAgICAgICAgICAgICAgICAgICAgICAgbWVzc2FnZUJ1ZmZlcjogYnVmZmVyLmJ1ZmZlcigpLnN1YmFycmF5KG9mZnNldCwgYnVmZmVyLmN1cnJlbnRSZWFkT2Zmc2V0KCkpXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICB9XG4gICAgLyoqXG4gICAgICogUmV0dXJuIGFuZCBjbGVhciB0aGUgbWVzc2FlcyBxdWV1ZVxuICAgICAqIEByZXR1cm5zIG1lc3NhZ2VzIHJlY2lldmVkIGJ5IHRoZSB0cmFuc3BvcnQgdG8gcHJvY2VzcyBvbiB0aGUgbmV4dCB0aWNrXG4gICAgICovXG4gICAgZnVuY3Rpb24gZ2V0TWVzc2FnZXModmFsdWUpIHtcbiAgICAgICAgY29uc3QgbWVzc2FnZXNUb1Byb2Nlc3MgPSB2YWx1ZS5zcGxpY2UoMCwgdmFsdWUubGVuZ3RoKTtcbiA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ICAgICAgICAgICBicm9hZGNhc3RNZXNzYWdlcy5wdXNoKG1zZyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBjb25zdCBlbnRpdHlTdGF0ZSA9IGVuZ2luZS5lbnRpdHlDb250YWluZXIuZ2V0RW50aXR5U3RhdGUoZW50aXR5SWQpO1xuICAgICAgICAgICAgICAgIC8vIFNraXAgdXBkYXRlcyBmcm9tIHJlbW92ZWQgZW50aXR5ZXNcbiAgICAgICAgICAgICAgICBpZiAoZW50aXR5U3RhdGUgPT09IEVudGl0eVN0YXRlLlJlbW92ZWQpXG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIC8vIEVudGl0aWVzIHdpdGggdW5rbm93biBlbnRpdGllcyBzaG91bGQgdXBkYXRlIGl0cyBlbnRpdHkgc3RhdGVcbiAgICAgICAgICAgICAgICBpZiAoZW50aXR5U3RhdGUgPT09IEVudGl0eVN0YXRlLlVua25vd24pIHtcbiAgICAgICAgICAgICAgICAgICAgZW5naW5lLmVudGl0eUNvbnRhaW5lci51cGRhdGVVc2VkRW50aXR5KGVudGl0eUlkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZW5naW5lLmdldENvbXBvbmVudE9yTnVsbChtc2cuY29tcG9uZW50SWQpO1xuICAgICAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBlbHNlICovXG4gICAgICAgICAgICAgICAgaWYgKGNvbXBvbmVudCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAobXNnLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5UICYmXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQuY29tcG9uZW50SWQgPT09IFRyYW5zZm9ybS5jb21wb25lbnRJZCAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgTmV0d29ya0VudGl0eS5oYXMoZW50aXR5SWQpICYmXG4gICAgICAgICAgICAgICAgICAgICAgICBOZXR3b3JrUGFyZW50LmhhcyhlbnRpdHlJZCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1zZy5kYXRhID0gbmV0d29ya1V0aWxzLmZpeFRyYW5zZm9ybVBhcmVudChtc2cpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IFtjb25mbGljdE1lc3NhZ2UsIHZhbHVlXSA9IGNvbXBvbmVudC51cGRhdGVGcm9tQ3JkdCh7IC4uLm1zZywgZW50aXR5SWQgfSk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghY29uZmxpY3RNZXNzYWdlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBBZGQgbWVzc2FnZSB0byB0cmFuc3BvcnQgcXVldWUgdG8gYmUgcHJvY2Vzc2VkIGJ5IG90aGVycyB0cmFuc3BvcnRzXG4gICAgICAgICAgICAgICAgICAgICAgICBicm9hZGNhc3RNZXNzYWdlcy5wdXNoKG1zZyk7XG4gICAgICAgICAgICAgICAgICAgICAgICBvblByb2Nlc3NFbnRpdHlDb21wb25lbnRDaGFuZ2UgJiYgb25Qcm9jZXNzRW50aXR5Q29tcG9uZW50Q2hhbmdlKG1zZy5lbnRpdHlJZCwgbXNnLnR5cGUsIGNvbXBvbmVudCwgdmFsdWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBUT0RPOiB0ZXN0IHRoaXMgbGluZSwgaXQgaXMgZnVuZGFtbWVudGFsIHRvIG1ha2UgdGhlIGVkaXRvciB3b3JrXG4gICAgICAgICAgICAgICAgICAgIGJyb2FkY2FzdE1lc3NhZ2VzLnB1c2gobXNnKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIC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VmZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmIChtZXNzYWdlLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5BUFBFTkRfVkFMVUUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIEFwcGVuZFZhbHVlT3BlcmF0aW9uLndyaXRlKG1lc3NhZ2UuZW50aXR5SWQsIG1lc3NhZ2UudGltZXN0YW1wLCBtZXNzYWdlLmNvbXBvbmVudElkLCBtZXNzYWdlLmRhdGEsIGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY3JkdE1lc3NhZ2VzLnB1c2goe1xuICAgICAgICAgICAgICAgICAgICAgICAgLi4ubWVzc2FnZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2VCdWZmZXI6IGJ1ZmZlci5idWZmZXIoKS5zdWJhcnJheShvZmZzZXQsIGJ1ZmZlci5jdXJyZW50V3JpdGVPZmZzZXQoKSlcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChvblByb2Nlc3NFbnRpdHlDb21wb25lbnRDaGFuZ2UpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHJhd1ZhbHVlID0gbWVzc2FnZS50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVCB8fCBtZXNzYWdlLnR5cGUgPT09IENyZHRNZXNzYWdlVHlwZS5BUFBFTkRfVkFMVUVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGNvbXBvbmVudC5nZXQobWVzc2FnZS5lbnRpdHlJZClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IHVuZGVmaW5lZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uUHJvY2Vzc0VudGl0eUNvbXBvbmVudENoYW5nZShtZXNzYWdlLmVudGl0eUlkLCBtZXNzYWd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uZXhwb3J0IGZ1bmN0aW9uIGRhdGFDb21wYXJlKGEsIGIpIHtcbiAgICAvLyBBdCByZWZlcmVuY2UgbGV2ZWxcbiAgICBpZiAoYSA9PT0gYilcbiAgICAgICAgcmV0dXJuIDA7XG4gICAgaWYgKGEgPT09IG51bGwgJiYgYiAhPT0gbnVsbClcbiAgICAgICAgcmV0dXJuIC0xO1xuICAgIGlmIChhICE9PSBudWxsICYmIGIgPT09IG51bGwpXG4gICAgICAgIHJldHVybiAxO1xuICAgIGlmIChhIGluc3RhbmNlb2YgVWludDhBcnJheSAmJiBiIGluc3RhbmNlb2YgVWludDhBcnJheSkge1xuICAgICAgICBjb25zdCBsZW5ndGhEaWZmZXJlbmNlID0gYS5ieXRlTGVuZ3RoIC0gYi5ieXRlTGVuZ3RoO1xuICAgICAgICBpZiAobGVuZ3RoRGlmZmVyZW5jZSAhPT0gMCkge1xuICAgICAgICAgICAgcmV0dXJuIGxlbmd0aERpZmZlcmVuY2UgPiAwID8gMSA6IC0xO1xuICAgICAgICB9XG4gICAgICAgIGxldCByZXM7XG4gICAgICAgIGZvciAobGV0IGkgPSAwLCBuID0gYS5ieXRlTGVuZ3RoOyBpIDwgbjsgaSsrKSB7XG4gICAgICAgICAgICByZXMgPSBhW2ldIC0gYltpXTtcbiAgICAgICAgICAgIGlmIChyZXMgIT09IDApIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmVzID4gMCA/IDEgOiAtMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICAvLyB0aGUgZGF0YSBpcyBleGFjdGx5IHRoZSBzYW1lXG4gICAgICAgIHJldHVybiAwO1xuICAgIH1cbiAgICBpZiAodHlwZW9mIGEgPT09ICdzdHJpbmcnKSB7XG4gICAgICAgIGNvbnN0IGxlbmd0aERpZmZlcmVuY2UgPSBhLmxlbmd0aCAtIGIubGVuZ3RoO1xuICAgICAgICBpZiAobGVuZ3RoRGlmZmVyZW5jZSAhPT0gMCkge1xuICAgICAgIC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BmdW5jdGlvbiBkdW1wQ3JkdFN0YXRlKGJ1ZmZlciwgZmlsdGVyRW50aXR5KSB7XG4gICAgICAgIGZvciAoY29uc3QgW2VudGl0eSwgdGltZXN0YW1wXSBvZiB0aW1lc3RhbXBzKSB7XG4gICAgICAgICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgaWYgKi9cbiAgICAgICAgICAgIGlmIChmaWx0ZXJFbnRpdHkpIHtcbiAgICAgICAgICAgICAgICAvLyBJIHN3ZWFyIHRoYXQgdGhpcyBpcyBiZWluZyB0ZXN0ZWQgb24gc3RhdGUtdG8tY3JkdC5zcGVjIGJ1dCBqZXN0IGlzIHRyb2xsaW5nIG1lXG4gICAgICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgICAgICAgICBpZiAoIWZpbHRlckVudGl0eShlbnRpdHkpKVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBlbHNlICovXG4gICAgICAgICAgICBpZiAoZGF0YS5oYXMoZW50aXR5KSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGl0ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgICAgICAgICBjb25zdCBidWYgPSBuZXcgUmVhZFdyaXRlQnl0ZUJ1ZmZlcigpO1xuICAgICAgICAgICAgICAgIHNjaGVtYS5zZXJpYWxpemUoaXQsIGJ1Zik7XG4gICAgICAgICAgICAgICAgUHV0Q29tcG9uZW50T3BlcmF0aW9uLndyaXRlKGVudGl0eSwgdGltZXN0YW1wLCBjb21wb25lbnRJZCwgYnVmLnRvQmluYXJ5KCksIGJ1ZmZlcik7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBEZWxldGVDb21wb25lbnQud3JpdGUoZW50aXR5LCBjb21wb25lbnRJZCwgdGltZXN0YW1wLCBidWZmZ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pYWxpemUoYnVmKSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBkYXRhLmRlbGV0ZShlbnRpdHkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gW251bGwsIGRhdGEuZ2V0KGVudGl0eSldO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY2FzZSBQcm9jZXNzTWVzc2FnZVJlc3VsdFR5cGUuU3RhdGVPdXRkYXRlZFRpbWVzdGFtcDpcbiAgICAgICAgICAgIGNhc2UgUHJvY2Vzc01lc3NhZ2VSZXN1bHRUeXBlLlN0YXRlT3V0ZGF0ZWREYXRhOiB7XG4gICAgICAgICAgICAgICAgaWYgKGRhdGEuaGFzKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgd3JpdGVCdWZmZXIgPSBuZXcgUmVhZFdyaXRlQnl0ZUJ1ZmZlcigpO1xuICAgICAgICAgICAgICAgICAgICBzY2hlbWEuc2VyaWFsaXplKGRhdGEuZ2V0KGVudGl0eSksIHdyaXRlQnVmZmVyKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBDcmR0TWVzc2FnZVR5cGUuUFVUX0NPTVBPTkVOVCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhOiB3cml0ZUJ1ZmZlci50b0JpbmFyeSgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudGl0eUlkOiBlbnRpdHksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGltZXN0YW1wOiB0aW1lc3RhbXBzLmdldChlbnRpdHkpXG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5nZXQoZW50aXR5KVxuICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFtcbiAgICAgICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiBDcmR0TWVzc2FnZVR5cGUuREVMRVRFX0NPTVBPTkVOVCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnRpdHlJZDogZW50aXR5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpbWVzdGFtcDogdGltZXN0YW1wcy5nZXQoZW50aXR5KVxuICAgICAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gW251bGwsIGRhdGEuZ2V0KGVudGl0eSldO1xuICAgIH07XG59XG5leHBvcnQgZnVuY3Rpb24gY3JlYXRlR2V0Q3JkdE1lc3NhZ2VzRm9yTHd3KGNvbXBvbmVudElkLCB0aW1lc3RhbXBzLCBkaXJ0eUl0ZXJhdG9yLCBzY2hlbWEsIGRhdGEpIHtcbiAgICByZXR1cm4gZnVuY3Rpb24qICgpIHtcbiAgICAgICAgZm9yIChjb25zdCBlbnRpdHkgb2YgZGlydHlJdGVyYXRvcikge1xuICAgICAgICAgICAgY29uc3QgbmV3VGltZXN0YW1wID0gaW5jcmVtZW50VGltZXN0YW1wKGVudGl0eSwgdGltZXN0YW1wcyk7XG4gICAgICAgICAgICBpZiAoZGF0YS5oYXMoZW50aXR5KSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHdyaXRlQnVmZmVyID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoKTtcbiAgICAgICAgICAgICAgICBzY2hlbWEuc2VyaWFsaXplKGRhdGEuZ2V0KGVudGl0eSksIHdyaXRlQnVmZmVyKTtcbiAgICAgICAgICAgICAgICBjb25zdCBtc2cgPSB7XG4gICAgICAgICAgICAgICAgICAgIHR5cGU6IENyZHRNZXNzYWdlVHlwZS5QVVRfQ09NUE9ORU5ULFxuICAgICAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICAgICAgZW50aXR5SWQ6IGVudGl0eSxcbiAgICAgICAgICAgICAgICAgICAgZGF0YTogd3JpdGVCdWZmZXIudG9CaW5hcnkoKSxcbiAgICAgICAgICAgICAgICAgICAgdGltZXN0YW1wOiBuZXdUaW1lc3RhbXBcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHlpZWxkIG1zZztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIGNvbnN0IG1zZyA9IHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogQ3JkdE1lc3NhZ2VUeXBlLkRFTEVURV9DT01QT05FTlQsXG4gICAgICAgICAgICAgICAgICAgIGNvbXBvbmVudElkLFxuICAgICAgICAgICAgICAgICAgICBlbnRpdHlJZDogZW50aXR5LFxuICAgICAgICAgICAgICAgICAgICB0aW1lc3RhbXA6IG5ld1RpbWVzdGFtcFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgeWllbGQgbXNnO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGRpcnR5SXRlcmF0b3IuY2xlYXIoKTtcbiAgICB9O1xufVxuLyoqXG4gKiBAaW50ZXJuYWxcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGNyZWF0ZUNvbXBvbmVudERlZmluaXRpb25Gcm9tU2NoZW1hKGNvbXBvbmVudE5hbWUsIGNvbXBvbmVudElkLCBzY2hlbWEpIHtcbiAgICBjb25zdCBkYXRhID0gbmV3IE1hcCgpO1xuICAgIGNvbnN0IGRpcnR5SXRlcmF0b3IgPSBuZXcgU2V0KCk7XG4gICAgY29uc3QgdGltZXN0YW1wcyA9IG5ldyBNYXAoKTtcbiAgICByZXR1cm4ge1xuICAgICAgICBnZXQgY29tcG9uZW50SWQoKSB7XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50SWQ7XG4gICAgICAgIH0sXG4gICAgICAgIGdldCBjb21wb25lbnROYW1lKCkge1xuICAgICAgICAgICAgcmV0dXJuIGNvbXBvbmVudE5hbWU7XG4gICAgICAgIH0sXG4gICAgICAgIGdldCBjb21wb25lbnRUeXBlKCkge1xuICAgICAgICAgICAgLy8gYSBnZXR0ZXIgaXMgdXNlZCBoZXJlIHRvIHByZXZlbnQgYWNjaWRlbnRhbCBjaGFuZ2VzXG4gICAgICAgICAgICByZXR1cm4gMCAvKiBDb21wb25lbnRUeXBlLkxhc3RXcml0ZVdpbkVsZW1lbnRTZXQgKi87XG4gICAgICAgIH0sXG4gICAgICAgIHNjaGVtYSxcbiAgICAgICAgaGFzKGVudGl0eSkge1xuICAgICAgICAgICAgcmV0dXJuIGRhdGEuaGFzKGVudGl0eSk7XG4gICAgICAgIH0sXG4gICAgICAgIGRlbGV0ZUZyb20oZW50aXR5LCBtYXJrQXNEaXJ0eSA9IHRydWUpIHtcbiAgICAgICAgICAgIGNvbnN0IGNvbXBvbmVudCA9IGRhdGEuZ2V0KGVudGl0eSk7XG4gICAgICAgICAgICBpZiAoZGF0YS5kZWxldGUoZW50aXR5KSAmJiBtYXJrQXNEaXJ0eSkge1xuICAgICAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuYWRkKGVudGl0eSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50IHx8IG51bGw7XG4gICAgICAgIH0sXG4gICAgICAgIGVudGl0eURlbGV0ZWQoZW50aXR5LCBtYXJrQXNEaXJ0eSkge1xuICAgICAgICAgICAgaWYgKGRhdGEuZGVsZXRlKGVudGl0eSkgJiYgbWFya0FzRGlydHkpIHtcbiAgICAgICAgICAgICAgICBkaXJ0eUl0ZXJhdG9yLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBnZXRPck51bGwoZW50aXR5KSB7XG4gICAgICAgICAgICBjb25zdCBjb21wb25lbnQgPSBkYXRhLmdldChlbnRpdHkpO1xuICAgICAgICAgICAgcmV0dXJuIGNvbXBvbmVudCA/IGRlZXBSZWFkb25seShjb21wb25lbnQpIDogbnVsbDtcbiAgICAgICAgfSxcbiAgICAgICAgZ2V0KGVudGl0eSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgICAgIGlmICghY29tcG9uZW50KSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBbZ2V0RnJvbV0gQ29tcG9uZW50ICR7Y29tcG9uZW50TmFtZX0gZm9yIGVudGl0eSAjJHtlbnRpdHl9IG5vdCBmb3VuZGApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIGRlZXBSZWFkb25seShjb21wb25lbnQpO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGUoZW50aXR5LCB2YWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgICAgIGlmIChjb21wb25lbnQpIHtcbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoYFtjcmVhdGVdIENvbXBvbmVudCAke2NvbXBvbmVudE5hbWV9IGZvciAke2VudGl0eX0gYWxyZWFkeSBleGlzdHNgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IHVzZWRWYWx1ZSA9IHZhbHVlID09PSB1bmRlZmluZWQgPyBzY2hlbWEuY3JlYXRlKCkgOiBzY2hlbWEuZXh0ZW5kID8gc2NoZW1hLmV4dGVuZCh2YWx1ZSkgOiB2YWx1ZTtcbiAgICAgICAgICAgIGRhdGEuc2V0KGVudGl0eSwgdXNlZFZhbHVlKTtcbiAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuYWRkKGVudGl0eSk7XG4gICAgICAgICAgICByZXR1cm4gdXNlZFZhbHVlO1xuICAgICAgICB9LFxuICAgICAgICBjcmVhdGVPclJlcGxhY2UoZW50aXR5LCB2YWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgdXNlZFZhbHVlID0gdmFsdWUgPT09IHVuZGVmaW5lZCA/IHNjaGVtYS5jcmVhdGUoKSA6IHNjaGVtYS5leHRlbmQgPyBzY2hlbWEuZXh0ZW5kKHZhbHVlKSA6IHZhbHVlO1xuICAgICAgICAgICAgZGF0YS5zZXQoZW50aXR5LCB1c2VkVmFsdWUpO1xuICAgICAgICAgICAgZGlydHlJdGVyYXRvci5hZGQoZW50aXR5KTtcbiAgICAgICAgICAgIHJldHVybiB1c2VkVmFsdWU7XG4gICAgICAgIH0sXG4gICAgICAgIGdldE11dGFibGVPck51bGwoZW50aXR5KSB7XG4gICAgICAgICAgICBjb25zdCBjb21wb25lbnQgPSBkYXRhLmdldChlbnRpdHkpO1xuICAgICAgICAgICAgaWYgKCFjb21wb25lbnQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuYWRkKGVudGl0eSk7XG4gICAgICAgICAgICByZXR1cm4gY29tcG9uZW50O1xuICAgICAgICB9LFxuICAgICAgICBnZXRPckNyZWF0ZU11dGFibGUoZW50aXR5LCB2YWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgICAgIGlmICghY29tcG9uZW50KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY3JlYXRlKGVudGl0eSwgdmFsdWUpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgZGlydHlJdGVyYXRvci5hZGQoZW50aXR5KTtcbiAgICAgICAgICAgICAgICByZXR1cm4gY29tcG9uZW50O1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBnZXRNdXRhYmxlKGVudGl0eSkge1xuICAgICAgICAgICAgY29uc3QgY29tcG9uZW50ID0gdGhpcy5nZXRNdXRhYmxlT3JOdWxsKGVudGl0eSk7XG4gICAgICAgICAgICBpZiAoY29tcG9uZW50ID09PSBudWxsKSB7XG4gICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBbbXV0YWJsZV0gQ29tcG9uZW50ICR7Y29tcG9uZW50TmFtZX0gZm9yICR7ZW50aXR5fSBub3QgZm91bmRgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBjb21wb25lbnQ7XG4gICAgICAgIH0sXG4gICAgICAgICppdGVyYXRvcigpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3QgW2VudGl0eSwgY29tcG9uZW50XSBvZiBkYXRhKSB7XG4gICAgICAgICAgICAgICAgeWllbGQgW2VudGl0eSwgY29tcG9uZW50XTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgKmRpcnR5SXRlcmF0b3IoKSB7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IGVudGl0eSBvZiBkaXJ0eUl0ZXJhdG9yKSB7XG4gICAgICAgICAgICAgICAgeWllbGQgZW50aXR5O1xuICAgICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBnZXRDcmR0VXBkYXRlczogY3JlYXRlR2V0Q3JkdE1lc3NhZ2VzRm9yTHd3KGNvbXBvbmVudElkLCB0aW1lc3RhbXBzLCBkaXJ0eUl0ZXJhdG9yLCBzY2hlbWEsIGRhdGEpLFxuICAgICAgICB1cGRhdGVGcm9tQ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1tsZW4gLSAxXS50aW1lc3RhbXAgPD0gcm93LnJhd1tsZW4gLSAyXS50aW1lc3RhbXApIHtcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG4gICAgZnVuY3Rpb24gZ290VXBkYXRlZChlbnRpdHkpIHtcbiAgICAgICAgY29uc3Qgcm93ID0gZGF0YS5nZXQoZW50aXR5KTtcbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIGVsc2UgKi9cbiAgICAgICAgaWYgKHJvdykge1xuICAgICAgICAgICAgaWYgKHNob3VsZFNvcnQocm93KSkge1xuICAgICAgICAgICAgICAgIHJvdy5yYXcuc29ydChzb3J0QnlUaW1lc3RhbXApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgd2hpbGUgKHJvdy5yYXcubGVuZ3RoID4gb3B0aW9ucy5tYXhFbGVtZW50cykge1xuICAgICAgICAgICAgICAgIHJvdy5yYXcuc2hpZnQoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IGZyb3plblNldCA9IGZyZWV6ZVNldChuZXcgU2V0KHJvdz8ucmF3Lm1hcCgoJCkgPT4gJC52YWx1ZSkpKTtcbiAgICAgICAgICAgIHJvdy5mcm96ZW5TZXQgPSBmcm96ZW5TZXQ7XG4gICAgICAgICAgICByZXR1cm4gZnJvemVuU2V0O1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgICAgIHJldHVybiBlbXB0eVJlYWRvbmx5U2V0O1xuICAgICAgICB9XG4gICAgfVxuICAgIGZ1bmN0aW9uIGFwcGVuZChlbnRpdHksIHZhbHVlKSB7XG4gICAgICAgIGxldCByb3cgPSBkYXRhLmdldChlbnRpdHkpO1xuICAgICAgICBpZiAoIXJvdykge1xuICAgICAgICAgICAgcm93ID0geyByYXc6IFtdLCBmcm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bXBvbmVudFR5cGUuR3Jvd09ubHlWYWx1ZVNldCAqLztcbiAgICAgICAgfSxcbiAgICAgICAgc2NoZW1hLFxuICAgICAgICBoYXMoZW50aXR5KSB7XG4gICAgICAgICAgICByZXR1cm4gZGF0YS5oYXMoZW50aXR5KTtcbiAgICAgICAgfSxcbiAgICAgICAgZW50aXR5RGVsZXRlZChlbnRpdHkpIHtcbiAgICAgICAgICAgIGRhdGEuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgIH0sXG4gICAgICAgIGdldChlbnRpdHkpIHtcbiAgICAgICAgICAgIGNvbnN0IHZhbHVlcyA9IGRhdGEuZ2V0KGVudGl0eSk7XG4gICAgICAgICAgICBpZiAodmFsdWVzKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlcy5mcm96ZW5TZXQ7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZW1wdHlSZWFkb25seVNldDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgYWRkVmFsdWUoZW50aXR5LCByYXdWYWx1ZSkge1xuICAgICAgICAgICAgY29uc3QgeyBzZXQsIHZhbHVlIH0gPSBhcHBlbmQoZW50aXR5LCByYXdWYWx1ZSk7XG4gICAgICAgICAgICBkaXJ0eUl0ZXJhdG9yLmFkZChlbnRpdHkpO1xuICAgICAgICAgICAgY29uc3QgYnVmID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoKTtcbiAgICAgICAgICAgIHNjaGVtYS5zZXJpYWxpemUodmFsdWUsIGJ1Zik7XG4gICAgICAgICAgICBxdWV1ZWRDb21tYW5kcy5wdXNoKHtcbiAgICAgICAgICAgICAgICBjb21wb25lbnRJZCxcbiAgICAgICAgICAgICAgICBkYXRhOiBidWYudG9CaW5hcnkoKSxcbiAgICAgICAgICAgICAgICBlbnRpdHlJZDogZW50aXR5LFxuICAgICAgICAgICAgICAgIHRpbWVzdGFtcDogMCxcbiAgICAgICAgICAgICAgICB0eXBlOiBDcmR0TWVzc2FnZVR5cGUuQVBQRU5EX1ZBTFVFXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJldHVybiBzZXQ7XG4gICAgICAgIH0sXG4gICAgICAgICppdGVyYXRvcigpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3QgW2VudGl0eSwgY29tcG9uZW50XSBvZiBkYXRhKSB7XG4gICAgICAgICAgICAgICAgeWllbGQgW2VudGl0eSwgY29tcG9uZW50LmZyb3plblNldF07XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgICpkaXJ0eUl0ZXJhdG9yKCkge1xuICAgICAgICAgICAgZm9yIChjb25zdCBlbnRpdHkgb2YgZGlydHlJdGVyYXRvcikge1xuICAgICAgICAgICAgICAgIHlpZWxkIGVudGl0eTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgZ2V0Q3JkdFVwZGF0ZXMoKSB7XG4gICAgICAgICAgICAvLyByZXR1cm4gYSBjb3B5IG9mIHRoZSBjb21tYW5kcywgYW5kIHRoZW4gY2xlYXIgdGhlIGxvY2FsIGNvcHlcbiAgICAgICAgICAgIGRpcnR5SXRlcmF0b3IuY2xlYXIoKTtcbiAgICAgICAgICAgIHJldHVybiBxdWV1ZWRDb21tYW5kcy5zcGxpY2UoMCwgcXVldWVkQ29tbWFuZHMubGVuZ3RoKTtcbiAgICAgICAgfSxcbiAgICAgICAgdXBkYXRlRnJvbUNyZHQoX2JvZHkpIHtcbiAgICAgICAgICAgIGlmIChfYm9keS50eXBlID09PSBDcmR0TWVzc2FnZVR5cGUuQVBQRU5EX1ZBTFVFKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgYnVmID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoX2JvZHkuZGF0YSk7XG4gICAgICAgICAgICAgICAgYXBwZW5kKF9ib2R5LmVudGl0eUlkLCBzY2hlbWEuZGVzZXJpYWxpemUoYnVmKSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gW251bGwsIHVuZGVmaW5lZF07XG4gICAgICAgIH0sXG4gICAgICAgIGR1bXBDcmR0U3RhdGVUb0J1ZmZlcjogZnVuY3Rpb24gKGJ1ZmZlciwgZmlsdGVyRW50aXR5KSB7XG4gICAgICAgICAgICBmb3IgKGNvbnN0IFtlbnRpdHksIHsgcmF3IH1dIG9mIGRhdGEpIHtcbiAgICAgICAgICAgICAgICBpZiAoZmlsdGVyRW50aXR5ICYmICFmaWx0ZXJFbnRpdHkoZW50aXR5KSlcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgZm9yIChjb25zdCBpdCBvZiByYXcpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgYnVmID0gbmV3IFJlYWRXcml0ZUJ5dGVCdWZmZXIoKTtcbiAgICAgICAgICAgICAgICAgICAgc2NoZW1hLnNlcmlhbGl6ZShpdC52YWx1ZSwgYnVmKTtcbiAgICAgICAgICAgICAgICAgICAgQXBwZW5kVmFsdWVPcGVyYXRpb24ud3JpdGUoZW50aXR5LCAwLCBjb21wb25lbnRJZCwgYnVmLnRvQmluYXJ5KCksIGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfTtcbiAgICByZXR1cm4gcmV0O1xufVxuIiwgImltcG9ydCAqIGFzIGNvbXBvbmVudHMgZnJvbSAnLi4vLi4vY29tcG9uZW50cyc7XG5mdW5jdGlvbiogZ2VuRW50aXR5VHJlZShlbnRpdHksIGVudGl0aWVzKSB7XG4gICAgLy8gVGhpcyBhdm9pZCBpbmZpbml0ZSBsb29wIHdoZW4gdGhlcmUgaXMgYSBjeWNsaWMgcGFyZW50aW5nXG4gICAgaWYgKCFlbnRpdGllcy5oYXMoZW50aXR5KSlcbiAgICAgICAgcmV0dXJuO1xuICAgIGVudGl0aWVzLmRlbGV0ZShlbn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nByZXZpb3VzRnJhbWVNYXhUaW1lc3RhbXApIHtcbiAgICAgICAgICAgICAgICAgICAgZ2xvYmFsU3RhdGUudGhpc0ZyYW1lQ29tbWFuZHMucHVzaChjb21tYW5kKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGNvbW1hbmQuc3RhdGUgPT09IDAgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfVVAgKi8gfHwgY29tbWFuZC5zdGF0ZSA9PT0gMSAvKiBQb2ludGVyRXZlbnRUeXBlLlBFVF9ET1dOICovKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHByZXZDb21tYW5kID0gZ2xvYmFsU3RhdGUuYnV0dG9uU3RhdGUuZ2V0KGNvbW1hbmQuYnV0dG9uKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFwcmV2Q29tbWFuZCB8fCBjb21tYW5kLnRpbWVzdGFtcCA+IHByZXZDb21tYW5kLnRpbWVzdGFtcCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZ2xvYmFsU3RhdGUuYnV0dG9uU3RhdGUuc2V0KGNvbW1hbmQuYnV0dG9uLCBjb21tYW5kKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNpbmNlIHdlIGFyZSBpdGVyYXRpbmcgYSBkZXNjZW5kaW5nIGFycmF5LCB3ZSBjYW4gZWFybHkgZmluaXNoIHRoZVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbG9vcFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgLy8gdXBkYXRlIGN1cnJlbnQgZnJhbWUncyBtYXggdGltZXN0YW1wXG4gICAgICAgIGdsb2JhbFN0YXRlLmN1cnJlbnRGcm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G4gICAgICAgIGxldCB1cCA9IG51bGw7XG4gICAgICAgIC8vIFdlIHNlYXJjaCB0aGUgbGFzdCBVUCAmIERPV04gY29tbWFuZCBzb3J0ZWQgYnkgdGltZXN0YW1wIGRlc2NlbmRpbmdcbiAgICAgICAgZm9yIChjb25zdCBpdCBvZiBmaW5kQ29tbWFuZHNCeUFjdGlvbkRlc2NlbmRpbmcoaW5wdXRBY3Rpb24sIGVudGl0eSkpIHtcbiAgICAgICAgICAgIGlmICghdXApIHtcbiAgICAgICAgICAgICAgICBpZiAoaXQuc3RhdGUgPT09IDAgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfVVAgKi8pIHtcbiAgICAgICAgICAgICAgICAgICAgdXAgPSBpdDtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSBpZiAoIWRvd24pIHtcbiAgICAgICAgICAgICAgICBpZiAoaXQuc3RhdGUgPT09IDEgLyogUG9pbnRlckV2ZW50VHlwZS5QRVRfRE9XTiAqLykge1xuICAgICAgICAgICAgICAgICAgICBkb3duID0gaXQ7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICBpZiAoIXVwIHx8ICFkb3duKVxuICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgIC8vIElmIHRoZSBET1dOIGNvbW1hbmQgaGFzIGhhcHBlbiBiZWZvcmUgdGhlIFVQIGNvbW1hbmRzLCBpdCBtZWFucyB0aGF0IHRoYXQgYSBjbGlja2VkIGhhcyBoYXBwZW5cbiAgICAgICAgaWYgKGRvd24udGltZXN0YW1wIDwgdXAudGltZXN0YW1wICYmIHRpbWVzdGFtcElzQ3VycmVudEZyYW1lKHVwLnRpbWVzdGFtcCkpIHtcbiAgICAgICAgICAgIHJldHVybiB7IHVwLCBkb3duIH07X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AgZnVuY3Rpb24gcmVtb3ZlRW50aXR5V2l0aENoaWxkcmVuKGVudGl0eSkge1xuICAgICAgICByZXR1cm4gcmVtb3ZlRW50aXR5V2l0aENoaWxkcmVuRW5naW5lKHsgcmVtb3ZlRW50aXR5LCBkZWZpbmVDb21wb25lbnRGcm9tU2NoZW1hLCBnZXRFbnRpdGllc1dpdGgsIGRlZmluZUNvbXBvbmVudCB9LCBlbnRpdHkpO1xuICAgIH1cbiAgICBmdW5jdGlvbiByZWdpc3RlckNvbXBvbmVudERlZmluaXRpb24oY29tcG9uZW50TmFtZSwgY29tcG9uZW50KSB7XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgIGlmIChzZWFsZWQpXG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0VuZ2luZSBpcyBhbHJlYWR5IHNlYWxlZC4gTm8gY29tcG9uZW50cyBjYW4gYmUgYWRkZWQgYXQgdGhpcyBzdGFnZScpO1xuICAgICAgICBjb25zdCBjb21wb25lbnRJZCA9IGNvbXBvbmVudE51bWJlckZyb21OYW1lKGNvbXBvbmVudE5hbWUpO1xuICAgICAgICBjb25zdCBwcmV2ID0gY29tcG9uZW50c0RlZmluaXRpb24uZ2V0KGNvbXBvbmVudElkKTtcbiAgICAgICAgaWYgKHByZXYpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ29tcG9uZW50IG51bWJlciAke2NvbXBvbmVudElkfSB3YXMgYWxyZWFkeSByZWdpc3RlcmVkLmApO1xuICAgICAgICB9XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgIGlmIChjb21wb25lbnQuY29tcG9uZW50TmFtZSAhPT0gY29tcG9uZW50TmFtZSkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKGBDb21wb25lbnQgbmFtZSBkb2Vzbid0IG1hdGNoIGNvbXBvbmVudERlZmluaXRpb24uY29tcG9uZW50TmFtZSAke2NvbXBvbmVudE5hbWV9ICE9ICR7Y29tcG9uZW50LmNvbXBvbmVudE5hbWV9YCk7XG4gICAgICAgIH1cbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgaWYgKGNvbXBvbmVudC5jb21wb25lbnRJZCAhPT0gY29tcG9uZW50SWQpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ29tcG9uZW50IG51bWJlciBkb2Vzbid0IG1hdGNoIGNvbXBvbmVudERlZmluaXRpb24uY29tcG9uZW50SWQgJHtjb21wb25lbnRJZH0gIT0gJHtjb21wb25lbnQuY29tcG9uZW50SWR9YCk7XG4gICAgICAgIH1cbiAgICAgICAgY29tcG9uZW50c0RlZmluaXRpb24uc2V0KGNvbXBvbmVudElkLCBjb21wb25lbnQpO1xuICAgICAgICByZXR1cm4gY29tcG9uZW50O1xuICAgIH1cbiAgICBmdW5jdGlvbiBkZWZpbmVDb21wb25lbnRGcm9tU2NoZW1hKGNvbXBvbmVudE5hbWUsIHNjaGVtYSkge1xuICAgICAgICBjb25zdCBjb21wb25lbnRJZCA9IGNvbXBvbmVudE51bWJlckZyb21OYW1lKGNvbXBvbmVudE5hbWUpO1xuICAgICAgICBjb25zdCBwcmV2ID0gY29tcG9uZW50c0RlZmluaXRpb24uZ2V0KGNvbXBvbmVudElkKTtcbiAgICAgICAgaWYgKHByZXYpIHtcbiAgICAgICAgICAgIC8vIFRPRE86IGFzc2VydCBzcGVjID09PSBwcmV2LnNwZWNcbiAgICAgICAgICAgIHJldHVybiBwcmV2O1xuICAgICAgICB9XG4gICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgIGlmIChzZWFsZWQpXG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0VuZ2luZSBpcyBhbHJlYWR5IHNlYWxlZC4gTm8gY29tcG9uZW50cyBjYW4gYmUgYWRkZWQgYXQgdGhpcyBzdGFnZScpO1xuICAgICAgICBjb25zdCBuZXdDb21wb25lbnQgPSBjcmVhdGVDb21wb25lbnREZWZpbml0aW9uRnJvbVNjaGVtYShjb21wb25lbnROYW1lLCBjb21wb25lbnRJZCwgc2NoZW1hKTtcbiAgICAgICAgY29tcG9uZW50c0RlZmluaXRpb24uc2V0KGNvbXBvbmVudElkLCBuZXdDb21wb25lbnQpO1xuICAgICAgICByZXR1cm4gbmV3Q29tcG9uZW50O1xuICAgIH1cbiAgICBmdW5jdGlvbiBkZWZpbmVWYWx1ZVNldENvbXBvbmVudEZyb21TY2hlbWEoY29tcG9uZW50TmFtZSwgc2NoZW1hLCBvcHRpb25zKSB7XG4gICAgICAgIGNvbnN0IGNvbXBvbmVudElkID0gY29tcG9uZW50TnVtYmVyRnJvbU5hbWUoY29tcG9uZW50TmFtZSk7XG4gICAgICAgIGNvbnN0IHByZXYgPSBjb21wb25lbnRzRGVmaW5pdGlvbi5nZXQoY29tcG9uZW50SWQpO1xuICAgICAgICBpZiAocHJldikge1xuICAgICAgICAgICAgLy8gVE9ETzogYXNzZXJ0IHNwZWMgPT09IHByZXYuc3BlY1xuICAgICAgICAgICAgcmV0dXJuIHByZXY7XG4gICAgICAgIH1cbiAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgaWYgKHNlYWxlZClcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRW5naW5lIGlzIGFscmVhZHkgc2VhbGVkLiBObyBjb21wb25lbnRzIGNhbiBiZSBhZGRlZCBhdCB0aGlzIHN0YWdlJyk7XG4gICAgICAgIGNvbnN0IG5ld0NvbXBvbmVudCA9IGNyZWF0ZVZhbHVlU2V0Q29tcG9uZW50RGVmaW5pdGlvbkZyb21TY2hlbWEoY29tcG9uZW50TmFtZSwgY29tcG9uZW50SWQsIHNjaGVtYSwgb3B0aW9ucyk7XG4gICAgICAgIGNvbXBvbmVudHNEZWZpbml0aW9uLnNldChjb21wb25lbnRJZCwgbmV3Q29tcG9uZW50KTtcbiAgICAgICAgcmV0dXJuIG5ld0NvbXBvbmVudDtcbiAgICB9XG4gICAgZnVuY3Rpb24gZGVmaW5lQ29tcG9uZW50KGNvbXBvbmVudE5hbWUsIG1hcFNwZWMsIGNvbnN0cnVjdG9yRGVmYXVsdCkge1xuICAgICAgICBjb25zdCBjb21wb25lbnRJZCA9IGNvbXBvbmVudE51bWJlckZyb21OYW1lKGNvbXBvbmVudE5hbWUpO1xuICAgICAgICBjb25zdCBwcmV2ID0gY29tcG9uZW50c0RlZmluaXRpb24uZ2V0KGNvbXBvbmVudElkKTtcbiAgICAgICAgaWYgKHByZXYpIHtcbiAgICAgICAgICAgIC8vIFRPRE86IGFzc2VydCBzcGVjID09PSBwcmV2LnNwZWNcbiAgICAgICAgICAgIHJldHVybiBwcmV2O1xuICAgICAgICB9XG4gICAgICAgIGlmIChzZWFsZWQpXG4gICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoJ0VuZ2luZSBpcyBhbHJlYWR5IHNlYWxlZC4gTm8gY29tcG9uZW50cyBjYW4gYmUgYWRkZWQgYXQgdGhpcyBzdGFnZScpO1xuICAgICAgICBjb25zdCBzY2hlbWFTcGVjID0gU2NoZW1hcy5NYXAobWFwU3BlYywgY29uc3RydWN0b3JEZWZhdWx0KTtcbiAgICAgICAgY29uc3QgZGVmID0gY3JlYXRlQ29tcG9uZW50RGVmaW5pdGlvbkZyb21TY2hlbWEoY29tcG9uZW50TmFtZSwgY29tcG9uZW50SWQsIHNjaGVtYVNwZWMpO1xuICAgICAgICBjb25zdCBuZXdDb21wb25lbnQgPSB7XG4gICAgICAgICAgICAuLi5kZWYsXG4gICAgICAgICAgICBjcmVhdGUoZW50aXR5LCB2YWwpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZGVmLmNyZWF0ZShlbnRpdHksIHZhbCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwgdmFsKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGRlZi5jcmVhdGVPclJlcGxhY2UoZW50aXR5LCB2YWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICBjb21wb25lbnRzRGVmaW5pdGlvbi5zZXQoY29tcG9uZW50SWQsIG5ld0NvbXBvbmVudCk7XG4gICAgICAgIHJldHVybiBuZXdDb21wb25lbnQ7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGdldENvbXBvbmVudChjb21wb25lbnRJZE9yTmFtZSkge1xuICAgICAgICBjb25zdCBjb21wb25lbnRJZCA9IHR5cGVvZiBjb21wb25lbnRJZE9yTmFtZSA9PT0gJ251bWJlcicgPyBjb21wb25lbnRJZE9yTmFtZSA6IGNvbXBvbmVudE51bWJlckZyb21OYW1lKGNvbXBvbmVudElkT3JOYW1lKTtcbiAgICAgICAgY29uc3QgY29tcG9uZW50ID0gY29tcG9uZW50c0RlZmluaXRpb24uZ2V0KGNvbXBvbmVudElkKTtcbiAgICAgICAgaWYgKCFjb21wb25lbnQpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgQ29tcG9uZW50ICR7Y29tcG9uZW50SWRPck5hbWV9IG5vdCBmb3VuZC4gWW91IG5lZWQgdG8gZGVjbGFyZSB0aGUgY29tcG9uZW50cyBhdCB0aGUgYmVnaW5uaWcgb2YgdGhlIGVuZ2luZSBkZWNsYXJhdGlvbmApO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBjb21wb25lbnQ7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGdldENvbXBvbmVudE9yTnVsbChjb21wb25lbnRJZE9yTmFtZSkge1xuICAgICAgICBjb25zdCBjb21wb25lbnRJZCA9IHR5cGVvZiBjb21wb25lbnRJZE9yTmFtZSA9PT0gJ251bWJlcicgPyBjb21wb25lbnRJZE9yTmFtZSA6IGNvbXBvbmVudE51bWJlckZyb21OYW1lKGNvbXBvbmVudElkT3JOYW1lKTtcbiAgICAgICAgcmV0dX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ICAgICAgICAgICBmb3IgKGNvbnN0IGNvbXBvbmVudERlZiBvZiBjb21wb25lbnREZWZpbml0aW9ucykge1xuICAgICAgICAgICAgICAgIGlmICghY29tcG9uZW50RGVmLmhhcyhlbnRpdHkpKSB7XG4gICAgICAgICAgICAgICAgICAgIG1hdGNoZXMgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKG1hdGNoZXMpIHtcbiAgICAgICAgICAgICAgICB5aWVsZCBbZW50aXR5LCAuLi5hcmdzXTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cbiAgICBmdW5jdGlvbiBnZXRTeXN0ZW1zKCkge1xuICAgICAgICByZXR1cm4gc3lzdGVtcy5nZXRTeXN0ZW1zKCk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIGNvbXBvbmVudHNJdGVyKCkge1xuICAgICAgICByZXR1cm4gY29tcG9uZW50c0RlZmluaXRpb24udmFsdWVzKCk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHJlbW92ZUNvbXBvbmVudERlZmluaXRpb24oY29tcG9uZW50SWRPck5hbWUpIHtcbiAgICAgICAgaWYgKHNlYWxlZClcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignRW5naW5lIGlzIGFscmVhZHkgc2VhbGVkLiBObyBjb21wb25lbnRzIGNhbiBiZSByZW1vdmVkIGF0IHRoaXMgc3RhZ2UnKTtcbiAgICAgICAgY29uc3QgY29tcG9uZW50SWQgPSB0eXBlb2YgY29tcG9uZW50SWRPck5hbWUgPT09ICdudW1iZXInID8gY29tcG9uZW50SWRPck5hbWUgOiBjb21wb25lbnROdW1iZXJGcm9tTmFtZShjb21wb25lbnRJZE9yTmFtZSk7XG4gICAgICAgIGNvbXBvbmVudHNEZWZpbml0aW9uLmRlbGV0ZShjb21wb25lbnRJZCk7XG4gICAgfVxuICAgIGNvbXBvbmVudHMuVHJhbnNmb3JtKHsgZGVmaW5lQ29tcG9uZW50RnJvbVNjaGVtYSB9KTtcbiAgICBmdW5jdGlvbiBzZWFsKCkge1xuICAgICAgICBpZiAoIXNlYWxlZCkge1xuICAgICAgICAgICAgc2VhbGVkID0gdHJ1ZTtcbiAgICAgICAgfVxuICAgIH1cbiAgICByZXR1cm4ge1xuICAgICAgICBhZGRFbnRpdHksXG4gICAgICAgIHJlbW92ZUVudGl0eSxcbiAgICAgICAgcmVtb3ZlRW50aXR5V2l0aENoaWxkcmVuLFxuICAgICAgICBhZGRTeXN0ZW0sXG4gICAgICAgIGdldFN5c3RlbXMsXG4gICAgICAgIHJlbW92ZVN5c3RlbSxcbiAgICAgICAgZGVmaW5lQ29tcG9uZW50LFxuICAgICAgICBkZWZpbmVDb21wb25lbnRGcm9tU2NoZW1hLFxuICAgICAgICBkZWZpbmVWYWx1ZVNldENvbXBvbmVudEZyb21TY2hlbWEsXG4gICAgICAgIGdldEVudGl0aWVzV2l0aCxcbiAgICAgICAgZ2V0Q29tcG9uZW50LFxuICAgICAgICBnZXRDb21wb25lbnRPck51bGw6IGdldENvbXBvbmVudE9yTnVsbCxcbiAgICAgICAgZ2V0RW50aXR5T3JOdWxsQnlOYW1lLFxuICAgICAgICByZW1vdmVDb21wb25lbnREZWZpbml0aW9uLFxuICAgICAgICByZWdpc3RlckNvbXBvbmVudERlZmluaXRpb24sXG4gICAgICAgIGVudGl0eUNvbnRhaW5lcixcbiAgICAgICAgY29tcG9uZW50c0l0ZXIsXG4gICAgICAgIHNlYWxcbiAgICB9O1xufVxuLyoqXG4gKiBJbnRlcm5hbCBjb25zdHJ1Y3RvciBvZiBuZXcgZW5naW5lcywgdGhpcyBpcyBhbiBpbnRlcm5hbCBBUElcbiAqIEBwdWJsaWNcbiAqIEBkZXByZWNhdGVkIFByZXZlbnQgbWFudWFsIHVzYWdlIHByZWZlciBcImVuZ2luZVwiIGZvciBzY2VuZSBkZXZlbG9wbWVudFxuICovXG5le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ICBjb25zdCBnZXREZWZhdWx0T3B0cyA9IChvcHRzID0ge30pID0+ICh7XG4gICAgICAgIGJ1dHRvbjogMyAvKiBJbnB1dEFjdGlvbi5JQV9BTlkgKi8sXG4gICAgICAgIC4uLm9wdHNcbiAgICB9KTtcbiAgICBjb25zdCBldmVudHNNYXAgPSBuZXcgTWFwKCk7XG4gICAgZnVuY3Rpb24gZ2V0RXZlbnQoZW50aXR5KSB7XG4gICAgICAgIHJldHVybiBldmVudHNNYXAuZ2V0KGVudGl0eSkgfHwgZXZlbnRzTWFwLnNldChlbnRpdHksIG5ldyBNYXAoKSkuZ2V0KGVudGl0eSk7XG4gICAgfVxuICAgIGZ1bmN0aW9uIHNldFBvaW50ZXJFdmVudChlbnRpdHksIHR5cGUsIG9wdHMpIHtcbiAgICAgICAgaWYgKG9wdHMuaG92ZXJUZXh0IHx8IG9wdHMuc2hvd0ZlZWRiYWNrKSB7XG4gICAgICAgICAgICBjb25zdCBwb2ludGVyRXZlbnQgPSBQb2ludGVyRXZlbnRzLmdldE11dGFibGVPck51bGwoZW50aXR5KSB8fCBQb2ludGVyRXZlbnRzLmNyZWF0ZShlbnRpdHkpO1xuICAgICAgICAgICAgcG9pbnRlckV2ZW50LnBvaW50ZXJFdmVudHMucHVzaCh7XG4gICAgICAgICAgICAgICAgZXZlbnRUeXBlOiB0eXBlLFxuICAgICAgICAgICAgICAgIGV2ZW50SW5mbzoge1xuICAgICAgICAgICAgICAgICAgICBidXR0b246IG9wdHMuYnV0dG9uLFxuICAgICAgICAgICAgICAgICAgICBzaG93RmVlZGJhY2s6IG9wdHMuc2hvd0ZlZWRiYWNrLFxuICAgICAgICAgICAgICAgICAgICBob3ZlclRleHQ6IG9wdHMuaG92ZXJUZXh0LFxuICAgICAgICAgICAgICAgICAgICBtYXhEaXN0YW5jZTogb3B0cy5tYXhEaXN0YW5jZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgfVxuICAgIG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mRlbGV0ZSh0eXBlKTtcbiAgICB9XG4gICAgLy8gQGludGVybmFsXG4gICAgZW5naW5lLmFkZFN5c3RlbShmdW5jdGlvbiBFdmVudFN5c3RlbSgpIHtcbiAgICAgICAgZm9yIChjb25zdCBbZW50aXR5LCBldmVudF0gb2YgZXZlbnRzTWFwKSB7XG4gICAgICAgICAgICBpZiAoZW5naW5lLmdldEVudGl0eVN0YXRlKGVudGl0eSkgPT09IEVudGl0eVN0YXRlLlJlbW92ZWQpIHtcbiAgICAgICAgICAgICAgICBldmVudHNNYXAuZGVsZXRlKGVudGl0eSk7XG4gICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmb3IgKGNvbnN0IFtldmVudFR5cGUsIHsgY2IsIG9wdHMgfV0gb2YgZXZlbnQpIHtcbiAgICAgICAgICAgICAgICBpZiAoZXZlbnRUeXBlID09PSBFdmVudFR5cGUuQ2xpY2spIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgY29tbWFuZCA9IGlucHV0U3lzdGVtLmdldENsaWNrKG9wdHMuYnV0dG9uLCBlbnRpdHkpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoY29tbWFuZClcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrTm90VGhlbmFibGUoY2IoY29tbWFuZC51cCksICdDbGljayBldmVudCByZXR1cm5lZCBhIHRoZW5hYmxlLiBPbmx5IHN5bmNocm9ub3VzIGZ1bmN0aW9ucyBhcmUgYWxsb3dlZCcpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoZXZlbnRUeXBlID09PSBFdmVudFR5cGUuRG93biB8fCBldmVudFR5cGUgPT09IEV2ZW50VHlwZS5VcCkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjb21tYW5kID0gaW5wdXRTeXN0ZW0uZ2V0SW5wdXRDb21tYW5kKG9wdHMuYnV0dG9uLCBnZXRQb2ludGVyRXZlbnQoZXZlbnRUeXBlKSwgZW50aXR5KTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGNvbW1hbmQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNoZWNrTm90VGhlbmFibGUoY2IoY29tbWFuZCksICdFdmVudCBoYW5kbGVyIHJldHVybmVkIGEgdGhlbmFibGUuIE9ubHkgc3luY2hyb25vdXMgZnVuY3Rpb25zIGFyZSBhbGxvd2VkJyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICB9KTtcbiAgICBjb25zdCBvblBvaW50ZXJEb3duID0gKC4uLmFyZ3MpID0+IHtcbiAgICAgICAgY29uc3QgW2RhdGEsIGNiLCBtYXliZU9wdHNdID0gYXJncztcbiAgICAgICAgaWYgKHR5cGVvZiBkYXRhID09PSAnbnVtYmVyJykge1xuICAgICAgICAgICAgcmV0dXJuIG9uUG9pbnRlckRvd24oeyBlbnRpdHk6IGRhdGEsIG9wdHM6IG1heWJlT3B0cyA/PyB7fSB9LCBjYik7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgeyBlbnRpdHksIG9wdHMgfSA9IGRhdGE7XG4gICAgICAgIGNvbnN0IG9wdGlvbnMgPSBnZXREZWZhdWx0T3B0cyhvcHRzKTtcbiAgICAgICAgcmVtb3ZlRXZlbnQoZW50aXR5LCBFdmVudFR5cGUuRG93bik7XG4gICAgICAgIGdldEV2ZW50KGVudGl0eSkuc2V0KEV2ZW50VHlwZS5Eb3duLCB7IGNiLCBvcHRzOiBvcHRpb25zIH0pO1xuICAgICAgICBzZXRQb2ludGVyRXZlbnQoZW50aXR5LCAxIC8qIFBvaW50ZXJFdmVudFR5cGUuUEVUX0RPV04gKi8sIG9wdGlvbnMpO1xuICAgIH07XG4gICAgY29uc3Qgb25Qb2ludGVyVXAgPSAoLi4uYXJncykgPT4ge1xuICAgICAgICBjb25zdCBbZGF0YSwgY2IsIG1heWJlT3B0c10gPSB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ZFdyaXRlQnl0ZUJ1ZmZlcigpO1xuICAgICAgICAgICAgICAgIFR3ZWVuLnNjaGVtYS5zZXJpYWxpemUodHdlZW4sIGJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgY2FjaGUuc2V0KGVudGl0eSwge1xuICAgICAgICAgICAgICAgICAgICB0d2VlbjogYnVmZmVyLnRvQmluYXJ5KCksXG4gICAgICAgICAgICAgICAgICAgIGZyYW1lczogMCxcbiAgICAgICAgICAgICAgICAgICAgY29tcGxldGVkOiBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICAgY2hhbmdlZDogdHJ1ZVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgdHdlZW5DYWNoZSA9IGNhY2hlLmdldChlbnRpdHkpO1xuICAgICAgICAgICAgdHdlZW5DYWNoZS5mcmFtZXMgKz0gMTtcbiAgICAgICAgICAgIHR3ZWVuQ2FjaGUuY2hhbmdlZCA9IGZhbHNlO1xuICAgICAgICAgICAgaWYgKGlzQ29tcGxldGVkKGVudGl0eSkpIHtcbiAgICAgICAgICAgICAgICAvLyBSZXNldCB0d2VlbiBmcmFtZXMuXG4gICAgICAgICAgICAgICAgdHdlZW5DYWNoZS5mcmFtZXMgPSAwO1xuICAgICAgICAgICAgICAgIC8vIHNldCB0aGUgdHdlZW4gY29tcGxldGVkIHRvIGF2b2lkIGNhbGxpbmcgdGhpcyBhZ2FpbiBmb3IgdGhlIHNhbWUgdHdlZW5cbiAgICAgICAgICAgICAgICB0d2VlbkNhY2hlLmNvbXBsZXRlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgY29uc3QgdHdlZW5TZXF1ZW5jZSA9IFR3ZWVuU2VxdWVuY2UuZ2V0T3JOdWxsKGVudGl0eSk7XG4gICAgICAgICAgICAgICAgaWYgKCF0d2VlblNlcXVlbmNlKVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjb25zdCB7IHNlcXVlbmNlIH0gPSB0d2VlblNlcXVlbmNlO1xuICAgICAgICAgICAgICAgIGlmIChzZXF1ZW5jZSAmJiBzZXF1ZW5jZS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgW25leHRUd2VlblNlcXVlbmNlLCAuLi5vdGhlclR3ZWVuc10gPSBzZXF1ZW5jZTtcbiAgICAgICAgICAgICAgICAgICAgVHdlZW4uY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwgbmV4dFR3ZWVuU2VxdWVuY2UpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBtdXRhYmxlVHdlZW5IZWxwZXIgPSBUd2VlblNlcXVlbmNlLmdldE11dGFibGUoZW50aXR5KTtcbiAgICAgICAgICAgICAgICAgICAgbXV0YWJsZVR3ZWVuSGVscGVyLnNlcXVlbmNlID0gb3RoZXJUd2VlbnM7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0d2VlblNlcXVlbmNlLmxvb3AgPT09IDAgLyogVHdlZW5Mb29wLlRMX1JFU1RBUlQgKi8pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG11dGFibGVUd2VlbkhlbHBlci5zZXF1ZW5jZS5wdXNoKHR3ZWVuKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIGlmICh0d2VlblNlcXVlbmNlLmxvb3AgPT09IDEgLyogVHdlZW5Mb29wLlRMX1lPWU8gKi8pIHtcbiAgICAgICAgICAgICAgICAgICAgVHdlZW4uY3JlYXRlT3JSZXBsYWNlKGVudGl0eSwgYmFja3dhcmRzVHdlZW4odHdlZW4pKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAodHdlZW5TZXF1ZW5jZS5sb29wID09PSAwIC8qIFR3ZWVuTG9vcC5UTF9SRVNUQVJUICovKSB7XG4gICAgICAgICAgICA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ZXQgZG90cyA9IDA7XG4gICAgbGV0IGNvZGU7XG4gICAgZm9yIChsZXQgaSA9IDA7IGkgPD0gcGF0aC5sZW5ndGg7ICsraSkge1xuICAgICAgICBpZiAoaSA8IHBhdGgubGVuZ3RoKVxuICAgICAgICAgICAgY29kZSA9IHBhdGguY2hhckNvZGVBdChpKTtcbiAgICAgICAgZWxzZSBpZiAoY29kZSA9PT0gNDcgLyovKi8pXG4gICAgICAgICAgICBicmVhaztcbiAgICAgICAgZWxzZVxuICAgICAgICAgICAgY29kZSA9IDQ3OyAvKi8qL1xuICAgICAgICBpZiAoY29kZSA9PT0gNDcgLyovKi8pIHtcbiAgICAgICAgICAgIGlmIChsYXN0U2xhc2ggPT09IGkgLSAxIHx8IGRvdHMgPT09IDEpIHtcbiAgICAgICAgICAgICAgICAvLyBOT09QXG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIGlmIChsYXN0U2xhc2ggIT09IGkgLSAxICYmIGRvdHMgPT09IDIpIHtcbiAgICAgICAgICAgICAgICBpZiAocmVzLmxlbmd0aCA8IDIgfHxcbiAgICAgICAgICAgICAgICAgICAgbGFzdFNlZ21lbnRMZW5ndGggIT09IDIgfHxcbiAgICAgICAgICAgICAgICAgICAgcmVzLmNoYXJDb2RlQXQocmVzLmxlbmd0aCAtIDEpICE9PSA0NiAvKi4qLyB8fFxuICAgICAgICAgICAgICAgICAgICByZXMuY2hhckNvZGVBdChyZXMubGVuZ3RoIC0gMikgIT09IDQ2IC8qLiovKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChyZXMubGVuZ3RoID4gMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbGFzdFNsYXNoSW5kZXggPSByZXMubGFzdEluZGV4T2YoJy8nKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsYXN0U2xhc2hJbmRleCAhPT0gcmVzLmxlbmd0aCAtIDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobGFzdFNsYXNoSW5kZXggPT09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcyA9ICcnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0U2VnbWVudExlbmd0aCA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXMgPSByZXMuc2xpY2UoMCwgbGFzdFNsYXNoSW5kZXgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0U2VnbWVudExlbmd0aCA9IHJlcy5sZW5ndGggLSAxIC0gcmVzLmxhc3RJbmRleE9mKCcvJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RTbGFzaCA9IGk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG90cyA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAocmVzLmxlbmd0aCA9PT0gMiB8fCByZXMubGVuZ3RoID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXMgPSAnJztcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RTZWdtZW50TGVuZ3RoID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxhc3RTbGFzaCA9IGk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkb3RzID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChhbGxvd0Fib3ZlUm9vdCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAocmVzLmxlbmd0aCA+IDApXG4gICAgICAgICAgICAgICAgICAgICAgICByZXMgKz0gJy8uLic7XG4gICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlcyA9ICcuLic7XG4gICAgICAgICAgICAgICAgICAgIGxhc3RTZWdtZW50TGVuZ3RoID0gMjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICBpZiAocmVzLmxlbmd0aCA+IDApXG4gICAgICAgICAgICAgICAgICAgIHJlcyArPSAnLycgKyBwYXRoLnNsaWNlKGxhc3RTbGFzaCArIDEsIGkpO1xuICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgcmVzID0gcGF0aC5zbGljZShsYXN0U2xhc2ggKyAxLCBpKTtcbiAgICAgICAgICAgICAgICBsYXN0U2VnbWVudExlbmd0aCA9IGkgLSBsYXN0U2xhc2ggLSAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgbGFzdFNsYXNoID0gaTtcbiAgICAgICAgICAgIGRvdHMgPSAwO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKGNvZGUgPT09IDQ2IC8qLiovICYmIGRvdHMgIT09IC0xKSB7XG4gICAgICAgICAgICArK2RvdHM7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBkb3RzID0gLTE7XG4gICAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIHJlcztcbn1cbi8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG5leHBvcnQgZnVuY3Rpb24gcmVzb2x2ZSguLi5hcmdzKSB7XG4gICAgbGV0IHJlc29sdmVkUGF0aCA9ICcnO1xuICAgIGxldCByZXNvbHZlZEFic29sdXRlID0gZmFsc2U7XG4gICAgbGV0IGN3ZDtcbiAgICBmb3IgKGxldCBpID0gYXJncy5sZW5ndGggLSAxOyBpID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UHJldmlvdXMgaW5zdGFuY2VzOiAke2FscmVhZHlSZXF1ZXN0ZWRTcmMudG9TdHJpbmcoKX1gKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaW5zdGFuY2VDb21wb3NpdGUoZW5naW5lLCBjaGlsZENvbXBvc2l0ZVJlc291cmNlLCBjb21wb3NpdGVQcm92aWRlciwge1xuICAgICAgICAgICAgICAgICAgICByb290RW50aXR5OiB0YXJnZXRFbnRpdHksXG4gICAgICAgICAgICAgICAgICAgIGFscmVhZHlSZXF1ZXN0ZWRTcmM6IG5ldyBTZXQoYWxyZWFkeVJlcXVlc3RlZFNyYykuYWRkKGNoaWxkQ29tcG9zaXRlUmVzb3VyY2Uuc3JjKSxcbiAgICAgICAgICAgICAgICAgICAgZW50aXR5TWFwcGluZzogZW50aXR5TWFwcGluZz8udHlwZSA9PT0gRW50aXR5TWFwcGluZ01vZGUuRU1NX05FWFRfQVZBSUxBQkxFID8gZW50aXR5TWFwcGluZyA6IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgfVxuICAgIC8vICMjIDMgIyNcbiAgICAvLyBUaGVuLCB3ZSBjb3B5IHRoZSBhbGwgcmVzdCBvZiB0aGUgY29tcG9uZW50cyAoc2tpcHBpbmcgdGhlIENvbXBvc2l0ZSBvbmVzKVxuICAgIGZvciAoY29uc3QgY29tcG9uZW50IG9mIGNvbXBvc2l0ZVJlc291cmNlLmNvbXBvc2l0ZS5jb21wb25lbnRzKSB7XG4gICAgICAgIC8vIFdlIGFscmVhZHkgaW5zdGFuY2VkIHRoZSBjb21wb3NpdGVcbiAgICAgICAgaWYgKGNvbXBvbmVudC5uYW1lID09PSBDb21wb3NpdGVSb290Q29tcG9uZW50LmNvbXBvbmVudE5hbWUpXG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgLy8gIyMgM2EgIyNcbiAgICAgICAgLy8gV2UgZmluZCB0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gICAgICAgY29uc3QgdHJhbnNmb3JtID0gY29tcG9uZW50VmFsdWU7XG4gICAgICAgICAgICAgICAgaWYgKHRyYW5zZm9ybS5wYXJlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgdHJhbnNmb3JtLnBhcmVudCA9IGdldENvbXBvc2l0ZUVudGl0eSh0cmFuc2Zvcm0ucGFyZW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRyYW5zZm9ybS5wYXJlbnQgPSBnZXRDb21wb3NpdGVFbnRpdHkoMCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIFRPRE86IGlzIGl0IGdvaW5nIHRvIGJlIG5lY2Vzc2FyeSB0byByZW1hcCBhc3NldHM/IGUuZy4gc3JjIHBhcmFtIGZyb20gQXVkaW9Tb3VyY2UgYW5kIEdsdGZDb250YWluZXJcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgICAgIFNjaGVtYXMubXV0YXRlTmVzdGVkVmFsdWVzKGNvbXBvbmVudERlZmluaXRpb24uc2NoZW1hLmpzb25TY2hlbWEsIGNvbXBvbmVudFZhbHVlLCAodmFsdWUsIHZhbHVlVHlwZSkgPT4ge1xuICAgICAgICAgICAgICAgICAgICBpZiAodmFsdWVUeXBlLnNlcmlhbGl6YXRpb25UeXBlID09PSAnZW50aXR5Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHsgY2hhbmdlZDogdHJ1ZSwgdmFsdWU6IGdldENvbXBvc2l0ZUVudGl0eSh2YWx1ZSkgfTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB7IGNoYW5nZWQ6IGZhbHNlIH07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9K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uZGF0YT8uJGNhc2UpIHtcbiAgICAgICAgICAgIGNhc2UgXCJqc29uXCI6XG4gICAgICAgICAgICAgICAgVmFsdWUuZW5jb2RlKFZhbHVlLndyYXAobWVzc2FnZS5kYXRhLmpzb24pLCB3cml0ZXIudWludDMyKDEwKS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcImJpbmFyeVwiOlxuICAgICAgICAgICAgICAgIHdyaXRlci51aW50MzIoMTgpLmJ5dGVzKG1lc3NhZ2UuZGF0YS5iaW5hcnkpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB3cml0ZXI7XG4gICAgfVxuICAgIENvbXBvbmVudERhdGEuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VDb21wb25lbnREYXRhKCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGF0YSA9IHsgJGNhc2U6IFwianNvblwiLCBqc29uOiBWYWx1ZS51bndyYXAoVmFsdWUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5kYXRhID0geyAkY2FzZTogXCJiaW5hcnlcIiwgYmluYXJ5OiByZWFkZXIuYnl0ZXMoKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvbmVudERhdGEuZGVjb2RlID0gZGVjb2RlO1xuICAgIGZ1bmN0aW9uIGZyb21KU09OKG9iamVjdCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgZGF0YTogaXNTZXQob2JqZWN0Lmpzb24pXG4gICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcImpzb25cIiwganNvbjogb2JqZWN0Lmpzb24gfVxuICAgICAgICAgICAgICAgIDogaXNTZXQob2JqZWN0LmJpbmFyeSlcbiAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcImJpbmFyeVwiLCBiaW5hcnk6IGJ5dGVzRnJvbUJhc2U2NChvYmplY3QuYmluYXJ5KSB9XG4gICAgICAgICAgICAgICAgICAgID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7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLm5hbWUgPSByZWFkZXIuc3RyaW5nKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMjpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuanNvblNjaGVtYSA9IFZhbHVlLnVud3JhcChWYWx1ZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAyNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZW50cnkzID0gQ29tcG9zaXRlQ29tcG9uZW50X0RhdGFFbnRyeS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZW50cnkzLnZhbHVlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1lc3NhZ2UuZGF0YS5zZXQoZW50cnkzLmtleSwgZW50cnkzLnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvc2l0ZUNvbXBvbmVudC5kZWNvZGUgPSBkZWNvZGU7XG4gICAgZnVuY3Rpb24gZnJvbUpTT04ob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBuYW1lOiBpc1NldChvYmplY3QubmFtZSkgPyBTdHJpbmcob2JqZWN0Lm5hbWUpIDogXCJcIixcbiAgICAgICAgICAgIGpzb25TY2hlbWE6IGlzU2V0KG9iamVjdD8uanNvblNjaGVtYSkgPyBvYmplY3QuanNvblNjaGVtYSA6IHVuZGVmaW5lZCxcbiAgICAgICAgICAgIGRhdGE6IGlzT2JqZWN0KG9iamVjdC5kYXRhKVxuICAgICAgICAgICAgICAgID8gT2JqZWN0LmVudHJpZXMob2JqZWN0LmRhdGEpLnJlZHVjZSgoYWNjLCBba2V5LCB2YWx1ZV0pID0+IHtcbiAgICAgICAgICAgICAgICAgICAgYWNjLnNldChOdW1iZXIoa2V5KSwgQ29tcG9uZW50RGF0YS5mcm9tSlNPTih2YWx1ZSkpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYWNjO1xuICAgICAgICAgICAgICAgIH0sIG5ldyBNYXAoKSlcbiAgICAgICAgICAgICAgICA6IG5ldyBNYXAoKSxcbiAgICAgICAgfTtcbiAgICB9XG4gICAgQ29tcG9zaXRlQ29tcG9uZW50LmZyb21KU09OID0gZnJvbUpTT047XG4gICAgZnVuY3Rpb24gdG9KU09OKG1lc3NhZ2UpIHtcbiAgICAgICAgY29uc3Qgb2JqID0ge307XG4gICAgICAgIG1lc3NhZ2UubmFtZSAhPT0gdW5kZWZpbmVkICYmIChvYmoubmFtZSA9IG1lc3NhZ2UubmFtZSk7XG4gICAgICAgIG1lc3NhZ2UuanNvblNjaGVtYSAhPT0gdW5kZWZpbmVkICYmIChvYmouanNvblNjaGVtYSA9IG1lc3NhZ2UuanNvblNjaGVtYSk7XG4gICAgICAgIG9iai5kYXRhID0ge307XG4gICAgICAgIGlmIChtZXNzYWdlLmRhdGEpIHtcbiAgICAgICAgICAgIG1lc3NhZ2UuZGF0YS5mb3JFYWNoKCh2LCBrKSA9PiB7XG4gICAgICAgICAgICAgICAgb2JqLmRhdGFba10gPSBDb21wb25lbnREYXRhLnRvSlNPTih2KTtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIENvbXBvc2l0ZUNvbXBvbmVudC50b0pTT04gPSB0b0pTT047XG59KShDb21wb3NpdGVDb21wb25lbnQgfHwgKENvbXBvc2l0ZUNvbXBvbmVudCA9IHt9KSk7XG5mdW5jdGlvbiBjcmVhdGVCYXNlQ29tcG9zaXRlQ29tcG9uZW50X0RhdGFFbnRyeSgpIHtcbiAgICByZXR1cm4geyBrZXk6IDAsIHZhbHVlOiB1bmRlZmluZWQgfTtcbn1cbi8qKlxuICogQHB1YmxpY1xuICovXG5leHBvcnQgdmFyIENvbXBvc2l0ZUNvbXBvbmVudF9EYXRhRW50cnk7XG4oZnVuY3Rpb24gKENvbXBvc2l0ZUNvbXBvbmVudF9EYXRhRW50cnkpIHtcbiAgICBmdW5jdGlvbiBlbmNvZGUobWVzc2FnZSwgd3JpdGVyID0gX20wLldyaXRlci5jcmVhdGUoKSkge1xuICAgICAgICBpZiAobWVzc2FnZS5rZXkgIT09IDApIHtcbiAgICAgICAgICAgIHdyaXRlci51aW50MzIoOCkuaW50MzIobWVzc2FnZS5rZXkpO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtZXNzYWdlLnZhbHVlICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIENvbXBvbmVudERhdGEuZW5jb2RlKG1lc3NhZ2UudmFsdWUsIHdyaXRlci51aW50MzIoMTgpLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgQ29tcG9zaXRlQ29tcG9uZW50X0RhdGFFbnRyeS5lbmNvZGUgPSBlbmNvZGU7XG4gICAgZnVuY3Rpb24gZGVjb2RlKGlucHV0LCBsZW5ndGgpIHtcbiAgICAgICAgY29uc3QgcmVhZGVyID0gaW5wdXQgaW5zdGFuY2VvZiBfbTAuUmVhZGVyID8gaW5wdXQgOiBfbTAuUmVhZGVyLmNyZWF0ZShpbnB1dCk7XG4gICAgICAgIGxldCBlbmQgPSBsZW5ndGggPT09IHVuZGVmaW5lZCA/IHJlYWRlci5sZW4gOiByZWFkZXIucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbXBvc2l0ZUNvbXBvbmVudF9EYXRhRW50cnkoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmtleSA9IHJlYWRlci5pbnQzMigpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gQ29tcG9uZW50RGF0YS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvc2l0ZUNvbXBvbmVudF9EYXRhRW50cnkuZGVjb2RlID0gZGVjb2RlO1xuICAgIGZ1bmN0aW9uIGZyb21KU09OKG9iamVjdCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAga2V5OiBpc1NldChvYmplY3Qua2V5KSA/IE51bWJlcihvYmplY3Qua2V5KSA6IDAsXG4gICAgICAgICAgICB2YWx1ZTogaXNTZXQob2JqZWN0LnZhbHVlKSA/IENvbXBvbmVudERhdGEuZnJvbUpTT04ob2JqZWN0LnZhbHVlKSA6IHVuZGVmaW5lZCxcbiAgICAgICAgfTtcbiAgICB9XG4gICAgQ29tcG9zaXRlQ29tcG9uZW50X0RhdGFFbnRyeS5mcm9tSlNPTiA9IGZyb21KU09OO1xuICAgIGZ1bmN0aW9uIHRvSlNPTihtZXNzYWdlKSB7XG4gICAgICAgIGNvbnN0IG9iaiA9IHt9O1xuICAgICAgICBtZXNzYWdlLmtleSAhPT0gdW5kZWZpbmVkICYmIChvYmoua2V5ID0gTWF0aC5yb3VuZChtZXNzYWdlLmtleSkpO1xuICAgICAgICBtZXNzYWdlLnZhbHVlICE9PSB1bmRlZmluZWQgJiYgKG9iai52YWx1ZSA9IG1lc3NhZ2UudmFsdWUgPyBDb21wb25lbnREYXRhLnRvSlNPTihtZXNzYWdlLnZhbHVlKSA6IHVuZGVmaW5lZCk7XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIENvbXBvc2l0ZUNvbXBvbmVudF9EYXRhRW50cnkudG9KU09OID0gdG9KU09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ucG9zICsgbGVuZ3RoO1xuICAgICAgICBjb25zdCBtZXNzYWdlID0gY3JlYXRlQmFzZUNvbXBvc2l0ZURlZmluaXRpb24oKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZlcnNpb24gPSByZWFkZXIuaW50MzIoKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5jb21wb25lbnRzLnB1c2goQ29tcG9zaXRlQ29tcG9uZW50LmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIENvbXBvc2l0ZURlZmluaXRpb24uZGVjb2RlID0gZGVjb2RlO1xuICAgIGZ1bmN0aW9uIGZyb21KU09OKG9iamVjdCkge1xuICAgICAgICByZXR1cm4ge1xuICAgICAgICAgICAgdmVyc2lvbjogaXNTZXQob2JqZWN0LnZlcnNpb24pID8gTnVtYmVyKG9iamVjdC52ZXJzaW9uKSA6IDAsXG4gICAgICAgICAgICBjb21wb25lbnRzOiBBcnJheS5pc0FycmF5KG9iamVjdD8uY29tcG9uZW50cylcbiAgICAgICAgICAgICAgICA/IG9iamVjdC5jb21wb25lbnRzLm1hcCgoZSkgPT4gQ29tcG9zaXRlQ29tcG9uZW50LmZyb21KU09OKGUpKVxuICAgICAgICAgICAgICAgIDogW10sXG4gICAgICAgIH07XG4gICAgfVxuICAgIENvbXBvc2l0ZURlZmluaXRpb24uZnJvbUpTT04gPSBmcm9tSlNPTjtcbiAgICBmdW5jdGlvbiB0b0pTT04obWVzc2FnZSkge1xuICAgICAgICBjb25zdCBvYmogPSB7fTtcbiAgICAgICAgbWVzc2FnZS52ZXJzaW9uICE9PSB1bmRlZmluZWQgJiYgKG9iai52ZXJzaW9uID0gTWF0aC5yb3VuZChtZXNzYWdlLnZlcnNpb24pKTtcbiAgICAgICAgaWYgKG1lc3NhZ2UuY29tcG9uZW50cykge1xuICAgICAgICAgICAgb2JqLmNvbXBvbmVudHMgPSBtZXNzYWdlLmNvbXBvbmVudHMubWFwKChlKSA9PiBlID8gQ29tcG9zaXRlQ29tcG9uZW50LnRvSlNPTihlKSA6IHVuZGVmaW5lZCk7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBvYmouY29tcG9uZW50cyA9IFtdO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIENvbXBvc2l0ZURlZmluaXRpb24udG9KU09OID0gdG9KU09OO1xufSkoQ29tcG9zaXRlRGVmaW5pdGlvbiB8fCAoQ29tcG9zaXRlRGVmaW5pdGlvbiA9IHt9KSk7XG5jb25zdCB0c1Byb3RvR2xvYmFsVGhpcyA9ICgoKSA9PiB7XG4gICAgaWYgKHR5c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WcgIT09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBlbnRyeTEgPSBTdHJ1Y3RfRmllbGRzRW50cnkuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGVudHJ5MS52YWx1ZSAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmZpZWxkcy5zZXQoZW50cnkxLmtleSwgZW50cnkxLnZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFN0cnVjdC5kZWNvZGUgPSBkZWNvZGU7XG4gICAgZnVuY3Rpb24gZnJvbUpTT04ob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBmaWVsZHM6IGlzT2JqZWN0KG9iamVjdC5maWVsZHMpXG4gICAgICAgICAgICAgICAgPyBPYmplY3QuZW50cmllcyhvYmplY3QuZmllbGRzKS5yZWR1Y2UoKGFjYywgW2tleSwgdmFsdWVdKSA9PiB7XG4gICAgICAgICAgICAgICAgICAgIGFjYy5zZXQoa2V5LCB2YWx1ZSk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBhY2M7XG4gICAgICAgICAgICAgICAgfSwgbmV3IE1hcCgpKVxuICAgICAgICAgICAgICAgIDogbmV3IE1hcCgpLFxuICAgICAgICB9O1xuICAgIH1cbiAgICBTdHJ1Y3QuZnJvbUpTT04gPSBmcm9tSlNPTjtcbiAgICBmdW5jdGlvbiB0b0pTT04obWVzc2FnZSkge1xuICAgICAgICBjb25zdCBvYmogPSB7fTtcbiAgICAgICAgb2JqLmZpZWxkcyA9IHt9O1xuICAgICAgICBpZiAobWVzc2FnZS5maWVsZHMpIHtcbiAgICAgICAgICAgIG1lc3NhZ2UuZmllbGRzLmZvckVhY2goKHYsIGspID0+IHtcbiAgICAgICAgICAgICAgICBvYmouZmllbGRzW2tdID0gdjtcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBvYmo7XG4gICAgfVxuICAgIFN0cnVjdC50b0pTT04gPSB0b0pTT047XG4gICAgZnVuY3Rpb24gd3JhcChvYmplY3QpIHtcbiAgICAgICAgY29uc3Qgc3RydWN0ID0gY3JlYXRlQmFzZVN0cnVjdCgpO1xuICAgICAgICBpZiAob2JqZWN0ICE9PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgIE9iamVjdC5rZXlzKG9iamVjdCkuZm9yRWFjaCgoa2V5KSA9PiB7XG4gICAgICAgICAgICAgICAgc3RydWN0LmZpZWxkcy5zZXQoa2V5LCBvYmplY3Rba2V5XSk7XG4gICAgICAgICAgICB9KTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc3RydWN0O1xuICAgIH1cbiAgICBTdHJ1Y3Qud3JhcCA9IHdyYXA7XG4gICAgZnVuY3Rpb24gdW53cmFwKG1lc3NhZ2UpIHtcbiAgICAgICAgY29uc3Qgb2JqZWN0ID0ge307XG4gICAgICAgIFsuLi5tZXNzYWdlLmZpZWxkcy5rZXlzKCldLmZvckVhY2goKGtleSkgPT4ge1xuICAgICAgICAgICAgb2JqZWN0W2tleV0gPSBtZXNzYWdlLmZpZWxkcy5nZXQoa2V5KTtcbiAgICAgICAgfSk7XG4gICAgICAgIHJldHVybiBvYmplY3Q7XG4gICAgfVxuICAgIFN0cnVjdC51bndy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hZ2UgPSBjcmVhdGVCYXNlU3RydWN0X0ZpZWxkc0VudHJ5KCk7XG4gICAgICAgIHdoaWxlIChyZWFkZXIucG9zIDwgZW5kKSB7XG4gICAgICAgICAgICBjb25zdCB0YWcgPSByZWFkZXIudWludDMyKCk7XG4gICAgICAgICAgICBzd2l0Y2ggKHRhZyA+Pj4gMykge1xuICAgICAgICAgICAgICAgIGNhc2UgMTpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uua2V5ID0gcmVhZGVyLnN0cmluZygpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDI6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDE4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLnZhbHVlID0gVmFsdWUudW53cmFwKFZhbHVlLmRlY29kZShyZWFkZXIsIHJlYWRlci51aW50MzIoKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFN0cnVjdF9GaWVsZHNFbnRyeS5kZWNvZGUgPSBkZWNvZGU7XG4gICAgZnVuY3Rpb24gZnJvbUpTT04ob2JqZWN0KSB7XG4gICAgICAgIHJldHVybiB7IGtleTogaXNTZXQob2JqZ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cIm51bWJlclZhbHVlXCI6XG4gICAgICAgICAgICAgICAgd3JpdGVyLnVpbnQzMigxNykuZG91YmxlKG1lc3NhZ2Uua2luZC5udW1iZXJWYWx1ZSk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICBjYXNlIFwic3RyaW5nVmFsdWVcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDI2KS5zdHJpbmcobWVzc2FnZS5raW5kLnN0cmluZ1ZhbHVlKTtcbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIGNhc2UgXCJib29sVmFsdWVcIjpcbiAgICAgICAgICAgICAgICB3cml0ZXIudWludDMyKDMyKS5ib29sKG1lc3NhZ2Uua2luZC5ib29sVmFsdWUpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcInN0cnVjdFZhbHVlXCI6XG4gICAgICAgICAgICAgICAgU3RydWN0LmVuY29kZShTdHJ1Y3Qud3JhcChtZXNzYWdlLmtpbmQuc3RydWN0VmFsdWUpLCB3cml0ZXIudWludDMyKDQyKS5mb3JrKCkpLmxkZWxpbSgpO1xuICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgY2FzZSBcImxpc3RWYWx1ZVwiOlxuICAgICAgICAgICAgICAgIExpc3RWYWx1ZS5lbmNvZGUoTGlzdFZhbHVlLndyYXAobWVzc2FnZS5raW5kLmxpc3RWYWx1ZSksIHdyaXRlci51aW50MzIoNTApLmZvcmsoKSkubGRlbGltKCk7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIHdyaXRlcjtcbiAgICB9XG4gICAgVmFsdWUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VWYWx1ZSgpO1xuICAgICAgICB3aGlsZSAocmVhZGVyLnBvcyA8IGVuZCkge1xuICAgICAgICAgICAgY29uc3QgdGFnID0gcmVhZGVyLnVpbnQzMigpO1xuICAgICAgICAgICAgc3dpdGNoICh0YWcgPj4+IDMpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uua2luZCA9IHsgJGNhc2U6IFwibnVsbFZhbHVlXCIsIG51bGxWYWx1ZTogcmVhZGVyLmludDMyKCkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5raW5kID0geyAkY2FzZTogXCJudW1iZXJWYWx1ZVwiLCBudW1iZXJWYWx1ZTogcmVhZGVyLmRvdWJsZSgpIH07XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIGNhc2UgMzpcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRhZyAhPT0gMjYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG1lc3NhZ2Uua2luZCA9IHsgJGNhc2U6IFwic3RyaW5nVmFsdWVcIiwgc3RyaW5nVmFsdWU6IHJlYWRlci5zdHJpbmcoKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICBjYXNlIDQ6XG4gICAgICAgICAgICAgICAgICAgIGlmICh0YWcgIT09IDMyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBtZXNzYWdlLmtpbmQgPSB7ICRjYXNlOiBcImJvb2xWYWx1ZVwiLCBib29sVmFsdWU6IHJlYWRlci5ib29sKCkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA1OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA0Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5raW5kID0geyAkY2FzZTogXCJzdHJ1Y3RWYWx1ZVwiLCBzdHJ1Y3RWYWx1ZTogU3RydWN0LnVud3JhcChTdHJ1Y3QuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSkgfTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgY2FzZSA2OlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSA1MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS5raW5kID0geyAkY2FzZTogXCJsaXN0VmFsdWVcIiwgbGlzdFZhbHVlOiBMaXN0VmFsdWUudW53cmFwKExpc3RWYWx1ZS5kZWNvZGUocmVhZGVyLCByZWFkZXIudWludDMyKCkpKSB9O1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZWFkZXIuc2tpcFR5cGUodGFnICYgNyk7XG4gICAgICAgIH1cbiAgICAgICAgcmV0dXJuIG1lc3NhZ2U7XG4gICAgfVxuICAgIFZhbHVlLmRlY29kZSA9IGRlY29kZTtcbiAgICBmdW5jdGlvbiBmcm9tSlNPTihvYmplY3QpIHtcbiAgICAgICAgcmV0dXJuIHtcbiAgICAgICAgICAgIGtpbmQ6IGlzU2V0KG9iamVjdC5udWxsVmFsdWUpXG4gICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcIm51bGxWYWx1ZVwiLCBudWxsVmFsdWU6IG51bGxWYWx1ZUZyb21KU09OKG9iamVjdC5udWxsVmFsdWUpIH1cbiAgICAgICAgICAgICAgICA6IGlzU2V0KG9iamVjdC5udW1iZXJWYWx1ZSlcbiAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcIm51bWJlclZhbHVlXCIsIG51bWJlclZhbHVlOiBOdW1iZXIob2JqZWN0Lm51bWJlclZhbHVlKSB9XG4gICAgICAgICAgICAgICAgICAgIDogaXNTZXQob2JqZWN0LnN0cmluZ1ZhbHVlKVxuICAgICAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcInN0cmluZ1ZhbHVlXCIsIHN0cmluZ1ZhbHVlOiBTdHJpbmcob2JqZWN0LnN0cmluZ1ZhbHVlKSB9XG4gICAgICAgICAgICAgICAgICAgICAgICA6IGlzU2V0KG9iamVjdC5ib29sVmFsdWUpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPyB7ICRjYXNlOiBcImJvb2xWYWx1ZVwiLCBib29sVmFsdWU6IEJvb2xlYW4ob2JqZWN0LmJvb2xWYWx1ZSkgfVxuICAgICA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WYWx1ZS5lbmNvZGUoVmFsdWUud3JhcCh2KSwgd3JpdGVyLnVpbnQzMigxMCkuZm9yaygpKS5sZGVsaW0oKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gd3JpdGVyO1xuICAgIH1cbiAgICBMaXN0VmFsdWUuZW5jb2RlID0gZW5jb2RlO1xuICAgIGZ1bmN0aW9uIGRlY29kZShpbnB1dCwgbGVuZ3RoKSB7XG4gICAgICAgIGNvbnN0IHJlYWRlciA9IGlucHV0IGluc3RhbmNlb2YgX20wLlJlYWRlciA/IGlucHV0IDogX20wLlJlYWRlci5jcmVhdGUoaW5wdXQpO1xuICAgICAgICBsZXQgZW5kID0gbGVuZ3RoID09PSB1bmRlZmluZWQgPyByZWFkZXIubGVuIDogcmVhZGVyLnBvcyArIGxlbmd0aDtcbiAgICAgICAgY29uc3QgbWVzc2FnZSA9IGNyZWF0ZUJhc2VMaXN0VmFsdWUoKTtcbiAgICAgICAgd2hpbGUgKHJlYWRlci5wb3MgPCBlbmQpIHtcbiAgICAgICAgICAgIGNvbnN0IHRhZyA9IHJlYWRlci51aW50MzIoKTtcbiAgICAgICAgICAgIHN3aXRjaCAodGFnID4+PiAzKSB7XG4gICAgICAgICAgICAgICAgY2FzZSAxOlxuICAgICAgICAgICAgICAgICAgICBpZiAodGFnICE9PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZS52YWx1ZXMucHVzaChWYWx1ZS51bndyYXAoVmFsdWUuZGVjb2RlKHJlYWRlciwgcmVhZGVyLnVpbnQzMigpKSkpO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICgodGFnICYgNykgPT09IDQgfHwgdGFnID09PSAwKSB7XG4gICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBy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XNOb25Vbmlmb3JtKHZlY3Rvcikge1xuICAgICAgICBjb25zdCBhYnNYID0gTWF0aC5hYnModmVjdG9yLngpO1xuICAgICAgICBjb25zdCBhYnNZID0gTWF0aC5hYnModmVjdG9yLnkpO1xuICAgICAgICBpZiAoYWJzWCAhPT0gYWJzWSkge1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgYWJzWiA9IE1hdGguYWJzKHZlY3Rvci56KTtcbiAgICAgICAgaWYgKGFic1ggIT09IGFic1opIHtcbiAgICAgICAgICAgIHJldHVybiB0cnVlO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiBmYWxzZTtcbiAgICB9XG4gICAgVmVjdG9yMy5pc05vblVuaWZvcm0gPSBpc05vblVuaWZvcm07XG4gICAgLyoqXG4gICAgICogQ3JlYXRlcyBhIG5ldyBWZWN0b3IzIG9iamVjdCBmcm9tIHRoZSBnaXZlbiB4LCB5LCB6IChmbG9hdHMpIGNvb3JkaW5hdGVzLlxuICAgICAqIEBwYXJhbSB4IC0gZGVmaW5lcyB0aGUgZmlyc3QgY29vcmRpbmF0ZXMgKG9uIFggYXhpcylcbiAgICAgKiBAcGFyYW0geSAtIGRlZmluZXMgdGhlIHNlY29uZCBjb29yZGluYXRlcyAob24gWSBheGlzKVxuICAgICAqIEBwYXJhbSB6IC0gZGVmaW5lcyB0aGUgdGhpcmQgY29vcmRpbmF0ZXMgKG9uIFogYXhpcylcbiAgICAgKi9cbiAgICBmdW5jdGlvbiBjcmVhdGUoXG4gICAgLyoqXG4gICAgICogRGVmaW5lcyB0aGUgZmlyc3QgY29vcmRpbmF0ZXMgKG9uIFggYXhpcylcbiAgICAgKi9cbiAgICB4ID0gMCwgXG4gICAgLyoqXG4gICAgICogRGVmaW5lcyB0aGUgc2Vjb25kIGNvb3JkaW5hdGVzIChvbiBZIGF4aXMpXG4gICAgICovXG4gICAgeSA9IDAsIFxuICAgIC8qKlxuICAgICAqIERlZmlu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AgICAgICAgICAgICAgICAgIHNxdWFyZWQgK1xuICAgICAgICAgICAgICAgICgtdmFsdWUxLnggKyAzLjAgKiB2YWx1ZTIueCAtIDMuMCAqIHZhbHVlMy54ICsgdmFsdWU0LngpICogY3ViZWQpO1xuICAgICAgICBjb25zdCB5ID0gMC41ICpcbiAgICAgICAgICAgICgyLjAgKiB2YWx1ZTIueSArXG4gICAgICAgICAgICAgICAgKC12YWx1ZTEueSArIHZhbHVlMy55KSAqIGFtb3VudCArXG4gICAgICAgICAgICAgICAgKDIuMCAqIHZhbHVlMS55IC0gNS4wICogdmFsdWUyLnkgKyA0LjAgKiB2YWx1ZTMueSAtIHZhbHVlNC55KSAqXG4gICAgICAgICAgICAgICAgICAgIHNxdWFyZWQgK1xuICAgICAgICAgICAgICAgICgtdmFsdWUxLnkgKyAzLjAgKiB2YWx1ZTIueSAtIDMuMCAqIHZhbHVlMy55ICsgdmFsdWU0LnkpICogY3ViZWQpO1xuICAgICAgICBjb25zdCB6ID0gMC41ICpcbiAgICAgICAgICAgICgyLjAgKiB2YWx1ZTIueiArXG4gICAgICAgICAgICAgICAgKC12YWx1ZTEueiArIHZhbHVlMy56KSAqIGFtb3VudCArXG4gICAgICAgICAgICAgICAgKDIuMCAqIHZhbHVlMS56IC0gNS4wICogdmFsdWUyLnogKyA0LjAgKiB2YWx1ZTMueiAtIHZhbHVlNC56KSAqXG4gICAgICAgICAgICAgICAgICAgIHNxdWFyZWQgK1xuICAgICAgICAgICAgICAgICgtdmFsdWUxLnogKyAzLjAgKiB2YWx1ZTIueiAtIDMuMCAqIHZhbHVlMy56ICsgdmFsdWU0LnopICogY3ViZWQpO1xuICAgICAgICByZXR1cm4gY3JlYXRlKHgsIHksIHopO1xuICAgIH1cbiAgICBWZWN0b3IzLmNhdG11bGxSb20gPSBjYXRtdWxsUm9tO1xuICAgIC8qKlxuICAgICAqIFJldHVybnMgYSBuZXcgVmVjdG9yMyBzZXQgd2l0aCB0aGUgY29vcmRpbmF0ZXMg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b2ludDMueSAtIHBvaW50MS55O1xuICAgICAgICBjb25zdCB6MiA9IHBvaW50My56IC0gcG9pbnQxLno7XG4gICAgICAgIGNvbnN0IHl6ID0geTEgKiB6MiAtIHoxICogeTI7XG4gICAgICAgIGNvbnN0IHh6ID0gejEgKiB4MiAtIHgxICogejI7XG4gICAgICAgIGNvbnN0IHh5ID0geDEgKiB5MiAtIHkxICogeDI7XG4gICAgICAgIGNvbnN0IHB5dGggPSBNYXRoLnNxcnQoeXogKiB5eiArIHh6ICogeHogKyB4eSAqIHh5KTtcbiAgICAgICAgbGV0IGludlB5dGg7XG4gICAgICAgIGlmIChweXRoICE9PSAwKSB7XG4gICAgICAgICAgICBpbnZQeXRoID0gMS4wIC8gcHl0aDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgIGludlB5dGggPSAwLjA7XG4gICAgICAgIH1cbiAgICAgICAgY29uc3Qgbm9ybWFsID0gVmVjdG9yMy5jcmVhdGUoeXogKiBpbnZQeXRoLCB4eiAqIGludlB5dGgsIHh5ICogaW52UHl0aCk7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBub3JtYWwsXG4gICAgICAgICAgICBkOiAtKG5vcm1hbC54ICogcG9pbnQxLnggKyBub3JtYWwueSAqIHBvaW50MS55ICsgbm9ybWFsLnogKiBwb2ludDEueilcbiAgICAgICAgfTtcbiAgICB9XG4gICAgUGxhbmUuY29weUZyb21Qb2ludHMgPSBjb3B5RnJvbVBvaW50cztcbiAgICAvKipcbiAgICAgKiBDaGVja3MgaWYgdGhlIHBsYW5lIGlzIGZhY2luZyBhIGdpdmVuIGRpcmVjdGlvblxuICAgICAqIEBwYXJhbSBkaXJlY3Rpb24gLSB0aGUgZGlyZWN0aW9uIHRvIGNoZWNrIGlmIHRoZSBwbGFuZSBpcyBmYWNpbmdcbiAgICAgKiBAcGFyYW0gZXBzaWxvbiAtIHZhbHVlIHRoZSBkb3QgcHJvZHVjdCBpcyBjb21wYXJlZ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VudCBtYXRyaXggaXMgaWRlbnRpdHlcbiAgICAgKiBAcmV0dXJucyB0cnVlIGlzIHRoZSBtYXRyaXggaXMgdGhlIGlkZW50aXR5IG1hdHJpeFxuICAgICAqL1xuICAgIGZ1bmN0aW9uIGlzSWRlbnRpdHlVcGRhdGUoc2VsZikge1xuICAgICAgICBpZiAoc2VsZi5faXNJZGVudGl0eURpcnR5KSB7XG4gICAgICAgICAgICBzZWxmLl9pc0lkZW50aXR5RGlydHkgPSBmYWxzZTtcbiAgICAgICAgICAgIGNvbnN0IG0gPSBzZWxmLl9tO1xuICAgICAgICAgICAgc2VsZi5pc0lkZW50aXR5ID1cbiAgICAgICAgICAgICAgICBtWzBdID09PSAxLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVsxXSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bMl0gPT09IDAuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzNdID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVs0XSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bNV0gPT09IDEuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzZdID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVs3XSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bOF0gPT09IDAuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzldID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVsxMF0gPT09IDEuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzExXSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bMTJdID09PSAwLjAgJiZcbiAgICAgICAgICAgICAgICAgICAgbVsxM10gPT09IDAuMCAmJlxuICAgICAgICAgICAgICAgICAgICBtWzE0XSA9PT0gMC4wICYmXG4gICAgICAgICAgICAgICAgICAgIG1bMTVdID09PSAxLjA7XG4gICAgICAgIH1cbiAgICAgICAgc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AgICAgICAgICBzZWxmLl9tWzEwXSAhPT0gMC4wIHx8XG4gICAgICAgICAgICAgICAgc2VsZi5fbVsxMV0gIT09IDAuMCB8fFxuICAgICAgICAgICAgICAgIHNlbGYuX21bMTJdICE9PSAwLjAgfHxcbiAgICAgICAgICAgICAgICBzZWxmLl9tWzEzXSAhPT0gMC4wIHx8XG4gICAgICAgICAgICAgICAgc2VsZi5fbVsxNF0gIT09IDAuMCkge1xuICAgICAgICAgICAgICAgIHNlbGYuaXNJZGVudGl0eTN4MiA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICAgICAgc2VsZi5pc0lkZW50aXR5M3gyID0gdHJ1ZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gc2VsZi5pc0lkZW50aXR5M3gyO1xuICAgIH1cbiAgICBNYXRyaXguaXNJZGVudGl0eUFzM3gyVXBkYXRlID0gaXNJZGVudGl0eUFzM3gyVXBkYXRlO1xuICAgIC8qKlxuICAgICAqIEdldHMgdGhlIGRldGVybWluYW50IG9mIHRoZSBtYXRyaXhcbiAgICAgKiBAcmV0dXJucyB0aGUgbWF0cml4IGRldGVybWluYW50XG4gICAgICovXG4gICAgZnVuY3Rpb24gZGV0ZXJtaW5hbnQoc2VsZikge1xuICAgICAgICBpZiAoc2VsZi5pc0lkZW50aXR5ID09PSB0cnVlKSB7XG4gICAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBtID0gc2VsZi5fbTtcbiAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOm9uZS12YXJpYWJsZS1wZXItZGVjbGFyYXRpb25cbiAgICAgICAgY29uc3QgbTAwID0gbVswXSwgbTAxID0gbVsxXSwgbTAyID0gbVsyXSwgbTAzID0gbVszXTtcbiAgICAgICAgLy8gdHNsaW50OmRpc2FibGUtbmV4dC1saW5lOm9uZS12YXJpYWJsZ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uYW1lXG4gICAgICAgIGNvbnN0IGRldF8yMl8zMyA9IG0yMiAqIG0zMyAtIG0zMiAqIG0yMztcbiAgICAgICAgY29uc3QgZGV0XzIxXzMzID0gbTIxICogbTMzIC0gbTMxICogbTIzO1xuICAgICAgICBjb25zdCBkZXRfMjFfMzIgPSBtMjEgKiBtMzIgLSBtMzEgKiBtMjI7XG4gICAgICAgIGNvbnN0IGRldF8yMF8zMyA9IG0yMCAqIG0zMyAtIG0zMCAqIG0yMztcbiAgICAgICAgY29uc3QgZGV0XzIwXzMyID0gbTIwICogbTMyIC0gbTIyICogbTMwO1xuICAgICAgICBjb25zdCBkZXRfMjBfMzEgPSBtMjAgKiBtMzEgLSBtMzAgKiBtMjE7XG4gICAgICAgIGNvbnN0IGNvZmFjdF8wMCA9ICsobTExICogZGV0XzIyXzMzIC0gbTEyICogZGV0XzIxXzMzICsgbTEzICogZGV0XzIxXzMyKTtcbiAgICAgICAgY29uc3QgY29mYWN0XzAxID0gLShtMTAgKiBkZXRfMjJfMzMgLSBtMTIgKiBkZXRfMjBfMzMgKyBtMTMgKiBkZXRfMjBfMzIpO1xuICAgICAgICBjb25zdCBjb2ZhY3RfMDIgPSArKG0xMCAqIGRldF8yMV8zMyAtIG0xMSAqIGRldF8yMF8zMyArIG0xMyAqIGRldF8yMF8zMSk7XG4gICAgICAgIGNvbnN0IGNvZmFjdF8wMyA9IC0obTEwICogZGV0XzIxXzMyIC0gbTExICogZGV0XzIwXzMyICsgbTEyICogZGV0XzIwXzMxKTtcbiAgICAgICAgY29uc3QgZGV0ID0gbTAwICogY29mYWN0XzAwICsgbTAxICogY29mYWN0XzAxICsgbTAyICogY29mYWN0XzAyICsgbTAzICogY29mYWN0XzAzO1xuICAgICAgICBpZiAoZGV0ID09PSAwKSB7XG4gICAgICAgICAgICBjb3B5KHNvdXJjZSwgcmVzdWx0KTtcbiAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBkZXRJbnYgPSAx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lY2xhcmF0aW9uXG4gICAgICAgIHJlc3VsdFtvZmZzZXRdID0gdG0wICogb20wICsgdG0xICogb200ICsgdG0yICogb204ICsgdG0zICogb20xMjtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDFdID0gdG0wICogb20xICsgdG0xICogb201ICsgdG0yICogb205ICsgdG0zICogb20xMztcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDJdID0gdG0wICogb20yICsgdG0xICogb202ICsgdG0yICogb20xMCArIHRtMyAqIG9tMTQ7XG4gICAgICAgIHJlc3VsdFtvZmZzZXQgKyAzXSA9IHRtMCAqIG9tMyArIHRtMSAqIG9tNyArIHRtMiAqIG9tMTEgKyB0bTMgKiBvbTE1O1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgNF0gPSB0bTQgKiBvbTAgKyB0bTUgKiBvbTQgKyB0bTYgKiBvbTggKyB0bTcgKiBvbTEyO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgNV0gPSB0bTQgKiBvbTEgKyB0bTUgKiBvbTUgKyB0bTYgKiBvbTkgKyB0bTcgKiBvbTEzO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgNl0gPSB0bTQgKiBvbTIgKyB0bTUgKiBvbTYgKyB0bTYgKiBvbTEwICsgdG03ICogb20xNDtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDddID0gdG00ICogb20zICsgdG01ICogb203ICsgdG02ICogb20xMSArIHRtNyAqIG9tMTU7XG4gICAgICAgIHJlc3VsdFtvZmZzZXQgKyA4XSA9IHRtOCAqIG9tMCArIHRtOSAqIG9tNCArIHRtMTAgKiBvbTggKyB0bTExICogb20xMjtcbiAgICAgICAgcmVzdWx0W29mZnNldCArIDldID0gdG04ICogb20xICsgdG05ICogb201ICsgdG0xMCAqIG9tOSArIHRtMTEgKiBvbTEzO1xuICAgICAgICByZXN1bHRbb2Zmc2V0ICsgMTBdID0gdG04ICogb20yICsgdG05ICogb202ICsgdG0xMCAqIG9tMTAgKyB0bT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B9XG4gICAgICAgIGlmIChzZWxmLmlzSWRlbnRpdHkgfHwgb3RoZXIuaXNJZGVudGl0eSkge1xuICAgICAgICAgICAgaWYgKCFzZWxmLl9pc0lkZW50aXR5RGlydHkgJiYgIW90aGVyLl9pc0lkZW50aXR5RGlydHkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gc2VsZi5pc0lkZW50aXR5ICYmIG90aGVyLmlzSWRlbnRpdHk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgY29uc3QgbSA9IHNlbGYuX207XG4gICAgICAgIGNvbnN0IG9tID0gb3RoZXIuX207XG4gICAgICAgIHJldHVybiAobVswXSA9PT0gb21bMF0gJiZcbiAgICAgICAgICAgIG1bMV0gPT09IG9tWzFdICYmXG4gICAgICAgICAgICBtWzJdID09PSBvbVsyXSAmJlxuICAgICAgICAgICAgbVszXSA9PT0gb21bM10gJiZcbiAgICAgICAgICAgIG1bNF0gPT09IG9tWzRdICYmXG4gICAgICAgICAgICBtWzVdID09PSBvbVs1XSAmJlxuICAgICAgICAgICAgbVs2XSA9PT0gb21bNl0gJiZcbiAgICAgICAgICAgIG1bN10gPT09IG9tWzddICYmXG4gICAgICAgICAgICBtWzhdID09PSBvbVs4XSAmJlxuICAgICAgICAgICAgbVs5XSA9PT0gb21bOV0gJiZcbiAgICAgICAgICAgIG1bMTBdID09PSBvbVsxMF0gJiZcbiAgICAgICAgICAgIG1bMTFdID09PSBvbVsxMV0gJiZcbiAgICAgICAgICAgIG1bMTJdID09PSBvbVsxMl0gJiZcbiAgICAgICAgICAgIG1bMTNdID09PSBvbVsxM10gJiZcbiAgICAgICAgICAgIG1bMTRdID09PSBvbVsxNF0gJiZcbiAgICAgICAgICAgIG1bMTVdID09PSBvbVsxNV0pO1xuICAgIH1cbiAgICBNYXRyaXguZXF1YWxzID0gZXF1YWxzO1xuICAgIC8qKlxuICAgICAqIENsb25lIHRoZSBjdXJyZW50IG1hdHJpeFxuICAgICAqIEByZXR1cm5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Fuc2xhdGlvbiAtIGRlZmluZXMgdGhlIHRyYW5zbGF0aW9uIHZlY3RvcjMgZ2l2ZW4gYXMgYSByZWZlcmVuY2UgdG8gdXBkYXRlXG4gICAgICogQHJldHVybnMgdHJ1ZSBpZiBvcGVyYXRpb24gd2FzIHN1Y2Nlc3NmdWxcbiAgICAgKi9cbiAgICBmdW5jdGlvbiBkZWNvbXBvc2Uoc2VsZiwgc2NhbGUsIHJvdGF0aW9uLCB0cmFuc2xhdGlvbikge1xuICAgICAgICBpZiAoc2VsZi5pc0lkZW50aXR5KSB7XG4gICAgICAgICAgICBpZiAodHJhbnNsYXRpb24pIHtcbiAgICAgICAgICAgICAgICB0cmFuc2xhdGlvbi54ID0gMDtcbiAgICAgICAgICAgICAgICB0cmFuc2xhdGlvbi55ID0gMDtcbiAgICAgICAgICAgICAgICB0cmFuc2xhdGlvbi56ID0gMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChzY2FsZSkge1xuICAgICAgICAgICAgICAgIHNjYWxlLnggPSAxO1xuICAgICAgICAgICAgICAgIHNjYWxlLnkgPSAxO1xuICAgICAgICAgICAgICAgIHNjYWxlLnogPSAxO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKHJvdGF0aW9uKSB7XG4gICAgICAgICAgICAgICAgcm90YXRpb24udyA9IDE7XG4gICAgICAgICAgICAgICAgcm90YXRpb24ueCA9IDA7XG4gICAgICAgICAgICAgICAgcm90YXRpb24ueSA9IDA7XG4gICAgICAgICAgICAgICAgcm90YXRpb24ueiA9IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBtID0gc2VsZi5fbTtcbiAgICAgICAgaWYgKHRyYW5zbGF0aW9uKSB7XG4gICAgICAgICAgICB0cmFuc2xhdGlvbi54ID0gbVsxMl07XG4gICAgICAgICAgICB0cmFuc2xhdGlvbi55ID0gbVsxM107XG4gICAgICAg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gICAgICAgY29uc3QgbTAyID0gcmlnaHQuejtcbiAgICAgICAgY29uc3QgbTEwID0gdXBOZXcueDtcbiAgICAgICAgY29uc3QgbTExID0gdXBOZXcueTtcbiAgICAgICAgY29uc3QgbTEyID0gdXBOZXcuejtcbiAgICAgICAgY29uc3QgbTIwID0gZm9yd2FyZE5ldy54O1xuICAgICAgICBjb25zdCBtMjEgPSBmb3J3YXJkTmV3Lnk7XG4gICAgICAgIGNvbnN0IG0yMiA9IGZvcndhcmROZXcuejtcbiAgICAgICAgY29uc3QgbnVtOCA9IG0wMCArIG0xMSArIG0yMjtcbiAgICAgICAgY29uc3QgcXVhdGVybmlvbiA9IGNyZWF0ZSgpO1xuICAgICAgICBpZiAobnVtOCA+IDApIHtcbiAgICAgICAgICAgIGxldCBudW0gPSBNYXRoLnNxcnQobnVtOCArIDEpO1xuICAgICAgICAgICAgcXVhdGVybmlvbi53ID0gbnVtICogMC41O1xuICAgICAgICAgICAgbnVtID0gMC41IC8gbnVtO1xuICAgICAgICAgICAgcXVhdGVybmlvbi54ID0gKG0xMiAtIG0yMSkgKiBudW07XG4gICAgICAgICAgICBxdWF0ZXJuaW9uLnkgPSAobTIwIC0gbTAyKSAqIG51bTtcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueiA9IChtMDEgLSBtMTApICogbnVtO1xuICAgICAgICAgICAgcmV0dXJuIHF1YXRlcm5pb247XG4gICAgICAgIH1cbiAgICAgICAgaWYgKG0wMCA+PSBtMTEgJiYgbTAwID49IG0yMikge1xuICAgICAgICAgICAgY29uc3QgbnVtNyA9IE1hdGguc3FydCgxICsgbTAwIC0gbTExIC0gbTIyKTtcbiAgICAgICAgICAgIGNvbnN0IG51bTQgPSAwLjUgLyBudW03O1xuICAgICAgICAgICAgcXVhdGVybmlvbi54ID0gMC41ICogbnVtNztcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueSA9IChtMDEgKyBtMTApICogbnVtNDtcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueiA9IChtMDIgKyBtMjApICogbnVtNDtcbiAgICAgICAgICAgIHF1YXRlcm5pb24udyA9IChtMTIgLSBtMjEpICogbnVtNDtcbiAgICAgICAgICAgIHJldHVybiBxdWF0ZXJuaW9uO1xuICAgICAgICB9XG4gICAgICAgIGlmIChtMTEgPiBtMjIpIHtcbiAgICAgICAgICAgIGNvbnN0IG51bTYgPSBNYXRoLnNxcnQoMSArIG0xMSAtIG0wMCAtIG0yMik7XG4gICAgICAgICAgICBjb25zdCBudW0zID0gMC41IC8gbnVtNjtcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueCA9IChtMTAgKyBtMDEpICogbnVtMztcbiAgICAgICAgICAgIHF1YXRlcm5pb24ueSA9IDAuNSAqIG51bTY7XG4gICAgICAgICAgICBxdWF0ZXJuaW9uLnogPSAobTIxICsgbTEyKSAqIG51bTM7XG4gICAgICAgICAgICBxdWF0ZXJuaW9uLncgPSAobTIwIC0gbTAyKSAqIG51bTM7XG4gICAgICAgICAgICByZXR1cm4gcXVhdGVybmlvbjtcbiAgICAgICAgfVxuICAgICAgICBjb25zdCBudW01ID0gTWF0aC5zcXJ0KDEgKyBtMjIgLSBtMDAgLSBtMTEpO1xuICAgICAgICBjb25zdCBudW0yID0gMC41IC8gbnVtNTtcbiAgICAgICAgcXVhdGVybmlvbi54ID0gKG0yMCArIG0wMikgKiBudW0yO1xuICAgICAgICBxdWF0ZXJuaW9uLnkgPSAobTIxICsgbTEyKSAqIG51bTI7XG4gICAgICAgIHF1YXRlcm5pb24ueiA9IDAuNSAqIG51bTU7XG4gICAgICAgIHF1YXRlcm5pb24udyA9IChtMDEgLSBtMTApICogbnVtMjtcbiAgICAgICAgcmV0dXJuIHF1YXRlcm5pb247XG4gICAgfVxuICAgIFF1YXRlcm5pb24ubG9va1JvdGF0aW9uID0gbG9va1JvdGF0aW9uO1xuICAgIC8qKlxuICAgICAqIE5vcm1hbGl6ZSBpbiBwbGFjZSB0aGUgY3VycmVudCBxdWF0ZXJuaW9uXG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pbmd1bGFyaXR5IGF0IG5vcnRoIHBvbGVcbiAgICAgICAgICAgIG91dC54ID0gTWF0aC5QSSAvIDI7XG4gICAgICAgICAgICBvdXQueSA9IDIgKiBNYXRoLmF0YW4yKHEueSwgcS54KTtcbiAgICAgICAgICAgIG91dC56ID0gMDtcbiAgICAgICAgfVxuICAgICAgICBlbHNlIGlmICh0ZXN0IDwgLTAuNDk5NSAqIHVuaXQpIHtcbiAgICAgICAgICAgIC8vIHNpbmd1bGFyaXR5IGF0IHNvdXRoIHBvbGVcbiAgICAgICAgICAgIG91dC54ID0gLU1hdGguUEkgLyAyO1xuICAgICAgICAgICAgb3V0LnkgPSAtMiAqIE1hdGguYXRhbjIocS55LCBxLngpO1xuICAgICAgICAgICAgb3V0LnogPSAwO1xuICAgICAgICB9XG4gICAgICAgIGVsc2Uge1xuICAgICAgICAgICAgLy8gbm8gc2luZ3VsYXJpdHkgLSBxIGlzIHRoZSBtYWpvcml0eSBvZiBjYXNlc1xuICAgICAgICAgICAgb3V0LnggPSBNYXRoLmFzaW4oMiAqIChxLncgKiBxLnggLSBxLnkgKiBxLnopKTtcbiAgICAgICAgICAgIG91dC55ID0gTWF0aC5hdGFuMigyICogcS53ICogcS55ICsgMiAqIHEueiAqIHEueCwgMSAtIDIgKiAocS54ICogcS54ICsgcS55ICogcS55KSk7XG4gICAgICAgICAgICBvdXQueiA9IE1hdGguYXRhbjIoMiAqIHEudyAqIHEueiArIDIgKiBxLnggKiBxLnksIDEgLSAyICogKHEueiAqIHEueiArIHEueCAqIHEueCkpO1xuICAgICAgICB9XG4gICAgICAgIG91dC54ICo9IFJBRDJERUc7XG4gICAgICAgIG91dC55ICo9IFJBRDJERUc7XG4gICAgICAgIG91dC56ICo9IFJBRDJERUc7XG4gICAgICAgIC8vIGVuc3VyZSB0aGUgZGVncmVlIHZhbHVlcyBhcmUgYmV0d2VlbiAwIGFuZCAzNjBcbiAgICAgICAgb3V0LnggPSBTY2FsYXIucmVwZWF0KG91dC54LCA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pc2FibGU6b25lLXZhcmlhYmxlLXBlci1kZWNsYXJhdGlvblxuICAgICAgICBjb25zdCBtMTEgPSBkYXRhWzBdLCBtMTIgPSBkYXRhWzRdLCBtMTMgPSBkYXRhWzhdO1xuICAgICAgICBjb25zdCBtMjEgPSBkYXRhWzFdLCBtMjIgPSBkYXRhWzVdLCBtMjMgPSBkYXRhWzldO1xuICAgICAgICBjb25zdCBtMzEgPSBkYXRhWzJdLCBtMzIgPSBkYXRhWzZdLCBtMzMgPSBkYXRhWzEwXTtcbiAgICAgICAgLy8gdHNsaW50OmVuYWJsZTpvbmUtdmFyaWFibGUtcGVyLWRlY2xhcmF0aW9uXG4gICAgICAgIGNvbnN0IHRyYWNlID0gbTExICsgbTIyICsgbTMzO1xuICAgICAgICBsZXQgcztcbiAgICAgICAgaWYgKHRyYWNlID4gMCkge1xuICAgICAgICAgICAgcyA9IDAuNSAvIE1hdGguc3FydCh0cmFjZSArIDEuMCk7XG4gICAgICAgICAgICByZXN1bHQudyA9IDAuMjUgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnggPSAobTMyIC0gbTIzKSAqIHM7XG4gICAgICAgICAgICByZXN1bHQueSA9IChtMTMgLSBtMzEpICogcztcbiAgICAgICAgICAgIHJlc3VsdC56ID0gKG0yMSAtIG0xMikgKiBzO1xuICAgICAgICB9XG4gICAgICAgIGVsc2UgaWYgKG0xMSA+IG0yMiAmJiBtMTEgPiBtMzMpIHtcbiAgICAgICAgICAgIHMgPSAyLjAgKiBNYXRoLnNxcnQoMS4wICsgbTExIC0gbTIyIC0gbTMzKTtcbiAgICAgICAgICAgIHJlc3VsdC53ID0gKG0zMiAtIG0yMykgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnggPSAwLjI1ICogcztcbiAgICAgICAgICAgIHJlc3VsdC55ID0gKG0xMiArIG0yMSkgLyBzO1xuICAgICAgICAgICAgcmVzdWx0LnogPSAobTEzICsgbTMxKSAvIHM7XG4gICAgICAgIH1cbiAgICAgICAgZW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AgICAgICAgbnVtMyA9IDEgLSBhbW91bnQ7XG4gICAgICAgICAgICBudW0yID0gZmxhZyA/IC1hbW91bnQgOiBhbW91bnQ7XG4gICAgICAgIH1cbiAgICAgICAgZWxzZSB7XG4gICAgICAgICAgICBjb25zdCBudW01ID0gTWF0aC5hY29zKG51bTQpO1xuICAgICAgICAgICAgY29uc3QgbnVtNiA9IDEuMCAvIE1hdGguc2luKG51bTUpO1xuICAgICAgICAgICAgbnVtMyA9IE1hdGguc2luKCgxLjAgLSBhbW91bnQpICogbnVtNSkgKiBudW02O1xuICAgICAgICAgICAgbnVtMiA9IGZsYWdcbiAgICAgICAgICAgICAgICA/IC1NYXRoLnNpbihhbW91bnQgKiBudW01KSAqIG51bTZcbiAgICAgICAgICAgICAgICA6IE1hdGguc2luKGFtb3VudCAqIG51bTUpICogbnVtNjtcbiAgICAgICAgfVxuICAgICAgICByZXN1bHQueCA9IG51bTMgKiBsZWZ0LnggKyBudW0yICogcmlnaHQueDtcbiAgICAgICAgcmVzdWx0LnkgPSBudW0zICogbGVmdC55ICsgbnVtMiAqIHJpZ2h0Lnk7XG4gICAgICAgIHJlc3VsdC56ID0gbnVtMyAqIGxlZnQueiArIG51bTIgKiByaWdodC56O1xuICAgICAgICByZXN1bHQudyA9IG51bTMgKiBsZWZ0LncgKyBudW0yICogcmlnaHQudztcbiAgICB9XG4gICAgUXVhdGVybmlvbi5zbGVycFRvUmVmID0gc2xlcnBUb1JlZjtcbiAgICAvKipcbiAgICAgKiBNdWx0aXBsaWVzIHR3byBxdWF0ZXJuaW9uc1xuICAgICAqIEBwYXJhbSBzZWxmIC0gZGVmaW5lcyB0aGUgZmlyc3Qgb3BlcmFuZFxuICAgICAqIEBwYXJhbSBxMSAtIGRlZmluZXMgdGhlIHNlY29uZCBvcGVyYW5kXG4gICAgICogQHJldHVybnMgYSBuZXcgcXVhdGVybmlvbiBzZXQgYXMgdGhlIG11bHRpcGxpY2F0aW9uIHJlc3VsdCBvZiB0aGUgc2Vs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ICB9XG4gICAgQ29sb3I0LmZyb21JbnRzID0gZnJvbUludHM7XG4gICAgLyoqXG4gICAgICogQ2hlY2sgdGhlIGNvbnRlbnQgb2YgYSBnaXZlbiBhcnJheSBhbmQgY29udmVydCBpdCB0byBhbiBhcnJheSBjb250YWluaW5nIFJHQkEgZGF0YVxuICAgICAqIElmIHRoZSBvcmlnaW5hbCBhcnJheSB3YXMgYWxyZWFkeSBjb250YWluaW5nIGNvdW50ICogNCB2YWx1ZXMgdGhlbiBpdCBpcyByZXR1cm5lZCBkaXJlY3RseVxuICAgICAqIEBwYXJhbSBjb2xvcnMgLSBkZWZpbmVzIHRoZSBhcnJheSB0byBjaGVja1xuICAgICAqIEBwYXJhbSBjb3VudCAtIGRlZmluZXMgdGhlIG51bWJlciBvZiBSR0JBIGRhdGEgdG8gZXhwZWN0XG4gICAgICogQHJldHVybnMgYW4gYXJyYXkgY29udGFpbmluZyBjb3VudCAqIDQgdmFsdWVzIChSR0JBKVxuICAgICAqL1xuICAgIGZ1bmN0aW9uIGNoZWNrQ29sb3JzNChjb2xvcnMsIGNvdW50KSB7XG4gICAgICAgIC8vIENoZWNrIGlmIGNvbG9yMyB3YXMgdXNlZFxuICAgICAgICBpZiAoY29sb3JzLmxlbmd0aCA9PT0gY291bnQgKiAzKSB7XG4gICAgICAgICAgICBjb25zdCBjb2xvcnM0ID0gW107XG4gICAgICAgICAgICBmb3IgKGxldCBpbmRleCA9IDA7IGluZGV4IDwgY29sb3JzLmxlbmd0aDsgaW5kZXggKz0gMykge1xuICAgICAgICAgICAgICAgIGNvbnN0IG5ld0luZGV4ID0gKGluZGV4IC8gMykgKiA0O1xuICAgICAgICAgICAgICAgIGNvbG9yczRbbmV3SW5kZXhdID0gY29sb3JzW2luZGV4XTtcbiAgICAgICAgICAgICAgICBjb2xvcnM0W25ld0luZGV4ICsgMV0gPSBjb2xvcnNbaW5kZXggKyAxXTtcbiAgICAgICAgICAgICAgICBjb2xvcnM0W25ld0luZGV4ICsgMl0g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pbWF0b3IuY3JlYXRlKGJvYXJkTW9kZWwsIHtcbiAgICBzdGF0ZXM6IFtcbiAgICAgIHtcbiAgICAgICAgY2xpcDogJ1N0YXRlMCcsXG4gICAgICAgIHBsYXlpbmc6IHRydWUsXG4gICAgICAgIGxvb3A6IGZhbHNlXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICBjbGlwOiAnU3RhdGUxJyxcbiAgICAgICAgcGxheWluZzogZmFsc2UsXG4gICAgICAgIGxvb3A6IGZhbHNlXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICBjbGlwOiAnU3RhdGUyJyxcbiAgICAgICAgcGxheWluZzogZmFsc2UsXG4gICAgICAgIGxvb3A6IGZhbHNlXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICBjbGlwOiAnU3RhdGUzJyxcbiAgICAgICAgcGxheWluZzogZmFsc2UsXG4gICAgICAgIGxvb3A6IGZhbHNlXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICBjbGlwOiAnU3RhdGU0JyxcbiAgICAgICAgcGxheWluZzogZmFsc2UsXG4gICAgICAgIGxvb3A6IGZhbHNlXG4gICAgICB9LFxuICAgICAge1xuICAgICAgICBjbGlwOiAnU3RhdGU1JyxcbiAgICAgICAgcGxheWluZzogZmFsc2UsXG4gICAgICAgIGxvb3A6IGZhbHNlXG4gICAgICB9LFxuICAgIF1cbiAgfSlcblxuXG4gIHBvaW50ZXJFdmVudHNTeXN0ZW0ub25Qb2ludGVyRG93bihcbiAgICB7XG4gICAgICBlbnRpdHk6IGJvYXJkTW9kZWwsXG4gICAgICBvcHRzOiB7IGJ1dHRvbjogSW5wdXRBY3Rpb24uSUFfUFJJTUFSWSwgaG92ZXJUZXh0OiAnQ3V0JywgbWF4RGlzdGFuY2U6IDUsIH0sXG4gICAgfSxcbiAgICBmdW5jdGlvbiAoKSB7XG4gICAgICBjdXRTdXNoaShDdXR0ZXJQYXJlbnQsIGJvYXJkTW9kZWwpXG4gICAgICBjb25zb2xlLmxvZygnY2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T8udmFsdWUgPz8gb2xkU3RhdGU/LnZhbHVlO1xuICAgICAgICBjb25zdCBpc1N1Ym1pdCA9IHN0YXRlPy5pc1N1Ym1pdCA/PyBvbGRTdGF0ZT8uaXNTdWJtaXQ7XG4gICAgICAgIGV2ZW50LnNldChjb21wb25lbnRJZCwgeyBvbkNoYW5nZUNhbGxiYWNrLCBvblN1Ym1pdENhbGxiYWNrLCB2YWx1ZSwgaXNTdWJtaXQgfSk7XG4gICAgfVxuICAgIGNvbnN0IGhvc3RDb25maWcgPSB7XG4gICAgICAgIC4uLm5vb3BDb25maWcsXG4gICAgICAgIGNyZWF0ZUluc3RhbmNlKHR5cGUsIHByb3BzKSB7XG4gICAgICAgICAgICBjb25zdCBlbnRpdHkgPSBlbmdpbmUuYWRkRW50aXR5KCk7XG4gICAgICAgICAgICBlbnRpdGllcy5hZGQoZW50aXR5KTtcbiAgICAgICAgICAgIGNvbnN0IGluc3RhbmNlID0ge1xuICAgICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgICBfY2hpbGQ6IFtdLFxuICAgICAgICAgICAgICAgIHBhcmVudDogQ0FOVkFTX1JPT1RfRU5USVRZLFxuICAgICAgICAgICAgICAgIHJpZ2h0T2Y6IHVuZGVmaW5lZFxuICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIGZvciAoY29uc3Qga2V5IGluIHByb3BzKSB7XG4gICAgICAgICAgICAgICAgY29uc3Qga2V5VHlwZWQgPSBrZXk7XG4gICAgICAgICAgICAgICAgaWYgKGtleVR5cGVkID09PSAnY2hpbGRyZW4nIHx8IGtleVR5cGVkID09PSAna2V5Jykge1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKGlzTGlzdGVuZXIoa2V5VHlwZWQpKSB7XG4gICAgICAgICAgICAgICAgICAgIHVwc2VydExpc3RlbmVyKGluc3RhbmNlLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlOiAnYWRkJyxcbiAgICAgICAgICAgICAgICAgICAgICAgIHByb3BzOiBwcm9wc1trZXlUeXBlZF0sXG4gICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQ6IGtleVR5cGVkXG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdXBzZXJ0Q29tcG9uZW50KGluc3RhbmNlLCBwcm9wc1trZXlUeXBlZF0sIGtleVR5cGVkKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gaW5zdGFuY2U7XG4gICAgICAgIH0sXG4gICAgICAgIGFwcGVuZENoaWxkLFxuICAgICAgICBhcHBlbmRDaGlsZFRvQ29udGFpbmVyOiBhcHBlbmRDaGlsZCxcbiAgICAgICAgYXBwZW5kSW5pdGlhbENoaWxkOiBhcHBlbmRDaGlsZCxcbiAgICAgICAgcmVtb3ZlQ2hpbGQ6IHJlbW92ZUNoaWxkLFxuICAgICAgICBwcmVwYXJlVXBkYXRlKF9pbnN0YW5jZSwgX3R5cGUsIG9sZFByb3BzLCBuZXdQcm9wcykge1xuICAgICAgICAgICAgcmV0dXJuIGNvbXBvbmVudEtleXNcbiAgICAgICAgICAgICAgICAubWFwKChjb21wb25lbnQpID0+IHByb3BzQ2hhbmdlZChjb21wb25lbnQsIG9sZFByb3BzW2NvbXBvbmVudF0sIG5ld1Byb3BzW2NvbXBvbmVudF0pKVxuICAgICAgICAgICAgICAgIC5maWx0ZXIoaXNOb3RVbmRlZmluZWQpO1xuICAgICAgICB9LFxuICAgICAgICBjb21taXRVcGRhdGUoaW5zdGFuY2UsIHVwZGF0ZVBheWxvYWQsIF90eXBlLCBfcHJldlByb3BzLCBfbmV4dFByb3BzLCBfaW50ZXJuYWxIYW5kbGUpIHtcbiAgICAgICAgICAgIGZvciAoY29uc3QgdXBkYXRlIG9mIHVwZGF0ZVBheWxvYWQpIHtcbiAgICAgICAgICAgICAgICBpZiAoaXNMaXN0ZW5lcih1cGRhdGUuY29tcG9uZW50KSkge1xuICAgICAgICAgICAgICAgICAgICB1cHNlcnRMaXN0ZW5lcihpbnN0YW5jZSwgdXBkYXRlKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh1cGRhdGUudHlwZSA9PT0gJ2RlbGV0ZScpIHtcbiAgICAgICAgICAgICAgICAgICAgcmVtb3ZlQ29tcG9uZW50KGluc3RhbmNlLCB1cGRhdGUuY29tcG9uZW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZWxzZSBpZiAodXBkYXRlLnByb3BzKSB7XG4gICAgICAgICAgICAgICAgICAgIHVwc2VydENvbXBvbmVudChpbnN0YW5jZSwgdXBkYXRlLnByb3BzLCB1cGRhdGUuY29tcG9uZW50KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGluc2VydEJlZm9yZShwYXJlbnRJbnN0YW5jZSwgY2hpbGQsIGJlZm9yZUNoaWxkKSB7XG4gICAgICAgICAgICBjb25zdCBiZWZvcmVDaGlsZEluZGV4ID0gcGFyZW50SW5zdGFuY2UuX2NoaWxkLmZpbmRJbmRleCgoYykgPT4gYy5lbnRpdHkgPT09IGJlZm9yZUNoaWxkLmVudGl0eSk7XG4gICAgICAgICAgICBwYXJlbnRJbnN0YW5jZS5fY2hpbGQgPSBbXG4gICAgICAgICAgICAgICAgLi4ucGFyZW50SW5zdGFuY2UuX2NoaWxkLnNsaWNlKDAsIGJlZm9yZUNoaWxkSW5kZXgpLFxuICAgICAgICAgICAgICAgIGNoaWxkLFxuICAgICAgICAgICAgICAgIC4uLnBhcmVudEluc3RhbmNlLl9jaGlsZC5zbGljZShiZWZvcmVDaGlsZEluZGV4KVxuICAgICAgICAgICAg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lvbiBVaUVudGl0eShwcm9wcykge1xuICAgIGNvbnN0IHVpVGV4dCA9IHByb3BzLnVpVGV4dCAmJiB7XG4gICAgICAgIHVpVGV4dDoge1xuICAgICAgICAgICAgLi4ucHJvcHMudWlUZXh0LFxuICAgICAgICAgICAgLi4uZ2V0Rm9udChwcm9wcy51aVRleHQuZm9udCksXG4gICAgICAgICAgICAuLi5nZXRUZXh0QWxpZ24ocHJvcHMudWlUZXh0LnRleHRBbGlnbilcbiAgICAgICAgfVxuICAgIH07XG4gICAgcmV0dXJuIFJlYWN0RWNzLmNyZWF0ZUVsZW1lbnQoXCJlbnRpdHlcIiwgeyAuLi5wYXJzZVByb3BzKHByb3BzKSwgLi4udWlUZXh0IH0pO1xufVxuIiwgImltcG9ydCB7IGlzTGlzdGVuZXIgfSBmcm9tICcuLi9jb21wb25lbnRzJztcbmV4cG9ydCBmdW5jdGlvbiBwcm9wc0NoYW5nZWQoY29tcG9uZW50LCBwcmV2UHJvcHMsIG5leHRQcm9wcykge1xuICAgIGlmIChwcmV2UHJvcHMgJiYgIW5leHRQcm9wcykge1xuICAgICAgICByZXR1cm4geyB0eXBlOiAnZGVsZXRlJywgY29tcG9uZW50IH07XG4gICAgfVxuICAgIGlmICghbmV4dFByb3BzKSB7XG4gICAgICAgIHJldHVybjtcbiAgICB9XG4gICAgaWYgKCFwcmV2UHJvcHMgJiYgbmV4dFByb3BzKSB7XG4gICAgICAgIHJldHVybiB7IHR5cGU6ICdhZGQnLCBwcm9wczogbmV4dFByb3BzLCBjb21wb25lbnQgfTtcbiAgICB9XG4gICAgaWYgKGlzTGlzdGVuZXIoY29tcG9uZW50KSkge1xuICAgICAgICBpZiAoIWlzRXF1YWwocHJldlByb3BzLCBuZXh0UHJvcHMpKSB7XG4gICAgICAgICAgICByZXR1cm4geyB0eXBlOiAncHV0JywgY29tcG9uZW50LCBwcm9wczogbmV4dFByb3BzIH07XG4gICAgICAgIH1cbiAgICB9XG4gICAgY29uc3QgY2hhbmdlcyA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yVHlwZT4oXG4gICAgICAgICAgVHJpZ2dlclR5cGUsXG4gICAgICAgICAgVHJpZ2dlclR5cGUuT05fQ0xJQ0ssXG4gICAgICAgICksXG4gICAgICAgIGNvbmRpdGlvbnM6IFNjaGVtYXMuT3B0aW9uYWwoXG4gICAgICAgICAgU2NoZW1hcy5BcnJheShcbiAgICAgICAgICAgIFNjaGVtYXMuTWFwKHtcbiAgICAgICAgICAgICAgaWQ6IFNjaGVtYXMuT3B0aW9uYWwoU2NoZW1hcy5JbnQpLFxuICAgICAgICAgICAgICB0eXBlOiBTY2hlbWFzLkVudW1TdHJpbmc8VHJpZ2dlckNvbmRpdGlvblR5cGU+KFxuICAgICAgICAgICAgICAgIFRyaWdnZXJDb25kaXRpb25UeXBlLFxuICAgICAgICAgICAgICAgIFRyaWdnZXJDb25kaXRpb25UeXBlLldIRU5fU1RBVEVfSVMsXG4gICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgIHZhbHVlOiBTY2hlbWFzLlN0cmluZyxcbiAgICAgICAgICAgIH0pLFxuICAgICAgICAgICksXG4gICAgICAgICksXG4gICAgICAgIG9wZXJhdGlvbjogU2NoZW1hcy5PcHRpb25hbChcbiAgICAgICAgICBTY2hlbWFzLkVudW1TdHJpbmc8VHJpZ2dlckNvbmRpdGlvbk9wZXJhdGlvbj4oXG4gICAgICAgICAgICBUcmlnZ2VyQ29uZGl0aW9uT3BlcmF0aW9uLFxuICAgICAgICAgICAgVHJpZ2dlckNvbmRpdGlvbk9wZXJhdGlvbi5BTkQsXG4gICAgICAgICAgKSxcbiAgICAgICAgKSxcbiAgICAgICAgYWN0aW9uczogU2NoZW1hcy5BcnJheShcbiAgICAgICAgICBTY2hlbWFzLk1hcCh7XG4gICAgICAgICAgICBpZDogU2NoZW1hcy5PcHRpb25hbChTY2hlbWFzLkludCksXG4gICAgICAgICAgICBuYW1lOiBTY2hlbWFzLk9wdGlvbmFsKFNjaGVtYXMuU3RyaW5nKSxcbiAgICAgICAgICB9KSxcb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i50eXBlKSxcbiAgICAgIG5ldyBTZXQ8U3RyaW5nPigpLFxuICAgIClcblxuICAgIGZvciAoY29uc3QgdHlwZSBvZiB0eXBlcykge1xuICAgICAgc3dpdGNoICh0eXBlKSB7XG4gICAgICAgIGNhc2UgQWN0aW9uVHlwZS5QTEFZX0FOSU1BVElPTjoge1xuICAgICAgICAgIGluaXRQbGF5QW5pbWF0aW9uKGVudGl0eSlcbiAgICAgICAgICBicmVha1xuICAgICAgICB9XG4gICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgYnJlYWtcbiAgICAgIH1cbiAgICB9XG5cbiAgICAvLyBiaW5kIGFjdGlvbnNcbiAgICBjb25zdCBhY3Rpb25FdmVudHMgPSBnZXRBY3Rpb25FdmVudHMoZW50aXR5KVxuICAgIGZvciAoY29uc3QgYWN0aW9uIG9mIGFjdGlvbnMudmFsdWUpIHtcbiAgICAgIGFjdGlvbkV2ZW50cy5vbihhY3Rpb24ubmFtZSwgKCkgPT4ge1xuICAgICAgICBzd2l0Y2ggKGFjdGlvbi50eXBlKSB7XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlBMQVlfQU5JTUFUSU9OOiB7XG4gICAgICAgICAgICBoYW5kbGVQbGF5QW5pbWF0aW9uKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5QTEFZX0FOSU1BVElPTj4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TVE9QX0FOSU1BVElPTjoge1xuICAgICAgICAgICAgaGFuZGxlU3RvcEFuaW1hdGlvbihcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RPUF9BTklNQVRJT04+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU0VUX1NUQVRFOiB7XG4gICAgICAgICAgICBoYW5kbGVTZXRTdGF0ZShlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TRVRfU1RBVEU+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU1RBUlRfVFdFRU46IHtcbiAgICAgICAgICAgIGhhbmRsZVN0YXJ0VHdlZW4oZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RBUlRfVFdFRU4+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU0VUX0NPVU5URVI6IHtcbiAgICAgICAgICAgIGhhbmRsZVNldENvdW50ZXIoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU0VUX0NPVU5URVI+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuSU5DUkVNRU5UX0NPVU5URVI6IHtcbiAgICAgICAgICAgIGhhbmRsZUluY3JlbWVudENvdW50ZXIoXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLklOQ1JFTUVOVF9DT1VOVEVSPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLkRFQ1JFQVNFX0NPVU5URVI6IHtcbiAgICAgICAgICAgIGhhbmRsZURlY3JlYXNlQ291bnRlcihcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuREVDUkVBU0VfQ09VTlRFUj4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5QTEFZX1NPVU5EOiB7XG4gICAgICAgICAgICBoYW5kbGVQbGF5U291bmQoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuUExBWV9TT1VORD4oYWN0aW9uKSlcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TVE9QX1NPVU5EOiB7XG4gICAgICAgICAgICBoYW5kbGVTdG9wU291bmQoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RPUF9TT1VORD4oYWN0aW9uKSlcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5TRVRfVklTSUJJTElUWToge1xuICAgICAgICAgICAgaGFuZGxlU2V0VmlzaWJpbGl0eShcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU0VUX1ZJU0lCSUxJVFk+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuQVRUQUNIX1RPX1BMQVlFUjoge1xuICAgICAgICAgICAgaGFuZGxlQXR0YWNoVG9QbGF5ZXIoXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLkFUVEFDSF9UT19QTEFZRVI+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuREVUQUNIX0ZST01fUExBWUVSOiB7XG4gICAgICAgICAgICBoYW5kbGVEZXRhY2hGcm9tUGxheWVyKFxuICAgICAgICAgICAgICBlbnRpdHksXG4gICAgICAgICAgICAgIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5ERVRBQ0hfRlJPTV9QTEFZRVI+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuUExBWV9WSURFT19TVFJFQU06IHtcbiAgICAgICAgICAgIGhhbmRsZVBsYXlWaWRlbyhcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuUExBWV9WSURFT19TVFJFQU0+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU1RPUF9WSURFT19TVFJFQU06IHtcbiAgICAgICAgICAgIGhhbmRsZVN0b3BWaWRlbyhcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RPUF9WSURFT19TVFJFQU0+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuUExBWV9BVURJT19TVFJFQU06IHtcbiAgICAgICAgICAgIGhhbmRsZVBsYXlBdWRpb1N0cmVhbShcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuUExBWV9BVURJT19TVFJFQU0+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU1RPUF9BVURJT19TVFJFQU06IHtcbiAgICAgICAgICAgIGhhbmRsZVN0b3BBdWRpb1N0cmVhbShcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RPUF9BVURJT19TVFJFQU0+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuVEVMRVBPUlRfUExBWUVSOiB7XG4gICAgICAgICAgICBoYW5kbGVUZWxlcG9ydFBsYXllcihcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuVEVMRVBPUlRfUExBWUVSPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLk1PVkVfUExBWUVSOiB7XG4gICAgICAgICAgICBoYW5kbGVNb3ZlUGxheWVyKGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLk1PVkVfUExBWUVSPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlBMQVlfREVGQVVMVF9FTU9URToge1xuICAgICAgICAgICAgaGFuZGxlUGxheURlZmF1bHRFbW90ZShcbiAgICAgICAgICAgICAgZW50aXR5LFxuICAgICAgICAgICAgICBnZXRQYXlsb2FkPEFjdGlvblR5cGUuUExBWV9ERUZBVUxUX0VNT1RFPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlBMQVlfQ1VTVE9NX0VNT1RFOiB7XG4gICAgICAgICAgICBoYW5kbGVQbGF5Q3VzdG9tRW1vdGUoXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlBMQVlfQ1VTVE9NX0VNT1RFPihhY3Rpb24pLFxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLk9QRU5fTElOSzoge1xuICAgICAgICAgICAgaGFuZGxlT3BlbkxpbmsoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuT1BFTl9MSU5LPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNIT1dfVEVYVDoge1xuICAgICAgICAgICAgaGFuZGxlU2hvd1RleHQoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU0hPV19URVhUPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLkhJREVfVEVYVDoge1xuICAgICAgICAgICAgaGFuZGxlSGlkZVRleHQoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuSElERV9URVhUPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNUQVJUX0RFTEFZOiB7XG4gICAgICAgICAgICBoYW5kbGVTdGFydERlbGF5KGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlNUQVJUX0RFTEFZPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNUT1BfREVMQVk6IHtcbiAgICAgICAgICAgIGhhbmRsZVN0b3BEZWxheShlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TVE9QX0RFTEFZPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNUQVJUX0xPT1A6IHtcbiAgICAgICAgICAgIGhhbmRsZVN0YXJ0TG9vcChlbnRpdHksIGdldFBheWxvYWQ8QWN0aW9uVHlwZS5TVEFSVF9MT09QPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLlNUT1BfTE9PUDoge1xuICAgICAgICAgICAgaGFuZGxlU3RvcExvb3AoZW50aXR5LCBnZXRQYXlsb2FkPEFjdGlvblR5cGUuU1RPUF9MT09QPihhY3Rpb24pKVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBBY3Rpb25UeXBlLkNMT05FX0VOVElUWToge1xuICAgICAgICAgICAgaGFuZGxlQ2xvbmVFbnRpdHkoXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLkNMT05FX0VOVElUWT4oYWN0aW9uKSxcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgQWN0aW9uVHlwZS5SRU1PVkVfRU5USVRZOiB7XG4gICAgICAgICAgICBoYW5kbGVSZW1vdmVFbnRpdHkoXG4gICAgICAgICAgICAgIGVudGl0eSxcbiAgICAgICAgICAgICAgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlJFTU9WRV9FTlRJVFk+KGFjdGlvbiksXG4gICAgICAgICAgICApXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAgICAgICAgICBjYXNlIEFjdGlvblR5cGUuU0hPV19JTUFHRToge1xuICAgICAgICAgICAgaGFuZGxlU2hvd0ltYWdlKGVudGl0eSwgZ2V0UGF5bG9hZDxBY3Rpb25UeXBlLlNIT1dfSU1BR0U+KGFjdGlvbikpXG4gICAgICAgICAgICBicmVha1xuICAgICAgICAgIH1cbiAg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AoY29uc3QgdHJpZ2dlckFjdGlvbiBvZiB0cmlnZ2VyLmFjdGlvbnMpIHtcbiAgICAgICAgICAgIGlmIChpc1ZhbGlkQWN0aW9uKHRyaWdnZXJBY3Rpb24pKSB7XG4gICAgICAgICAgICAgIGNvbnN0IGVudGl0eSA9IGdldEVudGl0eUJ5QWN0aW9uKHRyaWdnZXJBY3Rpb24pXG4gICAgICAgICAgICAgIGlmIChlbnRpdHkpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBhY3Rpb25zID0gQWN0aW9ucy5nZXRPck51bGwoZW50aXR5KVxuICAgICAgICAgICAgICAgIGlmIChhY3Rpb25zKSB7XG4gICAgICAgICAgICAgICAgICBjb25zdCBhY3Rpb24gPSBhY3Rpb25zLnZhbHVlLmZpbmQoXG4gICAgICAgICAgICAgICAgICAgICgkKSA9PiAkLm5hbWUgPT09IHRyaWdnZXJBY3Rpb24ubmFtZSxcbiAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgIGlmIChhY3Rpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gYWN0aW9ucyBhcmUgZW5xdWV1ZWQgdG8gYmUgZXhlY3V0ZWQgb24gdGhlIG5leHQgdGljayBhZnRlciBhbGwgdGhlIHRyaWdnZXJzIGhhdmUgYmVlbiBwcm9jZXNzZWQsXG4gICAgICAgICAgICAgICAgICAgIC8vIHRoaXMgaXMgdG8gYXZvaWQgb25lIHRyaWdnZXIgbWVzc2luZyB3aXRoIG90aGVyIHRyaWdnZXIncyBjb25kaXRpb25zXG4gICAgICAgICAgICAgICAgICAgIGFjdGlvblF1ZXVlLnB1c2goeyBlbnRpdHksIGFjdGlvbiB9KVxuICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgICAgfSlcbiAgICB9XG4gICAgdHJpZ2dlckV2ZW50cy5lbWl0KFRy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1ZVxuICB9XG5cbiAgZnVuY3Rpb24gY2hlY2tDb25kaXRpb24oY29uZGl0aW9uOiBUcmlnZ2VyQ29uZGl0aW9uKSB7XG4gICAgY29uc3QgZW50aXR5ID0gZ2V0RW50aXR5QnlDb25kaXRpb24oY29uZGl0aW9uKVxuICAgIGlmIChlbnRpdHkpIHtcbiAgICAgIHRyeSB7XG4gICAgICAgIHN3aXRjaCAoY29uZGl0aW9uLnR5cGUpIHtcbiAgICAgICAgICBjYXNlIFRyaWdnZXJDb25kaXRpb25UeXBlLldIRU5fU1RBVEVfSVM6IHtcbiAgICAgICAgICAgIGNvbnN0IHN0YXRlcyA9IFN0YXRlcy5nZXRPck51bGwoZW50aXR5KVxuICAgICAgICAgICAgaWYgKHN0YXRlcyAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBjb25zdCBjdXJyZW50VmFsdWUgPSBnZXRDdXJyZW50VmFsdWUoc3RhdGVzKVxuICAgICAgICAgICAgICByZXR1cm4gY3VycmVudFZhbHVlID09PSBjb25kaXRpb24udmFsdWVcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgVHJpZ2dlckNvbmRpdGlvblR5cGUuV0hFTl9TVEFURV9JU19OT1Q6IHtcbiAgICAgICAgICAgIGNvbnN0IHN0YXRlcyA9IFN0YXRlcy5nZXRPck51bGwoZW50aXR5KVxuICAgICAgICAgICAgaWYgKHN0YXRlcyAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICBjb25zdCBjdXJyZW50VmFsdWUgPSBnZXRDdXJyZW50VmFsdWUoc3RhdGVzKVxuICAgICAgICAgICAgICByZXR1cm4gY3VycmVudFZhbHVlICE9PSBjb25kaXRpb24udmFsdWVcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGJyZWFrXG4gICAgICAgICAgfVxuICAgICAgICAgIGNhc2UgVHJpZ2dlckNvbmRpdGlvblR5cGUuV0hFTl9DT1VOVEVSX0VRVUFMUzoge1xuICAgICAgICAgICAgY29uc3QgY291bnRlciA9IENvdW50ZXIuZ2V0T3JOdWxsKGVudGl0eSlcbiAgICAgICAgICAgIGlmIChjb3VudGVyICE9PSBudWxsKSB7XG4gICAgICAgICAgICAgIGNvbnN0IG51bWVyaWMgPSBOdW1iZXIoY29uZGl0aW9uLnZhbHVlKVxuICAgICAgICAgICAgICBpZiAoIWlzTmFOKG51bWVyaWMpKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGNvdW50ZXIudmFsdWUgPT09IG51bWVyaWNcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBUcmlnZ2VyQ29uZGl0aW9uVHlwZS5XSEVOX0NPVU5URVJfSVNfR1JFQVRFUl9USEFOOiB7XG4gICAgICAgICAgICBjb25zdCBjb3VudGVyID0gQ291bnRlci5nZXRPck51bGwoZW50aXR5KVxuICAgICAgICAgICAgaWYgKGNvdW50ZXIgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgY29uc3QgbnVtZXJpYyA9IE51bWJlcihjb25kaXRpb24udmFsdWUpXG4gICAgICAgICAgICAgIGlmICghaXNOYU4obnVtZXJpYykpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY291bnRlci52YWx1ZSA+IG51bWVyaWNcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgICAgY2FzZSBUcmlnZ2VyQ29uZGl0aW9uVHlwZS5XSEVOX0NPVU5URVJfSVNfTEVTU19USEFOOiB7XG4gICAgICAgICAgICBjb25zdCBjb3VudGVyID0gQ291bnRlci5nZXRPck51bGwoZW50aXR5KVxuICAgICAgICAgICAgaWYgKGNvdW50ZXIgIT09IG51bGwpIHtcbiAgICAgICAgICAgICAgY29uc3QgbnVtZXJpYyA9IE51bWJlcihjb25kaXRpb24udmFsdWUpXG4gICAgICAgICAgICAgIGlmICghaXNOYU4obnVtZXJpYykpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gY291bnRlci52YWx1ZSA8IG51bWVyaWNcbiAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnJlYWtcbiAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgIGNvbnNvbGUuZXJyb3IoJ0Vycm9yIGluIGNvbmRpdGlvbicsIGNvbmRpdGlvbilcbiAgICAgIH1cbiAgICB9XG4gICAgcmV0dXJuIGZhbHNlXG4gIH1cblxuICBmdW5jdGlvbiBnZXRFbnRpdHlCeUlkPFQgZXh0ZW5kcyB7IGlkOiBudW1iZXIgfT4oXG4gICAgY29tcG9uZW50TmFtZTogc3RyaW5nLFxuICAgIGlkOiBudW1iZXIsXG4gICkge1xuICAgIGNvbnN0IENvbXBvbmVudCA9IGVuZ2luZS5nZXRDb21wb25lbnQoXG4gICAgICBjb21wb25lbnROYW1lLFxuICAgICkgYXMgTGFzdFdyaXRlV2luRWxlbWVudFNldENvbXBvbmVudERlZmluaXRpb248VD5cbiAgICBjb25zdCBlbnRpdGllcyA9IEFycmF5LmZyb20oZW5naW5lLmdldEVudGl0aWVzV2l0aChDb21wb25lbnQpKVxuICAgIGNvbnN0IHJlc3VsdCA9IGVudGl0aWVzLmZpbmQoKFtfZW50aXR5LCB2YWx1ZV0pID0+IHZhbHVlLmlkID09PSBpZClcbiAgICByZXR1cm4gQXJyYXkuaXNBcnJheShyZXN1bHQpICYmIHJlc3VsdC5sZW5ndGggPiAwID8gcmVzdWx0WzBdIDogbnVsbFxuICB9XG5cbiAgZnVuY3Rpb24gZ2V0RW50aXR5QnlBY3Rpb24oYWN0aW9uOiBUcmlnZ2VyQWN0aW9uKSB7XG4gICAgaWYgKGFjdGlvbi5pZCkge1xuICAgICAgY29uc3QgZW50aXR5ID0gZ2V0RW50aXR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HBvcnQgZnVuY3Rpb24gY29va1N5c3RlbShkdDogbnVtYmVyKSB7XG5cbiAgZm9yIChjb25zdCBbZW50aXR5LCBfY29va2luZywgX3BvdERhdGFdIG9mIGVuZ2luZS5nZXRFbnRpdGllc1dpdGgoQ29va2luZywgUG90RGF0YSkpIHtcbiAgICBpZiAoX2Nvb2tpbmcuYWN0aXZlICYmIF9wb3REYXRhLmhhc0luZ3JlZGllbnQpIHtcblxuICAgICAgY29uc3QgY29va2luZyA9IENvb2tpbmcuZ2V0TXV0YWJsZShlbnRpdHkpXG5cblxuICAgICAgY29va2luZy50aW1lICs9IGR0XG5cbiAgICAgIGlmIChjb29raW5nLnRpbWUgPiBDT09LRURfQUZURVIgJiYgX3BvdERhdGEuaGFzSW5ncmVkaWVudCAmJiBfcG90RGF0YS5zdGF0ZSA9PT0gU291cFN0YXRlLlJhdykge1xuXG4gICAgICAgIGNvbnNvbGUubG9nKFwiQ09PS0VEIVwiKVxuXG4gICAgICAgIGNvbnN0IHBvdERhdGEgPSBQb3REYXRhLmdldE11dGFibGUoZW50aXR5KVxuICAgICAgICBwb3REYXRhLnN0YXRlID0gU291cFN0YXRlLkNvb2tlZFxuICAgICAgICBjb25zdCBmb29kID0gcG90RGF0YS5hdHRhY2hlZEVudGl0eVxuICAgICAgICBHbHRmQ29udGFpbmVyLmdldE11dGFibGUoZm9vZCkuc3JjID0gXCJhc3NldHMvbW9kZWxzL1BsYXRlTm9vZGxlcy5nbGJcIlxuICAgICAgICBHcmFiYWJsZU9iamVjdENvbXBvbmVudC5nZXRNdXRhYmxlKGZvb2QpLnR5cGUgPSBJbmdyZWRpZW50VHlwZS5Db29rZWROb29kbGVzXG5cbiAgICAgIH0gZWxzZSBpZiAoY29va2luZy50aW1lID4gQlVSTlRfQUZURVIgJiYgX3BvdERhdGEuc3RhdGUgPT09IFNvdXBTdGF0ZS5Db29rZWQpIHtcblxuICAgICAgICBjb25zb2xlLmxvZyhcIkJVUk5JTkchISFcIilcblxuICAgICA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ybSIsICJBdWRpb1NvdXJjZSIsICJBdmF0YXJBdHRhY2giLCAiVmlzaWJpbGl0eUNvbXBvbmVudCIsICJHbHRmQ29udGFpbmVyIiwgImluaXRlZEVudGl0aWVzIiwgImFjdGlvbnMiLCAidHlwZXMiLCAiVmVjdG9yMyIsICJRdWF0ZXJuaW9uIiwgIk1lc2hDb2xsaWRlciIsICJWaWRlb1BsYXllciIsICJNYXRlcmlhbCIsICJBdWRpb1N0cmVhbSIsICJVaVRleHQiLCAiZW5naW5lIiwgInBvaW50ZXJFdmVudHNTeXN0ZW0iLCAiUG9pbnRlckV2ZW50cyIsICJHbHRmQ29udGFpbmVyIiwgIkFuaW1hdG9yIiwgIkF1ZGlvU291cmNlIiwgIkF2YXRhckF0dGFjaCIsICJUcmFuc2Zvcm0iLCAiVmlzaWJpbGl0eUNvbXBvbmVudCIsICJHbHRmQ29udGFpbmVyIiwgIk1hdGVyaWFsIiwgIlZpZGVvUGxheWVyIiwgIlZlY3RvcjMiLCAiUXVhdGVybmlvbiIsICJUZXh0U2hhcGUiLCAiaW1wb3J0X0VuZ2luZUFwaSIsICJyZW5kZXJlclRyYW5zcG9ydCIsICJzZW5kQmF0Y2giXQp9Cg== diff --git a/main.crdt b/main.crdt index 2fee362..aed082b 100644 Binary files a/main.crdt and b/main.crdt differ diff --git a/src/index.ts b/src/index.ts index e33c846..2bb256a 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,7 +2,7 @@ import { ColliderLayer, engine, Animator, AudioSource, VisibilityComponent, Material, VideoPlayer, pointerEventsSystem, - AvatarAttach, GltfContainer, PointerEvents, PointerEventType, TextShape, Transform + AvatarAttach, GltfContainer, PointerEvents, Tween, PointerEventType, TextShape, Transform } from '@dcl/sdk/ecs' import { Vector3, Quaternion } from '@dcl/sdk/math' import { BeerType, IngredientType, SyncEntityIDs } from './definitions' @@ -58,13 +58,39 @@ export function main() { fontSize: 3, }) + //Ingredient expenders const noodles_expender = engine.getEntityOrNullByName("ExpenderNoodles") const roll_expender = engine.getEntityOrNullByName("ExpenderRolls") - const noodles_button = engine.getEntityOrNullByName("Noodle Button") const roll_button = engine.getEntityOrNullByName("Roll Button") + // TODO: HANDLE IDS FOR MULTIPLAYER MODE + + if (noodles_expender && roll_expender && noodles_button && roll_button) { + const noodles_button_events = getTriggerEvents(noodles_button) + noodles_button_events.on(TriggerType.ON_CLICK, () => { + console.log("BUTTON WAS PRESSED!!") + const startPosition = Vector3.add(Transform.get(noodles_expender).position, Vector3.create(0, 0.7, 0)) + createIngredient(IngredientType.Noodles, startPosition, true) + + }) + + const roll_button_events = getTriggerEvents(roll_button) + roll_button_events.on(TriggerType.ON_CLICK, () => { + console.log("BUTTON WAS PRESSED!!") + const startPosition = Vector3.add(Transform.get(roll_expender).position, Vector3.create(0, 0.7, 0)) + createIngredient(IngredientType.SushiRoll, startPosition, true) + + }) + + } + + + + + + // Pots const pot1 = engine.getEntityOrNullByName("Pot1") const pot2 = engine.getEntityOrNullByName("Pot2") @@ -143,7 +169,7 @@ export function main() { } - + // FOR TESTING createIngredient(IngredientType.Noodles, Vector3.create(4.4, 0.8, 1.5)) createIngredient(IngredientType.SushiRoll, Vector3.create(6.4, 0.8, 1.5)) createIngredient(IngredientType.SlicedSushi, Vector3.create(8.4, 0.8, 1.5)) diff --git a/src/modules/factory.ts b/src/modules/factory.ts index c6ef6d4..f71acd3 100644 --- a/src/modules/factory.ts +++ b/src/modules/factory.ts @@ -11,7 +11,9 @@ import { MeshRenderer, AudioSource, ColliderLayer, - pointerEventsSystem + pointerEventsSystem, + Tween, + EasingFunction } from '@dcl/sdk/ecs' import { Vector3, Quaternion } from '@dcl/sdk/math' import { BeerGlass, BeerType, CuttingBoard, getTapData, GrabableObjectComponent, IngredientType, SyncEntityIDs, TapBase, TapComponent } from '../definitions' @@ -55,7 +57,7 @@ export function instanceBeer(entity: Entity, id: SyncEntityIDs) { // INGREDIENT -export function createIngredient(ingredient: IngredientType, position: Vector3) { +export function createIngredient(ingredient: IngredientType, position: Vector3, fall?: boolean) { const entity = engine.addEntity() let model = "" @@ -101,11 +103,25 @@ export function createIngredient(ingredient: IngredientType, position: Vector3) ] }) - // syncEntity( - // entity, - // [AudioSource.componentId, Transform.componentId, GrabableObjectComponent.componentId], - // id - // ) + if (fall) { + Tween.create(entity, { + mode: Tween.Mode.Move({ + start: position, + end: Vector3.add(position, Vector3.create(0, -0.7, 0)), + }), + duration: 1000, + easingFunction: EasingFunction.EF_LINEAR + }) + } + + syncEntity( + entity, + [AudioSource.componentId, Transform.componentId, GrabableObjectComponent.componentId, Tween.componentId], + // id + ) + // TODO: HANDLE IDS FOR MULTIPLAYER + + return ingredient } @@ -204,7 +220,8 @@ export function createCuttingBoard(position: Vector3, id: SyncEntityIDs) { const CutterParent = engine.addEntity() Transform.create(CutterParent, { - position: position + position: position, + rotation: Quaternion.fromEulerDegrees(0, 0, 0) }) syncEntity(CutterParent, [], id + 100) diff --git a/src/modules/pickAndDrop.ts b/src/modules/pickAndDrop.ts index a45b18c..af4bc7a 100644 --- a/src/modules/pickAndDrop.ts +++ b/src/modules/pickAndDrop.ts @@ -38,7 +38,7 @@ export function pickingGlassSystem() { // parent: hitParentEntity // }) console.log("DROPPED ON TAP") - removeParent(pickedUpChild) + //removeParent(pickedUpChild) parentEntity(pickedUpChild, hitParentEntity) drop = true } else if (hitParentEntity && CuttingBoard.has(hitParentEntity)) { @@ -46,7 +46,7 @@ export function pickingGlassSystem() { console.log("DROPPED ON CUTTING BOARD") const board = CuttingBoard.getMutable(hitParentEntity) if (!board || !board.hasRoll || !board.modelEntity) { - removeParent(pickedUpChild) + //removeParent(pickedUpChild) parentEntity(pickedUpChild, hitParentEntity) drop = true @@ -63,7 +63,7 @@ export function pickingGlassSystem() { console.log("DROPPED ON POT") const pot = PotData.getMutable(hitEntity) if (pot && !pot.hasIngredient) { - removeParent(pickedUpChild) + //removeParent(pickedUpChild) parentEntity(pickedUpChild, hitEntity) pot.hasIngredient = true pot.attachedEntity = pickedUpChild diff --git a/src/modules/pot.ts b/src/modules/pot.ts index ff7f7ba..7c2857a 100644 --- a/src/modules/pot.ts +++ b/src/modules/pot.ts @@ -44,6 +44,7 @@ export function pickFood(pot: Entity) { const potData = PotData.getMutable(pot) if (potData && potData.hasIngredient && potData.attachedEntity !== undefined) { + console.log("PICKING UP FROM POT") pickUpItem(potData.attachedEntity) potData.hasIngredient = false //potData.attachedEntity = undefined